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

##### Functions

    dumptid           X
    pluck_page        X
    stuff_page        X

##### struct's

    lpage             X

       1: # include   "../ingres.h"
       2: # include   "../access.h"
       3:
       4: dumptid(tid1)
       5: struct tup_id   *tid1;
       6: {
       7:     register struct tup_id  *tid;
       8:     long            pageid;
       9:
      10:     tid = tid1;
      11:
      12:     pluck_page(tid, &pageid);
      13:     printf("tid: %s/%d\n", locv(pageid), (tid->line_id & I1MASK));
      14:     return (0);
      15: }
      16:
      17: /*
      18: **	struct for extracting page number from a tid
      19: **	and storing in a long
      20: */
      21:
      22: struct lpage
      23: {
      24:     char    lpg0, lpgx;
      25:     char    lpg2, lpg1;
      26: };
      27:
      28: /* pluck_page extracts the three byte page_id from the tup_id struct
      29: ** and puts it into a long variable with proper allignment.
      30: */
      31:
      32: pluck_page(tid, var)
      33: struct tup_id   *tid;
      34: long        *var;
      35: {
      36:     register struct tup_id  *t;
      37:     register struct lpage   *v;
      38:
      39:     t = tid;
      40:     v = (struct lpage *) var;
      41:     v->lpg0 = t->pg0;
      42:     v->lpg1 = t->pg1;
      43:     v->lpg2 = t->pg2;
      44:     v->lpgx = 0;
      45:     return (0);
      46: }
      47:
      48: /*	stuff_page is the reverse of pluck_page	*/
      49:
      50: stuff_page(tid, var)
      51: struct tup_id   *tid;
      52: long        *var;
      53: {
      54:     register struct tup_id  *t;
      55:     register struct lpage   *v;
      56:
      57:     v = (struct lpage *) var;
      58:     t = tid;
      59:     t->pg0 = v->lpg0;
      60:     t->pg1 = v->lpg1;
      61:     t->pg2 = v->lpg2;
      62:     return (0);
      63: }

#### Defined functions

dumptid defined in line 4; used 20 times

- in /usr/ingres/source/access/delete.c line 33
- in /usr/ingres/source/access/find.c line 154-156(2)
- in /usr/ingres/source/access/findbest.c line 119
- in /usr/ingres/source/access/get.c line 51-53(2)
- in /usr/ingres/source/access/getequal.c line 53
- in /usr/ingres/source/access/insert.c line 42
- in /usr/ingres/source/access/page.c line 32
- in /usr/ingres/source/access/put_tuple.c line 26
- in /usr/ingres/source/access/replace.c line 63, 185
- in /usr/ingres/source/dbu/ksort.c line 546
- in /usr/ingres/source/dbu/modify.c line 699-701(2), 727
- in /usr/ingres/source/ovqp/strategy.c line 205-207(2)
- in /usr/ingres/source/support/creatdb.c line 484-486(2)

pluck_page defined in line 32; used 7 times

- in line 12
- in /usr/ingres/source/access/add_ovflo.c line 42
- in /usr/ingres/source/access/findbest.c line 155
- in /usr/ingres/source/access/get.c line 63
- in /usr/ingres/source/access/page.c line 36
- in /usr/ingres/source/dbu/ksort.c line 556
- in /usr/ingres/source/dbu/modify.c line 816

stuff_page defined in line 50; used 22 times

- in /usr/ingres/source/access/add_ovflo.c line 101
- in /usr/ingres/source/access/add_prim.c line 41
- in /usr/ingres/source/access/find.c line 98, 106, 141-142(2)
- in /usr/ingres/source/access/findbest.c line 93, 106, 167, 183
- in /usr/ingres/source/access/get.c line 70-74(2)
- in /usr/ingres/source/access/last_page.c line 45
- in /usr/ingres/source/access/ndxsearch.c line 91, 150
- in /usr/ingres/source/access/replace.c line 140
- in /usr/ingres/source/access/scan_dups.c line 32, 45
- in /usr/ingres/source/dbu/ksort.c line 188-191(2)
- in /usr/ingres/source/dbu/modify.c line 664, 842

#### Defined struct's

lpage defined in line 22; used 8 times

- in line 37-40(4), 55-57(4)

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