Use __PMT in nested declarations for C++ compatibility.
Showing
11 changed files
with
71 additions
and
66 deletions
... | @@ -37,10 +37,10 @@ extern int body_get_filename __P ((body_t, char *, size_t, size_t *)); | ... | @@ -37,10 +37,10 @@ extern int body_get_filename __P ((body_t, char *, size_t, size_t *)); |
37 | 37 | ||
38 | extern int body_size __P ((body_t, size_t*)); | 38 | extern int body_size __P ((body_t, size_t*)); |
39 | extern int body_set_size __P ((body_t, int (*_size) | 39 | extern int body_set_size __P ((body_t, int (*_size) |
40 | __P ((body_t, size_t*)), void *owner)); | 40 | __PMT ((body_t, size_t*)), void *owner)); |
41 | extern int body_lines __P ((body_t, size_t *)); | 41 | extern int body_lines __P ((body_t, size_t *)); |
42 | extern int body_set_lines __P ((body_t, int (*_lines) | 42 | extern int body_set_lines __P ((body_t, int (*_lines) |
43 | __P ((body_t, size_t*)), void *owner)); | 43 | __PMT ((body_t, size_t*)), void *owner)); |
44 | 44 | ||
45 | #ifdef __cplusplus | 45 | #ifdef __cplusplus |
46 | } | 46 | } | ... | ... |
... | @@ -39,7 +39,8 @@ extern int mu_debug_print __P ((mu_debug_t debug, size_t level, | ... | @@ -39,7 +39,8 @@ extern int mu_debug_print __P ((mu_debug_t debug, size_t level, |
39 | const char *format, ...)); | 39 | const char *format, ...)); |
40 | extern int mu_debug_printv __P ((mu_debug_t debug, size_t level, | 40 | extern int mu_debug_printv __P ((mu_debug_t debug, size_t level, |
41 | const char *format, va_list argp)); | 41 | const char *format, va_list argp)); |
42 | extern int mu_debug_set_print __P ((mu_debug_t, int (*_print) __P ((mu_debug_t, size_t level, const char *, va_list)), void *owner)); | 42 | extern int mu_debug_set_print __P ((mu_debug_t, |
43 | int (*_print) __PMT ((mu_debug_t, size_t level, const char *, va_list)), void *owner)); | ||
43 | 44 | ||
44 | #ifdef __cplusplus | 45 | #ifdef __cplusplus |
45 | } | 46 | } | ... | ... |
... | @@ -24,13 +24,15 @@ | ... | @@ -24,13 +24,15 @@ |
24 | extern "C" { /*}*/ | 24 | extern "C" { /*}*/ |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | int envelope_create (envelope_t *, void *); | 27 | int envelope_create __P((envelope_t *, void *)); |
28 | void envelope_destroy (envelope_t *, void *); | 28 | void envelope_destroy __P((envelope_t *, void *)); |
29 | void * envelope_get_owner (envelope_t); | 29 | void * envelope_get_owner __P((envelope_t)); |
30 | int envelope_set_sender (envelope_t, int (*_sender) __P ((envelope_t, char *, size_t, size_t*)), void *); | 30 | int envelope_set_sender __P((envelope_t, |
31 | int envelope_sender (envelope_t, char *, size_t, size_t *); | 31 | int (*_sender) __PMT ((envelope_t, char *, size_t, size_t*)), void *)); |
32 | int envelope_set_date (envelope_t, int (*_date) __P ((envelope_t, char *, size_t , size_t *)), void *); | 32 | int envelope_sender __P((envelope_t, char *, size_t, size_t *)); |
33 | int envelope_date (envelope_t, char *, size_t, size_t *); | 33 | int envelope_set_date __P((envelope_t, |
34 | int (*_date) __PMT ((envelope_t, char *, size_t , size_t *)), void *)); | ||
35 | int envelope_date __P((envelope_t, char *, size_t, size_t *)); | ||
34 | 36 | ||
35 | #ifdef __cplusplus | 37 | #ifdef __cplusplus |
36 | } | 38 | } | ... | ... |
... | @@ -26,7 +26,7 @@ | ... | @@ -26,7 +26,7 @@ |
26 | extern "C" { | 26 | extern "C" { |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | typedef int (*error_pfn_t) __P ((const char *fmt, va_list ap)); | 29 | typedef int (*error_pfn_t) __PMT ((const char *fmt, va_list ap)); |
30 | 30 | ||
31 | extern int mu_verror __P ((const char *fmt, va_list ap)); | 31 | extern int mu_verror __P ((const char *fmt, va_list ap)); |
32 | extern int mu_error __P ((const char *fmt, ...)); | 32 | extern int mu_error __P ((const char *fmt, ...)); | ... | ... |
... | @@ -36,12 +36,12 @@ extern "C" { | ... | @@ -36,12 +36,12 @@ extern "C" { |
36 | struct _filter_record | 36 | struct _filter_record |
37 | { | 37 | { |
38 | const char *name; | 38 | const char *name; |
39 | int (*_filter) __P ((filter_t)); | 39 | int (*_filter) __PMT ((filter_t)); |
40 | void *data; | 40 | void *data; |
41 | 41 | ||
42 | /* Stub function return the fields. */ | 42 | /* Stub function return the fields. */ |
43 | int (*_is_filter) __P ((filter_record_t, const char *)); | 43 | int (*_is_filter) __PMT ((filter_record_t, const char *)); |
44 | int (*_get_filter) __P ((filter_record_t, int (*(*_filter)) __PMT ((filter_t)))); | 44 | int (*_get_filter) __PMT ((filter_record_t, int (*(*_filter)) __PMT ((filter_t)))); |
45 | }; | 45 | }; |
46 | 46 | ||
47 | 47 | ... | ... |
... | @@ -95,37 +95,37 @@ extern int header_lines __P ((header_t, size_t *)); | ... | @@ -95,37 +95,37 @@ extern int header_lines __P ((header_t, size_t *)); |
95 | 95 | ||
96 | 96 | ||
97 | extern int header_set_set_value __P ((header_t, | 97 | extern int header_set_set_value __P ((header_t, |
98 | int (*_set_value) __P ((header_t, | 98 | int (*_set_value) __PMT ((header_t, |
99 | const char *, | 99 | const char *, |
100 | const char *, | 100 | const char *, |
101 | int)), void *)); | 101 | int)), void *)); |
102 | 102 | ||
103 | extern int header_set_get_value __P ((header_t, | 103 | extern int header_set_get_value __P ((header_t, |
104 | int (*_get_value) __P ((header_t, | 104 | int (*_get_value) __PMT ((header_t, |
105 | const char *, | 105 | const char *, |
106 | char *, | 106 | char *, |
107 | size_t, | 107 | size_t, |
108 | size_t *)), | 108 | size_t *)), |
109 | void *)); | 109 | void *)); |
110 | extern int header_set_get_fvalue __P ((header_t, | 110 | extern int header_set_get_fvalue __P ((header_t, |
111 | int (*_get_value) __P ((header_t, | 111 | int (*_get_value) __PMT ((header_t, |
112 | const char *, | 112 | const char *, |
113 | char *, | 113 | char *, |
114 | size_t, | 114 | size_t, |
115 | size_t *)), | 115 | size_t *)), |
116 | void *)); | 116 | void *)); |
117 | 117 | ||
118 | extern int header_set_size __P ((header_t, int (*_size) | 118 | extern int header_set_size __P ((header_t, int (*_size) |
119 | __P ((header_t, size_t *)), void *)); | 119 | __PMT ((header_t, size_t *)), void *)); |
120 | 120 | ||
121 | extern int header_set_lines __P ((header_t, | 121 | extern int header_set_lines __P ((header_t, |
122 | int (*_lines) __P ((header_t, | 122 | int (*_lines) __PMT ((header_t, |
123 | size_t *)), void *)); | 123 | size_t *)), void *)); |
124 | 124 | ||
125 | extern int header_set_fill __P ((header_t, | 125 | extern int header_set_fill __P ((header_t, |
126 | int (*_fill) __P ((header_t, char *, | 126 | int (*_fill) __PMT ((header_t, char *, |
127 | size_t, off_t, | 127 | size_t, off_t, |
128 | size_t *)), void *owner)); | 128 | size_t *)), void *owner)); |
129 | 129 | ||
130 | #ifdef __cplusplus | 130 | #ifdef __cplusplus |
131 | } | 131 | } | ... | ... |
... | @@ -60,35 +60,35 @@ extern int message_get_observable __P ((message_t, observable_t *)); | ... | @@ -60,35 +60,35 @@ extern int message_get_observable __P ((message_t, observable_t *)); |
60 | 60 | ||
61 | extern int message_is_multipart __P ((message_t, int *)); | 61 | extern int message_is_multipart __P ((message_t, int *)); |
62 | extern int message_set_is_multipart __P ((message_t, int (*_is_multipart) | 62 | extern int message_set_is_multipart __P ((message_t, int (*_is_multipart) |
63 | __P ((message_t, int *)), void *)); | 63 | __PMT ((message_t, int *)), void *)); |
64 | 64 | ||
65 | extern int message_size __P ((message_t, size_t *)); | 65 | extern int message_size __P ((message_t, size_t *)); |
66 | extern int message_set_size __P ((message_t, int (*_size) | 66 | extern int message_set_size __P ((message_t, int (*_size) |
67 | __P ((message_t, size_t *)), | 67 | __PMT ((message_t, size_t *)), |
68 | void *owner)); | 68 | void *owner)); |
69 | 69 | ||
70 | extern int message_lines __P ((message_t, size_t *)); | 70 | extern int message_lines __P ((message_t, size_t *)); |
71 | extern int message_set_lines __P ((message_t, int (*_lines) | 71 | extern int message_set_lines __P ((message_t, int (*_lines) |
72 | __P ((message_t, size_t *)), | 72 | __PMT ((message_t, size_t *)), |
73 | void *owner)); | 73 | void *owner)); |
74 | 74 | ||
75 | extern int message_get_num_parts __P ((message_t, size_t *nparts)); | 75 | extern int message_get_num_parts __P ((message_t, size_t *nparts)); |
76 | extern int message_set_get_num_parts __P ((message_t, int (*_get_num_parts) | 76 | extern int message_set_get_num_parts __P ((message_t, int (*_get_num_parts) |
77 | __P ((message_t, size_t *)), | 77 | __PMT ((message_t, size_t *)), |
78 | void *owner)); | 78 | void *owner)); |
79 | 79 | ||
80 | extern int message_get_part __P ((message_t, size_t, message_t *)); | 80 | extern int message_get_part __P ((message_t, size_t, message_t *)); |
81 | extern int message_set_get_part __P ((message_t, int (*_get_part) | 81 | extern int message_set_get_part __P ((message_t, int (*_get_part) |
82 | __P ((message_t, size_t, | 82 | __PMT ((message_t, size_t, |
83 | message_t *)), void *owner)); | 83 | message_t *)), void *owner)); |
84 | 84 | ||
85 | extern int message_get_uidl __P ((message_t, char *, size_t, size_t *)); | 85 | extern int message_get_uidl __P ((message_t, char *, size_t, size_t *)); |
86 | extern int message_set_uidl __P ((message_t, int (*_get_uidl) | 86 | extern int message_set_uidl __P ((message_t, int (*_get_uidl) |
87 | __P ((message_t, char *, size_t, | 87 | __PMT ((message_t, char *, size_t, |
88 | size_t *)), void *owner)); | 88 | size_t *)), void *owner)); |
89 | extern int message_get_uid __P ((message_t, size_t *)); | 89 | extern int message_get_uid __P ((message_t, size_t *)); |
90 | extern int message_set_uid __P ((message_t, int (*_get_uid) | 90 | extern int message_set_uid __P ((message_t, int (*_get_uid) |
91 | __P ((message_t, size_t *)), | 91 | __PMT ((message_t, size_t *)), |
92 | void *owner)); | 92 | void *owner)); |
93 | 93 | ||
94 | /* misc functions */ | 94 | /* misc functions */ | ... | ... |
... | @@ -103,7 +103,7 @@ extern char * mu_getcwd __P((void)); | ... | @@ -103,7 +103,7 @@ extern char * mu_getcwd __P((void)); |
103 | 103 | ||
104 | extern int mu_spawnvp(const char* prog, const char* const av[], int* stat); | 104 | extern int mu_spawnvp(const char* prog, const char* const av[], int* stat); |
105 | 105 | ||
106 | typedef void *(*mu_retrieve_fp) __P((void *)); | 106 | typedef void *(*mu_retrieve_fp) __PMT((void *)); |
107 | extern void mu_register_retriever __P((list_t *pflist, mu_retrieve_fp fun)); | 107 | extern void mu_register_retriever __P((list_t *pflist, mu_retrieve_fp fun)); |
108 | extern void * mu_retrieve __P((list_t flist, void *data)); | 108 | extern void * mu_retrieve __P((list_t flist, void *data)); |
109 | 109 | ... | ... |
... | @@ -40,8 +40,10 @@ extern int observer_create __P ((observer_t *, void *owner)); | ... | @@ -40,8 +40,10 @@ extern int observer_create __P ((observer_t *, void *owner)); |
40 | extern void observer_destroy __P ((observer_t *, void *owner)); | 40 | extern void observer_destroy __P ((observer_t *, void *owner)); |
41 | extern void * observer_get_owner __P ((observer_t)); | 41 | extern void * observer_get_owner __P ((observer_t)); |
42 | extern int observer_action __P ((observer_t, size_t type)); | 42 | extern int observer_action __P ((observer_t, size_t type)); |
43 | extern int observer_set_action __P ((observer_t, int (*_action) __P ((observer_t, size_t)), void *owner)); | 43 | extern int observer_set_action __P ((observer_t, |
44 | extern int observer_set_destroy __P ((observer_t, int (*_destroy) __P((observer_t)), void *owner)); | 44 | int (*_action) __PMT ((observer_t, size_t)), void *owner)); |
45 | extern int observer_set_destroy __P ((observer_t, | ||
46 | int (*_destroy) __PMT((observer_t)), void *owner)); | ||
45 | extern int observer_set_flags __P ((observer_t, int flags)); | 47 | extern int observer_set_flags __P ((observer_t, int flags)); |
46 | 48 | ||
47 | extern int observable_create __P ((observable_t *, void *owner)); | 49 | extern int observable_create __P ((observable_t *, void *owner)); | ... | ... |
... | @@ -29,18 +29,18 @@ struct _record | ... | @@ -29,18 +29,18 @@ struct _record |
29 | { | 29 | { |
30 | /* Should not be access directly but rather by the stub functions. */ | 30 | /* Should not be access directly but rather by the stub functions. */ |
31 | const char *scheme; | 31 | const char *scheme; |
32 | int (*_url) __P ((url_t)); | 32 | int (*_url) __PMT ((url_t)); |
33 | int (*_mailbox) __P ((mailbox_t)); | 33 | int (*_mailbox) __PMT ((mailbox_t)); |
34 | int (*_mailer) __P ((mailer_t)); | 34 | int (*_mailer) __PMT ((mailer_t)); |
35 | int (*_folder) __P ((folder_t)); | 35 | int (*_folder) __PMT ((folder_t)); |
36 | void *data; /* back pointer. */ | 36 | void *data; /* back pointer. */ |
37 | 37 | ||
38 | /* Stub functions to override. The defaut is to return the fields. */ | 38 | /* Stub functions to override. The defaut is to return the fields. */ |
39 | int (*_is_scheme) __P ((record_t, const char *)); | 39 | int (*_is_scheme) __PMT ((record_t, const char *)); |
40 | int (*_get_url) __P ((record_t, int (*(*_url)) __PMT ((url_t)))); | 40 | int (*_get_url) __PMT ((record_t, int (*(*_url)) __PMT ((url_t)))); |
41 | int (*_get_mailbox) __P ((record_t, int (*(*_mailbox)) __PMT ((mailbox_t)))); | 41 | int (*_get_mailbox) __PMT ((record_t, int (*(*_mailbox)) __PMT ((mailbox_t)))); |
42 | int (*_get_mailer) __P ((record_t, int (*(*_mailer)) __PMT ((mailer_t)))); | 42 | int (*_get_mailer) __PMT ((record_t, int (*(*_mailer)) __PMT ((mailer_t)))); |
43 | int (*_get_folder) __P ((record_t, int (*(*_folder)) __PMT ((folder_t)))); | 43 | int (*_get_folder) __PMT ((record_t, int (*(*_folder)) __PMT ((folder_t)))); |
44 | }; | 44 | }; |
45 | 45 | ||
46 | /* Registration. */ | 46 | /* Registration. */ |
... | @@ -52,7 +52,7 @@ extern int unregistrar_record __P ((record_t)); | ... | @@ -52,7 +52,7 @@ extern int unregistrar_record __P ((record_t)); |
52 | extern int record_is_scheme __P ((record_t, const char *)); | 52 | extern int record_is_scheme __P ((record_t, const char *)); |
53 | extern int record_set_scheme __P ((record_t, const char *)); | 53 | extern int record_set_scheme __P ((record_t, const char *)); |
54 | extern int record_set_is_scheme __P ((record_t, int (*_is_scheme) | 54 | extern int record_set_is_scheme __P ((record_t, int (*_is_scheme) |
55 | __P ((record_t, const char *)))); | 55 | __PMT ((record_t, const char *)))); |
56 | 56 | ||
57 | /* Url. */ | 57 | /* Url. */ |
58 | extern int record_get_url __P ((record_t, int (*(*)) __PMT ((url_t)))); | 58 | extern int record_get_url __P ((record_t, int (*(*)) __PMT ((url_t)))); | ... | ... |
... | @@ -83,34 +83,34 @@ extern int stream_set_property __P ((stream_t, property_t, void *)); | ... | @@ -83,34 +83,34 @@ extern int stream_set_property __P ((stream_t, property_t, void *)); |
83 | extern int stream_get_state __P ((stream_t, int *pstate)); | 83 | extern int stream_get_state __P ((stream_t, int *pstate)); |
84 | 84 | ||
85 | extern int stream_set_destroy __P ((stream_t, | 85 | extern int stream_set_destroy __P ((stream_t, |
86 | void (*_destroy) __P ((stream_t)), void *owner)); | 86 | void (*_destroy) __PMT ((stream_t)), void *owner)); |
87 | 87 | ||
88 | extern int stream_set_open __P ((stream_t, | 88 | extern int stream_set_open __P ((stream_t, |
89 | int (*_open) __P ((stream_t)), void *owner)); | 89 | int (*_open) __PMT ((stream_t)), void *owner)); |
90 | 90 | ||
91 | extern int stream_set_close __P ((stream_t, | 91 | extern int stream_set_close __P ((stream_t, |
92 | int (*_close) __P ((stream_t)), void *owner)); | 92 | int (*_close) __PMT ((stream_t)), void *owner)); |
93 | 93 | ||
94 | extern int stream_set_fd __P ((stream_t, | 94 | extern int stream_set_fd __P ((stream_t, |
95 | int (*_get_fd)(stream_t, int *), void *owner)); | 95 | int (*_get_fd) __PMT ((stream_t, int *)), void *owner)); |
96 | 96 | ||
97 | extern int stream_set_read __P ((stream_t, | 97 | extern int stream_set_read __P ((stream_t, |
98 | int (*_read) __P ((stream_t, char *, size_t, off_t, size_t *)), void *owner)); | 98 | int (*_read) __PMT ((stream_t, char *, size_t, off_t, size_t *)), void *owner)); |
99 | 99 | ||
100 | extern int stream_set_readline __P ((stream_t, | 100 | extern int stream_set_readline __P ((stream_t, |
101 | int (*_readline) __P ((stream_t, char *, size_t, off_t, size_t *)), void *owner)); | 101 | int (*_readline) __PMT ((stream_t, char *, size_t, off_t, size_t *)), void *owner)); |
102 | 102 | ||
103 | extern int stream_set_size __P ((stream_t, | 103 | extern int stream_set_size __P ((stream_t, |
104 | int (*_size) __P ((stream_t, off_t *)), void *owner)); | 104 | int (*_size) __PMT ((stream_t, off_t *)), void *owner)); |
105 | 105 | ||
106 | extern int stream_set_truncate __P ((stream_t, | 106 | extern int stream_set_truncate __P ((stream_t, |
107 | int (*_truncate) __P ((stream_t, off_t)), void *owner)); | 107 | int (*_truncate) __PMT ((stream_t, off_t)), void *owner)); |
108 | 108 | ||
109 | extern int stream_set_write __P ((stream_t, | 109 | extern int stream_set_write __P ((stream_t, |
110 | int (*_write) __P ((stream_t, const char *, size_t, off_t, size_t *)), void *owner)); | 110 | int (*_write) __PMT ((stream_t, const char *, size_t, off_t, size_t *)), void *owner)); |
111 | 111 | ||
112 | extern int stream_set_flush __P ((stream_t, | 112 | extern int stream_set_flush __P ((stream_t, |
113 | int (*_flush) __P ((stream_t)), void *owner)); | 113 | int (*_flush) __PMT ((stream_t)), void *owner)); |
114 | 114 | ||
115 | #ifdef __cplusplus | 115 | #ifdef __cplusplus |
116 | } | 116 | } | ... | ... |
-
Please register or sign in to post a comment