1: #if defined(LIBC_SCCS) && !defined(lint) 2: static char sccsid[] = "@(#)scanf.c 5.2 (Berkeley) 3/9/86"; 3: #endif LIBC_SCCS and not lint 4: 5: #include <stdio.h> 6: 7: scanf(fmt, args) 8: char *fmt; 9: { 10: return(_doscan(stdin, fmt, &args)); 11: } 12: 13: fscanf(iop, fmt, args) 14: FILE *iop; 15: char *fmt; 16: { 17: return(_doscan(iop, fmt, &args)); 18: } 19: 20: sscanf(str, fmt, args) 21: register char *str; 22: char *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++; 31: _strbuf._bufsiz = _strbuf._cnt; 32: return(_doscan(&_strbuf, fmt, &args)); 33: }