diff --git a/lib/charsets.c b/lib/charsets.c index 3c01ca6a3..8f5485836 100644 --- a/lib/charsets.c +++ b/lib/charsets.c @@ -350,14 +350,6 @@ convert_to_display (char *str) /* --------------------------------------------------------------------------------------------- */ -GString * -str_convert_to_display (const char *str) -{ - return str_nconvert_to_display (str, -1); -} - -/* --------------------------------------------------------------------------------------------- */ - GString * str_nconvert_to_display (const char *str, int len) { @@ -390,14 +382,6 @@ convert_from_input (char *str) /* --------------------------------------------------------------------------------------------- */ -GString * -str_convert_to_input (const char *str) -{ - return str_nconvert_to_input (str, -1); -} - -/* --------------------------------------------------------------------------------------------- */ - GString * str_nconvert_to_input (const char *str, int len) { diff --git a/lib/charsets.h b/lib/charsets.h index 9e3708b2c..a7c1bb732 100644 --- a/lib/charsets.h +++ b/lib/charsets.h @@ -66,13 +66,12 @@ int convert_from_8bit_to_utf_c (char input_char, GIConv conv); */ int convert_from_8bit_to_utf_c2 (char input_char); -GString *str_convert_to_input (const char *str); GString *str_nconvert_to_input (const char *str, int len); - -GString *str_convert_to_display (const char *str); GString *str_nconvert_to_display (const char *str, int len); +/* --------------------------------------------------------------------------------------------- */ /*** inline functions ****************************************************************************/ +/* --------------------------------------------------------------------------------------------- */ /* Convert single characters */ static inline int @@ -83,6 +82,8 @@ convert_to_display_c (int c) return (int) conv_displ[c]; } +/* --------------------------------------------------------------------------------------------- */ + static inline int convert_from_input_c (int c) { @@ -91,4 +92,22 @@ convert_from_input_c (int c) return (int) conv_input[c]; } +/* --------------------------------------------------------------------------------------------- */ + +static inline GString * +str_convert_to_input (const char *str) +{ + return str_nconvert_to_input (str, -1); +} + +/* --------------------------------------------------------------------------------------------- */ + +static inline GString * +str_convert_to_display (const char *str) +{ + return str_nconvert_to_display (str, -1); +} + +/* --------------------------------------------------------------------------------------------- */ + #endif /* MC__CHARSETS_H */