Lines Matching refs:p

410 	union VALUETYPE *p = &ms->ms_value;  in mprint()  local
414 v = file_signextend(ms, m, (uint64_t)p->b); in mprint()
436 v = file_signextend(ms, m, (uint64_t)p->h); in mprint()
459 v = file_signextend(ms, m, (uint64_t)p->l); in mprint()
479 v = file_signextend(ms, m, p->q); in mprint()
510 char *str = p->s; in mprint()
545 file_fmttime(p->l, 0, tbuf)) == -1) in mprint()
555 file_fmttime(p->l, FILE_T_LOCAL, tbuf)) == -1) in mprint()
564 file_fmttime(p->q, 0, tbuf)) == -1) in mprint()
573 file_fmttime(p->q, FILE_T_LOCAL, tbuf)) == -1) in mprint()
582 file_fmttime(p->q, FILE_T_WINDOWS, tbuf)) == -1) in mprint()
590 vf = p->f; in mprint()
610 vd = p->d; in mprint()
709 union VALUETYPE *p = &ms->ms_value; in moffset() local
713 p->s[strcspn(p->s, "\r\n")] = '\0'; in moffset()
714 t = CAST(uint32_t, (ms->offset + strlen(p->s))); in moffset()
829 p->fld &= cast m->num_mask; \
832 p->fld |= cast m->num_mask; \
835 p->fld ^= cast m->num_mask; \
838 p->fld += cast m->num_mask; \
841 p->fld -= cast m->num_mask; \
844 p->fld *= cast m->num_mask; \
847 p->fld /= cast m->num_mask; \
850 p->fld %= cast m->num_mask; \
854 p->fld = ~p->fld \
857 cvt_8(union VALUETYPE *p, const struct magic *m) in cvt_8() argument
863 cvt_16(union VALUETYPE *p, const struct magic *m) in cvt_16() argument
869 cvt_32(union VALUETYPE *p, const struct magic *m) in cvt_32() argument
875 cvt_64(union VALUETYPE *p, const struct magic *m) in cvt_64() argument
884 p->fld += cast (int64_t)m->num_mask; \
887 p->fld -= cast (int64_t)m->num_mask; \
890 p->fld *= cast (int64_t)m->num_mask; \
893 p->fld /= cast (int64_t)m->num_mask; \
898 cvt_float(union VALUETYPE *p, const struct magic *m) in cvt_float() argument
904 cvt_double(union VALUETYPE *p, const struct magic *m) in cvt_double() argument
917 union VALUETYPE *p = &ms->ms_value; in mconvert() local
922 cvt_8(p, m); in mconvert()
925 cvt_16(p, m); in mconvert()
930 cvt_32(p, m); in mconvert()
936 cvt_64(p, m); in mconvert()
942 p->s[sizeof(p->s) - 1] = '\0'; in mconvert()
947 char *ptr1 = p->s, *ptr2 = ptr1 + sz; in mconvert()
949 sz = sizeof(p->s) - sz; /* maximum length of string */ in mconvert()
967 p->h = (short)((p->hs[0]<<8)|(p->hs[1])); in mconvert()
968 cvt_16(p, m); in mconvert()
973 p->l = (int32_t) in mconvert()
974 ((p->hl[0]<<24)|(p->hl[1]<<16)|(p->hl[2]<<8)|(p->hl[3])); in mconvert()
975 cvt_32(p, m); in mconvert()
981 p->q = (uint64_t) in mconvert()
982 (((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
983 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
984 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
985 ((uint64_t)p->hq[6]<<8)|((uint64_t)p->hq[7])); in mconvert()
986 cvt_64(p, m); in mconvert()
989 p->h = (short)((p->hs[1]<<8)|(p->hs[0])); in mconvert()
990 cvt_16(p, m); in mconvert()
995 p->l = (int32_t) in mconvert()
996 ((p->hl[3]<<24)|(p->hl[2]<<16)|(p->hl[1]<<8)|(p->hl[0])); in mconvert()
997 cvt_32(p, m); in mconvert()
1003 p->q = (uint64_t) in mconvert()
1004 (((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
1005 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
1006 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
1007 ((uint64_t)p->hq[1]<<8)|((uint64_t)p->hq[0])); in mconvert()
1008 cvt_64(p, m); in mconvert()
1013 p->l = (int32_t) in mconvert()
1014 ((p->hl[1]<<24)|(p->hl[0]<<16)|(p->hl[3]<<8)|(p->hl[2])); in mconvert()
1015 cvt_32(p, m); in mconvert()
1018 cvt_float(p, m); in mconvert()
1021 p->l = ((uint32_t)p->hl[0]<<24)|((uint32_t)p->hl[1]<<16)| in mconvert()
1022 ((uint32_t)p->hl[2]<<8) |((uint32_t)p->hl[3]); in mconvert()
1023 cvt_float(p, m); in mconvert()
1026 p->l = ((uint32_t)p->hl[3]<<24)|((uint32_t)p->hl[2]<<16)| in mconvert()
1027 ((uint32_t)p->hl[1]<<8) |((uint32_t)p->hl[0]); in mconvert()
1028 cvt_float(p, m); in mconvert()
1031 cvt_double(p, m); in mconvert()
1034 p->q = ((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
1035 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
1036 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
1037 ((uint64_t)p->hq[6]<<8) |((uint64_t)p->hq[7]); in mconvert()
1038 cvt_double(p, m); in mconvert()
1041 p->q = ((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
1042 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
1043 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
1044 ((uint64_t)p->hq[1]<<8) |((uint64_t)p->hq[0]); in mconvert()
1045 cvt_double(p, m); in mconvert()
1071 mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, in mcopy() argument
1146 char *dst = p->s; in mcopy()
1147 char *edst = &p->s[sizeof(p->s) - 1]; in mcopy()
1178 (void)memset(p, '\0', sizeof(*p)); in mcopy()
1181 if (nbytes - offset < sizeof(*p)) in mcopy()
1184 nbytes = sizeof(*p); in mcopy()
1186 (void)memcpy(p, s + offset, nbytes); in mcopy()
1192 if (nbytes < sizeof(*p)) in mcopy()
1193 (void)memset(((char *)(void *)p) + nbytes, '\0', in mcopy()
1194 sizeof(*p) - nbytes); in mcopy()
1209 union VALUETYPE *p = &ms->ms_value; in mget() local
1224 if (mcopy(ms, p, m->type, m->flag & INDIR, s, (uint32_t)(offset + o), in mget()
1234 mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); in mget()
1283 offset = p->b & off; in mget()
1286 offset = p->b | off; in mget()
1289 offset = p->b ^ off; in mget()
1292 offset = p->b + off; in mget()
1295 offset = p->b - off; in mget()
1298 offset = p->b * off; in mget()
1301 offset = p->b / off; in mget()
1304 offset = p->b % off; in mget()
1308 offset = p->b; in mget()
1315 lhs = (p->hs[0] << 8) | p->hs[1]; in mget()
1351 lhs = (p->hs[1] << 8) | p->hs[0]; in mget()
1390 offset = p->h & off; in mget()
1393 offset = p->h | off; in mget()
1396 offset = p->h ^ off; in mget()
1399 offset = p->h + off; in mget()
1402 offset = p->h - off; in mget()
1405 offset = p->h * off; in mget()
1408 offset = p->h / off; in mget()
1411 offset = p->h % off; in mget()
1416 offset = p->h; in mget()
1424 lhs = (p->hl[0] << 24) | (p->hl[1] << 16) | in mget()
1425 (p->hl[2] << 8) | p->hl[3]; in mget()
1462 lhs = (p->hl[3] << 24) | (p->hl[2] << 16) | in mget()
1463 (p->hl[1] << 8) | p->hl[0]; in mget()
1499 lhs = (p->hl[1] << 24) | (p->hl[0] << 16) | in mget()
1500 (p->hl[3] << 8) | p->hl[2]; in mget()
1539 offset = p->l & off; in mget()
1542 offset = p->l | off; in mget()
1545 offset = p->l ^ off; in mget()
1548 offset = p->l + off; in mget()
1551 offset = p->l - off; in mget()
1554 offset = p->l * off; in mget()
1557 offset = p->l / off; in mget()
1560 offset = p->l % off; in mget()
1564 offset = p->l; in mget()
1597 if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1) in mget()
1602 mdebug(offset, (char *)(void *)p, in mget()
1850 union VALUETYPE *p = &ms->ms_value; in magiccheck() local
1854 v = p->b; in magiccheck()
1860 v = p->h; in magiccheck()
1875 v = p->l; in magiccheck()
1890 v = p->q; in magiccheck()
1897 fv = p->f; in magiccheck()
1930 dv = p->d; in magiccheck()
1967 v = file_strncmp(m->value.s, p->s, (size_t)m->vallen, m->str_flags); in magiccheck()
1973 v = file_strncmp16(m->value.s, p->s, (size_t)m->vallen, m->str_flags); in magiccheck()