diff options
author | Paul Duncan <pabs@pablotron.org> | 2019-01-14 23:07:35 -0500 |
---|---|---|
committer | Paul Duncan <pabs@pablotron.org> | 2019-01-14 23:07:35 -0500 |
commit | 7fdd6f36c8181115c60b781dc97b71107fb7da65 (patch) | |
tree | 1a04507fdd687ed569da4e21fc8a998cdeb29e53 /src/text | |
parent | d805435f185c0f00b53d3be17707a41aba14373c (diff) | |
download | sok-7fdd6f36c8181115c60b781dc97b71107fb7da65.tar.bz2 sok-7fdd6f36c8181115c60b781dc97b71107fb7da65.zip |
s/%zu/%d ... (int)/
Diffstat (limited to 'src/text')
-rw-r--r-- | src/text/draw.c | 8 | ||||
-rw-r--r-- | src/text/main.c | 10 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/text/draw.c b/src/text/draw.c index 762fb8f..7c23171 100644 --- a/src/text/draw.c +++ b/src/text/draw.c @@ -100,11 +100,11 @@ draw( // print title, level, and console printf( - "%s: %s (#%zu)\n" // set name, level name, and level number + "%s: %s (#%d)\n" // set name, level name, and level number "%s\n" // level - "%zu%s> ", // console - level->pack, level->name, level_num, + "%d%s> ", // console + level->pack, level->name, (int) level_num, buf, - ctx->num_moves, sok_ctx_is_done(ctx) ? " (won!)" : "" + (int) ctx->num_moves, sok_ctx_is_done(ctx) ? " (won!)" : "" ); } diff --git a/src/text/main.c b/src/text/main.c index 7d6f144..e80e984 100644 --- a/src/text/main.c +++ b/src/text/main.c @@ -20,7 +20,7 @@ draw_moves( const sok_ctx_t * const ctx, const size_t skip_moves ) { - printf("Solution (%zu moves): ", ctx->num_moves - skip_moves); + printf("Solution (%d moves): ", (int) (ctx->num_moves - skip_moves)); for (size_t i = skip_moves; i < ctx->num_moves; i++) { if (ctx->moves[i].dir >= SOK_DIR_LAST) { die("invalid move: %u", ctx->moves[i].dir); @@ -40,7 +40,7 @@ int main(int argc, char *argv[]) { sok_ctx_init(&ctx, NULL); if (!sok_ctx_set_level(&ctx, level->data)) { - die("Couldn't load level %zu", level_num); + die("Couldn't load level %d", (int) level_num); } bool done = false; @@ -75,7 +75,7 @@ int main(int argc, char *argv[]) { // load next level if (!sok_ctx_set_level(&ctx, level->data)) { - die("Couldn't load level %zu", level_num); + die("Couldn't load level %d", (int) level_num); } } else { warn("cannot advance to next level"); @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) { case ACTION_RESET: // reset level if (!sok_ctx_set_level(&ctx, level->data)) { - die("Couldn't load level %zu", level_num); + die("Couldn't load level %d", (int) level_num); } break; @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) { // load level if (!sok_ctx_set_level(&ctx, level->data)) { - die("Couldn't load level %zu", level_num); + die("Couldn't load level %d", (int) level_num); } break; |