.TA j Judy1_funcs - Online Linux Manual PageSection : 3
NAMEJudy1 functions - C library for creating and accessing a dynamic array of bits, using any value of a word as an index
SYNOPSIS¶.ft B
int Judy1Set( PPvoid_t PPJ1Array, Word_t Index, PJError_t PJError);
int Judy1Unset( PPvoid_t PPJ1Array, Word_t Index, PJError_t PJError);
int Judy1Test( Pcvoid_t PJ1Array, Word_t Index, PJError_t PJError);
Word_t Judy1Count( Pcvoid_t PJ1Array, Word_t Index1, Word_t Index2, PJError_t PJError);
int Judy1ByCount( Pcvoid_t PJ1Array, Word_t Nth, Word_t * PIndex, PJError_t PJError);
Word_t Judy1FreeArray( PPvoid_t PPJ1Array, PJError_t PJError);
Word_t Judy1MemUsed( Pcvoid_t PJ1Array);
int Judy1First( Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
int Judy1Next( Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
int Judy1Last( Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
int Judy1Prev( Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
int Judy1FirstEmpty(Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
int Judy1NextEmpty( Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
int Judy1LastEmpty( Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
int Judy1PrevEmpty( Pcvoid_t PJ1Array, Word_t * PIndex, PJError_t PJError);
¶.fi
DESCRIPTION
A macro equivalent exists for each function call. Because the macro forms are sometimes faster and have a simpler error handling interface than the equivalent functions, they are the preferred way of calling the Judy1 functions. See Judy1(3) for more information. The function call definitions are included here for completeness. One of the difficulties in using the Judy1 function calls lies in determining whether to pass a pointer or the address of a pointer. Since the functions that modify the Judy1 array must also modify the pointer to the Judy1 array, you must pass the address of the pointer rather than the pointer itself. This often leads to hard-to-debug programmatic errors. In practice, the macros allow the compiler to catch programming errors when pointers instead of addresses of pointers are passed. The Judy1 function calls have an additional parameter beyond those specified in the macro calls. This parameter is either a pointer to an error structure, or NULL (in which case the detailed error information is not returned). In the following descriptions, the functions are described in terms of how the macros use them (only in the case of #define JUDYERROR_NOTEST 1). This is the suggested use of the macros after your program has been fully debugged. When the JUDYERROR_NOTEST macro is not specified, an error structure is declared to store error information returned from the Judy1 functions when an error occurs. Notice the placement of the & in the different functions.
Judy1Set(&PJ1Array, Index, &JError) ¶#define J1S(Rc_int, PJ1Array, Index)
Rc_int = Judy1Set(&PJ1Array, Index, PJE0)
¶.fi
Judy1Unset(&PJ1Array, Index, &JError)
¶#define J1U(Rc_int, PJ1Array, Index)
Rc_int = Judy1Unset(&PJ1Array, Index, PJE0)
¶.fi
Judy1Test(PJ1Array, Index, &JError)
¶#define J1T(Rc_int, PJ1Array, Index)
Rc_int = Judy1Test(PJ1Array, Index, PJE0)
¶.fi
Judy1Count(PJ1Array, Index1, Index2, &JError)
¶#define J1C(Rc_word, PJ1Array, Index1, Index2)
Rc_word = Judy1Count(PJ1Array, Index1, Index2, PJE0)
¶.fi
A return value of 0 can be an error, valid as a count, or it can indicate a special case
for a fully-populated array (32-bit machines only). If necessary, the following
code can be used to disambiguate this return:
¶JError_t JError;
Rc_word = Judy1Count(PJ1Array, Index1, Index2, &JError);
if (Rc_word == 0)
{
if (JU_ERRNO(&JError) == JU_ERRNO_NONE)
printf("Judy1 array population == 0\n");
if (JU_ERRNO(&JError) == JU_ERRNO_FULL)
printf("Judy1 array population == 2^32\n");
if (JU_ERRNO(&JError) == JU_ERRNO_NULLPPARRAY)
goto NullArray;
if (JU_ERRNO(&JError) > JU_ERRNO_NFMAX)
goto Null_or_CorruptArray;
}
¶.fi
Judy1ByCount(PJ1Array, Nth, &Index, &JError)
¶#define J1BC(Rc_int, PJ1Array, Nth, Index)
Rc_int = Judy1ByCount(PJ1Array, Nth, &Index, PJE0)
¶.fi
Judy1FreeArray(&PJ1Array, &JError)
¶#define J1FA(Rc_word, PJ1Array)
Rc_word = Judy1FreeArray(&PJ1Array, PJE0)
¶.fi
Judy1MemUsed(PJ1Array)
¶#define J1MU(Rc_word, PJ1Array)
Rc_word = Judy1MemUsed(PJ1Array)
¶.fi
Judy1First(PJ1Array, &Index, &JError)
¶#define J1F(Rc_int, PJ1Array, Index)
Rc_int = Judy1First(PJ1Array, &Index, PJE0)
¶.fi
Judy1Next(PJ1Array, &Index, &JError)
¶#define J1N(Rc_int, PJ1Array, Index)
Rc_int = Judy1Next(PJ1Array, &Index, PJE0)
¶.fi
Judy1Last(PJ1Array, &Index, &JError)
¶#define J1L(Rc_int, PJ1Array, Index)
Rc_int = Judy1Last(PJ1Array, &Index, PJE0)
¶.fi
Judy1Prev(PJ1Array, &Index, &JError)
¶#define J1P(Rc_int, PJ1Array, Index)
Rc_int = Judy1Prev(PJ1Array, &Index, PJE0)
¶.fi
Judy1FirstEmpty(PJ1Array, &Index, &JError)
¶#define J1FE(Rc_int, PJ1Array, Index)
Rc_int = Judy1FirstEmpty(PJ1Array, &Index, PJE0)
¶.fi
Judy1NextEmpty(PJ1Array, &Index, &JError)
¶#define J1NE(Rc_int, PJ1Array, Index)
Rc_int = Judy1NextEmpty(PJ1Array, &Index, PJE0)
¶.fi
Judy1LastEmpty(PJ1Array, &Index, &JError)
¶#define J1LE(Rc_int, PJ1Array, Index)
Rc_int = Judy1LastEmpty(PJ1Array, &Index, PJE0)
¶.fi
Judy1PrevEmpty(PJ1Array, &Index, &JError)
¶#define J1PE(Rc_int, PJ1Array, Index)
Rc_int = Judy1PrevEmpty(PJ1Array, &Index, PJE0)
¶.fiDefinitions for all of the Judy functions, the types
Pvoid_t,
Pcvoid_t,
PPvoid_t,
Word_t,
JError_t,
and
PJError_t,
the constants
NULL,
JU_ERRNO_*,
JERR,
and
PJE0,
are provided in the Judy.h header file
(/usr/include/Judy.h).
Note: Callers should define Judy1 arrays as type Pvoid_t,
which can be passed by value to functions that take
Pcvoid_t (constant Pvoid_t),
and also by address to functions that take PPvoid_t.
AUTHOR
Judy was invented by Doug Baskins and implemented by Hewlett-Packard.
SEE ALSOJudy(3), JudyL(3), JudySL(3), JudyHS(3),
malloc(),
the Judy website, http://judy.sourceforge.net, for more information and Application Notes. 0
Johanes Gumabo
Data Size : 29,860 byte
man-Judy1Count.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 6 / 167,400
Visitor ID : :
Visitor IP : 18.221.221.171 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|J___udy1ByCount.3|3|TA|.TA j
) (rof_nr_x|149|J___udy1ByCount.3|125|\n");| printf("Judy1 array population == 0\\n");
) (rof_nr_x|149|J___udy1ByCount.3|127|\n");| printf("Judy1 array population == 2^32\\n");
)