v13i013: xdtm - X Desktop Manager for the X Window System, Part08/11

EdwardJ. Groenendaal eddyg at cogs.sussex.ac.uk
Sun May 19 10:03:46 AEST 1991


Submitted-by: Edward "J." Groenendaal <eddyg at cogs.sussex.ac.uk>
Posting-number: Volume 13, Issue 13
Archive-name: xdtm/part08

Submitted-by: eddyg at cste
Archive-name: xdtm/part08

---- Cut Here and feed the following to sh ----
#!/bin/sh
# This is part 08 of xdtm
# ============= xdtm/icons/eddy/make.icon ==============
if test ! -d 'xdtm'; then
    echo 'x - creating directory xdtm'
    mkdir 'xdtm'
fi
if test ! -d 'xdtm/icons'; then
    echo 'x - creating directory xdtm/icons'
    mkdir 'xdtm/icons'
fi
if test ! -d 'xdtm/icons/eddy'; then
    echo 'x - creating directory xdtm/icons/eddy'
    mkdir 'xdtm/icons/eddy'
fi
if test -f 'xdtm/icons/eddy/make.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/make.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/make.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/make.icon' &&
X#define make_width 32
X#define make_height 32
Xstatic char make_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00,
X   0x5a, 0x00, 0x00, 0x00, 0x4a, 0x3f, 0x00, 0x00, 0x5a, 0x20, 0x00, 0x00,
X   0x42, 0x20, 0x00, 0x00, 0x7e, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
X   0x00, 0x20, 0xe4, 0x7f, 0x00, 0xe0, 0x2f, 0x40, 0x7e, 0x00, 0xa4, 0x5f,
X   0x42, 0x00, 0xa0, 0x55, 0x5a, 0x00, 0xa4, 0x5a, 0x4a, 0xff, 0xaf, 0x55,
X   0x5a, 0x00, 0xa4, 0x5a, 0x42, 0x00, 0xa0, 0x5f, 0x7e, 0x00, 0x20, 0x4f,
X   0x00, 0x00, 0xa4, 0x5f, 0x00, 0xe0, 0xaf, 0x5f, 0x00, 0x20, 0x24, 0x40,
X   0x00, 0x20, 0xe0, 0x7f, 0x7e, 0x20, 0x00, 0x00, 0x42, 0x20, 0x00, 0x00,
X   0x5a, 0x20, 0x00, 0x00, 0x4a, 0x3f, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00,
X   0x42, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/make.icon ||
echo 'restore of xdtm/icons/eddy/make.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/make.icon'`"
test 875 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/make.icon: original size 875, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/makefile.icon ==============
if test -f 'xdtm/icons/eddy/makefile.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/makefile.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/makefile.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/makefile.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define makefile_width 32
X#define makefile_height 32
Xstatic char makefile_bits[] = {
X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x90, 0xe3, 0x40, 0x01,
X   0x90, 0xa6, 0x41, 0x02, 0x90, 0x24, 0x41, 0x04, 0x90, 0x24, 0xc1, 0x0f,
X   0x90, 0x24, 0x01, 0x08, 0x90, 0xe7, 0x01, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x90, 0xe3, 0x38, 0x08, 0x90, 0xa6, 0x69, 0x08, 0x90, 0x24, 0x49, 0x08,
X   0x90, 0x24, 0x49, 0x08, 0x90, 0x24, 0x49, 0x08, 0x90, 0xe7, 0x79, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0x10, 0xc0, 0x00, 0x08, 0x10, 0xc0, 0x00, 0x08,
X   0x10, 0xc0, 0x00, 0x08, 0x10, 0xc0, 0x00, 0x08, 0x10, 0xf0, 0x03, 0x08,
X   0x10, 0xe0, 0x01, 0x08, 0x10, 0xc0, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x10, 0xe0, 0x01, 0x08, 0x10, 0x20, 0x01, 0x08, 0x10, 0x20, 0x01, 0x08,
X   0x10, 0x20, 0x01, 0x08, 0x10, 0x20, 0x01, 0x08, 0x10, 0xe0, 0x01, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/makefile.icon ||
echo 'restore of xdtm/icons/eddy/makefile.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/makefile.icon'`"
test 1010 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/makefile.icon: original size 1010, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/manpage.icon ==============
if test -f 'xdtm/icons/eddy/manpage.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/manpage.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/manpage.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/manpage.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define manpage_width 32
X#define manpage_height 32
Xstatic char manpage_bits[] = {
X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0x00, 0x40, 0x01,
X   0xd0, 0x81, 0x43, 0x02, 0x10, 0x00, 0x40, 0x04, 0x90, 0x0f, 0xc0, 0x0f,
X   0x10, 0x00, 0x00, 0x08, 0x10, 0x76, 0x4f, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x90, 0x07, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0xae, 0xdb, 0x09,
X   0x10, 0xda, 0xd6, 0x09, 0x10, 0xbe, 0xb6, 0x08, 0x10, 0xb6, 0xb5, 0x09,
X   0x10, 0xbe, 0xb6, 0x09, 0x10, 0x00, 0x00, 0x08, 0x90, 0x0f, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0x10, 0x76, 0x77, 0x09, 0x10, 0xda, 0xfd, 0x09,
X   0x10, 0x6e, 0xb7, 0x09, 0x10, 0x76, 0xff, 0x09, 0x10, 0xb6, 0xdb, 0x08,
X   0x10, 0xee, 0xdd, 0x09, 0x10, 0xba, 0xdd, 0x09, 0x10, 0xee, 0xb6, 0x08,
X   0x10, 0xf6, 0xed, 0x09, 0x10, 0xee, 0x76, 0x09, 0x10, 0x00, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/manpage.icon ||
echo 'restore of xdtm/icons/eddy/manpage.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/manpage.icon'`"
test 1007 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/manpage.icon: original size 1007, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/ocode.icon ==============
if test -f 'xdtm/icons/eddy/ocode.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/ocode.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/ocode.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/ocode.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define ocode_width 32
X#define ocode_height 32
Xstatic char ocode_bits[] = {
X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0xe0, 0x41, 0x01,
X   0xd0, 0xf9, 0x47, 0x02, 0x10, 0x3c, 0x4f, 0x04, 0x50, 0x1c, 0xce, 0x0f,
X   0x10, 0x1e, 0x1e, 0x08, 0xd0, 0x0e, 0xdc, 0x09, 0x10, 0x0e, 0x1c, 0x08,
X   0xd0, 0x0e, 0x5c, 0x0b, 0x10, 0x0e, 0x1c, 0x08, 0xd0, 0x1e, 0xde, 0x0a,
X   0x10, 0x1c, 0x0e, 0x08, 0xd0, 0x3c, 0xaf, 0x0b, 0x10, 0xf8, 0x07, 0x08,
X   0xd0, 0xe3, 0xd1, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xdf, 0xbd, 0x0b,
X   0x10, 0x00, 0x00, 0x08, 0xd0, 0xff, 0x6f, 0x0b, 0x10, 0x00, 0x00, 0x08,
X   0xd0, 0xb7, 0x77, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xbd, 0xb7, 0x0a,
X   0x10, 0x00, 0x00, 0x08, 0xd0, 0x6c, 0x77, 0x0b, 0x10, 0x00, 0x00, 0x08,
X   0xd0, 0xdd, 0x6e, 0x0b, 0x10, 0x00, 0x00, 0x08, 0xd0, 0xdf, 0xb6, 0x0b,
X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/ocode.icon ||
echo 'restore of xdtm/icons/eddy/ocode.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/ocode.icon'`"
test 1001 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/ocode.icon: original size 1001, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/prog.icon ==============
if test -f 'xdtm/icons/eddy/prog.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/prog.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/prog.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/prog.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define prog_width 32
X#define prog_height 32
Xstatic char prog_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0x03,
X   0x04, 0x00, 0x00, 0x06, 0xf4, 0xff, 0xff, 0x1a, 0x14, 0x20, 0x90, 0x22,
X   0xd4, 0xa6, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22, 0x54, 0xad, 0x93, 0x22,
X   0x14, 0x20, 0xf0, 0x22, 0xf4, 0xbf, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22,
X   0x54, 0xa5, 0x95, 0x22, 0x14, 0x20, 0xf0, 0x22, 0x54, 0xa0, 0xf6, 0x22,
X   0x14, 0x20, 0xf0, 0x22, 0xf4, 0xff, 0xff, 0x22, 0x14, 0x00, 0xe0, 0x22,
X   0xf4, 0xff, 0xff, 0x22, 0x04, 0x00, 0x00, 0x1a, 0xfc, 0xff, 0xff, 0x7f,
X   0xc0, 0x01, 0xe0, 0x71, 0x30, 0xff, 0x7f, 0x4c, 0x0c, 0x00, 0x00, 0x43,
X   0xfe, 0xff, 0xff, 0x40, 0x02, 0x00, 0x80, 0x30, 0x1a, 0x00, 0x80, 0x0c,
X   0x02, 0x00, 0x80, 0x03, 0xfe, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/prog.icon ||
echo 'restore of xdtm/icons/eddy/prog.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/prog.icon'`"
test 998 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/prog.icon: original size 998, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/slink.icon ==============
if test -f 'xdtm/icons/eddy/slink.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/slink.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/slink.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/slink.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define slink_width 32
X#define slink_height 32
Xstatic char slink_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0xf0, 0x0f, 0x02, 0x03, 0x10, 0x18,
X   0x02, 0x05, 0x10, 0x28, 0x02, 0x0f, 0x10, 0x78, 0x02, 0x08, 0x10, 0x40,
X   0x62, 0x08, 0x11, 0x40, 0x92, 0x08, 0x13, 0x40, 0x12, 0xe8, 0x17, 0x40,
X   0x62, 0x08, 0x13, 0x40, 0x82, 0x08, 0x11, 0x40, 0x92, 0x08, 0x10, 0x40,
X   0x62, 0x08, 0x10, 0x40, 0x02, 0x08, 0x10, 0x40, 0x02, 0x08, 0x10, 0x40,
X   0x02, 0x08, 0x10, 0x40, 0xfe, 0x0f, 0xf0, 0x7f, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/slink.icon ||
echo 'restore of xdtm/icons/eddy/slink.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/slink.icon'`"
test 1001 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/slink.icon: original size 1001, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/socket.icon ==============
if test -f 'xdtm/icons/eddy/socket.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/socket.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/socket.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/socket.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define socket_width 32
X#define socket_height 32
Xstatic char socket_bits[] = {
X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0x00, 0x40, 0x01,
X   0x10, 0x00, 0x40, 0x02, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, 0xc0, 0x0f,
X   0x10, 0x00, 0x00, 0x08, 0x10, 0xe0, 0x07, 0x08, 0x10, 0x18, 0x18, 0x08,
X   0x10, 0x06, 0x60, 0x08, 0x10, 0x82, 0x41, 0x08, 0x10, 0x81, 0x81, 0x08,
X   0x10, 0x81, 0x81, 0x08, 0x90, 0x80, 0x01, 0x09, 0x90, 0x00, 0x00, 0x09,
X   0x90, 0x00, 0x00, 0x09, 0x90, 0x00, 0x00, 0x09, 0x90, 0x38, 0x1c, 0x09,
X   0x10, 0x39, 0x9c, 0x08, 0x10, 0x01, 0x80, 0x08, 0x10, 0x02, 0x40, 0x08,
X   0x10, 0x06, 0x60, 0x08, 0x10, 0x18, 0x18, 0x08, 0x10, 0xe0, 0x07, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/socket.icon ||
echo 'restore of xdtm/icons/eddy/socket.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/socket.icon'`"
test 1004 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/socket.icon: original size 1004, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/text.icon ==============
if test -f 'xdtm/icons/eddy/text.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/text.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/text.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/text.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define text_width 32
X#define text_height 32
Xstatic char text_bits[] = {
X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x10, 0x00, 0x40, 0x01,
X   0x90, 0xb7, 0x4d, 0x02, 0x10, 0x00, 0x40, 0x04, 0x10, 0x00, 0xc0, 0x0f,
X   0x10, 0x00, 0x00, 0x08, 0x90, 0xdd, 0x3d, 0x09, 0x10, 0x00, 0x00, 0x08,
X   0x90, 0xae, 0x6d, 0x0b, 0x10, 0x00, 0x00, 0x08, 0x90, 0xdd, 0xde, 0x0b,
X   0x10, 0x00, 0x00, 0x08, 0x90, 0xdd, 0xa6, 0x0b, 0x10, 0x00, 0x00, 0x08,
X   0x90, 0x5b, 0xaf, 0x0a, 0x10, 0x00, 0x00, 0x08, 0x90, 0xcd, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0x90, 0x5d, 0xbb, 0x0b, 0x10, 0x00, 0x00, 0x08,
X   0x90, 0xdb, 0xda, 0x0a, 0x10, 0x00, 0x00, 0x08, 0x90, 0xed, 0x56, 0x0b,
X   0x10, 0x00, 0x00, 0x08, 0x90, 0xed, 0xb6, 0x0b, 0x10, 0x00, 0x00, 0x08,
X   0x90, 0xdb, 0xed, 0x0a, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/text.icon ||
echo 'restore of xdtm/icons/eddy/text.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/text.icon'`"
test 998 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/text.icon: original size 998, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/tty.icon ==============
if test -f 'xdtm/icons/eddy/tty.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/tty.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/tty.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/tty.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define tty_width 32
X#define tty_height 32
Xstatic char tty_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0x01, 0x40, 0x00, 0x00, 0x01,
X   0x40, 0xff, 0x7f, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0xdd, 0x4c, 0x01,
X   0x40, 0x01, 0x40, 0x01, 0x40, 0x79, 0x4f, 0x01, 0x40, 0x01, 0x40, 0x01,
X   0x40, 0x1d, 0x5b, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0xad, 0x43, 0x01,
X   0x40, 0x01, 0x40, 0x01, 0x40, 0xd5, 0x4c, 0x01, 0x40, 0x01, 0x40, 0x01,
X   0x40, 0xff, 0x7f, 0x01, 0x40, 0x00, 0x00, 0x01, 0xc0, 0xff, 0xff, 0x01,
X   0x00, 0x10, 0x04, 0x00, 0x00, 0x0f, 0x78, 0x00, 0x00, 0xff, 0x7f, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00,
X   0x00, 0xf0, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00,
X   0x00, 0xc0, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0xe0, 0x01, 0x00,
X   0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/tty.icon ||
echo 'restore of xdtm/icons/eddy/tty.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/tty.icon'`"
test 995 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/tty.icon: original size 995, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/x.icon ==============
if test -f 'xdtm/icons/eddy/x.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/x.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/x.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/x.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define x_width 32
X#define x_height 32
Xstatic char x_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
X   0x00, 0x00, 0xf8, 0x03, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x02, 0x08,
X   0xfe, 0xff, 0xff, 0x7f, 0x02, 0x00, 0x00, 0x40, 0x02, 0x1e, 0x60, 0x40,
X   0x02, 0x1e, 0x60, 0x40, 0x02, 0x3c, 0x30, 0x40, 0x02, 0x78, 0x18, 0x40,
X   0x02, 0x78, 0x18, 0x40, 0x02, 0xf0, 0x0c, 0x40, 0x02, 0xe0, 0x07, 0x40,
X   0x02, 0xe0, 0x07, 0x40, 0x02, 0xc0, 0x03, 0x40, 0x02, 0xc0, 0x07, 0x40,
X   0x02, 0xe0, 0x07, 0x40, 0x02, 0x60, 0x0f, 0x40, 0x02, 0x30, 0x1e, 0x40,
X   0x02, 0x18, 0x1e, 0x40, 0x02, 0x18, 0x3c, 0x40, 0x02, 0x0c, 0x78, 0x40,
X   0x02, 0x06, 0x78, 0x40, 0x02, 0x06, 0xf0, 0x40, 0x02, 0x00, 0x00, 0x40,
X   0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/x.icon ||
echo 'restore of xdtm/icons/eddy/x.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/x.icon'`"
test 989 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/x.icon: original size 989, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/xdtm.icon ==============
if test -f 'xdtm/icons/eddy/xdtm.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/xdtm.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/xdtm.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/xdtm.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define xdtm_width 32
X#define xdtm_height 32
Xstatic char xdtm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x4a, 0x06, 0x00, 0x58,
X   0xfe, 0xff, 0xff, 0x7f, 0x02, 0x08, 0x10, 0x40, 0x02, 0x88, 0xff, 0x43,
X   0x02, 0x88, 0x10, 0x42, 0xfe, 0xcf, 0x39, 0x47, 0x02, 0x48, 0x29, 0x45,
X   0xe2, 0xc8, 0x39, 0x47, 0xa2, 0x88, 0x00, 0x42, 0xa2, 0xf8, 0x07, 0x42,
X   0xe2, 0x88, 0x04, 0x42, 0x02, 0xf8, 0xff, 0x7f, 0xfa, 0x0b, 0x00, 0x40,
X   0x02, 0xe8, 0x9c, 0x43, 0xe2, 0xa8, 0x94, 0x42, 0xa2, 0xa8, 0x94, 0x42,
X   0xa2, 0xe8, 0x9c, 0x43, 0xe2, 0x08, 0x00, 0x40, 0x02, 0xe8, 0xb6, 0x43,
X   0x7a, 0x0b, 0x00, 0x40, 0x02, 0xe8, 0x9c, 0x43, 0x02, 0xa8, 0x94, 0x42,
X   0x02, 0xa8, 0x94, 0x42, 0x02, 0xe8, 0x9c, 0x43, 0xfe, 0x0f, 0x00, 0x40,
X   0x92, 0xec, 0x9c, 0x43, 0x92, 0x0c, 0x00, 0x40, 0x92, 0x0c, 0x00, 0x40,
X   0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/xdtm.icon ||
echo 'restore of xdtm/icons/eddy/xdtm.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/xdtm.icon'`"
test 998 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/xdtm.icon: original size 998, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/ycode.icon ==============
if test -f 'xdtm/icons/eddy/ycode.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/ycode.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/ycode.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/ycode.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define ycode_width 32
X#define ycode_height 32
Xstatic char ycode_bits[] = {
X   0xf0, 0xff, 0x7f, 0x00, 0x10, 0x00, 0xc0, 0x00, 0x90, 0x8f, 0x4f, 0x01,
X   0x10, 0x07, 0x47, 0x02, 0x10, 0x8e, 0x43, 0x04, 0x10, 0x8e, 0xc3, 0x0f,
X   0x10, 0xdc, 0x01, 0x08, 0x10, 0xdc, 0x01, 0x08, 0x10, 0xf8, 0x00, 0x08,
X   0x10, 0xf8, 0x00, 0x08, 0x10, 0x70, 0x00, 0x08, 0x10, 0x70, 0x00, 0x08,
X   0x10, 0x70, 0x00, 0x08, 0x10, 0x70, 0x00, 0x08, 0x10, 0xf8, 0x00, 0x08,
X   0xd0, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x90, 0x05, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0x90, 0xdf, 0x0a, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x10, 0xb7, 0x03, 0x08, 0x10, 0x00, 0x00, 0x08, 0x90, 0xbd, 0xb7, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0x10, 0x6c, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
X   0x90, 0xdd, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0xd0, 0x00, 0x00, 0x08,
X   0x10, 0x00, 0x00, 0x08, 0xf0, 0xff, 0xff, 0x0f};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/ycode.icon ||
echo 'restore of xdtm/icons/eddy/ycode.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/ycode.icon'`"
test 1001 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/ycode.icon: original size 1001, current size' "$Wc_c"
fi
# ============= xdtm/icons/eddy/z.icon ==============
if test -f 'xdtm/icons/eddy/z.icon' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/icons/eddy/z.icon (File already exists)'
else
echo 'x - extracting xdtm/icons/eddy/z.icon (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/icons/eddy/z.icon' &&
X/* This X bitmap is designed for use with the X Desktop Manager.
X * it was designed by Edward Groenendaal, April 1991.
X */
X#define z_width 32
X#define z_height 32
X#define z_x_hot 16
X#define z_y_hot 13
Xstatic char z_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x0f, 0x00, 0x00, 0xf0, 0x3f, 0x00,
X   0x00, 0xf8, 0xff, 0x00, 0x00, 0x3c, 0xf8, 0x01, 0x00, 0x1c, 0xc0, 0x03,
X   0x00, 0x1c, 0x80, 0x03, 0xc0, 0xff, 0x03, 0x07, 0x20, 0x00, 0x01, 0x07,
X   0x50, 0xd5, 0x00, 0x07, 0x20, 0x00, 0x01, 0x0e, 0x40, 0x55, 0x03, 0x0e,
X   0x20, 0x00, 0x01, 0x0e, 0x50, 0xd5, 0x00, 0x0e, 0x20, 0x00, 0x01, 0x0e,
X   0x40, 0x00, 0x02, 0x0e, 0xc0, 0xff, 0x03, 0x0e, 0x00, 0x7e, 0x00, 0x07,
X   0x00, 0x18, 0x00, 0x07, 0x00, 0x18, 0x00, 0x07, 0x00, 0x18, 0x80, 0x03,
X   0x00, 0x3c, 0xc0, 0x03, 0x00, 0x7c, 0xf0, 0x01, 0x00, 0xfc, 0xff, 0x00,
X   0x00, 0xf8, 0x7f, 0x00, 0x00, 0xd8, 0x1f, 0x00, 0x00, 0x18, 0x00, 0x00,
X   0x80, 0xdb, 0x01, 0x00, 0xc0, 0xff, 0x03, 0x00, 0xc0, 0xff, 0x03, 0x00,
X   0x80, 0xc3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00};
SHAR_EOF
chmod 0644 xdtm/icons/eddy/z.icon ||
echo 'restore of xdtm/icons/eddy/z.icon failed'
Wc_c="`wc -c < 'xdtm/icons/eddy/z.icon'`"
test 1027 -eq "$Wc_c" ||
	echo 'xdtm/icons/eddy/z.icon: original size 1027, current size' "$Wc_c"
fi
# ============= xdtm/lexical.l ==============
if test -f 'xdtm/lexical.l' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/lexical.l (File already exists)'
else
echo 'x - extracting xdtm/lexical.l (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/lexical.l' &&
X%{ /*-*- Mode: C -*-*/
X/**************************************************************************
X ** File     :       lexical.l                                           **
X ** Author   :       Edward Groenendaal                                  **
X **************************************************************************/
X
X#include "xdtm.h"
X
X/* I shall use the macro RETURN whenever returning a token. If DEBUG_LEX has
X * been defined then the token will be printed out, otherwise it will
X * be returned.
X */
X
X#ifdef DEBUG_LEX
X
X/* define the RETURN macro to print the token to be returned */
X# define RETURN(token)    fprintf(stdout,"Token: " #token "\tReturned.\n")
X
X  /* define the tokens to be returned. ONLY in DEBUG mode, when in normal
X   * operation the tokens are defined by yacc.
X   */
X  enum tokens { IF_T,
X	        SET_T,
X	        ICON_T,
X	        NAME_T,
X	        PATH_T,
X	        ASSIGN_T,
X	        EQUAL_T,
X		NEQUAL_T,
X	        STRING_T,
X	        SEMIC_T,
X	        O_PAR_T,
X	        C_PAR_T,
X	        O_BRACE_T,
X	        C_BRACE_T,
X		DEFICON_T,
X		CHECKPATH_T,
X		TRUE_T,
X		FALSE_T,
X		TYPE_T,
X                DIR_T,
X		FILE_T,
X		READ_T,
X		WRITE_T,
X		EXE_T,
X		BLOCK_T,
X		CHARACTER_T,
X		SLINK_T,
X		SOCKET_T,
X		FIFO_T,
X		PROG_T,
X		OPTIONS_T,
X		COMMA_T,
X		MSEL_T,
X		OSEL_T,
X		NSEL_T,
X		DEFINE_T,
X		IGNORE_T,
X		ERRORTOKEN
X	      };
X
X#else           /* No DEBUG */
X
X#include "parser.h"         /* get the tokens from yacc */
X
X/* define the RETURN token to set the return value to the token to be
X * returned, then return that token.
X */
X# define RETURN(token)    yylval.number=token;return(token)
X#endif
X
X#include <sys/types.h>
X#include <stdio.h>
X#include <stdarg.h>
X
X#define MAXERR      20      /* Maximum number of errors before the parser */
X                            /* quits. */
X
Xvoid yyerror(char*, ...);
X
Xtypedef struct {                    /* structure for keyword table */
X    String name;
X    int token;
X} keyword;
X
Xstatic keyword keywordtable[] = {   /* table of keywords, in alphabetical order */
X  {"False",   FALSE_T},
X  {"MSEL",    MSEL_T},
X  {"NSEL",    NSEL_T},
X  {"OSEL",    OSEL_T},
X  {"True",    TRUE_T},
X  {"block",   BLOCK_T},
X  {"character", CHARACTER_T},
X  {"checkpath", CHECKPATH_T},
X  {"deficon", DEFICON_T},
X  {"define",  DEFINE_T},
X  {"dir",     DIR_T},
X  {"exe",     EXE_T},
X  {"false",   FALSE_T},
X  {"fifo",    FIFO_T},
X  {"file",    FILE_T},
X  {"icon",    ICON_T},
X  {"if",      IF_T},
X  {"ignore",  IGNORE_T},
X  {"name",    NAME_T},
X  {"options", OPTIONS_T},
X  {"path",    PATH_T},
X  {"prog",    PROG_T},
X  {"read",    READ_T},
X  {"set",     SET_T},
X  {"slink",   SLINK_T},
X  {"socket",  SOCKET_T},
X  {"true",    TRUE_T},
X  {"type",    TYPE_T},
X  {"write",   WRITE_T}
X};
X/* number of entries in the keyword table */
Xstatic int numkeywords = (sizeof(keywordtable)/sizeof(keywordtable[0]));
X
Xint parseerror=0;                   /* Number of parse errors */
X
X%}
X%%
X[\t ]*"#".*     { /* Remove Comments from beginning of line */ }
X"="             { RETURN(ASSIGN_T);     }
X"=="            { RETURN(EQUAL_T);      }
X"{"             { RETURN(O_BRACE_T);    }
X"}"             { RETURN(C_BRACE_T);    }
X"("             { RETURN(O_PAR_T);      }
X")"             { RETURN(C_PAR_T);      }
X";"             { RETURN(SEMIC_T);      }
X","             { RETURN(COMMA_T);      }
X[A-Za-z]+       { int token = parse_keyword(yytext);
X#ifndef DEBUG_LEX
X		  yylval.number = token;
X                  return(token);
X#endif
X		}
X[\n\t ]         { /* Ignore White space */ }
X\"[^\"]*\"      {
X#ifdef DEBUG_LEX
X                  fprintf(stdout, "Token STRING_T %s returned", yytext);
X#else
X		  yylval.string = yytext;
X                  return(STRING_T);
X#endif
X                }
X.               { yyerror("illegal character \'%c\'.", yytext[0]);
X                }
X%%
X
X
X/*****************************************************************************
X *                                yywrap                                     *
X *****************************************************************************/
Xint yywrap(void)
X{
X    /* function called when EOF encounterd.
X     *
X     * - Takes nothing
X     * + returns EOF token, not actually used other than to indicate an error
X     *   to the parser. Useful in DEBUG mode to see that EOF has been detected.
X     */
X
X    RETURN(EOFTOKEN);
X}
X
X
X/*****************************************************************************
X *                            parse_keyword                                  *
X *****************************************************************************/
Xint parse_keyword(String str)
X{
X    /* Function to determine whether a string is a reserved keyword or an
X     * identifier. A table of keywords is searched via a binary search to check
X     * to see if the string is a keyword,if it is found the associated
X     * token is returned, otherwise an error is printed and ERRORTOKEN
X     * is returned.
X     * The effect of debugging is to prevent the assignment
X     * to the yacc structure, and to print out the keyword if found.
X     *
X     * - Takes a string to check
X     * + Returns a token (int)
X     */
X
X    register int lower = 0, upper = numkeywords-1;
X
X    while (lower <= upper) {
X        int middle = (lower + upper) /2;
X        keyword *p = &keywordtable[middle];
X        int res = strcmp(p->name, str);
X
X        if (res < 0) {
X            lower = middle +1;
X        } else if (res == 0) {
X#ifdef DEBUG_LEX
X            fprintf(stdout, "Token: %s\tReturned.\n", p->name);
X#endif
X            return(p->token);
X        } else {
X            upper = middle -1;
X        }
X    }
X    yyerror("unknown keyword \'%s\'.", yytext);
X    RETURN(ERRORTOKEN);
X}
X
X/****************************************************************************
X *                                     yyerror                              *
X ****************************************************************************/
Xvoid yyerror(char *fmt, ...)
X{
X    /* Error printing procedure. This procedure takes a variable argument list
X     * in the same format as printf(3s), and outputs it on the stderr stream
X     * prepended by the line-number currently being processed.
X     * parserrror is incremented to indicate that an error has occurred, if
X     * more than MAXERR errors occur the parser exits.
X     *
X     * - Takes a formatted string + parameters to print.
X     * + Returns noting.
X     */
X
X    va_list args;
X    extern int yylineno;
X
X    if (!parseerror) {
X    }
X    if (parseerror < MAXERR) {
X        va_start(args, fmt);
X        fprintf(stderr, "(E) line :%2d: ", yylineno);
X        vfprintf(stderr, fmt, args);
X        fprintf(stderr, "\n");
X        va_end(args);
X        parseerror++;
X    } else {
X        fprintf(stderr, "Fatal error: over %d errors, exiting\n", MAXERR);
X        exit(2);
X    }
X}
SHAR_EOF
chmod 0644 xdtm/lexical.l ||
echo 'restore of xdtm/lexical.l failed'
Wc_c="`wc -c < 'xdtm/lexical.l'`"
test 6783 -eq "$Wc_c" ||
	echo 'xdtm/lexical.l: original size 6783, current size' "$Wc_c"
