From 0b3490f9798714982dc40be1498fe6ec53398259 Mon Sep 17 00:00:00 2001 From: angelos Date: Tue, 28 Apr 1998 01:53:30 +0000 Subject: [PATCH] mktemp->mkstemp and gets->fgets --- textproc/ispell/patches/patch-aa | 19 +++++++++++++++++++ textproc/ispell/patches/patch-ac | 21 +++++++++++++++++++++ textproc/ispell/patches/patch-ad | 19 +++++++++++++++++++ 3 files changed, 59 insertions(+) create mode 100644 textproc/ispell/patches/patch-aa create mode 100644 textproc/ispell/patches/patch-ac create mode 100644 textproc/ispell/patches/patch-ad diff --git a/textproc/ispell/patches/patch-aa b/textproc/ispell/patches/patch-aa new file mode 100644 index 00000000000..b85973b55f7 --- /dev/null +++ b/textproc/ispell/patches/patch-aa @@ -0,0 +1,19 @@ +*** sq.c.orig Mon Apr 27 21:49:01 1998 +--- sq.c Mon Apr 27 21:49:14 1998 +*************** +*** 83,89 **** + char word[257]; + static char prev[257] = ""; + +! while (gets (word) != NULL) + trunc (word, prev); + return 0; + } +--- 83,89 ---- + char word[257]; + static char prev[257] = ""; + +! while (fgets (word, 256, stdin) != NULL) + trunc (word, prev); + return 0; + } diff --git a/textproc/ispell/patches/patch-ac b/textproc/ispell/patches/patch-ac new file mode 100644 index 00000000000..5a6c8545a76 --- /dev/null +++ b/textproc/ispell/patches/patch-ac @@ -0,0 +1,21 @@ +*** ispell.c.orig Mon Apr 27 21:46:38 1998 +--- ispell.c Mon Apr 27 21:48:33 1998 +*************** +*** 835,842 **** + + (void) fstat (fileno (infile), &statbuf); + (void) strcpy (tempfile, TEMPNAME); +! if (mktemp (tempfile) == NULL || tempfile[0] == '\0' +! || (outfile = fopen (tempfile, "w")) == NULL) + { + (void) fprintf (stderr, CANT_CREATE, + (tempfile == NULL || tempfile[0] == '\0') +--- 835,842 ---- + + (void) fstat (fileno (infile), &statbuf); + (void) strcpy (tempfile, TEMPNAME); +! if (((outfile = fdopen (mkstemp(tempfile), "w")) == NULL) || +! (tempfile[0] == '\0')) + { + (void) fprintf (stderr, CANT_CREATE, + (tempfile == NULL || tempfile[0] == '\0') diff --git a/textproc/ispell/patches/patch-ad b/textproc/ispell/patches/patch-ad new file mode 100644 index 00000000000..ee9e0cac267 --- /dev/null +++ b/textproc/ispell/patches/patch-ad @@ -0,0 +1,19 @@ +*** unsq.c.orig Mon Apr 27 21:50:58 1998 +--- unsq.c Mon Apr 27 21:52:20 1998 +*************** +*** 116,122 **** + wordp = word; + while (same_count--) + *wordp++ = (*prevp++); +! if (gets (wordp) == NULL) + { + (void) fprintf (stderr, UNSQ_C_SURPRISE_EOF); + exit (1); +--- 116,122 ---- + wordp = word; + while (same_count--) + *wordp++ = (*prevp++); +! if (fgets (wordp, strlen(wordp), stdin) == NULL) + { + (void) fprintf (stderr, UNSQ_C_SURPRISE_EOF); + exit (1);