diff options
author | Benoît Dejean <bdejean@src.gnome.org> | 2004-12-23 21:50:41 +0000 |
---|---|---|
committer | Benoît Dejean <bdejean@src.gnome.org> | 2004-12-23 21:50:41 +0000 |
commit | ce9ce223ca75ad10aa495036137542e8f2cf89b7 (patch) | |
tree | a8ec3c167001aa9ac4e2ad2da4ac28c5c02c6473 /include | |
parent | 71900c0e306fc733e9de6c8bf702fda9ae9be154 (diff) | |
download | libgtop-ce9ce223ca75ad10aa495036137542e8f2cf89b7.tar.gz |
Turned all macros to functions. Marked everything as G_GNUC_PRINTF and
* include/glibtop/error.h:
* lib/parameter.c: (glibtop_set_parameter_l):
* lib/read_data.c: (glibtop_read_data_l):
* sysdeps/common/error.c: (print_server_name), (glibtop_error_vr),
(glibtop_error_io_vr), (glibtop_warn_vr), (glibtop_warn_io_vr),
(glibtop_error_r), (glibtop_warn_r), (glibtop_error_io_r),
(glibtop_warn_io_r), (glibtop_error), (glibtop_warn),
(glibtop_error_io), (glibtop_warn_io): Turned all macros to functions.
Marked everything as G_GNUC_PRINTF and fixed format bugs.
* sysdeps/common/fsusage.c: Marked some functions as G_GNUC_INTERNAL
Diffstat (limited to 'include')
-rw-r--r-- | include/glibtop/error.h | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/include/glibtop/error.h b/include/glibtop/error.h index b4a57a36..c8ca147f 100644 --- a/include/glibtop/error.h +++ b/include/glibtop/error.h @@ -28,42 +28,20 @@ G_BEGIN_DECLS -void glibtop_error_vr (glibtop *server, char *format, va_list args); -void glibtop_warn_vr (glibtop *server, char *format, va_list args); - -void glibtop_error_io_vr (glibtop *server, char *format, int, va_list args); -void glibtop_warn_io_vr (glibtop *server, char *format, int, va_list args); - -void G_GNUC_UNUSED glibtop_error_r (glibtop *server, char *format, ...); -void G_GNUC_UNUSED glibtop_warn_r (glibtop *server, char *format, ...); -void G_GNUC_UNUSED glibtop_error_io_r (glibtop *server, char *format, ...); -void G_GNUC_UNUSED glibtop_warn_io_r (glibtop *server, char *format, ...); - - -#ifdef __GNUC__ - -#define glibtop_error(p1, args...) glibtop_error_r(glibtop_global_server , p1 , ## args) -#define glibtop_warn(p1, args...) glibtop_warn_r(glibtop_global_server , p1 , ## args) - -#define glibtop_error_io(p1, args...) glibtop_error_io_r(glibtop_global_server , p1 , ## args) -#define glibtop_warn_io(p1, args...) glibtop_warn_io_r(glibtop_global_server , p1 , ## args) - -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -#define glibtop_error(p1, ...) glibtop_error_r(glibtop_global_server , p1 , __VA_ARGS__) -#define glibtop_warn(p1, ...) glibtop_warn_r(glibtop_global_server , p1 , __VA_ARGS__) - -#define glibtop_error_io(p1, ...) glibtop_error_io_r(glibtop_global_server , p1 , __VA_ARGS__) -#define glibtop_warn_io(p1, ...) glibtop_warn_io_r(glibtop_global_server , p1 , __VA_ARGS__) - -#else /* no __GNUC__, no C99*/ - -void glibtop_error (char *format, ...); -void glibtop_warn (char *format, ...); -void glibtop_error_io (char *format, ...); -void glibtop_warn_io (char *format, ...); - -#endif /* no __GNUC__ */ +void glibtop_error_vr (glibtop *server, const char *format, va_list args); +void glibtop_warn_vr (glibtop *server, const char *format, va_list args); +void glibtop_error_io_vr (glibtop *server, const char *format, int, va_list args); +void glibtop_warn_io_vr (glibtop *server, const char *format, int, va_list args); + +void glibtop_error_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3); +void glibtop_warn_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3); +void glibtop_error_io_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3); +void glibtop_warn_io_r (glibtop *server, const char *format, ...) G_GNUC_PRINTF(2, 3); + +void glibtop_error (const char *format, ...) G_GNUC_PRINTF(1, 2); +void glibtop_warn (const char *format, ...) G_GNUC_PRINTF(1, 2); +void glibtop_error_io (const char *format, ...) G_GNUC_PRINTF(1, 2); +void glibtop_warn_io (const char *format, ...) G_GNUC_PRINTF(1, 2); G_END_DECLS |