diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-04-02 22:19:40 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-04-02 22:19:40 +0000 |
commit | 2434f7f901d58363883a931b4a6e1a243391025b (patch) | |
tree | 31ec27f06d21a4778619b7454d1ac7677d1e785e /mixutils | |
parent | e4acd1c4f7deeed5d96e9eeb2284a7a2afef440c (diff) | |
download | mdk-2434f7f901d58363883a931b4a6e1a243391025b.tar.gz mdk-2434f7f901d58363883a931b4a6e1a243391025b.tar.bz2 |
use of gets avoided for FreeBSD portability
Diffstat (limited to 'mixutils')
-rw-r--r-- | mixutils/mixvm_loop.c | 9 |
1 files 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 <stdio.h> #include <mixlib/mix.h> @@ -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 */ |