Lines Matching refs:offset

121     const unsigned char *s, size_t nbytes, size_t offset, int mode, int text,  in match()  argument
155 ms->offset = m->offset; in match()
159 switch (mget(ms, s, m, nbytes, offset, cont_level, mode, text, in match()
233 ms->offset = m->offset; in match()
235 ms->offset += in match()
246 switch (mget(ms, s, m, nbytes, offset, cont_level, mode, in match()
388 t = ms->offset + sizeof(char); in mprint()
410 t = ms->offset + sizeof(short); in mprint()
431 t = ms->offset + sizeof(int32_t); in mprint()
440 t = ms->offset + sizeof(int64_t); in mprint()
450 t = ms->offset + m->vallen; in mprint()
456 t = ms->offset + strlen(str); in mprint()
489 t = ms->offset + sizeof(uint32_t); in mprint()
498 t = ms->offset + sizeof(uint32_t); in mprint()
507 t = ms->offset + sizeof(uint64_t); in mprint()
515 t = ms->offset + sizeof(uint64_t); in mprint()
524 t = ms->offset + sizeof(uint64_t); in mprint()
544 t = ms->offset + sizeof(float); in mprint()
564 t = ms->offset + sizeof(double); in mprint()
583 t = ms->search.offset; in mprint()
585 t = ms->search.offset + ms->search.rm_len; in mprint()
593 t = ms->search.offset; in mprint()
595 t = ms->search.offset + m->vallen; in mprint()
601 t = ms->offset; in mprint()
607 t = ms->offset; in mprint()
622 return CAST(int32_t, (ms->offset + sizeof(char))); in moffset()
627 return CAST(int32_t, (ms->offset + sizeof(short))); in moffset()
633 return CAST(int32_t, (ms->offset + sizeof(int32_t))); in moffset()
638 return CAST(int32_t, (ms->offset + sizeof(int64_t))); in moffset()
645 return ms->offset + m->vallen; in moffset()
652 t = CAST(uint32_t, (ms->offset + strlen(p->s))); in moffset()
662 return CAST(int32_t, (ms->offset + sizeof(uint32_t))); in moffset()
668 return CAST(int32_t, (ms->offset + sizeof(uint32_t))); in moffset()
673 return CAST(int32_t, (ms->offset + sizeof(uint64_t))); in moffset()
678 return CAST(int32_t, (ms->offset + sizeof(uint64_t))); in moffset()
683 return CAST(int32_t, (ms->offset + sizeof(float))); in moffset()
688 return CAST(int32_t, (ms->offset + sizeof(double))); in moffset()
692 return CAST(int32_t, ms->search.offset); in moffset()
694 return CAST(int32_t, (ms->search.offset + in moffset()
699 return CAST(int32_t, ms->search.offset); in moffset()
701 return CAST(int32_t, (ms->search.offset + m->vallen)); in moffset()
704 return ms->offset; in moffset()
707 return ms->offset; in moffset()
999 mdebug(uint32_t offset, const char *str, size_t len) in mdebug() argument
1001 (void) fprintf(stderr, "mget/%zu @%d: ", len, offset); in mdebug()
1009 const unsigned char *s, uint32_t offset, size_t nbytes, struct magic *m) in mcopy() argument
1018 ms->search.s = RCAST(const char *, s) + offset; in mcopy()
1019 ms->search.s_len = nbytes - offset; in mcopy()
1020 ms->search.offset = offset; in mcopy()
1040 if (offset > bytecnt) { in mcopy()
1041 offset = bytecnt; in mcopy()
1048 buf = RCAST(const char *, s) + offset; in mcopy()
1066 ms->search.offset = offset; in mcopy()
1072 const unsigned char *src = s + offset; in mcopy()
1081 if (offset >= nbytes) { in mcopy()
1083 offset); in mcopy()
1108 if (offset >= nbytes) { in mcopy()
1112 if (nbytes - offset < sizeof(*p)) in mcopy()
1113 nbytes = nbytes - offset; in mcopy()
1117 (void)memcpy(p, s + offset, nbytes); in mcopy()
1135 uint32_t soffset, offset = ms->offset; in mget() local
1146 if (mcopy(ms, p, m->type, m->flag & INDIR, s, (uint32_t)(offset + o), in mget()
1152 "nbytes=%zu)\n", m->type, m->flag, offset, o, nbytes); in mget()
1153 mdebug(offset, (char *)(void *)p, sizeof(union VALUETYPE)); in mget()
1160 ((const void *)(s + offset + off))); in mget()
1197 if (OFFSET_OOB(nbytes, offset, 1)) 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()
1229 offset = ~offset; in mget()
1232 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1237 offset = (short)((p->hs[0]<<8)| in mget()
1242 offset = (short)((p->hs[0]<<8)| in mget()
1247 offset = (short)((p->hs[0]<<8)| in mget()
1252 offset = (short)((p->hs[0]<<8)| in mget()
1257 offset = (short)((p->hs[0]<<8)| in mget()
1262 offset = (short)((p->hs[0]<<8)| in mget()
1267 offset = (short)((p->hs[0]<<8)| in mget()
1272 offset = (short)((p->hs[0]<<8)| in mget()
1278 offset = (short)((p->hs[0]<<8)| in mget()
1281 offset = ~offset; in mget()
1284 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1289 offset = (short)((p->hs[1]<<8)| in mget()
1294 offset = (short)((p->hs[1]<<8)| in mget()
1299 offset = (short)((p->hs[1]<<8)| in mget()
1304 offset = (short)((p->hs[1]<<8)| in mget()
1309 offset = (short)((p->hs[1]<<8)| in mget()
1314 offset = (short)((p->hs[1]<<8)| in mget()
1319 offset = (short)((p->hs[1]<<8)| in mget()
1324 offset = (short)((p->hs[1]<<8)| in mget()
1330 offset = (short)((p->hs[1]<<8)| in mget()
1333 offset = ~offset; in mget()
1336 if (OFFSET_OOB(nbytes, offset, 2)) 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()
1369 offset = ~offset; in mget()
1373 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1378 offset = (int32_t)((p->hl[0]<<24)| in mget()
1385 offset = (int32_t)((p->hl[0]<<24)| in mget()
1392 offset = (int32_t)((p->hl[0]<<24)| in mget()
1399 offset = (int32_t)((p->hl[0]<<24)| in mget()
1406 offset = (int32_t)((p->hl[0]<<24)| in mget()
1413 offset = (int32_t)((p->hl[0]<<24)| in mget()
1420 offset = (int32_t)((p->hl[0]<<24)| in mget()
1427 offset = (int32_t)((p->hl[0]<<24)| in mget()
1435 offset = (int32_t)((p->hl[0]<<24)| in mget()
1440 offset = ~offset; in mget()
1444 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1449 offset = (int32_t)((p->hl[3]<<24)| in mget()
1456 offset = (int32_t)((p->hl[3]<<24)| in mget()
1463 offset = (int32_t)((p->hl[3]<<24)| in mget()
1470 offset = (int32_t)((p->hl[3]<<24)| in mget()
1477 offset = (int32_t)((p->hl[3]<<24)| in mget()
1484 offset = (int32_t)((p->hl[3]<<24)| in mget()
1491 offset = (int32_t)((p->hl[3]<<24)| in mget()
1498 offset = (int32_t)((p->hl[3]<<24)| in mget()
1506 offset = (int32_t)((p->hl[3]<<24)| in mget()
1511 offset = ~offset; in mget()
1514 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1519 offset = (int32_t)((p->hl[1]<<24)| in mget()
1526 offset = (int32_t)((p->hl[1]<<24)| in mget()
1533 offset = (int32_t)((p->hl[1]<<24)| in mget()
1540 offset = (int32_t)((p->hl[1]<<24)| in mget()
1547 offset = (int32_t)((p->hl[1]<<24)| in mget()
1554 offset = (int32_t)((p->hl[1]<<24)| in mget()
1561 offset = (int32_t)((p->hl[1]<<24)| in mget()
1568 offset = (int32_t)((p->hl[1]<<24)| in mget()
1576 offset = (int32_t)((p->hl[1]<<24)| in mget()
1581 offset = ~offset; in mget()
1584 if (OFFSET_OOB(nbytes, offset, 4)) 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()
1616 offset = ~offset; in mget()
1623 offset = ((((offset >> 0) & 0x7f) << 0) | in mget()
1624 (((offset >> 8) & 0x7f) << 7) | in mget()
1625 (((offset >> 16) & 0x7f) << 14) | in mget()
1626 (((offset >> 24) & 0x7f) << 21)) + 10; in mget()
1633 offset += ms->c.li[cont_level-1].off; in mget()
1634 if (offset == 0) { in mget()
1641 fprintf(stderr, "indirect +offs=%u\n", offset); in mget()
1643 if (mcopy(ms, p, m->type, 0, s, offset, nbytes, m) == -1) in mget()
1645 ms->offset = offset; in mget()
1648 mdebug(offset, (char *)(void *)p, in mget()
1656 if (OFFSET_OOB(nbytes, offset, 1)) in mget()
1663 if (OFFSET_OOB(nbytes, offset, 2)) in mget()
1682 if (OFFSET_OOB(nbytes, offset, 4)) in mget()
1689 if (OFFSET_OOB(nbytes, offset, 8)) in mget()
1696 if (OFFSET_OOB(nbytes, offset, m->vallen)) in mget()
1701 if (OFFSET_OOB(nbytes, offset, 0)) in mget()
1706 if (offset == 0) in mget()
1708 if (OFFSET_OOB(nbytes, offset, 0)) in mget()
1711 soffset = ms->offset; in mget()
1713 ms->offset = 0; in mget()
1714 rv = file_softmagic(ms, s + offset, nbytes - offset, in mget()
1717 fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv); in mget()
1720 ms->offset = soffset; in mget()
1723 file_printf(ms, m->desc, offset) == -1) { in mget()
1742 if (OFFSET_OOB(nbytes, offset, 0)) in mget()
1757 rv = match(ms, ml.magic, ml.nmagic, s, nbytes, offset + o, in mget()
2040 ms->search.offset += idx; in magiccheck()
2112 zval **match, **offset; in magiccheck() local
2148 if (zend_hash_get_current_data_ex(inner_ht, (void**)&offset, &inner_pos) != FAILURE) { in magiccheck()
2150 offsetcopy = **offset; in magiccheck()
2167 …ms->search.offset += (size_t)Z_LVAL_P(pattern_offset); /* this is where the match starts as size_t… in magiccheck()