progs/pixie.c: Rewrite list hacking to avoid strict-aliasing badness.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 19 Jun 2013 00:43:57 +0000 (01:43 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 28 Jun 2013 23:30:17 +0000 (00:30 +0100)
commit35c0995dde0c37486681630acdd8d26659a4732e
tree7ffea0e9de8157746a1d93efa99bf9fe8526456d
parentc725c20d3fdc06e623d788de4a4f73be20fde7db
progs/pixie.c: Rewrite list hacking to avoid strict-aliasing badness.

The circular list stuff was quite pretty but involved some really
unpleasant casting which modern GCC (quite properly) complains about
vociferously.

Replace it with more traditional doubly-linked-list hacking with
null-pointer sentinels, with the slightly nasty pointer swizzling tucked
away in useful macros.  Some of the uses of these macros (e.g.,
unlinking the first or last item in a list) could be made more efficient
by using special-case versions, but it doesn't seem worthwhile.
progs/pixie.c