~ubuntu-branches/ubuntu/precise/judy/precise

« back to all changes in this revision

Viewing changes to src/JudyCommon/JudyPrintJP.c

  • Committer: Bazaar Package Importer
  • Author(s): Theodore Y. Ts'o
  • Date: 2004-01-17 00:04:53 UTC
  • Revision ID: james.westby@ubuntu.com-20040117000453-d5sj6uoon2v1g4gf
Tags: upstream-0.0.4
ImportĀ upstreamĀ versionĀ 0.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2000 - 2002 Hewlett-Packard Company
 
2
//
 
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.
 
7
//
 
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
 
11
// for more details.
 
12
//
 
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
 
16
// _________________
 
17
 
 
18
// @(#) $Revision: 4.13 $ $Source: /judy/src/JudyCommon/JudyPrintJP.c $
 
19
//
 
20
// JudyPrintJP() debugging/tracing function for Judy1 or JudyL code.
 
21
// The caller should #include this file, with its static function (replicated
 
22
// in each compilation unit), in another *.c file, and compile with one of
 
23
// -DJUDY1 or -DJUDYL.
 
24
//
 
25
// The caller can set __JudyIndex and/or __JudyPopulation non-zero to have
 
26
// those values reported, and also to control trace-enabling (see below).
 
27
//
 
28
// Tracing is disabled by default unless one or both of two env parameters is
 
29
// set (regardless of value).  If either value is set but null or evaluates to
 
30
// zero, tracing is immediately enabled.  To disable tracing until a particular
 
31
// __Judy*Index value is seen, set STARTINDEX=<hex-index> in the env.  To
 
32
// disable it until a particular __Judy*Population value is seen, set
 
33
// STARTPOP=<decimal-population> in the env.  Once either condition is met,
 
34
// tracing "latches on".
 
35
//
 
36
// Example:
 
37
//
 
38
//      STARTPOP=0              // immediate tracing.
 
39
//      STARTINDEX=f35430a8     // not until one of these is met.
 
40
//      STARTPOP=1000000
 
41
//
 
42
// Note:  Trace-enabling does nothing unless the caller sets the appropriate
 
43
// global variable non-zero.
 
44
 
 
45
#if (! (JUDY1 || JUDYL))
 
46
    Error:  One of -DJUDY1 or -DJUDYL must be specified.
 
47
#endif
 
48
 
 
49
#include <stdlib.h>             // for getenv() and strtoul().
 
50
 
 
51
 
 
52
// GLOBALS FROM CALLER:
 
53
//
 
54
// Note:  This storage is declared once in each compilation unit that includes
 
55
// this file, but the linker should merge all cases into single locations, but
 
56
// ONLY if these are uninitialized, so ASSUME they are 0 to start.
 
57
 
 
58
Word_t __JudyIndex;             // current Index itself, optional from caller.
 
59
Word_t __JudyPopulation;        // Indexes in array, optional from caller.
 
60
 
 
61
// Other globals:
 
62
 
 
63
static Word_t startindex = 0;           // see usage below.
 
64
static Word_t startpop   = 0;
 
65
static bool_t enabled    = FALSE;       // by default, unless env params set.
 
66
 
 
67
// Shorthand for announcing JP addresses, Desc (in context), and JP types:
 
68
//
 
69
// Note:  Width is at least one blank wider than any JP type name, and the line
 
70
// is left unfinished.
 
71
//
 
72
// Note:  Use a format for address printing compatible with other tracing
 
73
// facilities; in particular, %x not %lx, to truncate the "noisy" high part on
 
74
// 64-bit systems.
 
75
 
 
76
#define JPTYPE(Type)  printf("0x%lx %s %-17s", (Word_t) Pjp, Desc, Type)
 
77
 
 
78
// Shorthands for announcing expanse populations from DcdPop0 fields:
 
79
 
 
80
#define POP0 printf("Pop1 = 0 ")
 
81
#define POP1 printf("Pop1 = %ld ", (Word_t) ((Pjp->jp_DcdPop0 &      0xff) + 1))
 
82
#define POP2 printf("Pop1 = %ld ", (Word_t) ((Pjp->jp_DcdPop0 &    0xffff) + 1))
 
83
#define POP3 printf("Pop1 = %ld ", (Word_t) ((Pjp->jp_DcdPop0 &  0xffffff) + 1))
 
