42 gchar *ret, **vargv, **argv;
44 g_return_val_if_fail (first, NULL);
54 ret = g_build_pathv (G_DIR_SEPARATOR_S, argv);
61 path_get_body (
const gchar *path)
65 g_return_val_if_fail (path, NULL);
67 beg = strstr (path,
"://");
70 return g_strndup (path, strcspn (path,
"/"));
74 end = strchr (beg,
'/');
77 return g_strdup (path);
80 return g_strndup (path, end - path);
86 path_get_dirname (
const gchar *path)
90 g_return_val_if_fail (path, NULL);
92 for (i = 0; path[i] ; i++) {
98 return g_strndup (path, n);
107 g_return_val_if_fail (plspath, NULL);
108 g_return_val_if_fail (file, NULL);
110 if (strstr (file,
"://") != NULL) {
111 return g_strdup (file);
114 if (file[0] ==
'/') {
115 path = path_get_body (plspath);
116 url = g_strconcat (path, file, NULL);
118 path = path_get_dirname (plspath);
119 url = g_strconcat (path,
"/", file, NULL);
129 gchar *tmp1, *tmp2, *tmp3, *tmp4;
133 tmp1 = g_utf8_casefold (str1, len1);
134 tmp2 = g_utf8_casefold (str2, len2);
136 tmp3 = g_utf8_collate_key_for_filename (tmp1, -1);
137 tmp4 = g_utf8_collate_key_for_filename (tmp2, -1);
139 res = strcmp (tmp3, tmp4);