From: Frédéric Marchal Date: Mon, 8 Mar 2010 08:00:48 +0000 (+0000) Subject: Fix typo and add CR at the end of debuga X-Git-Tag: v2.3-pre2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=248a4787f0b20eeb35155512074023066ebea68f;p=thirdparty%2Fsarg.git Fix typo and add CR at the end of debuga --- diff --git a/getconf.c b/getconf.c index 455dd39..411f53c 100644 --- a/getconf.c +++ b/getconf.c @@ -146,7 +146,7 @@ static int getparam_string(const char *param,char *buf,char *value,int value_siz while (*buf && (unsigned char)*buf<=' ') buf++; if (strlen(buf)>=value_size) { - debuga(_("The string value of parameter \"%s\" is too long"),param); + debuga(_("The string value of parameter \"%s\" is too long\n"),param); exit(1); } strcpy(value,buf); @@ -166,7 +166,7 @@ static int getparam_quoted(const char *param,char *buf,char *value,int value_siz while (*buf && (unsigned char)*buf<=' ') buf++; if (*buf != '\"') { - debuga(_("Missing double quote after parameter \"%s\""),param); + debuga(_("Missing double quote after parameter \"%s\"\n"),param); exit(1); } buf++; @@ -178,7 +178,7 @@ static int getparam_quoted(const char *param,char *buf,char *value,int value_siz value[i]='\0'; if (*buf != '\"') { - debuga(_("Missing double quote after parameter \"%s\" or value is more than %d bytes long"),param,value_size); + debuga(_("Missing double quote after parameter \"%s\" or value is more than %d bytes long\n"),param,value_size); exit(1); } fixnone(value); @@ -199,11 +199,11 @@ static int getparam_2words(const char *param,char *buf,char *word1,int word1_siz for (i=0 ; i' ' ; i++) word1[i]=*buf++; if (i>=word1_size) { - debuga(_("The first word of parameter \"%s\" is more than %d bytes long"),param,word1_size-1); + debuga(_("The first word of parameter \"%s\" is more than %d bytes long\n"),param,word1_size-1); exit(1); } if (*buf!=' ') { - debuga(_("Missing second word for parameter \"%s\""),param); + debuga(_("Missing second word for parameter \"%s\"\n"),param); exit(1); } word1[i]=0; @@ -213,7 +213,7 @@ static int getparam_2words(const char *param,char *buf,char *word1,int word1_siz for (i=0 ; i' ' ; i++) word2[i]=*buf++; if (i>=word2_size) { - debuga(_("The second word of parameter \"%s\" is more than %d bytes long"),param,word2_size-1); + debuga(_("The second word of parameter \"%s\" is more than %d bytes long\n"),param,word2_size-1); exit(1); } word2[i]=0; @@ -236,7 +236,7 @@ static int getparam_int(const char *param,char *buf,int *value) next=0; if (sscanf(buf,"%d%n",value,&next) != 1 || (unsigned char)buf[next] > ' ') { - debuga(_("The integer value of parameter \"%s\" is invalid"),param); + debuga(_("The integer value of parameter \"%s\" is invalid\n"),param); exit(1); } return(1); @@ -288,11 +288,11 @@ static int getparam_list(const char *param,struct param_list *options,int noptio } for (i=0 ; i=noptions) { - debuga(_("SUnknown value \"%s\" for parameter \"%s\""),buf,param); + debuga(_("Unknown value \"%s\" for parameter \"%s\"\n"),buf,param); exit(1); } if ((*value & options[i].exclude)!=0) { - debuga(_("Value \"%s\" conflicts with other selected values for parameter \"%s\""),buf,param); + debuga(_("Value \"%s\" conflicts with other selected values for parameter \"%s\"\n"),buf,param); exit(1); } *value|=options[i].value; @@ -359,7 +359,7 @@ static void parmtest(char *buf) if (is_param("date_format",buf)) { getword_start(&gwarea,buf); if (getword_multisep(wbuf,sizeof(wbuf),&gwarea,' ')<0) { - debuga(_("Maybe you have a broken record or garbage in \"date_format\" parameter")); + debuga(_("Maybe you have a broken record or garbage in \"date_format\" parameter\n")); exit(1); } strncpy(DateFormat,gwarea.current,1); @@ -369,14 +369,14 @@ static void parmtest(char *buf) if (is_param("hours",buf)) { if( getnumlist( buf, &hours, 24, 24 ) ) { - debuga(_("Error: Invalid syntax in hours tag!")); + debuga(_("Error: Invalid syntax in hours tag!\n")); exit( 1 ); } } if (is_param("weekdays",buf)) { if( getnumlist( buf, &weekdays, 7, 7 ) ) { - debuga(_("Error: Invalid syntax in weekdays tag!")); + debuga(_("Error: Invalid syntax in weekdays tag!\n")); exit( 1 ); } } @@ -388,7 +388,7 @@ static void parmtest(char *buf) if (is_param("access_log",buf)>0) { if (AccessLogFromCmdLine==0) { if (NAccessLog>=MAXLOGS) { - debuga(_("Too many log files in configuration file")); + debuga(_("Too many log files in configuration file\n")); exit(1); } getparam_string("access_log",buf,AccessLog[NAccessLog],MAXLEN); @@ -587,12 +587,12 @@ static void parmtest(char *buf) if(strstr(buf,"byte_cost") != 0) { getword_start(&gwarea,buf); if (getword_multisep(wbuf,sizeof(wbuf),&gwarea,' ')<0) { - debuga(_("The \"byte_cost\" parameter of the configuration file is invalid")); + debuga(_("The \"byte_cost\" parameter of the configuration file is invalid\n")); exit(1); } cost=atol(gwarea.current); if (getword_multisep(wbuf,sizeof(wbuf),&gwarea,' ')<0) { - debuga(_("The \"byte_cost\" parameter of the configuration file is invalid")); + debuga(_("The \"byte_cost\" parameter of the configuration file is invalid\n")); exit(1); } nocost=my_atoll(gwarea.current); @@ -609,10 +609,10 @@ void getconf(void) char buf[MAXLEN]; if(debug) - debuga(_("Loading configuration from: %s"),ConfigFile); + debuga(_("Loading configuration from: %s\n"),ConfigFile); if ((fp_in = fopen(ConfigFile, "r")) == NULL) { - debuga(_("SARG: (getconf) Cannot open file: %s"),ConfigFile); + debuga(_("(getconf) Cannot open file: %s\n"),ConfigFile); exit(1); }