[Aptitude-svn-commit] r4318 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Tue Sep 27 22:03:22 UTC 2005
Author: dburrows
Date: Tue Sep 27 22:03:19 2005
New Revision: 4318
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/src/download.cc
Log:
Make the wait-till-end-of-line code more robust.
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Tue Sep 27 22:03:19 2005
@@ -1,5 +1,10 @@
2005-09-27 Daniel Burrows <dburrows at debian.org>
+ * src/download.cc:
+
+ Remove the assumption that stdin is line-buffered; explicitly
+ search for a \n character (and handle EOF conditions).
+
* src/main.cc, src/cmdline/cmdline_prompt.cc, src/cmdline/cmdline_prompt.h:
Toss an exception from the command-line code when EOF is
Modified: branches/aptitude-0.3/aptitude/src/download.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/download.cc (original)
+++ branches/aptitude-0.3/aptitude/src/download.cc Tue Sep 27 22:03:19 2005
@@ -446,7 +446,10 @@
if(!text_download)
{
cerr << _("Press return to continue.\n");
- getchar();
+ int c = getchar();
+
+ while(c != '\n' && c != EOF)
+ c = getchar();
}
break;
More information about the Aptitude-svn-commit
mailing list