Remove definition of builtin function
[platform/upstream/db4.git] / btree / btree_autop.c
1 /* Do not edit: automatically built by gen_rec.awk. */
2
3 #include "db_config.h"
4
5 #include "db_int.h"
6 #include "dbinc/crypto.h"
7 #include "dbinc/db_page.h"
8 #include "dbinc/db_am.h"
9 #include "dbinc/btree.h"
10 #include "dbinc/log.h"
11 #include "dbinc/txn.h"
12
13 /*
14  * PUBLIC: int __bam_split_print __P((ENV *, DBT *, DB_LSN *,
15  * PUBLIC:     db_recops, void *));
16  */
17 int
18 __bam_split_print(env, dbtp, lsnp, notused2, notused3)
19         ENV *env;
20         DBT *dbtp;
21         DB_LSN *lsnp;
22         db_recops notused2;
23         void *notused3;
24 {
25         __bam_split_args *argp;
26         u_int32_t i;
27         int ch;
28         int ret;
29
30         notused2 = DB_TXN_PRINT;
31         notused3 = NULL;
32
33         if ((ret =
34             __bam_split_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
35                 return (ret);
36         (void)printf(
37     "[%lu][%lu]__bam_split%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
38             (u_long)lsnp->file, (u_long)lsnp->offset,
39             (argp->type & DB_debug_FLAG) ? "_debug" : "",
40             (u_long)argp->type,
41             (u_long)argp->txnp->txnid,
42             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
43         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
44         (void)printf("\tleft: %lu\n", (u_long)argp->left);
45         (void)printf("\tllsn: [%lu][%lu]\n",
46             (u_long)argp->llsn.file, (u_long)argp->llsn.offset);
47         (void)printf("\tright: %lu\n", (u_long)argp->right);
48         (void)printf("\trlsn: [%lu][%lu]\n",
49             (u_long)argp->rlsn.file, (u_long)argp->rlsn.offset);
50         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
51         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
52         (void)printf("\tnlsn: [%lu][%lu]\n",
53             (u_long)argp->nlsn.file, (u_long)argp->nlsn.offset);
54         (void)printf("\tppgno: %lu\n", (u_long)argp->ppgno);
55         (void)printf("\tplsn: [%lu][%lu]\n",
56             (u_long)argp->plsn.file, (u_long)argp->plsn.offset);
57         (void)printf("\tpindx: %lu\n", (u_long)argp->pindx);
58         (void)printf("\tpg: ");
59         for (i = 0; i < argp->pg.size; i++) {
60                 ch = ((u_int8_t *)argp->pg.data)[i];
61                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
62         }
63         (void)printf("\n");
64         (void)printf("\tpentry: ");
65         for (i = 0; i < argp->pentry.size; i++) {
66                 ch = ((u_int8_t *)argp->pentry.data)[i];
67                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
68         }
69         (void)printf("\n");
70         (void)printf("\trentry: ");
71         for (i = 0; i < argp->rentry.size; i++) {
72                 ch = ((u_int8_t *)argp->rentry.data)[i];
73                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
74         }
75         (void)printf("\n");
76         (void)printf("\topflags: %lu\n", (u_long)argp->opflags);
77         (void)printf("\n");
78         __os_free(env, argp);
79         return (0);
80 }
81
82 /*
83  * PUBLIC: int __bam_split_42_print __P((ENV *, DBT *, DB_LSN *,
84  * PUBLIC:     db_recops, void *));
85  */
86 int
87 __bam_split_42_print(env, dbtp, lsnp, notused2, notused3)
88         ENV *env;
89         DBT *dbtp;
90         DB_LSN *lsnp;
91         db_recops notused2;
92         void *notused3;
93 {
94         __bam_split_42_args *argp;
95         u_int32_t i;
96         int ch;
97         int ret;
98
99         notused2 = DB_TXN_PRINT;
100         notused3 = NULL;
101
102         if ((ret =
103             __bam_split_42_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
104                 return (ret);
105         (void)printf(
106     "[%lu][%lu]__bam_split_42%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
107             (u_long)lsnp->file, (u_long)lsnp->offset,
108             (argp->type & DB_debug_FLAG) ? "_debug" : "",
109             (u_long)argp->type,
110             (u_long)argp->txnp->txnid,
111             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
112         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
113         (void)printf("\tleft: %lu\n", (u_long)argp->left);
114         (void)printf("\tllsn: [%lu][%lu]\n",
115             (u_long)argp->llsn.file, (u_long)argp->llsn.offset);
116         (void)printf("\tright: %lu\n", (u_long)argp->right);
117         (void)printf("\trlsn: [%lu][%lu]\n",
118             (u_long)argp->rlsn.file, (u_long)argp->rlsn.offset);
119         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
120         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
121         (void)printf("\tnlsn: [%lu][%lu]\n",
122             (u_long)argp->nlsn.file, (u_long)argp->nlsn.offset);
123         (void)printf("\troot_pgno: %lu\n", (u_long)argp->root_pgno);
124         (void)printf("\tpg: ");
125         for (i = 0; i < argp->pg.size; i++) {
126                 ch = ((u_int8_t *)argp->pg.data)[i];
127                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
128         }
129         (void)printf("\n");
130         (void)printf("\topflags: %lu\n", (u_long)argp->opflags);
131         (void)printf("\n");
132         __os_free(env, argp);
133         return (0);
134 }
135
136 /*
137  * PUBLIC: int __bam_rsplit_print __P((ENV *, DBT *, DB_LSN *,
138  * PUBLIC:     db_recops, void *));
139  */
140 int
141 __bam_rsplit_print(env, dbtp, lsnp, notused2, notused3)
142         ENV *env;
143         DBT *dbtp;
144         DB_LSN *lsnp;
145         db_recops notused2;
146         void *notused3;
147 {
148         __bam_rsplit_args *argp;
149         u_int32_t i;
150         int ch;
151         int ret;
152
153         notused2 = DB_TXN_PRINT;
154         notused3 = NULL;
155
156         if ((ret =
157             __bam_rsplit_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
158                 return (ret);
159         (void)printf(
160     "[%lu][%lu]__bam_rsplit%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
161             (u_long)lsnp->file, (u_long)lsnp->offset,
162             (argp->type & DB_debug_FLAG) ? "_debug" : "",
163             (u_long)argp->type,
164             (u_long)argp->txnp->txnid,
165             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
166         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
167         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
168         (void)printf("\tpgdbt: ");
169         for (i = 0; i < argp->pgdbt.size; i++) {
170                 ch = ((u_int8_t *)argp->pgdbt.data)[i];
171                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
172         }
173         (void)printf("\n");
174         (void)printf("\troot_pgno: %lu\n", (u_long)argp->root_pgno);
175         (void)printf("\tnrec: %lu\n", (u_long)argp->nrec);
176         (void)printf("\trootent: ");
177         for (i = 0; i < argp->rootent.size; i++) {
178                 ch = ((u_int8_t *)argp->rootent.data)[i];
179                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
180         }
181         (void)printf("\n");
182         (void)printf("\trootlsn: [%lu][%lu]\n",
183             (u_long)argp->rootlsn.file, (u_long)argp->rootlsn.offset);
184         (void)printf("\n");
185         __os_free(env, argp);
186         return (0);
187 }
188
189 /*
190  * PUBLIC: int __bam_adj_print __P((ENV *, DBT *, DB_LSN *,
191  * PUBLIC:     db_recops, void *));
192  */
193 int
194 __bam_adj_print(env, dbtp, lsnp, notused2, notused3)
195         ENV *env;
196         DBT *dbtp;
197         DB_LSN *lsnp;
198         db_recops notused2;
199         void *notused3;
200 {
201         __bam_adj_args *argp;
202         int ret;
203
204         notused2 = DB_TXN_PRINT;
205         notused3 = NULL;
206
207         if ((ret =
208             __bam_adj_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
209                 return (ret);
210         (void)printf(
211     "[%lu][%lu]__bam_adj%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
212             (u_long)lsnp->file, (u_long)lsnp->offset,
213             (argp->type & DB_debug_FLAG) ? "_debug" : "",
214             (u_long)argp->type,
215             (u_long)argp->txnp->txnid,
216             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
217         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
218         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
219         (void)printf("\tlsn: [%lu][%lu]\n",
220             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
221         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
222         (void)printf("\tindx_copy: %lu\n", (u_long)argp->indx_copy);
223         (void)printf("\tis_insert: %lu\n", (u_long)argp->is_insert);
224         (void)printf("\n");
225         __os_free(env, argp);
226         return (0);
227 }
228
229 /*
230  * PUBLIC: int __bam_cadjust_print __P((ENV *, DBT *, DB_LSN *,
231  * PUBLIC:     db_recops, void *));
232  */
233 int
234 __bam_cadjust_print(env, dbtp, lsnp, notused2, notused3)
235         ENV *env;
236         DBT *dbtp;
237         DB_LSN *lsnp;
238         db_recops notused2;
239         void *notused3;
240 {
241         __bam_cadjust_args *argp;
242         int ret;
243
244         notused2 = DB_TXN_PRINT;
245         notused3 = NULL;
246
247         if ((ret =
248             __bam_cadjust_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
249                 return (ret);
250         (void)printf(
251     "[%lu][%lu]__bam_cadjust%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
252             (u_long)lsnp->file, (u_long)lsnp->offset,
253             (argp->type & DB_debug_FLAG) ? "_debug" : "",
254             (u_long)argp->type,
255             (u_long)argp->txnp->txnid,
256             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
257         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
258         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
259         (void)printf("\tlsn: [%lu][%lu]\n",
260             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
261         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
262         (void)printf("\tadjust: %ld\n", (long)argp->adjust);
263         (void)printf("\topflags: %lu\n", (u_long)argp->opflags);
264         (void)printf("\n");
265         __os_free(env, argp);
266         return (0);
267 }
268
269 /*
270  * PUBLIC: int __bam_cdel_print __P((ENV *, DBT *, DB_LSN *,
271  * PUBLIC:     db_recops, void *));
272  */
273 int
274 __bam_cdel_print(env, dbtp, lsnp, notused2, notused3)
275         ENV *env;
276         DBT *dbtp;
277         DB_LSN *lsnp;
278         db_recops notused2;
279         void *notused3;
280 {
281         __bam_cdel_args *argp;
282         int ret;
283
284         notused2 = DB_TXN_PRINT;
285         notused3 = NULL;
286
287         if ((ret =
288             __bam_cdel_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
289                 return (ret);
290         (void)printf(
291     "[%lu][%lu]__bam_cdel%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
292             (u_long)lsnp->file, (u_long)lsnp->offset,
293             (argp->type & DB_debug_FLAG) ? "_debug" : "",
294             (u_long)argp->type,
295             (u_long)argp->txnp->txnid,
296             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
297         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
298         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
299         (void)printf("\tlsn: [%lu][%lu]\n",
300             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
301         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
302         (void)printf("\n");
303         __os_free(env, argp);
304         return (0);
305 }
306
307 /*
308  * PUBLIC: int __bam_repl_print __P((ENV *, DBT *, DB_LSN *,
309  * PUBLIC:     db_recops, void *));
310  */
311 int
312 __bam_repl_print(env, dbtp, lsnp, notused2, notused3)
313         ENV *env;
314         DBT *dbtp;
315         DB_LSN *lsnp;
316         db_recops notused2;
317         void *notused3;
318 {
319         __bam_repl_args *argp;
320         u_int32_t i;
321         int ch;
322         int ret;
323
324         notused2 = DB_TXN_PRINT;
325         notused3 = NULL;
326
327         if ((ret =
328             __bam_repl_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
329                 return (ret);
330         (void)printf(
331     "[%lu][%lu]__bam_repl%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
332             (u_long)lsnp->file, (u_long)lsnp->offset,
333             (argp->type & DB_debug_FLAG) ? "_debug" : "",
334             (u_long)argp->type,
335             (u_long)argp->txnp->txnid,
336             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
337         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
338         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
339         (void)printf("\tlsn: [%lu][%lu]\n",
340             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
341         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
342         (void)printf("\tisdeleted: %lu\n", (u_long)argp->isdeleted);
343         (void)printf("\torig: ");
344         for (i = 0; i < argp->orig.size; i++) {
345                 ch = ((u_int8_t *)argp->orig.data)[i];
346                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
347         }
348         (void)printf("\n");
349         (void)printf("\trepl: ");
350         for (i = 0; i < argp->repl.size; i++) {
351                 ch = ((u_int8_t *)argp->repl.data)[i];
352                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
353         }
354         (void)printf("\n");
355         (void)printf("\tprefix: %lu\n", (u_long)argp->prefix);
356         (void)printf("\tsuffix: %lu\n", (u_long)argp->suffix);
357         (void)printf("\n");
358         __os_free(env, argp);
359         return (0);
360 }
361
362 /*
363  * PUBLIC: int __bam_root_print __P((ENV *, DBT *, DB_LSN *,
364  * PUBLIC:     db_recops, void *));
365  */
366 int
367 __bam_root_print(env, dbtp, lsnp, notused2, notused3)
368         ENV *env;
369         DBT *dbtp;
370         DB_LSN *lsnp;
371         db_recops notused2;
372         void *notused3;
373 {
374         __bam_root_args *argp;
375         int ret;
376
377         notused2 = DB_TXN_PRINT;
378         notused3 = NULL;
379
380         if ((ret =
381             __bam_root_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
382                 return (ret);
383         (void)printf(
384     "[%lu][%lu]__bam_root%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
385             (u_long)lsnp->file, (u_long)lsnp->offset,
386             (argp->type & DB_debug_FLAG) ? "_debug" : "",
387             (u_long)argp->type,
388             (u_long)argp->txnp->txnid,
389             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
390         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
391         (void)printf("\tmeta_pgno: %lu\n", (u_long)argp->meta_pgno);
392         (void)printf("\troot_pgno: %lu\n", (u_long)argp->root_pgno);
393         (void)printf("\tmeta_lsn: [%lu][%lu]\n",
394             (u_long)argp->meta_lsn.file, (u_long)argp->meta_lsn.offset);
395         (void)printf("\n");
396         __os_free(env, argp);
397         return (0);
398 }
399
400 /*
401  * PUBLIC: int __bam_curadj_print __P((ENV *, DBT *, DB_LSN *,
402  * PUBLIC:     db_recops, void *));
403  */
404 int
405 __bam_curadj_print(env, dbtp, lsnp, notused2, notused3)
406         ENV *env;
407         DBT *dbtp;
408         DB_LSN *lsnp;
409         db_recops notused2;
410         void *notused3;
411 {
412         __bam_curadj_args *argp;
413         int ret;
414
415         notused2 = DB_TXN_PRINT;
416         notused3 = NULL;
417
418         if ((ret =
419             __bam_curadj_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
420                 return (ret);
421         (void)printf(
422     "[%lu][%lu]__bam_curadj%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
423             (u_long)lsnp->file, (u_long)lsnp->offset,
424             (argp->type & DB_debug_FLAG) ? "_debug" : "",
425             (u_long)argp->type,
426             (u_long)argp->txnp->txnid,
427             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
428         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
429         (void)printf("\tmode: %ld\n", (long)argp->mode);
430         (void)printf("\tfrom_pgno: %lu\n", (u_long)argp->from_pgno);
431         (void)printf("\tto_pgno: %lu\n", (u_long)argp->to_pgno);
432         (void)printf("\tleft_pgno: %lu\n", (u_long)argp->left_pgno);
433         (void)printf("\tfirst_indx: %lu\n", (u_long)argp->first_indx);
434         (void)printf("\tfrom_indx: %lu\n", (u_long)argp->from_indx);
435         (void)printf("\tto_indx: %lu\n", (u_long)argp->to_indx);
436         (void)printf("\n");
437         __os_free(env, argp);
438         return (0);
439 }
440
441 /*
442  * PUBLIC: int __bam_rcuradj_print __P((ENV *, DBT *, DB_LSN *,
443  * PUBLIC:     db_recops, void *));
444  */
445 int
446 __bam_rcuradj_print(env, dbtp, lsnp, notused2, notused3)
447         ENV *env;
448         DBT *dbtp;
449         DB_LSN *lsnp;
450         db_recops notused2;
451         void *notused3;
452 {
453         __bam_rcuradj_args *argp;
454         int ret;
455
456         notused2 = DB_TXN_PRINT;
457         notused3 = NULL;
458
459         if ((ret =
460             __bam_rcuradj_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
461                 return (ret);
462         (void)printf(
463     "[%lu][%lu]__bam_rcuradj%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
464             (u_long)lsnp->file, (u_long)lsnp->offset,
465             (argp->type & DB_debug_FLAG) ? "_debug" : "",
466             (u_long)argp->type,
467             (u_long)argp->txnp->txnid,
468             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
469         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
470         (void)printf("\tmode: %ld\n", (long)argp->mode);
471         (void)printf("\troot: %ld\n", (long)argp->root);
472         (void)printf("\trecno: %ld\n", (long)argp->recno);
473         (void)printf("\torder: %lu\n", (u_long)argp->order);
474         (void)printf("\n");
475         __os_free(env, argp);
476         return (0);
477 }
478
479 /*
480  * PUBLIC: int __bam_relink_43_print __P((ENV *, DBT *, DB_LSN *,
481  * PUBLIC:     db_recops, void *));
482  */
483 int
484 __bam_relink_43_print(env, dbtp, lsnp, notused2, notused3)
485         ENV *env;
486         DBT *dbtp;
487         DB_LSN *lsnp;
488         db_recops notused2;
489         void *notused3;
490 {
491         __bam_relink_43_args *argp;
492         int ret;
493
494         notused2 = DB_TXN_PRINT;
495         notused3 = NULL;
496
497         if ((ret =
498             __bam_relink_43_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
499                 return (ret);
500         (void)printf(
501     "[%lu][%lu]__bam_relink_43%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
502             (u_long)lsnp->file, (u_long)lsnp->offset,
503             (argp->type & DB_debug_FLAG) ? "_debug" : "",
504             (u_long)argp->type,
505             (u_long)argp->txnp->txnid,
506             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
507         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
508         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
509         (void)printf("\tlsn: [%lu][%lu]\n",
510             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
511         (void)printf("\tprev: %lu\n", (u_long)argp->prev);
512         (void)printf("\tlsn_prev: [%lu][%lu]\n",
513             (u_long)argp->lsn_prev.file, (u_long)argp->lsn_prev.offset);
514         (void)printf("\tnext: %lu\n", (u_long)argp->next);
515         (void)printf("\tlsn_next: [%lu][%lu]\n",
516             (u_long)argp->lsn_next.file, (u_long)argp->lsn_next.offset);
517         (void)printf("\n");
518         __os_free(env, argp);
519         return (0);
520 }
521
522 /*
523  * PUBLIC: int __bam_relink_print __P((ENV *, DBT *, DB_LSN *,
524  * PUBLIC:     db_recops, void *));
525  */
526 int
527 __bam_relink_print(env, dbtp, lsnp, notused2, notused3)
528         ENV *env;
529         DBT *dbtp;
530         DB_LSN *lsnp;
531         db_recops notused2;
532         void *notused3;
533 {
534         __bam_relink_args *argp;
535         int ret;
536
537         notused2 = DB_TXN_PRINT;
538         notused3 = NULL;
539
540         if ((ret =
541             __bam_relink_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
542                 return (ret);
543         (void)printf(
544     "[%lu][%lu]__bam_relink%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
545             (u_long)lsnp->file, (u_long)lsnp->offset,
546             (argp->type & DB_debug_FLAG) ? "_debug" : "",
547             (u_long)argp->type,
548             (u_long)argp->txnp->txnid,
549             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
550         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
551         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
552         (void)printf("\tnew_pgno: %lu\n", (u_long)argp->new_pgno);
553         (void)printf("\tprev: %lu\n", (u_long)argp->prev);
554         (void)printf("\tlsn_prev: [%lu][%lu]\n",
555             (u_long)argp->lsn_prev.file, (u_long)argp->lsn_prev.offset);
556         (void)printf("\tnext: %lu\n", (u_long)argp->next);
557         (void)printf("\tlsn_next: [%lu][%lu]\n",
558             (u_long)argp->lsn_next.file, (u_long)argp->lsn_next.offset);
559         (void)printf("\n");
560         __os_free(env, argp);
561         return (0);
562 }
563
564 /*
565  * PUBLIC: int __bam_merge_44_print __P((ENV *, DBT *, DB_LSN *,
566  * PUBLIC:     db_recops, void *));
567  */
568 int
569 __bam_merge_44_print(env, dbtp, lsnp, notused2, notused3)
570         ENV *env;
571         DBT *dbtp;
572         DB_LSN *lsnp;
573         db_recops notused2;
574         void *notused3;
575 {
576         __bam_merge_44_args *argp;
577         u_int32_t i;
578         int ch;
579         int ret;
580
581         notused2 = DB_TXN_PRINT;
582         notused3 = NULL;
583
584         if ((ret =
585             __bam_merge_44_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
586                 return (ret);
587         (void)printf(
588     "[%lu][%lu]__bam_merge_44%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
589             (u_long)lsnp->file, (u_long)lsnp->offset,
590             (argp->type & DB_debug_FLAG) ? "_debug" : "",
591             (u_long)argp->type,
592             (u_long)argp->txnp->txnid,
593             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
594         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
595         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
596         (void)printf("\tlsn: [%lu][%lu]\n",
597             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
598         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
599         (void)printf("\tnlsn: [%lu][%lu]\n",
600             (u_long)argp->nlsn.file, (u_long)argp->nlsn.offset);
601         (void)printf("\thdr: ");
602         for (i = 0; i < argp->hdr.size; i++) {
603                 ch = ((u_int8_t *)argp->hdr.data)[i];
604                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
605         }
606         (void)printf("\n");
607         (void)printf("\tdata: ");
608         for (i = 0; i < argp->data.size; i++) {
609                 ch = ((u_int8_t *)argp->data.data)[i];
610                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
611         }
612         (void)printf("\n");
613         (void)printf("\tind: ");
614         for (i = 0; i < argp->ind.size; i++) {
615                 ch = ((u_int8_t *)argp->ind.data)[i];
616                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
617         }
618         (void)printf("\n");
619         (void)printf("\n");
620         __os_free(env, argp);
621         return (0);
622 }
623
624 /*
625  * PUBLIC: int __bam_merge_print __P((ENV *, DBT *, DB_LSN *,
626  * PUBLIC:     db_recops, void *));
627  */
628 int
629 __bam_merge_print(env, dbtp, lsnp, notused2, notused3)
630         ENV *env;
631         DBT *dbtp;
632         DB_LSN *lsnp;
633         db_recops notused2;
634         void *notused3;
635 {
636         __bam_merge_args *argp;
637         u_int32_t i;
638         int ch;
639         int ret;
640
641         notused2 = DB_TXN_PRINT;
642         notused3 = NULL;
643
644         if ((ret =
645             __bam_merge_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
646                 return (ret);
647         (void)printf(
648     "[%lu][%lu]__bam_merge%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
649             (u_long)lsnp->file, (u_long)lsnp->offset,
650             (argp->type & DB_debug_FLAG) ? "_debug" : "",
651             (u_long)argp->type,
652             (u_long)argp->txnp->txnid,
653             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
654         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
655         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
656         (void)printf("\tlsn: [%lu][%lu]\n",
657             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
658         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
659         (void)printf("\tnlsn: [%lu][%lu]\n",
660             (u_long)argp->nlsn.file, (u_long)argp->nlsn.offset);
661         (void)printf("\thdr: ");
662         for (i = 0; i < argp->hdr.size; i++) {
663                 ch = ((u_int8_t *)argp->hdr.data)[i];
664                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
665         }
666         (void)printf("\n");
667         (void)printf("\tdata: ");
668         for (i = 0; i < argp->data.size; i++) {
669                 ch = ((u_int8_t *)argp->data.data)[i];
670                 printf(isprint(ch) || ch == 0x0a ? "%c" : "%#x ", ch);
671         }
672         (void)printf("\n");
673         (void)printf("\tpg_copy: %lu\n", (u_long)argp->pg_copy);
674         (void)printf("\n");
675         __os_free(env, argp);
676         return (0);
677 }
678
679 /*
680  * PUBLIC: int __bam_pgno_print __P((ENV *, DBT *, DB_LSN *,
681  * PUBLIC:     db_recops, void *));
682  */
683 int
684 __bam_pgno_print(env, dbtp, lsnp, notused2, notused3)
685         ENV *env;
686         DBT *dbtp;
687         DB_LSN *lsnp;
688         db_recops notused2;
689         void *notused3;
690 {
691         __bam_pgno_args *argp;
692         int ret;
693
694         notused2 = DB_TXN_PRINT;
695         notused3 = NULL;
696
697         if ((ret =
698             __bam_pgno_read(env, NULL, NULL, dbtp->data, &argp)) != 0)
699                 return (ret);
700         (void)printf(
701     "[%lu][%lu]__bam_pgno%s: rec: %lu txnp %lx prevlsn [%lu][%lu]\n",
702             (u_long)lsnp->file, (u_long)lsnp->offset,
703             (argp->type & DB_debug_FLAG) ? "_debug" : "",
704             (u_long)argp->type,
705             (u_long)argp->txnp->txnid,
706             (u_long)argp->prev_lsn.file, (u_long)argp->prev_lsn.offset);
707         (void)printf("\tfileid: %ld\n", (long)argp->fileid);
708         (void)printf("\tpgno: %lu\n", (u_long)argp->pgno);
709         (void)printf("\tlsn: [%lu][%lu]\n",
710             (u_long)argp->lsn.file, (u_long)argp->lsn.offset);
711         (void)printf("\tindx: %lu\n", (u_long)argp->indx);
712         (void)printf("\topgno: %lu\n", (u_long)argp->opgno);
713         (void)printf("\tnpgno: %lu\n", (u_long)argp->npgno);
714         (void)printf("\n");
715         __os_free(env, argp);
716         return (0);
717 }
718
719 /*
720  * PUBLIC: int __bam_init_print __P((ENV *, DB_DISTAB *));
721  */
722 int
723 __bam_init_print(env, dtabp)
724         ENV *env;
725         DB_DISTAB *dtabp;
726 {
727         int ret;
728
729         if ((ret = __db_add_recovery_int(env, dtabp,
730             __bam_split_print, DB___bam_split)) != 0)
731                 return (ret);
732         if ((ret = __db_add_recovery_int(env, dtabp,
733             __bam_rsplit_print, DB___bam_rsplit)) != 0)
734                 return (ret);
735         if ((ret = __db_add_recovery_int(env, dtabp,
736             __bam_adj_print, DB___bam_adj)) != 0)
737                 return (ret);
738         if ((ret = __db_add_recovery_int(env, dtabp,
739             __bam_cadjust_print, DB___bam_cadjust)) != 0)
740                 return (ret);
741         if ((ret = __db_add_recovery_int(env, dtabp,
742             __bam_cdel_print, DB___bam_cdel)) != 0)
743                 return (ret);
744         if ((ret = __db_add_recovery_int(env, dtabp,
745             __bam_repl_print, DB___bam_repl)) != 0)
746                 return (ret);
747         if ((ret = __db_add_recovery_int(env, dtabp,
748             __bam_root_print, DB___bam_root)) != 0)
749                 return (ret);
750         if ((ret = __db_add_recovery_int(env, dtabp,
751             __bam_curadj_print, DB___bam_curadj)) != 0)
752                 return (ret);
753         if ((ret = __db_add_recovery_int(env, dtabp,
754             __bam_rcuradj_print, DB___bam_rcuradj)) != 0)
755                 return (ret);
756         if ((ret = __db_add_recovery_int(env, dtabp,
757             __bam_relink_print, DB___bam_relink)) != 0)
758                 return (ret);
759         if ((ret = __db_add_recovery_int(env, dtabp,
760             __bam_merge_print, DB___bam_merge)) != 0)
761                 return (ret);
762         if ((ret = __db_add_recovery_int(env, dtabp,
763             __bam_pgno_print, DB___bam_pgno)) != 0)
764                 return (ret);
765         return (0);
766 }