Author: nekral-guest
Date: 2006-05-16 04:37:20 +0000 (Tue, 16 May 2006)
New Revision: 326
Modified:
trunk/ChangeLog
trunk/debian/changelog
trunk/src/configure.c
Log:
Flush the terminal's input before prompting the user.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2006-05-15 22:06:57 UTC (rev 325)
+++ trunk/ChangeLog 2006-05-16 04:37:20 UTC (rev 326)
@@ -1,3 +1,8 @@
+2006-05-15 Nicolas François <[EMAIL PROTECTED]>
+
+ * src/configure.c: Flush the terminal's input before
+ prompting the user.
+
2006-05-15 Frank Lichtenheld <[EMAIL PROTECTED]>
* debian/archtable: Update to reflect current
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2006-05-15 22:06:57 UTC (rev 325)
+++ trunk/debian/changelog 2006-05-16 04:37:20 UTC (rev 326)
@@ -38,6 +38,8 @@
Closes: #366587
* Honour tabbing requested via --show-format even if the field to
be printed is empty. Closes: #361671
+ * flush the terminal's input before prompting what to do with a
+ configuration file. Closes: #316551
[ Updated dpkg Translations ]
* Portuguese (Miguel Figueiredo).
Modified: trunk/src/configure.c
===================================================================
--- trunk/src/configure.c 2006-05-15 22:06:57 UTC (rev 325)
+++ trunk/src/configure.c 2006-05-16 04:37:20 UTC (rev 326)
@@ -37,6 +37,7 @@
#include <assert.h>
#include <sys/wait.h>
#include <time.h>
+#include <sys/termios.h>
#include <dpkg.h>
#include <dpkg-db.h>
@@ -553,6 +554,10 @@
}
do {
+ /* Flush the terminal's input in case the user
+ * involuntarily typed some characters.
+ */
+ tcflush(STDIN_FILENO, TCIFLUSH);
fprintf(stderr, _("\nConfiguration file `%s'"), cfgfile);
if (strcmp(cfgfile, realold))
fprintf(stderr,_(" (actually `%s')"), realold);
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]