# 2.11BSD#431 - /usr/ingres/source/access/newlino.c

##### Functions

    newlino           X

       1: # include   "../ingres.h"
       2: # include   "../access.h"
       3:
       4: /*
       5: ** newlino finds a free line number which it returns and adjusts
       6: **	the next line counter (Nxtlino) by the length of the tuple (len).
       7: **	This routine is used to recover unused sections of the
       8: **	line number table (Acc_head->linetab).
       9: */
      10:
      11: newlino(len)
      12: int len;
      13: {
      14:     register int    *lp, newlno, nextlno;
      15:
      16:     nextlno = Acc_head->nxtlino;
      17:     lp = &Acc_head->linetab[0];
      18:     for (newlno = 0; newlno < nextlno; newlno++)
      19:     {
      20:         if (*lp == 0)
      21:         {
      22:             /* found a free line number */
      23:             *lp = Acc_head->linetab[-nextlno];
      24:             Acc_head->linetab[-nextlno] += len;
      25:             return (newlno);
      26:         }
      27:         lp--;
      28:     }
      29:
      30:     /* no free line numbers. use nxtlino */
      31:     Acc_head->linetab[-(nextlno + 1)] = *lp + len;
      32:     Acc_head->nxtlino++;
      33:     return (nextlno);
      34: }

#### Defined functions

newlino defined in line 11; used 2 times

- in /usr/ingres/source/access/findbest.c line 113
- in /usr/ingres/source/dbu/modify.c line 762

Last modified: 1995-02-04 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 399 |