asgetattr - search an attribute list for a particular name


SYNOPSIS

       #include <arraysvcs.h>

       const char *asgetattr(const char *attrname, const char **attrs,                                       int numattrs)


DESCRIPTION

       The asgetattr function searches through a list of  strings
       for  a particular attribute name and returns a correspond­
       ing value, similar to the way getenv(3C) searches  through
       the environment for a particular variable.

       The  list  of  strings,  attrs,  will  typically have been
       returned by a function such as aslistarrays(3X) or aslist­
       machines(3X).   The argument numattrs specifies the number
       of strings in the list.

       The attribute to be found is identified by the name  attr­
       name.    Attributes  are  assumed  to  be  of  the  format
       "NAME=VALUE", so this amounts to searching the  attributes
       for  the  first  one  that  starts  with attrname followed
       either by a null or the character "=".   If  NAME  is  not
       found, NULL is returned.  If the attribute is present with
       no value, a pointer to a null character is returned,  oth­
       erwise a pointer to VALUE is returned.


NOTES

       asgetattr  is found in the library "libarray.so", and will
       be loaded if the option "-larray" is used  with  cc(1)  or
       ld(1).


SEE ALSO

       aslistarrays(3X), aslistmachines(3X),


Man(1) output converted with man2html