Annotation of 42BSD/ingres/source/libq/IIretrieve.c, revision 1.1.1.1

1.1       root        1: # include      <ingres.h>
                      2: # include      <symbol.h>
                      3: # include      "IIglobals.h"
                      4: # include      <sccs.h>
                      5: 
                      6: SCCSID(@(#)IIretrieve.c        7.2     10/27/81)
                      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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.