1*84d9c625SLionel Sambuc /* $NetBSD: conv.h,v 1.2 2013/11/22 15:52:05 christos Exp $ */ 2*84d9c625SLionel Sambuc #define KEY_COL(sp, ch) \ 3*84d9c625SLionel Sambuc (INTISWIDE(ch) ? \ 4*84d9c625SLionel Sambuc (CHAR_WIDTH(sp, ch) >= 0) ? \ 5*84d9c625SLionel Sambuc (size_t)CHAR_WIDTH(sp, ch) : 1 /* extra space */ \ 6*84d9c625SLionel Sambuc : KEY_LEN(sp,ch)) 7*84d9c625SLionel Sambuc 8*84d9c625SLionel Sambuc struct _conv_win { 9*84d9c625SLionel Sambuc void *bp1; 10*84d9c625SLionel Sambuc size_t blen1; 11*84d9c625SLionel Sambuc }; 12*84d9c625SLionel Sambuc 13*84d9c625SLionel Sambuc typedef int (*char2wchar_t) 14*84d9c625SLionel Sambuc (SCR *, const char *, ssize_t, struct _conv_win *, size_t *, const CHAR_T **); 15*84d9c625SLionel Sambuc typedef int (*wchar2char_t) 16*84d9c625SLionel Sambuc (SCR *, const CHAR_T *, ssize_t, struct _conv_win *, size_t *, const char **); 17*84d9c625SLionel Sambuc 18*84d9c625SLionel Sambuc struct _conv { 19*84d9c625SLionel Sambuc char2wchar_t sys2int; 20*84d9c625SLionel Sambuc wchar2char_t int2sys; 21*84d9c625SLionel Sambuc char2wchar_t file2int; 22*84d9c625SLionel Sambuc wchar2char_t int2file; 23*84d9c625SLionel Sambuc char2wchar_t input2int; 24*84d9c625SLionel Sambuc wchar2char_t int2disp; 25*84d9c625SLionel Sambuc }; 26*84d9c625SLionel Sambuc void conv_init __P((SCR *, SCR *)); 27*84d9c625SLionel Sambuc int conv_enc __P((SCR *, int, const char *)); 28