make rresvport always quiet, rcmd do perror on failure;
[unix-history] / usr / src / lib / libc / stdio / scanf.c
CommitLineData
b8f253e8
KM
1#ifndef lint
2static char sccsid[] = "@(#)scanf.c 5.1 (Berkeley) %G%";
3#endif not lint
4
2a129daa
BJ
5#include <stdio.h>
6
7scanf(fmt, args)
8char *fmt;
9{
10 return(_doscan(stdin, fmt, &args));
11}
12
13fscanf(iop, fmt, args)
14FILE *iop;
15char *fmt;
16{
17 return(_doscan(iop, fmt, &args));
18}
19
20sscanf(str, fmt, args)
21register char *str;
22char *fmt;
23{
24 FILE _strbuf;
25
26 _strbuf._flag = _IOREAD|_IOSTRG;
27 _strbuf._ptr = _strbuf._base = str;
28 _strbuf._cnt = 0;
29 while (*str++)
30 _strbuf._cnt++;
f4c06a32 31 _strbuf._bufsiz = _strbuf._cnt;
2a129daa
BJ
32 return(_doscan(&_strbuf, fmt, &args));
33}