all: Use terminfo instead of termcap

https://bugzilla.gnome.org/show_bug.cgi?id=169295
parent f323f49d
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
SUBDIRS = src termcaps po doc perf
SUBDIRS = src po doc perf
EXTRA_DIST = \
MAINTAINERS \
......
......@@ -171,8 +171,6 @@ GLIB_REQUIRED=2.40.0
GIO_REQUIRED=2.40.0
PANGO_REQUIRED=1.22.0
AC_DEFINE(GDK_MULTIHEAD_SAFE,1,[Force use of GDK multihead-safe APIs.])
PKG_CHECK_MODULES(GLIB,[glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gio-2.0 >= $GIO_REQUIRED])
PKG_CHECK_MODULES(GTK,[glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gio-2.0 >= $GIO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED])
AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
......@@ -211,52 +209,24 @@ fi
AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
AC_CHECK_FUNCS([ceil floor round])
# Look for tgetent
AC_CHECK_FUNC([tgetent],[vte_cv_termcap_lib=libc],
[AC_CHECK_LIB([ncurses],[tgetent],[vte_cv_termcap_lib=libncurses],
[AC_CHECK_LIB([tinfo],[tgetent],[vte_cv_termcap_lib=libtinfo],
[AC_CHECK_LIB([curses],[tgetent],[vte_cv_termcap_lib=libcurses],
[AC_CHECK_LIB([termcap],[tgetent],[vte_cv_termcap_lib=libtermcap],
[vte_cv_termcap_lib=])])])])])
case "$vte_cv_termcap_lib" in
libc) # FIXME: which headers to include here?
;;
libncurses) # We need ncurses.h and term.h, or ncurses/curses.h and ncurses/term.h
AC_CHECK_HEADERS([ncurses.h term.h],[],
[AC_CHECK_HEADERS([ncurses/curses.h ncurses/term.h],[],
[AC_MSG_ERROR([ncurses headers not found])])])
LIBS="-lncurses $LIBS"
;;
libtinfo) # Need ncurses/curses.h and ncurses/term.h
AC_CHECK_HEADERS([ncurses.h term.h],[],
[AC_CHECK_HEADERS([ncurses/curses.h ncurses/term.h],[],
[AC_MSG_ERROR([ncurses headers not found])])])
LIBS="-ltinfo $LIBS"
;;
libcurses) # Need curses.h and term.h
AC_CHECK_HEADERS([curses.h term.h],[],
[AC_MSG_ERROR([curses headers not found])],
[[#ifdef HAVE_CURSES_H
#include <curses.h>
#endif]])
LIBS="-lcurses $LIBS"
;;
libtermcap) # Need termcap.h
AC_CHECK_HEADERS([termcap.h],[],
[AC_MSG_ERROR([termcap headers not found])])
LIBS="-ltermcap $LIBS"
;;
*) AC_MSG_ERROR([tgetent not found in any library]) ;;
esac
# Search for the required modules.
VTE_PKGS="glib-2.0 >= $GLIB_REQUIRED gobject-2.0 pango >= $PANGO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gobject-2.0 gio-2.0 gio-unix-2.0"
PKG_CHECK_MODULES([VTE],[$VTE_PKGS])
AC_SUBST([VTE_PKGS])
PKG_CHECK_MODULES([TERMINFO],[tinfo])
PKG_CHECK_MODULES([GLIB],[glib-2.0 >= $GLIB_REQUIRED])
PKG_CHECK_MODULES([GOBJECT],[gobject-2.0])
PKG_CHECK_MODULES([GTK],[gtk+-$GTK_API_VERSION >= $GTK_REQUIRED])
# terminfo
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $TERMINFO_CFLAGS"
AC_CHECK_HEADERS([ncurses.h term.h tic.h],[],[AC_MSG_ERROR([ncurses terminfo headers not found])])
CFLAGS="$save_CFLAGS"
wcs_funcs_includes="
#ifdef HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
......
EXTRA_DIST = iso2022.txt
bin_PROGRAMS =
noinst_PROGRAMS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
EXTRA_DIST =
# The library
headerdir = $(includedir)/vte-$(VTE_API_VERSION)/vte
......@@ -73,8 +75,9 @@ libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_SOURCES = \
vtestream.h \
vtestream-base.h \
vtestream-file.h \
vtetc.c \
vtetc.h \
vteti.c \
vteti.h \
vtetivars.h \
vtetree.c \
vtetree.h \
vtetypebuiltins.c \
......@@ -96,22 +99,28 @@ libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_CPPFLAGS = \
-DVTE_COMPILATION \
$(AM_CPPFLAGS)
libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_LIBADD = $(VTE_LIBS)
libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_CFLAGS = \
$(VTE_CFLAGS) \
$(TERMINFO_CFLAGS) \
$(AM_CFLAGS)
libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_LDFLAGS = \
$(VTE_LDFLAGS) \
-version-info $(LT_VERSION_INFO) \
-export-symbols-regex "^vte_.*" \
$(AM_LDFLAGS)
libvte_@VTE_API_MAJOR_VERSION@_@VTE_API_MINOR_VERSION@_la_LIBADD = \
$(VTE_LIBS) \
$(TERMINFO_LIBS)
# Generated sources
VTESEQ_BUILTSOURCES = vteseq-list.h vteseq-2.c vteseq-n.c
BUILT_SOURCES = box_drawing.h marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h vteresources.c $(VTESEQ_BUILTSOURCES)
MAINTAINERCLEANFILES = $(VTESEQ_BUILTSOURCES)
EXTRA_DIST += $(VTESEQ_BUILTSOURCES) box_drawing.txt
CLEANFILES = box_drawing.h marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h stamp-vtetypebuiltins.h vteresources.c
MAINTAINERCLEANFILES+ = $(VTESEQ_BUILTSOURCES)
EXTRA_DIST += $(VTESEQ_BUILTSOURCES) box_drawing.txt iso2022.txt vtetivars.awk
CLEANFILES += box_drawing.h marshal.c marshal.h vtetypebuiltins.c vtetypebuiltins.h stamp-vtetypebuiltins.h vteresources.c
box_drawing.h: box_drawing.txt
$(AM_V_GEN) $(srcdir)/box_drawing_generate.sh < $< > $@
......@@ -151,6 +160,10 @@ vteseq-list.h: vteseq-2.gperf vteseq-n.gperf
vteresources.c: vte.gresource.xml Makefile $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies vte.gresource.xml)
$(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target $@ --sourcedir . --generate --c-name vte $<
vtetivars.h: vtetivars.awk
$(AM_V_GEN) $(top_srcdir)/missing --run gawk -f $< Caps > $@.tmp && \
mv -f $@.tmp $@
# introspection
INTROSPECTION_GIRS =
......@@ -282,16 +295,16 @@ TEST_SH = \
$(NULL)
EXTRA_DIST += $(TEST_SH)
check_PROGRAMS = dumpkeys iso2022 reflect-text-view reflect-vte mev table trie xticker vteconv vtetc
check_PROGRAMS = dumpkeys iso2022 reflect-text-view reflect-vte mev table trie xticker vteconv vteti
TESTS = table trie $(TEST_SH)
reflect_text_view_CPPFLAGS = -DUSE_TEXT_VIEW
reflect_text_view_CFLAGS = $(VTE_CFLAGS)
reflect_text_view_CPPFLAGS = -DUSE_TEXT_VIEW $(AM_CPPFLAGS)
reflect_text_view_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
reflect_text_view_SOURCES = reflect.c
reflect_text_view_LDADD = $(VTE_LIBS)
reflect_vte_CPPFLAGS = -DUSE_VTE
reflect_vte_CFLAGS = $(VTE_CFLAGS)
reflect_vte_CPPFLAGS = -DUSE_VTE $(AM_CPPFLAGS)
reflect_vte_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
reflect_vte_SOURCES = reflect.c
reflect_vte_LDADD = libvte-$(VTE_API_VERSION).la $(VTE_LIBS)
......@@ -311,9 +324,9 @@ interpret_SOURCES = \
trie.h \
vteconv.c \
vteconv.h \
vteresources.c \
vtetc.c \
vtetc.h \
vteti.c \
vteti.h \
vtetivars.h \
vtetree.c \
vtetree.h \
interpret.c
......@@ -321,8 +334,16 @@ interpret_CPPFLAGS = \
-DINTERPRET_MAIN \
-DVTE_API_VERSION=\"$(VTE_API_VERSION)\" \
$(AM_CPPFLAGS)
interpret_CFLAGS = $(GTK_CFLAGS)
interpret_LDADD = $(GTK_LIBS)
interpret_CFLAGS = \
$(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS) \
$(GTK_CFLAGS) \
$(TERMINFO_CFLAGS) \
$(AM_CFLAGS)
interpret_LDADD = \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(TERMINFO_LIBS)
iso2022_SOURCES = \
buffer.h \
......@@ -340,13 +361,23 @@ iso2022_SOURCES = \
trie.h \
vteconv.c \
vteconv.h \
vtetc.c \
vtetc.h \
vteti.c \
vteti.h \
vtetivars.h \
vtetree.c \
vtetree.h
iso2022_CPPFLAGS = -DISO2022_MAIN
iso2022_CFLAGS = $(GTK_CFLAGS)
iso2022_LDADD = $(GTK_LIBS)
iso2022_CPPFLAGS = \
-DISO2022_MAIN \
$(AM_CPPFLAGS)
iso2022_CFLAGS = \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(TERMINFO_CFLAGS) \
$(AM_CFLAGS)
iso2022_LDADD = \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(TERMINFO_LIBS)
slowcat_SOURCES = \
slowcat.c \
......@@ -368,11 +399,21 @@ table_SOURCES = \
trie.h \
vteconv.c \
vteconv.h \
vtetc.c \
vtetc.h
table_CPPFLAGS = -DTABLE_MAIN
table_CFLAGS = $(VTE_CFLAGS)
table_LDADD = $(VTE_LIBS)
vteti.c \
vteti.h \
vtetivars.h \
$(NULL)
table_CPPFLAGS = \
-DTABLE_MAIN \
$(AM_CPPFLAGS)
table_CFLAGS = \
$(GLIB_CFLAGS) \
$(TERMINFO_CFLAGS) \
$(AM_CFLAGS)
table_LDADD = \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(TERMINFO_LIBS)
trie_SOURCES = \
trie.c \
......@@ -388,18 +429,44 @@ trie_SOURCES = \
table.h \
vteconv.c \
vteconv.h \
vtetc.c \
vtetc.h
trie_CPPFLAGS = -DTRIE_MAIN
trie_CFLAGS = $(VTE_CFLAGS)
trie_LDADD = $(VTE_LIBS)
vtetc_SOURCES = vtetc.c vtetc.h debug.c debug.h
vtetc_CPPFLAGS = -DTERMCAP_MAIN
vteti.c \
vteti.h \
vtetivars.h \
$(NULL)
trie_CPPFLAGS = \
-DTRIE_MAIN \
$(AM_CPPFLAGS)
trie_CFLAGS = \
$(GLIB_CFLAGS) \
$(GOBJECT_CFLAGS) \
$(TERMINFO_CFLAGS) \
$(AM_CFLAGS)
trie_LDADD = \
$(GLIB_LIBS) \
$(GOBJECT_LIBS) \
$(TERMINFO_LIBS)
vteti_SOURCES = \
debug.c \
debug.h \
vteti.c \
vteti.h \
vtetivars.h \
$(NULL)
vteti_CPPFLAGS = \
-DTERMINFO_MAIN \
$(AM_CPPFLAGS)
vteti_CFLAGS = \
$(GLIB_CFLAGS) \
$(TERMINFO_CFLAGS) \
$(AM_CFLAGS)
vteti_LDADD = \
$(GLIB_LIBS) \
$(TERMINFO_LIBS)
vteconv_SOURCES = buffer.h debug.c debug.h vteconv.c vteconv.h
vteconv_CPPFLAGS = -DVTECONV_MAIN
vteconv_CFLAGS = $(VTE_CFLAGS)
vteconv_CPPFLAGS = -DVTECONV_MAIN $(AM_CPPFLAGS)
vteconv_CFLAGS = $(VTE_CFLAGS) $(AM_CFLAGS)
vteconv_LDADD = $(VTE_LIBS)
dumpkeys_SOURCES = dumpkeys.c
......
......@@ -102,8 +102,8 @@ class Window : Gtk.ApplicationWindow
if (App.Options.no_double_buffer)
terminal.set_double_buffered(true);
if (App.Options.termcap != null)
terminal.set_emulation(App.Options.termcap);
if (App.Options.term != null)
terminal.set_emulation(App.Options.term);
if (App.Options.encoding != null)
terminal.set_encoding(App.Options.encoding);
......@@ -564,7 +564,7 @@ class App : Gtk.Application
private static string? pty_flags_string = null;
public static bool reverse = false;
public static int scrollback_lines = 512;
public static string? termcap = null;
public static string? term = null;
public static int transparency_percent = 0;
public static bool version = false;
public static string? working_directory = null;
......@@ -757,7 +757,7 @@ class App : Gtk.Application
"Reverse foreground/background colors", null },
{ "scrollback-lines", 'n', 0, OptionArg.INT, ref scrollback_lines,
"Specify the number of scrollback-lines", null },
{ "termcap", 't', 0, OptionArg.STRING, ref termcap,
{ "term", 't', 0, OptionArg.STRING, ref term,
"Specify the terminal emulation to use", null },
{ "transparent", 'T', 0, OptionArg.INT, ref transparency_percent,
"Enable the use of a transparent background", "0..100" },
......
......@@ -39,327 +39,6 @@
#define SO "\016"
#define SI "\017"
/* This list combined from the Linux termcap(5) man page, and
* termcap_&_terminfo by Strang, Mui, and O'Reilly. */
struct _vte_capability_quark _vte_terminal_capability_strings[] = {
{"!1", TRUE, 0},
{"!2", TRUE, 0},
{"!3", TRUE, 0},
{"#1", TRUE, 0},
{"#2", TRUE, 0},
{"#3", TRUE, 0},
{"#4", TRUE, 0},
{"%0", TRUE, 0},
{"%1", TRUE, 0},
{"%2", TRUE, 0},
{"%3", TRUE, 0},
{"%4", TRUE, 0},
{"%5", TRUE, 0},
{"%6", TRUE, 0},
{"%7", TRUE, 0},
{"%8", TRUE, 0},
{"%9", TRUE, 0},
{"%a", TRUE, 0},
{"%b", TRUE, 0},
{"%c", TRUE, 0},
{"%d", TRUE, 0},
{"%e", TRUE, 0},
{"%f", TRUE, 0},
{"%g", TRUE, 0},
{"%h", TRUE, 0},
{"%i", TRUE, 0},
{"%j", TRUE, 0},
{"&0", TRUE, 0},
{"&1", TRUE, 0},
{"&2", TRUE, 0},
{"&3", TRUE, 0},
{"&4", TRUE, 0},
{"&5", TRUE, 0},
{"&6", TRUE, 0},
{"&7", TRUE, 0},
{"&8", TRUE, 0},
{"&9", TRUE, 0},
{"*0", TRUE, 0},
{"*1", TRUE, 0},
{"*2", TRUE, 0},
{"*3", TRUE, 0},
{"*4", TRUE, 0},
{"*5", TRUE, 0},
{"*6", TRUE, 0},
{"*7", TRUE, 0},
{"*8", TRUE, 0},
{"*9", TRUE, 0},
{"@0", TRUE, 0},
{"@1", TRUE, 0},
{"@2", TRUE, 0},
{"@3", TRUE, 0},
{"@4", TRUE, 0},
{"@5", TRUE, 0},
{"@6", TRUE, 0},
{"@7", TRUE, 0},
{"@8", TRUE, 0},
{"@9", TRUE, 0},
{"ae", FALSE, 0},
{"al", FALSE, 0},
{"AL", FALSE, 0},
{"as", FALSE, 0},
{"bc", FALSE, 0},
{"bl", FALSE, 0},
{"bt", FALSE, 0},
{"cb", FALSE, 0},
{"cc", FALSE, 0},
{"cd", FALSE, 0},
{"ce", FALSE, 0},
{"ch", FALSE, 0},
{"cl", FALSE, 0},
{"cm", FALSE, 0},
{"CM", FALSE, 0},
{"cr", FALSE, 0},
{"cs", FALSE, 0},
{"ct", FALSE, 0},
{"cv", FALSE, 0},
{"dc", FALSE, 0},
{"DC", FALSE, 0},
{"dl", FALSE, 0},
{"DL", FALSE, 0},
{"dm", FALSE, 0},
{"do", FALSE, 0},
{"DO", FALSE, 0},
{"ds", FALSE, 0},
{"eA", FALSE, 0},
{"ec", FALSE, 0},
{"ed", FALSE, 0},
{"ei", FALSE, 0},
{"F1", TRUE, 0},
{"F2", TRUE, 0},
{"F3", TRUE, 0},
{"F4", TRUE, 0},
{"F5", TRUE, 0},
{"F6", TRUE, 0},
{"F7", TRUE, 0},
{"F8", TRUE, 0},
{"F9", TRUE, 0},
{"FA", TRUE, 0},
{"FB", TRUE, 0},
{"FC", TRUE, 0},
{"FD", TRUE, 0},
{"FE", TRUE, 0},
{"FF", TRUE, 0},
{"FG", TRUE, 0},
{"FH", TRUE, 0},
{"FI", TRUE, 0},
{"FJ", TRUE, 0},
{"FK", TRUE, 0},
{"FL", TRUE, 0},
{"FM", TRUE, 0},
{"FN", TRUE, 0},
{"FO", TRUE, 0},
{"FP", TRUE, 0},
{"FQ", TRUE, 0},
{"FR", TRUE, 0},
{"FS", TRUE, 0},
{"FT", TRUE, 0},
{"FU", TRUE, 0},
{"FV", TRUE, 0},
{"FW", TRUE, 0},
{"FX", TRUE, 0},
{"FY", TRUE, 0},
{"FZ", TRUE, 0},
{"Fa", TRUE, 0},
{"Fb", TRUE, 0},
{"Fc", TRUE, 0},
{"Fd", TRUE, 0},
{"Fe", TRUE, 0},
{"Ff", TRUE, 0},
{"Fg", TRUE, 0},
{"Fh", TRUE, 0},
{"Fi", TRUE, 0},
{"Fj", TRUE, 0},
{"Fk", TRUE, 0},
{"Fl", TRUE, 0},
{"Fm", TRUE, 0},
{"Fn", TRUE, 0},
{"Fo", TRUE, 0},
{"Fp", TRUE, 0},
{"Fq", TRUE, 0},
{"Fr", TRUE, 0},
{"ff", FALSE, 0},
{"fs", FALSE, 0},
{"hd", FALSE, 0},
{"ho", FALSE, 0},
{"hu", FALSE, 0},
{"i1", FALSE, 0},
{"i3", FALSE, 0},
{"ic", FALSE, 0},
{"IC", FALSE, 0},
{"if", FALSE, 0},
{"im", FALSE, 0},
{"ip", FALSE, 0},
{"iP", FALSE, 0},
{"is", FALSE, 0},
{"K1", TRUE, 0},
{"K2", TRUE, 0},
{"K3", TRUE, 0},
{"K4", TRUE, 0},
{"K5", TRUE, 0},
{"k0", TRUE, 0},
{"k1", TRUE, 0},
{"k2", TRUE, 0},
{"k3", TRUE, 0},
{"k4", TRUE, 0},
{"k5", TRUE, 0},
{"k6", TRUE, 0},
{"k7", TRUE, 0},
{"k8", TRUE, 0},
{"k9", TRUE, 0},
{"k;", TRUE, 0},
{"ka", TRUE, 0},
{"kA", TRUE, 0},
{"kb", TRUE, 0},
{"kB", TRUE, 0},
{"kC", TRUE, 0},
{"kd", TRUE, 0},
{"kD", TRUE, 0},
{"ke", TRUE, 0},
{"kE", TRUE, 0},
{"kF", TRUE, 0},
{"kh", TRUE, 0},
{"kH", TRUE, 0},
{"kI", TRUE, 0},
{"kl", TRUE, 0},
{"kL", TRUE, 0},
{"kM", TRUE, 0},
{"kN", TRUE, 0},
{"kP", TRUE, 0},
{"kr", TRUE, 0},
{"kR", TRUE, 0},
{"ks", TRUE, 0},
{"kS", TRUE, 0},
{"kt", TRUE, 0},
{"kT", TRUE, 0},
{"ku", TRUE, 0},
{"l0", FALSE, 0},
{"l1", FALSE, 0},
{"l2", FALSE, 0},
{"l3", FALSE, 0},
{"l4", FALSE, 0},
{"l5", FALSE, 0},
{"l6", FALSE, 0},
{"l7", FALSE, 0},
{"l8", FALSE, 0},
{"l9", FALSE, 0},
{"la", FALSE, 0},
{"le", FALSE, 0},
{"LE", FALSE, 0},
{"LF", FALSE, 0},
{"ll", FALSE, 0},
{"LO", FALSE, 0},
{"mb", FALSE, 0},
{"MC", FALSE, 0},
{"md", FALSE, 0},
{"me", FALSE, 0},
{"mh", FALSE, 0},
{"mk", FALSE, 0},
{"ml", FALSE, 0},
{"ML", FALSE, 0},
{"mm", FALSE, 0},
{"mo", FALSE, 0},
{"mp", FALSE, 0},
{"mr", FALSE, 0},
{"MR", FALSE, 0},
{"mu", FALSE, 0},
{"nd", FALSE, 0},
{"nl", FALSE, 0},
{"nw", FALSE, 0},
{"pc", FALSE, 0},
{"pf", FALSE, 0},
{"pk", FALSE, 0},
{"pl", FALSE, 0},
{"pn", FALSE, 0},
{"po", FALSE, 0},
{"pO", FALSE, 0},
{"ps", FALSE, 0},
{"px", FALSE, 0},
{"r1", FALSE, 0},
{"r2", FALSE, 0},
{"r3", FALSE, 0},
{"RA", FALSE, 0},
{"rc", FALSE, 0},
{"rf", FALSE, 0},
{"RF", FALSE, 0},
{"RI", FALSE, 0},
{"rp", FALSE, 0},
{"rP", FALSE, 0},
{"rs", FALSE, 0},
{"RX", FALSE, 0},
{"s0", FALSE, 0},
{"s1", FALSE, 0},
{"s2", FALSE, 0},
{"s3", FALSE, 0},
{"sa", FALSE, 0},
{"SA", FALSE, 0},
{"sc", FALSE, 0},
{"se", FALSE, 0},
{"sf", FALSE, 0},
{"SF", FALSE, 0},
/* {"so", 0}, standout is always the same as another attribute. */
{"sr", FALSE, 0},
{"SR", FALSE, 0},
{"st", FALSE, 0},
{"SX", FALSE, 0},
{"ta", FALSE, 0},
/* {"te", 0}, terminal end-use is "logical". */
/* {"ti", 0}, terminal init is "logical". */
{"ts", FALSE, 0},
{"uc", FALSE, 0},
{"ue", FALSE, 0},
{"up", FALSE, 0},
{"UP", FALSE, 0},
{"us", FALSE, 0},
{"vb", FALSE, 0},
/* {"ve", FALSE, 0}, */
{"vi", FALSE, 0},
/* {"vs", FALSE, 0}, */
{"wi", FALSE, 0},
{"XF", FALSE, 0},
{"XN", FALSE, 0},
{"", FALSE, 0}
};
/* From some really old XTerm docs we had at the office, and an updated
* version at Moy, Gildea, and Dickey. */
struct _vte_capability_string _vte_xterm_capability_strings[] = {
......@@ -595,37 +274,3 @@ struct _vte_capability_string _vte_xterm_capability_strings[] = {
{NULL, NULL, 0},
};
#if 0
/**
* vte_capability_init:
*
* Initializes the vte_terminal_capability_strings and
* vte_xterm_capability_strings structures used by the terminal. Can
* be called multiple times without ill effect.
*
* Returns: void
*/
void
_vte_capability_init(void)
{
unsigned int i;
for (i = 0; _vte_terminal_capability_strings[i].capability[0]; i++) {
const char *tmp;
GQuark quark;
tmp = _vte_terminal_capability_strings[i].capability;
quark = g_quark_from_static_string(tmp);
_vte_terminal_capability_strings[i].quark = quark;
}
for (i = 0; i < G_N_ELEMENTS(_vte_xterm_capability_strings); i++) {
const char *tmp;
GQuark quark;
tmp = _vte_xterm_capability_strings[i].value;
if (tmp != NULL) {
quark = g_quark_from_static_string(tmp);
_vte_xterm_capability_strings[i].quark = quark;
}
}
}
#endif
......@@ -35,22 +35,12 @@ G_BEGIN_DECLS
#define _VTE_CAP_SS2 _VTE_CAP_ESC "N" /* Single-shift to G2 */
#define _VTE_CAP_SS3 _VTE_CAP_ESC "O" /* Single-shift to G3 */
/* A NULL-terminated list of capability strings which have string values,
* which means they're either key sequences or commands. */
struct _vte_capability_quark {
const char capability[4];
gboolean key;
GQuark quark;
};
struct _vte_capability_string {
const char *code;
const char *value;
GQuark quark;
};
/* The known capability strings in termcap entries, terminated by NULLs. */
extern struct _vte_capability_quark _vte_terminal_capability_strings[];
/* The xterm-specific terminal control strings, terminated by NULLs. */
extern struct _vte_capability_string _vte_xterm_capability_strings[];
......
......@@ -33,14 +33,13 @@
#include "debug.h"
#include "iso2022.h"
#include "matcher.h"
#include "vtetc.h"
#include "vteti.h"
int
main(int argc, char **argv)
{
char *terminal = NULL;
struct _vte_matcher *matcher = NULL;
struct _vte_termcap *termcap = NULL;
struct _vte_terminfo *terminfo = NULL;
GArray *array;
unsigned int i, j;
int l;
......@@ -55,7 +54,7 @@ main(int argc, char **argv)
_vte_debug_init();
if (argc < 2) {