9base

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

sys.std.h (614B)


      1 #include <utf.h>
      2 #include <fmt.h>
      3 #include <bio.h>
      4 #include <regexp9.h>
      5 #include <stdlib.h>
      6 #include <unistd.h>
      7 #include <fcntl.h>
      8 #include <string.h>
      9 #include <ctype.h>
     10 #include <time.h>
     11 #include <stdint.h>
     12 
     13 #define OREAD		O_RDONLY
     14 #define OWRITE	O_WRONLY
     15 #define ORDWR	O_RDWR
     16 #define nil 0
     17 #define nelem(x) (sizeof(x)/sizeof((x)[0]))
     18 #define seek lseek
     19 #define remove unlink
     20 #define exits(x)	exit(x && *(char*)x ? 1 : 0)
     21 #define USED(x)	if(x){}else
     22 #define create(name, mode, perm)	open(name, mode|O_CREAT, perm)
     23 #define ERRMAX	256
     24 
     25 typedef uintptr_t uintptr;
     26 #define uchar mk_uchar
     27 typedef unsigned char uchar;