From 4ebba1b36f4f171fb5daa25a8578e21d2740c517 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 15 Sep 2008 12:27:28 +0200 Subject: use !NDEBUG instead of DEBUG NDEBUG is more commonly used than DEBUG, e.g. in assert.h. Convert all macros to NDEBUG, and declare NDEBUG when debugging is disabled. --- src/options.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/options.c') diff --git a/src/options.c b/src/options.c index 60101c478..1ecc79103 100644 --- a/src/options.c +++ b/src/options.c @@ -67,7 +67,7 @@ static arg_opt_t option_table[] = { { 'f', "config", "FILE", "Read configuration from file" }, { 'k', "key-file","FILE", "Read configuration from file" }, { 'S', "no-splash", NULL, "Don't show the splash screen" }, -#ifdef DEBUG +#ifndef NDEBUG { 'K', "dump-keys", NULL, "Dump key bindings to stdout" }, { 'D', "debug", NULL, "Enable debug output on stderr" }, #endif @@ -152,7 +152,7 @@ handle_option(int c, char *arg) case 'V': /* --version */ printf("%s version: %s\n", PACKAGE, VERSION); printf("build options:"); -#ifdef DEBUG +#ifndef NDEBUG printf(" debug"); #endif #ifdef ENABLE_NLS @@ -216,7 +216,7 @@ handle_option(int c, char *arg) case 'S': /* --key-file */ /* the splash screen was removed */ break; -#ifdef DEBUG +#ifndef NDEBUG case 'K': /* --dump-keys */ read_configuration(&options); write_key_bindings(stdout, KEYDEF_WRITE_ALL | KEYDEF_COMMENT_ALL); -- cgit v1.2.3