v08i086: chaos, Part10/10
Ken Marks x2425
balr!panasun!ken at uunet.UU.NET
Tue Aug 21 04:04:16 AEST 1990
Submitted-by: balr!panasun!ken at uunet.UU.NET (Ken Marks (x2425))
Posting-number: Volume 8, Issue 86
Archive-name: chaos/part10
#! /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 10 (of 10)."
# Contents: COPYRIGHT Imakefile common/Imakefile common/byteSwap.c
# common/error.c common/makefile drone/Imakefile drone/drone.man
# drone/makefile fonts/Imakefile fonts/makefile gencmap/makefile
# headers/Canvas.h headers/Chaos.h headers/Colormap.h
# headers/Compound.h headers/CompoundP.h headers/DlgShell.h
# headers/DlgShellP.h headers/Label.h headers/LabelP.h
# headers/List.h headers/Menu.h headers/MenuItems.h headers/MenuP.h
# headers/Palette.h headers/PaletteP.h headers/Push.h
# headers/PushP.h headers/Queue.h headers/Slider.h headers/Task.h
# headers/Text.h headers/TextP.h makefile master/Imakefile
# master/makefile widgets/Imakefile widgets/makefile
# Wrapped by ken at panasun on Mon Jul 30 14:59:51 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'COPYRIGHT' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'COPYRIGHT'\"
else
echo shar: Extracting \"'COPYRIGHT'\" \(1222 characters\)
sed "s/^X//" >'COPYRIGHT' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X *
X * Permission to use, copy, modify, distribute, and sell this software and its
X * documentation for any purpose is hereby granted without fee, provided that
X * the above copyright notice appear in all copies and that both that
X * copyright notice and this permission notice appear in supporting
X * documentation, and that the name of the copyright holder not be used in
X * advertising or publicity pertaining to distribution of the software without
X * specific, written prior permission. The copyright holder makes no
X * representations about the suitability of this software for any purpose. It
X * is provided "as is" without express or implied warranty.
X *
X * THE COPYRIGHT HOLDER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
X * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
X * EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR
X * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
X * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
X * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
X * PERFORMANCE OF THIS SOFTWARE.
X *
X * Author: Ken W. Marks
X */
END_OF_FILE
if test 1222 -ne `wc -c <'COPYRIGHT'`; then
echo shar: \"'COPYRIGHT'\" unpacked with wrong size!
fi
# end of 'COPYRIGHT'
fi
if test -f 'Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Imakefile'\"
else
echo shar: Extracting \"'Imakefile'\" \(701 characters\)
sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
X#define IHaveSubdirs
X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
X
X WORLDOPTS = -k
X
XSUBDIRS = \
X common \
X widgets \
X master \
X drone \
X gencmap \
X fonts
X
XMakeSubdirs($(SUBDIRS))
XDependSubdirs($(SUBDIRS))
X
XWorld::
X @echo ""
X @echo "Building all of Chaos"
X @echo ""
X @date
X @echo ""
X $(MAKE) Makefiles
X $(MAKE) clean
X $(MAKE) includes
X $(MAKE) depend
X $(MAKE) $(WORLDOPTS)
X @echo ""
X @date
X @echo ""
X @echo "Full build of Chaos complete."
X @echo ""
X
XEverything::
X @echo ""
X @echo "Rebuilding all of Chaos"
X @echo ""
X @date
X @echo ""
X $(MAKE) Makefiles
X $(MAKE) includes
X $(MAKE) depend
X $(MAKE) $(WORLDOPTS)
X @echo ""
X @date
X @echo ""
X @echo "Rebuild of Chaos complete."
X @echo ""
X
END_OF_FILE
if test 701 -ne `wc -c <'Imakefile'`; then
echo shar: \"'Imakefile'\" unpacked with wrong size!
fi
# end of 'Imakefile'
fi
if test -f 'common/Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/Imakefile'\"
else
echo shar: Extracting \"'common/Imakefile'\" \(397 characters\)
sed "s/^X//" >'common/Imakefile' <<'END_OF_FILE'
X INCLUDES = -I../headers
X BASENAME = common
X
XSRCS = \
X byteSwap.c \
X colormap.c \
X error.c \
X file.c \
X imageIO.c \
X ipc.c \
X showEvent.c
X
XOBJS = \
X byteSwap.o \
X colormap.o \
X error.o \
X file.o \
X imageIO.o \
X ipc.o \
X showEvent.o
X
XNormalLibraryObjectRule()
X
XNormalLibraryTarget($(BASENAME),$(OBJS))
X
XLintLibraryTarget($(BASENAME),$(SRCS))
X
XDependTarget()
X
XNormalLintTarget($(SRCS))
X
END_OF_FILE
if test 397 -ne `wc -c <'common/Imakefile'`; then
echo shar: \"'common/Imakefile'\" unpacked with wrong size!
fi
# end of 'common/Imakefile'
fi
if test -f 'common/byteSwap.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/byteSwap.c'\"
else
echo shar: Extracting \"'common/byteSwap.c'\" \(819 characters\)
sed "s/^X//" >'common/byteSwap.c' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#include <stdio.h>
X
X/* NOTE: These functions give Saber-C a fit since they disregard the underlying
X * data structure during the swaps. It is better to type 'swap ByteSwapLong'
X * in Saber to swap the source with the object for this file. */
X
Xvoid ByteSwapShort(start, bytes)
Xchar *start;
Xint bytes;
X{
X short *ptr = (short *) start;
X short *end = (short *) (start + bytes);
X
X while (ptr < end)
X {
X *ptr = ((*ptr & 0xff) << 8) | ((*ptr >> 8) & 0xff);
X ++ptr;
X }
X}
X
X
Xvoid ByteSwapLong(start, bytes)
Xchar *start;
Xint bytes;
X{
X long *ptr = (long *) start;
X long *end = (long *) (start + bytes);
X
X while (ptr < end)
X {
X *ptr = ((*ptr & 0xff) << 24) | ((*ptr & 0xff00) << 8) |
X ((*ptr & 0xff0000) >> 8) | ((*ptr >> 24) & 0xff);
X
X ++ptr;
X }
X}
END_OF_FILE
if test 819 -ne `wc -c <'common/byteSwap.c'`; then
echo shar: \"'common/byteSwap.c'\" unpacked with wrong size!
fi
# end of 'common/byteSwap.c'
fi
if test -f 'common/error.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/error.c'\"
else
echo shar: Extracting \"'common/error.c'\" \(1346 characters\)
sed "s/^X//" >'common/error.c' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#include <stdio.h>
X#include <X11/Intrinsic.h>
X
Xextern int abort();
Xextern char *sprintf();
X
Xstatic int (*action) () = abort;
X
Xint error_status = Success;
Xint allow_errors = False;
X
X
Xvoid SetErrorActionFunc(function)
Xint (*function) ();
X{
X action = function;
X}
X
X
Xint SubstituteErrorHandler(dpy, error)
XDisplay *dpy;
XXErrorEvent *error;
X{
X char buffer[BUFSIZ];
X char number[32];
X
X error_status = error->error_code;
X
X if (allow_errors == True)
X return (0); /* Don't bother acting on this error */
X
X XGetErrorText(dpy, error->error_code, buffer, BUFSIZ);
X
X (void) fprintf(stderr, "X Error <%s>\n", buffer);
X (void) fprintf(stderr, " Request Major code: %d", error->request_code);
X
X (void) sprintf(number, "%d", error->request_code);
X XGetErrorDatabaseText(dpy, "XRequest", number, "", buffer, BUFSIZ);
X (void) fprintf(stderr, " (%s)\n", buffer);
X
X (void) fprintf(stderr, " Request Minor code: %d\n", error->minor_code);
X (void) fprintf(stderr, " ResourceId: 0x%lx\n", error->resourceid);
X (void) fprintf(stderr, " Error Serial number: %lu\n", error->serial);
X (void) fprintf(stderr, " Current Serial number: %lu\n", dpy->request);
X (void) fflush(stderr);
X
X /* Take some action as a result of this error */
X (*action) ();
X
X return (0);
X}
END_OF_FILE
if test 1346 -ne `wc -c <'common/error.c'`; then
echo shar: \"'common/error.c'\" unpacked with wrong size!
fi
# end of 'common/error.c'
fi
if test -f 'common/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'common/makefile'\"
else
echo shar: Extracting \"'common/makefile'\" \(588 characters\)
sed "s/^X//" >'common/makefile' <<'END_OF_FILE'
XCURRENT_DIR = ./common
XAR = ar cq
XCC = cc
XRANLIB = ranlib
XRM = rm -f
XCFLAGS = -I../headers -I/usr/local/include
XBASENAME = common
X
XSRCS = \
X byteSwap.c \
X colormap.c \
X error.c \
X file.c \
X imageIO.c \
X ipc.c \
X showEvent.c
X
XOBJS = \
X byteSwap.o \
X colormap.o \
X error.o \
X file.o \
X imageIO.o \
X ipc.o \
X showEvent.o
X
X.c.o:
X $(RM) $@
X $(CC) -c $(CFLAGS) $*.c
X
Xall:: lib$(BASENAME).a
X
Xlib$(BASENAME).a: $(OBJS)
X $(RM) $@
X $(AR) $@ $(OBJS)
X $(RANLIB) $@
X
Xclean::
X $(RM) *.o *.a
X
Xinstall::
X @echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X @echo "install.man in $(CURRENT_DIR) done"
X
END_OF_FILE
if test 588 -ne `wc -c <'common/makefile'`; then
echo shar: \"'common/makefile'\" unpacked with wrong size!
fi
# end of 'common/makefile'
fi
if test -f 'drone/Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'drone/Imakefile'\"
else
echo shar: Extracting \"'drone/Imakefile'\" \(470 characters\)
sed "s/^X//" >'drone/Imakefile' <<'END_OF_FILE'
X INCLUDES = -I../headers
X COMMONLIB = ../common/libcommon.a
X DEPLIBS = $(COMMONLIB) $(DEPXLIB)
X SYS_LIBRARIES = -lm
X
X
X#ifdef UltrixArchitecture
XLOCAL_LIBRARIES = $(DEPLIBS)
X#else
XLOCAL_LIBRARIES = $(COMMONLIB) $(XLIB)
X#endif
X
X
XSRCS = \
X drone.c \
X init.c \
X mandelbrot.c \
X propNotify.c
X
XOBJS = \
X drone.o \
X init.o \
X mandelbrot.o \
X propNotify.o
X
XComplexProgramTarget(drone)
X
Xsaber_src:
X #cd ../common
X #make saber
X #cd ../drone
X #make saber_drone
X
END_OF_FILE
if test 470 -ne `wc -c <'drone/Imakefile'`; then
echo shar: \"'drone/Imakefile'\" unpacked with wrong size!
fi
# end of 'drone/Imakefile'
fi
if test -f 'drone/drone.man' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'drone/drone.man'\"
else
echo shar: Extracting \"'drone/drone.man'\" \(607 characters\)
sed "s/^X//" >'drone/drone.man' <<'END_OF_FILE'
X.TH DRONE 6 "7 June 1990" "X Version 11"
X.SH NAME
Xdrone \- Drone daemon for
X.I chaos
Xapplication.
X.SH SYNOPSIS
X.B drone
X[ -display \fIdisplay\fR ]
X.SH DESCRIPTION
X.I Drone
Xis the process which performs the calculations for the
X.I chaos
Xapplication. Since this process runs as a daemon, it detaches from the
Xcontrolling tty and closes
X.I stdout
Xand
X.I stderr.
XBecause of this no error messages are generated by this program.
X.SH OPTIONS
X.TP
X.BI -display \ display
XThis argument allows the user to specify the server to connect to;
Xsee \fIX(1)\fP.
X.SH SEE ALSO
Xchaos(6), gencmap(6)
X.SH AUTHOR
XKen W. Marks
END_OF_FILE
if test 607 -ne `wc -c <'drone/drone.man'`; then
echo shar: \"'drone/drone.man'\" unpacked with wrong size!
fi
# end of 'drone/drone.man'
fi
if test -f 'drone/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'drone/makefile'\"
else
echo shar: Extracting \"'drone/makefile'\" \(933 characters\)
sed "s/^X//" >'drone/makefile' <<'END_OF_FILE'
XCURRENT_DIR = ./drone
XRM = rm -f
XCFLAGS = -I../headers -I/usr/local/include
XINSTALL = install
XINSTPGMFLAGS =
XINSTMANFLAGS = -m 0444
XINCLUDES = -I../headers
XLDOPTIONS = -L/usr/local/lib
XCOMMONLIB = ../common/libcommon.a
XWIDGETLIB = ../widgets/libwidgets.a
XDEPLIBS = $(WIDGETLIB) $(COMMONLIB)
XLDLIBS = $(DEPLIBS) -lXext -lX11 -lm
XBINDIR = /usr/local/bin/X11
XMANDIR = /usr/local/man/mann
X
XSRCS = \
X drone.c \
X init.c \
X mandelbrot.c \
X propNotify.c
X
XOBJS = \
X drone.o \
X init.o \
X mandelbrot.o \
X propNotify.o
X
X.c.o:
X $(RM) $@
X $(CC) -c $(CFLAGS) $*.c
X
Xall:: drone
X
Xdrone: $(OBJS) $(DEPLIBS)
X $(RM) $@
X $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LDLIBS)
X
Xinstall:: drone
X $(INSTALL) -c $(INSTPGMFLAGS) drone $(BINDIR)
X
Xinstall.man:: drone.man
X $(INSTALL) -c $(INSTMANFLAGS) drone.man $(MANDIR)/drone.n
X
Xclean::
X $(RM) *.o *.a drone
X
Xinstall::
X @echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X @echo "install.man in $(CURRENT_DIR) done"
END_OF_FILE
if test 933 -ne `wc -c <'drone/makefile'`; then
echo shar: \"'drone/makefile'\" unpacked with wrong size!
fi
# end of 'drone/makefile'
fi
if test -f 'fonts/Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'fonts/Imakefile'\"
else
echo shar: Extracting \"'fonts/Imakefile'\" \(444 characters\)
sed "s/^X//" >'fonts/Imakefile' <<'END_OF_FILE'
XSRCS = \
X chaos-bold.bdf \
X chaos-norm.bdf \
X push-norm.bdf \
X push-rev.bdf
X
XOBJS = \
X chaos-bold.snf \
X chaos-norm.snf \
X push-norm.snf \
X push-rev.snf
X
XFONTINSTDIR = $(FONTDIR)/misc
X
XMakeFonts()
X
XFontTarget(chaos-bold)
XFontTarget(chaos-norm)
XFontTarget(push-norm)
XFontTarget(push-rev)
X
Xinstall::
X @for i in $(OBJS); do\
X (set -x; $(INSTALL) -c $(INSTDATFLAGS) $$i $(FONTINSTDIR));\
X done
X cd $(FONTINSTDIR); $(BINDIR)/mkfontdir .
X
Xdepend::
END_OF_FILE
if test 444 -ne `wc -c <'fonts/Imakefile'`; then
echo shar: \"'fonts/Imakefile'\" unpacked with wrong size!
fi
# end of 'fonts/Imakefile'
fi
if test -f 'fonts/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'fonts/makefile'\"
else
echo shar: Extracting \"'fonts/makefile'\" \(973 characters\)
sed "s/^X//" >'fonts/makefile' <<'END_OF_FILE'
XCURRENT_DIR = ./fonts
XFONTDIR = /usr/local/lib/fonts
XBINDIR = /usr/local/bin/X11
XFONTC = bdftosnf
XFONTCFLAGS = -t
XMKFONTDIR = mkfontdir
XRM = rm -f
XINSTALL = install
XINSTDATFLAGS = -m 0444
X
XSRCS = \
X chaos-bold.bdf \
X chaos-norm.bdf \
X push-norm.bdf \
X push-rev.bdf
X
XOBJS = \
X chaos-bold.snf \
X chaos-norm.snf \
X push-norm.snf \
X push-rev.snf
X
XFONTINSTDIR = $(FONTDIR)/misc
X
Xall:: $(OBJS) fonts.dir
X
Xfonts.dir: $(OBJS)
X $(MKFONTDIR) .
X
Xclean::
X $(RM) *.snf fonts.dir
X
Xchaos-bold.snf: chaos-bold.bdf
X $(FONTC) $(FONTCFLAGS) $? >$@
X
Xchaos-norm.snf: chaos-norm.bdf
X $(FONTC) $(FONTCFLAGS) $? >$@
X
Xpush-norm.snf: push-norm.bdf
X $(FONTC) $(FONTCFLAGS) $? >$@
X
Xpush-rev.snf: push-rev.bdf
X $(FONTC) $(FONTCFLAGS) $? >$@
X
Xinstall::
X @for i in $(OBJS); do\
X (set -x; $(INSTALL) -c $(INSTDATFLAGS) $$i $(FONTINSTDIR));\
X done
X cd $(FONTINSTDIR); $(BINDIR)/$(MKFONTDIR) .
X
Xinstall::
X @echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X @echo "install.man in $(CURRENT_DIR) done"
X
X
END_OF_FILE
if test 973 -ne `wc -c <'fonts/makefile'`; then
echo shar: \"'fonts/makefile'\" unpacked with wrong size!
fi
# end of 'fonts/makefile'
fi
if test -f 'gencmap/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'gencmap/makefile'\"
else
echo shar: Extracting \"'gencmap/makefile'\" \(821 characters\)
sed "s/^X//" >'gencmap/makefile' <<'END_OF_FILE'
XCURRENT_DIR = ./gencmap
XRM = rm -f
XCFLAGS = -I../headers -I/usr/local/include
XINSTALL = install
XINSTPGMFLAGS =
XINSTMANFLAGS = -m 0444
XINCLUDES = -I../headers
XLDOPTIONS = -L/usr/local/lib
XCOMMONLIB = ../common/libcommon.a
XDEPLIBS = $(COMMONLIB)
XLDLIBS = $(DEPLIBS) -lXext -lX11 -lm
XBINDIR = /usr/local/bin/X11
XMANDIR = /usr/local/man/mann
X
XSRCS = \
X gencmap.c
X
XOBJS = \
X gencmap.o
X
X.c.o:
X $(RM) $@
X $(CC) -c $(CFLAGS) $*.c
X
Xall:: gencmap
X
Xgencmap: $(OBJS) $(DEPLIBS)
X $(RM) $@
X $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LDLIBS)
X
Xinstall:: gencmap
X $(INSTALL) -c $(INSTPGMFLAGS) gencmap $(BINDIR)
X
Xinstall.man:: gencmap.man
X $(INSTALL) -c $(INSTMANFLAGS) gencmap.man $(MANDIR)/gencmap.n
X
Xclean::
X $(RM) *.o *.a gencmap
X
Xinstall::
X @echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X @echo "install.man in $(CURRENT_DIR) done"
END_OF_FILE
if test 821 -ne `wc -c <'gencmap/makefile'`; then
echo shar: \"'gencmap/makefile'\" unpacked with wrong size!
fi
# end of 'gencmap/makefile'
fi
if test -f 'headers/Canvas.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Canvas.h'\"
else
echo shar: Extracting \"'headers/Canvas.h'\" \(997 characters\)
sed "s/^X//" >'headers/Canvas.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Canvas_h
X#define _Canvas_h
X
X/* Class record constants */
X
Xextern WidgetClass canvasWidgetClass;
X
Xtypedef struct _CanvasRec *CanvasWidget;
Xtypedef struct _CanvasClassRec *CanvasWidgetClass;
X
X
X/* Structures & enumerations */
X
Xtypedef struct _CanvasSaveStateStruct
X{
X long width;
X long height;
X long task_x;
X long task_y;
X long limit;
X long finished;
X long curr_task_width;
X long curr_task_height;
X char p_lo[32];
X char p_hi[32];
X char q_lo[32];
X char q_hi[32];
X char p_inc[32];
X char q_inc[32];
X} CanvasSaveStateStruct;
X
X
X/* Public functions */
X
Xvoid CanvasClear();
Xvoid CanvasZoom();
Xvoid CanvasChangeSize();
Xvoid CanvasFillTask();
Xvoid CanvasChangeTaskSize();
Xvoid CanvasChangeRetainAspect();
Xvoid CanvasUnpause();
Xvoid CanvasTouchCanvas();
XBoolean CanvasNeedsSaving();
XBoolean CanvasSaveState();
XBoolean CanvasLoadState();
XBoolean CanvasSaveImage();
XBoolean CanvasLoadImage();
X
X#endif _Canvas_h
END_OF_FILE
if test 997 -ne `wc -c <'headers/Canvas.h'`; then
echo shar: \"'headers/Canvas.h'\" unpacked with wrong size!
fi
# end of 'headers/Canvas.h'
fi
if test -f 'headers/Chaos.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Chaos.h'\"
else
echo shar: Extracting \"'headers/Chaos.h'\" \(1191 characters\)
sed "s/^X//" >'headers/Chaos.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Chaos_h
X#define _Chaos_h
X
X/* Define for strcmp() */
X#define SAME 0
X
X/* These are the computation methods available */
X#define MANDELBROT 1
X#define JULIA 2
X
X/* This should be a pixel known to be black */
X#define BLACK 1
X
X/* This should be a pixel known to be white */
X#define WHITE 0
X
X/* Common extern functions */
Xextern char *memset();
Xextern char *memcpy();
Xextern char *malloc();
Xextern char *realloc();
Xextern char *strcpy();
Xextern char *strcat();
Xextern char *strncpy();
Xextern char *sprintf();
X
X#define STRLEN(s) ((s) ? strlen(s) : 0)
X#define STRCOPY(s) (strcpy(malloc((unsigned) STRLEN(s)+1), (s)))
X#define COPY(ptr, size) (memcpy(malloc((unsigned) (size)), \
X (char *) (ptr), (int) (size)))
X
X#define MAX(a, b) (((a) > (b)) ? (a) : (b))
X#define MIN(a, b) (((a) < (b)) ? (a) : (b))
X
X/* Macros to make error and debug statements more helpful */
X#define eprintf (void) printf("ERROR> %s (line %d): ", __FILE__, __LINE__),\
X (void) printf
X#define dprintf (void) printf("DEBUG> %s (line %d): ", __FILE__, __LINE__),\
X (void) printf
X
X#endif _Chaos_h
END_OF_FILE
if test 1191 -ne `wc -c <'headers/Chaos.h'`; then
echo shar: \"'headers/Chaos.h'\" unpacked with wrong size!
fi
# end of 'headers/Chaos.h'
fi
if test -f 'headers/Colormap.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Colormap.h'\"
else
echo shar: Extracting \"'headers/Colormap.h'\" \(865 characters\)
sed "s/^X//" >'headers/Colormap.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Colormap_h
X#define _Colormap_h
X
X/* Colormap has at most this many colors */
X#define NUM_COLORS 256
X
X/* Maximum intensity for a pixel */
X#define MAX_INTENSITY 255
X
X/* Number of colors to reserve at the start of the colormap */
X#define NUM_RESERVED 6
X
X/* Structures & Enumerations */
X
Xtypedef enum
X{
X forward,
X backward
X} Rotation;
X
X
X/* Public functions */
X
Xvoid GetReservedColors();
XColormap CreateColormap();
Xvoid StoreColormap();
Xvoid RotateColormap();
Xint GetColormapAlignment();
Xvoid AlignColormap();
Xvoid GetColorRGB();
Xvoid SetColorRGB();
XXColor *GetColors();
Xvoid PutColors();
Xvoid HSB2RGB();
Xvoid RGB2HSB();
Xvoid StoreHSB();
Xvoid StoreGray();
Xvoid StoreRandom();
Xvoid StoreTriColor();
Xvoid StoreOctoColor();
Xvoid StoreColors();
XBoolean ReadColors();
XBoolean WriteColors();
X
X#endif _Colormap_h
END_OF_FILE
if test 865 -ne `wc -c <'headers/Colormap.h'`; then
echo shar: \"'headers/Colormap.h'\" unpacked with wrong size!
fi
# end of 'headers/Colormap.h'
fi
if test -f 'headers/Compound.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Compound.h'\"
else
echo shar: Extracting \"'headers/Compound.h'\" \(791 characters\)
sed "s/^X//" >'headers/Compound.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Compound_h
X#define _Compound_h
X
X#ifndef NO_ITEM
X#define NO_ITEM -1 /* no item currently selected */
X#endif
X
X/* Class record constants */
X
Xextern WidgetClass compoundWidgetClass;
X
Xtypedef struct _CompoundClassRec *CompoundWidgetClass;
Xtypedef struct _CompoundRec *CompoundWidget;
X
X
X/* Structures & enumerations */
X
Xtypedef enum
X{
X UndefinedButton,
X ToggleButton,
X RadioButton
X} ButtonType;
X
Xtypedef struct _ToggleItem
X{
X String label;
X Boolean state;
X} ToggleItem;
X
Xtypedef struct _RadioItem
X{
X String label;
X} RadioItem;
X
X
X/* Public functions */
X
XBoolean CompoundChangeLabel();
XBoolean ToggleChangeState();
XBoolean ToggleGetState();
XBoolean RadioChangeSelected();
XCardinal RadioGetSelected();
X
X#endif _Compound_h
END_OF_FILE
if test 791 -ne `wc -c <'headers/Compound.h'`; then
echo shar: \"'headers/Compound.h'\" unpacked with wrong size!
fi
# end of 'headers/Compound.h'
fi
if test -f 'headers/CompoundP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/CompoundP.h'\"
else
echo shar: Extracting \"'headers/CompoundP.h'\" \(1249 characters\)
sed "s/^X//" >'headers/CompoundP.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _CompoundP_h
X#define _CompoundP_h
X
X#include <X11/Xaw/SimpleP.h>
X#include <Compound.h>
X
X/* New fields for the Compound Button widget instance record */
X
Xtypedef struct
X{
X /* resources */
X Pixel foreground;
X XFontStruct *font;
X ToggleItem *toggle_items;
X RadioItem *radio_items;
X XtCallbackList callbacks;
X ButtonType button_type;
X int selected_item;
X Widget dialogbox;
X
X /* private state */
X GC normal_gc;
X Dimension h_pad;
X Dimension v_pad;
X Dimension item_width;
X Dimension item_height;
X Position hot_min;
X Position hot_max;
X Cardinal num_items;
X int active_item;
X} CompoundPart;
X
X
X/* Full instance record declaration */
X
Xtypedef struct _CompoundRec
X{
X CorePart core;
X SimplePart simple;
X CompoundPart compound;
X} CompoundRec;
X
X
X/* New fields for the Compound Button widget class record */
X
Xtypedef struct
X{
X int foo;
X} CompoundClassPart;
X
X
X/* Full class record declaration */
X
Xtypedef struct _CompoundClassRec
X{
X CoreClassPart core_class;
X SimpleClassPart simple_class;
X CompoundClassPart compound_class;
X} CompoundClassRec;
X
X
X/* Class pointer */
X
Xextern CompoundClassRec compoundClassRec;
X
X#endif _CompoundP_h
END_OF_FILE
if test 1249 -ne `wc -c <'headers/CompoundP.h'`; then
echo shar: \"'headers/CompoundP.h'\" unpacked with wrong size!
fi
# end of 'headers/CompoundP.h'
fi
if test -f 'headers/DlgShell.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/DlgShell.h'\"
else
echo shar: Extracting \"'headers/DlgShell.h'\" \(582 characters\)
sed "s/^X//" >'headers/DlgShell.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _DlgShell_h
X#define _DlgShell_h
X
X/* Class record constants */
X
Xextern WidgetClass dialogShellWidgetClass;
X
Xtypedef struct _DialogShellClassRec *DialogShellWidgetClass;
Xtypedef struct _DialogShellRec *DialogShellWidget;
X
X
X/* Public functions */
X
Xextern void DialogPopup();
Xextern void DialogPopdown();
Xextern void DialogSetFocusOrder();
Xextern void DialogSetFirstFocus();
Xextern void DialogSetNewFocus();
Xextern void DialogSetPrevFocus();
Xextern void DialogSetNextFocus();
Xextern void DialogChangeGrab();
X
X#endif _DlgShell_h
END_OF_FILE
if test 582 -ne `wc -c <'headers/DlgShell.h'`; then
echo shar: \"'headers/DlgShell.h'\" unpacked with wrong size!
fi
# end of 'headers/DlgShell.h'
fi
if test -f 'headers/DlgShellP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/DlgShellP.h'\"
else
echo shar: Extracting \"'headers/DlgShellP.h'\" \(1123 characters\)
sed "s/^X//" >'headers/DlgShellP.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _DlgShellP_h
X#define _DlgShellP_h
X
X#include <DlgShell.h>
X
X/* New fields for the Dialog Shell widget instance record */
X
Xtypedef struct
X{
X /* resources */
X Pixmap unfocused_border;
X Cursor cursor;
X
X /* private */
X Widget *controls;
X Cardinal num_controls;
X int current_focus;
X} DialogShellPart;
X
X
X/* Full instance record declaration */
X
Xtypedef struct _DialogShellRec
X{
X CorePart core;
X CompositePart composite;
X ShellPart shell;
X OverrideShellPart override;
X DialogShellPart dialogshell;
X} DialogShellRec;
X
X
X/* New fields for the Dialog Shell widget class record */
X
Xtypedef struct _DialogShellClass
X{
X int empty;
X} DialogShellClassPart;
X
X
X/* Full class record declaration */
X
Xtypedef struct _DialogShellClassRec
X{
X CoreClassPart core_class;
X CompositeClassPart composite_class;
X ShellClassPart shell_class;
X OverrideShellClassPart override_shell_class;
X DialogShellClassPart dialog_shell_class;
X} DialogShellClassRec;
X
X
X/* Class pointer */
X
Xextern DialogShellClassRec dialogShellClassRec;
X
X#endif _DlgShellP_h
END_OF_FILE
if test 1123 -ne `wc -c <'headers/DlgShellP.h'`; then
echo shar: \"'headers/DlgShellP.h'\" unpacked with wrong size!
fi
# end of 'headers/DlgShellP.h'
fi
if test -f 'headers/Label.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Label.h'\"
else
echo shar: Extracting \"'headers/Label.h'\" \(316 characters\)
sed "s/^X//" >'headers/Label.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Label_h
X#define _Label_h
X
X/* Class record constants */
X
Xextern WidgetClass labelWidgetClass;
X
Xtypedef struct _LabelClassRec *LabelWidgetClass;
Xtypedef struct _LabelRec *LabelWidget;
X
X
X/* Public functions */
X
Xextern void LabelChangeLabel();
X
X#endif _Label_h
END_OF_FILE
if test 316 -ne `wc -c <'headers/Label.h'`; then
echo shar: \"'headers/Label.h'\" unpacked with wrong size!
fi
# end of 'headers/Label.h'
fi
if test -f 'headers/LabelP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/LabelP.h'\"
else
echo shar: Extracting \"'headers/LabelP.h'\" \(1180 characters\)
sed "s/^X//" >'headers/LabelP.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _LabelP_h
X#define _LabelP_h
X
X#include <X11/Xaw/SimpleP.h>
X#include <Label.h>
X
X/* New fields for the Label widget record */
X
Xtypedef struct
X{
X /* resources */
X Pixel foreground;
X XFontStruct *font;
X char *label;
X Dimension internal_width;
X Dimension internal_height;
X
X /* private state */
X GC normal_gc;
X Position label_x;
X Position label_y;
X Dimension label_width;
X Dimension label_height;
X Dimension label_len;
X Dimension char_width;
X Dimension char_height;
X Cardinal num_lines;
X Cardinal num_lines_alloced;
X int *line_start;
X int *line_len;
X} LabelPart;
X
X
X/* Full instance record declaration */
X
Xtypedef struct _LabelRec
X{
X CorePart core;
X SimplePart simple;
X LabelPart label;
X} LabelRec;
X
X
X/* New fields for the Label widget class record */
X
Xtypedef struct
X{
X int dummy;
X} LabelClassPart;
X
X
X/* Full class record declaration */
X
Xtypedef struct _LabelClassRec
X{
X CoreClassPart core_class;
X SimpleClassPart simple_class;
X LabelClassPart label_class;
X} LabelClassRec;
X
X
X/* Class pointer */
X
Xextern LabelClassRec labelClassRec;
X
X#endif _LabelP_h
END_OF_FILE
if test 1180 -ne `wc -c <'headers/LabelP.h'`; then
echo shar: \"'headers/LabelP.h'\" unpacked with wrong size!
fi
# end of 'headers/LabelP.h'
fi
if test -f 'headers/List.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/List.h'\"
else
echo shar: Extracting \"'headers/List.h'\" \(528 characters\)
sed "s/^X//" >'headers/List.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _List_h
X#define _List_h
X
X#ifndef NO_ITEM
X#define NO_ITEM -1 /* no item currently selected */
X#endif
X
X/* Class record constants */
X
Xextern WidgetClass listWidgetClass;
X
Xtypedef struct _ListClassRec *ListWidgetClass;
Xtypedef struct _ListRec *ListWidget;
X
X
X/* Structures & enumerations */
X
Xtypedef struct _ListItem
X{
X String label;
X} ListItem;
X
X
X/* Public functions */
X
XBoolean ListChangeLabel();
XBoolean ListChangeSelected();
XBoolean ListChangeItems();
X#endif _List_h
END_OF_FILE
if test 528 -ne `wc -c <'headers/List.h'`; then
echo shar: \"'headers/List.h'\" unpacked with wrong size!
fi
# end of 'headers/List.h'
fi
if test -f 'headers/Menu.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Menu.h'\"
else
echo shar: Extracting \"'headers/Menu.h'\" \(742 characters\)
sed "s/^X//" >'headers/Menu.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Menu_h
X#define _Menu_h
X
X#ifndef NO_ITEM
X#define NO_ITEM -1 /* no item currently selected */
X#endif
X
X/* Class record constants */
X
Xextern WidgetClass menuWidgetClass;
X
Xtypedef struct _MenuClassRec *MenuWidgetClass;
Xtypedef struct _MenuRec *MenuWidget;
X
X
X/* Structures & enumerations */
X
Xtypedef enum
X{
X ModeUndecided,
X ModeClick,
X ModeDrag
X} MenuMode;
X
Xtypedef struct _MenuItem
X{
X String label;
X void (*func) ();
X caddr_t data;
X Boolean sensitive;
X} MenuItem;
X
X
X/* Public functions */
X
XBoolean MenuChangeLabel();
XBoolean MenuChangeFunction();
XBoolean MenuChangeClientData();
XBoolean MenuChangeSensitivity();
Xvoid MenuPopup();
Xvoid MenuPopdown();
X
X#endif _Menu_h
END_OF_FILE
if test 742 -ne `wc -c <'headers/Menu.h'`; then
echo shar: \"'headers/Menu.h'\" unpacked with wrong size!
fi
# end of 'headers/Menu.h'
fi
if test -f 'headers/MenuItems.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/MenuItems.h'\"
else
echo shar: Extracting \"'headers/MenuItems.h'\" \(616 characters\)
sed "s/^X//" >'headers/MenuItems.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X/* These are #defines for the items in the popup menu which allows other
X * modules to know the number of each item so it can modify the menu. */
X
X#define MENU_DRAW_ITEM (unsigned) 0
X#define MENU_REDRAW_ITEM (unsigned) 1
X#define MENU_ZOOM_ITEM (unsigned) 2
X#define MENU_UNZOOM_ITEM (unsigned) 3
X#define MENU_REZOOM_ITEM (unsigned) 4
X#define MENU_TOP_ITEM (unsigned) 5
X#define MENU_FILES_ITEM (unsigned) 6
X#define MENU_DRONES_ITEM (unsigned) 7
X#define MENU_COLORMAP_ITEM (unsigned) 8
X#define MENU_SETTINGS_ITEM (unsigned) 9
X#define MENU_QUIT_ITEM (unsigned) 10
END_OF_FILE
if test 616 -ne `wc -c <'headers/MenuItems.h'`; then
echo shar: \"'headers/MenuItems.h'\" unpacked with wrong size!
fi
# end of 'headers/MenuItems.h'
fi
if test -f 'headers/MenuP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/MenuP.h'\"
else
echo shar: Extracting \"'headers/MenuP.h'\" \(1123 characters\)
sed "s/^X//" >'headers/MenuP.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _MenuP_h
X#define _MenuP_h
X
X#include <X11/Xaw/SimpleP.h>
X#include <Menu.h>
X
X/* New fields for the Menu widget instance record */
X
Xtypedef struct
X{
X /* resources */
X Pixel foreground;
X XFontStruct *font;
X MenuItem *items;
X Cursor cursor;
X
X /* private state */
X Pixmap pixmap;
X GC normal_gc;
X GC gray_gc;
X GC clear_gc;
X GC reverse_gc;
X Dimension h_pad;
X Dimension v_pad;
X Dimension item_width;
X Dimension item_height;
X Cardinal num_items;
X int current_item;
X int current_insensitive_item;
X MenuMode mode;
X} MenuPart;
X
X
X/* Full instance record declaration */
X
Xtypedef struct _MenuRec
X{
X CorePart core;
X SimplePart simple;
X MenuPart menu;
X} MenuRec;
X
X
X/* New fields for the Menu widget class record */
X
Xtypedef struct
X{
X int foo;
X} MenuClassPart;
X
X
X/* Full class record declaration */
X
Xtypedef struct _MenuClassRec
X{
X CoreClassPart core_class;
X SimpleClassPart simple_class;
X MenuClassPart menu_class;
X} MenuClassRec;
X
X
X/* Class pointer */
X
Xextern MenuClassRec menuClassRec;
X
X#endif _MenuP_h
END_OF_FILE
if test 1123 -ne `wc -c <'headers/MenuP.h'`; then
echo shar: \"'headers/MenuP.h'\" unpacked with wrong size!
fi
# end of 'headers/MenuP.h'
fi
if test -f 'headers/Palette.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Palette.h'\"
else
echo shar: Extracting \"'headers/Palette.h'\" \(299 characters\)
sed "s/^X//" >'headers/Palette.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Palette_h
X#define _Palette_h
X
X/* Class record constants */
X
Xextern WidgetClass paletteWidgetClass;
X
Xtypedef struct _PaletteClassRec *PaletteWidgetClass;
Xtypedef struct _PaletteRec *PaletteWidget;
X
X
X/* Public functions */
X
X#endif _Palette_h
END_OF_FILE
if test 299 -ne `wc -c <'headers/Palette.h'`; then
echo shar: \"'headers/Palette.h'\" unpacked with wrong size!
fi
# end of 'headers/Palette.h'
fi
if test -f 'headers/PaletteP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/PaletteP.h'\"
else
echo shar: Extracting \"'headers/PaletteP.h'\" \(1153 characters\)
sed "s/^X//" >'headers/PaletteP.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _PaletteP_h
X#define _PaletteP_h
X
X#include <X11/Xaw/SimpleP.h>
X#include <Palette.h>
X
X/* New fields for the Palette widget instance record */
X
Xtypedef struct
X{
X /* resources */
X Pixel foreground;
X XFontStruct *font;
X Dimension cell_size;
X XtCallbackList callbacks;
X Widget dialogbox;
X
X /* private state */
X GC normal_gc;
X GC reverse_gc;
X GC clear_gc;
X Pixmap pixmap;
X Dimension baseline;
X Dimension char_width;
X Dimension unit_space;
X int x_pos;
X int y_pos;
X Boolean active;
X Boolean scrolling;
X} PalettePart;
X
X
X/* Full instance record declaration */
X
Xtypedef struct _PaletteRec
X{
X CorePart core;
X SimplePart simple;
X PalettePart palette;
X} PaletteRec;
X
X
X/* New fields for the Palette widget class record */
X
Xtypedef struct
X{
X int foo;
X} PaletteClassPart;
X
X
X/* Full class record declaration */
X
Xtypedef struct _PaletteClassRec
X{
X CoreClassPart core_class;
X SimpleClassPart simple_class;
X PaletteClassPart palette_class;
X} PaletteClassRec;
X
X
X/* Class pointer */
X
Xextern PaletteClassRec paletteClassRec;
X
X#endif _PaletteP_h
END_OF_FILE
if test 1153 -ne `wc -c <'headers/PaletteP.h'`; then
echo shar: \"'headers/PaletteP.h'\" unpacked with wrong size!
fi
# end of 'headers/PaletteP.h'
fi
if test -f 'headers/Push.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Push.h'\"
else
echo shar: Extracting \"'headers/Push.h'\" \(307 characters\)
sed "s/^X//" >'headers/Push.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Push_h
X#define _Push_h
X
X/* Class record constants */
X
Xextern WidgetClass pushWidgetClass;
X
Xtypedef struct _PushClassRec *PushWidgetClass;
Xtypedef struct _PushRec *PushWidget;
X
X
X/* Public functions */
X
Xextern void PushChangeLabel();
X
X#endif _Push_h
END_OF_FILE
if test 307 -ne `wc -c <'headers/Push.h'`; then
echo shar: \"'headers/Push.h'\" unpacked with wrong size!
fi
# end of 'headers/Push.h'
fi
if test -f 'headers/PushP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/PushP.h'\"
else
echo shar: Extracting \"'headers/PushP.h'\" \(1052 characters\)
sed "s/^X//" >'headers/PushP.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _PushP_h
X#define _PushP_h
X
X#include <X11/IntrinsicP.h>
X#include <X11/Xaw/SimpleP.h>
X#include <Push.h>
X
X
X/* New fields for the Push widget instance record */
X
Xtypedef struct
X{
X /* resources */
X Pixel foreground;
X XFontStruct *normal_font;
X XFontStruct *reverse_font;
X char *label;
X XtCallbackList callbacks;
X Widget dialogbox;
X
X /* private state */
X GC normal_gc;
X GC reverse_gc;
X int label_len;
X Position baseline;
X Boolean set;
X Boolean active;
X} PushPart;
X
X
X/* Full instance record declaration */
X
Xtypedef struct _PushRec
X{
X CorePart core;
X SimplePart simple;
X PushPart push;
X} PushRec;
X
X
X/* New fields for the Push widget class record */
X
Xtypedef struct
X{
X int foo;
X} PushClassPart;
X
X
X/* Full class record declaration */
X
Xtypedef struct _PushClassRec
X{
X CoreClassPart core_class;
X SimpleClassPart simple_class;
X PushClassPart push_class;
X} PushClassRec;
X
X
X/* Class pointer */
X
Xextern PushClassRec pushClassRec;
X
X#endif _PushP_h
END_OF_FILE
if test 1052 -ne `wc -c <'headers/PushP.h'`; then
echo shar: \"'headers/PushP.h'\" unpacked with wrong size!
fi
# end of 'headers/PushP.h'
fi
if test -f 'headers/Queue.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Queue.h'\"
else
echo shar: Extracting \"'headers/Queue.h'\" \(331 characters\)
sed "s/^X//" >'headers/Queue.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Queue_h
X#define _Queue_h
X
X#define TASK_ALLOC_COUNT 20
X
X
X/* Queue types */
X
Xtypedef enum
X{
X runQ, waitQ, staleQ, zombieQ, unfinishedQ
X} QueueType;
X
X
X/* Forward declarations */
X
XTask *AllocTask();
Xvoid FreeTask();
XTask *TaskFind();
Xvoid TaskNQ();
XTask *TaskDQ();
X
X#endif
END_OF_FILE
if test 331 -ne `wc -c <'headers/Queue.h'`; then
echo shar: \"'headers/Queue.h'\" unpacked with wrong size!
fi
# end of 'headers/Queue.h'
fi
if test -f 'headers/Slider.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Slider.h'\"
else
echo shar: Extracting \"'headers/Slider.h'\" \(320 characters\)
sed "s/^X//" >'headers/Slider.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Slider_h
X#define _Slider_h
X
X/* Class record constants */
X
Xextern WidgetClass sliderWidgetClass;
X
Xtypedef struct _SliderClassRec *SliderWidgetClass;
Xtypedef struct _SliderRec *SliderWidget;
X
X
X/* Public functions */
Xvoid SliderChangePosition();
X
X#endif _Slider_h
END_OF_FILE
if test 320 -ne `wc -c <'headers/Slider.h'`; then
echo shar: \"'headers/Slider.h'\" unpacked with wrong size!
fi
# end of 'headers/Slider.h'
fi
if test -f 'headers/Task.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Task.h'\"
else
echo shar: Extracting \"'headers/Task.h'\" \(797 characters\)
sed "s/^X//" >'headers/Task.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Task_h
X#define _Task_h
X
Xtypedef struct _Task
X{
X long serial;
X Window window;
X double p_lo;
X double p_hi;
X double q_lo;
X double q_hi;
X short x;
X short y;
X short width;
X short height;
X short limit;
X short method;
X struct _Task *prev;
X struct _Task *next;
X} Task;
X
Xtypedef Task *TaskPtr;
X
X
Xtypedef struct _TaskSaveStruct
X{
X long serial;
X long x;
X long y;
X long width;
X long height;
X long limit;
X long method;
X char p_lo[32];
X char p_hi[32];
X char q_lo[32];
X char q_hi[32];
X} TaskSaveStruct;
X
X
X/* Forward declarations */
X
Xvoid PrintTask();
XBoolean SendTask();
Xvoid MakeTasksStale();
Xvoid WasteTasks();
Xvoid StartDrawing();
Xvoid SaveTasks();
Xvoid LoadTasks();
X
X#endif
END_OF_FILE
if test 797 -ne `wc -c <'headers/Task.h'`; then
echo shar: \"'headers/Task.h'\" unpacked with wrong size!
fi
# end of 'headers/Task.h'
fi
if test -f 'headers/Text.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/Text.h'\"
else
echo shar: Extracting \"'headers/Text.h'\" \(299 characters\)
sed "s/^X//" >'headers/Text.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _Text_h
X#define _Text_h
X
X/* Class record constants */
X
Xextern WidgetClass textWidgetClass;
X
Xtypedef struct _TextClassRec *TextWidgetClass;
Xtypedef struct _TextRec *TextWidget;
X
X
X/* Public functions */
X
Xvoid TextChangeText();
X
X#endif _Text_h
END_OF_FILE
if test 299 -ne `wc -c <'headers/Text.h'`; then
echo shar: \"'headers/Text.h'\" unpacked with wrong size!
fi
# end of 'headers/Text.h'
fi
if test -f 'headers/TextP.h' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'headers/TextP.h'\"
else
echo shar: Extracting \"'headers/TextP.h'\" \(1172 characters\)
sed "s/^X//" >'headers/TextP.h' <<'END_OF_FILE'
X/*
X * Copyright (c) Ken W. Marks 1989, 1990.
X */
X
X#ifndef _TextP_h
X#define _TextP_h
X
X#include <X11/IntrinsicP.h>
X#include <X11/Xaw/SimpleP.h>
X#include <Text.h>
X
X
X/* New fields for the Text widget instance record */
X
Xtypedef struct
X{
X /* resources */
X Pixel foreground;
X XFontStruct *font;
X char *buffer;
X char *initial_text;
X int buffer_len;
X int width_in_chars;
X Widget dialogbox;
X
X /* private state */
X GC normal_gc;
X int text_len;
X int first_char;
X Position cursor_position;
X Dimension char_width;
X Position baseline;
X Position cursor_offset;
X Position text_offset;
X char *displayed_text;
X Boolean active;
X} TextPart;
X
X
X/* Full instance record declaration */
X
Xtypedef struct _TextRec
X{
X CorePart core;
X SimplePart simple;
X TextPart text;
X} TextRec;
X
X
X/* New fields for the Text widget class record */
X
Xtypedef struct
X{
X int foo;
X} TextClassPart;
X
X
X/* Full class record declaration */
X
Xtypedef struct _TextClassRec
X{
X CoreClassPart core_class;
X SimpleClassPart simple_class;
X TextClassPart text_class;
X} TextClassRec;
X
X
X/* Class pointer */
X
Xextern TextClassRec textClassRec;
X
X#endif _TextP_h
END_OF_FILE
if test 1172 -ne `wc -c <'headers/TextP.h'`; then
echo shar: \"'headers/TextP.h'\" unpacked with wrong size!
fi
# end of 'headers/TextP.h'
fi
if test -f 'makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'makefile'\"
else
echo shar: Extracting \"'makefile'\" \(706 characters\)
sed "s/^X//" >'makefile' <<'END_OF_FILE'
XMAKE = make -f makefile
X
XSUBDIRS = \
X common \
X widgets \
X master \
X drone \
X gencmap \
X fonts
X
Xall::
X @for i in $(SUBDIRS) ;\
X do \
X (cd $$i ; echo making all "in $$i..."; $(MAKE) all); \
X done
X
Xclean::
X @for i in $(SUBDIRS) ;\
X do \
X (cd $$i ; echo cleaning "in $$i..."; $(MAKE) clean); \
X done
X
Xinstall::
X @for i in $(SUBDIRS) ;\
X do \
X (cd $$i ; echo installing "in $$i..."; $(MAKE) install); \
X done
X
Xinstall.man::
X @for i in $(SUBDIRS) ;\
X do \
X (cd $$i ; echo installing man "in $$i..."; $(MAKE) install.man); \
X done
X
XWorld::
X @echo ""
X @echo "Building all of Chaos"
X @echo ""
X @date
X @echo ""
X $(MAKE) clean
X $(MAKE) all
X @echo ""
X @date
X @echo ""
X @echo "Full build of Chaos complete."
X @echo ""
END_OF_FILE
if test 706 -ne `wc -c <'makefile'`; then
echo shar: \"'makefile'\" unpacked with wrong size!
fi
# end of 'makefile'
fi
if test -f 'master/Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'master/Imakefile'\"
else
echo shar: Extracting \"'master/Imakefile'\" \(769 characters\)
sed "s/^X//" >'master/Imakefile' <<'END_OF_FILE'
X INCLUDES = -I../headers
X WIDGETLIB = ../widgets/libwidgets.a
X COMMONLIB = ../common/libcommon.a
X DEPLIBS = $(WIDGETLIB) $(COMMONLIB) $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
X SYS_LIBRARIES = -lm
X
X#ifdef UltrixArchitecture
XLOCAL_LIBRARIES = $(DEPLIBS)
X#else
XLOCAL_LIBRARIES = $(WIDGETLIB) $(COMMONLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X#endif
X
XSRCS = \
X colormapDb.c \
X droneDb.c \
X fileDb.c \
X settingsDb.c \
X master.c \
X messageDb.c \
X queue.c \
X task.c
X
XOBJS = \
X colormapDb.o \
X droneDb.o \
X fileDb.o \
X settingsDb.o \
X master.o \
X messageDb.o \
X queue.o \
X task.o
X
XComplexProgramTarget(chaos)
XInstallAppDefaults(Chaos)
X
Xsaber_src:
X #cd ../common
X #make saber
X #cd ../widgets
X #make saber
X #cd ../master
X #make saber_chaos
X
END_OF_FILE
if test 769 -ne `wc -c <'master/Imakefile'`; then
echo shar: \"'master/Imakefile'\" unpacked with wrong size!
fi
# end of 'master/Imakefile'
fi
if test -f 'master/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'master/makefile'\"
else
echo shar: Extracting \"'master/makefile'\" \(1055 characters\)
sed "s/^X//" >'master/makefile' <<'END_OF_FILE'
XCURRENT_DIR = ./master
XRM = rm -f
XCFLAGS = -I../headers -I/usr/local/include
XINSTALL = install
XINSTPGMFLAGS =
XINSTMANFLAGS = -m 0444
XINCLUDES = -I../headers
XLDOPTIONS = -L/usr/local/lib
XCOMMONLIB = ../common/libcommon.a
XWIDGETLIB = ../widgets/libwidgets.a
XDEPLIBS = $(WIDGETLIB) $(COMMONLIB)
XLDLIBS = $(DEPLIBS) -lXaw -lXmu -lXt -lXext -lX11 -lm
XBINDIR = /usr/local/bin/X11
XMANDIR = /usr/local/man/mann
X
XSRCS = \
X colormapDb.c \
X droneDb.c \
X fileDb.c \
X settingsDb.c \
X master.c \
X messageDb.c \
X queue.c \
X task.c
X
XOBJS = \
X colormapDb.o \
X droneDb.o \
X fileDb.o \
X settingsDb.o \
X master.o \
X messageDb.o \
X queue.o \
X task.o
X
X.c.o:
X $(RM) $@
X $(CC) -c $(CFLAGS) $*.c
X
Xall:: chaos
X
Xchaos: $(OBJS) $(DEPLIBS)
X $(RM) $@
X $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LDLIBS)
X
Xinstall:: chaos
X $(INSTALL) -c $(INSTPGMFLAGS) chaos $(BINDIR)
X
Xinstall.man:: chaos.man
X $(INSTALL) -c $(INSTMANFLAGS) chaos.man $(MANDIR)/chaos.n
X
Xclean::
X $(RM) *.o *.a chaos
X
Xinstall::
X @echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X @echo "install.man in $(CURRENT_DIR) done"
END_OF_FILE
if test 1055 -ne `wc -c <'master/makefile'`; then
echo shar: \"'master/makefile'\" unpacked with wrong size!
fi
# end of 'master/makefile'
fi
if test -f 'widgets/Imakefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'widgets/Imakefile'\"
else
echo shar: Extracting \"'widgets/Imakefile'\" \(458 characters\)
sed "s/^X//" >'widgets/Imakefile' <<'END_OF_FILE'
X INCLUDES = -I../headers
X BASENAME = widgets
X
XSRCS = \
X Canvas.c \
X Compound.c \
X DlgShell.c \
X Label.c \
X List.c \
X Menu.c \
X Palette.c \
X Push.c \
X Slider.c \
X Text.c
X
XOBJS = \
X Canvas.o \
X Compound.o \
X DlgShell.o \
X Label.o \
X List.o \
X Menu.o \
X Palette.o \
X Push.o \
X Slider.o \
X Text.o
X
XNormalLibraryObjectRule()
X
XNormalLibraryTarget($(BASENAME),$(OBJS))
X
XLintLibraryTarget($(BASENAME),$(SRCS))
X
XDependTarget()
X
XNormalLintTarget($(SRCS))
X
END_OF_FILE
if test 458 -ne `wc -c <'widgets/Imakefile'`; then
echo shar: \"'widgets/Imakefile'\" unpacked with wrong size!
fi
# end of 'widgets/Imakefile'
fi
if test -f 'widgets/makefile' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'widgets/makefile'\"
else
echo shar: Extracting \"'widgets/makefile'\" \(649 characters\)
sed "s/^X//" >'widgets/makefile' <<'END_OF_FILE'
XCURRENT_DIR = ./widgets
XAR = ar cq
XCC = cc
XRANLIB = ranlib
XRM = rm -f
XCFLAGS = -I../headers -I/usr/local/include
XBASENAME = widgets
X
XSRCS = \
X Canvas.c \
X Compound.c \
X DlgShell.c \
X Label.c \
X List.c \
X Menu.c \
X Palette.c \
X Push.c \
X Slider.c \
X Text.c
X
XOBJS = \
X Canvas.o \
X Compound.o \
X DlgShell.o \
X Label.o \
X List.o \
X Menu.o \
X Palette.o \
X Push.o \
X Slider.o \
X Text.o
X
X.c.o:
X $(RM) $@
X $(CC) -c $(CFLAGS) $*.c
X
Xall:: lib$(BASENAME).a
X
Xlib$(BASENAME).a: $(OBJS)
X $(RM) $@
X $(AR) $@ $(OBJS)
X $(RANLIB) $@
X
Xclean::
X $(RM) *.o *.a
X
Xinstall::
X @echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X @echo "install.man in $(CURRENT_DIR) done"
END_OF_FILE
if test 649 -ne `wc -c <'widgets/makefile'`; then
echo shar: \"'widgets/makefile'\" unpacked with wrong size!
fi
# end of 'widgets/makefile'
fi
echo shar: End of archive 10 \(of 10\).
cp /dev/null ark10isdone
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