1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 11:02:48 -05:00

Add some missing consts in character set handling.

[originally from svn r9291]
This commit is contained in:
Simon Tatham
2011-09-16 19:18:52 +00:00
parent b53c04b43a
commit c8d943ed9d
7 changed files with 21 additions and 14 deletions

View File

@ -690,7 +690,8 @@ gint key_event(GtkWidget *widget, GdkEventKey *event, gpointer data)
*/
output_charset = CS_UTF8;
{
wchar_t widedata[32], *wp;
wchar_t widedata[32];
const wchar_t *wp;
int wlen;
int ulen;
@ -1638,7 +1639,7 @@ void write_clip(void *frontend, wchar_t * data, int *attr, int len, int must_des
* if we aren't in direct-to-font mode using the D800 hack.
*/
if (!inst->direct_to_font) {
wchar_t *tmp = data;
const wchar_t *tmp = data;
int tmplen = len;
XTextProperty tp;
char *list[1];

View File

@ -21,7 +21,7 @@ int is_dbcs_leadbyte(int codepage, char byte)
return 0; /* we don't do DBCS */
}
int mb_to_wc(int codepage, int flags, char *mbstr, int mblen,
int mb_to_wc(int codepage, int flags, const char *mbstr, int mblen,
wchar_t *wcstr, int wclen)
{
if (codepage == DEFAULT_CODEPAGE) {
@ -59,7 +59,7 @@ int mb_to_wc(int codepage, int flags, char *mbstr, int mblen,
NULL, NULL, 0);
}
int wc_to_mb(int codepage, int flags, wchar_t *wcstr, int wclen,
int wc_to_mb(int codepage, int flags, const wchar_t *wcstr, int wclen,
char *mbstr, int mblen, char *defchr, int *defused,
struct unicode_data *ucsdata)
{
@ -162,7 +162,8 @@ int init_ucs(struct unicode_data *ucsdata, char *linecharset,
* in the line codepage into Unicode.
*/
for (i = 0; i < 256; i++) {
char c[1], *p;
char c[1];
const char *p;
wchar_t wc[1];
int len;
c[0] = i;
@ -216,7 +217,8 @@ int init_ucs(struct unicode_data *ucsdata, char *linecharset,
* simply CP437.
*/
for (i = 0; i < 256; i++) {
char c[1], *p;
char c[1];
const char *p;
wchar_t wc[1];
int len;
c[0] = i;