[comp.sources.x] v08i106: xdbx -- Dbx for X11, Part02/07

cheung%SW.MCC.COM@MCC.COM (Po Cheung) (08/28/90)

Submitted-by: cheung%SW.MCC.COM@MCC.COM (Po Cheung)
Posting-number: Volume 8, Issue 106
Archive-name: xdbx/part02

#! /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 2 (of 7)."
# Contents:  Makefile bitmaps.h defs.h dialog.c global.h
# Wrapped by cheung@espresso.sw.mcc.com on Fri Aug 24 03:24:48 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(9311 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X# Makefile generated by imake - do not edit!
X# $XConsortium: imake.c,v 1.48 89/10/10 18:33:21 jim Exp $
X#
X# The cpp used on this machine replaces all newlines and multiple tabs and
X# spaces in a macro expansion with a single space.  Imake tries to compensate
X# for this, but is not always successful.
X#
X
X###########################################################################
X# Makefile generated from "Imake.tmpl" and <Imakefile>
X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
X#
X# Platform-specific parameters may be set in the appropriate .cf
X# configuration files.  Site-wide parameters may be set in the file
X# site.def.  Full rebuilds are recommended if any parameters are changed.
X#
X# If your C preprocessor doesn't define any unique symbols, you'll need
X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
X# "make Makefile", "make Makefiles", or "make World").
X#
X# If you absolutely can't get imake to work, you'll need to set the
X# variables at the top of each Makefile as well as the dependencies at the
X# bottom (makedepend will do this automatically).
X#
X
X###########################################################################
X# platform-specific configuration parameters - edit sun.cf to change
X
X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
X# operating system:  SunOS 4.0.3
X
X###########################################################################
X# site-specific configuration parameters - edit site.def to change
X
X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
X
X            SHELL = /bin/sh
X
X              TOP = .
X      CURRENT_DIR = .
X
X               AR = ar cq
X  BOOTSTRAPCFLAGS =
X               CC = cc
X
X         COMPRESS = compress
X              CPP = /lib/cpp $(STD_CPP_DEFINES)
X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
X          INSTALL = install
X               LD = ld
X             LINT = lint
X      LINTLIBFLAG = -C
X         LINTOPTS = -axz
X               LN = ln -s
X             MAKE = make
X               MV = mv
X               CP = cp
X           RANLIB = ranlib
X  RANLIBINSTFLAGS =
X               RM = rm -f
X     STD_INCLUDES =
X  STD_CPP_DEFINES =
X      STD_DEFINES =
X EXTRA_LOAD_FLAGS =
X  EXTRA_LIBRARIES =
X             TAGS = ctags
X
X    SHAREDCODEDEF = -DSHAREDCODE
X         SHLIBDEF = -DSUNSHLIB
X
X    PROTO_DEFINES =
X
X     INSTPGMFLAGS =
X
X     INSTBINFLAGS = -m 0755
X     INSTUIDFLAGS = -m 4755
X     INSTLIBFLAGS = -m 0664
X     INSTINCFLAGS = -m 0444
X     INSTMANFLAGS = -m 0444
X     INSTDATFLAGS = -m 0444
X    INSTKMEMFLAGS = -m 4755
X
X          DESTDIR =
X
X     TOP_INCLUDES = -I$(INCROOT)
X
X      CDEBUGFLAGS = -O
X        CCOPTIONS =
X      COMPATFLAGS =
X
X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
X   LDCOMBINEFLAGS = -X -r
X
X        MACROFILE = sun.cf
X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
X
X    IMAKE_DEFINES =
X
X         IRULESRC = $(CONFIGDIR)
X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
X
X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
X			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
X			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
X
X###########################################################################
X# X Window System Build Parameters
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X###########################################################################
X# X Window System make variables; this need to be coordinated with rules
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X          PATHSEP = /
X        USRLIBDIR = $(DESTDIR)/usr/lib
X           BINDIR = $(DESTDIR)/usr/bin/X11
X          INCROOT = $(DESTDIR)/usr/include
X     BUILDINCROOT = $(TOP)
X      BUILDINCDIR = $(BUILDINCROOT)/X11
X      BUILDINCTOP = ..
X           INCDIR = $(INCROOT)/X11
X           ADMDIR = $(DESTDIR)/usr/adm
X           LIBDIR = $(USRLIBDIR)/X11
X        CONFIGDIR = $(LIBDIR)/config
X       LINTLIBDIR = $(USRLIBDIR)/lint
X
X          FONTDIR = $(LIBDIR)/fonts
X         XINITDIR = $(LIBDIR)/xinit
X           XDMDIR = $(LIBDIR)/xdm
X           AWMDIR = $(LIBDIR)/awm
X           TWMDIR = $(LIBDIR)/twm
X           GWMDIR = $(LIBDIR)/gwm
X          MANPATH = $(DESTDIR)/usr/local/man
X    MANSOURCEPATH = $(MANPATH)/man
X           MANDIR = $(MANSOURCEPATH)n
X        LIBMANDIR = $(MANSOURCEPATH)3
X      XAPPLOADDIR = $(LIBDIR)/app-defaults
X
X        SOXLIBREV = 4.2
X          SOXTREV = 4.0
X         SOXAWREV = 4.0
X        SOOLDXREV = 4.0
X         SOXMUREV = 4.0
X        SOXEXTREV = 4.0
X
X       FONTCFLAGS = -t
X
X     INSTAPPFLAGS = $(INSTDATFLAGS)
X
X            IMAKE = imake
X           DEPEND = makedepend
X              RGB = rgb
X            FONTC = bdftosnf
X        MKFONTDIR = mkfontdir
X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
X
X        CONFIGSRC = $(TOP)/config
X        CLIENTSRC = $(TOP)/clients
X          DEMOSRC = $(TOP)/demos
X           LIBSRC = $(TOP)/lib
X          FONTSRC = $(TOP)/fonts
X       INCLUDESRC = $(TOP)/X11
X        SERVERSRC = $(TOP)/server
X          UTILSRC = $(TOP)/util
X        SCRIPTSRC = $(UTILSRC)/scripts
X       EXAMPLESRC = $(TOP)/examples
X       CONTRIBSRC = $(TOP)/../contrib
X           DOCSRC = $(TOP)/doc
X           RGBSRC = $(TOP)/rgb
X        DEPENDSRC = $(UTILSRC)/makedepend
X         IMAKESRC = $(CONFIGSRC)
X         XAUTHSRC = $(LIBSRC)/Xau
X          XLIBSRC = $(LIBSRC)/X
X           XMUSRC = $(LIBSRC)/Xmu
X       TOOLKITSRC = $(LIBSRC)/Xt
X       AWIDGETSRC = $(LIBSRC)/Xaw
X       OLDXLIBSRC = $(LIBSRC)/oldX
X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
X     EXTENSIONSRC = $(TOP)/extensions
X
X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
X     EXTENSIONLIB =  -lXext
X
X          DEPXLIB = $(DEPEXTENSIONLIB)
X             XLIB = $(EXTENSIONLIB) -lX11
X
X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
X         XAUTHLIB =  -lXau
X
X        DEPXMULIB =
X           XMULIB = -lXmu
X
X       DEPOLDXLIB =
X          OLDXLIB = -loldX
X
X      DEPXTOOLLIB =
X         XTOOLLIB = -lXt
X
X        DEPXAWLIB =
X           XAWLIB = -lXaw
X
X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
X
X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
X
X         DEPLIBS1 = $(DEPLIBS)
X         DEPLIBS2 = $(DEPLIBS)
X         DEPLIBS3 = $(DEPLIBS)
X
X###########################################################################
X# Imake rules for building libraries, programs, scripts, and data files
X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
X
X###########################################################################
X# start of Imakefile
X
X        DEFINES = -DSUNOS4
X
X        DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X
X           SRCS = calldbx.c command.c dbx.c dialog.c datadpy.c filemenu.c \
X		  handler.c parser.c regex.c signs.c signals.c source.c \
X		  utils.c windows.c xdbx.c
X
X           OBJS = calldbx.o command.o dbx.o dialog.o datadpy.o filemenu.o \
X		  handler.o parser.o regex.o signs.o signals.o source.o \
X		  utils.o windows.o xdbx.o
X
X PROGRAM = xdbx
X
Xall:: xdbx
X
Xxdbx: $(OBJS) $(DEPLIBS)
X	$(RM) $@
X	$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
X
Xsaber_xdbx:
X	#load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
X
Xosaber_xdbx:
X	#load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
X
Xinstall:: xdbx
X	$(INSTALL) -c $(INSTPGMFLAGS)   xdbx $(BINDIR)
X
Xinstall.man:: xdbx.man
X	$(INSTALL) -c $(INSTMANFLAGS) xdbx.man $(MANDIR)/xdbx.n
X
Xdepend::
X	$(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
X
Xlint:
X	$(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
Xlint1:
X	$(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
X
Xclean::
X	$(RM) $(PROGRAM)
X
Xinstall:: XDbx.ad
X	$(INSTALL) -c $(INSTAPPFLAGS) XDbx.ad $(XAPPLOADDIR)/XDbx
X
X###########################################################################
X# common rules for all Makefiles - do not edit
X
Xemptyrule::
X
Xclean::
X	$(RM_CMD) \#*
X
XMakefile::
X	-@if [ -f Makefile ]; then \
X	echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
X	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
X	else exit 0; fi
X	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
X
Xtags::
X	$(TAGS) -w *.[ch]
X	$(TAGS) -xw *.[ch] > TAGS
X
Xsaber:
X	#load $(ALLDEFINES) $(SRCS)
X
Xosaber:
X	#load $(ALLDEFINES) $(OBJS)
X
X###########################################################################
X# empty rules for directories that do not have SUBDIRS - do not edit
X
Xinstall::
X	@echo "install in $(CURRENT_DIR) done"
X
Xinstall.man::
X	@echo "install.man in $(CURRENT_DIR) done"
X
XMakefiles::
X
Xincludes::
X
X###########################################################################
X# dependencies generated by makedepend
X
END_OF_FILE
if test 9311 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'bitmaps.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'bitmaps.h'\"
else
echo shar: Extracting \"'bitmaps.h'\" \(8509 characters\)
sed "s/^X//" >'bitmaps.h' <<'END_OF_FILE'
X/*****************************************************************************
X *
X *  xdbx - X Window System interface to the dbx debugger
X *
X *  Copyright 1989 The University of Texas at Austin
X *  Copyright 1990 Microelectronics and Computer Technology Corporation
X *
X *  Permission to use, copy, modify, and distribute this software and its
X *  documentation for any purpose and without fee is hereby granted,
X *  provided that the above copyright notice appear in all copies and that
X *  both that copyright notice and this permission notice appear in
X *  supporting documentation, and that the name of The University of Texas
X *  and Microelectronics and Computer Technology Corporation (MCC) not be 
X *  used in advertising or publicity pertaining to distribution of
X *  the software without specific, written prior permission.  The
X *  University of Texas and MCC makes no representations about the 
X *  suitability of this software for any purpose.  It is provided "as is" 
X *  without express or implied warranty.
X *
X *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
X *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
X *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X *  Author:  	Po Cheung
X *  Created:   	April 9, 1990
X *
X *****************************************************************************/
X
X/*  bitmaps.h
X *
X *    Contain bitmap data for a 48x48 and a 64x64 xdbx icon, and the 
X *	stop sign, execution arrow, up-down arrow, and bomb sign used 
X *	in the source window.
X */
X
X/* bitmap data for 48x48 xdbx icon */
X
X#define xdbx48_width 48
X#define xdbx48_height 48
Xstatic char xdbx48_bits[] = {
X   0xff, 0x0f, 0x00, 0x00, 0x00, 0xf0, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0xf0,
X   0xfc, 0x3f, 0x00, 0x00, 0x00, 0x78, 0xfc, 0x3f, 0x00, 0x00, 0x00, 0x3c,
X   0xf8, 0x7f, 0x00, 0x02, 0x00, 0x3c, 0xf0, 0xff, 0x00, 0x02, 0x00, 0x1e,
X   0xe0, 0xff, 0x01, 0x04, 0x00, 0x0f, 0xe0, 0xff, 0x01, 0x04, 0x80, 0x07,
X   0xc0, 0xff, 0xe3, 0xff, 0xc0, 0x03, 0x80, 0xff, 0x1f, 0x01, 0xc7, 0x03,
X   0x00, 0xff, 0x27, 0x01, 0xf8, 0x01, 0x00, 0xff, 0xcf, 0x60, 0xf0, 0x10,
X   0x00, 0xfe, 0x1f, 0x90, 0xf8, 0x10, 0x00, 0xfc, 0x3f, 0x90, 0xbc, 0x08,
X   0x00, 0xfc, 0x7f, 0x60, 0x3c, 0x07, 0x00, 0xfe, 0xff, 0x03, 0x1e, 0x02,
X   0x00, 0xfe, 0xff, 0x04, 0x0f, 0x02, 0x00, 0xff, 0xff, 0x85, 0x07, 0x04,
X   0x80, 0xff, 0xff, 0xc3, 0xc3, 0x04, 0x80, 0xdf, 0xff, 0xe7, 0x23, 0x05,
X   0x84, 0x9f, 0xff, 0xef, 0x25, 0x09, 0xc8, 0x19, 0xff, 0xf7, 0xc4, 0x08,
X   0xf0, 0x18, 0xfe, 0x7b, 0x03, 0x08, 0xc0, 0x1f, 0xfc, 0x3d, 0x00, 0x08,
X   0xc0, 0xff, 0xff, 0xff, 0xff, 0x0f, 0xc0, 0x1f, 0x78, 0x7f, 0x00, 0x08,
X   0xf0, 0x98, 0xbd, 0xff, 0x00, 0x08, 0xc8, 0x59, 0xde, 0xff, 0x61, 0x08,
X   0x84, 0x5f, 0xef, 0xff, 0x91, 0x04, 0x80, 0x9f, 0xc7, 0xff, 0x93, 0x04,
X   0x80, 0x9f, 0x87, 0xff, 0x67, 0x04, 0x00, 0xdf, 0x03, 0xff, 0x0f, 0x02,
X   0x00, 0xfe, 0x19, 0xfe, 0x1f, 0x02, 0x00, 0xfe, 0x24, 0xfe, 0x1f, 0x07,
X   0x00, 0x7c, 0x24, 0xfc, 0xff, 0x08, 0x00, 0x78, 0x18, 0xfa, 0x7f, 0x10,
X   0x00, 0x3c, 0x00, 0xf2, 0xff, 0x10, 0x00, 0xde, 0x00, 0xfc, 0xff, 0x00,
X   0x00, 0x8f, 0x0f, 0xe0, 0xff, 0x01, 0x80, 0x87, 0xf0, 0xff, 0xff, 0x03,
X   0x80, 0x87, 0x00, 0x84, 0xff, 0x07, 0xc0, 0x43, 0x00, 0x84, 0xff, 0x07,
X   0xe0, 0x21, 0x00, 0x02, 0xff, 0x0f, 0xf0, 0x00, 0x00, 0x02, 0xfe, 0x1f,
X   0x78, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x78, 0x00, 0x00, 0x00, 0xfc, 0x3f,
X   0x3c, 0x00, 0x00, 0x00, 0xf8, 0x7f, 0x1e, 0x00, 0x00, 0x00, 0xf0, 0xff};
X
X
X/* bitmap data for 64x64 xdbx icon */
X
X#define xdbx64_width 64
X#define xdbx64_height 64
Xstatic char xdbx64_bits[] = {
X   0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xfe, 0xff, 0x01, 0x00,
X   0x00, 0x00, 0x00, 0xf8, 0xfc, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x7c,
X   0xf8, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xf8, 0xff, 0x07, 0x00,
X   0x00, 0x00, 0x00, 0x1f, 0xf0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x0f,
X   0xe0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x0f, 0xc0, 0xff, 0x3f, 0x00,
X   0x00, 0x00, 0xc0, 0x07, 0xc0, 0xff, 0x3f, 0x00, 0x01, 0x00, 0xe0, 0x03,
X   0x80, 0xff, 0x7f, 0x00, 0x02, 0x00, 0xf0, 0x01, 0x00, 0xff, 0xff, 0x00,
X   0x04, 0x00, 0xf8, 0x00, 0x00, 0xfe, 0xff, 0x01, 0x04, 0x00, 0xf8, 0x00,
X   0x00, 0xfe, 0xff, 0x01, 0x04, 0x00, 0x7c, 0x00, 0x00, 0xfc, 0xff, 0xff,
X   0xff, 0x01, 0x3e, 0x04, 0x00, 0xf8, 0xff, 0x07, 0x00, 0x1e, 0x1f, 0x04,
X   0x00, 0xf0, 0xff, 0x0f, 0x00, 0xe0, 0x0f, 0x04, 0x00, 0xf0, 0xff, 0x0f,
X   0x80, 0x81, 0x07, 0x02, 0x00, 0xe0, 0xff, 0x1f, 0x40, 0xc2, 0x07, 0x01,
X   0x00, 0xc0, 0xff, 0xbf, 0x41, 0xe2, 0x8b, 0x01, 0x00, 0xc0, 0xff, 0x7f,
X   0x82, 0xf1, 0xd1, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x02, 0xf8, 0x60, 0x00,
X   0x00, 0xf0, 0xff, 0xff, 0x01, 0x7c, 0x40, 0x00, 0x00, 0xf8, 0xfe, 0xff,
X   0x01, 0x7c, 0x80, 0x00, 0x00, 0xfc, 0xfc, 0xff, 0x03, 0x3e, 0x80, 0x00,
X   0x00, 0xfc, 0xfc, 0xff, 0x03, 0x1f, 0x00, 0x01, 0x00, 0xfe, 0xf8, 0xff,
X   0x87, 0x0f, 0x03, 0x01, 0x00, 0xff, 0xf0, 0xff, 0xcf, 0x87, 0x04, 0x02,
X   0x08, 0xff, 0xe0, 0xff, 0xcf, 0x87, 0x04, 0x02, 0x10, 0xe7, 0xe0, 0xff,
X   0xe7, 0x03, 0x03, 0x02, 0xe0, 0xe3, 0xc0, 0xff, 0xf3, 0x01, 0x00, 0x04,
X   0x80, 0xff, 0x80, 0xff, 0xf9, 0x00, 0x00, 0x04, 0x80, 0xff, 0x00, 0xff,
X   0xfc, 0x00, 0x00, 0x04, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07,
X   0x80, 0xff, 0x00, 0x7e, 0xfe, 0x01, 0x00, 0x04, 0x80, 0xff, 0x00, 0x3e,
X   0xff, 0x1b, 0x00, 0x04, 0xe0, 0xe3, 0x00, 0x9f, 0xff, 0x27, 0x00, 0x04,
X   0x10, 0xe7, 0xb0, 0xcf, 0xff, 0x2f, 0x30, 0x02, 0x08, 0xff, 0xc8, 0xe7,
X   0xff, 0x1f, 0x48, 0x02, 0x00, 0xff, 0xe8, 0xe7, 0xff, 0x1f, 0x48, 0x02,
X   0x00, 0xfe, 0xf0, 0xc3, 0xff, 0x3f, 0x30, 0x01, 0x00, 0xfc, 0xf0, 0xc1,
X   0xff, 0x3f, 0x00, 0x01, 0x00, 0xfc, 0xf8, 0x80, 0xff, 0x7f, 0x80, 0x00,
X   0x00, 0xf8, 0x7c, 0x00, 0xff, 0xff, 0x80, 0x00, 0x00, 0xf0, 0x7c, 0x18,
X   0xfe, 0xff, 0xc1, 0x00, 0x00, 0xe0, 0x3e, 0x24, 0xfe, 0xff, 0x61, 0x00,
X   0x00, 0xc0, 0x1f, 0x24, 0xfc, 0xff, 0xd3, 0x00, 0x00, 0x80, 0x0f, 0x18,
X   0xf8, 0xff, 0x8f, 0x01, 0x00, 0xc0, 0x07, 0x00, 0xf4, 0xff, 0x0f, 0x01,
X   0x00, 0xe0, 0x0f, 0x00, 0xe4, 0xff, 0x1f, 0x02, 0x00, 0xf0, 0x39, 0x00,
X   0xf8, 0xff, 0x1f, 0x04, 0x00, 0xf0, 0xc9, 0x03, 0xc0, 0xff, 0x3f, 0x04,
X   0x00, 0xf8, 0x08, 0xfc, 0xff, 0xff, 0x7f, 0x04, 0x00, 0x7c, 0x04, 0x00,
X   0x01, 0xff, 0x7f, 0x00, 0x00, 0x3e, 0x02, 0x00, 0x01, 0xff, 0xff, 0x00,
X   0x00, 0x3e, 0x00, 0x00, 0x01, 0xfe, 0xff, 0x01, 0x00, 0x1f, 0x00, 0x80,
X   0x00, 0xfc, 0xff, 0x03, 0x80, 0x0f, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x03,
X   0xc0, 0x07, 0x00, 0x00, 0x00, 0xf8, 0xff, 0x07, 0xe0, 0x03, 0x00, 0x00,
X   0x00, 0xf0, 0xff, 0x0f, 0xe0, 0x03, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x1f,
X   0xf0, 0x01, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x1f, 0xf8, 0x00, 0x00, 0x00,
X   0x00, 0xc0, 0xff, 0x3f, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f,
X   0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff};
X
X
X/* bitmap data for stop sign */
X
X#define stop_width 16
X#define stop_height 16
X#define stop_x_hot -1
X#define stop_y_hot -1
Xstatic char stop_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xd0, 0x01, 0x5c, 0x07,
X   0x54, 0x05, 0x54, 0x05, 0x14, 0x04, 0x0c, 0x04, 0x08, 0x04, 0x18, 0x06,
X   0xf0, 0x03, 0xf0, 0x03, 0x00, 0x00, 0x00, 0x00};
X
X
X/* bitmap data for arrow sign */
X
X#define arrow_width 16
X#define arrow_height 16
X#define arrow_x_hot -1
X#define arrow_y_hot -1
Xstatic char arrow_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x01, 0x80, 0x03,
X   0xff, 0x07, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x07, 0x80, 0x03, 0x80, 0x01,
X   0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
X
X
X/* bitmap data for up-down (outlined arrow) sign */
X
X#define updown_width 16
X#define updown_height 16
X#define updown_x_hot -1
X#define updown_y_hot -1
Xstatic char updown_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x01, 0x80, 0x03,
X   0xff, 0x06, 0x01, 0x0c, 0x01, 0x0c, 0xff, 0x06, 0x80, 0x03, 0x80, 0x01,
X   0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
X
X
X/* bitmap data for bomb sign */
X
X#define bomb_width 16
X#define bomb_height 16
Xstatic char bomb_bits[] = {
X   0x00, 0x00, 0x69, 0x00, 0x94, 0x00, 0x8a, 0x00, 0xc0, 0x01, 0xc5, 0x01,
X   0xf0, 0x07, 0xf0, 0x07, 0xf8, 0x0f, 0xf8, 0x0d, 0xf8, 0x0d, 0xf8, 0x0d,
X   0xf0, 0x06, 0xf0, 0x07, 0xc0, 0x01, 0x00, 0x00};
END_OF_FILE
if test 8509 -ne `wc -c <'bitmaps.h'`; then
    echo shar: \"'bitmaps.h'\" unpacked with wrong size!
fi
# end of 'bitmaps.h'
fi
if test -f 'defs.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'defs.h'\"
else
echo shar: Extracting \"'defs.h'\" \(7997 characters\)
sed "s/^X//" >'defs.h' <<'END_OF_FILE'
X/*****************************************************************************
X *
X *  xdbx - X Window System interface to the dbx debugger
X *
X *  Copyright 1989 The University of Texas at Austin
X *  Copyright 1990 Microelectronics and Computer Technology Corporation
X *
X *  Permission to use, copy, modify, and distribute this software and its
X *  documentation for any purpose and without fee is hereby granted,
X *  provided that the above copyright notice appear in all copies and that
X *  both that copyright notice and this permission notice appear in
X *  supporting documentation, and that the name of The University of Texas
X *  and Microelectronics and Computer Technology Corporation (MCC) not be 
X *  used in advertising or publicity pertaining to distribution of
X *  the software without specific, written prior permission.  The
X *  University of Texas and MCC makes no representations about the 
X *  suitability of this software for any purpose.  It is provided "as is" 
X *  without express or implied warranty.
X *
X *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
X *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
X *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X *  Author:  	Po Cheung
X *  Created:   	March 10, 1989
X *
X *****************************************************************************/
X
X/*  defs.h
X *
X *    Contain #includes, #defines and typedefs
X */
X
X#include <stdio.h>
X#include <sys/param.h>
X#include <X11/Xos.h>
X#include <X11/IntrinsicP.h>
X#include <X11/StringDefs.h>
X#include <X11/Xaw/Cardinals.h>
X#include <X11/Xatom.h>
X#include <X11/Shell.h>
X#include <X11/Xaw/Paned.h>
X#include <X11/Xaw/Grip.h>
X#include <X11/Xaw/Form.h>
X#include <X11/Xaw/MenuButton.h>
X#include <X11/Xaw/SimpleMenu.h>
X#include <X11/Xaw/SmeBSB.h>
X#include <X11/Xaw/AsciiText.h>
X#include <X11/Xaw/TextP.h>
X#include <X11/Xaw/TextSrc.h>
X#include <X11/Xaw/Box.h>
X#include <X11/Xaw/Dialog.h>
X#include <X11/Xaw/List.h>
X#include <X11/Xaw/Command.h>
X#include <X11/Xaw/Label.h>
X#include <X11/cursorfont.h>
X
X/* incompatibility of header file with X11R4 documentation */
X#define XawChainTop	XtChainTop
X#define XawChainBottom	XtChainBottom
X#define XawChainLeft	XtChainLeft
X#define XawChainRight	XtChainRight
X
X#ifndef AssignMax
X#define AssignMax(x, y) 	if ((y) > (x)) x = (y)
X#endif
X#ifndef AssignMin
X#define AssignMin(x, y) 	if ((y) < (x)) x = (y)
X#endif
X
X#define LINESIZ         512		/* input line length */
X#define MAXNAME         256		/* max identifier length */
X#define MAXARGS 	20		/* max number of args */
X#define ADD_SIZE 	16		/* # of files added during Realloc */
X#define CHARS_PER_LINE  20		/* estimated number of chars per line */
X#define ADD_LINES       50		/* # of lines to be added in realloc */
X#define NTOKENS		6		/* number of tokens */
X#define DEBUGGER      	"dbx"		/* name of executable */
X#define XDBXPROMPT  	"(xdbx) "	/* xdbx prompt string */
X#define DELIMITERS	" !%^&*()+=~|;:{},/#<?\"\n\t"
X
X#define STOP_AT_HELP	"Please select a line to stop at"
X#define STOP_IN_HELP	"Please select a function to stop in"
X#define DELETE_HELP	"Please select a stop sign to delete"
X#define PRINT_HELP	"Please select an expression to print"
X#define UNDISPLAY_HELP	"Please select an expression to undisplay"
X#define SEARCH_HELP	"Nothing to search"
X
X#define	LASTCH(s)	(s[strlen(s)-1])
X#define	SECLASTCH(s)	(s[strlen(s)-2])
X
X#ifdef SUNOS4
Xtypedef struct dirent 	Directory;
X#else
Xtypedef struct direct 	Directory;
X#endif
X
Xtypedef struct {
X    Boolean   bell;		/* if True, bell on */
X    Boolean   displayWindow;	/* if True, display window on startup */
X    String    delimiters;	/* set of delimiters for word selection */
X    String    prompt;		/* prompt string for xdbx */
X
X    Pixel     stop_color;	/* color of stop sign */
X    Pixel     arrow_color;	/* color of arrow sign */
X    Pixel     updown_color;	/* color of updown sign */
X    Pixel     bomb_color;	/* color of bomb sign */
X
X    Dimension dataDpyMaxHeight;	/* data display window maximum height */
X    Dimension dataDpyMaxWidth;	/* data display window maximum width */
X
X    Boolean   bigicon;		/* xdbx option -bigicon */
X    Boolean   debug;		/* xdbx option -debug */
X
X    Boolean   dbxopt_r;		/* dbx option -r */
X    Boolean   dbxopt_i;		/* dbx option -i */
X    String    includeDir;	/* dbx option -I includeDir */
X    Boolean   dbxopt_k;		/* dbx option -k */
X    String    cfile;		/* Berkeley  dbx option -c file */
X    Boolean   dbxopt_kbd;	/* Sun dbx option -kbd */
X    String    fcount;		/* SunOS 4.0 dbx option -f fcount */
X    String    startup;		/* SunOS 4.0 dbx option -s startup */
X    String    tstartup;		/* SunOS 4.0 dbx option -sr tstartup */
X    Boolean   pixie;		/* Mips dbx option -pixie */
X} XdbxResources;
X
Xtypedef struct {
X    char 		*filename;	/* name of file */
X    char 		*pathname;	/* full path name of file */
X    char 		*buf;		/* buffer holding source file */
X    long		filesize;	/* size of file in bytes */
X    time_t		mtime;		/* time last modified */
X    int	 		lines;		/* # of lines on display */
X    int	 		currentline;	/* line where caret is */
X    int	 		topline;	/* top line number in the window */
X    int	 		bottomline;	/* bottom line number in window */
X    int	 		lastline;	/* number of lines in source file */
X    XawTextPosition 	topPosition;	/* top display position of buffer */
X    XawTextPosition 	*linepos;	/* array of text pos for each newline */
X} FileRec, *FileRecPtr;
X
Xtypedef struct {
X    char	*mesg;			/* part of matched string */
X    unsigned	stop;			/* stop number */
X    char 	*func;			/* function name */
X    int		line;			/* line number */
X    char	*file;			/* file name */
X    char	*display;		/* variable display output */
X} Tokens;
X
Xtypedef struct dataDpyList {
X    struct dataDpyRec	*dataDpy;
X    struct dataDpyList	*next;
X} DataDpyList;
X
Xtypedef struct dataDpyRec {
X    int			id;
X    Widget              popupshell;             /* parent of popup */
X    Widget              popup;                  /* form widget */
X    Widget              label;                  /* label widget */
X    Widget              dataDpyWindow;          /* window for displaying data */
X    char                *buf;                   /* text buffer */
X    int                 buflen;
X    XawTextPosition     *linepos;
X    int                 numlines;
X    int                 maxLineLength;
X    int			state;			/* EMPTY, UNUSED, USED */
X    struct dataDpyRec	*parent;		/* pointer to parent */
X    struct dataDpyList	*childlist;		/* list of children */
X} DataDpyRec, *DataDpyRecPtr;
X
Xtypedef struct {
X    char			*pat;		/* regular expression */
X    struct re_pattern_buffer	*buf;		/* buffer for compile regex */
X    int				reg_token[NTOKENS];	/* register number */
X} PatternRec, *PatternRecPtr;
X
Xtypedef struct commandRec {
X    char		*command;
X    struct commandRec	*next;
X} CommandRec, *CommandRecPtr;
X
Xtypedef struct {
X    Cardinal	i;			/* index to arrowsign[] */
X    char	file[MAXNAME];		/* file associated with */
X    int	 	line;			/* line number */
X    char 	func[MAXNAME];		/* function name associated with */
X} Arrow;
X
Xtypedef struct {
X    Cardinal	i;			/* index to updownsign[] */
X    char	file[MAXNAME];		/* file associated with */
X    int	 	line;			/* line number */
X    char 	func[MAXNAME];		/* function name associated with */
X} Updown;
X
Xtypedef struct {
X    char	*file;			/* file associated with */
X    int	 	line;			/* line number of stop */
X    unsigned    tag;                    /* used in deleting stops */
X} Stops;
X
Xtypedef struct {
X    Cardinal	i;			/* index to bombsign[] */
X    char	file[MAXNAME];		/* file associated with */
X    int	 	line;			/* line number */
X    char 	func[MAXNAME];		/* function name associated with */
X} Bomb;
END_OF_FILE
if test 7997 -ne `wc -c <'defs.h'`; then
    echo shar: \"'defs.h'\" unpacked with wrong size!
fi
# end of 'defs.h'
fi
if test -f 'dialog.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'dialog.c'\"
else
echo shar: Extracting \"'dialog.c'\" \(9512 characters\)
sed "s/^X//" >'dialog.c' <<'END_OF_FILE'
X/*****************************************************************************
X *
X *  xdbx - X Window System interface to the dbx debugger
X *
X *  Copyright 1989 The University of Texas at Austin
X *  Copyright 1990 Microelectronics and Computer Technology Corporation
X *
X *  Permission to use, copy, modify, and distribute this software and its
X *  documentation for any purpose and without fee is hereby granted,
X *  provided that the above copyright notice appear in all copies and that
X *  both that copyright notice and this permission notice appear in
X *  supporting documentation, and that the name of The University of Texas
X *  and Microelectronics and Computer Technology Corporation (MCC) not be 
X *  used in advertising or publicity pertaining to distribution of
X *  the software without specific, written prior permission.  The
X *  University of Texas and MCC makes no representations about the 
X *  suitability of this software for any purpose.  It is provided "as is" 
X *  without express or implied warranty.
X *
X *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
X *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
X *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X *  Author:  	Po Cheung
X *  Created:   	March 10, 1989
X *
X *****************************************************************************/
X
X/*  dialog.c
X *
X *    Create the dialogue window where the user enter dbx commands, and
X *    provide action procs to make a text widget behave like a terminal.
X *
X *    InsertSpace():	Prevent user from deleting past the prompt (action proc
X *			for DELETE or BACKSPACE).
X *    DeleteWord():	Word delete in dialog window. (action proc for Ctrl-w).
X *    DeleteLine():	Line delete in dialog window. (action proc for Ctrl-u).
X *    Dispatch():	Send an input command line to dbx. (action proc for CR).
X *    SigInt():		Send SIGINT to dbx (action proc for Ctrl-C).
X *    SigEof():		Send an EOF signal to dbx (action proc for Ctrl-D).
X *    SigQuit():	Send SIGQUIT to dbx (action proc for Ctrl-\).
X *    CreateDialogWindow(): Create dialog window and install action table.
X *    AppendDialogText():       Append string to dialog window.
X */
X
X#include <signal.h>
X#include "global.h"
X
X#define	DIALOGSIZE	100000		/* max size of dialogue window buffer */
X
XWidget	dialogWindow;			/* text window as a dbx terminal */
XBoolean FalseSignal = FALSE;		/* set to TRUE before self-generated
X					   interrupt/quit signals */
Xstatic char DialogText[DIALOGSIZE];	/* text buffer for widget */
Xstatic XawTextPosition  StartPos;      	/* starting position of input text */
X
X
X/*  This procedure prevents the user from deleting past the prompt, or
X *  any text appended by AppendDialogText() to the dialog window.
X *  It checks the last position of text, if it matches StartPos, set
X *  by AppendDialogText(), it inserts a space so that delete-previous-
X *  character() can only delete the space character.
X */
X/* ARGSUSED */
Xstatic void InsertSpace(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    XawTextBlock    textblock;
X    XawTextPosition lastPos;
X
X    if (XawTextGetInsertionPoint(w) <= StartPos) {
X    	lastPos = TextGetLastPos(w);
X	if (lastPos == StartPos) {
X	    textblock.firstPos = 0;
X	    textblock.length   = 1;
X	    textblock.ptr      = " ";
X	    XawTextReplace(w, lastPos, lastPos, &textblock);
X	    XawTextSetInsertionPoint(w, lastPos+1);
X	}
X    }
X}
X
X/*  Erases the preceding word.
X *  Simulates the action of the WERASE character (ctrl-W).
X */
X/* ARGSUSED */
Xvoid DeleteWord(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    XawTextBlock    	textblock;
X    XawTextPosition	pos;
X    Cardinal	 	i;
X
X    textblock.firstPos = 0;
X    textblock.length   = 0;
X    textblock.ptr      = "";
X
X    pos = XawTextGetInsertionPoint(w); 
X    if (pos <= StartPos)
X        pos = TextGetLastPos(w); 
X    for (i=pos; i > StartPos && DialogText[i-1] == ' '; i--);
X    for (; i > StartPos && DialogText[i-1] != ' '; i--);
X    XawTextReplace(w, i, pos, &textblock);
X    XawTextSetInsertionPoint(w, i);
X}
X
X
X/*  Deletes the entire current input line.
X *  simulates the action of the KILL character (ctrl-U).
X */
X/* ARGSUSED */
Xvoid DeleteLine(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    XawTextBlock    	textblock;
X    XawTextPosition 	pos, beginPos;
X    Cardinal	 	i;
X    char		*s;
X
X    textblock.firstPos = 0;
X    textblock.length   = 0;
X    textblock.ptr      = "";
X
X    pos = XawTextGetInsertionPoint(w); 
X    if (w == dialogWindow) {
X	s = DialogText;
X	beginPos = StartPos;
X	if (pos <= beginPos)
X    	    pos = TextGetLastPos(w);
X    }
X    for (i=pos; i > beginPos && s[i-1] != '\n'; i--);
X    XawTextReplace(w, i, pos, &textblock);
X    XawTextSetInsertionPoint(w, i);
X}
X
X
X/*  Dispatch() is invoked on every <CR>.
X *  It collects text from the dialog window and sends it to dbx.
X *  If the string is a command to dbx (Prompt would be TRUE),
X *  it is stored in the global variable, Command.
X */
X/* ARGSUSED */
Xstatic void Dispatch(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params; 
X{
X    char s[LINESIZ];
X
X    strcpy(s, DialogText + StartPos);
X    if (Prompt) {
X	send_command(s);
X    }
X    else {
X    	write_dbx(s);
X    }
X}
X
X
X/*  Sends an interrupt signal, SIGINT, to dbx.
X *  Simulates the action of the INTR character (ctrl-C).
X */
X/* ARGSUSED */
Xstatic void SigInt(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    FalseSignal = TRUE;
X    killpg(dbxpid, SIGINT);
X}
X
X
X/*  Sends an EOF signal to dbx. (ctrl-D) */
X/* ARGSUSED */
Xstatic void SigEof(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    write_dbx("\04");
X}
X
X
X/*  Sends a QUIT signal, SIGQUIT, to dbx. 
X *  Simulates the action of the QUIT character (ctrl-\) 
X */
X/* ARGSUSED */
Xstatic void SigQuit(w, event, params, num_params)
X    Widget w;
X    XEvent *event;
X    String *params;
X    Cardinal *num_params;
X{
X    FalseSignal = TRUE;
X    killpg(dbxpid, SIGQUIT);
X}
X
X
X/* 
X *  Dialog window has its own set of translations for editing.
X *  Special action procedures for keys Delete/Backspace, Carriage Return,
X *  Ctrl-U, Ctrl-C, Ctrl-D, Ctrl-\, and word selection.
X */
Xvoid CreateDialogWindow(parent)
XWidget parent;
X{
X    Arg 	args[MAXARGS];
X    Cardinal 	n;
X
X    static XtActionsRec dialog_actions[] = {
X	{"SigInt", 	(XtActionProc) SigInt},
X	{"SigEof", 	(XtActionProc) SigEof},
X	{"SigQuit", 	(XtActionProc) SigQuit},
X	{"InsertSpace", (XtActionProc) InsertSpace},
X	{"Dispatch", 	(XtActionProc) Dispatch},
X        {NULL, NULL}
X    };
X
X    static String translations = "#override\n\
X 	Ctrl<Key>C:	SigInt()\n\
X 	Ctrl<Key>D:	SigEof()\n\
X 	Ctrl<Key>|:	SigQuit()\n\
X 	Ctrl<Key>W:	DeleteWord()\n\
X 	Ctrl<Key>U:	DeleteLine()\n\
X 	Ctrl<Key>H:	InsertSpace() delete-previous-character()\n\
X 	<Key>Delete:	InsertSpace() delete-previous-character()\n\
X 	<Key>BackSpace:	InsertSpace() delete-previous-character()\n\
X 	<Key>Return:	newline() Dispatch()\n\
X    ";
X
X    n = 0;
X    XtSetArg(args[n], XtNuseStringInPlace, True);                       n++;
X    XtSetArg(args[n], XtNstring, (XtArgVal) DialogText);		n++;
X    XtSetArg(args[n], XtNlength, (XtArgVal) DIALOGSIZE);		n++;
X    XtSetArg(args[n], XtNeditType, (XtArgVal) XawtextAppend);		n++;
X    XtSetArg(args[n], XtNscrollVertical, XawtextScrollAlways);		n++;
X    XtSetArg(args[n], XtNwrap, XawtextWrapWord);			n++;
X    dialogWindow = XtCreateManagedWidget("dialogWindow", asciiTextWidgetClass,
X					 parent, args, n );
X    XtOverrideTranslations(dialogWindow, XtParseTranslationTable(translations));
X    XtAppAddActions(app_context, dialog_actions, XtNumber(dialog_actions));
X}
X
Xstatic void TextSetLastPos(w, lastPos)
XWidget w;
XXawTextPosition lastPos;
X{
X    TextWidget ctx = (TextWidget) w;
X    ctx->text.lastPos = lastPos;
X}
X 
Xvoid AppendDialogText(s)
X    char   *s;
X{
X    XawTextPosition     i, lastPos;
X    XawTextBlock        textblock, nullblock;
X    Arg 		args[MAXARGS];
X    Cardinal 		n;
X
X    if (!s || !strcmp(s, "")) return;
X
X    textblock.firstPos = 0;
X    textblock.length   = strlen(s);
X    textblock.ptr      = s;
X
X    lastPos = TextGetLastPos(dialogWindow);
X    if (textblock.length > DIALOGSIZE) {
X	bell(0);
X	fprintf(stderr, "xdbx error: cannot display string in dialogue window\n\
X            string has %d bytes; dialogue window size limit is %d bytes\n",
X	    textblock.length, DIALOGSIZE);
X        return;
X    }
X    if (lastPos + textblock.length > DIALOGSIZE) {
X	nullblock.firstPos = 0;
X	nullblock.length = 0;
X	nullblock.ptr = "";
X
X	i = textblock.length - (DIALOGSIZE - lastPos);
X	if (i < 0.9*DIALOGSIZE)
X	    i += 0.1*DIALOGSIZE;
X        while (DialogText[i] != '\n') i++;
X        XawTextReplace(dialogWindow, 0, i+1, &nullblock);
X    	lastPos = TextGetLastPos(dialogWindow);
X    }
X    XawTextReplace(dialogWindow, lastPos, lastPos, &textblock);
X    StartPos = TextGetLastPos(dialogWindow);
X    XawTextSetInsertionPoint(dialogWindow, StartPos);
X}
END_OF_FILE
if test 9512 -ne `wc -c <'dialog.c'`; then
    echo shar: \"'dialog.c'\" unpacked with wrong size!
fi
# end of 'dialog.c'
fi
if test -f 'global.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'global.h'\"
else
echo shar: Extracting \"'global.h'\" \(7090 characters\)
sed "s/^X//" >'global.h' <<'END_OF_FILE'
X/*****************************************************************************
X *
X *  xdbx - X Window System interface to the dbx debugger
X *
X *  Copyright 1989 The University of Texas at Austin
X *  Copyright 1990 Microelectronics and Computer Technology Corporation
X *
X *  Permission to use, copy, modify, and distribute this software and its
X *  documentation for any purpose and without fee is hereby granted,
X *  provided that the above copyright notice appear in all copies and that
X *  both that copyright notice and this permission notice appear in
X *  supporting documentation, and that the name of The University of Texas
X *  and Microelectronics and Computer Technology Corporation (MCC) not be 
X *  used in advertising or publicity pertaining to distribution of
X *  the software without specific, written prior permission.  The
X *  University of Texas and MCC makes no representations about the 
X *  suitability of this software for any purpose.  It is provided "as is" 
X *  without express or implied warranty.
X *
X *  THE UNIVERSITY OF TEXAS AND MCC DISCLAIMS ALL WARRANTIES WITH REGARD TO
X *  THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
X *  FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR MCC BE LIABLE FOR
X *  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
X *  RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X *  CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
X *  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X *
X *  Author:  	Po Cheung
X *  Created:   	March 10, 1989
X *
X *****************************************************************************/
X
X/*  global.h:
X *
X *    Contain extern declarations of variables and functions.
X */
X
X#include "defs.h"
X
X/* calldbx.c */
X
Xextern void		calldbx();		/* fork child, exec dbx */
X
X/* command.c */
X
Xextern void		CreateCommandPanel();
Xextern void		send_command();
Xextern char		*get_command();
Xextern void		insert_command();
Xextern void		delete_command();
X
X/* datadpy.c */
X
Xextern void		print_handler();	/* printing variables */
X
X/* dbx.c */
X
Xextern void		debug_init();		/* initial source display */
Xextern void 		read_dbx();		/* get data from dbx */
Xextern void 		write_dbx();		/* send data to dbx */
Xextern void		query_dbx();		/* ask dbx for info */
X
X/* dialog.c */
X
Xextern void		DeleteLine();		/* delete line action proc */
Xextern void		DeleteWord();		/* delete word action proc */
Xextern void		CreateDialogWindow();
Xextern void 		AppendDialogText();	/* append text to buffer */
X
X/* filemenu.c */
X
Xextern void		File();			/* file button callback */
X
X/* handler.c */
X
Xextern void		TextSetTopPosition();	/* sets topDisplayPosition */
Xextern void 		AdjustText();		/* adjust display position */
Xextern void 		exec_handler();		/* run, cont, next, step */
Xextern void 		done_handler();		/* run, cont, next, step */
Xextern void 		stop_at_handler();	/* stop at line */
Xextern void 		stop_in_handler();	/* stop in function */
Xextern void 		updown_handler();	/* move up/down the stack */
Xextern void 		delete_handler();	/* delete stop signs */
Xextern void 		func_handler();		/* display function */
Xextern void 		file_handler();		/* display file */
Xextern void 		debug_handler();	/* debug program */
Xextern void 		cd_handler();		/* change directory */
Xextern void 		pwd_handler();		/* print working directory */
Xextern void 		use_handler();		/* update use directory list */
Xextern void 		search_handler();	/* display searched string */
Xextern void 		list_handler();		/* list source code */
Xextern void 		display_handler();	/* show display variables */
X
X/* parser.c */
X
Xextern void		parser_init();		/* initialization */
Xextern void		parse();		/* parse dbx output */
Xextern void		filter();		/* modify dbx output */
X
X/* signals.c */
Xextern void		trap_signals();		/* signal handling for xdbx */
X
X/* signs.c */
X
Xextern void		signs_init();		/* initilalize routine */
Xextern void 		DisplayStop();		/* show stop sign */
Xextern void 		UpdateStops();		/* update position of stops */
Xextern void 		ClearStops();		/* mark all stops invalid */
Xextern void 		RemoveStop();		/* undisplay stop sign */
Xextern void 		UpdateArrow();		/* update position of arrow */
Xextern void 		UpdateUpdown();		/* update position of updown */
Xextern void 		UpdateBomb();		/* update position of bomb */
X
X/* source.c */
X
Xextern void		SelectStart();		/* modified select-start */
Xextern void		SelectEnd();		/* modified select-end */
Xextern void		SelectWord();		/* my select word */
Xextern void		PrintSelection();	/* select variable and print */
Xextern void		Update();		/* update line label */
Xextern void		source_init();		/* init routine */
Xextern void 		CreateSourceWindow();
Xextern int 		LoadFile();		/* display source file */
Xextern int 		LoadCurrentFile();	/* display source file */
Xextern char		*GetPathname();		/* get full path name of file */
Xextern void		MakeDirList();		/* maintain list of dirs */
X
X/* utils.c */
X
Xextern XawTextPosition	TextGetLastPos();	/* get last pos of text */
Xextern int 		TextPositionToLine();	/* convert line # to text pos */
Xextern int		LineToStop_no();	/* convert line # to stop # */
Xextern void 		DisableWindowResize();  /* do not allow window resize */
Xextern void 		bell();			/* sound bell */
Xextern char 		*concat();		/* substring search */
X
X/* windows.c */
X
Xextern void 		CreateSubWindows();	/* all subwindows of xdbx */
Xextern void 		UpdateFileLabel();	/* update current file name */
Xextern void 		UpdateLineLabel();	/* update current line num */
Xextern void 		UpdateMessageWindow();	/* update xdbx message */
X
X/* extern variables */
X
Xextern Display	*display;
Xextern XtAppContext 	app_context;
Xextern Widget	toplevel, fileWindow, 
X        	sourceForm, sourceWindow, messageWindow, commandWindow, 
X		dialogWindow, searchWindow, separator, displayWindow;
X
Xextern Cursor	watch;			/* XC_watch cursor */
Xextern XdbxResources app_resources;	/* application resources */
Xextern char	xdbxinit[];		/* initialization filename */
Xextern char	*dbxprompt;		/* dbx prompt string */
Xextern char	*xdbxprompt;		/* xdbx prompt string */
Xextern Boolean	Tstartup;
Xextern Boolean	debug;
X
Xextern FileRec   	*displayedFile;	/* pointer to current file info */
Xextern Tokens		Token;		/* token structure */
Xextern PatternRec       dataPattern[]; 	/* data display pattern */
X
Xextern Boolean 	Echo;			/* echo dbx output onto window ? */
Xextern Boolean	Prompt;			/* command or program input ? */
Xextern Boolean	Parse;			/* flag for parser */
Xextern Boolean	FalseSignal;		/* real/false signal ? */
Xextern Boolean	PopupMode;		/* True if graphical display */
Xextern int	dbxpid;			/* dbx process id */
Xextern FILE	*dbxfp;			/* file pointer to dbx process */
X
Xextern char 	CurrentFile[];		/* string for dbx output */
Xextern char 	cwd[];			/* current working directory of dbx */
X
Xextern Arrow    arrow;			/* arrow widget and mapped info */
Xextern Updown   updown;			/* updown widget and mapped info */
Xextern Stops    stops[];		/* stop widget and mapped info */
Xextern Bomb	bomb;			/* bomb widget and mapped info */
Xextern Cardinal nstops;			/* number of stops */
END_OF_FILE
if test 7090 -ne `wc -c <'global.h'`; then
    echo shar: \"'global.h'\" unpacked with wrong size!
fi
# end of 'global.h'
fi
echo shar: End of archive 2 \(of 7\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 5 6 7 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 7 archives.
    rm -f ark[1-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@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.