1: # include "ciodec.c"
   2: char cputc(ch, fn)
   3: {
   4: struct fileps *fp;
   5: if (nargs() != 2)
   6:   IEHzap("cputc  ");
   7: if (fn<0 || fn>20) return(ch);
   8: fp = &IEH3fpts[fn];
   9: if (fp->wrflag == 1)
  10:     IEH3err("cputc: %d not open",fn);
  11: if (fp->wrflag == 0)
  12:     IEH3mbuf(fn,1);
  13: *(fp->bptr++) = ch;
  14: if (++(fp->nchars) < fp->bsize)
  15:     return(ch);
  16: if (fp->wrflag == 3) /* append, seek to end */
  17:     {
  18:     seek(fn, 0, 2);
  19:     fp->wrflag = 2; /* now just write from here on */
  20:     }
  21: if ( write(fn, fp->bptr=fp->buff, fp->nchars) < 0)
  22:     {
  23:     if (fp->eoferr == 0)
  24:         IEH3err("cputc: writing %d",fn);
  25:     fp->eoferr = 3;
  26:     }
  27: fp->nchars = 0;
  28: return (ch);
  29: }
  30: cout 1;

Defined functions

Defined variables

cout defined in line 30; never used
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 715
Valid CSS Valid XHTML 1.0 Strict