1: # include "ciodec.c"
   2: IEH3bsz 512;
   3: IEH3mbuf (fn, type)
   4: int fn, type;
   5: {
   6: struct fileps *fp;
   7: extern char *IEH3olbf[], *alloc();
   8: extern int IEHfbak[10];
   9: int bx[19], size, bloc;
  10: fp = &IEH3fpts[fn];
  11: fp->eoferr = fp->nchars = 0;
  12: fp->wrflag = type+1;
  13: /* decide whether to buffer or not */
  14: if (ttyn(fn) != 'x')
  15:     size = 1;
  16: else
  17: if (fstat(fn,bx) > 0 && bx[0] == 40 && type == 0)
  18:     size = 1;
  19: else
  20:     size = IEH3bsz;
  21: for (fp->buff = 0; size >10 && fp->buff == 0; size =/ 4)
  22:         if ((bloc = alloc(size+100)) != -1)
  23:             {
  24:             IEH3olbf[fn] = bloc;
  25:             fp->buff = fp->bptr =bloc + 100;
  26:             fp->bsize = size;
  27:             break;
  28:             }
  29: if (fp->buff == 0)
  30:     {
  31:     fp->buff = fp->bptr = &IEHfbak[fn];
  32:     fp->bsize = size>1 ? 2 : 1;
  33:     }
  34: }
  35: struct fileps IEH3fpts [10];
  36: int IEHfbak[10];

Defined functions

Defined variables

IEH3fpts defined in line 35; used 4 times
IEHfbak defined in line 36; used 2 times
  • in line 8, 31
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 642
Valid CSS Valid XHTML 1.0 Strict