diff options
Diffstat (limited to 'apt-pkg/contrib')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 3 | ||||
-rw-r--r-- | apt-pkg/contrib/error.cc | 2 | ||||
-rw-r--r-- | apt-pkg/contrib/gpgv.h | 2 | ||||
-rw-r--r-- | apt-pkg/contrib/progress.cc | 12 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.cc | 2 | ||||
-rw-r--r-- | apt-pkg/contrib/strutl.h | 38 |
6 files changed, 29 insertions, 30 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 8eddd56d4..003fd01d8 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -43,8 +43,7 @@ Configuration::Configuration() : ToFree(true) } Configuration::Configuration(const Item *Root) : Root((Item *)Root), ToFree(false) { -}; - +} /*}}}*/ // Configuration::~Configuration - Destructor /*{{{*/ // --------------------------------------------------------------------- diff --git a/apt-pkg/contrib/error.cc b/apt-pkg/contrib/error.cc index d457781c3..2d25f5ed9 100644 --- a/apt-pkg/contrib/error.cc +++ b/apt-pkg/contrib/error.cc @@ -223,7 +223,7 @@ void GlobalError::DumpErrors(std::ostream &out, MsgType const &threshold, void GlobalError::Discard() { Messages.clear(); PendingFlag = false; -}; +} /*}}}*/ // GlobalError::empty - does our error list include anything? /*{{{*/ bool GlobalError::empty(MsgType const &trashhold) const { diff --git a/apt-pkg/contrib/gpgv.h b/apt-pkg/contrib/gpgv.h index 1d79a52ac..d9712d6a8 100644 --- a/apt-pkg/contrib/gpgv.h +++ b/apt-pkg/contrib/gpgv.h @@ -45,7 +45,7 @@ inline void ExecGPGV(std::string const &File, std::string const &FileSig, int const &statusfd = -1) { int fd[2]; ExecGPGV(File, FileSig, statusfd, fd); -}; +} #undef APT_noreturn diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc index 916e1d730..9d74ed495 100644 --- a/apt-pkg/contrib/progress.cc +++ b/apt-pkg/contrib/progress.cc @@ -125,14 +125,14 @@ bool OpProgress::CheckChange(float Interval) // OpTextProgress::OpTextProgress - Constructor /*{{{*/ // --------------------------------------------------------------------- /* */ -OpTextProgress::OpTextProgress(Configuration &Config) : - NoUpdate(false), NoDisplay(false), LastLen(0) +OpTextProgress::OpTextProgress(Configuration &Config) : + NoUpdate(false), NoDisplay(false), LastLen(0) { if (Config.FindI("quiet",0) >= 1 || Config.FindB("quiet::NoUpdate", false) == true) NoUpdate = true; if (Config.FindI("quiet",0) >= 2) NoDisplay = true; -}; +} /*}}}*/ // OpTextProgress::Done - Clean up the display /*{{{*/ // --------------------------------------------------------------------- @@ -150,12 +150,12 @@ void OpTextProgress::Done() cout << endl; OldOp = string(); } - + if (NoUpdate == true && NoDisplay == false && OldOp.empty() == false) { OldOp = string(); - cout << endl; - } + cout << endl; + } } /*}}}*/ // OpTextProgress::Update - Simple text spinner /*{{{*/ diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index f8bb3890d..0d85b4fd3 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -153,7 +153,7 @@ char *_strrstrip(char *String) End++; *End = 0; return String; -}; +} /*}}}*/ // strtabexpand - Converts tabs into 8 spaces /*{{{*/ // --------------------------------------------------------------------- diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 8d746f10e..3a6d38b75 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -37,8 +37,8 @@ namespace APT { namespace String { std::string Strip(const std::string &s); bool Endswith(const std::string &s, const std::string &ending); - }; -}; + } +} bool UTF8ToCodeset(const char *codeset, const std::string &orig, std::string *dest); @@ -104,17 +104,17 @@ int tolower_ascii(int const c) __attrib_const __hot; std::string StripEpoch(const std::string &VerStr); #define APT_MKSTRCMP(name,func) \ -inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));}; \ -inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ -inline int name(const std::string& A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \ -inline int name(const std::string& A,const std::string& B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \ -inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);}; +inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));} \ +inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));} \ +inline int name(const std::string& A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));} \ +inline int name(const std::string& A,const std::string& B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());} \ +inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);} #define APT_MKSTRCMP2(name,func) \ -inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \ -inline int name(const std::string& A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));}; \ -inline int name(const std::string& A,const std::string& B) {return func(A.begin(),A.end(),B.begin(),B.end());}; \ -inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);}; +inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));} \ +inline int name(const std::string& A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));} \ +inline int name(const std::string& A,const std::string& B) {return func(A.begin(),A.end(),B.begin(),B.end());} \ +inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);} int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd); int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd); @@ -132,18 +132,18 @@ int stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd int stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd, std::string::const_iterator B,std::string::const_iterator BEnd); -inline int stringcmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));}; -inline int stringcasecmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcasecmp(A,Aend,B,B+strlen(B));}; +inline int stringcmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));} +inline int stringcasecmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcasecmp(A,Aend,B,B+strlen(B));} #endif -APT_MKSTRCMP2(stringcmp,stringcmp); -APT_MKSTRCMP2(stringcasecmp,stringcasecmp); +APT_MKSTRCMP2(stringcmp,stringcmp) +APT_MKSTRCMP2(stringcasecmp,stringcasecmp) // Return the length of a NULL-terminated string array size_t strv_length(const char **str_array); -inline const char *DeNull(const char *s) {return (s == 0?"(null)":s);}; +inline const char *DeNull(const char *s) {return (s == 0?"(null)":s);} class URI { @@ -159,13 +159,13 @@ class URI unsigned int Port; operator std::string(); - inline void operator =(const std::string &From) {CopyFrom(From);}; + inline void operator =(const std::string &From) {CopyFrom(From);} inline bool empty() {return Access.empty();}; static std::string SiteOnly(const std::string &URI); static std::string NoUserPassword(const std::string &URI); - URI(std::string Path) {CopyFrom(Path);}; - URI() : Port(0) {}; + URI(std::string Path) {CopyFrom(Path);} + URI() : Port(0) {} }; struct SubstVar |