mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
Expand UTIL_requireUserConfirmation to include stdin input check
This commit is contained in:
@ -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