#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: magic.c,v 1.65 2009/09/14 17:50:38 christos Exp $")
+FILE_RCSID("@(#)$File: magic.c,v 1.66 2010/07/21 16:47:17 christos Exp $")
#endif /* lint */
#include "magic.h"
{
if (dllpath[0] == 0 &&
GetModuleFileNameA(hinstDLL, dllpath, MAX_PATH) != 0)
- PathRemoveFileSpec(dllpath);
+ PathRemoveFileSpecA(dllpath);
return TRUE;
}
#endif
private const char *
get_default_magic(void)
{
- static const char hmagic[] = "/.magic";
+ static const char hmagic[] = "/.magic/magic.mgc";
static char default_magic[2 * MAXPATHLEN + 2];
char *home;
char hmagicpath[MAXPATHLEN + 1] = {0};
return ml ? 0 : -1;
}
+public int
+magic_list(struct magic_set *ms, const char *magicfile)
+{
+ struct mlist *ml = file_apprentice(ms, magicfile, FILE_LIST);
+ free_mlist(ml);
+ return ml ? 0 : -1;
+}
+
private void
close_and_restore(const struct magic_set *ms, const char *name, int fd,
const struct stat *sb)