Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all __END_DECLS

1999-02-19  Martin Baulig  <martin@home-of-linux.org>

	* Replace all __BEGIN_DELCS with LIBGTOP_BEGIN_DECLS and all
	__END_DECLS with LIBGTOP_END_DECLS; remove all __P macros and
	use real function prototypes.
This commit is contained in:
Martin Baulig
1999-02-19 09:54:18 +00:00
committed by Martin Baulig
parent 2b96f77245
commit 1272d38f72
72 changed files with 198 additions and 186 deletions

View File

@@ -24,13 +24,13 @@
#include <glibtop.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
void glibtop_close_r (glibtop *server);
void glibtop_close_s (glibtop *server);
void glibtop_close_p (glibtop *server);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -26,7 +26,7 @@
#include <glibtop/sysdeps.h>
#include <glibtop/union.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_CMND_QUIT 0
#define GLIBTOP_CMND_SYSDEPS 1
@@ -95,6 +95,6 @@ void *
glibtop_call_s (glibtop *server, unsigned command, size_t send_size,
const void *send_buf, size_t recv_size, void *recv_buf);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_CPU_TOTAL 0
#define GLIBTOP_CPU_USER 1
@@ -71,7 +71,7 @@ struct _glibtop_cpu
#define glibtop_get_cpu_r glibtop_get_cpu_s
#endif
void glibtop_get_cpu_l __P((glibtop *, glibtop_cpu *));
void glibtop_get_cpu_l (glibtop *server, glibtop_cpu *buf);
#if GLIBTOP_SUID_CPU
void glibtop_init_cpu_p (glibtop *server);
@@ -92,6 +92,6 @@ extern const char *glibtop_descriptions_cpu [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glib.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
void glibtop_error_vr (glibtop *server, char *format, va_list args);
void glibtop_warn_vr (glibtop *server, char *format, va_list args);
@@ -121,6 +121,6 @@ glibtop_warn_io (char *format, ...)
#endif /* no __GNUC__ */
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_FSUSAGE_BLOCKS 0
#define GLIBTOP_FSUSAGE_BFREE 1
@@ -65,6 +65,6 @@ extern const char *glibtop_descriptions_fsusage [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -26,37 +26,22 @@
#include <config.h>
#endif
#ifdef WITHOUT_GNOME
/* __BEGIN_DECLS should be used at the beginning of your declarations,
so that C++ compilers don't mangle their names. Use __END_DECLS at
the end of C declarations. */
/*
* All declarations are enclosed in BEGIN_LIBGTOP_DECLS and
* END_LIBGTOP_DECLS so that C++ compilers don't mangle their names.
*
*/
#undef __BEGIN_DECLS
#undef __END_DECLS
#undef BEGIN_LIBGTOP_DECLS
#undef END_LIBGTOP_DECLS
#ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
# define BEGIN_LIBGTOP_DECLS extern "C" {
# define END_LIBGTOP_DECLS }
#else
# define __BEGIN_DECLS /* empty */
# define __END_DECLS /* empty */
# define BEGIN_LIBGTOP_DECLS /* empty */
# define END_LIBGTOP_DECLS /* empty */
#endif
/* __P is a macro used to wrap function prototypes, so that compilers
that don't understand ANSI C prototypes still work, and ANSI C
compilers can issue warnings about type mismatches. */
#undef __P
#if defined (__STDC__) || defined (_AIX) \
|| (defined (__mips) && defined (_SYSTYPE_SVR4)) \
|| defined(WIN32) || defined(__cplusplus)
# define __P(protos) protos
#else
# define __P(protos) ()
#endif
#endif /* WITHOUT_GNOME */
#ifdef _IN_LIBGTOP
/* Provide macros to feature the GCC function attribute.
@@ -137,7 +122,7 @@
#ifdef _IN_LIBGTOP
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#ifndef _
#define _(String) dgettext (PACKAGE, String)
@@ -145,10 +130,10 @@ __BEGIN_DECLS
#endif
#ifndef HAVE_STRERROR
extern char *strerror __P((int));
char *strerror (int errno);
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif /* _IN_LIBGTOP */

View File

@@ -29,7 +29,7 @@
#define GLIBTOP_INODEDB_ALL 7
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
typedef struct _glibtop_inodedb glibtop_inodedb;
@@ -60,6 +60,6 @@ glibtop_inodedb_lookup_s (glibtop *server,
void
glibtop_inodedb_close_s (glibtop *server, glibtop_inodedb *inodedb);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_LOADAVG_LOADAVG 0
#define GLIBTOP_LOADAVG_NR_RUNNING 1
@@ -74,6 +74,6 @@ extern const char *glibtop_descriptions_loadavg [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_MEM_TOTAL 0
#define GLIBTOP_MEM_USED 1
@@ -82,6 +82,6 @@ extern const char *glibtop_descriptions_mem [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_MOUNTLIST_NUMBER 0
#define GLIBTOP_MOUNTLIST_TOTAL 1
@@ -74,6 +74,6 @@ extern const char *glibtop_descriptions_mountlist [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_IPC_MSGPOOL 0
#define GLIBTOP_IPC_MSGMAP 1
@@ -80,7 +80,7 @@ extern const char *glibtop_descriptions_msg_limits [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_NETLOAD_IF_FLAGS 0
#define GLIBTOP_NETLOAD_MTU 1
@@ -113,6 +113,6 @@ extern const char *glibtop_descriptions_netload [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -24,7 +24,7 @@
#include <glibtop/read.h>
#include <glibtop/error.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define _GLIBTOP_INIT_STATE_INIT 0x10000
#define _GLIBTOP_INIT_STATE_OPEN 0x20000
@@ -66,6 +66,6 @@ glibtop_open_s (glibtop *server, const char *program_name,
const unsigned long features, const unsigned flags);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -23,7 +23,7 @@
#include <glibtop.h>
#include <glibtop/open.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PARAM_METHOD 1
#define GLIBTOP_PARAM_FEATURES 2
@@ -44,6 +44,6 @@ void
glibtop_set_parameter_l (glibtop *server, const unsigned parameter,
const void *data_ptr, size_t data_size);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PPP_STATE 0
#define GLIBTOP_PPP_BYTES_IN 1
@@ -78,6 +78,6 @@ extern const char *glibtop_descriptions_ppp [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_ARGS_SIZE 0
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_proc_args [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_KERNEL_K_FLAGS 0
#define GLIBTOP_PROC_KERNEL_MIN_FLT 1
@@ -91,6 +91,6 @@ extern const char *glibtop_descriptions_proc_kernel [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROCLIST_NUMBER 0
#define GLIBTOP_PROCLIST_TOTAL 1
@@ -97,6 +97,6 @@ extern const char *glibtop_descriptions_proclist [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_MAP_NUMBER 0
#define GLIBTOP_PROC_MAP_TOTAL 1
@@ -103,6 +103,6 @@ extern const char *glibtop_descriptions_proc_map [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_MEM_SIZE 0
#define GLIBTOP_PROC_MEM_VSIZE 1
@@ -82,6 +82,6 @@ extern const char *glibtop_descriptions_proc_mem [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_SEGMENT_TEXT_RSS 0
#define GLIBTOP_PROC_SEGMENT_SHLIB_RSS 1
@@ -85,6 +85,6 @@ extern const char *glibtop_descriptions_proc_segment [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_SIGNAL_SIGNAL 0
#define GLIBTOP_PROC_SIGNAL_BLOCKED 1
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_proc_signal [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_STATE_CMD 0
#define GLIBTOP_PROC_STATE_STATE 1
@@ -83,6 +83,6 @@ extern const char *glibtop_descriptions_proc_state [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -26,7 +26,7 @@
#include <glibtop/cpu.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_TIME_START_TIME 0
#define GLIBTOP_PROC_TIME_RTIME 1
@@ -97,6 +97,6 @@ extern const char *glibtop_descriptions_proc_time [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_PROC_UID_UID 0
#define GLIBTOP_PROC_UID_EUID 1
@@ -92,6 +92,6 @@ extern const char *glibtop_descriptions_proc_uid [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,13 +25,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define glibtop_read(p1, p2) glibtop_read(glibtop_global_server, p1, p2)
void glibtop_read_l (glibtop *server, size_t size, void *buf);
void glibtop_read_s (glibtop *server, size_t size, void *buf);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,13 +25,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define glibtop_read_data() glibtop_read_data_r(glibtop_global_server)
void *glibtop_read_data_l (glibtop *server);
void *glibtop_read_data_s (glibtop *server);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_IPC_SEMMAP 0
#define GLIBTOP_IPC_SEMMNI 1
@@ -86,6 +86,6 @@ extern const char *glibtop_descriptions_sem_limits [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_IPC_SHMMAX 0
#define GLIBTOP_IPC_SHMMIN 1
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_shm_limits [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -28,7 +28,7 @@
#include <sys/signal.h>
#endif
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
typedef struct _glibtop_signame glibtop_signame;
@@ -40,6 +40,6 @@ struct _glibtop_signame
extern const glibtop_signame glibtop_sys_siglist [];
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SWAP_TOTAL 0
#define GLIBTOP_SWAP_USED 1
@@ -76,6 +76,6 @@ extern const char *glibtop_descriptions_swap [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -24,7 +24,7 @@
#include <glibtop.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SYSDEPS_FEATURES 0
#define GLIBTOP_SYSDEPS_CPU 1
@@ -103,6 +103,6 @@ extern const char *glibtop_descriptions_sysdeps [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -28,7 +28,7 @@
#include <glib.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_SYSINFO_CPUINFO 0
@@ -57,6 +57,6 @@ struct _glibtop_sysinfo
glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -22,7 +22,7 @@
#ifndef __GLIBTOP_TYPES_H__
#define __GLIBTOP_TYPES_H__
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_TYPE_LONG 1
#define GLIBTOP_TYPE_ULONG 2
@@ -31,6 +31,6 @@ __BEGIN_DECLS
#define GLIBTOP_TYPE_CHAR 5
#define GLIBTOP_TYPE_STRING 6
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -48,7 +48,7 @@
#include <glibtop/netload.h>
#include <glibtop/ppp.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
typedef union _glibtop_union glibtop_union;
@@ -78,6 +78,6 @@ union _glibtop_union
glibtop_ppp ppp;
};
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_UPTIME_UPTIME 0
#define GLIBTOP_UPTIME_IDLETIME 1
@@ -70,6 +70,6 @@ extern const char *glibtop_descriptions_uptime [];
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -27,7 +27,7 @@
#define LIBGTOP_VERSION_STRING "Libgtop %s server version %s (%u,%u,%u,%u)."
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#if _IN_LIBGTOP
@@ -35,6 +35,6 @@ void glibtop_send_version (glibtop *server, int fd);
#endif
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,13 +25,13 @@
#include <glibtop.h>
#include <glibtop/error.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_DECLS
#define glibtop_write(p1, p2) glibtop_write(glibtop_global_server, p1, p2)
void glibtop_write_l (glibtop *server, size_t size, void *buf);
void glibtop_write_s (glibtop *server, size_t size, void *buf);
__END_DECLS
END_LIBGTOP_DECLS
#endif

View File

@@ -25,7 +25,7 @@
#include <glibtop.h>
#include <glibtop/error.h>
__BEGIN_DECLS
BEGIN_LIBGTOP_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)
@@ -39,6 +39,6 @@ void *glibtop_realloc_r (glibtop *server, void *ptr, size_t size);
char *glibtop_strdup_r (glibtop *server, const char *string);
void glibtop_free_r (glibtop *server, const void *ptr);
__END_DECLS
END_LIBGTOP_DECLS
#endif