1: #include "defs.h"
   2: 
   3:     int mkfault;
   4:     char    line[LINSIZ];
   5:     int infile;
   6:     char    *lp;
   7:     char    lastc = EOR;
   8:     int eof;
   9: 
  10: /* input routines */
  11: 
  12: eol(c)
  13:     char    c;
  14: {
  15:     return(c==EOR || c==';');
  16: }
  17: 
  18: rdc()
  19: {   REP readchar();
  20:     PER lastc==SP ORF lastc==TB
  21:     DONE
  22:     return(lastc);
  23: }
  24: 
  25: readchar()
  26: {
  27:     IF eof
  28:     THEN    lastc = '\0';
  29:     ELSE    IF lp==0
  30:         THEN    lp=line;
  31:             REP eof = read(infile,lp,1)==0;
  32:                 IF mkfault THEN error((char *)0); FI
  33:             PER eof==0 ANDF *lp++!=EOR DONE
  34:             *lp=0; lp=line;
  35:         FI
  36:         IF lastc = *lp THEN lp++; FI
  37:     FI
  38:     return(lastc);
  39: }
  40: 
  41: nextchar()
  42: {
  43:     IF eol(rdc())
  44:     THEN lp--; return(0);
  45:     ELSE return(lastc);
  46:     FI
  47: }
  48: 
  49: quotchar()
  50: {
  51:     IF readchar()=='\\'
  52:     THEN    return(readchar());
  53:     ELIF lastc=='\''
  54:     THEN    return(0);
  55:     ELSE    return(lastc);
  56:     FI
  57: }
  58: 
  59: getformat(deformat)
  60:     char    *deformat;
  61: {
  62:     register char   *fptr;
  63:     register int    quote;
  64: 
  65:     fptr=deformat; quote=FALSE;
  66:     WHILE (quote ? readchar()!=EOR : !eol(readchar()))
  67:     DO  IF (*fptr++ = lastc)=='"'
  68:         THEN quote = ~quote;
  69:         FI
  70:     OD
  71:     lp--;
  72:     IF fptr!=deformat THEN *fptr++ = '\0'; FI
  73: }

Defined functions

eol defined in line 12; used 3 times
getformat defined in line 59; used 1 times
nextchar defined in line 41; used 2 times
quotchar defined in line 49; used 1 times
readchar defined in line 25; used 21 times

Defined variables

eof defined in line 8; used 3 times
infile defined in line 5; used 1 times
  • in line 31
lastc defined in line 7; used 10 times
line defined in line 4; used 2 times
lp defined in line 6; used 10 times
mkfault defined in line 3; used 1 times
  • in line 32
Last modified: 1993-12-31
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2759
Valid CSS Valid XHTML 1.0 Strict