aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2002-04-01 08:16:29 +0000
committerEric S. Raymond <esr@thyrsus.com>2002-04-01 08:16:29 +0000
commitd988048914d0f54c06c3bf86ab97a4c14b9e78fe (patch)
treebf5d8b17652a97e6522d75b0ffaf874403010146
parent71bc7ce6858ee50574dc574a948ea24b5d2d0bfc (diff)
downloadfetchmail-d988048914d0f54c06c3bf86ab97a4c14b9e78fe.tar.gz
fetchmail-d988048914d0f54c06c3bf86ab97a4c14b9e78fe.tar.bz2
fetchmail-d988048914d0f54c06c3bf86ab97a4c14b9e78fe.zip
Other routine fixups.
svn path=/trunk/; revision=3604
-rw-r--r--NEWS3
-rw-r--r--daemon.c2
-rw-r--r--fetchmail.h33
-rw-r--r--imap.c2
-rw-r--r--odmr.c7
-rw-r--r--report.c3
6 files changed, 36 insertions, 14 deletions
diff --git a/NEWS b/NEWS
index bb67df7e..a8a2d9db 100644
--- a/NEWS
+++ b/NEWS
@@ -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:
diff --git a/daemon.c b/daemon.c
index d2a5b2d9..220d0d0c 100644
--- a/daemon.c
+++ b/daemon.c
@@ -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
diff --git a/imap.c b/imap.c
index 96f485cf..cf8d001f 100644
--- a/imap.c
+++ b/imap.c
@@ -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 (;;)
diff --git a/odmr.c b/odmr.c
index 0c4db033..3dcb3e62 100644
--- a/odmr.c
+++ b/odmr.c
@@ -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 */
diff --git a/report.c b/report.c
index 11be80d9..d201c740 100644
--- a/report.c
+++ b/report.c
@@ -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)