#include <h/mh.h>
#include <fcntl.h>
-#include <h/signals.h>
#include <errno.h>
-#include <signal.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
*/
int output_message(CT, char *);
int output_message_fp(CT, FILE *, char *);
-int writeBase64aux(FILE *, FILE *);
/*
** static prototypes
static int write8Bit(CT, FILE *);
static int writeQuoted(CT, FILE *);
static int writeBase64(CT, FILE *);
+static int writeBase64aux(FILE *, FILE *);
/*
n = 0;
}
for (; *cp; cp++) {
- if (n > CPERLIN - 3) {
+ if (n + 1 >= CPERLIN) {
fputs("=\n", out);
n = 0;
}
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;
}
-int
+static int
writeBase64aux(FILE *in, FILE *out)
{
unsigned int cc, n;