@@ -10,7 +10,7 @@ without even the IMPLIED WARRANTY OF MERCHANTABILITY or FITNESS FOR A PARTICULAR
10
10
PURPOSE. See the terms and conditions of the GNU Lesser General Public License
11
11
for more details. You should have received a copy of the GNU Lesser General
12
12
Public License along with this program; if not, write to the Free Software
13
- Foundation, Inc., 59 Temple Place, Suite 330 , Boston, MA 02111-1307 USA
13
+ Foundation, Inc., 51 Franklin Street, Fifth Floor , Boston, MA 02110-1301 USA
14
14
*/
15
15
16
16
/*!
@@ -22,18 +22,19 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
22
*
23
23
* The intended use pattern is as follows
24
24
*
25
- * TODO ON-INTERFACE-SOLID: document the interface
26
- * usage
25
+ * TODO ON-INTERFACE-SOLID: document the
26
+ *interface usage
27
27
*
28
28
******************************************************************************
29
29
*/
30
30
#ifndef GOTCHA_H
31
31
#define GOTCHA_H
32
32
33
- #include "gotcha/gotcha_types.h"
34
33
#include <link.h>
35
34
36
- #if defined(__cplusplus )
35
+ #include "gotcha/gotcha_types.h"
36
+
37
+ #if defined(__cplusplus )
37
38
extern "C" {
38
39
#endif
39
40
@@ -45,19 +46,20 @@ extern "C" {
45
46
* \param name The name of the function you want to get a pointer to
46
47
* \param ret_type The return type of the function you want a pointer to
47
48
* \param ... A comma separated list of the types of the parameters
48
- * to the function you're getting a pointer to
49
+ * to the function you're getting a pointer to
49
50
******************************************************************************
50
51
*/
51
52
52
- #define GOTCHA_MAKE_FUNCTION_PTR (name , ret_type , ...) ret_type(*name)(__VA_ARGS__)
53
+ #define GOTCHA_MAKE_FUNCTION_PTR (name , ret_type , ...) \
54
+ ret_type (*name)(__VA_ARGS__)
53
55
54
56
#define GOTCHA_EXPORT __attribute__((__visibility__("default")))
55
57
56
58
/*!
57
59
******************************************************************************
58
60
*
59
- * \fn enum gotcha_error_t gotcha_wrap(struct gotcha_binding_t* bindings,
60
- * void** wrappers, void*** originals,
61
+ * \fn enum gotcha_error_t gotcha_wrap(struct gotcha_binding_t* bindings,
62
+ * void** wrappers, void*** originals,
61
63
* int num_actions);
62
64
*
63
65
* \brief Makes GOTCHA wrap the functions picked in gotcha_prepare_symbols
@@ -70,8 +72,9 @@ extern "C" {
70
72
******************************************************************************
71
73
*/
72
74
73
- GOTCHA_EXPORT enum gotcha_error_t gotcha_wrap (struct gotcha_binding_t * bindings , int num_actions , const char * tool_name );
74
-
75
+ GOTCHA_EXPORT enum gotcha_error_t gotcha_wrap (struct gotcha_binding_t * bindings ,
76
+ int num_actions ,
77
+ const char * tool_name );
75
78
76
79
/*!
77
80
******************************************************************************
@@ -88,7 +91,8 @@ GOTCHA_EXPORT enum gotcha_error_t gotcha_wrap(struct gotcha_binding_t* bindings,
88
91
*
89
92
******************************************************************************
90
93
*/
91
- GOTCHA_EXPORT enum gotcha_error_t gotcha_set_priority (const char * tool_name , int priority );
94
+ GOTCHA_EXPORT enum gotcha_error_t gotcha_set_priority (const char * tool_name ,
95
+ int priority );
92
96
93
97
/*!
94
98
******************************************************************************
@@ -104,28 +108,30 @@ GOTCHA_EXPORT enum gotcha_error_t gotcha_set_priority(const char* tool_name, int
104
108
*
105
109
******************************************************************************
106
110
*/
107
- GOTCHA_EXPORT enum gotcha_error_t gotcha_get_priority (const char * tool_name , int * priority );
111
+ GOTCHA_EXPORT enum gotcha_error_t gotcha_get_priority (const char * tool_name ,
112
+ int * priority );
108
113
109
114
/*!
110
115
******************************************************************************
111
116
*
112
117
* \fn enum void* gotcha_get_wrappee(gotcha_wrappee_handle_t)
113
118
*
114
- * \brief Given a GOTCHA wrapper's handle, returns the wrapped function for it to call
119
+ * \brief Given a GOTCHA wrapper's handle, returns the wrapped function for it
120
+ *to call
115
121
*
116
122
* \param handle The wrappee handle to return the function pointer for
117
123
*
118
124
******************************************************************************
119
125
*/
120
- GOTCHA_EXPORT void * gotcha_get_wrappee (gotcha_wrappee_handle_t handle );
126
+ GOTCHA_EXPORT void * gotcha_get_wrappee (gotcha_wrappee_handle_t handle );
121
127
122
- GOTCHA_EXPORT void gotcha_filter_libraries_by_name (const char * nameFilter );
128
+ GOTCHA_EXPORT void gotcha_filter_libraries_by_name (const char * nameFilter );
123
129
GOTCHA_EXPORT void gotcha_only_filter_last ();
124
- GOTCHA_EXPORT void gotcha_set_library_filter_func (int (* new_func )(struct link_map * ));
130
+ GOTCHA_EXPORT void gotcha_set_library_filter_func (
131
+ int (* new_func )(struct link_map * ));
125
132
GOTCHA_EXPORT void gotcha_restore_library_filter_func ();
126
133
127
-
128
- #if defined(__cplusplus )
134
+ #if defined(__cplusplus )
129
135
}
130
136
#endif
131
137
0 commit comments