summaryrefslogtreecommitdiff
path: root/textproc/ispell
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1997-12-16 16:13:49 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1997-12-16 16:13:49 +0000
commit0721d2b15cd4c84e06a21928a5fef6f0996ae3a2 (patch)
treea42bbbc4d498f06516ffe2159a894a3b84a6462d /textproc/ispell
parentRemove obsoleted dir.h (warning produced) (diff)
Remove warning: gets -> fgets
Diffstat (limited to 'textproc/ispell')
-rw-r--r--textproc/ispell/files/patch-ac37
-rw-r--r--textproc/ispell/files/patch-ad57
2 files changed, 94 insertions, 0 deletions
diff --git a/textproc/ispell/files/patch-ac b/textproc/ispell/files/patch-ac
new file mode 100644
index 000000000000..57d5f3955220
--- /dev/null
+++ b/textproc/ispell/files/patch-ac
@@ -0,0 +1,37 @@
+*** sq.c.orig Tue Jan 25 21:32:18 1994
+--- sq.c Tue Dec 16 19:02:22 1997
+***************
+*** 49,54 ****
+--- 49,55 ----
+ */
+
+ #include <stdio.h>
++ #include <string.h>
+
+ #ifdef __STDC__
+ #define P(x) x
+***************
+*** 82,90 ****
+ {
+ char word[257];
+ static char prev[257] = "";
+
+! while (gets (word) != NULL)
+ trunc (word, prev);
+ return 0;
+ }
+
+--- 83,95 ----
+ {
+ char word[257];
+ static char prev[257] = "";
++ char *s;
+
+! while (fgets (word, sizeof(word), stdin) != NULL) {
+! if ((s = strchr(word, '\n')) != NULL)
+! *s = '\0';
+ trunc (word, prev);
++ }
+ return 0;
+ }
+
diff --git a/textproc/ispell/files/patch-ad b/textproc/ispell/files/patch-ad
new file mode 100644
index 000000000000..759a070f2caf
--- /dev/null
+++ b/textproc/ispell/files/patch-ad
@@ -0,0 +1,57 @@
+*** unsq.c.bak Tue Jan 25 21:32:18 1994
+--- unsq.c Tue Dec 16 19:08:44 1997
+***************
+*** 49,54 ****
+--- 49,55 ----
+ */
+
+ #include <stdio.h>
++ #include <string.h>
+ #include "msgs.h"
+
+ #ifdef __STDC__
+***************
+*** 99,104 ****
+--- 100,107 ----
+ register char * prevp;
+ register int same_count;
+ register int count_char;
++ int wsize;
++ char *s;
+
+ count_char = getchar ();
+ if (count_char == EOF)
+***************
+*** 114,126 ****
+ }
+ prevp = prev;
+ wordp = word;
+! while (same_count--)
+ *wordp++ = (*prevp++);
+! if (gets (wordp) == NULL)
+ {
+ (void) fprintf (stderr, UNSQ_C_SURPRISE_EOF);
+ exit (1);
+ }
+ (void) strcpy (prev, word);
+ return 0 ;
+ }
+--- 117,134 ----
+ }
+ prevp = prev;
+ wordp = word;
+! wsize = 257;
+! while (same_count--) {
+ *wordp++ = (*prevp++);
+! wsize--;
+! }
+! if (fgets (wordp, wsize, stdin) == NULL)
+ {
+ (void) fprintf (stderr, UNSQ_C_SURPRISE_EOF);
+ exit (1);
+ }
++ if ((s = strchr(wordp, '\n')) != NULL)
++ *s = '\0';
+ (void) strcpy (prev, word);
+ return 0 ;
+ }