1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-05 22:43:24 +00:00
freebsd-ports/lang/wamcc/files/patch-ad
Steve Price 89ab207b94 Initial import of wamcc version 2.22.
A Prolog-to-C translator from Inria.

PR:		13745
Submitted by:	W. Gerald Hicks <wghicks@bellsouth.net>
1999-11-01 03:46:48 +00:00

37 lines
677 B
Plaintext

--- src/debugger.c.orig Sun Dec 18 12:15:55 1994
+++ src/debugger.c Tue Sep 14 04:16:44 1999
@@ -278,7 +278,15 @@
#define Y_Storing_Invoc_Nb(e) (Y(e,3)) /* see call.pl */
+static void mygets(char *str, int size)
+{
+ char *p;
+ fgets(str,size,stdin);
+ p = index(str, '\n');
+ if(p)
+ *p = '\0';
+}
@@ -959,7 +967,7 @@
Lib1(printf," ? ");
*str='\0';
- Lib1(gets,str);
+ Lib2(mygets,str,sizeof(str) - 1);
if (*str=='\0')
Lib2(strcpy,str,"creep");
@@ -2047,7 +2055,7 @@
Lib1(printf,"\nNew value: ");
*str='\0';
- Lib1(gets,str);
+ Lib2(mygets,str,sizeof(str) - 1);
if (*str=='\0')
return;