From: Joel Reicher Date: Thu, 8 Nov 2007 02:28:38 +0000 (+0000) Subject: Insert types for args of some function pointers to improve type checking. X-Git-Tag: nmh-1_3_RC1~6 X-Git-Url: http://git.marmaro.de/?p=mmh;a=commitdiff_plain;h=da831514de01e2407cef37c118ffff0526a486d0 Insert types for args of some function pointers to improve type checking. --- diff --git a/h/popsbr.h b/h/popsbr.h index e3e97b4..5d0ed31 100644 --- a/h/popsbr.h +++ b/h/popsbr.h @@ -25,11 +25,11 @@ int pop_exists (int (*)()); int pop_init (char *, char *, char *, char *, int, int, int, int, char *); int pop_fd (char *, int, char *, int); int pop_stat (int *, int *); -int pop_retr (int, int (*)()); +int pop_retr (int, int (*)(char *)); int pop_dele (int); int pop_noop (void); int pop_rset (void); -int pop_top (int, int, int (*)()); +int pop_top (int, int, int (*)(char *)); int pop_quit (void); int pop_done (void); diff --git a/h/prototypes.h b/h/prototypes.h index 0f05025..2f4f651 100644 --- a/h/prototypes.h +++ b/h/prototypes.h @@ -71,7 +71,7 @@ int m_atoi (char *); char *m_backup (char *); int m_convert (struct msgs *, char *); char *m_draft (char *, char *, int, int *); -void m_eomsbr (int (*)()); +void m_eomsbr (int (*)(int)); int m_getfld (int, unsigned char *, unsigned char *, int, FILE *); int m_gmprot (void); char *m_maildir (char *); diff --git a/h/utils.h b/h/utils.h index 9c19e92..8f32754 100644 --- a/h/utils.h +++ b/h/utils.h @@ -10,7 +10,7 @@ void *mh_xrealloc(void *, size_t); char *pwd(void); char *add(char *, char *); int folder_exists(char *); -void create_folder(char *, int, void (*)()); +void create_folder(char *, int, void (*)(int)); int num_digits(int); struct msgs_array { diff --git a/sbr/m_getfld.c b/sbr/m_getfld.c index c085bf5..6c15886 100644 --- a/sbr/m_getfld.c +++ b/sbr/m_getfld.c @@ -183,7 +183,7 @@ static int fdelimlen; static unsigned char *edelim; static int edelimlen; -static int (*eom_action)() = NULL; +static int (*eom_action)(int) = NULL; #ifdef _FSTDIO # define _ptr _p /* Gag */ @@ -596,7 +596,7 @@ m_unknown(FILE *iob) void -m_eomsbr (int (*action)()) +m_eomsbr (int (*action)(int)) { if ((eom_action = action)) { msg_style = MS_MSH; diff --git a/sbr/utils.c b/sbr/utils.c index 87d368d..d822995 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -148,7 +148,7 @@ int folder_exists(char *folder) * Check to see if a folder exists, if not, prompt the user to create * it. */ -void create_folder(char *folder, int autocreate, void (*done_callback)()) +void create_folder(char *folder, int autocreate, void (*done_callback)(int)) { struct stat st; extern int errno; diff --git a/uip/popsbr.c b/uip/popsbr.c index 1df74d9..8e14d52 100644 --- a/uip/popsbr.c +++ b/uip/popsbr.c @@ -104,7 +104,7 @@ static int pop_auth_sasl(char *, char *, char *); static int sasl_fgetc(FILE *); #endif /* CYRUS_SASL */ -static int traverse (int (*)(), const char *, ...); +static int traverse (int (*)(char *), const char *, ...); static int vcommand(const char *, va_list); static int sasl_getline (char *, int, FILE *); static int putline (char *, FILE *); @@ -823,7 +823,7 @@ pop_list (int msgno, int *nmsgs, int *msgs, int *bytes) int -pop_retr (int msgno, int (*action)()) +pop_retr (int msgno, int (*action)(char *)) { #ifndef NNTP return traverse (action, "RETR %d", (targ_t) msgno); @@ -834,7 +834,7 @@ pop_retr (int msgno, int (*action)()) static int -traverse (int (*action)(), const char *fmt, ...) +traverse (int (*action)(char *), const char *fmt, ...) { int result; va_list ap; @@ -895,7 +895,7 @@ pop_rset (void) int -pop_top (int msgno, int lines, int (*action)()) +pop_top (int msgno, int lines, int (*action)(char *)) { #ifndef NNTP return traverse (action, "TOP %d %d", (targ_t) msgno, (targ_t) lines);