+void
+add_classname (graph_t *g, int val, const char *name)
+{
+ struct classname_s *classname;
+
+ classname = XMALLOC (struct classname_s, 1);
+ classname->no = val;
+ classname->name = name;
+ classname->next = g->classname;
+ g->classname = classname;
+}
+
+void
+add_infoname (graph_t *g, int integer, const char *string)
+{
+ struct infoname_s *infoname;
+
+ infoname = XMALLOC (struct infoname_s, 1);
+ infoname->integer = integer;
+ infoname->string = string;
+ infoname->next = g->infoname;
+ g->infoname = infoname;
+}
+
+/* Build a colorentry struct and add it to the list. */
+void
+add_colorentry (graph_t *g, int color_idx, int red_cp,
+ int green_cp, int blue_cp)
+{
+ struct colorentry_s *ce;
+
+ ce = XMALLOC (struct colorentry_s, 1);
+ ce->color_index = color_idx;
+ ce->red_cp = red_cp;
+ ce->green_cp = green_cp;
+ ce->blue_cp = blue_cp;
+ ce->next = g->colorentry;
+ g->colorentry = ce;
+}
+