1: int optr;
   2: 
   3: char    obuf[512];
   4: 
   5: int nflush;
   6: 
   7: put(string,n)
   8:     char    *string;
   9: {
  10:     extern  utmp;
  11:     int i;
  12:     char    *o;
  13: 
  14: /*printf("%d %c %d\n",fil,*string,n);/*DEBUG*/
  15: 
  16:     string--;
  17: 
  18:     if((i = optr + n - 512) >= 0) {
  19:         n =- i;
  20:         o = &obuf[optr] -1;
  21:         while(--n >= 0)
  22:             *++o = *++string;
  23:         optr = 512;
  24:         flsh(1);
  25:         n = i;
  26:     }
  27: 
  28:     o = &obuf[optr] - 1;
  29:     optr =+ n;
  30: 
  31:     while(--n >= 0) {
  32:         *++o = *++string;
  33:     }
  34:     return(0);
  35: }
  36: 
  37: flsh(fil)
  38: {
  39:     extern  tp[],utmp;
  40: 
  41:     if(optr <= 0)   return(optr);
  42: 
  43:     nflush++;
  44:     if(write(tp[0],obuf,optr) != optr)
  45:         return(-1);
  46:     optr = 0;
  47:     return(0);
  48: }

Defined functions

flsh defined in line 37; used 2 times
put defined in line 7; used 9 times

Defined variables

nflush defined in line 5; used 1 times
  • in line 43
obuf defined in line 3; used 3 times
optr defined in line 1; used 10 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 687
Valid CSS Valid XHTML 1.0 Strict