Category Archives: C

whaw 0.3 released

whaw 0.3 has been released. whaw is a window tiling system for xwindows that is independent of the underlying window manager allowing you to add basic tiling to any window manager. The major new features are that it can now be triggered in one shot mode, for instance from a keybinding, it now handles maximized […]

Cuckoo Byte Stuffing Algorithm

Cuckoo Byte Stuffing I introduce a byte stuffing algorithm for general use that has many useful properties that are not found together in other common algorithms. It obtains very low statistical overhead on arbitrary data without signifigantly increasing the entropy of the data stream. It does this by permuting the escape characters, taking them from […]

Underhanded C: The Leaky Redaction

So, it turns out I am the winner of the 2008 Underhanded C Contest. The goal of the contest is to write some straightforward C code to solve a simple task, incorrectly. In particular, you had to introduce a hidden security flaw that would stand up to code review and not stand out at all. […]

newtype in C, a touch of strong typing using compound literals.

The ISO C 99 standard is a great thing. In addition to desperately needed things like a dedicated bool type and codifying a lot of universally implemented extensions to the language, it added some more subtle things such as compound literals. A compound literal allows you to use a C struct or union as an […]