#include <ctype.h> #include "las.h" #include "gof.h"FUNCTION c_attchk (hdr, inatt, outatt, index, search)
struct HEADER *hdr; char inatt[][ATTIN]; char outatt[][ATTVAL]; int index[MAXATT]; int *search;
The graphics overlay file (GOF) header information.
The input attributes in the form of "NAME:VALUE". Any of the MAXATT attributes that do not have a specified value must be assigned an empty string.
The parsed attribute values. These will occur in the order specified by search.
The indices of attributes in outatt indicating their position within the GOF header record. This information will only be supplied when search is TRUE.
Flag indicating the order of the output attribute value array. If search is TRUE, then the attribute values will be placed in sequential order (the same order they were input) in the attribute array. The location relative to were it appeared in the GOF header record for each corresponding attribute value will be placed in index. If search is FALSE, the attribute values will be placed in the attribute array in the same order as the attribute names appear in the GOF header record.
The c_attchk() routine is used to parse an array of attributes for a valid attribute NAME and VALUE. The location of the attribute NAME in the GOF header record determines where the VALUE will be placed in the output attribute array when the search flag is FALSE (i.e. VALUE is placed in the same location as the attribute NAME in the GOF header record). When the search flag is TRUE, attribute values will be placed, in the same order that they were entered, in the output attribute array and the location of each of those attributes in the GOF header record are placed in a separate index array. The input attribute text is also checked for valid syntax and the attribute value is checked for valid data type.
c_attchk() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> operation failed
c_attchk() is C callable only.