aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2004-11-10 19:57:47 +0000
committerMatthias Andree <matthias.andree@gmx.de>2004-11-10 19:57:47 +0000
commit2ed8dc12cd5ffbbff9cd25e928a720be3596f2af (patch)
tree994d80cb32bb77ad0f380f9254a7e3171d2ec051 /driver.c
parent13c27199231cbc2cc83969ada741b95be1cca4d3 (diff)
downloadfetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.tar.gz
fetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.tar.bz2
fetchmail-2ed8dc12cd5ffbbff9cd25e928a720be3596f2af.zip
Clean up the horrible HAVE_[V]SNPRINTF mess, use Trio on systems that lack
real snprintf or vsnprintf. svn path=/trunk/; revision=3996
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/driver.c b/driver.c
index c48defd8..fcc6b8d7 100644
--- a/driver.c
+++ b/driver.c
@@ -378,12 +378,7 @@ static void mark_oversized(struct query *ctl, int num, int size)
int cnt;
/* convert size to string */
-#ifdef HAVE_SNPRINTF
- snprintf(sizestr, sizeof(sizestr),
-#else
- sprintf(sizestr,
-#endif /* HAVE_SNPRINTF */
- "%d", size);
+ snprintf(sizestr, sizeof(sizestr), "%d", size);
/* build a list of skipped messages
* val.id = size of msg (string cnvt)
@@ -1085,16 +1080,8 @@ static int do_session(
else if (h_errno == TRY_AGAIN)
strcpy(errbuf, GT_("temporary name server error."));
else
-#ifdef HAVE_SNPRINTF
- snprintf
-#else
- sprintf
-#endif /* HAVE_SNPRINTF */
- (errbuf,
-#ifdef HAVE_SNPRINTF
- sizeof(errbuf),
-#endif
- GT_("unknown DNS error %d."), h_errno);
+ snprintf (errbuf, sizeof(errbuf),
+ GT_("unknown DNS error %d."), h_errno);
}
else
#endif /* HAVE_RES_SEARCH */
@@ -1352,20 +1339,11 @@ is restored."));
/* show user how many messages we downloaded */
if (idp->id)
-#ifdef HAVE_SNPRINTF
(void) snprintf(buf, sizeof(buf),
-#else
- (void) sprintf(buf,
-#endif /* HAVE_SNPRINTF */
GT_("%s at %s (folder %s)"),
ctl->remotename, ctl->server.pollname, idp->id);
else
-#ifdef HAVE_SNPRINTF
- (void) snprintf(buf, sizeof(buf),
-#else
- (void) sprintf(buf,
-#endif /* HAVE_SNPRINTF */
- GT_("%s at %s"),
+ (void) snprintf(buf, sizeof(buf), GT_("%s at %s"),
ctl->remotename, ctl->server.pollname);
if (outlevel > O_SILENT)
{