summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r--apt-pkg/contrib/cmndline.cc10
-rw-r--r--apt-pkg/contrib/cmndline.h4
2 files changed, 9 insertions, 5 deletions
diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc
index 858a5300a..629b8e9e5 100644
--- a/apt-pkg/contrib/cmndline.cc
+++ b/apt-pkg/contrib/cmndline.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cmndline.cc,v 1.6 1998/11/25 23:54:22 jgg Exp $
+// $Id: cmndline.cc,v 1.7 1998/12/14 02:23:47 jgg Exp $
/* ######################################################################
Command Line Class - Sophisticated command line parser
@@ -316,7 +316,7 @@ unsigned int CommandLine::FileSize() const
// CommandLine::DispatchArg - Do something with the first arg /*{{{*/
// ---------------------------------------------------------------------
/* */
-bool CommandLine::DispatchArg(Dispatch *Map)
+bool CommandLine::DispatchArg(Dispatch *Map,bool NoMatch)
{
int I;
for (I = 0; Map[I].Match != 0; I++)
@@ -332,7 +332,11 @@ bool CommandLine::DispatchArg(Dispatch *Map)
// No matching name
if (Map[I].Match == 0)
- _error->Error("Invalid operation %s",FileList[0]);
+ {
+ if (NoMatch == true)
+ _error->Error("Invalid operation %s",FileList[0]);
+ }
+
return false;
}
/*}}}*/
diff --git a/apt-pkg/contrib/cmndline.h b/apt-pkg/contrib/cmndline.h
index 2e1e05229..40d7f08ba 100644
--- a/apt-pkg/contrib/cmndline.h
+++ b/apt-pkg/contrib/cmndline.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: cmndline.h,v 1.4 1998/11/25 23:54:31 jgg Exp $
+// $Id: cmndline.h,v 1.5 1998/12/14 02:23:47 jgg Exp $
/* ######################################################################
Command Line Class - Sophisticated command line parser
@@ -78,7 +78,7 @@ class CommandLine
bool Parse(int argc,const char **argv);
void ShowHelp();
unsigned int FileSize() const;
- bool DispatchArg(Dispatch *List);
+ bool DispatchArg(Dispatch *List,bool NoMatch = true);
CommandLine(Args *AList,Configuration *Conf);
~CommandLine();