From 8db4be21f3effe3cbeee96bace00d25ffaebb317 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 15 Feb 2025 09:42:54 +0100 Subject: Remove some more unused functions Final ABI cleanup before unstable?! --- apt-pkg/acquire-method.cc | 17 --------------- apt-pkg/acquire-method.h | 2 -- apt-pkg/contrib/strutl.cc | 49 -------------------------------------------- apt-pkg/contrib/strutl.h | 2 -- debian/libapt-pkg7.0.symbols | 8 -------- 5 files changed, 78 deletions(-) diff --git a/apt-pkg/acquire-method.cc b/apt-pkg/acquire-method.cc index 13f3fa4dd..4739f8c8e 100644 --- a/apt-pkg/acquire-method.cc +++ b/apt-pkg/acquire-method.cc @@ -464,23 +464,6 @@ int pkgAcqMethod::Run(bool Single) return 0; } /*}}}*/ -// AcqMethod::PrintStatus - privately really send a log/status message /*{{{*/ -void pkgAcqMethod::PrintStatus(char const * const header, const char* Format, - va_list &args) const -{ - string CurrentURI = ""; - if (Queue != 0) - CurrentURI = Queue->Uri; - if (UsedMirror.empty() == true) - fprintf(stdout, "%s\nURI: %s\nMessage: ", - header, CurrentURI.c_str()); - else - fprintf(stdout, "%s\nURI: %s\nUsedMirror: %s\nMessage: ", - header, CurrentURI.c_str(), UsedMirror.c_str()); - vfprintf(stdout,Format,args); - std::cout << "\n\n" << std::flush; -} - /*}}}*/ // AcqMethod::Log - Send a log message /*{{{*/ // --------------------------------------------------------------------- /* */ diff --git a/apt-pkg/acquire-method.h b/apt-pkg/acquire-method.h index bad0935d6..b8944e97a 100644 --- a/apt-pkg/acquire-method.h +++ b/apt-pkg/acquire-method.h @@ -102,8 +102,6 @@ class APT_PUBLIC pkgAcqMethod bool MediaFail(std::string Required,std::string Drive); virtual void Exit() {}; - [[deprecated("Use SendMessage instead")]] void PrintStatus(char const * const header, const char* Format, va_list &args) const; - public: enum CnfFlags { diff --git a/apt-pkg/contrib/strutl.cc b/apt-pkg/contrib/strutl.cc index ea70ae581..5be6f00ce 100644 --- a/apt-pkg/contrib/strutl.cc +++ b/apt-pkg/contrib/strutl.cc @@ -235,41 +235,6 @@ char *_strrstrip(char *String) return String; } /*}}}*/ -// strtabexpand - Converts tabs into 8 spaces /*{{{*/ -// --------------------------------------------------------------------- -/* */ -char *_strtabexpand(char *String,size_t Len) -{ - for (char *I = String; I != I + Len && *I != 0; I++) - { - if (*I != '\t') - continue; - if (I + 8 > String + Len) - { - *I = 0; - return String; - } - - /* Assume the start of the string is 0 and find the next 8 char - division */ - int Len; - if (String == I) - Len = 1; - else - Len = 8 - ((String - I) % 8); - Len -= 2; - if (Len <= 0) - { - *I = ' '; - continue; - } - - memmove(I + Len,I + 1,strlen(I) + 1); - for (char *J = I; J + Len != I; *I = ' ', I++); - } - return String; -} - /*}}}*/ // ParseQuoteWord - Parse a single word out of a string /*{{{*/ // --------------------------------------------------------------------- /* This grabs a single word, converts any % escaped characters to their @@ -1183,20 +1148,6 @@ bool RFC1123StrToTime(std::string const &str,time_t &time) return true; } /*}}}*/ -// FTPMDTMStrToTime - Converts a ftp modification date into a time_t /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool FTPMDTMStrToTime(const char* const str,time_t &time) -{ - struct tm Tm; - // MDTM includes no whitespaces but recommend and ignored by strptime - if (strptime(str, "%Y %m %d %H %M %S", &Tm) == NULL) - return false; - - time = timegm(&Tm); - return true; -} - /*}}}*/ // StrToNum - Convert a fixed length string to a number /*{{{*/ // --------------------------------------------------------------------- /* This is used in decoding the crazy fixed length string headers in diff --git a/apt-pkg/contrib/strutl.h b/apt-pkg/contrib/strutl.h index 92df7c9d3..79b7c8bfa 100644 --- a/apt-pkg/contrib/strutl.h +++ b/apt-pkg/contrib/strutl.h @@ -55,7 +55,6 @@ namespace APT { APT_PUBLIC bool UTF8ToCodeset(const char *codeset, const std::string &orig, std::string *dest); APT_PUBLIC char *_strstrip(char *String); APT_PUBLIC char *_strrstrip(char *String); // right strip only -[[deprecated("Use SubstVar to avoid memory headaches")]] APT_PUBLIC char *_strtabexpand(char *String,size_t Len); APT_PUBLIC bool ParseQuoteWord(const char *&String,std::string &Res); APT_PUBLIC bool ParseCWord(const char *&String,std::string &Res); APT_PUBLIC std::string QuoteString(const std::string &Str,const char *Bad); @@ -97,7 +96,6 @@ APT_PUBLIC std::string TimeRFC1123(time_t Date, bool const NumericTimezone); * @return \b true if parsing was successful, otherwise \b false. */ [[nodiscard]] APT_PUBLIC bool RFC1123StrToTime(const std::string &str,time_t &time); -[[nodiscard, deprecated("Unused and untested in src:apt")]] APT_PUBLIC bool FTPMDTMStrToTime(const char *str, time_t &time); APT_PUBLIC std::string LookupTag(const std::string &Message,const char *Tag,const char *Default = 0); APT_PUBLIC int StringToBool(const std::string &Text,int Default = -1); APT_PUBLIC bool ReadMessages(int Fd, std::vector &List); diff --git a/debian/libapt-pkg7.0.symbols b/debian/libapt-pkg7.0.symbols index d10370489..c45d7c68f 100644 --- a/debian/libapt-pkg7.0.symbols +++ b/debian/libapt-pkg7.0.symbols @@ -1312,13 +1312,8 @@ libapt-pkg.so.7.0 libapt-pkg7.0 #MINVER# (c++)"VerifyDetachedSignatureFile(std::__cxx11::basic_string, std::allocator > const&)@APTPKG_7.0" 2.9.19 (c++)"pkgCache::DepType_NoL10n(unsigned char)@APTPKG_7.0" 2.9.23 (c++)"pkgCache::Priority_NoL10n(unsigned char)@APTPKG_7.0" 2.9.23 - (arch=!armel !armhf|c++)"FTPMDTMStrToTime(char const*, long&)@APTPKG_7.0" 0.8.0 (arch=!armel !armhf|c++)"RFC1123StrToTime(std::__cxx11::basic_string, std::allocator > const&, long&)@APTPKG_7.0" 1.9.0 (arch=!armel !armhf|c++)"TimeRFC1123[abi:cxx11](long, bool)@APTPKG_7.0" 1.3~rc2 - (arch=arm64 armel armhf|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, std::__va_list&) const@APTPKG_7.0" 0.8.15~exp1 - (arch=i386 ppc64el|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, char*&) const@APTPKG_7.0" 0.8.15~exp1 - (arch=mips64el riscv64|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, void*&) const@APTPKG_7.0" 0.8.15~exp1 - (arch=amd64 s390x|c++)"pkgAcqMethod::PrintStatus(char const*, char const*, __va_list_tag (&) [1]) const@APTPKG_7.0" 0.8.15~exp1 (arch=i386|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, char*&, unsigned int&)@APTPKG_7.0" 0.8.11.4 (arch=armel armhf|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, std::__va_list&, unsigned int&)@APTPKG_7.0" 0.8.11.4 (arch=arm64|c++)"GlobalError::Insert(GlobalError::MsgType, char const*, std::__va_list&, unsigned long&)@APTPKG_7.0" 0.8.11.4 @@ -1331,9 +1326,6 @@ libapt-pkg.so.7.0 libapt-pkg7.0 #MINVER# (arch=amd64 s390x|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, __va_list_tag (&) [1], int, unsigned long&)@APTPKG_7.0" 0.8.11.4 (arch=mips64el riscv64|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, void*&, int, unsigned long&)@APTPKG_7.0" 0.8.11.4 (arch=ppc64el|c++)"GlobalError::InsertErrno(GlobalError::MsgType, char const*, char const*, char*&, int, unsigned long&)@APTPKG_7.0" 0.8.11.4 - (arch=armel armhf i386|c++)"_strtabexpand(char*, unsigned int)@APTPKG_7.0" 0.8.0 - (arch=!armel !armhf !i386|c++)"_strtabexpand(char*, unsigned long)@APTPKG_7.0" 0.8.0 - (arch=armel armhf|c++)"FTPMDTMStrToTime(char const*, long long&)@APTPKG_7.0" 0.8.0 (arch=armel armhf|c++)"RFC1123StrToTime(std::__cxx11::basic_string, std::allocator > const&, long long&)@APTPKG_7.0" 1.9.0 (arch=armel armhf|c++)"TimeRFC1123[abi:cxx11](long long, bool)@APTPKG_7.0" 2.7.14 # Optional C++ standard library symbols -- cgit v1.2.3-70-g09d2