mirror of https://github.com/MidnightCommander/mc
(str_convert_to_input): make inline.
(str_convert_to_display): likewise. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f5b813a0ab
commit
7acf07ee6e
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue