minix/external/bsd/nvi/dist/common/conv.h
Lionel Sambuc 84d9c625bf Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
 - Fix for default mtree style
 - Update libelf
 - Importing libexecinfo
 - Resynchronize GCC, mpc, gmp, mpfr
 - build.sh: Replace params with show-params.
     This has been done as the make target has been renamed in the same
     way, while a new target named params has been added. This new
     target generates a file containing all the parameters, instead of
     printing it on the console.
 - Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
     get getservbyport() out of the inner loop

Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
2014-07-28 17:05:06 +02:00

28 lines
773 B
C

/* $NetBSD: conv.h,v 1.2 2013/11/22 15:52:05 christos Exp $ */
#define KEY_COL(sp, ch) \
(INTISWIDE(ch) ? \
(CHAR_WIDTH(sp, ch) >= 0) ? \
(size_t)CHAR_WIDTH(sp, ch) : 1 /* extra space */ \
: KEY_LEN(sp,ch))
struct _conv_win {
void *bp1;
size_t blen1;
};
typedef int (*char2wchar_t)
(SCR *, const char *, ssize_t, struct _conv_win *, size_t *, const CHAR_T **);
typedef int (*wchar2char_t)
(SCR *, const CHAR_T *, ssize_t, struct _conv_win *, size_t *, const char **);
struct _conv {
char2wchar_t sys2int;
wchar2char_t int2sys;
char2wchar_t file2int;
wchar2char_t int2file;
char2wchar_t input2int;
wchar2char_t int2disp;
};
void conv_init __P((SCR *, SCR *));
int conv_enc __P((SCR *, int, const char *));