From b3a3a974d667a0b671b6bd2176bd7d203e51fbcb Mon Sep 17 00:00:00 2001 From: michael Date: Thu, 28 May 2015 15:56:43 +0000 Subject: [PATCH] - Use 'extern' keyword where appropriate git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/branches/1.0.x@6003 82007160-df01-0410-b94d-b575c5fd34c7 --- src/libopm/src/config.h | 10 +++++----- src/libopm/src/list.h | 12 ++++++------ src/libopm/src/memory.h | 4 ++-- src/libopm/src/opm.h | 26 +++++++++++++------------- src/libopm/src/proxy.h | 14 +++++++------- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/libopm/src/config.h b/src/libopm/src/config.h index 295b731..7bfc80d 100644 --- a/src/libopm/src/config.h +++ b/src/libopm/src/config.h @@ -11,9 +11,9 @@ struct _opm_config_hash int type; }; -void libopm_config_free(OPM_CONFIG_T *); -void *libopm_config(OPM_CONFIG_T *, unsigned int); -int libopm_config_gettype(int); -OPM_CONFIG_T *libopm_config_create(void); -OPM_ERR_T libopm_config_set(OPM_CONFIG_T *, unsigned int , const void *); +extern void libopm_config_free(OPM_CONFIG_T *); +extern void *libopm_config(OPM_CONFIG_T *, unsigned int); +extern int libopm_config_gettype(int); +extern OPM_CONFIG_T *libopm_config_create(void); +extern OPM_ERR_T libopm_config_set(OPM_CONFIG_T *, unsigned int , const void *); #endif /* CONFIG_H */ diff --git a/src/libopm/src/list.h b/src/libopm/src/list.h index 26bd0f4..5b96b15 100644 --- a/src/libopm/src/list.h +++ b/src/libopm/src/list.h @@ -30,13 +30,13 @@ #define LIST_SIZE(list) list->elements /* End Copyright */ -OPM_NODE_T *libopm_node_create(void *); -OPM_LIST_T *libopm_list_create(void); +extern OPM_NODE_T *libopm_node_create(void *); +extern OPM_LIST_T *libopm_list_create(void); -OPM_NODE_T *libopm_list_add(OPM_LIST_T *, OPM_NODE_T *); -OPM_NODE_T *libopm_list_remove(OPM_LIST_T *, OPM_NODE_T *); +extern OPM_NODE_T *libopm_list_add(OPM_LIST_T *, OPM_NODE_T *); +extern OPM_NODE_T *libopm_list_remove(OPM_LIST_T *, OPM_NODE_T *); -void libopm_list_free(OPM_LIST_T *); -void libopm_node_free(OPM_NODE_T *); +extern void libopm_list_free(OPM_LIST_T *); +extern void libopm_node_free(OPM_NODE_T *); #endif /* LIST_H */ diff --git a/src/libopm/src/memory.h b/src/libopm/src/memory.h index 4e4a79c..e2455d9 100644 --- a/src/libopm/src/memory.h +++ b/src/libopm/src/memory.h @@ -8,8 +8,8 @@ #define xcalloc(SIZE) libopm_xcalloc(SIZE) #define MyFree(X) libopm_MyFree((void **) &X) -void *libopm_xcalloc(size_t bytes); -void libopm_MyFree(void **var); +extern void *libopm_xcalloc(size_t bytes); +extern void libopm_MyFree(void **var); extern void *libopm_xstrdup(const char *); #endif /* MALLOC_H */ diff --git a/src/libopm/src/opm.h b/src/libopm/src/opm.h index aca1765..41c1be1 100644 --- a/src/libopm/src/opm.h +++ b/src/libopm/src/opm.h @@ -49,22 +49,22 @@ struct _OPM_REMOTE void *data; /* Arbitrary data that the client can point to for any purpose*/ }; -OPM_T *opm_create(void); -void opm_free(OPM_T *); +extern OPM_T *opm_create(void); +extern void opm_free(OPM_T *); -OPM_REMOTE_T *opm_remote_create(const char *); -void opm_remote_free(OPM_REMOTE_T *); +extern OPM_REMOTE_T *opm_remote_create(const char *); +extern void opm_remote_free(OPM_REMOTE_T *); -OPM_ERR_T opm_config(OPM_T *, int, const void *); -OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *); -void opm_end(OPM_T *, OPM_REMOTE_T *); -void opm_endscan(OPM_T *, OPM_REMOTE_T *); +extern OPM_ERR_T opm_config(OPM_T *, int, const void *); +extern OPM_ERR_T opm_scan(OPM_T *, OPM_REMOTE_T *); +extern void opm_end(OPM_T *, OPM_REMOTE_T *); +extern void opm_endscan(OPM_T *, OPM_REMOTE_T *); -OPM_ERR_T opm_addtype(OPM_T *, int, unsigned short int); -OPM_ERR_T opm_remote_addtype(OPM_REMOTE_T *, int, unsigned short int); -OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_FUNC *, void *); +extern OPM_ERR_T opm_addtype(OPM_T *, int, unsigned short int); +extern OPM_ERR_T opm_remote_addtype(OPM_REMOTE_T *, int, unsigned short int); +extern OPM_ERR_T opm_callback(OPM_T *, int, OPM_CALLBACK_FUNC *, void *); -void opm_cycle(OPM_T *); +extern void opm_cycle(OPM_T *); -size_t opm_active(OPM_T *); +extern size_t opm_active(OPM_T *); #endif /* OPM_H */ diff --git a/src/libopm/src/proxy.h b/src/libopm/src/proxy.h index 4fbc1e8..2485184 100644 --- a/src/libopm/src/proxy.h +++ b/src/libopm/src/proxy.h @@ -3,11 +3,11 @@ #include "libopm.h" -int libopm_proxy_http_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); -int libopm_proxy_socks4_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); -int libopm_proxy_socks5_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); -int libopm_proxy_wingate_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); -int libopm_proxy_router_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); -int libopm_proxy_httppost_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); -int libopm_proxy_dreambox_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); +extern int libopm_proxy_http_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); +extern int libopm_proxy_socks4_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); +extern int libopm_proxy_socks5_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); +extern int libopm_proxy_wingate_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); +extern int libopm_proxy_router_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); +extern int libopm_proxy_httppost_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); +extern int libopm_proxy_dreambox_write(OPM_T *, OPM_SCAN_T *, OPM_CONNECTION_T *); #endif /* PROXY_H */ -- 2.30.2