lib/charsets.[ch]: clarify usage of const qualifier.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-03-29 10:39:41 +03:00
parent ff9d37cb8f
commit fde36f2d1a
2 changed files with 14 additions and 14 deletions

View File

@ -354,7 +354,7 @@ convert_to_display (char *str)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
GString * GString *
str_convert_to_display (char *str) str_convert_to_display (const char *str)
{ {
return str_nconvert_to_display (str, -1); return str_nconvert_to_display (str, -1);
@ -363,7 +363,7 @@ str_convert_to_display (char *str)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
GString * GString *
str_nconvert_to_display (char *str, int len) str_nconvert_to_display (const char *str, int len)
{ {
GString *buff; GString *buff;
GIConv conv; GIConv conv;
@ -400,7 +400,7 @@ convert_from_input (char *str)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
GString * GString *
str_convert_to_input (char *str) str_convert_to_input (const char *str)
{ {
return str_nconvert_to_input (str, -1); return str_nconvert_to_input (str, -1);
} }
@ -408,7 +408,7 @@ str_convert_to_input (char *str)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
GString * GString *
str_nconvert_to_input (char *str, int len) str_nconvert_to_input (const char *str, int len)
{ {
GString *buff; GString *buff;
GIConv conv; GIConv conv;
@ -466,7 +466,7 @@ convert_from_utf_to_current (const char *str)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
unsigned char unsigned char
convert_from_utf_to_current_c (const int input_char, GIConv conv) convert_from_utf_to_current_c (int input_char, GIConv conv)
{ {
unsigned char str[UTF8_CHAR_LEN + 1]; unsigned char str[UTF8_CHAR_LEN + 1];
unsigned char buf_ch[UTF8_CHAR_LEN + 1]; unsigned char buf_ch[UTF8_CHAR_LEN + 1];
@ -498,7 +498,7 @@ convert_from_utf_to_current_c (const int input_char, GIConv conv)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
int int
convert_from_8bit_to_utf_c (const char input_char, GIConv conv) convert_from_8bit_to_utf_c (char input_char, GIConv conv)
{ {
unsigned char str[2]; unsigned char str[2];
unsigned char buf_ch[UTF8_CHAR_LEN + 1]; unsigned char buf_ch[UTF8_CHAR_LEN + 1];
@ -530,7 +530,7 @@ convert_from_8bit_to_utf_c (const char input_char, GIConv conv)
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */
int int
convert_from_8bit_to_utf_c2 (const char input_char) convert_from_8bit_to_utf_c2 (char input_char)
{ {
unsigned char str[2]; unsigned char str[2];
int ch = '.'; int ch = '.';

View File

@ -50,27 +50,27 @@ unsigned char convert_from_utf_to_current (const char *str);
* param input_char, gunichar * param input_char, gunichar
* return char in needle codepage (by global int mc_global.source_codepage) * return char in needle codepage (by global int mc_global.source_codepage)
*/ */
unsigned char convert_from_utf_to_current_c (const int input_char, GIConv conv); unsigned char convert_from_utf_to_current_c (int input_char, GIConv conv);
/* /*
* Converter from selected codepage 8-bit * Converter from selected codepage 8-bit
* param char input_char, GIConv converter * param char input_char, GIConv converter
* return int utf char * return int utf char
*/ */
int convert_from_8bit_to_utf_c (const char input_char, GIConv conv); int convert_from_8bit_to_utf_c (char input_char, GIConv conv);
/* /*
* Converter from display codepage 8-bit to utf-8 * Converter from display codepage 8-bit to utf-8
* param char input_char, GIConv converter * param char input_char, GIConv converter
* return int utf char * return int utf char
*/ */
int convert_from_8bit_to_utf_c2 (const char input_char); int convert_from_8bit_to_utf_c2 (char input_char);
GString *str_convert_to_input (char *str); GString *str_convert_to_input (const char *str);
GString *str_nconvert_to_input (char *str, int len); GString *str_nconvert_to_input (const char *str, int len);
GString *str_convert_to_display (char *str); GString *str_convert_to_display (const char *str);
GString *str_nconvert_to_display (char *str, int len); GString *str_nconvert_to_display (const char *str, int len);
/*** inline functions ****************************************************************************/ /*** inline functions ****************************************************************************/