1: # include   <ingres.h>
   2: # include   <access.h>
   3: # include   <sccs.h>
   4: 
   5: SCCSID(@(#)tup_len.c	8.1	12/31/84)
   6: 
   7: /*
   8: **	Tup_len finds the amount of space occupied by the
   9: **	tuple specified by "tid"
  10: */
  11: 
  12: tup_len(tid)
  13: TID *tid;
  14: {
  15:     register short  *lp;
  16:     register int    nextoff, off;
  17:     int     lineoff, i;
  18: 
  19: 
  20:     /* point to line number table */
  21:     lp = (short *) Acc_head->linetab;
  22: 
  23:     /* find offset for tid */
  24:     lineoff = lp[-(tid->line_id & I1MASK)];
  25: 
  26:     /* assume next line number follows lineoff */
  27:     nextoff = lp[-Acc_head->nxtlino];
  28: 
  29:     /* look for the line offset following lineoff */
  30:     for (i = 0; i < Acc_head->nxtlino; i++)
  31:     {
  32:         off = *lp--;
  33: 
  34:         if (off <= lineoff)
  35:             continue;
  36: 
  37:         if (off < nextoff)
  38:             nextoff = off;
  39:     }
  40: #	ifdef xATR3
  41:     if (tTf(27, 8))
  42:         printf("tup_len ret %d\n", nextoff - lineoff);
  43: #	endif
  44:     return (nextoff - lineoff);
  45: }

Defined functions

Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 804
Valid CSS Valid XHTML 1.0 Strict