# HG changeset patch # User Matti Hamalainen # Date 1560619247 -10800 # Node ID 2e656da1b10b52aa3cce714f718d0b1d7049a90a # Parent bb7255792dd6f3ba5613e55b851ab2340d9a449d Cleanup. diff -r bb7255792dd6 -r 2e656da1b10b tools/64vw.c --- a/tools/64vw.c Sat Jun 15 20:19:21 2019 +0300 +++ b/tools/64vw.c Sat Jun 15 20:20:47 2019 +0300 @@ -452,7 +452,7 @@ case SDLK_SPACE: case SDLK_UP: case SDLK_RIGHT: - if (currIndex < noptFilenames2 - 1) + if (currIndex + 1 < noptFilenames2) currIndex++; else currIndex = noptFilenames2 - 1; @@ -466,7 +466,7 @@ break; case SDLK_PAGEUP: - if (currIndex < noptFilenames2 - 1 - SET_SKIP_AMOUNT) + if (currIndex + 1 + SET_SKIP_AMOUNT < noptFilenames2) currIndex += SET_SKIP_AMOUNT; else currIndex = noptFilenames2 - 1; diff -r bb7255792dd6 -r 2e656da1b10b tools/fanalyze.c --- a/tools/fanalyze.c Sat Jun 15 20:19:21 2019 +0300 +++ b/tools/fanalyze.c Sat Jun 15 20:20:47 2019 +0300 @@ -212,7 +212,7 @@ for (int n = 0; n < node->nvalues; n++) { - const char *veol = (n < node->nvalues - 1) ? " " : "\n"; + const char *veol = (n + 1 < node->nvalues) ? " " : "\n"; if (match) { diff -r bb7255792dd6 -r 2e656da1b10b tools/gentab.c --- a/tools/gentab.c Sat Jun 15 20:19:21 2019 +0300 +++ b/tools/gentab.c Sat Jun 15 20:20:47 2019 +0300 @@ -249,7 +249,7 @@ fprintf(outFile, "%ld%s", lrint(value), - (n < optPerLine - 1) ? "," : ""); + (n + 1 < optPerLine) ? "," : ""); if (++n >= optPerLine) {