/* @(#)read_next.c 2.1 93/05/18 */ /******************************************************************************/ /* function : read_next.c */ /* */ /* subsystem : chgen */ /* */ /* input : (global access to buffer) */ /* */ /* output : (initializes and fills buffer from schema text file) */ /* */ /* returns : void */ /* */ /* author : Steve Smith / Craig Smith */ /* */ /* created : July, 1991 */ /* */ /* revisions : */ /* */ /* description : This routine will read the next line of text from the */ /* schema input text file. It first flushes the input buffer */ /* to zeros. After the string is read, any non-printable */ /* ascii characters are converted to spaces (newline is the */ /* usual case). */ /* */ /******************************************************************************/ #include #include #include "chgen_define.h" #include "chgen_externs.h" void read_next() { int i ; for (i = 0; i < BUFSIZE; i++) buffer[i] = '\0'; fgets(buffer,BUFSIZE,schtxt_fp); for (i = 0; buffer[i] != '\0'; i++) if (buffer[i] < ' ') buffer[i] = ' '; return; }