plan9.h - 9base - revived minimalist port of Plan 9 userland to Unix
(HTM) git clone git://git.suckless.org/9base
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
plan9.h (721B)
---
1 #include <inttypes.h>
2
3 /*
4 * compiler directive on Plan 9
5 */
6 #ifndef USED
7 #define USED(x) if(x);else
8 #endif
9
10 /*
11 * easiest way to make sure these are defined
12 */
13 #define uchar _fmtuchar
14 #define ushort _fmtushort
15 #define uint _fmtuint
16 #define ulong _fmtulong
17 #define vlong _fmtvlong
18 #define uvlong _fmtuvlong
19 #define uintptr _fmtuintptr
20
21 typedef unsigned char uchar;
22 typedef unsigned short ushort;
23 typedef unsigned int uint;
24 typedef unsigned long ulong;
25 typedef unsigned long long uvlong;
26 typedef long long vlong;
27 typedef uintptr_t uintptr;
28
29 /*
30 * nil cannot be ((void*)0) on ANSI C,
31 * because it is used for function pointers
32 */
33 #undef nil
34 #define nil 0
35
36 #undef nelem
37 #define nelem(x) (sizeof (x)/sizeof (x)[0])
38