unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 JudyL_funcs(3X)					     JudyL_funcs(3X)




 NAME
      JudyL functions - C library for creating and accessing a dynamic array
      of words, using any value of a word as an index

 SYNOPSIS
      PPvoid_t JudyLIns(       PPvoid_t PPJLArray, Word_t    Index, PJError_t PJError);
      int      JudyLDel(       PPvoid_t PPJLArray, Word_t    Index, PJError_t PJError);
      PPvoid_t JudyLGet(       Pcvoid_t	 PJLArray, Word_t    Index, PJError_t PJError);
      Word_t   JudyLCount(     Pcvoid_t	 PJLArray, Word_t    Index1, Word_t    Index2, PJError_t PJError);
      PPvoid_t JudyLByCount(   Pcvoid_t	 PJLArray, Word_t    Nth,  Word_t * PIndex,  PJError_t PJError);
      Word_t   JudyLFreeArray( PPvoid_t PPJLArray, PJError_t PJError);
      Word_t   JudyLMemUsed(   Pcvoid_t	 PJLArray);
      PPvoid_t JudyLFirst(     Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);
      PPvoid_t JudyLNext(      Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);
      PPvoid_t JudyLLast(      Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);
      PPvoid_t JudyLPrev(      Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);
      int      JudyLFirstEmpty(Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);
      int      JudyLNextEmpty( Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);
      int      JudyLLastEmpty( Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);
      int      JudyLPrevEmpty( Pcvoid_t	 PJLArray, Word_t * PIndex, PJError_t PJError);

 DESCRIPTION
      A macro equivalent exists for each function call.	 Because the macro
      forms are faster and have a simpler error handling interface than the
      equivalent functions, they are the preferred way of calling the JudyL
      functions.  See JudyL(3X) for more information.  The function call
      definitions are included here for completeness.

      One of the difficulties in using the JudyL function calls lies in
      determining whether to pass a pointer or the address of a pointer.
      Since the functions that modify the JudyL array must also modify the
      pointer to the JudyL 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 JudyL 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 JudyL functions when an error occurs.

      Notice the placement of the &&amp&amp& in the different functions.




 Hewlett-Packard Company	    - 1 -






 JudyL_funcs(3X)					     JudyL_funcs(3X)




      JudyLIns(&&amp&amp&PJLArray, Index, &&amp&amp&JError)


		     #define JLI(PValue, PJLArray, Index)  \
			PValue = JudyLIns(&PJLArray, Index, PJE0)





      JudyLDel(&&amp&amp&PJLArray, Index, &&amp&amp&JError)


		     #define JLD(Rc_int, PJLArray, Index)  \
			Rc_int = JudyLDel(&PJLArray, Index, PJE0)





      JudyLGet(PJLArray, Index, &&amp&amp&JError)


		     #define JLG(PValue, PJLArray, Index)  \
			PValue = JudyLGet(PJLArray, Index, PJE0)





      JudyLCount(PJLArray, Index1, Index2, &&amp&amp&JError)


		     #define JLC(Rc_word, PJLArray, Index1, Index2)  \
			Rc_word = JudyLCount(PJLArray, Index1, Index2, PJE0)





      JudyLByCount(PJLArray, Nth, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLBC(PValue, PJLArray, Nth, Index) \
			PValue = JudyLByCount(PJLArray, Nth, &Index, PJE0)









 Hewlett-Packard Company	    - 2 -






 JudyL_funcs(3X)					     JudyL_funcs(3X)




      JudyLFreeArray(&&amp&amp&PJLArray, &&amp&amp&JError)


		     #define JLFA(Rc_word, PJLArray) \
			Rc_word = JudyLFreeArray(&PJLArray, PJE0)





      JudyLMemUsed(PJLArray)


		     #define JLMU(Rc_word, PJLArray) \
			Rc_word = JudyLMemUsed(PJLArray)





      JudyLFirst(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLF(PValue, PJLArray, Index) \
			PValue = JudyLFirst(PJLArray, &Index, PJEO)





      JudyLNext(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLN(PValue, PJLArray, Index) \
			PValue = JudyLNext(PJLArray, &Index, PJEO)





      JudyLLast(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLL(PValue, PJLArray, Index) \
			PValue = JudyLLast(PJLArray, &Index, PJEO)









 Hewlett-Packard Company	    - 3 -






 JudyL_funcs(3X)					     JudyL_funcs(3X)




      JudyLPrev(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLP(PValue, PJLArray, Index) \
			PValue = JudyLPrev(PJLArray, &Index, PJEO)





      JudyLFirstEmpty(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLFE(Rc_int, PJLArray, Index) \
			Rc_int = JudyLFirstEmpty(PJLArray, &Index, PJEO)





      JudyLNextEmpty(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLNE(Rc_int, PJLArray, Index) \
			Rc_int = JudyLNextEmpty(PJLArray, &Index, PJEO)





      JudyLLastEmpty(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLLE(Rc_int, PJLArray, Index) \
			Rc_int = JudyLLastEmpty(PJLArray, &Index, PJEO)





      JudyLPrevEmpty(PJLArray, &&amp&amp&Index, &&amp&amp&JError)


		     #define JLPE(Rc_int, PJLArray, Index) \
			Rc_int = JudyLPrevEmpty(PJLArray, &Index, PJEO)



      Definitions for all the Judy functions, the types Pvoid_t, Pcvoid_t,
      PPvoid_t, Word_t, JError_t, and PJError_t, the constants NULL,
      JU_ERRNO_*, JERR, PPJERR, and PJE0, are provided in the Judy.h header



 Hewlett-Packard Company	    - 4 -






 JudyL_funcs(3X)					     JudyL_funcs(3X)




      file (/usr/include/Judy.h).  Note:  Callers should define JudyL 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.

      The return type from most JudyL functions is PPvoid_t so that the
      values stored in the array can be pointers to other objects, which is
      a typical usage, or cast to a Word_t * when a pointer to a value is
      required instead of a pointer to a pointer.

 AUTHOR
      Judy was invented and implemented by Hewlett-Packard.

 SEE ALSO
      Judy(3X), Judy1(3X), Judy1_funcs(3X), JudyL(3X), JudySL(3X),
      JudySL_funcs(3X),
      malloc(3),
      the Judy website, http://www.hp.com/go/judy/, for more information and
      Application Notes.



































 Hewlett-Packard Company	    - 5 -