]> git.draconx.ca Git - rrace.git/commit
Make colour macros more flexible.
authorNick Bowler <nbowler@draconx.ca>
Wed, 30 Nov 2022 01:57:25 +0000 (20:57 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 30 Nov 2022 01:57:25 +0000 (20:57 -0500)
commit0638562c931293881c645e7ddba35916d626b4ca
treedddf145b352e512b17dac5ed2a803d2a53dfa5f0
parentf0704cba12e437bbe72744281af71ec19951db46
Make colour macros more flexible.

Instead of COLOUR0_PRIMARY et al. expanding directly to X11 colour
names, allow the process to be hooked to generate other forms of
colour definitions.

The ewmhicon test program is adapted to use this to generate its
colourmap.  This also avoids some apparently nonportable C macro
usage, as preprocessing the following code:

  #define A(x) x
  #define B(x) x
  #define C (x)
  A(B C)

expands to x (the desired result) with GCC but B(x) on HP-UX cc.
src/colour.h
t/ewmhicon.c