projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This is mmh-0.3
[mmh]
/
uip
/
mhoutsbr.c
diff --git
a/uip/mhoutsbr.c
b/uip/mhoutsbr.c
index
d517e6e
..
87e7943
100644
(file)
--- a/
uip/mhoutsbr.c
+++ b/
uip/mhoutsbr.c
@@
-9,9
+9,7
@@
#include <h/mh.h>
#include <fcntl.h>
#include <h/mh.h>
#include <fcntl.h>
-#include <h/signals.h>
#include <errno.h>
#include <errno.h>
-#include <signal.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
#include <h/tws.h>
#include <h/mime.h>
#include <h/mhparse.h>
@@
-25,7
+23,6
@@
static char nib2b64[0x40+1] =
*/
int output_message(CT, char *);
int output_message_fp(CT, FILE *, char *);
*/
int output_message(CT, char *);
int output_message_fp(CT, FILE *, char *);
-int writeBase64aux(FILE *, FILE *);
/*
** static prototypes
/*
** static prototypes
@@
-35,6
+32,7
@@
static void output_headers(CT, FILE *);
static int write8Bit(CT, FILE *);
static int writeQuoted(CT, FILE *);
static int writeBase64(CT, FILE *);
static int write8Bit(CT, FILE *);
static int writeQuoted(CT, FILE *);
static int writeBase64(CT, FILE *);
+static int writeBase64aux(FILE *, FILE *);
/*
/*
@@
-96,9
+94,6
@@
output_content(CT ct, FILE *out)
struct multipart *m;
struct part *part;
struct multipart *m;
struct part *part;
- if (ct->c_rfc934)
- putc('\n', out);
-
m = (struct multipart *) ct->c_ctparams;
for (part = m->mp_parts; part; part = part->mp_next) {
CT p = part->mp_part;
m = (struct multipart *) ct->c_ctparams;
for (part = m->mp_parts; part; part = part->mp_next) {
CT p = part->mp_part;
@@
-233,7
+228,7
@@
writeQuoted(CT ct, FILE *out)
n = 0;
}
for (; *cp; cp++) {
n = 0;
}
for (; *cp; cp++) {
- if (n > CPERLIN - 3) {
+ if (n + 1 >= CPERLIN) {
fputs("=\n", out);
n = 0;
}
fputs("=\n", out);
n = 0;
}
@@
-246,8
+241,16
@@
writeQuoted(CT ct, FILE *out)
break;
default:
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;
goto three_print;
+ }
putc(*cp, out);
n++;
break;
putc(*cp, out);
n++;
break;
@@
-296,7
+299,7
@@
writeBase64(CT ct, FILE *out)
}
}
-int
+static int
writeBase64aux(FILE *in, FILE *out)
{
unsigned int cc, n;
writeBase64aux(FILE *in, FILE *out)
{
unsigned int cc, n;