LAD Project: the SLOTNAMES Module
Summary: The SLOTNAMES object serves the following purpose. It represents
a sequence of slotnames.
Publicly available knowledge. Each [slotname] is implemented as
a string. And each [slotnames] is represented as a
string_array.
For your convenience,
we list here the main operations on string_arrays.
string_array *mk_empty_string_array();
void add_to_string_array(string_array *starr,char *sname);
Assume string_array is previously of size n. After this it is of size n+1,
and the n+1'th element is a COPY of sname.
int string_array_size(string_array *starr);
char *string_array_ref(string_array *starr,int index);
Returns a pointer (not a copy) to the index'th element stored in
the string_array. Error if index < 0 or index >= size
void fprintf_string_array(FILE *s,char *m1,string_array *starr,char *m2);
void free_string_array(string_array *starr);