kip/a.h

39 lines
809 B
C

#include<stdarg.h>
#include<stdint.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<unistd.h>
#define IM const
#define N(a,...)Q(!(a),__VA_ARGS__)
#define NR _Noreturn
#define OR else
#define Q(a,...)if((a)){__VA_ARGS__;}
#define R return
#define SZ sizeof
#define VA(a,...){va_list ap;va_start(ap,a);__VA_ARGS__;va_end(ap);}
#define WH(a,...)while((a)){__VA_ARGS__;}
#define WIF(f,n,p,...){f=xopen(n,p);__VA_ARGS__;fclose(f);}
#define _ static
typedef void V;
typedef int I;
typedef char C;
typedef uint8_t B;
typedef int8_t Bs;
typedef uint16_t H;
typedef int16_t Hs;
typedef uint32_t W;
typedef int32_t Ws;
typedef FILE*F;
NR V die(IM C*,...);
V asrt(B,IM C*);
V*mk(W);
V*remk(V*,W);
V del(V*);
V xcd(IM C*);
F xopen(IM C*,IM C*);
V xpc(F,B);
V xr(F,V*,W,W);
V xw(F,V*,W,W);
V xww(F,W);