Loading apt-pkg/contrib/configuration.cc +1 −1 Original line number Diff line number Diff line Loading @@ -582,7 +582,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, if (InQuote == true) continue; if (*I == '/' && I + 1 != End && I[1] == '/') if ((*I == '/' && I + 1 != End && I[1] == '/') || *I == '#') { End = I; break; Loading apt-pkg/init.h +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ // See the makefile #define APT_PKG_MAJOR 4 #define APT_PKG_MINOR 6 #define APT_PKG_MINOR 8 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; Loading apt-pkg/makefile +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ include ../buildlib/defaults.mak # methods/makefile - FIXME LIBRARY=apt-pkg LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) MAJOR=4.7 MAJOR=4.8 MINOR=0 SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil APT_DOMAIN:=libapt-pkg$(MAJOR) Loading apt-pkg/policy.cc +16 −2 Original line number Diff line number Diff line Loading @@ -239,7 +239,21 @@ signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg) return 0; } /*}}}*/ // PreferenceSection class - Overriding the default TrimRecord method /*{{{*/ // --------------------------------------------------------------------- /* The preference file is a user generated file so the parser should therefore be a bit more friendly by allowing comments and new lines all over the place rather than forcing a special format */ class PreferenceSection : public pkgTagSection { void TrimRecord(bool BeforeRecord, const char* &End) { for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r' || Stop[0] == '#'); Stop++) if (Stop[0] == '#') Stop = (const char*) memchr(Stop,'\n',End-Stop); } }; /*}}}*/ // ReadPinFile - Load the pin file into a Policy /*{{{*/ // --------------------------------------------------------------------- /* I'd like to see the preferences file store more than just pin information Loading @@ -259,7 +273,7 @@ bool ReadPinFile(pkgPolicy &Plcy,string File) if (_error->PendingError() == true) return false; pkgTagSection Tags; PreferenceSection Tags; while (TF.Step(Tags) == true) { string Name = Tags.FindS("Package"); Loading apt-pkg/tagfile.cc +16 −5 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ bool pkgTagFile::Resize() End = Start + EndSize; return true; } /*}}}*/ // TagFile::Step - Advance to the next section /*{{{*/ // --------------------------------------------------------------------- /* If the Section Scanner fails we refill the buffer and try again. Loading Loading @@ -216,6 +216,8 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) TagCount = 0; while (TagCount+1 < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End) { TrimRecord(true,End); // Start a new index and add it to the hash if (isspace(Stop[0]) == 0) { Loading @@ -234,7 +236,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) if (Stop+1 < End && Stop[1] == '\n') { Indexes[TagCount] = Stop - Section; for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++); TrimRecord(false,End); return true; } Loading @@ -244,6 +246,16 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) return false; } /*}}}*/ // TagSection::TrimRecord - Trim off any garbage before/after a record /*{{{*/ // --------------------------------------------------------------------- /* There should be exactly 2 newline at the end of the record, no more. */ void pkgTagSection::TrimRecord(bool BeforeRecord, const char*& End) { if (BeforeRecord == true) return; for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++); } /*}}}*/ // TagSection::Trim - Trim off any trailing garbage /*{{{*/ // --------------------------------------------------------------------- /* There should be exactly 1 newline at the end of the buffer, no more. */ Loading Loading @@ -390,7 +402,6 @@ bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags, return true; } /*}}}*/ // TFRewrite - Rewrite a control record /*{{{*/ // --------------------------------------------------------------------- /* This writes the control record to stdout rewriting it as necessary. The Loading Loading
apt-pkg/contrib/configuration.cc +1 −1 Original line number Diff line number Diff line Loading @@ -582,7 +582,7 @@ bool ReadConfigFile(Configuration &Conf,const string &FName,bool AsSectional, if (InQuote == true) continue; if (*I == '/' && I + 1 != End && I[1] == '/') if ((*I == '/' && I + 1 != End && I[1] == '/') || *I == '#') { End = I; break; Loading
apt-pkg/init.h +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ // See the makefile #define APT_PKG_MAJOR 4 #define APT_PKG_MINOR 6 #define APT_PKG_MINOR 8 #define APT_PKG_RELEASE 0 extern const char *pkgVersion; Loading
apt-pkg/makefile +1 −1 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ include ../buildlib/defaults.mak # methods/makefile - FIXME LIBRARY=apt-pkg LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER) MAJOR=4.7 MAJOR=4.8 MINOR=0 SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil APT_DOMAIN:=libapt-pkg$(MAJOR) Loading
apt-pkg/policy.cc +16 −2 Original line number Diff line number Diff line Loading @@ -239,7 +239,21 @@ signed short pkgPolicy::GetPriority(pkgCache::PkgIterator const &Pkg) return 0; } /*}}}*/ // PreferenceSection class - Overriding the default TrimRecord method /*{{{*/ // --------------------------------------------------------------------- /* The preference file is a user generated file so the parser should therefore be a bit more friendly by allowing comments and new lines all over the place rather than forcing a special format */ class PreferenceSection : public pkgTagSection { void TrimRecord(bool BeforeRecord, const char* &End) { for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r' || Stop[0] == '#'); Stop++) if (Stop[0] == '#') Stop = (const char*) memchr(Stop,'\n',End-Stop); } }; /*}}}*/ // ReadPinFile - Load the pin file into a Policy /*{{{*/ // --------------------------------------------------------------------- /* I'd like to see the preferences file store more than just pin information Loading @@ -259,7 +273,7 @@ bool ReadPinFile(pkgPolicy &Plcy,string File) if (_error->PendingError() == true) return false; pkgTagSection Tags; PreferenceSection Tags; while (TF.Step(Tags) == true) { string Name = Tags.FindS("Package"); Loading
apt-pkg/tagfile.cc +16 −5 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ bool pkgTagFile::Resize() End = Start + EndSize; return true; } /*}}}*/ // TagFile::Step - Advance to the next section /*{{{*/ // --------------------------------------------------------------------- /* If the Section Scanner fails we refill the buffer and try again. Loading Loading @@ -216,6 +216,8 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) TagCount = 0; while (TagCount+1 < sizeof(Indexes)/sizeof(Indexes[0]) && Stop < End) { TrimRecord(true,End); // Start a new index and add it to the hash if (isspace(Stop[0]) == 0) { Loading @@ -234,7 +236,7 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) if (Stop+1 < End && Stop[1] == '\n') { Indexes[TagCount] = Stop - Section; for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++); TrimRecord(false,End); return true; } Loading @@ -244,6 +246,16 @@ bool pkgTagSection::Scan(const char *Start,unsigned long MaxLength) return false; } /*}}}*/ // TagSection::TrimRecord - Trim off any garbage before/after a record /*{{{*/ // --------------------------------------------------------------------- /* There should be exactly 2 newline at the end of the record, no more. */ void pkgTagSection::TrimRecord(bool BeforeRecord, const char*& End) { if (BeforeRecord == true) return; for (; Stop < End && (Stop[0] == '\n' || Stop[0] == '\r'); Stop++); } /*}}}*/ // TagSection::Trim - Trim off any trailing garbage /*{{{*/ // --------------------------------------------------------------------- /* There should be exactly 1 newline at the end of the buffer, no more. */ Loading Loading @@ -390,7 +402,6 @@ bool pkgTagSection::FindFlag(const char *Tag,unsigned long &Flags, return true; } /*}}}*/ // TFRewrite - Rewrite a control record /*{{{*/ // --------------------------------------------------------------------- /* This writes the control record to stdout rewriting it as necessary. The Loading