summaryrefslogtreecommitdiffstats
path: root/debian/htdig/htdig-3.2.0b6/db/qam_method.c
blob: 27f029280338c31413fa485b69154b0393e7b6d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 1999
 *	Sleepycat Software.  All rights reserved.
 */

#include "db_config.h"

#ifndef lint
static const char sccsid[] = "@(#)qam_method.c	11.1 (Sleepycat) 8/19/99";
#endif /* not lint */

#ifndef NO_SYSTEM_INCLUDES
#include <sys/types.h>
#endif

#include "db_int.h"
#include "db_page.h"
#include "qam.h"

/*
 * CDB___qam_db_create --
 *	Queue specific initialization of the DB structure.
 *
 * PUBLIC: int CDB___qam_db_create __P((DB *));
 */
int
CDB___qam_db_create(dbp)
	DB *dbp;
{
	QUEUE *t;
	int ret;

	/* Allocate and initialize the private queue structure. */
	if ((ret = CDB___os_calloc(1, sizeof(QUEUE), &t)) != 0)
		return (ret);
	dbp->q_internal = t;

	t->re_pad = ' ';

	return (0);
}

/*
 * CDB___qam_db_close --
 *	Queue specific discard of the DB structure.
 *
 * PUBLIC: int CDB___qam_db_close __P((DB *));
 */
int
CDB___qam_db_close(dbp)
	DB *dbp;
{
	QUEUE *t;

	t = dbp->q_internal;

	CDB___os_free(t, sizeof(QUEUE));
	dbp->q_internal = NULL;

	return (0);
}