X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Foptions.c;h=58bd08b4c2959b481808ba90495f9c886e96adc5;hb=fef3094bcfb4fae0b7409bb5270ec260b1c6ddee;hp=1d3e066525469f69c638eaf8e244b7b388215aa9;hpb=b309ccfdfd4593f3aecbdf1dafaed2f2c9d4a779;p=dockapps%2Fwmnotify.git diff --git a/src/options.c b/src/options.c index 1d3e066..58bd08b 100644 --- a/src/options.c +++ b/src/options.c @@ -75,12 +75,12 @@ ParseCommandLineOptions( int argc, char *argv[] ) { int i; char *token; - bool config_file_on = FALSE; - bool display_on = FALSE; - bool geometry_on = FALSE; + bool config_file_on = false; + bool display_on = false; + bool geometry_on = false; /* Default values. */ - wmnotify_infos.debug = FALSE; + wmnotify_infos.debug = false; for( i = 1; i < argc; i++ ) { token = argv[i]; @@ -90,7 +90,7 @@ ParseCommandLineOptions( int argc, char *argv[] ) switch( token[1] ) { case 'c': if( strlen( &token[1] ) == 1 ) { - config_file_on = TRUE; + config_file_on = true; } else { InvalidOption( "invalid option", token ); @@ -98,15 +98,15 @@ ParseCommandLineOptions( int argc, char *argv[] ) break; case 'd': if( STREQ( "display", &token[1] ) ) { - display_on = TRUE; + display_on = true; } else if( strlen( &token[1] ) == 1 ) { - wmnotify_infos.debug = TRUE; + wmnotify_infos.debug = true; } break; case 'g': if( STREQ( "geometry", &token[1] ) ) { - geometry_on = TRUE; + geometry_on = true; } else { InvalidOption( "invalid option", token ); @@ -135,17 +135,17 @@ ParseCommandLineOptions( int argc, char *argv[] ) break; default: /* Processing options arguments */ - if( config_file_on != FALSE ) { + if( config_file_on != false ) { wmnotify_infos.optional_config_file = token; /*strcpy( config_file_name, token );*/ - config_file_on = FALSE; + config_file_on = false; } - else if( display_on != FALSE ) { - display_on = FALSE; + else if( display_on != false ) { + display_on = false; wmnotify_infos.display_arg = token; } - else if( geometry_on != FALSE ) { - geometry_on = FALSE; + else if( geometry_on != false ) { + geometry_on = false; wmnotify_infos.geometry_arg = token; } else { @@ -155,13 +155,13 @@ ParseCommandLineOptions( int argc, char *argv[] ) } /* end switch( token[0] ) */ } /* end for */ - if( config_file_on != FALSE ) { + if( config_file_on != false ) { InvalidOption( "missing configuration file parameter", NULL ); } - else if( display_on != FALSE ) { + else if( display_on != false ) { InvalidOption( "missing display parameter", NULL ); } - else if( geometry_on != FALSE ) { + else if( geometry_on != false ) { InvalidOption( "missing geometry parameter", NULL ); } }