From 8a907510dd8fa184f49b367c8207fc58c4e04e9f Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 1 Jun 2022 08:29:29 +0100 Subject: [PATCH] decode_codepage(): add missing const in prototype. --- putty.h | 2 +- unix/unicode.c | 2 +- windows/unicode.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/putty.h b/putty.h index 13c186cf..eddc7b56 100644 --- a/putty.h +++ b/putty.h @@ -2440,7 +2440,7 @@ int wc_to_mb(int codepage, int flags, const wchar_t *wcstr, int wclen, struct unicode_data *ucsdata); wchar_t xlat_uskbd2cyrllic(int ch); int check_compose(int first, int second); -int decode_codepage(char *cp_name); +int decode_codepage(const char *cp_name); const char *cp_enumerate (int index); const char *cp_name(int codepage); void get_unitab(int codepage, wchar_t * unitab, int ftype); diff --git a/unix/unicode.c b/unix/unicode.c index 4eaa45f4..1db17ef4 100644 --- a/unix/unicode.c +++ b/unix/unicode.c @@ -264,7 +264,7 @@ const char *cp_enumerate(int index) return charset_to_localenc(charset); } -int decode_codepage(char *cp_name) +int decode_codepage(const char *cp_name) { if (!cp_name || !*cp_name) return CS_UTF8; diff --git a/windows/unicode.c b/windows/unicode.c index c507a941..ed9a3050 100644 --- a/windows/unicode.c +++ b/windows/unicode.c @@ -1000,9 +1000,9 @@ int check_compose(int first, int second) return check_compose_internal(first, second, 0); } -int decode_codepage(char *cp_name) +int decode_codepage(const char *cp_name) { - char *s, *d; + const char *s, *d; const struct cp_list_item *cpi; int codepage = -1; CPINFO cpinfo;