/*
- * $Id: cf_gen.cc,v 1.1 1997/06/26 22:29:30 wessels Exp $
+ * $Id: cf_gen.cc,v 1.2 1997/06/26 23:02:15 wessels Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Max Okumoto
printf("Error in input file\n");
exit(1);
}
- curr = malloc(sizeof(Entry));
+ curr = calloc(1, sizeof(Entry));
curr->name = strdup(name);
- curr->loc = NULL;
- curr->doc = NULL;
state = s1;
} else if (!strcmp(buff, "EOF")) {
state = sSTART;
} else {
- Line *line = malloc(sizeof(Line));
+ Line *line = calloc(1, sizeof(Line));
line->data = strdup(buff);
line->next = curr->doc;