diff options
author | dholland <dholland@pkgsrc.org> | 2015-11-08 20:51:59 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2015-11-08 20:51:59 +0000 |
commit | 83d505f5251352197f94a2099a028e5c7264e67e (patch) | |
tree | e088fdacd396a6db01b5feda89bb858649a46552 /mail | |
parent | 8447cdd4bcbfe3387fee6012e7de8c394f62b20c (diff) | |
download | pkgsrc-83d505f5251352197f94a2099a028e5c7264e67e.tar.gz |
Remove <sgtty.h>
Diffstat (limited to 'mail')
-rw-r--r-- | mail/metamail/distinfo | 4 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ai | 115 |
2 files changed, 103 insertions, 16 deletions
diff --git a/mail/metamail/distinfo b/mail/metamail/distinfo index 3ccc1615c02..7502b1e7827 100644 --- a/mail/metamail/distinfo +++ b/mail/metamail/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.28 2015/11/03 23:27:09 agc Exp $ +$NetBSD: distinfo,v 1.29 2015/11/08 20:51:59 dholland Exp $ SHA1 (mm2.7.tar.Z) = 8f213baec9b17c05bcb066f616977a561757d7a6 RMD160 (mm2.7.tar.Z) = ae322cad0653140cbe7f0148ce48757df98c26b0 @@ -12,7 +12,7 @@ SHA1 (patch-ae) = c7d1997371ee5d61a0c7236da1f408502eeb0f1a SHA1 (patch-af) = 03d08e3bdff9009ef7f978364d99a9243f28eda5 SHA1 (patch-ag) = 674ceb59955de76e9a673ee4969d359a30fba5f8 SHA1 (patch-ah) = 69f286fbb45420921cfe57e16c6ec220e409b784 -SHA1 (patch-ai) = f6fd4216492dda87e6e5a0f81cf2e01c3a3c3020 +SHA1 (patch-ai) = bfb4a4cabdfb4b27b8d1f78285e678d1c214e62a SHA1 (patch-aj) = 7384564119a360189c68bdc5ce0ba3648a44769c SHA1 (patch-ak) = fcf331b9d28243cb403fd0dc34a365eb147f3da4 SHA1 (patch-al) = c63427174a5d80c62b207212e0d855457939d0bc diff --git a/mail/metamail/patches/patch-ai b/mail/metamail/patches/patch-ai index 27d026c791f..6b5b9c3b179 100644 --- a/mail/metamail/patches/patch-ai +++ b/mail/metamail/patches/patch-ai @@ -1,14 +1,29 @@ -$NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ +$NetBSD: patch-ai,v 1.4 2015/11/08 20:51:59 dholland Exp $ - clean up junk decls that exist in headers, and include the right headers - use fgets instead of gets - fix printf to always have format - when executing a child metamail, propagate the parents options as much as possible +- use termios instead of termio/sgtty ---- metamail/metamail.c.orig 1994-02-16 20:57:19.000000000 -0500 -+++ metamail/metamail.c 2014-06-11 15:02:23.000000000 -0400 -@@ -83,7 +83,7 @@ +--- metamail/metamail.c.orig 1994-02-17 01:57:19.000000000 +0000 ++++ metamail/metamail.c +@@ -46,12 +46,8 @@ extern char *mktemp(char *); + #include <signal.h> + + #ifndef AMIGA +-#ifdef SYSV +-#include <termio.h> ++#include <termios.h> + #include <unistd.h> +-#else /* SYSV */ +-#include <sgtty.h> +-#endif /* SYSV */ + #endif /* AMIGA */ + #endif /* MICROSOFT */ + #endif /* BORLAND */ +@@ -83,7 +79,7 @@ extern char *MkRmScript(); #define MAX_FILE_NAME_SIZE 256 #define WRITE_BINARY "w" #else /* AMIGA */ @@ -17,7 +32,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ #define CATCOMMAND "cat" #define CATTEMPLATE "cat %s" #define METAMAIL "metamail" -@@ -100,15 +100,14 @@ +@@ -100,15 +96,14 @@ extern char **environ, *gets(); #define CMDSIZE 1200 /* Maximum size of command to execute */ #define LINE_BUF_SIZE 2000 @@ -39,7 +54,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ char *FindParam(); extern FILE *popen(); static char *nomem = "Out of memory!"; -@@ -151,6 +150,32 @@ +@@ -151,6 +146,32 @@ int MightAskBeforeExecuting = 1, JustWriteFiles = 0, ProcessingErrors = 0; @@ -72,7 +87,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ char *ContentType = NULL, *ContentEncoding = NULL, *MailerName = "unknown", -@@ -497,8 +522,9 @@ +@@ -497,8 +518,9 @@ int nestingdepth; if (IsAlternative) { if (WroteSquirrelFile) { int retcode; @@ -84,7 +99,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ fflush(stdout); fflush(stderr); retcode = system(Cmd); #ifdef MSDOS -@@ -579,7 +605,7 @@ +@@ -579,7 +601,7 @@ int nestingdepth; int overwriteans = -1; do { printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); @@ -93,7 +108,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ if (!s) { overwriteans = 0; } else { -@@ -1202,9 +1228,9 @@ +@@ -1202,9 +1224,9 @@ char *SquirrelFile; fprintf(outfp, "Content-type: %s", ContentType); for (j=0; j<CParamsUsed; ++j) { fprintf(outfp, " ; "); @@ -105,7 +120,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ } fprintf(outfp, "\n\n"); TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType); -@@ -1823,7 +1849,7 @@ +@@ -1823,7 +1845,7 @@ char *ctype, *progname, *label; } else { printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); } @@ -114,7 +129,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ if (!s) return(0); /* EOF */ while (s && *s && isspace((unsigned char) *s)) ++s; if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); -@@ -1900,7 +1926,7 @@ +@@ -1900,7 +1922,7 @@ char *hdr; } /* check the header given to see if it matches any in the KeyHeadList */ @@ -123,7 +138,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ char *hdr; { char *s; -@@ -2022,7 +2048,8 @@ +@@ -2022,7 +2044,8 @@ int ShowLeadingWhitespace; if (lc2strcmp(charset, PrevCharset)) { char *s2, *charsetinuse; @@ -133,7 +148,7 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ for (s2=PrevCharset; *s2; ++s2) { if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2); } -@@ -2032,7 +2059,7 @@ +@@ -2032,7 +2055,7 @@ int ShowLeadingWhitespace; } } if (ecode == ENCODING_NONE) { @@ -142,7 +157,54 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ } else { /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ MkTmpFileName(TmpFile); -@@ -2655,12 +2682,12 @@ +@@ -2375,41 +2398,25 @@ char *Prefix; + + int HasSavedTtyState=0; + #if !defined(AMIGA) && !defined(MSDOS) +-#ifdef SYSV +-static struct termio MyTtyStateIn, MyTtyStateOut; +-#else +-static struct sgttyb MyTtyStateIn, MyTtyStateOut; +-#endif ++static struct termios MyTtyStateIn, MyTtyStateOut; + #endif + + SaveTtyState() { + /* Bogus -- would like a good portable way to reset the terminal state here */ + #if !defined(AMIGA) && !defined(MSDOS) +-#ifdef SYSV +- ioctl(fileno(stdin), TCGETA, &MyTtyStateIn); +- ioctl(fileno(stdout), TCGETA, &MyTtyStateOut); +-#else +- gtty(fileno(stdin), &MyTtyStateIn); +- gtty(fileno(stdout), &MyTtyStateOut); +-#endif ++ tcgetattr(fileno(stdin), &MyTtyStateIn); ++ tcgetattr(fileno(stdout), &MyTtyStateOut); + HasSavedTtyState = 1; + #endif + } + + RestoreTtyState() { + #if !defined(AMIGA) && !defined(MSDOS) +-#ifdef SYSV +- if (HasSavedTtyState) { +- ioctl(fileno(stdout), TCSETA, &MyTtyStateOut); +- ioctl(fileno(stdin), TCSETA, &MyTtyStateIn); +- } +-#else + if (HasSavedTtyState) { +- stty(fileno(stdout), &MyTtyStateOut); +- stty(fileno(stdin), &MyTtyStateIn); ++ tcsetattr(fileno(stdout), TCSANOW, &MyTtyStateOut); ++ tcsetattr(fileno(stdin), TCSANOW, &MyTtyStateIn); + } + #endif +-#endif + } + + NeedToAskBeforeExecuting(type) +@@ -2655,12 +2662,12 @@ char *s2; #endif } @@ -157,3 +219,28 @@ $NetBSD: patch-ai,v 1.3 2014/06/11 19:07:02 christos Exp $ #if defined(MSDOS) || defined(AMIGA) printf("Press RETURN to go on\n"); gets(Buf); +@@ -2681,21 +2688,14 @@ PauseForUser() { + + StartRawStdin() { + #if !defined(AMIGA) && !defined(MSDOS) +-#ifdef SYSV +- struct termio orterm, fterm; +- ioctl(0, TCGETA, &orterm); /* get current (i.e. cooked) termio */ ++ struct termios orterm, fterm; ++ tcgetattr(0, &orterm); /* get current (i.e. cooked) termio */ + fterm = orterm; /* get termio to modify */ + + fterm.c_lflag &= ~ICANON; /* clear ICANON giving raw mode */ + fterm.c_cc[VMIN] = 1; /* set MIN char count to 1 */ + fterm.c_cc[VTIME] = 0; /* set NO time limit */ +- return ioctl(0, TCSETAW, &fterm); /* modify termio for raw mode */ +-#else +- struct sgttyb ts; +- gtty(fileno(stdin), &ts); +- ts.sg_flags |= RAW; +- return stty(fileno(stdin), &ts); +-#endif ++ return tcsetattr(0, TCSADRAIN, &fterm); /* modify termio for raw mode */ + #else + return(-1); + #endif |