NAME
     lInit, lNm2Str (_lNm2Str), lStr2Nm (_lStr2Nm),  lCountDescr,
     lCopyDescr,  lGetPosInDescr, lDumpDescr, lUndumpDescr, lWri-
     teDescr

     generic list manipulation and information functions

SYNOPSIS
     #include "cull.h"

     void lInit( lNameSpace *namev );

     char* lNm2Str( int nm );

     char* _lNm2Str( lNameSpace *nsp, int nm );

     int lStr2Nm( char *str );

     int _lStr2Nm( lNameSpace *nsp, char *str );

     int lCountDescr( lDescr *descriptor );

     lDescr* lCopyDescr( lDescr *descriptor );

     int lGetPosInDescr( lDescr *descriptor, int nm );

     void lWriteDescr( lDescr *descriptor );

     int lDumpDescr(
          FILE *file,
          lDescr *descriptor,
          int indent
     );

     lDescr* lUndumpDescr( FILE *file );

DESCRIPTION
     lInit
          initializes the name to string  conversion.  Names  are
          represented by unique numbers which are mapped to their
          corresponding strings.   The  function  argument  is  a
          pointer to a lNameSpace array.

     lNm2Str, _lNm2Str
          converts the field names (represented  by  numbers)  to
          the  corresponding  strings.  If the NameSpace has been
          initialized with lInit() the  corresponding  string  is
          returned,  otherwise  the  string  "Nameindex  =  n" is
          returned, where n  is  replaced  by  the  field  number
          representing  nm.   _lNm2Str   converts the field names
          (represented by numbers) to the corresponding  strings.
          A  NameSpace is delivered explicitly. The corresponding
          string is returned, otherwise the string  "Nameindex  =
          n" is returned, where n is replaced by the field number
          representing nm.

     lStr2Nm, _lStr2Nm
          converts the string field names  to  the  corresponding
          field id's.  If the NameSpace has been initialized with
          lInit() the corresponding field id is returned,  other-
          wise  NoName is returned.  _lStr2Nm converts the string
          field  names  to  the  corresponding  field  id's.    A
          NameSpace  is  delivered  explicitly. The corresponding
          field id is  returned,  if  it  can  be  found  in  the
          NameSpace. Otherwise the function returns NoName.

     lCountDescr
          count the number of fields specified in the descriptor.
          The  descriptor is delivered as function argument.  The
          number of fields is returned.

     lCopyDescr
          duplicate the specified descriptor.  The descriptor  is
          delivered  as  function  argument.   A  pointer  to the
          copied descriptor is returned, NULL otherwise.

     lGetPosInDescr
          get the  position  of  the  field  named  nm  from  the
          descriptor.   If the field named nm is not contained in
          the descriptor -1 is returned.

     lDumpDescr
          dump the list descriptor in ASCII format to a file. The
          first  argument is a FILE pointer of the dump file, the
          second argument is the descriptor that shall be  dumped
          and  the  third  argument  is the number of indentation
          units for formatting purposes.  This function  is  nor-
          mally used only by lDumpList(3).

     lUndumpDescr
          undump the list descriptor from a  dump  file.  A  FILE
          pointer to the dump file is delivered as function argu-
          ment. If no error occurs a pointer to the list descrip-
          tor  is  returned,  otherwise  NULL  is returned.  This
          function is normally used only by lUndumpList(3).

     lWriteDescr
          writes a list descriptor to stdout.  This  function  is
          used for debugging only.

RETURN VALUES
     The functions return -1 or NULL in case of error,  otherwise
     0 or a valid pointer are returned.

ERRORS
     The following errors can occur in  the  above  listed  func-
     tions.  The  functions which are affected by a special error
     are enumerated in parentheses.

     LENAMEOUT
          This error occurs, if the  name  is  out  of  namespace
          ranges. (lNm2Str)

     LEDESCRNULL
          The descriptor argument is  NULL.  (lCountDescr,  lWri-
          teDescr, lDumpDescr, lGetPosInDescr)

     LEFILENULL
          The file pointer delivered is NULL.  (lDumpDescr,  lUn-
          dumpDescr)

     LENAMENOT
          The specified name is not  a  field  of  the  specified
          descriptor. (lGetPosInDescr)

     LEFIELDREAD
          Reading a field value from a dump  file  failed.  (lUn-
          dumpDescr)

     LEFGETDESCR
          Reading a descriptor pair  from  a  dump  file  failed.
          (lUndumpDescr)

     LESYNTAX
          A syntax error occurred  (missing  opening  or  closing
          brackets). (lUndumpDescr)

SEE ALSO
     sge_intro(1), list_intro(3).

COPYRIGHT
     See sge_intro(1) for a full statement of rights and  permis-
     sions.














Man(1) output converted with man2html