fi
# ============= xdtm/listoption.c ==============
if test -f 'xdtm/listoption.c' -a X"$1" != X"-c"; then
	echo 'x - skipping xdtm/listoption.c (File already exists)'
else
echo 'x - extracting xdtm/listoption.c (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xdtm/listoption.c' &&
X/****************************************************************************
X ** File          : listoption.c                                           **
X ** Purpose       : Initialise and Realise long listing dialog options     **
X ** Author        : Edward Groenendaal                                     **
X ** Date          : April 1991                                             **
X ** Documentation : Xdtm Design Folder                                     **
X ** Related Files :                                                        **
X ****************************************************************************/
X
X#include "xdtm.h"
X#include "menus.h"
X#include <X11/Shell.h>
X#include <X11/Xaw/Label.h>
X#include <X11/Xaw/Command.h>
X#include "Xedw/XedwForm.h"
X
X/* Note ListOption *same* order as listoptions */
X
Xtypedef enum {perms, nlinks, owner, group, size, modtm, acctm} ListOption;
X
Xstatic String listoptions[] = {
X  "rwxrwxrwx ",
X  "1 ",
X  "owner ",
X  "group ",
X  "size ",
X  "modtm ",
X  "acctm "
X};
X
X/* Widgets */
X
Xprivate Widget listoptionpopup;      
Xprivate Widget listoptionform1;
Xprivate Widget listoptionform2;
Xprivate Widget listoptionform3;
Xprivate Widget listoptionlabel;
Xprivate Widget listoptionsettings;
Xprivate Widget listoptionpermsButton;
Xprivate Widget listoptionpermsLabel;
Xprivate Widget listoptionlinksButton;
Xprivate Widget listoptionlinksLabel;
Xprivate Widget listoptionownerButton;
Xprivate Widget listoptionownerLabel;
Xprivate Widget listoptiongroupButton;
Xprivate Widget listoptiongroupLabel;
Xprivate Widget listoptionsizeButton;
Xprivate Widget listoptionsizeLabel;
Xprivate Widget listoptionacctmButton;
Xprivate Widget listoptionacctmLabel;
Xprivate Widget listoptionmodtmButton;
Xprivate Widget listoptionmodtmLabel;
Xprivate Widget listoptionquitButton;
X
X#define ToggleButton(b, w)  \
X{ \
X  Arg arglist[1]; \
X  XtSetArg(arglist[0], XtNbitmap, \
X	   (current_mode.options & b) ? tick : emptytick); \
X  XtSetValues(w, arglist, 1); \
X}
X	     
X/*****************************************************************************
X *                          init_listoption_dialog                           *
X *****************************************************************************/
Xpublic void init_listoption(Widget top)
X{
X  /* Initialise the long listing option dialog */
X
X  private void destroy_listoption_dialog(Widget, caddr_t, caddr_t);
X  private void optionbutton_toggled(Widget, ListOption, caddr_t);
X  Arg arglist[7];
X  Cardinal i;
X  XFontStruct *font;
X  String settings;
X  int width;
X
X  static String Label = "Long Listing Options";
X
X  /* constuct settings label */
X  settings = (String) XtMalloc (sizeof(char) * 55);
X
X  sprintf(settings, "%s%s%s%s%s%s%sfilename", 
X	  listoptions[perms], 
X	  listoptions[nlinks],
X	  listoptions[owner],
X	  listoptions[group],
X	  listoptions[size],
X	  listoptions[modtm],
X	  listoptions[acctm]);
X
X  listoptionpopup = XtCreatePopupShell("listoptionpopup",
X				       transientShellWidgetClass,
X				       top,
X				       NULL, 0);
X  
X  listoptionform1 = XtCreateManagedWidget("listoptionform1",
X					  xedwFormWidgetClass,
X					  listoptionpopup,
X					  NULL, 0);
X
X  i = 0;
X  XtSetArg(arglist[i], XtNfullWidth,          True); i++;
X  XtSetArg(arglist[i], XtNjustify, XtJustifyCenter); i++;
X  XtSetArg(arglist[i], XtNlabel,             Label); i++;
X  XtSetArg(arglist[i], XtNborderWidth,           0); i++;
X  listoptionlabel = XtCreateManagedWidget("listoptionlabel",
X					  labelWidgetClass,
X					  listoptionform1,
X					  arglist, i);
X
X  i = 1;
X  XtSetArg(arglist[i], XtNfromVert, listoptionlabel); i++;
X  XtSetArg(arglist[i], XtNjustify,    XtJustifyLeft); i++;
X  listoptionsettings = XtCreateManagedWidget("listoptionsettings",
X					     labelWidgetClass,
X					     listoptionform1,
X					     arglist, i);
X
X  /* Get font from widget, then use XTextWidth to find width of string,
X   * then set the width of the label to this width + 20.
X   */
X
X  XtSetArg(arglist[0], XtNfont, &font);
X  XtGetValues(listoptionsettings, arglist, 1);
X
X  width = XTextWidth(font, settings, strlen(settings));
X
X  XtSetArg(arglist[0], XtNwidth, width + 20);
X  XtSetValues(listoptionlabel, arglist, 1);
X
X  XtFree(settings);
X
X  i = 0;
X  XtSetArg(arglist[i], XtNborderWidth,               0); i++;
X  XtSetArg(arglist[i], XtNfromVert, listoptionsettings); i++;
X  listoptionform2 = XtCreateManagedWidget("listoptionform2",
X					  xedwFormWidgetClass,
X					  listoptionform1,
X					  arglist, i);
X
X  i = 0;
X  XtSetArg(arglist[i], XtNborderWidth,               0); i++;
X  XtSetArg(arglist[i], XtNfromVert, listoptionsettings); i++;
X  XtSetArg(arglist[i], XtNfromHoriz,   listoptionform2); i++; 
X  listoptionform3 = XtCreateManagedWidget("listoptionform3",
X					  xedwFormWidgetClass,
X					  listoptionform1,
X					  arglist, i);
X
X  /* First bank of buttons */
X
X  /* Permissions */
X  i = 0;
X  listoptionpermsButton = XtCreateManagedWidget("listoptionpermsButton",
X						commandWidgetClass,
X						listoptionform2,
X						arglist, i);
X
X  i = 0;
X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
X  XtSetArg(arglist[i], XtNfromHoriz,  listoptionpermsButton); i++;
X  XtSetArg(arglist[i], XtNlabel,              "Permissions"); i++;
X  listoptionpermsLabel  = XtCreateManagedWidget("listoptionpermsLabel",
X						labelWidgetClass,
X						listoptionform2,
X						arglist, i);
X
X  XtAddCallback(listoptionpermsButton, XtNcallback, optionbutton_toggled, perms);
X
X  /* Nlinks */
X
X  i = 0;
X  XtSetArg(arglist[i], XtNfromVert,    listoptionpermsButton); i++;
X  listoptionlinksButton = XtCreateManagedWidget("listoptionlinksButton",
X						commandWidgetClass,
X						listoptionform2,
X						arglist, i);
X  
X  i = 1;
X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
X  XtSetArg(arglist[i], XtNfromHoriz, listoptionlinksButton); i++;
X  XtSetArg(arglist[i], XtNlabel,         "Number of links"); i++;
X  listoptionlinksLabel  = XtCreateManagedWidget("listoptionlinksLabel",
X						labelWidgetClass,
X						listoptionform2,
X						arglist, i);
X
X  XtAddCallback(listoptionlinksButton, XtNcallback, optionbutton_toggled, nlinks);
X
X  /* Owner */
X
X  i = 0;
X  XtSetArg(arglist[i], XtNfromVert, listoptionlinksButton); i++; 
X  listoptionownerButton = XtCreateManagedWidget("listoptionownerButton",
X						commandWidgetClass,
X						listoptionform2,
X						arglist, i);
X
X  i = 1;
X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
X  XtSetArg(arglist[i], XtNfromHoriz, listoptionownerButton); i++;
X  XtSetArg(arglist[i], XtNlabel,           "Owner of file"); i++;
X  listoptionownerLabel  = XtCreateManagedWidget("listoptionownerLabel",
X						labelWidgetClass,
X						listoptionform2,
X						arglist, i);
X
X  XtAddCallback(listoptionownerButton, XtNcallback, optionbutton_toggled, owner);
X
X  /* Second bank of buttons */
X
X  /* Group */
X
X  i = 0;
X  listoptiongroupButton = XtCreateManagedWidget("listoptiongroupButton",
X						commandWidgetClass,
X						listoptionform3,
X						arglist, i);
X
X  i = 0;
X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
X  XtSetArg(arglist[i], XtNfromHoriz, listoptiongroupButton); i++;
X  XtSetArg(arglist[i], XtNlabel,           "Group of file"); i++;
X  listoptiongroupLabel = XtCreateManagedWidget("listoptiongroupLabel",
X					       labelWidgetClass,
X					       listoptionform3,
X					       arglist, i);
X
X  XtAddCallback(listoptiongroupButton, XtNcallback, optionbutton_toggled, group);
X
X  /* Size */
X
X  i = 0;
X  XtSetArg(arglist[i], XtNfromVert, listoptiongroupButton); i++;
X  listoptionsizeButton = XtCreateManagedWidget("listoptionsizeButton",
X					       commandWidgetClass,
X					       listoptionform3,
X					       arglist, i);
X
X  i = 1;
X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
X  XtSetArg(arglist[i], XtNfromHoriz, listoptionsizeButton); i++;
X  XtSetArg(arglist[i], XtNlabel,           "Size of file"); i++;
X  listoptionsizeLabel = XtCreateManagedWidget("listoptionsizeLabel",
X					     labelWidgetClass,
X					     listoptionform3,
X					     arglist, i);
X
X  XtAddCallback(listoptionsizeButton, XtNcallback, optionbutton_toggled, size);
X
X  /* Modification Time */
X
X  i = 0;
X  XtSetArg(arglist[i], XtNfromVert, listoptionsizeButton); i++;
X  listoptionmodtmButton = XtCreateManagedWidget("listoptionmodtmButton",
X						commandWidgetClass,
X						listoptionform3,
X						arglist, i);
X
X  i = 1;
X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
X  XtSetArg(arglist[i], XtNfromHoriz, listoptionmodtmButton); i++;
X  XtSetArg(arglist[i], XtNlabel,       "Modification time"); i++;
X  listoptionmodtmLabel = XtCreateManagedWidget("listoptionmodtmLabel",
X					      labelWidgetClass,
X					      listoptionform3,
X					      arglist, i);
X
X  XtAddCallback(listoptionmodtmButton, XtNcallback, optionbutton_toggled, modtm);
X
X  /* Access Time */  
X
X
X  i = 0;
X  XtSetArg(arglist[i], XtNfromVert, listoptionmodtmButton); i++;
X  listoptionacctmButton = XtCreateManagedWidget("listoptionacctmButton",
X						commandWidgetClass,
X						listoptionform3,
X						arglist, i);
X
X  i = 1;
X  XtSetArg(arglist[i], XtNborderWidth,                   0); i++;
X  XtSetArg(arglist[i], XtNfromHoriz, listoptionacctmButton); i++;
X  XtSetArg(arglist[i], XtNlabel,             "Access time"); i++;
X  listoptionacctmLabel = XtCreateManagedWidget("listoptionacctmLabel",
X					       labelWidgetClass,
X					       listoptionform3,
X					       arglist, i);
X  
X  XtAddCallback(listoptionacctmButton, XtNcallback, optionbutton_toggled, acctm);
X
X  i = 0;
X  XtSetArg(arglist[i], XtNfromVert, listoptionform2); i++;
X  XtSetArg(arglist[i], XtNlabel,               "OK"); i++;
X  listoptionquitButton = XtCreateManagedWidget("listoptionquitButton",
X					       commandWidgetClass,
X					       listoptionform1,
X					       arglist, i);
X
X  XtAddCallback(listoptionquitButton, XtNcallback, destroy_listoption_dialog, 0);
X}
X
X/*****************************************************************************
X *                            listoption_dialog                              *
X *****************************************************************************/
Xpublic void listoption_dialog(void)
X{
X  /* popup the listoption dialog. */
X
X  private String makeoptionstring(void);
X  String settings;
X  Arg arglist[1];
X
X  /* set up initial button settings */
X  ToggleButton(PERMS,  listoptionpermsButton);
X  ToggleButton(NLINKS, listoptionlinksButton);
X  ToggleButton(OWNER,  listoptionownerButton);
X  ToggleButton(GROUP,  listoptiongroupButton);
X  ToggleButton(SIZE,   listoptionsizeButton);
X  ToggleButton(MODTM,  listoptionmodtmButton);
X  ToggleButton(ACCTM,  listoptionacctmButton);
X
X  settings = makeoptionstring();
X
X  XtSetArg(arglist[0], XtNlabel, settings);
X  XtSetValues(listoptionsettings, arglist, 1);
X  
X  XtFree(settings);
X
X  realize_dialog(listoptionpopup); /* Put the dialog on screen */
X}
X
X/*****************************************************************************
X *                            destroy_listoption_dialog                      *
X *****************************************************************************/
Xprivate void destroy_listoption_dialog(Widget w, caddr_t client_data,
X				       caddr_t call_data)
X{
X  /* Popdown the listoption dialog, if we are in long listing mode then 
X   * refresh the directory so we can see the changes.
X   */
X
X  extern directoryManagerNewDirectory(String);
X  extern String cwd;
X
X  XtPopdown(listoptionpopup);
X  if (current_mode.mode == Long)
X    directoryManagerNewDirectory(cwd);
X}
X
X/*****************************************************************************
X *                         optionbutton_toggled                              *
X *****************************************************************************/
Xprivate void optionbutton_toggled(Widget w, ListOption button, caddr_t call_data)
X{
X  /* One the option buttons has been pressed, the button id is contained within
X   * 'button'. Toggle the current mode options with that option.
X   */
X
X  private String makeoptionstring(void);
X  Arg arglist[1];
X  String settings;
X
X  switch (button) {
X  case perms:
X    if (current_mode.options & PERMS) {
X      current_mode.options &= ~PERMS;
X    } else {
X      current_mode.options |= PERMS;
X    }
X    ToggleButton(PERMS, listoptionpermsButton);
X    break;
X  case nlinks:
X    if (current_mode.options & NLINKS) {
X      current_mode.options &= ~NLINKS;
X    } else {
X      current_mode.options |= NLINKS;
X    }
X    ToggleButton(NLINKS, listoptionlinksButton);
X    break;
X  case owner:
X    if (current_mode.options & OWNER) {
X      current_mode.options &= ~OWNER;
X    } else {
X      current_mode.options |= OWNER;
X    }
X    ToggleButton(OWNER, listoptionownerButton);
X    break;
X  case group:
X    if (current_mode.options & GROUP) {
X      current_mode.options &= ~GROUP;
X    } else {
X      current_mode.options |= GROUP;
X    }
X    ToggleButton(GROUP, listoptiongroupButton);
X    break;
X  case size:
X    if (current_mode.options & SIZE) {
X      current_mode.options &= ~SIZE;
X    } else {
X      current_mode.options |= SIZE;
X    }
X    ToggleButton(SIZE, listoptionsizeButton);
X    break;
X  case modtm:
X    if (current_mode.options & MODTM) {
X      current_mode.options &= ~MODTM;
X    } else {
X      current_mode.options |= MODTM;
X    }
X    ToggleButton(MODTM, listoptionmodtmButton);
X    break;
X  case acctm:
X    if (current_mode.options & ACCTM) {
X      current_mode.options &= ~ACCTM;
X    } else {
X      current_mode.options |= ACCTM;
X    }
X    ToggleButton(ACCTM, listoptionacctmButton);
X    break;
X  default:
X    fprintf(stderr, "Error: Listoptions programmer error, option out"
X	    " of range\n");
X    break;
X  }
X
X  /* Put current options in settings string */
X
X  settings = makeoptionstring();
X
X  /* Put new settings string in the settings label */
X
X  XtSetArg(arglist[0], XtNlabel, settings);
X  XtSetValues(listoptionsettings, arglist, 1);
X
X  XtFree(settings);
X}
X
X/*****************************************************************************
X *                                                                           *
X *****************************************************************************/
Xprivate String makeoptionstring(void)
X{
X  /* construct a string representing the current options,
X   * the user is responsible for free'ing it.
X   */
X  String permstring, nlinkstring, ownerstring, groupstring, sizestring;
X  String modtmstring, acctmstring, settings;
X
X  static String empty = "";
X 
X  settings = (String) XtMalloc (sizeof(char) * 55);
X
X  if (current_mode.options & PERMS)
X    permstring = listoptions[perms];
X  else
X    permstring = empty;
X  if (current_mode.options & NLINKS)
X    nlinkstring = listoptions[nlinks];
X  else
X    nlinkstring = empty;
X  if (current_mode.options & OWNER)
X    ownerstring = listoptions[owner];
X  else
X    ownerstring = empty;
X  if (current_mode.options & GROUP)
X    groupstring = listoptions[group];
X  else
X    groupstring = empty;
X  if (current_mode.options & SIZE)
X    sizestring = listoptions[size];
X  else
X    sizestring = empty;
X  if (current_mode.options & MODTM)
X    modtmstring = listoptions[modtm];
X  else
X    modtmstring = empty;
X  if (current_mode.options & ACCTM)
X    acctmstring = listoptions[acctm];
X  else
X    acctmstring = empty;
X
X  /* Make display string for label of current settings*/
X
X  sprintf(settings, "%s%s%s%s%s%s%sfilename", 
X	  permstring, 
X	  nlinkstring,
X	  ownerstring,
X	  groupstring,
X	  sizestring,
X	  modtmstring,
X	  acctmstring);
X
X  return(settings);
X}
SHAR_EOF
chmod 0644 xdtm/listoption.c ||
echo 'restore of xdtm/listoption.c failed'
Wc_c="`wc -c < 'xdtm/listoption.c'`"
test 15389 -eq "$Wc_c" ||
	echo 'xdtm/listoption.c: original size 15389, current size' "$Wc_c"
fi
true || echo 'restore of xdtm/main.c failed'
echo End of part 8, continue with part 9
exit 0

--
Dan Heller
O'Reilly && Associates       Z-Code Software    Comp-sources-x:
Senior Writer                President          comp-sources-x at uunet.uu.net
argv at ora.com                 argv at zipcode.com



More information about the Comp.sources.x mailing list