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