[cvs] bogofilter config.c,1.76,1.77

Matthias Andree matthias.andree at gmx.de
Sun Dec 8 21:22:40 CET 2002


relson at users.sourceforge.net writes:

> Modified Files:
> 	config.c 
> Log Message:
> Merge processing of options '-?' and '-h' since their processing is
> the same.  Print and log the "unhandled option" message before
> exiting.

It is not the same. "unhandled option" returns '?' and means exit(2)
aka. error, "-h" gives exit(0). Please revert (you could generally use
"cvs update -j1.77 -j1.76 config.c" if you changed it since, note the
higher version first to revert a change.)

> diff -u -d -r1.76 -r1.77
> --- config.c	7 Dec 2002 21:16:22 -0000	1.76
> +++ config.c	8 Dec 2002 02:30:17 -0000	1.77
> @@ -24,6 +24,7 @@
>  #include "bogoconfig.h"
>  #include "bogofilter.h"
>  #include "charset.h"
> +#include "error.h"
>  #include "find_home.h"
>  #include "format.h"
>  #include "lexer.h"
> @@ -488,10 +489,6 @@
>  	    break;
>  
>  	case '?':
> -	    help();
> -	    exit(2);
> -	    break;
> -
>  	case 'h':
>  	    help();
>              exit(0);
> @@ -573,9 +570,9 @@
>  	    break;
>  
>  	default:
> -	    fprintf(stderr, "Internal error: unhandled option '%c' "
> -		    "(%02X)\n", option, (unsigned int)option);
> -	    exit(2); 
> +	    PRINT_ERROR("Internal error: unhandled option '%c' "
> +			"(%02X)\n", option, (unsigned int)option);
> +	    exit(2);
>  	}
>      }

-- 
Matthias Andree




More information about the bogofilter-dev mailing list