Lines Matching refs:p
369 union VALUETYPE *p = &ms->ms_value; in mprint() local
373 v = file_signextend(ms, m, (uint64_t)p->b); in mprint()
394 v = file_signextend(ms, m, (uint64_t)p->h); in mprint()
417 v = file_signextend(ms, m, (uint64_t)p->l); in mprint()
437 v = file_signextend(ms, m, p->q); in mprint()
453 char *str = p->s; in mprint()
486 if (file_printf(ms, m->desc, file_fmttime(p->l, FILE_T_LOCAL, in mprint()
496 if (file_printf(ms, m->desc, file_fmttime(p->l, 0, tbuf)) == -1) in mprint()
504 if (file_printf(ms, m->desc, file_fmttime(p->q, FILE_T_LOCAL, in mprint()
513 if (file_printf(ms, m->desc, file_fmttime(p->q, 0, tbuf)) == -1) in mprint()
521 if (file_printf(ms, m->desc, file_fmttime(p->q, FILE_T_WINDOWS, in mprint()
530 vf = p->f; in mprint()
550 vd = p->d; in mprint()
647 union VALUETYPE *p = &ms->ms_value; in moffset() local
651 p->s[strcspn(p->s, "\n")] = '\0'; in moffset()
652 t = CAST(uint32_t, (ms->offset + strlen(p->s))); in moffset()
768 p->fld &= cast m->num_mask; \
771 p->fld |= cast m->num_mask; \
774 p->fld ^= cast m->num_mask; \
777 p->fld += cast m->num_mask; \
780 p->fld -= cast m->num_mask; \
783 p->fld *= cast m->num_mask; \
786 p->fld /= cast m->num_mask; \
789 p->fld %= cast m->num_mask; \
793 p->fld = ~p->fld \
796 cvt_8(union VALUETYPE *p, const struct magic *m) in cvt_8() argument
802 cvt_16(union VALUETYPE *p, const struct magic *m) in cvt_16() argument
808 cvt_32(union VALUETYPE *p, const struct magic *m) in cvt_32() argument
814 cvt_64(union VALUETYPE *p, const struct magic *m) in cvt_64() argument
823 p->fld += cast (int64_t)m->num_mask; \
826 p->fld -= cast (int64_t)m->num_mask; \
829 p->fld *= cast (int64_t)m->num_mask; \
832 p->fld /= cast (int64_t)m->num_mask; \
837 cvt_float(union VALUETYPE *p, const struct magic *m) in cvt_float() argument
843 cvt_double(union VALUETYPE *p, const struct magic *m) in cvt_double() argument
856 union VALUETYPE *p = &ms->ms_value; in mconvert() local
860 cvt_8(p, m); in mconvert()
863 cvt_16(p, m); in mconvert()
868 cvt_32(p, m); in mconvert()
874 cvt_64(p, m); in mconvert()
880 p->s[sizeof(p->s) - 1] = '\0'; in mconvert()
885 char *ptr1 = p->s, *ptr2 = ptr1 + sz; in mconvert()
887 sz = sizeof(p->s) - sz; /* maximum length of string */ in mconvert()
905 p->h = (short)((p->hs[0]<<8)|(p->hs[1])); in mconvert()
906 cvt_16(p, m); in mconvert()
911 p->l = (int32_t) in mconvert()
912 ((p->hl[0]<<24)|(p->hl[1]<<16)|(p->hl[2]<<8)|(p->hl[3])); in mconvert()
913 cvt_32(p, m); in mconvert()
919 p->q = (uint64_t) in mconvert()
920 (((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
921 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
922 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
923 ((uint64_t)p->hq[6]<<8)|((uint64_t)p->hq[7])); in mconvert()
924 cvt_64(p, m); in mconvert()
927 p->h = (short)((p->hs[1]<<8)|(p->hs[0])); in mconvert()
928 cvt_16(p, m); in mconvert()
933 p->l = (int32_t) in mconvert()
934 ((p->hl[3]<<24)|(p->hl[2]<<16)|(p->hl[1]<<8)|(p->hl[0])); in mconvert()
935 cvt_32(p, m); in mconvert()
941 p->q = (uint64_t) in mconvert()
942 (((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
943 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
944 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
945 ((uint64_t)p->hq[1]<<8)|((uint64_t)p->hq[0])); in mconvert()
946 cvt_64(p, m); in mconvert()
951 p->l = (int32_t) in mconvert()
952 ((p->hl[1]<<24)|(p->hl[0]<<16)|(p->hl[3]<<8)|(p->hl[2])); in mconvert()
953 cvt_32(p, m); in mconvert()
956 cvt_float(p, m); in mconvert()
959 p->l = ((uint32_t)p->hl[0]<<24)|((uint32_t)p->hl[1]<<16)| in mconvert()
960 ((uint32_t)p->hl[2]<<8) |((uint32_t)p->hl[3]); in mconvert()
961 cvt_float(p, m); in mconvert()
964 p->l = ((uint32_t)p->hl[3]<<24)|((uint32_t)p->hl[2]<<16)| in mconvert()
965 ((uint32_t)p->hl[1]<<8) |((uint32_t)p->hl[0]); in mconvert()
966 cvt_float(p, m); in mconvert()
969 cvt_double(p, m); in mconvert()
972 p->q = ((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
973 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
974 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
975 ((uint64_t)p->hq[6]<<8) |((uint64_t)p->hq[7]); in mconvert()
976 cvt_double(p, m); in mconvert()
979 p->q = ((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
980 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
981 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
982 ((uint64_t)p->hq[1]<<8) |((uint64_t)p->hq[0]); in mconvert()
983 cvt_double(p, m); in mconvert()
1008 mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, in mcopy() argument
1074 char *dst = p->s; in mcopy()
1075 char *edst = &p->s[sizeof(p->s) - 1]; in mcopy()
1109 (void)memset(p, '\0', sizeof(*p)); in mcopy()
1112 if (nbytes - offset < sizeof(*p)) in mcopy()
1115 nbytes = sizeof(*p); in mcopy()
1117 (void)memcpy(p, s + offset, nbytes); in mcopy()
1123 if (nbytes < sizeof(*p)) in mcopy()
1124 (void)memset(((char *)(void *)p) + nbytes, '\0', in mcopy()
1125 sizeof(*p) - nbytes); in mcopy()
1138 union VALUETYPE *p = &ms->ms_value; in mget() local
1146 if (mcopy(ms, p, m->type, m->flag & INDIR, s, (uint32_t)(offset + o), in mget()
1153 mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); in mget()
1202 offset = p->b & off; in mget()
1205 offset = p->b | off; in mget()
1208 offset = p->b ^ off; in mget()
1211 offset = p->b + off; in mget()
1214 offset = p->b - off; in mget()
1217 offset = p->b * off; in mget()
1220 offset = p->b / off; in mget()
1223 offset = p->b % off; in mget()
1227 offset = p->b; in mget()
1237 offset = (short)((p->hs[0]<<8)| in mget()
1238 (p->hs[1])) & in mget()
1242 offset = (short)((p->hs[0]<<8)| in mget()
1243 (p->hs[1])) | in mget()
1247 offset = (short)((p->hs[0]<<8)| in mget()
1248 (p->hs[1])) ^ in mget()
1252 offset = (short)((p->hs[0]<<8)| in mget()
1253 (p->hs[1])) + in mget()
1257 offset = (short)((p->hs[0]<<8)| in mget()
1258 (p->hs[1])) - in mget()
1262 offset = (short)((p->hs[0]<<8)| in mget()
1263 (p->hs[1])) * in mget()
1267 offset = (short)((p->hs[0]<<8)| in mget()
1268 (p->hs[1])) / in mget()
1272 offset = (short)((p->hs[0]<<8)| in mget()
1273 (p->hs[1])) % in mget()
1278 offset = (short)((p->hs[0]<<8)| in mget()
1279 (p->hs[1])); in mget()
1289 offset = (short)((p->hs[1]<<8)| in mget()
1290 (p->hs[0])) & in mget()
1294 offset = (short)((p->hs[1]<<8)| in mget()
1295 (p->hs[0])) | in mget()
1299 offset = (short)((p->hs[1]<<8)| in mget()
1300 (p->hs[0])) ^ in mget()
1304 offset = (short)((p->hs[1]<<8)| in mget()
1305 (p->hs[0])) + in mget()
1309 offset = (short)((p->hs[1]<<8)| in mget()
1310 (p->hs[0])) - in mget()
1314 offset = (short)((p->hs[1]<<8)| in mget()
1315 (p->hs[0])) * in mget()
1319 offset = (short)((p->hs[1]<<8)| in mget()
1320 (p->hs[0])) / in mget()
1324 offset = (short)((p->hs[1]<<8)| in mget()
1325 (p->hs[0])) % in mget()
1330 offset = (short)((p->hs[1]<<8)| in mget()
1331 (p->hs[0])); in mget()
1341 offset = p->h & off; in mget()
1344 offset = p->h | off; in mget()
1347 offset = p->h ^ off; in mget()
1350 offset = p->h + off; in mget()
1353 offset = p->h - off; in mget()
1356 offset = p->h * off; in mget()
1359 offset = p->h / off; in mget()
1362 offset = p->h % off; in mget()
1367 offset = p->h; in mget()
1378 offset = (int32_t)((p->hl[0]<<24)| in mget()
1379 (p->hl[1]<<16)| in mget()
1380 (p->hl[2]<<8)| in mget()
1381 (p->hl[3])) & in mget()
1385 offset = (int32_t)((p->hl[0]<<24)| in mget()
1386 (p->hl[1]<<16)| in mget()
1387 (p->hl[2]<<8)| in mget()
1388 (p->hl[3])) | in mget()
1392 offset = (int32_t)((p->hl[0]<<24)| in mget()
1393 (p->hl[1]<<16)| in mget()
1394 (p->hl[2]<<8)| in mget()
1395 (p->hl[3])) ^ in mget()
1399 offset = (int32_t)((p->hl[0]<<24)| in mget()
1400 (p->hl[1]<<16)| in mget()
1401 (p->hl[2]<<8)| in mget()
1402 (p->hl[3])) + in mget()
1406 offset = (int32_t)((p->hl[0]<<24)| in mget()
1407 (p->hl[1]<<16)| in mget()
1408 (p->hl[2]<<8)| in mget()
1409 (p->hl[3])) - in mget()
1413 offset = (int32_t)((p->hl[0]<<24)| in mget()
1414 (p->hl[1]<<16)| in mget()
1415 (p->hl[2]<<8)| in mget()
1416 (p->hl[3])) * in mget()
1420 offset = (int32_t)((p->hl[0]<<24)| in mget()
1421 (p->hl[1]<<16)| in mget()
1422 (p->hl[2]<<8)| in mget()
1423 (p->hl[3])) / in mget()
1427 offset = (int32_t)((p->hl[0]<<24)| in mget()
1428 (p->hl[1]<<16)| in mget()
1429 (p->hl[2]<<8)| in mget()
1430 (p->hl[3])) % in mget()
1435 offset = (int32_t)((p->hl[0]<<24)| in mget()
1436 (p->hl[1]<<16)| in mget()
1437 (p->hl[2]<<8)| in mget()
1438 (p->hl[3])); in mget()
1449 offset = (int32_t)((p->hl[3]<<24)| in mget()
1450 (p->hl[2]<<16)| in mget()
1451 (p->hl[1]<<8)| in mget()
1452 (p->hl[0])) & in mget()
1456 offset = (int32_t)((p->hl[3]<<24)| in mget()
1457 (p->hl[2]<<16)| in mget()
1458 (p->hl[1]<<8)| in mget()
1459 (p->hl[0])) | in mget()
1463 offset = (int32_t)((p->hl[3]<<24)| in mget()
1464 (p->hl[2]<<16)| in mget()
1465 (p->hl[1]<<8)| in mget()
1466 (p->hl[0])) ^ in mget()
1470 offset = (int32_t)((p->hl[3]<<24)| in mget()
1471 (p->hl[2]<<16)| in mget()
1472 (p->hl[1]<<8)| in mget()
1473 (p->hl[0])) + in mget()
1477 offset = (int32_t)((p->hl[3]<<24)| in mget()
1478 (p->hl[2]<<16)| in mget()
1479 (p->hl[1]<<8)| in mget()
1480 (p->hl[0])) - in mget()
1484 offset = (int32_t)((p->hl[3]<<24)| in mget()
1485 (p->hl[2]<<16)| in mget()
1486 (p->hl[1]<<8)| in mget()
1487 (p->hl[0])) * in mget()
1491 offset = (int32_t)((p->hl[3]<<24)| in mget()
1492 (p->hl[2]<<16)| in mget()
1493 (p->hl[1]<<8)| in mget()
1494 (p->hl[0])) / in mget()
1498 offset = (int32_t)((p->hl[3]<<24)| in mget()
1499 (p->hl[2]<<16)| in mget()
1500 (p->hl[1]<<8)| in mget()
1501 (p->hl[0])) % in mget()
1506 offset = (int32_t)((p->hl[3]<<24)| in mget()
1507 (p->hl[2]<<16)| in mget()
1508 (p->hl[1]<<8)| in mget()
1509 (p->hl[0])); in mget()
1519 offset = (int32_t)((p->hl[1]<<24)| in mget()
1520 (p->hl[0]<<16)| in mget()
1521 (p->hl[3]<<8)| in mget()
1522 (p->hl[2])) & in mget()
1526 offset = (int32_t)((p->hl[1]<<24)| in mget()
1527 (p->hl[0]<<16)| in mget()
1528 (p->hl[3]<<8)| in mget()
1529 (p->hl[2])) | in mget()
1533 offset = (int32_t)((p->hl[1]<<24)| in mget()
1534 (p->hl[0]<<16)| in mget()
1535 (p->hl[3]<<8)| in mget()
1536 (p->hl[2])) ^ in mget()
1540 offset = (int32_t)((p->hl[1]<<24)| in mget()
1541 (p->hl[0]<<16)| in mget()
1542 (p->hl[3]<<8)| in mget()
1543 (p->hl[2])) + in mget()
1547 offset = (int32_t)((p->hl[1]<<24)| in mget()
1548 (p->hl[0]<<16)| in mget()
1549 (p->hl[3]<<8)| in mget()
1550 (p->hl[2])) - in mget()
1554 offset = (int32_t)((p->hl[1]<<24)| in mget()
1555 (p->hl[0]<<16)| in mget()
1556 (p->hl[3]<<8)| in mget()
1557 (p->hl[2])) * in mget()
1561 offset = (int32_t)((p->hl[1]<<24)| in mget()
1562 (p->hl[0]<<16)| in mget()
1563 (p->hl[3]<<8)| in mget()
1564 (p->hl[2])) / in mget()
1568 offset = (int32_t)((p->hl[1]<<24)| in mget()
1569 (p->hl[0]<<16)| in mget()
1570 (p->hl[3]<<8)| in mget()
1571 (p->hl[2])) % in mget()
1576 offset = (int32_t)((p->hl[1]<<24)| in mget()
1577 (p->hl[0]<<16)| in mget()
1578 (p->hl[3]<<8)| in mget()
1579 (p->hl[2])); in mget()
1589 offset = p->l & off; in mget()
1592 offset = p->l | off; in mget()
1595 offset = p->l ^ off; in mget()
1598 offset = p->l + off; in mget()
1601 offset = p->l - off; in mget()
1604 offset = p->l * off; in mget()
1607 offset = p->l / off; in mget()
1610 offset = p->l % off; in mget()
1614 offset = p->l; in mget()
1643 if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1) in mget()
1648 mdebug(offset, (char *)(void *)p, in mget()
1896 union VALUETYPE *p = &ms->ms_value; in magiccheck() local
1900 v = p->b; in magiccheck()
1906 v = p->h; in magiccheck()
1921 v = p->l; in magiccheck()
1936 v = p->q; in magiccheck()
1943 fv = p->f; in magiccheck()
1977 dv = p->d; in magiccheck()
2014 v = file_strncmp(m->value.s, p->s, (size_t)m->vallen, m->str_flags); in magiccheck()
2020 v = file_strncmp16(m->value.s, p->s, (size_t)m->vallen, m->str_flags); in magiccheck()