Lines Matching refs:p

349 	union VALUETYPE *p = &ms->ms_value;  in mprint()  local
353 v = file_signextend(ms, m, (uint64_t)p->b); in mprint()
374 v = file_signextend(ms, m, (uint64_t)p->h); in mprint()
397 v = file_signextend(ms, m, (uint64_t)p->l); in mprint()
417 v = file_signextend(ms, m, p->q); in mprint()
434 p->s[strcspn(p->s, "\n")] = '\0'; in mprint()
435 if (file_printf(ms, m->desc, p->s) == -1) in mprint()
437 t = ms->offset + strlen(p->s); in mprint()
447 if (file_printf(ms, m->desc, file_fmttime(p->l, 1)) == -1) in mprint()
456 if (file_printf(ms, m->desc, file_fmttime(p->l, 0)) == -1) in mprint()
464 if (file_printf(ms, m->desc, file_fmttime((uint32_t)p->q, in mprint()
473 if (file_printf(ms, m->desc, file_fmttime((uint32_t)p->q, in mprint()
482 vf = p->f; in mprint()
502 vd = p->d; in mprint()
594 union VALUETYPE *p = &ms->ms_value; in moffset() local
598 p->s[strcspn(p->s, "\n")] = '\0'; in moffset()
599 t = CAST(uint32_t, (ms->offset + strlen(p->s))); in moffset()
665 p->fld &= cast m->num_mask; \
668 p->fld |= cast m->num_mask; \
671 p->fld ^= cast m->num_mask; \
674 p->fld += cast m->num_mask; \
677 p->fld -= cast m->num_mask; \
680 p->fld *= cast m->num_mask; \
683 p->fld /= cast m->num_mask; \
686 p->fld %= cast m->num_mask; \
690 p->fld = ~p->fld \
693 cvt_8(union VALUETYPE *p, const struct magic *m) in cvt_8() argument
699 cvt_16(union VALUETYPE *p, const struct magic *m) in cvt_16() argument
705 cvt_32(union VALUETYPE *p, const struct magic *m) in cvt_32() argument
711 cvt_64(union VALUETYPE *p, const struct magic *m) in cvt_64() argument
720 p->fld += cast (int64_t)m->num_mask; \
723 p->fld -= cast (int64_t)m->num_mask; \
726 p->fld *= cast (int64_t)m->num_mask; \
729 p->fld /= cast (int64_t)m->num_mask; \
734 cvt_float(union VALUETYPE *p, const struct magic *m) in cvt_float() argument
740 cvt_double(union VALUETYPE *p, const struct magic *m) in cvt_double() argument
753 union VALUETYPE *p = &ms->ms_value; in mconvert() local
757 cvt_8(p, m); in mconvert()
760 cvt_16(p, m); in mconvert()
765 cvt_32(p, m); in mconvert()
770 cvt_64(p, m); in mconvert()
776 p->s[sizeof(p->s) - 1] = '\0'; in mconvert()
781 char *ptr1 = p->s, *ptr2 = ptr1 + sz; in mconvert()
783 if (len >= sizeof(p->s)) { in mconvert()
790 len = sizeof(p->s) - sz; in mconvert()
798 p->h = (short)((p->hs[0]<<8)|(p->hs[1])); in mconvert()
799 cvt_16(p, m); in mconvert()
804 p->l = (int32_t) in mconvert()
805 ((p->hl[0]<<24)|(p->hl[1]<<16)|(p->hl[2]<<8)|(p->hl[3])); in mconvert()
806 cvt_32(p, m); in mconvert()
811 p->q = (uint64_t) in mconvert()
812 (((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
813 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
814 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
815 ((uint64_t)p->hq[6]<<8)|((uint64_t)p->hq[7])); in mconvert()
816 cvt_64(p, m); in mconvert()
819 p->h = (short)((p->hs[1]<<8)|(p->hs[0])); in mconvert()
820 cvt_16(p, m); in mconvert()
825 p->l = (int32_t) in mconvert()
826 ((p->hl[3]<<24)|(p->hl[2]<<16)|(p->hl[1]<<8)|(p->hl[0])); in mconvert()
827 cvt_32(p, m); in mconvert()
832 p->q = (uint64_t) in mconvert()
833 (((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
834 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
835 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
836 ((uint64_t)p->hq[1]<<8)|((uint64_t)p->hq[0])); in mconvert()
837 cvt_64(p, m); in mconvert()
842 p->l = (int32_t) in mconvert()
843 ((p->hl[1]<<24)|(p->hl[0]<<16)|(p->hl[3]<<8)|(p->hl[2])); in mconvert()
844 cvt_32(p, m); in mconvert()
847 cvt_float(p, m); in mconvert()
850 p->l = ((uint32_t)p->hl[0]<<24)|((uint32_t)p->hl[1]<<16)| in mconvert()
851 ((uint32_t)p->hl[2]<<8) |((uint32_t)p->hl[3]); in mconvert()
852 cvt_float(p, m); in mconvert()
855 p->l = ((uint32_t)p->hl[3]<<24)|((uint32_t)p->hl[2]<<16)| in mconvert()
856 ((uint32_t)p->hl[1]<<8) |((uint32_t)p->hl[0]); in mconvert()
857 cvt_float(p, m); in mconvert()
860 cvt_double(p, m); in mconvert()
863 p->q = ((uint64_t)p->hq[0]<<56)|((uint64_t)p->hq[1]<<48)| in mconvert()
864 ((uint64_t)p->hq[2]<<40)|((uint64_t)p->hq[3]<<32)| in mconvert()
865 ((uint64_t)p->hq[4]<<24)|((uint64_t)p->hq[5]<<16)| in mconvert()
866 ((uint64_t)p->hq[6]<<8) |((uint64_t)p->hq[7]); in mconvert()
867 cvt_double(p, m); in mconvert()
870 p->q = ((uint64_t)p->hq[7]<<56)|((uint64_t)p->hq[6]<<48)| in mconvert()
871 ((uint64_t)p->hq[5]<<40)|((uint64_t)p->hq[4]<<32)| in mconvert()
872 ((uint64_t)p->hq[3]<<24)|((uint64_t)p->hq[2]<<16)| in mconvert()
873 ((uint64_t)p->hq[1]<<8) |((uint64_t)p->hq[0]); in mconvert()
874 cvt_double(p, m); in mconvert()
897 mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir, in mcopy() argument
951 char *dst = p->s; in mcopy()
952 char *edst = &p->s[sizeof(p->s) - 1]; in mcopy()
986 (void)memset(p, '\0', sizeof(*p)); in mcopy()
989 if (nbytes - offset < sizeof(*p)) in mcopy()
992 nbytes = sizeof(*p); in mcopy()
994 (void)memcpy(p, s + offset, nbytes); in mcopy()
1000 if (nbytes < sizeof(*p)) in mcopy()
1001 (void)memset(((char *)(void *)p) + nbytes, '\0', in mcopy()
1002 sizeof(*p) - nbytes); in mcopy()
1012 union VALUETYPE *p = &ms->ms_value; in mget() local
1014 if (mcopy(ms, p, m->type, m->flag & INDIR, s, offset, nbytes, count) == -1) in mget()
1018 mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); in mget()
1065 offset = p->b & off; in mget()
1068 offset = p->b | off; in mget()
1071 offset = p->b ^ off; in mget()
1074 offset = p->b + off; in mget()
1077 offset = p->b - off; in mget()
1080 offset = p->b * off; in mget()
1083 offset = p->b / off; in mget()
1086 offset = p->b % off; in mget()
1090 offset = p->b; in mget()
1100 offset = (short)((p->hs[0]<<8)| in mget()
1101 (p->hs[1])) & in mget()
1105 offset = (short)((p->hs[0]<<8)| in mget()
1106 (p->hs[1])) | in mget()
1110 offset = (short)((p->hs[0]<<8)| in mget()
1111 (p->hs[1])) ^ in mget()
1115 offset = (short)((p->hs[0]<<8)| in mget()
1116 (p->hs[1])) + in mget()
1120 offset = (short)((p->hs[0]<<8)| in mget()
1121 (p->hs[1])) - in mget()
1125 offset = (short)((p->hs[0]<<8)| in mget()
1126 (p->hs[1])) * in mget()
1130 offset = (short)((p->hs[0]<<8)| in mget()
1131 (p->hs[1])) / in mget()
1135 offset = (short)((p->hs[0]<<8)| in mget()
1136 (p->hs[1])) % in mget()
1141 offset = (short)((p->hs[0]<<8)| in mget()
1142 (p->hs[1])); in mget()
1152 offset = (short)((p->hs[1]<<8)| in mget()
1153 (p->hs[0])) & in mget()
1157 offset = (short)((p->hs[1]<<8)| in mget()
1158 (p->hs[0])) | in mget()
1162 offset = (short)((p->hs[1]<<8)| in mget()
1163 (p->hs[0])) ^ in mget()
1167 offset = (short)((p->hs[1]<<8)| in mget()
1168 (p->hs[0])) + in mget()
1172 offset = (short)((p->hs[1]<<8)| in mget()
1173 (p->hs[0])) - in mget()
1177 offset = (short)((p->hs[1]<<8)| in mget()
1178 (p->hs[0])) * in mget()
1182 offset = (short)((p->hs[1]<<8)| in mget()
1183 (p->hs[0])) / in mget()
1187 offset = (short)((p->hs[1]<<8)| in mget()
1188 (p->hs[0])) % in mget()
1193 offset = (short)((p->hs[1]<<8)| in mget()
1194 (p->hs[0])); in mget()
1204 offset = p->h & off; in mget()
1207 offset = p->h | off; in mget()
1210 offset = p->h ^ off; in mget()
1213 offset = p->h + off; in mget()
1216 offset = p->h - off; in mget()
1219 offset = p->h * off; in mget()
1222 offset = p->h / off; in mget()
1225 offset = p->h % off; in mget()
1230 offset = p->h; in mget()
1241 offset = (int32_t)((p->hl[0]<<24)| in mget()
1242 (p->hl[1]<<16)| in mget()
1243 (p->hl[2]<<8)| in mget()
1244 (p->hl[3])) & in mget()
1248 offset = (int32_t)((p->hl[0]<<24)| in mget()
1249 (p->hl[1]<<16)| in mget()
1250 (p->hl[2]<<8)| in mget()
1251 (p->hl[3])) | in mget()
1255 offset = (int32_t)((p->hl[0]<<24)| in mget()
1256 (p->hl[1]<<16)| in mget()
1257 (p->hl[2]<<8)| in mget()
1258 (p->hl[3])) ^ in mget()
1262 offset = (int32_t)((p->hl[0]<<24)| in mget()
1263 (p->hl[1]<<16)| in mget()
1264 (p->hl[2]<<8)| in mget()
1265 (p->hl[3])) + in mget()
1269 offset = (int32_t)((p->hl[0]<<24)| in mget()
1270 (p->hl[1]<<16)| in mget()
1271 (p->hl[2]<<8)| in mget()
1272 (p->hl[3])) - in mget()
1276 offset = (int32_t)((p->hl[0]<<24)| in mget()
1277 (p->hl[1]<<16)| in mget()
1278 (p->hl[2]<<8)| in mget()
1279 (p->hl[3])) * in mget()
1283 offset = (int32_t)((p->hl[0]<<24)| in mget()
1284 (p->hl[1]<<16)| in mget()
1285 (p->hl[2]<<8)| in mget()
1286 (p->hl[3])) / in mget()
1290 offset = (int32_t)((p->hl[0]<<24)| in mget()
1291 (p->hl[1]<<16)| in mget()
1292 (p->hl[2]<<8)| in mget()
1293 (p->hl[3])) % in mget()
1298 offset = (int32_t)((p->hl[0]<<24)| in mget()
1299 (p->hl[1]<<16)| in mget()
1300 (p->hl[2]<<8)| in mget()
1301 (p->hl[3])); in mget()
1312 offset = (int32_t)((p->hl[3]<<24)| in mget()
1313 (p->hl[2]<<16)| in mget()
1314 (p->hl[1]<<8)| in mget()
1315 (p->hl[0])) & in mget()
1319 offset = (int32_t)((p->hl[3]<<24)| in mget()
1320 (p->hl[2]<<16)| in mget()
1321 (p->hl[1]<<8)| in mget()
1322 (p->hl[0])) | in mget()
1326 offset = (int32_t)((p->hl[3]<<24)| in mget()
1327 (p->hl[2]<<16)| in mget()
1328 (p->hl[1]<<8)| in mget()
1329 (p->hl[0])) ^ in mget()
1333 offset = (int32_t)((p->hl[3]<<24)| in mget()
1334 (p->hl[2]<<16)| in mget()
1335 (p->hl[1]<<8)| in mget()
1336 (p->hl[0])) + in mget()
1340 offset = (int32_t)((p->hl[3]<<24)| in mget()
1341 (p->hl[2]<<16)| in mget()
1342 (p->hl[1]<<8)| in mget()
1343 (p->hl[0])) - in mget()
1347 offset = (int32_t)((p->hl[3]<<24)| in mget()
1348 (p->hl[2]<<16)| in mget()
1349 (p->hl[1]<<8)| in mget()
1350 (p->hl[0])) * in mget()
1354 offset = (int32_t)((p->hl[3]<<24)| in mget()
1355 (p->hl[2]<<16)| in mget()
1356 (p->hl[1]<<8)| in mget()
1357 (p->hl[0])) / in mget()
1361 offset = (int32_t)((p->hl[3]<<24)| in mget()
1362 (p->hl[2]<<16)| in mget()
1363 (p->hl[1]<<8)| in mget()
1364 (p->hl[0])) % in mget()
1369 offset = (int32_t)((p->hl[3]<<24)| in mget()
1370 (p->hl[2]<<16)| in mget()
1371 (p->hl[1]<<8)| in mget()
1372 (p->hl[0])); in mget()
1382 offset = (int32_t)((p->hl[1]<<24)| in mget()
1383 (p->hl[0]<<16)| in mget()
1384 (p->hl[3]<<8)| in mget()
1385 (p->hl[2])) & in mget()
1389 offset = (int32_t)((p->hl[1]<<24)| in mget()
1390 (p->hl[0]<<16)| in mget()
1391 (p->hl[3]<<8)| in mget()
1392 (p->hl[2])) | in mget()
1396 offset = (int32_t)((p->hl[1]<<24)| in mget()
1397 (p->hl[0]<<16)| in mget()
1398 (p->hl[3]<<8)| in mget()
1399 (p->hl[2])) ^ in mget()
1403 offset = (int32_t)((p->hl[1]<<24)| in mget()
1404 (p->hl[0]<<16)| in mget()
1405 (p->hl[3]<<8)| in mget()
1406 (p->hl[2])) + in mget()
1410 offset = (int32_t)((p->hl[1]<<24)| in mget()
1411 (p->hl[0]<<16)| in mget()
1412 (p->hl[3]<<8)| in mget()
1413 (p->hl[2])) - in mget()
1417 offset = (int32_t)((p->hl[1]<<24)| in mget()
1418 (p->hl[0]<<16)| in mget()
1419 (p->hl[3]<<8)| in mget()
1420 (p->hl[2])) * in mget()
1424 offset = (int32_t)((p->hl[1]<<24)| in mget()
1425 (p->hl[0]<<16)| in mget()
1426 (p->hl[3]<<8)| in mget()
1427 (p->hl[2])) / in mget()
1431 offset = (int32_t)((p->hl[1]<<24)| in mget()
1432 (p->hl[0]<<16)| in mget()
1433 (p->hl[3]<<8)| in mget()
1434 (p->hl[2])) % in mget()
1439 offset = (int32_t)((p->hl[1]<<24)| in mget()
1440 (p->hl[0]<<16)| in mget()
1441 (p->hl[3]<<8)| in mget()
1442 (p->hl[2])); in mget()
1452 offset = p->l & off; in mget()
1455 offset = p->l | off; in mget()
1458 offset = p->l ^ off; in mget()
1461 offset = p->l + off; in mget()
1464 offset = p->l - off; in mget()
1467 offset = p->l * off; in mget()
1470 offset = p->l / off; in mget()
1473 offset = p->l % off; in mget()
1477 offset = p->l; in mget()
1498 if (mcopy(ms, p, m->type, 0, s, offset, nbytes, count) == -1) in mget()
1503 mdebug(offset, (char *)(void *)p, in mget()
1697 union VALUETYPE *p = &ms->ms_value; local
1701 v = p->b;
1707 v = p->h;
1722 v = p->l;
1734 v = p->q;
1741 fv = p->f;
1775 dv = p->d;
1812 v = file_strncmp(m->value.s, p->s, (size_t)m->vallen, m->str_flags);
1818 v = file_strncmp16(m->value.s, p->s, (size_t)m->vallen, m->str_flags);