84
#ifdef JU_64BIT
 
85
#define POP4 printf("Pop1 = %ld ", (Word_t) ((Pjp->jp_DcdPop0 &       0xffffffff) + 1))
 
86
#define POP5 printf("Pop1 = %ld ", (Word_t) ((Pjp->jp_DcdPop0 &     0xffffffffff) + 1))
 
87
#define POP6 printf("Pop1 = %ld ", (Word_t) ((Pjp->jp_DcdPop0 &   0xffffffffffff) + 1))
 
88
#define POP7 printf("Pop1 = %ld ", (Word_t) ((Pjp->jp_DcdPop0 & 0xffffffffffffff) + 1))
 
89
#endif
 
90
 
 
91
// Shorthands for announcing populations of Immeds:
 
92
//
 
93
// Note:  Line up the small populations that often occur together, but beyond
 
94
// that, don't worry about it because populations can get arbitrarily large.
 
95
 
 
96
#define POP_1   printf("Pop1 =  1 ")
 
97
#define POP_2   printf("Pop1 =  2 ")
 
98
#define POP_3   printf("Pop1 =  3 ")
 
99
#define POP_4   printf("Pop1 =  4 ")
 
100
#define POP_5   printf("Pop1 =  5 ")
 
101
#define POP_6   printf("Pop1 =  6 ")
 
102
#define POP_7   printf("Pop1 =  7 ")
 
103
#define POP_8   printf("Pop1 =  8 ")
 
104
#define POP_9   printf("Pop1 =  8 ")
 
105
#define POP_10  printf("Pop1 = 10 ")
 
106
#define POP_11  printf("Pop1 = 11 ")
 
107
#define POP_12  printf("Pop1 = 12 ")
 
108
#define POP_13  printf("Pop1 = 13 ")
 
109
#define POP_14  printf("Pop1 = 14 ")
 
110
#define POP_15  printf("Pop1 = 15 ")
 
111
 
 
112
// Shorthands for other announcements:
 
113
 
 
114
#define NUMJPSL printf("NumJPs = %d ", P_JBL(Pjp->jp_Addr)->jbl_NumJPs)
 
115
#define OOPS    printf("-- OOPS, invalid Type\n"); exit(1)
 
116
 
 
117
// This is harder to compute:
 
118
 
 
119
#define NUMJPSB                                                         \
 
120
        {                                                               \
 
121
            Pjbb_t Pjbb = P_JBB(Pjp->jp_Addr);                          \
 
122
            Word_t subexp;                                              \
 
123
            int    numJPs = 0;                                          \
 
124
                                                                        \
 
125
            for (subexp = 0; subexp < cJU_NUMSUBEXPB; ++subexp)         \
 
126
                numJPs += __JudyCountBitsB(JU_JBB_BITMAP(Pjbb, subexp));\
 
127
                                                                        \
 
128
            printf("NumJPs = %d ", numJPs);                             \
 
129
        }
 
130
 
 
131
 
 
132
// ****************************************************************************
 
133
// J U D Y   P R I N T   J P
 
134
//
 
135
// Dump information about a JP, at least its address, type, population, and
 
136
// number of JPs, as appropriate.  Error out upon any unexpected JP type.
 
137
//
 
138
// TBD:  Dump more detailed information about the JP?
 
139
 
 
140
FUNCTION static void JudyPrintJP(
 
141
        Pjp_t  Pjp,             // JP to describe.
 
142
        char * Desc,            // brief description of caller, such as "i".
 
143
        int    Line)            // caller's source line number.
 
