+2008-10-18 11:00 Reuben Thomas <rrt@sc3d.org>
+
+ * Correct words counts in comments of struct magic.
+
+ * Fix handle_annotation to allow both Apple and MIME types to be
+ printed, and to return correct code if MIME type is
+ printed (1, not 0) or if there's an error (-1 not 1).
+
2008-10-18 16:45 Christos Zoulas <christos@astron.com>
-
+
* Added APPLE file creator/type
2008-10-12 10:20 Christos Zoulas <christos@astron.com>
2008-10-09 13:20 Christos Zoulas <christos@astron.com>
- * correct --exclude documentation issues: remove troff and fortran
+ * correct --exclude documentation issues: remove troff and fortran
and rename "token" to "tokens". (Randy McMurchy)
2008-10-01 10:30 Christos Zoulas <christos@astron.com>
* Read ~/.magic in addition to the default magic file not instead
of, as documented in the man page.
+2008-09-10 21:30 Reuben Thomas <rrt@sc3d.org>
+
+ * Comment out graphviz patterns, as they match too many files.
+
2008-08-30 12:54 Christos Zoulas <christos@astron.com>
* Don't eat trailing \n in magic enties.
* Cast defines to allow compilation using a c++ compiler.
+2008-08-25 23:56 Reuben Thomas <rrt@sc3d.org>
+
+ * Add text/x-lua MIME type for Lua scripts.
+
+ * Escape { in regex in graphviz patterns.
+
2008-07-26 00:59 Reuben Thomas <rrt@sc3d.org>
* Add MIME types for special files.
#ifndef lint
-FILE_RCSID("@(#)$File: softmagic.c,v 1.123 2008/10/16 16:31:16 christos Exp $")
+FILE_RCSID("@(#)$File: softmagic.c,v 1.124 2008/10/18 20:47:48 christos Exp $")
#endif /* lint */
private int match(struct magic_set *, struct magic *, uint32_t,
private int
handle_annotation(struct magic_set *ms, struct magic *m)
{
+ int ret = 0;
if (ms->flags & MAGIC_APPLE) {
if (file_printf(ms, "%.8s", m->apple) == -1)
return -1;
- return 1;
+ ret = 1;
}
if (ms->flags & MAGIC_MIME_TYPE) {
- if (file_printf(ms, "%.8s", m->mimetype) == -1)
- return 1;
+ if (file_printf(ms, "%s", m->mimetype) == -1)
+ return -1;
+ ret = 1;
}
- return 0;
+ return ret;
}
private int