1: static char *sccsid = "@(#)call.c	4.1 (Berkeley) 10/1/80";
   2: char *dn;
   3: 
   4: main(argc, argv)
   5: char *argv[];
   6: {
   7:     register f, n, c;
   8: 
   9: 
  10:     if(argc < 2)
  11:         goto arg;
  12:     dn = "/dev/dn0";
  13:     if(*argv[1] == '-') {
  14:         dn = argv[1]+1;
  15:         argc--;
  16:         argv++;
  17:     }
  18:     if(argc < 2)
  19:         goto arg;
  20:     c = 0;
  21: loop:
  22:     f = open(dn, 1);
  23:     if(f < 0)
  24:         goto slp;
  25:     for(n=0; argv[1][n]; n++)
  26:         ;
  27:     alarm(120);
  28:     if(write(f, argv[1], n) == n)
  29:         exit(0);
  30: 
  31: slp:
  32:     if(f >= 0)
  33:         close(f);
  34:     c++;
  35:     if(c > 100)
  36:         exit(1);
  37:     sleep(10);
  38:     goto loop;
  39: 
  40: arg:
  41:     printf("arg c\n");
  42:     exit(1);
  43: }

Defined functions

main defined in line 4; never used

Defined variables

dn defined in line 2; used 3 times
sccsid defined in line 1; never used
Last modified: 1982-06-09
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1009
Valid CSS Valid XHTML 1.0 Strict