From bf57747fe0a5223fcbbbc08ec2962dd2ed114b5b Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Sun, 23 Apr 2006 12:03:23 +0200 Subject: [PATCH] conf2: lists seem to be debugged --- lib/conf2.c | 5 +++-- lib/conf2.t | 9 +++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/conf2.c b/lib/conf2.c index 4fe9280b..e509345b 100644 --- a/lib/conf2.c +++ b/lib/conf2.c @@ -639,9 +639,10 @@ add_to_list(void *list, struct cnode *node, enum operation op) static byte * interpret_add_list(struct cf_item *item, int number, byte **pars, int *processed, void *ptr, enum operation op) { + if (op >= OP_REMOVE) + return cf_printf("You have to open a block for operation %s", op_names[op]); if (!number) - return "Missing value"; - ASSERT(op < OP_REMOVE); + return "Nothing to add to the list"; struct cf_section *sec = item->u.sec; *processed = 0; while (number > 0) diff --git a/lib/conf2.t b/lib/conf2.t index bc79381b..7bdbb43a 100644 --- a/lib/conf2.t +++ b/lib/conf2.t @@ -25,9 +25,14 @@ unknown.ignored :-) top.slaves cairns gpua 7 7 -10% +10% top.slaves daintree rafc 4 5 -171% top.slaves coogee pum 9 8 -top.slaves {name=bondi; level=\ +top.slaves:prepend {name=bondi; level=\ "PUG"; confidence 10 10} -#top.slaves:remove +top.slaves:remove {name daintree} +top.slaveS:edit {level PUG} Bondi PUG! +top.slaveS:before {level pum}{ + confidence 2 + list 123 456 789 +} topp.a=15 top.nr1= 15 -- 2.39.2