From 1668d78998660ff1461e3558a186fa0c25c6db10 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Tue, 2 Jan 2007 21:39:34 +0200 Subject: [PATCH] Make cp2utf8 return a pointer to const. --- src/intl/charsets.c | 2 +- src/intl/charsets.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/intl/charsets.c b/src/intl/charsets.c index cc2b7323a..e1eb11a89 100644 --- a/src/intl/charsets.c +++ b/src/intl/charsets.c @@ -741,7 +741,7 @@ cp2u(int from, unsigned char c) } /* This slow and ugly code is used by the terminal utf_8_io */ -unsigned char * +const unsigned char * cp2utf8(int from, int c) { from &= ~SYSTEM_CHARSET_FLAG; diff --git a/src/intl/charsets.h b/src/intl/charsets.h index bee9d14e5..7f95e3e84 100644 --- a/src/intl/charsets.h +++ b/src/intl/charsets.h @@ -136,7 +136,7 @@ unicode_val_T cp_to_unicode(int, unsigned char **, unsigned char *); #endif /* CONFIG_UTF8 */ unicode_val_T cp2u(int, unsigned char); -unsigned char *cp2utf8(int, int); +const unsigned char *cp2utf8(int, int); const unsigned char *u2cp_(unicode_val_T, int, enum nbsp_mode); #define u2cp(u, to) u2cp_(u, to, NBSP_MODE_HACK)