summaryrefslogtreecommitdiff
path: root/mail/metamail/files/patch-metamail_mailto.c
diff options
context:
space:
mode:
authorPawel Pekala <pawel@FreeBSD.org>2012-10-29 17:29:56 +0000
committerPawel Pekala <pawel@FreeBSD.org>2012-10-29 17:29:56 +0000
commit5a2770ba3837b731d96a89bd3ba6ae02a86ff42f (patch)
treeb3e7d5eb5c0f847591ea6b6f1c81b1eacdcd2c9a /mail/metamail/files/patch-metamail_mailto.c
parentFix build with clang (diff)
- Fix build with clang
- Add LICENSE PR: ports/172719 Submitted by: KATO Tsuguru <tkato432@yahoo.com> Feature safe: yes
Notes
Notes: svn path=/head/; revision=306624
Diffstat (limited to 'mail/metamail/files/patch-metamail_mailto.c')
-rw-r--r--mail/metamail/files/patch-metamail_mailto.c67
1 files changed, 65 insertions, 2 deletions
diff --git a/mail/metamail/files/patch-metamail_mailto.c b/mail/metamail/files/patch-metamail_mailto.c
index 42c6451cadaa..7d3d78adc1e0 100644
--- a/mail/metamail/files/patch-metamail_mailto.c
+++ b/mail/metamail/files/patch-metamail_mailto.c
@@ -1,5 +1,5 @@
---- metamail/mailto.c.orig Wed Feb 9 21:30:26 1994
-+++ metamail/mailto.c Mon Dec 18 11:46:21 2006
+--- metamail/mailto.c.orig 1994-02-10 05:30:26.000000000 +0900
++++ metamail/mailto.c 2012-10-13 08:04:36.000000000 +0900
@@ -37,6 +37,8 @@
*/
@@ -25,6 +25,15 @@
&& strncmp(CharacterSet, "iso-8859-", 9)) {
fprintf(stderr, "mailto: Unsupported character set: %s\n", CharacterSet);
exit(-1);
+@@ -1072,7 +1074,7 @@
+ #endif
+ }
+ fprintf(fp, "Message-ID: %s\n", newid());
+- if (!FirstPart) return; /* empty body */
++ if (!FirstPart) return(0); /* empty body */
+ if (FirstPart->next) {
+ char boundary[120];
+ #ifdef AMIGA
@@ -1130,6 +1132,7 @@
if (part->isrich) {
if (strcmp(CharacterSet, "us-ascii")
@@ -41,6 +50,15 @@
|| part->encoding_type_needed != ENC_NONE)) {
fprintf(fp, "; charset=\"%s\"\n", CharacterSet);
} else fputs("\n", fp);
+@@ -1346,7 +1350,7 @@
+ }
+ part->isrich = 1;
+ PartEndsWithNewline=1;
+- return;
++ return(0);
+ }
+ InNewLineSequence = 0;
+ if (RightToLeftMode) {
@@ -1745,6 +1749,7 @@
}
printf("\n\nEnter your choice as a number from 0 to %d: ", i);
@@ -81,6 +99,15 @@
while (s && *s && isspace((unsigned char) *s)) ++s;
if (s && (*s == 'y' || *s == 'Y')) break;
continue;
+@@ -2109,7 +2118,7 @@
+ fpout = fopen(FirstPart->filename, "a");
+ free(CmdBuf);
+ free(CmdBuf2);
+- return;
++ return(0);
+ }
+ lastmp = mp = FirstPart;
+ while (mp) {
@@ -2137,6 +2146,7 @@
printf("2: %s\n", CmdBuf);
printf("\n\nEnter 1 or 2, or 0 to not edit it: ");
@@ -89,3 +116,39 @@
fgets(LineBuf, sizeof(LineBuf), stdin);
ans = atoi(LineBuf);
} else ans = 2;
+@@ -2221,7 +2231,7 @@
+ int LineAlloced = 0, LineCount = 0;
+
+ fp = fopen(fname, "r");
+- if (!fp) return;
++ if (!fp) return(0);
+ do {
+ LineBuf=NextAliasLine(LineBuf, &LineAlloced, &LineCount, fp, IsAndrew);
+ if (LineCount == 0) continue;
+@@ -2310,7 +2320,7 @@
+ if (s != s2) printf("mailto: ignoring bad alias line in init file: %s\n", aliasline);
+ free(s);
+ free(tmpalias);
+- return;
++ return(0);
+ }
+ *s2++ = '\0';
+ tmpalias->shortname = s;
+@@ -2364,7 +2374,7 @@
+ {
+ char *firstnonascii, *firstascii;
+
+- if (!s) return;
++ if (!s) return(0);
+ firstnonascii=firstbad(s);
+ if (firstnonascii) {
+ if (!strcmp(CharacterSet, "us-ascii")) {
+@@ -2454,7 +2464,7 @@
+ /* if (!lc2strcmp(name, tmpalias->shortname)) { */
+ *end = savechar;
+ EmitAddresses(fp, tmpalias->longname, hdr);
+- return;
++ return(0);
+ }
+ }
+ *end = savechar;