diff --git a/src/game.c b/src/game.c index 3ee99bf..1521fa1 100644 --- a/src/game.c +++ b/src/game.c @@ -290,7 +290,7 @@ static int ask_number_players (void) done = true; } else if (wcschr(keycode_contgame, key) != NULL) { left(curwin, getcury(curwin), getcurx(curwin), A_BOLD, - 0, 0, 1, "%lc", *keycode_contgame); + 0, 0, 1, "%lc", (wint_t) *keycode_contgame); wrefresh(curwin); ret = 0; diff --git a/src/intf.c b/src/intf.c index 9aa2fdf..e8eb0af 100644 --- a/src/intf.c +++ b/src/intf.c @@ -156,7 +156,7 @@ typedef struct txwin { enum argument_type { TYPE_NONE, // No type yet assigned TYPE_CHAR, // char - TYPE_WCHAR, // wchar_t + TYPE_WCHAR, // wint_t TYPE_INT, // int TYPE_LONGINT, // long int TYPE_DOUBLE, // double @@ -168,7 +168,7 @@ struct argument { enum argument_type a_type; union a { char a_char; - wchar_t a_wchar; + wint_t a_wchar; int a_int; long int a_longint; double a_double; @@ -1092,9 +1092,10 @@ int mkchstr_parse (const wchar_t *restrict format, break; case TYPE_WCHAR: - format_arg->a.a_wchar = (wchar_t) (sizeof(wchar_t) < sizeof(int) ? - va_arg(args, int) : - va_arg(args, wchar_t)); + format_arg->a.a_wchar = + (wint_t) (sizeof(wint_t) < sizeof(int) ? + va_arg(args, int) : + va_arg(args, wint_t)); break; case TYPE_INT: diff --git a/src/intf.h b/src/intf.h index 322ded0..db73c8a 100644 --- a/src/intf.h +++ b/src/intf.h @@ -365,7 +365,7 @@ extern int txdlgbox (int maxlines, int ncols, int begin_y, int begin_x, %% - Insert the ASCII percent sign (ASCII code U+0025) %c - Insert the next parameter as a character (type char) - %lc - Insert the next parameter as a wide char (type wchar_t) + %lc - Insert the next parameter as a wide char (type wint_t) %s - Insert the next parameter as a string (type char *) %ls - Insert the next parameter as a wide string (type wchar_t *) %d - Insert the next parameter as an integer (type int) diff --git a/src/move.c b/src/move.c index 5e5271a..03c819e 100644 --- a/src/move.c +++ b/src/move.c @@ -243,7 +243,8 @@ selection_t get_move (void) right(curwin, 1, getmaxx(curwin) / 2, attr_normal, attr_keycode, attr_choice, 1, _("Select move [^[%lc^]-^[%lc^]/^{1^}-^{3^}/^{^}]: "), - PRINTABLE_GAME_MOVE(0), PRINTABLE_GAME_MOVE(NUMBER_MOVES - 1)); + (wint_t) PRINTABLE_GAME_MOVE(0), + (wint_t) PRINTABLE_GAME_MOVE(NUMBER_MOVES - 1)); curs_set(CURS_ON); wrefresh(curwin); @@ -274,7 +275,8 @@ selection_t get_move (void) /* TRANSLATORS: "Move" refers to the choice of moves made by the current player (out of a selection of 20 moves). */ - _("Move ^{%lc^}"), PRINTABLE_GAME_MOVE(i)); + _("Move ^{%lc^}"), + (wint_t) PRINTABLE_GAME_MOVE(i)); break; } diff --git a/src/utils.c b/src/utils.c index 39abf31..0d6cc6f 100644 --- a/src/utils.c +++ b/src/utils.c @@ -613,7 +613,7 @@ size_t xwcrtomb (char *restrict dest, wchar_t wc, mbstate_t *restrict mbstate) dest[n] = EILSEQ_REPL; dest[n++] = '\0'; } else { - errno_exit(_("xwcrtomb: `%lc'"), wc); + errno_exit(_("xwcrtomb: `%lc'"), (wint_t) wc); } }