1: # include <ingres.h>
2: # include <access.h>
3: # include <sccs.h>
4:
5: SCCSID(@(#)utility.c 8.2 12/8/85)
6:
7: dumptid(tid)
8: register TID *tid;
9: {
10: long pageid;
11:
12: pluck_page(tid, &pageid);
13: printf("tid: %ld/%d\n", 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: ** We want the line number (lpgx) to be in the low-order part of
22: ** a long. Since SUN's and VAXes have the order of the
23: ** words reversed, this structure must be different.
24: */
25:
26: struct lpage
27: {
28: # ifdef VAX
29: char lpg2, lpg1, lpg0, lpgx;
30: # else
31: char lpgx, lpg0, lpg1, lpg2;
32: # endif
33: };
34: /* PLUCK_PAGE
35: **
36: ** pluck_page extracts the three byte page_id from a TID
37: ** and puts it into a long variable with proper allignment.
38: */
39:
40: pluck_page(t, var)
41: register TID *t;
42: long *var;
43: {
44: register struct lpage *v;
45:
46: v = (struct lpage *) var;
47: v->lpg0 = t->pg0;
48: v->lpg1 = t->pg1;
49: v->lpg2 = t->pg2;
50: v->lpgx = 0;
51: return (0);
52: }
53:
54: /* stuff_page is the reverse of pluck_page */
55: stuff_page(t, var)
56: register TID *t;
57: long *var;
58: {
59: register struct lpage *v;
60:
61: v = (struct lpage *) var;
62: t->pg0 = v->lpg0;
63: t->pg1 = v->lpg1;
64: t->pg2 = v->lpg2;
65: return (0);
66: }
Defined functions
dumptid
defined in line
5; used 29 times
stuff_page
defined in line
55; used 34 times
- in /usr/ingres/source/iutil/add_ovflo.c line
128
- in /usr/ingres/source/iutil/add_prim.c line
45
- in /usr/ingres/source/iutil/bndxsearch.c line
95
- in /usr/ingres/source/iutil/btree_util.c line
344
- in /usr/ingres/source/iutil/btreerange.c line
86-87(2)
- in /usr/ingres/source/iutil/delete_btree.c line
212-213(2)
- in /usr/ingres/source/iutil/find.c line
103,
111,
164-165(2)
- in /usr/ingres/source/iutil/findbest.c line
96,
109,
169,
185
- in /usr/ingres/source/iutil/get.c line
72-76(2)
- in /usr/ingres/source/iutil/getequal.c line
73-77(2)
- in /usr/ingres/source/iutil/insert_btree.c line
98,
179-180(2),
202,
261,
273-274(2),
304
- in /usr/ingres/source/iutil/last_page.c line
46
- in /usr/ingres/source/iutil/ndxsearch.c line
81,
144
- in /usr/ingres/source/iutil/replace.c line
235
- in /usr/ingres/source/iutil/scan_dups.c line
32,
45
Defined struct's
lpage
defined in line
26; used 8 times