X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/6f27a7fc6c8471534c5cee39cffdc2def1388bdc..3a4477a4241bcfbc9db541cf34cc75c1f1111b78:/apt-pkg/contrib/error.h?ds=sidebyside diff --git a/apt-pkg/contrib/error.h b/apt-pkg/contrib/error.h index 7250bb1c0..90747ff7e 100644 --- a/apt-pkg/contrib/error.h +++ b/apt-pkg/contrib/error.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: error.h,v 1.4 1998/09/12 02:46:27 jgg Exp $ +// $Id: error.h,v 1.8 2001/05/07 05:06:52 jgg Exp $ /* ###################################################################### Global Erorr Class - Global error mechanism @@ -37,13 +37,10 @@ ##################################################################### */ /*}}}*/ -// Header section: pkglib #ifndef PKGLIB_ERROR_H #define PKGLIB_ERROR_H -#ifdef __GNUG__ -#pragma interface "apt-pkg/error.h" -#endif +#include #include @@ -51,7 +48,7 @@ class GlobalError { struct Item { - string Text; + std::string Text; bool Error; Item *Next; }; @@ -63,17 +60,18 @@ class GlobalError public: // Call to generate an error from a library call. - bool Errno(const char *Function,const char *Description,...); + 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,...); - bool Warning(const char *Description,...); + 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