SDS_SET_ATTRNAME(3)



NAME

     sds_set_attribute     sds_set_attrname     sds_set_attrvalue
     sds_set_attrtype sds_set_comment

     -a set of functions to set attributes


SYNOPSIS

     #include <soi_sds.h>

     int sds_set_attribute (SDS *sdsptr, char *name,
                            void *value, int attrtype, char *comment)
     int sds_set_attrname (ATTRIBUTES *attr, char *name)
     int sds_set_attrvalue(ATTRIBUTES *attr, void *value, int datatype)
     int sds_set_attrtype (ATTRIBUTES *attr, int datatype)
     int sds_set_comment  (ATTRIBUTES *attr, char *comment)



DESCRIPTION

     All routines return an error status.  Zero  is  returned  if
     all  is  well, else if an error is encountered each of these
     routines sets and returns soi_errno.

     sds_set_attribute sets an attribute into an  SDS  given  the
     name, value, type, and comment fields.  If an attribute with
     the specified name already exists, it is overwritten (except
     for  COMMENT  &  HISTORY, for which multiple key entries are
     allowed and the new entry is appended to the  list);  other-
     wise a new attribute is created and appended onto the end of
     the attribute list.

     Note that user must send in a pointer to the  value  --  eg.
     (double  *)  &bscale,  (char  *)  wordpointer.  The function
     takes a copy of the value this pointer points to.

     sds_set_attrname makes a copy of the input string  and  sets
     it as the attribute name of the ATTRIBUTES structure

     sds_set_attrvalue makes a copy of the value and sets  it  as
     the attribute value of the ATTRIBUTES structure

     sds_set_attrtype sets an attribute data type into an  ATTRI-
     BUTES structure

     sds_set_comment takes a copy of the comment and sets  it  as
     attribute comment of the ATTRIBUTES structure





FILES

     ~soi/(release)/include/soi_sds.h
     ~soi/(release)/src/libsds.d/sds_set.c


SEE ALSO

     sds_set_attribute,   sds_set_attrname,    sds_set_attrvalue,
     sds_set_attrtype, sds_set_comment




FEATURES and BUGS

     In sds_set_attribute, the attribute value is passed  through
     the generic pointer to the value, (void *) and datatype must
     be accurate in order for the copy to occur successfully.



HISTORY 93.10.12

     K Scott: created this file for SOI V.0.7 .br 93.11.05 L  Ng:
     included more comments

     94.02.08 L. Bacon  SOI Version 0.8