Move logic into new function FIO_removeMultiFilesWarning, add support for decompression
This commit is contained in:
+5
-5
@@ -87,20 +87,20 @@ UTIL_STATIC void* UTIL_realloc(void *ptr, size_t size)
|
||||
******************************************/
|
||||
int g_utilDisplayLevel;
|
||||
|
||||
int UTIL_requireUserConfirmationToProceed(const char* prompt, const char* abortMsg,
|
||||
int UTIL_requireUserConfirmation(const char* prompt, const char* abortMsg,
|
||||
const char* acceptableLetters) {
|
||||
int ch;
|
||||
int ch, result;
|
||||
UTIL_DISPLAY("%s", prompt);
|
||||
ch = getchar();
|
||||
result = 0;
|
||||
if (strchr(acceptableLetters, ch) == NULL) {
|
||||
UTIL_DISPLAY("%s", abortMsg);
|
||||
return 1;
|
||||
result = 1;
|
||||
}
|
||||
/* flush the rest */
|
||||
while ((ch!=EOF) && (ch!='\n'))
|
||||
ch = getchar();
|
||||
|
||||
return 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user