Lines Matching refs:l
63 #define EATAB {while (isascii(CAST(unsigned char, *l)) && \
64 isspace(CAST(unsigned char, *l))) ++l;}
65 #define LOWCASE(l) (isupper(CAST(unsigned char, l)) ? \ argument
66 tolower(CAST(unsigned char, l)) : (l))
317 get_type(const struct type_tbl_s *tbl, const char *l, const char **t) in get_type() argument
322 if (strncmp(l, p->name, p->len) == 0) { in get_type()
324 *t = l + p->len; in get_type()
341 get_standard_integer_type(const char *l, const char **t) in get_standard_integer_type() argument
345 if (isalpha(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
346 switch (l[1]) { in get_standard_integer_type()
379 l += 2; in get_standard_integer_type()
380 } else if (isdigit(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
391 if (isdigit(CAST(unsigned char, l[2]))) { in get_standard_integer_type()
395 switch (l[1]) { in get_standard_integer_type()
412 l += 2; in get_standard_integer_type()
418 ++l; in get_standard_integer_type()
421 *t = l; in get_standard_integer_type()
1749 get_cond(const char *l, const char **t) in get_cond() argument
1764 if (strncmp(l, p->name, p->len) == 0 && in get_cond()
1765 isspace(CAST(unsigned char, l[p->len]))) { in get_cond()
1767 *t = l + p->len; in get_cond()
1821 const char *l = *lp; in parse_indirect_modifier() local
1823 while (!isspace(CAST(unsigned char, *++l))) in parse_indirect_modifier()
1824 switch (*l) { in parse_indirect_modifier()
1831 "invalid", *l); in parse_indirect_modifier()
1832 *lp = l; in parse_indirect_modifier()
1835 *lp = l; in parse_indirect_modifier()
1843 const char *l = *lp; in parse_op_modifier() local
1847 ++l; in parse_op_modifier()
1849 val = CAST(uint64_t, strtoull(l, &t, 0)); in parse_op_modifier()
1850 l = t; in parse_op_modifier()
1852 eatsize(&l); in parse_op_modifier()
1853 *lp = l; in parse_op_modifier()
1859 const char *l = *lp; in parse_string_modifier() local
1863 while (!isspace(CAST(unsigned char, *++l))) { in parse_string_modifier()
1864 switch (*l) { in parse_string_modifier()
1872 m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); in parse_string_modifier()
1875 l = t - 1; in parse_string_modifier()
1944 "invalid", *l); in parse_string_modifier()
1948 if (l[1] == '/' && !isspace(CAST(unsigned char, l[2]))) in parse_string_modifier()
1949 l++; in parse_string_modifier()
1953 *lp = l; in parse_string_modifier()
1956 *lp = l; in parse_string_modifier()
1972 const char *l = line; in parse() local
1983 while (*l == '>') { in parse()
1984 ++l; /* step over */ in parse()
2039 if (*l == '&') { /* m->cont_level == 0 checked below. */ in parse()
2040 ++l; /* step over */ in parse()
2043 if (*l == '(') { in parse()
2044 ++l; /* step over */ in parse()
2049 if (*l == '&') { /* m->cont_level == 0 checked below */ in parse()
2050 ++l; /* step over */ in parse()
2062 if (*l == '-') { in parse()
2063 ++l; /* step over */ in parse()
2066 m->offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2067 if (l == t) { in parse()
2069 file_magwarn(ms, "offset `%s' invalid", l); in parse()
2073 l = t; in parse()
2082 if (*l == '.' || *l == ',') { in parse()
2083 if (*l == ',') in parse()
2085 l++; in parse()
2086 switch (*l) { in parse()
2139 *l); in parse()
2142 l++; in parse()
2145 if (*l == '~') { in parse()
2147 l++; in parse()
2149 if ((op = get_op(*l)) != -1) { in parse()
2151 l++; in parse()
2153 if (*l == '(') { in parse()
2155 l++; in parse()
2157 if (isdigit(CAST(unsigned char, *l)) || *l == '-') { in parse()
2158 m->in_offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2159 if (l == t) { in parse()
2162 "in_offset `%s' invalid", l); in parse()
2165 l = t; in parse()
2167 if (*l++ != ')' || in parse()
2168 ((m->in_op & FILE_OPINDIRECT) && *l++ != ')')) { in parse()
2178 m->cond = get_cond(l, &l); in parse()
2188 if (*l == 'u') { in parse()
2194 m->type = get_type(type_tbl, l + 1, &l); in parse()
2200 m->type = get_standard_integer_type(l, &l); in parse()
2212 m->type = get_type(type_tbl, l, &l); in parse()
2219 if (*l == 'd') in parse()
2220 m->type = get_standard_integer_type(l, &l); in parse()
2221 else if (*l == 's' in parse()
2222 && !isalpha(CAST(unsigned char, l[1]))) { in parse()
2224 ++l; in parse()
2231 m->type = get_type(special_tbl, l, &l); in parse()
2236 file_magwarn(ms, "type `%s' invalid", l); in parse()
2243 "declared at top level", l); in parse()
2251 if (*l == '~') { in parse()
2256 ++l; in parse()
2260 if ((op = get_op(*l)) != -1) { in parse()
2273 r = parse_indirect_modifier(ms, m, &l); in parse()
2275 r = parse_string_modifier(ms, m, &l); in parse()
2279 parse_op_modifier(ms, m, &l, op); in parse()
2288 switch (*l) { in parse()
2291 m->reln = *l; in parse()
2292 ++l; in parse()
2293 if (*l == '=') { in parse()
2299 ++l; in parse()
2306 m->reln = *l; in parse()
2307 ++l; in parse()
2308 if (*l == '=') { in parse()
2310 ++l; in parse()
2314 m->reln = *l; in parse()
2315 ++l; in parse()
2319 if (*l == 'x' && ((isascii(CAST(unsigned char, l[1])) && in parse()
2320 isspace(CAST(unsigned char, l[1]))) || !l[1])) { in parse()
2321 m->reln = *l; in parse()
2322 ++l; in parse()
2329 if (m->reln != 'x' && getvalue(ms, m, &l, action)) in parse()
2342 if (l[0] == '\b') { in parse()
2343 ++l; in parse()
2345 } else if ((l[0] == '\\') && (l[1] == 'b')) { in parse()
2346 ++l; in parse()
2347 ++l; in parse()
2350 for (i = 0; (m->desc[i++] = *l++) != '\0' && i < sizeof(m->desc); ) in parse()
2384 const char *l = line; in parse_strength() local
2404 switch (*l) { in parse_strength()
2411 m->factor_op = *l++; in parse_strength()
2414 file_magwarn(ms, "Unknown factor op `%c'", *l); in parse_strength()
2418 factor = strtoul(l, &el, 0); in parse_strength()
2424 file_magwarn(ms, "Bad factor `%s'", l); in parse_strength()
2452 const char *l = line; in parse_extra() local
2459 "`%.*s', new type `%s'", name, CAST(int, len), buf, l); in parse_extra()
2470 for (i = 0; *l && i < llen && i < len && goodchar(*l, extra); in parse_extra()
2471 buf[i++] = *l++) in parse_extra()
2474 if (i == len && *l) { in parse_extra()
2481 if (!isspace(CAST(unsigned char, *l)) && !goodchar(*l, extra)) in parse_extra()
2483 name, line, *l); in parse_extra()
3090 size_t l = file_pstring_length_size(ms, m); in getstr() local
3091 if (l == FILE_BADSIZE) in getstr()
3093 m->vallen += CAST(unsigned char, l); in getstr()
3181 const char *l = *p; in eatsize() local
3183 if (LOWCASE(*l) == 'u') in eatsize()
3184 l++; in eatsize()
3186 switch (LOWCASE(*l)) { in eatsize()
3192 l++; in eatsize()
3198 *p = l; in eatsize()
3529 file_varint2uintmax_t(const unsigned char *us, int t, size_t *l) argument
3538 if (l)
3539 *l = c - us + 1;
3551 if (l)
3552 *l = c - us + 1;
3641 size_t l = file_pstring_length_size(ms, m); local
3642 if (l == FILE_BADSIZE)
3643 return l;
3644 len -= l;