X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=uip%2Fmhoutsbr.c;h=87e7943c26b5b186d02a2209ab48bc16d6959e20;hp=4d04b652f717280ad6f816be7141196851783373;hb=6e9577f324bef90765a5edc02044eb111ec48072;hpb=658569d39048e3e810be570210649ff9f628e835 diff --git a/uip/mhoutsbr.c b/uip/mhoutsbr.c index 4d04b65..87e7943 100644 --- a/uip/mhoutsbr.c +++ b/uip/mhoutsbr.c @@ -9,9 +9,7 @@ #include #include -#include #include -#include #include #include #include @@ -230,7 +228,7 @@ writeQuoted(CT ct, FILE *out) n = 0; } for (; *cp; cp++) { - if (n > CPERLIN - 3) { + if (n + 1 >= CPERLIN) { fputs("=\n", out); n = 0; } @@ -243,8 +241,16 @@ writeQuoted(CT ct, FILE *out) break; default: - if (*cp < '!' || *cp > '~') + if (*cp < '!' || *cp > '~') { goto three_print; + } + if (n == 0 && *cp == '.') { + /* + ** encode dot at start of line, + ** because it could be alone ... + */ + goto three_print; + } putc(*cp, out); n++; break;