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) {
int G_getl2(char *, int, FILE *)
Gets a line of text from a file of any pedigree.
void G_set_key_value(const char *, const char *, struct Key_Value *)
Set value for given key.
void G_strip(char *)
Removes all leading and trailing white space from string.
struct Key_Value * G_create_key_value(void)
Allocate and initialize Key_Value structure.
int G_fwrite_key_value(FILE *fd, const struct Key_Value *kv)
Write key/value pairs to file.
struct Key_Value * G_fread_key_value(FILE *fd)
Read key/values pairs from file.
SYMBOL * err(FILE *fp, SYMBOL *s, char *msg)