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