1: # include   "../ingres.h"
   2: # include   "../aux.h"
   3: # include   "../pipes.h"
   4: 
   5: /*
   6: **  INGRES ERROR MESSAGE GENERATOR
   7: **
   8: **	Error message `num' is sent up towards process 1 with param-
   9: **	eters `msg'.  This routine may have any number of parameters,
  10: **	but the last one must be zero.
  11: **
  12: **	In process one, the appropriate error file is scanned for the
  13: **	actual message.  The parameters are then substituted into that
  14: **	message.  If the error message doesn't exist, then the first
  15: **	parameter is printed as is.
  16: **
  17: **	History:
  18: **		1/8/79 (eric) -- Removed temporary code to check for
  19: **			old error numbers; removed 'Err_base'.
  20: **		8/17/78 (rse) -- Removed error offset. Doesn't write
  21: **			if W_err is negative, returns error code instead
  22: **			of -1.
  23: **		9/22/78 (rse) -- Added EXEC_ERROR for exec_id.
  24: */
  25: 
  26: error(num, msg)
  27: int num;
  28: char    *msg;
  29: {
  30:     struct pipfrmt      s;
  31:     register struct pipfrmt *ss;
  32:     register char       **x;
  33:     extern int      W_err;
  34: 
  35:     x = &msg;
  36:     ss = &s;
  37:     wrpipe(P_PRIME, ss, EXEC_ERROR, 0, 0);
  38:     ss->err_id = num;
  39: 
  40:     if (W_err >= 0)
  41:     {
  42:         while (*x)
  43:         {
  44:             wrpipe(P_NORM, ss, W_err, *x++, 0);
  45:         }
  46:         wrpipe(P_END, ss, W_err);
  47:     }
  48: 
  49:     return (num);
  50: }
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2183
Valid CSS Valid XHTML 1.0 Strict