summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenoît Dejean <bdejean@src.gnome.org>2004-06-18 07:38:37 +0000
committerBenoît Dejean <bdejean@src.gnome.org>2004-06-18 07:38:37 +0000
commit6b3d52ff0e4deac5b65dc7162fd4723466036432 (patch)
treec7ab5c807ebc885d74241b59f0fbb6a0a0c162ea /include
parentbb01063e93737148cec7385686b0e05aeaa16545 (diff)
downloadlibgtop-6b3d52ff0e4deac5b65dc7162fd4723466036432.tar.gz
Moved 8 static error functions to sysdeps/common/error.c. This is the end
* include/glibtop/error.h: Moved 8 static error functions to sysdeps/common/error.c. This is the end of an big useless code bloat : expect ~8KB of object size reduction. * include/glibtop/procuid.h: s/int/gint32/g * lib/errors.c: (glibtop_error_quark): * lib/read.c: (do_read), (glibtop_read_l): * lib/read_data.c: (glibtop_read_data_l): Minor cleanups.
Diffstat (limited to 'include')
-rw-r--r--include/glibtop/error.h92
-rw-r--r--include/glibtop/procuid.h2
2 files changed, 10 insertions, 84 deletions
diff --git a/include/glibtop/error.h b/include/glibtop/error.h
index 2d8fa81d..dd41360a 100644
--- a/include/glibtop/error.h
+++ b/include/glibtop/error.h
@@ -28,60 +28,17 @@
G_BEGIN_DECLS
-#ifndef G_GNUC_UNUSED
-#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
-#define G_GNUC_UNUSED \
- __attribute__((unused))
-#else /* !__GNUC__ */
-#define G_GNUC_UNUSED
-#endif /* !__GNUC__ */
-#endif /* defined G_GNUC_UNUSED */
-
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);
-static void G_GNUC_UNUSED
-glibtop_error_r (glibtop *server, char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- glibtop_error_vr (server, format, args);
- va_end (args);
-}
-
-static void G_GNUC_UNUSED
-glibtop_warn_r (glibtop *server, char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- glibtop_warn_vr (server, format, args);
- va_end (args);
-}
-
-static void G_GNUC_UNUSED
-glibtop_error_io_r (glibtop *server, char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- glibtop_error_io_vr (server, format, errno, args);
- va_end (args);
-}
-
-static void G_GNUC_UNUSED
-glibtop_warn_io_r (glibtop *server, char *format, ...)
-{
- va_list args;
-
- va_start (args, format);
- glibtop_warn_io_vr (server, format, errno, args);
- va_end (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__
@@ -93,41 +50,10 @@ glibtop_warn_io_r (glibtop *server, char *format, ...)
#else /* no __GNUC__ */
-static void
-glibtop_error (char *format, ...)
-{
- va_list args;
- va_start (args, format);
- glibtop_error_vr (glibtop_global_server, format, args);
- va_end (args);
-}
-
-static void
-glibtop_warn (char *format, ...)
-{
- va_list args;
- va_start (args, format);
- glibtop_warn_vr (glibtop_global_server, format, args);
- va_end (args);
-}
-
-static void
-glibtop_error_io (char *format, ...)
-{
- va_list args;
- va_start (args, format);
- glibtop_error_io_vr (glibtop_global_server, format, errno, args);
- va_end (args);
-}
-
-static void
-glibtop_warn_io (char *format, ...)
-{
- va_list args;
- va_start (args, format);
- glibtop_warn_io_vr (glibtop_global_server, format, errno, args);
- va_end (args);
-}
+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__ */
diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h
index 801e948d..1fd21313 100644
--- a/include/glibtop/procuid.h
+++ b/include/glibtop/procuid.h
@@ -59,7 +59,7 @@ typedef struct _glibtop_proc_uid glibtop_proc_uid;
struct _glibtop_proc_uid
{
guint64 flags;
- int uid, /* user id */
+ gint32 uid, /* user id */
euid, /* effective user id */
gid, /* group id */
egid, /* effective group id */