diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:20 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:51:20 +0000 |
commit | bfd22fc0ac2632c6196f5149dc3b3671d9ff15e0 (patch) | |
tree | 2affe097f22065e344d2fc8921049ea7e3185d9b /apt-pkg/contrib/configuration.cc | |
parent | 46976ca4e7393625fb25728d876e0c15b7e55c15 (diff) |
Working acquire code
Author: jgg
Date: 1998-11-05 07:21:35 GMT
Working acquire code
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 27299ec6a..da026f0f6 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.cc,v 1.9 1998/10/30 07:53:42 jgg Exp $ +// $Id: configuration.cc,v 1.10 1998/11/05 07:21:43 jgg Exp $ /* ###################################################################### Configuration Class @@ -292,8 +292,14 @@ bool ReadConfigFile(Configuration &Conf,string FName) } // Discard single line comments + bool InQuote = false; for (char *I = Buffer; *I != 0; I++) { + if (*I == '"') + InQuote = !InQuote; + if (InQuote == true) + continue; + if (*I == '/' && I[1] == '/') { *I = 0; @@ -304,6 +310,11 @@ bool ReadConfigFile(Configuration &Conf,string FName) // Look for multi line comments for (char *I = Buffer; *I != 0; I++) { + if (*I == '"') + InQuote = !InQuote; + if (InQuote == true) + continue; + if (*I == '/' && I[1] == '*') { InComment = true; @@ -398,7 +409,7 @@ bool ReadConfigFile(Configuration &Conf,string FName) string Word; if (ParseCWord(LineBuffer.c_str()+Pos,Word) == false) return _error->Error("Syntax error %s:%u: Malformed value",FName.c_str(),CurLine); - + // Generate the item name string Item; if (ParentTag.empty() == true) |