Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=yaxmenu.git;a=commitdiff;h=d19820339ae6fffe01e57c22b3be3251b023be82

commit d19820339ae6fffe01e57c22b3be3251b023be82
Author: James Buren <r...@frugalware.org>
Date:   Mon Dec 7 15:06:01 2009 -0600

config.c
* update for changes in xparsefile

diff --git a/src/config.c b/src/config.c
index ae07fbe..19f9715 100644
--- a/src/config.c
+++ b/src/config.c
@@ -27,13 +27,16 @@ static const char config_path_format[]   = "%s/cfgrc";
static const char config_key_theme[]     = "theme";
static const char config_key_menu[]      = "menu";

-static bool _config_parse_callback(const char *key,const char *val) {
+static bool _config_parse_callback(const char *key,const char *val,void *data) 
{
+  assert(key && val && !data);
+
if(!strcasecmp(key,config_key_theme))
xsetstr(&G->theme,val);
else if(!strcasecmp(key,config_key_menu))
xsetstr(&G->menu,val);
else
return false;
+
return true;
}

@@ -56,7 +59,7 @@ bool config_parse(void) {
return false;
}

-  num = xparsefile(file,_config_parse_callback);
+  num = xparsefile(file,_config_parse_callback,NULL);

if(num)
eprintf("Parsing error at line %u in %s.\n",num,path);
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to