summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--glibtop.h6
-rw-r--r--include/glibtop/close.h2
-rw-r--r--include/glibtop/command.h6
-rw-r--r--include/glibtop/cpu.h12
-rw-r--r--include/glibtop/error.h4
-rw-r--r--include/glibtop/loadavg.h12
-rw-r--r--include/glibtop/mem.h12
-rw-r--r--include/glibtop/msg_limits.h12
-rw-r--r--include/glibtop/open.h4
-rw-r--r--include/glibtop/prockernel.h12
-rw-r--r--include/glibtop/proclist.h12
-rw-r--r--include/glibtop/procmem.h12
-rw-r--r--include/glibtop/procsegment.h12
-rw-r--r--include/glibtop/procsignal.h12
-rw-r--r--include/glibtop/procstate.h12
-rw-r--r--include/glibtop/proctime.h12
-rw-r--r--include/glibtop/procuid.h12
-rw-r--r--include/glibtop/read.h4
-rw-r--r--include/glibtop/read_data.h6
-rw-r--r--include/glibtop/sem_limits.h12
-rw-r--r--include/glibtop/shm_limits.h12
-rw-r--r--include/glibtop/swap.h12
-rw-r--r--include/glibtop/sysdeps.h4
-rw-r--r--include/glibtop/uptime.h12
-rw-r--r--include/glibtop/write.h4
-rw-r--r--include/glibtop/xmalloc.h18
-rw-r--r--lib/close.c2
-rw-r--r--lib/command.c16
-rw-r--r--lib/cpu.c8
-rw-r--r--lib/init.c4
-rw-r--r--lib/loadavg.c8
-rw-r--r--lib/mem.c8
-rw-r--r--lib/msg_limits.c8
-rw-r--r--lib/open.c16
-rw-r--r--lib/prockernel.c8
-rw-r--r--lib/proclist.c8
-rw-r--r--lib/procmem.c8
-rw-r--r--lib/procsegment.c8
-rw-r--r--lib/procsignal.c8
-rw-r--r--lib/procstate.c8
-rw-r--r--lib/proctime.c8
-rw-r--r--lib/procuid.c8
-rw-r--r--lib/read.c10
-rw-r--r--lib/read_data.c10
-rw-r--r--lib/sem_limits.c8
-rw-r--r--lib/shm_limits.c8
-rw-r--r--lib/swap.c8
-rw-r--r--lib/uptime.c8
-rw-r--r--lib/write.c8
-rw-r--r--src/proxy/main.c36
-rw-r--r--src/server/main.c36
-rw-r--r--sysdeps/common/error.c2
-rw-r--r--sysdeps/common/sysdeps.c32
-rw-r--r--sysdeps/common/xmalloc.c14
-rw-r--r--sysdeps/linux/close.c2
-rw-r--r--sysdeps/linux/cpu.c4
-rw-r--r--sysdeps/linux/init.c6
-rw-r--r--sysdeps/linux/loadavg.c4
-rw-r--r--sysdeps/linux/mem.c4
-rw-r--r--sysdeps/linux/msg_limits.c4
-rw-r--r--sysdeps/linux/open.c2
-rw-r--r--sysdeps/linux/procdata.c4
-rw-r--r--sysdeps/linux/prockernel.c4
-rw-r--r--sysdeps/linux/proclist.c8
-rw-r--r--sysdeps/linux/procmem.c4
-rw-r--r--sysdeps/linux/procsegment.c4
-rw-r--r--sysdeps/linux/procsignal.c4
-rw-r--r--sysdeps/linux/procstate.c4
-rw-r--r--sysdeps/linux/proctime.c4
-rw-r--r--sysdeps/linux/procuid.c4
-rw-r--r--sysdeps/linux/sem_limits.c4
-rw-r--r--sysdeps/linux/shm_limits.c4
-rw-r--r--sysdeps/linux/swap.c4
-rw-r--r--sysdeps/linux/uptime.c4
-rw-r--r--sysdeps/osf1/cpu.c2
-rw-r--r--sysdeps/osf1/init.c2
-rw-r--r--sysdeps/osf1/loadavg.c2
-rw-r--r--sysdeps/osf1/mem.c2
-rw-r--r--sysdeps/osf1/msg_limits.c2
-rw-r--r--sysdeps/osf1/procdata.c2
-rw-r--r--sysdeps/osf1/prockernel.c2
-rw-r--r--sysdeps/osf1/proclist.c6
-rw-r--r--sysdeps/osf1/procmem.c2
-rw-r--r--sysdeps/osf1/procsegment.c2
-rw-r--r--sysdeps/osf1/procsignal.c2
-rw-r--r--sysdeps/osf1/procstate.c2
-rw-r--r--sysdeps/osf1/proctime.c2
-rw-r--r--sysdeps/osf1/procuid.c2
-rw-r--r--sysdeps/osf1/sem_limits.c2
-rw-r--r--sysdeps/osf1/shm_limits.c2
-rw-r--r--sysdeps/osf1/swap.c2
-rw-r--r--sysdeps/osf1/uptime.c2
-rw-r--r--sysdeps/stub/cpu.c2
-rw-r--r--sysdeps/stub/init.c2
-rw-r--r--sysdeps/stub/loadavg.c2
-rw-r--r--sysdeps/stub/mem.c2
-rw-r--r--sysdeps/stub/msg_limits.c2
-rw-r--r--sysdeps/stub/prockernel.c2
-rw-r--r--sysdeps/stub/proclist.c2
-rw-r--r--sysdeps/stub/procmem.c2
-rw-r--r--sysdeps/stub/procsegment.c2
-rw-r--r--sysdeps/stub/procsignal.c2
-rw-r--r--sysdeps/stub/procstate.c2
-rw-r--r--sysdeps/stub/proctime.c2
-rw-r--r--sysdeps/stub/procuid.c2
-rw-r--r--sysdeps/stub/sem_limits.c2
-rw-r--r--sysdeps/stub/shm_limits.c2
-rw-r--r--sysdeps/stub/swap.c2
-rw-r--r--sysdeps/stub/uptime.c2
-rw-r--r--sysdeps/sun4/cpu.c4
-rw-r--r--sysdeps/sun4/init.c4
-rw-r--r--sysdeps/sun4/loadavg.c4
-rw-r--r--sysdeps/sun4/mem.c4
-rw-r--r--sysdeps/sun4/msg_limits.c4
-rw-r--r--sysdeps/sun4/open.c14
-rw-r--r--sysdeps/sun4/procdata.c2
-rw-r--r--sysdeps/sun4/prockernel.c4
-rw-r--r--sysdeps/sun4/proclist.c4
-rw-r--r--sysdeps/sun4/procmem.c4
-rw-r--r--sysdeps/sun4/procsegment.c4
-rw-r--r--sysdeps/sun4/procsignal.c4
-rw-r--r--sysdeps/sun4/procstate.c4
-rw-r--r--sysdeps/sun4/proctime.c4
-rw-r--r--sysdeps/sun4/procuid.c4
-rw-r--r--sysdeps/sun4/sem_limits.c4
-rw-r--r--sysdeps/sun4/shm_limits.c4
-rw-r--r--sysdeps/sun4/swap.c4
-rw-r--r--sysdeps/sun4/uptime.c4
129 files changed, 410 insertions, 400 deletions
diff --git a/ChangeLog b/ChangeLog
index c499dfc8..3ee557f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1998-06-07 Martin Baulig <martin@home-of-linux.org>
+
+ * *.[ch]: Using single underscore instead of two underscores
+ for function prefixes (regexp: ``s,__([rspl])\b,_$1,g'') to
+ avoid ambiguity with mangled C++ names.
+
1998-06-06 Martin Baulig <martin@home-of-linux.org>
* sysdeps/osf1/glibtop_server.h: New file.
diff --git a/glibtop.h b/glibtop.h
index adfd95d6..3f833081 100644
--- a/glibtop.h
+++ b/glibtop.h
@@ -55,9 +55,11 @@ extern glibtop *glibtop_global_server;
extern const unsigned long glibtop_server_features;
-#define glibtop_init() glibtop_init__r(&glibtop_global_server, 0, 0);
+#define glibtop_init() glibtop_init_r(&glibtop_global_server, 0, 0);
-extern glibtop *glibtop_init__r __P((glibtop **, const unsigned long, const unsigned));
+#define glibtop_close() glibtop_close_r(&glibtop_global_server);
+
+extern glibtop *glibtop_init_r __P((glibtop **, const unsigned long, const unsigned));
#ifdef HAVE_GUILE
diff --git a/include/glibtop/close.h b/include/glibtop/close.h
index d57ccd38..6241737a 100644
--- a/include/glibtop/close.h
+++ b/include/glibtop/close.h
@@ -26,7 +26,7 @@
__BEGIN_DECLS
-extern void glibtop_close __P((glibtop *));
+extern void glibtop_close_r __P((glibtop *));
__END_DECLS
diff --git a/include/glibtop/command.h b/include/glibtop/command.h
index ce83c618..8314699f 100644
--- a/include/glibtop/command.h
+++ b/include/glibtop/command.h
@@ -59,10 +59,10 @@ struct _glibtop_command
size_t size;
};
-#define glibtop_call(p1, p2, p3, p4) glibtop_call__r(glibtop_global_server, p1, p2, p3, p4)
+#define glibtop_call(p1, p2, p3, p4) glibtop_call_r(glibtop_global_server, p1, p2, p3, p4)
-extern void *glibtop_call__l __P((glibtop *, unsigned, size_t, void *, size_t, void *));
-extern void *glibtop_call__s __P((glibtop *, unsigned, size_t, void *, size_t, void *));
+extern void *glibtop_call_l __P((glibtop *, unsigned, size_t, void *, size_t, void *));
+extern void *glibtop_call_s __P((glibtop *, unsigned, size_t, void *, size_t, void *));
__END_DECLS
diff --git a/include/glibtop/cpu.h b/include/glibtop/cpu.h
index cf164833..f4e96afc 100644
--- a/include/glibtop/cpu.h
+++ b/include/glibtop/cpu.h
@@ -49,20 +49,20 @@ struct _glibtop_cpu
frequency; /* GLIBTOP_CPU_FREQUENCY */
};
-#define glibtop_get_cpu(cpu) glibtop_get_cpu__l(glibtop_global_server, cpu)
+#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu)
#if GLIBTOP_SUID_CPU
-#define glibtop_get_cpu__r glibtop_get_cpu__p
+#define glibtop_get_cpu_r glibtop_get_cpu_p
#else
-#define glibtop_get_cpu__r glibtop_get_cpu__s
+#define glibtop_get_cpu_r glibtop_get_cpu_s
#endif
-extern void glibtop_get_cpu__l __P((glibtop *, glibtop_cpu *));
+extern void glibtop_get_cpu_l __P((glibtop *, glibtop_cpu *));
#if GLIBTOP_SUID_CPU
-extern void glibtop_get_cpu__p __P((glibtop *, glibtop_cpu *));
+extern void glibtop_get_cpu_p __P((glibtop *, glibtop_cpu *));
#else
-extern void glibtop_get_cpu__s __P((glibtop *, glibtop_cpu *));
+extern void glibtop_get_cpu_s __P((glibtop *, glibtop_cpu *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/error.h b/include/glibtop/error.h
index 94e14ba9..adb85828 100644
--- a/include/glibtop/error.h
+++ b/include/glibtop/error.h
@@ -26,9 +26,9 @@
__BEGIN_DECLS
-#define glibtop_error(p1, args...) glibtop_error__r(glibtop_global_server , p1 , ## args)
+#define glibtop_error(p1, args...) glibtop_error_r(glibtop_global_server , p1 , ## args)
-extern void glibtop_error__r __P((glibtop *, char *, ...));
+extern void glibtop_error_r __P((glibtop *, char *, ...));
__END_DECLS
diff --git a/include/glibtop/loadavg.h b/include/glibtop/loadavg.h
index eaf6588c..661e9032 100644
--- a/include/glibtop/loadavg.h
+++ b/include/glibtop/loadavg.h
@@ -39,20 +39,20 @@ struct _glibtop_loadavg
double loadavg [3]; /* GLIBTOP_LOADAVG_LOADAVG */
};
-#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg__l(glibtop_global_server, loadavg)
+#define glibtop_get_loadavg(loadavg) glibtop_get_loadavg_l(glibtop_global_server, loadavg)
#if GLIBTOP_SUID_LOADAVG
-#define glibtop_get_loadavg__r glibtop_get_loadavg__p
+#define glibtop_get_loadavg_r glibtop_get_loadavg_p
#else
-#define glibtop_get_loadavg__r glibtop_get_loadavg__s
+#define glibtop_get_loadavg_r glibtop_get_loadavg_s
#endif
-extern void glibtop_get_loadavg__l __P((glibtop *, glibtop_loadavg *));
+extern void glibtop_get_loadavg_l __P((glibtop *, glibtop_loadavg *));
#if GLIBTOP_SUID_LOADAVG
-extern void glibtop_get_loadavg__p __P((glibtop *, glibtop_loadavg *));
+extern void glibtop_get_loadavg_p __P((glibtop *, glibtop_loadavg *));
#else
-extern void glibtop_get_loadavg__s __P((glibtop *, glibtop_loadavg *));
+extern void glibtop_get_loadavg_s __P((glibtop *, glibtop_loadavg *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/mem.h b/include/glibtop/mem.h
index 9f90bb27..5f490618 100644
--- a/include/glibtop/mem.h
+++ b/include/glibtop/mem.h
@@ -53,20 +53,20 @@ struct _glibtop_mem
locked; /* GLIBTOP_MEM_LOCKED */
};
-#define glibtop_get_mem(mem) glibtop_get_mem__l(glibtop_global_server, mem)
+#define glibtop_get_mem(mem) glibtop_get_mem_l(glibtop_global_server, mem)
#if GLIBTOP_SUID_MEM
-#define glibtop_get_mem__r glibtop_get_mem__p
+#define glibtop_get_mem_r glibtop_get_mem_p
#else
-#define glibtop_get_mem__r glibtop_get_mem__s
+#define glibtop_get_mem_r glibtop_get_mem_s
#endif
-extern void glibtop_get_mem__l __P((glibtop *, glibtop_mem *));
+extern void glibtop_get_mem_l __P((glibtop *, glibtop_mem *));
#if GLIBTOP_SUID_MEM
-extern void glibtop_get_mem__p __P((glibtop *, glibtop_mem *));
+extern void glibtop_get_mem_p __P((glibtop *, glibtop_mem *));
#else
-extern void glibtop_get_mem__s __P((glibtop *, glibtop_mem *));
+extern void glibtop_get_mem_s __P((glibtop *, glibtop_mem *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/msg_limits.h b/include/glibtop/msg_limits.h
index 6199265e..c915b568 100644
--- a/include/glibtop/msg_limits.h
+++ b/include/glibtop/msg_limits.h
@@ -51,20 +51,20 @@ struct _glibtop_msg_limits
msgtql; /* GLIBTOP_IPC_MSGTQL */
};
-#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits__l(glibtop_global_server, msg)
+#define glibtop_get_msg_limits(msg) glibtop_get_msg_limits_l(glibtop_global_server, msg)
#if GLIBTOP_SUID_MSG_LIMITS
-#define glibtop_get_msg_limits__r glibtop_get_msg_limits__p
+#define glibtop_get_msg_limits_r glibtop_get_msg_limits_p
#else
-#define glibtop_get_msg_limits__r glibtop_get_msg_limits__s
+#define glibtop_get_msg_limits_r glibtop_get_msg_limits_s
#endif
-extern void glibtop_get_msg_limits__l __P((glibtop *, glibtop_msg_limits *));
+extern void glibtop_get_msg_limits_l __P((glibtop *, glibtop_msg_limits *));
#if GLIBTOP_SUID_MSG_LIMITS
-extern void glibtop_get_msg_limits__p __P((glibtop *, glibtop_msg_limits *));
+extern void glibtop_get_msg_limits_p __P((glibtop *, glibtop_msg_limits *));
#else
-extern void glibtop_get_msg_limits__s __P((glibtop *, glibtop_msg_limits *));
+extern void glibtop_get_msg_limits_s __P((glibtop *, glibtop_msg_limits *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/open.h b/include/glibtop/open.h
index 629c18e8..4e4e5408 100644
--- a/include/glibtop/open.h
+++ b/include/glibtop/open.h
@@ -28,9 +28,9 @@ __BEGIN_DECLS
#define GLIBTOP_OPEN_NO_OVERRIDE 1
-extern void glibtop_open__l __P((glibtop *, const char *, const unsigned long, const unsigned));
+extern void glibtop_open_l __P((glibtop *, const char *, const unsigned long, const unsigned));
-extern void glibtop_open__r __P((glibtop *, const char *, const unsigned long, const unsigned));
+extern void glibtop_open_r __P((glibtop *, const char *, const unsigned long, const unsigned));
__END_DECLS
diff --git a/include/glibtop/prockernel.h b/include/glibtop/prockernel.h
index dbec0f0c..fed6fba6 100644
--- a/include/glibtop/prockernel.h
+++ b/include/glibtop/prockernel.h
@@ -60,20 +60,20 @@ struct _glibtop_proc_kernel
* proc is sleeping in */
};
-#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel__l(glibtop_global_server, p1, p2)
+#define glibtop_get_proc_kernel(p1, p2) glibtop_get_proc_kernel_l(glibtop_global_server, p1, p2)
#if GLIBTOP_SUID_PROC_KERNEL
-#define glibtop_get_proc_kernel__r glibtop_get_proc_kernel__p
+#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_p
#else
-#define glibtop_get_proc_kernel__r glibtop_get_proc_kernel__s
+#define glibtop_get_proc_kernel_r glibtop_get_proc_kernel_s
#endif
-extern void glibtop_get_proc_kernel__l __P((glibtop *, glibtop_proc_kernel *, pid_t));
+extern void glibtop_get_proc_kernel_l __P((glibtop *, glibtop_proc_kernel *, pid_t));
#if GLIBTOP_SUID_PROC_KERNEL
-extern void glibtop_get_proc_kernel__p __P((glibtop *, glibtop_proc_kernel *, pid_t));
+extern void glibtop_get_proc_kernel_p __P((glibtop *, glibtop_proc_kernel *, pid_t));
#else
-extern void glibtop_get_proc_kernel__s __P((glibtop *, glibtop_proc_kernel *, pid_t));
+extern void glibtop_get_proc_kernel_s __P((glibtop *, glibtop_proc_kernel *, pid_t));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/proclist.h b/include/glibtop/proclist.h
index 24026b6d..ebc6512c 100644
--- a/include/glibtop/proclist.h
+++ b/include/glibtop/proclist.h
@@ -43,20 +43,20 @@ struct _glibtop_proclist
size; /* GLIBTOP_PROCLIST_SIZE */
};
-#define glibtop_get_proclist(proclist) glibtop_get_proclist__l(glibtop_global_server, proclist)
+#define glibtop_get_proclist(proclist) glibtop_get_proclist_l(glibtop_global_server, proclist)
#if GLIBTOP_SUID_PROCLIST
-#define glibtop_get_proclist__r glibtop_get_proclist__p
+#define glibtop_get_proclist_r glibtop_get_proclist_p
#else
-#define glibtop_get_proclist__r glibtop_get_proclist__s
+#define glibtop_get_proclist_r glibtop_get_proclist_s
#endif
-extern unsigned *glibtop_get_proclist__l __P((glibtop *, glibtop_proclist *));
+extern unsigned *glibtop_get_proclist_l __P((glibtop *, glibtop_proclist *));
#if GLIBTOP_SUID_PROCLIST
-extern unsigned *glibtop_get_proclist__p __P((glibtop *, glibtop_proclist *));
+extern unsigned *glibtop_get_proclist_p __P((glibtop *, glibtop_proclist *));
#else
-extern unsigned *glibtop_get_proclist__s __P((glibtop *, glibtop_proclist *));
+extern unsigned *glibtop_get_proclist_s __P((glibtop *, glibtop_proclist *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/procmem.h b/include/glibtop/procmem.h
index 9d787966..a2720169 100644
--- a/include/glibtop/procmem.h
+++ b/include/glibtop/procmem.h
@@ -53,20 +53,20 @@ struct _glibtop_proc_mem
* of the process; usually 2,147,483,647 */
};
-#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem__l(glibtop_global_server, p1, p2)
+#define glibtop_get_proc_mem(p1, p2) glibtop_get_proc_mem_l(glibtop_global_server, p1, p2)
#if GLIBTOP_SUID_PROC_MEM
-#define glibtop_get_proc_mem__r glibtop_get_proc_mem__p
+#define glibtop_get_proc_mem_r glibtop_get_proc_mem_p
#else
-#define glibtop_get_proc_mem__r glibtop_get_proc_mem__s
+#define glibtop_get_proc_mem_r glibtop_get_proc_mem_s
#endif
-extern void glibtop_get_proc_mem__l __P((glibtop *, glibtop_proc_mem *, pid_t));
+extern void glibtop_get_proc_mem_l __P((glibtop *, glibtop_proc_mem *, pid_t));
#if GLIBTOP_SUID_PROC_MEM
-extern void glibtop_get_proc_mem__p __P((glibtop *, glibtop_proc_mem *, pid_t));
+extern void glibtop_get_proc_mem_p __P((glibtop *, glibtop_proc_mem *, pid_t));
#else
-extern void glibtop_get_proc_mem__s __P((glibtop *, glibtop_proc_mem *, pid_t));
+extern void glibtop_get_proc_mem_s __P((glibtop *, glibtop_proc_mem *, pid_t));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/procsegment.h b/include/glibtop/procsegment.h
index 76e419c7..54f59d81 100644
--- a/include/glibtop/procsegment.h
+++ b/include/glibtop/procsegment.h
@@ -54,20 +54,20 @@ struct _glibtop_proc_segment
start_stack; /* address of the bottom of stack segment */
};
-#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment__l(glibtop_global_server, p1, p2)
+#define glibtop_get_proc_segment(p1, p2) glibtop_get_proc_segment_l(glibtop_global_server, p1, p2)
#if GLIBTOP_SUID_PROC_SEGMENT
-#define glibtop_get_proc_segment__r glibtop_get_proc_segment__p
+#define glibtop_get_proc_segment_r glibtop_get_proc_segment_p
#else
-#define glibtop_get_proc_segment__r glibtop_get_proc_segment__s
+#define glibtop_get_proc_segment_r glibtop_get_proc_segment_s
#endif
-extern void glibtop_get_proc_segment__l __P((glibtop *, glibtop_proc_segment *, pid_t));
+extern void glibtop_get_proc_segment_l __P((glibtop *, glibtop_proc_segment *, pid_t));
#if GLIBTOP_SUID_PROC_SEGMENT
-extern void glibtop_get_proc_segment__p __P((glibtop *, glibtop_proc_segment *, pid_t));
+extern void glibtop_get_proc_segment_p __P((glibtop *, glibtop_proc_segment *, pid_t));
#else
-extern void glibtop_get_proc_segment__s __P((glibtop *, glibtop_proc_segment *, pid_t));
+extern void glibtop_get_proc_segment_s __P((glibtop *, glibtop_proc_segment *, pid_t));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/procsignal.h b/include/glibtop/procsignal.h
index f09b6047..e3690ea0 100644
--- a/include/glibtop/procsignal.h
+++ b/include/glibtop/procsignal.h
@@ -47,20 +47,20 @@ struct _glibtop_proc_signal
sigcatch; /* mask of caught signals */
};
-#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal__l(glibtop_global_server, p1, p2)
+#define glibtop_get_proc_signal(p1, p2) glibtop_get_proc_signal_l(glibtop_global_server, p1, p2)
#if GLIBTOP_SUID_PROC_SIGNAL
-#define glibtop_get_proc_signal__r glibtop_get_proc_signal__p
+#define glibtop_get_proc_signal_r glibtop_get_proc_signal_p
#else
-#define glibtop_get_proc_signal__r glibtop_get_proc_signal__s
+#define glibtop_get_proc_signal_r glibtop_get_proc_signal_s
#endif
-extern void glibtop_get_proc_signal__l __P((glibtop *, glibtop_proc_signal *, pid_t));
+extern void glibtop_get_proc_signal_l __P((glibtop *, glibtop_proc_signal *, pid_t));
#if GLIBTOP_SUID_PROC_SIGNAL
-extern void glibtop_get_proc_signal__p __P((glibtop *, glibtop_proc_signal *, pid_t));
+extern void glibtop_get_proc_signal_p __P((glibtop *, glibtop_proc_signal *, pid_t));
#else
-extern void glibtop_get_proc_signal__s __P((glibtop *, glibtop_proc_signal *, pid_t));
+extern void glibtop_get_proc_signal_s __P((glibtop *, glibtop_proc_signal *, pid_t));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/procstate.h b/include/glibtop/procstate.h
index d62c64e4..416a2d94 100644
--- a/include/glibtop/procstate.h
+++ b/include/glibtop/procstate.h
@@ -54,20 +54,20 @@ struct _glibtop_proc_state
gid; /* GID of process */
};
-#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state__l(glibtop_global_server, p1, p2)
+#define glibtop_get_proc_state(p1, p2) glibtop_get_proc_state_l(glibtop_global_server, p1, p2)
#if GLIBTOP_SUID_PROC_STATE
-#define glibtop_get_proc_state__r glibtop_get_proc_state__p
+#define glibtop_get_proc_state_r glibtop_get_proc_state_p
#else
-#define glibtop_get_proc_state__r glibtop_get_proc_state__s
+#define glibtop_get_proc_state_r glibtop_get_proc_state_s
#endif
-extern void glibtop_get_proc_state__l __P((glibtop *, glibtop_proc_state *, pid_t));
+extern void glibtop_get_proc_state_l __P((glibtop *, glibtop_proc_state *, pid_t));
#if GLIBTOP_SUID_PROC_STATE
-extern void glibtop_get_proc_state__p __P((glibtop *, glibtop_proc_state *, pid_t));
+extern void glibtop_get_proc_state_p __P((glibtop *, glibtop_proc_state *, pid_t));
#else
-extern void glibtop_get_proc_state__s __P((glibtop *, glibtop_proc_state *, pid_t));
+extern void glibtop_get_proc_state_s __P((glibtop *, glibtop_proc_state *, pid_t));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/proctime.h b/include/glibtop/proctime.h
index 9bbe6597..40ae3aa5 100644
--- a/include/glibtop/proctime.h
+++ b/include/glibtop/proctime.h
@@ -59,20 +59,20 @@ struct _glibtop_proc_time
* due to an interval timer. */
};
-#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time__l(glibtop_global_server, p1, p2)
+#define glibtop_get_proc_time(p1, p2) glibtop_get_proc_time_l(glibtop_global_server, p1, p2)
#if GLIBTOP_SUID_PROC_TIME
-#define glibtop_get_proc_time__r glibtop_get_proc_time__p
+#define glibtop_get_proc_time_r glibtop_get_proc_time_p
#else
-#define glibtop_get_proc_time__r glibtop_get_proc_time__s
+#define glibtop_get_proc_time_r glibtop_get_proc_time_s
#endif
-extern void glibtop_get_proc_time__l __P((glibtop *, glibtop_proc_time *, pid_t));
+extern void glibtop_get_proc_time_l __P((glibtop *, glibtop_proc_time *, pid_t));
#if GLIBTOP_SUID_PROC_TIME
-extern void glibtop_get_proc_time__p __P((glibtop *, glibtop_proc_time *, pid_t));
+extern void glibtop_get_proc_time_p __P((glibtop *, glibtop_proc_time *, pid_t));
#else
-extern void glibtop_get_proc_time__s __P((glibtop *, glibtop_proc_time *, pid_t));
+extern void glibtop_get_proc_time_s __P((glibtop *, glibtop_proc_time *, pid_t));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/procuid.h b/include/glibtop/procuid.h
index 12cbe5d7..e478c2cb 100644
--- a/include/glibtop/procuid.h
+++ b/include/glibtop/procuid.h
@@ -63,20 +63,20 @@ struct _glibtop_proc_uid
nice; /* standard unix nice level of process */
};
-#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid__l(glibtop_global_server, p1, p2)
+#define glibtop_get_proc_uid(p1, p2) glibtop_get_proc_uid_l(glibtop_global_server, p1, p2)
#if GLIBTOP_SUID_PROC_UID
-#define glibtop_get_proc_uid__r glibtop_get_proc_uid__p
+#define glibtop_get_proc_uid_r glibtop_get_proc_uid_p
#else
-#define glibtop_get_proc_uid__r glibtop_get_proc_uid__s
+#define glibtop_get_proc_uid_r glibtop_get_proc_uid_s
#endif
-extern void glibtop_get_proc_uid__l __P((glibtop *, glibtop_proc_uid *, pid_t));
+extern void glibtop_get_proc_uid_l __P((glibtop *, glibtop_proc_uid *, pid_t));
#if GLIBTOP_SUID_PROC_UID
-extern void glibtop_get_proc_uid__p __P((glibtop *, glibtop_proc_uid *, pid_t));
+extern void glibtop_get_proc_uid_p __P((glibtop *, glibtop_proc_uid *, pid_t));
#else
-extern void glibtop_get_proc_uid__s __P((glibtop *, glibtop_proc_uid *, pid_t));
+extern void glibtop_get_proc_uid_s __P((glibtop *, glibtop_proc_uid *, pid_t));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/read.h b/include/glibtop/read.h
index 4286cce1..bd0945d7 100644
--- a/include/glibtop/read.h
+++ b/include/glibtop/read.h
@@ -29,8 +29,8 @@ __BEGIN_DECLS
#define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2)
-extern void glibtop_read__l __P((glibtop *, size_t, void *));
-extern void glibtop_read__s __P((glibtop *, size_t, void *));
+extern void glibtop_read_l __P((glibtop *, size_t, void *));
+extern void glibtop_read_s __P((glibtop *, size_t, void *));
__END_DECLS
diff --git a/include/glibtop/read_data.h b/include/glibtop/read_data.h
index 61bda2b2..8583a51b 100644
--- a/include/glibtop/read_data.h
+++ b/include/glibtop/read_data.h
@@ -27,10 +27,10 @@
__BEGIN_DECLS
-#define glibtop_read_data() glibtop_read_data__r(glibtop_global_server)
+#define glibtop_read_data() glibtop_read_data_r(glibtop_global_server)
-extern void *glibtop_read_data__l __P((glibtop *));
-extern void *glibtop_read_data__s __P((glibtop *));
+extern void *glibtop_read_data_l __P((glibtop *));
+extern void *glibtop_read_data_s __P((glibtop *));
__END_DECLS
diff --git a/include/glibtop/sem_limits.h b/include/glibtop/sem_limits.h
index 50118802..19cefc95 100644
--- a/include/glibtop/sem_limits.h
+++ b/include/glibtop/sem_limits.h
@@ -57,20 +57,20 @@ struct _glibtop_sem_limits
semaem; /* GLIBTOP_IPC_SEMAEM */
};
-#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits__l(glibtop_global_server, sem)
+#define glibtop_get_sem_limits(sem) glibtop_get_sem_limits_l(glibtop_global_server, sem)
#if GLIBTOP_SUID_SEM_LIMITS
-#define glibtop_get_sem_limits__r glibtop_get_sem_limits__p
+#define glibtop_get_sem_limits_r glibtop_get_sem_limits_p
#else
-#define glibtop_get_sem_limits__r glibtop_get_sem_limits__s
+#define glibtop_get_sem_limits_r glibtop_get_sem_limits_s
#endif
-extern void glibtop_get_sem_limits__l __P((glibtop *, glibtop_sem_limits *));
+extern void glibtop_get_sem_limits_l __P((glibtop *, glibtop_sem_limits *));
#if GLIBTOP_SUID_SEM_LIMITS
-extern void glibtop_get_sem_limits__p __P((glibtop *, glibtop_sem_limits *));
+extern void glibtop_get_sem_limits_p __P((glibtop *, glibtop_sem_limits *));
#else
-extern void glibtop_get_sem_limits__s __P((glibtop *, glibtop_sem_limits *));
+extern void glibtop_get_sem_limits_s __P((glibtop *, glibtop_sem_limits *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/shm_limits.h b/include/glibtop/shm_limits.h
index df270868..e068bd47 100644
--- a/include/glibtop/shm_limits.h
+++ b/include/glibtop/shm_limits.h
@@ -47,20 +47,20 @@ struct _glibtop_shm_limits
shmall; /* GLIBTOP_IPC_SHMALL */
};
-#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits__l(glibtop_global_server, shm)
+#define glibtop_get_shm_limits(shm) glibtop_get_shm_limits_l(glibtop_global_server, shm)
#if GLIBTOP_SUID_SHM_LIMITS
-#define glibtop_get_shm_limits__r glibtop_get_shm_limits__p
+#define glibtop_get_shm_limits_r glibtop_get_shm_limits_p
#else
-#define glibtop_get_shm_limits__r glibtop_get_shm_limits__s
+#define glibtop_get_shm_limits_r glibtop_get_shm_limits_s
#endif
-extern void glibtop_get_shm_limits__l __P((glibtop *, glibtop_shm_limits *));
+extern void glibtop_get_shm_limits_l __P((glibtop *, glibtop_shm_limits *));
#if GLIBTOP_SUID_SHM_LIMITS
-extern void glibtop_get_shm_limits__p __P((glibtop *, glibtop_shm_limits *));
+extern void glibtop_get_shm_limits_p __P((glibtop *, glibtop_shm_limits *));
#else
-extern void glibtop_get_shm_limits__s __P((glibtop *, glibtop_shm_limits *));
+extern void glibtop_get_shm_limits_s __P((glibtop *, glibtop_shm_limits *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/swap.h b/include/glibtop/swap.h
index 396f940a..ce7ab57c 100644
--- a/include/glibtop/swap.h
+++ b/include/glibtop/swap.h
@@ -43,20 +43,20 @@ struct _glibtop_swap
free; /* GLIBTOP_SWAP_FREE */
};
-#define glibtop_get_swap(swap) glibtop_get_swap__l(glibtop_global_server, swap)
+#define glibtop_get_swap(swap) glibtop_get_swap_l(glibtop_global_server, swap)
#if GLIBTOP_SUID_SWAP
-#define glibtop_get_swap__r glibtop_get_swap__p
+#define glibtop_get_swap_r glibtop_get_swap_p
#else
-#define glibtop_get_swap__r glibtop_get_swap__s
+#define glibtop_get_swap_r glibtop_get_swap_s
#endif
-extern void glibtop_get_swap__l __P((glibtop *, glibtop_swap *));
+extern void glibtop_get_swap_l __P((glibtop *, glibtop_swap *));
#if GLIBTOP_SUID_SWAP
-extern void glibtop_get_swap__p __P((glibtop *, glibtop_swap *));
+extern void glibtop_get_swap_p __P((glibtop *, glibtop_swap *));
#else
-extern void glibtop_get_swap__s __P((glibtop *, glibtop_swap *));
+extern void glibtop_get_swap_s __P((glibtop *, glibtop_swap *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/sysdeps.h b/include/glibtop/sysdeps.h
index 8bbcba2b..e2491008 100644
--- a/include/glibtop/sysdeps.h
+++ b/include/glibtop/sysdeps.h
@@ -73,9 +73,9 @@ struct _glibtop_sysdeps
proc_segment; /* glibtop_proc_segment */
};
-#define glibtop_get_sysdeps(sysdeps) glibtop_get_sysdeps__r(glibtop_global_server,sysdeps)
+#define glibtop_get_sysdeps(sysdeps) glibtop_get_sysdeps_r(glibtop_global_server,sysdeps)
-extern void glibtop_get_sysdeps__r __P((glibtop *, glibtop_sysdeps *));
+extern void glibtop_get_sysdeps_r __P((glibtop *, glibtop_sysdeps *));
#ifdef HAVE_GUILE
diff --git a/include/glibtop/uptime.h b/include/glibtop/uptime.h
index 99fe9290..39c8dea5 100644
--- a/include/glibtop/uptime.h
+++ b/include/glibtop/uptime.h
@@ -41,20 +41,20 @@ struct _glibtop_uptime
idletime; /* GLIBTOP_UPTIME_IDLETIME */
};
-#define glibtop_get_uptime(uptime) glibtop_get_uptime__l(glibtop_global_server, uptime)
+#define glibtop_get_uptime(uptime) glibtop_get_uptime_l(glibtop_global_server, uptime)
#if GLIBTOP_SUID_UPTIME
-#define glibtop_get_uptime__r glibtop_get_uptime__p
+#define glibtop_get_uptime_r glibtop_get_uptime_p
#else
-#define glibtop_get_uptime__r glibtop_get_uptime__s
+#define glibtop_get_uptime_r glibtop_get_uptime_s
#endif
-extern void glibtop_get_uptime__l __P((glibtop *, glibtop_uptime *));
+extern void glibtop_get_uptime_l __P((glibtop *, glibtop_uptime *));
#if GLIBTOP_SUID_UPTIME
-extern void glibtop_get_uptime__p __P((glibtop *, glibtop_uptime *));
+extern void glibtop_get_uptime_p __P((glibtop *, glibtop_uptime *));
#else
-extern void glibtop_get_uptime__s __P((glibtop *, glibtop_uptime *));
+extern void glibtop_get_uptime_s __P((glibtop *, glibtop_uptime *));
#endif
#ifdef HAVE_GUILE
diff --git a/include/glibtop/write.h b/include/glibtop/write.h
index 22a677b5..065da135 100644
--- a/include/glibtop/write.h
+++ b/include/glibtop/write.h
@@ -29,8 +29,8 @@ __BEGIN_DECLS
#define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2)
-extern void glibtop_write__l __P((glibtop *, size_t, void *));
-extern void glibtop_write__s __P((glibtop *, size_t, void *));
+extern void glibtop_write_l __P((glibtop *, size_t, void *));
+extern void glibtop_write_s __P((glibtop *, size_t, void *));
__END_DECLS
diff --git a/include/glibtop/xmalloc.h b/include/glibtop/xmalloc.h
index 14a6709c..5c2b5024 100644
--- a/include/glibtop/xmalloc.h
+++ b/include/glibtop/xmalloc.h
@@ -27,15 +27,15 @@
__BEGIN_DECLS
-#define glibtop_malloc(p1) glibtop_malloc__r(glibtop_global_server, p1)
-#define glibtop_calloc(p1, p2) glibtop_calloc__r(glibtop_global_server, p1, p2)
-#define glibtop_realloc(p1, p2) glibtop_realloc__r(glibtop_global_server, p1, p2)
-#define glibtop_free(p1) glibtop_free__r(glibtop_global_server, p1)
-
-extern void *glibtop_malloc__r __P((glibtop *, size_t));
-extern void *glibtop_calloc__r __P((glibtop *, size_t, size_t));
-extern void *glibtop_realloc__r __P((glibtop *, void *, size_t));
-extern void glibtop_free__r __P((glibtop *, void *));
+#define glibtop_malloc(p1) glibtop_malloc_r(glibtop_global_server, p1)
+#define glibtop_calloc(p1, p2) glibtop_calloc_r(glibtop_global_server, p1, p2)
+#define glibtop_realloc(p1, p2) glibtop_realloc_r(glibtop_global_server, p1, p2)
+#define glibtop_free(p1) glibtop_free_r(glibtop_global_server, p1)
+
+extern void *glibtop_malloc_r __P((glibtop *, size_t));
+extern void *glibtop_calloc_r __P((glibtop *, size_t, size_t));
+extern void *glibtop_realloc_r __P((glibtop *, void *, size_t));
+extern void glibtop_free_r __P((glibtop *, void *));
__END_DECLS
diff --git a/lib/close.c b/lib/close.c
index 8f85c512..f4f0ba00 100644
--- a/lib/close.c
+++ b/lib/close.c
@@ -24,7 +24,7 @@
/* Closes pipe to gtop server. */
void
-glibtop_close (glibtop *server)
+glibtop_close_r (glibtop *server)
{
kill (server->pid, SIGKILL);
close (server->input [0]);
diff --git a/lib/command.c b/lib/command.c
index 1bc67b05..e8d2dc97 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -27,28 +27,28 @@
#include <glibtop/xmalloc.h>
void *
-glibtop_call__l (glibtop *server, unsigned command, size_t send_size, void *send_buf,
+glibtop_call_l (glibtop *server, unsigned command, size_t send_size, void *send_buf,
size_t recv_size, void *recv_buf)
{
glibtop_command *cmnd;
void *ptr;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
- cmnd = glibtop_calloc__r (server, 1, sizeof (glibtop_command));
+ cmnd = glibtop_calloc_r (server, 1, sizeof (glibtop_command));
memcpy (&cmnd->server, server, sizeof (glibtop));
cmnd->command = command;
cmnd->size = send_size;
- glibtop_write__l (server, sizeof (glibtop_command), cmnd);
- glibtop_write__l (server, send_size, send_buf);
- glibtop_read__l (server, recv_size, recv_buf);
+ glibtop_write_l (server, sizeof (glibtop_command), cmnd);
+ glibtop_write_l (server, send_size, send_buf);
+ glibtop_read_l (server, recv_size, recv_buf);
- ptr = glibtop_read_data__l (server);
+ ptr = glibtop_read_data_l (server);
- glibtop_free__r (server, cmnd);
+ glibtop_free_r (server, cmnd);
return ptr;
}
diff --git a/lib/cpu.c b/lib/cpu.c
index 94ffcdab..6e20a19e 100644
--- a/lib/cpu.c
+++ b/lib/cpu.c
@@ -26,14 +26,14 @@
/* Provides information about cpu usage. */
void
-glibtop_get_cpu__l (glibtop *server, glibtop_cpu *buf)
+glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_CPU, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_CPU, 0);
if (server->features & GLIBTOP_SYSDEPS_CPU) {
- glibtop_call__l (server, GLIBTOP_CMND_CPU, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_CPU, 0, NULL,
sizeof (glibtop_cpu), buf);
} else {
- glibtop_get_cpu__r (server, buf);
+ glibtop_get_cpu_r (server, buf);
}
}
diff --git a/lib/init.c b/lib/init.c
index 1fbc9952..f0094020 100644
--- a/lib/init.c
+++ b/lib/init.c
@@ -26,7 +26,7 @@ static glibtop _glibtop_global_server;
glibtop *glibtop_global_server = NULL;
glibtop *
-glibtop_init__r (glibtop **server, const unsigned long features,
+glibtop_init_r (glibtop **server, const unsigned long features,
const unsigned flags)
{
if (*server != NULL)
@@ -34,7 +34,7 @@ glibtop_init__r (glibtop **server, const unsigned long features,
if (glibtop_global_server == NULL) {
glibtop_global_server = &_glibtop_global_server;
- glibtop_open__l (glibtop_global_server, "glibtop",
+ glibtop_open_l (glibtop_global_server, "glibtop",
features, flags);
}
diff --git a/lib/loadavg.c b/lib/loadavg.c
index 0704f1bc..3e503160 100644
--- a/lib/loadavg.c
+++ b/lib/loadavg.c
@@ -26,14 +26,14 @@
/* Provides load averange. */
void
-glibtop_get_loadavg__l (glibtop *server, glibtop_loadavg *buf)
+glibtop_get_loadavg_l (glibtop *server, glibtop_loadavg *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_LOADAVG, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_LOADAVG, 0);
if (server->features & GLIBTOP_SYSDEPS_LOADAVG) {
- glibtop_call__l (server, GLIBTOP_CMND_LOADAVG, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_LOADAVG, 0, NULL,
sizeof (glibtop_loadavg), buf);
} else {
- glibtop_get_loadavg__r (server, buf);
+ glibtop_get_loadavg_r (server, buf);
}
}
diff --git a/lib/mem.c b/lib/mem.c
index ea8f2c6b..34fe5ef1 100644
--- a/lib/mem.c
+++ b/lib/mem.c
@@ -25,14 +25,14 @@
/* Provides information about memory usage. */
void
-glibtop_get_mem__l (glibtop *server, glibtop_mem *buf)
+glibtop_get_mem_l (glibtop *server, glibtop_mem *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_MEM, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_MEM, 0);
if (server->features & GLIBTOP_SYSDEPS_MEM) {
- glibtop_call__l (server, GLIBTOP_CMND_MEM, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_MEM, 0, NULL,
sizeof (glibtop_mem), buf);
} else {
- glibtop_get_mem__r (server, buf);
+ glibtop_get_mem_r (server, buf);
}
}
diff --git a/lib/msg_limits.c b/lib/msg_limits.c
index 9fc82c12..16727049 100644
--- a/lib/msg_limits.c
+++ b/lib/msg_limits.c
@@ -25,14 +25,14 @@
/* Provides information about sysv ipc limits. */
void
-glibtop_get_msg_limits__l (glibtop *server, glibtop_msg_limits *buf)
+glibtop_get_msg_limits_l (glibtop *server, glibtop_msg_limits *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_MSG_LIMITS, 0);
if (server->features & GLIBTOP_SYSDEPS_MSG_LIMITS) {
- glibtop_call__l (server, GLIBTOP_CMND_MSG_LIMITS, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_MSG_LIMITS, 0, NULL,
sizeof (glibtop_msg_limits), buf);
} else {
- glibtop_get_msg_limits__r (server, buf);
+ glibtop_get_msg_limits_r (server, buf);
}
}
diff --git a/lib/open.c b/lib/open.c
index 5dca3717..d3501fa4 100644
--- a/lib/open.c
+++ b/lib/open.c
@@ -28,7 +28,7 @@
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
void
-glibtop_open__l (glibtop *server, const char *program_name,
+glibtop_open_l (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags)
{
char version [BUFSIZ], buffer [BUFSIZ];
@@ -49,14 +49,14 @@ glibtop_open__l (glibtop *server, const char *program_name,
temp = getenv ("LIBGTOP_SERVER") ?
getenv ("LIBGTOP_SERVER") : GTOP_SERVER;
- server_command = glibtop_malloc__r (server, strlen (temp) + 1);
+ server_command = glibtop_malloc_r (server, strlen (temp) + 1);
strcpy (server_command, temp);
temp = getenv ("LIBGTOP_RSH") ?
getenv ("LIBGTOP_RSH") : "rsh";
- server_rsh = glibtop_malloc__r (server, strlen (temp) + 1);
+ server_rsh = glibtop_malloc_r (server, strlen (temp) + 1);
strcpy (server_rsh, temp);
@@ -103,13 +103,13 @@ glibtop_open__l (glibtop *server, const char *program_name,
/* Fork and exec server. */
if (pipe (server->input) || pipe (server->output))
- glibtop_error__r (server, _("cannot make a pipe: %s\n"),
+ glibtop_error_r (server, _("cannot make a pipe: %s\n"),
strerror (errno));
server->pid = fork ();
if (server->pid < 0) {
- glibtop_error__r (server, _("%s: fork failed: %s\n"),
+ glibtop_error_r (server, _("%s: fork failed: %s\n"),
strerror (errno));
} else if (server->pid == 0) {
close (0); close (1); /* close (2); */
@@ -140,14 +140,14 @@ glibtop_open__l (glibtop *server, const char *program_name,
sprintf (version, "%s server %s ready.\n", PACKAGE, VERSION);
- glibtop_read__l (server, strlen (version), buffer);
+ glibtop_read_l (server, strlen (version), buffer);
if (memcmp (version, buffer, strlen (version)))
- glibtop_error__r (server, _("server version is not %s"), VERSION);
+ glibtop_error_r (server, _("server version is not %s"), VERSION);
fprintf (stderr, "Calling GLITOP_CMND_SYSDEPS ...\n");
- glibtop_call__l (server, GLIBTOP_CMND_SYSDEPS, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_SYSDEPS, 0, NULL,
sizeof (glibtop_sysdeps), &sysdeps);
server->features = sysdeps.features;
diff --git a/lib/prockernel.c b/lib/prockernel.c
index 0c66d230..56ff0159 100644
--- a/lib/prockernel.c
+++ b/lib/prockernel.c
@@ -26,15 +26,15 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_kernel__l (glibtop *server, glibtop_proc_kernel *buf,
+glibtop_get_proc_kernel_l (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_KERNEL, 0);
if (server->features & GLIBTOP_SYSDEPS_PROC_KERNEL) {
- glibtop_call__l (server, GLIBTOP_CMND_PROC_KERNEL, sizeof (pid_t),
+ glibtop_call_l (server, GLIBTOP_CMND_PROC_KERNEL, sizeof (pid_t),
&pid, sizeof (glibtop_proc_kernel), buf);
} else {
- glibtop_get_proc_kernel__r (server, buf, pid);
+ glibtop_get_proc_kernel_r (server, buf, pid);
}
}
diff --git a/lib/proclist.c b/lib/proclist.c
index 0a40f825..a82c016c 100644
--- a/lib/proclist.c
+++ b/lib/proclist.c
@@ -25,14 +25,14 @@
/* Fetch list of currently running processes. */
unsigned *
-glibtop_get_proclist__l (glibtop *server, glibtop_proclist *buf)
+glibtop_get_proclist_l (glibtop *server, glibtop_proclist *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROCLIST, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROCLIST, 0);
if (server->features & GLIBTOP_SYSDEPS_PROCLIST) {
- return glibtop_call__l (server, GLIBTOP_CMND_PROCLIST, 0, NULL,
+ return glibtop_call_l (server, GLIBTOP_CMND_PROCLIST, 0, NULL,
sizeof (glibtop_proclist), buf);
} else {
- return glibtop_get_proclist__r (server, buf);
+ return glibtop_get_proclist_r (server, buf);
}
}
diff --git a/lib/procmem.c b/lib/procmem.c
index 575c59a9..26e822ca 100644
--- a/lib/procmem.c
+++ b/lib/procmem.c
@@ -26,15 +26,15 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_mem__l (glibtop *server, glibtop_proc_mem *buf,
+glibtop_get_proc_mem_l (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROC_MEM, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_MEM, 0);
if (server->features & GLIBTOP_SYSDEPS_PROC_MEM) {
- glibtop_call__l (server, GLIBTOP_CMND_PROC_MEM, sizeof (pid_t),
+ glibtop_call_l (server, GLIBTOP_CMND_PROC_MEM, sizeof (pid_t),
&pid, sizeof (glibtop_proc_mem), buf);
} else {
- glibtop_get_proc_mem__r (server, buf, pid);
+ glibtop_get_proc_mem_r (server, buf, pid);
}
}
diff --git a/lib/procsegment.c b/lib/procsegment.c
index a485dc30..92ec5a2a 100644
--- a/lib/procsegment.c
+++ b/lib/procsegment.c
@@ -26,15 +26,15 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_segment__l (glibtop *server, glibtop_proc_segment *buf,
+glibtop_get_proc_segment_l (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_SEGMENT, 0);
if (server->features & GLIBTOP_SYSDEPS_PROC_SEGMENT) {
- glibtop_call__l (server, GLIBTOP_CMND_PROC_SEGMENT, sizeof (pid_t),
+ glibtop_call_l (server, GLIBTOP_CMND_PROC_SEGMENT, sizeof (pid_t),
&pid, sizeof (glibtop_proc_segment), buf);
} else {
- glibtop_get_proc_segment__r (server, buf, pid);
+ glibtop_get_proc_segment_r (server, buf, pid);
}
}
diff --git a/lib/procsignal.c b/lib/procsignal.c
index 89c23ed3..d51ce115 100644
--- a/lib/procsignal.c
+++ b/lib/procsignal.c
@@ -26,15 +26,15 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_signal__l (glibtop *server, glibtop_proc_signal *buf,
+glibtop_get_proc_signal_l (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_SIGNAL, 0);
if (server->features & GLIBTOP_SYSDEPS_PROC_SIGNAL) {
- glibtop_call__l (server, GLIBTOP_CMND_PROC_SIGNAL, sizeof (pid_t),
+ glibtop_call_l (server, GLIBTOP_CMND_PROC_SIGNAL, sizeof (pid_t),
&pid, sizeof (glibtop_proc_signal), buf);
} else {
- glibtop_get_proc_signal__r (server, buf, pid);
+ glibtop_get_proc_signal_r (server, buf, pid);
}
}
diff --git a/lib/procstate.c b/lib/procstate.c
index a5625ac4..d1167186 100644
--- a/lib/procstate.c
+++ b/lib/procstate.c
@@ -26,15 +26,15 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_state__l (glibtop *server, glibtop_proc_state *buf,
+glibtop_get_proc_state_l (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROC_STATE, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_STATE, 0);
if (server->features & GLIBTOP_SYSDEPS_PROC_STATE) {
- glibtop_call__l (server, GLIBTOP_CMND_PROC_STATE, sizeof (pid_t),
+ glibtop_call_l (server, GLIBTOP_CMND_PROC_STATE, sizeof (pid_t),
&pid, sizeof (glibtop_proc_state), buf);
} else {
- glibtop_get_proc_state__r (server, buf, pid);
+ glibtop_get_proc_state_r (server, buf, pid);
}
}
diff --git a/lib/proctime.c b/lib/proctime.c
index 40c0e62c..ac116d00 100644
--- a/lib/proctime.c
+++ b/lib/proctime.c
@@ -26,15 +26,15 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_time__l (glibtop *server, glibtop_proc_time *buf,
+glibtop_get_proc_time_l (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0);
if (server->features & GLIBTOP_SYSDEPS_PROC_TIME) {
- glibtop_call__l (server, GLIBTOP_CMND_PROC_TIME, sizeof (pid_t),
+ glibtop_call_l (server, GLIBTOP_CMND_PROC_TIME, sizeof (pid_t),
&pid, sizeof (glibtop_proc_time), buf);
} else {
- glibtop_get_proc_time__r (server, buf, pid);
+ glibtop_get_proc_time_r (server, buf, pid);
}
}
diff --git a/lib/procuid.c b/lib/procuid.c
index 563242a8..e65da97d 100644
--- a/lib/procuid.c
+++ b/lib/procuid.c
@@ -26,15 +26,15 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_uid__l (glibtop *server, glibtop_proc_uid *buf,
+glibtop_get_proc_uid_l (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_PROC_UID, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_PROC_UID, 0);
if (server->features & GLIBTOP_SYSDEPS_PROC_UID) {
- glibtop_call__l (server, GLIBTOP_CMND_PROC_UID, sizeof (pid_t),
+ glibtop_call_l (server, GLIBTOP_CMND_PROC_UID, sizeof (pid_t),
&pid, sizeof (glibtop_proc_uid), buf);
} else {
- glibtop_get_proc_uid__r (server, buf, pid);
+ glibtop_get_proc_uid_r (server, buf, pid);
}
}
diff --git a/lib/read.c b/lib/read.c
index d50b443e..e8b2e623 100644
--- a/lib/read.c
+++ b/lib/read.c
@@ -24,18 +24,18 @@
/* Reads some data from server. */
void
-glibtop_read__l (glibtop *server, size_t size, void *buf)
+glibtop_read_l (glibtop *server, size_t size, void *buf)
{
size_t ssize;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
if (read (server->input [0], &ssize, sizeof (size_t)) < 0)
- glibtop_error__r (server, _("read size: %s"), strerror (errno));
+ glibtop_error_r (server, _("read size: %s"), strerror (errno));
if (size != ssize)
- glibtop_error__r (server, _("got %d bytes but requested %d"), ssize, size);
+ glibtop_error_r (server, _("got %d bytes but requested %d"), ssize, size);
if (read (server->input [0], buf, size) < 0)
- glibtop_error__r (server, _("read %d bytes: %s"), size, strerror (errno));
+ glibtop_error_r (server, _("read %d bytes: %s"), size, strerror (errno));
}
diff --git a/lib/read_data.c b/lib/read_data.c
index 20e0b0e0..d11b28d9 100644
--- a/lib/read_data.c
+++ b/lib/read_data.c
@@ -25,23 +25,23 @@
/* Reads some data from server. */
void *
-glibtop_read_data__l (glibtop *server)
+glibtop_read_data_l (glibtop *server)
{
size_t size;
void *ptr;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
if (read (server->input [0], &size, sizeof (size_t)) < 0)
- glibtop_error__r (server, _("read data size: %s"),
+ glibtop_error_r (server, _("read data size: %s"),
strerror (errno));
if (!size) return NULL;
- ptr = glibtop_malloc__r (server, size);
+ ptr = glibtop_malloc_r (server, size);
if (read (server->input [0], ptr, size) < 0)
- glibtop_error__r (server, _("read data %d bytes: %s"),
+ glibtop_error_r (server, _("read data %d bytes: %s"),
size, strerror (errno));
return ptr;
diff --git a/lib/sem_limits.c b/lib/sem_limits.c
index 193b6f19..ca332d2c 100644
--- a/lib/sem_limits.c
+++ b/lib/sem_limits.c
@@ -25,14 +25,14 @@
/* Provides information about sysv ipc limits. */
void
-glibtop_get_sem_limits__l (glibtop *server, glibtop_sem_limits *buf)
+glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_SEM_LIMITS, 0);
if (server->features & GLIBTOP_SYSDEPS_SEM_LIMITS) {
- glibtop_call__l (server, GLIBTOP_CMND_SEM_LIMITS, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_SEM_LIMITS, 0, NULL,
sizeof (glibtop_sem_limits), buf);
} else {
- glibtop_get_sem_limits__r (server, buf);
+ glibtop_get_sem_limits_r (server, buf);
}
}
diff --git a/lib/shm_limits.c b/lib/shm_limits.c
index 8b226400..d59efdfc 100644
--- a/lib/shm_limits.c
+++ b/lib/shm_limits.c
@@ -25,14 +25,14 @@
/* Provides information about sysv ipc limits. */
void
-glibtop_get_shm_limits__l (glibtop *server, glibtop_shm_limits *buf)
+glibtop_get_shm_limits_l (glibtop *server, glibtop_shm_limits *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_SHM_LIMITS, 0);
if (server->features & GLIBTOP_SYSDEPS_SHM_LIMITS) {
- glibtop_call__l (server, GLIBTOP_CMND_SHM_LIMITS, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_SHM_LIMITS, 0, NULL,
sizeof (glibtop_shm_limits), buf);
} else {
- glibtop_get_shm_limits__r (server, buf);
+ glibtop_get_shm_limits_r (server, buf);
}
}
diff --git a/lib/swap.c b/lib/swap.c
index f6d7aeae..8e5d33b7 100644
--- a/lib/swap.c
+++ b/lib/swap.c
@@ -25,14 +25,14 @@
/* Provides information about swap usage. */
void
-glibtop_get_swap__l (glibtop *server, glibtop_swap *buf)
+glibtop_get_swap_l (glibtop *server, glibtop_swap *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_SWAP, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_SWAP, 0);
if (server->features & GLIBTOP_SYSDEPS_SWAP) {
- glibtop_call__l (server, GLIBTOP_CMND_SWAP, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_SWAP, 0, NULL,
sizeof (glibtop_swap), buf);
} else {
- glibtop_get_swap__r (server, buf);
+ glibtop_get_swap_r (server, buf);
}
}
diff --git a/lib/uptime.c b/lib/uptime.c
index a6ce1195..1dcf8ae0 100644
--- a/lib/uptime.c
+++ b/lib/uptime.c
@@ -26,14 +26,14 @@
/* Provides uptime and idle time. */
void
-glibtop_get_uptime__l (glibtop *server, glibtop_uptime *buf)
+glibtop_get_uptime_l (glibtop *server, glibtop_uptime *buf)
{
- glibtop_init__r (&server, GLIBTOP_SYSDEPS_UPTIME, 0);
+ glibtop_init_r (&server, GLIBTOP_SYSDEPS_UPTIME, 0);
if (server->features & GLIBTOP_SYSDEPS_UPTIME) {
- glibtop_call__l (server, GLIBTOP_CMND_UPTIME, 0, NULL,
+ glibtop_call_l (server, GLIBTOP_CMND_UPTIME, 0, NULL,
sizeof (glibtop_uptime), buf);
} else {
- glibtop_get_uptime__r (server, buf);
+ glibtop_get_uptime_r (server, buf);
}
}
diff --git a/lib/write.c b/lib/write.c
index e7913ef0..ac03ecae 100644
--- a/lib/write.c
+++ b/lib/write.c
@@ -24,15 +24,15 @@
/* Writes some data to server. */
void
-glibtop_write__l (glibtop *server, size_t size, void *buf)
+glibtop_write_l (glibtop *server, size_t size, void *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
if (write (server->output [1], &size, sizeof (size_t)) < 0)
- glibtop_error__r (server, _("write size: %s"), strerror (errno));
+ glibtop_error_r (server, _("write size: %s"), strerror (errno));
if (!size) return;
if (write (server->output [1], buf, size) < 0)
- glibtop_error__r (server, _("write %d bytes: %s"), size, strerror (errno));
+ glibtop_error_r (server, _("write %d bytes: %s"), size, strerror (errno));
}
diff --git a/src/proxy/main.c b/src/proxy/main.c
index 361d924b..a71df0a2 100644
--- a/src/proxy/main.c
+++ b/src/proxy/main.c
@@ -55,7 +55,7 @@ main(int argc, char *argv[])
glibtop_version ();
- glibtop_open__l (&server, argv [0], 0, GLIBTOP_OPEN_NO_OVERRIDE);
+ glibtop_open_l (&server, argv [0], 0, GLIBTOP_OPEN_NO_OVERRIDE);
/* close all file descriptors except ones used by the pipes (0 and 1). */
max_fd = GET_MAX_FDS();
@@ -122,58 +122,58 @@ main(int argc, char *argv[])
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_CPU:
- glibtop_get_cpu__l (&server, &data.cpu);
+ glibtop_get_cpu_l (&server, &data.cpu);
glibtop_output (sizeof (glibtop_cpu), &data.cpu);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_MEM:
- glibtop_get_mem__l (&server, &data.mem);
+ glibtop_get_mem_l (&server, &data.mem);
glibtop_output (sizeof (glibtop_mem), &data.mem);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_SWAP:
- glibtop_get_swap__l (&server, &data.swap);
+ glibtop_get_swap_l (&server, &data.swap);
glibtop_output (sizeof (glibtop_swap), &data.swap);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_UPTIME:
- glibtop_get_uptime__l (&server, &data.uptime);
+ glibtop_get_uptime_l (&server, &data.uptime);
glibtop_output (sizeof (glibtop_uptime), &data.uptime);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_LOADAVG:
- glibtop_get_loadavg__l (&server, &data.loadavg);
+ glibtop_get_loadavg_l (&server, &data.loadavg);
glibtop_output (sizeof (glibtop_loadavg), &data.loadavg);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_SHM_LIMITS:
- glibtop_get_shm_limits__l (&server, &data.shm_limits);
+ glibtop_get_shm_limits_l (&server, &data.shm_limits);
glibtop_output (sizeof (glibtop_shm_limits),
&data.shm_limits);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_MSG_LIMITS:
- glibtop_get_msg_limits__l (&server, &data.msg_limits);
+ glibtop_get_msg_limits_l (&server, &data.msg_limits);
glibtop_output (sizeof (glibtop_msg_limits),
&data.msg_limits);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_SEM_LIMITS:
- glibtop_get_sem_limits__l (&server, &data.sem_limits);
+ glibtop_get_sem_limits_l (&server, &data.sem_limits);
glibtop_output (sizeof (glibtop_sem_limits),
&data.sem_limits);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_PROCLIST:
- ptr = glibtop_get_proclist__l (&server, &data.proclist);
+ ptr = glibtop_get_proclist_l (&server, &data.proclist);
glibtop_output (sizeof (glibtop_proclist),
&data.proclist);
glibtop_output (data.proclist.total, ptr);
- glibtop_free__r (&server, ptr);
+ glibtop_free_r (&server, ptr);
break;
case GLIBTOP_CMND_PROC_STATE:
memcpy (&pid, parameter, sizeof (pid_t));
- glibtop_get_proc_state__l
+ glibtop_get_proc_state_l
(&server, &data.proc_state, pid);
glibtop_output (sizeof (glibtop_proc_state),
&data.proc_state);
@@ -181,7 +181,7 @@ main(int argc, char *argv[])
break;
case GLIBTOP_CMND_PROC_UID:
memcpy (&pid, parameter, sizeof (pid_t));
- glibtop_get_proc_uid__l
+ glibtop_get_proc_uid_l
(&server, &data.proc_uid, pid);
glibtop_output (sizeof (glibtop_proc_uid),
&data.proc_uid);
@@ -189,7 +189,7 @@ main(int argc, char *argv[])
break;
case GLIBTOP_CMND_PROC_MEM:
memcpy (&pid, parameter, sizeof (pid_t));
- glibtop_get_proc_mem__l
+ glibtop_get_proc_mem_l
(&server, &data.proc_mem, pid);
glibtop_output (sizeof (glibtop_proc_mem),
&data.proc_mem);
@@ -197,7 +197,7 @@ main(int argc, char *argv[])
break;
case GLIBTOP_CMND_PROC_TIME:
memcpy (&pid, parameter, sizeof (pid_t));
- glibtop_get_proc_time__l
+ glibtop_get_proc_time_l
(&server, &data.proc_time, pid);
glibtop_output (sizeof (glibtop_proc_time),
&data.proc_time);
@@ -205,7 +205,7 @@ main(int argc, char *argv[])
break;
case GLIBTOP_CMND_PROC_SIGNAL:
memcpy (&pid, parameter, sizeof (pid_t));
- glibtop_get_proc_signal__l
+ glibtop_get_proc_signal_l
(&server, &data.proc_signal, pid);
glibtop_output (sizeof (glibtop_proc_signal),
&data.proc_signal);
@@ -213,7 +213,7 @@ main(int argc, char *argv[])
break;
case GLIBTOP_CMND_PROC_KERNEL:
memcpy (&pid, parameter, sizeof (pid_t));
- glibtop_get_proc_kernel__l
+ glibtop_get_proc_kernel_l
(&server, &data.proc_kernel, pid);
glibtop_output (sizeof (glibtop_proc_kernel),
&data.proc_kernel);
@@ -221,7 +221,7 @@ main(int argc, char *argv[])
break;
case GLIBTOP_CMND_PROC_SEGMENT:
memcpy (&pid, parameter, sizeof (pid_t));
- glibtop_get_proc_segment__l
+ glibtop_get_proc_segment_l
(&server, &data.proc_segment, pid);
glibtop_output (sizeof (glibtop_proc_segment),
&data.proc_segment);
diff --git a/src/server/main.c b/src/server/main.c
index f9afd7c7..a248c862 100644
--- a/src/server/main.c
+++ b/src/server/main.c
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
setreuid (uid, euid); setregid (gid, egid);
- glibtop_open__r (&server, argv [0], 0, 0);
+ glibtop_open_r (&server, argv [0], 0, 0);
if (setreuid (euid, uid)) _exit (1);
@@ -148,42 +148,42 @@ int main(int argc, char *argv[])
break;
case GLIBTOP_CMND_CPU:
#if GLIBTOP_SUID_CPU
- glibtop_get_cpu__p (&server, &data.cpu);
+ glibtop_get_cpu_p (&server, &data.cpu);
#endif
glibtop_output (sizeof (glibtop_cpu), &data.cpu);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_MEM:
#if GLIBTOP_SUID_MEM
- glibtop_get_mem__p (&server, &data.mem);
+ glibtop_get_mem_p (&server, &data.mem);
#endif
glibtop_output (sizeof (glibtop_mem), &data.mem);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_SWAP:
#if GLIBTOP_SUID_SWAP
- glibtop_get_swap__p (&server, &data.swap);
+ glibtop_get_swap_p (&server, &data.swap);
#endif
glibtop_output (sizeof (glibtop_swap), &data.swap);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_UPTIME:
#if GLIBTOP_SUID_UPTIME
- glibtop_get_uptime__p (&server, &data.uptime);
+ glibtop_get_uptime_p (&server, &data.uptime);
#endif
glibtop_output (sizeof (glibtop_uptime), &data.uptime);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_LOADAVG:
#if GLIBTOP_SUID_LOADAVG
- glibtop_get_loadavg__p (&server, &data.loadavg);
+ glibtop_get_loadavg_p (&server, &data.loadavg);
#endif
glibtop_output (sizeof (glibtop_loadavg), &data.loadavg);
glibtop_output (0, NULL);
break;
case GLIBTOP_CMND_SHM_LIMITS:
#if GLIBTOP_SUID_SHM_LIMITS
- glibtop_get_shm_limits__p (&server, &data.shm_limits);
+ glibtop_get_shm_limits_p (&server, &data.shm_limits);
#endif
glibtop_output (sizeof (glibtop_shm_limits),
&data.shm_limits);
@@ -191,7 +191,7 @@ int main(int argc, char *argv[])
break;
case GLIBTOP_CMND_MSG_LIMITS:
#if GLIBTOP_SUID_MSG_LIMITS
- glibtop_get_msg_limits__p (&server, &data.msg_limits);
+ glibtop_get_msg_limits_p (&server, &data.msg_limits);
#endif
glibtop_output (sizeof (glibtop_msg_limits),
&data.msg_limits);
@@ -199,7 +199,7 @@ int main(int argc, char *argv[])
break;
case GLIBTOP_CMND_SEM_LIMITS:
#if GLIBTOP_SUID_SEM_LIMITS
- glibtop_get_sem_limits__p (&server, &data.sem_limits);
+ glibtop_get_sem_limits_p (&server, &data.sem_limits);
#endif
glibtop_output (sizeof (glibtop_sem_limits),
&data.sem_limits);
@@ -207,19 +207,19 @@ int main(int argc, char *argv[])
break;
case GLIBTOP_CMND_PROCLIST:
#if GLIBTOP_SUID_PROCLIST
- ptr = glibtop_get_proclist__p (&server, &data.proclist);
+ ptr = glibtop_get_proclist_p (&server, &data.proclist);
#else
ptr = NULL;
#endif
glibtop_output (sizeof (glibtop_proclist),
&data.proclist);
glibtop_output (data.proclist.total, ptr);
- glibtop_free__r (&server, ptr);
+ glibtop_free_r (&server, ptr);
break;
case GLIBTOP_CMND_PROC_STATE:
memcpy (&pid, parameter, sizeof (pid_t));
#if GLIBTOP_SUID_PROC_STATE
- glibtop_get_proc_state__p
+ glibtop_get_proc_state_p
(&server, &data.proc_state, pid);
#endif
glibtop_output (sizeof (glibtop_proc_state),
@@ -229,7 +229,7 @@ int main(int argc, char *argv[])
case GLIBTOP_CMND_PROC_UID:
memcpy (&pid, parameter, sizeof (pid_t));
#if GLIBTOP_SUID_PROC_UID
- glibtop_get_proc_uid__p
+ glibtop_get_proc_uid_p
(&server, &data.proc_uid, pid);
#endif
glibtop_output (sizeof (glibtop_proc_uid),
@@ -239,7 +239,7 @@ int main(int argc, char *argv[])
case GLIBTOP_CMND_PROC_MEM:
memcpy (&pid, parameter, sizeof (pid_t));
#if GLIBTOP_SUID_PROC_MEM
- glibtop_get_proc_mem__p
+ glibtop_get_proc_mem_p
(&server, &data.proc_mem, pid);
#endif
glibtop_output (sizeof (glibtop_proc_mem),
@@ -249,7 +249,7 @@ int main(int argc, char *argv[])
case GLIBTOP_CMND_PROC_TIME:
memcpy (&pid, parameter, sizeof (pid_t));
#if GLIBTOP_SUID_PROC_TIME
- glibtop_get_proc_time__p
+ glibtop_get_proc_time_p
(&server, &data.proc_time, pid);
#endif
glibtop_output (sizeof (glibtop_proc_time),
@@ -259,7 +259,7 @@ int main(int argc, char *argv[])
case GLIBTOP_CMND_PROC_SIGNAL:
memcpy (&pid, parameter, sizeof (pid_t));
#if GLIBTOP_SUID_PROC_SIGNAL
- glibtop_get_proc_signal__p
+ glibtop_get_proc_signal_p
(&server, &data.proc_signal, pid);
#endif
glibtop_output (sizeof (glibtop_proc_signal),
@@ -269,7 +269,7 @@ int main(int argc, char *argv[])
case GLIBTOP_CMND_PROC_KERNEL:
memcpy (&pid, parameter, sizeof (pid_t));
#if GLIBTOP_SUID_PROC_KERNEL
- glibtop_get_proc_kernel__p
+ glibtop_get_proc_kernel_p
(&server, &data.proc_kernel, pid);
#endif
glibtop_output (sizeof (glibtop_proc_kernel),
@@ -279,7 +279,7 @@ int main(int argc, char *argv[])
case GLIBTOP_CMND_PROC_SEGMENT:
memcpy (&pid, parameter, sizeof (pid_t));
#if GLIBTOP_SUID_PROC_SEGMENT
- glibtop_get_proc_segment__p
+ glibtop_get_proc_segment_p
(&server, &data.proc_segment, pid);
#endif
glibtop_output (sizeof (glibtop_proc_segment),
diff --git a/sysdeps/common/error.c b/sysdeps/common/error.c
index 6f1f1963..2424d11c 100644
--- a/sysdeps/common/error.c
+++ b/sysdeps/common/error.c
@@ -24,7 +24,7 @@
/* Prints error message and exits. */
void
-glibtop_error__r (glibtop *server, char *format, ...)
+glibtop_error_r (glibtop *server, char *format, ...)
{
va_list ap;
diff --git a/sysdeps/common/sysdeps.c b/sysdeps/common/sysdeps.c
index 883097e5..93767226 100644
--- a/sysdeps/common/sysdeps.c
+++ b/sysdeps/common/sysdeps.c
@@ -44,7 +44,7 @@ BIT_MASK(GLIBTOP_SUID_PROC_SEGMENT);
/* Checks which features are implemented. */
void
-glibtop_get_sysdeps__r (glibtop *server, glibtop_sysdeps *buf)
+glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf)
{
glibtop_union data;
@@ -55,48 +55,48 @@ glibtop_get_sysdeps__r (glibtop *server, glibtop_sysdeps *buf)
/* Call all system dependent functions to check which values
* they return. */
- glibtop_get_cpu__r (server, &data.cpu);
+ glibtop_get_cpu_r (server, &data.cpu);
buf->cpu = data.cpu.flags;
- glibtop_get_mem__r (server, &data.mem);
+ glibtop_get_mem_r (server, &data.mem);
buf->mem = data.mem.flags;
- glibtop_get_swap__r (server, &data.swap);
+ glibtop_get_swap_r (server, &data.swap);
buf->swap = data.swap.flags;
- glibtop_get_uptime__r (server, &data.uptime);
+ glibtop_get_uptime_r (server, &data.uptime);
buf->uptime = data.uptime.flags;
- glibtop_get_loadavg__r (server, &data.loadavg);
+ glibtop_get_loadavg_r (server, &data.loadavg);
buf->loadavg = data.loadavg.flags;
- glibtop_get_shm_limits__r (server, &data.shm_limits);
+ glibtop_get_shm_limits_r (server, &data.shm_limits);
buf->shm_limits = data.shm_limits.flags;
- glibtop_get_msg_limits__r (server, &data.msg_limits);
+ glibtop_get_msg_limits_r (server, &data.msg_limits);
buf->msg_limits = data.msg_limits.flags;
- glibtop_get_sem_limits__r (server, &data.sem_limits);
+ glibtop_get_sem_limits_r (server, &data.sem_limits);
buf->sem_limits = data.sem_limits.flags;
- glibtop_get_proclist__r (server, &data.proclist);
+ glibtop_get_proclist_r (server, &data.proclist);
buf->proclist = data.proclist.flags;
- glibtop_get_proc_state__r (server, &data.proc_state, 0);
+ glibtop_get_proc_state_r (server, &data.proc_state, 0);
buf->proc_state = data.proc_state.flags;
- glibtop_get_proc_uid__r (server, &data.proc_uid, 0);
+ glibtop_get_proc_uid_r (server, &data.proc_uid, 0);
buf->proc_uid = data.proc_uid.flags;
- glibtop_get_proc_mem__r (server, &data.proc_mem, 0);
+ glibtop_get_proc_mem_r (server, &data.proc_mem, 0);
buf->proc_mem = data.proc_mem.flags;
- glibtop_get_proc_time__r (server, &data.proc_time, 0);
+ glibtop_get_proc_time_r (server, &data.proc_time, 0);
buf->proc_time = data.proc_time.flags;
- glibtop_get_proc_kernel__r (server, &data.proc_kernel, 0);
+ glibtop_get_proc_kernel_r (server, &data.proc_kernel, 0);
buf->proc_kernel = data.proc_kernel.flags;
- glibtop_get_proc_segment__r (server, &data.proc_segment, 0);
+ glibtop_get_proc_segment_r (server, &data.proc_segment, 0);
buf->proc_segment = data.proc_segment.flags;
}
diff --git a/sysdeps/common/xmalloc.c b/sysdeps/common/xmalloc.c
index 66458a18..fec5b99f 100644
--- a/sysdeps/common/xmalloc.c
+++ b/sysdeps/common/xmalloc.c
@@ -24,43 +24,43 @@
/* Wrappers to malloc, calloc, realloc ... */
void *
-glibtop_malloc__r (glibtop *server, size_t size)
+glibtop_malloc_r (glibtop *server, size_t size)
{
void *buf = malloc (size);
if (!buf)
- glibtop_error__r (server, _("malloc %d bytes: %s"),
+ glibtop_error_r (server, _("malloc %d bytes: %s"),
size, strerror (errno));
return buf;
}
void *
-glibtop_calloc__r (glibtop *server, size_t nmemb, size_t size)
+glibtop_calloc_r (glibtop *server, size_t nmemb, size_t size)
{
void *buf = calloc (nmemb, size);
if (!buf)
- glibtop_error__r (server, _("calloc %d block (%d bytes each): %s"),
+ glibtop_error_r (server, _("calloc %d block (%d bytes each): %s"),
nmemb, size, strerror (errno));
return buf;
}
void *
-glibtop_realloc__r (glibtop *server, void *ptr, size_t size)
+glibtop_realloc_r (glibtop *server, void *ptr, size_t size)
{
void *buf = realloc (ptr, size);
if (!buf)
- glibtop_error__r (server, _("realloc %d bytes: %s"),
+ glibtop_error_r (server, _("realloc %d bytes: %s"),
size, strerror (errno));
return buf;
}
void
-glibtop_free__r (glibtop *server, void *ptr)
+glibtop_free_r (glibtop *server, void *ptr)
{
if (ptr) free (ptr);
}
diff --git a/sysdeps/linux/close.c b/sysdeps/linux/close.c
index ff7ebea4..02f2e5b3 100644
--- a/sysdeps/linux/close.c
+++ b/sysdeps/linux/close.c
@@ -24,5 +24,5 @@
/* Closes pipe to gtop server. */
void
-glibtop_close (glibtop *server)
+glibtop_close_l (glibtop *server)
{ }
diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c
index 804d29e9..058f3586 100644
--- a/sysdeps/linux/cpu.c
+++ b/sysdeps/linux/cpu.c
@@ -30,11 +30,11 @@ static const unsigned long _glibtop_sysdeps_cpu =
/* Provides information about cpu usage. */
void
-glibtop_get_cpu__s (glibtop *server, glibtop_cpu *buf)
+glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_cpu));
diff --git a/sysdeps/linux/init.c b/sysdeps/linux/init.c
index e39cfd29..f491070f 100644
--- a/sysdeps/linux/init.c
+++ b/sysdeps/linux/init.c
@@ -26,15 +26,17 @@ static glibtop _glibtop_global_server;
glibtop *glibtop_global_server = NULL;
glibtop *
-glibtop_init__r (glibtop **server, const unsigned long features,
+glibtop_init_r (glibtop **server, const unsigned long features,
const unsigned flags)
{
if (*server != NULL)
return *server;
+ fprintf (stderr, "DEBUG: %s (%d)\n", __FILE__, __LINE__);
+
if (glibtop_global_server == NULL) {
glibtop_global_server = &_glibtop_global_server;
- glibtop_open__r (glibtop_global_server, "glibtop",
+ glibtop_open_r (glibtop_global_server, "glibtop",
features, flags);
}
diff --git a/sysdeps/linux/loadavg.c b/sysdeps/linux/loadavg.c
index d497a065..fbfa310f 100644
--- a/sysdeps/linux/loadavg.c
+++ b/sysdeps/linux/loadavg.c
@@ -28,11 +28,11 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Provides load load averange. */
void
-glibtop_get_loadavg__s (glibtop *server, glibtop_loadavg *buf)
+glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_loadavg));
diff --git a/sysdeps/linux/mem.c b/sysdeps/linux/mem.c
index c7d78b1e..937a6c81 100644
--- a/sysdeps/linux/mem.c
+++ b/sysdeps/linux/mem.c
@@ -31,11 +31,11 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Provides information about memory usage. */
void
-glibtop_get_mem__s (glibtop *server, glibtop_mem *buf)
+glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_mem));
diff --git a/sysdeps/linux/msg_limits.c b/sysdeps/linux/msg_limits.c
index 6a1be74e..8b0e6fdc 100644
--- a/sysdeps/linux/msg_limits.c
+++ b/sysdeps/linux/msg_limits.c
@@ -33,11 +33,11 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Provides information about sysv ipc limits. */
void
-glibtop_get_msg_limits__s (glibtop *server, glibtop_msg_limits *buf)
+glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
{
struct msginfo msginfo;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_msg_limits));
diff --git a/sysdeps/linux/open.c b/sysdeps/linux/open.c
index 2c89a579..69f00051 100644
--- a/sysdeps/linux/open.c
+++ b/sysdeps/linux/open.c
@@ -51,7 +51,7 @@ static void set_linux_version(void) {
/* Opens pipe to gtop server. Returns 0 on success and -1 on error. */
void
-glibtop_open__r (glibtop *server, const char *program_name,
+glibtop_open_r (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags)
{
memset (server, 0, sizeof (glibtop));
diff --git a/sysdeps/linux/procdata.c b/sysdeps/linux/procdata.c
index 5e2bd856..9226b7e0 100644
--- a/sysdeps/linux/procdata.c
+++ b/sysdeps/linux/procdata.c
@@ -78,14 +78,14 @@ BIT_SHIFT(GLIBTOP_PROCDATA_WCHAN);
/* Provides detailed information about a process. */
void
-glibtop_get_procdata__s (glibtop *server, glibtop_procdata *buf, pid_t pid)
+glibtop_get_procdata_s (glibtop *server, glibtop_procdata *buf, pid_t pid)
{
char input [BUFSIZ], *tmp;
struct stat statb;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_procdata));
diff --git a/sysdeps/linux/prockernel.c b/sysdeps/linux/prockernel.c
index dbd1dcb1..13e56b62 100644
--- a/sysdeps/linux/prockernel.c
+++ b/sysdeps/linux/prockernel.c
@@ -31,13 +31,13 @@ static const unsigned long _glibtop_sysdeps_proc_kernel =
/* Provides detailed information about a process. */
void
-glibtop_get_proc_kernel__s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid)
+glibtop_get_proc_kernel_s (glibtop *server, glibtop_proc_kernel *buf, pid_t pid)
{
char input [BUFSIZ], *tmp;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_kernel));
diff --git a/sysdeps/linux/proclist.c b/sysdeps/linux/proclist.c
index e23ccbfe..4581cadc 100644
--- a/sysdeps/linux/proclist.c
+++ b/sysdeps/linux/proclist.c
@@ -49,7 +49,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
* On error, NULL is returned and buf->flags is zero. */
unsigned *
-glibtop_get_proclist__s (glibtop *server, glibtop_proclist *buf)
+glibtop_get_proclist_s (glibtop *server, glibtop_proclist *buf)
{
DIR *proc;
struct dirent *entry;
@@ -60,7 +60,7 @@ glibtop_get_proclist__s (glibtop *server, glibtop_proclist *buf)
struct stat statb;
int len, i, ok;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proclist));
@@ -101,7 +101,7 @@ glibtop_get_proclist__s (glibtop *server, glibtop_proclist *buf)
new_size = pids_size + BLOCK_SIZE;
- pids_chain = glibtop_realloc__r (server, pids_chain, new_size);
+ pids_chain = glibtop_realloc_r (server, pids_chain, new_size);
memcpy (pids_chain + pids_offset, pids, BLOCK_SIZE);
@@ -133,7 +133,7 @@ glibtop_get_proclist__s (glibtop *server, glibtop_proclist *buf)
new_size = pids_size + count * sizeof (unsigned);
- pids_chain = glibtop_realloc__r (server, pids_chain, new_size);
+ pids_chain = glibtop_realloc_r (server, pids_chain, new_size);
memcpy (pids_chain + pids_offset, pids, count * sizeof (unsigned));
diff --git a/sysdeps/linux/procmem.c b/sysdeps/linux/procmem.c
index fb5db2b1..22e0c128 100644
--- a/sysdeps/linux/procmem.c
+++ b/sysdeps/linux/procmem.c
@@ -30,13 +30,13 @@ static const unsigned long _glibtop_sysdeps_proc_mem =
/* Provides detailed information about a process. */
void
-glibtop_get_proc_mem__s (glibtop *server, glibtop_proc_mem *buf, pid_t pid)
+glibtop_get_proc_mem_s (glibtop *server, glibtop_proc_mem *buf, pid_t pid)
{
char input [BUFSIZ], *tmp;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_mem));
diff --git a/sysdeps/linux/procsegment.c b/sysdeps/linux/procsegment.c
index 1ed83167..d5ce5652 100644
--- a/sysdeps/linux/procsegment.c
+++ b/sysdeps/linux/procsegment.c
@@ -31,14 +31,14 @@ static const unsigned long _glibtop_sysdeps_proc_segment =
/* Provides detailed information about a process. */
void
-glibtop_get_proc_segment__s (glibtop *server, glibtop_proc_segment *buf,
+glibtop_get_proc_segment_s (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
char input [BUFSIZ], *tmp;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_segment));
diff --git a/sysdeps/linux/procsignal.c b/sysdeps/linux/procsignal.c
index 09754f62..6cd51788 100644
--- a/sysdeps/linux/procsignal.c
+++ b/sysdeps/linux/procsignal.c
@@ -29,13 +29,13 @@ static const unsigned long _glibtop_sysdeps_proc_signal =
/* Provides detailed information about a process. */
void
-glibtop_get_proc_signal__s (glibtop *server, glibtop_proc_signal *buf, pid_t pid)
+glibtop_get_proc_signal_s (glibtop *server, glibtop_proc_signal *buf, pid_t pid)
{
char input [BUFSIZ], *tmp;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_signal));
diff --git a/sysdeps/linux/procstate.c b/sysdeps/linux/procstate.c
index 91af0b4c..48d83209 100644
--- a/sysdeps/linux/procstate.c
+++ b/sysdeps/linux/procstate.c
@@ -31,14 +31,14 @@ static const unsigned long _glibtop_sysdeps_proc_state =
/* Provides detailed information about a process. */
void
-glibtop_get_proc_state__s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
+glibtop_get_proc_state_s (glibtop *server, glibtop_proc_state *buf, pid_t pid)
{
char input [BUFSIZ], *tmp;
struct stat statb;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_state));
diff --git a/sysdeps/linux/proctime.c b/sysdeps/linux/proctime.c
index 9d63a8a2..7393215a 100644
--- a/sysdeps/linux/proctime.c
+++ b/sysdeps/linux/proctime.c
@@ -31,13 +31,13 @@ static const unsigned long _glibtop_sysdeps_proc_time =
/* Provides detailed information about a process. */
void
-glibtop_get_proc_time__s (glibtop *server, glibtop_proc_time *buf, pid_t pid)
+glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid)
{
char input [BUFSIZ], *tmp;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_time));
diff --git a/sysdeps/linux/procuid.c b/sysdeps/linux/procuid.c
index 3820f7fd..783589a1 100644
--- a/sysdeps/linux/procuid.c
+++ b/sysdeps/linux/procuid.c
@@ -35,13 +35,13 @@ static const unsigned long _glibtop_sysdeps_proc_uid =
/* Provides detailed information about a process. */
void
-glibtop_get_proc_uid__s (glibtop *server, glibtop_proc_uid *buf, pid_t pid)
+glibtop_get_proc_uid_s (glibtop *server, glibtop_proc_uid *buf, pid_t pid)
{
char input [BUFSIZ], *tmp;
int nread;
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_uid));
diff --git a/sysdeps/linux/sem_limits.c b/sysdeps/linux/sem_limits.c
index 6b64c153..88176f0b 100644
--- a/sysdeps/linux/sem_limits.c
+++ b/sysdeps/linux/sem_limits.c
@@ -34,12 +34,12 @@ static unsigned long _glibtop_sysdeps_sem_limits =
/* Provides information about sysv ipc limits. */
void
-glibtop_get_sem_limits__s (glibtop *server, glibtop_sem_limits *buf)
+glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
{
struct seminfo seminfo;
union semun arg;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_sem_limits));
diff --git a/sysdeps/linux/shm_limits.c b/sysdeps/linux/shm_limits.c
index 78f823c7..2849b22d 100644
--- a/sysdeps/linux/shm_limits.c
+++ b/sysdeps/linux/shm_limits.c
@@ -32,11 +32,11 @@ static unsigned long _glibtop_sysdeps_shm_limits =
/* Provides information about sysv ipc limits. */
void
-glibtop_get_shm_limits__s (glibtop *server, glibtop_shm_limits *buf)
+glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
{
struct shminfo shminfo;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_shm_limits));
diff --git a/sysdeps/linux/swap.c b/sysdeps/linux/swap.c
index 1439e5d1..73ee5000 100644
--- a/sysdeps/linux/swap.c
+++ b/sysdeps/linux/swap.c
@@ -29,11 +29,11 @@ static unsigned long _glibtop_sysdeps_swap =
/* Provides information about swap usage. */
void
-glibtop_get_swap__s (glibtop *server, glibtop_swap *buf)
+glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_swap));
diff --git a/sysdeps/linux/uptime.c b/sysdeps/linux/uptime.c
index 8c3e3da0..26dd355b 100644
--- a/sysdeps/linux/uptime.c
+++ b/sysdeps/linux/uptime.c
@@ -28,11 +28,11 @@ static unsigned long _glibtop_sysdeps_uptime =
/* Provides uptime and idle time. */
void
-glibtop_get_uptime__s (glibtop *server, glibtop_uptime *buf)
+glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
{
FILE *f;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_uptime));
diff --git a/sysdeps/osf1/cpu.c b/sysdeps/osf1/cpu.c
index 0a6af83b..9cf71117 100644
--- a/sysdeps/osf1/cpu.c
+++ b/sysdeps/osf1/cpu.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_cpu =
/* Provides information about cpu usage. */
void
-glibtop_get_cpu__s (glibtop *server, glibtop_cpu *buf)
+glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf)
{
struct tbl_sysinfo sysinfo;
int ret;
diff --git a/sysdeps/osf1/init.c b/sysdeps/osf1/init.c
index f6a9a506..43f7469c 100644
--- a/sysdeps/osf1/init.c
+++ b/sysdeps/osf1/init.c
@@ -26,7 +26,7 @@ static glibtop _glibtop_global_server;
glibtop *glibtop_global_server = NULL;
glibtop *
-glibtop_init__r (glibtop **server)
+glibtop_init_r (glibtop **server)
{
if (*server != NULL)
return *server;
diff --git a/sysdeps/osf1/loadavg.c b/sysdeps/osf1/loadavg.c
index d80126ba..c7d4dab0 100644
--- a/sysdeps/osf1/loadavg.c
+++ b/sysdeps/osf1/loadavg.c
@@ -29,7 +29,7 @@ static const unsigned long _glibtop_sysdeps_loadavg =
/* Provides load averange. */
void
-glibtop_get_loadavg__s (glibtop *server, glibtop_loadavg *buf)
+glibtop_get_loadavg_s (glibtop *server, glibtop_loadavg *buf)
{
struct tbl_loadavg loadavg;
int ret;
diff --git a/sysdeps/osf1/mem.c b/sysdeps/osf1/mem.c
index f3682802..83045519 100644
--- a/sysdeps/osf1/mem.c
+++ b/sysdeps/osf1/mem.c
@@ -36,7 +36,7 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Provides information about memory usage. */
void
-glibtop_get_mem__s (glibtop *server, glibtop_mem *buf)
+glibtop_get_mem_s (glibtop *server, glibtop_mem *buf)
{
vm_statistics_data_t vmstats;
diff --git a/sysdeps/osf1/msg_limits.c b/sysdeps/osf1/msg_limits.c
index 3dbc558b..becadb49 100644
--- a/sysdeps/osf1/msg_limits.c
+++ b/sysdeps/osf1/msg_limits.c
@@ -31,7 +31,7 @@ static const unsigned long _glibtop_sysdeps_msg_limits =
/* Provides information about sysv ipc limits. */
void
-glibtop_get_msg_limits__s (glibtop *server, glibtop_msg_limits *buf)
+glibtop_get_msg_limits_s (glibtop *server, glibtop_msg_limits *buf)
{
int ret, value;
diff --git a/sysdeps/osf1/procdata.c b/sysdeps/osf1/procdata.c
index 4eb64d88..782b48d3 100644
--- a/sysdeps/osf1/procdata.c
+++ b/sysdeps/osf1/procdata.c
@@ -53,7 +53,7 @@ BIT_SHIFT(GLIBTOP_PROCDATA_NICE);
static const unsigned long _glibtop_sysdeps_procdata_1 = 0;
void
-glibtop_get_procdata__r (glibtop *server, glibtop_procdata *buf, pid_t pid)
+glibtop_get_procdata_r (glibtop *server, glibtop_procdata *buf, pid_t pid)
{
struct tbl_procinfo procinfo;
task_basic_info_data_t taskinfo;
diff --git a/sysdeps/osf1/prockernel.c b/sysdeps/osf1/prockernel.c
index 93f47bb1..bd04ca29 100644
--- a/sysdeps/osf1/prockernel.c
+++ b/sysdeps/osf1/prockernel.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_kernel__r (glibtop *server, glibtop_proc_kernel *buf,
+glibtop_get_proc_kernel_r (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_kernel));
diff --git a/sysdeps/osf1/proclist.c b/sysdeps/osf1/proclist.c
index 7659a9df..d8b0e48d 100644
--- a/sysdeps/osf1/proclist.c
+++ b/sysdeps/osf1/proclist.c
@@ -54,7 +54,7 @@ static const unsigned long _glibtop_sysdeps_proclist =
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
unsigned *
-glibtop_get_proclist__r (glibtop *server, glibtop_proclist *buf)
+glibtop_get_proclist_r (glibtop *server, glibtop_proclist *buf)
{
unsigned count = 0, total = 0;
unsigned pids [BLOCK_COUNT], *pids_chain = NULL;
@@ -103,7 +103,7 @@ glibtop_get_proclist__r (glibtop *server, glibtop_proclist *buf)
new_size = pids_size + BLOCK_SIZE;
- pids_chain = glibtop_realloc__r (server, pids_chain, new_size);
+ pids_chain = glibtop_realloc_r (server, pids_chain, new_size);
memcpy (pids_chain + pids_offset, pids, BLOCK_SIZE);
@@ -133,7 +133,7 @@ glibtop_get_proclist__r (glibtop *server, glibtop_proclist *buf)
new_size = pids_size + count * sizeof (unsigned);
- pids_chain = glibtop_realloc__r (server, pids_chain, new_size);
+ pids_chain = glibtop_realloc_r (server, pids_chain, new_size);
memcpy (pids_chain + pids_offset, pids, count * sizeof (unsigned));
diff --git a/sysdeps/osf1/procmem.c b/sysdeps/osf1/procmem.c
index 889a4a20..bb1e4795 100644
--- a/sysdeps/osf1/procmem.c
+++ b/sysdeps/osf1/procmem.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_mem__r (glibtop *server, glibtop_proc_mem *buf,
+glibtop_get_proc_mem_r (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_mem));
diff --git a/sysdeps/osf1/procsegment.c b/sysdeps/osf1/procsegment.c
index c0ffeb17..21cd4814 100644
--- a/sysdeps/osf1/procsegment.c
+++ b/sysdeps/osf1/procsegment.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_segment__r (glibtop *server, glibtop_proc_segment *buf,
+glibtop_get_proc_segment_r (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_segment));
diff --git a/sysdeps/osf1/procsignal.c b/sysdeps/osf1/procsignal.c
index 6c30ee66..d4674f8f 100644
--- a/sysdeps/osf1/procsignal.c
+++ b/sysdeps/osf1/procsignal.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_signal__r (glibtop *server, glibtop_proc_signal *buf,
+glibtop_get_proc_signal_r (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_signal));
diff --git a/sysdeps/osf1/procstate.c b/sysdeps/osf1/procstate.c
index b8ad5cec..acf32c2e 100644
--- a/sysdeps/osf1/procstate.c
+++ b/sysdeps/osf1/procstate.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_state__r (glibtop *server, glibtop_proc_state *buf,
+glibtop_get_proc_state_r (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_state));
diff --git a/sysdeps/osf1/proctime.c b/sysdeps/osf1/proctime.c
index ec81d2a0..d2417173 100644
--- a/sysdeps/osf1/proctime.c
+++ b/sysdeps/osf1/proctime.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_time__r (glibtop *server, glibtop_proc_time *buf,
+glibtop_get_proc_time_r (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_time));
diff --git a/sysdeps/osf1/procuid.c b/sysdeps/osf1/procuid.c
index 8635e8d3..57b49d5f 100644
--- a/sysdeps/osf1/procuid.c
+++ b/sysdeps/osf1/procuid.c
@@ -39,7 +39,7 @@ static const unsigned long _glibtop_sysdeps_proc_uid =
(1 << GLIBTOP_PROC_UID_TTY) + (1 << GLIBTOP_PROC_UID_TPGID);
void
-glibtop_get_proc_uid__r (glibtop *server, glibtop_proc_uid *buf,
+glibtop_get_proc_uid_r (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
struct tbl_procinfo procinfo;
diff --git a/sysdeps/osf1/sem_limits.c b/sysdeps/osf1/sem_limits.c
index b4bebd48..820bb457 100644
--- a/sysdeps/osf1/sem_limits.c
+++ b/sysdeps/osf1/sem_limits.c
@@ -31,7 +31,7 @@ static unsigned long _glibtop_sysdeps_sem_limits =
/* Provides information about sysv sem limits. */
void
-glibtop_get_sem_limits__s (glibtop *server, glibtop_sem_limits *buf)
+glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf)
{
int ret, value;
diff --git a/sysdeps/osf1/shm_limits.c b/sysdeps/osf1/shm_limits.c
index 7f18869a..990d2cb4 100644
--- a/sysdeps/osf1/shm_limits.c
+++ b/sysdeps/osf1/shm_limits.c
@@ -30,7 +30,7 @@ static unsigned long _glibtop_sysdeps_shm_limits =
/* Provides information about sysv ipc limits. */
void
-glibtop_get_shm_limits__s (glibtop *server, glibtop_shm_limits *buf)
+glibtop_get_shm_limits_s (glibtop *server, glibtop_shm_limits *buf)
{
int ret, value;
diff --git a/sysdeps/osf1/swap.c b/sysdeps/osf1/swap.c
index a7b3f7cb..22143db1 100644
--- a/sysdeps/osf1/swap.c
+++ b/sysdeps/osf1/swap.c
@@ -30,7 +30,7 @@ static unsigned long _glibtop_sysdeps_swap =
/* Provides information about swap usage. */
void
-glibtop_get_swap__s (glibtop *server, glibtop_swap *buf)
+glibtop_get_swap_s (glibtop *server, glibtop_swap *buf)
{
struct tbl_swapinfo swapinfo;
int i;
diff --git a/sysdeps/osf1/uptime.c b/sysdeps/osf1/uptime.c
index 97776fbe..ea64f8c4 100644
--- a/sysdeps/osf1/uptime.c
+++ b/sysdeps/osf1/uptime.c
@@ -31,7 +31,7 @@ static unsigned long _glibtop_sysdeps_uptime =
/* Provides uptime and idle time. */
void
-glibtop_get_uptime__s (glibtop *server, glibtop_uptime *buf)
+glibtop_get_uptime_s (glibtop *server, glibtop_uptime *buf)
{
struct tbl_sysinfo sysinfo;
int ret;
diff --git a/sysdeps/stub/cpu.c b/sysdeps/stub/cpu.c
index cda12977..a7d31ad6 100644
--- a/sysdeps/stub/cpu.c
+++ b/sysdeps/stub/cpu.c
@@ -25,7 +25,7 @@
/* Provides information about cpu usage. */
void
-glibtop_get_cpu__r (glibtop *server, glibtop_cpu *buf)
+glibtop_get_cpu_r (glibtop *server, glibtop_cpu *buf)
{
memset (buf, 0, sizeof (glibtop_cpu));
}
diff --git a/sysdeps/stub/init.c b/sysdeps/stub/init.c
index f6a9a506..43f7469c 100644
--- a/sysdeps/stub/init.c
+++ b/sysdeps/stub/init.c
@@ -26,7 +26,7 @@ static glibtop _glibtop_global_server;
glibtop *glibtop_global_server = NULL;
glibtop *
-glibtop_init__r (glibtop **server)
+glibtop_init_r (glibtop **server)
{
if (*server != NULL)
return *server;
diff --git a/sysdeps/stub/loadavg.c b/sysdeps/stub/loadavg.c
index de6605e0..06365338 100644
--- a/sysdeps/stub/loadavg.c
+++ b/sysdeps/stub/loadavg.c
@@ -25,7 +25,7 @@
/* Provides load averange. */
void
-glibtop_get_loadavg__r (glibtop *server, glibtop_loadavg *buf)
+glibtop_get_loadavg_r (glibtop *server, glibtop_loadavg *buf)
{
memset (buf, 0, sizeof (glibtop_loadavg));
}
diff --git a/sysdeps/stub/mem.c b/sysdeps/stub/mem.c
index 0410e2dd..eb930453 100644
--- a/sysdeps/stub/mem.c
+++ b/sysdeps/stub/mem.c
@@ -25,7 +25,7 @@
/* Provides information about memory usage. */
void
-glibtop_get_mem__r (glibtop *server, glibtop_mem *buf)
+glibtop_get_mem_r (glibtop *server, glibtop_mem *buf)
{
memset (buf, 0, sizeof (glibtop_mem));
}
diff --git a/sysdeps/stub/msg_limits.c b/sysdeps/stub/msg_limits.c
index 62819042..f554a09e 100644
--- a/sysdeps/stub/msg_limits.c
+++ b/sysdeps/stub/msg_limits.c
@@ -24,7 +24,7 @@
/* Provides information about sysv ipc limits. */
void
-glibtop_get_msg_limits__r (glibtop *server, glibtop_msg_limits *buf)
+glibtop_get_msg_limits_r (glibtop *server, glibtop_msg_limits *buf)
{
memset (buf, 0, sizeof (glibtop_msg_limits));
}
diff --git a/sysdeps/stub/prockernel.c b/sysdeps/stub/prockernel.c
index 93f47bb1..bd04ca29 100644
--- a/sysdeps/stub/prockernel.c
+++ b/sysdeps/stub/prockernel.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_kernel__r (glibtop *server, glibtop_proc_kernel *buf,
+glibtop_get_proc_kernel_r (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_kernel));
diff --git a/sysdeps/stub/proclist.c b/sysdeps/stub/proclist.c
index f3e0b993..cd7cf2d1 100644
--- a/sysdeps/stub/proclist.c
+++ b/sysdeps/stub/proclist.c
@@ -32,7 +32,7 @@
* each buf->size big. The total size is stored in buf->total. */
unsigned *
-glibtop_get_proclist__r (glibtop *server, glibtop_proclist *buf)
+glibtop_get_proclist_r (glibtop *server, glibtop_proclist *buf)
{
memset (buf, 0, sizeof (glibtop_proclist));
return NULL;
diff --git a/sysdeps/stub/procmem.c b/sysdeps/stub/procmem.c
index 889a4a20..bb1e4795 100644
--- a/sysdeps/stub/procmem.c
+++ b/sysdeps/stub/procmem.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_mem__r (glibtop *server, glibtop_proc_mem *buf,
+glibtop_get_proc_mem_r (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_mem));
diff --git a/sysdeps/stub/procsegment.c b/sysdeps/stub/procsegment.c
index c0ffeb17..21cd4814 100644
--- a/sysdeps/stub/procsegment.c
+++ b/sysdeps/stub/procsegment.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_segment__r (glibtop *server, glibtop_proc_segment *buf,
+glibtop_get_proc_segment_r (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_segment));
diff --git a/sysdeps/stub/procsignal.c b/sysdeps/stub/procsignal.c
index 6c30ee66..d4674f8f 100644
--- a/sysdeps/stub/procsignal.c
+++ b/sysdeps/stub/procsignal.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_signal__r (glibtop *server, glibtop_proc_signal *buf,
+glibtop_get_proc_signal_r (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_signal));
diff --git a/sysdeps/stub/procstate.c b/sysdeps/stub/procstate.c
index b8ad5cec..acf32c2e 100644
--- a/sysdeps/stub/procstate.c
+++ b/sysdeps/stub/procstate.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_state__r (glibtop *server, glibtop_proc_state *buf,
+glibtop_get_proc_state_r (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_state));
diff --git a/sysdeps/stub/proctime.c b/sysdeps/stub/proctime.c
index ec81d2a0..d2417173 100644
--- a/sysdeps/stub/proctime.c
+++ b/sysdeps/stub/proctime.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_time__r (glibtop *server, glibtop_proc_time *buf,
+glibtop_get_proc_time_r (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_time));
diff --git a/sysdeps/stub/procuid.c b/sysdeps/stub/procuid.c
index 7fbb85fa..e3a7e741 100644
--- a/sysdeps/stub/procuid.c
+++ b/sysdeps/stub/procuid.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_uid__r (glibtop *server, glibtop_proc_uid *buf,
+glibtop_get_proc_uid_r (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
memset (buf, 0, sizeof (glibtop_proc_uid));
diff --git a/sysdeps/stub/sem_limits.c b/sysdeps/stub/sem_limits.c
index 3768408b..81676129 100644
--- a/sysdeps/stub/sem_limits.c
+++ b/sysdeps/stub/sem_limits.c
@@ -24,7 +24,7 @@
/* Provides information about sysv sem limits. */
void
-glibtop_get_sem_limits__r (glibtop *server, glibtop_sem_limits *buf)
+glibtop_get_sem_limits_r (glibtop *server, glibtop_sem_limits *buf)
{
memset (buf, 0, sizeof (glibtop_sem_limits));
}
diff --git a/sysdeps/stub/shm_limits.c b/sysdeps/stub/shm_limits.c
index 52e801ba..aa671129 100644
--- a/sysdeps/stub/shm_limits.c
+++ b/sysdeps/stub/shm_limits.c
@@ -24,7 +24,7 @@
/* Provides information about sysv ipc limits. */
void
-glibtop_get_shm_limits__r (glibtop *server, glibtop_shm_limits *buf)
+glibtop_get_shm_limits_r (glibtop *server, glibtop_shm_limits *buf)
{
memset (buf, 0, sizeof (glibtop_shm_limits));
}
diff --git a/sysdeps/stub/swap.c b/sysdeps/stub/swap.c
index 8e0d046b..c58f0e5b 100644
--- a/sysdeps/stub/swap.c
+++ b/sysdeps/stub/swap.c
@@ -25,7 +25,7 @@
/* Provides information about swap usage. */
void
-glibtop_get_swap__r (glibtop *server, glibtop_swap *buf)
+glibtop_get_swap_r (glibtop *server, glibtop_swap *buf)
{
memset (buf, 0, sizeof (glibtop_swap));
}
diff --git a/sysdeps/stub/uptime.c b/sysdeps/stub/uptime.c
index 5b9ea63f..0b33cca4 100644
--- a/sysdeps/stub/uptime.c
+++ b/sysdeps/stub/uptime.c
@@ -25,7 +25,7 @@
/* Provides uptime and idle time. */
void
-glibtop_get_uptime__r (glibtop *server, glibtop_uptime *buf)
+glibtop_get_uptime_r (glibtop *server, glibtop_uptime *buf)
{
memset (buf, 0, sizeof (glibtop_uptime));
}
diff --git a/sysdeps/sun4/cpu.c b/sysdeps/sun4/cpu.c
index 6ca965ae..68cf0003 100644
--- a/sysdeps/sun4/cpu.c
+++ b/sysdeps/sun4/cpu.c
@@ -30,12 +30,12 @@ static const unsigned long _glibtop_sysdeps_cpu =
/* Provides information about cpu usage. */
void
-glibtop_get_cpu__p (glibtop *server, glibtop_cpu *buf)
+glibtop_get_cpu_p (glibtop *server, glibtop_cpu *buf)
{
long cp_time [CPUSTATES], mp_time [NCPU][CPUSTATES];
int i;
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_cpu));
diff --git a/sysdeps/sun4/init.c b/sysdeps/sun4/init.c
index e39cfd29..5613d1cb 100644
--- a/sysdeps/sun4/init.c
+++ b/sysdeps/sun4/init.c
@@ -26,7 +26,7 @@ static glibtop _glibtop_global_server;
glibtop *glibtop_global_server = NULL;
glibtop *
-glibtop_init__r (glibtop **server, const unsigned long features,
+glibtop_init_r (glibtop **server, const unsigned long features,
const unsigned flags)
{
if (*server != NULL)
@@ -34,7 +34,7 @@ glibtop_init__r (glibtop **server, const unsigned long features,
if (glibtop_global_server == NULL) {
glibtop_global_server = &_glibtop_global_server;
- glibtop_open__r (glibtop_global_server, "glibtop",
+ glibtop_open_r (glibtop_global_server, "glibtop",
features, flags);
}
diff --git a/sysdeps/sun4/loadavg.c b/sysdeps/sun4/loadavg.c
index 07d4c0e9..0e553b4a 100644
--- a/sysdeps/sun4/loadavg.c
+++ b/sysdeps/sun4/loadavg.c
@@ -25,9 +25,9 @@
/* Provides load averange. */
void
-glibtop_get_loadavg__p (glibtop *server, glibtop_loadavg *buf)
+glibtop_get_loadavg_p (glibtop *server, glibtop_loadavg *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_loadavg));
}
diff --git a/sysdeps/sun4/mem.c b/sysdeps/sun4/mem.c
index ab602e70..6f3b74c2 100644
--- a/sysdeps/sun4/mem.c
+++ b/sysdeps/sun4/mem.c
@@ -33,9 +33,9 @@ static const unsigned long _glibtop_sysdeps_mem =
/* Provides information about memory usage. */
void
-glibtop_get_mem__p (glibtop *server, glibtop_mem *buf)
+glibtop_get_mem_p (glibtop *server, glibtop_mem *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_mem));
diff --git a/sysdeps/sun4/msg_limits.c b/sysdeps/sun4/msg_limits.c
index eca74df9..5a8fff58 100644
--- a/sysdeps/sun4/msg_limits.c
+++ b/sysdeps/sun4/msg_limits.c
@@ -24,9 +24,9 @@
/* Provides information about sysv ipc limits. */
void
-glibtop_get_msg_limits__p (glibtop *server, glibtop_msg_limits *buf)
+glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_msg_limits));
}
diff --git a/sysdeps/sun4/open.c b/sysdeps/sun4/open.c
index 0193c00f..4e5cc6bd 100644
--- a/sysdeps/sun4/open.c
+++ b/sysdeps/sun4/open.c
@@ -57,7 +57,7 @@ struct nlist _glibtop_nlist[] = {
/* !!! THIS FUNCTION RUNS SUID ROOT - CHANGE WITH CAUTION !!! */
void
-glibtop_open__r (glibtop *server, const char *program_name,
+glibtop_open_r (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags)
{
register int pagesize;
@@ -77,14 +77,14 @@ glibtop_open__r (glibtop *server, const char *program_name,
server->machine.kd = kvm_open (NULL, NULL, NULL, O_RDONLY, "libgtop");
if (server->machine.kd == NULL)
- glibtop_error__r (server, "kvm_open: %s", strerror (errno));
+ glibtop_error_r (server, "kvm_open: %s", strerror (errno));
/* get the list of symbols we want to access in the kernel */
server->machine.nlist_count = kvm_nlist (server->machine.kd, _glibtop_nlist);
if (server->machine.nlist_count < 0)
- glibtop_error__r (server, "nlist: %s", strerror (errno));
+ glibtop_error_r (server, "nlist: %s", strerror (errno));
#ifdef MULTIPROCESSOR
/* were ncpu and xp_time not found in the nlist? */
@@ -130,7 +130,7 @@ glibtop_open__r (glibtop *server, const char *program_name,
server->machine.count = server->machine.bytesize / sizeof (struct page);
server->machine.physpage =
- (struct page *) glibtop_malloc__r (server, server->machine.bytesize);
+ (struct page *) glibtop_malloc_r (server, server->machine.bytesize);
/* get the page size with "getpagesize" and calculate pageshift from it */
@@ -183,12 +183,12 @@ _glibtop_check_nlist (void *server, register struct nlist *nlst)
#ifdef i386
if (nlst->n_value == 0) {
- glibtop_error__r (server, "kernel: no symbol named `%s'", nlst->n_name);
+ glibtop_error_r (server, "kernel: no symbol named `%s'", nlst->n_name);
not_found++;
}
#else
if (nlst->n_type == 0) {
- glibtop_error__r (server, "kernel: no symbol named `%s'", nlst->n_name);
+ glibtop_error_r (server, "kernel: no symbol named `%s'", nlst->n_name);
not_found++;
}
#endif
@@ -210,7 +210,7 @@ _glibtop_getkval (void *void_server, unsigned long offset, int *ptr, int size, c
{
if (*refstr == '!') return 0;
- glibtop_error__r (server, "kvm_read(%s): %s",
+ glibtop_error_r (server, "kvm_read(%s): %s",
refstr, strerror (errno));
}
diff --git a/sysdeps/sun4/procdata.c b/sysdeps/sun4/procdata.c
index fa32152e..d38d5b3e 100644
--- a/sysdeps/sun4/procdata.c
+++ b/sysdeps/sun4/procdata.c
@@ -25,7 +25,7 @@
/* Provides detailed information about a process. */
void
-glibtop_get_procdata__p (glibtop *server, glibtop_procdata *buf, pid_t pid)
+glibtop_get_procdata_p (glibtop *server, glibtop_procdata *buf, pid_t pid)
{
memset (buf, 0, sizeof (glibtop_procdata));
}
diff --git a/sysdeps/sun4/prockernel.c b/sysdeps/sun4/prockernel.c
index ab13bb95..f8596820 100644
--- a/sysdeps/sun4/prockernel.c
+++ b/sysdeps/sun4/prockernel.c
@@ -25,10 +25,10 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_kernel__p (glibtop *server, glibtop_proc_kernel *buf,
+glibtop_get_proc_kernel_p (glibtop *server, glibtop_proc_kernel *buf,
pid_t pid)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_kernel));
}
diff --git a/sysdeps/sun4/proclist.c b/sysdeps/sun4/proclist.c
index 66778f57..0623dd23 100644
--- a/sysdeps/sun4/proclist.c
+++ b/sysdeps/sun4/proclist.c
@@ -32,9 +32,9 @@
* each buf->size big. The total size is stored in buf->total. */
unsigned *
-glibtop_get_proclist__p (glibtop *server, glibtop_proclist *buf)
+glibtop_get_proclist_p (glibtop *server, glibtop_proclist *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proclist));
return NULL;
diff --git a/sysdeps/sun4/procmem.c b/sysdeps/sun4/procmem.c
index 1e018270..c6971c8b 100644
--- a/sysdeps/sun4/procmem.c
+++ b/sysdeps/sun4/procmem.c
@@ -25,10 +25,10 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_mem__p (glibtop *server, glibtop_proc_mem *buf,
+glibtop_get_proc_mem_p (glibtop *server, glibtop_proc_mem *buf,
pid_t pid)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_mem));
}
diff --git a/sysdeps/sun4/procsegment.c b/sysdeps/sun4/procsegment.c
index 5793d386..d0d957c3 100644
--- a/sysdeps/sun4/procsegment.c
+++ b/sysdeps/sun4/procsegment.c
@@ -25,10 +25,10 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_segment__p (glibtop *server, glibtop_proc_segment *buf,
+glibtop_get_proc_segment_p (glibtop *server, glibtop_proc_segment *buf,
pid_t pid)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_segment));
}
diff --git a/sysdeps/sun4/procsignal.c b/sysdeps/sun4/procsignal.c
index a3e905ae..bee1dc5f 100644
--- a/sysdeps/sun4/procsignal.c
+++ b/sysdeps/sun4/procsignal.c
@@ -25,10 +25,10 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_signal__p (glibtop *server, glibtop_proc_signal *buf,
+glibtop_get_proc_signal_p (glibtop *server, glibtop_proc_signal *buf,
pid_t pid)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_signal));
}
diff --git a/sysdeps/sun4/procstate.c b/sysdeps/sun4/procstate.c
index a0ffb312..ddc6d92c 100644
--- a/sysdeps/sun4/procstate.c
+++ b/sysdeps/sun4/procstate.c
@@ -25,10 +25,10 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_state__p (glibtop *server, glibtop_proc_state *buf,
+glibtop_get_proc_state_p (glibtop *server, glibtop_proc_state *buf,
pid_t pid)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_state));
}
diff --git a/sysdeps/sun4/proctime.c b/sysdeps/sun4/proctime.c
index 8bd4f728..32b237db 100644
--- a/sysdeps/sun4/proctime.c
+++ b/sysdeps/sun4/proctime.c
@@ -25,10 +25,10 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_time__p (glibtop *server, glibtop_proc_time *buf,
+glibtop_get_proc_time_p (glibtop *server, glibtop_proc_time *buf,
pid_t pid)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_time));
}
diff --git a/sysdeps/sun4/procuid.c b/sysdeps/sun4/procuid.c
index a4c15f8f..bf132521 100644
--- a/sysdeps/sun4/procuid.c
+++ b/sysdeps/sun4/procuid.c
@@ -25,10 +25,10 @@
/* Provides detailed information about a process. */
void
-glibtop_get_proc_uid__p (glibtop *server, glibtop_proc_uid *buf,
+glibtop_get_proc_uid_p (glibtop *server, glibtop_proc_uid *buf,
pid_t pid)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_proc_uid));
}
diff --git a/sysdeps/sun4/sem_limits.c b/sysdeps/sun4/sem_limits.c
index ef4df709..1e7eaa0f 100644
--- a/sysdeps/sun4/sem_limits.c
+++ b/sysdeps/sun4/sem_limits.c
@@ -24,9 +24,9 @@
/* Provides information about sysv sem limits. */
void
-glibtop_get_sem_limits__p (glibtop *server, glibtop_sem_limits *buf)
+glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_sem_limits));
}
diff --git a/sysdeps/sun4/shm_limits.c b/sysdeps/sun4/shm_limits.c
index b51528b1..bb7facb7 100644
--- a/sysdeps/sun4/shm_limits.c
+++ b/sysdeps/sun4/shm_limits.c
@@ -24,9 +24,9 @@
/* Provides information about sysv ipc limits. */
void
-glibtop_get_shm_limits__p (glibtop *server, glibtop_shm_limits *buf)
+glibtop_get_shm_limits_p (glibtop *server, glibtop_shm_limits *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_shm_limits));
}
diff --git a/sysdeps/sun4/swap.c b/sysdeps/sun4/swap.c
index c1c3f2a8..d6a402fc 100644
--- a/sysdeps/sun4/swap.c
+++ b/sysdeps/sun4/swap.c
@@ -25,9 +25,9 @@
/* Provides information about swap usage. */
void
-glibtop_get_swap__p (glibtop *server, glibtop_swap *buf)
+glibtop_get_swap_p (glibtop *server, glibtop_swap *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_swap));
}
diff --git a/sysdeps/sun4/uptime.c b/sysdeps/sun4/uptime.c
index 58b87a8e..e1a6cc51 100644
--- a/sysdeps/sun4/uptime.c
+++ b/sysdeps/sun4/uptime.c
@@ -25,9 +25,9 @@
/* Provides uptime and idle time. */
void
-glibtop_get_uptime__p (glibtop *server, glibtop_uptime *buf)
+glibtop_get_uptime_p (glibtop *server, glibtop_uptime *buf)
{
- glibtop_init__r (&server, 0, 0);
+ glibtop_init_r (&server, 0, 0);
memset (buf, 0, sizeof (glibtop_uptime));
}