1: # include <stdio.h>
   2: 
   3: /*
   4: **  SYSERR -- SYStem ERRor message print and abort
   5: **
   6: **	Syserr acts like a printf with up to five arguments.
   7: **
   8: **	If the first argument to syserr is not zero,
   9: **	the message "SYSERR:" is prepended.
  10: **
  11: **	If the extern variable `IIproc_name' is assigned to a
  12: **	string, that string is prepended to the message.
  13: **
  14: **	All arguments must be null-terminated.
  15: **
  16: **	The function pointed to by `Exitfn' is then called.
  17: **	It is initialized to be `exit'.
  18: */
  19: 
  20: extern char *IIproc_name;
  21: 
  22: IIsyserr(pv)
  23: char    *pv;
  24: {
  25:     int     pid;
  26:     register char   **p;
  27:     extern int  errno;
  28:     register int    usererr;
  29: 
  30:     p = &pv;
  31:     printf("\n");
  32:     usererr = pv == 0;
  33: 
  34:     if (!usererr)
  35:     {
  36:         if (IIproc_name)
  37:             printf("%s ", IIproc_name);
  38:         printf("SYSERR: ");
  39:     }
  40:     else
  41:         p++;
  42:     printf(p[0], p[1], p[2], p[3], p[4], p[5]);
  43:     printf("\n");
  44:     if (!usererr && errno)
  45:         printf("\tsystem error %d\n", errno);
  46:     fflush(stdout);
  47:     exit (-1);
  48: }
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2063
Valid CSS Valid XHTML 1.0 Strict