diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:55:40 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:55:40 +0000 |
commit | 7834cb579fe88a11bd3850363bbd4c77797581bb (patch) | |
tree | c41841b664cbd29e9abd6addf54634faf0559120 /apt-pkg/contrib/configuration.cc | |
parent | b7675e5dac28258f2d44bb63f13381dd4f5c9ec7 (diff) |
More fixes
Author: jgg
Date: 2000-01-16 05:36:17 GMT
More fixes
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 1c58b9881..302feee6e 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.13 1999/07/02 23:17:00 jgg Exp $ +// $Id: configuration.cc,v 1.14 2000/01/16 05:36:17 jgg Exp $ /* ###################################################################### Configuration Class @@ -322,8 +322,9 @@ bool ReadConfigFile(Configuration &Conf,string FName) break; } } - + // Look for multi line comments + InQuote = false; for (char *I = Buffer; *I != 0; I++) { if (*I == '"') @@ -357,9 +358,13 @@ bool ReadConfigFile(Configuration &Conf,string FName) continue; // We now have a valid line fragment + InQuote = false; for (char *I = Buffer; *I != 0;) { - if (*I == '{' || *I == ';' || *I == '}') + if (*I == '"') + InQuote = !InQuote; + + if (InQuote == false && (*I == '{' || *I == ';' || *I == '}')) { // Put the last fragement into the buffer char *Start = Buffer; |