31 for (n = 0; n < kv->
nitems; n++)
32 if (kv->
value[n][0]) {
33 if (EOF == fprintf(fd,
"%s: %s\n", kv->
key[n], kv->
value[n]))
58 while (
G_getl2(buf,
sizeof(buf) - 1, fd) != 0) {
60 while (*value && *value !=
':')
int G_getl2(char *, int, FILE *)
Gets a line of text from a file of any pedigree.
struct Key_Value * G_fread_key_value(FILE *fd)
Read key/values pairs from file.
void G_strip(char *)
Removes all leading and trailing white space from string.
int G_fwrite_key_value(FILE *fd, const struct Key_Value *kv)
Write key/value pairs to file.
SYMBOL * err(FILE *fp, SYMBOL *s, char *msg)
void G_set_key_value(const char *, const char *, struct Key_Value *)
Set value for given key.
struct Key_Value * G_create_key_value(void)
Allocate and initialize Key_Value structure.