Skip to content
Commits on Source (27)
--- $XTermId: COPYING,v 1.2 2019/01/16 23:30:10 tom Exp $
-------------------------------------------------------------------------------
Copyright 1996-2018,2019 by Thomas E. Dickey
All Rights Reserved
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name(s) of the above copyright
holders shall not be used in advertising or otherwise to promote the
sale, use or other dealings in this Software without prior written
authorization.
Copyright 1987, 1988 X Consortium
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of the X Consortium shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from the X Consortium.
Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital Equipment
Corporation not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
-- vile: txtmode
-------------------------------------------------------------------------------
-- $XTermId: INSTALL,v 1.157 2015/04/12 20:44:43 tom Exp $
-- $XTermId: INSTALL,v 1.179 2018/12/09 18:14:52 tom Exp $
-------------------------------------------------------------------------------
-- Copyright 1997-2014,2015 by Thomas E. Dickey
-- Copyright 1997-2017,2018 by Thomas E. Dickey
--
-- All Rights Reserved
--
......@@ -49,6 +49,16 @@ the sense of the default behavior.
The options (in alphabetic order):
--disable-256-color disable 256-color support
Do not compile-in code that interprets SGR 38 and 48 for 256-colors.
If this feature is disabled, the 88-color feature will be used.
--disable-88-color disable 88-color support
Do not compile-in code that interprets SGR 38 and 48 for 88-colors.
The 256-color option overrides this.
--disable-16-color disable 16-color support
Do not compile-in code to recognize aixterm-style control sequences
......@@ -94,7 +104,7 @@ The options (in alphabetic order):
e.g., to make boxes. When xterm loads a font, it checks if those
characters are present, and draws its own if they are missing.
--disable-broken-st disallow broken string-terminators],
--disable-broken-st disallow broken string-terminators,
Do not compile-in code that works around a bug in some ISDN routers
(and possibly other applications written by the same people): they
......@@ -107,7 +117,7 @@ The options (in alphabetic order):
See also --enable-broken-osc
--disable-c1-print disallow -k8 option for printable 128-159],
--disable-c1-print disallow -k8 option for printable 128-159,
Use this option to suppress support for nonstandard use of codes
128-159, which normally are considered control characters. Some users
......@@ -137,6 +147,11 @@ The options (in alphabetic order):
Note: If desktop-utils is not found they will not be installed anyway.
--disable-direct-color disable direct color support
Do not compile-in code that interprets SGR 38 and 48 for direct colors.
This feature extends the 256-color feature.
--disable-doublechars disable support for double-size chars
Do not compile-in code that supports font-manipulation needed to
......@@ -247,9 +262,10 @@ The options (in alphabetic order):
--disable-paste64 disable support for bracketed paste mode
Do not compile-in code to support experimental bracketed paste mode,
i.e., provide functions for setting/getting the selection data.
along with functions for setting/getting the selection data, termed
"paste64".
(see ctlseqs.ms description of OSC 52).
(see ctlseqs.ms description of OSC 52, and DECSET 2004).
--disable-pty-handshake disable support for pty handshakes
......@@ -285,6 +301,10 @@ The options (in alphabetic order):
Do not compile-in code that suppresses redundant updates to the
titlebar when the text has not changed.
--disable-screen-dumps disable XHTML and SVG screen dumps
Do not compile-in code that provides XHTML and SVG screen dumps.
--disable-selection-ops disable selection operations
Do not compile-in code to support the actions which allow users
......@@ -345,7 +365,7 @@ The options (in alphabetic order):
ISO 6429 defines a few more which historically have found little use.
Some people find these amusing.
This is normally enabled.
This is normally enabled. The direct-colors feature relies upon it.
--disable-wide-chars disable wide-character support
......@@ -365,14 +385,6 @@ The options (in alphabetic order):
This uses less memory, but is less complete. However, most languages
are covered by the 16-bit encoding.
--enable-256-color enable 256-color support
Compile-in code that interprets SGR 38 and 48 for 256-colors.
--enable-88-color enable 88-color support
Compile-in code that interprets SGR 38 and 48 for 88-colors.
--enable-alt-sends-esc set default altSendsEscape resource (default: no)
This sets the default resource value, which is shown in the manpage.
......@@ -385,14 +397,14 @@ The options (in alphabetic order):
This sets the default resource value, which is shown in the manpage.
--enable-broken-osc allow broken Linux OSC-strings],
--enable-broken-osc allow broken Linux OSC-strings
Compile-in code to accommodate scripts that write Linux's malformed
palette control strings without checking. The result makes xterm
appear to freeze. This workaround makes xterm ignore the strings,
and is compiled-in by default for Linux.
--enable-builtin-xpms allow broken Linux OSC-strings],
--enable-builtin-xpms compile-in icon data
Compile-in X pixmap data for these icons:
filled-xterm
......@@ -432,6 +444,13 @@ The options (in alphabetic order):
further work because colors used for clearing the screen do not
match the expected behavior (see vttest for instance).
--enable-env-terminfo setenv $TERMINFO if --with-own-terminfo gives value
Use the custom terminfo directory specified in "--with-own-terminfo"
as the $TERMINFO variable for the shells spawned by xterm. Setting
this variable makes most curses (and termcap) applications look in
that directory for terminal descriptions.
--enable-exec-xterm enable "spawn-new-terminal" action
If your platform supports the process filesystem "cwd" link,
......@@ -458,7 +477,8 @@ The options (in alphabetic order):
Compile-in code that allows logging.
Logging was disabled in X11R5 xterm because of security problems.
They were addressed in X11R6, but the feature was not reinstated.
They were addressed in X11R6, but the feature was not reinstated
because of concerns (long past) about xterm running as root-setuid.
--enable-meta-sends-esc set default metaSendsEscape resource (default: no)
......@@ -500,7 +520,8 @@ The options (in alphabetic order):
this puts xterm into a mode that sends special function-key strings to
bracket the data.
(See --enable-paste64, which fits xterm's protocol better).
(The "paste64" feature, which fits xterm's protocol better, is
configured by default).
--enable-sco-fkeys enable support for SCO-style function keys
......@@ -514,10 +535,6 @@ The options (in alphabetic order):
Compile-in code to support experimental sixel-graphics
--enable-sun-fkeys enable support for Sun-style function keys
Compile-in code to support Sun-style function keys.
--enable-toolbar enable pulldown menus on toolbar
Compile-in code that builds a toolbar with pulldown menus. The
......@@ -605,15 +622,16 @@ The options (in alphabetic order):
Check for and link with dbmalloc.
--with-desktop-category=XXX one or more desktop catgories or auto
--with-desktop-category=XXX one or more desktop categories or auto
This is a list of names. The configure script maps blanks and commas
to semicolons (";") which are used by the desktop utils as a separator.
to semicolons (";") which are used by the desktop utilities as a
separator.
The default value "auto" tells the configure script to look
at existing ".desktop" files for xterm and common terminal
emulators, to use those. If none are found, the script uses this
default:
System;TerminalEmulator;Utility;
System;TerminalEmulator;
--with-freetype-config configure script to use for FreeType
......@@ -695,14 +713,18 @@ The options (in alphabetic order):
--with-man2html[=XXX] use XXX rather than groff
Specify an alternative program to use for converting manpages and
control sequences document to html. If the option is given, its
default value is "man2html", otherwise it is "groff" with groff's
special options. The "man2html" script reads formatted nroff output
from its standard input, and writes html to its standard output. Other
input/output conventions are not currently supported.
control sequences document to html. The default value for the option
is "man2html". If the "man2html" script is not found, then "groff" is
used with groff's special options.
The "man2html" script reads formatted nroff output from its standard
input, and writes html to its standard output. Other input/output
conventions are not currently supported.
See
http://invisible-island.net/scripts
http://invisible-island.net/scripts/man2html.html
for an up-to-date version of "man2html".
--with-neXtaw link with neXT Athena library
......@@ -715,9 +737,9 @@ The options (in alphabetic order):
rule to point to the given directory.
If you have the $TERMINFO variable defined in your environment, the
configure script will use that value. If no option and no variable
are are given, the configure script uses /usr/lib/terminfo, if it
exists.
configure script may use that value, if it matches an existing
directory. If no option and no variable are are given, the configure
script uses /usr/lib/terminfo, if it exists.
You do not have to run "make install-ti", if there is already a
workable terminfo description. Be advised, however, that the
......@@ -725,9 +747,18 @@ The options (in alphabetic order):
directed to other variations (such as nxterm) which do not
support the background-color erase capability.
--with-pixmapdir=DIR directory in which to install pixmaps (DATADIR/pixmaps)
Specify directory in which to install ".xpm" files.
--with-pcre use PCRE for regular-expressions
If regular expressions are not disable (--disable-regex), use PCRE
If regular expressions are not disabled (--disable-regex), use PCRE
rather than the POSIX regular expressions.
--with-pcre2 use PCRE2 for regular-expressions
If regular expressions are not disabled (--disable-regex), use PCRE2
rather than the POSIX regular expressions.
--with-pkg-config{=path} enable/disable use of pkg-config
......@@ -777,6 +808,13 @@ The options (in alphabetic order):
Activate the --disable-leaks option, and ensure that "-g" is added to
CFLAGS.
--without-xinerama do not use Xinerama extension for multiple screens
Xinerama is an X server extension that allows multiple physical
screens to behave as a single screen. If you do not need the feature
(or do not want the extra library dependency), use this option to
suppress it.
--with-xpm=DIR use Xpm library for colored icon, may specify path
Use Xpm library to show colored icon in window decoration, e.g.,
......
XCOMM $XTermId: Imakefile,v 1.111 2014/07/22 22:29:17 tom Exp $
XCOMM $XTermId: Imakefile,v 1.121 2018/08/12 17:23:20 tom Exp $
XCOMM
XCOMM Attention xterm porters
XCOMM
......@@ -88,7 +88,7 @@ INSTSETIDFLAGS = NullParameter
*/
#ifdef LinuxGnuSourceDefines
# ifdef UseInstalled
IMAKEDEFINES = -D_GNU_SOURCE
IMAKEDEFINES = -D_DEFAULT_SOURCE -U_XOPEN_SOURCE -D_XOPEN_SOURCE=600
# endif
#endif
......@@ -129,15 +129,16 @@ module.o: ; $(CC) -c defines $(CFLAGS) module.c
OSMAJORVERSION = OSMajorVersion
OSMINORVERSION = OSMinorVersion
/* none of these can be expected to use termcap unless emulated by terminfo */
#if defined(NTOArchitecture) || \
defined(OpenBSDArchitecture) || \
defined(SGIArchitecture) || \
defined(SunArchitecture)
TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
#elif defined(LinuxArchitecture)
# if LinuxUsesNcurses
TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
# endif
defined(SunArchitecture) || \
defined(NetBSDArchitecture) || \
defined(OpenBSDArchitecture) || \
defined(FreeBSDArchitecture) || \
defined(LinuxArchitecture)
TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR -DHAVE_TERM_H
#endif
#if !defined(OS2Architecture) && !defined(__GNU__) && !defined(Minix3Architecture)
......@@ -165,6 +166,9 @@ TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
#if !HasPutenv
PUTENVDEF = -DNOPUTENV
#endif
#ifdef DumpsXTerm
DUMPSDEF = -DOPT_SCREEN_DUMPS=1
#endif
#ifdef RegisXTerm
SIXELDEF = -DOPT_REGIS_GRAPHICS=1
#endif
......@@ -180,11 +184,15 @@ TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
MISC_DEFINES = /* -DALLOWLOGGING -DALLOWLOGFILEEXEC */
XKB_DEFINES = XkbClientDefines
PATH_DEFINES = -DPROJECTROOT=$(PROJECTROOT)
DEFINES = $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(PUTENVDEF) $(IMAKEDEFINES) $(SIXELDEF) $(TRACEDEF)
DEFINES = $(XKB_DEFINES) $(TERMCAPDEFINES) $(FEATURE_DEFINES) $(SCROLLBAR_RIGHT) $(UTF8_OPTION) $(XRFDEF) $(PATH_DEFINES) $(PUTENVDEF) $(IMAKEDEFINES) $(SIXELDEF) $(TRACEDEF) $(DUMPSDEF)
INCLUDES = -I. $(XRFINCLUDES)
MAINSRC = main.c
MAINOBJ = main.o
#ifdef DumpsXTerm
DUMPSSRC = html.c svg.c
DUMPSOBJ = html.o svg.o
#endif
#ifdef RegisXTerm
SIXELSRC = graphics_regis.c
SIXELOBJ = graphics_regis.o
......@@ -202,13 +210,13 @@ TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
linedata.c menu.c misc.c print.c ptydata.c scrollback.c \
screen.c scrollbar.c tabs.c util.c version.c xstrings.c \
xtermcap.c TekPrsTbl.c Tekproc.c VTPrsTbl.c \
$(MAINSRC) $(EXTRASRC) $(UTF8SRC) $(SIXELSRC) $(TRACESRC)
$(MAINSRC) $(EXTRASRC) $(UTF8SRC) $(SIXELSRC) $(TRACESRC) $(DUMPSSRC)
OBJS1 = button.o cachedGCs.o charproc.o charsets.o cursor.o \
data.o doublechr.o fontutils.o input.o \
linedata.o menu.o misc.o print.o ptydata.o scrollback.o \
screen.o scrollbar.o tabs.o util.o version.o xstrings.o \
xtermcap.o TekPrsTbl.o Tekproc.o VTPrsTbl.o \
$(MAINOBJ) $(EXTRAOBJ) $(UTF8OBJ) $(SIXELOBJ) $(TRACEOBJ)
$(MAINOBJ) $(EXTRAOBJ) $(UTF8OBJ) $(SIXELOBJ) $(TRACEOBJ) $(DUMPSOBJ)
SRCS2 = resize.c version.c xstrings.c
OBJS2 = resize.o version.o xstrings.o
SRCS = $(SRCS1) $(SRCS2)
......@@ -237,11 +245,27 @@ TERMCAPDEFINES=-DUSE_TERMINFO -DHAVE_TIGETSTR
AllTarget($(PROGRAMS))
VTPARSE_H = VTparse.h VTparse.hin
TEKPARSE_H = Tekparse.h Tekparse.hin
VTPARSE_C = VTparse.h VTparse.cin
TEKPARSE_C = Tekparse.h Tekparse.cin
.SUFFIXES : .def .cin .hin
.def.cin :
awk '/^CASE_/{printf "{ %d, \"%s\" },\n", n++, $$1; }' < $< >$@
.def.hin :
awk '/^CASE_/{printf "#define %s %d\n", $$1, n++}' < $< >$@
SpecialCObjectRule(main,$(_NOOP_),$(MAIN_DEFINES))
SpecialCObjectRule(menu,$(_NOOP_),$(MISC_DEFINES))
SpecialCObjectRule(misc,$(_NOOP_),$(MISC_DEFINES))
SpecialCObjectRule(charproc,$(_NOOP_),$(MISC_DEFINES))
SpecialCObjectRule(misc,$(VTPARSE_H),$(MISC_DEFINES))
SpecialCObjectRule(VTPrsTbl,$(VTPARSE_H),$(MISC_DEFINES))
SpecialCObjectRule(charproc,$(VTPARSE_H),$(MISC_DEFINES))
SpecialCObjectRule(data,$(_NOOP_),$(MISC_DEFINES))
SpecialCObjectRule(TekPrsTbl,$(TEKPARSE_H),$(MISC_DEFINES))
SpecialCObjectRule(TekProc,$(TEKPARSE_H),$(MISC_DEFINES))
SpecialCObjectRule(trace,$(VTPARSE_C) $(TEKPARSE_C),$(MISC_DEFINES))
#if InstallXtermSetUID
SetUIDProgramTarget(xterm,$(OBJS1),$(DEPLIBS1),$(XRFLIBS) XkbClientLibs XawClientLibs,$(TERMCAPLIB) $(PTYLIB))
......@@ -312,4 +336,8 @@ InstallAppDefaults(UXTerm)
InstallAppDefaultsLong(XTerm-col,XTerm-color)
InstallManPage(xterm,$(MANDIR))
InstallManPage(resize,$(MANDIR))
cleandir::
$(RM) *parse.hin *parse.cin
DependTarget()
MANIFEST for xterm-318, version xterm-318
MANIFEST for xterm-345, version xterm-345
--------------------------------------------------------------------------------
MANIFEST this file
256colres.h resource-definitions for 256-color mode
......@@ -6,6 +6,7 @@ MANIFEST this file
88colres.h resource definitions for 88-color mode
88colres.pl script to generate 88colres.h
AAA_README_VMS.txt note for VMS port of 'xterm'
COPYING license for this program
INSTALL configure script: options and related install instructions
Imakefile imake template for Makefile
KOI8RXTerm.ad resources for koi8rxterm
......@@ -46,6 +47,7 @@ doublechr.c VT100 double-size character support
error.h error-code definitions for 'xterm'
fontutils.c xterm functions for (re)loading fonts
fontutils.h interface of fontutils.c
gen-charsets.pl script to convert codepages into code
gen-pc-fkeys.pl script to generate extended function-key terminfo
graphics.c graphics support functions for 'xterm'
graphics.h interface of graphics.c
......@@ -53,6 +55,7 @@ graphics_regis.c support for ReGIS
graphics_regis.h interface of graphics_regis.c
graphics_sixel.c support for Sixels
graphics_sixel.h interface of graphics_sixel.c
html.c format HTML-screendumps
input.c VT100 key-symbol and function-key translation
install-sh install-script (needed by configure)
keysym2ucs.c lookup-table for UTF-8 to keysyms
......@@ -81,6 +84,7 @@ screen.c VT100 screen update functions
scrollback.c manage scrollback (a big FIFO)
scrollbar.c VT100 scrollbar support functions
sinstall.sh install setuid if existing program was
svg.c format SVG-screendumps
tabs.c VT100 tabstop support-functions
termcap termcap entries for 'xterm'
terminfo terminfo entries for 'xterm'
......@@ -158,13 +162,21 @@ package/debian/source/format build-script
package/debian subdirectory
package/debian/watch build-script
package/debian/xterm-dev.docs build-script
package/debian/xterm-dev.lintian-overrides ignore useless warnings from lintian
package/debian/xterm-dev.menu Debian menu-file for xterm-dev package.
package/debian/xterm-xres.sed build-script
package/freebsd subdirectory
package/freebsd/Makefile build-script
package/freebsd/distinfo generated sums
package/freebsd/pkg-descr build-script
package/freebsd/pkg-message build-script
package/freebsd/pkg-plist build-script
package/pkgsrc subdirectory
package/pkgsrc/DESCR build-script
package/pkgsrc/Makefile build-script
package/pkgsrc/PLIST build-script
package/pkgsrc/distinfo build-script
package/pkgsrc/options.mk build-script
package subdirectory
package/xterm.spec build-script
tektests subdirectory
......@@ -190,15 +202,24 @@ vttests/88colors.pl sample script showing 88-colors
vttests/88colors2.pl sample script showing 88-colors
vttests/8colors.sh test-script to illustrate 8-colors
vttests/acolors.sh demonstrate changing the ANSI colors
vttests/closest-rgb.pl demo of color-distances
vttests/doublechars.sh test script to demonstrate doublesize chars
vttests/dynamic.pl demo for dynamic colors
vttests/dynamic.sh script to illustrate the dynamic colors control sequence
vttests/dynamic2.sh complete example of dynamic colors
vttests/fonts.sh script to demonstrate font-switching sequences
vttests/mouse-codes demo script for mouse-codes
vttests/other-sgr.sh demonstrate non-VTxx SGRs
vttests/paste64.pl script to test base64-selection option
vttests/print-vt-chars.pl demo-script
vttests/query-color.pl demonstrate OSC 4
vttests/query-dynamic.pl demonstrate OSC 10 to OSC 19
vttests/query-fonts.pl script to demo/test font-querying
vttests/query-status.pl query DECRQSS status
vttests/report-sgr.pl demonstrate report-sgr
vttests/resize.pl translated resize.sh to perl since it is easy to test, and I needed
vttests/resize.sh script to demonstrate resizing
vttests/sgrPushPop.pl demonstrate xterm SGR push/pop
vttests/sgrPushPop2.pl demonstrate xterm SGR push/pop for colors
vttests/tcapquery.pl script to test tcap-query option
vttests/title.sh test-script to show title of xterm in action
## $XTermId: Makefile.in,v 1.234 2015/02/12 09:31:30 tom Exp $
## $XTermId: Makefile.in,v 1.245 2019/01/14 01:40:56 tom Exp $
# -----------------------------------------------------------------------------
# this file is part of xterm
#
# Copyright 1997-2014,2015 by Thomas E. Dickey
# Copyright 1997-2018,2019 by Thomas E. Dickey
#
# All Rights Reserved
#
......@@ -52,6 +52,7 @@ ETAGS = @ETAGS@
LN_S = @LN_S@
RM = rm -f
LINT = @LINT@
LINT_OPTS = @LINT_OPTS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
......@@ -102,6 +103,13 @@ EXTRAHDR = @EXTRAHDRS@
EXTRASRC = @EXTRASRCS@
EXTRAOBJ = @EXTRAOBJS@
AUTO_SOURCE = \
builtin_icons.h \
VTparse.cin \
Tekparse.cin \
VTparse.hin \
Tekparse.hin
SRCS1 = button.c cachedGCs.c charproc.c charsets.c cursor.c \
data.c doublechr.c fontutils.c input.c \
linedata.c main.c menu.c misc.c \
......@@ -118,13 +126,13 @@ EXTRAOBJ = @EXTRAOBJS@
OBJS2 = resize$o version$o xstrings$o
SRCS = $(SRCS1) $(SRCS2)
OBJS = $(OBJS1) $(OBJS2)
HDRS = VTparse.h data.h error.h main.h menu.h \
HDRS = VTparse.h data.h error.h fontutils.h main.h menu.h \
ptyx.h version.h xstrings.h xterm.h xtermcap.h $(EXTRAHDR)
PROGRAMS = xterm$x resize$x
all : $(PROGRAMS)
################################################################################
.SUFFIXES : .i .def .hin .$(manext) .ms .man .txt @MAN2HTML_NOTE@ .html @GROFF_NOTE@ .ps .pdf
.SUFFIXES : .i .def .cin .hin .$(manext) .ms .man .txt @MAN2HTML_NOTE@ .html @GROFF_NOTE@ .ps .pdf
.c$o :
@RULE_CC@
......@@ -134,8 +142,13 @@ all : $(PROGRAMS)
@RULE_CC@
@ECHO_CC@$(CPP) -C $(CPPFLAGS) $*.c >$@
.def.cin :
@echo "making $@ from $<"
@$(AWK) 'BEGIN{printf "/* vile:cmode */\n";}/^CASE_/{printf "{ %d, \"%s\" },\n", n++, $$1; }' < $< >$@
.def.hin :
grep '^CASE_' $< | $(AWK) '{printf "#define %s %d\n", $$1, n++}' >$@
@echo "making $@ from $<"
@$(AWK) 'BEGIN{printf "/* vile:cmode */\n";}/^CASE_/{printf "#define %s %d\n", $$1, n++}' < $< >$@
.man.$(manext) :
$(SHELL) ./minstall "$(INSTALL_DATA)" $< $@ $(appsdir) $(CLASS) $* $* $(pixmapdir)
......@@ -168,6 +181,10 @@ all : $(PROGRAMS)
@GROFF_NOTE@.ps.pdf :
@GROFF_NOTE@ ps2pdf $*.ps
################################################################################
VTPARSE_H = VTparse.h VTparse.hin
TEKPARSE_H = Tekparse.h Tekparse.hin
main$o : main.h
misc$o : version.h
......@@ -188,10 +205,19 @@ resize$x : $(OBJS2)
-$(RM) $@
perl $(srcdir)/88colres.pl > $@
charproc$o : main.h @CHARPROC_DEPS@
charproc$o : $(VTPARSE_H) main.h @CHARPROC_DEPS@
graphics_regis$o : $(VTPARSE_H)
graphics_sixel$o : $(VTPARSE_H)
misc$o : $(VTPARSE_H)
VTPrsTbl$o : $(VTPARSE_H)
TekPrsTbl$o : $(TEKPARSE_H)
Tekproc$o : $(TEKPARSE_H)
misc$o : builtin_icons.h
trace$o : VTparse.cin Tekparse.cin
# do this to quiet gcc -Wcast-qual warnings
builtin_icons.h :
@echo "#if OPT_BUILTIN_XPMS" >$@
......@@ -314,14 +340,13 @@ APP_NAMES = XTerm UXTerm KOI8RXTerm
@no_icondir@install \
@no_icondir@install-icon \
@no_icondir@install-full :: $(ICONDIR)
@no_icondir@ ACTUAL_XTERM=$(actual_xterm) \
@no_icondir@ $(SHELL) -c '\
@no_icondir@ @ECHO_CC@ACTUAL_XTERM=$(actual_xterm) $(SHELL) -c '\
@no_icondir@ h=$(ICONDIR)/$(ICON_THEME); \
@no_icondir@ for n in $(ICON_LIST); \
@no_icondir@ do \
@no_icondir@ x=$$ACTUAL_XTERM; \
@no_icondir@ l=`echo "$$n" | cut -f1 -d:`; \
@no_icondir@ r=`echo "$$n" | cut -f2 -d: |sed -e s,$(ICON_NAME),$$x-color,`; \
@no_icondir@ r=`echo "$$n" | cut -f2 -d: |sed -e "s,xterm,$$ACTUAL_XTERM,"`; \
@no_icondir@ test -z "$$r" && continue; \
@no_icondir@ d=$$h/`echo "$$r" | sed -e "s,/[^/]*$$,,"`; \
@no_icondir@ test -d "$$d" || mkdir -p "$$d"; \
......@@ -344,8 +369,7 @@ APP_NAMES = XTerm UXTerm KOI8RXTerm
@no_pixmapdir@install \
@no_pixmapdir@install-icon \
@no_pixmapdir@install-full :: $(PIXMAPDIR)
@no_pixmapdir@ ACTUAL_XTERM=$(actual_xterm) \
@no_pixmapdir@ $(SHELL) -c '\
@no_pixmapdir@ @ECHO_CC@ACTUAL_XTERM=$(actual_xterm) $(SHELL) -c '\
@no_pixmapdir@ h=$(PIXMAPDIR); \
@no_pixmapdir@ for n in $(srcdir)/icons/*xterm*_32x32.xpm $(srcdir)/icons/*xterm*_48x48.xpm; \
@no_pixmapdir@ do \
......@@ -381,7 +405,7 @@ SET_TERMINFO = @SET_TERMINFO@
install-full \
install-tc ::
@-$(SHELL) -c "test -f /etc/termcap && echo 'You must install the termcap entry manually by editing /etc/termcap'"
@-$(SHELL) -c "if test -f /etc/termcap ; then echo 'You must install the termcap entry manually by editing /etc/termcap'; fi"
installdirs : $(INSTALL_DIRS)
################################################################################
......@@ -448,7 +472,7 @@ uninstall-full ::
@no_appsdir@uninstall \
@no_appsdir@uninstall-app \
@no_appsdir@uninstall-full ::
@no_appsdir@ @-$(SHELL) -c 'for s in $(APP_NAMES); \
@no_appsdir@ -@ECHO_CC@$(SHELL) -c 'for s in $(APP_NAMES); \
@no_appsdir@ do \
@no_appsdir@ echo "** $$s"; \
@no_appsdir@ d=`echo $$s | sed -e s/XTerm/$(CLASS)/`; \
......@@ -461,12 +485,13 @@ uninstall-full ::
@no_icondir@uninstall \
@no_icondir@uninstall-icon \
@no_icondir@uninstall-full ::
@no_icondir@ -@$(SHELL) -c 'for n in $(ICON_LIST); \
@no_icondir@ -@ECHO_CC@$(SHELL) -c 'ACTUAL_XTERM=$(actual_xterm) ; \
@no_icondir@ for n in $(ICON_LIST); \
@no_icondir@ do \
@no_icondir@ x=$(actual_xterm); \
@no_icondir@ r=`echo "$$n" | sed -e s,\^.\*:,, -e s,xterm,$$x,`; \
@no_icondir@ r=`echo "$$n" | sed -e s,\^.\*:,, -e s,xterm,$$ACTUAL_XTERM,`; \
@no_icondir@ test -z "$$r" && continue; \
@no_icondir@ h=$(ICONDIR)/$(ICON_THEME); \
@no_icondir@ test -f $$h/$$r || continue; \
@no_icondir@ echo removing $$h/$$r; \
@no_icondir@ $(RM) $$h/$$r; \
@no_icondir@ done'
......@@ -475,8 +500,8 @@ uninstall-full ::
@no_pixmapdir@uninstall \
@no_pixmapdir@uninstall-icon \
@no_pixmapdir@uninstall-full ::
@no_pixmapdir@ ACTUAL_XTERM=$(actual_xterm) \
@no_pixmapdir@ $(SHELL) -c 'for n in $(srcdir)/icons/*xterm*_32x32.xpm $(srcdir)/icons/*xterm*_48x48.xpm; \
@no_pixmapdir@ -@$(SHELL) -c 'ACTUAL_XTERM=$(actual_xterm) ; \
@no_pixmapdir@ for n in $(srcdir)/icons/*xterm*_32x32.xpm $(srcdir)/icons/*xterm*_48x48.xpm; \
@no_pixmapdir@ do \
@no_pixmapdir@ l=`basename $$n`; \
@no_pixmapdir@ r=`echo "$$l" | sed -e "s,xterm,$$ACTUAL_XTERM,"`; \
......@@ -492,14 +517,19 @@ uninstall-full ::
@desktop_utils@install-full ::
@desktop_utils@ ACTUAL_XTERM=$(actual_xterm) \
@desktop_utils@ $(SHELL) -c 'for n in $(DESKTOP_FILES); \
@desktop_utils@ do $(SHELL) df-install $$ACTUAL_XTERM $(DESKTOP_FLAGS) $$n; \
@desktop_utils@ do $(SHELL) df-install $$ACTUAL_XTERM $(ICON_NAME) $(DESKTOP_FLAGS) $$n; \
@desktop_utils@ done'
################################################################################
check :
@ echo "There are no batch tests available (use vttest)"
################################################################################
mostlyclean :
-$(RM) *$o *.[is] XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
-$(RM) *$o *.[is] XTerm[1-9]*.* Xterm.log.* XtermLog.* .pure core *~ *.bak *.BAK *.out *.tmp
clean : mostlyclean
-$(RM) $(PROGRAMS) builtin_icons.h
-$(RM) $(PROGRAMS) $(AUTO_SOURCE)
sources : $(AUTO_SOURCE)
distclean :: clean
-$(RM) Makefile config.status config.cache config.log xtermcfg.h
......@@ -563,8 +593,8 @@ koi8rxterm.ps : koi8rxterm.$(manext)
koi8rxterm.txt : koi8rxterm.$(manext)
################################################################################
lint :
$(LINT) $(CPPFLAGS) $(SRCS1)
$(LINT) $(CPPFLAGS) $(SRCS2)
$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(SRCS1)
$(LINT) $(LINT_OPTS) $(CPPFLAGS) $(SRCS2)
tags :
$(CTAGS) $(SRCS) $(HDRS)
......
The NEWS file was generated from xterm.log.html, which serves as the changelog
for xterm.
--------------------------------------------------------------------------------
Patch #345 - 2019/05/14
* updated FreeBSD test-package from recent /usr/ports scripts.
* workaround in run-tic.sh for HPUX, whose mktemp prints the name of
a temporary directory without creating it.
* add left/right margin capabilities to terminfo, since the default
terminal emulation is VT420 (suggested by Thomas Wolff).
* modify treatment of reverseVideo for dynamic colors to make text
foreground/background consistent with the cursor color (prompted by
discussion with Ben Wong, lsix #20).
* modify button-handling to make SGR button-release distinct from
button-press for button-codes starting with 8 (patch by Mikulas
Patocka).
* add aliases for the sgr push/pop controls to work around language
limitations of C# (request by Dan Thompson).
* correct a typo in setDirectFG, which could cause setting of
indexed-color after a direct-color to be ignored.
* add resource useBorderClipping as an alternative to useClipping
(request by Robert Ross).
* improve logic for displaying xterm's built-in line-drawing
characters vs missing glyphs, e.g., for U+2409 to U+240D (patch by
Robert Ross).
* add vttests/sgrPushPop2.pl to illustrate how selective pushes work,
as well as to demonstrate push/pop of the various color types
supported by xterm.
* fix a special case in XTPOPSGR where direct-colors were not checked
as a dependency of indexed-colors, contrary to documentation.
* reduce buffer-flushes for OSC 4 and OSC 5 color-queries, as well as
in the queries for dynamic colors.
Note: this change makes the reply for OSC 5 use the “5” in the
response; formerly it was mapped to ”4” after adding the maximum
number of colors.
* modify vttests/query-color.pl to demonstrate multiple queries in
one request.
* update tables of combining and unknown-width characters in
wcwidth.c based on Unicode 12.0.0.
* modify response for OSC 5 to be consistent with documentation.
* add vttests/query-dynamic.pl
* modify vttests/query-color.pl to accept bold, underline, etc.,
keywords to decide whether to use OSC 5 rather than OSC 4.
* modify cursor coloring to avoid a case where the cursor matched the
foreground color while the text was displayed in reverse-video
(report by Nuno Silva).
* fix an inconsistency in X10 mouse responses from patch #342
changes; the legacy protocol supports only buttons 1-3.
* reduce the number of buffer-flushes for tcap-query batches.
* modify tcapquery.pl to demonstrate batch queries with -q option.
* increase response-buffer size, and make it configurable as
limitResponse (prompted by discussion with Stephen P Wall).
* modified configure script:
+ check/workaround for non-POSIX manipulation of predefined
symbols
+ check for updated X Toolkit, which uses const.
* update config.guess, config.sub
* provide for secondary-selection, overlooked in patch #338 (report
by Emile LeBlanc).
* documentation errata (patch by Larry Hynes).
* improve pointer-checks in Tekproc.c
* revise solution for Debian #919475, to allow for struct-notify
events occurring as a side-effect of toggling to/from full-screen
mode.
* window's border-size was incorrectly added to position when
maximizing window (report by Gary Langshaw).
-- $XTermId: THANKS,v 1.14 2014/07/12 14:41:17 tom Exp $
-- vile:txtmode fk=8bit
-- $XTermId: THANKS,v 1.22 2019/05/02 00:47:16 tom Exp $
-- vile:txtmode fk=utf-8
There's no AUTHORS file in this distribution; it would be redundant since
I (Thomas E. Dickey) have done more than 80% of the work on xterm since 1996.
There's no reliable history before that point.
There is no reliable history before that point.
For some insight, see
http://invisible-island.net/xterm/xterm.faq.html#who_did_it
https://invisible-island.net/xterm/xterm.faq.html#who_did_it
https://invisible-island.net/personal/changelogs.html#categories
Here's a list from xterm.log.html of people who have contributed changes.
Here is a list from xterm.log.html of people who have contributed changes,
or whose suggested change could be adapted:
Adam M Costello
Adam Sulmicki
......@@ -28,32 +30,42 @@ Andrey Panov
Andries E Brouwer
Anton Kovalenko
Balazs Kezes
Ben Wiley Sittler
Ben Wong
Ben Yoshino
Bernhard R Link
Bernhard Rosenkraenzer
Bertram Felgenhauer
Bill Nottingham
Bjarni Ingi Gislason
Bob Maynard
Brad Town
Bradd W Szonye
Bram Moolenaar
Branden Robinson
Bruno Haible
Cade Foster
Caetano Jimenez Carezzato
Chris Adams
Chris Clayton
Christian Biere
Christian Weisgerber
Chuck Blake
Colum Paget
D Roland Walker
Dan Church
Dan Thompson
Daniel Colascione
Daniel Drake
Daniel Jacobowitz
Dave Coffin
Dave Simmons
David Dawes
David Krause
David Madore
David Martnez Moreno
David Martínez Moreno
David Mathog
David Michael
David Wolfskill
David Wood
David Yeo
......@@ -61,7 +73,6 @@ Denis Zaitsev
Dennis Preiser
Dennis Schneider
Dimitrios Christidis
Dr Werner Fink
Ed Schouten
Eddy De Greef
Edward S Arthur
......@@ -74,6 +85,7 @@ Frank Giessler
Frank Guangxin Liu
Frank Liu
Gael Roualland
George Nachman
George Peter Staplin
Gertjan Halkes
Greg Badros
......@@ -83,6 +95,7 @@ H Merijn Brand
Hasso Tepper
Holger Veit
Ilya Zakharevich
Ingo Brückl
Iwamoto Kouichi
James Armstrong
Jason Bacon
......@@ -102,7 +115,8 @@ Johnny Billquist
Julien Cristau
Juliusz Chroboczek
Jungshik Shin
Jrgen Keil
Jürgen Keil
KUGA Tsutomu
Kean Johnston
Keith Packard
Ken Martin
......@@ -110,71 +124,89 @@ Kevin Buhr
Kevin Ryde
Kevin Schoedel
Kiyokazu Suto
Larry Hynes
Larry Riedel
Lauri Tirkkonen
Lee Olsen
Loc Minier
Loïc Minier
Marc Bevand
Marc La France
Marco Peereboom
Marius Tolzmann
Mark Waggoner
Markus Kuhn
Martin Hostettler
Martin Pirker
Martin Tournoij
Matthew Green
Matthias Baake
Matthias Scheler
Matthieu Herrb
Matthieu Lagouge
Mattias Engdegård
Max Mikhanosha
Michael Riepe
Michael Rohleder
Michael Schroeder
Mike Castle
Mike Fabian
Mike Frysinger
Mike Hopkirk
Milan Mehner
Min Sik Kim
Miroslav Lichvar
Nam SungHyun
Nelson Beebe
Nmeth Mrton
Nicolas George
Németh Márton
Olaf Rogalsky
Ovidiu Gheorghioiu
Paul Bolle
Paul Gilmartin
Paul Giordano
Paul Lampert
Paul Maier
Paul Szabo
Paul Vojta
Paul Williams
Pavel Roskin
Peder Stray
Per Hedeland
Peter Berg Larsen
Phil Sidler
Pierre Lombard
Pierre Pronchery
Rajesh Mandalemula
Richard Braakman
Richard Griswold
Richard Tollerton
Rob Braun
Robert Brady
Robert Earl
Robert Ross
Robin Cutshaw
Romain Francoise
Ross Combs
Ross Paterson
Ryan Johnson
Sam Stephenson
Scott Sewall
Semen A Ustimenko
Sergei Laskavy
Sergey Vlasov
Slava Semushin
Stefan Assmann
Stefan Dirsch
Stephen P Wall
Stuart Lissaman
Sven Joachim
Sven Verdoolaege
Taketo Kabe
Taneli Huuskonen
Ted Phelps
Thierry Reding
Thomas Wolff
Thorsten Glaser
Tim Adye
Tim Pope
Tobias Stoeckmann
......@@ -187,7 +219,10 @@ Tomohiro Kubota
Tor Lillqvist
Torrey Lyons
Victor Stinner
Vincent Lefevre
Victor Vaile
Vincent Lefèvre
Werner Fink
Werner Lemberg
Will Day
Zarick Lau
Zdenek Sekera
/* $XTermId: TekPrsTbl.c,v 1.8 2006/02/13 01:14:57 tom Exp $ */
/* $XTermId: TekPrsTbl.c,v 1.9 2006/02/13 01:14:57 tom Exp $ */
/*
* Copyright 1998-2001,2006 by Thomas E. Dickey
*
* All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name(s) of the above copyright
* holders shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization.
*
*
* Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
*
* All Rights Reserved
......
/* $XTermId: Tekparse.h,v 1.7 2006/02/13 01:14:57 tom Exp $ */
/* $XTermId: Tekparse.h,v 1.8 2016/10/06 00:32:30 tom Exp $ */
/*
* Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
* Copyright 1998-2006,2016 by Thomas E. Dickey
*
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital Equipment
* Corporation not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior permission.
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name(s) of the above copyright
* holders shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization.
*/
/* $XFree86: xc/programs/xterm/Tekparse.h,v 1.6 2006/02/13 01:14:57 dickey Exp $ */
/* @(#)Tekparse.h X10/6.6 11/7/86 */
#ifndef included_Tekparse_h
#define included_Tekparse_h 1
......@@ -47,51 +50,6 @@ extern Const int Tplttable[];
extern Const int Tpttable[];
extern Const int Tspttable[];
/*
* The following list of definitions is generated from Tekparse.def using the
* following command line:
*
* egrep -v '^CASE_' Tekparse.def | \
* awk 'BEGIN {n = 0;} {printf "#define %s %d\n", $1, n; n++}'
*
* You you need to change something, change Tekparse.def and regenerate the
* definitions. This would have been automatic, but since this doesn't change
* very often, it isn't worth the makefile hassle.
*/
#define CASE_REPORT 0
#define CASE_VT_MODE 1
#define CASE_SPT_STATE 2
#define CASE_GIN 3
#define CASE_BEL 4
#define CASE_BS 5
#define CASE_PT_STATE 6
#define CASE_PLT_STATE 7
#define CASE_TAB 8
#define CASE_IPL_STATE 9
#define CASE_ALP_STATE 10
#define CASE_UP 11
#define CASE_COPY 12
#define CASE_PAGE 13
#define CASE_BES_STATE 14
#define CASE_BYP_STATE 15
#define CASE_IGNORE 16
#define CASE_ASCII 17
#define CASE_APL 18
#define CASE_CHAR_SIZE 19
#define CASE_BEAM_VEC 20
#define CASE_CURSTATE 21
#define CASE_PENUP 22
#define CASE_PENDOWN 23
#define CASE_IPL_POINT 24
#define CASE_PLT_VEC 25
#define CASE_PT_POINT 26
#define CASE_SPT_POINT 27
#define CASE_CR 28
#define CASE_ESC_STATE 29
#define CASE_LF 30
#define CASE_SP 31
#define CASE_PRINT 32
#define CASE_OSC 33
#include <Tekparse.hin>
#endif /* included_Tekparse_h */
This diff is collapsed.
This diff is collapsed.
# $XTermId: VTparse.def,v 1.49 2014/04/25 21:36:12 tom Exp $
# $XTermId: VTparse.def,v 1.59 2019/02/10 23:34:10 tom Exp $
#
# vile:confmode rs=lf
# -----------------------------------------------------------------------------
# this file is part of xterm
#
# Copyright 1996-2013,2014 by Thomas E. Dickey
# Copyright 1996-2018,2019 by Thomas E. Dickey
#
# All Rights Reserved
#
......@@ -102,7 +102,6 @@ CASE_LS1R
CASE_PRINT
CASE_XTERM_SAVE
CASE_XTERM_RESTORE
CASE_XTERM_TITLE
CASE_DECID
CASE_HP_MEM_LOCK
CASE_HP_MEM_UNLOCK
......@@ -200,3 +199,17 @@ CASE_ESC_COLON
CASE_SCS_PERCENT
CASE_GSETS_PERCENT
CASE_GRAPHICS_ATTRIBUTES
CASE_DECRQPSR
CASE_DECSCPP
CASE_DECSNLS
CASE_CSI_HASH_STATE
CASE_XTERM_PUSH_SGR
CASE_XTERM_REPORT_SGR
CASE_XTERM_POP_SGR
CASE_XTERM_CHECKSUM
CASE_GSETS3
CASE_GSETS5
CASE_SCS_DQUOTE
CASE_GSETS_DQUOTE
CASE_SCS_AMPRSND
CASE_GSETS_AMPRSND
/* $XTermId: VTparse.h,v 1.65 2015/02/16 00:10:39 tom Exp $ */
/* $XTermId: VTparse.h,v 1.69 2019/02/10 23:34:21 tom Exp $ */
/*
* Copyright 2002-2014,2015 by Thomas E. Dickey
* Copyright 1996-2018,2019 by Thomas E. Dickey
*
* All Rights Reserved
*
......@@ -28,28 +28,6 @@
* holders shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization.
*
*
* Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
*
* All Rights Reserved
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notice appear in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of Digital Equipment
* Corporation not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior permission.
*
*
* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
* ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
* DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
* ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
* SOFTWARE.
*/
#ifndef included_VTparse_h
......@@ -103,181 +81,15 @@ extern Const PARSE_T vt52_ignore_table[];
#if OPT_WIDE_CHARS
extern Const PARSE_T esc_pct_table[];
extern Const PARSE_T scs_amp_table[];
extern Const PARSE_T scs_pct_table[];
extern Const PARSE_T scs_2qt_table[];
#endif
/*
* The following list of definitions is generated from VTparse.def using the
* following command line:
*
* grep '^CASE_' VTparse.def | awk '{printf "#define %s %d\n", $1, n++}'
*
* If you need to change something, change VTparse.def and regenerate the
* definitions. This would have been automatic, but since this doesn't change
* very often, it isn't worth the makefile hassle.
*/
#if OPT_XTERM_SGR
extern Const PARSE_T csi_hash_table[];
#endif
#define CASE_GROUND_STATE 0
#define CASE_IGNORE 1
#define CASE_BELL 2
#define CASE_BS 3
#define CASE_CR 4
#define CASE_ESC 5
#define CASE_VMOT 6
#define CASE_TAB 7
#define CASE_SI 8
#define CASE_SO 9
#define CASE_SCR_STATE 10
#define CASE_SCS0_STATE 11
#define CASE_SCS1_STATE 12
#define CASE_SCS2_STATE 13
#define CASE_SCS3_STATE 14
#define CASE_ESC_IGNORE 15
#define CASE_ESC_DIGIT 16
#define CASE_ESC_SEMI 17
#define CASE_DEC_STATE 18
#define CASE_ICH 19
#define CASE_CUU 20
#define CASE_CUD 21
#define CASE_CUF 22
#define CASE_CUB 23
#define CASE_CUP 24
#define CASE_ED 25
#define CASE_EL 26
#define CASE_IL 27
#define CASE_DL 28
#define CASE_DCH 29
#define CASE_DA1 30
#define CASE_TRACK_MOUSE 31
#define CASE_TBC 32
#define CASE_SET 33
#define CASE_RST 34
#define CASE_SGR 35
#define CASE_CPR 36
#define CASE_DECSTBM 37
#define CASE_DECREQTPARM 38
#define CASE_DECSET 39
#define CASE_DECRST 40
#define CASE_DECALN 41
#define CASE_GSETS 42
#define CASE_DECSC 43
#define CASE_DECRC 44
#define CASE_DECKPAM 45
#define CASE_DECKPNM 46
#define CASE_IND 47
#define CASE_NEL 48
#define CASE_HTS 49
#define CASE_RI 50
#define CASE_SS2 51
#define CASE_SS3 52
#define CASE_CSI_STATE 53
#define CASE_OSC 54
#define CASE_RIS 55
#define CASE_LS2 56
#define CASE_LS3 57
#define CASE_LS3R 58
#define CASE_LS2R 59
#define CASE_LS1R 60
#define CASE_PRINT 61
#define CASE_XTERM_SAVE 62
#define CASE_XTERM_RESTORE 63
#define CASE_XTERM_TITLE 64
#define CASE_DECID 65
#define CASE_HP_MEM_LOCK 66
#define CASE_HP_MEM_UNLOCK 67
#define CASE_HP_BUGGY_LL 68
#define CASE_HPA 69
#define CASE_VPA 70
#define CASE_XTERM_WINOPS 71
#define CASE_ECH 72
#define CASE_CHT 73
#define CASE_CPL 74
#define CASE_CNL 75
#define CASE_CBT 76
#define CASE_SU 77
#define CASE_SD 78
#define CASE_S7C1T 79
#define CASE_S8C1T 80
#define CASE_ESC_SP_STATE 81
#define CASE_ENQ 82
#define CASE_DECSCL 83
#define CASE_DECSCA 84
#define CASE_DECSED 85
#define CASE_DECSEL 86
#define CASE_DCS 87
#define CASE_PM 88
#define CASE_SOS 89
#define CASE_ST 90
#define CASE_APC 91
#define CASE_EPA 92
#define CASE_SPA 93
#define CASE_CSI_QUOTE_STATE 94
#define CASE_DSR 95
#define CASE_ANSI_LEVEL_1 96
#define CASE_ANSI_LEVEL_2 97
#define CASE_ANSI_LEVEL_3 98
#define CASE_MC 99
#define CASE_DEC2_STATE 100
#define CASE_DA2 101
#define CASE_DEC3_STATE 102
#define CASE_DECRPTUI 103
#define CASE_VT52_CUP 104
#define CASE_REP 105
#define CASE_CSI_EX_STATE 106
#define CASE_DECSTR 107
#define CASE_DECDHL 108
#define CASE_DECSWL 109
#define CASE_DECDWL 110
#define CASE_DEC_MC 111
#define CASE_ESC_PERCENT 112
#define CASE_UTF8 113
#define CASE_CSI_TICK_STATE 114
#define CASE_DECELR 115
#define CASE_DECRQLP 116
#define CASE_DECEFR 117
#define CASE_DECSLE 118
#define CASE_CSI_IGNORE 119
#define CASE_VT52_IGNORE 120
#define CASE_VT52_FINISH 121
#define CASE_CSI_DOLLAR_STATE 122
#define CASE_DECCRA 123
#define CASE_DECERA 124
#define CASE_DECFRA 125
#define CASE_DECSERA 126
#define CASE_DECSACE 127
#define CASE_DECCARA 128
#define CASE_DECRARA 129
#define CASE_CSI_STAR_STATE 130
#define CASE_SET_MOD_FKEYS 131
#define CASE_SET_MOD_FKEYS0 132
#define CASE_HIDE_POINTER 133
#define CASE_SCS1A_STATE 134
#define CASE_SCS2A_STATE 135
#define CASE_SCS3A_STATE 136
#define CASE_CSI_SPACE_STATE 137
#define CASE_DECSCUSR 138
#define CASE_SM_TITLE 139
#define CASE_RM_TITLE 140
#define CASE_DECSMBV 141
#define CASE_DECSWBV 142
#define CASE_DECLL 143
#define CASE_DECRQM 144
#define CASE_RQM 145
#define CASE_CSI_DEC_DOLLAR_STATE 146
#define CASE_SL 147
#define CASE_SR 148
#define CASE_DECDC 149
#define CASE_DECIC 150
#define CASE_DECBI 151
#define CASE_DECFI 152
#define CASE_DECRQCRA 153
#define CASE_HPR 154
#define CASE_VPR 155
#define CASE_ANSI_SC 156
#define CASE_ANSI_RC 157
#define CASE_ESC_COLON 158
#define CASE_SCS_PERCENT 159
#define CASE_GSETS_PERCENT 160
#define CASE_GRAPHICS_ATTRIBUTES 161
#include <VTparse.hin>
#endif /* included_VTparse_h */
! $XTermId: XTerm.ad,v 1.99 2013/06/23 08:57:13 Ross.Combs Exp $
! $XTermId: XTerm.ad,v 1.102 2016/12/22 02:07:39 tom Exp $
! -----------------------------------------------------------------------------
! this file is part of xterm
!
! Copyright 1996-2010,2011 by Thomas E. Dickey
! Copyright 1996-2011,2016 by Thomas E. Dickey
!
! All Rights Reserved
!
......@@ -52,6 +52,8 @@
*mainMenu*print-on-error*Label: Print-All on Error
*mainMenu*print*Label: Print Window
*mainMenu*print-redir*Label: Redirect to Printer
*mainMenu*dump-html*Label: XHTML Screen Dump
*mainMenu*dump-svg*Label: SVG Screen Dump
*mainMenu*8-bit control*Label: 8-Bit Controls
*mainMenu*backarrow key*Label: Backarrow Key (BS/DEL)
*mainMenu*num-lock*Label: Alt/NumLock Modifiers
......@@ -133,6 +135,7 @@
*fontMenu*allow-color-ops*Label: Allow Color Ops
*fontMenu*allow-font-ops*Label: Allow Font Ops
*fontMenu*allow-mouse-ops*Label: Allow Mouse Ops
*fontMenu*allow-tcap-ops*Label: Allow Termcap Ops
*fontMenu*allow-title-ops*Label: Allow Title Ops
*fontMenu*allow-window-ops*Label: Allow Window Ops
......
This diff is collapsed.
This diff is collapsed.
/* $XTermId: cachedGCs.c,v 1.63 2014/12/18 21:56:08 tom Exp $ */
/* $XTermId: cachedGCs.c,v 1.76 2019/04/26 21:57:07 tom Exp $ */
/*
* Copyright 2007-2011,2014 by Thomas E. Dickey
* Copyright 2007-2018,2019 by Thomas E. Dickey
*
* All Rights Reserved
*
......@@ -32,11 +32,10 @@
#include <data.h>
#include <xstrings.h>
#include <fontutils.h>
#include <X11/Xmu/Drawing.h>
#include <stdio.h>
/*
* hide (or eliminate) calls to
* XCreateGC()
......@@ -91,6 +90,8 @@ traceCgsEnum(CgsEnum value)
CASE(Bold);
CASE(NormReverse);
CASE(BoldReverse);
CASE(Border);
CASE(Filler);
#if OPT_BOX_CHARS
CASE(Line);
CASE(Dots);
......@@ -257,6 +258,8 @@ allocCache(void **cache_pointer)
return *((CgsCache **) cache_pointer);
}
#define ALLOC_CACHE(p) ((*(p) == 0) ? allocCache(p) : *(p))
static int
dataIndex(CgsCache * me)
{
......@@ -283,10 +286,10 @@ myCache(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId)
(void) cgsWin;
#else
if (cgsWin == &(TScreenOf(xw)->iconVwin))
result = allocCache(&(TScreenOf(xw)->icon_cgs_cache));
result = ALLOC_CACHE(&(TScreenOf(xw)->icon_cgs_cache));
else
#endif
result = allocCache(&(TScreenOf(xw)->main_cgs_cache));
result = ALLOC_CACHE(&(TScreenOf(xw)->main_cgs_cache));
result += cgsId;
if (result->data == 0) {
......@@ -331,6 +334,10 @@ newCache(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, CgsCache * me)
mask = (GCForeground | GCBackground | GCFont);
switch (cgsId) {
case gcFiller:
case gcBorder:
mask &= (XtGCMask) ~ GCFont;
/* FALLTHRU */
case gcNorm:
case gcBold:
case gcNormReverse:
......@@ -393,14 +400,11 @@ newCache(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, CgsCache * me)
return THIS(gc);
}
static Boolean
SameFont(XTermFonts * a, XTermFonts * b)
{
return (Boolean) (HaveFont(a)
&& HaveFont(b)
&& ((a->fs == b->fs)
|| !memcmp(a->fs, b->fs, sizeof(*(a->fs)))));
}
#define SameFont(a, b) \
(Boolean) (HaveFont(a) \
&& HaveFont(b) \
&& (((a)->fs == (b)->fs) \
|| !memcmp((a)->fs, (b)->fs, sizeof(*((a)->fs)))))
#define SameColor(a,b) ((a) == (b))
#define SameCSet(a,b) ((a) == (b))
......@@ -460,6 +464,9 @@ setCgsFore(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, Pixel fg)
if ((me = myCache(xw, cgsWin, cgsId)) != 0) {
NEXT(fg) = fg;
me->mask |= GCForeground;
TRACE2(("setCgsFore(%s) %s\n",
traceCgsEnum(cgsId),
tracePixel(xw, NEXT(fg))));
}
}
......@@ -471,6 +478,9 @@ setCgsBack(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, Pixel bg)
if ((me = myCache(xw, cgsWin, cgsId)) != 0) {
NEXT(bg) = bg;
me->mask |= GCBackground;
TRACE2(("setCgsBack(%s) %s\n",
traceCgsEnum(cgsId),
tracePixel(xw, NEXT(bg))));
}
}
......@@ -495,15 +505,16 @@ setCgsFont(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, XTermFonts * font)
CgsCache *me;
if ((me = myCache(xw, cgsWin, cgsId)) != 0) {
TScreen *screen = TScreenOf(xw);
if (!HaveFont(font)) {
if (cgsId != gcNorm)
(void) getCgsGC(xw, cgsWin, gcNorm);
#ifndef NO_ACTIVE_ICON
if (cgsWin == &(TScreenOf(xw)->iconVwin))
font = &(TScreenOf(xw)->fnt_icon);
font = getIconicFont(screen);
else
#endif
font = &(TScreenOf(xw)->fnts[fNorm]);
font = GetNormalFont(screen, fNorm);
}
if (HaveFont(font) && okFont(font->fs)) {
TRACE2(("setCgsFont next: %s for %s slot %p, gc %p\n",
......@@ -527,12 +538,12 @@ setCgsFont(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId, XTermFonts * font)
void
clrCgsFonts(XtermWidget xw, VTwin *cgsWin, XTermFonts * font)
{
CgsCache *me;
int j, k;
if (HaveFont(font)) {
int j;
for_each_gc(j) {
CgsCache *me;
if ((me = myCache(xw, cgsWin, (CgsEnum) j)) != 0) {
int k;
for (k = 0; k < DEPTH; ++k) {
if (SameFont(LIST(k).font, font)) {
TRACE2(("clrCgsFonts %s gc %p(%d) %s\n",
......@@ -565,13 +576,13 @@ getCgsGC(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId)
{
CgsCache *me;
GC result = 0;
int j, k;
unsigned used = 0;
if ((me = myCache(xw, cgsWin, cgsId)) != 0) {
TRACE2(("getCgsGC(%s, %s)\n",
traceVTwin(xw, cgsWin), traceCgsEnum(cgsId)));
if (me->mask != 0) {
int j;
unsigned used = 0;
/* fill in the unchanged fields */
if (!(me->mask & GC_CSet))
......@@ -622,6 +633,7 @@ getCgsGC(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId)
}
if (result == 0) {
int k;
/* if none were empty, pick the least-used slot, to modify */
for (j = 0, k = -1; j < DEPTH; ++j) {
if (used >= LIST(j).used) {
......@@ -769,12 +781,12 @@ copyCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
void
redoCgs(XtermWidget xw, Pixel fg, Pixel bg, CgsEnum cgsId)
{
int n;
VTwin *cgsWin = WhichVWin(TScreenOf(xw));
CgsCache *me = myCache(xw, cgsWin, cgsId);
if (me != 0) {
CgsCacheData *save_data = me->data;
int n;
for (n = 0; n < DEPTH; ++n) {
if (LIST(n).gc != 0 && HaveFont(LIST(n).font)) {
......@@ -806,12 +818,13 @@ void
swapCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum dstCgsId, CgsEnum srcCgsId)
{
if (dstCgsId != srcCgsId) {
CgsCache *dst;
CgsCache *src;
CgsCache tmp;
if ((src = myCache(xw, cgsWin, srcCgsId)) != 0) {
CgsCache *dst;
if ((dst = myCache(xw, cgsWin, dstCgsId)) != 0) {
CgsCache tmp;
int srcIndex = dataIndex(src);
int dstIndex = dataIndex(dst);
......@@ -831,9 +844,10 @@ GC
freeCgs(XtermWidget xw, VTwin *cgsWin, CgsEnum cgsId)
{
CgsCache *me;
int j;
if ((me = myCache(xw, cgsWin, cgsId)) != 0) {
int j;
for (j = 0; j < DEPTH; ++j) {
if (LIST(j).gc != 0) {
TRACE(("freeCgs(%s, %s) gc %p(%d)\n",
......
/* $XTermId: charclass.c,v 1.23 2014/05/26 17:12:51 tom Exp $ */
/* $XTermId: charclass.c,v 1.29 2017/05/29 17:43:54 tom Exp $ */
/*
* Copyright 2002-2014,2017 by Thomas E. Dickey
*
* All Rights Reserved
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name(s) of the above copyright
* holders shall not be used in advertising or otherwise to promote the
* sale, use or other dealings in this Software without prior written
* authorization.
*
*----------------------------------------------------------------------------
* Compact and efficient reimplementation of the
* xterm character class mechanism for large character sets
*
......@@ -45,6 +74,8 @@ static struct classentry {
int
SetCharacterClassRange(int low, int high, int value)
{
TRACE(("...SetCharacterClassRange (%#x .. %#x) = %d\n", low, high, value));
if (high < low)
return -1; /* nothing to do */
......@@ -70,7 +101,13 @@ typedef enum {
IDENT = -1,
ALNUM = 48,
CNTRL = 1,
BLANK = 32
BLANK = 32,
U_CJK = 0x4e00,
U_SUP = 0x2070,
U_SUB = 0x2080,
U_HIR = 0x3040,
U_KAT = 0x30a0,
U_HAN = 0xac00
} Classes;
void
......@@ -78,6 +115,8 @@ init_classtab(void)
{
const int size = 50;
TRACE(("init_classtab {{\n"));
classtab = TypeMallocN(struct classentry, (unsigned) size);
if (!classtab)
abort();
......@@ -114,21 +153,22 @@ init_classtab(void)
SetCharacterClassRange(0x1800, 0x180a, IDENT); /* Mongolian punctuation */
SetCharacterClassRange(0x2000, 0x200a, BLANK); /* spaces */
SetCharacterClassRange(0x200b, 0x27ff, IDENT); /* punctuation and symbols */
SetCharacterClassRange(0x2070, 0x207f, 0x2070); /* superscript */
SetCharacterClassRange(0x2080, 0x208f, 0x2080); /* subscript */
SetCharacterClassRange(0x2070, 0x207f, U_SUP); /* superscript */
SetCharacterClassRange(0x2080, 0x208f, U_SUB); /* subscript */
SetCharacterClassRange(0x3000, 0x3000, BLANK); /* ideographic space */
SetCharacterClassRange(0x3001, 0x3020, IDENT); /* ideographic punctuation */
SetCharacterClassRange(0x3040, 0x309f, 0x3040); /* Hiragana */
SetCharacterClassRange(0x30a0, 0x30ff, 0x30a0); /* Katakana */
SetCharacterClassRange(0x3300, 0x9fff, 0x4e00); /* CJK Ideographs */
SetCharacterClassRange(0xac00, 0xd7a3, 0xac00); /* Hangul Syllables */
SetCharacterClassRange(0xf900, 0xfaff, 0x4e00); /* CJK Ideographs */
SetCharacterClassRange(0x3040, 0x309f, U_HIR); /* Hiragana */
SetCharacterClassRange(0x30a0, 0x30ff, U_KAT); /* Katakana */
SetCharacterClassRange(0x3300, 0x9fff, U_CJK); /* CJK Ideographs */
SetCharacterClassRange(0xac00, 0xd7a3, U_HAN); /* Hangul Syllables */
SetCharacterClassRange(0xf900, 0xfaff, U_CJK); /* CJK Ideographs */
SetCharacterClassRange(0xfe30, 0xfe6b, IDENT); /* punctuation forms */
SetCharacterClassRange(0xff00, 0xff0f, IDENT); /* half/fullwidth ASCII */
SetCharacterClassRange(0xff1a, 0xff20, IDENT); /* half/fullwidth ASCII */
SetCharacterClassRange(0xff3b, 0xff40, IDENT); /* half/fullwidth ASCII */
SetCharacterClassRange(0xff5b, 0xff64, IDENT); /* half/fullwidth ASCII */
TRACE(("}} init_classtab\n"));
return;
}
......@@ -147,6 +187,78 @@ CharacterClass(int c)
return cclass;
}
#if OPT_REPORT_CCLASS
#define charFormat(code) ((code) > 255 ? "0x%04X" : "%d")
static const char *
class_name(Classes code)
{
static char buffer[80];
const char *result = "?";
switch (code) {
case IDENT:
result = "IDENT";
break;
case ALNUM:
result = "ALNUM";
break;
case CNTRL:
result = "CNTRL";
break;
case BLANK:
result = "BLANK";
break;
case U_SUP:
result = "superscript";
break;
case U_SUB:
result = "subscript";
break;
case U_CJK:
result = "CJK Ideographs";
break;
case U_HIR:
result = "Hiragana";
break;
case U_KAT:
result = "Katakana";
break;
case U_HAN:
result = "Hangul Syllables";
break;
default:
sprintf(buffer, charFormat(code), code);
result = buffer;
break;
}
return result;
}
void
report_wide_char_class(void)
{
static const Classes known_classes[] =
{IDENT, ALNUM, CNTRL, BLANK, U_SUP, U_SUB, U_HIR, U_KAT, U_CJK, U_HAN};
int i;
printf("\n");
printf("Unicode charClass data uses the last match\n");
printf("from these overlapping intervals of character codes:\n");
for (i = classtab[0].first; i <= classtab[0].last; i++) {
printf("\tU+%04X .. U+%04X %s\n",
classtab[i].first,
classtab[i].last,
class_name(classtab[i].cclass));
}
printf("\n");
printf("These class-names are used internally (the first character code in a class):\n");
for (i = 0; i < (int) XtNumber(known_classes); ++i) {
printf("\t");
printf(charFormat(known_classes[i]), known_classes[i]);
printf(" = %s\n", class_name(known_classes[i]));
}
}
#endif /* OPT_REPORT_CCLASS */
#ifdef NO_LEAKS
void
noleaks_CharacterClass(void)
......
/* $XTermId: charclass.h,v 1.6 2006/02/13 01:14:58 tom Exp $ */
/* $XTermId: charclass.h,v 1.7 2017/05/29 14:57:26 tom Exp $ */
/* $XFree86: xc/programs/xterm/charclass.h,v 1.3 2006/02/13 01:14:58 dickey Exp $ */
......@@ -12,6 +12,10 @@ extern void init_classtab(void);
extern int SetCharacterClassRange(int low, int high, int value);
extern int CharacterClass(int c);
#if OPT_REPORT_CCLASS
extern void report_wide_char_class(void);
#endif
#ifdef NO_LEAKS
extern void noleaks_CharacterClass(void);
#endif
......
This diff is collapsed.