[dwm] using bitaray for tags (PATCH)

From: Premysl Hruby <dfenze_AT_gmail.com>
Date: Tue, 20 May 2008 18:15:50 +0200


This is realization of Gottox's proposal discuted on IRC today.
It handles tags not as Bool [], but as bit-array saved in int.

There's only one problem, as I don't find easy solution (in compile time)
for check if there's no more tags than sizeof(int)*8.

Maybe it can be "asserted" with someting like (possibly global, compiler
take it away as it's not used anywhere):
static char too_many_tags_test[sizeof(int)*8 - LENGTH(tags)];

Has anyone better solution?


Premysl "Anydot" Hruby, http://www.redrum.cz/

Received on Tue May 20 2008 - 18:16:00 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:42:32 UTC