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

Defined functions

flsh defined in line 36; used 2 times
put defined in line 7; used 3 times

Defined variables

nflush defined in line 5; used 1 times
  • in line 41
obuf defined in line 3; used 3 times
optr defined in line 1; used 10 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1880
Valid CSS Valid XHTML 1.0 Strict