summaryrefslogtreecommitdiff
path: root/sysdeps/linux
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-06-07 13:57:45 +0000
committerMartin Baulig <martin@src.gnome.org>1998-06-07 13:57:45 +0000
commitc84923132a0aaade80a48eb762b27d87640d3921 (patch)
treedb52022ec9c44cd3ac12c00571296a7049b950d5 /sysdeps/linux
parent85f31a170768f2345e697b42e9bde1bfae252dbb (diff)
downloadlibgtop-c84923132a0aaade80a48eb762b27d87640d3921.tar.gz
Using single underscore instead of two underscores for function prefixes
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.
Diffstat (limited to 'sysdeps/linux')
-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
20 files changed, 42 insertions, 40 deletions
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));