+static struct option_t* add_option (const char* name, const char* init,
+ short type, short dup) {
+ struct option_t* option = mem_calloc (1, sizeof (struct option_t));
+
+ debug_print (1, ("adding $%s\n", name));
+
+ option->option = str_dup (name);
+ option->type = type;
+ if (init)
+ option->init = dup ? str_dup (init) : (char*) init;
+ return (option);
+}
+
+/* creates new option_t* of type DT_USER for $user_ var */
+static struct option_t* add_user_option (const char* name) {
+ return (add_option (name, NULL, DT_USER, 1));
+}
+
+/* free()'s option_t* */
+static void del_option (void* p) {
+ struct option_t* ptr = (struct option_t*) p;
+ char* s = (char*) ptr->data;
+ debug_print (1, ("removing option '%s' from table\n", NONULL (ptr->option)));
+ mem_free (&ptr->option);
+ mem_free (&s);
+ mem_free (&ptr->init);
+ mem_free (&ptr);
+}
+