1: /* 2: char id_printn_[] = "@(#)printn_.c 1.1"; 3: * 4: * Fortran-callable formatted output routines 5: * Bruce R. Julian, USGS, March 1980 6: */ 7: #include <stdio.h> 8: #include "ioprim.h" 9: 10: printn_(fmt, args) 11: char *fmt; 12: { 13: doprnt(fmt, &args, stdout); 14: } 15: 16: fprntn_(f, fmt, args) 17: FILEID *f; 18: char *fmt; 19: { 20: FILE *getfile(); 21: 22: doprnt(fmt, &args, getfile(*f)); 23: } 24: 25: char *sprntn_(str, ls, fmt, args) 26: char *str, *fmt; 27: STRLARG ls; 28: { 29: FILE _strbuf; 30: char *end; 31: 32: _strbuf._flag = _IOWRT+_IOSTRG; 33: _strbuf._ptr = str; 34: _strbuf._cnt = (int)ls; 35: doprnt(fmt, &args, &_strbuf); 36: end = str + ls; 37: while (_strbuf._ptr < end) 38: putc(' ', &_strbuf); 39: }