1: # include   <ingres.h>
   2: # include   <symbol.h>
   3: # include   "IIglobals.h"
   4: # include   <sccs.h>
   5: 
   6: SCCSID(@(#)IIretrieve.c	8.1	12/31/84)
   7: 
   8: 
   9: /*
  10: **	IIretrieve is called once for each element
  11: **	in the target list of a retrieve.
  12: **
  13: **	The purpose is to set up the IIretsym structure
  14: **	for IIgettup.
  15: */
  16: 
  17: IIretrieve(addr, type)
  18: char    *addr;
  19: int type;
  20: 
  21: {
  22:     register struct retsym  *sym;
  23:     register int        t, l;
  24: 
  25:     sym = &IIretsym[IIndomains++];
  26:     switch (type)
  27:     {
  28: 
  29:       case opSHORT:
  30:         t = INT;
  31:         l = 2;
  32:         break;
  33: 
  34:       case opLONG:
  35:         t = INT;
  36:         l = 4;
  37:         break;
  38: 
  39:       case opFLOAT:
  40:         t = FLOAT;
  41:         l = 4;
  42:         break;
  43: 
  44:       case opDOUBLE:
  45:         t = FLOAT;
  46:         l = 8;
  47:         break;
  48: 
  49:       case opSTRING:
  50:         t = CHAR;
  51:         l = 255;    /* with the current implementation the length is not known */
  52:         break;
  53: 
  54:       default:
  55:         IIsyserr("retrieve:bad type %d", type);
  56:     }
  57:     sym->type = t;
  58:     sym->len = l;
  59:     sym->addr = addr;
  60: #	ifdef xETR1
  61:     if (IIdebug)
  62:         printf("domain %d type %d len %d\n", IIndomains, t, l);
  63: #	endif
  64: }

Defined functions

IIretrieve defined in line 6; used 1 times
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 875
Valid CSS Valid XHTML 1.0 Strict