144
{
 
145
static  bool_t checked = FALSE; // set upon first entry and check for params.
 
146
        char * value;           // for getenv().
 
147
 
 
148
 
 
149
// CHECK FOR EXTERNAL ENABLING:
 
150
//
 
151
// If a parameter is set, report the value, even if it is null or otherwise
 
152
// evaluates to zero, in which case enable tracing immediately; otherwise wait
 
153
// for the value to be hit.
 
154
 
 
155
#define GETENV(Name,Value,Base) \
 
156
        if ((value = getenv (Name)) != (char *) NULL)           \
 
157
        {                                                       \
 
158
            (Value) = strtoul (value, (char **) NULL, Base);    \
 
159
            enabled |= ((Value) == 0);  /* see above */         \
 
160
                                                                \
 
161
            (void) printf ("JudyPrintJP(\"%s\"): $%s = %lu\n",  \
 
162
                           Desc, Name, Value);                  \
 
163
        }
 
164
 
 
165
        if (! checked)  // only check once.
 
166
        {
 
167
            checked = TRUE;
 
168
 
 
169
            GETENV ("STARTINDEX", startindex, 16);
 
170
            GETENV ("STARTPOP",   startpop,   10);
 
171
 
 
172
            (void) printf ("JudyPrintJP(\"%s\"): Tracing present %s\n", Desc,
 
173
                           enabled ? "and immediately enabled" :
 
174
                           (startindex || startpop) ?
 
175
                           "but disabled until start condition met" :
 
176
                           "but not enabled by env parameter");
 
177
        }
 
178
 
 
179
        if (! enabled)  // check repeatedly until latched enabled:
 
180
        {
 
181
            if (startindex && (startindex == __JudyIndex))
 
182
            {
 
183
                 (void) printf ("=== TRACING ENABLED (\"%s\"), "
 
184
                                "startindex = 0x%lx\n", Desc, startindex);
 
185
                 enabled = TRUE;
 
186
            }
 
187
            else if (startpop && (startpop == __JudyPopulation))
 
188
            {
 
189
                 (void) printf ("=== TRACING ENABLED (\"%s\"), "
 
190
                                "startpop = %lu\n", Desc, startpop);
 
191
                 enabled = TRUE;
 
192
            }
 
193
            else
 
194
            {
 
195
                return;         // print nothing this time.
 
196
            }
 
197
        }
 
198
 
 
199
 
 
200
// SWITCH ON JP TYPE:
 
201
 
 
202
        switch (Pjp->jp_Type)
 
203
        {
 
204
 
 
205
// Note:  The following COULD be merged more tightly between Judy1 and JudyL,
 
206
// but we decided that the output should say cJ1*/cJL*, not cJU*, to be more
 
207
// specific.
 
208
 
 
209
#ifdef JUDY1
 
210
        case cJ1_JPNULL1:       JPTYPE("cJ1_JPNULL1"); POP0;            break;
 
211
        case cJ1_JPNULL2:       JPTYPE("cJ1_JPNULL2"); POP0;            break;
 
212
        case cJ1_JPNULL3:       JPTYPE("cJ1_JPNULL3"); POP0;            break;
 
213
#ifdef JU_64BIT
 
214
        case cJ1_JPNULL4:       JPTYPE("cJ1_JPNULL4"); POP0;            break;
 
215
        case cJ1_JPNULL5:       JPTYPE("cJ1_JPNULL5"); POP0;            break;
 
216
        case cJ1_JPNULL6:       JPTYPE("cJ1_JPNULL6"); POP0;            break;
 
217
        case cJ1_JPNULL7:       JPTYPE("cJ1_JPNULL7"); POP0;            break;
 
218
#endif
 
219
 
 
220
        case cJ1_JPBRANCH_L2:   JPTYPE("cJ1_JPBRANCH_L2"); POP2;NUMJPSL;break;
 
221
        case cJ1_JPBRANCH_L3:   JPTYPE("cJ1_JPBRANCH_L3"); POP3;NUMJPSL;break;
 
222
#ifdef JU_64BIT
 
223
        case cJ1_JPBRANCH_L4:   JPTYPE("cJ1_JPBRANCH_L4"); POP4;NUMJPSL;break;
 
224
        case cJ1_JPBRANCH_L5:   JPTYPE("cJ1_JPBRANCH_L5"); POP5;NUMJPSL;break;
 
225
        case cJ1_JPBRANCH_L6:   JPTYPE("cJ1_JPBRANCH_L6"); POP6;NUMJPSL;break;
 
226
        case cJ1_JPBRANCH_L7:   JPTYPE("cJ1_JPBRANCH_L7"); POP7;NUMJPSL;break;
 
227
#endif
 
228
        case cJ1_JPBRANCH_L:    JPTYPE("cJ1_JPBRANCH_L");       NUMJPSL;break;
 
229
 
 
230
        case cJ1_JPBRANCH_B2:   JPTYPE("cJ1_JPBRANCH_B2"); POP2;NUMJPSB;break;
 
231
        case cJ1_JPBRANCH_B3:   JPTYPE("cJ1_JPBRANCH_B3"); POP3;NUMJPSB;break;
 
232
#ifdef JU_64BIT
 
233
        case cJ1_JPBRANCH_B4:   JPTYPE("cJ1_JPBRANCH_B4"); POP4;NUMJPSB;break;
 
234
        case cJ1_JPBRANCH_B5:   JPTYPE("cJ1_JPBRANCH_B5"); POP5;NUMJPSB;break;
 
235
        case cJ1_JPBRANCH_B6:   JPTYPE("cJ1_JPBRANCH_B6"); POP6;NUMJPSB;break;
 
236
        case cJ1_JPBRANCH_B7:   JPTYPE("cJ1_JPBRANCH_B7"); POP7;NUMJPSB;break;
 
237
#endif
 
238
        case cJ1_JPBRANCH_B:    JPTYPE("cJ1_JPBRANCH_B");       NUMJPSB;break;
 
239
 
 
240
        case cJ1_JPBRANCH_U2:   JPTYPE("cJ1_JPBRANCH_U2"); POP2;        break;
 
241
        case cJ1_JPBRANCH_U3:   JPTYPE("cJ1_JPBRANCH_U3"); POP3;        break;
 
242
#ifdef JU_64BIT
 
243
        case cJ1_JPBRANCH_U4:   JPTYPE("cJ1_JPBRANCH_U4"); POP4;        break;
 
244
        case cJ1_JPBRANCH_U5:   JPTYPE("cJ1_JPBRANCH_U5"); POP5;        break;
 
245
        case cJ1_JPBRANCH_U6:   JPTYPE("cJ1_JPBRANCH_U6"); POP6;        break;
 
246
        case cJ1_JPBRANCH_U7:   JPTYPE("cJ1_JPBRANCH_U7"); POP7;        break;
 
247
#endif
 
248
        case cJ1_JPBRANCH_U:    JPTYPE("cJ1_JPBRANCH_U");               break;
 
249
 
 
250
#ifndef JU_64BIT
 
251
        case cJ1_JPLEAF1:       JPTYPE("cJ1_JPLEAF1"); POP1;            break;
 
252
#endif
 
253
        case cJ1_JPLEAF2:       JPTYPE("cJ1_JPLEAF2"); POP2;            break;
 
254
        case cJ1_JPLEAF3:       JPTYPE("cJ1_JPLEAF3"); POP3;            break;
 
255
#ifdef JU_64BIT
 
256
        case cJ1_JPLEAF4:       JPTYPE("cJ1_JPLEAF4"); POP4;            break;
 
257
        case cJ1_JPLEAF5:       JPTYPE("cJ1_JPLEAF5"); POP5;            break;
 
258
        case cJ1_JPLEAF6:       JPTYPE("cJ1_JPLEAF6"); POP6;            break;
 
259
        case cJ1_JPLEAF7:       JPTYPE("cJ1_JPLEAF7"); POP7;            break;
 
260
#endif
 
261
 
 
262
        case cJ1_JPLEAF_B1:     JPTYPE("cJ1_JPLEAF_B1");    POP1;       break;
 
263
        case cJ1_JPFULLPOPU1:   JPTYPE("cJ1_JPFULLPOPU1");  POP1;       break;
 
264
 
 
265
        case cJ1_JPIMMED_1_01:  JPTYPE("cJ1_JPIMMED_1_01"); POP_1;      break;
 
266
        case cJ1_JPIMMED_2_01:  JPTYPE("cJ1_JPIMMED_2_01"); POP_1;      break;
 
267
        case cJ1_JPIMMED_3_01:  JPTYPE("cJ1_JPIMMED_3_01"); POP_1;      break;
 
268
#ifdef JU_64BIT
 
269
        case cJ1_JPIMMED_4_01:  JPTYPE("cJ1_JPIMMED_4_01"); POP_1;      break;
 
270
        case cJ1_JPIMMED_5_01:  JPTYPE("cJ1_JPIMMED_5_01"); POP_1;      break;
 
271
        case cJ1_JPIMMED_6_01:  JPTYPE("cJ1_JPIMMED_6_01"); POP_1;      break;
 
272
        case cJ1_JPIMMED_7_01:  JPTYPE("cJ1_JPIMMED_7_01"); POP_1;      break;
 
273
#endif
 
274
 
 
275
        case cJ1_JPIMMED_1_02:  JPTYPE("cJ1_JPIMMED_1_02"); POP_2;      break;
 
276
        case cJ1_JPIMMED_1_03:  JPTYPE("cJ1_JPIMMED_1_03"); POP_3;      break;
 
277
        case cJ1_JPIMMED_1_04:  JPTYPE("cJ1_JPIMMED_1_04"); POP_4;      break;
 
278
        case cJ1_JPIMMED_1_05:  JPTYPE("cJ1_JPIMMED_1_05"); POP_5;      break;
 
279
        case cJ1_JPIMMED_1_06:  JPTYPE("cJ1_JPIMMED_1_06"); POP_6;      break;
 
280
        case cJ1_JPIMMED_1_07:  JPTYPE("cJ1_JPIMMED_1_07"); POP_7;      break;
 
281
#ifdef JU_64BIT
 
282
        case cJ1_JPIMMED_1_08:  JPTYPE("cJ1_JPIMMED_1_08"); POP_8;      break;
 
283
        case cJ1_JPIMMED_1_09:  JPTYPE("cJ1_JPIMMED_1_09"); POP_9;      break;
 
284
        case cJ1_JPIMMED_1_10:  JPTYPE("cJ1_JPIMMED_1_10"); POP_10;     break;
 
285
        case cJ1_JPIMMED_1_11:  JPTYPE("cJ1_JPIMMED_1_11"); POP_11;     break;
 
286
        case cJ1_JPIMMED_1_12:  JPTYPE("cJ1_JPIMMED_1_12"); POP_12;     break;
 
287
        case cJ1_JPIMMED_1_13:  JPTYPE("cJ1_JPIMMED_1_13"); POP_13;     break;
 
288
        case cJ1_JPIMMED_1_14:  JPTYPE("cJ1_JPIMMED_1_14"); POP_14;     break;
 
289
        case cJ1_JPIMMED_1_15:  JPTYPE("cJ1_JPIMMED_1_15"); POP_15;     break;
 
290
#endif
 
291
        case cJ1_JPIMMED_2_02:  JPTYPE("cJ1_JPIMMED_2_02"); POP_2;      break;
 
292
        case cJ1_JPIMMED_2_03:  JPTYPE("cJ1_JPIMMED_2_03"); POP_3;      break;
 
293
#ifdef JU_64BIT
 
294
        case cJ1_JPIMMED_2_04:  JPTYPE("cJ1_JPIMMED_2_04"); POP_4;      break;
 
295
        case cJ1_JPIMMED_2_05:  JPTYPE("cJ1_JPIMMED_2_05"); POP_5;      break;
 
296
        case cJ1_JPIMMED_2_06:  JPTYPE("cJ1_JPIMMED_2_06"); POP_6;      break;
 
297
        case cJ1_JPIMMED_2_07:  JPTYPE("cJ1_JPIMMED_2_07"); POP_7;      break;
 
298
#endif
 
299
 
 
300
        case cJ1_JPIMMED_3_02:  JPTYPE("cJ1_JPIMMED_3_02"); POP_2;      break;
 
301
#ifdef JU_64BIT
 
302
        case cJ1_JPIMMED_3_03:  JPTYPE("cJ1_JPIMMED_3_03"); POP_3;      break;
 
303
        case cJ1_JPIMMED_3_04:  JPTYPE("cJ1_JPIMMED_3_04"); POP_4;      break;
 
304
        case cJ1_JPIMMED_3_05:  JPTYPE("cJ1_JPIMMED_3_05"); POP_5;      break;
 
305
        case cJ1_JPIMMED_4_02:  JPTYPE("cJ1_JPIMMED_4_02"); POP_2;      break;
 
306
        case cJ1_JPIMMED_4_03:  JPTYPE("cJ1_JPIMMED_4_03"); POP_3;      break;
 
307
        case cJ1_JPIMMED_5_02:  JPTYPE("cJ1_JPIMMED_5_02"); POP_2;      break;
 
308
        case cJ1_JPIMMED_5_03:  JPTYPE("cJ1_JPIMMED_5_03"); POP_3;      break;
 
309
        case cJ1_JPIMMED_6_02:  JPTYPE("cJ1_JPIMMED_6_02"); POP_2;      break;
 
310
        case cJ1_JPIMMED_7_02:  JPTYPE("cJ1_JPIMMED_7_02"); POP_2;      break;
 
311
#endif
 
312
        case cJ1_JPIMMED_CAP:   JPTYPE("cJ1_JPIMMED_CAP");              OOPS;
 
313
 
 
314
#else // JUDYL ===============================================================
 
315
 
 
316
        case cJL_JPNULL1:       JPTYPE("cJL_JPNULL1"); POP0;            break;
 
317
        case cJL_JPNULL2:       JPTYPE("cJL_JPNULL2"); POP0;            break;
 
318
        case cJL_JPNULL3:       JPTYPE("cJL_JPNULL3"); POP0;            break;
 
319
#ifdef JU_64BIT
 
320
        case cJL_JPNULL4:       JPTYPE("cJL_JPNULL4"); POP0;            break;
 
321
        case cJL_JPNULL5:       JPTYPE("cJL_JPNULL5"); POP0;            break;
 
322
        case cJL_JPNULL6:       JPTYPE("cJL_JPNULL6"); POP0;            break;
 
323
        case cJL_JPNULL7:       JPTYPE("cJL_JPNULL7"); POP0;            break;
 
324
#endif
 
325
 
 
326
        case cJL_JPBRANCH_L2:   JPTYPE("cJL_JPBRANCH_L2"); POP2;NUMJPSL;break;
 
327
        case cJL_JPBRANCH_L3:   JPTYPE("cJL_JPBRANCH_L3"); POP3;NUMJPSL;break;
 
328
#ifdef JU_64BIT
 
329
        case cJL_JPBRANCH_L4:   JPTYPE("cJL_JPBRANCH_L4"); POP4;NUMJPSL;break;
 
330
        case cJL_JPBRANCH_L5:   JPTYPE("cJL_JPBRANCH_L5"); POP5;NUMJPSL;break;
 
331
        case cJL_JPBRANCH_L6:   JPTYPE("cJL_JPBRANCH_L6"); POP6;NUMJPSL;break;
 
332
        case cJL_JPBRANCH_L7:   JPTYPE("cJL_JPBRANCH_L7"); POP7;NUMJPSL;break;
 
333
#endif
 
334
        case cJL_JPBRANCH_L:    JPTYPE("cJL_JPBRANCH_L");       NUMJPSL;break;
 
335
 
 
336
        case cJL_JPBRANCH_B2:   JPTYPE("cJL_JPBRANCH_B2"); POP2;NUMJPSB;break;
 
337
        case cJL_JPBRANCH_B3:   JPTYPE("cJL_JPBRANCH_B3"); POP3;NUMJPSB;break;
 
338
#ifdef JU_64BIT
 
339
        case cJL_JPBRANCH_B4:   JPTYPE("cJL_JPBRANCH_B4"); POP4;NUMJPSB;break;
 
340
        case cJL_JPBRANCH_B5:   JPTYPE("cJL_JPBRANCH_B5"); POP5;NUMJPSB;break;
 
341
        case cJL_JPBRANCH_B6:   JPTYPE("cJL_JPBRANCH_B6"); POP6;NUMJPSB;break;
 
342
        case cJL_JPBRANCH_B7:   JPTYPE("cJL_JPBRANCH_B7"); POP7;NUMJPSB;break;
 
343
#endif
 
344
        case cJL_JPBRANCH_B:    JPTYPE("cJL_JPBRANCH_B");       NUMJPSB;break;
 
345
 
 
346
        case cJL_JPBRANCH_U2:   JPTYPE("cJL_JPBRANCH_U2"); POP2;        break;
 
347
        case cJL_JPBRANCH_U3:   JPTYPE("cJL_JPBRANCH_U3"); POP3;        break;
 
348
#ifdef JU_64BIT
 
349
        case cJL_JPBRANCH_U4:   JPTYPE("cJL_JPBRANCH_U4"); POP4;        break;
 
350
        case cJL_JPBRANCH_U5:   JPTYPE("cJL_JPBRANCH_U5"); POP5;        break;
 
351
        case cJL_JPBRANCH_U6:   JPTYPE("cJL_JPBRANCH_U6"); POP6;        break;
 
352
        case cJL_JPBRANCH_U7:   JPTYPE("cJL_JPBRANCH_U7"); POP7;        break;
 
353
#endif
 
354
        case cJL_JPBRANCH_U:    JPTYPE("cJL_JPBRANCH_U");               break;
 
355
 
 
356
        case cJL_JPLEAF1:       JPTYPE("cJL_JPLEAF1"); POP1;            break;
 
357
        case cJL_JPLEAF2:       JPTYPE("cJL_JPLEAF2"); POP2;            break;
 
358
        case cJL_JPLEAF3:       JPTYPE("cJL_JPLEAF3"); POP3;            break;
 
359
#ifdef JU_64BIT
 
360
        case cJL_JPLEAF4:       JPTYPE("cJL_JPLEAF4"); POP4;            break;
 
361
        case cJL_JPLEAF5:       JPTYPE("cJL_JPLEAF5"); POP5;            break;
 
362
        case cJL_JPLEAF6:       JPTYPE("cJL_JPLEAF6"); POP6;            break;
 
363
        case cJL_JPLEAF7:       JPTYPE("cJL_JPLEAF7"); POP7;            break;
 
364
#endif
 
365
 
 
366
        case cJL_JPLEAF_B1:     JPTYPE("cJL_JPLEAF_B1"); POP1;  break;
 
367
 
 
368
        case cJL_JPIMMED_1_01:  JPTYPE("cJL_JPIMMED_1_01"); POP_1;      break;
 
369
        case cJL_JPIMMED_2_01:  JPTYPE("cJL_JPIMMED_2_01"); POP_1;      break;
 
370
        case cJL_JPIMMED_3_01:  JPTYPE("cJL_JPIMMED_3_01"); POP_1;      break;
 
371
#ifdef JU_64BIT
 
372
        case cJL_JPIMMED_4_01:  JPTYPE("cJL_JPIMMED_4_01"); POP_1;      break;
 
373
        case cJL_JPIMMED_5_01:  JPTYPE("cJL_JPIMMED_5_01"); POP_1;      break;
 
374
        case cJL_JPIMMED_6_01:  JPTYPE("cJL_JPIMMED_6_01"); POP_1;      break;
 
375
        case cJL_JPIMMED_7_01:  JPTYPE("cJL_JPIMMED_7_01"); POP_1;      break;
 
376
#endif
 
377
 
 
378
        case cJL_JPIMMED_1_02:  JPTYPE("cJL_JPIMMED_1_02"); POP_2;      break;
 
379
        case cJL_JPIMMED_1_03:  JPTYPE("cJL_JPIMMED_1_03"); POP_3;      break;
 
380
#ifdef JU_64BIT
 
381
        case cJL_JPIMMED_1_04:  JPTYPE("cJL_JPIMMED_1_04"); POP_4;      break;
 
382
        case cJL_JPIMMED_1_05:  JPTYPE("cJL_JPIMMED_1_05"); POP_5;      break;
 
383
        case cJL_JPIMMED_1_06:  JPTYPE("cJL_JPIMMED_1_06"); POP_6;      break;
 
384
        case cJL_JPIMMED_1_07:  JPTYPE("cJL_JPIMMED_1_07"); POP_7;      break;
 
385
        case cJL_JPIMMED_2_02:  JPTYPE("cJL_JPIMMED_2_02"); POP_2;      break;
 
386
        case cJL_JPIMMED_2_03:  JPTYPE("cJL_JPIMMED_2_03"); POP_3;      break;
 
387
        case cJL_JPIMMED_3_02:  JPTYPE("cJL_JPIMMED_3_02"); POP_2;      break;
 
388
#endif
 
389
        case cJL_JPIMMED_CAP:   JPTYPE("cJL_JPIMMED_CAP");      OOPS;
 
390
 
 
391
#endif // JUDYL
 
392
 
 
393
        default:  printf("Unknown Type = %d", Pjp->jp_Type);            OOPS;
 
394
        }
 
395
 
 
396
        if (__JudyIndex)        printf("Index = 0x%lx", __JudyIndex);
 
397
        if (__JudyPopulation)   printf("Pop = %lu",     __JudyPopulation);
 
398
 
 
399
        printf("line = %d\n", Line);
 
400
 
 
401
} // JudyPrintJP()