fiss

Friedel's Initialization and Service Supervision
Log | Files | Refs | LICENSE

plan9.h (562B)


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