From 3487cada8f2ec50b20ccf919d36df211030f1088 Mon Sep 17 00:00:00 2001 From: Nick White Date: Sat, 3 May 2008 01:28:13 +0000 Subject: Changed a couple of configuration variable names Altered name of issuepath config variable to savepath, in config.ini as well as code Altered name of issue_xml config variable to toc_xml Removed unnecessary variable definitions from header git-archimport-id: getht@sv.gnu.org/getht--mainline--0.1--patch-49 --- src/config.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/config.c') diff --git a/src/config.c b/src/config.c index f0545d3..e89bc94 100644 --- a/src/config.c +++ b/src/config.c @@ -33,7 +33,7 @@ extern char proxy_user[STR_MAX]; extern char proxy_pass[STR_MAX]; extern char issue_uri[STR_MAX]; -int loadconfig(char * htde_path, char * issue_path, int * update) +int loadconfig(char * htde_path, char * save_path, int * update) /* Loads variables from config file to extern and passed * variables. */ { @@ -54,8 +54,8 @@ int loadconfig(char * htde_path, char * issue_path, int * update) fscanf(config_file, "%s = %s", option, parameter); if(option[0] == '#'); /* ignore lines beginning with a hash */ - else if(!strcmp(option, "issuepath")) - strncpy(issue_path, parameter, STR_MAX); + else if(!strcmp(option, "savepath")) + strncpy(save_path, parameter, STR_MAX); else if(!strcmp(option, "startup_check")) *update = atoi(parameter); else if(!strcmp(option, "toc_uri")) @@ -101,7 +101,7 @@ int loadconfig(char * htde_path, char * issue_path, int * update) return 0; } -int writefreshconfig(char * htde_path, char * issue_path, int * update) +int writefreshconfig(char * htde_path, char * save_path, int * update) /* Write a new config file according to extern and passed variables. */ { FILE * config_file; @@ -117,8 +117,8 @@ int writefreshconfig(char * htde_path, char * issue_path, int * update) else fprintf(stdout,"Writing a fresh config file to %s.\n",filepath); - if(issue_path[0]) - fprintf(config_file, "%s = %s\n", "issuepath", issue_path); + if(save_path[0]) + fprintf(config_file, "%s = %s\n", "savepath", save_path); if(update) fprintf(config_file, "%s = %i\n", "startup_check", *update); if(issue_uri[0]) @@ -153,7 +153,7 @@ int writefreshconfig(char * htde_path, char * issue_path, int * update) return 0; } -int updateconfig(char * htde_path, char * issue_path, int * update) +int updateconfig(char * htde_path, char * save_path, int * update) /* Read existing config file, and rewrite any variables which differ * in memory. */ { -- cgit v1.2.3