1: #
   2: # include   "../../ingres.h"
   3: # include   "../../symbol.h"
   4: # include   "../../pipes.h"
   5: # include   "IIglobals.h"
   6: 
   7: /*
   8: **  IIn_get -- Routine to check if there is a next
   9: **	tuple coming up the data pipe in a retrieve.
  10: **	Loads IIr_sym with the length and type of
  11: **	the next domain.
  12: **
  13: **	Returns:
  14: **		0 -- on error or end of tuple
  15: **		1 -- otherwise
  16: **
  17: */
  18: 
  19: 
  20: IIn_get(file_name, line_no)
  21: char        *file_name;
  22: int     line_no;
  23: {
  24:     register struct retsym  *ret;
  25: 
  26:     if (IIproc_name = file_name)
  27:         IIline_no = line_no;
  28: 
  29: #	ifdef xATR1
  30:     if (IIdebug)
  31:     {
  32:         printf("%s ent ", IIproc_name ? IIproc_name : "");
  33:         printf("IIn_get : IIdomains %d IIr_sym type, len %d %d IIerrflag %d\n",
  34:         IIdomains, IIr_sym.type, IIr_sym.len, IIerrflag);
  35:     }
  36: #	endif
  37: 
  38: 
  39:     IIdomains = 0;
  40:     /* in case of overflow error, a tuple has been skipped */
  41:     if (IIerrflag == 1001)
  42:         IIerrflag = 0;
  43:     if (IIerrflag)
  44:         return (0);
  45: 
  46:     ret = &IIr_sym;
  47:     if (ret->type && ret->type != EOTUP)
  48:         IIsyserr("bad type in IIn_get : %d", ret->type);
  49: 
  50:     /* read next type, length pair */
  51:     if (IIrdpipe(P_NORM, &IIeinpipe, IIr_front, ret, 2) != 2)
  52:         IIsyserr("IIrdpipe error in IIn_get");
  53: 
  54:     if (ret->type == EXIT)
  55:         return (0);
  56: 
  57:     return (1);
  58: }
  59: 
  60: /*
  61: **  IIerrtest -- Test if an error occurred within a retrieve.
  62: **
  63: **	Returns:
  64: **		1 -- if so
  65: **		0 -- if not
  66: **
  67: **	Called By:
  68: **		USER -- used to skip over C_CODE in a retrieve {}
  69: **			when an error ocurred in getting the tuple.
  70: **			A call to this routine is generated by equel,
  71: **			because IIerrflag should not nedd to be vi-
  72: **			sible from inside a users program.
  73: **
  74: */
  75: 
  76: IIerrtest()
  77: {
  78:     return (IIerrflag ? 1 : 0);
  79: }

Defined functions

IIerrtest defined in line 76; never used
IIn_get defined in line 20; never used
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2145
Valid CSS Valid XHTML 1.0 Strict