Expand UTIL_requireUserConfirmation to include stdin input check
This commit is contained in:
+4
-1
@@ -88,9 +88,12 @@ UTIL_STATIC void* UTIL_realloc(void *ptr, size_t size)
|
||||
int g_utilDisplayLevel;
|
||||
|
||||
int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg,
|
||||
const char* acceptableLetters) {
|
||||
const char* acceptableLetters, int hasStdinInput) {
|
||||
int ch, result;
|
||||
|
||||
if (hasStdinInput)
|
||||
return 1;
|
||||
|
||||
UTIL_DISPLAY("%s", prompt);
|
||||
ch = getchar();
|
||||
result = 0;
|
||||
|
||||
Reference in New Issue
Block a user