1: #include <stdio.h>
   2: #
   3: #include "def.h"
   4: #include "4.def.h"
   5: extern int linechars;
   6: extern int rdfree(), comfree(), labfree(), contfree();
   7: extern int rdstand(), comstand(), labstand(), contstand();
   8: extern int (*rline[])();
   9: extern int (*comment[])();
  10: extern int (*getlabel[])();
  11: extern int (*chkcont[])();
  12: null(c)
  13: char c;
  14:     {return;}
  15: 
  16: 
  17: 
  18: comprint()
  19:     {
  20:     int c, blank, first,count;
  21:     blank = 1;
  22:     first = 1;
  23:     count = 0;
  24:     while ((c = (*comment[inputform])(0) ) || blankline() )
  25:         {
  26:         ++count;
  27:         if (c)
  28:             {
  29:             (*comment[inputform])(1);       /* move head past comment signifier */
  30:             blank = blankline();
  31:             /* if (first && !blank)
  32: 				OUTSTR("#\n");*/
  33:             prline("#");
  34:             first = 0;
  35:             }
  36:         else
  37:             (*rline[inputform])(null);
  38:         }
  39:     /* if (!blank)
  40: 		OUTSTR("#\n"); */
  41:     return(count);
  42:     }
  43: 
  44: 
  45: 
  46: prcode(linecount,tab)
  47: int linecount, tab;
  48:     {
  49:     int someout;
  50:     someout = FALSE;
  51:     while (linecount)
  52:         {
  53:         if ( (*comment[inputform])(0) )
  54:             {
  55:             linecount -= comprint();
  56:             someout = TRUE;
  57:             continue;
  58:             }
  59:         else if (blankline() )
  60:             (*rline[inputform])(null);
  61:         else if ((*chkcont[inputform])() )
  62:             {
  63:             TABOVER(tab);
  64:             prline("&");
  65:             someout  = TRUE;
  66:             }
  67:         else
  68:             {if (someout) TABOVER(tab);
  69:             (*getlabel[inputform])(null);
  70:             prline("");
  71:             someout=TRUE;
  72:             }
  73:         --linecount;
  74:         }
  75:     }
  76: 
  77: 
  78: charout(c)
  79: char c;
  80:     {
  81:     putc(c,outfd);
  82:     }
  83: 
  84: 
  85: 
  86: prline(str)
  87: char *str;
  88:     {
  89:     fprintf(outfd,"%s",str);
  90:     (*rline[inputform]) (charout);
  91:     putc('\n',outfd);
  92:     }
  93: 
  94: 
  95: input2()
  96:     {
  97:     static int c;
  98:     c = inchar();
  99:     if (c == '\n')
 100:         linechars = 0;
 101:     else
 102:         ++linechars;
 103:     return(c);
 104:     }
 105: 
 106: 
 107: unput2(c)
 108: int c;
 109:     {
 110:     unchar(c);
 111:     --linechars;
 112:     return(c);
 113:     }

Defined functions

charout defined in line 78; used 1 times
  • in line 90
comprint defined in line 18; used 2 times
input2 defined in line 95; used 2 times
null defined in line 12; used 3 times
prcode defined in line 46; used 1 times
prline defined in line 86; used 3 times
unput2 defined in line 107; used 2 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 772
Valid CSS Valid XHTML 1.0 Strict