Re: [dwm] using bitaray for tags (PATCH)

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

On (20/05/08 11:22), Kurt H Maier wrote:
> To: dynamic window manager <dwm_AT_suckless.org>
> From: Kurt H Maier <karmaflux_AT_gmail.com>
> Subject: Re: [dwm] using bitaray for tags (PATCH)
> Reply-To: dynamic window manager <dwm_AT_suckless.org>
> List-Id: dynamic window manager <dwm.suckless.org>
>
> C has bitfield support inside structs:
>
> unsigned tagsapplied :8;
>
> and replace 8 with whatever value you want
>
> Bitfields are a bad idea imo; code has to be changed pretty severely
> to handle a varying-sized bitfield. You'd have to either limit the
> number of tags a user can create or else do a lot of work to
> generalize the code.
>

Yes, I don't like varying-sized bitfield for this. But even on i386 we
can get 64 tags maximum with long long, prety much for everyone :)

-Ph

-- 
Premysl "Anydot" Hruby, http://www.redrum.cz/
Received on Tue May 20 2008 - 18:35:44 UTC

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