Move logic into new function FIO_removeMultiFilesWarning, add support for decompression

This commit is contained in:
senhuang42
2020-08-26 16:50:20 -04:00
parent 3aec385a10
commit 7991c55181
3 changed files with 40 additions and 26 deletions
+5 -5
View File
@@ -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;
}