v08i080: chaos, Part04/10

Ken Marks x2425 balr!panasun!ken at uunet.UU.NET
Tue Aug 21 04:04:04 AEST 1990


Submitted-by: balr!panasun!ken at uunet.UU.NET (Ken Marks (x2425))
Posting-number: Volume 8, Issue 80
Archive-name: chaos/part04

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 4 (of 10)."
# Contents:  fonts/push-rev.bdf master/colormapDb.c widgets/Compound.c
# Wrapped by ken at panasun on Mon Jul 30 14:59:48 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'fonts/push-rev.bdf' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'fonts/push-rev.bdf'\"
else
echo shar: Extracting \"'fonts/push-rev.bdf'\" \(18705 characters\)
sed "s/^X//" >'fonts/push-rev.bdf' <<'END_OF_FILE'
XSTARTFONT 2.1
XFONT push-rev
XSIZE 16 75 75
XFONTBOUNDINGBOX 9 22 0 -7
XSTARTPROPERTIES 3
XFONT_ASCENT 15
XFONT_DESCENT 7
XDEFAULT_CHAR 32
XENDPROPERTIES
XCHARS 99
XSTARTCHAR H1c
XENCODING 28
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
X0380
X0E00
X1880
X3380
X6780
X4F80
XDF80
X9F80
XBF80
XBF80
XBF80
XBF80
XBF80
XBF80
X9F80
XDF80
X4F80
X6780
X3380
X1880
X0E00
X0380
XENDCHAR
XSTARTCHAR H1d
XENCODING 29
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XE000
X3800
X8C00
XE600
XF300
XF900
XFD80
XFC80
XFE80
XFE80
XFE80
XFE80
XFE80
XFE80
XFC80
XFD80
XF900
XF300
XE600
X8C00
X3800
XE000
XENDCHAR
XSTARTCHAR H1e
XENCODING 30
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 0 0 15
XBITMAP
XENDCHAR
XSTARTCHAR H1f
XENCODING 31
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 7 9 0 1
XBITMAP
X20
X30
X38
XFC
XFE
XFC
X38
X30
X20
XENDCHAR
XSTARTCHAR H20
XENCODING 32
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H21
XENCODING 33
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XE780
XE780
XE780
XE780
XE780
XE780
XE780
XFF80
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H22
XENCODING 34
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC980
XC980
XC980
XC980
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H23
XENCODING 35
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XE480
XE480
XE480
X8000
XC980
XC980
X0080
X9380
X9380
X9380
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H24
XENCODING 36
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XF780
XC180
X9480
X9480
X9480
XC780
XF180
X9480
X9480
X9480
XC180
XF780
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H25
XENCODING 37
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8980
X6980
X6380
X1380
XE780
XE780
XC880
XC680
X9680
X9180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H26
XENCODING 38
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC780
X9380
X9380
XC780
XCF80
X8480
X2180
X3380
X2380
X8880
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H27
XENCODING 39
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XF380
XF380
XE780
XCF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H28
XENCODING 40
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XF980
XF380
XE780
XE780
XCF80
XCF80
XCF80
XCF80
XCF80
XE780
XE780
XF380
XF980
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H29
XENCODING 41
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XCF80
XE780
XF380
XF380
XF980
XF980
XF980
XF980
XF980
XF380
XF380
XE780
XCF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H2a
XENCODING 42
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XE780
XA580
X8180
XC380
X8180
XA580
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H2b
XENCODING 43
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XE780
XE780
XE780
X0080
X0080
XE780
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H2c
XENCODING 44
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XE780
XE780
XF780
XEF80
XDF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H2d
XENCODING 45
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X8080
X8080
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H2e
XENCODING 46
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H2f
XENCODING 47
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFC80
XF980
XF980
XF380
XF380
XE780
XE780
XCF80
XCF80
X9F80
X9F80
X3F80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H30
XENCODING 48
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9880
X9880
X9480
X9480
X8C80
X8C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H31
XENCODING 49
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XF380
XE380
XC380
XF380
XF380
XF380
XF380
XF380
XF380
XC080
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H32
XENCODING 50
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
XFC80
XF980
XF380
XE780
XCF80
X9E80
X8080
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H33
XENCODING 51
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
XFC80
XE180
XF880
XFC80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H34
XENCODING 52
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFD80
XF980
XF180
XE180
XC980
X9980
X3980
X0080
XF980
XF980
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H35
XENCODING 53
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8080
X9F80
X9F80
X8180
XFC80
XFC80
XFC80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H36
XENCODING 54
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9F80
X9F80
X8180
X9C80
X9C80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H37
XENCODING 55
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8080
XBC80
XBC80
XF980
XF980
XF380
XF380
XE780
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H38
XENCODING 56
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X9C80
XC180
X9C80
X9C80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H39
XENCODING 57
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X9C80
X9C80
XC080
XFC80
XFC80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H3a
XENCODING 58
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XE780
XE780
XFF80
XFF80
XFF80
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H3b
XENCODING 59
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XE780
XE780
XFF80
XFF80
XFF80
XE780
XE780
XF780
XEF80
XDF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H3c
XENCODING 60
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFC80
XF980
XF380
XE780
XCF80
X9F80
XCF80
XE780
XF380
XF980
XFC80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H3d
XENCODING 61
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X8080
X8080
XFF80
XFF80
X8080
X8080
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H3e
XENCODING 62
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
X9F80
XCF80
XE780
XF380
XF980
XFC80
XF980
XF380
XE780
XCF80
X9F80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H3f
XENCODING 63
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
XFC80
XF980
XF380
XF380
XFF80
XF380
XF380
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H40
XENCODING 64
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XE380
XC980
X9C80
X9080
X9480
X9480
X9180
X9F80
XCC80
XE180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H41
XENCODING 65
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XF780
XE380
XE380
XC980
XC980
XC980
X9C80
X8080
X9C80
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H42
XENCODING 66
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8380
X9980
X9980
X9980
X8380
X9980
X9C80
X9C80
X9C80
X8180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H43
XENCODING 67
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X9F80
X9F80
X9F80
X9F80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H44
XENCODING 68
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8380
X9980
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9980
X8380
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H45
XENCODING 69
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8080
X9F80
X9F80
X9F80
X8180
X9F80
X9F80
X9F80
X9F80
X8080
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H46
XENCODING 70
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8080
X9F80
X9F80
X9F80
X8180
X9F80
X9F80
X9F80
X9F80
X9F80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H47
XENCODING 71
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X9F80
X9F80
X9880
X9C80
X9C80
X9880
XC280
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H48
XENCODING 72
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9C80
X9C80
X9C80
X9C80
X8080
X9C80
X9C80
X9C80
X9C80
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H49
XENCODING 73
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8180
XE780
XE780
XE780
XE780
XE780
XE780
XE780
XE780
X8180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H4a
XENCODING 74
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XE080
XF980
XF980
XF980
XF980
XF980
XF980
X9980
X9980
XC380
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H4b
XENCODING 75
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9C80
X9980
X9380
X8780
X8380
X9380
X9980
X9980
X9C80
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H4c
XENCODING 76
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9F80
X9F80
X9F80
X9F80
X9F80
X9F80
X9F80
X9F80
X9F80
X8080
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H4d
XENCODING 77
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X3C80
X3C80
X1880
X1880
X0080
X2480
X2480
X3C80
X3C80
X3C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H4e
XENCODING 78
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9C80
X9C80
X8C80
X8C80
X8480
X9480
X9080
X9880
X9880
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H4f
XENCODING 79
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H50
XENCODING 80
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8180
X9C80
X9C80
X9C80
X9C80
X8180
X9F80
X9F80
X9F80
X9F80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H51
XENCODING 81
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
XC180
XE780
XF380
XF880
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H52
XENCODING 82
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8180
X9C80
X9C80
X9C80
X8180
X9380
X9980
X9980
X9C80
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H53
XENCODING 83
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
XCF80
XE380
XF980
XFC80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H54
XENCODING 84
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X0080
XE780
XE780
XE780
XE780
XE780
XE780
XE780
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H55
XENCODING 85
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H56
XENCODING 86
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9C80
X9C80
X9C80
XC980
XC980
XC980
XE380
XE380
XF780
XF780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H57
XENCODING 87
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X3E7F
X367F
X367F
X227F
XA280
X8880
X8880
XC980
XDD80
XDD80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H58
XENCODING 88
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9C80
X9C80
XC980
XC980
XE380
XE380
XC980
XC980
X9C80
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H59
XENCODING 89
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X3C80
X3C80
X9980
X9980
XC380
XE780
XE780
XE780
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H5a
XENCODING 90
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X8080
XFC80
XFC80
XF980
XF380
XE780
XCF80
X9F80
X9F80
X8080
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H5b
XENCODING 91
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XC180
XCF80
XCF80
XCF80
XCF80
XCF80
XCF80
XCF80
XCF80
XCF80
XCF80
XCF80
XC180
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H5c
XENCODING 92
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
X3F80
X9F80
X9F80
XCF80
XCF80
XE780
XE780
XF380
XF380
XF980
XF980
XFC80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H5d
XENCODING 93
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XC180
XF980
XF980
XF980
XF980
XF980
XF980
XF980
XF980
XF980
XF980
XF980
XC180
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H5e
XENCODING 94
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XF780
XE380
XC980
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H5f
XENCODING 95
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
X0000
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H60
XENCODING 96
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XCF80
XCF80
XE780
XF380
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H61
XENCODING 97
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XC380
X9980
XF980
XC180
X9980
X9980
XC080
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H62
XENCODING 98
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9F80
X9F80
X9F80
X9180
X8C80
X9C80
X9C80
X9C80
X8C80
X9180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H63
XENCODING 99
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XC180
X9C80
X9F80
X9F80
X9F80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H64
XENCODING 100
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFC80
XFC80
XFC80
XC480
X9880
X9C80
X9C80
X9C80
X9880
XC480
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H65
XENCODING 101
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X8080
X9F80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H66
XENCODING 102
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XF180
XE480
XE780
XE780
X8180
XE780
XE780
XE780
XE780
XE780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H67
XENCODING 103
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XC480
X9880
X9C80
X9C80
X9C80
X9880
XC480
XFC80
X9C80
XC180
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H68
XENCODING 104
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9F80
X9F80
X9F80
X9180
X8C80
X9C80
X9C80
X9C80
X9C80
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H69
XENCODING 105
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XF380
XF380
XFF80
XC380
XF380
XF380
XF380
XF380
XF380
XF380
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H6a
XENCODING 106
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XF980
XF980
XFF80
XE180
XF980
XF980
XF980
XF980
XF980
XF980
XF980
X9980
XC380
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H6b
XENCODING 107
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
X9F80
X9F80
X9F80
X9980
X9380
X8780
X8780
X9380
X9980
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H6c
XENCODING 108
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XC380
XF380
XF380
XF380
XF380
XF380
XF380
XF380
XF380
XF380
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H6d
XENCODING 109
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X4980
X2480
X2480
X2480
X2480
X2480
X2480
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H6e
XENCODING 110
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XA180
X8C80
X9C80
X9C80
X9C80
X9C80
X9C80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H6f
XENCODING 111
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XC180
X9C80
X9C80
X9C80
X9C80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H70
XENCODING 112
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X9180
X8C80
X9C80
X9C80
X9C80
X8C80
X9180
X9F80
X9F80
X9F80
X9F80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H71
XENCODING 113
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XC480
X9880
X9C80
X9C80
X9C80
X9880
XC480
XFC80
XFC80
XFC80
XFC80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H72
XENCODING 114
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X9180
X8480
X9F80
X9F80
X9F80
X9F80
X9F80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H73
XENCODING 115
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XC180
X9C80
X9F80
XC180
XFC80
X9C80
XC180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H74
XENCODING 116
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XE780
XE780
XE780
X8180
XE780
XE780
XE780
XE780
XE480
XF180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H75
XENCODING 117
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X9C80
X9C80
X9C80
X9C80
X9C80
X9880
XC480
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H76
XENCODING 118
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X9C80
X9C80
XC980
XC980
XE380
XE380
XF780
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H77
XENCODING 119
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X3C80
X3C80
X2480
X2480
X2480
X2480
X8180
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H78
XENCODING 120
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X9980
X9980
XC380
XE780
XC380
X9980
X9980
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H79
XENCODING 121
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X9C80
X9C80
XCC80
XC980
XE980
XE380
XF380
XF380
XB780
X8780
XCF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H7a
XENCODING 122
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X8080
XF980
XF380
XE780
XCF80
X9F80
X8080
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H7b
XENCODING 123
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XF080
XE780
XE780
XE780
XE780
XE780
X8F80
XE780
XE780
XE780
XE780
XE780
XF080
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H7c
XENCODING 124
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XE780
XE780
XE780
XE780
XE780
XE780
XFF80
XE780
XE780
XE780
XE780
XE780
XE780
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H7d
XENCODING 125
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
X8780
XF380
XF380
XF380
XF380
XF380
XF880
XF380
XF380
XF380
XF380
XF380
X8780
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XSTARTCHAR H7e
XENCODING 126
XSWIDTH 562 0
XDWIDTH 9 0
XBBX 9 22 0 -7
XBITMAP
XFF80
X0000
XFF80
XFF80
XFF80
XFF80
XC480
X8080
X9180
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
XFF80
X0000
XFF80
XENDCHAR
XENDFONT
END_OF_FILE
if test 18705 -ne `wc -c <'fonts/push-rev.bdf'`; then
    echo shar: \"'fonts/push-rev.bdf'\" unpacked with wrong size!
