C Programming Problem

Y. Rock Lee rock at cbnews.ATT.COM
Thu Jan 5 04:16:59 AEST 1989


In article <32229 at auc.UUCP> tab at auc.UUCP (0-Terrence Brannon ) writes:
>
>	char	*a;
>	int 	i, q, r, s, t, u, v;
>
>	a = (char *) calloc (80, sizeof(char));
>	fscanf(fp, "%s %d %d %d %d %d %d", a, q, r, s, t, u, v);

>I get a "doscan.c no such file or directory" error from sdb

"doscan.c" is part of the standard C library and can be found in
/usr/src/lib/libc/port/stdio.c.
You can include it in the sdb's source list (see sdb(1)),
but there's no reason to do this. Simply ignore the warning message.

>This snippet of code works when i read character values from the file ... 
>but if doesnt work when trying to read integer values from the file ...

"fscanf(fp, "%s %d %d %d %d %d %d", a, &q, &r, &s, &t, &u, &v);"
 will do it.



More information about the Comp.lang.c mailing list