diff options
| author | stanley lieber <stanley.lieber@gmail.com> | 2011-11-19 12:43:15 -0600 |
|---|---|---|
| committer | stanley lieber <stanley.lieber@gmail.com> | 2011-11-19 12:43:15 -0600 |
| commit | 315b61ade3e6d8d11eeafa6e4830ca4f82622e24 (patch) | |
| tree | febcae25912ea506209c848677a8035f87ac7760 | |
| parent | d58b30d90ccb20934ac0faac5fd674bfcb5588aa (diff) | |
| download | plan9front-315b61ade3e6d8d11eeafa6e4830ca4f82622e24.tar.xz | |
rio: use -b instead of the $reverse env variable
| -rw-r--r-- | sys/src/cmd/rio/rio.c | 4 | ||||
| -rw-r--r-- | sys/src/cmd/rio/wind.c | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/src/cmd/rio/rio.c b/sys/src/cmd/rio/rio.c index 605fb409b..1051a1d2d 100644 --- a/sys/src/cmd/rio/rio.c +++ b/sys/src/cmd/rio/rio.c @@ -46,6 +46,7 @@ Channel* initkbd(void); char *fontname; int mainpid; +int reverse; enum { @@ -134,6 +135,9 @@ threadmain(int argc, char *argv[]) kbdin = nil; maxtab = 0; ARGBEGIN{ + case 'b': + reverse = ~0xFF; + break; case 'f': fontname = ARGF(); if(fontname == nil) diff --git a/sys/src/cmd/rio/wind.c b/sys/src/cmd/rio/wind.c index 92b63c177..527c23de6 100644 --- a/sys/src/cmd/rio/wind.c +++ b/sys/src/cmd/rio/wind.c @@ -21,9 +21,10 @@ enum MinWater = 20000, /* room to leave available when reallocating */ }; +extern int reverse; /* there are no pastel paints in the dungeons and dragons world -- rob pike */ + static int topped; static int id; -static int reverse; static Image *cols[NCOL]; static Image *grey; @@ -43,13 +44,6 @@ wmk(Image *i, Mousectl *mc, Channel *ck, Channel *cctl, int scrolling) Rectangle r; if(cols[0] == nil){ - /* there are no pastel paints in the dungeons and dragons world - * - rob pike - */ - reverse = 0; - if(getenv("reverse") != nil) - reverse = ~0xFF; - /* greys are multiples of 0x11111100+0xFF, 14* being palest */ grey = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0xEEEEEEFF^reverse); darkgrey = allocimage(display, Rect(0,0,1,1), CMAP8, 1, 0x666666FF^reverse); |
