Commit 1463c0c3 1463c0c32eca1ab83e1d35bd44e057c0b3d7002f by Sergey Poznyakoff

Use __PMT in nested declarations for C++ compatibility.

1 parent 96d175ea
......@@ -37,10 +37,10 @@ extern int body_get_filename __P ((body_t, char *, size_t, size_t *));
extern int body_size __P ((body_t, size_t*));
extern int body_set_size __P ((body_t, int (*_size)
__P ((body_t, size_t*)), void *owner));
__PMT ((body_t, size_t*)), void *owner));
extern int body_lines __P ((body_t, size_t *));
extern int body_set_lines __P ((body_t, int (*_lines)
__P ((body_t, size_t*)), void *owner));
__PMT ((body_t, size_t*)), void *owner));
#ifdef __cplusplus
}
......
......@@ -39,7 +39,8 @@ extern int mu_debug_print __P ((mu_debug_t debug, size_t level,
const char *format, ...));
extern int mu_debug_printv __P ((mu_debug_t debug, size_t level,
const char *format, va_list argp));
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));
extern int mu_debug_set_print __P ((mu_debug_t,
int (*_print) __PMT ((mu_debug_t, size_t level, const char *, va_list)), void *owner));
#ifdef __cplusplus
}
......
......@@ -24,13 +24,15 @@
extern "C" { /*}*/
#endif
int envelope_create (envelope_t *, void *);
void envelope_destroy (envelope_t *, void *);
void * envelope_get_owner (envelope_t);
int envelope_set_sender (envelope_t, int (*_sender) __P ((envelope_t, char *, size_t, size_t*)), void *);
int envelope_sender (envelope_t, char *, size_t, size_t *);
int envelope_set_date (envelope_t, int (*_date) __P ((envelope_t, char *, size_t , size_t *)), void *);
int envelope_date (envelope_t, char *, size_t, size_t *);
int envelope_create __P((envelope_t *, void *));
void envelope_destroy __P((envelope_t *, void *));
void * envelope_get_owner __P((envelope_t));
int envelope_set_sender __P((envelope_t,
int (*_sender) __PMT ((envelope_t, char *, size_t, size_t*)), void *));
int envelope_sender __P((envelope_t, char *, size_t, size_t *));
int envelope_set_date __P((envelope_t,
int (*_date) __PMT ((envelope_t, char *, size_t , size_t *)), void *));
int envelope_date __P((envelope_t, char *, size_t, size_t *));
#ifdef __cplusplus
}
......
......@@ -26,7 +26,7 @@
extern "C" {
#endif
typedef int (*error_pfn_t) __P ((const char *fmt, va_list ap));
typedef int (*error_pfn_t) __PMT ((const char *fmt, va_list ap));
extern int mu_verror __P ((const char *fmt, va_list ap));
extern int mu_error __P ((const char *fmt, ...));
......
......@@ -36,12 +36,12 @@ extern "C" {
struct _filter_record
{
const char *name;
int (*_filter) __P ((filter_t));
int (*_filter) __PMT ((filter_t));
void *data;
/* Stub function return the fields. */
int (*_is_filter) __P ((filter_record_t, const char *));
int (*_get_filter) __P ((filter_record_t, int (*(*_filter)) __PMT ((filter_t))));
int (*_is_filter) __PMT ((filter_record_t, const char *));
int (*_get_filter) __PMT ((filter_record_t, int (*(*_filter)) __PMT ((filter_t))));
};
......
......@@ -95,37 +95,37 @@ extern int header_lines __P ((header_t, size_t *));
extern int header_set_set_value __P ((header_t,
int (*_set_value) __P ((header_t,
const char *,
const char *,
int)), void *));
int (*_set_value) __PMT ((header_t,
const char *,
const char *,
int)), void *));
extern int header_set_get_value __P ((header_t,
int (*_get_value) __P ((header_t,
const char *,
char *,
size_t,
size_t *)),
int (*_get_value) __PMT ((header_t,
const char *,
char *,
size_t,
size_t *)),
void *));
extern int header_set_get_fvalue __P ((header_t,
int (*_get_value) __P ((header_t,
const char *,
char *,
size_t,
size_t *)),
int (*_get_value) __PMT ((header_t,
const char *,
char *,
size_t,
size_t *)),
void *));
extern int header_set_size __P ((header_t, int (*_size)
__P ((header_t, size_t *)), void *));
__PMT ((header_t, size_t *)), void *));
extern int header_set_lines __P ((header_t,
int (*_lines) __P ((header_t,
size_t *)), void *));
int (*_lines) __PMT ((header_t,
size_t *)), void *));
extern int header_set_fill __P ((header_t,
int (*_fill) __P ((header_t, char *,
size_t, off_t,
size_t *)), void *owner));
int (*_fill) __PMT ((header_t, char *,
size_t, off_t,
size_t *)), void *owner));
#ifdef __cplusplus
}
......
......@@ -60,35 +60,35 @@ extern int message_get_observable __P ((message_t, observable_t *));
extern int message_is_multipart __P ((message_t, int *));
extern int message_set_is_multipart __P ((message_t, int (*_is_multipart)
__P ((message_t, int *)), void *));
__PMT ((message_t, int *)), void *));
extern int message_size __P ((message_t, size_t *));
extern int message_set_size __P ((message_t, int (*_size)
__P ((message_t, size_t *)),
__PMT ((message_t, size_t *)),
void *owner));
extern int message_lines __P ((message_t, size_t *));
extern int message_set_lines __P ((message_t, int (*_lines)
__P ((message_t, size_t *)),
__PMT ((message_t, size_t *)),
void *owner));
extern int message_get_num_parts __P ((message_t, size_t *nparts));
extern int message_set_get_num_parts __P ((message_t, int (*_get_num_parts)
__P ((message_t, size_t *)),
__PMT ((message_t, size_t *)),
void *owner));
extern int message_get_part __P ((message_t, size_t, message_t *));
extern int message_set_get_part __P ((message_t, int (*_get_part)
__P ((message_t, size_t,
message_t *)), void *owner));
__PMT ((message_t, size_t,
message_t *)), void *owner));
extern int message_get_uidl __P ((message_t, char *, size_t, size_t *));
extern int message_set_uidl __P ((message_t, int (*_get_uidl)
__P ((message_t, char *, size_t,
size_t *)), void *owner));
__PMT ((message_t, char *, size_t,
size_t *)), void *owner));
extern int message_get_uid __P ((message_t, size_t *));
extern int message_set_uid __P ((message_t, int (*_get_uid)
__P ((message_t, size_t *)),
__PMT ((message_t, size_t *)),
void *owner));
/* misc functions */
......
......@@ -103,7 +103,7 @@ extern char * mu_getcwd __P((void));
extern int mu_spawnvp(const char* prog, const char* const av[], int* stat);
typedef void *(*mu_retrieve_fp) __P((void *));
typedef void *(*mu_retrieve_fp) __PMT((void *));
extern void mu_register_retriever __P((list_t *pflist, mu_retrieve_fp fun));
extern void * mu_retrieve __P((list_t flist, void *data));
......
......@@ -40,8 +40,10 @@ extern int observer_create __P ((observer_t *, void *owner));
extern void observer_destroy __P ((observer_t *, void *owner));
extern void * observer_get_owner __P ((observer_t));
extern int observer_action __P ((observer_t, size_t type));
extern int observer_set_action __P ((observer_t, int (*_action) __P ((observer_t, size_t)), void *owner));
extern int observer_set_destroy __P ((observer_t, int (*_destroy) __P((observer_t)), void *owner));
extern int observer_set_action __P ((observer_t,
int (*_action) __PMT ((observer_t, size_t)), void *owner));
extern int observer_set_destroy __P ((observer_t,
int (*_destroy) __PMT((observer_t)), void *owner));
extern int observer_set_flags __P ((observer_t, int flags));
extern int observable_create __P ((observable_t *, void *owner));
......
......@@ -29,18 +29,18 @@ struct _record
{
/* Should not be access directly but rather by the stub functions. */
const char *scheme;
int (*_url) __P ((url_t));
int (*_mailbox) __P ((mailbox_t));
int (*_mailer) __P ((mailer_t));
int (*_folder) __P ((folder_t));
int (*_url) __PMT ((url_t));
int (*_mailbox) __PMT ((mailbox_t));
int (*_mailer) __PMT ((mailer_t));
int (*_folder) __PMT ((folder_t));
void *data; /* back pointer. */
/* Stub functions to override. The defaut is to return the fields. */
int (*_is_scheme) __P ((record_t, const char *));
int (*_get_url) __P ((record_t, int (*(*_url)) __PMT ((url_t))));
int (*_get_mailbox) __P ((record_t, int (*(*_mailbox)) __PMT ((mailbox_t))));
int (*_get_mailer) __P ((record_t, int (*(*_mailer)) __PMT ((mailer_t))));
int (*_get_folder) __P ((record_t, int (*(*_folder)) __PMT ((folder_t))));
int (*_is_scheme) __PMT ((record_t, const char *));
int (*_get_url) __PMT ((record_t, int (*(*_url)) __PMT ((url_t))));
int (*_get_mailbox) __PMT ((record_t, int (*(*_mailbox)) __PMT ((mailbox_t))));
int (*_get_mailer) __PMT ((record_t, int (*(*_mailer)) __PMT ((mailer_t))));
int (*_get_folder) __PMT ((record_t, int (*(*_folder)) __PMT ((folder_t))));
};
/* Registration. */
......@@ -52,7 +52,7 @@ extern int unregistrar_record __P ((record_t));
extern int record_is_scheme __P ((record_t, const char *));
extern int record_set_scheme __P ((record_t, const char *));
extern int record_set_is_scheme __P ((record_t, int (*_is_scheme)
__P ((record_t, const char *))));
__PMT ((record_t, const char *))));
/* Url. */
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 *));
extern int stream_get_state __P ((stream_t, int *pstate));
extern int stream_set_destroy __P ((stream_t,
void (*_destroy) __P ((stream_t)), void *owner));
void (*_destroy) __PMT ((stream_t)), void *owner));
extern int stream_set_open __P ((stream_t,
int (*_open) __P ((stream_t)), void *owner));
int (*_open) __PMT ((stream_t)), void *owner));
extern int stream_set_close __P ((stream_t,
int (*_close) __P ((stream_t)), void *owner));
int (*_close) __PMT ((stream_t)), void *owner));
extern int stream_set_fd __P ((stream_t,
int (*_get_fd)(stream_t, int *), void *owner));
int (*_get_fd) __PMT ((stream_t, int *)), void *owner));
extern int stream_set_read __P ((stream_t,
int (*_read) __P ((stream_t, char *, size_t, off_t, size_t *)), void *owner));
int (*_read) __PMT ((stream_t, char *, size_t, off_t, size_t *)), void *owner));
extern int stream_set_readline __P ((stream_t,
int (*_readline) __P ((stream_t, char *, size_t, off_t, size_t *)), void *owner));
int (*_readline) __PMT ((stream_t, char *, size_t, off_t, size_t *)), void *owner));
extern int stream_set_size __P ((stream_t,
int (*_size) __P ((stream_t, off_t *)), void *owner));
int (*_size) __PMT ((stream_t, off_t *)), void *owner));
extern int stream_set_truncate __P ((stream_t,
int (*_truncate) __P ((stream_t, off_t)), void *owner));
int (*_truncate) __PMT ((stream_t, off_t)), void *owner));
extern int stream_set_write __P ((stream_t,
int (*_write) __P ((stream_t, const char *, size_t, off_t, size_t *)), void *owner));
int (*_write) __PMT ((stream_t, const char *, size_t, off_t, size_t *)), void *owner));
extern int stream_set_flush __P ((stream_t,
int (*_flush) __P ((stream_t)), void *owner));
int (*_flush) __PMT ((stream_t)), void *owner));
#ifdef __cplusplus
}
......