Only in ../xterm-X11R5: 00_TRANS.TBL diff --context --unidirectional-new-file ../xterm-X11R5/INSTALL ./INSTALL *** ../xterm-X11R5/INSTALL Wed Dec 31 19:00:00 1969 --- ./INSTALL Sat Nov 27 18:25:48 1993 *************** *** 0 **** --- 1,15 ---- + + Remember to add the following line to the XTerm app-defaults file: + + *color0: Black + *color1: Red + *color2: Green + *color3: Yellow + *color4: Blue + *color5: Magenta + *color6: Cyan + *color7: White + + + If you don't, you won't get the default colours. + diff --context --unidirectional-new-file ../xterm-X11R5/Imakefile ./Imakefile *** ../xterm-X11R5/Imakefile Sat Jan 1 12:31:21 1994 --- ./Imakefile Mon Dec 13 23:18:25 1993 *************** *** 27,39 **** -DOSMAJORVERSION=$(OSMAJORVERSION) \ -DOSMINORVERSION=$(OSMINORVERSION) MISC_DEFINES = /* -DALLOWLOGFILEEXEC */ SRCS1 = button.c charproc.c cursor.c data.c input.c \ main.c menu.c misc.c screen.c scrollbar.c tabs.c \ ! TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o \ screen.o scrollbar.o button.o Tekproc.o misc.o \ ! VTPrsTbl.o TekPrsTbl.o data.o menu.o SRCS2 = resize.c OBJS2 = resize.o SRCS = $(SRCS1) $(SRCS2) --- 27,40 ---- -DOSMAJORVERSION=$(OSMAJORVERSION) \ -DOSMINORVERSION=$(OSMINORVERSION) MISC_DEFINES = /* -DALLOWLOGFILEEXEC */ + DEFINES = -DBSAHAX SRCS1 = button.c charproc.c cursor.c data.c input.c \ main.c menu.c misc.c screen.c scrollbar.c tabs.c \ ! TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c keybuffer.c OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o \ screen.o scrollbar.o button.o Tekproc.o misc.o \ ! VTPrsTbl.o TekPrsTbl.o data.o menu.o keybuffer.o SRCS2 = resize.c OBJS2 = resize.o SRCS = $(SRCS1) $(SRCS2) Only in ../xterm-X11R5: Imakefile.orig diff --context --unidirectional-new-file ../xterm-X11R5/Makefile ./Makefile *** ../xterm-X11R5/Makefile Wed Dec 31 19:00:00 1969 --- ./Makefile Mon Dec 13 23:18:56 1993 *************** *** 0 **** --- 1,428 ---- + # Makefile generated by imake - do not edit! + # $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $ + + # ------------------------------------------------------------------------- + # Makefile generated from "Imake.tmpl" and + # $XFree86: mit/config/Imake.tmpl,v 2.6 1993/10/02 07:11:59 dawes Exp $ + # $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ + # + # Platform-specific parameters may be set in the appropriate .cf + # configuration files. Site-specific parameters should be set in the file + # site.def. Full rebuilds are recommended if any parameters are changed. + # + # If your C preprocessor does not define any unique symbols, you will need + # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing + # "make World" the first time). + # + + # ------------------------------------------------------------------------- + # site-specific configuration parameters that need to come before + # the platform-specific parameters - edit site.def to change + + # $XFree86: mit/config/site.def,v 2.23 1993/10/16 17:28:07 dawes Exp $ + # site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + # ------------------------------------------------------------------------- + # platform-specific configuration parameters - edit x386.cf to change + + # $XFree86: mit/config/x386.cf,v 2.27 1993/10/02 07:24:11 dawes Exp $ + # platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $ + + # ------------------------------------------------------------------------- + # XFree86 version definition + # $XFree86: mit/config/xf86_vers.def,v 2.7 1993/10/08 16:11:07 dawes Exp $ + + # ------------------------------------------------------------------------- + # XFree86 version: 2000 + # ------------------------------------------------------------------------- + + # $XFree86: mit/config/lnuxLib.rules,v 2.5 1993/10/06 14:53:01 dawes Exp $ + + DLL_BINDIR = /usr/dll/bin + + # operating system: Linux + + # ------------------------------------------------------------------------- + # site-specific configuration parameters that go after + # the platform-specific parameters - edit site.def to change + + # $XFree86: mit/config/site.def,v 2.23 1993/10/16 17:28:07 dawes Exp $ + # site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + SHELL = /bin/sh + + TOP = . + CURRENT_DIR = . + + AR = ar clq + BOOTSTRAPCFLAGS = + CC = gcc + AS = as + + LEX = flex + + YACC = bison -y + + COMPRESS = compress + CPP = /lib/cpp $(STD_CPP_DEFINES) + PREPROCESSCMD = /lib/cpp $(STD_CPP_DEFINES) + INSTALL = install + LD = ld + LINT = lint + LINTLIBFLAG = -C + LINTOPTS = -axz + LN = ln -s + MAKE = make + MV = mv + CP = cp + + RANLIB = ranlib + RANLIBINSTFLAGS = + + RM = rm -f + TROFF = psroff + MSMACROS = -ms + TBL = tbl + EQN = eqn + NROFF = nroff + NEQN = neqn + STD_INCLUDES = + STD_CPP_DEFINES = -traditional -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux + STD_DEFINES = -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux + EXTRA_LOAD_FLAGS = + EXTRA_LIBRARIES = + OS_LIBRARIES = + TAGS = ctags + + SHAREDCODEDEF = + SHLIBDEF = + + PROTO_DEFINES = -DFUNCPROTO=11 -DNARROWPROTO + + INSTPGMFLAGS = -s + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -s -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -s -m 4755 + + PROJECTROOT = /usr/X386 + + TOP_INCLUDES = -I$(INCROOT) + + CDEBUGFLAGS = -O2 + CCOPTIONS = -m486 -DNO_ASM -fwritable-strings + ANSICCOPTIONS = + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) + CFLAGS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) + + LDLIBS = $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR) + + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + + MACROFILE = x386.cf + RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut + + IMAKE_DEFINES = + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) + + # ------------------------------------------------------------------------- + # X Window System Build Parameters + # $XFree86: mit/config/Project.tmpl,v 2.1 1993/09/17 16:10:43 dawes Exp $ + # $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $ + + _percentC_ = %C + + # ------------------------------------------------------------------------- + # X Window System make variables; this need to be coordinated with rules + + PATHSEP = / + USRLIBDIR = /usr/X386/lib + BINDIR = /usr/X386/bin + INCROOT = /usr/X386/include + BUILDINCROOT = $(TOP) + BUILDINCDIR = $(BUILDINCROOT)/X11 + BUILDINCTOP = .. + INCDIR = $(INCROOT)/X11 + ADMDIR = /usr/adm + LIBDIR = $(USRLIBDIR)/X11 + CONFIGDIR = $(LIBDIR)/config + LINTLIBDIR = $(USRLIBDIR)/lint + + FONTDIR = $(LIBDIR)/fonts + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + MANPATH = /usr/X386/man + MANSOURCEPATH = $(MANPATH)/man + MANSUFFIX = 1x + LIBMANSUFFIX = 3x + FILEMANSUFFIX = 5x + MANDIR = $(MANSOURCEPATH)1 + LIBMANDIR = $(MANSOURCEPATH)3 + FILEMANDIR = $(MANSOURCEPATH)5 + NLSDIR = $(LIBDIR)/nls + PEXAPIDIR = $(LIBDIR)/PEX + XAPPLOADDIR = $(LIBDIR)/app-defaults + FONTCFLAGS = -t + LINKKITDIR = $(USRLIBDIR)/Server + + INSTAPPFLAGS = $(INSTDATFLAGS) + + IMAKE = imake + DEPEND = makedepend + RGB = rgb + + FONTC = bdftopcf + + MKFONTDIR = mkfontdir + MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier + + CONFIGSRC = $(TOP)/config + DOCUTILSRC = $(TOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + LIBSRC = $(TOP)/lib + FONTSRC = $(TOP)/fonts + INCLUDESRC = $(TOP)/X11 + SERVERSRC = $(TOP)/server + UTILSRC = $(TOP)/util + SCRIPTSRC = $(UTILSRC)/scripts + EXAMPLESRC = $(TOP)/examples + CONTRIBSRC = $(TOP)/../contrib + DOCSRC = $(TOP)/doc + RGBSRC = $(TOP)/rgb + DEPENDSRC = $(UTILSRC)/makedepend + IMAKESRC = $(CONFIGSRC) + XAUTHSRC = $(LIBSRC)/Xau + XLIBSRC = $(LIBSRC)/X + XMUSRC = $(LIBSRC)/Xmu + TOOLKITSRC = $(LIBSRC)/Xt + AWIDGETSRC = $(LIBSRC)/Xaw + OLDXLIBSRC = $(LIBSRC)/oldX + XDMCPLIBSRC = $(LIBSRC)/Xdmcp + BDFTOSNFSRC = $(FONTSRC)/bdftosnf + BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf + BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf + MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir + FSLIBSRC = $(FONTSRC)/lib/fs + FONTSERVERSRC = $(FONTSRC)/server + EXTENSIONSRC = $(TOP)/extensions + XILIBSRC = $(EXTENSIONSRC)/lib/xinput + PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib + PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX + + # $XFree86: mit/config/lnuxLib.tmpl,v 2.0 1993/08/29 14:15:39 dawes Exp $ + + SHLIBLDFLAGS = + PICFLAGS = -B/usr/dll/jump/ + + DEPEXTENSIONLIB = + EXTENSIONLIB = -lXext + + DEPXLIB = $(DEPEXTENSIONLIB) + XLIB = $(EXTENSIONLIB) -lX11 + + DEPXMULIB = + XMULIB = -lXmu + + DEPXTOOLLIB = + XTOOLLIB = -lXt + + DEPXAWLIB = + XAWLIB = -lXaw + + DEPXILIB = + XILIB = -lXi + + DEPXTESTLIB = + XTESTLIB = -lXtst + + DEPPEXLIB = + PEXLIB = -lPEX5 + + SOXLIBREV = 3.1.0 + SOXTREV = 3.1.0 + SOXAWREV = 3.1.0 + SOOLDXREV = 3.1.0 + SOXMUREV = 3.1.0 + SOXEXTREV = 3.1.0 + SOXINPUTREV = 3.1.0 + SOPEXREV = 1.1.0 + + DEPXAUTHLIB = $(USRLIBDIR)/libXau.a + XAUTHLIB = -lXau + DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a + XDMCPLIB = -lXdmcp + + DEPOLDXLIB = $(USRLIBDIR)/liboldX.a + OLDXLIB = -loldX + + DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a + PHIGSLIB = -lphigs + + DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a + XBSDLIB = -lXbsd + + LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln + LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln + LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln + LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + LINTXI = $(LINTLIBDIR)/llib-lXi.ln + LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln + LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + + # ------------------------------------------------------------------------- + # Imake rules for building libraries, programs, scripts, and data files + # $XFree86: mit/config/Imake.rules,v 2.1 1993/09/29 11:06:00 dawes Exp $ + # rules: $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $ + + # ------------------------------------------------------------------------- + # start of Imakefile + + # $XConsortium: Imakefile,v 1.56 92/03/11 17:35:22 gildea Exp $ + # + # Attention xterm porters + # + # + # Xterm assumes that bcopy can handle overlapping arguments. If your + # bcopy (or memcpy) cannot, write a routine called bcopy and link it in + # or add -Dbcopy=mybcopy to the DEFINES list below. + # + + OSMAJORVERSION = 99 + OSMINORVERSION = 12 + + MAIN_DEFINES = -DUTMP $(TTYGROUPDEF) $(PUCCPTYDDEF) -DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) + + MISC_DEFINES = + DEFINES = -DBSAHAX + + SRCS1 = button.c charproc.c cursor.c data.c input.c main.c menu.c misc.c screen.c scrollbar.c tabs.c TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c keybuffer.c + + OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o screen.o scrollbar.o button.o Tekproc.o misc.o VTPrsTbl.o TekPrsTbl.o data.o menu.o keybuffer.o + + SRCS2 = resize.c + OBJS2 = resize.o + SRCS = $(SRCS1) $(SRCS2) + OBJS = $(OBJS1) $(OBJS2) + PROGRAMS = resize xterm + DEPLIBS1 = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + DEPLIBS2 = + PROGRAMS = xterm resize + + TERMCAPLIB = -ltermcap + + all:: $(PROGRAMS) + + main.o: + $(RM) $@ + $(CC) -c $(CFLAGS) $(MAIN_DEFINES) $*.c + + misc.o: + $(RM) $@ + $(CC) -c $(CFLAGS) $(MISC_DEFINES) $*.c + + charproc.o: + $(RM) $@ + $(CC) -c $(CFLAGS) $(MISC_DEFINES) $*.c + + xterm: $(OBJS1) $(DEPLIBS1) + $(RM) $@ + $(CC) -o $@ $(OBJS1) $(LDOPTIONS) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(LDLIBS) $(TERMCAPLIB) $(PTYLIB) $(EXTRA_LOAD_FLAGS) + + clean:: + $(RM) xterm + + install:: xterm + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) $(INSTUIDFLAGS) xterm $(DESTDIR)$(BINDIR) + + resize: $(OBJS2) $(DEPLIBS2) + $(RM) $@ + $(CC) -o $@ $(OBJS2) $(LDOPTIONS) $(LDLIBS) $(TERMCAPLIB) $(EXTRA_LOAD_FLAGS) + + clean:: + $(RM) resize + + install:: resize + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) resize $(DESTDIR)$(BINDIR) + + install:: XTerm.ad + @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi + $(INSTALL) -c $(INSTAPPFLAGS) XTerm.ad $(DESTDIR)$(XAPPLOADDIR)/XTerm + + install.man:: xterm.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) xterm.man $(DESTDIR)$(MANDIR)/xterm.$(MANSUFFIX) + + install.man:: resize.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) resize.man $(DESTDIR)$(MANDIR)/resize.$(MANSUFFIX) + + depend:: + $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS) + + # ------------------------------------------------------------------------- + # common rules for all Makefiles - do not edit + + emptyrule:: + + clean:: + $(RM_CMD) "#"* + + Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + + tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + + # ------------------------------------------------------------------------- + # empty rules for directories that do not have SUBDIRS - do not edit + + install:: + @echo "install in $(CURRENT_DIR) done" + + install.man:: + @echo "install.man in $(CURRENT_DIR) done" + + install.linkkit:: + @echo "install.linkkit in $(CURRENT_DIR) done" + + Makefiles:: + + includes:: + + # ------------------------------------------------------------------------- + # dependencies generated by makedepend + diff --context --unidirectional-new-file ../xterm-X11R5/Makefile.bak ./Makefile.bak *** ../xterm-X11R5/Makefile.bak Wed Dec 31 19:00:00 1969 --- ./Makefile.bak Wed Dec 1 22:12:25 1993 *************** *** 0 **** --- 1,430 ---- + # Makefile generated by imake - do not edit! + # $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $ + + # ------------------------------------------------------------------------- + # Makefile generated from "Imake.tmpl" and + # $XFree86: mit/config/Imake.tmpl,v 2.6 1993/10/02 07:11:59 dawes Exp $ + # $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $ + # + # Platform-specific parameters may be set in the appropriate .cf + # configuration files. Site-specific parameters should be set in the file + # site.def. Full rebuilds are recommended if any parameters are changed. + # + # If your C preprocessor does not define any unique symbols, you will need + # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing + # "make World" the first time). + # + + # ------------------------------------------------------------------------- + # site-specific configuration parameters that need to come before + # the platform-specific parameters - edit site.def to change + + # $XFree86: mit/config/site.def,v 2.23 1993/10/16 17:28:07 dawes Exp $ + # site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + # ------------------------------------------------------------------------- + # platform-specific configuration parameters - edit x386.cf to change + + # $XFree86: mit/config/x386.cf,v 2.27 1993/10/02 07:24:11 dawes Exp $ + # platform: $XConsortium: x386.cf,v 1.7 91/08/16 19:30:10 gildea Exp $ + + # ------------------------------------------------------------------------- + # XFree86 version definition + # $XFree86: mit/config/xf86_vers.def,v 2.7 1993/10/08 16:11:07 dawes Exp $ + + # ------------------------------------------------------------------------- + # XFree86 version: 2000 + # ------------------------------------------------------------------------- + + # $XFree86: mit/config/lnuxLib.rules,v 2.5 1993/10/06 14:53:01 dawes Exp $ + + DLL_BINDIR = /usr/dll/bin + + # operating system: Linux + + # ------------------------------------------------------------------------- + # site-specific configuration parameters that go after + # the platform-specific parameters - edit site.def to change + + # $XFree86: mit/config/site.def,v 2.23 1993/10/16 17:28:07 dawes Exp $ + # site: $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $ + + SHELL = /bin/sh + + TOP = . + CURRENT_DIR = . + + AR = ar clq + BOOTSTRAPCFLAGS = + CC = gcc + AS = as + + LEX = flex + + YACC = bison -y + + COMPRESS = compress + CPP = /lib/cpp $(STD_CPP_DEFINES) + PREPROCESSCMD = /lib/cpp $(STD_CPP_DEFINES) + INSTALL = install + LD = ld + LINT = lint + LINTLIBFLAG = -C + LINTOPTS = -axz + LN = ln -s + MAKE = make + MV = mv + CP = cp + + RANLIB = ranlib + RANLIBINSTFLAGS = + + RM = rm -f + TROFF = psroff + MSMACROS = -ms + TBL = tbl + EQN = eqn + NROFF = nroff + NEQN = neqn + STD_INCLUDES = + STD_CPP_DEFINES = -traditional -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux + STD_DEFINES = -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -Dlinux + EXTRA_LOAD_FLAGS = + EXTRA_LIBRARIES = + OS_LIBRARIES = + TAGS = ctags + + SHAREDCODEDEF = + SHLIBDEF = + + PROTO_DEFINES = -DFUNCPROTO=11 -DNARROWPROTO + + INSTPGMFLAGS = -s + + INSTBINFLAGS = -m 0755 + INSTUIDFLAGS = -s -m 4755 + INSTLIBFLAGS = -m 0644 + INSTINCFLAGS = -m 0444 + INSTMANFLAGS = -m 0444 + INSTDATFLAGS = -m 0444 + INSTKMEMFLAGS = -s -m 4755 + + PROJECTROOT = /usr/X386 + + TOP_INCLUDES = -I$(INCROOT) + + CDEBUGFLAGS = -O2 + CCOPTIONS = -m486 -DNO_ASM -fwritable-strings + ANSICCOPTIONS = + + ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES) + ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES) + CFLAGS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) + LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) + + LDLIBS = $(OS_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) + + LDOPTIONS = $(ANSICCOPTIONS) $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS) -L$(USRLIBDIR) + + LDCOMBINEFLAGS = -r + DEPENDFLAGS = + + MACROFILE = x386.cf + RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut + + IMAKE_DEFINES = + + IRULESRC = $(CONFIGDIR) + IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) + + ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) + + # ------------------------------------------------------------------------- + # X Window System Build Parameters + # $XFree86: mit/config/Project.tmpl,v 2.1 1993/09/17 16:10:43 dawes Exp $ + # $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $ + + _percentC_ = %C + + # ------------------------------------------------------------------------- + # X Window System make variables; this need to be coordinated with rules + + PATHSEP = / + USRLIBDIR = /usr/X386/lib + BINDIR = /usr/X386/bin + INCROOT = /usr/X386/include + BUILDINCROOT = $(TOP) + BUILDINCDIR = $(BUILDINCROOT)/X11 + BUILDINCTOP = .. + INCDIR = $(INCROOT)/X11 + ADMDIR = /usr/adm + LIBDIR = $(USRLIBDIR)/X11 + CONFIGDIR = $(LIBDIR)/config + LINTLIBDIR = $(USRLIBDIR)/lint + + FONTDIR = $(LIBDIR)/fonts + XINITDIR = $(LIBDIR)/xinit + XDMDIR = $(LIBDIR)/xdm + TWMDIR = $(LIBDIR)/twm + MANPATH = /usr/X386/man + MANSOURCEPATH = $(MANPATH)/man + MANSUFFIX = 1x + LIBMANSUFFIX = 3x + FILEMANSUFFIX = 5x + MANDIR = $(MANSOURCEPATH)1 + LIBMANDIR = $(MANSOURCEPATH)3 + FILEMANDIR = $(MANSOURCEPATH)5 + NLSDIR = $(LIBDIR)/nls + PEXAPIDIR = $(LIBDIR)/PEX + XAPPLOADDIR = $(LIBDIR)/app-defaults + FONTCFLAGS = -t + LINKKITDIR = $(USRLIBDIR)/Server + + INSTAPPFLAGS = $(INSTDATFLAGS) + + IMAKE = imake + DEPEND = makedepend + RGB = rgb + + FONTC = bdftopcf + + MKFONTDIR = mkfontdir + MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier + + CONFIGSRC = $(TOP)/config + DOCUTILSRC = $(TOP)/doc/util + CLIENTSRC = $(TOP)/clients + DEMOSRC = $(TOP)/demos + LIBSRC = $(TOP)/lib + FONTSRC = $(TOP)/fonts + INCLUDESRC = $(TOP)/X11 + SERVERSRC = $(TOP)/server + UTILSRC = $(TOP)/util + SCRIPTSRC = $(UTILSRC)/scripts + EXAMPLESRC = $(TOP)/examples + CONTRIBSRC = $(TOP)/../contrib + DOCSRC = $(TOP)/doc + RGBSRC = $(TOP)/rgb + DEPENDSRC = $(UTILSRC)/makedepend + IMAKESRC = $(CONFIGSRC) + XAUTHSRC = $(LIBSRC)/Xau + XLIBSRC = $(LIBSRC)/X + XMUSRC = $(LIBSRC)/Xmu + TOOLKITSRC = $(LIBSRC)/Xt + AWIDGETSRC = $(LIBSRC)/Xaw + OLDXLIBSRC = $(LIBSRC)/oldX + XDMCPLIBSRC = $(LIBSRC)/Xdmcp + BDFTOSNFSRC = $(FONTSRC)/bdftosnf + BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf + BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf + MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir + FSLIBSRC = $(FONTSRC)/lib/fs + FONTSERVERSRC = $(FONTSRC)/server + EXTENSIONSRC = $(TOP)/extensions + XILIBSRC = $(EXTENSIONSRC)/lib/xinput + PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib + PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX + + # $XFree86: mit/config/lnuxLib.tmpl,v 2.0 1993/08/29 14:15:39 dawes Exp $ + + SHLIBLDFLAGS = + PICFLAGS = -B/usr/dll/jump/ + + DEPEXTENSIONLIB = + EXTENSIONLIB = -lXext + + DEPXLIB = $(DEPEXTENSIONLIB) + XLIB = $(EXTENSIONLIB) -lX11 + + DEPXMULIB = + XMULIB = -lXmu + + DEPXTOOLLIB = + XTOOLLIB = -lXt + + DEPXAWLIB = + XAWLIB = -lXaw + + DEPXILIB = + XILIB = -lXi + + DEPXTESTLIB = + XTESTLIB = -lXtst + + DEPPEXLIB = + PEXLIB = -lPEX5 + + SOXLIBREV = 3.1.0 + SOXTREV = 3.1.0 + SOXAWREV = 3.1.0 + SOOLDXREV = 3.1.0 + SOXMUREV = 3.1.0 + SOXEXTREV = 3.1.0 + SOXINPUTREV = 3.1.0 + SOPEXREV = 1.1.0 + + DEPXAUTHLIB = $(USRLIBDIR)/libXau.a + XAUTHLIB = -lXau + DEPXDMCPLIB = $(USRLIBDIR)/libXdmcp.a + XDMCPLIB = -lXdmcp + + DEPOLDXLIB = $(USRLIBDIR)/liboldX.a + OLDXLIB = -loldX + + DEPPHIGSLIB = $(USRLIBDIR)/libphigs.a + PHIGSLIB = -lphigs + + DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a + XBSDLIB = -lXbsd + + LINTEXTENSIONLIB = $(LINTLIBDIR)/llib-lXext.ln + LINTXLIB = $(LINTLIBDIR)/llib-lX11.ln + LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln + LINTXTOOL = $(LINTLIBDIR)/llib-lXt.ln + LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln + LINTXI = $(LINTLIBDIR)/llib-lXi.ln + LINTPEX = $(LINTLIBDIR)/llib-lPEX5.ln + LINTPHIGS = $(LINTLIBDIR)/llib-lphigs.ln + + DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + + DEPLIBS1 = $(DEPLIBS) + DEPLIBS2 = $(DEPLIBS) + DEPLIBS3 = $(DEPLIBS) + + # ------------------------------------------------------------------------- + # Imake rules for building libraries, programs, scripts, and data files + # $XFree86: mit/config/Imake.rules,v 2.1 1993/09/29 11:06:00 dawes Exp $ + # rules: $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $ + + # ------------------------------------------------------------------------- + # start of Imakefile + + # $XConsortium: Imakefile,v 1.56 92/03/11 17:35:22 gildea Exp $ + # + # Attention xterm porters + # + # + # Xterm assumes that bcopy can handle overlapping arguments. If your + # bcopy (or memcpy) cannot, write a routine called bcopy and link it in + # or add -Dbcopy=mybcopy to the DEFINES list below. + # + + CC = cc -static + + OSMAJORVERSION = 99 + OSMINORVERSION = 12 + + MAIN_DEFINES = -DUTMP $(TTYGROUPDEF) $(PUCCPTYDDEF) -DOSMAJORVERSION=$(OSMAJORVERSION) -DOSMINORVERSION=$(OSMINORVERSION) + + MISC_DEFINES = + DEFINES = -DBSAHAX + + SRCS1 = button.c charproc.c cursor.c data.c input.c main.c menu.c misc.c screen.c scrollbar.c tabs.c TekPrsTbl.c Tekproc.c util.c VTPrsTbl.c keybuffer.c + + OBJS1 = main.o input.o charproc.o cursor.o util.o tabs.o screen.o scrollbar.o button.o Tekproc.o misc.o VTPrsTbl.o TekPrsTbl.o data.o menu.o keybuffer.o + + SRCS2 = resize.c + OBJS2 = resize.o + SRCS = $(SRCS1) $(SRCS2) + OBJS = $(OBJS1) $(OBJS2) + PROGRAMS = resize xterm + DEPLIBS1 = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) + DEPLIBS2 = + PROGRAMS = xterm resize + + TERMCAPLIB = -ltermcap + + all:: $(PROGRAMS) + + main.o: + $(RM) $@ + $(CC) -c $(CFLAGS) $(MAIN_DEFINES) $*.c + + misc.o: + $(RM) $@ + $(CC) -c $(CFLAGS) $(MISC_DEFINES) $*.c + + charproc.o: + $(RM) $@ + $(CC) -c $(CFLAGS) $(MISC_DEFINES) $*.c + + xterm: $(OBJS1) $(DEPLIBS1) + $(RM) $@ + $(CC) -o $@ $(OBJS1) $(LDOPTIONS) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(LDLIBS) $(TERMCAPLIB) $(PTYLIB) $(EXTRA_LOAD_FLAGS) + + clean:: + $(RM) xterm + + install:: xterm + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) $(INSTUIDFLAGS) xterm $(DESTDIR)$(BINDIR) + + resize: $(OBJS2) $(DEPLIBS2) + $(RM) $@ + $(CC) -o $@ $(OBJS2) $(LDOPTIONS) $(LDLIBS) $(TERMCAPLIB) $(EXTRA_LOAD_FLAGS) + + clean:: + $(RM) resize + + install:: resize + @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi + $(INSTALL) -c $(INSTPGMFLAGS) resize $(DESTDIR)$(BINDIR) + + install:: XTerm.ad + @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); fi + $(INSTALL) -c $(INSTAPPFLAGS) XTerm.ad $(DESTDIR)$(XAPPLOADDIR)/XTerm + + install.man:: xterm.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) xterm.man $(DESTDIR)$(MANDIR)/xterm.$(MANSUFFIX) + + install.man:: resize.man + @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \ + else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi + $(INSTALL) -c $(INSTMANFLAGS) resize.man $(DESTDIR)$(MANDIR)/resize.$(MANSUFFIX) + + depend:: + $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS) + + # ------------------------------------------------------------------------- + # common rules for all Makefiles - do not edit + + emptyrule:: + + clean:: + $(RM_CMD) "#"* + + Makefile:: + -@if [ -f Makefile ]; then set -x; \ + $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ + else exit 0; fi + $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) + + tags:: + $(TAGS) -w *.[ch] + $(TAGS) -xw *.[ch] > TAGS + + # ------------------------------------------------------------------------- + # empty rules for directories that do not have SUBDIRS - do not edit + + install:: + @echo "install in $(CURRENT_DIR) done" + + install.man:: + @echo "install.man in $(CURRENT_DIR) done" + + install.linkkit:: + @echo "install.linkkit in $(CURRENT_DIR) done" + + Makefiles:: + + includes:: + + # ------------------------------------------------------------------------- + # dependencies generated by makedepend + Only in ../xterm-X11R5: README diff --context --unidirectional-new-file ../xterm-X11R5/README.X11R5 ./README.X11R5 *** ../xterm-X11R5/README.X11R5 Wed Dec 31 19:00:00 1969 --- ./README.X11R5 Sat Nov 27 18:25:42 1993 *************** *** 0 **** --- 1,15 ---- + Abandon All Hope, Ye Who Enter Here + + + This is undoubtedly the most ugly program in the distribution. It was one of + the first "serious" programs ported, and still has a lot of historical baggage. + Ideally, there would be a general tty widget and then vt102 and tek4014 + subwidgets so that they could be used in other programs. We are trying to + clean things up as we go, but there is still a lot of work to do. + + If you are porting this to a machine that has problems with overlapping + bcopy's, watch out! + + There are two documents on xterm: the man page, xterm.man, which describes + how to use it, and ctlseq.ms, which describes the control sequences it + understands. diff --context --unidirectional-new-file ../xterm-X11R5/README.bc ./README.bc *** ../xterm-X11R5/README.bc Wed Dec 31 19:00:00 1969 --- ./README.bc Sat Jan 1 12:59:11 1994 *************** *** 0 **** --- 1,48 ---- + This directory contains an R5 xterm patched with the color xterm patches from + Tom Weinstein, and some patches of my own: + + * Linux /proc/kmsg-based console messages (this works much better than the + default under older kernels, but doesn't seem as effective under pl14; I + need to work on this), controlled by the compile-time define CONSLOG; + + * PC ANSI.SYS-style bold colors. If you enable this with the -co option or + the "VT100.boldColors" resource or by selecting "Bold Colors" from the VT + Options menu, then the combination of ISO colors and bold will produce + another color. The colors are selected with resources "color0bold", ..., + "color7bold", analogous to color xterm's "color0" ... "color7". These are + not based on the existing patches. + + * The .bc option, the "VT100.cursorBlink" resource, or the "Blinking Cursor" + item on the "VT Options" menu will cause the VT100 cursor to blink. The + blink rate is set with the "VT100.blinkRate" resource, and is specified in + milliseconds between state changes. + + * The -kb option, the ".useKeyBuffer" resource, or the "Buffered Keyboard" + item on the VT Options menu (this is misplaced...) enables a keyboard buffer + widget. This is for use with communications programs like cu/tip, Seyon, + JNOS/Linux [ :-) ], etc. This widget is still moderately stupid in that it + doesn't handle resize requests very well; I'm still working on that. + + I have also changed the app-defaults file to reverse color0 and color7 (and + color0bold and color7bold) so that when color is in use it does something + sensible on the default black-on-white xterm. This could cause surprises when + used white-on-black for PC BBSes. I'm still working on a way to handle this + better; in the meantime, GNU's color ls works much more nicely with this xterm + in both color and PC-color modes, and the xterm is perfectly usable as a + default xterm. + + xterm-bc.ti is a terminfo description for xterm-bc that works with Linux. I'm + uncertain as to how the function keys will work on other systems; the function + keys are incompatible with e.g. those found in Zeyd Ben-Halim's ncurses + distribution. I don't have an alternative termcap, but how many termcap-using + programs know about color? Programs which use terminfo-based color and line + graphics works fine with this terminfo entry. + + I re-diffed these from the MIT xterm sources found on the December 1992 Walnut + Creek X11R5/GNU CDROM, so hopefully the problems with the earlier patch have + been resolved. Be aware that I followed my custom of configuring the Linux + version as an SVR4 derivative, not as a BSD one. + + Brandon S. Allbery + bsa@kf8nh.wariat.org + January 1, 1994 diff --context --unidirectional-new-file ../xterm-X11R5/README.color ./README.color *** ../xterm-X11R5/README.color Wed Dec 31 19:00:00 1969 --- ./README.color Sat Nov 27 18:25:48 1993 *************** *** 0 **** --- 1,72 ---- + Well, here it is, finally. This is basically an R4 xterm with lots of + changes. The major changes are listed below. I should emphasize that + no differences from the raw R4 xterm are in any way official MIT stuff. + + A lot of this was done in our spare time, and Silicon Graphics takes + absolutely no responsibility for any of this. The authors of the + major pieces of code are listed purely to give credit where credit + is due. Please don't bother anyone but me about this, as Erik and Paul + are both extremely busy guys. + + It is conceivable that I will continue to work on the color stuff now + that I'm going to be back at school, so if anyone wants to fix + something, or enhance something I'll be happy to take your patches. + + Here are the major changes we've made: + + 1) Rearranged and rewrote most of main.c + + Paul Shupak (shupak@esd.sgi.com) did most of this. + + 2) Added ISO 6429 support for color text. You can set the foreground + and background color for text using SGR. For example, to make the + foreground red, you do: "^[[31m". The values from 30 to 37 set + foreground, those from 40 to 47 set background. The default colors + are: + 0) black 1) red 2) green 3) yellow 4) blue 5) magenta + 6) cyan 7) white + + These are settable with the resources "color0" to "color1". + + 3) Added a resource, menu option, and command line flag for selecting + between scrolling by bliting the window, and scrolling by redrawing + the whole window. On some servers (most notably SGI's ;-) redrawing + is faster than bliting. The command line flags are -blt/+blt, and + the resource is "bltScroll". + + Both 2) and 3) are the fault of me, Tom Weinstein. + (tomw@esd.sgi.com, tom@bears.ucsb.edu) + + NOTE: I'll be back at ucsb after Sept 19th, and my sgi + address will no longer be valid. + + 4) Added escape sequences to set the primary rendition text foreground + color, background color, text cursor color, mouse foreground and + background colors and the Tektronix mode Foreground and Background + colors. These are done with a 'Set Text Parameters' control sequence + (^[]Ps^G) where Ps is 10-16 followed by a list of color names. For + more details, see the cltseqs document. This feature can be enabled + with the dynamicColor resource. One useful trick you can do with + this feature is to have different color backgrounds depending on what + machine you are logged onto. A simple escape sequence in your prompt + string ensures that the color is right, even when you rlogin to + another machine. + + This was designed and implemented by Erik Fortune (erik@esd.sgi.com). + + + One thing to note is that the ANSI color, and the dynamic color features + are totally orthogonal and use completely different color + representations. The ANSI color uses eight predefined colors, and the + dynamic color uses color names, include #NNN specifications. + + Tom Weinstein + Silicon Graphics, Inc., Entry Systems Division, Window Systems + tomw@orac.esd.sgi.com + Any opinions expressed above are mine, not sgi's. + + **************************************************************** + * * + * NOTE: After Sept 19th, my address will be tom@bears.ucsb.edu * + * * + **************************************************************** diff --context --unidirectional-new-file ../xterm-X11R5/Tekproc.c ./Tekproc.c *** ../xterm-X11R5/Tekproc.c Sat Jan 1 12:31:23 1994 --- ./Tekproc.c Sat Nov 27 18:25:43 1993 *************** *** 1438,1443 **** --- 1438,1490 ---- if (!Ttoggled) TCursorToggle(TOGGLE); } + void + ChangeTekColors(screen,pNew) + register TScreen *screen; + ScrnColors *pNew; + { + register int i; + XGCValues gcv; + + + if (COLOR_DEFINED(pNew,TEK_FG)) { + screen->Tforeground= COLOR_VALUE(pNew,TEK_FG); + XSetForeground(screen->display,screen->TnormalGC, + screen->Tforeground); + } + if (COLOR_DEFINED(pNew,TEK_BG)) { + screen->Tbackground= COLOR_VALUE(pNew,TEK_BG); + XSetBackground(screen->display,screen->TnormalGC, + screen->Tbackground); + } + + + if (tekWidget) { + if (tekWidget->core.border_pixel == screen->Tbackground) { + tekWidget->core.border_pixel = screen->Tforeground; + tekWidget->core.parent->core.border_pixel = + screen->Tforeground; + if (tekWidget->core.parent->core.window) + XSetWindowBorder (screen->display, + tekWidget->core.parent->core.window, + tekWidget->core.border_pixel); + } + } + + for(i = 0 ; i < TEKNUMLINES ; i++) { + XSetForeground(screen->display, screen->linepat[i], + screen->Tforeground); + } + + screen->Tcursorcolor = screen->Tforeground; + + gcv.plane_mask = screen->xorplane = (screen->Tbackground ^ + screen->Tcursorcolor); + XChangeGC (screen->display, screen->TcursorGC, GCPlaneMask, &gcv); + TekBackground(screen); + return; + } + TekReverseVideo(screen) register TScreen *screen; { diff --context --unidirectional-new-file ../xterm-X11R5/XTerm.ad ./XTerm.ad *** ../xterm-X11R5/XTerm.ad Sat Jan 1 12:31:25 1994 --- ./XTerm.ad Thu Dec 23 22:26:26 1993 *************** *** 76,78 **** --- 76,124 ---- *tek4014*font3: 6x13 *tek4014*fontSmall: 6x10 + ! Resources for R5 xterm BSAHAX + *vtMenu*keybuffer*Label: Buffered Keyboard + *vtMenu*blink*Label: Blinking Cursor + *vtMenu*pcbold*Label: Bold Colors + + *buffer.wrap: word + + *send.accelerators: #override\n\ + Return: set() notify() unset() + *send.fromVert: buffer + *send.label: Transmit + *send.shapeStyle: oval + + *clear.label: Clear + *clear.shapeStyle: oval + *clear.fromHoriz: send + *clear.fromVert: buffer + + *hide.label: Hide + *hide.shapeStyle: oval + *hide.fromHoriz: clear + *hide.fromVert: buffer + + ! This is a hack for the bold color mod. I eventually would like to make + ! color0 and color7 (and their bold equivalents) be based on the defined + ! background and foreground, which will look a little strange if you use weird + ! colors (JNOS/Linux's trace window is navajo white on dark slate blue :-) but + ! will look LESS weird than typical PC-ANSI color use in a typical black-on- + ! white xterm while not breaking white-on-black xterms. Stay tuned for this. + + *color0: white + *color1: #7f0000 + *color2: #007f00 + *color3: #7f7f00 + *color4: #0000bf + *color5: #7f007f + *color6: #007f7f + *color7: gray66 + *color0bold: gray33 + *color1bold: red + *color2bold: green + *color3bold: yellow + *color4bold: blue + *color5bold: magenta + *color6bold: cyan + *color7bold: black diff --context --unidirectional-new-file ../xterm-X11R5/button.c ./button.c *** ../xterm-X11R5/button.c Sat Jan 1 12:31:19 1994 --- ./button.c Sat Nov 27 18:25:42 1993 *************** *** 773,779 **** register Char *ch; for ( i = screen->max_col, ! ch = screen->buf[2 * (row + screen->topline) + 1] + i ; i >= 0 && !(*ch & CHARDRAWN) ; ch--, i--) ; --- 773,779 ---- register Char *ch; for ( i = screen->max_col, ! ch = screen->buf[4 * (row + screen->topline) + 1] + i ; i >= 0 && !(*ch & CHARDRAWN) ; ch--, i--) ; *************** *** 912,918 **** startSCol = 0; startSRow++; } else { ! ptr = screen->buf[2*(startSRow+screen->topline)] + startSCol; class = charClass[*ptr]; do { --- 912,918 ---- startSCol = 0; startSRow++; } else { ! ptr = screen->buf[4*(startSRow+screen->topline)] + startSCol; class = charClass[*ptr]; do { *************** *** 927,933 **** endSRow++; } else { length = LastTextCol(endSRow); ! ptr = screen->buf[2*(endSRow+screen->topline)] + endSCol; class = charClass[*ptr]; do { --- 927,933 ---- endSRow++; } else { length = LastTextCol(endSRow); ! ptr = screen->buf[4*(endSRow+screen->topline)] + endSCol; class = charClass[*ptr]; do { *************** *** 1354,1360 **** int *eol; { register int i = 0; ! register Char *ch = screen->buf[2 * (row + screen->topline)]; Char attr; register int c; --- 1354,1360 ---- int *eol; { register int i = 0; ! register Char *ch = screen->buf[4 * (row + screen->topline)]; Char attr; register int c; diff --context --unidirectional-new-file ../xterm-X11R5/charproc.c ./charproc.c *** ../xterm-X11R5/charproc.c Sat Jan 1 12:31:20 1994 --- ./charproc.c Fri Dec 24 11:29:16 1993 *************** *** 81,86 **** --- 81,89 ---- #define TRACKTIMESEC 4L #define TRACKTIMEUSEC 0L #define BELLSUPPRESSMSEC 200 + #ifdef BSAHAX + #define BLINKRATEMSEC 500 + #endif #define XtNalwaysHighlight "alwaysHighlight" #define XtNappcursorDefault "appcursorDefault" *************** *** 91,96 **** --- 94,120 ---- #define XtNcharClass "charClass" #define XtNcurses "curses" #define XtNcursorColor "cursorColor" + #define XtNcolor0 "color0" + #define XtNcolor1 "color1" + #define XtNcolor2 "color2" + #define XtNcolor3 "color3" + #define XtNcolor4 "color4" + #define XtNcolor5 "color5" + #define XtNcolor6 "color6" + #define XtNcolor7 "color7" + #ifdef BSAHAX + #define XtNcolor0bold "color0bold" + #define XtNcolor1bold "color1bold" + #define XtNcolor2bold "color2bold" + #define XtNcolor3bold "color3bold" + #define XtNcolor4bold "color4bold" + #define XtNcolor5bold "color5bold" + #define XtNcolor6bold "color6bold" + #define XtNcolor7bold "color7bold" + #define XtNcursorBlink "cursorBlink" + #define XtNblinkRate "blinkRate" + #define XtNboldColors "boldColors" + #endif #define XtNcutNewline "cutNewline" #define XtNcutToBeginningOfLine "cutToBeginningOfLine" #define XtNeightBitInput "eightBitInput" *************** *** 164,169 **** --- 188,198 ---- #define XtCTiteInhibit "TiteInhibit" #define XtCVisualBell "VisualBell" #define XtCAllowSendEvents "AllowSendEvents" + #ifdef BSAHAX + #define XtCCursorBlink "CursorBlink" + #define XtCBlinkRate "BlinkRate" + #define XtCBoldColors "BoldColors" + #endif #define doinput() (bcnt-- > 0 ? *bptr++ : in_put()) *************** *** 175,180 **** --- 204,213 ---- static unsigned long ntotal; static jmp_buf vtjmpbuf; + #ifdef BSAHAX + static int blink_hack[2]; + #endif + extern int groundtable[]; extern int csitable[]; extern int dectable[]; *************** *** 208,213 **** --- 241,249 ---- extern void HandleCreateMenu(), HandlePopupMenu(); extern void HandleSetFont(); extern void SetVTFont(); + #ifdef BSAHAX + extern void HandleKeyBuffer(), HandleBlink(), HandlePcBold(); + #endif extern Boolean SendMousePosition(); extern void ScrnSetAttributes(); *************** *** 228,233 **** --- 264,272 ---- static int defaultNMarginBell = N_MARGINBELL; static int defaultMultiClickTime = MULTICLICKTIME; static int defaultBellSuppressTime = BELLSUPPRESSMSEC; + #ifdef BSAHAX + static int defaultBlinkRate = BLINKRATEMSEC; + #endif static char * _Font_Selected_ = "yes"; /* string is arbitrary */ /* *************** *** 314,319 **** --- 353,363 ---- { "tek-reset", HandleTekReset }, { "tek-copy", HandleTekCopy }, { "visual-bell", HandleVisualBell }, + #ifdef BSAHAX + { "set-keybuffer", HandleKeyBuffer, }, + { "set-blink", HandleBlink, }, + { "set-pcbold", HandlePcBold, }, + #endif }; static XtResource resources[] = { *************** *** 347,352 **** --- 391,455 ---- {XtNcursorColor, XtCForeground, XtRPixel, sizeof(Pixel), XtOffsetOf(XtermWidgetRec, screen.cursorcolor), XtRString, "XtDefaultForeground"}, + {XtNcolor0, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_0]), + XtRString, "XtDefaultForeground"}, + {XtNcolor1, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_1]), + XtRString, "XtDefaultForeground"}, + {XtNcolor2, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_2]), + XtRString, "XtDefaultForeground"}, + {XtNcolor3, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_3]), + XtRString, "XtDefaultForeground"}, + {XtNcolor4, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_4]), + XtRString, "XtDefaultForeground"}, + {XtNcolor5, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_5]), + XtRString, "XtDefaultForeground"}, + {XtNcolor6, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_6]), + XtRString, "XtDefaultForeground"}, + {XtNcolor7, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_7]), + XtRString, "XtDefaultForeground"}, + #ifdef BSAHAX + {XtNcolor0bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_0_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcolor1bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_1_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcolor2bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_2_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcolor3bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_3_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcolor4bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_4_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcolor5bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_5_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcolor6bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_6_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcolor7bold, XtCForeground, XtRPixel, sizeof(Pixel), + XtOffsetOf(XtermWidgetRec, screen.colors[COLOR_7_BOLD]), + XtRString, "XtDefaultForeground"}, + {XtNcursorBlink, XtCCursorBlink, XtRBoolean, sizeof(Boolean), + XtOffsetOf(XtermWidgetRec, screen.cursor_doblink), + XtRBoolean, (caddr_t) &defaultFALSE}, + {XtNblinkRate, XtCBlinkRate, XtRInt, sizeof(int), + XtOffsetOf(XtermWidgetRec, screen.blink_rate), + XtRInt, (caddr_t) &defaultBlinkRate}, + {XtNboldColors, XtCBoldColors, XtRBoolean, sizeof(Boolean), + XtOffsetOf(XtermWidgetRec, screen.bold_colors), + XtRBoolean, (caddr_t) &defaultFALSE}, + #endif {XtNeightBitInput, XtCEightBitInput, XtRBoolean, sizeof(Boolean), XtOffsetOf(XtermWidgetRec, screen.input_eight_bits), XtRBoolean, (caddr_t) &defaultTRUE}, *************** *** 476,481 **** --- 579,587 ---- {"font6", "Font6", XtRString, sizeof(String), XtOffsetOf(XtermWidgetRec, screen.menu_font_names[fontMenu_font6]), XtRString, (caddr_t) NULL}, + {"dynamicColors", "DynamicColors", XtRBoolean, sizeof(Boolean), + XtOffsetOf(XtermWidgetRec, misc.dynamicColors), + XtRBoolean, (caddr_t) &defaultTRUE} }; static void VTClassInit(); *************** *** 551,562 **** --- 657,672 ---- } if(screen->curss) { dotext(screen, term->flags, + term->cur_foreground, + term->cur_background, screen->gsets[screen->curss], bptr, bptr + 1); screen->curss = 0; bptr++; } if(bptr < cp) dotext(screen, term->flags, + term->cur_foreground, + term->cur_background, screen->gsets[screen->curgl], bptr, cp); bptr = cp; break; *************** *** 842,858 **** switch (param[row]) { case DEFAULT: case 0: ! term->flags &= ~(INVERSE|BOLD|UNDERLINE); break; case 1: case 5: /* Blink, really. */ term->flags |= BOLD; break; case 4: /* Underscore */ term->flags |= UNDERLINE; break; case 7: term->flags |= INVERSE; } } parsestate = groundtable; --- 952,1041 ---- switch (param[row]) { case DEFAULT: case 0: ! #ifdef BSAHAX ! case 20: /* not sure if this is right... */ ! #endif ! term->flags &= ! ~(INVERSE|BOLD|UNDERLINE|FG_COLOR| ! BG_COLOR|DIM); break; case 1: case 5: /* Blink, really. */ + #ifdef BSAHAX + if (screen->bold_colors && + term->flags & FG_COLOR) + { + term->cur_foreground |= 8; + break; + } + #endif term->flags |= BOLD; break; + case 2: + term->flags |= DIM; + break; case 4: /* Underscore */ term->flags |= UNDERLINE; break; case 7: term->flags |= INVERSE; + break; + #ifdef BSAHAX + /* + * These are for both enhanced-VTxxx modes and + * to make 16-color handling work better: we + * specifically need "bold off". + */ + case 21: + case 25: + if (screen->bold_colors && + term->flags & FG_COLOR) + { + term->cur_foreground &= ~8; + break; + } + term->flags &= ~BOLD; + break; + case 22: + term->flags &= ~DIM; + break; + case 24: + term->flags &= ~UNDERLINE; + break; + case 27: + term->flags &= ~INVERSE; + break; + #endif + case 30: + case 31: + case 32: + case 33: + case 34: + case 35: + case 36: + case 37: + term->flags |= FG_COLOR; + term->cur_foreground = param[row] - 30; + #ifdef BSAHAX + if (screen->bold_colors && + term->flags & BOLD) + { + term->flags &= ~BOLD; + term->cur_foreground += 8; + } + #endif + break; + case 40: + case 41: + case 42: + case 43: + case 44: + case 45: + case 46: + case 47: + term->flags |= BG_COLOR; + term->cur_background = param[row] - 40; + break; } } parsestate = groundtable; *************** *** 940,948 **** if(screen->cursor_state) HideCursor(); for(row = screen->max_row ; row >= 0 ; row--) { ! bzero(screen->buf[2 * row + 1], col = screen->max_col + 1); ! for(cp = (unsigned char *)screen->buf[2 * row] ; col > 0 ; col--) *cp++ = (unsigned char) 'E'; } ScrnRefresh(screen, 0, 0, screen->max_row + 1, --- 1123,1131 ---- if(screen->cursor_state) HideCursor(); for(row = screen->max_row ; row >= 0 ; row--) { ! bzero(screen->buf[4 * row + 1], col = screen->max_col + 1); ! for(cp = (unsigned char *)screen->buf[4 * row] ; col > 0 ; col--) *cp++ = (unsigned char) 'E'; } ScrnRefresh(screen, 0, 0, screen->max_row + 1, *************** *** 1248,1253 **** --- 1431,1440 ---- register TScreen *screen = &term->screen; register int i; static struct timeval select_timeout; + #ifdef BSAHAX + XEvent evt; + char dummy; + #endif for( ; ; ) { if (select_mask & pty_mask && eventMode == NORMAL) { *************** *** 1293,1306 **** --- 1480,1504 ---- || screen->cursor_row != screen->cur_row)) { if (screen->cursor_state) HideCursor(); + #ifdef BSAHAX + screen->cursor_blink = screen->cursor_newblink; + #endif ShowCursor(); + #ifdef BSAHAX + } else if (screen->cursor_set != screen->cursor_state || + (screen->cursor_doblink && + screen->cursor_blink != screen->cursor_newblink)) { + screen->cursor_blink = screen->cursor_newblink; + #else } else if (screen->cursor_set != screen->cursor_state) { + #endif if (screen->cursor_set) ShowCursor(); else HideCursor(); } + XFlush(screen->display); /* always flush writes before waiting */ /* Update the masks and, unless X events are already in the queue, *************** *** 1318,1323 **** --- 1516,1536 ---- continue; } + #ifdef BSAHAX + /* handle the blink signal */ + if (XCheckTypedEvent(screen->display, KeyPress, &evt)) + { + BlinkReset(screen); + XPutBackEvent(screen->display, &evt); + } + if (screen->cursor_doblink && FD_ISSET(blink_hack[0], &select_mask)) + { + read(blink_hack[0], &dummy, 1); + FD_CLR(blink_hack[0], &select_mask); + BlinkCursor(screen); + } + #endif + /* if there is room to write more data to the pty, go write more */ if (write_mask & ptymask()) { v_write(screen->respond, 0, 0); /* flush buffer */ *************** *** 1339,1347 **** * by charset. worry about end of line conditions (wraparound if selected). */ static void ! dotext(screen, flags, charset, buf, ptr) register TScreen *screen; unsigned flags; char charset; char *buf; /* start of characters to process */ char *ptr; /* end */ --- 1552,1561 ---- * by charset. worry about end of line conditions (wraparound if selected). */ static void ! dotext(screen, flags, fg, bg, charset, buf, ptr) register TScreen *screen; unsigned flags; + unsigned fg, bg; char charset; char *buf; /* start of characters to process */ char *ptr; /* end */ *************** *** 1390,1396 **** if (len < n) n = len; next_col = screen->cur_col + n; ! WriteText(screen, ptr, n, flags); /* * the call to WriteText updates screen->cur_col. * If screen->cur_col != next_col, we must have --- 1604,1610 ---- if (len < n) n = len; next_col = screen->cur_col + n; ! WriteText(screen, ptr, n, flags, fg, bg); /* * the call to WriteText updates screen->cur_col. * If screen->cur_col != next_col, we must have *************** *** 1407,1422 **** * the current cursor position. update cursor position. */ static void ! WriteText(screen, str, len, flags) register TScreen *screen; register char *str; register int len; unsigned flags; { register int cx, cy; register unsigned fgs = flags; GC currentGC; if(screen->cur_row - screen->topline <= screen->max_row) { /* if(screen->cur_row == screen->cursor_row && screen->cur_col <= --- 1621,1642 ---- * the current cursor position. update cursor position. */ static void ! WriteText(screen, str, len, flags, fg, bg) register TScreen *screen; register char *str; register int len; unsigned flags; + unsigned fg, bg; { register int cx, cy; register unsigned fgs = flags; + register Pixel fg_pix, bg_pix; GC currentGC; + extern XtermWidget term; + fg_pix = (fgs&FG_COLOR) ? screen->colors[fg] : screen->foreground; + bg_pix = (fgs&BG_COLOR) ? screen->colors[bg] : term->core.background_pixel; + if(screen->cur_row - screen->topline <= screen->max_row) { /* if(screen->cur_row == screen->cursor_row && screen->cur_col <= *************** *** 1430,1444 **** * make sure that the correct GC is current */ ! if (fgs & BOLD) ! if (fgs & INVERSE) currentGC = screen->reverseboldGC; ! else currentGC = screen->normalboldGC; ! else /* not bold */ ! if (fgs & INVERSE) ! currentGC = screen->reverseGC; else currentGC = screen->normalGC; if (fgs & INSERT) InsertChar(screen, len); if (!(AddToRefresh(screen))) { --- 1650,1673 ---- * make sure that the correct GC is current */ ! if (fgs & INVERSE) { ! if (fgs & BOLD) currentGC = screen->reverseboldGC; ! else currentGC = screen->reverseGC; ! ! XSetForeground(screen->display, currentGC, bg_pix); ! XSetBackground(screen->display, currentGC, fg_pix); ! ! } else { /* not inverse */ ! if (fgs & BOLD) ! currentGC = screen->normalboldGC; else currentGC = screen->normalGC; + XSetForeground(screen->display, currentGC, fg_pix); + XSetBackground(screen->display, currentGC, bg_pix); + + } + if (fgs & INSERT) InsertChar(screen, len); if (!(AddToRefresh(screen))) { *************** *** 1446,1451 **** --- 1675,1682 ---- FlushScroll(screen); cx = CursorX(screen, screen->cur_col); cy = CursorY(screen, screen->cur_row)+screen->fnt_norm->ascent; + + XDrawImageString(screen->display, TextWindow(screen), currentGC, cx, cy, str, len); *************** *** 1467,1473 **** ++ntotal; } } ! ScreenWrite(screen, str, flags, len); CursorForward(screen, len); } --- 1698,1704 ---- ++ntotal; } } ! ScreenWrite(screen, str, flags, fg, bg, len); CursorForward(screen, len); } *************** *** 1587,1592 **** --- 1818,1827 ---- else screen->send_mouse_pos = 0; break; + #ifdef BSAHAX + /* watch this space - escape sequences for cursor on/off */ + /* and cursor blink on/off will come. soon, I hope. */ + #endif case 38: /* DECTEK */ if(func == bitset && !(screen->inhibit & I_TEK)) { if(screen->logging) { *************** *** 1998,2009 **** register TScreen *screen; { register int rows = screen->max_row + 1; ! char *save [2 * MAX_ROWS]; ! bcopy((char *)screen->buf, (char *)save, 2 * sizeof(char *) * rows); bcopy((char *)screen->altbuf, (char *)screen->buf, ! 2 * sizeof(char *) * rows); ! bcopy((char *)save, (char *)screen->altbuf, 2 * sizeof(char *) * rows); } VTRun() --- 2233,2244 ---- register TScreen *screen; { register int rows = screen->max_row + 1; ! char *save [4 * MAX_ROWS]; ! bcopy((char *)screen->buf, (char *)save, 4 * sizeof(char *) * rows); bcopy((char *)screen->altbuf, (char *)screen->buf, ! 4 * sizeof(char *) * rows); ! bcopy((char *)save, (char *)screen->altbuf, 4 * sizeof(char *) * rows); } VTRun() *************** *** 2022,2027 **** --- 2257,2266 ---- if (screen->allbuf == NULL) VTallocbuf (); screen->cursor_state = OFF; + #ifdef BSAHAX + screen->cursor_blink = OFF; + screen->cursor_newblink = OFF; + #endif screen->cursor_set = ON; bcnt = 0; *************** *** 2137,2143 **** screen->allbuf = Allocate (nrows, screen->max_col + 1, &screen->sbuf_address); if (screen->scrollWidget) ! screen->buf = &screen->allbuf[2 * screen->savelines]; else screen->buf = screen->allbuf; return; --- 2376,2382 ---- screen->allbuf = Allocate (nrows, screen->max_col + 1, &screen->sbuf_address); if (screen->scrollWidget) ! screen->buf = &screen->allbuf[4 * screen->savelines]; else screen->buf = screen->allbuf; return; *************** *** 2194,2203 **** --- 2433,2453 ---- new->screen.input_eight_bits = request->screen.input_eight_bits; new->screen.output_eight_bits = request->screen.output_eight_bits; new->screen.allowSendEvents = request->screen.allowSendEvents; + #ifdef BSAHAX + new->screen.cursor_doblink = request->screen.cursor_doblink; + new->screen.cursor_blink = request->screen.cursor_blink; + new->screen.cursor_newblink = request->screen.cursor_newblink; + new->screen.blink_rate = request->screen.blink_rate; + new->screen.Keybuffer = request->screen.Keybuffer; + new->screen.bold_colors = request->screen.bold_colors; + #endif new->misc.titeInhibit = request->misc.titeInhibit; for (i = fontMenu_font1; i <= fontMenu_lastBuiltin; i++) { new->screen.menu_font_names[i] = request->screen.menu_font_names[i]; } + for (i = 0; i < MAXCOLORS; i++) { + new->screen.colors[i] = request->screen.colors[i]; + } /* set default in realize proc */ new->screen.menu_font_names[fontMenu_fontdefault] = NULL; new->screen.menu_font_names[fontMenu_fontescape] = NULL; *************** *** 2490,2495 **** --- 2740,2837 ---- return refresh_needed; } + #ifdef BSAHAX + /* + * Send an in-band signal to the input "thread". + */ + #ifdef SIGNALRETURNSINT + int + #else + void + #endif + blink_signal(s) + int s; + { + write(blink_hack[1], "", 1); + signal(s, blink_signal); + #ifdef SIGNALRETURNSINT + return 0; + #endif + } + + /* + * Register blink handler for SIGALRM, start an itimer for the blink, and + * create the pipe hack if needed. + */ + register_blink(screen) + register TScreen *screen; + { + static int blink_enabled; + struct itimerval it; + + if (!blink_enabled) + { + signal(SIGALRM, blink_signal); + pipe(blink_hack); + if (blink_hack[0] + 1 > max_plus1) + max_plus1 = blink_hack[0] + 1; + FD_SET(blink_hack[0], &Select_mask); + blink_enabled = 1; + } + it.it_interval.tv_sec = screen->blink_rate / 1000; + it.it_interval.tv_usec = (screen->blink_rate % 1000) * 1000; + it.it_value = it.it_interval; + setitimer(ITIMER_REAL, &it, 0); + } + + /* + * Remove the blink itimer. + */ + unregister_blink() + { + struct itimerval it; + + it.it_interval.tv_sec = 0; + it.it_interval.tv_usec = 0; + it.it_value = it.it_interval; + setitimer(ITIMER_REAL, &it, 0); + } + + /* + * Invert cursor blink state and redisplay cursor + */ + BlinkCursor(screen) + register TScreen *screen; + { + screen->cursor_newblink = (screen->cursor_newblink == ON? OFF: ON); + screen->cursor_state = !screen->cursor_set; /* force update? */ + } + + /* + * Force the cursor on and reset the itimer, so the user isn't typing with + * an invisible cursor. + */ + BlinkReset(screen) + register TScreen *screen; + { + struct itimerval it; + + if (!screen->select || !screen->cursor_doblink) + { + it.it_interval.tv_sec = 0; + it.it_interval.tv_usec = 0; + } + else + { + screen->cursor_newblink = ON; + it.it_interval.tv_sec = screen->blink_rate / 1000; + it.it_interval.tv_usec = (screen->blink_rate % 1000) * 1000; + } + it.it_value = it.it_interval; + setitimer(ITIMER_REAL, &it, 0); + } + #endif + /* * Shows cursor at new cursor position in screen. */ *************** *** 2505,2511 **** if (screen->cur_row - screen->topline > screen->max_row) return; ! c = screen->buf[y = 2 * (screen->cursor_row = screen->cur_row)] [x = screen->cursor_col = screen->cur_col]; flags = screen->buf[y + 1][x]; if (c == 0) --- 2847,2853 ---- if (screen->cur_row - screen->topline > screen->max_row) return; ! c = screen->buf[y = 4 * (screen->cursor_row = screen->cur_row)] [x = screen->cursor_col = screen->cur_col]; flags = screen->buf[y + 1][x]; if (c == 0) *************** *** 2521,2529 **** --- 2863,2891 ---- else in_selection = True; + #ifdef BSAHAX + /* + * We will use a new flag (screen->cursor_blink). We cheat: it's entirely + * equivalent to toggling the invert status, so we need only add a case to + * the reverse video check. And that's all the draw function needs. + * + * (Inverting the cursor_blink test based on the reverse-video status would + * be more accurate yet, but this will do for now.) + */ + #endif + if(screen->select || screen->always_highlight) { + #ifdef BSAHAX + if (screen->cursor_doblink) + register_blink(screen); + #endif if (( (flags & INVERSE) && !in_selection) || + #ifdef BSAHAX + (!(flags & INVERSE) && in_selection) || + (screen->cursor_doblink && screen->cursor_blink == OFF)){ + #else (!(flags & INVERSE) && in_selection)){ + #endif /* text is reverse video */ if (screen->cursorGC) { currentGC = screen->cursorGC; *************** *** 2546,2551 **** --- 2908,2917 ---- } } } else { /* not selected */ + #ifdef BSAHAX + if (screen->cursor_doblink) + unregister_blink(); + #endif if (( (flags & INVERSE) && !in_selection) || (!(flags & INVERSE) && in_selection)) { /* text is reverse video */ *************** *** 2592,2598 **** if(screen->cursor_row - screen->topline > screen->max_row) return; ! c = screen->buf[y = 2 * screen->cursor_row][x = screen->cursor_col]; flags = screen->buf[y + 1][x]; if (screen->cursor_row > screen->endHRow || --- 2958,2964 ---- if(screen->cursor_row - screen->topline > screen->max_row) return; ! c = screen->buf[y = 4 * screen->cursor_row][x = screen->cursor_col]; flags = screen->buf[y + 1][x]; if (screen->cursor_row > screen->endHRow || *************** *** 2661,2666 **** --- 3027,3037 ---- FromAlternate(screen); ClearScreen(screen); screen->cursor_state = OFF; + #ifdef BSAHAX + screen->cursor_blink = OFF; + screen->cursor_newblink = OFF; + screen->bold_colors = OFF; + #endif if (term->flags & REVERSE_VIDEO) ReverseVideo(term); *************** *** 3044,3080 **** xgcv.graphics_exposures = TRUE; /* default */ xgcv.function = GXcopy; ! new_normalGC = XtGetGC((Widget)term, mask, &xgcv); if (!new_normalGC) goto bad; if (nfs == bfs) { /* there is no bold font */ new_normalboldGC = new_normalGC; } else { xgcv.font = bfs->fid; ! new_normalboldGC = XtGetGC((Widget)term, mask, &xgcv); if (!new_normalboldGC) goto bad; } xgcv.font = nfs->fid; xgcv.foreground = term->core.background_pixel; xgcv.background = screen->foreground; ! new_reverseGC = XtGetGC((Widget)term, mask, &xgcv); if (!new_reverseGC) goto bad; if (nfs == bfs) { /* there is no bold font */ new_reverseboldGC = new_reverseGC; } else { xgcv.font = bfs->fid; ! new_reverseboldGC = XtGetGC((Widget)term, mask, &xgcv); if (!new_reverseboldGC) goto bad; } if (screen->normalGC != screen->normalboldGC) ! XtReleaseGC ((Widget) term, screen->normalboldGC); ! XtReleaseGC ((Widget) term, screen->normalGC); if (screen->reverseGC != screen->reverseboldGC) ! XtReleaseGC ((Widget) term, screen->reverseboldGC); ! XtReleaseGC ((Widget) term, screen->reverseGC); screen->normalGC = new_normalGC; screen->normalboldGC = new_normalboldGC; screen->reverseGC = new_reverseGC; --- 3415,3459 ---- xgcv.graphics_exposures = TRUE; /* default */ xgcv.function = GXcopy; ! new_normalGC = XCreateGC(screen->display, ! DefaultRootWindow(screen->display), mask, &xgcv); if (!new_normalGC) goto bad; if (nfs == bfs) { /* there is no bold font */ new_normalboldGC = new_normalGC; } else { xgcv.font = bfs->fid; ! new_normalboldGC = XCreateGC(screen->display, ! DefaultRootWindow(screen->display), ! mask, &xgcv); if (!new_normalboldGC) goto bad; } xgcv.font = nfs->fid; xgcv.foreground = term->core.background_pixel; xgcv.background = screen->foreground; ! new_reverseGC = XCreateGC(screen->display, ! DefaultRootWindow(screen->display), mask, &xgcv); if (!new_reverseGC) goto bad; if (nfs == bfs) { /* there is no bold font */ new_reverseboldGC = new_reverseGC; } else { xgcv.font = bfs->fid; ! new_reverseboldGC = XCreateGC(screen->display, ! DefaultRootWindow(screen->display), ! mask, &xgcv); if (!new_reverseboldGC) goto bad; } if (screen->normalGC != screen->normalboldGC) ! XFreeGC (screen->display, screen->normalboldGC); ! if (screen->normalGC) ! XFreeGC (screen->display, screen->normalGC); if (screen->reverseGC != screen->reverseboldGC) ! XFreeGC (screen->display, screen->reverseboldGC); ! if (screen->reverseGC) ! XFreeGC (screen->display, screen->reverseGC); screen->normalGC = new_normalGC; screen->normalboldGC = new_normalboldGC; screen->reverseGC = new_reverseGC; *************** *** 3102,3114 **** bad: if (tmpname) free (tmpname); if (new_normalGC) ! XtReleaseGC ((Widget) term, screen->normalGC); if (new_normalGC && new_normalGC != new_normalboldGC) ! XtReleaseGC ((Widget) term, new_normalboldGC); if (new_reverseGC) ! XtReleaseGC ((Widget) term, new_reverseGC); if (new_reverseGC && new_reverseGC != new_reverseboldGC) ! XtReleaseGC ((Widget) term, new_reverseboldGC); if (nfs) XFreeFont (screen->display, nfs); if (nfs && nfs != bfs) XFreeFont (screen->display, bfs); return 0; --- 3481,3493 ---- bad: if (tmpname) free (tmpname); if (new_normalGC) ! XFreeGC (screen->display, screen->normalGC); if (new_normalGC && new_normalGC != new_normalboldGC) ! XFreeGC (screen->display, new_normalboldGC); if (new_reverseGC) ! XFreeGC (screen->display, new_reverseGC); if (new_reverseGC && new_reverseGC != new_reverseboldGC) ! XFreeGC (screen->display, new_reverseboldGC); if (nfs) XFreeFont (screen->display, nfs); if (nfs && nfs != bfs) XFreeFont (screen->display, bfs); return 0; Only in ../xterm-X11R5: charproc.c.orig diff --context --unidirectional-new-file ../xterm-X11R5/cursor.c ./cursor.c *** ../xterm-X11R5/cursor.c Sat Jan 1 12:31:20 1994 --- ./cursor.c Sat Nov 27 18:25:43 1993 *************** *** 203,208 **** --- 203,213 ---- CarriageReturn(screen) register TScreen *screen; { + /* extern void ScrnSetAttributes(); + + ScrnSetAttributes(screen, screen->cur_row, screen->cur_col, + ENDLINE, ENDLINE, 1); + */ screen->cur_col = 0; screen->do_wrap = 0; _CheckSelection(screen); diff --context --unidirectional-new-file ../xterm-X11R5/keybuffer.c ./keybuffer.c *** ../xterm-X11R5/keybuffer.c Wed Dec 31 19:00:00 1969 --- ./keybuffer.c Sat Nov 27 18:25:48 1993 *************** *** 0 **** --- 1,154 ---- + /* + * Keyboard buffer widget for Xterm + * Brandon S. Allbery + * + * This is intended primarily for use with programs like Seyon (which uses + * an xterm as the terminal emulator window for the dialup) and JNOS/Linux + * (an improvement over JNOS's built-in split-screen sessions). If the + * keyboard buffer is activated, a single-line Text widget is made available; + * when RETURN is pressed, its contents are sent all at once, allowing local + * editing. This is a big win for Seyon accessing dial-up chat sessions (in my + * case, Delphi's conferences; also CI$'s CB Simulator, etc.). It may also be + * useful for other similar cases not involving dialups. + * + * Note that we don't create the widget until it is first used. Xterm is big + * enough as it is without instantiating a widget that won't be used most of + * the time. + * + * TODO: + * - Pass resize requests to the Text widget, not to the buttons. This will + * probably require a new Form subclass... sigh + */ + + #include + #include "ptyx.h" + #include "data.h" + #include + #include + #include + #include + #include + #include + #include + + extern void do_keybuffer(); + + static void do_KBclear(); + static void do_KBsend(); + + extern Widget toplevel; + + static Widget KeyBuffer; + + #define XtNbufferWidth "bufferWidth" + #define XtNbufferHeight "bufferHeight" + + void + Handle_Keybuffer(mode) + int mode; + { + if (!KeyBuffer) + { + Widget keybufform, Buffer, buttons, sendButton, clearButton; + Widget hideButton; + XFontStruct *font; + int bw, bh; + + /* This is silly. It doesn't look like a PopupShell to *me*... */ + KeyBuffer = XtCreatePopupShell("keybuftop", + transientShellWidgetClass, + toplevel, + NULL, 0); + keybufform = XtCreateManagedWidget("keybuffer", + formWidgetClass, + KeyBuffer, + NULL, 0); + Buffer = XtVaCreateManagedWidget("buffer", + asciiTextWidgetClass, + keybufform, + XtNtype, XawAsciiString, + XtNeditType, XawtextEdit, + NULL, NULL); + XtVaGetValues(Buffer, + XtNfont, &font, + /* + * This is not quite correct yet... stay tuned + * + XtNbufferWidth, &bw, + XtNbufferHeight, &bh, + */ + NULL, NULL); + bw = 80; + bh = 4; + XtVaSetValues(Buffer, + XtNwidth, font->max_bounds.width * bw, + XtNheight, (font->max_bounds.ascent + + font->max_bounds.descent) * bh, + NULL, NULL); + sendButton = XtCreateManagedWidget("send", + commandWidgetClass, + keybufform, + NULL, 0); + XtAddCallback(sendButton, XtNcallback, do_KBsend, Buffer); + XtInstallAccelerators(Buffer, sendButton); + clearButton = XtCreateManagedWidget("clear", + commandWidgetClass, + keybufform, + NULL, 0); + XtAddCallback(clearButton, XtNcallback, do_KBclear, Buffer); + hideButton = XtCreateManagedWidget("hide", + commandWidgetClass, + keybufform, + NULL, 0); + XtAddCallback(hideButton, XtNcallback, do_keybuffer, 0); + XtSetKeyboardFocus(keybufform, Buffer); + } + if (mode) + XtPopup(KeyBuffer, XtGrabNone); + else + XtPopdown(KeyBuffer); + } + + static void + do_KBclear(w, client, call) + Widget w; + Widget client; /* this is the Buffer widget */ + XtPointer *call; + { + XawTextBlock empty; + String s; + int len; + + empty.firstPos = 0; + empty.length = 0; + empty.ptr = ""; + empty.format = FMT8BIT; + XtVaGetValues(client, XtNstring, &s, NULL, NULL); + XawTextReplace(client, 0, strlen(s), &empty); + } + + /* + * The heart of all this hackery... or at least, the part that's most important + * to the person using it. + */ + + static void + do_KBsend(w, client, call) + Widget w; + Widget client; + XtPointer call; + { + String s; + char *cp; + + XtVaGetValues(client, XtNstring, &s, NULL, NULL); + /* We must strip newlines from this, since autowrap may add them */ + for (cp = s; *cp; cp++) + { + if (*cp == '\n') + *cp = ' '; + } + StringInput(&term->screen, s, strlen(s)); + StringInput(&term->screen, "\r", 1); + do_KBclear(w, client, call); + } diff --context --unidirectional-new-file ../xterm-X11R5/main.c ./main.c *** ../xterm-X11R5/main.c Sat Jan 1 12:31:21 1994 --- ./main.c Fri Dec 24 11:37:37 1993 *************** *** 40,45 **** --- 40,62 ---- ******************************************************************/ + /*****************************************************************************\ + * * + * Modifications by Brandon S. Allbery, bsa@kf8nh.wariat.org: * + * * + * - added color xterm patches (not mine, but they are a prerequisite) * + * - added keyboard buffer mode for use with comm programs like Seyon, etc. * + * - bold as color patches (16 colors total, defaults as per PC CGA+) * + * These are homegrown, not the net patches, and they are still evolving. * + * I hope to get something that will work equally well with BBSes and with * + * Unix by paying attention to the bold and color requests * + * - blinking cursor * + * * + * TODO: * + * - make sure color code obeys fg/bg for 0 and 7 * + * - cursor blink/no-blink escapes? * + * * + \*****************************************************************************/ /* main.c */ *************** *** 60,65 **** --- 77,93 ---- #define ATT #endif + #ifdef linux + #define USE_SYSV_UTMP + #define USE_SYSV_PGRP + #define USE_TERMIOS + #define USE_HANDSHAKE + #define HAS_UTMP_UT_HOST + #define HAS_BSD_GROUPS + #undef TIOCCONS + #define CONSLOG "/proc/kmsg" + #endif + #ifdef SVR4 #define SYSV /* SVR4 is (approx) superset of SVR3 */ #define USE_SYSV_UTMP *************** *** 151,157 **** --- 179,187 ---- #endif /* SYSV */ #ifndef SYSV /* BSD systems */ + #ifndef USE_TERMIOS #include + #endif #include #define HAS_UTMP_UT_HOST #define HAS_BSD_GROUPS *************** *** 398,404 **** static int inhibit; static char passedPty[2]; /* name if pty if slave */ ! #ifdef TIOCCONS static int Console; #include /* XmuGetHostname */ #define MIT_CONSOLE_LEN 12 --- 428,434 ---- static int inhibit; static char passedPty[2]; /* name if pty if slave */ ! #if defined(TIOCCONS) || defined(CONSLOG) static int Console; #include /* XmuGetHostname */ #define MIT_CONSOLE_LEN 12 *************** *** 426,431 **** --- 456,464 ---- Boolean sunFunctionKeys; /* %%% should be widget resource? */ Boolean wait_for_map; Boolean useInsertMode; + #ifdef BSAHAX + Boolean useKeyBuffer; + #endif } resource; /* used by VT (charproc.c) */ *************** *** 453,458 **** --- 486,495 ---- offset(wait_for_map), XtRString, "false"}, {"useInsertMode", "UseInsertMode", XtRBoolean, sizeof (Boolean), offset(useInsertMode), XtRString, "false"}, + #ifdef BSAHAX + {"useKeyBuffer", "UseKeyBuffer", XtRBoolean, sizeof (Boolean), + offset(useKeyBuffer), XtRString, "false"}, + #endif }; #undef offset *************** *** 478,495 **** --- 515,546 ---- {"-ah", "*alwaysHighlight", XrmoptionNoArg, (caddr_t) "on"}, {"+ah", "*alwaysHighlight", XrmoptionNoArg, (caddr_t) "off"}, {"-b", "*internalBorder",XrmoptionSepArg, (caddr_t) NULL}, + #ifdef BSAHAX + {"-bc", "*cursorBlink", XrmoptionNoArg, (caddr_t) "on"}, + {"+bc", "*cursorBlink", XrmoptionNoArg, (caddr_t) "off"}, + #endif {"-cb", "*cutToBeginningOfLine", XrmoptionNoArg, (caddr_t) "off"}, {"+cb", "*cutToBeginningOfLine", XrmoptionNoArg, (caddr_t) "on"}, {"-cc", "*charClass", XrmoptionSepArg, (caddr_t) NULL}, {"-cn", "*cutNewline", XrmoptionNoArg, (caddr_t) "off"}, {"+cn", "*cutNewline", XrmoptionNoArg, (caddr_t) "on"}, + #ifdef BSAHAX + {"-co", "*boldColors", XrmoptionNoArg, (caddr_t) "on"}, + {"+co", "*boldColors", XrmoptionNoArg, (caddr_t) "off"}, + #endif {"-cr", "*cursorColor", XrmoptionSepArg, (caddr_t) NULL}, {"-cu", "*curses", XrmoptionNoArg, (caddr_t) "on"}, {"+cu", "*curses", XrmoptionNoArg, (caddr_t) "off"}, + {"-dc", "*dynamicColors",XrmoptionNoArg, (caddr_t) "off"}, + {"+dc", "*dynamicColors",XrmoptionNoArg, (caddr_t) "on"}, {"-e", NULL, XrmoptionSkipLine, (caddr_t) NULL}, {"-fb", "*boldFont", XrmoptionSepArg, (caddr_t) NULL}, {"-j", "*jumpScroll", XrmoptionNoArg, (caddr_t) "on"}, {"+j", "*jumpScroll", XrmoptionNoArg, (caddr_t) "off"}, + #ifdef BSAHAX + {"-kb", "*useKeyBuffer",XrmoptionNoArg, (caddr_t) "on"}, + {"+kb", "*useKeyBuffer",XrmoptionNoArg, (caddr_t) "off"}, + #endif {"-l", "*logging", XrmoptionNoArg, (caddr_t) "on"}, {"+l", "*logging", XrmoptionNoArg, (caddr_t) "off"}, {"-lf", "*logFile", XrmoptionSepArg, (caddr_t) NULL}, *************** *** 560,574 **** --- 611,634 ---- { "-/+132", "turn on/off column switch inhibiting" }, { "-/+ah", "turn on/off always highlight" }, { "-b number", "internal border in pixels" }, + #ifdef BSAHAX + { "-/+bc", "turn on/off blinking cursor" }, + #endif { "-/+cb", "turn on/off cut-to-beginning-of-line inhibit" }, { "-cc classrange", "specify additional character classes" }, { "-/+cn", "turn on/off cut newline inhibit" }, + #ifdef BSAHAX + { "+/-co", "turn on/off separate bold colors" }, + #endif { "-cr color", "text cursor color" }, { "-/+cu", "turn on/off curses emulation" }, { "-fb fontname", "bold text font" }, { "-/+im", "use insert mode for TERMCAP" }, { "-/+j", "turn on/off jump scroll" }, { "-/+l", "turn on/off logging" }, + #ifdef BSAHAX + { "-/+kb", "turn on/off keyboard buffer" }, + #endif { "-lf filename", "logging filename" }, { "-/+ls", "turn on/off login shell" }, { "-/+mb", "turn on/off margin bell" }, *************** *** 598,609 **** { "#geom", "icon window geometry" }, { "-T string", "title name for window" }, { "-n string", "icon name for window" }, ! #ifdef TIOCCONS { "-C", "intercept console messages" }, #else { "-C", "intercept console messages (not supported)" }, #endif { "-Sxxd", "slave mode on \"ttyxx\", file descriptor \"d\"" }, { NULL, NULL }}; static char *message[] = { --- 658,670 ---- { "#geom", "icon window geometry" }, { "-T string", "title name for window" }, { "-n string", "icon name for window" }, ! #if defined(TIOCCONS) || defined(CONSLOG) { "-C", "intercept console messages" }, #else { "-C", "intercept console messages (not supported)" }, #endif { "-Sxxd", "slave mode on \"ttyxx\", file descriptor \"d\"" }, + { "-/+dc", "turn off/on dynamic color selection" }, { NULL, NULL }}; static char *message[] = { *************** *** 663,669 **** exit (0); } ! #ifdef TIOCCONS /* ARGSUSED */ static Boolean ConvertConsoleSelection(w, selection, target, type, value, length, format) --- 724,730 ---- exit (0); } ! #if defined(TIOCCONS) || defined(CONSLOG) /* ARGSUSED */ static Boolean ConvertConsoleSelection(w, selection, target, type, value, length, format) *************** *** 854,860 **** --- 915,923 ---- #endif /* TIOCSLTC */ #ifdef USE_TERMIOS d_tio.c_cc[VSUSP] = '\000'; + #ifdef VDSUSP d_tio.c_cc[VDSUSP] = '\000'; + #endif d_tio.c_cc[VREPRINT] = '\377'; d_tio.c_cc[VDISCARD] = '\377'; d_tio.c_cc[VWERASE] = '\377'; *************** *** 944,949 **** --- 1007,1018 ---- Console = FALSE; } #endif /* TIOCCONS */ + #ifdef CONSLOG + if (geteuid() == 0) + Console = True; + else + Console = False; + #endif continue; case 'S': if (sscanf(*argv + 2, "%c%c%d", passedPty, passedPty+1, *************** *** 1049,1055 **** 0666); #endif /* DEBUG */ if(i >= 0) { ! #if defined(USE_SYSV_TERMIO) && !defined(SVR4) /* SYSV has another pointer which should be part of the ** FILE structure but is actually a seperate array. */ --- 1118,1124 ---- 0666); #endif /* DEBUG */ if(i >= 0) { ! #if defined(USE_SYSV_TERMIO) && !defined(SVR4) && !defined(linux) /* SYSV has another pointer which should be part of the ** FILE structure but is actually a seperate array. */ *************** *** 1059,1065 **** --- 1128,1141 ---- stderr->_file = i; _bufend(stderr) = old_bufend; #else /* USE_SYSV_TERMIO */ + #ifdef linux + /* a hack for a hack... ugh */ + fflush(stderr); + close(2); + dup2(i, 2); + #else stderr->_file = i; + #endif #endif /* USE_SYSV_TERMIO */ /* mark this file as close on exec */ *************** *** 2084,2089 **** --- 2160,2186 ---- xterm_name); } #endif /* TIOCCONS */ + #ifdef CONSLOG + if (Console && fork() == 0) + { + char buf[4096]; + int proc, c; + + if ((proc = open(CONSLOG, O_RDONLY)) == -1) + { + fprintf(stderr, "%s: cannot open console\n", + xterm_name); + exit(1); + } + close(tty); + if ((tty = open("/dev/tty", O_RDWR)) == -1) + exit(1); + /* this should work with both Linux-style and others */ + while ((c = read(proc, buf, sizeof proc)) > 0) + write(tty, buf, c); + exit(1); + } + #endif } signal (SIGCHLD, SIG_DFL); *************** *** 2169,2178 **** --- 2266,2280 ---- setsid(); ioctl(0, TIOCSCTTY, 0); #endif + #ifdef _POSIX_SOURCE + setsid(); + tcsetpgrp(0, pgrp); + #else ioctl(0, TIOCSPGRP, (char *)&pgrp); setpgrp(0,0); close(open(ttydev, O_WRONLY, 0)); setpgrp (0, pgrp); + #endif #endif /* !USE_SYSV_PGRP */ #ifdef UTMP *************** *** 2207,2213 **** --- 2309,2317 ---- /* set up the new entry */ utmp.ut_type = USER_PROCESS; + #ifndef linux utmp.ut_exit.e_exit = 2; + #endif (void) strncpy(utmp.ut_user, (pw && pw->pw_name) ? pw->pw_name : "????", sizeof(utmp.ut_user)); Only in ../xterm-X11R5: main.c.orig diff --context --unidirectional-new-file ../xterm-X11R5/menu.c ./menu.c *** ../xterm-X11R5/menu.c Sat Jan 1 12:31:22 1994 --- ./menu.c Thu Dec 23 22:15:29 1993 *************** *** 43,48 **** --- 43,51 ---- do_tektextlarge(), do_tektext2(), do_tektext3(), do_tektextsmall(), do_tekpage(), do_tekreset(), do_tekcopy(), do_vtshow(), do_vtmode(), do_tekhide(), do_vtfont(); + #ifdef BSAHAX + void do_keybuffer(), do_blink(), do_pcbold(); + #endif /* *************** *** 86,92 **** --- 89,103 ---- { "line2", NULL, NULL }, /* 19 */ { "tekshow", do_tekshow, NULL }, /* 20 */ { "tekmode", do_tekmode, NULL }, /* 21 */ + #ifdef BSAHAX + { "vthide", do_vthide, NULL }, /* 22 */ + { "line3", NULL, NULL }, /* 23 */ + { "keybuffer", do_keybuffer, NULL }, /* 24 */ + { "blink", do_blink, NULL }, /* 25 */ + { "pcbold", do_pcbold, NULL }}; /* 26 */ + #else { "vthide", do_vthide, NULL }}; /* 22 */ + #endif MenuEntry fontMenuEntries[] = { { "fontdefault", do_vtfont, NULL }, /* 0 */ *************** *** 188,193 **** --- 199,209 ---- update_cursesemul(); update_visualbell(); update_marginbell(); + #ifdef BSAHAX + update_keybuffer(); + update_blink(); + update_pcbold(); + #endif } break; *************** *** 679,684 **** --- 695,737 ---- hide_vt_window(); } + #ifdef BSAHAX + /* ARGSUSED */ + void + do_keybuffer(gw, closure, data) + Widget gw; + caddr_t closure, data; + { + Handle_Keybuffer(term->screen.Keybuffer = !term->screen.Keybuffer); + update_keybuffer(); + } + + /* ARGSUSED */ + void + do_blink(gw, closure, data) + Widget gw; + caddr_t closure, data; + { + term->screen.cursor_doblink = !term->screen.cursor_doblink; + if (!term->screen.cursor_doblink && !term->screen.cursor_blink) + { + term->screen.cursor_blink = ON; + ShowCursor(); + } + update_blink(); + } + + /* ARGSUSED */ + void + do_pcbold(gw, closure, data) + Widget gw; + caddr_t closure, data; + { + term->screen.bold_colors = !term->screen.bold_colors; + update_pcbold(); + } + #endif + /* * vtfont menu *************** *** 1226,1228 **** --- 1279,1317 ---- } + #ifdef BSAHAX + + /* ARGSUSED */ + void + HandleKeyBuffer(w, event, params, param_count) + Widget w; + XEvent *event; + String *params; + Cardinal *param_count; + { + handle_toggle(do_keybuffer, (int) term->screen.Keybuffer, params, + *param_count, w, 0, 0); + } + + void + HandleBlink(w, event, params, param_count) + Widget w; + XEvent *event; + String *params; + Cardinal *param_count; + { + handle_toggle(do_blink, (int) term->screen.cursor_doblink, params, + *param_count, w, 0, 0); + } + + void + HandlePcBold(w, event, params, param_count) + Widget w; + XEvent *event; + String *params; + Cardinal *param_count; + { + handle_toggle(do_pcbold, (int) term->screen.bold_colors, params, + *param_count, w, 0, 0); + } + #endif Only in ../xterm-X11R5: menu.c.orig diff --context --unidirectional-new-file ../xterm-X11R5/menu.h ./menu.h *** ../xterm-X11R5/menu.h Sat Jan 1 12:31:22 1994 --- ./menu.h Thu Dec 23 22:17:00 1993 *************** *** 54,59 **** --- 54,64 ---- extern void HandleTekReset(); extern void HandleTekCopy(); extern void DoSecureKeyboard(); + #ifdef BSAHAX + extern void HandleKeyBuffer(); + extern void HandleBlink(); + extern void HandlePcBold(); + #endif /* * The following definitions MUST match the order of entries given in *************** *** 104,109 **** --- 109,120 ---- #define vtMenu_tekshow 20 #define vtMenu_tekmode 21 #define vtMenu_vthide 22 + #ifdef BSAHAX + #define vtMenu_line3 23 + #define vtMenu_keybuffer 24 + #define vtMenu_blink 25 + #define vtMenu_pcbold 26 + #endif /* * items in vt100 font menu *************** *** 268,273 **** --- 279,300 ---- tekMenuEntries[tekMenu_vtshow].widget, \ term->screen.Vshow) + #ifdef BSAHAX + #define update_keybuffer() \ + update_menu_item (term->screen.vtMenu, \ + vtMenuEntries[vtMenu_keybuffer].widget, \ + term->screen.Keybuffer) + + #define update_blink() \ + update_menu_item (term->screen.vtMenu, \ + vtMenuEntries[vtMenu_blink].widget, \ + term->screen.cursor_doblink) + + #define update_pcbold() \ + update_menu_item (term->screen.vtMenu, \ + vtMenuEntries[vtMenu_pcbold].widget, \ + term->screen.bold_colors) + #endif #define set_vthide_sensitivity() \ set_sensitivity (term->screen.vtMenu, \ diff --context --unidirectional-new-file ../xterm-X11R5/misc.c ./misc.c *** ../xterm-X11R5/misc.c Sat Jan 1 12:31:22 1994 --- ./misc.c Sat Nov 27 18:25:43 1993 *************** *** 625,630 **** --- 625,639 ---- case 2: /* new title only */ Changetitle(buf); break; + case 10: case 11: case 12: + case 13: case 14: case 15: + case 16: + { + extern Boolean ChangeColorsRequest(); + if (term->misc.dynamicColors) + ChangeColorsRequest(term,mode-10,buf); + } + break; case 46: /* new log file */ #ifdef ALLOWLOGFILECHANGES *************** *** 678,683 **** --- 687,871 ---- ChangeGroup( XtNtitle, (XtArgVal)name ); } + /***====================================================================***/ + + ScrnColors *pOldColors= NULL; + + Boolean + GetOldColors(pTerm) + XtermWidget pTerm; + { + int i; + if (pOldColors==NULL) { + pOldColors= (ScrnColors *)XtMalloc(sizeof(ScrnColors)); + if (pOldColors==NULL) { + fprintf(stderr,"allocation failure in GetOldColors\n"); + return(FALSE); + } + pOldColors->which= 0; + for (i=0;icolors[i]= 0; + pOldColors->names[i]= NULL; + } + GetColors(pTerm,pOldColors); + } + return(TRUE); + } + + Boolean + UpdateOldColors(pTerm,pNew) + XtermWidget pTerm; + ScrnColors *pNew; + { + int i; + + /* if we were going to free old colors, this would be the place to + * do it. I've decided not to (for now), because it seems likely + * that we'd have a small set of colors we use over and over, and that + * we could save some overhead this way. The only case in which this + * (clearly) fails is if someone is trying a boatload of colors, in + * which case they can restart xterm + */ + for (i=0;inames[i]!=NULL) { + XtFree(pOldColors->names[i]); + pOldColors->names[i]= NULL; + } + if (pNew->names[i]) { + pOldColors->names[i]= pNew->names[i]; + } + pOldColors->colors[i]= pNew->colors[i]; + } + } + return(TRUE); + } + + void + ReverseOldColors() + { + register ScrnColors *pOld= pOldColors; + Pixel tmpPix; + char *tmpName; + + if (pOld) { + /* change text cursor, if necesary */ + if (pOld->colors[TEXT_CURSOR]==pOld->colors[TEXT_FG]) { + pOld->colors[TEXT_CURSOR]= pOld->colors[TEXT_BG]; + if (pOld->names[TEXT_CURSOR]) { + XtFree(pOldColors->names[TEXT_CURSOR]); + pOld->names[TEXT_CURSOR]= NULL; + } + if (pOld->names[TEXT_BG]) { + tmpName= XtMalloc(strlen(pOld->names[TEXT_BG])+1); + if (tmpName) { + strcpy(tmpName,pOld->names[TEXT_BG]); + pOld->names[TEXT_CURSOR]= tmpName; + } + } + } + + /* swap text FG and BG */ + tmpPix= pOld->colors[TEXT_FG]; + tmpName= pOld->names[TEXT_FG]; + pOld->colors[TEXT_FG]= pOld->colors[TEXT_BG]; + pOld->names[TEXT_FG]= pOld->names[TEXT_BG]; + pOld->colors[TEXT_BG]= tmpPix; + pOld->names[TEXT_BG]= tmpName; + + /* swap mouse FG and BG */ + tmpPix= pOld->colors[MOUSE_FG]; + tmpName= pOld->names[MOUSE_FG]; + pOld->colors[MOUSE_FG]= pOld->colors[MOUSE_BG]; + pOld->names[MOUSE_FG]= pOld->names[MOUSE_BG]; + pOld->colors[MOUSE_BG]= tmpPix; + pOld->names[MOUSE_BG]= tmpName; + + /* swap Tek FG and BG */ + tmpPix= pOld->colors[TEK_FG]; + tmpName= pOld->names[TEK_FG]; + pOld->colors[TEK_FG]= pOld->colors[TEK_BG]; + pOld->names[TEK_FG]= pOld->names[TEK_BG]; + pOld->colors[TEK_BG]= tmpPix; + pOld->names[TEK_BG]= tmpName; + } + return; + } + + Boolean + AllocateColor(pTerm,pNew,ndx,name) + XtermWidget pTerm; + ScrnColors *pNew; + int ndx; + char *name; + { + XColor def; + register TScreen *screen= &pTerm->screen; + Colormap cmap= pTerm->core.colormap; + char *newName; + + if ((XParseColor(screen->display,cmap,name,&def))&& + (XAllocColor(screen->display,cmap,&def))) { + SET_COLOR_VALUE(pNew,ndx,def.pixel); + newName= XtMalloc(strlen(name)+1); + if (newName) { + strcpy(newName,name); + SET_COLOR_NAME(pNew,ndx,newName); + } + return(TRUE); + } + return(FALSE); + } + + Boolean + ChangeColorsRequest(pTerm,start,names) + XtermWidget pTerm; + int start; + register char *names; + { + char *thisName; + ScrnColors newColors; + int i,ndx; + + if ((pOldColors==NULL)&&(!GetOldColors(pTerm))) { + return(FALSE); + } + newColors.which= 0; + for (i=0;imisc.re_verse) ndx= OPPOSITE_COLOR(i); + else ndx= i; + if ((names==NULL)||(names[0]=='\0')) { + newColors.names[ndx]= NULL; + } + else { + if (names[0]==';') + thisName= NULL; + else thisName= names; + names= index(names,';'); + if (names!=NULL) { + *names= '\0'; + names++; + } + if ((!pOldColors->names[ndx])|| + (thisName&&(strcmp(thisName,pOldColors->names[ndx])))) { + AllocateColor(pTerm,&newColors,ndx,thisName); + } + } + } + + if (newColors.which==0) + return(TRUE); + + ChangeColors(pTerm,&newColors); + UpdateOldColors(pTerm,&newColors); + return(TRUE); + } + + /***====================================================================***/ + #ifndef DEBUG /* ARGSUSED */ #endif *************** *** 801,806 **** --- 989,995 ---- { fprintf (stderr, "%s: warning, error event receieved:\n", xterm_name); (void) XmuPrintDefaultErrorMessage (d, ev, stderr); + abort(); Exit (ERROR_XERROR); } Only in ../xterm-X11R5: misc.c.orig diff --context --unidirectional-new-file ../xterm-X11R5/ptyx.h ./ptyx.h *** ../xterm-X11R5/ptyx.h Sat Jan 1 12:31:22 1994 --- ./ptyx.h Thu Dec 23 21:39:44 1993 *************** *** 191,196 **** --- 191,252 ---- #define SAVELINES 64 /* default # lines to save */ #define SCROLLLINES 1 /* default # lines to scroll */ + /***====================================================================***/ + + #define TEXT_FG 0 + #define TEXT_BG 1 + #define TEXT_CURSOR 2 + #define MOUSE_FG 3 + #define MOUSE_BG 4 + #define TEK_FG 5 + #define TEK_BG 6 + #define NCOLORS 7 + + #define COLOR_DEFINED(s,w) ((s)->which&(1<<(w))) + #define COLOR_VALUE(s,w) ((s)->colors[w]) + #define SET_COLOR_VALUE(s,w,v) (((s)->colors[w]=(v)),((s)->which|=(1<<(w)))) + + #define COLOR_NAME(s,w) ((s)->names[w]) + #define SET_COLOR_NAME(s,w,v) (((s)->names[w]=(v)),((s)->which|=(1<<(w)))) + + #define UNDEFINE_COLOR(s,w) ((s)->which&=(~((w)<<1))) + #define OPPOSITE_COLOR(n) (((n)==TEXT_FG?TEXT_BG:\ + ((n)==TEXT_BG?TEXT_FG:\ + ((n)==MOUSE_FG?MOUSE_BG:\ + ((n)==MOUSE_BG?MOUSE_FG:\ + ((n)==TEK_FG?TEK_BG:\ + ((n)==TEXT_BG?TEK_FG:(n)))))))) + + typedef struct { + unsigned which; + Pixel colors[NCOLORS]; + char *names[NCOLORS]; + } ScrnColors; + + /***====================================================================***/ + + #ifdef BSAHAX + #define MAXCOLORS 16 + #define COLOR_0_BOLD 8 + #define COLOR_1_BOLD 9 + #define COLOR_2_BOLD 10 + #define COLOR_3_BOLD 11 + #define COLOR_4_BOLD 12 + #define COLOR_5_BOLD 13 + #define COLOR_6_BOLD 14 + #define COLOR_7_BOLD 15 + #else + #define MAXCOLORS 8 + #endif + #define COLOR_0 0 + #define COLOR_1 1 + #define COLOR_2 2 + #define COLOR_3 3 + #define COLOR_4 4 + #define COLOR_5 5 + #define COLOR_6 6 + #define COLOR_7 7 + typedef struct { /* These parameters apply to both windows */ Display *display; /* X display for screen */ *************** *** 210,215 **** --- 266,272 ---- Pixel cursorcolor; /* Cursor color */ Pixel mousecolor; /* Mouse color */ Pixel mousecolorback; /* Mouse color background */ + Pixel colors[MAXCOLORS]; /* ANSI color emulation */ int border; /* inner border */ Cursor arrow; /* arrow cursor */ unsigned short send_mouse_pos; /* user wants mouse transition */ *************** *** 243,248 **** --- 300,312 ---- XPoint *box; /* draw unselected cursor */ int cursor_state; /* ON or OFF */ + #ifdef BSAHAX + Boolean cursor_doblink; /* do we do blinking? */ + int blink_rate; /* blink rate in msec */ + Boolean cursor_blink; /* ON or OFF as above */ + Boolean cursor_newblink;/* ditto, new state */ + Boolean bold_colors; /* is bold color another color? */ + #endif int cursor_set; /* requested state */ int cursor_col; /* previous cursor column */ int cursor_row; /* previous cursor row */ *************** *** 282,287 **** --- 346,354 ---- int copy_dest_y; Boolean c132; /* allow change to 132 columns */ Boolean curses; /* cludge-ups for more and vi */ + #ifdef BSAHAX + Boolean Keybuffer; /* use keyboard buffer widget? */ + #endif Boolean marginbell; /* true if margin bell on */ int nmarginbell; /* columns from right margin */ int bellarmed; /* cursor below bell margin */ *************** *** 392,397 **** --- 459,465 ---- Boolean scrollbar; Boolean titeInhibit; Boolean tekSmall; /* start tek window in small size */ + Boolean dynamicColors; Boolean appcursorDefault; Boolean appkeypadDefault; } Misc; *************** *** 425,430 **** --- 493,500 ---- TKeyboard keyboard; /* terminal keyboard */ TScreen screen; /* terminal screen */ unsigned flags; /* mode flags */ + unsigned cur_foreground; /* current foreground color */ + unsigned cur_background; /* current background color */ unsigned initflags; /* initial mode flags */ Tabs tabs; /* tabstops of the terminal */ Misc misc; /* miscellaneous parameters */ *************** *** 446,452 **** * term->flags and screen->save_modes. This need only fit in an unsigned. */ ! #define ATTRIBUTES 0x07 /* mask: user-visible attributes */ /* global flags and character flags (visible character attributes) */ #define INVERSE 0x01 /* invert the characters to be output */ #define UNDERLINE 0x02 /* true if underlining */ --- 516,522 ---- * term->flags and screen->save_modes. This need only fit in an unsigned. */ ! #define ATTRIBUTES 0x67 /* mask: user-visible attributes */ /* global flags and character flags (visible character attributes) */ #define INVERSE 0x01 /* invert the characters to be output */ #define UNDERLINE 0x02 /* true if underlining */ *************** *** 463,468 **** --- 533,541 ---- #define CHARDRAWN 0x10 /* a character has been drawn here on the screen. Used to distinguish blanks from empty parts of the screen when selecting */ + #define FG_COLOR 0x20 /* true if background set */ + #define BG_COLOR 0x40 /* true if foreground set */ + #define DIM 0x80 /* global flags */ #define WRAPAROUND 0x400 /* true if auto wraparound mode */ #define REVERSEWRAP 0x800 /* true if reverse wraparound mode */ diff --context --unidirectional-new-file ../xterm-X11R5/resize.c ./resize.c *** ../xterm-X11R5/resize.c Sat Jan 1 12:31:22 1994 --- ./resize.c Sat Nov 27 18:25:43 1993 *************** *** 32,37 **** --- 32,42 ---- #include #include + #ifdef linux + /* close enough. s/b use termios, though... */ + #define USE_SYSV_TERMIO + #endif + #if defined(att) || (defined(SYSV) && defined(SYSV386)) #define ATT #endif *************** *** 63,69 **** --- 68,78 ---- #include #ifdef USE_SYSV_TERMIO + #ifdef _POSIX_SOURCE + #include + #else #include + #endif #else /* else not USE_SYSV_TERMIO */ #include #endif /* USE_SYSV_TERMIO */ diff --context --unidirectional-new-file ../xterm-X11R5/screen.c ./screen.c *** ../xterm-X11R5/screen.c Sat Jan 1 12:31:22 1994 --- ./screen.c Sat Nov 27 18:25:43 1993 *************** *** 52,59 **** /* allocates memory for a 2-dimensional array of chars and returns a pointer thereto ! each line is formed from a pair of char arrays. The first (even) one is ! the actual character array and the second (odd) one is the attributes. */ register int nrow, ncol; Char **addr; --- 52,60 ---- /* allocates memory for a 2-dimensional array of chars and returns a pointer thereto ! each line is formed from four char arrays. The first one is the actual ! character array, the second one is the attributes, the third is the ! foreground color, and the fourth is the background color. */ register int nrow, ncol; Char **addr; *************** *** 62,68 **** register Char *tmp; register int i; ! if ((base = (ScrnBuf) calloc ((unsigned)(nrow *= 2), sizeof (char *))) == 0) SysError (ERROR_SCALLOC); if ((tmp = calloc ((unsigned) (nrow * ncol), sizeof(char))) == 0) --- 63,69 ---- register Char *tmp; register int i; ! if ((base = (ScrnBuf) calloc ((unsigned)(nrow *= 4), sizeof (char *))) == 0) SysError (ERROR_SCALLOC); if ((tmp = calloc ((unsigned) (nrow * ncol), sizeof(char))) == 0) *************** *** 95,101 **** if (sbuf == NULL || *sbuf == NULL) return 0; ! oldrow *= 2; oldbuf = *sbufaddr; /* --- 96,102 ---- if (sbuf == NULL || *sbuf == NULL) return 0; ! oldrow *= 4; oldbuf = *sbufaddr; /* *************** *** 110,116 **** * If the screen shrinks, remove lines off the top of the buffer * if resizeGravity resource says to do so. */ ! nrow *= 2; if (nrow < oldrow && term->misc.resizeGravity == SouthWestGravity) { /* Remove lines off the top of the buffer if necessary. */ move_up = oldrow-nrow --- 111,117 ---- * If the screen shrinks, remove lines off the top of the buffer * if resizeGravity resource says to do so. */ ! nrow *= 4; if (nrow < oldrow && term->misc.resizeGravity == SouthWestGravity) { /* Remove lines off the top of the buffer if necessary. */ move_up = oldrow-nrow *************** *** 156,162 **** return move_down ? move_down/2 : -move_up/2; /* convert to rows */ } ! ScreenWrite (screen, str, flags, length) /* Writes str into buf at row row and column col. Characters are set to match flags. --- 157,163 ---- return move_down ? move_down/2 : -move_up/2; /* convert to rows */ } ! ScreenWrite (screen, str, flags, cur_fg, cur_bg, length) /* Writes str into buf at row row and column col. Characters are set to match flags. *************** *** 164,172 **** TScreen *screen; char *str; register unsigned flags; register int length; /* length of string */ { ! register Char *attrs; register int avail = screen->max_col - screen->cur_col + 1; register Char *col; --- 165,174 ---- TScreen *screen; char *str; register unsigned flags; + register unsigned cur_fg, cur_bg; register int length; /* length of string */ { ! register Char *attrs, *fgs, *bgs; register int avail = screen->max_col - screen->cur_col + 1; register Char *col; *************** *** 175,187 **** if (length <= 0) return; ! col = screen->buf[avail = 2 * screen->cur_row] + screen->cur_col; attrs = screen->buf[avail + 1] + screen->cur_col; flags &= ATTRIBUTES; flags |= CHARDRAWN; bcopy(str, col, length); ! while(length-- > 0) *attrs++ = flags; } ScrnInsertLine (sb, last, where, n, size) --- 177,194 ---- if (length <= 0) return; ! col = screen->buf[avail = 4 * screen->cur_row] + screen->cur_col; attrs = screen->buf[avail + 1] + screen->cur_col; + fgs = screen->buf[avail + 2] + screen->cur_col; + bgs = screen->buf[avail + 3] + screen->cur_col; flags &= ATTRIBUTES; flags |= CHARDRAWN; bcopy(str, col, length); ! while(length-- > 0) { *attrs++ = flags; + *fgs++ = cur_fg; + *bgs++ = cur_bg; + } } ScrnInsertLine (sb, last, where, n, size) *************** *** 196,210 **** register int where, n, size; { register int i; ! char *save [2 * MAX_ROWS]; /* save n lines at bottom */ ! bcopy ((char *) &sb [2 * (last -= n - 1)], (char *) save, ! 2 * sizeof (char *) * n); /* clear contents of old rows */ ! for (i = 2 * n - 1; i >= 0; i--) bzero ((char *) save [i], size); /* --- 203,217 ---- register int where, n, size; { register int i; ! char *save [4 * MAX_ROWS]; /* save n lines at bottom */ ! bcopy ((char *) &sb [4 * (last -= n - 1)], (char *) save, ! 4 * sizeof (char *) * n); /* clear contents of old rows */ ! for (i = 4 * n - 1; i >= 0; i--) bzero ((char *) save [i], size); /* *************** *** 216,226 **** * * +--------|---------|----+ */ ! bcopy ((char *) &sb [2 * where], (char *) &sb [2 * (where + n)], ! 2 * sizeof (char *) * (last - where)); /* reuse storage for new lines at where */ ! bcopy ((char *)save, (char *) &sb[2 * where], 2 * sizeof(char *) * n); } --- 223,233 ---- * * +--------|---------|----+ */ ! bcopy ((char *) &sb [4 * where], (char *) &sb [4 * (where + n)], ! 4 * sizeof (char *) * (last - where)); /* reuse storage for new lines at where */ ! bcopy ((char *)save, (char *) &sb[4 * where], 4 * sizeof(char *) * n); } *************** *** 236,257 **** int where; { register int i; ! char *save [2 * MAX_ROWS]; /* save n lines at where */ ! bcopy ((char *) &sb[2 * where], (char *)save, 2 * sizeof(char *) * n); /* clear contents of old rows */ ! for (i = 2 * n - 1 ; i >= 0 ; i--) bzero ((char *) save [i], size); /* move up lines */ ! bcopy ((char *) &sb[2 * (where + n)], (char *) &sb[2 * where], ! 2 * sizeof (char *) * ((last -= n - 1) - where)); /* reuse storage for new bottom lines */ ! bcopy ((char *)save, (char *) &sb[2 * last], ! 2 * sizeof(char *) * n); } --- 243,264 ---- int where; { register int i; ! char *save [4 * MAX_ROWS]; /* save n lines at where */ ! bcopy ((char *) &sb[4 * where], (char *)save, 4 * sizeof(char *) * n); /* clear contents of old rows */ ! for (i = 4 * n - 1 ; i >= 0 ; i--) bzero ((char *) save [i], size); /* move up lines */ ! bcopy ((char *) &sb[4 * (where + n)], (char *) &sb[4 * where], ! 4 * sizeof (char *) * ((last -= n - 1) - where)); /* reuse storage for new bottom lines */ ! bcopy ((char *)save, (char *) &sb[4 * last], ! 4 * sizeof(char *) * n); } *************** *** 264,271 **** register int col, n; { register int i, j; ! register Char *ptr = sb [2 * row]; ! register Char *attrs = sb [2 * row + 1]; int wrappedbit = attrs[0]&LINEWRAPPED; attrs[0] &= ~LINEWRAPPED; /* make sure the bit isn't moved */ --- 271,278 ---- register int col, n; { register int i, j; ! register Char *ptr = sb [4 * row]; ! register Char *attrs = sb [4 * row + 1]; int wrappedbit = attrs[0]&LINEWRAPPED; attrs[0] &= ~LINEWRAPPED; /* make sure the bit isn't moved */ *************** *** 292,299 **** register int row, size; register int n, col; { ! register Char *ptr = sb[2 * row]; ! register Char *attrs = sb[2 * row + 1]; register nbytes = (size - n - col); int wrappedbit = attrs[0]&LINEWRAPPED; --- 299,306 ---- register int row, size; register int n, col; { ! register Char *ptr = sb[4 * row]; ! register Char *attrs = sb[4 * row + 1]; register nbytes = (size - n - col); int wrappedbit = attrs[0]&LINEWRAPPED; *************** *** 332,344 **** for (row = toprow; row <= maxrow; y += FontHeight(screen), row++) { register Char *chars; register Char *attrs; register int col = leftcol; int maxcol = leftcol + ncols - 1; int lastind; int flags; int x, n; GC gc; ! Boolean hilite; if (row < screen->top_marg || row > screen->bot_marg) lastind = row; --- 339,355 ---- for (row = toprow; row <= maxrow; y += FontHeight(screen), row++) { register Char *chars; register Char *attrs; + register Char *fgs, *bgs; register int col = leftcol; int maxcol = leftcol + ncols - 1; int lastind; int flags; + int fg, bg; int x, n; GC gc; ! Boolean hilite; ! Pixel fg_pix, bg_pix; ! extern XtermWidget term; if (row < screen->top_marg || row > screen->bot_marg) lastind = row; *************** *** 348,355 **** if (lastind < 0 || lastind > max) continue; ! chars = screen->buf [2 * (lastind + topline)]; ! attrs = screen->buf [2 * (lastind + topline) + 1]; if (row < screen->startHRow || row > screen->endHRow || (row == screen->startHRow && maxcol < screen->startHCol) || --- 359,368 ---- if (lastind < 0 || lastind > max) continue; ! chars = screen->buf [4 * (lastind + topline)]; ! attrs = screen->buf [4 * (lastind + topline) + 1]; ! fgs = screen->buf [4 * (lastind + topline) + 2]; ! bgs = screen->buf [4 * (lastind + topline) + 3]; if (row < screen->startHRow || row > screen->endHRow || (row == screen->startHRow && maxcol < screen->startHCol) || *************** *** 386,407 **** if (col > maxcol) continue; flags = attrs[col]; if ( (!hilite && (flags & INVERSE) != 0) || ! (hilite && (flags & INVERSE) == 0) ) if (flags & BOLD) gc = screen->reverseboldGC; else gc = screen->reverseGC; ! else if (flags & BOLD) gc = screen->normalboldGC; else gc = screen->normalGC; x = CursorX(screen, col); lastind = col; for (; col <= maxcol; col++) { ! if (attrs[col] != flags) { XDrawImageString(screen->display, TextWindow(screen), ! gc, x, y, (char *) &chars[lastind], n = col - lastind); if((flags & BOLD) && screen->enbolden) XDrawString(screen->display, TextWindow(screen), gc, x + 1, y, (char *) &chars[lastind], n); --- 399,440 ---- if (col > maxcol) continue; flags = attrs[col]; + fg = fgs[col]; + bg = bgs[col]; + + fg_pix = (flags & FG_COLOR) ? screen->colors[fg] + : screen->foreground; + bg_pix = (flags & BG_COLOR) ? screen->colors[bg] + : term->core.background_pixel; if ( (!hilite && (flags & INVERSE) != 0) || ! (hilite && (flags & INVERSE) == 0) ) { if (flags & BOLD) gc = screen->reverseboldGC; else gc = screen->reverseGC; ! ! XSetForeground(screen->display, gc, bg_pix); ! XSetBackground(screen->display, gc, fg_pix); ! ! } else { if (flags & BOLD) gc = screen->normalboldGC; else gc = screen->normalGC; + XSetForeground(screen->display, gc, fg_pix); + XSetBackground(screen->display, gc, bg_pix); + } + + x = CursorX(screen, col); lastind = col; for (; col <= maxcol; col++) { ! if (attrs[col] != flags || ! (flags & FG_COLOR && fgs[col] != fg) || ! (flags & BG_COLOR && bgs[col] != bg)) { ! XDrawImageString(screen->display, TextWindow(screen), ! gc, x, y, (char *) &chars[lastind], ! n = col - lastind); if((flags & BOLD) && screen->enbolden) XDrawString(screen->display, TextWindow(screen), gc, x + 1, y, (char *) &chars[lastind], n); *************** *** 414,427 **** lastind = col; flags = attrs[col]; ! if ((!hilite && (flags & INVERSE) != 0) || ! (hilite && (flags & INVERSE) == 0) ) ! if (flags & BOLD) gc = screen->reverseboldGC; ! else gc = screen->reverseGC; ! else ! if (flags & BOLD) gc = screen->normalboldGC; ! else gc = screen->normalGC; } if(chars[col] == 0) --- 447,476 ---- lastind = col; flags = attrs[col]; + fg = fgs[col]; + bg = bgs[col]; ! fg_pix = (flags & FG_COLOR) ? screen->colors[fg] ! : screen->foreground; ! bg_pix = (flags & BG_COLOR) ? screen->colors[bg] ! : term->core.background_pixel; ! ! if ( (!hilite && (flags & INVERSE) != 0) || ! (hilite && (flags & INVERSE) == 0) ) { ! if (flags & BOLD) gc = screen->reverseboldGC; ! else gc = screen->reverseGC; ! ! XSetForeground(screen->display, gc, bg_pix); ! XSetBackground(screen->display, gc, fg_pix); ! ! } else { ! if (flags & BOLD) gc = screen->normalboldGC; ! else gc = screen->normalGC; ! ! XSetForeground(screen->display, gc, fg_pix); ! XSetBackground(screen->display, gc, bg_pix); ! ! } } if(chars[col] == 0) *************** *** 430,441 **** if ( (!hilite && (flags & INVERSE) != 0) || ! (hilite && (flags & INVERSE) == 0) ) if (flags & BOLD) gc = screen->reverseboldGC; else gc = screen->reverseGC; ! else if (flags & BOLD) gc = screen->normalboldGC; else gc = screen->normalGC; XDrawImageString(screen->display, TextWindow(screen), gc, x, y, (char *) &chars[lastind], n = col - lastind); if((flags & BOLD) && screen->enbolden) --- 479,500 ---- if ( (!hilite && (flags & INVERSE) != 0) || ! (hilite && (flags & INVERSE) == 0) ) { if (flags & BOLD) gc = screen->reverseboldGC; else gc = screen->reverseGC; ! ! XSetForeground(screen->display, gc, bg_pix); ! XSetBackground(screen->display, gc, fg_pix); ! ! } else { if (flags & BOLD) gc = screen->normalboldGC; else gc = screen->normalGC; + + XSetForeground(screen->display, gc, fg_pix); + XSetBackground(screen->display, gc, bg_pix); + + } + XDrawImageString(screen->display, TextWindow(screen), gc, x, y, (char *) &chars[lastind], n = col - lastind); if((flags & BOLD) && screen->enbolden) *************** *** 455,462 **** register TScreen *screen; register int first, last; { ! first *= 2; ! last = 2 * last + 1; while (first <= last) bzero (screen->buf [first++], (screen->max_col + 1)); } --- 514,521 ---- register TScreen *screen; register int first, last; { ! first *= 4; ! last = 4 * last + 3; while (first <= last) bzero (screen->buf [first++], (screen->max_col + 1)); } *************** *** 536,542 **** rows + savelines, cols, screen->max_row + 1 + savelines, screen->max_col + 1); ! screen->buf = &screen->allbuf[2 * savelines]; screen->max_row += delta_rows; screen->max_col = cols - 1; --- 595,601 ---- rows + savelines, cols, screen->max_row + 1 + savelines, screen->max_col + 1); ! screen->buf = &screen->allbuf[4 * savelines]; screen->max_row += delta_rows; screen->max_col = cols - 1; *************** *** 635,644 **** length = avail; if (length <= 0) return; ! attrs = screen->buf[2 * row + 1] + col; value &= mask; /* make sure we only change the bits allowed by mask*/ while(length-- > 0) { ! *attrs &= ~mask; /* clear the bits */ *attrs |= value; /* copy in the new values */ attrs++; } --- 694,703 ---- length = avail; if (length <= 0) return; ! attrs = screen->buf[4 * row + 1] + col; value &= mask; /* make sure we only change the bits allowed by mask*/ while(length-- > 0) { ! *attrs &= mask; /* clear the bits */ *attrs |= value; /* copy in the new values */ attrs++; } *************** *** 666,672 **** if (length <= 0) return 0; ret = length; ! attrs = screen->buf[2 * row + 1] + col; while(length-- > 0) { *str++ = *attrs++; } --- 725,731 ---- if (length <= 0) return 0; ret = length; ! attrs = screen->buf[4 * row + 1] + col; while(length-- > 0) { *str++ = *attrs++; } *************** *** 678,684 **** register int row, col, len; { register int i; ! register Char *ptr = sb [2 * row]; for (i = col; i < len; i++) { if (ptr[i]) --- 737,743 ---- register int row, col, len; { register int i; ! register Char *ptr = sb [4 * row]; for (i = col; i < len; i++) { if (ptr[i]) diff --context --unidirectional-new-file ../xterm-X11R5/scrollbar.c ./scrollbar.c *** ../xterm-X11R5/scrollbar.c Sat Jan 1 12:31:22 1994 --- ./scrollbar.c Sat Nov 27 18:25:38 1993 *************** *** 336,350 **** if (doalloc && screen->allbuf) { if((screen->allbuf = (ScrnBuf) realloc((char *) screen->buf, ! (unsigned) 2*(screen->max_row + 2 + screen->savelines) * sizeof(char *))) == NULL) Error (ERROR_SBRALLOC); ! screen->buf = &screen->allbuf[2 * screen->savelines]; bcopy ((char *)screen->allbuf, (char *)screen->buf, ! 2 * (screen->max_row + 2) * sizeof (char *)); ! for(i = 2 * screen->savelines - 1 ; i >= 0 ; i--) if((screen->allbuf[i] = calloc((unsigned) screen->max_col + 1, sizeof(char))) == NULL) --- 336,350 ---- if (doalloc && screen->allbuf) { if((screen->allbuf = (ScrnBuf) realloc((char *) screen->buf, ! (unsigned) 4*(screen->max_row + 2 + screen->savelines) * sizeof(char *))) == NULL) Error (ERROR_SBRALLOC); ! screen->buf = &screen->allbuf[4 * screen->savelines]; bcopy ((char *)screen->allbuf, (char *)screen->buf, ! 4 * (screen->max_row + 2) * sizeof (char *)); ! for(i = 4 * screen->savelines - 1 ; i >= 0 ; i--) if((screen->allbuf[i] = calloc((unsigned) screen->max_col + 1, sizeof(char))) == NULL) Common subdirectories: ../xterm-X11R5/tektests and ./tektests diff --context --unidirectional-new-file ../xterm-X11R5/util.c ./util.c *** ../xterm-X11R5/util.c Sat Jan 1 12:31:24 1994 --- ./util.c Sat Nov 27 18:25:42 1993 *************** *** 616,627 **** FontHeight(screen)); } } ! bzero(screen->buf [2 * screen->cur_row] + screen->cur_col, (screen->max_col - screen->cur_col + 1)); ! bzero(screen->buf [2 * screen->cur_row + 1] + screen->cur_col, (screen->max_col - screen->cur_col + 1)); /* with the right part cleared, we can't be wrapping */ ! screen->buf [2 * screen->cur_row + 1] [0] &= ~LINEWRAPPED; } /* --- 616,631 ---- FontHeight(screen)); } } ! bzero(screen->buf [4 * screen->cur_row] + screen->cur_col, (screen->max_col - screen->cur_col + 1)); ! bzero(screen->buf [4 * screen->cur_row + 1] + screen->cur_col, (screen->max_col - screen->cur_col + 1)); + bzero(screen->buf [4 * screen->cur_row + 2] + screen->cur_col, + (screen->max_col - screen->cur_col + 1)); + bzero(screen->buf [4 * screen->cur_row + 3] + screen->cur_col, + (screen->max_col - screen->cur_col + 1)); /* with the right part cleared, we can't be wrapping */ ! screen->buf [4 * screen->cur_row + 1] [0] &= ~LINEWRAPPED; } /* *************** *** 679,686 **** Width(screen), FontHeight(screen)); } } ! bzero (screen->buf [2 * screen->cur_row], (screen->max_col + 1)); ! bzero (screen->buf [2 * screen->cur_row + 1], (screen->max_col + 1)); } ClearScreen(screen) --- 683,692 ---- Width(screen), FontHeight(screen)); } } ! bzero (screen->buf [4 * screen->cur_row], (screen->max_col + 1)); ! bzero (screen->buf [4 * screen->cur_row + 1], (screen->max_col + 1)); ! bzero (screen->buf [4 * screen->cur_row + 2], (screen->max_col + 1)); ! bzero (screen->buf [4 * screen->cur_row + 3], (screen->max_col + 1)); } ClearScreen(screen) *************** *** 921,926 **** --- 927,1033 ---- return (0); } + /***====================================================================***/ + + void + GetColors(term,pColors) + XtermWidget term; + ScrnColors *pColors; + { + register TScreen *screen = &term->screen; + GC tmpGC; + Window tek = TWindow(screen); + unsigned long tmp; + + + pColors->which= 0; + SET_COLOR_VALUE(pColors,TEXT_FG, screen->foreground); + SET_COLOR_VALUE(pColors,TEXT_BG, term->core.background_pixel); + SET_COLOR_VALUE(pColors,TEXT_CURSOR, screen->cursorcolor); + SET_COLOR_VALUE(pColors,MOUSE_FG, screen->mousecolor); + SET_COLOR_VALUE(pColors,MOUSE_BG, screen->mousecolorback); + + + SET_COLOR_VALUE(pColors,TEK_FG, screen->Tforeground); + SET_COLOR_VALUE(pColors,TEK_BG, screen->Tbackground); + } + + + ChangeColors(term,pNew) + XtermWidget term; + ScrnColors *pNew; + { + register TScreen *screen = &term->screen; + GC tmpGC; + Window tek = TWindow(screen); + unsigned long tmp; + Bool newCursor= TRUE; + + + if (COLOR_DEFINED(pNew,TEXT_BG)) { + term->core.background_pixel= COLOR_VALUE(pNew,TEXT_BG); + } + + if (COLOR_DEFINED(pNew,TEXT_CURSOR)) { + screen->cursorcolor= COLOR_VALUE(pNew,TEXT_CURSOR); + } + else if ((screen->cursorcolor == screen->foreground)&& + (COLOR_DEFINED(pNew,TEXT_FG))) { + screen->cursorcolor= COLOR_VALUE(pNew,TEXT_FG); + } + else newCursor= FALSE; + + if (COLOR_DEFINED(pNew,TEXT_FG)) { + Pixel fg= COLOR_VALUE(pNew,TEXT_FG); + screen->foreground= fg; + XSetForeground(screen->display,screen->normalGC,fg); + XSetBackground(screen->display,screen->reverseGC,fg); + XSetForeground(screen->display,screen->normalboldGC,fg); + XSetBackground(screen->display,screen->reverseboldGC,fg); + } + + if (COLOR_DEFINED(pNew,TEXT_BG)) { + Pixel bg= COLOR_VALUE(pNew,TEXT_BG); + term->core.background_pixel= bg; + XSetBackground(screen->display,screen->normalGC,bg); + XSetForeground(screen->display,screen->reverseGC,bg); + XSetBackground(screen->display,screen->normalboldGC,bg); + XSetForeground(screen->display,screen->reverseboldGC,bg); + XSetWindowBackground(screen->display, TextWindow(screen), + term->core.background_pixel); + } + + if (COLOR_DEFINED(pNew,MOUSE_FG)||(COLOR_DEFINED(pNew,MOUSE_BG))) { + if (COLOR_DEFINED(pNew,MOUSE_FG)) + screen->mousecolor= COLOR_VALUE(pNew,MOUSE_FG); + if (COLOR_DEFINED(pNew,MOUSE_BG)) + screen->mousecolorback= COLOR_VALUE(pNew,MOUSE_BG); + + recolor_cursor (screen->pointer_cursor, + screen->mousecolor, screen->mousecolorback); + recolor_cursor (screen->arrow, + screen->mousecolor, screen->mousecolorback); + XDefineCursor(screen->display, TextWindow(screen), + screen->pointer_cursor); + if(tek) + XDefineCursor(screen->display, tek, screen->arrow); + } + + if ((tek)&&(COLOR_DEFINED(pNew,TEK_FG)||COLOR_DEFINED(pNew,TEK_BG))) { + ChangeTekColors(screen,pNew); + } + set_cursor_gcs(screen); + XClearWindow(screen->display, TextWindow(screen)); + ScrnRefresh (screen, 0, 0, screen->max_row + 1, + screen->max_col + 1, False); + if(screen->Tshow) { + XClearWindow(screen->display, tek); + TekExpose((XExposeEvent *) NULL); + } + } + + /***====================================================================***/ + ReverseVideo (termw) XtermWidget termw; { *************** *** 973,978 **** --- 1080,1086 ---- XClearWindow(screen->display, tek); TekExpose((Widget)NULL, (XEvent *)NULL, (Region)NULL); } + ReverseOldColors(); update_reversevideo(); } Binary files ../xterm-X11R5/xterm and ./xterm differ diff --context --unidirectional-new-file ../xterm-X11R5/xterm-bc.ti ./xterm-bc.ti *** ../xterm-X11R5/xterm-bc.ti Wed Dec 31 19:00:00 1969 --- ./xterm-bc.ti Sat Jan 1 12:50:42 1994 *************** *** 0 **** --- 1,23 ---- + xterm|vs100|xterm terminal emulator (X Window System), + enacs=\E(B\E)0, smacs=^N, rmacs=^O, + acsc=00``aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, + am, km, mir, msgr, xenl, xon, + cols#80, lines#24, + bel=^G, bold=\E[1m, clear=\E[H\E[2J, cr=\r, + csr=\E[%i%p1%d;%p2%dr, cub1=\b, cud=\E[%p1%dB, + cud1=\n, cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, + cuu=\E[%p1%dA, cuu1=\E[A, dch=\E[%p1%dP, dch1=\E[P, + dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K, home=\E[H, + ht=\t, ich=\E[%p1%d@, il=\E[%p1%dL, il1=\E[L, ind=\n, + is2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l, kbs=\b, + kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A, + kf1=\E[11~, kf2=\E[12~, kf3=\E[13~, kf4=\E[14~, rc=\E8, + kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, + kf10=\E[21~, kf11=\E[23~, kf12=\E[14~, + rev=\E[7m, ri=\EM, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l, + rmkx=\E[?1l\E>, rmso=\E[m, rmul=\E[m, + rs2=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;3;4;6l\E[4l\E<, + sc=\E7, sgr0=\E[m, smcup=\E7\E[?47h, smir=\E[4h, + smkx=\E[?1h\E=, smso=\E[7m, smul=\E[4m, tbc=\E[3k, + colors#8, pairs#64, op=\E[37;40m, setf=\E[%p1%{30}%+%dm, + setb=\E[%p1%{40}%+%dm,