1: #include <sys/file.h>
   2: #include "config.h"
   3: #include "sh.h"
   4: 
   5: char *efilname = "/etc/tcsh6.00strgs" ;
   6: 
   7: void
   8: mkprintf(a1,a2,a3,a4)
   9:     int a1;
  10:     int a2, a3, a4;
  11: {
  12:     char buf[256];
  13:     int efil = -1;
  14: 
  15:     /* better not assume same file descriptor each time
  16: 	static int efil = -1;
  17: 	if (efil < 0) {
  18: 	    efil = open(efilname, O_RDONLY);
  19: 	    if (efil < 0) {
  20: 		    perror(efilname);
  21: 		    exit(2);
  22: 	    }
  23: 	}
  24: 	*/
  25:     efil = open(efilname, O_RDONLY);
  26:     if (efil < 0) {
  27:         perror(efilname);
  28:         exit(2);
  29:     }
  30:     if (lseek(efil, (long)a1,0) == -1) {
  31:         printf("lseek of mkstr file failed\n");
  32:             perror(efilname);
  33:             exit(2);
  34:     }
  35:     if (read(efil, buf, 256) <= 0) {
  36:         printf("read of mkstr file failed\n");
  37:             perror(efilname);
  38:             exit(2);
  39:     }
  40:     close(efil);
  41:     xprintf(buf, a2, a3, a4);
  42: }

Defined functions

mkprintf defined in line 7; never used

Defined variables

efilname defined in line 5; used 4 times
Last modified: 1991-08-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2119
Valid CSS Valid XHTML 1.0 Strict