summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-11-08 18:14:46 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-11-09 01:26:07 +0100
commitad7e0941b376d792911f240377094a2e78ca8756 (patch)
treea7e65478aa213bd7639cd45e8025989b6d413bfa /apt-pkg
parent20801f613690b330c79b4f7a30dc3ff52b722468 (diff)
streamline display of --help in all tools
By convention, if I run a tool with --help or --version I expect it to exit successfully with the usage, while if I do call it wrong (like without any parameters) I expect the usage message shown with a non-zero exit.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/contrib/cmndline.cc3
-rw-r--r--apt-pkg/contrib/cmndline.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc
index 93c1f4664..ff8b09ebc 100644
--- a/apt-pkg/contrib/cmndline.cc
+++ b/apt-pkg/contrib/cmndline.cc
@@ -34,6 +34,9 @@ CommandLine::CommandLine(Args *AList,Configuration *Conf) : ArgList(AList),
Conf(Conf), FileList(0)
{
}
+CommandLine::CommandLine() : ArgList(NULL), Conf(NULL), FileList(0)
+{
+}
/*}}}*/
// CommandLine::~CommandLine - Destructor /*{{{*/
// ---------------------------------------------------------------------
diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h
index 143df58b2..58cbaa8c3 100644
--- a/apt-pkg/contrib/cmndline.h
+++ b/apt-pkg/contrib/cmndline.h
@@ -91,6 +91,7 @@ class CommandLine
static CommandLine::Args MakeArgs(char ShortOpt, char const *LongOpt,
char const *ConfName, unsigned long Flags) APT_CONST;
+ CommandLine();
CommandLine(Args *AList,Configuration *Conf);
~CommandLine();
};