version 1.11, 2015/08/12 07:43:27 |
version 1.12, 2015/08/12 09:29:49 |
|
|
if (result == !ml->test_not) { |
if (result == !ml->test_not) { |
if (ml->result != NULL) |
if (ml->result != NULL) |
magic_add_string(ms, ml, s, slen); |
magic_add_string(ms, ml, s, slen); |
if (result) |
if (result && ml->test_operator == '=') |
ms->offset += slen + 1; |
ms->offset += slen + 1; |
} |
} |
return (result); |
return (result); |
|
|
m.rm_eo = ms->size; |
m.rm_eo = ms->size; |
|
|
result = (regexec(&re, ms->base, 1, &m, REG_STARTEND) == 0); |
result = (regexec(&re, ms->base, 1, &m, REG_STARTEND) == 0); |
if (result == !ml->test_not && ml->result != NULL) { |
if (result == !ml->test_not) { |
magic_add_result(ms, ml, "%s", ""); |
if (ml->result != NULL) |
|
magic_add_result(ms, ml, "%s", ""); |
if (result) { |
if (result) { |
if (sflag) |
if (sflag) |
ms->offset = m.rm_so; |
ms->offset = m.rm_so; |
|
|
} |
} |
result = (found != NULL); |
result = (found != NULL); |
|
|
if (result == !ml->test_not && ml->result != NULL && found != NULL) { |
if (result == !ml->test_not) { |
magic_add_string(ms, ml, found, ms->size - ms->offset); |
if (ml->result != NULL) |
ms->offset = found - start + size; |
magic_add_string(ms, ml, found, ms->size - ms->offset); |
|
if (result && found != NULL && ml->test_operator == '=') |
|
ms->offset = (found + size) - ms->base; |
} |
} |
return (result); |
return (result); |
} |
} |