1: /* 2: char id_scann_[] = "@(#)scann_.c 1.1"; 3: * 4: * Fortran-callable formatted input routines 5: * Bruce R. Julian, USGS, March 1980 6: */ 7: #include <stdio.h> 8: #include "ioprim.h" 9: FORTINT doscan(); 10: 11: FORTINT scann_(fmt, args) 12: char *fmt; 13: { 14: return(doscan(stdin, fmt, &args)); 15: } 16: 17: FORTINT fscann_(f, fmt, args) 18: FILEID *f; 19: char *fmt; 20: { 21: FILE *getfile(); 22: 23: return(doscan(getfile(*f), fmt, &args)); 24: } 25: 26: FORTINT sscann_(str, fmt, args) 27: register char *str; 28: char *fmt; 29: { 30: FILE _strbuf; 31: 32: _strbuf._flag = _IOREAD|_IOSTRG; 33: _strbuf._ptr = _strbuf._base = str; 34: _strbuf._cnt = 0; 35: while (*str++) 36: _strbuf._cnt++; 37: return(doscan(&_strbuf, fmt, &args)); 38: }