#include #include #include "mkpin.h" #define NLINE 1000 #define NARG 200 char line[NLINE]; char *fname; char *largv[NARG]; int largc; int nline; extern int errors; int rline(void) { int i, c, prcntflg, whtflg; static int semiflg; if(!semiflg) nline++; loop: prcntflg = semiflg = 0; whtflg = 1; largv[largc = 0] = 0; for(i=0; i= NARG) { fprintf(stderr,"NARG too small"); exit(1); } } whtflg = 0; if(c == '%') prcntflg++; } } fprintf(stderr,"NLINE (%d) too small\n", NLINE); for(;;) { c = fgetc(fi); if(c == EOF) return(1); if(c == '\n') goto loop; } } void parse(void) { int i; char *cp; largv[largc] = 0; for(i = 0; i < largc; i++) { cp = largv[i]; if(*cp == '%') return; for( ; ;cp++) { if((*cp == ' ') || (*cp==0)) { *cp = 0; break; } } } } void diag(void) { fprintf(stderr,"file: %s: line %d: ", fname, nline); ++errors; }