Lines Matching refs:ch
91 #define iswhite(ch) (ch == ' ' || ch == '\t') argument
137 register int ch; in get_token() local
142 while ((ch = next_char()) == '\n' || (isascii(ch) && iswhite(ch))); in get_token()
144 if (ch == EOF) in get_token()
147 if (ch == '.') { in get_token()
150 while ((ch = next_char()) == ' ' || ch == '\t'); in get_token()
153 if (! isascii(ch) || ! isalnum(ch)) { in get_token()
154 warning("Illegal character - '%c'", ch); in get_token()
159 if (ch != '\n') *(ptr++) = ch; in get_token()
162 while ((ch = next_char()) != ',' && ch != '\n' && ch != EOF) in get_token()
163 *(ptr++) = ch; in get_token()
165 if (ch == EOF) in get_token()
167 else if (ch == '\n') { in get_token()
176 ch = next_char(); in get_token()
177 while (isascii(ch) && isalnum(ch)) { in get_token()
178 *(ptr++) = ch; in get_token()
179 ch = next_char(); in get_token()
183 switch (ch) { in get_token()
198 if ((ch = next_char()) == ',') in get_token()
201 if ((ch = next_char()) == '0') { in get_token()
202 if ((ch = next_char()) == 'x' || ch == 'X') { in get_token()
203 while (isascii(ch = next_char()) && in get_token()
204 isxdigit(ch)) { in get_token()
206 if (isdigit(ch)) in get_token()
207 number += ch - '0'; in get_token()
208 else if (ch >= 'a' && ch <= 'f') in get_token()
209 number += 10 + ch - 'a'; in get_token()
211 number += 10 + ch - 'A'; in get_token()
215 while ((ch = next_char()) >= '0' && in get_token()
216 ch <= '7') in get_token()
217 number = number * 8 + ch - '0'; in get_token()
221 while (isascii(ch = next_char()) && in get_token()
222 isdigit(ch)) in get_token()
223 number = number * 10 + ch - '0'; in get_token()
225 if (ch != ',') in get_token()
233 ch = trans_string(ptr); in get_token()
234 if (ch != NULL && ch != ',') in get_token()
236 if (ch == NULL) in get_token()
244 warning("Illegal character - '%c'", ch); in get_token()
401 register int ch; in trans_string() local
403 while ((ch = next_char()) != ',' && ch != EOF && !first_column) { in trans_string()
404 if (ch == '^') { in trans_string()
405 ch = next_char(); in trans_string()
406 if (ch == EOF) in trans_string()
409 if (!isascii(ch) || ! isprint(ch)) { in trans_string()
410 warning("Illegal ^ character - '%c'", ch); in trans_string()
413 if (ch == '@') in trans_string()
416 *(ptr++) = ch & 037; in trans_string()
417 } else if (ch == '\\') { in trans_string()
418 ch = next_char(); in trans_string()
419 if (ch == EOF) in trans_string()
422 if (ch >= '0' && ch <= '7') { in trans_string()
423 number = ch - '0'; in trans_string()
425 ch = next_char(); in trans_string()
426 if (ch == EOF) in trans_string()
429 if (ch < '0' || ch > '7') { in trans_string()
434 number = number * 8 + ch - '0'; in trans_string()
441 switch (ch) { in trans_string()
468 ch); in trans_string()
469 *(ptr++) = ch; in trans_string()
474 if (ch != '\n') *(ptr++) = ch; in trans_string()
483 if (ch == EOF) in trans_string()
490 ch = ','; in trans_string()
497 return (ch); in trans_string()
504 panic_mode(int ch) in panic_mode() argument
510 if (c == ch) in panic_mode()