17 static int _innum(
int **,
int,
int,
int,
int (*
getc) (
int,
int),
18 int (*ungetc) (
int,
int),
int,
int,
int *);
19 static int _instr(
register char *,
int,
int,
int (*
getc) (
int,
int),
20 int (*ungetc) (
int,
int),
int,
int,
int *);
24 0, 0, 0, 0, 0, 0, 0, 0,
25 0,
SPC,
SPC, 0, 0, 0, 0, 0,
26 0, 0, 0, 0, 0, 0, 0, 0,
27 0, 0, 0, 0, 0, 0, 0, 0,
28 SPC, 0, 0, 0, 0, 0, 0, 0,
29 0, 0, 0, 0, 0, 0, 0, 0,
30 0, 0, 0, 0, 0, 0, 0, 0,
31 0, 0, 0, 0, 0, 0, 0, 0,
41 int (*
getch)(
int,
int),
49 int **ptr, fileended, size;
60 if ((ch = *fmt++) ==
'%')
77 len = len * 10 + ch -
'0';
115 return (nmatch ? nmatch : -1);
124 arg2)) ==
' ' || ch1 ==
'\t' || ch1 ==
'\n')
129 (*ungetch) (arg1, arg2);
135 ch1 = (*getch) (arg1, arg2);
142 (*ungetch) (arg1, arg2);
158 int (*
getch)(
int,
int),
165 extern double atof(
char *p);
168 register char c, base;
169 int negflg, c1, ndigit;
172 if (type ==
'c' || type ==
's' || type ==
'[')
175 (ptr ? *(
char **)ptr : (
char *)
NULL, type, len,
getch,
185 else if (type ==
'x')
191 while ((c = (*
getch) (arg1, arg2)) ==
' ' || c ==
'\t' || c ==
'\n')
198 c = (*getch) (arg1, arg2);
204 c = (*getch) (arg1, arg2);
207 for (; --len >= 0; *np++ = c, c = (*getch) (arg1, arg2))
209 if (((
isdigit(c)) || base == 16)
210 && ((
'a' <= c && c <=
'f') || (
'A' <= c && c <=
'F')))
219 lcval = ((lcval << 2) + lcval) << 1;
226 if (
'0' <= c && c <=
'9')
230 else if (
'a' <= c && c <=
'f')
253 (*ungetch) (arg1, arg2);
260 if (ptr ==
NULL || np == numbuf)
268 **(
short **)ptr = lcval;
272 **(
int **)ptr = lcval;
276 **(
long **)ptr = lcval;
290 int (*
getch)(
int,
int),
297 register unsigned int ch;
303 if (type ==
'c' && len == 30000)
312 while (_sctab[ch = (*
getch) (arg1, arg2)] & ignstp)
324 else if (type ==
'[')
328 while (ch !=
EOF && (_sctab[ch] & ignstp) == 0)
338 ch = (*getch) (arg1, arg2);
344 (*ungetch) (arg1, arg2);
352 if (ptr && ptr != optr)
379 for (c = 0; c < 128; c++)
390 while (((c = *s++) & 0177) !=
']')
static int ungetch(int, int)
#define tolower(c)
アルファベットの大文字を小文字に変換するマクロ
#define isdigit(c)
文字が10進数の数字かどうかをチェックするマクロ
int _doscan(register char *fmt, register int **argp, int(*getch)(int, int), int(*ungetch)(int, int), int arg1, int arg2)
static int _innum(int **, int, int, int, int(*getc)(int, int), int(*ungetc)(int, int), int, int, int *)
#define isupper(c)
文字がアルファベットの大文字かどうかをチェックするマクロ
「文字種類の判定」や「文字変換」を行う関数マクロを提供する。
static int getch(int, int)
static int _instr(register char *, int, int, int(*getc)(int, int), int(*ungetc)(int, int), int, int, int *)
static char * _getccl(char *)