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
This commit is contained in:
psychon
2009-03-24 18:50:11 +00:00
parent d31c7dcd86
commit 230a556dc9
+6 -8
View File
@@ -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':