Mercurial > hg > dmlib
diff tools/dumpmod.c @ 2586:9807ae37ad69
Require stdbool.h, we require C11 now.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 08 Dec 2022 15:59:22 +0200 |
parents | d56a0e86067a |
children |
line wrap: on
line diff
--- a/tools/dumpmod.c Thu Dec 08 15:56:36 2022 +0200 +++ b/tools/dumpmod.c Thu Dec 08 15:59:22 2022 +0200 @@ -13,11 +13,11 @@ char *optFilename = NULL; -BOOL optViewPatterns = FALSE, - optViewInstruments = FALSE, - optViewExtInstruments = FALSE, - optViewGeneralInfo = FALSE, - optDump = FALSE; +bool optViewPatterns = false, + optViewInstruments = false, + optViewExtInstruments = false, + optViewGeneralInfo = false, + optDump = false; static const DMOptArg optList[] = @@ -44,7 +44,7 @@ } -BOOL argHandleOpt(const int optN, char *optArg, char *currArg) +bool argHandleOpt(const int optN, char *optArg, char *currArg) { (void) optArg; @@ -65,42 +65,42 @@ break; case 10: - optViewPatterns = TRUE; + optViewPatterns = true; break; case 12: - optViewInstruments = TRUE; + optViewInstruments = true; break; case 14: - optViewExtInstruments = TRUE; + optViewExtInstruments = true; break; case 16: - optViewGeneralInfo = TRUE; + optViewGeneralInfo = true; break; case 18: - optDump = TRUE; + optDump = true; break; case 20: - optViewPatterns = TRUE; - optViewInstruments = TRUE; - optViewGeneralInfo = TRUE; - optViewExtInstruments = TRUE; + optViewPatterns = true; + optViewInstruments = true; + optViewGeneralInfo = true; + optViewExtInstruments = true; break; default: dmErrorMsg("Unimplemented option argument '%s'.\n", currArg); - return FALSE; + return false; } - return TRUE; + return true; } -BOOL argHandleFile(char *currArg) +bool argHandleFile(char *currArg) { // Was not option argument if (!optFilename) @@ -108,10 +108,10 @@ else { dmErrorMsg("Oh noes, we can only hand one file and '%s' looks like a second one!\n", currArg); - return FALSE; + return false; } - return TRUE; + return true; } @@ -461,10 +461,10 @@ { dmMsg(2, "* Trying XM...\n"); dmfreset(file); - if ((res = jssLoadXM(file, &mod, TRUE)) == DMERR_OK) + if ((res = jssLoadXM(file, &mod, true)) == DMERR_OK) { dmfreset(file); - res = jssLoadXM(file, &mod, FALSE); + res = jssLoadXM(file, &mod, false); } } #endif @@ -473,10 +473,10 @@ { dmMsg(1, "* Trying JSSMOD ...\n"); dmfreset(file); - if ((res = jssLoadJSSMOD(file, &mod, TRUE)) == DMERR_OK) + if ((res = jssLoadJSSMOD(file, &mod, true)) == DMERR_OK) { dmfreset(file); - res = jssLoadJSSMOD(file, &mod, FALSE); + res = jssLoadJSSMOD(file, &mod, false); } } #endif