summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoderick W. Smith <allura@localhost>2020-02-10 14:32:15 +0000
committerRoderick W. Smith <allura@localhost>2020-02-10 14:32:15 +0000
commitd292ff36a3b350115835c62462911c3d8721704f (patch)
tree405fe9bd7183029e14df6d73ff42d0fef66f366c
parent7ffe16f06275edffd09394d5e8cb55a494f45665 (diff)
parent185f73b1084936f85beddd4523a302cb1f906234 (diff)
downloadsgdisk-d292ff36a3b350115835c62462911c3d8721704f.tar.gz
Merge /u/johndemolition/gptfdisk/ branch u into master
https://sourceforge.net/p/gptfdisk/code/merge-requests/17/
-rw-r--r--gptcurses.cc1
-rw-r--r--support.cc5
2 files changed, 4 insertions, 2 deletions
diff --git a/gptcurses.cc b/gptcurses.cc
index 3e9b240..4ebfde1 100644
--- a/gptcurses.cc
+++ b/gptcurses.cc
@@ -19,6 +19,7 @@
*
*/
+#include <clocale>
#include <iostream>
#include <string>
#include <sstream>
diff --git a/support.cc b/support.cc
index d47965a..891caad 100644
--- a/support.cc
+++ b/support.cc
@@ -55,6 +55,7 @@ string ReadString(void) {
string ReadString(void) {
string inString;
+ cout << flush;
getline(cin, inString);
if (!cin.good())
exit(5);
@@ -73,7 +74,7 @@ uint64_t GetNumber(uint64_t low, uint64_t high, uint64_t def, const string & pro
if (low != high) { // bother only if low and high differ...
do {
- cout << prompt;
+ cout << prompt << flush;
cin.getline(line, 255);
if (!cin.good())
exit(5);
@@ -101,7 +102,7 @@ char GetYN(void) {
do {
if ( again ) { cout << "Your option? " ; }
again = 1 ;
- cout << "(Y/N): ";
+ cout << "(Y/N): " << flush;
line = ReadString();
response = toupper(line[0]);
} while ((response != 'Y') && (response != 'N'));