2007-07-01 15:08:30 +04:00
|
|
|
/*
|
|
|
|
* compiler directive on Plan 9
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* easiest way to make sure these are defined
|
|
|
|
*/
|
2007-07-03 13:13:01 +04:00
|
|
|
#ifndef KENC
|
|
|
|
# ifndef USED
|
|
|
|
# define USED(x) if(x);else
|
|
|
|
# endif
|
|
|
|
#endif
|
2008-01-18 23:05:45 +03:00
|
|
|
|
|
|
|
#define uchar _p9uchar
|
|
|
|
#define ushort _p9ushort
|
|
|
|
#define uint _p9uint
|
|
|
|
#define ulong _p9ulong
|
2007-07-01 15:08:30 +04:00
|
|
|
typedef unsigned char uchar;
|
|
|
|
typedef unsigned short ushort;
|
|
|
|
typedef unsigned int uint;
|
|
|
|
typedef unsigned long ulong;
|
|
|
|
typedef long long vlong;
|
|
|
|
typedef unsigned long long uvlong;
|
|
|
|
|
2007-07-03 13:13:01 +04:00
|
|
|
#include <utf.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <fmt.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2007-07-01 15:08:30 +04:00
|
|
|
#define OREAD O_RDONLY
|
|
|
|
#define OWRITE O_WRONLY
|
|
|
|
|
|
|
|
#define OCEXEC 0
|
|
|
|
#define ORCLOSE 0
|
|
|
|
#define OTRUNC 0
|
|
|
|
|
|
|
|
#define exits(x) exit(x && *x ? 1 : 0)
|
|
|
|
|
|
|
|
#undef nil
|
|
|
|
#define nil ((void*)0)
|
|
|
|
|
|
|
|
#undef nelem
|
|
|
|
#define nelem(x) (sizeof (x)/sizeof (x)[0])
|
|
|
|
|