diff options
Diffstat (limited to '')
-rw-r--r-- | cfg.c | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: cfg.c,v 1.17 2003/10/05 17:58:50 reinelt Exp $^ +/* $Id: cfg.c,v 1.18 2003/10/11 06:01:52 reinelt Exp $^ * * config file stuff * @@ -22,6 +22,13 @@ * * * $Log: cfg.c,v $ + * Revision 1.18 2003/10/11 06:01:52 reinelt + * + * renamed expression.{c,h} to client.{c,h} + * added config file client + * new functions 'AddNumericVariable()' and 'AddStringVariable()' + * new parameter '-i' for interactive mode + * * Revision 1.17 2003/10/05 17:58:50 reinelt * libtool junk; copyright messages cleaned up * @@ -135,7 +142,7 @@ #include "debug.h" #include "cfg.h" - +#include "client.h" typedef struct { char *key; @@ -308,6 +315,13 @@ static int check_cfg_source(char *file) } +static void cfg_client (RESULT *result, RESULT *arg1) +{ + char *value=cfg_get(R2S(arg1), ""); + SetResult(&result, R_STRING, value); +} + + int l4l_cfg_init (char *file) { FILE *stream; @@ -350,6 +364,10 @@ int l4l_cfg_init (char *file) cfg_add (line, p, 0); } fclose (stream); + + // register as a client + AddFunction ("cfg", 1, cfg_client); + return 0; } |