aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/nfbtrans/files/patch-ab
blob: 3f36aee1d651f8ca74e887cfdfc94a4b8fd570b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
--- nfbtrans.c.orig	Sun Nov 14 10:58:34 1999
+++ nfbtrans.c	Fri Feb 18 15:00:00 2000
@@ -2,7 +2,9 @@
 #define LINT_ARGS
 #define DOS
 #else
-#define UNIX_PATH "/usr/local/lib/"
+#ifndef UNIX_PATH
+#define UNIX_PATH "/usr/local/lib/nfbtrans/"
+#endif
 #endif		   /* unix */
 #ifndef lint
 #endif		   /* lint */
@@ -24,7 +26,7 @@
 #include <fcntl.h>
 #include <stdarg.h>
 #define MAXARGS 7
-#if defined(sunos) || defined(linux)
+#if defined(sunos) || defined(linux) || defined(freebsd)
 #define max(a,b)  (((a) > (b)) ? (a) : (b))
 #define min(a,b)  (((a) < (b)) ? (a) : (b))
 #endif
@@ -4904,7 +4906,8 @@
   for (;;)
   {
     fprintf(stderr, "Enter dictionary word <RETURN> to skip: ");
-    gets(temp);
+    fgets(temp, sizeof(temp), stdin);
+    temp[strlen(temp)-1] = '\0';
     if (!temp[0])
       break;	   /* skip, don't store as rejected */
     strupr(temp);
@@ -5437,7 +5440,8 @@
 	for (;;)
 	{
 	  fprintf(stderr, "enter word <RETURN> to exit: ");
-	  gets(field);
+          fgets(field, (sizeof(field_) - (field - field_)), stdin);
+          field[strlen(field-1)] = '\0';
 	  if (strlen(field) < 2)
 	    break;
 	  strupr(field);