wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

plan9.h (769B)


      1 /*
      2  * compiler directive on Plan 9
      3  */
      4 
      5 /*
      6  * easiest way to make sure these are defined
      7  */
      8 #ifndef KENC
      9 # ifndef USED
     10 #  define USED(x) if(x);else
     11 # endif
     12 #endif
     13 
     14 #define uchar	_p9uchar
     15 #define ushort	_p9ushort
     16 #define uint	_p9uint
     17 #define ulong	_p9ulong
     18 typedef unsigned char		uchar;
     19 typedef unsigned short		ushort;
     20 typedef unsigned int		uint;
     21 typedef unsigned long		ulong;
     22 typedef long long		vlong;
     23 typedef unsigned long long	uvlong;
     24 
     25 #include <utf.h>
     26 #include <stdint.h>
     27 #include <fmt.h>
     28 #include <string.h>
     29 #include <unistd.h>
     30 
     31 #define OREAD		O_RDONLY
     32 #define OWRITE	O_WRONLY
     33 
     34 #define	OCEXEC 0
     35 #define	ORCLOSE	0
     36 #define	OTRUNC	0
     37 
     38 #define	exits(x)	exit(x && *x ? 1 : 0)
     39 
     40 #undef	nil
     41 #define	nil	((void*)0)
     42 
     43 #undef	nelem
     44 #define	nelem(x)	(sizeof (x)/sizeof (x)[0])
     45