summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/cmndline.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:26 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:26 +0000
commit7f25bdff3a0fa55ba897964d5c82475b45f3325a (patch)
tree7190f1448161be6bfd163cdd88efee6101e1ae8c /apt-pkg/contrib/cmndline.cc
parenta9975068c7d55b2fbe46aacf94a36b460fd1d9da (diff)
Dsync merge
Author: jgg Date: 1999-01-18 06:20:07 GMT Dsync merge
Diffstat (limited to 'apt-pkg/contrib/cmndline.cc')
-rw-r--r--apt-pkg/contrib/cmndline.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/apt-pkg/contrib/cmndline.cc b/apt-pkg/contrib/cmndline.cc
index 629b8e9e5..ccacb9609 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.7 1998/12/14 02:23:47 jgg Exp $
+// $Id: cmndline.cc,v 1.8 1999/01/18 06:20:07 jgg Exp $
/* ######################################################################
Command Line Class - Sophisticated command line parser
@@ -96,7 +96,6 @@ bool CommandLine::Parse(int argc,const char **argv)
if (Opt == OptEnd)
return _error->Error("Command line option %s is not understood",argv[I]);
Opt++;
- cout << Opt << endl;
for (A = ArgList; A->end() == false &&
stringcasecmp(Opt,OptEnd,A->LongOpt) != 0; A++);
@@ -205,7 +204,13 @@ bool CommandLine::HandleOpt(int &I,int argc,const char *argv[],
return true;
}
- Conf->Set(A->ConfName,Argument);
+ const char *I = A->ConfName;
+ for (; *I != 0 && *I != ' '; I++);
+ if (*I == ' ')
+ Conf->Set(string(A->ConfName,0,I-A->ConfName),string(I+1) + Argument);
+ else
+ Conf->Set(A->ConfName,string(I) + Argument);
+
return true;
}