wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit f4e31a199c3723a012169526580e713eb525305d
parent ed389d1136cbd5e733b68e5553dbf3cc63cd62af
Author: Kris Maglione <kris@suckless.org>
Date:   Sat, 22 May 2010 16:09:21 -0400

Add forgotten header.

Diffstat:
.hgignore | 1+
include/stuff/base.h | 46++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/.hgignore b/.hgignore @@ -11,3 +11,4 @@ _dummy\.h$ syntax: glob config.local.mk cmd/menu/bindings.c +*.pkg.tar.?z diff --git a/include/stuff/base.h b/include/stuff/base.h @@ -0,0 +1,46 @@ +#pragma once +#define _XOPEN_SOURCE 600 + +#include <stdbool.h> + +#ifndef nil +#define nil ((void*)0) +#endif + +#ifndef nelem +#define nelem(ary) (sizeof(ary) / sizeof(*ary)) +#endif + +#undef uchar +#undef ushort +#undef uint +#undef ulong +#undef uvlong +#undef vlong +#define uchar _x_uchar +#define ushort _x_ushort +#define uint _x_uint +#define ulong _x_ulong +#define uvlong _x_uvlong +#define vlong _x_vlong + +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef unsigned int uint; +typedef unsigned long ulong; +typedef unsigned long long uvlong; +typedef long long vlong; + +#define BLOCK(x) do { x; }while(0) + +static inline void +_used(long a, ...) { + if(a){} +} +#ifndef KENC +# undef USED +# undef SET +# define USED(...) _used((long)__VA_ARGS__) +# define SET(x) (x = 0) +/* # define SET(x) USED(&x) GCC 4 is 'too smart' for this. */ +#endif