#endif
#ifndef lint
-FILE_RCSID("@(#)$Id: apprentice.c,v 1.91 2006/05/03 15:50:23 christos Exp $")
+FILE_RCSID("@(#)$Id: apprentice.c,v 1.92 2006/06/01 21:37:07 ian Exp $")
#endif /* lint */
#define EATAB {while (isascii((unsigned char) *l) && \
return mlist;
}
+/*
+ * Get weight of this magic entry, for sorting purposes.
+ */
private size_t
apprentice_magic_strength(const struct magic *m)
{
}
}
+/*
+ * Sort callback for sorting entries by "strength" (basically length)
+ */
private int
apprentice_sort(const void *a, const void *b)
{
if (action == FILE_CHECK)
(void)fprintf(stderr, "%s\n", hdr);
- /* parse it */
+ /* read and parse this file */
for (ms->line = 1; fgets(line, BUFSIZ, f) != NULL; ms->line++) {
size_t len;
if (line[0] == '#') /* comment, do not parse */