aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/utf/plan9.h
blob: 1ca8ace72e7834d6c0d901822136f9c9bbdfee6b (plain)
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
/*
 * compiler directive on Plan 9
 */
#ifndef USED
#define USED(x) if(x);else
#endif

/*
 * easiest way to make sure these are defined
 */
#define uchar	_utfuchar
#define ushort	_utfushort
#define uint	_utfuint
#define ulong	_utfulong
typedef unsigned char		uchar;
typedef unsigned short		ushort;
typedef unsigned int		uint;
typedef unsigned long		ulong;

/*
 * nil cannot be ((void*)0) on ANSI C,
 * because it is used for function pointers
 */
#undef	nil
#define	nil	0

#undef	nelem
#define	nelem(x)	(sizeof (x)/sizeof (x)[0])