1: main()
   2: {
   3:     int f, c;
   4: 
   5:     f = creat(".ocopy", 0666);
   6:     while (read(0, &c, 1) == 1) {
   7:         write (1, &c, 1);
   8:         put(c, f);
   9:     }
  10:     fl(f);
  11:     close(f);
  12: }
  13: 
  14: static char ln[512];
  15: char *p = ln;
  16: put(c, f)
  17: {
  18:     *p++ = c;
  19:     if (c == '\n') {
  20:         fl(f);
  21:         p=ln;
  22:     }
  23: }
  24: fl(f)
  25: {
  26:     register char *s;
  27: 
  28:     s = ln;
  29:     while (*s == '$' && *(s+1) == ' ')
  30:         s += 2;
  31:     write(f, s, p-s);
  32: }

Defined functions

fl defined in line 24; used 2 times
main defined in line 1; never used
put defined in line 16; used 1 times
  • in line 8

Defined variables

ln defined in line 14; used 3 times
p defined in line 15; used 3 times
Last modified: 1981-07-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 721
Valid CSS Valid XHTML 1.0 Strict