1: /*
   2:  *	opr -- off line print dispatcher
   3:  *		chooses spooling routine appropriate
   4:  *		to destination
   5:  *
   6:  *	last entry in table isdefault
   7:  */
   8: 
   9: char *code[] {
  10:     "-lp",  "/lib/lpr", /* line printer */
  11:     0
  12: };
  13: 
  14: main(argc, argv)
  15: char **argv;
  16: {
  17:     int i, j;
  18: 
  19:     argv[argc] = 0;
  20:     for(i=0; code[i]; i=+2)
  21:     if(argc > 1)
  22:         for(j=0; code[i][j]==argv[1][j]; j++)
  23:             if(code[i][j] == 0)
  24:                     execv(code[i+1], &argv[1]);
  25:     execv(code[i-1], argv);
  26:     write(2, "can't start daemon\n", 19);
  27: }

Defined functions

main defined in line 14; never used

Defined variables

code defined in line 9; used 5 times
Last modified: 1975-05-14
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 491
Valid CSS Valid XHTML 1.0 Strict