9base

revived minimalist port of Plan 9 userland to Unix
git clone git://git.suckless.org/9base
Log | Files | Refs | README | LICENSE

plan9.h (531B)


      1 /*
      2  * compiler directive on Plan 9
      3  */
      4 #ifndef USED
      5 #define USED(x) if(x);else
      6 #endif
      7 
      8 /*
      9  * easiest way to make sure these are defined
     10  */
     11 #define uchar	_utfuchar
     12 #define ushort	_utfushort
     13 #define uint	_utfuint
     14 #define ulong	_utfulong
     15 typedef unsigned char		uchar;
     16 typedef unsigned short		ushort;
     17 typedef unsigned int		uint;
     18 typedef unsigned long		ulong;
     19 
     20 /*
     21  * nil cannot be ((void*)0) on ANSI C,
     22  * because it is used for function pointers
     23  */
     24 #undef	nil
     25 #define	nil	0
     26 
     27 #undef	nelem
     28 #define	nelem(x)	(sizeof (x)/sizeof (x)[0])
     29