From 2893f7b5ec6b2220ccfca6b9648482a6df926eca Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Sun, 31 Jan 2010 07:28:06 -0800 Subject: * cmdline/acqprogress.cc: - Set Mode to Medium so that the correct prefix is used. Thanks Stefan Haller for the patch! (Closes: #567304 LP: #275243) * ftparchive/writer.cc: - generate sha1 and sha256 checksums for dsc (Closes: #567343) * cmdline/apt-get.cc: - don't mark as manually if in download only (Closes: #468180) --- apt-pkg/contrib/error.h | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'apt-pkg/contrib/error.h') diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index 86aa9eca3..90747ff7e 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -40,28 +40,15 @@ #ifndef PKGLIB_ERROR_H #define PKGLIB_ERROR_H +#include - -#ifdef __GNUG__ -// Methods have a hidden this parameter that is visible to this attribute -#define APT_MFORMAT1 __attribute__ ((format (printf, 2, 3))) -#define APT_MFORMAT2 __attribute__ ((format (printf, 3, 4))) -#else -#define APT_MFORMAT1 -#define APT_MFORMAT2 -#endif - #include -#include - -using std::string; - class GlobalError { struct Item { - string Text; + std::string Text; bool Error; Item *Next; }; @@ -73,18 +60,18 @@ class GlobalError public: // Call to generate an error from a library call. - bool Errno(const char *Function,const char *Description,...) APT_MFORMAT2 __cold; - bool WarningE(const char *Function,const char *Description,...) APT_MFORMAT2 __cold; + bool Errno(const char *Function,const char *Description,...) __like_printf_2 __cold; + bool WarningE(const char *Function,const char *Description,...) __like_printf_2 __cold; /* A warning should be considered less severe than an error, and may be ignored by the client. */ - bool Error(const char *Description,...) APT_MFORMAT1 __cold; - bool Warning(const char *Description,...) APT_MFORMAT1 __cold; + bool Error(const char *Description,...) __like_printf_1 __cold; + bool Warning(const char *Description,...) __like_printf_1 __cold; // Simple accessors inline bool PendingError() {return PendingFlag;}; inline bool empty() {return List == 0;}; - bool PopMessage(string &Text); + bool PopMessage(std::string &Text); void Discard(); // Usefull routine to dump to cerr @@ -97,7 +84,4 @@ class GlobalError GlobalError *_GetErrorObj(); #define _error _GetErrorObj() -#undef APT_MFORMAT1 -#undef APT_MFORMAT2 - #endif -- cgit v1.2.3