diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | daemon.c | 2 | ||||
-rw-r--r-- | fetchmail.h | 33 | ||||
-rw-r--r-- | imap.c | 2 | ||||
-rw-r--r-- | odmr.c | 7 | ||||
-rw-r--r-- | report.c | 3 |
6 files changed, 36 insertions, 14 deletions
@@ -2,7 +2,7 @@ (The `lines' figures total .c, .h, .l, and .y files under version control.) -* Updated Turkish translation. +* Updated Turkish and Japanese translations. * Added warning about auth failures on the GMX server. * HMH's Debian 5.9.10 patches: 1. Fix minor typo in FAQ @@ -20,6 +20,7 @@ 7. Stop stupid complaint about turning off SSL being illegal without SSL support. 8. Byrial Jensen <byrial@image.dk> i18n fixes +* Sunil Shetye's attribute patch. fetchmail-5.9.10 (Sun Mar 10 15:09:57 EST 2002), 21529 lines: @@ -205,7 +205,7 @@ daemonize (const char *logfile, void (*termhook)(int)) sigaction (SIGHUP, &sa_new, NULL); #endif /* HAVE_SIGACTION */ if ((childpid = fork()) < 0) { - report(stderr, "fork (%)\n", strerror(errno)); + report(stderr, "fork (%s)\n", strerror(errno)); return(PS_IOERR); } else if (childpid > 0) { diff --git a/fetchmail.h b/fetchmail.h index bacad070..a3bf4913 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -391,13 +391,26 @@ extern char *sdps_envto; /* prototypes for globally callable functions */ +/* from /usr/include/sys/cdefs.h */ +#if !defined __GNUC__ || __GNUC__ < 2 +# define __attribute__(xyz)» /* Ignore. */ +#endif + /* error.c: Error reporting */ #if defined(HAVE_STDARG_H) void report_init(int foreground); -void report (FILE *fp, const char *format, ...); -void report_build (FILE *fp, const char *format, ...); -void report_complete (FILE *fp, const char *format, ...); -void report_at_line (FILE *fp, int, const char *, unsigned int, const char *, ...); +void report (FILE *fp, const char *format, ...) + __attribute__ ((format (printf, 2, 3))) + ; +void report_build (FILE *fp, const char *format, ...) + __attribute__ ((format (printf, 2, 3))) + ; +void report_complete (FILE *fp, const char *format, ...) + __attribute__ ((format (printf, 2, 3))) + ; +void report_at_line (FILE *fp, int, const char *, unsigned int, const char *, ...) + __attribute__ ((format (printf, 5, 6))) + ; #else void report (); void report_build (); @@ -418,9 +431,13 @@ int readheaders(int sock, int num); int readbody(int sock, struct query *ctl, flag forward, int len); #if defined(HAVE_STDARG_H) -void gen_send(int sock, const char *, ... ); +void gen_send(int sock, const char *, ... ) + __attribute__ ((format (printf, 2, 3))) + ; int gen_recv(int sock, char *buf, int size); -int gen_transact(int sock, const char *, ... ); +int gen_transact(int sock, const char *, ... ) + __attribute__ ((format (printf, 2, 3))) + ; #else void gen_send(); int gen_recv(); @@ -470,7 +487,9 @@ void release_sink(struct query *); int close_sink(struct query *, struct msgblk *, flag); int open_warning_by_mail(struct query *, struct msgblk *); #if defined(HAVE_STDARG_H) -void stuff_warning(struct query *, const char *, ... ); +void stuff_warning(struct query *, const char *, ... ) + __attribute__ ((format (printf, 2, 3))) + ; #else void stuff_warning(); #endif @@ -667,7 +667,7 @@ static int imap_getsizes(int sock, int count, int *sizes) * known-bad size value. */ if (count == 1) - gen_send(sock, "FETCH 1 RFC822.SIZE", count); + gen_send(sock, "FETCH 1 RFC822.SIZE"); else gen_send(sock, "FETCH 1:%d RFC822.SIZE", count); for (;;) @@ -95,12 +95,12 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, switch(atoi(buf)) { case 250: /* OK, turnaround is about to happe */ - if (outlevel >= O_SILENT) + if (outlevel > O_SILENT) report(stdout, GT_("Turnaround now...\n")); break; case 450: /* ATRN request refused */ - if (outlevel >= O_SILENT) + if (outlevel > O_SILENT) report(stdout, GT_("ATRN request refused.\n")); return(PS_PROTOCOL); @@ -109,7 +109,8 @@ static int odmr_getrange(int sock, struct query *ctl, const char *id, return(PS_EXCLUDE); case 453: /* You have no mail */ - report(stderr, GT_("You have no mail.\n")); + if (outlevel > O_SILENT) + report(stderr, GT_("You have no mail.\n")); return(PS_NOMAIL); case 502: /* Command not implemented */ @@ -15,6 +15,7 @@ #endif #include <stdio.h> #include <errno.h> +#include <string.h> #if defined(HAVE_SYSLOG) #include <syslog.h> #endif @@ -104,7 +105,7 @@ report (FILE *errfp, message, va_alist) if (partial_message_size_used != 0) { partial_message_size_used = 0; - report (errfp, 0, GT_("%s (log message incomplete)"), partial_message); + report (errfp, GT_("%s (log message incomplete)"), partial_message); } #if defined(HAVE_SYSLOG) |