guard against Solaris preprocessor polution
[nvi.git] / common / conv.h
bloba6b4a97a933ae0956eea508f0ab18fb1b6942b8e
1 #define F_GB 'A'
3 #define INT9494(f,r,c) ((f) << 16) | ((r) << 8) | (c)
4 #define INTIS9494(c) !!(((c) >> 16) & 0x7F)
5 #define INTISUCS(c) ((c & ~0x7F) && !(((c) >> 16) & 0x7F))
6 #define INTUCS(c) (c)
7 #define INT9494F(c) ((c) >> 16) & 0x7F
8 #define INT9494R(c) ((c) >> 8) & 0x7F
9 #define INT9494C(c) (c) & 0x7F
10 #define INTILL(c) (1 << 23) | (c)
12 #define KEY_COL(sp, ch) \
13 (INTISWIDE(ch) ? CHAR_WIDTH(sp, ch) : KEY_LEN(sp,ch))
15 struct _conv_win {
16 void *bp1;
17 size_t blen1;
18 void *bp2;
19 size_t blen2;
22 typedef int (*char2wchar_t)
23 (SCR *, const char *, ssize_t, struct _conv_win *, size_t *, CHAR_T **);
24 typedef int (*wchar2char_t)
25 (SCR *, const CHAR_T *, ssize_t, struct _conv_win *, size_t *, char **);
27 struct _conv {
28 char2wchar_t char2int;
29 wchar2char_t int2char;
30 char2wchar_t file2int;
31 wchar2char_t int2file;
32 wchar2char_t int2disp;