Insert types for args of some function pointers to improve type checking.
authorJoel Reicher <jjr@panacea.null.org>
Thu, 8 Nov 2007 02:28:38 +0000 (02:28 +0000)
committerJoel Reicher <jjr@panacea.null.org>
Thu, 8 Nov 2007 02:28:38 +0000 (02:28 +0000)
h/popsbr.h
h/prototypes.h
h/utils.h
sbr/m_getfld.c
sbr/utils.c
uip/popsbr.c

index e3e97b4..5d0ed31 100644 (file)
@@ -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_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_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);
 
 int pop_quit (void);
 int pop_done (void);
 
index 0f05025..2f4f651 100644 (file)
@@ -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 *);
 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 *);
 int m_getfld (int, unsigned char *, unsigned char *, int, FILE *);
 int m_gmprot (void);
 char *m_maildir (char *);
index 9c19e92..8f32754 100644 (file)
--- 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 *);
 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 {
 int num_digits(int);
 
 struct msgs_array {
index c085bf5..6c15886 100644 (file)
@@ -183,7 +183,7 @@ static int fdelimlen;
 static unsigned char *edelim;
 static int edelimlen;
 
 static unsigned char *edelim;
 static int edelimlen;
 
-static int (*eom_action)() = NULL;
+static int (*eom_action)(int) = NULL;
 
 #ifdef _FSTDIO
 # define _ptr    _p            /* Gag   */
 
 #ifdef _FSTDIO
 # define _ptr    _p            /* Gag   */
@@ -596,7 +596,7 @@ m_unknown(FILE *iob)
 
 
 void
 
 
 void
-m_eomsbr (int (*action)())
+m_eomsbr (int (*action)(int))
 {
     if ((eom_action = action)) {
        msg_style = MS_MSH;
 {
     if ((eom_action = action)) {
        msg_style = MS_MSH;
index 87d368d..d822995 100644 (file)
@@ -148,7 +148,7 @@ int folder_exists(char *folder)
  *      Check to see if a folder exists, if not, prompt the user to create
  *      it.
  */
  *      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;
 {
     struct stat st;
     extern int errno;
index 1df74d9..8e14d52 100644 (file)
@@ -104,7 +104,7 @@ static int pop_auth_sasl(char *, char *, char *);
 static int sasl_fgetc(FILE *);
 #endif /* CYRUS_SASL */
 
 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 *);
 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
 
 
 int
-pop_retr (int msgno, int (*action)())
+pop_retr (int msgno, int (*action)(char *))
 {
 #ifndef NNTP
     return traverse (action, "RETR %d", (targ_t) msgno);
 {
 #ifndef NNTP
     return traverse (action, "RETR %d", (targ_t) msgno);
@@ -834,7 +834,7 @@ pop_retr (int msgno, int (*action)())
 
 
 static int
 
 
 static int
-traverse (int (*action)(), const char *fmt, ...)
+traverse (int (*action)(char *), const char *fmt, ...)
 {
     int result;
     va_list ap;
 {
     int result;
     va_list ap;
@@ -895,7 +895,7 @@ pop_rset (void)
 
 
 int
 
 
 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);
 {
 #ifndef NNTP
     return traverse (action, "TOP %d %d", (targ_t) msgno, (targ_t) lines);