From c35d7880c9ded9c2a2dc7b147049e9e48ae00265 Mon Sep 17 00:00:00 2001 From: joerg Date: Fri, 26 Oct 2012 20:27:15 +0000 Subject: Fix a bunch of missing prototypes and incorrect not as void tagged functions. --- mail/metamail/distinfo | 12 ++- mail/metamail/patches/patch-af | 133 +++++++++++++++++++++++-- mail/metamail/patches/patch-ai | 62 ++++++++++-- mail/metamail/patches/patch-ar | 57 +++++++++-- mail/metamail/patches/patch-at | 21 +++- mail/metamail/patches/patch-metamail_codes.c | 22 ++++ mail/metamail/patches/patch-richmail_iso2022.c | 13 +++ 7 files changed, 287 insertions(+), 33 deletions(-) create mode 100644 mail/metamail/patches/patch-metamail_codes.c create mode 100644 mail/metamail/patches/patch-richmail_iso2022.c (limited to 'mail') diff --git a/mail/metamail/distinfo b/mail/metamail/distinfo index f81196e2620..dae1e7cacd2 100644 --- a/mail/metamail/distinfo +++ b/mail/metamail/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.24 2009/10/17 21:39:44 pgoyette Exp $ +$NetBSD: distinfo,v 1.25 2012/10/26 20:27:15 joerg Exp $ SHA1 (mm2.7.tar.Z) = 8f213baec9b17c05bcb066f616977a561757d7a6 RMD160 (mm2.7.tar.Z) = ae322cad0653140cbe7f0148ce48757df98c26b0 @@ -8,10 +8,10 @@ SHA1 (patch-ab) = 15dd81405551f4d7d3c0e59cf49038857603a9eb SHA1 (patch-ac) = f0b04f7d6b17fb5c71a09b4caaf4298acdcff64e SHA1 (patch-ad) = 1f152ab38d3c2da42afdb3b3c6a1b218ac8d3996 SHA1 (patch-ae) = 7abed3b508779f354036a3634510d4c68c3670a8 -SHA1 (patch-af) = 9ba42f1eef27d452debb9c1e0abc800f19deccac +SHA1 (patch-af) = 93e566a5e174fd259eb855e24a6dd4b7d5ffeed4 SHA1 (patch-ag) = 674ceb59955de76e9a673ee4969d359a30fba5f8 SHA1 (patch-ah) = 69f286fbb45420921cfe57e16c6ec220e409b784 -SHA1 (patch-ai) = 4e85922573dc0ae2017c112198f1f23c2b08f729 +SHA1 (patch-ai) = 97130d5769767788c5b20993805536a8ddd9b76e SHA1 (patch-aj) = 7384564119a360189c68bdc5ce0ba3648a44769c SHA1 (patch-ak) = fcf331b9d28243cb403fd0dc34a365eb147f3da4 SHA1 (patch-al) = c63427174a5d80c62b207212e0d855457939d0bc @@ -20,6 +20,8 @@ SHA1 (patch-an) = 56c228106dc663623cb31ecf4eeba1fc5c27d045 SHA1 (patch-ao) = 90566d47642fe8ee71295ea47f3cf7420d0b2880 SHA1 (patch-ap) = ade6fba2254e7db3f9cf52acf453bb512c0a3d32 SHA1 (patch-aq) = 90f84381aaf91db03cecef84d9433c3ffd1152db -SHA1 (patch-ar) = 21e137edd2bb1dc09048f7ef23e86859d698d848 +SHA1 (patch-ar) = 7167065afb79f59febbf7821ad625972eaf921f2 SHA1 (patch-as) = 8d8c31f1ff508e9d7fc73a03a5f7ba63faa118ef -SHA1 (patch-at) = 86936427fbbd33e34c97cac18e9baab700f30199 +SHA1 (patch-at) = 9193001c138875a0a6cc562f9f8a0424f78328aa +SHA1 (patch-metamail_codes.c) = df6df4ff4abeba96c0d68f3d025390121c2b589a +SHA1 (patch-richmail_iso2022.c) = 3a6ff631d50963d31701e7a0f5519967bbbf1e2e diff --git a/mail/metamail/patches/patch-af b/mail/metamail/patches/patch-af index 9d5c60a054d..7caa21da4fc 100644 --- a/mail/metamail/patches/patch-af +++ b/mail/metamail/patches/patch-af @@ -1,8 +1,43 @@ -$NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ +$NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ ---- metamail/mailto.c.orig 1994-02-09 12:30:26.000000000 -0800 -+++ metamail/mailto.c 2004-02-24 10:13:44.000000000 -0800 -@@ -570,6 +570,7 @@ char **argv; +--- metamail/mailto.c.orig 1994-02-09 20:30:26.000000000 +0000 ++++ metamail/mailto.c +@@ -36,6 +36,7 @@ STILL NEED TO DO/SUPPORT: + -- Replace EditString with something that does the right thing in-line. + */ + ++#include + #include + #include + #include +@@ -50,8 +51,6 @@ STILL NEED TO DO/SUPPORT: + #include + #include + #include +-#else +-extern char *getenv(); + #endif + + #ifdef SYSV +@@ -60,9 +59,16 @@ extern char *getenv(); + #include + #endif + +-extern char *malloc(), *realloc(), *index(), *getmyname(); + struct mailpart *CreateNewPart(); + ++void DeAlias(char *name, FILE *fp, char *hdr); ++void HeaderFputs(char *s, FILE *fp, char *hdr); ++void HandleAliasCommand(char *aliasline); ++void ProcessOneMailRC(char *fname, int IsAndrew); ++void EditCurrentMessage(int UseVisual); ++void FputsQuotingLT(char *s, FILE *fp, struct mailpart *part, int EightBitMode, int RightToLeftMode); ++void WriteOutMessage(FILE *fp, char *ToList, char *Subject, char *CCList, struct mailpart *FirstPart); ++ + /* The main data structure for the multiple parts of the mail */ + + struct mailpart { +@@ -570,6 +576,7 @@ char **argv; if (isupper(*sdum)) *sdum = tolower(*sdum); } if (strcmp(CharacterSet, "us-ascii") @@ -10,7 +45,19 @@ $NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ && strncmp(CharacterSet, "iso-8859-", 9)) { fprintf(stderr, "mailto: Unsupported character set: %s\n", CharacterSet); exit(-1); -@@ -1130,6 +1131,7 @@ struct mailpart *part; +@@ -1042,10 +1049,7 @@ char *newid() { + return(idbuf); + } + +-WriteOutMessage(fp, ToList, Subject, CCList, FirstPart) +-FILE *fp; +-char *ToList, *Subject, *CCList; +-struct mailpart *FirstPart; ++void WriteOutMessage(FILE *fp, char *ToList, char *Subject, char *CCList, struct mailpart *FirstPart) + { + FILE *fpin; + static int ctr = 0; +@@ -1130,6 +1134,7 @@ struct mailpart *part; if (part->isrich) { if (strcmp(CharacterSet, "us-ascii") && (strncmp(CharacterSet, "iso-8859-", 9) @@ -18,7 +65,7 @@ $NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ || part->encoding_type_needed != ENC_NONE)) { fprintf(fp, "Content-type: text/richtext; charset=\"%s\"\n", CharacterSet); } else { -@@ -1140,6 +1142,7 @@ struct mailpart *part; +@@ -1140,6 +1145,7 @@ struct mailpart *part; WriteCtypeNicely(fp, part->content_type); if (strcmp(CharacterSet, "us-ascii") && (strncmp(CharacterSet, "iso-8859-", 9) @@ -26,7 +73,20 @@ $NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ || part->encoding_type_needed != ENC_NONE)) { fprintf(fp, "; charset=\"%s\"\n", CharacterSet); } else fputs("\n", fp); -@@ -1745,6 +1748,7 @@ CreateNewPart() { +@@ -1328,11 +1334,7 @@ struct mailpart *part; + } + } + +-FputsQuotingLT(s, fp, part, EightBitMode, RightToLeftMode) +-char *s; +-FILE *fp; +-struct mailpart *part; +-int EightBitMode, RightToLeftMode; ++void FputsQuotingLT(char *s, FILE *fp, struct mailpart *part, int EightBitMode, int RightToLeftMode) + { + static int InNewLineSequence=1; + int c=0; +@@ -1745,6 +1747,7 @@ CreateNewPart() { } printf("\n\nEnter your choice as a number from 0 to %d: ", i); fflush(stdout); @@ -34,7 +94,7 @@ $NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ fgets(LineBuf, sizeof(LineBuf), stdin); ans = atoi(LineBuf); if (ans == 0 || ans == 1) { -@@ -1791,7 +1795,7 @@ CreateNewPart() { +@@ -1791,7 +1794,7 @@ CreateNewPart() { int ct; printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); fflush(stdout); @@ -43,7 +103,7 @@ $NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ if (index(LineBuf, '/')) { char lc[100], *s, AnsBuf[100]; strcpy(lc, LineBuf); -@@ -1809,7 +1813,7 @@ CreateNewPart() { +@@ -1809,7 +1812,7 @@ CreateNewPart() { } if (mc) break; printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); @@ -52,3 +112,58 @@ $NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ while (s && *s && isspace((unsigned char) *s)) ++s; if (s && (*s == 'y' || *s == 'Y')) break; continue; +@@ -2073,8 +2076,7 @@ char *ctype, *pat; + return(0); + } + +-EditCurrentMessage(UseVisual) +-int UseVisual; ++void EditCurrentMessage(int UseVisual) + { + char *editor = NULL; + char *CmdBuf, *CmdBuf2, LineBuf[100]; +@@ -2212,9 +2214,7 @@ int IsAndrew; + } + } + +-ProcessOneMailRC(fname, IsAndrew) +-char *fname; +-int IsAndrew; ++void ProcessOneMailRC(char *fname, int IsAndrew) + { + FILE *fp; + char *LineBuf = NULL, *sdum; +@@ -2290,8 +2290,7 @@ struct alias { + struct alias *next; + } *FirstAlias = NULL; + +-HandleAliasCommand(aliasline) +-char *aliasline; ++void HandleAliasCommand(char *aliasline) + { + struct alias *tmpalias; + char *s, *s2; +@@ -2357,10 +2356,7 @@ char *s; + return(NULL); + } + +-HeaderFputs(s, fp, hdr) +-char *s; +-FILE *fp; +-char *hdr; ++void HeaderFputs(char *s, FILE *fp, char *hdr) + { + char *firstnonascii, *firstascii; + +@@ -2436,10 +2432,7 @@ char *hdr; + } + } + +-DeAlias(name, fp, hdr) +-char *name; +-FILE *fp; +-char *hdr; ++void DeAlias(char *name, FILE *fp, char *hdr) + { + struct alias *tmpalias; + char *end, savechar; diff --git a/mail/metamail/patches/patch-ai b/mail/metamail/patches/patch-ai index e9e8f14a1db..eedfe1407f6 100644 --- a/mail/metamail/patches/patch-ai +++ b/mail/metamail/patches/patch-ai @@ -1,7 +1,7 @@ -$NetBSD: patch-ai,v 1.1 2004/02/25 03:58:43 snj Exp $ +$NetBSD: patch-ai,v 1.2 2012/10/26 20:27:15 joerg Exp $ ---- metamail/metamail.c.orig 1994-02-16 17:57:19.000000000 -0800 -+++ metamail/metamail.c 2004-02-24 10:47:27.000000000 -0800 +--- metamail/metamail.c.orig 1994-02-17 01:57:19.000000000 +0000 ++++ metamail/metamail.c @@ -83,7 +83,7 @@ extern char *MkRmScript(); #define MAX_FILE_NAME_SIZE 256 #define WRITE_BINARY "w" @@ -11,7 +11,29 @@ $NetBSD: patch-ai,v 1.1 2004/02/25 03:58:43 snj Exp $ #define CATCOMMAND "cat" #define CATTEMPLATE "cat %s" #define METAMAIL "metamail" -@@ -579,7 +579,7 @@ int nestingdepth; +@@ -100,15 +100,14 @@ extern char **environ, *gets(); + #define CMDSIZE 1200 /* Maximum size of command to execute */ + + #define LINE_BUF_SIZE 2000 +-#ifndef MICROSOFT +-extern char *malloc(); +-extern char *realloc(); +-#endif +-extern char *getenv(); +-extern char *index(); +-extern char *rindex(); ++#include ++#include ++ + char fileToDelete[MAX_FILE_NAME_SIZE]; + ++void PauseForUser(void); ++void maybephead(char *); ++ + char *FindParam(); + extern FILE *popen(); + static char *nomem = "Out of memory!"; +@@ -579,7 +578,7 @@ int nestingdepth; int overwriteans = -1; do { printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); @@ -20,7 +42,7 @@ $NetBSD: patch-ai,v 1.1 2004/02/25 03:58:43 snj Exp $ if (!s) { overwriteans = 0; } else { -@@ -1202,9 +1202,9 @@ char *SquirrelFile; +@@ -1202,9 +1201,9 @@ char *SquirrelFile; fprintf(outfp, "Content-type: %s", ContentType); for (j=0; j #include #include #include @@ -11,16 +15,57 @@ $NetBSD: patch-ar,v 1.1 2006/01/19 10:55:30 tron Exp $ #include "richlex.h" #include "richset.h" #include -@@ -79,6 +81,8 @@ + +-extern char *getenv(); +-#ifdef AMIGA +-extern char *strchr(); +-#endif +- + #ifdef MSDOS + unsigned _stklen=16384; /* Increase stack size under MS-DOS */ + #endif +@@ -79,7 +77,13 @@ static int FakeTerminal; extern tputs(); #endif +-static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), fputsmovingright(), ResetTerminalCodes(), FinalizeTerminal(), outputstr(), FPUTS(); +static int lc2strcmp(char *s1, char *s2); + - static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), fputsmovingright(), ResetTerminalCodes(), FinalizeTerminal(), outputstr(), FPUTS(); ++static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), FinalizeTerminal(), outputstr(), FPUTS(); ++static void fputsmovingright(struct charsetmember *s, FILE *fp); ++static void ResetTerminalCodes(int FakeTerminal, int standout, int underline, int bold, char *standoutbuf, char *standendbuf, ++ int modifiedstandout, char *StartUnderline, char *StopUnderline, int modifiedunderline, ++ char *BoldOn, char *BoldOff, int modifiedbold); #define OUTC(c) (outputc((RCHAR)(c))) -@@ -989,7 +993,7 @@ + +@@ -905,9 +909,7 @@ static Pause() + /* Leading spaces should be output as MoveRight, to avoid + having margins that are underlined or reverse video */ + +-static fputsmovingright(s, fp) +-struct charsetmember *s; +-FILE *fp; ++static void fputsmovingright(struct charsetmember *s, FILE *fp) + { + int inmargin=1; + if (!s) return; +@@ -925,11 +927,9 @@ FILE *fp; + } + } + +-static ResetTerminalCodes(FakeTerminal, standout, underline, bold, standoutbuf, standendbuf, +- modifiedstandout, StartUnderline, StopUnderline, modifiedunderline, +- BoldOn, BoldOff, modifiedbold) +-char *standoutbuf, *standendbuf, *StartUnderline, *StopUnderline, +- *BoldOn, *BoldOff; ++static void ResetTerminalCodes(int FakeTerminal, int standout, int underline, int bold, char *standoutbuf, char *standendbuf, ++ int modifiedstandout, char *StartUnderline, char *StopUnderline, int modifiedunderline, ++ char *BoldOn, char *BoldOff, int modifiedbold) + { + if (OverStrike) + return; +@@ -989,7 +989,7 @@ FILE *fp; while(*s) (*RichtextPutc)((int)(*s++),fp); } diff --git a/mail/metamail/patches/patch-at b/mail/metamail/patches/patch-at index 5df42924aad..013aaa06fb3 100644 --- a/mail/metamail/patches/patch-at +++ b/mail/metamail/patches/patch-at @@ -1,6 +1,8 @@ ---- metamail/uue.c.orig 2009-10-16 15:17:32.000000000 -0700 -+++ metamail/uue.c 2009-10-16 15:14:38.000000000 -0700 -@@ -30,7 +30,7 @@ +$NetBSD: patch-at,v 1.3 2012/10/26 20:27:15 joerg Exp $ + +--- metamail/uue.c.orig 1993-07-28 18:31:02.000000000 +0000 ++++ metamail/uue.c +@@ -30,7 +30,7 @@ FILE *outfp; } @@ -9,7 +11,16 @@ char *buf; int size; FILE *fp; -@@ -70,7 +70,7 @@ +@@ -62,7 +62,7 @@ FILE *fp; + } + + +-fromuue (infp, outfp, boundaries, ctptr) ++void fromuue (infp, outfp, boundaries, ctptr) + FILE *infp, *outfp; + char **boundaries; + int *ctptr; +@@ -70,7 +70,7 @@ int *ctptr; char buf[63]; while (1) { @@ -18,7 +29,7 @@ fprintf (stderr, "Premature EOF!\n"); return; } -@@ -82,7 +82,7 @@ +@@ -82,7 +82,7 @@ int *ctptr; } } while (1) { diff --git a/mail/metamail/patches/patch-metamail_codes.c b/mail/metamail/patches/patch-metamail_codes.c new file mode 100644 index 00000000000..6d70a29a1cc --- /dev/null +++ b/mail/metamail/patches/patch-metamail_codes.c @@ -0,0 +1,22 @@ +$NetBSD: patch-metamail_codes.c,v 1.1 2012/10/26 20:27:15 joerg Exp $ + +--- metamail/codes.c.orig 2012-10-25 19:39:57.000000000 +0000 ++++ metamail/codes.c +@@ -174,7 +174,7 @@ int PortableNewlines; + } + #endif + +-from64(infile, outfile, boundaries, boundaryct, PortableNewlines) ++void from64(infile, outfile, boundaries, boundaryct, PortableNewlines) + FILE *infile, *outfile; + char **boundaries; + int *boundaryct; +@@ -350,7 +350,7 @@ FILE *infile, *outfile; + } + } + +-fromqp(infile, outfile, boundaries, boundaryct) ++void fromqp(infile, outfile, boundaries, boundaryct) + FILE *infile, *outfile; + char **boundaries; + int *boundaryct; diff --git a/mail/metamail/patches/patch-richmail_iso2022.c b/mail/metamail/patches/patch-richmail_iso2022.c new file mode 100644 index 00000000000..66cf76b3a6a --- /dev/null +++ b/mail/metamail/patches/patch-richmail_iso2022.c @@ -0,0 +1,13 @@ +$NetBSD: patch-richmail_iso2022.c,v 1.1 2012/10/26 20:27:15 joerg Exp $ + +--- richmail/iso2022.c.orig 2012-10-25 19:46:36.000000000 +0000 ++++ richmail/iso2022.c +@@ -73,7 +73,7 @@ static int OutAsciiMode; + /* + * Initialise the ISO-2022 character set processor. + */ +-iso2022_init (name) ++void iso2022_init (name) + char *name; + { + SwToAscii = 'B'; -- cgit v1.2.3