- Use 'extern' keyword where appropriate
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Thu, 28 May 2015 15:57:39 +0000 (15:57 +0000)
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>
Thu, 28 May 2015 15:57:39 +0000 (15:57 +0000)
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@6004 82007160-df01-0410-b94d-b575c5fd34c7

src/libopm/src/config.h
src/libopm/src/list.h
src/libopm/src/memory.h
src/libopm/src/opm.h
src/libopm/src/proxy.h

index 295b7311306498589a4493401c34ed6e3aa7a8ab..7bfc80d838b3bc8abe581bcbf3a9b07839923dd9 100644 (file)
@@ -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 */
index 26bd0f4d22733236888210fc0e97fffb7991551b..5b96b150607c6b5e8d4e072650b8c9c351411f8d 100644 (file)
 #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 */
index 4e4a79c07f2a71a2143e256fed5bbbc10b8ca5c9..e2455d91d237432f2f361332e8d72a5766ed98b4 100644 (file)
@@ -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 */
index aca176534cf7da961b8f16e13719ef573eacbc8a..41c1be198403f73786576a83ea9ff8b544b97e2b 100644 (file)
@@ -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 */
index 4fbc1e8b787524bc195fdf7a644d4b6cd815160f..248518474f2eaf3a282b253e1168ee82ec38c4a0 100644 (file)
@@ -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 */