fi
# end of 'fonts/push-rev.bdf'
fi
if test -f 'master/colormapDb.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'master/colormapDb.c'\"
else
echo shar: Extracting \"'master/colormapDb.c'\" \(16870 characters\)
sed "s/^X//" >'master/colormapDb.c' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#include <stdio.h>
X#include <signal.h>
X#include <ctype.h>
X#include <X11/Intrinsic.h>
X#include <X11/StringDefs.h>
X#include <X11/Xaw/Form.h>
X#include <Chaos.h>
X#include <LocalDefs.h>
X#include <Colormap.h>
X#include <DlgShell.h>
X#include <Push.h>
X#include <Compound.h>
X#include <Text.h>
X#include <List.h>
X#include <Slider.h>
X#include <Palette.h>
X#include <Label.h>
X
X#define PALETTE		widgets[1]
X#define SLIDER_1_LABEL	widgets[11]
X#define SLIDER_1	widgets[2]
X#define SLIDER_2_LABEL	widgets[12]
X#define SLIDER_2	widgets[3]
X#define SLIDER_3_LABEL	widgets[13]
X#define SLIDER_3	widgets[4]
X
X#define RGB_HSB		widgets[7]
X#define COLORMAP_LOAD	widgets[8]
X#define COLORMAP_SAVE	widgets[9]
X#define COLORMAP_REMOVE	widgets[10]
X#define DISMISS		widgets[0]
X
X#define COLORMAP_LABEL	widgets[14]
X#define COLORMAP_TEXT	widgets[5]
X#define COLORMAP_LIST	widgets[6]
X
X#define NUM_CONTROLS	(unsigned) 11
X#define NUM_LABELS	(unsigned) 4
X
Xstatic void ColormapPaletteActivate();
Xstatic void ColormapPushActivate();
Xstatic void ColormapSliderActivate();
Xstatic void ColormapListActivate();
Xstatic void ColormapChangeMode();
Xstatic void ColormapLoadColormap();
Xstatic void ColormapSaveColormap();
Xstatic void ColormapRemoveColormap();
X
Xvoid ColormapUpdateSliders();
Xvoid ColormapUpdateFileList();
Xvoid SaveColormapProceed();
Xvoid RemoveColormapProceed();
Xvoid ColormapResetControls();
X
Xextern void ConfirmSetup();
Xextern void MessageSetup();
X
Xextern Widget confirm_dialogbox;
Xextern Widget message_dialogbox;
X
Xstatic int curr_color = NUM_RESERVED;
Xstatic unsigned char curr_red, curr_green, curr_blue;
Xstatic unsigned char curr_hue, curr_sat, curr_bright;
Xstatic Boolean hsb_mode = False;
X
Xstatic Widget form, widgets[NUM_CONTROLS + NUM_LABELS];
X
Xstatic char colormap_buffer[64];
Xstatic ListItem *colormap_list_items;
X
Xstatic char *save_colormap_msg =
X"The file '%s/%s' already exists!\n\
XDo you really wish to overwrite this colormap file?";
X
Xstatic char *save_failed_msg =
X"Cannot write to file '%s/%s'!";
X
Xstatic char *load_colormap_msg =
X"Cannot load file '%s/%s'!\n\
XPlease specify a valid colormap filename.";
X
Xstatic char *remove_colormap_msg =
X"The file '%s/%s' will be lost!\n\
XDo you really wish to remove this colormap file?";
X
Xstatic char *remove_failed_msg =
X"Cannot remove file '%s/%s'!";
X
Xstatic XtCallbackRec palette_callbacks[] = {
X    {ColormapPaletteActivate, NULL},
X    {NULL, NULL},
X};
X
Xstatic XtCallbackRec push_callbacks[] = {
X    {ColormapPushActivate, NULL},
X    {NULL, NULL},
X};
X
Xstatic XtCallbackRec slider_callbacks[] = {
X    {ColormapSliderActivate, NULL},
X    {NULL, NULL},
X};
X
Xstatic XtCallbackRec list_callbacks[] = {
X    {ColormapListActivate, NULL},
X    {NULL, NULL},
X};
X
Xstatic Arg PopupArgs[] = {
X    {XtNborderWidth, (XtArgVal) 3},
X};
X
Xstatic Arg LabelArgs[] = {
X    {XtNfromHoriz, (XtArgVal) NULL},
X    {XtNfromVert, (XtArgVal) NULL},
X    {XtNhorizDistance, (XtArgVal) 10},
X    {XtNvertDistance, (XtArgVal) 10},
X    {XtNlabel, (XtArgVal) NULL},
X    {XtNresizable, (XtArgVal) False},
X    {XtNborderWidth, (XtArgVal) 0},
X};
X
Xstatic Arg PushArgs[] = {
X    {XtNfromHoriz, (XtArgVal) NULL},
X    {XtNfromVert, (XtArgVal) NULL},
X    {XtNhorizDistance, (XtArgVal) 10},
X    {XtNvertDistance, (XtArgVal) 10},
X    {XtNlabel, (XtArgVal) NULL},
X    {XtNdialogbox, (XtArgVal) NULL},
X    {XtNcallback, (XtArgVal) push_callbacks},
X    {XtNresizable, (XtArgVal) False},
X};
X
Xstatic Arg PaletteArgs[] = {
X    {XtNfromHoriz, (XtArgVal) NULL},
X    {XtNfromVert, (XtArgVal) NULL},
X    {XtNhorizDistance, (XtArgVal) 10},
X    {XtNvertDistance, (XtArgVal) 10},
X    {XtNcellSize, (XtArgVal) 16},
X    {XtNdialogbox, (XtArgVal) NULL},
X    {XtNcallback, (XtArgVal) palette_callbacks},
X    {XtNresizable, (XtArgVal) False},
X};
X
Xstatic Arg ListArgs[] = {
X    {XtNfromHoriz, (XtArgVal) NULL},
X    {XtNfromVert, (XtArgVal) NULL},
X    {XtNhorizDistance, (XtArgVal) 10},
X    {XtNvertDistance, (XtArgVal) 10},
X    {XtNlistItems, (XtArgVal) NULL},
X    {XtNdialogbox, (XtArgVal) NULL},
X    {XtNresizable, (XtArgVal) False},
X    {XtNborderWidth, (XtArgVal) 1},
X    {XtNcallback, (XtArgVal) list_callbacks},
X    {XtNlistDefault, (XtArgVal) NULL},
X    {XtNcharsWide, (XtArgVal) 31},
X    {XtNnumberVisible, (XtArgVal) 8},
X    {XtNlistDefault, (XtArgVal) - 1},
X};
X
Xstatic Arg SliderArgs[] = {
X    {XtNfromHoriz, (XtArgVal) NULL},
X    {XtNfromVert, (XtArgVal) NULL},
X    {XtNhorizDistance, (XtArgVal) 10},
X    {XtNvertDistance, (XtArgVal) 10},
X    {XtNdialogbox, (XtArgVal) NULL},
X    {XtNcallback, (XtArgVal) slider_callbacks},
X    {XtNresizable, (XtArgVal) False},
X    {XtNminValue, (XtArgVal) 0},
X    {XtNmaxValue, (XtArgVal) 255},
X};
X
Xstatic Arg TextArgs[] = {
X    {XtNfromHoriz, (XtArgVal) NULL},
X    {XtNfromVert, (XtArgVal) NULL},
X    {XtNhorizDistance, (XtArgVal) 10},
X    {XtNvertDistance, (XtArgVal) 10},
X    {XtNbuffer, (XtArgVal) NULL},
X    {XtNdialogbox, (XtArgVal) NULL},
X    {XtNresizable, (XtArgVal) False},
X    {XtNbufferLen, (XtArgVal) NULL},
X    {XtNinitialText, (XtArgVal) NULL},
X    {XtNcharsWide, (XtArgVal) NULL},
X};
X
X
X/*ARGSUSED*/
Xstatic void ColormapPushActivate(widget, client_data, call_data)
XWidget widget;
Xcaddr_t client_data;
Xcaddr_t call_data;
X{
X    Display *dpy = XtDisplay(widget);
X    extern Widget colormap_dialogbox;
X    extern Boolean rotating, rotating_save;
X    extern int colormap_alignment;
X    extern Colormap colormap;
X    extern char *FileCheckFilename();
X    char *new_filename;
X
X    if (widget == DISMISS)
X    {
X	DialogPopdown(colormap_dialogbox);
X	rotating = rotating_save;
X	AlignColormap(dpy, colormap, colormap_alignment);
X    }
X    else if (widget == RGB_HSB)
X	ColormapChangeMode();
X    else
X    {
X	new_filename = FileCheckFilename(colormap_buffer, ".map");
X	TextChangeText(COLORMAP_TEXT, new_filename);
X	if (new_filename == NULL)
X	    return;
X
X	if (widget == COLORMAP_LOAD)
X	    ColormapLoadColormap();
X	else if (widget == COLORMAP_SAVE)
X	    ColormapSaveColormap();
X	else if (widget == COLORMAP_REMOVE)
X	    ColormapRemoveColormap();
X    }
X}
X
X
X/*ARGSUSED*/
Xstatic void ColormapPaletteActivate(widget, client_data, call_data)
XWidget widget;			/* unused */
Xcaddr_t client_data;		/* unused */
Xcaddr_t call_data;
X{
X
X    curr_color = (int) call_data;
X    ColormapUpdateSliders();
X}
X
X
X/*ARGSUSED*/
Xstatic void ColormapSliderActivate(widget, client_data, call_data)
XWidget widget;
Xcaddr_t client_data;
Xcaddr_t call_data;
X{
X    Display *dpy = XtDisplay(widget);
X    extern Colormap colormap;
X
X    if (hsb_mode)
X    {
X	double r, g, b;
X
X	if (widget == SLIDER_1)
X	    curr_hue = (unsigned char) call_data;
X	else if (widget == SLIDER_2)
X	    curr_sat = (unsigned char) call_data;
X	else if (widget == SLIDER_3)
X	    curr_bright = (unsigned char) call_data;
X
X	HSB2RGB((double) curr_hue / 255.0, (double) curr_sat / 255.0,
X	  (double) curr_bright / 255.0, &r, &g, &b);
X
X	curr_red = (unsigned char) (r * 255.0);
X	curr_green = (unsigned char) (g * 255.0);
X	curr_blue = (unsigned char) (b * 255.0);
X    }
X    else
X    {
X	double h, s, b;
X
X	if (widget == SLIDER_1)
X	    curr_red = (unsigned char) call_data;
X	else if (widget == SLIDER_2)
X	    curr_green = (unsigned char) call_data;
X	else if (widget == SLIDER_3)
X	    curr_blue = (unsigned char) call_data;
X
X	RGB2HSB((double) curr_red / 255.0, (double) curr_green / 255.0,
X	  (double) curr_blue / 255.0, &h, &s, &b);
X
X	curr_hue = (unsigned char) (h * 255.0);
X	curr_sat = (unsigned char) (s * 255.0);
X	curr_bright = (unsigned char) (b * 255.0);
X    }
X
X    SetColorRGB(dpy, colormap, curr_color, curr_red, curr_green, curr_blue);
X}
X
X
X/*ARGSUSED*/
Xstatic void ColormapListActivate(widget, client_data, call_data)
XWidget widget;
Xcaddr_t client_data;
Xcaddr_t call_data;
X{
X    int item = (int) call_data;
X
X    TextChangeText(COLORMAP_TEXT, colormap_list_items[item].label);
X}
X
X
Xstatic void ColormapChangeMode()
X{
X    hsb_mode = !hsb_mode;
X
X    if (hsb_mode)
X    {
X	LabelChangeLabel(SLIDER_1_LABEL, "       Hue:");
X	LabelChangeLabel(SLIDER_2_LABEL, "Saturation:");
X	LabelChangeLabel(SLIDER_3_LABEL, "Brightness:");
X	PushChangeLabel(RGB_HSB, "RGB");
X
X	SliderChangePosition(SLIDER_1, (int) curr_hue);
X	SliderChangePosition(SLIDER_2, (int) curr_sat);
X	SliderChangePosition(SLIDER_3, (int) curr_bright);
X    }
X    else
X    {
X	LabelChangeLabel(SLIDER_1_LABEL, "       Red:");
X	LabelChangeLabel(SLIDER_2_LABEL, "     Green:");
X	LabelChangeLabel(SLIDER_3_LABEL, "      Blue:");
X	PushChangeLabel(RGB_HSB, "HSB");
X
X	SliderChangePosition(SLIDER_1, (int) curr_red);
X	SliderChangePosition(SLIDER_2, (int) curr_green);
X	SliderChangePosition(SLIDER_3, (int) curr_blue);
X    }
X}
X
X
Xstatic void ColormapLoadColormap()
X{
X    extern char *map_dir;
X    extern void CallStoreColormap();
X    char message[256];
X
X    if (ReadColors(map_dir, colormap_buffer) == False)
X    {
X	/* Popup an error message box here */
X	(void) sprintf(message, load_colormap_msg, map_dir, colormap_buffer);
X	MessageSetup(message, (XtCallbackProc) NULL);
X	DialogPopup(message_dialogbox);
X	return;
X    }
X    CallStoreColormap();
X
X    /* update the sliders since the colormap changed */
X    ColormapUpdateSliders();
X}
X
X
Xstatic void ColormapSaveColormap()
X{
X    extern char *map_dir;
X    extern Boolean FileExists();
X    char message[256];
X
X    if (FileExists(map_dir, colormap_buffer))
X    {
X	/* throw a dialogbox up for confirmation first */
X	(void) sprintf(message, save_colormap_msg, map_dir, colormap_buffer);
X	ConfirmSetup(message, SaveColormapProceed);
X	DialogPopup(confirm_dialogbox);
X    }
X    else
X	SaveColormapProceed((Widget) NULL, (caddr_t) NULL, (caddr_t) NULL);
X}
X
X
X/*ARGSUSED*/
Xvoid SaveColormapProceed(widget, client_data, call_data)
XWidget widget;			/* unused */
Xcaddr_t client_data;		/* unused */
Xcaddr_t call_data;		/* unused */
X{
X    extern char *map_dir;
X    char message[256];
X
X    if (WriteColors(map_dir, colormap_buffer) == False)
X    {
X	/* Popup an error message box here */
X	(void) sprintf(message, save_failed_msg, map_dir, colormap_buffer);
X	MessageSetup(message, (XtCallbackProc) NULL);
X	DialogPopup(message_dialogbox);
X	return;
X    }
X    ColormapUpdateFileList();
X}
X
X
Xstatic void ColormapRemoveColormap()
X{
X    extern char *map_dir;
X    char message[256];
X
X    /* throw a dialogbox up for confirmation first */
X    (void) sprintf(message, remove_colormap_msg, map_dir, colormap_buffer);
X    ConfirmSetup(message, RemoveColormapProceed);
X    DialogPopup(confirm_dialogbox);
X}
X
X
X/*ARGSUSED*/
Xvoid RemoveColormapProceed(widget, client_data, call_data)
XWidget widget;			/* unused */
Xcaddr_t client_data;		/* unused */
Xcaddr_t call_data;		/* unused */
X{
X    extern char *map_dir;
X    Boolean RemoveFile();
X    char message[256];
X
X    if (RemoveFile(map_dir, colormap_buffer) == False)
X    {
X	/* Popup an error message box here */
X	(void) sprintf(message, remove_failed_msg, map_dir, colormap_buffer);
X	MessageSetup(message, (XtCallbackProc) NULL);
X	DialogPopup(message_dialogbox);
X	return;
X    }
X    TextChangeText(COLORMAP_TEXT, (String) NULL);
X    ColormapUpdateFileList();
X}
X
X
Xvoid ColormapUpdateFileList()
X{
X    extern char **GetFileList();
X    extern void FreeFileList();
X    extern char *map_dir;
X
X    if (colormap_list_items)
X	FreeFileList((char **) colormap_list_items);
X
X    colormap_list_items = (ListItem *) GetFileList(map_dir, "*.map");
X    if (colormap_list_items != NULL)
X	(void) ListChangeItems(COLORMAP_LIST, colormap_list_items);
X}
X
X
Xvoid ColormapUpdateSliders()
X{
X    double h, s, b;
X
X    GetColorRGB(curr_color, &curr_red, &curr_green, &curr_blue);
X
X    RGB2HSB((double) curr_red / 255.0, (double) curr_green / 255.0,
X      (double) curr_blue / 255.0, &h, &s, &b);
X
X    curr_hue = (unsigned char) (h * 255.0);
X    curr_sat = (unsigned char) (s * 255.0);
X    curr_bright = (unsigned char) (b * 255.0);
X
X    if (hsb_mode)
X    {
X	SliderChangePosition(SLIDER_1, (int) curr_hue);
X	SliderChangePosition(SLIDER_2, (int) curr_sat);
X	SliderChangePosition(SLIDER_3, (int) curr_bright);
X    }
X    else
X    {
X	SliderChangePosition(SLIDER_1, (int) curr_red);
X	SliderChangePosition(SLIDER_2, (int) curr_green);
X	SliderChangePosition(SLIDER_3, (int) curr_blue);
X    }
X}
X
X
Xvoid ColormapResetControls()
X{
X    TextChangeText(COLORMAP_TEXT, (String) NULL);
X    ListChangeSelected(COLORMAP_LIST, NO_ITEM);
X}
X
X
XWidget ColormapCreateDialogbox(parent)
XWidget parent;
X{
X    Widget popup;
X
X    popup = XtCreatePopupShell("colormap_dialogbox_popup",
X      dialogShellWidgetClass, parent, PopupArgs, XtNumber(PopupArgs));
X
X    form = XtCreateManagedWidget("colormap_dialogbox_form", formWidgetClass,
X      popup, (ArgList) NULL, (Cardinal) 0);
X
X    PaletteArgs[0].value = (XtArgVal) NULL;
X    PaletteArgs[1].value = (XtArgVal) NULL;
X    PaletteArgs[5].value = (XtArgVal) popup;
X    PALETTE = XtCreateManagedWidget("palette", paletteWidgetClass,
X      form, PaletteArgs, XtNumber(PaletteArgs));
X
X    LabelArgs[0].value = (XtArgVal) PALETTE;
X    LabelArgs[1].value = (XtArgVal) NULL;
X    LabelArgs[4].value = (XtArgVal) "       Red:";
X    SLIDER_1_LABEL = XtCreateManagedWidget("slider_1_label", labelWidgetClass,
X      form, LabelArgs, XtNumber(LabelArgs));
X
X    SliderArgs[0].value = (XtArgVal) SLIDER_1_LABEL;
X    SliderArgs[1].value = (XtArgVal) NULL;
X    SliderArgs[4].value = (XtArgVal) popup;
X    SLIDER_1 = XtCreateManagedWidget("slider_1", sliderWidgetClass,
X      form, SliderArgs, XtNumber(SliderArgs));
X
X    LabelArgs[0].value = (XtArgVal) PALETTE;
X    LabelArgs[1].value = (XtArgVal) SLIDER_1;
X    LabelArgs[4].value = (XtArgVal) "     Green:";
X    SLIDER_2_LABEL = XtCreateManagedWidget("slider_2_label", labelWidgetClass,
X      form, LabelArgs, XtNumber(LabelArgs));
X
X    SliderArgs[0].value = (XtArgVal) SLIDER_2_LABEL;
X    SliderArgs[1].value = (XtArgVal) SLIDER_1;
X    SliderArgs[4].value = (XtArgVal) popup;
X    SLIDER_2 = XtCreateManagedWidget("slider_2", sliderWidgetClass,
X      form, SliderArgs, XtNumber(SliderArgs));
X
X    LabelArgs[0].value = (XtArgVal) PALETTE;
X    LabelArgs[1].value = (XtArgVal) SLIDER_2;
X    LabelArgs[4].value = (XtArgVal) "      Blue:";
X    SLIDER_3_LABEL = XtCreateManagedWidget("slider_3_label", labelWidgetClass,
X      form, LabelArgs, XtNumber(LabelArgs));
X
X    SliderArgs[0].value = (XtArgVal) SLIDER_3_LABEL;
X    SliderArgs[1].value = (XtArgVal) SLIDER_2;
X    SliderArgs[4].value = (XtArgVal) popup;
X    SLIDER_3 = XtCreateManagedWidget("slider_3", sliderWidgetClass,
X      form, SliderArgs, XtNumber(SliderArgs));
X
X    LabelArgs[0].value = (XtArgVal) PALETTE;
X    LabelArgs[1].value = (XtArgVal) SLIDER_3;
X    LabelArgs[4].value = (XtArgVal) "Colormap:";
X    COLORMAP_LABEL = XtCreateManagedWidget("colormap_label", labelWidgetClass,
X      form, LabelArgs, XtNumber(LabelArgs));
X
X    TextArgs[0].value = (XtArgVal) COLORMAP_LABEL;
X    TextArgs[1].value = (XtArgVal) SLIDER_3;
X    TextArgs[4].value = (XtArgVal) colormap_buffer;
X    TextArgs[5].value = (XtArgVal) popup;
X    TextArgs[7].value = (XtArgVal) 64;
X    TextArgs[9].value = (XtArgVal) 16;
X    COLORMAP_TEXT = XtCreateManagedWidget("colormap_text", textWidgetClass,
X      form, TextArgs, XtNumber(TextArgs));
X
X    ListArgs[0].value = (XtArgVal) PALETTE;
X    ListArgs[1].value = (XtArgVal) COLORMAP_LABEL;
X    ListArgs[5].value = (XtArgVal) popup;
X    COLORMAP_LIST = XtCreateManagedWidget("colormap_list", listWidgetClass,
X      form, ListArgs, XtNumber(ListArgs));
X
X    PushArgs[0].value = (XtArgVal) COLORMAP_LIST;
X    PushArgs[1].value = (XtArgVal) COLORMAP_LABEL;
X    PushArgs[4].value = (XtArgVal) "HSB";
X    PushArgs[5].value = (XtArgVal) popup;
X    RGB_HSB = XtCreateManagedWidget("rgb_hsb_push", pushWidgetClass,
X      form, PushArgs, XtNumber(PushArgs));
X
X    PushArgs[0].value = (XtArgVal) COLORMAP_LIST;
X    PushArgs[1].value = (XtArgVal) RGB_HSB;
X    PushArgs[4].value = (XtArgVal) "Load Colormap";
X    PushArgs[5].value = (XtArgVal) popup;
X    COLORMAP_LOAD = XtCreateManagedWidget("load_colormap_push", pushWidgetClass,
X      form, PushArgs, XtNumber(PushArgs));
X
X    PushArgs[0].value = (XtArgVal) COLORMAP_LIST;
X    PushArgs[1].value = (XtArgVal) COLORMAP_LOAD;
X    PushArgs[4].value = (XtArgVal) "Save Colormap";
X    PushArgs[5].value = (XtArgVal) popup;
X    COLORMAP_SAVE = XtCreateManagedWidget("save_colormap_push", pushWidgetClass,
X      form, PushArgs, XtNumber(PushArgs));
X
X    PushArgs[0].value = (XtArgVal) COLORMAP_LIST;
X    PushArgs[1].value = (XtArgVal) COLORMAP_SAVE;
X    PushArgs[4].value = (XtArgVal) "Remove Colormap";
X    PushArgs[5].value = (XtArgVal) popup;
X    COLORMAP_REMOVE = XtCreateManagedWidget("remove_colormap_push",
X      pushWidgetClass, form, PushArgs, XtNumber(PushArgs));
X
X    PushArgs[0].value = (XtArgVal) COLORMAP_LIST;
X    PushArgs[1].value = (XtArgVal) COLORMAP_REMOVE;
X    PushArgs[4].value = (XtArgVal) "Dismiss";
X    PushArgs[5].value = (XtArgVal) popup;
X    DISMISS = XtCreateManagedWidget("dismiss_push", pushWidgetClass,
X      form, PushArgs, XtNumber(PushArgs));
X
X    DialogSetFocusOrder(popup, widgets, NUM_CONTROLS);
X
X    return (popup);
X}
END_OF_FILE
if test 16870 -ne `wc -c <'master/colormapDb.c'`; then
    echo shar: \"'master/colormapDb.c'\" unpacked with wrong size!
