Lines Matching refs:l
72 #define EATAB {while (isascii(CAST(unsigned char, *l)) && \
73 isspace(CAST(unsigned char, *l))) ++l;}
74 #define LOWCASE(l) (isupper(CAST(unsigned char, l)) ? \ argument
75 tolower(CAST(unsigned char, l)) : (l))
275 get_type(const struct type_tbl_s *tbl, const char *l, const char **t) in get_type() argument
280 if (strncmp(l, p->name, p->len) == 0) { in get_type()
282 *t = l + p->len; in get_type()
299 get_standard_integer_type(const char *l, const char **t) in get_standard_integer_type() argument
303 if (isalpha(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
304 switch (l[1]) { in get_standard_integer_type()
337 l += 2; in get_standard_integer_type()
338 } else if (isdigit(CAST(unsigned char, l[1]))) { in get_standard_integer_type()
349 if (isdigit(CAST(unsigned char, l[2]))) { in get_standard_integer_type()
353 switch (l[1]) { in get_standard_integer_type()
370 l += 2; in get_standard_integer_type()
376 ++l; in get_standard_integer_type()
379 *t = l; in get_standard_integer_type()
1604 get_cond(const char *l, const char **t) in get_cond() argument
1619 if (strncmp(l, p->name, p->len) == 0 && in get_cond()
1620 isspace(CAST(unsigned char, l[p->len]))) { in get_cond()
1622 *t = l + p->len; in get_cond()
1676 const char *l = *lp; in parse_indirect_modifier() local
1678 while (!isspace(CAST(unsigned char, *++l))) in parse_indirect_modifier()
1679 switch (*l) { in parse_indirect_modifier()
1686 "invalid", *l); in parse_indirect_modifier()
1687 *lp = l; in parse_indirect_modifier()
1690 *lp = l; in parse_indirect_modifier()
1698 const char *l = *lp; in parse_op_modifier() local
1702 ++l; in parse_op_modifier()
1704 val = CAST(uint64_t, strtoull(l, &t, 0)); in parse_op_modifier()
1705 l = t; in parse_op_modifier()
1707 eatsize(&l); in parse_op_modifier()
1708 *lp = l; in parse_op_modifier()
1714 const char *l = *lp; in parse_string_modifier() local
1718 while (!isspace(CAST(unsigned char, *++l))) { in parse_string_modifier()
1719 switch (*l) { in parse_string_modifier()
1727 m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); in parse_string_modifier()
1730 l = t - 1; in parse_string_modifier()
1796 "invalid", *l); in parse_string_modifier()
1800 if (l[1] == '/' && !isspace(CAST(unsigned char, l[2]))) in parse_string_modifier()
1801 l++; in parse_string_modifier()
1805 *lp = l; in parse_string_modifier()
1808 *lp = l; in parse_string_modifier()
1824 const char *l = line; in parse() local
1835 while (*l == '>') { in parse()
1836 ++l; /* step over */ in parse()
1891 if (*l == '&') { /* m->cont_level == 0 checked below. */ in parse()
1892 ++l; /* step over */ in parse()
1895 if (*l == '(') { in parse()
1896 ++l; /* step over */ in parse()
1901 if (*l == '&') { /* m->cont_level == 0 checked below */ in parse()
1902 ++l; /* step over */ in parse()
1914 if (*l == '-') { in parse()
1915 ++l; /* step over */ in parse()
1918 m->offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
1919 if (l == t) { in parse()
1921 file_magwarn(ms, "offset `%s' invalid", l); in parse()
1925 l = t; in parse()
1934 if (*l == '.' || *l == ',') { in parse()
1935 if (*l == ',') in parse()
1937 l++; in parse()
1938 switch (*l) { in parse()
1988 *l); in parse()
1991 l++; in parse()
1994 if (*l == '~') { in parse()
1996 l++; in parse()
1998 if ((op = get_op(*l)) != -1) { in parse()
2000 l++; in parse()
2002 if (*l == '(') { in parse()
2004 l++; in parse()
2006 if (isdigit(CAST(unsigned char, *l)) || *l == '-') { in parse()
2007 m->in_offset = CAST(int32_t, strtol(l, &t, 0)); in parse()
2008 if (l == t) { in parse()
2011 "in_offset `%s' invalid", l); in parse()
2014 l = t; in parse()
2016 if (*l++ != ')' || in parse()
2017 ((m->in_op & FILE_OPINDIRECT) && *l++ != ')')) { in parse()
2027 m->cond = get_cond(l, &l); in parse()
2037 if (*l == 'u') { in parse()
2043 m->type = get_type(type_tbl, l + 1, &l); in parse()
2049 m->type = get_standard_integer_type(l, &l); in parse()
2061 m->type = get_type(type_tbl, l, &l); in parse()
2068 if (*l == 'd') in parse()
2069 m->type = get_standard_integer_type(l, &l); in parse()
2070 else if (*l == 's' in parse()
2071 && !isalpha(CAST(unsigned char, l[1]))) { in parse()
2073 ++l; in parse()
2080 m->type = get_type(special_tbl, l, &l); in parse()
2085 file_magwarn(ms, "type `%s' invalid", l); in parse()
2093 if (*l == '~') { in parse()
2098 ++l; in parse()
2102 if ((op = get_op(*l)) != -1) { in parse()
2115 r = parse_indirect_modifier(ms, m, &l); in parse()
2117 r = parse_string_modifier(ms, m, &l); in parse()
2121 parse_op_modifier(ms, m, &l, op); in parse()
2130 switch (*l) { in parse()
2133 m->reln = *l; in parse()
2134 ++l; in parse()
2135 if (*l == '=') { in parse()
2141 ++l; in parse()
2148 m->reln = *l; in parse()
2149 ++l; in parse()
2150 if (*l == '=') { in parse()
2152 ++l; in parse()
2156 m->reln = *l; in parse()
2157 ++l; in parse()
2161 if (*l == 'x' && ((isascii(CAST(unsigned char, l[1])) && in parse()
2162 isspace(CAST(unsigned char, l[1]))) || !l[1])) { in parse()
2163 m->reln = *l; in parse()
2164 ++l; in parse()
2171 if (m->reln != 'x' && getvalue(ms, m, &l, action)) in parse()
2184 if (l[0] == '\b') { in parse()
2185 ++l; in parse()
2187 } else if ((l[0] == '\\') && (l[1] == 'b')) { in parse()
2188 ++l; in parse()
2189 ++l; in parse()
2192 for (i = 0; (m->desc[i++] = *l++) != '\0' && i < sizeof(m->desc); ) in parse()
2225 const char *l = line; in parse_strength() local
2242 switch (*l) { in parse_strength()
2248 m->factor_op = *l++; in parse_strength()
2251 file_magwarn(ms, "Unknown factor op `%c'", *l); in parse_strength()
2255 factor = strtoul(l, &el, 0); in parse_strength()
2261 file_magwarn(ms, "Bad factor `%s'", l); in parse_strength()
2288 const char *l = line; in parse_extra() local
2295 "`%.*s', new type `%s'", name, CAST(int, len), buf, l); in parse_extra()
2306 for (i = 0; *l && i < llen && i < len && goodchar(*l, extra); in parse_extra()
2307 buf[i++] = *l++) in parse_extra()
2310 if (i == len && *l) { in parse_extra()
2317 if (!isspace(CAST(unsigned char, *l)) && !goodchar(*l, extra)) in parse_extra()
2319 name, line, *l); in parse_extra()
2906 size_t l = file_pstring_length_size(ms, m); in getstr() local
2907 if (l == FILE_BADSIZE) in getstr()
2909 m->vallen += CAST(unsigned char, l); in getstr()
2997 const char *l = *p; in eatsize() local
2999 if (LOWCASE(*l) == 'u') in eatsize()
3000 l++; in eatsize()
3002 switch (LOWCASE(*l)) { in eatsize()
3008 l++; in eatsize()
3014 *p = l; in eatsize()
3425 size_t l = file_pstring_length_size(ms, m); local
3426 if (l == FILE_BADSIZE)
3427 return l;
3428 len -= l;