Autodocs for `Grid Engine CULL Library'


Next: , Up: (dir)


1 cull


1.1 db


1.1.1 lDiffListStr

NAME
          lDiffListStr() -- Remove elements with the same string

SYNOPSIS
          int lDiffListStr(int nm, lList **lpp1, lList **lpp2)

FUNCTION
          Remove elements in both lists with the same string key in
          field 'nm'.

INPUTS
          int nm       - field name id
          lList **lpp1 - first list
          lList **lpp2 - second list

RESULT
          int - error status
              0 - OK
             -1 - Error


1.1.2 lJoin

NAME
          lJoin() -- Joins two lists together

SYNOPSIS
          lList* lJoin(const char *name, int nm0, const lList *lp0,
                       const lCondition *cp0, const lEnumeration *enp0,
                       int nm1, const lList *lp1, const lCondition *cp1,
                       const lEnumeration *enp1)

FUNCTION
          Returns a new list joining together the lists 'lp0' and 'lp1'
          For the join only these 'lines' described in condition 'cp0'
          and 'cp1' are used.
          The new list gets only these members described in 'enp0' and
          'enp1'. NULL means every member of this list.
          The list gets 'name' as listname.

INPUTS
          const char *name         - name of new list
          int nm0                  -
          const lList *lp0         - first list
          const lCondition *cp0    - selects rows of first list
          const lEnumeration *enp0 - selects column of first list
          int nm1                  -
          const lList *lp1         - second list
          const lCondition *cp1    - selects rows of second list
          const lEnumeration *enp1 - selects column of second list

RESULT
          lList* - Joined list


1.1.3 lJoinCopyElem

NAME
          lJoinCopyElem() -- Combine two elements

SYNOPSIS
          static lListElem* lJoinCopyElem(const lDescr *dp,
                                          const lListElem *src0,
                                          const lEnumeration *enp0,
                                          const lListElem *src1,
                                          const lEnumeration *enp1)

FUNCTION
          Returns a combined element with descriptor 'dp'. Uses 'src0'
          with mask 'enp0' and 'src1' with mask 'enp1' as source.

INPUTS
          const lDescr *dp         - descriptor
          const lListElem *src0    - element1
          const lEnumeration *enp0 - mask1
          const lListElem *src1    - element2
          const lEnumeration *enp1 - mask2

RESULT
          static lListElem* - combined element


1.1.4 lJoinDescr

NAME
          lJoinDescr() -- Builds new descriptor using two others

SYNOPSIS
          lDescr* lJoinDescr(const lDescr *sdp0,
                             const lDescr *sdp1,
                             const lEnumeration *ep0,
                             const lEnumeration *ep1)

FUNCTION
          Builds from two given descriptors 'sdp0' and 'sdp1' a new
          descriptor masked by the enumerations 'ep0' and 'ep1'.

INPUTS
          const lDescr *sdp0      - first descriptor
          const lDescr *sdp1      - second descriptor
          const lEnumeration *ep0 - first mask
          const lEnumeration *ep1 - second mask

RESULT
          lDescr* - new descriptor


1.1.5 lJoinSublist

NAME
          lJoinSublist() -- Join a list with one of its sublists

SYNOPSIS
          lList* lJoinSublist(const char *name,
                              int nm0,
                              const lList *lp,
                              const lCondition *cp0,
                              const lEnumeration *enp0,
                              const lDescr *sldp,
                              const lCondition *cp1,
                              const lEnumeration *enp1)

FUNCTION
          Joins a list and one of its sublists together. The other
          parameters are equal to them from lJoin(). In the enumeration
          'enp0' the sublist field neither may be selected nor 'enp0'
          may be NULL.

INPUTS
          const char *name         - new list name
          int nm0                  -
          const lList *lp          - list
          const lCondition *cp0    - selects rows within 'lp'
          const lEnumeration *enp0 - selects columns within 'lp'
          const lDescr *sldp       - sublist descriptor pointer
          const lCondition *cp1    - selects rows within 'sldp'
          const lEnumeration *enp1 - selects columns within 'enp1'

RESULT
          lList* - Joined list


1.1.6 lPartialDescr

NAME
          lPartialDescr() -- Extracts some fields of a descriptor

SYNOPSIS
          int lPartialDescr(const lEnumeration *ep, const lDescr *sdp,
                            lDescr *ddp, int *indexp)

FUNCTION
          Extracts some fields of the source descriptor 'sdp' masked
          by an enumeration 'ep' of needed fields

INPUTS
          const lEnumeration *ep - mask
          const lDescr *sdp      - source
          lDescr *ddp            - destination
          int *indexp            -

RESULT
          int - error state
              0 - OK
             -1 - Error


1.1.7 lSelect

NAME
          lSelect() -- Extracts some elements fulfilling a condition

SYNOPSIS
          lList* lSelect(const char *name, const lList *slp,
                         const lCondition *cp, const lEnumeration *enp)

FUNCTION
          Creates a new list from the list 'slp' extracting the elements
          fulfilling the condition 'cp'.

INPUTS
          const char *name        - name for the new list
          const lList *slp        - source list pointer
          const lCondition *cp    - selects rows
          const lEnumeration *enp - selects columns (fields)

RESULT
          lList* - list containing the extracted elements, or NULL if none match

NOTES
          The condition and enumeration are constructed by lWhere and
          lWhat respectively.

SEE ALSO


1.1.8 lSelectDPack

NAME
          lSelectDPack() --  Extracts some elements fulfilling a condition

SYNOPSIS
          lList* lSelectDPack(const char *name, const lList *slp,
                              const lCondition *cp, const lDescr *dp,
                              bool isHash, sge_pack_buffer *pb)
          

FUNCTION
          Creates a new list from the list 'slp' extracting the elements
          fulfilling the condition 'cp' or packs the elements into the
          packbuffer 'pb' if it is not NULL.

INPUTS
          const char *name        - name for the new list
          const lList *slp        - source list pointer
          const lCondition *cp    - selects rows
          const lDescr *dp        - descriptor for the new list
          const lEnumeration *enp - selects columns
          bool  isHash            - enables/disables the hash table creation
          sge_pack_buffer *pb     - packbuffer
          u_long32 *elements      - number of packed elements
                                    (only used if pb != NULL)

RESULT
          lList* - list containing the extracted elements


1.1.9 lSelectDestroy

NAME
          lSelectDestroy() -- Removes list elements not fulfilling a condition

SYNOPSIS
          lList* lSelectDestroy(lList *slp, const lCondition *cp)

FUNCTION
          Removes elements from the list 'slp' NOT fulfilling the condition 'cp'.

INPUTS
          lList *slp           - source list pointer
          const lCondition *cp - selects rows (returned by lWhere)

RESULT
          lList* - List with the remaining elements, or NULL if none remain

NOTES
          The operation is destructive, so use lCopyList before lSelectDestroy
          if you want to use the list subsequently.

SEE ALSO


1.1.10 lSelectElemDPack

NAME
          lSelectElemDPack() -- Extracts some elements fulfilling a condition

SYNOPSIS
          lListElem*
          lSelectElemDPack(const lListelem *slp, const lCondition *cp,
                           const lEnumeration *enp, bool isHash,
                           sge_pack_buffer *pb)

FUNCTION
          Creates a new list from the list 'slp' extracting the elements
          fulfilling the condition 'cp' or it packs those elements into 'pb' if
          it is not NULL.

INPUTS
          const lListElem *slp     - source list pointer
          const lCondition *cp     - selects rows
          const lDescr *dp         - target descriptor for the element
          bool  isHash             - creates hash or not
          sge_pack_buffer *pb      - packbuffer
          u_long32 *elements       - increases the number of elems, if one is
                                     added to the pb. Only, when elements is
                                     not NULL (only used if pb != NULL)

RESULT
          lListElem* - list containing the extracted elements


1.1.11 lSelectElemPack

NAME
          lSelectElemPack() -- Extracts some elements fulfilling a condition

SYNOPSIS
          lListElem*
          lSelectElemPack(const lListElem *slp, const lCondition *cp,
                          const lEnumeration *enp, bool isHash,
                          sge_pack_buffer *pb)

FUNCTION
          Creates a new list from the list 'slp' extracting the elements
          fulfilling the condition 'cp' or extracts the elements and
          stores the contend in 'pb'.

INPUTS
          const lListElem *slp    - source list pointer
          const lCondition *cp    - selects rows
          const lEnumeration *enp - selects columns
          bool isHash             - create hash or not
          sge_pack_buffer *pb     - packbuffer

RESULT
          lListElem* - list containing the extracted elements


1.1.12 lSelectHashPack

NAME
          lSelectHashPack() -- Extracts some elements fulfilling a condition

SYNOPSIS
          lList*
          lSelectHashPack(const char *name, const lList *slp,
                          const lCondition *cp, const lEnumeration *enp,
                          bool isHash, sge_pack_buffer *pb)

FUNCTION
          Creates a new list from the list 'slp' extracting the elements
          fulfilling the condition 'cp' or fills the packbuffer if pb is
          not NULL.

INPUTS
          const char *name        - name for the new list
          const lList *slp        - source list pointer
          const lCondition *cp    - selects rows
          const lEnumeration *enp - selects columns
          bool  isHash            - enables/disables the hash generation
          sge_pack_buffer *pb     - packbuffer

RESULT
          lList* - list containing the extracted elements


1.1.13 lSplit

NAME
          lSplit() -- Splits a list into two list

SYNOPSIS
          int lSplit(lList **slp, lList **ulp, const char *ulp_name,
                     const lCondition *cp)

FUNCTION
          Unchains the list elements from the list 'slp' NOT fulfilling
          the condition 'cp' and returns a list containing the
          unchained elements in 'ulp'

INPUTS
          lList **slp          - source list pointer
          lList **ulp          - unchained list pointer
          const char *ulp_name - 'ulp' list name
          const lCondition *cp - selects rows within 'slp'

RESULT
          int - error status
              0 - OK
             -1 - Error


1.1.14 lString2List

NAME
          lString2List() -- Convert char* string into CULL list

SYNOPSIS
          int lString2List(const char *s, lList **lpp, const lDescr *dp,
                           int nm, const char *delimiter);

FUNCTION
          Parses separated strings and adds them into the cull list *lpp
          The string is a unique key for the list and resides at field 'nm'
          If 'delimiter' is NULL than isspace() is used.

INPUTS
          const char *s         - String to parse
          lList **lpp           - reference to lList*
          const lDescr *dp      - list Type
          int nm                - list field
          const char *delimiter - string delimiter

RESULT
          int - error state
              1 - OK
              0 - On error


1.1.15 lString2ListNone

NAME
          lString2ListNone() --

SYNOPSIS
          int lString2ListNone(const char *s, lList **lpp, const lDescr *dp,
                               int nm, const char *dlmt)

INPUTS
          const char *s    - ???
          lList **lpp      - ???
          const lDescr *dp - ???
          int nm           - ???
          const char *dlmt - ???

RESULT
          int - error state
              0 - OK


1.2 dump_scan


1.2.1 lDumpDescr

NAME
          lDumpDescr() -- Write a descriptor (for debugging purpose)

SYNOPSIS
          int lDumpDescr(FILE *fp, const lDescr *dp, int indent)

FUNCTION
          Write a descriptor (for debugging purpose)

INPUTS
          FILE *fp         - file pointer
          const lDescr *dp - descriptor
          int indent       -

RESULT
          int - error state
              0 - OK
             -1 - Error


1.2.2 lDumpElem

NAME
          lDumpElem() -- Dump a given element into a file

SYNOPSIS
          int lDumpElem(const char *fname, const lListElem *ep, int indent)

FUNCTION
          Dump a given element into a file in text format

INPUTS
          const char *fname   - filename
          const lListElem *ep - element
          int indent          - number of spaces to indent

RESULT
          int - error state
             -1 - Error
              0 - OK

NOTES
          MT-NOTE: lDumpElem() is not MT safe


1.2.3 lDumpElemFp

NAME
          lDumpElemFp() -- Dump a given element into FILE stream

SYNOPSIS
          int lDumpElemFp(FILE *fp, const lListElem *ep, int indent)

FUNCTION
          Dump a given element into FILE stream

INPUTS
          FILE *fp            - file stream
          const lListElem *ep - element
          int indent          -

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lDumpElemFp() is not MT safe


1.2.4 lDumpList

NAME
          lDumpList() -- Writes a list to a FILE stream

SYNOPSIS
          int lDumpList(FILE *fp, const lList *lp, int indent)

FUNCTION
          Writes a list to a FILE stream.

INPUTS
          FILE *fp        - file stream
          const lList *lp - list
          int indent      -

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lDumpList() is not MT safe


1.2.5 lDumpObject

NAME
          lDumpObject() -- Writes an object to a FILE stream

SYNOPSIS
          int lDumpObject(FILE *fp, const lListElem *ep, int indent)

FUNCTION
          Writes an object to a FILE stream.

INPUTS
          FILE *fp             - file stream
          const lListElem *ep  - object
          int indent           -

RESULT
          int - error state
              0 - OK
             -1 - Error


1.2.6 lUndumpDescr

NAME
          lUndumpDescr() -- Read a descriptor from file (debug)

SYNOPSIS
          lDescr* lUndumpDescr(FILE *fp)

FUNCTION
          Read a descriptor from file (for debugging purposes)

INPUTS
          FILE *fp - file stream

RESULT
          lDescr* - descriptor


1.2.7 lUndumpElem

NAME
          lUndumpElem() -- Read element from dump file

SYNOPSIS
          lListElem* lUndumpElem(FILE *fp, const lDescr *dp)

FUNCTION
          Read element from FILE stream

INPUTS
          FILE *fp         - file stream
          const lDescr *dp - descriptor

RESULT
          lListElem* - Read element, or NULL if either arg is NULL


1.2.8 lUndumpElemFp

NAME
          lUndumpElemFp() -- Read element from FILE stream

SYNOPSIS
          lListElem* lUndumpElemFp(FILE *fp, const lDescr *dp)

FUNCTION
          Read element from FILE stream

INPUTS
          FILE *fp         - file stream
          const lDescr *dp - descriptor

RESULT
          lListElem* - Read element


1.2.9 lUndumpList

NAME
          lUndumpList() -- Reads a by lDumpList dumped dump

SYNOPSIS
          lList* lUndumpList(FILE *fp, const char *name, const lDescr *dp)

FUNCTION
          Reads a by lDumpList dumped dump into the memory.

INPUTS
          FILE *fp         - file pointer
          const char *name - new name of list or NULL if the old name in the
                             dumpfile should be used as listname
          const lDescr *dp - new list descriptor or NULL if the old list
                             descriptor should be used as list descriptor

RESULT
          lList* - Read list

NOTES
          Actually a type/name matching is only performed for the list
          itself and not for its sublists.
          If an implementation of changed sublist descriptors is desired
          we can probably use the following syntax for lUndumpList.
          lList* lUndumpList(fp, name, formatstring, ...)
          with formatstring like "%T(%I -> %T(%I->%T))" and the varargs
          list: ".....", lDescr1, fieldname1, lDescr2, fieldname2, lDescr3
          or write a wrapper around lUndumpList which parses this format and
          hands over the varargs list to lUndumpList


1.2.10 lUndumpObject

NAME
          lUndumpObject() -- Reads a by lDumpList dumped dump

SYNOPSIS
          lListElem* lUndumpObject(FILE *fp)

FUNCTION
          Reads a by lDumpList dumped dump into the memory.

INPUTS
          FILE *fp         - file pointer

RESULT
          lListElem* - Read list element


1.3 file


1.3.1 lReadElemFromDisk

NAME
          lReadElemFromDisk() -- Reads a cull element from file

SYNOPSIS
          lListElem* lReadElemFromDisk(const char *prefix,
                                       const char *name,
                                       const lDescr *type,
                                       const char *obj_name)

FUNCTION
          Reads a lListElem of the specified 'type' from the file
          'prefix'/'name'. Either 'prefix' or 'name' can be null.
          Returns a pointer to the read element or NULL in case
          of an error

INPUTS
          const char *prefix   - Path
          const char *name     - Filename
          const lDescr *type   - Type
          const char *obj_name -

RESULT
          lListElem* - Read CULL element


1.3.2 lWriteElemToDisk

NAME
          lWriteElemToDisk() -- Writes a element to file

SYNOPSIS
          int lWriteElemToDisk(const lListElem *ep, const char *prefix,
                               const char *name, const char *obj_name)

FUNCTION
          Writes the Element 'ep' to the file named 'prefix'/'name'.
          Either 'prefix' or 'name can be null.

INPUTS
          const lListElem *ep  - CULL element
          const char *prefix   - Path
          const char *name     - Filename
          const char *obj_name -

RESULT
          int - error state
              0 - OK
              1 - Error


1.4 hash


1.4.1 –CULL_Hashtable

NAME
          htable -- Hashtable extensions for cull lists

SYNOPSIS
          cull_htable cull_hash_create(const lDescr *descr, int size);
          
          void cull_hash_new(lList *lp, int name, bool unique);
          
          void cull_hash_insert(const lListElem *ep, const int pos, );
          
          void cull_hash_remove(const lListElem *ep, const int pos);
          
          void cull_hash_elem(const lListElem *ep);
          
          lListElem *cull_hash_first(const lList *lp, const int pos,
                              const void *key, const void **iterator);
          
          lListElem *cull_hash_next(const lList *lp, const int pos,
                              const void *key, const void **iterator);
          
          void cull_hash_free_descr(lDescr *descr);

FUNCTION
          This module provides an abstraction layer between cull and
          the hash table implementation in libuti. It provides the
          necessary functions to use hash tables from libuti for cull lists.
          
          The functions defined in this module implement hash tables with
          non unique keys, provide wrapper functions for hash insert, remove
          and search that are aware of the non unique hash implementation,
          functions that deal with the necessary extensions to the cull list
          descriptor objects etc.

SEE ALSO


1.4.2 -CULL_Hashtable_Defines

NAME
          Defines -- Constants for the cull hash implementation

SYNOPSIS
          #define MIN_CULL_HASH_SIZE 4

FUNCTION
          Provides constants to be used in the hash table implementation
          for cull lists.
          
          MIN_CULL_HASH_SIZE - minimum size of a hash table. When a new
                               hash table is created, it will have the size
                               2^MIN_CULL_HASH_SIZE


1.4.3 -CULL_Hashtable_Typedefs

NAME
          Typedefs -- Typedefs for cull hash implementation

SYNOPSIS
          typedef struct _non_unique_hash non_unique_hash;
          
          struct _non_unique_hash {
             non_unique_hash *next;
             const void *data;
          };

FUNCTION
          Internal data structure to handle hash tables with non unique
          keys. The hash table (from libuti) in this case will not store
          a pointer to the cull object itself, but a pointer to a list of
          cull objects. This list is implemented using the non_unique_hash
          structures.

SEE ALSO


1.4.4 cull_hash_create

NAME
          cull_hash_create() -- create a new hash table

SYNOPSIS
          cull_htable cull_hash_create(const lDescr *descr, int size)

FUNCTION
          Creates a new hash table for a certain descriptor and returns the
          hash description (lHash) for it.
          The initial size of the hashtable can be specified.
          This allows for optimization of the hashtable, as resize operations
          can be minimized when the final hashtable size is known at creation time,
          e.g. when copying complete lists.

INPUTS
          const lDescr *descr - descriptor for the data field in a
                                cull object.
          int size            - initial size of hashtable will be 2^size

RESULT
          cull_htable - initialized hash description


1.4.5 cull_hash_create_hashtables

NAME
          cull_hash_create_hashtables() -- create all hashtables on a list

SYNOPSIS
          void cull_hash_create_hashtables(lList *lp)

FUNCTION
          Creates all hashtables for an empty list.

INPUTS
          lList *lp - initialized list structure

NOTES
          If the list already contains elements, these elements are not
          inserted into the hash lists.


1.4.6 cull_hash_delete_non_unique_chain

NAME
          cull_hash_delete_non_unique_chain() -- del list of non unique obj.

SYNOPSIS
          void cull_hash_delete_non_unique_chain(cull_htable table,
                                                 const void *key,
                                                 const void **data)

FUNCTION
          For objects that are stored in a hash table with non unique keys,
          for each key a linked list of objects is created.
          This function deletes this linked list for each key in the hash
          table. It is designed to be called by the function
          sge_htable_for_each from the libuti hash implementation.

INPUTS
          cull_htable table   - hash table in which to delete/free a sublist
          const void *key   - key of the list to be freed
          const void **data - pointer to the sublist

SEE ALSO


1.4.7 cull_hash_elem

NAME
          cull_hash_elem() -- insert cull object into associated hash tables

SYNOPSIS
          void cull_hash_elem(const lListElem *ep)

FUNCTION
          Insert the cull element ep into all hash tables that are
          defined for the cull list ep is member of.

INPUTS
          const lListElem *ep - the cull object to be hashed


1.4.8 cull_hash_first

NAME
          cull_hash_first() -- find first object for a certain key

SYNOPSIS
          lListElem* cull_hash_first(const lList *lp, const int pos,
                                     const void  *key,
                                     const void **iterator)

FUNCTION
          Searches for key in the hash table for data field described by
          pos in the cull list lp.
          If an element is found, it is returned.
          If the hash table uses non unique hash keys, iterator returns the
          necessary data for consecutive calls of cull_hash_next() returning
          objects with the same hash key.

INPUTS
          const lList *lp       - the cull list to search
          const int pos         - position of the data field for key
          const void *key       - the key to use for the search
          const void **iterator - iterator for calls of cull_hash_next

RESULT
          lListElem* - first object found matching key,
                       if no object found: NULL

SEE ALSO


1.4.9 cull_hash_free_descr

NAME
          cull_hash_free_descr() -- free the hash contents of a cull descr

SYNOPSIS
          void cull_hash_free_descr(lDescr *descr)

FUNCTION
          Frees the memory used by the hashing information in a cull
          descriptor (lDescr). If a hash table is still associated to
          the descriptor, it is also deleted.

INPUTS
          lDescr *descr - descriptor to free

SEE ALSO


1.4.10 cull_hash_insert

NAME
          cull_hash_insert() -- insert a new element in a hash table

SYNOPSIS
          void cull_hash_insert(const lListElem *ep, const int pos)

FUNCTION
          Inserts ep into the hash list for data field at position pos.
          A hash key will be computed. The element will be inserted
          in the corresponding hash table considering unique/non unique
          hash storage.

INPUTS
          const lListElem *ep - the cull object to be stored in a hash list
          const int pos       - describes the data field of the objects that
                                is to be hashed


1.4.11 cull_hash_new

NAME
          cull_hash_new() -- create new hash table

SYNOPSIS
          int cull_hash_new(lList *lp, int nm, int unique)

FUNCTION
          Usually hash tables are defined in the object type definition
          for each object type in libs/gdi.
          
          There are cases where for a certain application additional hash
          tables shall be defined to speed up certain access methods.
          
          cull_hash_new can be used to create a hash table for a list
          on the contents of a certain field.
          The caller can choose whether the field contents have to be
          unique within the list or not.

INPUTS
          lList *lp  - the list to hold the new hash table
          int nm     - the field on which to create the hash table
          bool unique - unique contents or not

RESULT
          int - 1 on success, else 0

EXAMPLE
          create a non unique hash index on the job owner for a job list
          cull_hash_new(job_list, JB_owner, 0);


1.4.12 cull_hash_new_check

NAME
          cull_hash_new() -- create new hash table, if it does not yet exist

SYNOPSIS
          int cull_hash_new_check(lList *lp, int nm, bool unique)

FUNCTION
          Usually hash tables are defined in the object type definition
          for each object type in libs/gdi.
          
          There are cases where for a certain application additional hash
          tables shall be defined to speed up certain access methods.
          
          cull_hash_new_check can be used to create a hash table for a list
          on the contents of a certain field.
          If it already exist, nothing is done.
          
          The caller can choose whether the field contents have to be
          unique within the list or not.

INPUTS
          lList *lp   - the list to hold the new hash table
          int nm      - the field on which to create the hash table
          bool unique - unique contents or not

RESULT
          int - 1 on success, else 0

EXAMPLE
          create a non unique hash index on the job owner for a job list
          cull_hash_new_check(job_list, JB_owner, false);

SEE ALSO


1.4.13 cull_hash_next

NAME
          cull_hash_next() -- find next object matching a key

SYNOPSIS
          lListElem* cull_hash_next(const lList *lp, const int pos,
                                    const void *key, const void **iterator)

FUNCTION
          Returns the next object matching the same key as a previous call
          to cull_hash_first or cull_hash_next.

INPUTS
          const lList *lp       - the cull list to search
          const int pos         - position of the data field for key
          const void *key       - the key to use for the search
          const void **iterator - iterator to use for the search.

RESULT
          lListElem* - object if found, else NULL

NOTES
          The order in which objects with the same key are returned is not
          defined.

SEE ALSO


1.4.14 cull_hash_remove

NAME
          cull_hash_remove() -- remove a cull object from a hash list

SYNOPSIS
          void cull_hash_remove(const lListElem *ep, const int pos)

FUNCTION
          Removes ep from a hash table for data field specified by pos.

INPUTS
          const lListElem *ep - the cull object to be removed
          const int pos       - position of the data field


1.5 lerrno


1.5.1 get_lerror_string

NAME
          get_lerror_string() -- Error number to message translation

SYNOPSIS
          const char* get_lerror_string(int nr)

FUNCTION
          Error number to message translation

INPUTS
          int nr - Error number

RESULT
          const char* - Error message


1.6 list


1.6.1 -Cull-List-defines

NAME
          Cull-List-defines -- macros and constant definitions

SYNOPSIS
          #define FREE_ELEM             (1<<0)
          #define BOUND_ELEM            (1<<1)
          #define TRANS_BOUND_ELEM      (1<<2)
          #define OBJECT_ELEM           (1<<3)

FUNCTION
          The following definitions describe possible values for the status
          a list element (lListElem):
          FREE_ELEM        - a list element not being part of a list or
                             being a sub object
          BOUND_ELEM       - a list element contained in a list.
          TRANS_BOUND_ELEM - temporary status while unpacking elements.
                             After unpacking, bound elements or sub objects
                             have this status to prevent errors from functions
                             like lAppendElem, that reject bound objects.
          OBJECT_ELEM      - a list element being subobject of another element


1.6.2 -Field_Attributes

NAME
          Field_Attributes -- Attributes of cull type fields

SYNOPSIS
          When a field of a cull object type is defined, any number of
          attributes can be given to the field.
          
          The syntax of the field definition is
             <typedef>(<field_name>, <attrib1> [|<attrib2> ...]
          e.g.
             SGE_STRING(QU_qname, CULL_HASH | CULL_UNIQUE)
          
          The following attributes can be given to a field:
             CULL_DEFAULT
                no special settings - default behaviour
             CULL_PRIMARY_KEY
                the field is part of the primary key
                does *not* imply uniqueness or hashing
             CULL_HASH
                a hash table will be created on the field for lists of the
                object type (non unique, unless explicitly specified by CULL_UNIQUE)
             CULL_UNIQUE
                the field value has to be unique for all objects in a list
                currently only used for the definition of hash tables,
                but it could be used for general consistency checks.
             CULL_JGDI_HIDDEN
             CULL_CONFIGURE
                the field can be changed by configuration functions
                not yet implemented
             CULL_SPOOL
                the field is spooled
             CULL_SUBLIST
                the field is spooled when the type is used as subtype in another
                type, but less fields shall be spooled, e.g. in the CE_TYPE:
                all fields are spooled if the complex variable definition is spooled,
                but only CE_name and CE_stringval are spooled when used as subtype,
                like in the complex_values of exec host or queue
             CULL_SPOOL_PROJECT
                deprecated?
             CULL_SPOOL_USER
                deprecated?
             CULL_JGDI_RO
             CULL_JGDI_CONF

NOTES
          Further attributes can be introduced as necessary, e.g.
             CULL_ARRAY - the field is an array of the specified data type

SEE ALSO


1.6.3 cull_state_set_

NAME
          cull_state_set_????() - write access to cull state.

FUNCTION
          Provides access to thread local storage.


1.6.4 lAddList

NAME
          lAddList() -- Concatenate two lists

SYNOPSIS
          int lAddList(lList *lp0, lList **lp1)

FUNCTION
          Concatenate two lists of the same type, destroying the second list

INPUTS
          lList *lp0 - first list
          lList **lp1 - second list

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lAddList() is MT safe


1.6.5 lAddSubList

NAME
          lAddSubList() -- Append a list to the sublist of an element

SYNOPSIS
          int lAddSubList(lListElem *ep, int nm, const lList *to_add)

FUNCTION
          Appends the list 'to_add' to the sublist 'nm' of the element
          'ep'. The list pointer becomes invalid and the returned pointer
          should be used instead to access the complete sublist.

INPUTS
          lListElem *ep       - The CULL list element
          int nm              - The CULL field name of a sublist
          const lList *to_add - The list to be added

RESULT
          lList * - Returns

NOTES
          MT-NOTE: lAddSubList() is MT safe


1.6.6 lAppendElem

NAME
          lAppendElem() -- Append element to a list

SYNOPSIS
          int lAppendElem(lList *lp, lListElem *ep)

FUNCTION
          Append element 'ep' to list 'lp'

INPUTS
          lList *lp     - list
          lListElem *ep - element

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lAppendElem() is MT safe


1.6.7 lAppendList

NAME
          lAppendList() -- Concatenate two lists

SYNOPSIS
          int lAppendList(lList *lp0, lList *lp1)

FUNCTION
          Concatenate two lists of equal type without throwing away the second list

INPUTS
          lList *lp0 - first list
          lList *lp1 - second list

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lAppendList() is MT safe


1.6.8 lCompListDescr

NAME
          lCompListDescr() -- Compare two descriptors

SYNOPSIS
          int lCompListDescr(const lDescr *dp0, const lDescr *dp1)

FUNCTION
          Compare two descriptors

INPUTS
          const lDescr *dp0 - descriptor one
          const lDescr *dp1 - descriptor two

RESULT
          int - Result of compare operation
              0 - equivalent
             -1 - not equivalent

NOTES
          MT-NOTE: lCompListDescr() is MT safe


1.6.9 lCopyElem

NAME
          lCopyElem() -- Copies a whole list element

SYNOPSIS
          lListElem* lCopyElem(const lListElem *ep)

FUNCTION
          Copies a list element with all its sub-lists and strings.

INPUTS
          const lListElem *ep - element

RESULT
          lListElem* - pointer to copy of 'ep', or NULL on error


1.6.10 lCopyElemHash

NAME
          lCopyElemHash() -- Copies a whole list element

SYNOPSIS
          lListElem* lCopyElemHash(const lListElem *ep, bool isHash)

FUNCTION
          Copies a whole list element

INPUTS
          const lListElem *ep - element
          bool                - generate hash or not

RESULT
          lListElem* - copy of 'ep'


1.6.11 lCopyElemPartialPack

NAME
          lCopyElemPartialPack() -- Copies parts of an element

SYNOPSIS
          int
          lCopyElemPartialPack(lListElem *dst, int *jp, const lListElem *src,
                               const lEnumeration *enp, bool isHash,
                               sge_pack_buffer *pb)

FUNCTION
          Copies elements from list element 'src' to 'dst' using the
          enumeration 'enp' as a mask or copies all elements if
          'enp' is NULL. Copying starts at index *jp. If pb is not NULL
          then the elements will be stored in the packbuffer 'pb' instead of
          being copied.

INPUTS
          lListElem *dst          - destination element
          int *jp                 - Where should the copy operation start
          const lListElem *src    - src element
          const lEnumeration *enp - enumeration
          bool                    - generate hash or not
          sge_pack_buffer *pb     - packbuffer

RESULT
          int - error state
              0 - OK
             -1 - Error


1.6.12 lCopyList

NAME
          lCopyList() -- Copy a list including strings and sublists

SYNOPSIS
          lList* lCopyList(const char *name, const lList *src)

FUNCTION
          Copy a list including strings and sublists. The new list will
          get 'name' as user defined name

INPUTS
          const char *name - list name
          const lList *src - source list

RESULT
          lList* - Copy of 'src' or NULL


1.6.13 lCopyListHash

NAME
          lCopyListHash() -- Copy a list including strings and sublists

SYNOPSIS
          lList* lCopyListHash(const char *name, const lList *src, bool isHash)

FUNCTION
          Copy a list including strings and sublists. The new list will
          get 'name' as user defined name

INPUTS
          const char *name - list name
          const lList *src - source list
          bool hash - if set to true, a hash table is generated

RESULT
          lList* - Copy of 'src' or NULL


1.6.14 lCopySwitchPack

NAME
          lCopySwitchPacPackk() -- Copy parts of elements indedendent from type

SYNOPSIS
          int
          lCopySwitchPack(const lListElem *sep, lListElem *dep, int src_idx,
                      int dst_idx, bool isHash, sge_pack_buffer *pb)

FUNCTION
          Copies from the element 'sep' (using index 'src_idx') to
          the element 'dep' (using index 'dst_idx') in dependence
          of the type or it copies the it directly into pb.

INPUTS
          const lListElem *sep - source element
          lListElem *dep       - destination element
          int src_idx          - source index
          int dst_idx          - destination index
          bool isHash          - create Hash or not
          lEnumeration *ep     - enumeration oiter to be used for sublists
          sge_pack_buffer *pb  - pack buffer

RESULT
          int - error state
              0 - OK
             -1 - Error


1.6.15 lCreateElem

NAME
          lCreateElem() -- Create an element for a specific list

SYNOPSIS
          lListElem* lCreateElem(const lDescr *dp)

FUNCTION
          Create a new list element specified by the descriptor.
          All list element fields are set to zero.

INPUTS
          const lDescr *dp - descriptor

RESULT
          lListElem* - element pointer or NULL


1.6.16 lCreateElemList

NAME
          lCreateElemList() -- Create a list with n elements

SYNOPSIS
          lList* lCreateElemList(const char *listname, const lDescr *descr,
                                 int nr_elem)

FUNCTION
          Create a list with a given descriptor and insert 'nr_elem'
          only initialized elements

INPUTS
          const char *listname - list name
          const lDescr *descr  - descriptor
          int nr_elem          - number of elements

RESULT
          lList* - list or NULL


1.6.17 lCreateList

NAME
          lCreateList() -- Create an empty list

SYNOPSIS
          lList* lCreateList(const char *listname, const lDescr *descr)

FUNCTION
          Create an empty list with a given descriptor and a user defined
          listname.

INPUTS
          const char *listname - list name
          const lDescr *descr  - descriptor

RESULT
          lList* - list pointer, or NULL if one of the arguments is NULL,
                   or if the descriptor contains no fields, or if an error occurs


1.6.18 lCreateListHash

NAME
          lCreateList() -- Create an empty list

SYNOPSIS
          lList* lCreateList(const char *listname, const lDescr *descr, bool hash)

FUNCTION
          Create an empty list with a given descriptor and a user defined
          listname.
          The caller can choose whether hashtables shall be created or not.

INPUTS
          const char *listname - list name
          const lDescr *descr  - descriptor
          bool hash            - shall hashtables be created?

RESULT
          lList* - list pointer or NULL


1.6.19 lDechainElem

NAME
          lDechainElem() -- Remove an element from a list

SYNOPSIS
          lListElem* lDechainElem(lList *lp, lListElem *ep)

FUNCTION
          Remove element 'ep' from list 'lp'. 'ep' is not deleted.

INPUTS
          lList *lp     - list
          lListElem *ep - element

RESULT
          lListElem* - dechained element or NULL

NOTES
          MT-NOTE: lDechainElem() is MT safe


1.6.20 lDechainList

NAME
          lDechainList() -- splits a list into two at the given elem.

SYNOPSIS
          lListElem* lDechainList(lList *lp, lListElem *ep)

FUNCTION
          splits a list into two at the given elem.
          If no target list is given, new one is created, otherwise the splited
          list is appended to the second one.

INPUTS
          lList *source  - list
          lList **target - list
          lListElem *ep  - element
          

NOTES
          MT-NOTE: lDechainList() is MT safe


1.6.21 lDechainObject

NAME
          lDechainObject() -- Remove a element from a list

SYNOPSIS
          lListElem* lDechainObject(lList *lp, int name)

FUNCTION
          Remove element 'ep' from list 'lp'. 'ep' gets not deleted.

INPUTS
          lList *lp     - list
          int name      - attribute name

RESULT
          lListElem* - dechained element or NULL


1.6.22 lFindFirst

NAME
          lFindFirst() -- Returns first element of a list fulfilling a condition

SYNOPSIS
          lListElem* lFindFirst(const lList *slp, const lCondition *cp)

FUNCTION
          Returns the first element fulfilling the condition 'cp' or
          NULL if nothing is found. If the condition is NULL the first
          element is delivered.

INPUTS
          const lList *slp     - list
          const lCondition *cp - condition

RESULT
          lListElem* - element or NULL


1.6.23 lFindLast

NAME
          lFindLast() -- Returns last element fulfilling a condition

SYNOPSIS
          lListElem* lFindLast(const lList *slp, const lCondition *cp)

FUNCTION
          Returns the last element fulfilling the condition 'cp' or NULL
          if nothing is found. If the condition is NULL then the last
          element is delivered.

INPUTS
          const lList *slp     - list
          const lCondition *cp - condition

RESULT
          lListElem* - element or NULL


1.6.24 lFindNext

NAME
          lFindNext() -- Returns the next element fulfilling condition

SYNOPSIS
          lListElem* lFindNext(const lListElem *ep, const lCondition *cp)

FUNCTION
          Returns the next element fulfilling the condition 'cp' or NULL
          if nothing is found. If condition is NULL than the following
          element is delivered.

INPUTS
          const lListElem *ep  - element
          const lCondition *cp - condition

RESULT
          lListElem* - element or NULL


1.6.25 lFindPrev

NAME
          lFindPrev() -- Returns previous element fulfilling condition

SYNOPSIS
          lListElem* lFindPrev(const lListElem *ep, const lCondition *cp)

FUNCTION
          Returns the previous element fulfilling the condition 'cp' or
          NULL if nothing is found. If condition is NULL than the following
          element is delivered.

INPUTS
          const lListElem *ep  - element
          const lCondition *cp - condition

RESULT
          lListElem* - element or NULL


1.6.26 lFirst

NAME
          lFirst() -- Return the first element of a list

SYNOPSIS
          lListElem* lFirst(const lList *slp)

FUNCTION
          Return the first element of a list.

INPUTS
          const lList *slp - list

RESULT
          lListElem* - first element or NULL


1.6.27 lFreeElem

NAME
          lFreeElem() -- Free a element including strings and sublists

SYNOPSIS
          void lFreeElem(lListElem **ep)

FUNCTION
          Free an element ep allocated by lCreateElem, including strings
          and sublists.  Do nothing if ep is NULL.

INPUTS
          lListElem **ep - element, will be set to NULL

NOTES
          MT-NOTE: lRemoveElem() is MT safe


1.6.28 lFreeList

NAME
          lFreeList() -- Frees a list including all elements

SYNOPSIS
          void lFreeList(lList **lp)

FUNCTION
          Frees a list including all elements

INPUTS
          lList **lp - list

RESULT
          void

NOTES
          MT-NOTE: lFreeList() is MT safe


1.6.29 lGetElemDescr

NAME
          lGetElemDescr() -- returns the descriptor of a list element

SYNOPSIS
          const lDescr* lGetElemDescr(const lListElem* ep)

FUNCTION
          returns the descriptor of a list element

INPUTS
          lListElem* ep - CULL element

RESULT
          Pointer to descriptor


1.6.30 lGetElemIndex

NAME
          lGetElemIndex() -- returns the index of element in list lp

SYNOPSIS
          int lGetElemIndex(const lListElem* ep, const lList* lp)

FUNCTION
          returns the index of element in list lp

INPUTS
          lListElem* ep - element
          lList* lp     - list

RESULT
          index number


1.6.31 lGetListDescr

NAME
          lGetListDescr() -- Returns the descriptor of a list

SYNOPSIS
          const lDescr* lGetListDescr(const lList *lp)

FUNCTION
          Returns the descriptor of a list

INPUTS
          const lList *lp - list pointer

RESULT
          const lDescr* - destriptor

NOTES
          MT-NOTE: lGetListDescr() is MT safe


1.6.32 lGetListName

NAME
          lGetListName() -- returns the user defined name of a list

SYNOPSIS
          const char* lGetListName(const lList *lp)

FUNCTION
          Returns the user defined name of a list.

INPUTS
          const lList *lp - list pointer

RESULT
          const char* - list name


1.6.33 lGetNumberOfElem

NAME
          lGetNumberOfElem() -- Returns the number of elements in a list

SYNOPSIS
          int lGetNumberOfElem(const lList *lp)

FUNCTION
          Returns the number of elements in a list

INPUTS
          const lList *lp - list pointer

RESULT
          int - number of elements

NOTES
          MT-NOTE: lGetNumberOfElem() is MT safe


1.6.34 lGetNumberOfRemainingElem

NAME
          lGetNumberOfRemainingElem() -- Number of following elements

SYNOPSIS
          int lGetNumberOfRemainingElem(const lListElem *ep)

FUNCTION
          Returns the number of elements behind an element

INPUTS
          const lListElem *ep - element

RESULT
          int - number of elements


1.6.35 lInsertElem

NAME
          lInsertElem() -- Insert element after another in a list

SYNOPSIS
          int lInsertElem(lList *lp, lListElem *ep, lListElem *new)

FUNCTION
          Insert a 'new' element after element 'ep' into list 'lp'.
          If 'ep' is NULL then 'new' will be the first element in 'lp'.

INPUTS
          lList *lp      - list
          lListElem *ep  - element
          lListElem *new - new element

RESULT
          int - error state
              0 - OK
             -1 - Error


1.6.36 lLast

NAME
          lLast() -- Returns the last element of a list

SYNOPSIS
          lListElem* lLast(const lList *slp)

FUNCTION
          Returns the last element of a list.

INPUTS
          const lList *slp - list

RESULT
          lListElem* - last element or NULL


1.6.37 lListElem_clear_changed_info

NAME
          lListElem_clear_changed_info() -- clear changed info of an object

SYNOPSIS
          bool
          lListElem_clear_changed_info(lListElem *ep)

FUNCTION
          clears in an object the information, which fields have been changed.
          Recursively walks down sublists.

INPUTS
          lListElem *ep - the list element to update

RESULT
          bool - true on success, else false

SEE ALSO


1.6.38 lList_clear_changed_info

NAME
          lList_clear_changed_info() -- clear changed info of a list

SYNOPSIS
          bool
          lList_clear_changed_info(lList *lp)

FUNCTION
          Clears in a list the information, if the list itself has been changed
          (objects added/removed) and which fields have changed in the lists
          objects.

INPUTS
          lList *lp - the list to update

RESULT
          bool - true on success, else false

SEE ALSO


1.6.39 lModifyWhat

NAME
          lModifyWhat() -- Copy parts of an element

SYNOPSIS
          int lModifyWhat(lListElem *dst, const lListElem *src,
                          const lEnumeration *enp)

FUNCTION
          Copies elements from 'src' to 'dst' using the enumeration 'enp'
          as a mask or copies all elements if 'enp' is NULL

INPUTS
          lListElem *dst          - destination element
          const lListElem *src    - source element
          const lEnumeration *enp - mask

RESULT
          int - error state
              0 - OK
             -1 - Error


1.6.40 lNext

NAME
          lNext() -- Returns the next element or NULL

SYNOPSIS
          lListElem* lNext(const lListElem *sep)

FUNCTION
          Returns the next element of 'sep' or NULL

INPUTS
          const lListElem *sep - element

RESULT
          lListElem* - next element or NULL


1.6.41 lOverrideStrList

NAME
          lOverrideStrList() -- Merge two lists

SYNOPSIS
          int lOverrideStrList(lList *lp0, lList *lp1, int nm, const char *str)

FUNCTION
          Merge two lists of equal type, and replace values in the first list
          with values from the second list.
          
          This only applies to values equal str.

INPUTS
          lList *lp0      - first list
          lList *lp1      - second list
          int nm          - field name used for merging
          const char *str - override criteria, e.g. "-q" for "override all -q switches,
                            all others are simply merged"

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lOverrideStrList() is MT safe


1.6.42 lPSortList

NAME
          lPSortList() -- Sort a given list

SYNOPSIS
          int lPSortList(lList * lp, const char *fmt, ...)

FUNCTION
          Sort a given list. The sorting order is given by the format
          string and additional arguments.

INPUTS
          lList * lp      - list
          const char *fmt - format string (see lParseSortOrder())
          ...             - additional arguments (see lParseSortOrder())

RESULT
          int - error state
              0 - OK
             -1 - Error

SEE ALSO


1.6.43 lPrev

NAME
          lPrev() -- Returns the previous element or NULL

SYNOPSIS
          lListElem* lPrev(const lListElem *sep)

FUNCTION
          Returns the previous element or NULL.

INPUTS
          const lListElem *sep - element

RESULT
          lListElem* - previous element


1.6.44 lRemoveElem

NAME
          lRemoveElem() -- Delete a element from a list

SYNOPSIS
          int lRemoveElem(lList *lp, lListElem *ep)

FUNCTION
          Remove element 'ep' from list 'lp'. 'ep' gets deleted.

INPUTS
          lList *lp     - list
          lListElem **ep - element, will be set to NULL

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lRemoveElem() is MT safe


1.6.45 lSortList

NAME
          lSortList() -- Sort list according to sort order object

SYNOPSIS
          int lSortList(lList *lp, const lSortOrder *sp)

FUNCTION
          Sort list according to sort order object.

INPUTS
          lList *lp            - list
          const lSortOrder *sp - sort order object

RESULT
          int - error state
              0 - OK
             -1 - Error


1.6.46 lUniqHost

NAME
          lUniqHost() -- Uniq a host key list

SYNOPSIS
          int lUniqHost(lList *lp, int keyfield)

FUNCTION
          Uniq a hostname key list.

INPUTS
          lList *lp    - list
          int keyfield - host field

RESULT
          int - error state
              0 - OK
             -1 - Error


1.6.47 lUniqStr

NAME
          lUniqStr() -- Uniq a string key list

SYNOPSIS
          int lUniqStr(lList *lp, int keyfield)

FUNCTION
          Uniq a string key list

INPUTS
          lList *lp    - list
          int keyfield - string field name id

RESULT
          int - error state
              0 - OK
             -1 - Error


1.6.48 lWriteElem

NAME
          lWriteElem() -- Write a element to stderr

SYNOPSIS
          void lWriteElem(const lListElem *ep)

FUNCTION
          Write a list element to stderr with all its sub-lists

INPUTS
          const lListElem *ep - element


1.6.49 lWriteElemTo

NAME
          lWriteElemTo() -- Write a element to file stream

SYNOPSIS
          void lWriteElemTo(const lListElem *ep, FILE *fp)

FUNCTION
          Write an element to a file with all its sub-lists

INPUTS
          const lListElem *ep - element
          FILE *fp            - file stream


1.6.50 lWriteList

NAME
          lWriteList() -- Write a list to stderr

SYNOPSIS
          void lWriteList(const lList *lp)

FUNCTION
          Write a list to stderr

INPUTS
          const lList *lp - list


1.6.51 lWriteListTo

NAME
          lWriteListTo() -- Write a list to a file stream

SYNOPSIS
          void lWriteListTo(const lList *lp, FILE *fp)

FUNCTION
          Write a list to a file stream

INPUTS
          const lList *lp - list
          FILE *fp        - file stream


1.6.52 mt_do_hashing

NAME
          mt_do_hashing() -- is there hash access for a field

SYNOPSIS
          int mt_do_hashing(int mt)

FUNCTION
          Returns the information if hashing is active for a cull object field
          given the multitype attribute of a cull descriptor.

INPUTS
          int mt - mt (multitype) struct element of a field descriptor

RESULT
          int - 1, if hashing is requested, else 0


1.6.53 mt_get_type

NAME
          mt_get_type() -- get data type for cull object field

SYNOPSIS
          int mt_get_type(int mt)

FUNCTION
          Returns the data type of a cull object field given the multitype
          attribute of a cull descriptor.

INPUTS
          int mt - mt (multitype) struct element of a field descriptor

RESULT
          int - cull data type enum value (from _enum_lMultiType)

EXAMPLE
          switch(mt_get_type(descr[i].mt)) {
             case lFloatT:
                ...
          }

NOTES
          MT-NOTE: mt_get_type() is MT safe


1.6.54 mt_is_unique

NAME
          mt_is_unique() -- is the cull object field unique

SYNOPSIS
          int mt_is_unique(int mt)

FUNCTION
          Returns the information if a certain cull object field is unique within
          a cull list given the multitype attribute of a cull descriptor.

INPUTS
          int mt - mt (multitype) struct element of a field descriptor

RESULT
          int - 1 = unique, 0 = not unique

EXAMPLE
          if(mt_is_unique(descr[i].mt)) {
             // check for uniqueness before inserting new elemente into a list
             if(lGetElemUlong(....) != NULL) {
                WARNING((SGE_EVENT, MSG_DUPLICATERECORD....));
                DRETURN(NULL);
             }
          }


1.7 multitype


1.7.1 _lGetPosInDescr

NAME
          _lGetPosInDescr() -- Returns position of a name in a descriptor

SYNOPSIS
          int _lGetPosInDescr(const lDescr *dp, int name)

FUNCTION
          Returns position of a name in a descriptor array. Does a full search
          in the descriptor even if the element is not a reduced element.

INPUTS
          const lDescr *dp - descriptor
          int name         - name

RESULT
          int - position or -1 if not found


1.7.2 lAddDouble

NAME
          lAddDouble() -- Adds a double offset to the double field

SYNOPSIS
          lAddDouble(lListElem *ep, int name, lDouble offset)

FUNCTION
          The 'offset' is added to the double field 'name' of
          the CULL element 'ep'.

INPUTS
          lListElem *ep  - element
          int name       - field name id
          lDouble offset - the offset

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.3 lAddElemHost

NAME
          lAddElemHost() -- Adds a hostname to a hostname list

SYNOPSIS
          lListElem* lAddElemHost(lList **lpp, int nm, const char *str,
                                  const lDescr *dp)

FUNCTION
          Adds a hostname to a hostname list

INPUTS
          lList **lpp      - list reference
          int nm           - hostname field id
          const char *str  - new hostname
          const lDescr *dp - descriptor of new element

RESULT
          lListElem* - new element or NULL


1.7.4 lAddElemStr

NAME
          lAddElemStr() -- adds a string to the string list

SYNOPSIS
          lListElem* lAddElemStr(lList **lpp, int nm, const char *str,
                                 const lDescr *dp)

FUNCTION
          This function adds a new element of type dp to the list referenced
          by lpp. The field nm will get the initial value str.

INPUTS
          lList** lpp - list reference
          int nm      - field id
          char* str   - initial value
          lDescr* dp  - Type of the object which will be added

RESULT
          lListElem* -


1.7.5 lAddElemUlong

NAME
          lAddElemUlong() -- adds a ulong to the ulong list

SYNOPSIS
          lListElem* lAddElemUlong(lList** lpp, int nm, lUlong val,
                                   const lDescr* dp)

FUNCTION
          Adds an new element to a list lpp where one field nm within
          the new element gets an initial value val

INPUTS
          lList** lpp       - list
          int nm            - field in the new element which will get
                              value val
          lUlong val        - initial value for nm
          const lDescr* dp  - type of the list (e.g. JB_Type)

RESULT
          NULL on error
          or pointer to the added element


1.7.6 lAddElemUlong64

NAME
          lAddElemUlong64() -- adds a ulong64 to the ulong64 list

SYNOPSIS
          lListElem* lAddElemUlong64(lList** lpp, int nm, lUlong64 val,
                                   const lDescr* dp)

FUNCTION
          Adds an new element to a list lpp where one field nm within
          the new element gets an initial value val

INPUTS
          lList** lpp       - list
          int nm            - field in the new element which will get
                              value val
          lUlong64 val      - initial value for nm
          const lDescr* dp  - type of the list (e.g. JB_Type)

RESULT
          NULL on error
          or pointer to the added element


1.7.7 lAddSubHost

NAME
          lAddSubHost() -- adds a string to the string sublist

SYNOPSIS
          lListElem* lAddSubHost(lListElem* ep, int nm, char* str,
                                 int snm, lDescr* dp)

FUNCTION
          This function add a new element into a sublist snm of an
          element ep. The field nm of this added element will get the
          initial value specified with str.

INPUTS
          lListElem* ep - list element
          int nm        - field id contained in the element which
                          will be created
          char* str     - initial value if nm
          int snm       - field id of the sublist within ep
          lDescr* dp    - Type of the new element

RESULT
          NULL in case of error
          otherwise pointer to the added element


1.7.8 lAddSubStr

NAME
          lAddSubStr() -- adds a string to the string sublist

SYNOPSIS
          lListElem* lAddSubStr(lListElem* ep, int nm, char* str,
                                int snm, lDescr* dp)

FUNCTION
          This function add a new element into a sublist snm of an
          element ep. The field nm of this added element will get the
          initial value specified with str.

INPUTS
          lListElem* ep - list element
          int nm        - field id contained in the element which
                          will be created
          char* str     - initial value if nm
          int snm       - field id of the sublist within ep
          lDescr* dp    - Type of the new element

RESULT
          NULL in case of error
          otherwise pointer to the added element


1.7.9 lAddSubUlong

NAME
          lAddSubUlong() -- adds ulong to the ulong sublist of element ep

SYNOPSIS
          lListElem* lAddSubUlong(lListElem* ep, int nm, lUlong val,
                                  int snm, const lDescr* dp)

FUNCTION
          This function adds a new element into the sublist snm of the
          element ep. The field nm of the added element will get the
          initial value val.

INPUTS
          lListElem* ep       - element
          int nm              - field which will get value val
          lUlong val          - initial value for nm
          int snm             - sublist within ep where the element
                                will be added
          const lDescr* dp    - Type of the new element (e.g. JB_Type)

RESULT
          NULL in case of error
          or the pointer to the new element


1.7.10 lAddSubUlong64

NAME
          lAddSubUlong64() -- adds ulong64 to the ulong64 sublist of element ep

SYNOPSIS
          lListElem* lAddSubUlong64(lListElem* ep, int nm, lUlong64 val,
                                  int snm, const lDescr* dp)

FUNCTION
          This function adds a new element into the sublist snm of the
          element ep. The field nm of the added element will get the
          initial value val.

INPUTS
          lListElem* ep       - element
          int nm              - field which will get value val
          lUlong64 val        - initial value for nm
          int snm             - sublist within ep where the element
                                will be added
          const lDescr* dp    - Type of the new element (e.g. JB_Type)

RESULT
          NULL in case of error
          or the pointer to the new element


1.7.11 lAddUlong

NAME
          lAddUlong() -- Adds a lUlong offset to the lUlong field

SYNOPSIS
          int lAddUlong(lListElem *ep, int name, lUlong offset)

FUNCTION
          The 'offset' is added to the lUlong field 'name' of
          the CULL element 'ep'.

INPUTS
          lListElem *ep - element
          int name      - field name id
          lUlong offset - the offset

RESULT
          int -

EXAMPLE
          int - error state
              0 - OK
             -1 - Error


1.7.12 lAddUlong64

NAME
          lAddUlong64() -- Adds a lUlong64 offset to the lUlong64 field

SYNOPSIS
          int lAddUlong64(lListElem *ep, int name, lUlong64 offset)

FUNCTION
          The 'offset' is added to the lUlong64 field 'name' of
          the CULL element 'ep'.

INPUTS
          lListElem *ep   - element
          int name        - field name id
          lUlong64 offset - the offset

RESULT
          int -

EXAMPLE
          int - error state
              0 - OK
             -1 - Error


1.7.13 lCopyDescr

NAME
          lCopyDescr() -- Copies a descriptor

SYNOPSIS
          lDescr* lCopyDescr(const lDescr *dp)

FUNCTION
          Returns a pointer to a copied descriptor, has to be freed by
          the user.

INPUTS
          const lDescr *dp - descriptor

RESULT
          lDescr* - descriptor pointer or NULL in case of error


1.7.14 lCountDescr

NAME
          lCountDescr() -- Returns the size of a descriptor

SYNOPSIS
          int lCountDescr(const lDescr *dp)

FUNCTION
          Returns the size of a descriptor excluding lEndT Descr.

INPUTS
          const lDescr *dp - pointer to descriptor

RESULT
          int - size or -1 on error

NOTES
          MT-NOTE: lCountDescr() is MT safe


1.7.15 lDelElemCaseStr

NAME
          lDelElemCaseStr() -- removes elem specified by a string field nm

SYNOPSIS
          int lDelElemCaseStr(lList** lpp, int nm, const char* str)

FUNCTION
          This function removes an element specified by nm and str from
          the list lpp.
          If the list does not contain elements after this operation, it
          will be deleted too.

INPUTS
          lList** lpp       - list
          int nm            - field id of the element which
                              should be removed
          const char* str   - value of the attribute identified by nm

RESULT
          1 if the element was found and removed
          0 in case of error


1.7.16 lDelElemHost

NAME
          lDelElemHost() -- removes elem specified by a lHostT field nm

SYNOPSIS
          int lDelElemHost(lList** lpp, int nm, const char* str)

FUNCTION
          removes an element specified by a string field nm and the
          hostname str from the list referenced by lpp.
          If it is the last element within lpp the list itself will be
          deleted.

INPUTS
          lList** lpp       - list
          int nm            - field id
          const char* str   - string

RESULT
          1 if the host element was found and removed
          0 in case of an error


1.7.17 lDelElemStr

NAME
          lDelElemStr() -- removes element specified by a string field nm

SYNOPSIS
          int lDelElemStr(lList** lpp, int nm, const char* str)

FUNCTION
          This function removes an element from the list referenced by
          lpp, which is identified by the field nm and the string str

INPUTS
          lList** lpp - list reference
          int nm      - field id
          const char* str   - string

RESULT
          1 if the element was found and removed
          0 in case of an error


1.7.18 lDelElemUlong

NAME
          lDelElemUlong() -- removes elem specified by a ulong field nm

SYNOPSIS
          int lDelElemUlong(lList** lpp, int nm, lUlong val)

FUNCTION
          This function removes an element specified by a ulong field nm
          with the value val from the list referenced by lpp.

INPUTS
          lList** lpp - reference to a list
          int nm      - field id
          lUlong val  - value if nm

RESULT
          1 element was found and removed
          0 an error occurred


1.7.19 lDelElemUlong64

NAME
          lDelElemUlong64() -- removes elem specified by a ulong64 field nm

SYNOPSIS
          int lDelElemUlong64(lList** lpp, int nm, lUlong64 val)

FUNCTION
          This function removes an element specified by a ulong64 field nm
          with the value val from the list referenced by lpp.

INPUTS
          lList** lpp    - reference to a list
          int nm         - field id
          lUlong64 val   - value if nm

RESULT
          1 element was found and removed
          0 an error occurred


1.7.20 lDelSubCaseStr

NAME
          lDelSubCaseStr() -- removes elem specified by a string field nm

SYNOPSIS
          int lDelSubCaseStr(lListElem* ep, int nm, const char* str,
                             int snm)

FUNCTION
          removes an element specified by a string field nm an a string
          str which is contained in the sublist snm of ep

INPUTS
          lListElem* ep       - element
          int nm              - field id
          const char* str     - string
          int snm             - filed id of the element within element

RESULT
          1 if the element was found an removed
          0 in case of error


1.7.21 lDelSubStr

NAME
          lDelSubStr() -- removes an element from a sublist

SYNOPSIS
          int lDelSubStr(lListElem* ep, int nm, const char* str, int snm)

FUNCTION
          This function removes an element specified by a string field
          nm and the string str supposed to be in the sublist snm of the
          element ep.

INPUTS
          lListElem* ep - element
          int nm        - field id
          const char* str     - string
          int snm       - field id of a sublist of ep

RESULT
          1 element was found and removed
          0 in case of an error


1.7.22 lDelSubUlong

NAME
          lDelSubUlong() -- removes an element from a sublist

SYNOPSIS
          int lDelSubUlong(lListElem* ep, int nm, lUlong val, int snm)

FUNCTION
          This function removes an element specified by a ulong field nm
          and the ulong val supposed to be in the sublist snm of the
          element ep

INPUTS
          lListElem* ep - element
          int nm        - field id
          lUlong val    - value
          int snm       - field id of the sublist in ep

RESULT
          1 element was found and removed
          0 in case of an error


1.7.23 lDelSubUlong64

NAME
          lDelSubUlong64() -- removes an element from a sublist

SYNOPSIS
          int lDelSubUlong64(lListElem* ep, int nm, lUlong64 val, int snm)

FUNCTION
          This function removes an element specified by a ulong field nm
          and the ulong64 val supposed to be in the sublist snm of the
          element ep

INPUTS
          lListElem* ep - element
          int nm        - field id
          lUlong64 val  - value
          int snm       - field id of the sublist in ep

RESULT
          1 element was found and removed
          0 in case of an error


1.7.24 lGetBool

NAME
          lGetBool() -- Returns the boolean value for a field name

SYNOPSIS
          lBool lGetBool(const lListElem *ep, int name)

FUNCTION
          Returns the boolean value for a field name

INPUTS
          const lListElem *ep - element
          int name            - field name

RESULT
          lBool - boolean


1.7.25 lGetChar

NAME
          lGetChar() -- Returns the char value for a field name

SYNOPSIS
          lChar lGetChar(const lListElem *ep, int name)

FUNCTION
          Returns the char value for a field name

INPUTS
          const lListElem *ep - element
          int name            - field name

RESULT
          lChar - character


1.7.26 lGetDouble

NAME
          lGetDouble() -- Returns the double value for field name

SYNOPSIS
          lDouble lGetDouble(const lListElem *ep, int name)

FUNCTION
          Returns the double value for field name

INPUTS
          const lListElem *ep - element
          int name            - field name value

RESULT
          lDouble - double value


1.7.27 lGetElemCaseStr

NAME
          lGetElemCaseStr() -- returns element specified by a string field

SYNOPSIS
          lListElem* lGetElemCaseStr(const lList* lp, int nm,
                                     const char* str)

FUNCTION
          This functions returns an element specified by a string
          field nm and str from the list lp.

INPUTS
          const lList* lp - Pointer to a list
          int nm          - Constant specifying an attribute within an
                            element of lp
          const char* str - string

RESULT
          NULL when element is not found or an error occurred
          otherwise the pointer to an element


1.7.28 lGetElemHost

NAME
          lGetElemHost() -- returns an element specified by a hostname

SYNOPSIS
          lListElem* lGetElemHost(const lList* lp, int nm, const char* str)

FUNCTION
          returns an element specified by a string field nm and a hostname
          from the list lp

INPUTS
          const lList* lp - Pointer to an element which contains a hostname
          int nm          - host field containing the hostname
          const char* str - hostname

RESULT
          NULL when the list does not contain the element or in case of
          error otherwise pointer to an element


1.7.29 lGetElemHostFirst

NAME
          lGetElemHostFirst() -- lGetElemHostFirst for hostnames

SYNOPSIS
          lListElem* lGetElemHostFirst(const lList *lp, int nm, const char *str,
                                       const void **iterator)

FUNCTION
          lGetElemHostFirst for hostnames

INPUTS
          const lList *lp       - list
          int nm                - hostname field id
          const char *str       - hostname
          const void **iterator - iterator

RESULT
          lListElem* - element or NULL


1.7.30 lGetElemHostNext

NAME
          lGetElemHostNext() -- lGetElemHostNext() for hostnames

SYNOPSIS
          lListElem* lGetElemHostNext(const lList *lp,
                                      int nm,
                                      const char *str,
                                      const void **iterator)

FUNCTION
          lGetElemHostNext() for hostnames

INPUTS
          const lList *lp       - list
          int nm                - hostname field id
          const char *str       - hostname
          const void **iterator - iterator

RESULT
          lListElem* - element or NULL


1.7.31 lGetElemStr

NAME
          lGetElemStr() -- returns element specified by a string field nm

SYNOPSIS
          lListElem* lGetElemStr(const lList* lp, int nm, const char* str)

FUNCTION
          returns an element specified by a string field nm from list lp

INPUTS
          const lList* lp - list
          int nm    - field id
          const char* str - value

RESULT
          NULL when element was not found or if an error occurred
          otherwise pointer to element


1.7.32 lGetElemStrFirst

NAME
          lGetElemStrFirst() -- Find first element with a certain string

SYNOPSIS
          lListElem* lGetElemStrFirst(const lList *lp, int nm,
                                      const char *str, const void **iterator)

FUNCTION
          Returns the first element within 'lp' where the attribute
          with field name id 'nm' is equivalent with 'str'. 'iterator'
          will be filled with context information which will make it
          possible to use 'iterator' with lGetElemStrNext() to get
          the next element.
          

INPUTS
          const lList *lp       - list
          int nm                - field name id
          const char *str       - string to be compared
          const void **iterator - iterator

RESULT
          lListElem* - first element or NULL


1.7.33 lGetElemStrLike

NAME
          lGetElemStrLike() -- returns element specified by a wildcard

SYNOPSIS
          lListElem* lGetElemStrLike(const lList* lp, int nm,
                                     const char* str)

FUNCTION
          returns an element specified by a string field nm from the
          list lp and uses a trailing '*' as a wildcard, e.g. 'OAport'
          matches 'OA*'

INPUTS
          const lList* lp - list pointer
          int nm    - field id
          const char* str - wildcard string

RESULT
          NULL if element was not found or in case of error
          otherwise pointer to element


1.7.34 lGetElemStrNext

NAME
          lGetElemStrNext() -- Get next element with a certain string

SYNOPSIS
          lListElem* lGetElemStrNext(const lList *lp,
                                     int nm,
                                     const char *str,
                                     const void **iterator)

FUNCTION
          Returns a element within list 'lp' where the attribute with
          field name id 'nm' is equivalent with 'str'. The function
          uses 'iterator' as input. 'iterator' contains context
          information which where fillen in in a previous call of
          lGetElemStrFirst().

INPUTS
          const lList *lp       - list
          int nm                - string field name id
          const char *str       - string
          const void **iterator - iterator

RESULT
          lListElem* - next element or NULL


1.7.35 lGetElemUlong

NAME
          lGetElemUlong() -- returns element specified by a ulong field nm

SYNOPSIS
          lListElem* lGetElemUlong(const lList* lp, int nm, lUlong val)

FUNCTION
          returns an element specified by a ulong field nm an an ulong
          value val from list lp

INPUTS
          const lList* lp  - list pointer
          int nm     - field id
          lUlong val - unsigned long value

RESULT
          NULL if element was not found or an error occurred
          otherwise pointer to element


1.7.36 lGetElemUlong64

NAME
          lGetElemUlong64() -- returns element specified by a ulong64 field nm

SYNOPSIS
          lListElem* lGetElemUlong64(const lList* lp, int nm, lUlong64 val)

FUNCTION
          returns an element specified by a ulong64 field nm an an ulong64
          value val from list lp

INPUTS
          const lList* lp  - list pointer
          int nm     - field id
          lUlong64 val - unsigned long value

RESULT
          NULL if element was not found or an error occurred
          otherwise pointer to element


1.7.37 lGetElemUlong64First

NAME
          lGetElemUlong64First() -- Find first ulong64 within a list

SYNOPSIS
          lListElem* lGetElemUlong64First(const lList *lp,
                                        int nm,
                                        lUlong64 val,
                                        const void **iterator)

FUNCTION
          Return the first element of list 'lp' where the attribute
          with field name id 'nm' is equivalent with 'val'. Context
          information will be stored in 'iterator'. 'iterator' might
          be used in lGetElemUlong64Next() to get the next element.

INPUTS
          const lList *lp       - list
          int nm                - ulong64 field name id
          lUlong64 val          - ulong64 value
          const void **iterator - iterator

RESULT
          lListElem* - element or NULL


1.7.38 lGetElemUlong64Next

NAME
          lGetElemUlong64Next() -- Find next ulong64 element within a list

SYNOPSIS
          lListElem* lGetElemUlong64Next(const lList *lp,
                                         int nm,
                                         lUlong64 val,
                                         const void **iterator)

FUNCTION
          This function might be used after a call to lGetElemUlong64First().
          It expects 'iterator' to contain context information which
          makes it possible to find the next element within list 'lp'
          where the attribute with field name id 'nm' is equivalent with
          'val'.

INPUTS
          const lList *lp       - list
          int nm                - ulong64 field name id
          lUlong64 val          - value
          const void **iterator - iterator

RESULT
          lListElem* - next element or NULL


1.7.39 lGetElemUlongFirst

NAME
          lGetElemUlongFirst() -- Find first ulong within a list

SYNOPSIS
          lListElem* lGetElemUlongFirst(const lList *lp,
                                        int nm,
                                        lUlong val,
                                        const void **iterator)

FUNCTION
          Return the first element of list 'lp' where the attribute
          with field name id 'nm' is equivalent with 'val'. Context
          information will be stored in 'iterator'. 'iterator' might
          be used in lGetElemUlongNext() to get the next element.

INPUTS
          const lList *lp       - list
          int nm                - ulong field anme id
          lUlong val            - ulong value
          const void **iterator - iterator

RESULT
          lListElem* - element or NULL


1.7.40 lGetElemUlongNext

NAME
          lGetElemUlongNext() -- Find next ulong element within a list

SYNOPSIS
          lListElem* lGetElemUlongNext(const lList *lp,
                                       int nm,
                                       lUlong val,
                                       const void **iterator)

FUNCTION
          This function might be used after a call to lGetElemUlongFirst().
          It expects 'iterator' to contain context information which
          makes it possible to find the next element within list 'lp'
          where the attribute with field name id 'nm' is equivalent with
          'val'.

INPUTS
          const lList *lp       - list
          int nm                - ulong field name id
          lUlong val            - value
          const void **iterator - iterator

RESULT
          lListElem* - next element or NULL


1.7.41 lGetFloat

NAME
          lGetFloat() -- Returns float value for field name

SYNOPSIS
          lFloat lGetFloat(const lListElem *ep, int name)

FUNCTION
          Returns float value for field name

INPUTS
          const lListElem *ep - element
          int name            - field name

RESULT
          lFloat - float


1.7.42 lGetHost

NAME
          lGetHost() -- Return hostname string for specified field

SYNOPSIS
          const char* lGetHost(const lListElem *ep, int name)

FUNCTION
          This procedure returns the hostname string for the field name,
          but doesn't copy the string (runtime type checking)

INPUTS
          const lListElem *ep - list element pointer
          int name            - name of list element

RESULT
          const char* - value of list entry


1.7.43 lGetInt

NAME
          lGetInt() -- Returns the int value for field name

SYNOPSIS
          lInt lGetInt(const lListElem *ep, int name)

FUNCTION
          Returns the int value for field name

INPUTS
          const lListElem *ep - element
          int name            - field name id

RESULT
          lInt - int


1.7.44 lGetList

NAME
          lGetList() -- Returns the CULL list for a field name

SYNOPSIS
          lList* lGetList(const lListElem *ep, int name)

FUNCTION
          Returns the CULL list for a field name

INPUTS
          const lListElem *ep - element
          int name            - field name value

RESULT
          lList* - CULL list pointer


1.7.45 lGetLong

NAME
          lGetLong() -- Returns the long value for a field name

SYNOPSIS
          lLong lGetLong(const lListElem *ep, int name)

FUNCTION
          Returns the long value for a field name

INPUTS
          const lListElem *ep - element
          int name            - name

RESULT
          lLong - long


1.7.46 lGetObject

NAME
          lGetObject() -- Returns the CULL object for a field name

SYNOPSIS
          lListElem* lGetObject(const lListElem *ep, int name)

FUNCTION
          Returns the CULL object for a field name

INPUTS
          const lListElem *ep - element
          int name            - field name value

RESULT
          lListElem* - CULL list element pointer


1.7.47 lGetOrCreateList

NAME
          lGetOrCreateList() -- Returns the CULL list for a field name

SYNOPSIS
          lList*
          lGetOrCreateList(lListElem *ep, int name, const char *list_name,
                           const lDescr *descr)

FUNCTION
          Returns the CULL list for a field name.
          If the list does not yet exist, create it.

INPUTS
          lListElem *ep         - element
          int name              - field name value
          const char *list_name - list name for list creation
          const lDescr *descr   - descriptor for list creation

RESULT
          lList* - CULL list pointer

NOTES
          MT-NOTE: lGetOrCreateList() is MT safe

SEE ALSO


1.7.48 lGetPosBool

NAME
          lGetPosBool() -- Returns the boolean value at position pos

SYNOPSIS
          lChar lGetPosBool(const lListElem *ep, int pos)

FUNCTION
          Returns the boolean value at position pos

INPUTS
          const lListElem *ep - element
          int pos             - position

RESULT
          lBool - boolean


1.7.49 lGetPosChar

NAME
          lGetPosChar() -- Returns the char value at position pos

SYNOPSIS
          lChar lGetPosChar(const lListElem *ep, int pos)

FUNCTION
          Returns the char value at position pos

INPUTS
          const lListElem *ep - element
          int pos             - position

RESULT
          lChar - character


1.7.50 lGetPosDouble

NAME
          lGetPosDouble() -- Returns a double value at pos

SYNOPSIS
          lDouble lGetPosDouble(const lListElem *ep, int pos)

FUNCTION
          Returns a double value at pos

INPUTS
          const lListElem *ep - element
          int pos             - pos

RESULT
          lDouble - double value


1.7.51 lGetPosFloat

NAME
          lGetPosFloat() -- Returns the float value at position pos

SYNOPSIS
          lFloat lGetPosFloat(const lListElem *ep, int pos)

FUNCTION
          Returns the float value at position pos

INPUTS
          const lListElem *ep - element
          int pos             - position

RESULT
          lFloat - float


1.7.52 lGetPosHost

NAME
          lGetPosHost() -- Returns the hostname value at position pos

SYNOPSIS
          const char* lGetPosHost(const lListElem *ep, int pos)

FUNCTION
          Returns the hostname value at position pos

INPUTS
          const lListElem *ep - element
          int pos             - position

RESULT
          const char* - Hostname


1.7.53 lGetPosInDescr

NAME
          lGetPosInDescr() -- Returns position of a name in a descriptor

SYNOPSIS
          int lGetPosInDescr(const lDescr *dp, int name)

FUNCTION
          Returns position of a name in a descriptor array

INPUTS
          const lDescr *dp - descriptor
          int name         - name

RESULT
          int - position or -1 if not found


1.7.54 lGetPosInt

NAME
          lGetPosInt() -- Returns the int value at position

SYNOPSIS
          lInt lGetPosInt(const lListElem *ep, int pos)

FUNCTION
          Returns the int value at position 'pos'

INPUTS
          const lListElem *ep - element pointer
          int pos             - position id

RESULT
          lInt - int


1.7.55 lGetPosList

NAME
          lGetPosList() -- Returns the CULL list at position pos (no copy)

SYNOPSIS
          lList* lGetPosList(const lListElem *ep, int pos)

FUNCTION
          Returns the CULL list at position pos (no copy)

INPUTS
          const lListElem *ep - element
          int pos             - pos value

RESULT
          lList* - CULL list pointer


1.7.56 lGetPosLong

NAME
          lGetPosLong() -- Returns the long value at position pos

SYNOPSIS
          lLong lGetPosLong(const lListElem *ep, int pos)

FUNCTION
          Returns the long value at position pos

INPUTS
          const lListElem *ep - element
          int pos             - position

RESULT
          lLong - long


1.7.57 lGetPosName

NAME
          lGetPosName() -- Returns name at position

SYNOPSIS
          int lGetPosName(const lDescr *dp, int pos)

FUNCTION
          Returns the name at specified position in a descriptor array. The
          Position must be inside the valid range of the descriptor. Returns
          NoName if descriptor is NULL or pos < 0.

INPUTS
          const lDescr *dp - Descriptor
          int pos          - Position

RESULT
          int - Name


1.7.58 lGetPosObject

NAME
          lGetPosObject() -- Returns the CULL object at position pos (no copy)

SYNOPSIS
          lList* lGetPosObject(const lListElem *ep, int pos)

FUNCTION
          Returns the CULL object (list element) at position pos (no copy)

INPUTS
          const lListElem *ep - element
          int pos             - pos value

RESULT
          lListElem* - CULL list element pointer


1.7.59 lGetPosRef

NAME
          lGetPosRef() -- Returns the reference at position pos

SYNOPSIS
          lRef lGetPosRef(const lListElem *ep, int pos)

FUNCTION
          Returns the reference at position pos

INPUTS
          const lListElem *ep - element
          int pos             - position

RESULT
          lRef - reference (pointer)


1.7.60 lGetPosString

NAME
          lGetPosString() -- Returns the string ptr value at position pos

SYNOPSIS
          const char* lGetPosString(const lListElem *ep, int pos)

FUNCTION
          Returns the char* value at position pos (runtime type checking)

INPUTS
          const lListElem *ep - element
          int pos             - pos value

RESULT
          const char* - string pointer


1.7.61 lGetPosType

NAME
          lGetPosType() -- Returns type at position

SYNOPSIS
          int lGetPosType(const lDescr *dp, int pos)

FUNCTION
          Returns the type at specified position in a descriptor array. The
          Position must be inside the valid range of the descriptor. Returns
          NoName if descriptor is NULL or pos < 0.

INPUTS
          const lDescr *dp - Descriptor
          int pos          - Position

RESULT
          int - Type


1.7.62 lGetPosUlong

NAME
          lGetPosUlong() -- Returns the ulong value at position pos

SYNOPSIS
          lUlong lGetPosUlong(const lListElem *ep, int pos)

FUNCTION
          Returns the ulong value at position pos

INPUTS
          const lListElem *ep - element
          int pos             - pos value

RESULT
          lUlong - ulong


1.7.63 lGetPosUlong64

NAME
          lGetPosUlong64() -- Returns the ulong64 value at position pos

SYNOPSIS
          lUlong64 lGetPosUlong64(const lListElem *ep, int pos)

FUNCTION
          Returns the ulong64 value at position pos

INPUTS
          const lListElem *ep - element
          int pos             - pos value

RESULT
          lUlong64 - ulong64


1.7.64 lGetPosViaElem

NAME
          lGetPosViaElem() -- Get Position of name within element

SYNOPSIS
          int lGetPosViaElem(const lListElem *element, int name, int do_abort)

FUNCTION
          Get Position of field 'name' within 'element'

INPUTS
          const lListElem *element - element
          int name                 - field name id
          int do_abort             - call do_abort if do_abort=1

RESULT
          int - position or -1 in case of an error


1.7.65 lGetRef

NAME
          lGetRef() -- Returns the character for a field name

SYNOPSIS
          lRef lGetRef(const lListElem *ep, int name)

FUNCTION
          Returns the character for a field name

INPUTS
          const lListElem *ep - element
          int name            - field name value

RESULT
          lRef - reference


1.7.66 lGetString

NAME
          lGetString() -- Return string for specified fieldname

SYNOPSIS
          const char *lGetString(const lListElem *ep, int name)

FUNCTION
          Return the content of the field specified by fieldname 'name' of
          list element 'ep'. The type of the field 'name' has to be of
          type string.

INPUTS
          const lListElem *ep - Pointer to list element
          int name            - field name

RESULT
          const char* - string pointer (no copy)


1.7.67 lGetSubCaseStr

NAME
          lGetSubCaseStr() -- returns elem specified by a string field nm

SYNOPSIS
          lListElem* lGetSubCaseStr(const lListElem* ep, int nm,
                                    const char* str, int snm)

FUNCTION
          returns an element specified by a string field nm and a string
          str from a sublist snm of the element ep

INPUTS
          const lListElem* ep - element pointer
          int nm              - field within an element of the sublist
          const char* str     - string
          int snm             - field within ep which identifies the
                                sublist

RESULT
          NULL if element was not found or in case of an error
          otherwise pointer to element


1.7.68 lGetSubHost

NAME
          lGetSubHost() -- returns elem specified by a string field nm

SYNOPSIS
          lListElem* lGetSubHost(const lListElem* ep, int nm,
                                 const char* str, int snm)

FUNCTION
          returns an element specified by a string field nm and the
          hostname str from the sublist snm of the element ep

INPUTS
          const lListElem* ep - element pointer
          int nm              - field id within an sublist element of ep
          const char* str     - hostname
          int snm             - field id of a sublist in ep

RESULT
          NULL if element was not found or in case of error
          otherwise pointer to element


1.7.69 lGetSubStr

NAME
          lGetSubStr() -- returns element specified by a string field nm

SYNOPSIS
          lListElem* lGetSubStr(const lListElem* ep, int nm,
                                const char* str, int snm)

FUNCTION
          returns an element specified by a string field nm and the
          string str from the sublist snm of the element ep

INPUTS
          const lListElem* ep - element pointer
          int nm              - field id contained in an sublist
                                element of ep
          const char* str     - string
          int snm             - field id contained in ep

RESULT
          NULL if element was not found or in case of an error
          otherwise pointer to an element


1.7.70 lGetSubUlong

NAME
          lGetSubUlong() -- Element specified by a ulong field nm

SYNOPSIS
          lListElem* lGetSubUlong(const lListElem* ep, int nm,
                                  lUlong val, int snm)

FUNCTION
          returns an element specified by a ulong field nm an the ulong
          value val from the sublist snm of the element ep

INPUTS
          const lListElem* ep - element pointer
          int nm              - field id which is part of a sublist
                                element of ep
          lUlong val          - unsigned long value
          int snm             - field id of a list which is part of ep

RESULT
          NULL if element was not found or in case of an error
          otherwise pointer to the element


1.7.71 lGetSubUlong64

NAME
          lGetSubUlong64() -- Element specified by a ulong64 field nm

SYNOPSIS
          lListElem* lGetSubUlong64(const lListElem* ep, int nm,
                                  lUlong64 val, int snm)

FUNCTION
          returns an element specified by a ulong64 field nm an the ulong64
          value val from the sublist snm of the element ep

INPUTS
          const lListElem* ep - element pointer
          int nm              - field id which is part of a sublist
                                element of ep
          lUlong64 val        - unsigned long value
          int snm             - field id of a list which is part of ep

RESULT
          NULL if element was not found or in case of an error
          otherwise pointer to the element


1.7.72 lGetType

NAME
          lGetType() -- Return type of field within descriptor

SYNOPSIS
          int lGetType(const lDescr *dp, int nm)

FUNCTION
          Return type of field within descriptor.

INPUTS
          const lDescr *dp - descriptor
          int nm           - field name id

RESULT
          int - Type id or lEndT


1.7.73 lGetUlong

NAME
          lGetUlong() -- Return 'u_long32' value for specified fieldname

SYNOPSIS
          lUlong lGetUlong(const lListElem *ep, int name)

FUNCTION
          Return the content of the field specified by fieldname 'name' of
          list element 'ep'. The type of the field 'name' has to be of
          type 'u_long32'.

INPUTS
          const lListElem *ep - Pointer to list element
          int name            - field name

RESULT
          lUlong - u_long32 value


1.7.74 lGetUlong64

NAME
          lGetUlong64() -- Return 'u_long64' value for specified fieldname

SYNOPSIS
          lUlong64 lGetUlong64(const lListElem *ep, int name)

FUNCTION
          Return the content of the field specified by fieldname 'name' of
          list element 'ep'. The type of the field 'name' has to be of
          type 'u_long64'.

INPUTS
          const lListElem *ep - Pointer to list element
          int name            - field name

RESULT
          lUlong64 - u_long64 value


1.7.75 lInit

NAME
          lInit() -- Initialize the mechanism for lNm2Str()

SYNOPSIS
          void lInit(const lNameSpace *namev)

FUNCTION
          Initialize the mechanism for lNm2Str()

INPUTS
          const lNameSpace *namev - Namespace


1.7.76 lMt2Str

NAME
          lMt2Str() -- returns the string representation of a type id

SYNOPSIS
          char* lMt2Str(int mt)

FUNCTION
          returns the string representation of a type id

INPUTS
          int mt - multitype id (e.g. lStringT)

RESULT
          char* - string representation of mt


1.7.77 lNm2Str

NAME
          lNm2Str() -- returns the string representation of a name id

SYNOPSIS
          char* lNm2Str(int nm)

FUNCTION
          Return the string representation of a name id

INPUTS
          int nm - name id (e.g. CONF_name)

RESULT
          char* - string representation of id if the NameSpace
                  has been initialized with lInit().  Otherwise
                  "Nameindex = n" is returned, where n is replaced by the
                  field number.

NOTE
          JG: TODO: Implementation is not really efficient.
                    Could be improved by using a hash table that will be
                    dynamically built as names are looked up.


1.7.78 lSetBool

NAME
          lSetBool() -- Sets character with the given field name id

SYNOPSIS
          int lSetBool(lListElem * ep, int name, lBool value)

FUNCTION
          Sets character with the given field name id

INPUTS
          lListElem * ep - element
          int name       - field name id
          lBool value    - new character

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.79 lSetChar

NAME
          lSetChar() -- Sets character with the given field name id

SYNOPSIS
          int lSetChar(lListElem * ep, int name, lChar value)

FUNCTION
          Sets character with the given field name id

INPUTS
          lListElem * ep - element
          int name       - field name id
          lChar value    - new character

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.80 lSetDouble

NAME
          lSetDouble() -- Set double value with given field name id

SYNOPSIS
          int lSetDouble(lListElem *ep, int name, lDouble value)

FUNCTION
          Set double value with given field name id

INPUTS
          lListElem *ep - element
          int name      - field name id
          lDouble value - new double value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.81 lSetFloat

NAME
          lSetFloat() -- Set float value with given field name id

SYNOPSIS
          int lSetFloat(lListElem * ep, int name, lFloat value)

FUNCTION
          Set float value with given field name id.

INPUTS
          lListElem * ep - element
          int name       - field name id
          lFloat value   - new float value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.82 lSetHost

NAME
          lSetHost() -- Set hostname for field name in element

SYNOPSIS
          int lSetHost(lListElem *ep, int name, const char *value)

FUNCTION
          Sets in the element ep for field name the char * value.
          Also duplicates the pointed to char array
          (runtime type checking)
          

INPUTS
          lListElem *ep     - list element pointer
          int name          - name of list element (e.g. EH_name)
          const char *value - new value for list element

RESULT
          int - error state
              -1 - Error
               0 - OK


1.7.83 lSetInt

NAME
          lSetInt() -- Sets an int within an element

SYNOPSIS
          int lSetInt(lListElem *ep, int name, int value)

FUNCTION
          Sets an int within an element

INPUTS
          lListElem *ep - element
          int name      - field name id
          int value     - new value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.84 lSetList

NAME
          lSetList() -- Sets a list at the given field name id

SYNOPSIS
          int lSetList(lListElem *ep, int name, lList *value)

FUNCTION
          Sets a list at the given field name id. List will not be copied.

INPUTS
          lListElem *ep - element
          int name      - field name id
          lList *value  - new list pointer

RESULT
          int - error state
              0 - OK
             -1 - Error

NOTES
          MT-NOTE: lAddSubList() is MT safe


1.7.85 lSetLong

NAME
          lSetLong() -- Set long value with given field name id

SYNOPSIS
          int lSetLong(lListElem *ep, int name, lLong value)

FUNCTION
          Set long value with given field name id.

INPUTS
          lListElem *ep - element
          int name      - field name id
          lLong value   - value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.86 lSetObject

NAME
          lSetObject() -- Sets a list at the given field name id

SYNOPSIS
          int lSetObject(lListElem *ep, int name, lList *value)

FUNCTION
          Sets a list at the given field name id. List will not be copied.

INPUTS
          lListElem *ep - element
          int name      - field name id
          lList *value  - new list pointer

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.87 lSetPosBool

NAME
          lSetPosBool() -- Sets the character a the given position

SYNOPSIS
          int lSetPosBool(lListElem *ep, int pos, lBool value)

FUNCTION
          Sets the character a the given position.

INPUTS
          lListElem *ep - element
          int pos             - position
          lBool value         - value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.88 lSetPosChar

NAME
          lSetPosChar() -- Sets the character a the given position

SYNOPSIS
          int lSetPosChar(lListElem *ep, int pos, lChar value)

FUNCTION
          Sets the character a the given position.

INPUTS
          lListElem *ep - element
          int pos             - position
          lChar value         - value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.89 lSetPosDouble

NAME
          lSetPosDouble() -- Set double value at given position

SYNOPSIS
          int lSetPosDouble(lListElem *ep, int pos, lDouble value)

FUNCTION
          Set double value at given position.

INPUTS
          lListElem *ep - element
          int pos             - position
          lDouble value       - new double value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.90 lSetPosFloat

NAME
          lSetPosFloat() -- Set float value at given position

SYNOPSIS
          int lSetPosFloat(lListElem * ep, int pos, lFloat value)

FUNCTION
          Set float value at given position.

INPUTS
          lListElem * ep - element
          int pos              - position
          lFloat value         - new float value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.91 lSetPosHost

NAME
          lSetPosHost() -- Sets the hostname at a certain position

SYNOPSIS
          int lSetPosHost(lListElem *ep, int pos, const char *value)

FUNCTION
          Sets the hostname at a certain position

INPUTS
          lListElem *ep - element
          int pos             - position
          const char *value   - new hostname

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.92 lSetPosInt

NAME
          lSetPosInt() -- Sets the int value

SYNOPSIS
          int lSetPosInt(lListElem *ep, int pos, int value)

FUNCTION
          Sets in the element 'ep' at position 'pos' the int 'value'

INPUTS
          lListElem *ep - element
          int pos             - position
          int value           - value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.93 lSetPosList

NAME
          lSetPosList() -- Set list at position pos

SYNOPSIS
          int lSetPosList(lListElem *ep, int pos, lList *value)

FUNCTION
          Sets in the element 'ep' at position 'pos' the lists 'value'.
          Doesn't copy the list. Does runtime type checking.

INPUTS
          lListElem *ep - element
          int pos             - position
          lList *value        - value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.94 lSetPosLong

NAME
          lSetPosLong() -- Set long value at given position

SYNOPSIS
          int lSetPosLong(lListElem *ep, int pos, lLong value)

FUNCTION
          Set long value at given position.

INPUTS
          lListElem *ep - element
          int pos             - position
          lLong value         - new long value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.95 lSetPosObject

NAME
          lSetPosObject() -- Set list element at position pos

SYNOPSIS
          int lSetPosObject(lListElem *ep, int pos, lListElem *value)

FUNCTION
          Sets in the element 'ep' at position 'pos' the list element 'value'.
          Doesn't copy the object. Does runtime type checking.

INPUTS
          lListElem *ep - element
          int pos             - position
          lListElem *value    - value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.96 lSetPosRef

NAME
          lSetPosRef() -- Set pointer at given position

SYNOPSIS
          int lSetPosRef(lListElem * ep, int pos, lRef value)

FUNCTION
          Set pointer at given position

INPUTS
          lListElem * ep - element
          int pos              - position
          lRef value           - pointer

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.97 lSetPosString

NAME
          lSetPosString() -- Sets the string at a certain position

SYNOPSIS
          int lSetPosString(lListElem *ep, int pos, const char *value)

FUNCTION
          Sets the string at a certain position.

INPUTS
          lListElem *ep - element
          int pos             - position
          const char *value   - string value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.98 lSetPosUlong

NAME
          lSetPosUlong() -- Get ulong at a certain position

SYNOPSIS
          int lSetPosUlong(lListElem *ep, int pos, lUlong value)

FUNCTION
          Get ulong at a certain position

INPUTS
          lListElem *ep - element
          int pos             - position
          lUlong value        - new value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.99 lSetPosUlong64

NAME
          lSetPosUlong64() -- Get ulong64 at a certain position

SYNOPSIS
          int lSetPosUlong64(lListElem *ep, int pos, lUlong64 value)

FUNCTION
          Get ulong64 at a certain position

INPUTS
          lListElem *ep - element
          int pos             - position
          lUlong64 value      - new value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.100 lSetRef

NAME
          lSetRef() -- Set pointer with the given field name id

SYNOPSIS
          int lSetRef(lListElem * ep, int name, lRef value)

FUNCTION
          Set pointer with the given field name id

INPUTS
          lListElem * ep - element
          int name       - field name id
          lRef value     - new pointer

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.101 lSetString

NAME
          lSetString() -- Sets the string at the given field name id

SYNOPSIS
          int lSetString(lListElem *ep, int name, const char *value)

FUNCTION
          Sets the string at the given field name id

INPUTS
          lListElem *ep     - element
          int name          - field name id
          const char *value - new string

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.102 lSetUlong

NAME
          lSetUlong() -- Set ulong value at the given field name id

SYNOPSIS
          int lSetUlong(lListElem *ep, int name, lUlong value)

FUNCTION
          Set ulong value at the given field name id

INPUTS
          lListElem *ep - element
          int name      - field name id
          lUlong value  - new value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.103 lSetUlong64

NAME
          lSetUlong64() -- Set ulong value at the given field name id

SYNOPSIS
          int lSetUlong64(lListElem *ep, int name, lUlong64 value)

FUNCTION
          Set ulong64 value at the given field name id

INPUTS
          lListElem *ep  - element
          int name       - field name id
          lUlong64 value - new value

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.104 lStr2Nm

NAME
          lStr2Nm() -- Returns the int representation of a name

SYNOPSIS
          int lStr2Nm(const char *str)

FUNCTION
          Returns the int representation of a name

INPUTS
          const char *str - String

RESULT
          int - value

NOTE
          JG: TODO: Highly inefficient implementation, does tons of strcmp.
                    Should have a hash table that will be extended whenever
                    a new name has to be resolved.


1.7.105 lSwapList

NAME
          lSwapList() -- Exchange two lists within two elements

SYNOPSIS
          int lSwapList(lListElem *to, int nm_to, lListElem *from, int nm_from)

FUNCTION
          Exchange two lists within two elements.

INPUTS
          lListElem *to   - element one
          int nm_to       - field name id of a list attribute of 'to'
          lListElem *from - element two
          int nm_from     - field name id of a list attribute of 'from'

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.106 lWriteDescrTo

NAME
          lWriteDescrTo() -- Writes a descriptor (for debugging purpose)

SYNOPSIS
          void lWriteDescrTo(const lDescr *dp, FILE *fp)

FUNCTION
          Writes a descriptor (for debugging purpose)

INPUTS
          const lDescr *dp - descriptor
          FILE *fp         - output stream


1.7.107 lXchgList

NAME
          lXchgList() -- Exchange field name value list pointer

SYNOPSIS
          int lXchgList(lListElem *ep, int name, lList **lpp)

FUNCTION
          Exchange the list pointer which has the given field name value.

INPUTS
          lListElem *ep - element
          int name      - field name value
          lList **lpp   - pointer to CULL list

RESULT
          int - error state
              0 - OK
             -1 - Error


1.7.108 lXchgString

NAME
          lXchgList() -- Exchange field name value string pointer

SYNOPSIS
          int lXchgString(lListElem *ep, int name, char **str)

FUNCTION
          Exchange the string pointer, which has the given field name value.

INPUTS
          lListElem *ep - element
          int name      - field name value
          char **str   - pointer to a string

RESULT
          int - error state
              0 - OK
             -1 - Error


1.8 pack


1.8.1 –CULL_Packing

NAME
          CULL_Packing -- platform independent exchange format

FUNCTION
          The cull packing functions provide a framework for a
          platform independent data representation.
          
          Data is written into a packbuffer. Individual data words
          are written in network byte order.
          
          Data in the packbuffer can be compressed.

NOTES
          Other platform independent formats, like XML, should be
          implemented.

SEE ALSO


1.8.2 -Versioncontrol

NAME
          Versioncontrol -- handling of different cull versions

SYNOPSIS
          #define CULL_VERSION 0x10010000

FUNCTION
          Enhancements of the product may make it necessary to change the
          way how (in which format) data is represented for spooling and
          communication.
          
          To ensure that components of different cull versions, that cannot
          communicate, cleanly reject data of a different format, a cull
          version check has been implemented.
          
          A cull version id has been introduced that will be checked when
          cull packbuffers are read.
          
          Currently the 2 highest bytes of the 4 byte integer used to
          encode version information are used for a version number.
          The 2 lower bytes could be used to encode for example a
          subversion / subprotocol like cull binary format (the current
          implementation) and XML format.

NOTES
          Older Grid Engine versions that had no version controll cannot
          properly handle messages with version information.
          Therefore the version information is preceeded by a 0 value
          4 byte integer, which will result in some sort of error handling
          for all known/used message formats.
          
          Current CULL_VERSION:   0x10020000
                                  Fixed a bug with packing of lObject type:
                                  Descriptor was sent twice.
          
          Former  CULL_VERSIONs:  0x10010000
                                  Added information about attribute changes.
                                  0x10000000
                                  Introduction of version control.

SEE ALSO


1.8.3 getByteArray

NAME
          getByteArray() -- transforms a string into a byte array.

SYNOPSIS
          int getByteArray(char **byte, const lListElem *elem, int name)

FUNCTION
          extracts a string from an element and changes it into a byte array. The
          target has to be a pointer to NULL. The array will be created in the function
          and no memory is freed. The calling functions have to take care of that.

INPUTS
          char **byte           - target byte array, has to be a pointer to NULL
          const lListElem *elem - the list element, which contains the string
          int name              - name of the attribute containing the string

RESULT
          int - >= 0 the size of the byte array
                < 0 the position of the first none hex character


1.8.4 init_packbuffer

NAME
          init_packbuffer() -- initialize packing buffer

SYNOPSIS
          int init_packbuffer(sge_pack_buffer *pb, int initial_size,
                              int just_count)

FUNCTION
          Initialize a packing buffer.
          Allocates the necessary memory. If more memory is needed during the use
          of the packbuffer, it will be reallocated increasing the size by
          chunk_size (see function pack_set_chunk).
          
          Since version 6.0, version information is provided in the packbuffer and
          is included in sent messages.
          For best possible backward interoperability with former versions, an
          integer with value 0 is padded before the version information as first
          word in the packbuffer. This triggeres error handling in former versions.
          
          Functions using packing buffers in GDI or related code should use the
          function sge_gdi_packet_get_pb_size() to find the correct
          "initial_size".

INPUTS
          sge_pack_buffer *pb - the packbuffer to initialize
          int initial_size    - the amount of memory to be allocated at
                                initialization.
                                If a value of 0 is given as initial_size, a size
                                of chunk_size (global variable, see function
                                pack_set_chunk) will be used.
          int just_count      - if true, no memory will be allocated and the
                                "just_count" property of the packbuffer will
                                be set.

RESULT
          int - PACK_SUCCESS on success
                PACK_ENOMEM  if memory allocation fails
                PACK_FORMAT  if no valid packbuffer is passed

NOTES
          MT-NOTE: init_packbuffer() is MT safe (assumptions)

SEE ALSO


1.8.5 packbitfield

NAME
          packbitfield() -- pack a bitfield

SYNOPSIS
          int packbitfield(sge_pack_buffer *pb, const bitfield *bitfield)

FUNCTION
          Writes the bitfield into the given packbuffer.
          The following information will be written:
             - the size of the bitfield in bits
             - the bitfield itself as binary buffer

INPUTS
          sge_pack_buffer *pb - the target packbuffer
          const bitfield *bitfield   - the bitfield to pack

RESULT
          int - PACK_SUCCESS on success,
                else PACK_* error codes

SEE ALSO


1.8.6 pb_are_equivalent

NAME
          pb_are_equivalent() -- check if both buffers are equivalent

SYNOPSIS
          bool pb_are_equivalent(sge_pack_buffer *pb1, sge_pack_buffer *pb2)

FUNCTION
          Check if size and content of both packbuffers is equivalent

INPUTS
          sge_pack_buffer *pb1 - packbuffer
          sge_pack_buffer *pb2 - packbuffer

RESULT
          bool - equivalent?
             true  - yes
             false - no


1.8.7 pb_print_to

NAME
          pb_print_to() -- Print content of packbuffer

SYNOPSIS
          void pb_print_to(sge_pack_buffer *pb, FILE* file)

FUNCTION
          Print content of packbuffer into file

INPUTS
          sge_pack_buffer *pb - packbuffer pointer
          bool only_header    - show only summary information
          FILE* file          - file stream (e.g. stderr)

RESULT
          void - NONE


1.8.8 setByteArray

NAME
          setByteArray() -- takes a byte array, transformes it into ASCII and sets
                            it as a string into an element

SYNOPSIS
          void setByteArray(const char *byteArray, int size, lListElem *elem, int
          name)

FUNCTION
          makes a string out of a byte array and sets that string into an element

INPUTS
          const char *byteArray -  byte array
          int size              - size of the byte array
          lListElem *elem       - target element
          int name              - target attribute

RESULT
          void - nothing


1.8.9 unpackbitfield

NAME
          unpackbitfield() -- unpack a bitfield

SYNOPSIS
          int unpackbitfield(sge_pack_buffer *pb, bitfield *bitfield)

FUNCTION
          Unpacks a bitfield from a packbuffer.
          
          If the size of the descriptor doesn't match the size of the unpacked
          bitfield, create a new bitfield.

INPUTS
          sge_pack_buffer *pb - the source packbuffer
          bitfield *bitfield  - used to return the unpacked bitfield
          int descr_size      - size of the corresponding descriptor

RESULT
          int - PACK_SUCCESS on success,
                else PACK_* error codes

SEE ALSO


1.9 sort


1.9.1 lParseSortOrder

NAME
          lParseSortOrder() -- Creates a sort order array

SYNOPSIS
          lSortOrder* lParseSortOrder(const lDescr *dp, const char *fmt,
                                      va_list ap)

FUNCTION
          Create a sort oder array due to the given va_list.

INPUTS
          const lDescr *dp - descriptor
          const char *fmt  - format string with syntax
                             %I{+|-} [%I{+|-}...]
                             where %I stands for the field and +/- stands for
                             ascending/descending sorting order
          va_list ap       - Attributes within descriptor

RESULT
          lSortOrder* - sort order array

EXAMPLE
          lParseSortOrder(dp,"%I+ %I-", H_hostname, H_memsize )
          
          Returns a sort order array which can be used for sorting an list
          with ascending H_hostname and descending H_memsize.


1.10 state


1.10.1 cull_once_init

NAME
          cull_once_init() -- One-time CULL initialization.

SYNOPSIS
          static cull_once_init(void)

FUNCTION
          Create access key for thread local storage. Register cleanup function.
          
          This function must be called exactly once.

INPUTS
          void - none

RESULT
          void - none

NOTES
          MT-NOTE: cull_once_init() is MT safe.


1.10.2 cull_state_destroy

NAME
          cull_state_destroy() -- Free thread local storage

SYNOPSIS
          static void cull_state_destroy(void* theState)

FUNCTION
          Free thread local storage.

INPUTS
          void* theState - Pointer to memory which should be freed.

RESULT
          static void - none

NOTES
          MT-NOTE: cull_state_destroy() is MT safe.


1.10.3 cull_state_get_

NAME
          cull_state_get_????() - read access to cull state.

FUNCTION
          Provides access to thread local storage.


1.10.4 cull_state_getspecific

NAME
          cull_state_getspecific() -- Get thread local cull state

SYNOPSIS
          static cull_state_t* cull_state_getspecific(pthread_key_t aKey)

FUNCTION
          Return thread local cull state.
          
          If a given thread does call this function for the first time, no thread
          local cull state is available for this particular thread. In this case the
          thread local cull state is allocated and set.

INPUTS
          pthread_key_t aKey - Key for thread local cull state

RESULT
          static cull_state_t* - Pointer to thread local cull state

NOTES
          MT-NOTE: cull_state_getspecific() is MT safe


1.10.5 cull_state_init

NAME
          cull_state_init() -- Initialize CULL state.

SYNOPSIS
          static void cull_state_init(cull_state_t *theState)

FUNCTION
          Initialize CULL state.

INPUTS
          struct cull_state_t* theState - Pointer to CULL state structure.

RESULT
          static void - none

NOTES
          MT-NOTE: cull_state_init() is MT safe.


1.11 tree


1.11.1 lGetNumberOfLeafs

NAME
          lGetNumberOfLeafs() -- Returns the number of leaves

SYNOPSIS
          int lGetNumberOfLeafs(const lListElem *ep, const lList *lp, int nm)

FUNCTION
          Returns the number of leaves

INPUTS
          const lListElem *ep - element
          const lList *lp     - list
          int nm              - field name if within ep

RESULT
          int - number of leaves


1.11.2 lGetNumberOfNodes

NAME
          lGetNumberOfNodes() -- Number of elements and subelements

SYNOPSIS
          int lGetNumberOfNodes(const lListElem *ep, const lList *lp, int nm)

FUNCTION
          Returns the number of elements and subelements in the sublist 'nm'
          of the element 'ep' (lp = NULL) or returns the sum of all elements
          and subelements within the list 'lp' (ep = NULL)

INPUTS
          const lListElem *ep - element
          const lList *lp     - list
          int nm              - field name id within element

RESULT
          int - number of elements


1.12 what


1.12.1 lCopyWhat

NAME
          lCopyWhat() -- Copy a enumeration array

SYNOPSIS
          lEnumeration* lCopyWhat(const lEnumeration *ep)

FUNCTION
          Copy a enumeration array

INPUTS
          const lEnumeration *ep - enumeration

RESULT
          lEnumeration* - new copy of enumeration


1.12.2 lCountWhat

NAME
          lCountWhat() -- Returns size of enumeration

SYNOPSIS
          int lCountWhat(const lEnumeration *enp, const lDescr *dp)

FUNCTION
          Returns size (number of fields) of enumeration

INPUTS
          const lEnumeration *enp - enumeration
          const lDescr *dp        - descriptor

RESULT
          int - number of fields in enumeration, or -1 if one of the arguments
                is NULL


1.12.3 lFreeWhat

NAME
          lFreeWhat() -- Frees a enumeration array

SYNOPSIS
          void lFreeWhat(lEnumeration **ep)

FUNCTION
          Frees an enumeration array ep. Does nothing if it is null.

INPUTS
          lEnumeration **ep - enumeration, will be set to NULL


1.12.4 lIntVector2What

NAME
          lIntVector2What() -- Create a enumeration from int array

SYNOPSIS
          lEnumeration* lIntVector2What(const lDescr *dp, const int intv[])

FUNCTION
          Create a enumeration from int array

INPUTS
          const lDescr *dp - descriptor
          const int intv[] - int array

RESULT
          lEnumeration* - enumeration


1.12.5 lReduceDescr

NAME
          lReduceDescr() -- Reduce a descriptor

SYNOPSIS
          int lReduceDescr(lDescr **dst_dpp, lDescr *src_dp, lEnumeration *enp)

FUNCTION
          Makes a new descriptor in 'dst_dpp' that contains only those
          fields from 'src_dp' that are in 'enp'.

INPUTS
          lDescr **dst_dpp  - destination for reduced descriptor
          lDescr *src_dp    - source descriptor
          lEnumeration *enp - condition

RESULT
          int - error state
              0 - OK
             -1 - Error


1.12.6 lWhat

NAME
          lWhat() -- Create a new field enumeration structure

SYNOPSIS
          lEnumeration *lWhat(const char *fmt, ...)

FUNCTION
          Create a new enumeration described by 'fmt'

INPUTS
          const char *fmt - format string:
          
            Syntax:
              element := type "(" attribute_list ")" .
              type := "%T" .
              attribute_list := "ALL" | "NONE" | attributes ")" .
              attributes = { "%I" | "%I" "->" element } .
          
            where:
              %T specifies the descriptor type attribute_list, ALL fields,
              no fields, or the fields described by attributes; "->" selects
              a sub-element
          
          ...   - variable list of arguments corresponding to the % placeholders

EXAMPLES
          fmt:
             1) "%T(NONE)"
             2) "%T(ALL)"
             3) "%T(%I%I)"
             4) "%T(%I%I->%T(%I%I))"
          varargs corresponding to examples above:
             1) JB_Type
             2) JB_Type
             3) JB_Type, JB_job_number, JB_ja_tasks
             4) JB_Type, JB_job_number, JB_ja_tasks, JAT_Type, JAT_task_number,
                JAT_status

RESULT
          lEnumeration* - new enumeration

NOTES
          "%I" is equivalent to "%I->%T(ALL)"
          "" is NOT equivalent to "%I->%T(NONE)"


1.12.7 lWhatAll

NAME
          lWhatAll() -- Creates a enumeration array requesting all elements.

SYNOPSIS
          lEnumeration* lWhatAll()

FUNCTION
          Creates a enumeration array that requests complete elements
          of whatever typed list. This is a shortcut for
          lWhat("%T(ALL)", <List_type>)), cause for all the descriptor is not
          needed anyway, it is available from the list itself.

RESULT
          lEnumeration* - enumeration


1.12.8 lWriteWhatTo

NAME
          lWriteWhatTo() -- Writes a enumeration array to a file stream

SYNOPSIS
          void lWriteWhatTo(const lEnumeration *ep, FILE *fp)

FUNCTION
          Writes a enumeration array to a file stream

INPUTS
          const lEnumeration *ep - enumeration
          FILE *fp               - file stream


1.12.9 lWriteWhatToDString

NAME
          lWriteWhatToDString() -- Write enumeration to dynamic string

SYNOPSIS
          void lWriteWhatToDString(const lEnumeration *ep, dstring *buffer)

FUNCTION
          Write enumeration to dynamic string

INPUTS
          const lEnumeration *ep - enumeration
          dstring *buffer        - dynmaic string

RESULT
          void - NONE


1.12.10 nm_set

NAME
          nm_set() -- Build an int vector

SYNOPSIS
          void nm_set(int job_field[], int nm)

FUNCTION
          Build an int vector as used by lIntVector2What()

INPUTS
          int job_field[] - int vector
          int nm          - field name id


1.13 where


1.13.1 lAndWhere

NAME
          lAndWhere() -- Combines two conditions with an AND

SYNOPSIS
          lCondition* lAndWhere(const lCondition *cp0, const lCondition *cp1)

FUNCTION
          Combines the conditions 'cp0' and 'cp1' with an logical AND.

INPUTS
          const lCondition *cp0 - first condition
          const lCondition *cp1 - second condition

RESULT
          lCondition* - 'cp0' AND 'cp1'


1.13.2 lCompare

NAME
          lCompare() -- Decide if a element suffices a condition

SYNOPSIS
          int lCompare(const lListElem *ep, const lCondition *cp)

FUNCTION
          Decide if a element suffices a condition.

INPUTS
          const lListElem *ep  - element
          const lCondition *cp - condition

RESULT
          int - result
              0 - false
              1 - true


1.13.3 lCopyWhere

NAME
          lCopyWhere() -- Copy a condition

SYNOPSIS
          lCondition* lCopyWhere(const lCondition *cp)

FUNCTION
          Copy a condition.

INPUTS
          const lCondition *cp - condition

RESULT
          lCondition* - Copy of 'cp'


1.13.4 lFreeWhere

NAME
          lFreeWhere() -- Free a condition

SYNOPSIS
          lFreeWhere(lCondition **cp)

FUNCTION
          Free a condition.

INPUTS
          lCondition **cp - condition, will be set to NULL


1.13.5 lOrWhere

NAME
          lOrWhere() -- Combines two conditions with an OR

SYNOPSIS
          lCondition* lOrWhere(const lCondition *cp0, const lCondition *cp1)

FUNCTION
          Combines the conditions 'cp0' and 'cp1' logically with an OR

INPUTS
          const lCondition *cp0 - first condition
          const lCondition *cp1 - second condition

RESULT
          lCondition* - cp0 OR cp1


1.13.6 lWhere

NAME
          lWhere() -- Creates a condition tree

SYNOPSIS
          lCondition* lWhere(const char *fmt, ...)

FUNCTION
          Creates a condition tree. The condition is stated as a format
          string and an associated list of additional parameters.

INPUTS
          const char *fmt - format string
              Syntax:
               cond: type "(" negsimple [logop {negsimple | "%I" "->" cond } ] ")"
               type: "%T"
               negsimple: {simple | "!" "(" simple ")" }
               simple: "%I" relop valuetype [logop simple ...]
               logop: {"&&" | "||"}
               relop: { "<" | ">" | "==" | "!=" | "<=" | ">=" | "m=" |
                        "c=" | "p=" | "h=" }
               valuetype: { "%d" | "%s" | "%u" | "%f" | "%g" | "%o" | "%c" }
          
              The logop operators mean:
               &&   logical and
               ||   logical or
               !    logical not
              The relop specifiers have the following meaning:
               <    comparison of numeric types as in the C language
               >
               <=
               >=
               ==
               !=
               ==   case sensitive comparison of strings
               c=   case insensitive comparison of strings
               m=   bitmask evaluation operator
               p=   pattern matching string comparison
               h=   host matching string comparison
          
              For valuetype the specifiers represent in the order above:
               { int | string | unsigned long | float | double | long | char }
          
          ...  - additional arguments corresponding to fmt placeholders

EXAMPLES
             where1 = lWhere("%T(%I==%s && %I->%T(%I<%d || %I>%u || %I m= %u ))",
                             type1, field1, "Hello", field2, subtype,
                             subfield1, 12, subfield2, 34,
                             bitmasksubfield, IDLE | RUNNING);
             where2 = lWhere( "%T(!(%I==%s))", type1, field1, "Hello");
          
          The condition 'where1' says:
          
          field1 of list element with descriptor type1 must contain "Hello"
          AND the sub-list stored in field2 with descriptor subtype has a
          field subfield1 and subfield2 shall fulfil subfield1 < 12 OR
          subfield2 > 34 OR in the bitmasksubfield the bits for RUNNING and
          IDLE are set.  Bitmasks are stored in an unsigned long
          (ulong_32).
          
          The condition 'where2' says:
          
          NOT ( field1 == "Hello" ) for field1 of a list with descriptor type1.
          
          _lWhere is equivalent to lWhere concerning the format string
          describing the condition.  The variable argument list of lWhere
          is replaced by an array of arguments delivering the required
          information.
          
          The WhereArg struct is built as follows:
          
             struct _WhereArg {
                     lDescr      *descriptor;
                     int         field;
                     lMultitype  *value;
             };
          
          The translation of the varargs lWhere functionality to the
          WhereArgList mechanism is shown below:
          
             where = lWhere("%T( %I == %s && %I ->
                             %T ( %I < %d ) )",
                             QueueT, Q_hostname, "durin.q",
                             Q_ownerlist, OwnerT, O_ownerage, 22);
          
          The corresponding WhereArgList is:
          
             WhereArg whereargs[20];
          
             whereargs[0].descriptor = QueueT;
             whereargs[1].field      = Q_hostname;
             whereargs[1].value.str  = "durin.q";
             whereargs[2].field      = Q_ownerlist;
             whereargs[2].descriptor = OwnerT;
             whereargs[3].field      = O_ownerage;
             whereargs[3].value.i    = 22;
          
             where = _lWhere("%T( %I == %s && %I -> %T ( %I < %d ) )",
                             whereargs);

RESULT
          lCondition* - new condition; NULL means all elements will match


1.13.7 lWriteWhereTo

NAME
          lWriteWhereTo() -- Write a condition struct to file stream.

SYNOPSIS
          void lWriteWhereTo(const lCondition *cp, FILE *fp)

FUNCTION
          Write a condition struct to file stream.

INPUTS
          const lCondition *cp - condition
          FILE *fp             - file stream


Function Index

Table of Contents