fi
# end of 'master/colormapDb.c'
fi
if test -f 'widgets/Compound.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'widgets/Compound.c'\"
else
echo shar: Extracting \"'widgets/Compound.c'\" \(15878 characters\)
sed "s/^X//" >'widgets/Compound.c' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#include <stdio.h>
X#include <X11/IntrinsicP.h>
X#include <X11/StringDefs.h>
X#include <Chaos.h>
X#include <LocalDefs.h>
X#include <CompoundP.h>
X#include <Colormap.h>
X#include <DlgShell.h>
X
X#define GET_ITEM(w, x, y)	(((x) < (w)->compound.hot_min || \
X				(x) > (w)->compound.hot_max || \
X				(y) < 0 || (y) >= (w)->core.height) ? \
X				NO_ITEM : (y) / (w)->compound.item_height)
X
X/* internal padding for items in compound buttons */
X#define VERTICAL_PAD		2
X#define HORIZONTAL_PAD		2
X
X#define TOGGLE_UNSET_STRING	"\026\027"
X#define TOGGLE_SET_STRING	"\030\031"
X#define RADIO_UNSET_STRING	"\032\033"
X#define RADIO_SET_STRING	"\034\035"
X
X#define ARROW			'\037'
X#define BLANK			'\036'
X
Xstatic void CompoundInitialize();
Xstatic void CompoundRedisplay();
Xstatic void CompoundDestroy();
Xstatic void CompoundDrawItem();
Xstatic void CompoundNotify();
Xstatic void CompoundMark();
Xstatic void CompoundGoto();
Xstatic void CompoundFocusIn();
Xstatic void CompoundFocusOut();
X
X#define offset(field) XtOffset(CompoundWidget, compound.field)
X#define goffset(field) XtOffset(Widget,core.field)
X
Xstatic XtResource compound_resources[] = {
X    {XtNbuttonType, XtCButtonType, XtRInt, sizeof(int),
X    offset(button_type), XtRImmediate, (caddr_t) UndefinedButton},
X    {XtNradioDefault, XtCDefault, XtRInt, sizeof(int),
X    offset(selected_item), XtRImmediate, (caddr_t) 0},
X    {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
X    offset(foreground), XtRString, "Black"},
X    {XtNbackground, XtCBackground, XtRPixel, sizeof(Pixel),
X    goffset(background_pixel), XtRString, "White"},
X    {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *),
X    offset(font), XtRString, "chaos-bold"},
X    {XtNtoggleItems, XtCList, XtRPointer, sizeof(char **),
X    offset(toggle_items), XtRString, NULL},
X    {XtNradioItems, XtCList, XtRPointer, sizeof(char **),
X    offset(radio_items), XtRString, NULL},
X    {XtNhorizPad, XtCMargin, XtRDimension, sizeof(Dimension),
X    offset(h_pad), XtRImmediate, (caddr_t) HORIZONTAL_PAD},
X    {XtNvertPad, XtCMargin, XtRDimension, sizeof(Dimension),
X    offset(v_pad), XtRImmediate, (caddr_t) VERTICAL_PAD},
X    {XtNcallback, XtCCallback, XtRCallback, sizeof(caddr_t),
X    offset(callbacks), XtRCallback, (caddr_t) NULL},
X    {XtNdialogbox, XtCWidget, XtRWidget, sizeof(Widget),
X    offset(dialogbox), XtRWidget, (caddr_t) NULL},
X};
X
Xstatic XtActionsRec compound_actions[] =
X{
X    {"notify", CompoundNotify},
X    {"mark", CompoundMark},
X    {"goto", CompoundGoto},
X    {"focus_in", CompoundFocusIn},
X    {"focus_out", CompoundFocusOut},
X};
X
Xstatic char compound_translations[] =
X"<BtnDown>:		mark(BUTTON) notify(BUTTON)\n\
X <Key>Return:		notify(KEY)\n\
X <Key>Up:		mark(PREV)\n\
X <Key>Down:		mark(NEXT)\n\
X Shift<Key>Tab:		goto(PREV)\n\
X <Key>Tab:		goto(NEXT)\n\
X <FocusIn>:		focus_in()\n\
X <FocusOut>:		focus_out()\n\
X";
X
X#define superclass		(&simpleClassRec)
X
XCompoundClassRec compoundClassRec = {
X    {
X	/* core fields 		 */
X	 /* superclass		 */ (WidgetClass) superclass,
X	 /* class_name		 */ "Compound",
X	 /* widget_size		 */ sizeof(CompoundRec),
X	 /* class_initialize	 */ NULL,
X	 /* class_part_initialize */ NULL,
X	 /* class_inited	 */ FALSE,
X	 /* initialize		 */ CompoundInitialize,
X	 /* initialize_hook	 */ NULL,
X	 /* realize		 */ XtInheritRealize,
X	 /* actions		 */ compound_actions,
X	 /* num_actions		 */ XtNumber(compound_actions),
X	 /* resources		 */ compound_resources,
X	 /* resource_count	 */ XtNumber(compound_resources),
X	 /* xrm_class		 */ NULLQUARK,
X	 /* compress_motion	 */ TRUE,
X	 /* compress_exposure	 */ TRUE,
X	 /* compress_enterleave	 */ TRUE,
X	 /* visible_interest	 */ FALSE,
X	 /* destroy		 */ CompoundDestroy,
X	 /* resize		 */ NULL,
X	 /* expose		 */ CompoundRedisplay,
X	 /* set_values		 */ NULL,
X	 /* set_values_hook	 */ NULL,
X	 /* set_values_almost	 */ XtInheritSetValuesAlmost,
X	 /* get_values_hook	 */ NULL,
X	 /* accept_focus	 */ NULL,
X	 /* version		 */ XtVersion,
X	 /* callback_private	 */ NULL,
X	 /* tm_table		 */ compound_translations,
X	 /* query_geometry       */ NULL,
X	 /* display_accelerator	 */ XtInheritDisplayAccelerator,
X	 /* extension		 */ NULL
X    },
X    {
X	/* Simple class fields initialization */
X	 /* change_sensitive	 */ XtInheritChangeSensitive
X    }
X};
X
X
XWidgetClass compoundWidgetClass = (WidgetClass) & compoundClassRec;
X
X
X/************************************************************/
X/******************** Private Procedures ********************/
X/************************************************************/
X
X
Xstatic void CompoundGetGC(w)
XCompoundWidget w;
X{
X    XGCValues values;
X
X    values.foreground = w->compound.foreground;
X    values.background = w->core.background_pixel;
X    values.font = w->compound.font->fid;
X
X    w->compound.normal_gc = XtGetGC((Widget) w, (unsigned) GCForeground |
X      GCBackground | GCFont, &values);
X}
X
X
Xstatic void CompoundSetSize(w)
XCompoundWidget w;
X{
X    XtWidgetGeometry my_request;
X    XFontStruct *fs = w->compound.font;
X    ToggleItem *toggle_item;
X    RadioItem *radio_item;
X    Cardinal height = fs->max_bounds.ascent + fs->max_bounds.descent;
X    Cardinal width = fs->max_bounds.width;
X    Cardinal label_width;
X    Cardinal max_width = 0;
X    char *label;
X    int ii = 0;
X
X    if (w->compound.button_type == ToggleButton)
X    {
X	toggle_item = w->compound.toggle_items;
X	while (1)
X	{
X	    label = toggle_item->label;
X	    if (label == NULL)
X		break;
X	    label_width = width * STRLEN(label);
X	    max_width = MAX(max_width, label_width);
X	    ++ii;
X	    ++toggle_item;
X	}
X    }
X    else
X    {
X	radio_item = w->compound.radio_items;
X	while (1)
X	{
X	    label = radio_item->label;
X	    if (label == NULL)
X		break;
X	    label_width = width * STRLEN(label);
X	    max_width = MAX(max_width, label_width);
X	    ++ii;
X	    ++radio_item;
X	}
X    }
X
X    w->compound.num_items = ii;
X    w->compound.item_width = max_width;
X
X    /* Hot region is the 2nd and 3rd characters */
X    w->compound.hot_min = w->compound.h_pad + width;
X    w->compound.hot_max = w->compound.h_pad + width * 3;
X
X    w->compound.item_height = height + 2 * w->compound.v_pad;
X
X    my_request.request_mode = CWWidth | CWHeight;
X    my_request.width = w->compound.item_width + 2 * w->compound.h_pad;
X    my_request.height = w->compound.item_height * w->compound.num_items;
X
X    XtMakeGeometryRequest((Widget) w, &my_request, NULL);
X}
X
X
X/*ARGSUSED*/
Xstatic void CompoundInitialize(request, new)
XWidget request;			/* unused */
XWidget new;
X{
X    CompoundWidget w = (CompoundWidget) new;
X    char *label;
X    int ii;
X
X    if (w->compound.dialogbox == NULL)
X    {
X	eprintf("XtNdialogbox not set\n");
X	abort();
X    }
X
X    CompoundGetGC(w);
X
X    if (w->compound.button_type == ToggleButton)
X    {
X	/* SUPPRESS 530 */
X	for (ii = 0; w->compound.toggle_items[ii].label != NULL; ++ii);
X
X	/* Allocate a private copy of the compound structure so that it
X	 * doesn't change from under us. */
X
X	w->compound.toggle_items = (ToggleItem *)
X	  COPY(w->compound.toggle_items, (ii + 1) * sizeof(ToggleItem));
X
X	/* And don't forget to make private copies of all the labels in the
X	 * structures (with space for 3 special leading chars). */
X
X	while (--ii >= 0)
X	{
X	    label = w->compound.toggle_items[ii].label;
X	    w->compound.toggle_items[ii].label =
X	      malloc((unsigned) strlen(label) + 4);
X	    (void) memset(w->compound.toggle_items[ii].label, BLANK, 3);
X	    (void) strcpy(&(w->compound.toggle_items[ii].label[3]), label);
X	}
X    }
X    else if (w->compound.button_type == RadioButton)
X    {
X	/* SUPPRESS 530 */
X	for (ii = 0; w->compound.radio_items[ii].label != NULL; ++ii);
X
X	/* Allocate a private copy of the compound structure so that it
X	 * doesn't change from under us. */
X
X	w->compound.radio_items = (RadioItem *) COPY(w->compound.radio_items,
X	  (ii + 1) * sizeof(RadioItem));
X
X	/* And don't forget to make private copies of all the labels in the
X	 * structures (with space for 3 special leading chars). */
X
X	while (--ii >= 0)
X	{
X	    label = w->compound.radio_items[ii].label;
X	    w->compound.radio_items[ii].label =
X	      malloc((unsigned) strlen(label) + 4);
X	    (void) memset(w->compound.radio_items[ii].label, BLANK, 3);
X	    (void) strcpy(&(w->compound.radio_items[ii].label[3]), label);
X	}
X    }
X    else
X    {
X	eprintf("Invalid button type\n");
X	abort();
X    }
X
X    w->compound.active_item = NO_ITEM;
X
X    CompoundSetSize(w);
X}
X
X
X/*ARGSUSED*/
Xstatic void CompoundRedisplay(widget, event, region)
XWidget widget;
XXEvent *event;
XRegion region;			/* unused */
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    int ii;
X
X    if (XtIsRealized(widget) == False)
X	return;
X
X    for (ii = 0; ii < w->compound.num_items; ++ii)
X	CompoundDrawItem(widget, ii);
X}
X
X
Xstatic void CompoundDestroy(widget)
XWidget widget;
X{
X    CompoundWidget w = (CompoundWidget) widget;
X
X    XtReleaseGC(widget, w->compound.normal_gc);
X}
X
X
Xstatic void CompoundDrawItem(widget, item)
XWidget widget;
Xint item;
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    Display *dpy = XtDisplay(w);
X    Window window = XtWindow(w);
X    ToggleItem *toggle_item;
X    RadioItem *radio_item;
X    char *label;
X    int x, y;
X
X    if (item == NO_ITEM)
X	return;
X
X    if (w->compound.button_type == ToggleButton)
X    {
X	toggle_item = &(w->compound.toggle_items[item]);
X	label = toggle_item->label;
X
X	if (toggle_item->state == True)
X	    (void) memcpy(&label[1], TOGGLE_SET_STRING, 2);
X	else
X	    (void) memcpy(&label[1], TOGGLE_UNSET_STRING, 2);
X    }
X    else
X    {
X	radio_item = &(w->compound.radio_items[item]);
X	label = radio_item->label;
X	if (item == w->compound.selected_item)
X	    (void) memcpy(&label[1], RADIO_SET_STRING, 2);
X	else
X	    (void) memcpy(&label[1], RADIO_UNSET_STRING, 2);
X    }
X
X    if (item == w->compound.active_item)
X	label[0] = ARROW;
X    else
X	label[0] = BLANK;
X
X    x = w->compound.h_pad;
X    y = w->compound.item_height * item + w->compound.v_pad +
X      w->compound.font->max_bounds.ascent;
X
X    if (XtIsRealized(widget))
X	XDrawImageString(dpy, window, w->compound.normal_gc, x, y, label,
X	  STRLEN(label));
X}
X
X
X/***********************************************************/
X/******************** Action Procedures ********************/
X/***********************************************************/
X
X
X/*ARGSUSED*/
Xstatic void CompoundFocusIn(widget, event, params, num_params)
XWidget widget;
XXEvent *event;
XString *params;
XCardinal *num_params;		/* unused */
X{
X    CompoundWidget w = (CompoundWidget) widget;
X
X    if (w->compound.active_item == NO_ITEM)
X	w->compound.active_item = 0;
X
X    CompoundDrawItem(widget, w->compound.active_item);
X}
X
X
X/*ARGSUSED*/
Xstatic void CompoundFocusOut(widget, event, params, num_params)
XWidget widget;
XXEvent *event;
XString *params;
XCardinal *num_params;		/* unused */
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    int last_active_item = w->compound.active_item;
X
X    if (w->compound.active_item != NO_ITEM)
X    {
X	w->compound.active_item = NO_ITEM;
X	CompoundDrawItem(widget, last_active_item);
X    }
X}
X
X
X/*ARGSUSED*/
Xstatic void CompoundNotify(widget, event, params, num_params)
XWidget widget;
XXEvent *event;
XString *params;
XCardinal *num_params;		/* unused */
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    XButtonEvent *ev = (XButtonEvent *) & event->xbutton;
X    ToggleItem *toggle_item;
X    int item;
X    int last_selected_item;
X
X    if (params[0][0] == 'B')
X	item = GET_ITEM(w, ev->x, ev->y);
X    else
X	item = w->compound.active_item;
X
X    if (item == NO_ITEM)
X	return;
X
X    if (w->compound.button_type == ToggleButton)
X    {
X	toggle_item = &(w->compound.toggle_items[item]);
X	toggle_item->state = !toggle_item->state;
X    }
X    else
X    {
X	last_selected_item = w->compound.selected_item;
X	w->compound.selected_item = item;
X	CompoundDrawItem(widget, last_selected_item);
X    }
X
X    CompoundDrawItem(widget, item);
X
X    XtCallCallbacks(widget, XtNcallback, (XtPointer) item);
X}
X
X
X/*ARGSUSED*/
Xstatic void CompoundMark(widget, event, params, num_params)
XWidget widget;
XXEvent *event;
XString *params;			/* unused */
XCardinal *num_params;		/* unused */
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    XButtonEvent *ev = (XButtonEvent *) & event->xbutton;
X    int item;
X    int last_item = w->compound.active_item;
X
X    switch (params[0][0])
X    {
X    case 'B':
X	item = GET_ITEM(w, ev->x, ev->y);
X	if (item == NO_ITEM)
X	    return;
X	DialogSetNewFocus(w->compound.dialogbox, widget);
X	break;
X
X    case 'P':
X	item = w->compound.active_item - 1;
X	if (item < 0)
X	    item = 0;
X	break;
X
X    case 'N':
X	item = w->compound.active_item + 1;
X	if (item >= w->compound.num_items)
X	    item = w->compound.num_items - 1;
X	break;
X    }
X
X    w->compound.active_item = item;
X
X    CompoundDrawItem(widget, last_item);
X    CompoundDrawItem(widget, item);
X}
X
X
X/*ARGSUSED*/
Xstatic void CompoundGoto(widget, event, params, num_params)
XWidget widget;
XXEvent *event;			/* unused */
XString *params;			/* unused */
XCardinal *num_params;		/* unused */
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    int item = w->compound.active_item;
X
X    w->compound.active_item = NO_ITEM;
X    CompoundDrawItem(widget, item);
X
X    switch (params[0][0])
X    {
X    case 'P':
X	DialogSetPrevFocus(w->compound.dialogbox);
X	break;
X
X    case 'N':
X	DialogSetNextFocus(w->compound.dialogbox);
X	break;
X    }
X}
X
X
X/***********************************************************/
X/******************** Public Procedures ********************/
X/***********************************************************/
X
X
XBoolean CompoundChangeLabel(widget, item, label)
XWidget widget;
XCardinal item;
XString label;
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    ToggleItem *toggle_item;
X    RadioItem *radio_item;
X
X    if (item >= w->compound.num_items || label == NULL)
X	return (False);
X
X    if (w->compound.button_type == ToggleButton)
X    {
X	toggle_item = &(w->compound.toggle_items[item]);
X	if (strcmp(&(toggle_item->label[3]), label) == SAME)
X	    return (True);
X	free(toggle_item->label);
X	toggle_item->label =
X	  malloc((unsigned) strlen(label) + 4);
X	(void) strcpy(&(toggle_item->label[3]), label);
X    }
X    else
X    {
X	radio_item = &(w->compound.radio_items[item]);
X	if (strcmp(&(radio_item->label[3]), label) == SAME)
X	    return (True);
X	free(radio_item->label);
X	radio_item->label =
X	  malloc((unsigned) strlen(label) + 4);
X	(void) strcpy(&(radio_item->label[3]), label);
X    }
X
X    CompoundDrawItem(widget, (int) item);
X    return (True);
X}
X
X
XBoolean ToggleChangeState(widget, item, state)
XWidget widget;
XCardinal item;
XBoolean state;
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    ToggleItem *toggle_item;
X
X    if (item >= w->compound.num_items)
X	return (False);
X
X    toggle_item = &(w->compound.toggle_items[item]);
X
X    if (toggle_item->state == state)
X	return (True);
X
X    toggle_item->state = state;
X    CompoundDrawItem(widget, (int) item);
X    return (True);
X}
X
X
XBoolean ToggleGetState(widget, item)
XWidget widget;
XCardinal item;
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    ToggleItem *toggle_item;
X
X    if (w->compound.button_type != ToggleButton)
X    {
X	eprintf("Invalid widget type\n");
X	abort();
X    }
X
X    if (item >= w->compound.num_items)
X    {
X	eprintf("Invalid item: %d\n", item);
X	abort();
X    }
X
X    toggle_item = &(w->compound.toggle_items[item]);
X
X    return (toggle_item->state);
X}
X
X
XBoolean RadioChangeSelected(widget, item)
XWidget widget;
XCardinal item;
X{
X    CompoundWidget w = (CompoundWidget) widget;
X    int last_item = w->compound.selected_item;
X
X    if (item >= w->compound.num_items)
X	return (False);
X
X    w->compound.selected_item = item;
X
X    if (item != last_item)
X	CompoundDrawItem(widget, last_item);
X
X    CompoundDrawItem(widget, (int) item);
X
X    return (True);
X}
X
X
XCardinal RadioGetSelected(widget)
XWidget widget;
X{
X    CompoundWidget w = (CompoundWidget) widget;
X
X    if (w->compound.button_type != RadioButton)
X    {
X	eprintf("Invalid widget type\n");
X	abort();
X    }
X    return (w->compound.selected_item);
X}
END_OF_FILE
if test 15878 -ne `wc -c <'widgets/Compound.c'`; then
    echo shar: \"'widgets/Compound.c'\" unpacked with wrong size!
fi
# end of 'widgets/Compound.c'
fi
echo shar: End of archive 4 \(of 10\).
cp /dev/null ark4isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 10 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0

dan
----------------------------------------------------
O'Reilly && Associates   argv at sun.com / argv at ora.com
Opinions expressed reflect those of the author only.



More information about the Comp.sources.x mailing list