Lines Matching refs:p
385 union VALUETYPE *p = &ms->ms_value; in mprint() local
389 v = file_signextend(ms, m, (uint64_t)p->b); in mprint()
411 v = file_signextend(ms, m, (uint64_t)p->h); in mprint()
434 v = file_signextend(ms, m, (uint64_t)p->l); in mprint()
455 v = file_signextend(ms, m, p->q); in mprint()
484 char *str = p->s; in mprint()
518 file_fmttime(p->l, FILE_T_LOCAL, in mprint()
529 file_fmttime(p->l, 0, tbuf)) == -1) in mprint()
538 file_fmttime(p->q, FILE_T_LOCAL, tbuf)) == -1) in mprint()
547 file_fmttime(p->q, 0, tbuf)) == -1) in mprint()
556 file_fmttime(p->q, FILE_T_WINDOWS, tbuf)) == -1) in mprint()
564 vf = p->f; in mprint()
584 vd = p->d; in mprint()
682 union VALUETYPE *p = &ms->ms_value; in moffset() local
686 p->s[strcspn(p->s, "\n")] = '\0'; in moffset()
687 t = CAST(uint32_t, (ms->offset + strlen(p->s))); in moffset()
802 p->fld &= cast m->num_mask; \
805 p->fld |= cast m->num_mask; \
808 p->fld ^= cast m->num_mask; \
811 p->fld += cast m->num_mask; \
814 p->fld -= cast m->num_mask; \
817 p->fld *= cast m->num_mask; \
820 p->fld /= cast m->num_mask; \
823 p->fld %= cast m->num_mask; \
827 p->fld = ~p->fld \
830 cvt_8(union VALUETYPE *p, const struct magic *m) in cvt_8() argument
836 cvt_16(union VALUETYPE *p, const struct magic *m) in cvt_16() argument
842 cvt_32(union VALUETYPE *p, const struct magic *m) in cvt_32() argument
848 cvt_64(union VALUETYPE *p, const struct magic *m) in cvt_64() argument
857 p->fld += cast (int64_t)m->num_mask; \
860 p->fld -= cast (int64_t)m->num_mask; \
863 p->fld *= cast (int64_t)m->num_mask; \
866 p->fld /= cast (int64_t)m->num_mask; \
871 cvt_float(union VALUETYPE *p, const struct magic *m) in cvt_float() argument
877 cvt_double(union VALUETYPE *p, const struct magic *m) in cvt_double() argument
890 union VALUETYPE *p = &ms->ms_value; in mconvert() local
894 cvt_8(p, m); in mconvert()
897 cvt_16(p, m); in mconvert()
902 cvt_32(p, m); in mconvert()
908 cvt_64(p, m); in mconvert()
914 p->s[sizeof(p->s) - 1] = '\0'; in mconvert()
919 char *ptr1 = p->s, *ptr2 = ptr1 + sz; in mconvert()
921 sz = sizeof(p->s) - sz; /* maximum length of string */ in mconvert()
939 p->h = (short)((p->hs[0]<<8)|(p->hs[1])); in mconvert()
940 cvt_16(p, m); in mconvert()
945 p->l = (int32_t) in mconvert()
946 ((p->hl[0]<<24)|(p->hl[1]<<16)|(p->hl[2]<<8)|(p->hl[3])); in mconvert()
947 cvt_32(p, m); in mconvert()
953 p->q = (uint64_t) in mconvert()
954 (((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
955 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
956 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
957 ((uint64_t)p->hq[6]<<8)|((uint64_t)p->hq[7])); in mconvert()
958 cvt_64(p, m); in mconvert()
961 p->h = (short)((p->hs[1]<<8)|(p->hs[0])); in mconvert()
962 cvt_16(p, m); in mconvert()
967 p->l = (int32_t) in mconvert()
968 ((p->hl[3]<<24)|(p->hl[2]<<16)|(p->hl[1]<<8)|(p->hl[0])); in mconvert()
969 cvt_32(p, m); in mconvert()
975 p->q = (uint64_t) in mconvert()
976 (((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
977 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
978 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
979 ((uint64_t)p->hq[1]<<8)|((uint64_t)p->hq[0])); in mconvert()
980 cvt_64(p, m); in mconvert()
985 p->l = (int32_t) in mconvert()
986 ((p->hl[1]<<24)|(p->hl[0]<<16)|(p->hl[3]<<8)|(p->hl[2])); in mconvert()
987 cvt_32(p, m); in mconvert()
990 cvt_float(p, m); in mconvert()
993 p->l = ((uint32_t)p->hl[0]<<24)|((uint32_t)p->hl[1]<<16)| in mconvert()
994 ((uint32_t)p->hl[2]<<8) |((uint32_t)p->hl[3]); in mconvert()
995 cvt_float(p, m); in mconvert()
998 p->l = ((uint32_t)p->hl[3]<<24)|((uint32_t)p->hl[2]<<16)| in mconvert()
999 ((uint32_t)p->hl[1]<<8) |((uint32_t)p->hl[0]); in mconvert()
1000 cvt_float(p, m); in mconvert()
1003 cvt_double(p, m); in mconvert()
1006 p->q = ((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
1007 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
1008 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
1009 ((uint64_t)p->hq[6]<<8) |((uint64_t)p->hq[7]); in mconvert()
1010 cvt_double(p, m); in mconvert()
1013 p->q = ((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
1014 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
1015 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
1016 ((uint64_t)p->hq[1]<<8) |((uint64_t)p->hq[0]); in mconvert()
1017 cvt_double(p, m); in mconvert()
1043 mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, in mcopy() argument
1109 char *dst = p->s; in mcopy()
1110 char *edst = &p->s[sizeof(p->s) - 1]; in mcopy()
1141 (void)memset(p, '\0', sizeof(*p)); in mcopy()
1144 if (nbytes - offset < sizeof(*p)) in mcopy()
1147 nbytes = sizeof(*p); in mcopy()
1149 (void)memcpy(p, s + offset, nbytes); in mcopy()
1155 if (nbytes < sizeof(*p)) in mcopy()
1156 (void)memset(((char *)(void *)p) + nbytes, '\0', in mcopy()
1157 sizeof(*p) - nbytes); in mcopy()
1170 union VALUETYPE *p = &ms->ms_value; in mget() local
1178 if (mcopy(ms, p, m->type, m->flag & INDIR, s, (uint32_t)(offset + o), in mget()
1185 mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); in mget()
1234 offset = p->b & off; in mget()
1237 offset = p->b | off; in mget()
1240 offset = p->b ^ off; in mget()
1243 offset = p->b + off; in mget()
1246 offset = p->b - off; in mget()
1249 offset = p->b * off; in mget()
1252 offset = p->b / off; in mget()
1255 offset = p->b % off; in mget()
1259 offset = p->b; in mget()
1269 offset = (short)((p->hs[0]<<8)| in mget()
1270 (p->hs[1])) & in mget()
1274 offset = (short)((p->hs[0]<<8)| in mget()
1275 (p->hs[1])) | in mget()
1279 offset = (short)((p->hs[0]<<8)| in mget()
1280 (p->hs[1])) ^ in mget()
1284 offset = (short)((p->hs[0]<<8)| in mget()
1285 (p->hs[1])) + in mget()
1289 offset = (short)((p->hs[0]<<8)| in mget()
1290 (p->hs[1])) - in mget()
1294 offset = (short)((p->hs[0]<<8)| in mget()
1295 (p->hs[1])) * in mget()
1299 offset = (short)((p->hs[0]<<8)| in mget()
1300 (p->hs[1])) / in mget()
1304 offset = (short)((p->hs[0]<<8)| in mget()
1305 (p->hs[1])) % in mget()
1310 offset = (short)((p->hs[0]<<8)| in mget()
1311 (p->hs[1])); in mget()
1321 offset = (short)((p->hs[1]<<8)| in mget()
1322 (p->hs[0])) & in mget()
1326 offset = (short)((p->hs[1]<<8)| in mget()
1327 (p->hs[0])) | in mget()
1331 offset = (short)((p->hs[1]<<8)| in mget()
1332 (p->hs[0])) ^ in mget()
1336 offset = (short)((p->hs[1]<<8)| in mget()
1337 (p->hs[0])) + in mget()
1341 offset = (short)((p->hs[1]<<8)| in mget()
1342 (p->hs[0])) - in mget()
1346 offset = (short)((p->hs[1]<<8)| in mget()
1347 (p->hs[0])) * in mget()
1351 offset = (short)((p->hs[1]<<8)| in mget()
1352 (p->hs[0])) / in mget()
1356 offset = (short)((p->hs[1]<<8)| in mget()
1357 (p->hs[0])) % in mget()
1362 offset = (short)((p->hs[1]<<8)| in mget()
1363 (p->hs[0])); in mget()
1373 offset = p->h & off; in mget()
1376 offset = p->h | off; in mget()
1379 offset = p->h ^ off; in mget()
1382 offset = p->h + off; in mget()
1385 offset = p->h - off; in mget()
1388 offset = p->h * off; in mget()
1391 offset = p->h / off; in mget()
1394 offset = p->h % off; in mget()
1399 offset = p->h; in mget()
1410 offset = (int32_t)((p->hl[0]<<24)| in mget()
1411 (p->hl[1]<<16)| in mget()
1412 (p->hl[2]<<8)| in mget()
1413 (p->hl[3])) & in mget()
1417 offset = (int32_t)((p->hl[0]<<24)| in mget()
1418 (p->hl[1]<<16)| in mget()
1419 (p->hl[2]<<8)| in mget()
1420 (p->hl[3])) | in mget()
1424 offset = (int32_t)((p->hl[0]<<24)| in mget()
1425 (p->hl[1]<<16)| in mget()
1426 (p->hl[2]<<8)| in mget()
1427 (p->hl[3])) ^ in mget()
1431 offset = (int32_t)((p->hl[0]<<24)| in mget()
1432 (p->hl[1]<<16)| in mget()
1433 (p->hl[2]<<8)| in mget()
1434 (p->hl[3])) + in mget()
1438 offset = (int32_t)((p->hl[0]<<24)| in mget()
1439 (p->hl[1]<<16)| in mget()
1440 (p->hl[2]<<8)| in mget()
1441 (p->hl[3])) - in mget()
1445 offset = (int32_t)((p->hl[0]<<24)| in mget()
1446 (p->hl[1]<<16)| in mget()
1447 (p->hl[2]<<8)| in mget()
1448 (p->hl[3])) * in mget()
1452 offset = (int32_t)((p->hl[0]<<24)| in mget()
1453 (p->hl[1]<<16)| in mget()
1454 (p->hl[2]<<8)| in mget()
1455 (p->hl[3])) / in mget()
1459 offset = (int32_t)((p->hl[0]<<24)| in mget()
1460 (p->hl[1]<<16)| in mget()
1461 (p->hl[2]<<8)| in mget()
1462 (p->hl[3])) % in mget()
1467 offset = (int32_t)((p->hl[0]<<24)| in mget()
1468 (p->hl[1]<<16)| in mget()
1469 (p->hl[2]<<8)| in mget()
1470 (p->hl[3])); in mget()
1481 offset = (int32_t)((p->hl[3]<<24)| in mget()
1482 (p->hl[2]<<16)| in mget()
1483 (p->hl[1]<<8)| in mget()
1484 (p->hl[0])) & in mget()
1488 offset = (int32_t)((p->hl[3]<<24)| in mget()
1489 (p->hl[2]<<16)| in mget()
1490 (p->hl[1]<<8)| in mget()
1491 (p->hl[0])) | in mget()
1495 offset = (int32_t)((p->hl[3]<<24)| in mget()
1496 (p->hl[2]<<16)| in mget()
1497 (p->hl[1]<<8)| in mget()
1498 (p->hl[0])) ^ in mget()
1502 offset = (int32_t)((p->hl[3]<<24)| in mget()
1503 (p->hl[2]<<16)| in mget()
1504 (p->hl[1]<<8)| in mget()
1505 (p->hl[0])) + in mget()
1509 offset = (int32_t)((p->hl[3]<<24)| in mget()
1510 (p->hl[2]<<16)| in mget()
1511 (p->hl[1]<<8)| in mget()
1512 (p->hl[0])) - in mget()
1516 offset = (int32_t)((p->hl[3]<<24)| in mget()
1517 (p->hl[2]<<16)| in mget()
1518 (p->hl[1]<<8)| in mget()
1519 (p->hl[0])) * in mget()
1523 offset = (int32_t)((p->hl[3]<<24)| in mget()
1524 (p->hl[2]<<16)| in mget()
1525 (p->hl[1]<<8)| in mget()
1526 (p->hl[0])) / in mget()
1530 offset = (int32_t)((p->hl[3]<<24)| in mget()
1531 (p->hl[2]<<16)| in mget()
1532 (p->hl[1]<<8)| in mget()
1533 (p->hl[0])) % in mget()
1538 offset = (int32_t)((p->hl[3]<<24)| in mget()
1539 (p->hl[2]<<16)| in mget()
1540 (p->hl[1]<<8)| in mget()
1541 (p->hl[0])); in mget()
1551 offset = (int32_t)((p->hl[1]<<24)| in mget()
1552 (p->hl[0]<<16)| in mget()
1553 (p->hl[3]<<8)| in mget()
1554 (p->hl[2])) & in mget()
1558 offset = (int32_t)((p->hl[1]<<24)| in mget()
1559 (p->hl[0]<<16)| in mget()
1560 (p->hl[3]<<8)| in mget()
1561 (p->hl[2])) | in mget()
1565 offset = (int32_t)((p->hl[1]<<24)| in mget()
1566 (p->hl[0]<<16)| in mget()
1567 (p->hl[3]<<8)| in mget()
1568 (p->hl[2])) ^ in mget()
1572 offset = (int32_t)((p->hl[1]<<24)| in mget()
1573 (p->hl[0]<<16)| in mget()
1574 (p->hl[3]<<8)| in mget()
1575 (p->hl[2])) + in mget()
1579 offset = (int32_t)((p->hl[1]<<24)| in mget()
1580 (p->hl[0]<<16)| in mget()
1581 (p->hl[3]<<8)| in mget()
1582 (p->hl[2])) - in mget()
1586 offset = (int32_t)((p->hl[1]<<24)| in mget()
1587 (p->hl[0]<<16)| in mget()
1588 (p->hl[3]<<8)| in mget()
1589 (p->hl[2])) * in mget()
1593 offset = (int32_t)((p->hl[1]<<24)| in mget()
1594 (p->hl[0]<<16)| in mget()
1595 (p->hl[3]<<8)| in mget()
1596 (p->hl[2])) / in mget()
1600 offset = (int32_t)((p->hl[1]<<24)| in mget()
1601 (p->hl[0]<<16)| in mget()
1602 (p->hl[3]<<8)| in mget()
1603 (p->hl[2])) % in mget()
1608 offset = (int32_t)((p->hl[1]<<24)| in mget()
1609 (p->hl[0]<<16)| in mget()
1610 (p->hl[3]<<8)| in mget()
1611 (p->hl[2])); in mget()
1621 offset = p->l & off; in mget()
1624 offset = p->l | off; in mget()
1627 offset = p->l ^ off; in mget()
1630 offset = p->l + off; in mget()
1633 offset = p->l - off; in mget()
1636 offset = p->l * off; in mget()
1639 offset = p->l / off; in mget()
1642 offset = p->l % off; in mget()
1646 offset = p->l; in mget()
1677 if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1) in mget()
1682 mdebug(offset, (char *)(void *)p, in mget()
1931 union VALUETYPE *p = &ms->ms_value; in magiccheck() local
1935 v = p->b; in magiccheck()
1941 v = p->h; in magiccheck()
1956 v = p->l; in magiccheck()
1971 v = p->q; in magiccheck()
1978 fv = p->f; in magiccheck()
2012 dv = p->d; in magiccheck()
2050 v = file_strncmp(m->value.s, p->s, (size_t)m->vallen, m->str_flags); in magiccheck()
2056 v = file_strncmp16(m->value.s, p->s, (size_t)m->vallen, m->str_flags); in magiccheck()