123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- Subject: annotations are attached to the first description entry, print them then
- Origin: FILE5_25-4-gc12b1c8
- Upstream-Author: Christos Zoulas <christos@zoulas.com>
- Date: Wed Sep 16 22:17:12 2015 +0000
- --- a/src/softmagic.c
- +++ b/src/softmagic.c
- @@ -228,17 +228,17 @@
- continue;
- }
-
- - if ((e = handle_annotation(ms, m)) != 0) {
- - *need_separator = 1;
- - *printed_something = 1;
- - *returnval = 1;
- - return e;
- - }
- /*
- * If we are going to print something, we'll need to print
- * a blank before we print something else.
- */
- if (*m->desc) {
- + if ((e = handle_annotation(ms, m)) != 0) {
- + *need_separator = 1;
- + *printed_something = 1;
- + *returnval = 1;
- + return e;
- + }
- *need_separator = 1;
- *printed_something = 1;
- if (print_sep(ms, firstline) == -1)
- @@ -318,17 +318,17 @@
- break;
- } else
- ms->c.li[cont_level].got_match = 1;
- - if ((e = handle_annotation(ms, m)) != 0) {
- - *need_separator = 1;
- - *printed_something = 1;
- - *returnval = 1;
- - return e;
- - }
- /*
- * If we are going to print something,
- * make sure that we have a separator first.
- */
- if (*m->desc) {
- + if ((e = handle_annotation(ms, m)) != 0) {
- + *need_separator = 1;
- + *printed_something = 1;
- + *returnval = 1;
- + return e;
- + }
- if (!*printed_something) {
- *printed_something = 1;
- if (print_sep(ms, firstline)
- @@ -2166,6 +2166,7 @@
- private int
- handle_annotation(struct magic_set *ms, struct magic *m)
- {
- +printf("desc = %s, ext = %s mime = %s\n", m->desc, m->ext, m->mimetype);
- if (ms->flags & MAGIC_APPLE) {
- if (file_printf(ms, "%.8s", m->apple) == -1)
- return -1;
|