lib/readline.c (readline): Call fflush on stdout after printing prompt.
authorSimon Josefsson <simon@josefsson.org>
Tue, 24 Mar 2009 07:11:31 +0000 (08:11 +0100)
committerSimon Josefsson <simon@josefsson.org>
Tue, 24 Mar 2009 07:11:31 +0000 (08:11 +0100)
ChangeLog
lib/readline.c

index 0ba878b91dc03b6a34945d806a0eb9e9042316af..fdc497f06b8fbb7c6dc9cf5c60fa7c1c30c41de1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-24  Simon Josefsson  <simon@josefsson.org>
+
+       * lib/readline.c (readline): Call fflush on stdout after printing
+       prompt.
+
 2009-03-20  Bruno Haible  <bruno@clisp.org>
 
        Remove dependency from 'close' module to -lws2_32 on native Windows.
index a8db7ec68ec5a34ad967cb536945ac02c0a1c052..4be5f3457f6e2921f12f8a18c1abdf376500fb8b 100644 (file)
@@ -1,5 +1,5 @@
 /* readline.c --- Simple implementation of readline.
-   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
    Written by Simon Josefsson
 
    This program is free software: you can redistribute it and/or modify
@@ -39,7 +39,10 @@ readline (const char *prompt)
   size_t size = 0;
 
   if (prompt)
-    fputs (prompt, stdout);
+    {
+      fputs (prompt, stdout);
+      fflush (stdout);
+    }
 
   if (getline (&out, &size, stdin) < 0)
     return NULL;