From 8cc792e5342b12e657ce1014309f01b7ee5e678a Mon Sep 17 00:00:00 2001 From: fluxgen Date: Tue, 13 Aug 2002 23:56:02 +0000 Subject: minor cleaning --- src/main.cc | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/src/main.cc b/src/main.cc index 0ab2b24..9317792 100644 --- a/src/main.cc +++ b/src/main.cc @@ -22,37 +22,34 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: main.cc,v 1.6 2002/04/04 11:28:19 fluxgen Exp $ +// $Id: main.cc,v 1.7 2002/08/13 23:56:02 fluxgen Exp $ -//use GNU extensions -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif // _GNU_SOURCE -#include "../version.h" - -#ifdef HAVE_CONFIG_H -# include "../config.h" -#endif // HAVE_CONFIG_H #include "i18n.hh" #include "fluxbox.hh" -#ifdef HAVE_STDIO_H -# include -#endif // HAVE_STDIO_H +#include "../version.h" -#ifdef STDC_HEADERS -# include -# include -#endif // STDC_HEADERS +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif // HAVE_CONFIG_H -#ifdef HAVE_UNISTD_H +//use GNU extensions +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif // _GNU_SOURCE + +#include +#include +#include + +#ifdef HAVE_UNISTD_H #include #endif // HAVE_UNISTD_H -#ifdef HAVE_SYS_PARAM_H -# include +#ifdef HAVE_SYS_PARAM_H +#include #endif // HAVE_SYS_PARAM_H #ifndef MAXPATHLEN @@ -71,6 +68,7 @@ using namespace std; uds::uds_flags_t uds::flags = uds::leak_check; #endif //!DEBUG_UDS + const char *getNLSYesNoMsg(bool val) { if (val) { return I18n::instance()->getMessage( @@ -132,13 +130,12 @@ int main(int argc, char **argv) { "warning: couldn't set environment variable 'DISPLAY'\n")); perror("putenv()"); } - } else if (! strcmp(argv[i], "-version")) { + } else if (strcmp(argv[i], "-version") == 0) { // print current version string printf("Fluxbox %s : (c) 2001-2002 Henrik Kinnunen \n\n", __fluxbox_version); - exit(0); - } else if (! strcmp(argv[i], "-help")) { + } else if (strcmp(argv[i], "-help") == 0) { // print program usage and command line options printf(i18n-> getMessage( -- cgit v0.11.2