From 230a556dc9ec8307c4389ea76a9f2d65256b23f2 Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 24 Mar 2009 18:50:11 +0000 Subject: [PATCH] Use -D instead of -g as a short form for --debug This also cleans up some minor #ifdef for the initial value for bForeground. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1443 726aef4b-f618-498e-8847-2d620e286838 --- main.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/main.cpp b/main.cpp index 215f4d22..1c8efd86 100644 --- a/main.cpp +++ b/main.cpp @@ -12,7 +12,7 @@ static struct option g_LongOpts[] = { { "help", no_argument, 0, 'h' }, { "version", no_argument, 0, 'v' }, - { "debug", no_argument, 0, 'g' }, + { "debug", no_argument, 0, 'D' }, { "foreground", no_argument, 0, 'f' }, { "no-color", no_argument, 0, 'n' }, { "allow-root", no_argument, 0, 'r' }, @@ -32,7 +32,7 @@ static void GenerateHelp(const char *appname) { CUtils::PrintMessage("\t-h, --help List available command line options (this page)"); CUtils::PrintMessage("\t-v, --version Output version information and exit"); CUtils::PrintMessage("\t-f, --foreground Don't fork into the background"); - CUtils::PrintMessage("\t-g, --debug Output debugging information (Implies -f)"); + CUtils::PrintMessage("\t-D, --debug Output debugging information (Implies -f)"); CUtils::PrintMessage("\t-n, --no-color Don't use escape sequences in the output"); CUtils::PrintMessage("\t-r, --allow-root Don't complain if ZNC is run as root"); CUtils::PrintMessage("\t-c, --makeconf Interactively create a new config"); @@ -82,19 +82,17 @@ int main(int argc, char** argv) { bool bMakeConf = false; bool bMakePass = false; bool bAllowRoot = false; - bool bForeground = + bool bForeground = false; #ifdef _DEBUG - true; -#else - false; + bForeground = true; #endif #ifdef HAVE_LIBSSL bool bMakePem = false; bool bEncPem = false; - while ((iArg = getopt_long(argc, argv, "hvnrcsped:gf", g_LongOpts, &iOptIndex)) != -1) { + while ((iArg = getopt_long(argc, argv, "hvnrcsped:Df", g_LongOpts, &iOptIndex)) != -1) { #else - while ((iArg = getopt_long(argc, argv, "hvnrcsd:gf", g_LongOpts, &iOptIndex)) != -1) { + while ((iArg = getopt_long(argc, argv, "hvnrcsd:Df", g_LongOpts, &iOptIndex)) != -1) { #endif /* HAVE_LIBSSL */ switch (iArg) { case 'h':