1
// Copyright (C) 2000 - 2002 Hewlett-Packard Company
3
// This program is free software; you can redistribute it and/or modify it
4
// under the term of the GNU Lesser General Public License as published by the
5
// Free Software Foundation; either version 2 of the License, or (at your
6
// option) any later version.
8
// This program is distributed in the hope that it will be useful, but WITHOUT
9
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13
// You should have received a copy of the GNU Lesser General Public License
14
// along with this program; if not, write to the Free Software Foundation,
15
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
// @(#) $Revision: 4.17 $ $Source: /judy/src/Judy.h.check.c $
20
// Fake "program" to test the exports in Judy.h by exercising each one. This
21
// program should compile OK (with libJudy.a) but does not run OK.
28
Pvoid_t PArray = (Pvoid_t) NULL;
29
PPvoid_t PPArray = & PArray;
31
PWord_t PIndex = & Index;
39
myint = Judy1Test ( PArray, Index, PJE0);
40
myint = Judy1Set (PPArray, Index, PJE0);
41
myint = Judy1SetArray (PPArray, Index, &Index, PJE0);
42
myint = Judy1Unset (PPArray, Index, PJE0);
43
myword = Judy1Count ( PArray, Index, Index, PJE0);
44
myint = Judy1ByCount ( PArray, Index, PIndex, PJE0);
45
myword = Judy1FreeArray (PPArray, PJE0);
46
myword = Judy1MemUsed ( PArray );
47
myword = Judy1MemActive ( PArray );
48
myint = Judy1First ( PArray, PIndex, PJE0);
49
myint = Judy1Next ( PArray, PIndex, PJE0);
50
myint = Judy1Last ( PArray, PIndex, PJE0);
51
myint = Judy1Prev ( PArray, PIndex, PJE0);
52
myint = Judy1FirstEmpty ( PArray, PIndex, PJE0);
53
myint = Judy1NextEmpty ( PArray, PIndex, PJE0);
54
myint = Judy1LastEmpty ( PArray, PIndex, PJE0);
55
myint = Judy1PrevEmpty ( PArray, PIndex, PJE0);
57
PPvoid = JudyLGet ( PArray, Index, PJE0);
58
PPvoid = JudyLIns (PPArray, Index, PJE0);
59
myint = JudyLInsArray (PPArray, Index, &Index, &Index, PJE0);
60
myint = JudyLDel (PPArray, Index, PJE0);
61
myword = JudyLCount ( PArray, Index, Index, PJE0);
62
PPvoid = JudyLByCount ( PArray, Index, PIndex, PJE0);
63
myword = JudyLFreeArray (PPArray, PJE0);
64
myword = JudyLMemUsed ( PArray );
65
myword = JudyLMemActive ( PArray );
66
PPvoid = JudyLFirst ( PArray, PIndex, PJE0);
67
PPvoid = JudyLNext ( PArray, PIndex, PJE0);
68
PPvoid = JudyLLast ( PArray, PIndex, PJE0);
69
PPvoid = JudyLPrev ( PArray, PIndex, PJE0);
70
myint = JudyLFirstEmpty ( PArray, PIndex, PJE0);
71
myint = JudyLNextEmpty ( PArray, PIndex, PJE0);
72
myint = JudyLLastEmpty ( PArray, PIndex, PJE0);
73
myint = JudyLPrevEmpty ( PArray, PIndex, PJE0);
75
PPvoid = JudySLGet ( PArray, CIndex, PJE0);
76
PPvoid = JudySLIns (PPArray, CIndex, PJE0);
77
myint = JudySLDel (PPArray, CIndex, PJE0);
78
myword = JudySLFreeArray (PPArray, PJE0);
79
PPvoid = JudySLFirst ( PArray, CIndex, PJE0);
80
PPvoid = JudySLNext ( PArray, CIndex, PJE0);
81
PPvoid = JudySLLast ( PArray, CIndex, PJE0);
82
PPvoid = JudySLPrev ( PArray, CIndex, PJE0);
86
J1T (myint, PArray, Index);
87
J1S (myint, PArray, Index);
88
J1SA (myint, PArray, Index, &Index);
89
J1U (myint, PArray, Index);
90
J1F (myint, PArray, Index);
91
J1N (myint, PArray, Index);
92
J1L (myint, PArray, Index);
93
J1P (myint, PArray, Index);
94
J1FE (myint, PArray, Index);
95
J1NE (myint, PArray, Index);
96
J1LE (myint, PArray, Index);
97
J1PE (myint, PArray, Index);
98
J1C (myword, PArray, Index, Index);
99
J1BC (myint, PArray, Index, Index);
100
J1FA (myword, PArray);
102
JLG (PPvoid, PArray, Index);
103
JLI (PPvoid, PArray, Index);
104
JLIA (myint, PArray, Index, &Index, &Index);
105
JLD (myint, PArray, Index);
106
JLF (PPvoid, PArray, Index);
107
JLN (PPvoid, PArray, Index);
108
JLL (PPvoid, PArray, Index);
109
JLP (PPvoid, PArray, Index);
110
JLFE (myint, PArray, Index);
111
JLNE (myint, PArray, Index);
112
JLLE (myint, PArray, Index);
113
JLPE (myint, PArray, Index);
114
JLC (myword, PArray, Index, Index);
115
JLBC (PPvoid, PArray, myword, Index);
116
JLFA (myword, PArray);
118
JSLG (PPvoid, PArray, CIndex);
119
JSLI (PPvoid, PArray, CIndex);
120
JSLD (myint, PArray, CIndex);
121
JSLF (PPvoid, PArray, CIndex);
122
JSLN (PPvoid, PArray, CIndex);
123
JSLL (PPvoid, PArray, CIndex);
124
JSLP (PPvoid, PArray, CIndex);
125
JSLFA (myword, PArray);