Lines Matching refs:CAST
74 #define OFFSET_OOB(n, o, i) ((n) < CAST(uint32_t, (o)) || (i) > ((n) - (o)))
76 (CAST(uint64_t, (p)->hq[0])<<56)| \
77 (CAST(uint64_t, (p)->hq[1])<<48)| \
78 (CAST(uint64_t, (p)->hq[2])<<40)| \
79 (CAST(uint64_t, (p)->hq[3])<<32)| \
80 (CAST(uint64_t, (p)->hq[4])<<24)| \
81 (CAST(uint64_t, (p)->hq[5])<<16)| \
82 (CAST(uint64_t, (p)->hq[6])<<8)| \
83 (CAST(uint64_t, (p)->hq[7])))
85 (CAST(uint64_t, (p)->hq[7])<<56)| \
86 (CAST(uint64_t, (p)->hq[6])<<48)| \
87 (CAST(uint64_t, (p)->hq[5])<<40)| \
88 (CAST(uint64_t, (p)->hq[4])<<32)| \
89 (CAST(uint64_t, (p)->hq[3])<<24)| \
90 (CAST(uint64_t, (p)->hq[2])<<16)| \
91 (CAST(uint64_t, (p)->hq[1])<<8)| \
92 (CAST(uint64_t, (p)->hq[0])))
94 (CAST(uint32_t, (p)->hl[3])<<24)| \
95 (CAST(uint32_t, (p)->hl[2])<<16)| \
96 (CAST(uint32_t, (p)->hl[1])<<8)| \
97 (CAST(uint32_t, (p)->hl[0])))
99 (CAST(uint32_t, (p)->hl[0])<<24)| \
100 (CAST(uint32_t, (p)->hl[1])<<16)| \
101 (CAST(uint32_t, (p)->hl[2])<<8)| \
102 (CAST(uint32_t, (p)->hl[3])))
104 (CAST(uint32_t, (p)->hl[1])<<24)| \
105 (CAST(uint32_t, (p)->hl[0])<<16)| \
106 (CAST(uint32_t, (p)->hl[3])<<8)| \
107 (CAST(uint32_t, (p)->hl[2])))
109 #define BE16(p) ((CAST(uint16_t, (p)->hs[0])<<8)|(CAST(uint16_t, (p)->hs[1])))
110 #define LE16(p) ((CAST(uint16_t, (p)->hs[1])<<8)|(CAST(uint16_t, (p)->hs[0])))
112 CAST(intmax_t, CAST(int##v##_t, p)) : \
113 CAST(intmax_t, CAST(uint##v##_t, p)))
252 switch (mget(ms, m, b, CAST(const unsigned char *, bb.fbuf), in match()
360 switch (mget(ms, m, b, CAST(const unsigned char *, in match()
532 l = CAST(size_t, ptr - sptr); in varexpand()
597 v = file_signextend(ms, m, CAST(uint64_t, value)); \ in mprint()
604 CAST(utype, v)); \ in mprint()
607 CAST(stype, v)); \ in mprint()
615 CAST(utype, v)) == -1) \ in mprint()
619 CAST(stype, v)) == -1) \ in mprint()
831 return CAST(int32_t, t); in mprint()
843 o = CAST(int32_t, (ms->offset + sizeof(char))); in moffset()
849 o = CAST(int32_t, (ms->offset + sizeof(short))); in moffset()
856 o = CAST(int32_t, (ms->offset + sizeof(int32_t))); in moffset()
862 o = CAST(int32_t, (ms->offset + sizeof(int64_t))); in moffset()
876 o = CAST(uint32_t, (ms->offset + strlen(p->s))); in moffset()
881 o += CAST(uint32_t, l); in moffset()
890 o = CAST(int32_t, (ms->offset + sizeof(uint32_t))); in moffset()
897 o = CAST(int32_t, (ms->offset + sizeof(uint32_t))); in moffset()
903 o = CAST(int32_t, (ms->offset + sizeof(uint64_t))); in moffset()
909 o = CAST(int32_t, (ms->offset + sizeof(uint64_t))); in moffset()
915 o = CAST(int32_t, (ms->offset + sizeof(float))); in moffset()
921 o = CAST(int32_t, (ms->offset + sizeof(double))); in moffset()
926 o = CAST(int32_t, ms->search.offset); in moffset()
928 o = CAST(int32_t, in moffset()
934 o = CAST(int32_t, ms->search.offset); in moffset()
936 o = CAST(int32_t, (ms->search.offset + m->vallen)); in moffset()
949 if (o == -1 || CAST(size_t, o) > nbytes) { in moffset()
961 o = CAST(int32_t, (ms->offset + 2 * sizeof(uint64_t))); in moffset()
969 if (CAST(size_t, o) > nbytes) { in moffset()
1046 p->fld &= CAST(type, m->num_mask); \
1049 p->fld |= CAST(type, m->num_mask); \
1052 p->fld ^= CAST(type, m->num_mask); \
1055 p->fld += CAST(type, m->num_mask); \
1058 p->fld -= CAST(type, m->num_mask); \
1061 p->fld *= CAST(type, m->num_mask); \
1064 if (CAST(type, m->num_mask) == 0) \
1066 p->fld /= CAST(type, m->num_mask); \
1069 if (CAST(type, m->num_mask) == 0) \
1071 p->fld %= CAST(type, m->num_mask); \
1109 p->fld += CAST(type, m->num_mask); \
1112 p->fld -= CAST(type, m->num_mask); \
1115 p->fld *= CAST(type, m->num_mask); \
1118 if (CAST(type, m->num_mask) == 0) \
1120 p->fld /= CAST(type, m->num_mask); \
1206 p->h = CAST(short, BE16(p)); in mconvert()
1213 p->l = CAST(int32_t, BE32(p)); in mconvert()
1221 p->q = CAST(uint64_t, BE64(p)); in mconvert()
1226 p->h = CAST(short, LE16(p)); in mconvert()
1233 p->l = CAST(int32_t, LE32(p)); in mconvert()
1241 p->q = CAST(uint64_t, LE64(p)); in mconvert()
1248 p->l = CAST(int32_t, ME32(p)); in mconvert()
1321 offset = CAST(uint32_t, nbytes); in mcopy()
1358 ((b = CAST(const char *, in mcopy()
1359 memchr(c = b, '\n', CAST(size_t, (end - b))))) in mcopy()
1360 || (b = CAST(const char *, in mcopy()
1361 memchr(c, '\r', CAST(size_t, (end - c)))))); in mcopy()
1477 return CAST(uint32_t, offset); in do_ops()
1504 if (CAST(size_t, m->offset) > b->elen) in msetoffset()
1507 ms->eoffset = ms->offset = CAST(int32_t, b->elen - m->offset); in msetoffset()
1536 ms->c.li = CAST(struct level_info *, emalloc(len)); in save_cont()
1580 CAST(uint32_t, offset + o), CAST(uint32_t, nbytes), m) == -1) in mget()
1600 const union VALUETYPE *q = CAST(const union VALUETYPE *, in mget()
1691 lhs = cvt_id3(ms, CAST(uint32_t, lhs)); in mget()
1700 lhs = cvt_id3(ms, CAST(uint32_t, lhs)); in mget()
1818 offset += CAST(uint32_t, o); in mget()
2181 v = file_strncmp(m->value.s, p->s, CAST(size_t, m->vallen), in magiccheck()
2188 v = file_strncmp16(m->value.s, p->s, CAST(size_t, m->vallen), in magiccheck()
2208 found = CAST(const char *, memmem(ms->search.s, idx, in magiccheck()
2337 "u == *any* = 1\n", CAST(unsigned long long, v)); in magiccheck()
2346 CAST(unsigned long long, v), in magiccheck()
2347 CAST(unsigned long long, l), matched); in magiccheck()
2355 CAST(unsigned long long, v), in magiccheck()
2356 CAST(unsigned long long, l), matched); in magiccheck()
2365 CAST(unsigned long long, v), in magiccheck()
2366 CAST(unsigned long long, l), matched); in magiccheck()
2369 matched = CAST(int64_t, v) > CAST(int64_t, l); in magiccheck()
2373 CAST(long long, v), in magiccheck()
2374 CAST(long long, l), matched); in magiccheck()
2384 CAST(unsigned long long, v), in magiccheck()
2385 CAST(unsigned long long, l), matched); in magiccheck()
2388 matched = CAST(int64_t, v) < CAST(int64_t, l); in magiccheck()
2392 CAST(long long, v), in magiccheck()
2393 CAST(long long, l), matched); in magiccheck()
2402 "x) = %d\n", CAST(unsigned long long, v), in magiccheck()
2403 CAST(unsigned long long, l), in magiccheck()
2404 CAST(unsigned long long, l), in magiccheck()
2413 "x) = %d\n", CAST(unsigned long long, v), in magiccheck()
2414 CAST(unsigned long long, l), in magiccheck()
2415 CAST(unsigned long long, l), matched); in magiccheck()