From 19596dd33509ddf18b95c15c50817d716761a2f1 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 2 Apr 2001 22:19:40 +0000 Subject: use of gets avoided for FreeBSD portability --- mixutils/mixvm_loop.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mixutils/mixvm_loop.c b/mixutils/mixvm_loop.c index a565832..89a3953 100644 --- a/mixutils/mixvm_loop.c +++ b/mixutils/mixvm_loop.c @@ -20,7 +20,6 @@ */ -#define _GNU_SOURCE 1 #include #include @@ -38,12 +37,10 @@ static char * readline (char *prompt) { - char *line = NULL; - size_t s = 0; - + enum {LINE_LEN = 256}; + char *line = g_new (char, LINE_LEN); printf ("%s", prompt); - getline (&line, &s, stdin); - return line; + return fgets (line, LINE_LEN, stdin); } #endif /* HAVE_LIBREADLINE */ -- cgit v1.2.3