/usr/include/libAfterImage/char2uni.h is in libafterimage-dev 2.2.12-6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | #ifndef CHAR2UNI_H_HEADER_INCLUDED
#define CHAR2UNI_H_HEADER_INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
CHARSET_ISO8859_1 = 0, /* Does not require translation */
CHARSET_ISO8859_2,
CHARSET_ISO8859_3,
CHARSET_ISO8859_4,
CHARSET_ISO8859_5,
CHARSET_ISO8859_6,
CHARSET_ISO8859_7,
CHARSET_ISO8859_8,
CHARSET_ISO8859_9,
CHARSET_ISO8859_10,
CHARSET_ISO8859_13,
CHARSET_ISO8859_14,
CHARSET_ISO8859_15,
CHARSET_ISO8859_16,
CHARSET_KOI8_R,
CHARSET_KOI8_RU,
CHARSET_KOI8_U,
CHARSET_CP1250,
CHARSET_CP1251,
CHARSET_CP1252,
CHARSET_UTF8,
SUPPORTED_CHARSETS_NUM
}ASSupportedCharsets ;
extern const unsigned short *as_current_charset ;
extern ASSupportedCharsets as_current_charset_id ;
#define UNICODE_CHAR CARD32
#define IsUTF8Locale() (as_current_charset_id==CHARSET_UTF8)
/*
#define CHAR2UNICODE(c) \
((UNICODE_CHAR)(((((unsigned short)(c))&0x0080)!=0)? \
as_current_charset[((unsigned short)text[i])&0x007F]:\
((unsigned char)(c))))
*/
#if 1 /*def I18N*/
#define CHAR2UNICODE(c) \
((UNICODE_CHAR)(((((unsigned short)(c))&0x0080)!=0)? \
as_current_charset[((unsigned short)(c))&0x007F]:\
((unsigned char)(c))))
#else
#define CHAR2UNICODE(c) ((UNICODE_CHAR)(((unsigned short)(c))&0x00FF))
#endif
ASSupportedCharsets as_set_charset( ASSupportedCharsets new_charset );
ASSupportedCharsets parse_charset_name( const char *name );
/****d* libAfterImage/CHAR_SIZE
* NAME
* CHAR_SIZE - Convenient macro so we can transparently determine the
* number of bytes that character spans. It assumes UTF-8 encoding when
* I18N is enabled.
* SOURCE
*/
/* size of the UTF-8 encoded character is based on value of
* the first byte : */
#define UTF8_CHAR_SIZE(c) ((((c)&0xC0)==0xC0)? \
(((c)&0x20)? \
(((c)&0x10)? \
(((c)&0x08)? \
(((c)&0x04)?6:5):4):3):2):1)
#ifdef WIN32
#define UNICODE_CHAR_SIZE(c) sizeof(UNICODE_CHAR)
#endif
#define CHAR_SIZE(c) 1
/*************/
#ifdef __cplusplus
}
#endif
#endif
|