bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] lib/readline.c (readline): Call fflush on stdout after printing


From: Simon Josefsson
Subject: [PATCH] lib/readline.c (readline): Call fflush on stdout after printing prompt.
Date: Tue, 24 Mar 2009 08:12:18 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux)

Pushed.

---
 ChangeLog      |    5 +++++
 lib/readline.c |    7 +++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0ba878b..fdc497f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-24  Simon Josefsson  <address@hidden>
+
+       * lib/readline.c (readline): Call fflush on stdout after printing
+       prompt.
+
 2009-03-20  Bruno Haible  <address@hidden>
 
        Remove dependency from 'close' module to -lws2_32 on native Windows.
diff --git a/lib/readline.c b/lib/readline.c
index a8db7ec..4be5f34 100644
--- a/lib/readline.c
+++ b/lib/readline.c
@@ -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;
-- 
1.5.6.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]