X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/44bdf5ac73d8a3a0849a0ae400caf4edc07a53e2..3f36eb5f9c4635756a38c9327c769599d7b58c1f:/conffile.c diff --git a/conffile.c b/conffile.c index 53c334b..ede9c49 100644 --- a/conffile.c +++ b/conffile.c @@ -154,7 +154,7 @@ static void ptree_mangle(struct p_node *t) #ifdef DUMP_PARSE_TREE /* Convert a node type to a string, for parse tree dump */ -static string_t ntype(uint32_t type) +static const char *ntype(uint32_t type) { switch(type) { case T_STRING: return "T_STRING"; @@ -179,14 +179,14 @@ static void ptree_indent(int amount) for (i=0; itype<10) { + if (T_IS_PRIMITIVE(n->type)) { switch(n->type) { case T_STRING: printf("T_STRING: \"%s\" (%s line %d)\n", n->data.string,n->loc.file,n->loc.line); break; @@ -197,7 +197,7 @@ static void ptree_dump(struct p_node *n, uint32_t d) default: printf("**unknown primitive type**\n"); break; } } else { - assert(dtype),n->loc.file,n->loc.line); ptree_indent(d); printf(" |-"); ptree_dump(n->l, d+1);