Lines Matching refs:hmagicpath

89 _w32_append_path(char **hmagicpath, const char *fmt, ...)  in _w32_append_path()  argument
105 if (*hmagicpath == NULL) { in _w32_append_path()
106 *hmagicpath = tmppath; in _w32_append_path()
110 if (asprintf(&newpath, "%s%c%s", *hmagicpath, PATHSEP, tmppath) < 0) in _w32_append_path()
113 free(*hmagicpath); in _w32_append_path()
115 *hmagicpath = newpath; in _w32_append_path()
122 _w32_get_magic_relative_to(char **hmagicpath, HINSTANCE module) in _w32_get_magic_relative_to() argument
148 _w32_append_path(hmagicpath, in _w32_get_magic_relative_to()
154 _w32_append_path(hmagicpath, trypaths[sp], dllpath); in _w32_get_magic_relative_to()
179 char *home, *hmagicpath; in get_default_magic() local
191 if (asprintf(&hmagicpath, "%s/.magic.mgc", home) < 0) in get_default_magic()
193 if (stat(hmagicpath, &st) == -1) { in get_default_magic()
194 free(hmagicpath); in get_default_magic()
195 if (asprintf(&hmagicpath, "%s/.magic", home) < 0) in get_default_magic()
197 if (stat(hmagicpath, &st) == -1) in get_default_magic()
200 free(hmagicpath); in get_default_magic()
201 if (asprintf(&hmagicpath, "%s/%s", home, hmagic) < 0) in get_default_magic()
203 if (access(hmagicpath, R_OK) == -1) in get_default_magic()
208 if (asprintf(&default_magic, "%s:%s", hmagicpath, MAGIC) < 0) in get_default_magic()
210 free(hmagicpath); in get_default_magic()
214 free(hmagicpath); in get_default_magic()
217 hmagicpath = NULL; in get_default_magic()
226 _w32_append_path(&hmagicpath, "%s%s", home, hmagic); in get_default_magic()
230 _w32_append_path(&hmagicpath, "%s%s", home, hmagic); in get_default_magic()
234 _w32_append_path(&hmagicpath, in get_default_magic()
239 _w32_append_path(&hmagicpath, "%s%s", home, hmagic); in get_default_magic()
242 _w32_get_magic_relative_to(&hmagicpath, NULL); in get_default_magic()
245 _w32_get_magic_relative_to(&hmagicpath, _w32_dll_instance); in get_default_magic()
248 default_magic = hmagicpath; in get_default_magic()