Lines Matching refs:l
71 #define EATAB {while (isascii(CAST(unsigned char, *l)) && \
72 isspace(CAST(unsigned char, *l))) ++l;}
73 #define LOWCASE(l) (isupper(CAST(unsigned char, l)) ? \ argument
74 tolower(CAST(unsigned char, l)) : (l))
274 get_type(const struct type_tbl_s *tbl, const char *l, const char **t) in get_type() argument
279 if (strncmp(l, p->name, p->len) == 0) { in get_type()
281 *t = l + p->len; in get_type()
298 get_standard_integer_type(const char *l, const char **t) in get_standard_integer_type() argument
302 if (isalpha(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
303 switch (l[1]) { in get_standard_integer_type()
336 l += 2; in get_standard_integer_type()
337 } else if (isdigit(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
348 if (isdigit(CAST(unsigned char, l[2]))) { in get_standard_integer_type()
352 switch (l[1]) { in get_standard_integer_type()
369 l += 2; in get_standard_integer_type()
375 ++l; in get_standard_integer_type()
378 *t = l; in get_standard_integer_type()
1607 get_cond(const char *l, const char **t) in get_cond() argument
1622 if (strncmp(l, p->name, p->len) == 0 && in get_cond()
1623 isspace(CAST(unsigned char, l[p->len]))) { in get_cond()
1625 *t = l + p->len; in get_cond()
1679 const char *l = *lp; in parse_indirect_modifier() local
1681 while (!isspace(CAST(unsigned char, *++l))) in parse_indirect_modifier()
1682 switch (*l) { in parse_indirect_modifier()
1689 "invalid", *l); in parse_indirect_modifier()
1690 *lp = l; in parse_indirect_modifier()
1693 *lp = l; in parse_indirect_modifier()
1701 const char *l = *lp; in parse_op_modifier() local
1705 ++l; in parse_op_modifier()
1707 val = CAST(uint64_t, strtoull(l, &t, 0)); in parse_op_modifier()
1708 l = t; in parse_op_modifier()
1710 eatsize(&l); in parse_op_modifier()
1711 *lp = l; in parse_op_modifier()
1717 const char *l = *lp; in parse_string_modifier() local
1721 while (!isspace(CAST(unsigned char, *++l))) { in parse_string_modifier()
1722 switch (*l) { in parse_string_modifier()
1730 m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); in parse_string_modifier()
1733 l = t - 1; in parse_string_modifier()
1799 "invalid", *l); in parse_string_modifier()
1803 if (l[1] == '/' && !isspace(CAST(unsigned char, l[2]))) in parse_string_modifier()
1804 l++; in parse_string_modifier()
1808 *lp = l; in parse_string_modifier()
1811 *lp = l; in parse_string_modifier()
1827 const char *l = line; in parse() local
1838 while (*l == '>') { in parse()
1839 ++l; /* step over */ in parse()
1894 if (*l == '&') { /* m->cont_level == 0 checked below. */ in parse()
1895 ++l; /* step over */ in parse()
1898 if (*l == '(') { in parse()
1899 ++l; /* step over */ in parse()
1904 if (*l == '&') { /* m->cont_level == 0 checked below */ in parse()
1905 ++l; /* step over */ in parse()
1917 if (*l == '-') { in parse()
1918 ++l; /* step over */ in parse()
1921 m->offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
1922 if (l == t) { in parse()
1924 file_magwarn(ms, "offset `%s' invalid", l); in parse()
1928 l = t; in parse()
1937 if (*l == '.' || *l == ',') { in parse()
1938 if (*l == ',') in parse()
1940 l++; in parse()
1941 switch (*l) { in parse()
1991 *l); in parse()
1994 l++; in parse()
1997 if (*l == '~') { in parse()
1999 l++; in parse()
2001 if ((op = get_op(*l)) != -1) { in parse()
2003 l++; in parse()
2005 if (*l == '(') { in parse()
2007 l++; in parse()
2009 if (isdigit(CAST(unsigned char, *l)) || *l == '-') { in parse()
2010 m->in_offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2011 if (l == t) { in parse()
2014 "in_offset `%s' invalid", l); in parse()
2017 l = t; in parse()
2019 if (*l++ != ')' || in parse()
2020 ((m->in_op & FILE_OPINDIRECT) && *l++ != ')')) { in parse()
2030 m->cond = get_cond(l, &l); in parse()
2040 if (*l == 'u') { in parse()
2046 m->type = get_type(type_tbl, l + 1, &l); in parse()
2052 m->type = get_standard_integer_type(l, &l); in parse()
2064 m->type = get_type(type_tbl, l, &l); in parse()
2071 if (*l == 'd') in parse()
2072 m->type = get_standard_integer_type(l, &l); in parse()
2073 else if (*l == 's' in parse()
2074 && !isalpha(CAST(unsigned char, l[1]))) { in parse()
2076 ++l; in parse()
2083 m->type = get_type(special_tbl, l, &l); in parse()
2088 file_magwarn(ms, "type `%s' invalid", l); in parse()
2095 "declared at top level", l); in parse()
2103 if (*l == '~') { in parse()
2108 ++l; in parse()
2112 if ((op = get_op(*l)) != -1) { in parse()
2125 r = parse_indirect_modifier(ms, m, &l); in parse()
2127 r = parse_string_modifier(ms, m, &l); in parse()
2131 parse_op_modifier(ms, m, &l, op); in parse()
2140 switch (*l) { in parse()
2143 m->reln = *l; in parse()
2144 ++l; in parse()
2145 if (*l == '=') { in parse()
2151 ++l; in parse()
2158 m->reln = *l; in parse()
2159 ++l; in parse()
2160 if (*l == '=') { in parse()
2162 ++l; in parse()
2166 m->reln = *l; in parse()
2167 ++l; in parse()
2171 if (*l == 'x' && ((isascii(CAST(unsigned char, l[1])) && in parse()
2172 isspace(CAST(unsigned char, l[1]))) || !l[1])) { in parse()
2173 m->reln = *l; in parse()
2174 ++l; in parse()
2181 if (m->reln != 'x' && getvalue(ms, m, &l, action)) in parse()
2194 if (l[0] == '\b') { in parse()
2195 ++l; in parse()
2197 } else if ((l[0] == '\\') && (l[1] == 'b')) { in parse()
2198 ++l; in parse()
2199 ++l; in parse()
2202 for (i = 0; (m->desc[i++] = *l++) != '\0' && i < sizeof(m->desc); ) in parse()
2235 const char *l = line; in parse_strength() local
2252 switch (*l) { in parse_strength()
2258 m->factor_op = *l++; in parse_strength()
2261 file_magwarn(ms, "Unknown factor op `%c'", *l); in parse_strength()
2265 factor = strtoul(l, &el, 0); in parse_strength()
2271 file_magwarn(ms, "Bad factor `%s'", l); in parse_strength()
2298 const char *l = line; in parse_extra() local
2305 "`%.*s', new type `%s'", name, CAST(int, len), buf, l); in parse_extra()
2316 for (i = 0; *l && i < llen && i < len && goodchar(*l, extra); in parse_extra()
2317 buf[i++] = *l++) in parse_extra()
2320 if (i == len && *l) { in parse_extra()
2327 if (!isspace(CAST(unsigned char, *l)) && !goodchar(*l, extra)) in parse_extra()
2329 name, line, *l); in parse_extra()
2916 size_t l = file_pstring_length_size(ms, m); in getstr() local
2917 if (l == FILE_BADSIZE) in getstr()
2919 m->vallen += CAST(unsigned char, l); in getstr()
3007 const char *l = *p; in eatsize() local
3009 if (LOWCASE(*l) == 'u') in eatsize()
3010 l++; in eatsize()
3012 switch (LOWCASE(*l)) { in eatsize()
3018 l++; in eatsize()
3024 *p = l; in eatsize()
3435 size_t l = file_pstring_length_size(ms, m); local
3436 if (l == FILE_BADSIZE)
3437 return l;
3438 len -= l;