=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/file/magic-test.c,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** src/usr.bin/file/magic-test.c 2015/08/12 09:29:49 1.12 --- src/usr.bin/file/magic-test.c 2015/08/12 09:39:43 1.13 *************** *** 1,4 **** ! /* $OpenBSD: magic-test.c,v 1.12 2015/08/12 09:29:49 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: magic-test.c,v 1.13 2015/08/12 09:39:43 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott *************** *** 702,707 **** --- 702,711 ---- if (ml->type_operator == '&') value &= (int32_t)ml->type_operand; + else if (ml->type_operator == '-') + value -= (int32_t)ml->type_operand; + else if (ml->type_operator == '+') + value += (int32_t)ml->type_operand; else if (ml->type_operator != ' ') return (-1); *************** *** 744,749 **** --- 748,757 ---- if (ml->type_operator == '&') value &= (int64_t)ml->type_operand; + else if (ml->type_operator == '-') + value -= (int64_t)ml->type_operand; + else if (ml->type_operator == '+') + value += (int64_t)ml->type_operand; else if (ml->type_operator != ' ') return (-1); *************** *** 786,791 **** --- 794,803 ---- if (ml->type_operator == '&') value &= (uint32_t)ml->type_operand; + else if (ml->type_operator == '-') + value -= (uint32_t)ml->type_operand; + else if (ml->type_operator == '+') + value += (uint32_t)ml->type_operand; else if (ml->type_operator != ' ') return (-1); *************** *** 828,833 **** --- 840,849 ---- if (ml->type_operator == '&') value &= (uint64_t)ml->type_operand; + else if (ml->type_operator == '-') + value -= (uint64_t)ml->type_operand; + else if (ml->type_operator == '+') + value += (uint64_t)ml->type_operand; else if (ml->type_operator != ' ') return (-1);