1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

Make encode_utf8() extern even without CONFIG_UTF8.

It will soon be needed for conversions from UTF-16 to UTF-8.
This commit is contained in:
Kalle Olavi Niemitalo 2008-10-18 16:08:46 +03:00 committed by Kalle Olavi Niemitalo
parent a82a5cc6d5
commit 9088f11c64
2 changed files with 1 additions and 8 deletions

View File

@ -178,10 +178,8 @@ u2cp_(unicode_val_T u, int to, enum nbsp_mode nbsp_mode)
to &= ~SYSTEM_CHARSET_FLAG;
#ifdef CONFIG_UTF8
if (is_cp_ptr_utf8(&codepages[to]))
return encode_utf8(u);
#endif /* CONFIG_UTF8 */
/* To mark non breaking spaces in non-UTF-8 strings, we use a
* special char NBSP_CHAR. */
@ -214,13 +212,8 @@ u2cp_(unicode_val_T u, int to, enum nbsp_mode nbsp_mode)
static unsigned char utf_buffer[7];
#ifdef CONFIG_UTF8
inline unsigned char *
encode_utf8(unicode_val_T u)
#else
static unsigned char *
encode_utf8(unicode_val_T u)
#endif /* CONFIG_UTF8 */
{
memset(utf_buffer, 0, 7);

View File

@ -113,8 +113,8 @@ unsigned char *get_cp_config_name(int);
unsigned char *get_cp_mime_name(int);
int is_cp_utf8(int);
void free_conv_table(void);
#ifdef CONFIG_UTF8
inline unsigned char *encode_utf8(unicode_val_T);
#ifdef CONFIG_UTF8
inline unsigned char *utf8_prevchar(unsigned char *, int, unsigned char *);
inline int utf8charlen(const unsigned char *);
int utf8_char2cells(unsigned char *, unsigned char *);