X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=blobdiff_plain;f=conffile.c;h=90235290fb03a72b436524892c28240fa2f82186;hp=b17517b58092d800da561c44f28420dbcdd54f30;hb=b8dc47dd7590c3b160c1e6b1bdc991f5820e92ad;hpb=fe5e9cc422cd72526ccfceffbc7e5af8ac83b407 diff --git a/conffile.c b/conffile.c index b17517b..9023529 100644 --- a/conffile.c +++ b/conffile.c @@ -10,9 +10,6 @@ #include "util.h" #include "ipaddr.h" -/* from modules.c */ -extern void init_builtin_modules(dict_t *dict); - static struct cloc no_loc={"none",0}; struct atomlist { @@ -466,6 +463,9 @@ static dict_t *process_config(struct p_node *c) context=root; /* Predefined keys for boolean values */ + /* "nowise" and "verily" have the advantage of being the same + length, so they line up nicely... thanks VKC and SGT (who also + point out that "mayhap" is a good "maybe" value as well) */ i=new_item(t_bool,no_loc); i->data.bool=False; false=list_append(NULL,i); @@ -478,12 +478,18 @@ static dict_t *process_config(struct p_node *c) dict_add(root,"no",false); dict_add(root,"No",false); dict_add(root,"NO",false); + dict_add(root,"nowise",false); + dict_add(root,"Nowise",false); + dict_add(root,"NOWISE",false); dict_add(root,"true",true); dict_add(root,"True",true); dict_add(root,"TRUE",true); dict_add(root,"yes",true); dict_add(root,"Yes",true); dict_add(root,"YES",true); + dict_add(root,"verily",true); + dict_add(root,"Verily",true); + dict_add(root,"VERILY",true); add_closure(root,"makelist",makelist); add_closure(root,"readfile",readfile); @@ -559,7 +565,7 @@ uint32_t list_length(list_t *a) return l; } -list_t *list_copy(list_t *a) +static list_t *list_copy(list_t *a) { list_t *r, *i, *b, *l; @@ -619,6 +625,7 @@ void add_closure(dict_t *dict, cstring_t name, apply_fn apply) closure_t *c; c=safe_malloc(sizeof(*c),"add_closure"); c->description=name; + c->type=CL_PURE; c->apply=apply; c->interface=NULL;