[hackers] [wmii] Add forgotten header. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Sat, 22 May 2010 20:09:49 +0000 (UTC)

changeset: 2623:352a9234d713
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Sat May 22 16:09:21 2010 -0400
files: .hgignore include/stuff/base.h
description:
Add forgotten header.

diff -r e6f4fbe6b3f7 -r 352a9234d713 .hgignore
--- a/.hgignore Sat May 22 12:18:27 2010 -0400
+++ b/.hgignore Sat May 22 16:09:21 2010 -0400
@@ -11,3 +11,4 @@
 syntax: glob
 config.local.mk
 cmd/menu/bindings.c
+*.pkg.tar.?z
diff -r e6f4fbe6b3f7 -r 352a9234d713 include/stuff/base.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/stuff/base.h Sat May 22 16:09:21 2010 -0400
@@ -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
Received on Sat May 22 2010 - 20:09:49 UTC

This archive was generated by hypermail 2.2.0 : Sat May 22 2010 - 20:12:04 UTC