diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-04-01 21:38:38 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-04-01 21:38:38 +0200 |
commit | f333f5cf33a6acdaeb39f7c707ec82012063770f (patch) | |
tree | 1969d203d9258aa38158f9c82d8b32e6b9f8937b /rfc822.c | |
parent | 3b6e696c42727d8f8579e085053c4beaef441587 (diff) | |
download | fetchmail-f333f5cf33a6acdaeb39f7c707ec82012063770f.tar.gz fetchmail-f333f5cf33a6acdaeb39f7c707ec82012063770f.tar.bz2 fetchmail-f333f5cf33a6acdaeb39f7c707ec82012063770f.zip |
Fix line ends in address rewriting reports.
Reported by Frédéric Marchal.
Diffstat (limited to 'rfc822.c')
-rw-r--r-- | rfc822.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -41,6 +41,8 @@ const char *program_name = "rfc822"; #define HEADER_END(p) ((p)[0] == '\n' && ((p)[1] != ' ' && (p)[1] != '\t')) +#define BEFORE_EOL(s) (strcspn((s), "\r\n")) + char *reply_hack( char *buf /* header to be hacked */, const char *host /* server hostname */, @@ -73,7 +75,8 @@ char *reply_hack( #ifndef MAIN if (outlevel >= O_DEBUG) - report_build(stdout, GT_("About to rewrite %s"), buf); + report_build(stdout, GT_("About to rewrite %.*s...\n"), + BEFORE_EOL(buf), buf); /* make room to hack the address; buf must be malloced */ for (cp = buf; *cp; cp++) @@ -209,7 +212,8 @@ char *reply_hack( #ifndef MAIN if (outlevel >= O_DEBUG) - report_complete(stdout, GT_("Rewritten version is %s\n"), buf); + report_complete(stdout, GT_("...rewritten version is %.*s.\n"), + BEFORE_EOL(buf), buf); #endif /* MAIN */ *length = strlen(buf); return(buf); |