summaryrefslogtreecommitdiff
path: root/Build/source/utils/texinfo/info
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-04-20 15:41:14 +0000
committerKarl Berry <karl@freefriends.org>2008-04-20 15:41:14 +0000
commitf90831f6e47e7321ba5f1d9f75f847ba33764c81 (patch)
treeb42b3d59ddbfaffc25e5f2324d4e4351201c0d89 /Build/source/utils/texinfo/info
parent57e45350ccbae224c5cf45171e024ab43e56cf8f (diff)
texinfo 4.12
git-svn-id: svn://tug.org/texlive/trunk@7545 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/texinfo/info')
-rw-r--r--Build/source/utils/texinfo/info/Makefile.am28
-rw-r--r--Build/source/utils/texinfo/info/Makefile.in413
-rw-r--r--Build/source/utils/texinfo/info/dir.c19
-rw-r--r--Build/source/utils/texinfo/info/display.c134
-rw-r--r--Build/source/utils/texinfo/info/display.h13
-rw-r--r--Build/source/utils/texinfo/info/doc.h15
-rw-r--r--Build/source/utils/texinfo/info/dribble.c13
-rw-r--r--Build/source/utils/texinfo/info/dribble.h11
-rw-r--r--Build/source/utils/texinfo/info/echo-area.c51
-rw-r--r--Build/source/utils/texinfo/info/echo-area.h21
-rw-r--r--Build/source/utils/texinfo/info/filesys.c20
-rw-r--r--Build/source/utils/texinfo/info/filesys.h16
-rw-r--r--Build/source/utils/texinfo/info/footnotes.c19
-rw-r--r--Build/source/utils/texinfo/info/footnotes.h14
-rw-r--r--Build/source/utils/texinfo/info/gc.c11
-rw-r--r--Build/source/utils/texinfo/info/gc.h13
-rw-r--r--Build/source/utils/texinfo/info/indices.c58
-rw-r--r--Build/source/utils/texinfo/info/indices.h13
-rw-r--r--Build/source/utils/texinfo/info/info-utils.c19
-rw-r--r--Build/source/utils/texinfo/info/info-utils.h13
-rw-r--r--Build/source/utils/texinfo/info/info.c117
-rw-r--r--Build/source/utils/texinfo/info/info.h19
-rw-r--r--Build/source/utils/texinfo/info/infodoc.c160
-rw-r--r--Build/source/utils/texinfo/info/infokey.c30
-rw-r--r--Build/source/utils/texinfo/info/infokey.h13
-rw-r--r--Build/source/utils/texinfo/info/infomap.c2266
-rw-r--r--Build/source/utils/texinfo/info/infomap.h13
-rw-r--r--Build/source/utils/texinfo/info/key.h11
-rw-r--r--Build/source/utils/texinfo/info/m-x.c23
-rw-r--r--Build/source/utils/texinfo/info/makedoc.c26
-rw-r--r--Build/source/utils/texinfo/info/man.c36
-rw-r--r--Build/source/utils/texinfo/info/man.h13
-rw-r--r--Build/source/utils/texinfo/info/nodemenu.c23
-rw-r--r--Build/source/utils/texinfo/info/nodes.c36
-rw-r--r--Build/source/utils/texinfo/info/nodes.h14
-rw-r--r--Build/source/utils/texinfo/info/pcterm.c15
-rw-r--r--Build/source/utils/texinfo/info/search.c175
-rw-r--r--Build/source/utils/texinfo/info/search.h17
-rw-r--r--Build/source/utils/texinfo/info/session.c893
-rw-r--r--Build/source/utils/texinfo/info/session.h32
-rw-r--r--Build/source/utils/texinfo/info/signals.c15
-rw-r--r--Build/source/utils/texinfo/info/signals.h14
-rw-r--r--Build/source/utils/texinfo/info/termdep.h15
-rw-r--r--Build/source/utils/texinfo/info/terminal.c13
-rw-r--r--Build/source/utils/texinfo/info/terminal.h15
-rw-r--r--Build/source/utils/texinfo/info/tilde.c14
-rw-r--r--Build/source/utils/texinfo/info/tilde.h15
-rw-r--r--Build/source/utils/texinfo/info/variables.c34
-rw-r--r--Build/source/utils/texinfo/info/variables.h17
-rw-r--r--Build/source/utils/texinfo/info/window.c52
-rw-r--r--Build/source/utils/texinfo/info/window.h21
51 files changed, 2602 insertions, 2469 deletions
diff --git a/Build/source/utils/texinfo/info/Makefile.am b/Build/source/utils/texinfo/info/Makefile.am
index 176f5939a53..5a3d35a314a 100644
--- a/Build/source/utils/texinfo/info/Makefile.am
+++ b/Build/source/utils/texinfo/info/Makefile.am
@@ -1,4 +1,4 @@
-# $Id: Makefile.am,v 1.8 2004/10/28 14:03:27 karl Exp $
+# $Id: Makefile.am,v 1.15 2008/03/28 23:39:20 karl Exp $
# Makefile.am for texinfo/info.
# Run automake in .. to produce Makefile.in from this.
#
@@ -19,13 +19,17 @@ transform = s/ginfo/info/; $(program_transform_name)
localedir = $(datadir)/locale
infodir2 = $(datadir)/info
-# -I. for funs.h.
-# Automake puts -I.. and -I$(srcdir) into DEFS by default, but
-# we need to override it, so include them ourselves.
-INCLUDES = -I. -I$(top_srcdir)/lib -I../intl -I.. -I$(srcdir)
-DEFS += -DLOCALEDIR=\"$(localedir)\" -DINFODIR=\"$(infodir)\" \
- -DINFODIR2=\"$(infodir2)\"
-LDADD = ../lib/libtxi.a $(TERMLIBS) $(LIBINTL)
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/gnulib/lib \
+ -I$(top_builddir)/gnulib/lib \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -DINFODIR=\"$(infodir)\" \
+ -DINFODIR2=\"$(infodir2)\"
+
+LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a \
+ $(TERMLIBS) $(LIBINTL)
+infokey_LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
EXTRA_DIST = README pcterm.c
@@ -50,6 +54,8 @@ generated_sources = doc.c key.c funs.h
# We need a linear ordering to prevent race condition in parallel make.
# See the node ``(automake)Multiple Outputs'' for an explanation.
+# Make sure this matches with order in which makedoc.c creates these
+# files.
doc.c: key.c
key.c: funs.h
@@ -64,8 +70,10 @@ cmd_sources = $(srcdir)/session.c $(srcdir)/echo-area.c $(srcdir)/infodoc.c \
$(srcdir)/m-x.c $(srcdir)/indices.c $(srcdir)/nodemenu.c \
$(srcdir)/footnotes.c $(srcdir)/variables.c
-# The $(EXEEXT) should be added by Automake, but isn't. Fine.
-$(generated_sources): makedoc$(EXEEXT) $(cmd_sources)
+# Make the target only funs.h even though we create all the
+# $(generated_sources) so that parallel makes won't do the rm && makedoc
+# more than once.
+funs.h: makedoc$(EXEEXT) $(cmd_sources)
rm -f $(generated_sources)
$(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources)
diff --git a/Build/source/utils/texinfo/info/Makefile.in b/Build/source/utils/texinfo/info/Makefile.in
index 6561573b7aa..5e35306f4d2 100644
--- a/Build/source/utils/texinfo/info/Makefile.in
+++ b/Build/source/utils/texinfo/info/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@
@SET_MAKE@
-# $Id: Makefile.am,v 1.8 2004/10/28 14:03:27 karl Exp $
+# $Id: Makefile.am,v 1.15 2008/03/28 23:39:20 karl Exp $
# Makefile.am for texinfo/info.
# Run automake in .. to produce Makefile.in from this.
#
@@ -26,15 +26,11 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -52,26 +48,66 @@ noinst_PROGRAMS = makedoc$(EXEEXT)
subdir = info
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
- $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
- $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
- $(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
- $(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
- $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \
- $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
- $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/longdouble.m4 \
- $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/mkstemp.m4 \
- $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/onceonly_2_57.m4 \
- $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/printf-posix.m4 \
- $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/signed.m4 \
- $(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
- $(top_srcdir)/m4/strcase.m4 $(top_srcdir)/m4/uintmax_t.m4 \
- $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
- $(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/alloca.m4 \
+ $(top_srcdir)/gnulib/m4/argz.m4 \
+ $(top_srcdir)/gnulib/m4/codeset.m4 \
+ $(top_srcdir)/gnulib/m4/eealloc.m4 \
+ $(top_srcdir)/gnulib/m4/environ.m4 \
+ $(top_srcdir)/gnulib/m4/error.m4 \
+ $(top_srcdir)/gnulib/m4/exitfail.m4 \
+ $(top_srcdir)/gnulib/m4/extensions.m4 \
+ $(top_srcdir)/gnulib/m4/getopt.m4 \
+ $(top_srcdir)/gnulib/m4/gettext.m4 \
+ $(top_srcdir)/gnulib/m4/gettimeofday.m4 \
+ $(top_srcdir)/gnulib/m4/glibc21.m4 \
+ $(top_srcdir)/gnulib/m4/gnulib-common.m4 \
+ $(top_srcdir)/gnulib/m4/gnulib-comp.m4 \
+ $(top_srcdir)/gnulib/m4/iconv.m4 \
+ $(top_srcdir)/gnulib/m4/include_next.m4 \
+ $(top_srcdir)/gnulib/m4/inline.m4 \
+ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \
+ $(top_srcdir)/gnulib/m4/lib-ld.m4 \
+ $(top_srcdir)/gnulib/m4/lib-link.m4 \
+ $(top_srcdir)/gnulib/m4/lib-prefix.m4 \
+ $(top_srcdir)/gnulib/m4/localcharset.m4 \
+ $(top_srcdir)/gnulib/m4/longlong.m4 \
+ $(top_srcdir)/gnulib/m4/malloc.m4 \
+ $(top_srcdir)/gnulib/m4/malloca.m4 \
+ $(top_srcdir)/gnulib/m4/mbchar.m4 \
+ $(top_srcdir)/gnulib/m4/mbiter.m4 \
+ $(top_srcdir)/gnulib/m4/mbrtowc.m4 \
+ $(top_srcdir)/gnulib/m4/mbscasecmp.m4 \
+ $(top_srcdir)/gnulib/m4/mbsncasecmp.m4 \
+ $(top_srcdir)/gnulib/m4/mbstate_t.m4 \
+ $(top_srcdir)/gnulib/m4/mbswidth.m4 \
+ $(top_srcdir)/gnulib/m4/memchr.m4 \
+ $(top_srcdir)/gnulib/m4/memcpy.m4 \
+ $(top_srcdir)/gnulib/m4/memmove.m4 \
+ $(top_srcdir)/gnulib/m4/mkstemp.m4 \
+ $(top_srcdir)/gnulib/m4/nls.m4 \
+ $(top_srcdir)/gnulib/m4/onceonly.m4 \
+ $(top_srcdir)/gnulib/m4/po.m4 \
+ $(top_srcdir)/gnulib/m4/progtest.m4 \
+ $(top_srcdir)/gnulib/m4/setenv.m4 \
+ $(top_srcdir)/gnulib/m4/stdbool.m4 \
+ $(top_srcdir)/gnulib/m4/stdint.m4 \
+ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \
+ $(top_srcdir)/gnulib/m4/strdup.m4 \
+ $(top_srcdir)/gnulib/m4/strerror.m4 \
+ $(top_srcdir)/gnulib/m4/string_h.m4 \
+ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \
+ $(top_srcdir)/gnulib/m4/sys_time_h.m4 \
+ $(top_srcdir)/gnulib/m4/tempname.m4 \
+ $(top_srcdir)/gnulib/m4/unistd_h.m4 \
+ $(top_srcdir)/gnulib/m4/wchar.m4 \
+ $(top_srcdir)/gnulib/m4/wchar_t.m4 \
+ $(top_srcdir)/gnulib/m4/wctype.m4 \
+ $(top_srcdir)/gnulib/m4/wcwidth.m4 \
+ $(top_srcdir)/gnulib/m4/wint_t.m4 \
+ $(top_srcdir)/gnulib/m4/xalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
@@ -89,21 +125,22 @@ nodist_ginfo_OBJECTS = doc.$(OBJEXT)
ginfo_OBJECTS = $(am_ginfo_OBJECTS) $(nodist_ginfo_OBJECTS)
ginfo_LDADD = $(LDADD)
am__DEPENDENCIES_1 =
-ginfo_DEPENDENCIES = ../lib/libtxi.a $(am__DEPENDENCIES_1) \
+ginfo_DEPENDENCIES = ../lib/libtxi.a \
+ $(top_builddir)/gnulib/lib/libgnu.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_infokey_OBJECTS = infokey.$(OBJEXT)
nodist_infokey_OBJECTS = key.$(OBJEXT)
infokey_OBJECTS = $(am_infokey_OBJECTS) $(nodist_infokey_OBJECTS)
-infokey_LDADD = $(LDADD)
-infokey_DEPENDENCIES = ../lib/libtxi.a $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_1)
+infokey_DEPENDENCIES = ../lib/libtxi.a \
+ $(top_builddir)/gnulib/lib/libgnu.a $(am__DEPENDENCIES_1)
am_makedoc_OBJECTS = makedoc.$(OBJEXT)
makedoc_OBJECTS = $(am_makedoc_OBJECTS)
makedoc_LDADD = $(LDADD)
-makedoc_DEPENDENCIES = ../lib/libtxi.a $(am__DEPENDENCIES_1) \
+makedoc_DEPENDENCIES = ../lib/libtxi.a \
+ $(top_builddir)/gnulib/lib/libgnu.a $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -118,65 +155,180 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
transform = s/ginfo/info/; $(program_transform_name)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\" -DINFODIR=\"$(infodir)\" \
- -DINFODIR2=\"$(infodir2)\"
+DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-GENCAT = @GENCAT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
GREP = @GREP@
-HAVE_ASPRINTF = @HAVE_ASPRINTF@
-HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
-HAVE_SNPRINTF = @HAVE_SNPRINTF@
-HAVE_WPRINTF = @HAVE_WPRINTF@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_MKDIR = @HAVE_DECL_MKDIR@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_IO_H = @HAVE_IO_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
HELP2MAN = @HELP2MAN@
+HEVEA = @HEVEA@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTALL_WARNINGS_FALSE = @INSTALL_WARNINGS_FALSE@
-INSTALL_WARNINGS_TRUE = @INSTALL_WARNINGS_TRUE@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
+LIBGNU_LIBDEPS = @LIBGNU_LIBDEPS@
+LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -186,20 +338,50 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
STRIP = @STRIP@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
TERMLIBS = @TERMLIBS@
-TOOLS_ONLY_FALSE = @TOOLS_ONLY_FALSE@
-TOOLS_ONLY_TRUE = @TOOLS_ONLY_TRUE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+TEX = @TEX@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+VOID_UNSETENV = @VOID_UNSETENV@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -211,11 +393,16 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -239,15 +426,25 @@ program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
infodir2 = $(datadir)/info
-
-# -I. for funs.h.
-# Automake puts -I.. and -I$(srcdir) into DEFS by default, but
-# we need to override it, so include them ourselves.
-INCLUDES = -I. -I$(top_srcdir)/lib -I../intl -I.. -I$(srcdir)
-LDADD = ../lib/libtxi.a $(TERMLIBS) $(LIBINTL)
+AM_CPPFLAGS = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/gnulib/lib \
+ -I$(top_builddir)/gnulib/lib \
+ -DLOCALEDIR=\"$(localedir)\" \
+ -DINFODIR=\"$(infodir)\" \
+ -DINFODIR2=\"$(infodir2)\"
+
+LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a \
+ $(TERMLIBS) $(LIBINTL)
+
+infokey_LDADD = ../lib/libtxi.a $(top_builddir)/gnulib/lib/libgnu.a $(LIBINTL)
EXTRA_DIST = README pcterm.c
ginfo_SOURCES = dir.c display.c display.h doc.h dribble.c dribble.h \
echo-area.c echo-area.h \
@@ -318,7 +515,7 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@@ -344,13 +541,13 @@ clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
ginfo$(EXEEXT): $(ginfo_OBJECTS) $(ginfo_DEPENDENCIES)
@rm -f ginfo$(EXEEXT)
- $(LINK) $(ginfo_LDFLAGS) $(ginfo_OBJECTS) $(ginfo_LDADD) $(LIBS)
+ $(LINK) $(ginfo_OBJECTS) $(ginfo_LDADD) $(LIBS)
infokey$(EXEEXT): $(infokey_OBJECTS) $(infokey_DEPENDENCIES)
@rm -f infokey$(EXEEXT)
- $(LINK) $(infokey_LDFLAGS) $(infokey_OBJECTS) $(infokey_LDADD) $(LIBS)
+ $(LINK) $(infokey_OBJECTS) $(infokey_LDADD) $(LIBS)
makedoc$(EXEEXT): $(makedoc_OBJECTS) $(makedoc_DEPENDENCIES)
@rm -f makedoc$(EXEEXT)
- $(LINK) $(makedoc_LDFLAGS) $(makedoc_OBJECTS) $(makedoc_LDADD) $(LIBS)
+ $(LINK) $(makedoc_OBJECTS) $(makedoc_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -387,27 +584,26 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -419,8 +615,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -430,13 +626,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -450,22 +645,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -482,7 +676,7 @@ check: $(BUILT_SOURCES)
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
@@ -534,12 +728,20 @@ info-am:
install-data-am:
+install-dvi: install-dvi-am
+
install-exec-am: install-binPROGRAMS
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -559,28 +761,35 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-exec \
- install-exec-am install-info install-info-am install-man \
+ install-binPROGRAMS install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-info-am
+ tags uninstall uninstall-am uninstall-binPROGRAMS
# We need a linear ordering to prevent race condition in parallel make.
# See the node ``(automake)Multiple Outputs'' for an explanation.
+# Make sure this matches with order in which makedoc.c creates these
+# files.
doc.c: key.c
key.c: funs.h
-# The $(EXEEXT) should be added by Automake, but isn't. Fine.
-$(generated_sources): makedoc$(EXEEXT) $(cmd_sources)
+# Make the target only funs.h even though we create all the
+# $(generated_sources) so that parallel makes won't do the rm && makedoc
+# more than once.
+funs.h: makedoc$(EXEEXT) $(cmd_sources)
rm -f $(generated_sources)
$(top_builddir)/$(native_tools)/info/makedoc $(cmd_sources)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/Build/source/utils/texinfo/info/dir.c b/Build/source/utils/texinfo/info/dir.c
index 98061dfdfa6..9f32cdb6ff5 100644
--- a/Build/source/utils/texinfo/info/dir.c
+++ b/Build/source/utils/texinfo/info/dir.c
@@ -1,12 +1,12 @@
/* dir.c -- how to build a special "dir" node from "localdir" files.
- $Id: dir.c,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: dir.c,v 1.7 2007/07/01 21:20:29 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,10 +14,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
#include "info-utils.h"
@@ -44,8 +43,8 @@ static char *dirs_to_add[] = {
typedef struct
{
- unsigned long device;
- unsigned long inode;
+ dev_t device;
+ ino_t inode;
} dir_file_list_entry_type;
static int
diff --git a/Build/source/utils/texinfo/info/display.c b/Build/source/utils/texinfo/info/display.c
index 1a9fd0a9ae4..58f6a17a718 100644
--- a/Build/source/utils/texinfo/info/display.c
+++ b/Build/source/utils/texinfo/info/display.c
@@ -1,12 +1,13 @@
/* display.c -- How to display Info windows.
- $Id: display.c,v 1.7 2004/04/11 17:56:45 karl Exp $
+ $Id: display.c,v 1.12 2007/10/19 18:43:20 karl Exp $
- Copyright (C) 1993, 1997, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2003, 2004, 2006, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -136,8 +136,13 @@ display_update_one_window (WINDOW *win)
if (display_inhibited)
display_was_interrupted_p = 1;
- /* If the window has no height, or display is inhibited, quit now. */
- if (!win->height || display_inhibited)
+ /* If the window has no height, or display is inhibited, quit now.
+ Strictly speaking, it should only be necessary to test if the
+ values are equal to zero, since window_new_screen_size should
+ ensure that the window height/width never becomes negative, but
+ since historically this has often been the culprit for crashes, do
+ our best to be doubly safe. */
+ if (win->height <= 0 || win->width <= 0 || display_inhibited)
return;
/* If the window's first row doesn't appear in the_screen, then it
@@ -294,62 +299,65 @@ display_update_one_window (WINDOW *win)
on the screen. */
entry = display[line_index + win->first_row];
- /* If the screen line is inversed, then we have to clear
- the line from the screen first. Why, I don't know.
- (But don't do this if we have no visible entries, as can
- happen if the window is shrunk very small.) */
- if ((entry && entry->inverse)
- /* Need to erase the line if it has escape sequences. */
- || (raw_escapes_p && strchr (entry->text, '\033') != 0))
- {
- terminal_goto_xy (0, line_index + win->first_row);
- terminal_clear_to_eol ();
- entry->inverse = 0;
- entry->text[0] = '\0';
- entry->textlen = 0;
- }
+ /* If the window is very small, entry might be NULL. */
+ if (entry) {
+ /* If the screen line is inversed, then we have to clear
+ the line from the screen first. Why, I don't know.
+ (But don't do this if we have no visible entries, as can
+ happen if the window is shrunk very small.) */
+ if (entry->inverse
+ /* Need to erase the line if it has escape sequences. */
+ || (raw_escapes_p && strchr (entry->text, '\033') != 0))
+ {
+ terminal_goto_xy (0, line_index + win->first_row);
+ terminal_clear_to_eol ();
+ entry->inverse = 0;
+ entry->text[0] = '\0';
+ entry->textlen = 0;
+ }
- /* Find the offset where these lines differ. */
- for (i = 0; i < pl_index; i++)
- if (printed_line[i] != entry->text[i])
- break;
+ /* Find the offset where these lines differ. */
+ for (i = 0; i < pl_index; i++)
+ if (printed_line[i] != entry->text[i])
+ break;
- /* If the lines are not the same length, or if they differed
- at all, we must do some redrawing. */
- if ((i != pl_index) || (pl_index != entry->textlen))
- {
- /* Move to the proper point on the terminal. */
- terminal_goto_xy (i, line_index + win->first_row);
-
- /* If there is any text to print, print it. */
- if (i != pl_index)
- terminal_put_text (printed_line + i);
-
- /* If the printed text didn't extend all the way to the edge
- of the window, and text was appearing between here and the
- edge of the window, clear from here to the end of the line. */
- if ((pl_index < win->width + pl_ignore
- && pl_index < entry->textlen)
- || (entry->inverse))
- terminal_clear_to_eol ();
-
- fflush (stdout);
-
- /* Update the display text buffer. */
- if (strlen (printed_line) > (unsigned int) screenwidth)
- /* printed_line[] can include more than screenwidth
- characters if we are under -R and there are escape
- sequences in it. However, entry->text was
- allocated (in display_initialize_display) for
- screenwidth characters only. */
- entry->text = xrealloc (entry->text, strlen (printed_line)+1);
- strcpy (entry->text + i, printed_line + i);
- entry->textlen = pl_index;
-
- /* Lines showing node text are not in inverse. Only modelines
- have that distinction. */
- entry->inverse = 0;
- }
+ /* If the lines are not the same length, or if they differed
+ at all, we must do some redrawing. */
+ if ((i != pl_index) || (pl_index != entry->textlen))
+ {
+ /* Move to the proper point on the terminal. */
+ terminal_goto_xy (i, line_index + win->first_row);
+
+ /* If there is any text to print, print it. */
+ if (i != pl_index)
+ terminal_put_text (printed_line + i);
+
+ /* If the printed text didn't extend all the way to the edge
+ of the window, and text was appearing between here and the
+ edge of the window, clear from here to the end of the line. */
+ if ((pl_index < win->width + pl_ignore
+ && pl_index < entry->textlen)
+ || (entry->inverse))
+ terminal_clear_to_eol ();
+
+ fflush (stdout);
+
+ /* Update the display text buffer. */
+ if (strlen (printed_line) > (unsigned int) screenwidth)
+ /* printed_line[] can include more than screenwidth
+ characters if we are under -R and there are escape
+ sequences in it. However, entry->text was
+ allocated (in display_initialize_display) for
+ screenwidth characters only. */
+ entry->text = xrealloc (entry->text, strlen (printed_line)+1);
+ strcpy (entry->text + i, printed_line + i);
+ entry->textlen = pl_index;
+
+ /* Lines showing node text are not in inverse. Only modelines
+ have that distinction. */
+ entry->inverse = 0;
+ }
+ }
/* We have done at least one line. Increment our screen line
index, and check against the bottom of the window. */
diff --git a/Build/source/utils/texinfo/info/display.h b/Build/source/utils/texinfo/info/display.h
index 286db293ee2..20b7ad85fcc 100644
--- a/Build/source/utils/texinfo/info/display.h
+++ b/Build/source/utils/texinfo/info/display.h
@@ -1,15 +1,15 @@
/* display.h -- How the display in Info is done.
- $Id: display.h,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: display.h,v 1.6 2007/07/01 21:20:29 karl Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/doc.h b/Build/source/utils/texinfo/info/doc.h
index 9315e8adc36..98d1ec627b4 100644
--- a/Build/source/utils/texinfo/info/doc.h
+++ b/Build/source/utils/texinfo/info/doc.h
@@ -1,12 +1,12 @@
/* doc.h -- Structures associating function pointers with documentation.
- $Id: doc.h,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: doc.h,v 1.7 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1993, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -97,7 +96,7 @@ extern char *key_documentation (char key, Keymap map);
extern char *pretty_keyname (unsigned char key);
extern char *pretty_keyseq (char *keyseq);
extern char *where_is (Keymap map, InfoCommand *cmd);
-extern char *replace_in_documentation (char *string, int help_is_only_window_p);
+extern char *replace_in_documentation (const char *string, int help_is_only_window_p);
extern void dump_map_to_message_buffer (char *prefix, Keymap map);
#endif /* !DOC_H */
diff --git a/Build/source/utils/texinfo/info/dribble.c b/Build/source/utils/texinfo/info/dribble.c
index d4563193661..72243ef7ffa 100644
--- a/Build/source/utils/texinfo/info/dribble.c
+++ b/Build/source/utils/texinfo/info/dribble.c
@@ -1,12 +1,12 @@
/* dribble.c -- dribble files for Info.
- $Id: dribble.c,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: dribble.c,v 1.6 2007/07/01 21:20:29 karl Exp $
- Copyright (C) 1993, 1998, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1998, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/dribble.h b/Build/source/utils/texinfo/info/dribble.h
index f30f2040d8e..5f8fbfae4c5 100644
--- a/Build/source/utils/texinfo/info/dribble.h
+++ b/Build/source/utils/texinfo/info/dribble.h
@@ -3,12 +3,12 @@
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,8 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/echo-area.c b/Build/source/utils/texinfo/info/echo-area.c
index 31385c88a37..d6fa8757d9a 100644
--- a/Build/source/utils/texinfo/info/echo-area.c
+++ b/Build/source/utils/texinfo/info/echo-area.c
@@ -1,13 +1,13 @@
/* echo-area.c -- how to read a line in the echo area.
- $Id: echo-area.c,v 1.7 2004/12/14 00:15:36 karl Exp $
+ $Id: echo-area.c,v 1.12 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -45,7 +44,7 @@ int echo_area_last_command_was_kill = 0;
/* Variables which hold on to the current state of the input line. */
static char input_line[1 + EA_MAX_INPUT];
-static char *input_line_prompt;
+static const char *input_line_prompt;
static int input_line_point;
static int input_line_beg;
static int input_line_end;
@@ -160,7 +159,7 @@ restore_calling_window (void)
/* Set up a new input line with PROMPT. */
static void
-initialize_input_line (char *prompt)
+initialize_input_line (const char *prompt)
{
input_line_prompt = prompt;
if (prompt)
@@ -201,7 +200,7 @@ echo_area_after_read (void)
active window, so that we can restore it when we need to. PROMPT, if
non-null, is a prompt to print before reading the line. */
char *
-info_read_in_echo_area (WINDOW *window, char *prompt)
+info_read_in_echo_area (WINDOW *window, const char *prompt)
{
char *line;
@@ -560,7 +559,7 @@ DECLARE_INFO_COMMAND (ea_yank, _("Yank back the contents of the last kill"))
if (!kill_ring_index)
{
- inform_in_echo_area ((char *) _("Kill ring is empty"));
+ inform_in_echo_area (_("Kill ring is empty"));
return;
}
@@ -799,7 +798,7 @@ completions_window_p (WINDOW *window)
/* Workhorse for completion readers. If FORCE is non-zero, the user cannot
exit unless the line read completes, or is empty. */
char *
-info_read_completing_internal (WINDOW *window, char *prompt,
+info_read_completing_internal (WINDOW *window, const char *prompt,
REFERENCE **completions, int force)
{
char *line;
@@ -854,7 +853,7 @@ info_read_completing_internal (WINDOW *window, char *prompt,
/* If one of the completions matches exactly, then that is okay, so
return the current line. */
for (i = 0; i < completions_found_index; i++)
- if (strcasecmp (completions_found[i]->label, line) == 0)
+ if (mbscasecmp (completions_found[i]->label, line) == 0)
{
free (line);
line = xstrdup (completions_found[i]->label);
@@ -865,9 +864,9 @@ info_read_completing_internal (WINDOW *window, char *prompt,
if (i == completions_found_index)
{
if (!completions_found_index)
- inform_in_echo_area ((char *) _("No completions"));
+ inform_in_echo_area (_("No completions"));
else
- inform_in_echo_area ((char *) _("Not complete"));
+ inform_in_echo_area (_("Not complete"));
continue;
}
}
@@ -894,7 +893,7 @@ info_read_completing_internal (WINDOW *window, char *prompt,
/* Read a line in the echo area with completion over COMPLETIONS. */
char *
info_read_completing_in_echo_area (WINDOW *window,
- char *prompt, REFERENCE **completions)
+ const char *prompt, REFERENCE **completions)
{
return (info_read_completing_internal (window, prompt, completions, 1));
}
@@ -903,7 +902,7 @@ info_read_completing_in_echo_area (WINDOW *window,
not requiring it. */
char *
info_read_maybe_completing (WINDOW *window,
- char *prompt, REFERENCE **completions)
+ const char *prompt, REFERENCE **completions)
{
return (info_read_completing_internal (window, prompt, completions, 0));
}
@@ -921,11 +920,11 @@ DECLARE_INFO_COMMAND (ea_possible_completions, _("List possible completions"))
if (!completions_found_index)
{
terminal_ring_bell ();
- inform_in_echo_area ((char *) _("No completions"));
+ inform_in_echo_area (_("No completions"));
}
else if ((completions_found_index == 1) && (key != '?'))
{
- inform_in_echo_area ((char *) _("Sole completion"));
+ inform_in_echo_area (_("Sole completion"));
}
else
{
@@ -934,8 +933,8 @@ DECLARE_INFO_COMMAND (ea_possible_completions, _("List possible completions"))
initialize_message_buffer ();
printf_to_message_buffer (completions_found_index == 1
- ? (char *) _("One completion:\n")
- : (char *) _("%d completions:\n"),
+ ? _("One completion:\n")
+ : _("%d completions:\n"),
(void *) (long) completions_found_index,
NULL, NULL);
@@ -1209,7 +1208,7 @@ build_completions (void)
for (i = 0; (entry = echo_area_completion_items[i]); i++)
{
- if (strncasecmp (request, entry->label, len) == 0)
+ if (mbsncasecmp (request, entry->label, len) == 0)
add_pointer_to_array (entry, completions_found_index,
completions_found, completions_found_slots,
20, REFERENCE *);
@@ -1217,7 +1216,7 @@ build_completions (void)
if (!informed_of_lengthy_job && completions_found_index > 100)
{
informed_of_lengthy_job = 1;
- window_message_in_echo_area ((char *) _("Building completions..."),
+ window_message_in_echo_area (_("Building completions..."),
NULL, NULL);
}
}
@@ -1292,7 +1291,7 @@ compare_references (const void *entry1, const void *entry2)
REFERENCE **e1 = (REFERENCE **) entry1;
REFERENCE **e2 = (REFERENCE **) entry2;
- return (strcasecmp ((*e1)->label, (*e2)->label));
+ return (mbscasecmp ((*e1)->label, (*e2)->label));
}
/* Prune duplicate entries from COMPLETIONS_FOUND. */
@@ -1383,7 +1382,7 @@ echo_area_inform_of_deleted_window (WINDOW *window)
/* Push and Pop the echo area. */
typedef struct {
char *line;
- char *prompt;
+ const char *prompt;
REFERENCE **comp_items;
int point, beg, end;
int must_complete;
diff --git a/Build/source/utils/texinfo/info/echo-area.h b/Build/source/utils/texinfo/info/echo-area.h
index 31784282485..da397b6d61b 100644
--- a/Build/source/utils/texinfo/info/echo-area.h
+++ b/Build/source/utils/texinfo/info/echo-area.h
@@ -1,15 +1,15 @@
/* echo-area.h -- Functions used in reading information from the echo area.
- $Id: echo-area.h,v 1.4 2004/08/07 22:03:08 karl Exp $
+ $Id: echo-area.h,v 1.8 2008/02/26 16:51:05 karl Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -37,25 +36,25 @@ extern void inform_in_echo_area (const char *message);
extern void echo_area_inform_of_deleted_window (WINDOW *window);
extern void echo_area_prep_read (void);
extern VFunction *ea_last_executed_command;
-extern char * info_read_completing_internal (WINDOW *window, char *prompt,
+extern char * info_read_completing_internal (WINDOW *window, const char *prompt,
REFERENCE **completions, int force);
/* Read a line of text in the echo area. Return a malloc ()'ed string,
or NULL if the user aborted out of this read. WINDOW is the currently
active window, so that we can restore it when we need to. PROMPT, if
non-null, is a prompt to print before reading the line. */
-extern char *info_read_in_echo_area (WINDOW *window, char *prompt);
+extern char *info_read_in_echo_area (WINDOW *window, const char *prompt);
/* Read a line in the echo area with completion over COMPLETIONS.
Takes arguments of WINDOW, PROMPT, and COMPLETIONS, a REFERENCE **. */
char *info_read_completing_in_echo_area (WINDOW *window,
- char *prompt, REFERENCE **completions);
+ const char *prompt, REFERENCE **completions);
/* Read a line in the echo area allowing completion over COMPLETIONS, but
not requiring it. Takes arguments of WINDOW, PROMPT, and COMPLETIONS,
a REFERENCE **. */
extern char *info_read_maybe_completing (WINDOW *window,
- char *prompt, REFERENCE **completions);
+ const char *prompt, REFERENCE **completions);
extern void ea_insert (WINDOW *window, int count, unsigned char key);
extern void ea_quoted_insert (WINDOW *window, int count, unsigned char key);
diff --git a/Build/source/utils/texinfo/info/filesys.c b/Build/source/utils/texinfo/info/filesys.c
index 81344806456..c1b6107d187 100644
--- a/Build/source/utils/texinfo/info/filesys.c
+++ b/Build/source/utils/texinfo/info/filesys.c
@@ -1,13 +1,13 @@
/* filesys.c -- filesystem specific functions.
- $Id: filesys.c,v 1.6 2004/07/30 17:17:40 karl Exp $
+ $Id: filesys.c,v 1.11 2008/04/19 17:03:13 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2000, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2000, 2002, 2003, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -56,6 +55,7 @@ static char *info_suffixes[] = {
static COMPRESSION_ALIST compress_suffixes[] = {
{ ".gz", "gunzip" },
{ ".bz2", "bunzip2" },
+ { ".lzma", "unlzma" },
{ ".z", "gunzip" },
{ ".Z", "uncompress" },
{ ".Y", "unyabba" },
@@ -694,7 +694,7 @@ is_dir_name (char *filename)
strcpy (trydir, "dir");
strcat (trydir, info_suffixes[i]);
- if (strcasecmp (filename, trydir) == 0)
+ if (mbscasecmp (filename, trydir) == 0)
return 1;
for (c = 0; compress_suffixes[c].suffix; c++)
@@ -702,7 +702,7 @@ is_dir_name (char *filename)
char dir_compressed[50]; /* can be short */
strcpy (dir_compressed, trydir);
strcat (dir_compressed, compress_suffixes[c].suffix);
- if (strcasecmp (filename, dir_compressed) == 0)
+ if (mbscasecmp (filename, dir_compressed) == 0)
return 1;
}
}
diff --git a/Build/source/utils/texinfo/info/filesys.h b/Build/source/utils/texinfo/info/filesys.h
index 89ca5430807..611a70941b9 100644
--- a/Build/source/utils/texinfo/info/filesys.h
+++ b/Build/source/utils/texinfo/info/filesys.h
@@ -1,12 +1,13 @@
/* filesys.h -- external declarations for filesys.c.
- $Id: filesys.h,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: filesys.h,v 1.7 2007/07/01 21:20:29 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2002, 2004, 2005, 2007 Free Software
+ Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -78,7 +78,7 @@ extern int is_dir_name (char *filename);
/* The default value of INFOPATH. */
#if !defined (DEFAULT_INFOPATH)
-# define DEFAULT_INFOPATH "/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/info:/usr/local/gnu/info:/usr/local/gnu/lib/info:/usr/gnu/info:/usr/gnu/lib/info:/opt/gnu/info:/usr/share/info:/usr/share/lib/info:/usr/local/share/info:/usr/local/share/lib/info:/usr/gnu/lib/emacs/info:/usr/local/gnu/lib/emacs/info:/usr/local/lib/emacs/info:/usr/local/emacs/info:."
+# define DEFAULT_INFOPATH ".:/usr/local/info:/usr/info:/usr/local/lib/info:/usr/lib/info:/usr/local/gnu/info:/usr/local/gnu/lib/info:/usr/gnu/info:/usr/gnu/lib/info:/opt/gnu/info:/usr/share/info:/usr/share/lib/info:/usr/local/share/info:/usr/local/share/lib/info:/usr/gnu/lib/emacs/info:/usr/local/gnu/lib/emacs/info:/usr/local/lib/emacs/info:/usr/local/emacs/info"
#endif /* !DEFAULT_INFOPATH */
#if !defined (S_ISREG) && defined (S_IFREG)
diff --git a/Build/source/utils/texinfo/info/footnotes.c b/Build/source/utils/texinfo/info/footnotes.c
index c8cd7b54a27..3e096d7779e 100644
--- a/Build/source/utils/texinfo/info/footnotes.c
+++ b/Build/source/utils/texinfo/info/footnotes.c
@@ -1,13 +1,13 @@
/* footnotes.c -- Some functions for manipulating footnotes.
- $Id: footnotes.c,v 1.4 2004/04/11 17:56:45 karl Exp $
+ $Id: footnotes.c,v 1.8 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2002, 2004 Free Software
+ Copyright (C) 1993, 1997, 1998, 1999, 2002, 2004, 2007 Free Software
Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -210,7 +209,7 @@ info_get_or_remove_footnotes (WINDOW *window)
/* If we are hacking automatic footnotes, and there are footnotes
but we couldn't display them, print a message to that effect. */
if (auto_footnotes_p)
- inform_in_echo_area ((char *) _("Footnotes could not be displayed"));
+ inform_in_echo_area (_("Footnotes could not be displayed"));
return (FN_UNABLE);
}
}
@@ -257,11 +256,11 @@ DECLARE_INFO_COMMAND (info_show_footnotes,
switch (result)
{
case FN_UNFOUND:
- info_error ((char *) msg_no_foot_node, NULL, NULL);
+ info_error (msg_no_foot_node, NULL, NULL);
break;
case FN_UNABLE:
- info_error ((char *) msg_win_too_small, NULL, NULL);
+ info_error (msg_win_too_small, NULL, NULL);
break;
}
}
diff --git a/Build/source/utils/texinfo/info/footnotes.h b/Build/source/utils/texinfo/info/footnotes.h
index 7f583994261..6a8282828fb 100644
--- a/Build/source/utils/texinfo/info/footnotes.h
+++ b/Build/source/utils/texinfo/info/footnotes.h
@@ -1,12 +1,13 @@
/* footnotes.h -- Some functions for manipulating footnotes.
- $Id: footnotes.h,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: footnotes.h,v 1.6 2007/07/01 21:20:29 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/gc.c b/Build/source/utils/texinfo/info/gc.c
index 9416e3bb2e8..9fa19891bf4 100644
--- a/Build/source/utils/texinfo/info/gc.c
+++ b/Build/source/utils/texinfo/info/gc.c
@@ -1,12 +1,12 @@
/* gc.c -- Functions to remember and garbage collect unused node contents.
- $Id: gc.c,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: gc.c,v 1.6 2007/07/01 22:32:12 karl Exp $
- Copyright (C) 1993, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2004, 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation; either version 3 of the License, or (at
+ your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/gc.h b/Build/source/utils/texinfo/info/gc.h
index 67d031f9b87..a35fcac2175 100644
--- a/Build/source/utils/texinfo/info/gc.h
+++ b/Build/source/utils/texinfo/info/gc.h
@@ -1,15 +1,15 @@
/* gc.h -- Functions for garbage collecting unused node contents.
- $Id: gc.h,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: gc.h,v 1.6 2007/07/01 21:20:30 karl Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/indices.c b/Build/source/utils/texinfo/info/indices.c
index f5b0eb57633..9c60c7b3b88 100644
--- a/Build/source/utils/texinfo/info/indices.c
+++ b/Build/source/utils/texinfo/info/indices.c
@@ -1,13 +1,13 @@
/* indices.c -- deal with an Info file index.
- $Id: indices.c,v 1.5 2004/04/11 17:56:45 karl Exp $
+ $Id: indices.c,v 1.10 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2002, 2003, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -196,7 +195,7 @@ do_info_index_search (WINDOW *window, int count, char *search_string)
(FILENAME_CMP (initial_index_filename, fb->filename) != 0))
{
info_free_references (index_index);
- window_message_in_echo_area ((char *) _("Finding index entries..."),
+ window_message_in_echo_area (_("Finding index entries..."),
NULL, NULL);
index_index = info_indices_of_file_buffer (fb);
}
@@ -204,7 +203,7 @@ do_info_index_search (WINDOW *window, int count, char *search_string)
/* If there is no index, quit now. */
if (!index_index)
{
- info_error ((char *) _("No indices found."), NULL, NULL);
+ info_error (_("No indices found."), NULL, NULL);
return;
}
@@ -214,7 +213,7 @@ do_info_index_search (WINDOW *window, int count, char *search_string)
line = xstrdup (search_string);
else
{
- line = info_read_maybe_completing (window, (char *) _("Index entry: "),
+ line = info_read_maybe_completing (window, _("Index entry: "),
index_index);
window = active_window;
@@ -332,14 +331,14 @@ DECLARE_INFO_COMMAND (info_next_index_match,
yet. */
if (!index_search)
{
- info_error ((char *) _("No previous index search string."), NULL, NULL);
+ info_error (_("No previous index search string."), NULL, NULL);
return;
}
/* If there is no index, that is an error. */
if (!index_index)
{
- info_error ((char *) _("No index entries."), NULL, NULL);
+ info_error (_("No index entries."), NULL, NULL);
return;
}
@@ -372,7 +371,7 @@ DECLARE_INFO_COMMAND (info_next_index_match,
/* If that failed, print an error. */
if ((i < 0) || (!index_index[i]))
{
- info_error ((char *) _("No %sindex entries containing `%s'."),
+ info_error (_("No %sindex entries containing `%s'."),
index_offset > 0 ? (char *) _("more ") : "", index_search);
return;
}
@@ -419,7 +418,7 @@ DECLARE_INFO_COMMAND (info_next_index_match,
char *format;
format = replace_in_documentation
- ((char *) _("Found `%s' in %s. (`\\[next-index-match]' tries to find next.)"),
+ (_("Found `%s' in %s. (`\\[next-index-match]' tries to find next.)"),
0);
window_message_in_echo_area (format, match, (char *) name);
@@ -433,19 +432,28 @@ DECLARE_INFO_COMMAND (info_next_index_match,
if (!node)
{
- info_error ((char *) msg_cant_file_node,
+ info_error (msg_cant_file_node,
index_index[i]->filename, index_index[i]->nodename);
return;
}
info_set_node_of_window (1, window, node);
- /* Try to find an occurence of LABEL in this node. */
{
- long start, loc;
+ long loc;
+ long line = index_index[i]->line_number - 1;
- start = window->line_starts[1] - window->node->contents;
- loc = info_target_search_node (node, index_index[i]->label, start);
+ if (line >= 0 && line < window->line_count)
+ {
+ /* Jump to the line number specified in the index entry. */
+ loc = window->line_starts[line] - window->node->contents;
+ }
+ else
+ {
+ /* Try to find an occurence of LABEL in this node. */
+ long start = window->line_starts[1] - window->node->contents;
+ loc = info_target_search_node (node, index_index[i]->label, start);
+ }
if (loc != -1)
{
@@ -538,7 +546,7 @@ apropos_in_all_indices (char *search_string, int inform)
}
if (this_fb && inform)
- message_in_echo_area ((char *) _("Scanning indices of `%s'..."),
+ message_in_echo_area (_("Scanning indices of `%s'..."),
files_name, NULL);
this_index = info_indices_of_file_buffer (this_fb);
@@ -603,7 +611,7 @@ info_apropos (char *string)
apropos_list = apropos_in_all_indices (string, 0);
if (!apropos_list)
- info_error ((char *) _(APROPOS_NONE), string, NULL);
+ info_error (_(APROPOS_NONE), string, NULL);
else
{
register int i;
@@ -623,7 +631,7 @@ DECLARE_INFO_COMMAND (info_index_apropos,
{
char *line;
- line = info_read_in_echo_area (window, (char *) _("Index apropos: "));
+ line = info_read_in_echo_area (window, _("Index apropos: "));
window = active_window;
@@ -643,7 +651,7 @@ DECLARE_INFO_COMMAND (info_index_apropos,
apropos_list = apropos_in_all_indices (line, 1);
if (!apropos_list)
- info_error ((char *) _(APROPOS_NONE), line, NULL);
+ info_error (_(APROPOS_NONE), line, NULL);
else
{
register int i;
@@ -651,7 +659,7 @@ DECLARE_INFO_COMMAND (info_index_apropos,
initialize_message_buffer ();
printf_to_message_buffer
- ((char *) _("\n* Menu: Nodes whose indices contain `%s':\n"),
+ (_("\n* Menu: Nodes whose indices contain `%s':\n"),
line, NULL, NULL);
line_buffer = (char *)xmalloc (500);
diff --git a/Build/source/utils/texinfo/info/indices.h b/Build/source/utils/texinfo/info/indices.h
index 1ccd6763616..712fa88bc8e 100644
--- a/Build/source/utils/texinfo/info/indices.h
+++ b/Build/source/utils/texinfo/info/indices.h
@@ -1,15 +1,15 @@
/* indices.h -- Functions defined in indices.c.
- $Id: indices.h,v 1.3 2004/04/11 17:56:45 karl Exp $
+ $Id: indices.h,v 1.6 2007/07/01 21:20:30 karl Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/info-utils.c b/Build/source/utils/texinfo/info/info-utils.c
index c23bac571ae..11cb4427a8a 100644
--- a/Build/source/utils/texinfo/info/info-utils.c
+++ b/Build/source/utils/texinfo/info/info-utils.c
@@ -1,12 +1,12 @@
/* info-utils.c -- miscellanous.
- $Id: info-utils.c,v 1.4 2004/04/11 17:56:45 karl Exp $
+ $Id: info-utils.c,v 1.9 2007/12/03 01:38:42 karl Exp $
- Copyright (C) 1993, 1998, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1998, 2003, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -250,7 +249,7 @@ info_references_internal (char *label, SEARCH_BINDING *binding)
tmp_search.end = binding->end;
tmp_search.flags = S_FoldCase | S_SkipDest;
- searching_for_menu_items = (strcasecmp (label, INFO_MENU_ENTRY_LABEL) == 0);
+ searching_for_menu_items = (mbscasecmp (label, INFO_MENU_ENTRY_LABEL) == 0);
while ((position = search_forward (label, &tmp_search)) != -1)
{
@@ -290,7 +289,8 @@ info_references_internal (char *label, SEARCH_BINDING *binding)
strncpy (entry->label, refdef, offset - 1);
entry->label[offset - 1] = '\0';
canonicalize_whitespace (entry->label);
-
+ entry->line_number = 0;
+
refdef += offset;
entry->start = start;
entry->end = refdef - binding->buffer;
@@ -396,6 +396,7 @@ info_copy_reference (REFERENCE *src)
dest->nodename = src->nodename ? xstrdup (src->nodename) : NULL;
dest->start = src->start;
dest->end = src->end;
+ dest->line_number = 0;
return dest;
}
diff --git a/Build/source/utils/texinfo/info/info-utils.h b/Build/source/utils/texinfo/info/info-utils.h
index 6517b152069..34d8dc5b113 100644
--- a/Build/source/utils/texinfo/info/info-utils.h
+++ b/Build/source/utils/texinfo/info/info-utils.h
@@ -1,13 +1,13 @@
/* info-utils.h -- Exported functions and variables from info-utils.c.
- $Id: info-utils.h,v 1.4 2004/04/11 17:56:45 karl Exp $
+ $Id: info-utils.h,v 1.7 2007/07/01 21:20:30 karl Exp $
- Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004 Free Software
+ Copyright (C) 1993, 1996, 1998, 2002, 2003, 2004, 2007 Free Software
Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/info.c b/Build/source/utils/texinfo/info/info.c
index 79dd0240c0a..38414257d93 100644
--- a/Build/source/utils/texinfo/info/info.c
+++ b/Build/source/utils/texinfo/info/info.c
@@ -1,13 +1,13 @@
/* info.c -- Display nodes of Info files in multiple windows.
- $Id: info.c,v 1.11 2004/04/11 17:56:45 karl Exp $
+ $Id: info.c,v 1.30 2008/03/20 18:37:58 karl Exp $
Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,10 +15,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
#include "indices.h"
@@ -28,7 +27,7 @@
# include "man.h"
#endif /* HANDLE_MAN_PAGES */
-static char *program_name = "info";
+char *program_name = "info";
/* Non-zero means search all indices for APROPOS_SEARCH_STRING. */
static int apropos_p = 0;
@@ -95,12 +94,11 @@ int speech_friendly = 0;
/* Structure describing the options that Info accepts. We pass this structure
to getopt_long (). If you add or otherwise change this structure, you must
also change the string which follows it. */
-#define APROPOS_OPTION 1
#define DRIBBLE_OPTION 2
#define RESTORE_OPTION 3
#define IDXSRCH_OPTION 4
static struct option long_options[] = {
- { "apropos", 1, 0, APROPOS_OPTION },
+ { "apropos", 1, 0, 'k' },
{ "directory", 1, 0, 'd' },
{ "dribble", 1, 0, DRIBBLE_OPTION },
{ "file", 1, 0, 'f' },
@@ -126,9 +124,9 @@ static struct option long_options[] = {
/* String describing the shorthand versions of the long options found above. */
#ifdef __MSDOS__
-static char *short_options = "d:n:f:ho:ORswb";
+static char *short_options = "k:d:n:f:ho:ORswb";
#else
-static char *short_options = "d:n:f:ho:ORws";
+static char *short_options = "k:d:n:f:ho:ORws";
#endif
/* When non-zero, the Info window system has been initialized. */
@@ -146,7 +144,7 @@ static void init_messages (void);
/* **************************************************************** */
int
-main (int argc, char **argv)
+main (int argc, char *argv[])
{
int getopt_long_index; /* Index returned by getopt_long (). */
NODE *initial_node; /* First node loaded by Info. */
@@ -154,7 +152,7 @@ main (int argc, char **argv)
#ifdef HAVE_SETLOCALE
/* Set locale via LC_ALL. */
setlocale (LC_ALL, "");
-#endif
+#endif /* HAVE_SETLOCALE */
#ifdef ENABLE_NLS
/* Set the text message domain. */
@@ -247,7 +245,7 @@ main (int argc, char **argv)
#endif /* __MSDOS__ */
/* User has specified a string to search all indices for. */
- case APROPOS_OPTION:
+ case 'k':
apropos_p = 1;
maybe_free (apropos_search_string);
apropos_search_string = xstrdup (optarg);
@@ -289,12 +287,13 @@ main (int argc, char **argv)
/* If the user specified --version, then show the version and exit. */
if (print_version_p)
{
- printf ("%s (GNU %s) %s\n", program_name, PACKAGE, VERSION);
+ printf ("info (GNU %s) %s\n", PACKAGE, VERSION);
puts ("");
- puts ("Copyright (C) 2004 Free Software Foundation, Inc.");
- printf (_("There is NO warranty. You may redistribute this software\n\
-under the terms of the GNU General Public License.\n\
-For more information about these matters, see the files named COPYING.\n"));
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n"),
+ "2008");
xexit (0);
}
@@ -366,7 +365,7 @@ For more information about these matters, see the files named COPYING.\n"));
if (info_recent_file_error)
info_error (info_recent_file_error, NULL, NULL);
else
- info_error ((char *) msg_cant_find_node,
+ info_error (msg_cant_find_node,
user_nodenames ? user_nodenames[0] : "Top", NULL);
xexit (1);
}
@@ -397,8 +396,15 @@ For more information about these matters, see the files named COPYING.\n"));
{
const char *errstr;
char *errarg1, *errarg2;
+ NODE *new_initial_node;
+
+ /* If they say info -O info, we want to show them the invocation node
+ for standalone info; there's nothing useful in info.texi. */
+ if (goto_invocation_p && argv[optind]
+ && mbscasecmp (argv[optind], "info") == 0)
+ argv[optind] = "info-stnd";
- NODE *new_initial_node = info_follow_menus (initial_node, argv + optind,
+ new_initial_node = info_follow_menus (initial_node, argv + optind,
&errstr, &errarg1, &errarg2);
if (new_initial_node && new_initial_node != initial_node)
@@ -425,13 +431,13 @@ For more information about these matters, see the files named COPYING.\n"));
dump_node_to_file (initial_node, user_output_filename,
dump_subnodes);
else
- info_error ((char *) errstr, errarg1, errarg2);
+ info_error (errstr, errarg1, errarg2);
}
else
{
if (errstr)
- begin_info_session_with_error (initial_node, (char *) errstr,
+ begin_info_session_with_error (initial_node, errstr,
errarg1, errarg2);
/* If the user specified `--index-search=STRING' or
--show-options, start the info session in the node
@@ -548,14 +554,19 @@ int info_error_rings_bell_p = 1;
then the message is printed in the echo area. Otherwise, a message is
output to stderr. */
void
-info_error (char *format, void *arg1, void *arg2)
+info_error (const char *format, void *arg1, void *arg2)
{
info_error_was_printed = 1;
if (!info_windows_initialized_p || display_inhibited)
{
fprintf (stderr, "%s: ", program_name);
- fprintf (stderr, format, arg1, arg2);
+ if (arg1)
+ fprintf (stderr, format, arg1, arg2);
+ else
+ /* If we're passed a string, just print it. Otherwise a % in a
+ filename gets treated as a format specifier. */
+ fputs (format, stderr);
fprintf (stderr, "\n");
fflush (stderr);
}
@@ -569,9 +580,7 @@ info_error (char *format, void *arg1, void *arg2)
}
else
{
- NODE *temp;
-
- temp = build_message_node (format, arg1, arg2);
+ NODE *temp = build_message_node (format, arg1, arg2);
if (info_error_rings_bell_p)
terminal_ring_bell ();
inform_in_echo_area (temp->contents);
@@ -586,51 +595,57 @@ info_error (char *format, void *arg1, void *arg2)
static void
info_short_help (void)
{
-#ifdef __MSDOS__
- static const char speech_friendly_string[] = N_("\
- -b, --speech-friendly be friendly to speech synthesizers.\n");
-#else
- static const char speech_friendly_string[] = "";
-#endif
-
-
printf (_("\
Usage: %s [OPTION]... [MENU-ITEM...]\n\
\n\
-Read documentation in Info format.\n\
-\n\
+Read documentation in Info format.\n"), program_name);
+ puts ("");
+
+ puts (_("\
Options:\n\
- --apropos=STRING look up STRING in all indices of all manuals.\n\
+ -k, --apropos=STRING look up STRING in all indices of all manuals.\n\
-d, --directory=DIR add DIR to INFOPATH.\n\
--dribble=FILENAME remember user keystrokes in FILENAME.\n\
- -f, --file=FILENAME specify Info file to visit.\n\
+ -f, --file=FILENAME specify Info file to visit."));
+
+ puts (_("\
-h, --help display this help and exit.\n\
--index-search=STRING go to node pointed by index entry STRING.\n\
-n, --node=NODENAME specify nodes in first visited Info file.\n\
- -o, --output=FILENAME output selected nodes to FILENAME.\n\
+ -o, --output=FILENAME output selected nodes to FILENAME."));
+
+ puts (_("\
-R, --raw-escapes output \"raw\" ANSI escapes (default).\n\
--no-raw-escapes output escapes as literal text.\n\
--restore=FILENAME read initial keystrokes from FILENAME.\n\
- -O, --show-options, --usage go to command-line options node.\n%s\
+ -O, --show-options, --usage go to command-line options node."));
+
+#ifdef __MSDOS__
+ puts (_("\
+ -b, --speech-friendly be friendly to speech synthesizers."));
+#endif
+
+ puts (_("\
--subnodes recursively output menu items.\n\
- -w, --where, --location print physical location of Info file.\n\
--vi-keys use vi-like and less-like key bindings.\n\
--version display version information and exit.\n\
-\n\
+ -w, --where, --location print physical location of Info file."));
+
+ puts (_("\n\
The first non-option argument, if present, is the menu entry to start from;\n\
it is searched for in all `dir' files along INFOPATH.\n\
If it is not present, info merges all `dir' files and shows the result.\n\
Any remaining arguments are treated as the names of menu\n\
-items relative to the initial node visited.\n\
-\n\
+items relative to the initial node visited."));
+
+ puts (_("\n\
Examples:\n\
info show top-level dir menu\n\
info emacs start at emacs node from top-level dir\n\
info emacs buffers start at buffers node within emacs manual\n\
info --show-options emacs start at node with emacs' command line options\n\
- info -f ./foo.info show file ./foo.info, not searching dir\n\
-"),
- program_name, speech_friendly_string);
+ info --subnodes -o out.txt emacs dump entire manual to out.txt\n\
+ info -f ./foo.info show file ./foo.info, not searching dir"));
puts (_("\n\
Email bug reports to bug-texinfo@gnu.org,\n\
diff --git a/Build/source/utils/texinfo/info/info.h b/Build/source/utils/texinfo/info/info.h
index 7ff8abe9b19..135e0336dcf 100644
--- a/Build/source/utils/texinfo/info/info.h
+++ b/Build/source/utils/texinfo/info/info.h
@@ -1,13 +1,13 @@
/* info.h -- Header file which includes all of the other headers.
- $Id: info.h,v 1.4 2004/04/11 17:56:45 karl Exp $
+ $Id: info.h,v 1.8 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -126,7 +125,7 @@ extern int raw_escapes_p;
/* Print FORMAT with ARG1 and ARG2. If the window system was initialized,
then the message is printed in the echo area. Otherwise, a message is
output to stderr. */
-extern void info_error (char *format, void *arg1, void *arg2);
+extern void info_error (const char *format, void *arg1, void *arg2);
extern void add_file_directory_to_path (char *filename);
@@ -155,6 +154,6 @@ extern void set_variable_to_value (char *name, char *value);
#endif /* INFOKEY */
/* Found in m-x.c. */
-extern char *read_function_name (char *prompt, WINDOW *window);
+extern char *read_function_name (const char *prompt, WINDOW *window);
#endif /* !INFO_H */
diff --git a/Build/source/utils/texinfo/info/infodoc.c b/Build/source/utils/texinfo/info/infodoc.c
index eeea147a967..31a82222430 100644
--- a/Build/source/utils/texinfo/info/infodoc.c
+++ b/Build/source/utils/texinfo/info/infodoc.c
@@ -1,13 +1,13 @@
/* infodoc.c -- functions which build documentation nodes.
- $Id: infodoc.c,v 1.8 2004/04/11 17:56:45 karl Exp $
+ $Id: infodoc.c,v 1.25 2008/03/08 01:55:39 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -31,10 +30,10 @@
static char *info_help_nodename = "*Info Help*";
/* A node containing printed key bindings and their documentation. */
-static NODE *internal_info_help_node = (NODE *)NULL;
+static NODE *internal_info_help_node = NULL;
/* A pointer to the contents of the help node. */
-static char *internal_info_help_node_contents = (char *)NULL;
+static char *internal_info_help_node_contents = NULL;
/* The (more or less) static text which appears in the internal info
help node. The actual key bindings are inserted. Keep the
@@ -43,49 +42,44 @@ static char *internal_info_help_node_contents = (char *)NULL;
#if defined(INFOKEY)
static char *info_internal_help_text[] = {
- N_("Basic Commands in Info Windows\n\
-******************************\n"),
+ N_("Basic Info command keys\n"),
"\n",
- N_("\\%-10[quit-help] Quit this help.\n"),
+ N_("\\%-10[quit-help] Close this help window.\n"),
N_("\\%-10[quit] Quit Info altogether.\n"),
N_("\\%-10[get-info-help-node] Invoke the Info tutorial.\n"),
"\n",
- N_("Selecting other nodes:\n\
-----------------------\n"),
- N_("\\%-10[next-node] Move to the \"next\" node of this node.\n"),
- N_("\\%-10[prev-node] Move to the \"previous\" node of this node.\n"),
- N_("\\%-10[up-node] Move \"up\" from this node.\n"),
- N_("\\%-10[menu-item] Pick menu item specified by name.\n\
- Picking a menu item causes another node to be selected.\n"),
- N_("\\%-10[xref-item] Follow a cross reference. Reads name of reference.\n"),
- N_("\\%-10[history-node] Move to the last node seen in this window.\n"),
- N_("\\%-10[move-to-next-xref] Skip to next hypertext link within this node.\n"),
- N_("\\%-10[move-to-prev-xref] Skip to previous hypertext link within this node.\n"),
- N_("\\%-10[select-reference-this-line] Follow the hypertext link under cursor.\n"),
- N_("\\%-10[dir-node] Move to the `directory' node. Equivalent to `\\[goto-node] (DIR)'.\n"),
- N_("\\%-10[top-node] Move to the Top node. Equivalent to `\\[goto-node] Top'.\n"),
- "\n",
- N_("Moving within a node:\n\
----------------------\n"),
+ N_("\\%-10[prev-line] Move up one line.\n"),
+ N_("\\%-10[next-line] Move down one line.\n"),
+ N_("\\%-10[scroll-backward] Scroll backward one screenful.\n"),
+ N_("\\%-10[scroll-forward] Scroll forward one screenful.\n"),
N_("\\%-10[beginning-of-node] Go to the beginning of this node.\n"),
N_("\\%-10[end-of-node] Go to the end of this node.\n"),
- N_("\\%-10[next-line] Scroll forward 1 line.\n"),
- N_("\\%-10[prev-line] Scroll backward 1 line.\n"),
- N_("\\%-10[scroll-forward] Scroll forward a page.\n"),
- N_("\\%-10[scroll-backward] Scroll backward a page.\n"),
"\n",
- N_("Other commands:\n\
----------------\n"),
- N_("\\%-10[menu-digit] Pick first ... ninth item in node's menu.\n"),
- N_("\\%-10[last-menu-item] Pick last item in node's menu.\n"),
- N_("\\%-10[index-search] Search for a specified string in the index entries of this Info\n\
- file, and select the node referenced by the first entry found.\n"),
- N_("\\%-10[goto-node] Move to node specified by name.\n\
- You may include a filename as well, as in (FILENAME)NODENAME.\n"),
- N_("\\%-10[search] Search forward for a specified string\n\
- and select the node in which the next occurrence is found.\n"),
- N_("\\%-10[search-backward] Search backward for a specified string\n\
- and select the node in which the previous occurrence is found.\n"),
+ N_("\\%-10[move-to-next-xref] Skip to the next hypertext link.\n"),
+ N_("\\%-10[select-reference-this-line] Follow the hypertext link under the cursor.\n"),
+ N_("\\%-10[history-node] Go back to the last node seen in this window.\n"),
+ "\n",
+ N_("\\%-10[global-prev-node] Go to the previous node in the document.\n"),
+ N_("\\%-10[global-next-node] Go to the next node in the document.\n"),
+ N_("\\%-10[prev-node] Go to the previous node on this level.\n"),
+ N_("\\%-10[next-node] Go to the next node on this level.\n"),
+ N_("\\%-10[up-node] Go up one level.\n"),
+ N_("\\%-10[top-node] Go to the top node of this document.\n"),
+ N_("\\%-10[dir-node] Go to the main `directory' node.\n"),
+ "\n",
+ N_("1...9 Pick the first...ninth item in this node's menu.\n"),
+ N_("\\%-10[last-menu-item] Pick the last item in this node's menu.\n"),
+ N_("\\%-10[menu-item] Pick a menu item specified by name.\n"),
+ N_("\\%-10[xref-item] Follow a cross reference specified by name.\n"),
+ N_("\\%-10[goto-node] Go to a node specified by name.\n"),
+ "\n",
+ N_("\\%-10[search] Search forward for a specified string.\n"),
+ N_("\\%-10[search-previous] Search for previous occurrence.\n"),
+ N_("\\%-10[search-next] Search for next occurrence.\n"),
+ N_("\\%-10[index-search] Search for a specified string in the index, and\n\
+ select the node referenced by the first entry found.\n"),
+ N_("\\%-10[abort-key] Cancel the current operation.\n"),
+ "\n",
NULL
};
@@ -104,8 +98,8 @@ static char *info_internal_help_text[] = {
N_(" %-10s Move to the `next' node of this node.\n"),
N_(" %-10s Move to the `previous' node of this node.\n"),
N_(" %-10s Move `up' from this node.\n"),
- N_(" %-10s Pick menu item specified by name.\n"),
- N_(" Picking a menu item causes another node to be selected.\n"),
+ N_(" %-10s Pick menu item specified by name.\n\
+ Picking a menu item causes another node to be selected.\n"),
N_(" %-10s Follow a cross reference. Reads name of reference.\n"),
N_(" %-10s Move to the last node seen in this window.\n"),
N_(" %-10s Skip to next hypertext link within this node.\n"),
@@ -124,16 +118,18 @@ static char *info_internal_help_text[] = {
"\n",
N_("Other commands:\n\
---------------\n"),
- N_(" %-10s Pick first ... ninth item in node's menu.\n"),
+ N_(" %-10s Pick first...ninth item in node's menu.\n"),
N_(" %-10s Pick last item in node's menu.\n"),
- N_(" %-10s Search for a specified string in the index entries of this Info\n"),
- N_(" file, and select the node referenced by the first entry found.\n"),
- N_(" %-10s Move to node specified by name.\n"),
- N_(" You may include a filename as well, as in (FILENAME)NODENAME.\n"),
- N_(" %-10s Search forward for a specified string,\n"),
- N_(" and select the node in which the next occurrence is found.\n"),
- N_(" %-10s Search backward for a specified string\n"),
- N_(" and select the node in which the next occurrence is found.\n"),
+ /* The next four strings are each a unity, so they each need to be
+ kept as one string for the translators. */
+ N_(" %-10s Search for a specified string in the index entries of this Info\n\
+ file, and select the node referenced by the first entry found.\n"),
+ N_(" %-10s Move to node specified by name.\n\
+ You may include a filename as well, as in (FILENAME)NODENAME.\n"),
+ N_(" %-10s Search forward for a specified string,\n\
+ and select the node in which the next occurrence is found.\n"),
+ N_(" %-10s Search backward for a specified string,\n\
+ and select the node in which the next occurrence is found.\n"),
NULL
};
@@ -293,7 +289,7 @@ create_internal_info_help_node (int help_is_only_window_p)
{
#ifdef INFOKEY
printf_to_message_buffer (replace_in_documentation
- ((char *) _(info_internal_help_text[i]), help_is_only_window_p),
+ (_(info_internal_help_text[i]), help_is_only_window_p),
NULL, NULL, NULL);
#else
/* Don't translate blank lines, gettext outputs the po file
@@ -312,16 +308,16 @@ create_internal_info_help_node (int help_is_only_window_p)
#endif /* !INFOKEY */
}
- printf_to_message_buffer ("---------------------\n\n", NULL, NULL, NULL);
- printf_to_message_buffer ((char *) _("The current search path is:\n"),
+ printf_to_message_buffer ("---------------------\n", NULL, NULL, NULL);
+ printf_to_message_buffer (_("The current search path is:\n"),
NULL, NULL, NULL);
- printf_to_message_buffer (" %s\n", infopath, NULL, NULL);
+ printf_to_message_buffer ("%s\n", infopath, NULL, NULL);
printf_to_message_buffer ("---------------------\n\n", NULL, NULL, NULL);
- printf_to_message_buffer ((char *) _("Commands available in Info windows:\n\n"),
+ printf_to_message_buffer (_("Commands available in Info windows:\n\n"),
NULL, NULL, NULL);
dump_map_to_message_buffer ("", info_keymap);
printf_to_message_buffer ("---------------------\n\n", NULL, NULL, NULL);
- printf_to_message_buffer ((char *) _("Commands available in the echo area:\n\n"),
+ printf_to_message_buffer (_("Commands available in the echo area:\n\n"),
NULL, NULL, NULL);
dump_map_to_message_buffer ("", echo_area_keymap);
@@ -344,11 +340,11 @@ create_internal_info_help_node (int help_is_only_window_p)
NULL, NULL, NULL);
if (exec_keys && exec_keys[0])
printf_to_message_buffer
- ((char *) _("The following commands can only be invoked via %s:\n\n"),
+ (_("The following commands can only be invoked via %s:\n\n"),
exec_keys, NULL, NULL);
else
printf_to_message_buffer
- ((char *) _("The following commands cannot be invoked at all:\n\n"),
+ (_("The following commands cannot be invoked at all:\n\n"),
NULL, NULL, NULL);
printed_one_mx = 1;
}
@@ -358,7 +354,7 @@ create_internal_info_help_node (int help_is_only_window_p)
exec_keys,
function_doc_array[i].func_name,
replace_in_documentation (strlen (function_doc_array[i].doc)
- ? (char *) _(function_doc_array[i].doc) : "", 0)
+ ? _(function_doc_array[i].doc) : "", 0)
);
}
@@ -370,10 +366,6 @@ create_internal_info_help_node (int help_is_only_window_p)
maybe_free (exec_keys);
#endif /* NAMED_FUNCTIONS */
- printf_to_message_buffer
- ("%s", replace_in_documentation
- ((char *) _("--- Use `\\[history-node]' or `\\[kill-node]' to exit ---\n"), 0),
- NULL, NULL);
node = message_buffer_to_node ();
internal_info_help_node_contents = node->contents;
}
@@ -494,7 +486,7 @@ DECLARE_INFO_COMMAND (info_get_help_window, _("Display help message"))
}
else
{
- info_error ((char *) msg_cant_make_help, NULL, NULL);
+ info_error (msg_cant_make_help, NULL, NULL);
}
}
@@ -513,7 +505,7 @@ DECLARE_INFO_COMMAND (info_get_info_help_node, _("Visit Info node `(info)Help'")
for (win = windows; win; win = win->next)
{
if (win->node && win->node->filename &&
- (strcasecmp
+ (mbscasecmp
(filename_non_directory (win->node->filename), "info") == 0) &&
((strcmp (win->node->nodename, "Help") == 0) ||
(strcmp (win->node->nodename, "Help-Small-Screen") == 0)))
@@ -538,7 +530,7 @@ DECLARE_INFO_COMMAND (info_get_info_help_node, _("Visit Info node `(info)Help'")
if (info_recent_file_error)
info_error (info_recent_file_error, NULL, NULL);
else
- info_error ((char *) msg_cant_file_node, "Info", nodename);
+ info_error (msg_cant_file_node, "Info", nodename);
}
else
{
@@ -586,7 +578,7 @@ function_documentation (InfoCommand *cmd)
#endif /* !INFOKEY */
- return replace_in_documentation ((strlen (doc) == 0) ? doc : (char *) _(doc), 0);
+ return replace_in_documentation ((strlen (doc) == 0) ? doc : _(doc), 0);
}
#if defined (NAMED_FUNCTIONS)
@@ -650,7 +642,7 @@ DECLARE_INFO_COMMAND (describe_key, _("Print documentation for KEY"))
for (;;)
{
- message_in_echo_area ((char *) _("Describe key: %s"),
+ message_in_echo_area (_("Describe key: %s"),
pretty_keyseq (keys), NULL);
keystroke = info_get_input_char ();
unmessage_in_echo_area ();
@@ -677,7 +669,7 @@ DECLARE_INFO_COMMAND (describe_key, _("Print documentation for KEY"))
if (map[keystroke].function == (InfoCommand *)NULL)
{
- message_in_echo_area ((char *) _("%s is undefined."),
+ message_in_echo_area (_("%s is undefined."),
pretty_keyseq (keys), NULL);
return;
}
@@ -706,7 +698,7 @@ DECLARE_INFO_COMMAND (describe_key, _("Print documentation for KEY"))
if (map[lowerkey].function == (InfoCommand *)NULL)
{
- message_in_echo_area ((char *) _("%s is undefined."),
+ message_in_echo_area (_("%s is undefined."),
pretty_keyseq (keys), NULL);
return;
}
@@ -887,7 +879,7 @@ strrpbrk (const char *s, const char *f)
/* Replace the names of functions with the key that invokes them. */
char *
-replace_in_documentation (char *string, int help_is_only_window_p)
+replace_in_documentation (const char *string, int help_is_only_window_p)
{
unsigned reslen = strlen (string);
register int i, start, next;
@@ -970,7 +962,7 @@ replace_in_documentation (char *string, int help_is_only_window_p)
/* If we have only one window (because the window size was too
small to split it), we have to quit help by going back one
- noew in the history list, not deleting the window. */
+ node in the history list, not deleting the window. */
if (strcmp (rep_name, "quit-help") == 0)
fun_name = help_is_only_window_p ? "history-node"
: "delete-window";
@@ -1154,7 +1146,7 @@ DECLARE_INFO_COMMAND (info_where_is,
{
char *command_name;
- command_name = read_function_name ((char *) _("Where is command: "), window);
+ command_name = read_function_name (_("Where is command: "), window);
if (!command_name)
{
@@ -1176,23 +1168,23 @@ DECLARE_INFO_COMMAND (info_where_is,
if (!location || !location[0])
{
- info_error ((char *) _("`%s' is not on any keys"),
+ info_error (_("`%s' is not on any keys"),
command_name, NULL);
}
else
{
if (strstr (location, function_name (command)))
window_message_in_echo_area
- ((char *) _("%s can only be invoked via %s."),
+ (_("%s can only be invoked via %s."),
command_name, location);
else
window_message_in_echo_area
- ((char *) _("%s can be invoked via %s."),
+ (_("%s can be invoked via %s."),
command_name, location);
}
}
else
- info_error ((char *) _("There is no function named `%s'"),
+ info_error (_("There is no function named `%s'"),
command_name, NULL);
}
diff --git a/Build/source/utils/texinfo/info/infokey.c b/Build/source/utils/texinfo/info/infokey.c
index 51f23aab0c8..4f49e74f78c 100644
--- a/Build/source/utils/texinfo/info/infokey.c
+++ b/Build/source/utils/texinfo/info/infokey.c
@@ -1,12 +1,13 @@
/* infokey.c -- compile ~/.infokey to ~/.info.
- $Id: infokey.c,v 1.9 2004/12/14 00:15:36 karl Exp $
+ $Id: infokey.c,v 1.17 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Andrew Bettison <andrewb@zip.com.au>. */
@@ -25,7 +25,7 @@
#include "key.h"
#include "getopt.h"
-static char *program_name = "infokey";
+char *program_name = "infokey";
/* Non-zero means print version info only. */
static int print_version_p = 0;
@@ -142,11 +142,11 @@ main (int argc, char **argv)
{
printf ("%s (GNU %s) %s\n", program_name, PACKAGE, VERSION);
puts ("");
- printf (_ ("Copyright (C) %s Free Software Foundation, Inc.\n\
-There is NO warranty. You may redistribute this software\n\
-under the terms of the GNU General Public License.\n\
-For more information about these matters, see the files named COPYING.\n"),
- "2003");
+ printf (_("Copyright (C) %s Free Software Foundation, Inc.\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n"),
+ "2008");
xexit (0);
}
@@ -638,7 +638,7 @@ compile (FILE *fp, const char *filename, struct sect *sections)
else
{
syntax_error (filename, lnum,
- (char *) _("NUL character (^%c) not permitted"),
+ _("NUL character (^%c) not permitted"),
(void *) (long) c, NULL, NULL, NULL);
error = 1;
}
@@ -662,7 +662,7 @@ compile (FILE *fp, const char *filename, struct sect *sections)
rescan = 1;
if (alen == 0)
{
- syntax_error (filename, lnum, (char *) _("missing action name"),
+ syntax_error (filename, lnum, _("missing action name"),
(void *) (long) c, NULL, NULL, NULL);
error = 1;
}
diff --git a/Build/source/utils/texinfo/info/infokey.h b/Build/source/utils/texinfo/info/infokey.h
index d51211d0c3a..783d92106d1 100644
--- a/Build/source/utils/texinfo/info/infokey.h
+++ b/Build/source/utils/texinfo/info/infokey.h
@@ -1,12 +1,12 @@
/* infokey.h -- Custom keystroke definition support.
- $Id: infokey.h,v 1.2 2004/04/11 17:56:45 karl Exp $
+ $Id: infokey.h,v 1.5 2007/07/01 21:20:30 karl Exp $
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Andrew Bettison <andrewb@zip.com.au>.
diff --git a/Build/source/utils/texinfo/info/infomap.c b/Build/source/utils/texinfo/info/infomap.c
index c7dc2f4aea9..7ee423924ed 100644
--- a/Build/source/utils/texinfo/info/infomap.c
+++ b/Build/source/utils/texinfo/info/infomap.c
@@ -1,13 +1,13 @@
/* infomap.c -- keymaps for Info.
- $Id: infomap.c,v 1.10 2004/07/30 20:43:40 karl Exp $
+ $Id: infomap.c,v 1.20 2008/02/29 22:20:53 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2007, 2008
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -77,13 +76,13 @@ find_function_keyseq (Keymap map, int c, Keymap rootmap)
const unsigned char *p;
Keymap m = rootmap;
if (k->map != rootmap)
- continue;
+ continue;
for (p = (unsigned char *) k->keyseq; *p && m[*p].type == ISKMAP; p++)
- m = (Keymap)m[*p].function;
+ m = (Keymap)m[*p].function;
if (*p != c || p[1])
- continue;
+ continue;
if (m[*p].type != ISFUNC)
- abort ();
+ abort ();
break;
}
return k;
@@ -147,20 +146,20 @@ keymap_copy_keymap (Keymap map, Keymap rootmap, Keymap newroot)
{
keymap[i].type = map[i].type;
switch (map[i].type)
- {
- case ISFUNC:
- keymap[i].function = map[i].function;
+ {
+ case ISFUNC:
+ keymap[i].function = map[i].function;
#if defined(INFOKEY)
- ks = find_function_keyseq (map, i, rootmap);
- if (ks)
- add_function_keyseq(map[i].function, ks->keyseq, newroot);
+ ks = find_function_keyseq (map, i, rootmap);
+ if (ks)
+ add_function_keyseq(map[i].function, ks->keyseq, newroot);
#endif /* INFOKEY */
- break;
- case ISKMAP:
- keymap[i].function = (InfoCommand *)keymap_copy_keymap
+ break;
+ case ISKMAP:
+ keymap[i].function = (InfoCommand *)keymap_copy_keymap
((Keymap)map[i].function, rootmap, NULL);
- break;
- }
+ break;
+ }
}
return (keymap);
}
@@ -185,9 +184,9 @@ keymap_discard_keymap (Keymap map, Keymap rootmap)
{
case ISFUNC:
#if defined(INFOKEY)
- ks = find_function_keyseq(map, i, rootmap);
- if (ks)
- remove_function_keyseq (map[i].function, ks->keyseq, rootmap);
+ ks = find_function_keyseq(map, i, rootmap);
+ if (ks)
+ remove_function_keyseq (map[i].function, ks->keyseq, rootmap);
#endif /* INFOKEY */
break;
@@ -220,14 +219,14 @@ keymap_bind_keyseq (Keymap map,
{
case ISFUNC:
#if defined(INFOKEY)
- ks = find_function_keyseq(m, c, map);
- if (ks)
- remove_function_keyseq (m[c].function, ks->keyseq, map);
+ ks = find_function_keyseq(m, c, map);
+ if (ks)
+ remove_function_keyseq (m[c].function, ks->keyseq, map);
#else /* !INFOKEY */
if (!(m[c].function == NULL || (
m != map &&
m[c].function == InfoCmd(info_do_lowercase_version))
- ))
+ ))
return 0;
#endif /* !INFOKEY */
@@ -246,8 +245,8 @@ keymap_bind_keyseq (Keymap map,
case ISKMAP:
#if defined(INFOKEY)
- if (*s == '\0')
- keymap_discard_keymap ((Keymap)m[c].function, map);
+ if (*s == '\0')
+ keymap_discard_keymap ((Keymap)m[c].function, map);
#else /* !INFOKEY */
if (*s == '\0')
return 0;
@@ -261,7 +260,7 @@ keymap_bind_keyseq (Keymap map,
else
{
#if defined(INFOKEY)
- add_function_keyseq (keyentry->function, keyseq, map);
+ add_function_keyseq (keyentry->function, keyseq, map);
#endif /* INFOKEY */
m[c] = *keyentry;
}
@@ -270,572 +269,12 @@ keymap_bind_keyseq (Keymap map,
return 1;
}
+
/* Initialize the standard info keymaps. */
Keymap info_keymap = NULL;
Keymap echo_area_keymap = NULL;
-#if !defined(INFOKEY)
-
-static void
-initialize_emacs_like_keymaps ()
-{
- int i;
- Keymap map;
-
- if (!info_keymap)
- {
- info_keymap = keymap_make_keymap ();
- echo_area_keymap = keymap_make_keymap ();
- }
-
- info_keymap[ESC].type = ISKMAP;
- info_keymap[ESC].function = (InfoCommand *)keymap_make_keymap ();
- info_keymap[Control ('x')].type = ISKMAP;
- info_keymap[Control ('x')].function = (InfoCommand *)keymap_make_keymap ();
-
- /* Bind the echo area insert routines. Let's make all characters
- insertable by default, regardless of which character set we might
- be using. */
- for (i = 0; i < 256; i++)
- echo_area_keymap[i].function = ea_insert;
-
- echo_area_keymap[ESC].type = ISKMAP;
- echo_area_keymap[ESC].function = (InfoCommand *) keymap_make_keymap ();
- echo_area_keymap[Control ('x')].type = ISKMAP;
- echo_area_keymap[Control ('x')].function
- = (InfoCommand *) keymap_make_keymap ();
-
- /* Bind numeric arg functions for both echo area and info window maps. */
- for (i = '0'; i < '9' + 1; i++)
- {
- ((Keymap) info_keymap[ESC].function)[i].function
- = ((Keymap) echo_area_keymap[ESC].function)[i].function
- = info_add_digit_to_numeric_arg;
- }
- ((Keymap) info_keymap[ESC].function)['-'].function =
- ((Keymap) echo_area_keymap[ESC].function)['-'].function =
- info_add_digit_to_numeric_arg;
-
- info_keymap['-'].function = info_add_digit_to_numeric_arg;
-
- /* Bind the echo area routines. */
- map = echo_area_keymap;
-
- map[Control ('a')].function = ea_beg_of_line;
- map[Control ('b')].function = ea_backward;
- map[Control ('d')].function = ea_delete;
- map[Control ('e')].function = ea_end_of_line;
- map[Control ('f')].function = ea_forward;
- map[Control ('g')].function = ea_abort;
- map[Control ('h')].function = ea_rubout;
- map[Control ('k')].function = ea_kill_line;
- map[Control ('l')].function = info_redraw_display;
- map[Control ('q')].function = ea_quoted_insert;
- map[Control ('t')].function = ea_transpose_chars;
- map[Control ('u')].function = info_universal_argument;
- map[Control ('y')].function = ea_yank;
-
- map[LFD].function = ea_newline;
- map[RET].function = ea_newline;
- map[SPC].function = ea_complete;
- map[TAB].function = ea_complete;
- map['?'].function = ea_possible_completions;
-#ifdef __MSDOS__
- /* PC users will lynch me if I don't give them their usual DEL effect... */
- map[DEL].function = ea_delete;
-#else
- map[DEL].function = ea_rubout;
-#endif
-
- /* Bind the echo area ESC keymap. */
- map = (Keymap)echo_area_keymap[ESC].function;
-
- map[Control ('g')].function = ea_abort;
- map[Control ('v')].function = ea_scroll_completions_window;
- map['b'].function = ea_backward_word;
- map['d'].function = ea_kill_word;
- map['f'].function = ea_forward_word;
-#if defined (NAMED_FUNCTIONS)
- /* map['x'].function = info_execute_command; */
-#endif /* NAMED_FUNCTIONS */
- map['y'].function = ea_yank_pop;
- map['?'].function = ea_possible_completions;
- map[TAB].function = ea_tab_insert;
- map[DEL].function = ea_backward_kill_word;
-
- /* Bind the echo area Control-x keymap. */
- map = (Keymap)echo_area_keymap[Control ('x')].function;
-
- map['o'].function = info_next_window;
- map[DEL].function = ea_backward_kill_line;
-
- /* Arrow key bindings for echo area keymaps. It seems that some
- terminals do not match their termcap entries, so it's best to just
- define everything with both of the usual prefixes. */
- map = echo_area_keymap;
- keymap_bind_keyseq (map, term_ku, &map[Control ('p')]); /* up */
- keymap_bind_keyseq (map, "\033OA", &map[Control ('p')]);
- keymap_bind_keyseq (map, "\033[A", &map[Control ('p')]);
- keymap_bind_keyseq (map, term_kd, &map[Control ('n')]); /* down */
- keymap_bind_keyseq (map, "\033OB", &map[Control ('n')]);
- keymap_bind_keyseq (map, "\033[B", &map[Control ('n')]);
- keymap_bind_keyseq (map, term_kr, &map[Control ('f')]); /* right */
- keymap_bind_keyseq (map, "\033OC", &map[Control ('f')]);
- keymap_bind_keyseq (map, "\033[C", &map[Control ('f')]);
- keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
- keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
- keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
- keymap_bind_keyseq (map, term_kh, &map[Control ('a')]); /* home */
- keymap_bind_keyseq (map, term_ke, &map[Control ('e')]); /* end */
-
- map = (Keymap)echo_area_keymap[ESC].function;
- keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
- keymap_bind_keyseq (map, "\033OA", &map['b']);
- keymap_bind_keyseq (map, "\033[A", &map['b']);
- keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
- keymap_bind_keyseq (map, "\033OB", &map['f']);
- keymap_bind_keyseq (map, "\033[B", &map['f']);
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
-
- map = (Keymap)echo_area_keymap[Control ('x')].function;
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
-
- /* Bind commands for Info window keymaps. */
- map = info_keymap;
- map[TAB].function = info_move_to_next_xref;
- map[LFD].function = info_select_reference_this_line;
- map[RET].function = info_select_reference_this_line;
- map[SPC].function = info_scroll_forward;
- map[Control ('a')].function = info_beginning_of_line;
- map[Control ('b')].function = info_backward_char;
- map[Control ('e')].function = info_end_of_line;
- map[Control ('f')].function = info_forward_char;
- map[Control ('g')].function = info_abort_key;
- map[Control ('h')].function = info_get_help_window;
- map[Control ('l')].function = info_redraw_display;
- map[Control ('n')].function = info_next_line;
- map[Control ('p')].function = info_prev_line;
- map[Control ('r')].function = isearch_backward;
- map[Control ('s')].function = isearch_forward;
- map[Control ('u')].function = info_universal_argument;
- map[Control ('v')].function = info_scroll_forward_page_only;
- map[','].function = info_next_index_match;
- map['/'].function = info_search;
-
- for (i = '1'; i < '9' + 1; i++)
- map[i].function = info_menu_digit;
- map['0'].function = info_last_menu_item;
-
- map['<'].function = info_first_node;
- map['>'].function = info_last_node;
- map['?'].function = info_get_help_window;
- map['['].function = info_global_prev_node;
- map[']'].function = info_global_next_node;
-
- map['b'].function = info_beginning_of_node;
- map['d'].function = info_dir_node;
- map['e'].function = info_end_of_node;
- map['f'].function = info_xref_item;
- map['g'].function = info_goto_node;
- map['G'].function = info_menu_sequence;
- map['h'].function = info_get_info_help_node;
- map['i'].function = info_index_search;
- map['I'].function = info_goto_invocation_node;
- map['l'].function = info_history_node;
- map['m'].function = info_menu_item;
- map['n'].function = info_next_node;
- map['O'].function = info_goto_invocation_node;
- map['p'].function = info_prev_node;
- map['q'].function = info_quit;
- map['r'].function = info_xref_item;
- map['s'].function = info_search;
- map['S'].function = info_search_case_sensitively;
- map['t'].function = info_top_node;
- map['u'].function = info_up_node;
- map[DEL].function = info_scroll_backward;
-
- /* Bind members in the ESC map for Info windows. */
- map = (Keymap)info_keymap[ESC].function;
- map[Control ('f')].function = info_show_footnotes;
- map[Control ('g')].function = info_abort_key;
- map[TAB].function = info_move_to_prev_xref;
- map[Control ('v')].function = info_scroll_other_window;
- map['<'].function = info_beginning_of_node;
- map['>'].function = info_end_of_node;
- map['b'].function = info_backward_word;
- map['f'].function = info_forward_word;
- map['r'].function = info_move_to_window_line;
- map['v'].function = info_scroll_backward_page_only;
-#if defined (NAMED_FUNCTIONS)
- map['x'].function = info_execute_command;
-#endif /* NAMED_FUNCTIONS */
- map[DEL].function = info_scroll_other_window_backward;
-
- /* Bind members in the Control-X map for Info windows. */
- map = (Keymap)info_keymap[Control ('x')].function;
-
- map[Control ('b')].function = list_visited_nodes;
- map[Control ('c')].function = info_quit;
- map[Control ('f')].function = info_view_file;
- map[Control ('g')].function = info_abort_key;
- map[Control ('v')].function = info_view_file;
- map['0'].function = info_delete_window;
- map['1'].function = info_keep_one_window;
- map['2'].function = info_split_window;
- map['^'].function = info_grow_window;
- map['b'].function = select_visited_node;
- map['k'].function = info_kill_node;
- map['n'].function = info_search_next;
- map['N'].function = info_search_previous;
- map['o'].function = info_next_window;
- map['t'].function = info_tile_windows;
- map['w'].function = info_toggle_wrap;
-
- /* Arrow key bindings for Info windows keymap. */
- map = info_keymap;
- keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
- keymap_bind_keyseq (map, term_ku, &map[Control ('p')]); /* up */
- keymap_bind_keyseq (map, "\033OA", &map[Control ('p')]);
- keymap_bind_keyseq (map, "\033[A", &map[Control ('p')]);
- keymap_bind_keyseq (map, term_kd, &map[Control ('n')]); /* down */
- keymap_bind_keyseq (map, "\033OB", &map[Control ('n')]);
- keymap_bind_keyseq (map, "\033[B", &map[Control ('n')]);
- keymap_bind_keyseq (map, term_kr, &map[Control ('f')]); /* right */
- keymap_bind_keyseq (map, "\033OC", &map[Control ('f')]);
- keymap_bind_keyseq (map, "\033[C", &map[Control ('f')]);
- keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
- keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
- keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
- keymap_bind_keyseq (map, term_kh, &map['b']); /* home */
- keymap_bind_keyseq (map, term_ke, &map['e']); /* end */
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
-
- map = (Keymap)info_keymap[ESC].function;
- keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
- keymap_bind_keyseq (map, "\033OA", &map['b']);
- keymap_bind_keyseq (map, "\033[A", &map['b']);
- keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
- keymap_bind_keyseq (map, "\033OB", &map['f']);
- keymap_bind_keyseq (map, "\033[B", &map['f']);
- keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
- keymap_bind_keyseq (map, term_kP, &map[DEL]); /* pageup */
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
-
- /* The alternative to this definition of a `main map' key in the
- `ESC map' section, is something like:
- keymap_bind_keyseq (map, term_kP, &((KeyMap)map[ESC].function).map['v']);
- */
- keymap_bind_keyseq (info_keymap/*sic*/, term_kP, &map['v']); /* pageup */
-}
-
-static void
-initialize_vi_like_keymaps ()
-{
- int i;
- Keymap map;
-
- if (!info_keymap)
- {
- info_keymap = keymap_make_keymap ();
- echo_area_keymap = keymap_make_keymap ();
- }
-
- info_keymap[ESC].type = ISKMAP;
- info_keymap[ESC].function = (InfoCommand *)keymap_make_keymap ();
- info_keymap[Control ('x')].type = ISKMAP;
- info_keymap[Control ('x')].function = (InfoCommand *)keymap_make_keymap ();
-
- /* Bind the echo area insert routines. */
- for (i = 0; i < 256; i++)
- echo_area_keymap[i].function = ea_insert;
-
- echo_area_keymap[ESC].type = ISKMAP;
- echo_area_keymap[ESC].function = (InfoCommand *)keymap_make_keymap ();
- echo_area_keymap[Control ('x')].type = ISKMAP;
- echo_area_keymap[Control ('x')].function =
- (InfoCommand *)keymap_make_keymap ();
-
- /* Bind numeric arg functions for both echo area and info window maps. */
- for (i = '0'; i < '9' + 1; i++)
- {
- info_keymap[i].function =
- ((Keymap) echo_area_keymap[ESC].function)[i].function =
- info_add_digit_to_numeric_arg;
- }
- info_keymap['-'].function =
- ((Keymap) echo_area_keymap[ESC].function)['-'].function =
- info_add_digit_to_numeric_arg;
-
- /* Bind the echo area routines. */
- map = echo_area_keymap;
-
- map[Control ('a')].function = ea_beg_of_line;
- map[Control ('b')].function = ea_backward;
- map[Control ('d')].function = ea_delete;
- map[Control ('e')].function = ea_end_of_line;
- map[Control ('f')].function = ea_forward;
- map[Control ('g')].function = ea_abort;
- map[Control ('h')].function = ea_rubout;
- map[Control ('k')].function = ea_kill_line;
- map[Control ('l')].function = info_redraw_display;
- map[Control ('q')].function = ea_quoted_insert;
- map[Control ('t')].function = ea_transpose_chars;
- map[Control ('u')].function = ea_abort;
- map[Control ('v')].function = ea_quoted_insert;
- map[Control ('y')].function = ea_yank;
-
- map[LFD].function = ea_newline;
- map[RET].function = ea_newline;
- map[SPC].function = ea_complete;
- map[TAB].function = ea_complete;
- map['?'].function = ea_possible_completions;
-#ifdef __MSDOS__
- /* PC users will lynch me if I don't give them their usual DEL effect... */
- map[DEL].function = ea_delete;
-#else
- map[DEL].function = ea_rubout;
-#endif
-
- /* Bind the echo area ESC keymap. */
- map = (Keymap)echo_area_keymap[ESC].function;
-
- map[Control ('g')].function = ea_abort;
- map[Control ('h')].function = ea_backward_kill_word;
- map[Control ('v')].function = ea_scroll_completions_window;
- map['0'].function = ea_beg_of_line;
- map['$'].function = ea_end_of_line;
- map['b'].function = ea_backward_word;
- map['d'].function = ea_kill_word;
- map['f'].function = ea_forward_word;
- map['h'].function = ea_backward;
- map['l'].function = ea_forward;
- map['w'].function = ea_forward_word;
- map['x'].function = ea_delete;
- map['X'].function = ea_kill_word;
- map['y'].function = ea_yank_pop;
- map['?'].function = ea_possible_completions;
- map[TAB].function = ea_tab_insert;
- map[DEL].function = ea_kill_word;
-
- /* Bind the echo area Control-x keymap. */
- map = (Keymap)echo_area_keymap[Control ('x')].function;
-
- map['o'].function = info_next_window;
- map[DEL].function = ea_backward_kill_line;
-
- /* Arrow key bindings for echo area keymaps. It seems that some
- terminals do not match their termcap entries, so it's best to just
- define everything with both of the usual prefixes. */
- map = echo_area_keymap;
- keymap_bind_keyseq (map, term_ku, &map[Control ('p')]); /* up */
- keymap_bind_keyseq (map, "\033OA", &map[Control ('p')]);
- keymap_bind_keyseq (map, "\033[A", &map[Control ('p')]);
- keymap_bind_keyseq (map, term_kd, &map[Control ('n')]); /* down */
- keymap_bind_keyseq (map, "\033OB", &map[Control ('n')]);
- keymap_bind_keyseq (map, "\033[B", &map[Control ('n')]);
- keymap_bind_keyseq (map, term_kr, &map[Control ('f')]); /* right */
- keymap_bind_keyseq (map, "\033OC", &map[Control ('f')]);
- keymap_bind_keyseq (map, "\033[C", &map[Control ('f')]);
- keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
- keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
- keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
- keymap_bind_keyseq (map, term_kh, &map[Control ('a')]); /* home */
- keymap_bind_keyseq (map, term_ke, &map[Control ('e')]); /* end */
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
-
- map = (Keymap)echo_area_keymap[ESC].function;
- keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
- keymap_bind_keyseq (map, "\033OA", &map['b']);
- keymap_bind_keyseq (map, "\033[A", &map['b']);
- keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
- keymap_bind_keyseq (map, "\033OB", &map['f']);
- keymap_bind_keyseq (map, "\033[B", &map['f']);
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
-
- map = (Keymap)echo_area_keymap[Control ('x')].function;
- keymap_bind_keyseq (map, term_kD, &map[DEL]);
-
- /* Bind commands for Info window keymaps. */
- map = info_keymap;
- map[TAB].function = info_move_to_next_xref;
- map[LFD].function = info_down_line;
- map[RET].function = info_down_line;
- map[SPC].function = info_scroll_forward;
- map[Control ('a')].function = info_beginning_of_line;
- map[Control ('b')].function = info_scroll_backward_page_only;
- map[Control ('d')].function = info_scroll_half_screen_down;
- map[Control ('e')].function = info_down_line;
- map[Control ('f')].function = info_scroll_forward_page_only;
- map[Control ('g')].function = info_abort_key;
- map[Control ('k')].function = info_up_line;
- map[Control ('l')].function = info_redraw_display;
- map[Control ('n')].function = info_down_line;
- map[Control ('p')].function = info_up_line;
- map[Control ('r')].function = info_redraw_display;
- map[Control ('s')].function = isearch_forward;
- map[Control ('u')].function = info_scroll_half_screen_up;
- map[Control ('v')].function = info_scroll_forward_page_only;
- map[Control ('y')].function = info_up_line;
- map[','].function = info_next_index_match;
- map['/'].function = info_search;
-
- for (i = '1'; i < '9' + 1; i++)
- ((Keymap) info_keymap[ESC].function)[i].function = info_menu_digit;
- ((Keymap) info_keymap[ESC].function)['0'].function = info_last_menu_item;
-
- map['<'].function = info_first_node;
- map['>'].function = info_last_node;
- map['?'].function = info_search_backward;
- map['['].function = info_global_prev_node;
- map[']'].function = info_global_next_node;
- map['\''].function = info_history_node;
-
- map['b'].function = info_scroll_backward;
- map['d'].function = info_scroll_half_screen_down;
- map['e'].function = info_down_line;
- map['E'].function = info_view_file;
- map['f'].function = info_scroll_forward_page_only;
- map['F'].function = info_scroll_forward_page_only;
- map['g'].function = info_first_node;
- map['G'].function = info_last_node;
- map['h'].function = info_get_help_window;
- map['H'].function = info_get_help_window;
- map['i'].function = info_index_search;
- map['I'].function = info_goto_invocation_node;
- map['j'].function = info_next_line;
- map['k'].function = info_prev_line;
- map['l'].function = info_history_node;
- map['m'].function = info_menu_item;
- map['n'].function = info_search_next;
- map['N'].function = info_search_previous;
- map['O'].function = info_goto_invocation_node;
- map['p'].function = info_prev_node;
- map['q'].function = info_quit;
- map['Q'].function = info_quit;
- map['r'].function = info_redraw_display;
- map['R'].function = info_redraw_display;
- map['s'].function = info_search;
- map['S'].function = info_search_case_sensitively;
- map['t'].function = info_top_node;
- map['u'].function = info_scroll_half_screen_up;
- map['w'].function = info_scroll_backward_page_only_set_window;
- map['y'].function = info_up_line;
- map['z'].function = info_scroll_forward_page_only_set_window;
- map['Z'].function = NULL; /* unbind, so it works to bind "ZZ" below */
- map[DEL].function = info_scroll_backward;
- keymap_bind_keyseq (map, term_kD, &map[DEL]);
- keymap_bind_keyseq (map, ":q", &map['q']);
- keymap_bind_keyseq (map, ":Q", &map['q']);
- keymap_bind_keyseq (map, "ZZ", &map['q']);
-
- /* Bind members in the ESC map for Info windows. */
- map = (Keymap)info_keymap[ESC].function;
- map[Control ('f')].function = info_show_footnotes;
- map[Control ('g')].function = info_abort_key;
- map[TAB].function = info_move_to_prev_xref;
- map[SPC].function = info_scroll_forward_page_only;
- map[Control ('v')].function = info_scroll_other_window;
- map['<'].function = info_beginning_of_node;
- map['>'].function = info_end_of_node;
- map['/'].function = info_search;
- map['?'].function = info_search_backward;
- map['b'].function = info_beginning_of_node;
- map['d'].function = info_dir_node;
- map['e'].function = info_end_of_node;
- map['f'].function = info_xref_item;
- map['g'].function = info_select_reference_this_line;
- map['h'].function = info_get_info_help_node;
- map['m'].function = info_menu_item;
- map['n'].function = info_search;
- map['N'].function = info_search_backward;
- map['r'].function = isearch_backward;
- map['s'].function = isearch_forward;
- map['t'].function = info_top_node;
- map['v'].function = info_scroll_backward_page_only;
-#if defined (NAMED_FUNCTIONS)
- map['x'].function = info_execute_command;
-#endif /* NAMED_FUNCTIONS */
- map[DEL].function = info_scroll_other_window_backward;
-
- /* Bind members in the Control-X map for Info windows. */
- map = (Keymap)info_keymap[Control ('x')].function;
-
- map[Control ('b')].function = list_visited_nodes;
- map[Control ('c')].function = info_quit;
- map[Control ('f')].function = info_view_file;
- map[Control ('g')].function = info_abort_key;
- map[Control ('v')].function = info_view_file;
- map[LFD].function = info_select_reference_this_line;
- map[RET].function = info_select_reference_this_line;
- map['0'].function = info_delete_window;
- map['1'].function = info_keep_one_window;
- map['2'].function = info_split_window;
- map['^'].function = info_grow_window;
- map['b'].function = select_visited_node;
- map['g'].function = info_goto_node;
- map['i'].function = info_index_search;
- map['I'].function = info_goto_invocation_node;
- map['k'].function = info_kill_node;
- map['n'].function = info_next_node;
- map['o'].function = info_next_window;
- map['O'].function = info_goto_invocation_node;
- map['p'].function = info_prev_node;
- map['r'].function = info_xref_item;
- map['t'].function = info_tile_windows;
- map['u'].function = info_up_node;
- map['w'].function = info_toggle_wrap;
- map[','].function = info_next_index_match;
- keymap_bind_keyseq (info_keymap, ":e", &map[Control ('v')]);
-
- /* Arrow key bindings for Info windows keymap. */
- map = info_keymap;
- keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
- keymap_bind_keyseq (map, term_ku, &map[Control ('p')]); /* up */
- keymap_bind_keyseq (map, "\033OA", &map[Control ('p')]);
- keymap_bind_keyseq (map, "\033[A", &map[Control ('p')]);
- keymap_bind_keyseq (map, term_kd, &map[Control ('n')]); /* down */
- keymap_bind_keyseq (map, "\033OB", &map[Control ('n')]);
- keymap_bind_keyseq (map, "\033[B", &map[Control ('n')]);
- keymap_bind_keyseq (map, term_kr, &map[Control ('f')]); /* right */
- keymap_bind_keyseq (map, "\033OC", &map[Control ('f')]);
- keymap_bind_keyseq (map, "\033[C", &map[Control ('f')]);
- keymap_bind_keyseq (map, term_kl, &map[Control ('b')]); /* left */
- keymap_bind_keyseq (map, "\033OD", &map[Control ('b')]);
- keymap_bind_keyseq (map, "\033[D", &map[Control ('b')]);
- keymap_bind_keyseq (map, term_kh, &map['b']); /* home */
- keymap_bind_keyseq (map, term_ke, &map['e']); /* end */
-
- map = (Keymap)info_keymap[ESC].function;
- keymap_bind_keyseq (map, term_kl, &map['b']); /* left */
- keymap_bind_keyseq (map, "\033OA", &map['b']);
- keymap_bind_keyseq (map, "\033[A", &map['b']);
- keymap_bind_keyseq (map, term_kr, &map['f']); /* right */
- keymap_bind_keyseq (map, "\033OB", &map['f']);
- keymap_bind_keyseq (map, "\033[B", &map['f']);
- keymap_bind_keyseq (map, term_kN, &map[Control ('v')]); /* pagedown */
- keymap_bind_keyseq (map, term_kP, &map[DEL]); /* pageup */
- keymap_bind_keyseq (map, term_kD, &map[DEL]); /* delete */
-
- /* The alternative to this definition of a `main map' key in the
- `ESC map' section, is something like:
- keymap_bind_keyseq (map, term_kP, &((KeyMap)map[ESC].function).map['v']);
- */
- keymap_bind_keyseq (info_keymap/*sic*/, term_kP, &map['v']); /* pageup */
-}
-
-void
-initialize_info_keymaps ()
-{
- if (vi_keys_p)
- initialize_vi_like_keymaps ();
- else
- initialize_emacs_like_keymaps ();
-}
-
-#else /* defined(INFOKEY) */
-
/* Make sure that we don't have too many command codes defined. */
#if A_NCOMMANDS > A_MAX_COMMAND + 1
@@ -844,572 +283,588 @@ initialize_info_keymaps ()
/* Initialize the keymaps from the .info keymap file. */
-#define NUL '\0'
+#define NUL '\0'
static unsigned char default_emacs_like_info_keys[] =
{
- 0, /* suppress-default-keybindings flag */
- TAB, NUL, A_info_move_to_next_xref,
- LFD, NUL, A_info_select_reference_this_line,
- RET, NUL, A_info_select_reference_this_line,
- SPC, NUL, A_info_scroll_forward,
- CONTROL('a'), NUL, A_info_beginning_of_line,
- CONTROL('b'), NUL, A_info_backward_char,
- CONTROL('e'), NUL, A_info_end_of_line,
- CONTROL('f'), NUL, A_info_forward_char,
- CONTROL('g'), NUL, A_info_abort_key,
- CONTROL('h'), NUL, A_info_get_help_window,
- CONTROL('l'), NUL, A_info_redraw_display,
- CONTROL('n'), NUL, A_info_next_line,
- CONTROL('p'), NUL, A_info_prev_line,
- CONTROL('r'), NUL, A_isearch_backward,
- CONTROL('s'), NUL, A_isearch_forward,
- CONTROL('u'), NUL, A_info_universal_argument,
- CONTROL('v'), NUL, A_info_scroll_forward_page_only,
- ',', NUL, A_info_next_index_match,
- '/', NUL, A_info_search,
- '0', NUL, A_info_last_menu_item,
- '1', NUL, A_info_menu_digit,
- '2', NUL, A_info_menu_digit,
- '3', NUL, A_info_menu_digit,
- '4', NUL, A_info_menu_digit,
- '5', NUL, A_info_menu_digit,
- '6', NUL, A_info_menu_digit,
- '7', NUL, A_info_menu_digit,
- '8', NUL, A_info_menu_digit,
- '9', NUL, A_info_menu_digit,
- '<', NUL, A_info_first_node,
- '>', NUL, A_info_last_node,
- '?', NUL, A_info_get_help_window,
- '[', NUL, A_info_global_prev_node,
- ']', NUL, A_info_global_next_node,
- 'b', NUL, A_info_beginning_of_node,
- 'd', NUL, A_info_dir_node,
- 'e', NUL, A_info_end_of_node,
- 'f', NUL, A_info_xref_item,
- 'g', NUL, A_info_goto_node,
- 'G', NUL, A_info_menu_sequence,
- 'h', NUL, A_info_get_info_help_node,
- 'i', NUL, A_info_index_search,
- 'l', NUL, A_info_history_node,
- 'm', NUL, A_info_menu_item,
- 'n', NUL, A_info_next_node,
- 'O', NUL, A_info_goto_invocation_node,
- 'p', NUL, A_info_prev_node,
- 'q', NUL, A_info_quit,
- 'r', NUL, A_info_xref_item,
- 's', NUL, A_info_search,
- 'S', NUL, A_info_search_case_sensitively,
- 't', NUL, A_info_top_node,
- 'u', NUL, A_info_up_node,
- DEL, NUL, A_info_scroll_backward,
- ESC, '0', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '1', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '2', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '3', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '4', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '5', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '6', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '7', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '8', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '9', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '-', NUL, A_info_add_digit_to_numeric_arg,
- ESC, CONTROL('f'), NUL, A_info_show_footnotes,
- ESC, CONTROL('g'), NUL, A_info_abort_key,
- ESC, TAB, NUL, A_info_move_to_prev_xref,
- ESC, CONTROL('v'), NUL, A_info_scroll_other_window,
- ESC, '<', NUL, A_info_beginning_of_node,
- ESC, '>', NUL, A_info_end_of_node,
- ESC, 'b', NUL, A_info_backward_word,
- ESC, 'f', NUL, A_info_forward_word,
- ESC, 'r', NUL, A_info_move_to_window_line,
- ESC, 'v', NUL, A_info_scroll_backward_page_only,
- Meta('0'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('1'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('2'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('3'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('4'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('5'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('6'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('7'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('8'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('9'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('-'), NUL, A_info_add_digit_to_numeric_arg,
- Meta(CONTROL('f')), NUL, A_info_show_footnotes,
- Meta(CONTROL('g')), NUL, A_info_abort_key,
- Meta(TAB), NUL, A_info_move_to_prev_xref,
- Meta(CONTROL('v')), NUL, A_info_scroll_other_window,
- Meta('<'), NUL, A_info_beginning_of_node,
- Meta('>'), NUL, A_info_end_of_node,
- Meta('b'), NUL, A_info_backward_word,
- Meta('f'), NUL, A_info_forward_word,
- Meta('r'), NUL, A_info_move_to_window_line,
- Meta('v'), NUL, A_info_scroll_backward_page_only,
+ 0, /* suppress-default-keybindings flag */
+ TAB, NUL, A_info_move_to_next_xref,
+ LFD, NUL, A_info_select_reference_this_line,
+ RET, NUL, A_info_select_reference_this_line,
+ CONTROL('a'), NUL, A_info_beginning_of_line,
+ CONTROL('b'), NUL, A_info_backward_char,
+ CONTROL('e'), NUL, A_info_end_of_line,
+ CONTROL('f'), NUL, A_info_forward_char,
+ CONTROL('h'), NUL, A_info_get_help_window,
+ CONTROL('l'), NUL, A_info_redraw_display,
+ CONTROL('n'), NUL, A_info_next_line,
+ CONTROL('p'), NUL, A_info_prev_line,
+ CONTROL('r'), NUL, A_isearch_backward,
+ CONTROL('s'), NUL, A_isearch_forward,
+ CONTROL('u'), NUL, A_info_universal_argument,
+ CONTROL('v'), NUL, A_info_scroll_forward_page_only,
+ ',', NUL, A_info_next_index_match,
+ '/', NUL, A_info_search,
+ '0', NUL, A_info_last_menu_item,
+ '1', NUL, A_info_menu_digit,
+ '2', NUL, A_info_menu_digit,
+ '3', NUL, A_info_menu_digit,
+ '4', NUL, A_info_menu_digit,
+ '5', NUL, A_info_menu_digit,
+ '6', NUL, A_info_menu_digit,
+ '7', NUL, A_info_menu_digit,
+ '8', NUL, A_info_menu_digit,
+ '9', NUL, A_info_menu_digit,
+ '<', NUL, A_info_first_node,
+ '>', NUL, A_info_last_node,
+ '?', NUL, A_info_get_help_window,
+ '[', NUL, A_info_global_prev_node,
+ ']', NUL, A_info_global_next_node,
+ 'b', NUL, A_info_beginning_of_node,
+ 'd', NUL, A_info_dir_node,
+ 'e', NUL, A_info_end_of_node,
+ 'f', NUL, A_info_xref_item,
+ 'g', NUL, A_info_goto_node,
+ 'G', NUL, A_info_menu_sequence,
+ 'h', NUL, A_info_get_help_window,
+ 'H', NUL, A_info_get_info_help_node,
+ 'i', NUL, A_info_index_search,
+ 'l', NUL, A_info_history_node,
+ 'm', NUL, A_info_menu_item,
+ 'n', NUL, A_info_next_node,
+ 'O', NUL, A_info_goto_invocation_node,
+ 'p', NUL, A_info_prev_node,
+ 'r', NUL, A_info_xref_item,
+ 'R', NUL, A_info_toggle_regexp,
+ 's', NUL, A_info_search,
+ 'S', NUL, A_info_search_case_sensitively,
+ 't', NUL, A_info_top_node,
+ 'u', NUL, A_info_up_node,
+ ESC, '0', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '1', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '2', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '3', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '4', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '5', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '6', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '7', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '8', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '9', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '-', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, CONTROL('f'), NUL, A_info_show_footnotes,
+ ESC, CONTROL('g'), NUL, A_info_abort_key,
+ ESC, TAB, NUL, A_info_move_to_prev_xref,
+ ESC, CONTROL('v'), NUL, A_info_scroll_other_window,
+ ESC, '<', NUL, A_info_beginning_of_node,
+ ESC, '>', NUL, A_info_end_of_node,
+ ESC, 'b', NUL, A_info_backward_word,
+ ESC, 'f', NUL, A_info_forward_word,
+ ESC, 'r', NUL, A_info_move_to_window_line,
+ ESC, 'v', NUL, A_info_scroll_backward_page_only,
+ Meta('0'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('1'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('2'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('3'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('4'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('5'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('6'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('7'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('8'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('9'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('-'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta(CONTROL('f')), NUL, A_info_show_footnotes,
+ Meta(CONTROL('g')), NUL, A_info_abort_key,
+ Meta(TAB), NUL, A_info_move_to_prev_xref,
+ Meta(CONTROL('v')), NUL, A_info_scroll_other_window,
+ Meta('<'), NUL, A_info_beginning_of_node,
+ Meta('>'), NUL, A_info_end_of_node,
+ Meta('b'), NUL, A_info_backward_word,
+ Meta('f'), NUL, A_info_forward_word,
+ Meta('r'), NUL, A_info_move_to_window_line,
+ Meta('v'), NUL, A_info_scroll_backward_page_only,
#if defined (NAMED_FUNCTIONS)
- ESC, 'x', NUL, A_info_execute_command,
- Meta('x'), NUL, A_info_execute_command,
+ ESC, 'x', NUL, A_info_execute_command,
+ Meta('x'), NUL, A_info_execute_command,
#endif /* NAMED_FUNCTIONS */
- CONTROL('x'), CONTROL('b'), NUL, A_list_visited_nodes,
- CONTROL('x'), CONTROL('c'), NUL, A_info_quit,
- CONTROL('x'), CONTROL('f'), NUL, A_info_view_file,
- CONTROL('x'), CONTROL('g'), NUL, A_info_abort_key,
- CONTROL('x'), CONTROL('v'), NUL, A_info_view_file,
- CONTROL('x'), '0', NUL, A_info_delete_window,
- CONTROL('x'), '1', NUL, A_info_keep_one_window,
- CONTROL('x'), '2', NUL, A_info_split_window,
- CONTROL('x'), '^', NUL, A_info_grow_window,
- CONTROL('x'), 'b', NUL, A_select_visited_node,
- CONTROL('x'), 'k', NUL, A_info_kill_node,
- CONTROL('x'), 'n', NUL, A_info_search_next,
- CONTROL('x'), 'N', NUL, A_info_search_previous,
- CONTROL('x'), 'o', NUL, A_info_next_window,
- CONTROL('x'), 't', NUL, A_info_tile_windows,
- CONTROL('x'), 'w', NUL, A_info_toggle_wrap,
-
-/* Arrow key bindings for info keymaps. It seems that some
- terminals do not match their termcap entries, so it's best to just
- define everything with both of the usual prefixes. */
-
- SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_backward_page_only,
- SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_forward_page_only,
- SK_ESCAPE, SK_UP_ARROW, NUL, A_info_prev_line,
- '\033', 'O', 'A', NUL, A_info_prev_line,
- '\033', '[', 'A', NUL, A_info_prev_line,
- SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_next_line,
- '\033', 'O', 'B', NUL, A_info_next_line,
- '\033', '[', 'B', NUL, A_info_next_line,
- SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_forward_char,
- '\033', 'O', 'C', NUL, A_info_forward_char,
- '\033', '[', 'C', NUL, A_info_forward_char,
- SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_backward_char,
- '\033', 'O', 'D', NUL, A_info_backward_char,
- '\033', '[', 'D', NUL, A_info_backward_char,
- SK_ESCAPE, SK_HOME, NUL, A_info_beginning_of_node,
- SK_ESCAPE, SK_END, NUL, A_info_end_of_node,
- SK_ESCAPE, SK_DELETE, NUL, A_info_scroll_backward,
-
- ESC, SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_other_window_backward,
- ESC, SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_other_window,
- ESC, SK_ESCAPE, SK_UP_ARROW, NUL, A_info_prev_line,
- ESC, '\033', 'O', 'A', NUL, A_info_prev_line,
- ESC, '\033', '[', 'A', NUL, A_info_prev_line,
- ESC, SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_next_line,
- ESC, '\033', 'O', 'B', NUL, A_info_next_line,
- ESC, '\033', '[', 'B', NUL, A_info_next_line,
- ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_forward_word,
- ESC, '\033', 'O', 'C', NUL, A_info_forward_word,
- ESC, '\033', '[', 'C', NUL, A_info_forward_word,
- ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_backward_word,
- ESC, '\033', 'O', 'D', NUL, A_info_backward_word,
- ESC, '\033', '[', 'D', NUL, A_info_backward_word,
+ CONTROL('x'), CONTROL('b'), NUL, A_list_visited_nodes,
+ CONTROL('x'), CONTROL('c'), NUL, A_info_quit,
+ CONTROL('x'), CONTROL('f'), NUL, A_info_view_file,
+ CONTROL('x'), CONTROL('g'), NUL, A_info_abort_key,
+ CONTROL('x'), CONTROL('v'), NUL, A_info_view_file,
+ CONTROL('x'), '0', NUL, A_info_delete_window,
+ CONTROL('x'), '1', NUL, A_info_keep_one_window,
+ CONTROL('x'), '2', NUL, A_info_split_window,
+ CONTROL('x'), '^', NUL, A_info_grow_window,
+ CONTROL('x'), 'b', NUL, A_select_visited_node,
+ CONTROL('x'), 'k', NUL, A_info_kill_node,
+ CONTROL('x'), 'n', NUL, A_info_search_next,
+ CONTROL('x'), 'N', NUL, A_info_search_previous,
+ CONTROL('x'), 'o', NUL, A_info_next_window,
+ CONTROL('x'), 't', NUL, A_info_tile_windows,
+ CONTROL('x'), 'w', NUL, A_info_toggle_wrap,
+
+/* Arrow key bindings for info keymaps. It seems that some
+ terminals do not match their termcap entries, so it's best to just
+ define everything with both of the usual prefixes. */
+
+ SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_backward,
+ SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_forward,
+ '\033', 'O', 'A', NUL, A_info_prev_line,
+ '\033', '[', 'A', NUL, A_info_prev_line,
+ '\033', 'O', 'B', NUL, A_info_next_line,
+ '\033', '[', 'B', NUL, A_info_next_line,
+ SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_forward_char,
+ '\033', 'O', 'C', NUL, A_info_forward_char,
+ '\033', '[', 'C', NUL, A_info_forward_char,
+ SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_backward_char,
+ '\033', 'O', 'D', NUL, A_info_backward_char,
+ '\033', '[', 'D', NUL, A_info_backward_char,
+ SK_ESCAPE, SK_HOME, NUL, A_info_beginning_of_node,
+ SK_ESCAPE, SK_END, NUL, A_info_end_of_node,
+ SK_ESCAPE, SK_DELETE, NUL, A_info_scroll_backward,
+
+ ESC, SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_other_window_backward,
+ ESC, SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_other_window,
+ ESC, SK_ESCAPE, SK_UP_ARROW, NUL, A_info_prev_line,
+ ESC, '\033', 'O', 'A', NUL, A_info_prev_line,
+ ESC, '\033', '[', 'A', NUL, A_info_prev_line,
+ ESC, SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_next_line,
+ ESC, '\033', 'O', 'B', NUL, A_info_next_line,
+ ESC, '\033', '[', 'B', NUL, A_info_next_line,
+ ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_forward_word,
+ ESC, '\033', 'O', 'C', NUL, A_info_forward_word,
+ ESC, '\033', '[', 'C', NUL, A_info_forward_word,
+ ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_backward_word,
+ ESC, '\033', 'O', 'D', NUL, A_info_backward_word,
+ ESC, '\033', '[', 'D', NUL, A_info_backward_word,
+
+ /* We want help to report q, not C-x C-c, etc. */
+ 'q', NUL, A_info_quit,
+ 'x', NUL, A_info_delete_window,
+ SPC, NUL, A_info_scroll_forward,
+ DEL, NUL, A_info_scroll_backward,
+ '{', NUL, A_info_search_previous,
+ '}', NUL, A_info_search_next,
+ CONTROL('g'), NUL, A_info_abort_key,
+ SK_ESCAPE, SK_UP_ARROW, NUL, A_info_prev_line,
+ SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_next_line,
};
+
static unsigned char default_emacs_like_ea_keys[] =
{
- 0, /* suppress-default-keybindings flag */
- ESC, '0', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '1', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '2', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '3', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '4', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '5', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '6', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '7', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '8', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '9', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '-', NUL, A_info_add_digit_to_numeric_arg,
- Meta('0'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('1'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('2'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('3'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('4'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('5'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('6'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('7'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('8'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('9'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('-'), NUL, A_info_add_digit_to_numeric_arg,
- ESC, CONTROL('g'), NUL, A_ea_abort,
- ESC, CONTROL('v'), NUL, A_ea_scroll_completions_window,
- ESC, 'b', NUL, A_ea_backward_word,
- ESC, 'd', NUL, A_ea_kill_word,
- ESC, 'f', NUL, A_ea_forward_word,
- ESC, 'y', NUL, A_ea_yank_pop,
- ESC, '?', NUL, A_ea_possible_completions,
- ESC, TAB, NUL, A_ea_tab_insert,
- ESC, DEL, NUL, A_ea_backward_kill_word,
- Meta(CONTROL('g')), NUL, A_ea_abort,
- Meta(CONTROL('v')), NUL, A_ea_scroll_completions_window,
- Meta('b'), NUL, A_ea_backward_word,
- Meta('d'), NUL, A_ea_kill_word,
- Meta('f'), NUL, A_ea_forward_word,
- Meta('y'), NUL, A_ea_yank_pop,
- Meta('?'), NUL, A_ea_possible_completions,
- Meta(TAB), NUL, A_ea_tab_insert,
- Meta(DEL), NUL, A_ea_backward_kill_word,
- CONTROL('a'), NUL, A_ea_beg_of_line,
- CONTROL('b'), NUL, A_ea_backward,
- CONTROL('d'), NUL, A_ea_delete,
- CONTROL('e'), NUL, A_ea_end_of_line,
- CONTROL('f'), NUL, A_ea_forward,
- CONTROL('g'), NUL, A_ea_abort,
- CONTROL('h'), NUL, A_ea_rubout,
-/* CONTROL('k') */
- SK_ESCAPE, SK_LITERAL, NUL, A_ea_kill_line,
- CONTROL('l'), NUL, A_info_redraw_display,
- CONTROL('q'), NUL, A_ea_quoted_insert,
- CONTROL('t'), NUL, A_ea_transpose_chars,
- CONTROL('u'), NUL, A_info_universal_argument,
- CONTROL('y'), NUL, A_ea_yank,
- LFD, NUL, A_ea_newline,
- RET, NUL, A_ea_newline,
- SPC, NUL, A_ea_complete,
- TAB, NUL, A_ea_complete,
- '?', NUL, A_ea_possible_completions,
+ 0, /* suppress-default-keybindings flag */
+ ESC, '0', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '1', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '2', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '3', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '4', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '5', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '6', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '7', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '8', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '9', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '-', NUL, A_info_add_digit_to_numeric_arg,
+ Meta('0'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('1'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('2'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('3'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('4'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('5'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('6'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('7'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('8'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('9'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('-'), NUL, A_info_add_digit_to_numeric_arg,
+ ESC, CONTROL('g'), NUL, A_ea_abort,
+ ESC, CONTROL('v'), NUL, A_ea_scroll_completions_window,
+ ESC, 'b', NUL, A_ea_backward_word,
+ ESC, 'd', NUL, A_ea_kill_word,
+ ESC, 'f', NUL, A_ea_forward_word,
+ ESC, 'y', NUL, A_ea_yank_pop,
+ ESC, '?', NUL, A_ea_possible_completions,
+ ESC, TAB, NUL, A_ea_tab_insert,
+ ESC, DEL, NUL, A_ea_backward_kill_word,
+ Meta(CONTROL('g')), NUL, A_ea_abort,
+ Meta(CONTROL('v')), NUL, A_ea_scroll_completions_window,
+ Meta('b'), NUL, A_ea_backward_word,
+ Meta('d'), NUL, A_ea_kill_word,
+ Meta('f'), NUL, A_ea_forward_word,
+ Meta('y'), NUL, A_ea_yank_pop,
+ Meta('?'), NUL, A_ea_possible_completions,
+ Meta(TAB), NUL, A_ea_tab_insert,
+ Meta(DEL), NUL, A_ea_backward_kill_word,
+ CONTROL('a'), NUL, A_ea_beg_of_line,
+ CONTROL('b'), NUL, A_ea_backward,
+ CONTROL('d'), NUL, A_ea_delete,
+ CONTROL('e'), NUL, A_ea_end_of_line,
+ CONTROL('f'), NUL, A_ea_forward,
+ CONTROL('g'), NUL, A_ea_abort,
+ CONTROL('h'), NUL, A_ea_rubout,
+/* CONTROL('k') */
+ SK_ESCAPE, SK_LITERAL, NUL, A_ea_kill_line,
+ CONTROL('l'), NUL, A_info_redraw_display,
+ CONTROL('q'), NUL, A_ea_quoted_insert,
+ CONTROL('t'), NUL, A_ea_transpose_chars,
+ CONTROL('u'), NUL, A_info_universal_argument,
+ CONTROL('y'), NUL, A_ea_yank,
+ LFD, NUL, A_ea_newline,
+ RET, NUL, A_ea_newline,
+ SPC, NUL, A_ea_complete,
+ TAB, NUL, A_ea_complete,
+ '?', NUL, A_ea_possible_completions,
#ifdef __MSDOS__
/* PC users will lynch me if I don't give them their usual DEL
- effect... */
- DEL, NUL, A_ea_delete,
+ effect... */
+ DEL, NUL, A_ea_delete,
#else
- DEL, NUL, A_ea_rubout,
+ DEL, NUL, A_ea_rubout,
#endif
#if defined (NAMED_FUNCTIONS)
- /* ESC, 'x', NUL, A_info_execute_command, */
- /* Meta('x'), NUL, A_info_execute_command, */
+ /* ESC, 'x', NUL, A_info_execute_command, */
+ /* Meta('x'), NUL, A_info_execute_command, */
#endif /* NAMED_FUNCTIONS */
- CONTROL('x'), 'o', NUL, A_info_next_window,
- CONTROL('x'), DEL, NUL, A_ea_backward_kill_line,
-
-/* Arrow key bindings for echo area keymaps. It seems that some
- terminals do not match their termcap entries, so it's best to just
- define everything with both of the usual prefixes. */
-
- SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward,
- '\033', 'O', 'C', NUL, A_ea_forward,
- '\033', '[', 'C', NUL, A_ea_forward,
- SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward,
- '\033', 'O', 'D', NUL, A_ea_backward,
- '\033', '[', 'D', NUL, A_ea_backward,
- ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward_word,
- ESC, '\033', 'O', 'C', NUL, A_ea_forward_word,
- ESC, '\033', '[', 'C', NUL, A_ea_forward_word,
- ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward_word,
- ESC, '\033', 'O', 'D', NUL, A_ea_backward_word,
- ESC, '\033', '[', 'D', NUL, A_ea_backward_word,
+ CONTROL('x'), 'o', NUL, A_info_next_window,
+ CONTROL('x'), DEL, NUL, A_ea_backward_kill_line,
+
+/* Arrow key bindings for echo area keymaps. It seems that some
+ terminals do not match their termcap entries, so it's best to just
+ define everything with both of the usual prefixes. */
+
+ SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward,
+ '\033', 'O', 'C', NUL, A_ea_forward,
+ '\033', '[', 'C', NUL, A_ea_forward,
+ SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward,
+ '\033', 'O', 'D', NUL, A_ea_backward,
+ '\033', '[', 'D', NUL, A_ea_backward,
+ ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward_word,
+ ESC, '\033', 'O', 'C', NUL, A_ea_forward_word,
+ ESC, '\033', '[', 'C', NUL, A_ea_forward_word,
+ ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward_word,
+ ESC, '\033', 'O', 'D', NUL, A_ea_backward_word,
+ ESC, '\033', '[', 'D', NUL, A_ea_backward_word,
#ifdef __MSDOS__
- SK_ESCAPE, SK_DELETE, NUL, A_ea_delete,
+ SK_ESCAPE, SK_DELETE, NUL, A_ea_delete,
#else
- SK_ESCAPE, SK_DELETE, NUL, A_ea_rubout,
+ SK_ESCAPE, SK_DELETE, NUL, A_ea_rubout,
#endif
- SK_ESCAPE, SK_HOME, NUL, A_ea_beg_of_line,
- SK_ESCAPE, SK_END, NUL, A_ea_end_of_line,
- ESC, SK_ESCAPE, SK_DELETE, NUL, A_ea_backward_kill_word,
- CONTROL('x'), SK_ESCAPE, SK_DELETE, NUL,A_ea_backward_kill_line,
+ SK_ESCAPE, SK_HOME, NUL, A_ea_beg_of_line,
+ SK_ESCAPE, SK_END, NUL, A_ea_end_of_line,
+ ESC, SK_ESCAPE, SK_DELETE, NUL, A_ea_backward_kill_word,
+ CONTROL('x'), SK_ESCAPE, SK_DELETE, NUL,A_ea_backward_kill_line,
};
+
static unsigned char default_vi_like_info_keys[] =
{
- 0, /* suppress-default-keybindings flag */
- '0', NUL, A_info_add_digit_to_numeric_arg,
- '1', NUL, A_info_add_digit_to_numeric_arg,
- '2', NUL, A_info_add_digit_to_numeric_arg,
- '3', NUL, A_info_add_digit_to_numeric_arg,
- '4', NUL, A_info_add_digit_to_numeric_arg,
- '5', NUL, A_info_add_digit_to_numeric_arg,
- '6', NUL, A_info_add_digit_to_numeric_arg,
- '7', NUL, A_info_add_digit_to_numeric_arg,
- '8', NUL, A_info_add_digit_to_numeric_arg,
- '9', NUL, A_info_add_digit_to_numeric_arg,
- '-', NUL, A_info_add_digit_to_numeric_arg,
- TAB, NUL, A_info_move_to_next_xref,
- LFD, NUL, A_info_down_line,
- RET, NUL, A_info_down_line,
- SPC, NUL, A_info_scroll_forward,
- CONTROL('a'), NUL, A_info_beginning_of_line,
- CONTROL('b'), NUL, A_info_scroll_backward_page_only,
- CONTROL('d'), NUL, A_info_scroll_half_screen_down,
- CONTROL('e'), NUL, A_info_down_line,
- CONTROL('f'), NUL, A_info_scroll_forward_page_only,
- CONTROL('g'), NUL, A_info_abort_key,
- CONTROL('k'), NUL, A_info_up_line,
- CONTROL('l'), NUL, A_info_redraw_display,
- CONTROL('n'), NUL, A_info_down_line,
- CONTROL('p'), NUL, A_info_up_line,
- CONTROL('r'), NUL, A_info_redraw_display,
- CONTROL('s'), NUL, A_isearch_forward,
- CONTROL('u'), NUL, A_info_scroll_half_screen_up,
- CONTROL('v'), NUL, A_info_scroll_forward_page_only,
- CONTROL('y'), NUL, A_info_up_line,
- ',', NUL, A_info_next_index_match,
- '/', NUL, A_info_search,
- ESC, '0', NUL, A_info_last_menu_item,
- ESC, '1', NUL, A_info_menu_digit,
- ESC, '2', NUL, A_info_menu_digit,
- ESC, '3', NUL, A_info_menu_digit,
- ESC, '4', NUL, A_info_menu_digit,
- ESC, '5', NUL, A_info_menu_digit,
- ESC, '6', NUL, A_info_menu_digit,
- ESC, '7', NUL, A_info_menu_digit,
- ESC, '8', NUL, A_info_menu_digit,
- ESC, '9', NUL, A_info_menu_digit,
- Meta('0'), NUL, A_info_last_menu_item,
- Meta('1'), NUL, A_info_menu_digit,
- Meta('2'), NUL, A_info_menu_digit,
- Meta('3'), NUL, A_info_menu_digit,
- Meta('4'), NUL, A_info_menu_digit,
- Meta('5'), NUL, A_info_menu_digit,
- Meta('6'), NUL, A_info_menu_digit,
- Meta('7'), NUL, A_info_menu_digit,
- Meta('8'), NUL, A_info_menu_digit,
- Meta('9'), NUL, A_info_menu_digit,
- '<', NUL, A_info_first_node,
- '>', NUL, A_info_last_node,
- '?', NUL, A_info_search_backward,
- '[', NUL, A_info_global_prev_node,
- ']', NUL, A_info_global_next_node,
- '\'', NUL, A_info_history_node,
- 'b', NUL, A_info_scroll_backward,
- 'd', NUL, A_info_scroll_half_screen_down,
- 'e', NUL, A_info_down_line,
- 'E', NUL, A_info_view_file,
- ':', 'e', NUL, A_info_view_file,
- 'f', NUL, A_info_scroll_forward_page_only,
- 'F', NUL, A_info_scroll_forward_page_only,
- 'g', NUL, A_info_first_node,
- 'G', NUL, A_info_last_node,
- 'h', NUL, A_info_get_help_window,
- 'H', NUL, A_info_get_help_window,
- 'i', NUL, A_info_index_search,
- 'I', NUL, A_info_goto_invocation_node,
- 'j', NUL, A_info_next_line,
- 'k', NUL, A_info_prev_line,
- 'l', NUL, A_info_history_node,
- 'm', NUL, A_info_menu_item,
- 'n', NUL, A_info_search_next,
- 'N', NUL, A_info_search_previous,
- 'O', NUL, A_info_goto_invocation_node,
- 'p', NUL, A_info_prev_node,
- 'q', NUL, A_info_quit,
- 'Q', NUL, A_info_quit,
- ':', 'q', NUL, A_info_quit,
- ':', 'Q', NUL, A_info_quit,
- 'Z', 'Z', NUL, A_info_quit,
- 'r', NUL, A_info_redraw_display,
- 'R', NUL, A_info_redraw_display,
- 's', NUL, A_info_search,
- 'S', NUL, A_info_search_case_sensitively,
- 't', NUL, A_info_top_node,
- 'u', NUL, A_info_scroll_half_screen_up,
- 'w', NUL, A_info_scroll_backward_page_only_set_window,
- 'y', NUL, A_info_up_line,
- 'z', NUL, A_info_scroll_forward_page_only_set_window,
- DEL, NUL, A_info_scroll_backward,
- ESC, CONTROL('f'), NUL, A_info_show_footnotes,
- ESC, CONTROL('g'), NUL, A_info_abort_key,
- ESC, TAB, NUL, A_info_move_to_prev_xref,
- ESC, SPC, NUL, A_info_scroll_forward_page_only,
- ESC, CONTROL('v'), NUL, A_info_scroll_other_window,
- ESC, '<', NUL, A_info_beginning_of_node,
- ESC, '>', NUL, A_info_end_of_node,
- ESC, '/', NUL, A_info_search,
- ESC, '?', NUL, A_info_search_backward,
- ESC, 'b', NUL, A_info_beginning_of_node,
- ESC, 'd', NUL, A_info_dir_node,
- ESC, 'e', NUL, A_info_end_of_node,
- ESC, 'f', NUL, A_info_xref_item,
- ESC, 'g', NUL, A_info_select_reference_this_line,
- ESC, 'h', NUL, A_info_get_info_help_node,
- ESC, 'm', NUL, A_info_menu_item,
- ESC, 'n', NUL, A_info_search,
- ESC, 'N', NUL, A_info_search_backward,
- ESC, 'r', NUL, A_isearch_backward,
- ESC, 's', NUL, A_isearch_forward,
- ESC, 't', NUL, A_info_top_node,
- ESC, 'v', NUL, A_info_scroll_backward_page_only,
+ 0, /* suppress-default-keybindings flag */
+ '0', NUL, A_info_add_digit_to_numeric_arg,
+ '1', NUL, A_info_add_digit_to_numeric_arg,
+ '2', NUL, A_info_add_digit_to_numeric_arg,
+ '3', NUL, A_info_add_digit_to_numeric_arg,
+ '4', NUL, A_info_add_digit_to_numeric_arg,
+ '5', NUL, A_info_add_digit_to_numeric_arg,
+ '6', NUL, A_info_add_digit_to_numeric_arg,
+ '7', NUL, A_info_add_digit_to_numeric_arg,
+ '8', NUL, A_info_add_digit_to_numeric_arg,
+ '9', NUL, A_info_add_digit_to_numeric_arg,
+ '-', NUL, A_info_add_digit_to_numeric_arg,
+ TAB, NUL, A_info_move_to_next_xref,
+ LFD, NUL, A_info_down_line,
+ RET, NUL, A_info_down_line,
+ CONTROL('a'), NUL, A_info_beginning_of_line,
+ CONTROL('b'), NUL, A_info_scroll_backward_page_only,
+ CONTROL('d'), NUL, A_info_scroll_half_screen_down,
+ CONTROL('e'), NUL, A_info_down_line,
+ CONTROL('f'), NUL, A_info_scroll_forward_page_only,
+ CONTROL('k'), NUL, A_info_up_line,
+ CONTROL('l'), NUL, A_info_redraw_display,
+ CONTROL('n'), NUL, A_info_down_line,
+ CONTROL('p'), NUL, A_info_up_line,
+ CONTROL('r'), NUL, A_info_redraw_display,
+ CONTROL('s'), NUL, A_isearch_forward,
+ CONTROL('u'), NUL, A_info_scroll_half_screen_up,
+ CONTROL('v'), NUL, A_info_scroll_forward_page_only,
+ CONTROL('y'), NUL, A_info_up_line,
+ ',', NUL, A_info_next_index_match,
+ '/', NUL, A_info_search,
+ ESC, '0', NUL, A_info_last_menu_item,
+ ESC, '1', NUL, A_info_menu_digit,
+ ESC, '2', NUL, A_info_menu_digit,
+ ESC, '3', NUL, A_info_menu_digit,
+ ESC, '4', NUL, A_info_menu_digit,
+ ESC, '5', NUL, A_info_menu_digit,
+ ESC, '6', NUL, A_info_menu_digit,
+ ESC, '7', NUL, A_info_menu_digit,
+ ESC, '8', NUL, A_info_menu_digit,
+ ESC, '9', NUL, A_info_menu_digit,
+ Meta('0'), NUL, A_info_last_menu_item,
+ Meta('1'), NUL, A_info_menu_digit,
+ Meta('2'), NUL, A_info_menu_digit,
+ Meta('3'), NUL, A_info_menu_digit,
+ Meta('4'), NUL, A_info_menu_digit,
+ Meta('5'), NUL, A_info_menu_digit,
+ Meta('6'), NUL, A_info_menu_digit,
+ Meta('7'), NUL, A_info_menu_digit,
+ Meta('8'), NUL, A_info_menu_digit,
+ Meta('9'), NUL, A_info_menu_digit,
+ '<', NUL, A_info_first_node,
+ '>', NUL, A_info_last_node,
+ '?', NUL, A_info_search_backward,
+ '[', NUL, A_info_global_prev_node,
+ ']', NUL, A_info_global_next_node,
+ '\'', NUL, A_info_history_node,
+ 'b', NUL, A_info_scroll_backward,
+ 'd', NUL, A_info_scroll_half_screen_down,
+ 'e', NUL, A_info_down_line,
+ 'E', NUL, A_info_view_file,
+ ':', 'e', NUL, A_info_view_file,
+ 'f', NUL, A_info_scroll_forward_page_only,
+ 'F', NUL, A_info_scroll_forward_page_only,
+ 'g', NUL, A_info_first_node,
+ 'G', NUL, A_info_last_node,
+ 'h', NUL, A_info_get_help_window,
+ 'H', NUL, A_info_get_help_window,
+ 'i', NUL, A_info_index_search,
+ 'I', NUL, A_info_goto_invocation_node,
+ 'j', NUL, A_info_next_line,
+ 'k', NUL, A_info_prev_line,
+ 'l', NUL, A_info_history_node,
+ 'm', NUL, A_info_menu_item,
+ 'n', NUL, A_info_search_next,
+ 'N', NUL, A_info_search_previous,
+ 'O', NUL, A_info_goto_invocation_node,
+ 'p', NUL, A_info_prev_node,
+ 'Q', NUL, A_info_quit,
+ ':', 'q', NUL, A_info_quit,
+ ':', 'Q', NUL, A_info_quit,
+ 'Z', 'Z', NUL, A_info_quit,
+ 'r', NUL, A_info_redraw_display,
+ 'R', NUL, A_info_toggle_regexp,
+ 's', NUL, A_info_search,
+ 'S', NUL, A_info_search_case_sensitively,
+ 't', NUL, A_info_top_node,
+ 'u', NUL, A_info_scroll_half_screen_up,
+ 'w', NUL, A_info_scroll_backward_page_only_set_window,
+ 'y', NUL, A_info_up_line,
+ 'z', NUL, A_info_scroll_forward_page_only_set_window,
+ ESC, CONTROL('f'), NUL, A_info_show_footnotes,
+ ESC, CONTROL('g'), NUL, A_info_abort_key,
+ ESC, TAB, NUL, A_info_move_to_prev_xref,
+ ESC, SPC, NUL, A_info_scroll_forward_page_only,
+ ESC, CONTROL('v'), NUL, A_info_scroll_other_window,
+ ESC, '<', NUL, A_info_beginning_of_node,
+ ESC, '>', NUL, A_info_end_of_node,
+ ESC, '/', NUL, A_info_search,
+ ESC, '?', NUL, A_info_search_backward,
+ ESC, 'b', NUL, A_info_beginning_of_node,
+ ESC, 'd', NUL, A_info_dir_node,
+ ESC, 'e', NUL, A_info_end_of_node,
+ ESC, 'f', NUL, A_info_xref_item,
+ ESC, 'g', NUL, A_info_select_reference_this_line,
+ ESC, 'h', NUL, A_info_get_info_help_node,
+ ESC, 'm', NUL, A_info_menu_item,
+ ESC, 'n', NUL, A_info_search,
+ ESC, 'N', NUL, A_info_search_backward,
+ ESC, 'r', NUL, A_isearch_backward,
+ ESC, 's', NUL, A_isearch_forward,
+ ESC, 't', NUL, A_info_top_node,
+ ESC, 'v', NUL, A_info_scroll_backward_page_only,
#if defined (NAMED_FUNCTIONS)
- ESC, 'x', NUL, A_info_execute_command,
- Meta('x'), NUL, A_info_execute_command,
+ ESC, 'x', NUL, A_info_execute_command,
+ Meta('x'), NUL, A_info_execute_command,
#endif /* NAMED_FUNCTIONS */
- ESC, DEL, NUL, A_info_scroll_other_window_backward,
- CONTROL('x'), CONTROL('b'), NUL, A_list_visited_nodes,
- CONTROL('x'), CONTROL('c'), NUL, A_info_quit,
- CONTROL('x'), CONTROL('f'), NUL, A_info_view_file,
- CONTROL('x'), CONTROL('g'), NUL, A_info_abort_key,
- CONTROL('x'), CONTROL('v'), NUL, A_info_view_file,
- CONTROL('x'), LFD, NUL, A_info_select_reference_this_line,
- CONTROL('x'), RET, NUL, A_info_select_reference_this_line,
- CONTROL('x'), '0', NUL, A_info_delete_window,
- CONTROL('x'), '1', NUL, A_info_keep_one_window,
- CONTROL('x'), '2', NUL, A_info_split_window,
- CONTROL('x'), '^', NUL, A_info_grow_window,
- CONTROL('x'), 'b', NUL, A_select_visited_node,
- CONTROL('x'), 'g', NUL, A_info_goto_node,
- CONTROL('x'), 'i', NUL, A_info_index_search,
- CONTROL('x'), 'I', NUL, A_info_goto_invocation_node,
- CONTROL('x'), 'k', NUL, A_info_kill_node,
- CONTROL('x'), 'n', NUL, A_info_next_node,
- CONTROL('x'), 'o', NUL, A_info_next_window,
- CONTROL('x'), 'O', NUL, A_info_goto_invocation_node,
- CONTROL('x'), 'p', NUL, A_info_prev_node,
- CONTROL('x'), 'r', NUL, A_info_xref_item,
- CONTROL('x'), 't', NUL, A_info_tile_windows,
- CONTROL('x'), 'u', NUL, A_info_up_node,
- CONTROL('x'), 'w', NUL, A_info_toggle_wrap,
- CONTROL('x'), ',', NUL, A_info_next_index_match,
-
-/* Arrow key bindings for info keymaps. It seems that some
- terminals do not match their termcap entries, so it's best to just
- define everything with both of the usual prefixes. */
-
- SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_backward_page_only,
- SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_forward_page_only,
- SK_ESCAPE, SK_UP_ARROW, NUL, A_info_up_line,
- '\033', 'O', 'A', NUL, A_info_up_line,
- '\033', '[', 'A', NUL, A_info_up_line,
- SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_down_line,
- '\033', 'O', 'B', NUL, A_info_down_line,
- '\033', '[', 'B', NUL, A_info_down_line,
- SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_scroll_forward_page_only,
- '\033', 'O', 'C', NUL, A_info_scroll_forward_page_only,
- '\033', '[', 'C', NUL, A_info_scroll_forward_page_only,
- SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_scroll_backward_page_only,
- '\033', 'O', 'D', NUL, A_info_scroll_backward_page_only,
- '\033', '[', 'D', NUL, A_info_scroll_backward_page_only,
- SK_ESCAPE, SK_HOME, NUL, A_info_beginning_of_node,
- SK_ESCAPE, SK_END, NUL, A_info_end_of_node,
- ESC, SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_other_window,
- ESC, SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_other_window_backward,
- ESC, SK_ESCAPE, SK_DELETE, NUL, A_info_scroll_other_window_backward,
- ESC, SK_ESCAPE, SK_UP_ARROW, NUL, A_info_prev_node,
- ESC, '\033', 'O', 'A', NUL, A_info_prev_node,
- ESC, '\033', '[', 'A', NUL, A_info_prev_node,
- ESC, SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_next_node,
- ESC, '\033', 'O', 'B', NUL, A_info_next_node,
- ESC, '\033', '[', 'B', NUL, A_info_next_node,
- ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_xref_item,
- ESC, '\033', 'O', 'C', NUL, A_info_xref_item,
- ESC, '\033', '[', 'C', NUL, A_info_xref_item,
- ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_beginning_of_node,
- ESC, '\033', 'O', 'D', NUL, A_info_beginning_of_node,
- ESC, '\033', '[', 'D', NUL, A_info_beginning_of_node,
- CONTROL('x'), SK_ESCAPE, SK_DELETE, NUL,A_ea_backward_kill_line,
+ ESC, DEL, NUL, A_info_scroll_other_window_backward,
+ CONTROL('x'), CONTROL('b'), NUL, A_list_visited_nodes,
+ CONTROL('x'), CONTROL('c'), NUL, A_info_quit,
+ CONTROL('x'), CONTROL('f'), NUL, A_info_view_file,
+ CONTROL('x'), CONTROL('g'), NUL, A_info_abort_key,
+ CONTROL('x'), CONTROL('v'), NUL, A_info_view_file,
+ CONTROL('x'), LFD, NUL, A_info_select_reference_this_line,
+ CONTROL('x'), RET, NUL, A_info_select_reference_this_line,
+ CONTROL('x'), '0', NUL, A_info_delete_window,
+ CONTROL('x'), '1', NUL, A_info_keep_one_window,
+ CONTROL('x'), '2', NUL, A_info_split_window,
+ CONTROL('x'), '^', NUL, A_info_grow_window,
+ CONTROL('x'), 'b', NUL, A_select_visited_node,
+ CONTROL('x'), 'g', NUL, A_info_goto_node,
+ CONTROL('x'), 'i', NUL, A_info_index_search,
+ CONTROL('x'), 'I', NUL, A_info_goto_invocation_node,
+ CONTROL('x'), 'k', NUL, A_info_kill_node,
+ CONTROL('x'), 'n', NUL, A_info_next_node,
+ CONTROL('x'), 'o', NUL, A_info_next_window,
+ CONTROL('x'), 'O', NUL, A_info_goto_invocation_node,
+ CONTROL('x'), 'p', NUL, A_info_prev_node,
+ CONTROL('x'), 'r', NUL, A_info_xref_item,
+ CONTROL('x'), 't', NUL, A_info_tile_windows,
+ CONTROL('x'), 'u', NUL, A_info_up_node,
+ CONTROL('x'), 'w', NUL, A_info_toggle_wrap,
+ CONTROL('x'), ',', NUL, A_info_next_index_match,
+
+/* Arrow key bindings for info keymaps. It seems that some
+ terminals do not match their termcap entries, so it's best to just
+ define everything with both of the usual prefixes. */
+
+ SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_backward,
+ SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_forward,
+ '\033', 'O', 'A', NUL, A_info_up_line,
+ '\033', '[', 'A', NUL, A_info_up_line,
+ '\033', 'O', 'B', NUL, A_info_down_line,
+ '\033', '[', 'B', NUL, A_info_down_line,
+ SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_scroll_forward_page_only,
+ '\033', 'O', 'C', NUL, A_info_scroll_forward_page_only,
+ '\033', '[', 'C', NUL, A_info_scroll_forward_page_only,
+ SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_scroll_backward_page_only,
+ '\033', 'O', 'D', NUL, A_info_scroll_backward_page_only,
+ '\033', '[', 'D', NUL, A_info_scroll_backward_page_only,
+ SK_ESCAPE, SK_HOME, NUL, A_info_beginning_of_node,
+ SK_ESCAPE, SK_END, NUL, A_info_end_of_node,
+ ESC, SK_ESCAPE, SK_PAGE_DOWN, NUL, A_info_scroll_other_window,
+ ESC, SK_ESCAPE, SK_PAGE_UP, NUL, A_info_scroll_other_window_backward,
+ ESC, SK_ESCAPE, SK_DELETE, NUL, A_info_scroll_other_window_backward,
+ ESC, SK_ESCAPE, SK_UP_ARROW, NUL, A_info_prev_node,
+ ESC, '\033', 'O', 'A', NUL, A_info_prev_node,
+ ESC, '\033', '[', 'A', NUL, A_info_prev_node,
+ ESC, SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_next_node,
+ ESC, '\033', 'O', 'B', NUL, A_info_next_node,
+ ESC, '\033', '[', 'B', NUL, A_info_next_node,
+ ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_info_xref_item,
+ ESC, '\033', 'O', 'C', NUL, A_info_xref_item,
+ ESC, '\033', '[', 'C', NUL, A_info_xref_item,
+ ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_info_beginning_of_node,
+ ESC, '\033', 'O', 'D', NUL, A_info_beginning_of_node,
+ ESC, '\033', '[', 'D', NUL, A_info_beginning_of_node,
+ CONTROL('x'), SK_ESCAPE, SK_DELETE, NUL,A_ea_backward_kill_line,
+
+ /* We want help to report q, not C-x C-c, etc. */
+ 'q', NUL, A_info_quit,
+ 'x', NUL, A_info_delete_window,
+ SPC, NUL, A_info_scroll_forward,
+ DEL, NUL, A_info_scroll_backward,
+ '{', NUL, A_info_search_previous,
+ '}', NUL, A_info_search_next,
+ CONTROL('g'), NUL, A_info_abort_key,
+ SK_ESCAPE, SK_UP_ARROW, NUL, A_info_up_line,
+ SK_ESCAPE, SK_DOWN_ARROW, NUL, A_info_down_line,
};
+
static unsigned char default_vi_like_ea_keys[] =
{
- 0, /* suppress-default-keybindings flag */
- ESC, '1', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '2', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '3', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '4', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '5', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '6', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '7', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '8', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '9', NUL, A_info_add_digit_to_numeric_arg,
- ESC, '-', NUL, A_info_add_digit_to_numeric_arg,
- Meta('1'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('2'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('3'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('4'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('5'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('6'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('7'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('8'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('9'), NUL, A_info_add_digit_to_numeric_arg,
- Meta('-'), NUL, A_info_add_digit_to_numeric_arg,
- ESC, CONTROL('g'), NUL, A_ea_abort,
- ESC, CONTROL('h'), NUL, A_ea_backward_kill_word,
- ESC, CONTROL('v'), NUL, A_ea_scroll_completions_window,
- ESC, '0', NUL, A_ea_beg_of_line,
- ESC, '$', NUL, A_ea_end_of_line,
- ESC, 'b', NUL, A_ea_backward_word,
- ESC, 'd', NUL, A_ea_kill_word,
- ESC, 'f', NUL, A_ea_forward_word,
- ESC, 'h', NUL, A_ea_forward,
- ESC, 'l', NUL, A_ea_backward,
- ESC, 'w', NUL, A_ea_forward_word,
- ESC, 'x', NUL, A_ea_delete,
- ESC, 'X', NUL, A_ea_kill_word,
- ESC, 'y', NUL, A_ea_yank_pop,
- ESC, '?', NUL, A_ea_possible_completions,
- ESC, TAB, NUL, A_ea_tab_insert,
- ESC, DEL, NUL, A_ea_kill_word,
- Meta(CONTROL('g')), NUL, A_ea_abort,
- Meta(CONTROL('h')), NUL, A_ea_backward_kill_word,
- Meta(CONTROL('v')), NUL, A_ea_scroll_completions_window,
- Meta('0'), NUL, A_ea_beg_of_line,
- Meta('$'), NUL, A_ea_end_of_line,
- Meta('b'), NUL, A_ea_backward_word,
- Meta('d'), NUL, A_ea_kill_word,
- Meta('f'), NUL, A_ea_forward_word,
- Meta('h'), NUL, A_ea_forward,
- Meta('l'), NUL, A_ea_backward,
- Meta('w'), NUL, A_ea_forward_word,
- Meta('x'), NUL, A_ea_delete,
- Meta('X'), NUL, A_ea_kill_word,
- Meta('y'), NUL, A_ea_yank_pop,
- Meta('?'), NUL, A_ea_possible_completions,
- Meta(TAB), NUL, A_ea_tab_insert,
- Meta(DEL), NUL, A_ea_kill_word,
- CONTROL('a'), NUL, A_ea_beg_of_line,
- CONTROL('b'), NUL, A_ea_backward,
- CONTROL('d'), NUL, A_ea_delete,
- CONTROL('e'), NUL, A_ea_end_of_line,
- CONTROL('f'), NUL, A_ea_forward,
- CONTROL('g'), NUL, A_ea_abort,
- CONTROL('h'), NUL, A_ea_rubout,
-/* CONTROL('k') */
- SK_ESCAPE, SK_LITERAL, NUL, A_ea_kill_line,
- CONTROL('l'), NUL, A_info_redraw_display,
- CONTROL('q'), NUL, A_ea_quoted_insert,
- CONTROL('t'), NUL, A_ea_transpose_chars,
- CONTROL('u'), NUL, A_ea_abort,
- CONTROL('v'), NUL, A_ea_quoted_insert,
- CONTROL('y'), NUL, A_ea_yank,
- LFD, NUL, A_ea_newline,
- RET, NUL, A_ea_newline,
- SPC, NUL, A_ea_complete,
- TAB, NUL, A_ea_complete,
- '?', NUL, A_ea_possible_completions,
+ 0, /* suppress-default-keybindings flag */
+ ESC, '1', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '2', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '3', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '4', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '5', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '6', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '7', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '8', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '9', NUL, A_info_add_digit_to_numeric_arg,
+ ESC, '-', NUL, A_info_add_digit_to_numeric_arg,
+ Meta('1'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('2'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('3'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('4'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('5'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('6'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('7'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('8'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('9'), NUL, A_info_add_digit_to_numeric_arg,
+ Meta('-'), NUL, A_info_add_digit_to_numeric_arg,
+ ESC, CONTROL('g'), NUL, A_ea_abort,
+ ESC, CONTROL('h'), NUL, A_ea_backward_kill_word,
+ ESC, CONTROL('v'), NUL, A_ea_scroll_completions_window,
+ ESC, '0', NUL, A_ea_beg_of_line,
+ ESC, '$', NUL, A_ea_end_of_line,
+ ESC, 'b', NUL, A_ea_backward_word,
+ ESC, 'd', NUL, A_ea_kill_word,
+ ESC, 'f', NUL, A_ea_forward_word,
+ ESC, 'h', NUL, A_ea_forward,
+ ESC, 'l', NUL, A_ea_backward,
+ ESC, 'w', NUL, A_ea_forward_word,
+ ESC, 'x', NUL, A_ea_delete,
+ ESC, 'X', NUL, A_ea_kill_word,
+ ESC, 'y', NUL, A_ea_yank_pop,
+ ESC, '?', NUL, A_ea_possible_completions,
+ ESC, TAB, NUL, A_ea_tab_insert,
+ ESC, DEL, NUL, A_ea_kill_word,
+ Meta(CONTROL('g')), NUL, A_ea_abort,
+ Meta(CONTROL('h')), NUL, A_ea_backward_kill_word,
+ Meta(CONTROL('v')), NUL, A_ea_scroll_completions_window,
+ Meta('0'), NUL, A_ea_beg_of_line,
+ Meta('$'), NUL, A_ea_end_of_line,
+ Meta('b'), NUL, A_ea_backward_word,
+ Meta('d'), NUL, A_ea_kill_word,
+ Meta('f'), NUL, A_ea_forward_word,
+ Meta('h'), NUL, A_ea_forward,
+ Meta('l'), NUL, A_ea_backward,
+ Meta('w'), NUL, A_ea_forward_word,
+ Meta('x'), NUL, A_ea_delete,
+ Meta('X'), NUL, A_ea_kill_word,
+ Meta('y'), NUL, A_ea_yank_pop,
+ Meta('?'), NUL, A_ea_possible_completions,
+ Meta(TAB), NUL, A_ea_tab_insert,
+ Meta(DEL), NUL, A_ea_kill_word,
+ CONTROL('a'), NUL, A_ea_beg_of_line,
+ CONTROL('b'), NUL, A_ea_backward,
+ CONTROL('d'), NUL, A_ea_delete,
+ CONTROL('e'), NUL, A_ea_end_of_line,
+ CONTROL('f'), NUL, A_ea_forward,
+ CONTROL('g'), NUL, A_ea_abort,
+ CONTROL('h'), NUL, A_ea_rubout,
+/* CONTROL('k') */
+ SK_ESCAPE, SK_LITERAL, NUL, A_ea_kill_line,
+ CONTROL('l'), NUL, A_info_redraw_display,
+ CONTROL('q'), NUL, A_ea_quoted_insert,
+ CONTROL('t'), NUL, A_ea_transpose_chars,
+ CONTROL('u'), NUL, A_ea_abort,
+ CONTROL('v'), NUL, A_ea_quoted_insert,
+ CONTROL('y'), NUL, A_ea_yank,
+ LFD, NUL, A_ea_newline,
+ RET, NUL, A_ea_newline,
+ SPC, NUL, A_ea_complete,
+ TAB, NUL, A_ea_complete,
+ '?', NUL, A_ea_possible_completions,
#ifdef __MSDOS__
/* PC users will lynch me if I don't give them their usual DEL
- effect... */
- DEL, NUL, A_ea_delete,
+ effect... */
+ DEL, NUL, A_ea_delete,
#else
- DEL, NUL, A_ea_rubout,
+ DEL, NUL, A_ea_rubout,
#endif
- CONTROL('x'), 'o', NUL, A_info_next_window,
- CONTROL('x'), DEL, NUL, A_ea_backward_kill_line,
+ CONTROL('x'), 'o', NUL, A_info_next_window,
+ CONTROL('x'), DEL, NUL, A_ea_backward_kill_line,
/* Arrow key bindings for echo area keymaps. It seems that some
terminals do not match their termcap entries, so it's best to just
define everything with both of the usual prefixes. */
- SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward,
- '\033', 'O', 'C', NUL, A_ea_forward,
- '\033', '[', 'C', NUL, A_ea_forward,
- SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward,
- '\033', 'O', 'D', NUL, A_ea_backward,
- '\033', '[', 'D', NUL, A_ea_backward,
- SK_ESCAPE, SK_HOME, NUL, A_ea_beg_of_line,
- SK_ESCAPE, SK_END, NUL, A_ea_end_of_line,
+ SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward,
+ '\033', 'O', 'C', NUL, A_ea_forward,
+ '\033', '[', 'C', NUL, A_ea_forward,
+ SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward,
+ '\033', 'O', 'D', NUL, A_ea_backward,
+ '\033', '[', 'D', NUL, A_ea_backward,
+ SK_ESCAPE, SK_HOME, NUL, A_ea_beg_of_line,
+ SK_ESCAPE, SK_END, NUL, A_ea_end_of_line,
#ifdef __MSDOS__
- SK_ESCAPE, SK_DELETE, NUL, A_ea_delete,
+ SK_ESCAPE, SK_DELETE, NUL, A_ea_delete,
#else
- SK_DELETE, SK_DELETE, NUL, A_ea_rubout,
+ SK_DELETE, SK_DELETE, NUL, A_ea_rubout,
#endif
- ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward_word,
- ESC, '\033', 'O', 'C', NUL, A_ea_forward_word,
- ESC, '\033', '[', 'C', NUL, A_ea_forward_word,
- ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward_word,
- ESC, '\033', 'O', 'D', NUL, A_ea_backward_word,
- ESC, '\033', '[', 'D', NUL, A_ea_backward_word,
- ESC, SK_ESCAPE, SK_DELETE, NUL, A_ea_kill_word,
- CONTROL('x'), SK_ESCAPE, SK_DELETE, NUL,A_ea_backward_kill_line,
+ ESC, SK_ESCAPE, SK_RIGHT_ARROW, NUL, A_ea_forward_word,
+ ESC, '\033', 'O', 'C', NUL, A_ea_forward_word,
+ ESC, '\033', '[', 'C', NUL, A_ea_forward_word,
+ ESC, SK_ESCAPE, SK_LEFT_ARROW, NUL, A_ea_backward_word,
+ ESC, '\033', 'O', 'D', NUL, A_ea_backward_word,
+ ESC, '\033', '[', 'D', NUL, A_ea_backward_word,
+ ESC, SK_ESCAPE, SK_DELETE, NUL, A_ea_kill_word,
+ CONTROL('x'), SK_ESCAPE, SK_DELETE, NUL,A_ea_backward_kill_line,
};
+
static unsigned char *user_info_keys;
static unsigned int user_info_keys_len;
static unsigned char *user_ea_keys;
@@ -1421,172 +876,172 @@ static unsigned int user_vars_len;
* Return the size of a file, or 0 if the size can't be determined.
*/
static unsigned long
-filesize(int f)
+filesize (int f)
{
- long pos = lseek(f, 0L, SEEK_CUR);
- long sz = -1L;
- if (pos != -1L)
- {
- sz = lseek(f, 0L, SEEK_END);
- lseek(f, pos, SEEK_SET);
- }
- return sz == -1L ? 0L : sz;
+ long pos = lseek(f, 0L, SEEK_CUR);
+ long sz = -1L;
+ if (pos != -1L)
+ {
+ sz = lseek(f, 0L, SEEK_END);
+ lseek(f, pos, SEEK_SET);
+ }
+ return sz == -1L ? 0L : sz;
}
/* Get an integer from a infokey file.
Integers are stored as two bytes, low order first, in radix INFOKEY_RADIX.
*/
static int
-getint(unsigned char **sp)
+getint (unsigned char **sp)
{
- int n;
+ int n;
- if ( !((*sp)[0] < INFOKEY_RADIX && (*sp)[1] < INFOKEY_RADIX) )
- return -1;
- n = (*sp)[0] + (*sp)[1] * INFOKEY_RADIX;
- *sp += 2;
- return n;
+ if ( !((*sp)[0] < INFOKEY_RADIX && (*sp)[1] < INFOKEY_RADIX) )
+ return -1;
+ n = (*sp)[0] + (*sp)[1] * INFOKEY_RADIX;
+ *sp += 2;
+ return n;
}
/* Fetch the contents of the standard infokey file "$HOME/.info". Return
true if ok, false if not. */
static int
-fetch_user_maps(void)
+fetch_user_maps (void)
{
- char *filename = NULL;
- char *homedir;
- int f;
- unsigned char *buf;
- unsigned long len;
- long nread;
- unsigned char *p;
- int n;
-
- /* Find and open file. */
- if ((filename = getenv("INFOKEY")) != NULL)
- filename = xstrdup(filename);
- else if ((homedir = getenv("HOME")) != NULL)
- {
- filename = xmalloc(strlen(homedir) + 2 + strlen(INFOKEY_FILE));
- strcpy(filename, homedir);
- strcat(filename, "/");
- strcat(filename, INFOKEY_FILE);
- }
+ char *filename = NULL;
+ char *homedir;
+ int f;
+ unsigned char *buf;
+ unsigned long len;
+ long nread;
+ unsigned char *p;
+ int n;
+
+ /* Find and open file. */
+ if ((filename = getenv("INFOKEY")) != NULL)
+ filename = xstrdup(filename);
+ else if ((homedir = getenv("HOME")) != NULL)
+ {
+ filename = xmalloc(strlen(homedir) + 2 + strlen(INFOKEY_FILE));
+ strcpy(filename, homedir);
+ strcat(filename, "/");
+ strcat(filename, INFOKEY_FILE);
+ }
#ifdef __MSDOS__
- /* Poor baby, she doesn't have a HOME... */
- else
- filename = xstrdup(INFOKEY_FILE); /* try current directory */
+ /* Poor baby, she doesn't have a HOME... */
+ else
+ filename = xstrdup(INFOKEY_FILE); /* try current directory */
#endif
- if (filename == NULL || (f = open(filename, O_RDONLY)) == (-1))
- {
- if (filename && errno != ENOENT)
- {
- info_error(filesys_error_string(filename, errno),
+ if (filename == NULL || (f = open(filename, O_RDONLY)) == (-1))
+ {
+ if (filename && errno != ENOENT)
+ {
+ info_error(filesys_error_string(filename, errno),
NULL, NULL);
- free(filename);
- }
- return 0;
- }
- SET_BINARY (f);
-
- /* Ensure that the file is a reasonable size. */
- len = filesize(f);
- if (len < INFOKEY_NMAGIC + 2 || len > 100 * 1024)
- {
- /* Bad file (a valid file must have at least 9 chars, and
- more than 100 KB is a problem). */
- if (len < INFOKEY_NMAGIC + 2)
- info_error((char *) _("Ignoring invalid infokey file `%s' - too small"),
- filename, NULL);
- else
- info_error((char *) _("Ignoring invalid infokey file `%s' - too big"),
- filename, NULL);
- close(f);
- free(filename);
- return 0;
- }
-
- /* Read the file into a buffer. */
- buf = (unsigned char *)xmalloc((int)len);
- nread = read(f, buf, (unsigned int) len);
- close(f);
- if ((unsigned int) nread != len)
- {
- info_error((char *) _("Error reading infokey file `%s' - short read"),
+ free(filename);
+ }
+ return 0;
+ }
+ SET_BINARY (f);
+
+ /* Ensure that the file is a reasonable size. */
+ len = filesize(f);
+ if (len < INFOKEY_NMAGIC + 2 || len > 100 * 1024)
+ {
+ /* Bad file (a valid file must have at least 9 chars, and
+ more than 100 KB is a problem). */
+ if (len < INFOKEY_NMAGIC + 2)
+ info_error(_("Ignoring invalid infokey file `%s' - too small"),
+ filename, NULL);
+ else
+ info_error(_("Ignoring invalid infokey file `%s' - too big"),
+ filename, NULL);
+ close(f);
+ free(filename);
+ return 0;
+ }
+
+ /* Read the file into a buffer. */
+ buf = (unsigned char *)xmalloc((int)len);
+ nread = read(f, buf, (unsigned int) len);
+ close(f);
+ if ((unsigned int) nread != len)
+ {
+ info_error(_("Error reading infokey file `%s' - short read"),
filename, NULL);
- free(buf);
- free(filename);
- return 0;
- }
-
- /* Check the header, trailer, and version of the file to increase
- our confidence that the contents are valid. */
- if ( buf[0] != INFOKEY_MAGIC_S0
- || buf[1] != INFOKEY_MAGIC_S1
- || buf[2] != INFOKEY_MAGIC_S2
- || buf[3] != INFOKEY_MAGIC_S3
- || buf[len - 4] != INFOKEY_MAGIC_E0
- || buf[len - 3] != INFOKEY_MAGIC_E1
- || buf[len - 2] != INFOKEY_MAGIC_E2
- || buf[len - 1] != INFOKEY_MAGIC_E3
- )
- {
- info_error((char *) _("Invalid infokey file `%s' (bad magic numbers) -- run infokey to update it"),
+ free(buf);
+ free(filename);
+ return 0;
+ }
+
+ /* Check the header, trailer, and version of the file to increase
+ our confidence that the contents are valid. */
+ if ( buf[0] != INFOKEY_MAGIC_S0
+ || buf[1] != INFOKEY_MAGIC_S1
+ || buf[2] != INFOKEY_MAGIC_S2
+ || buf[3] != INFOKEY_MAGIC_S3
+ || buf[len - 4] != INFOKEY_MAGIC_E0
+ || buf[len - 3] != INFOKEY_MAGIC_E1
+ || buf[len - 2] != INFOKEY_MAGIC_E2
+ || buf[len - 1] != INFOKEY_MAGIC_E3
+ )
+ {
+ info_error(_("Invalid infokey file `%s' (bad magic numbers) -- run infokey to update it"),
filename, NULL);
- free(filename);
- return 0;
- }
- if (len < INFOKEY_NMAGIC + strlen(VERSION) + 1
+ free(filename);
+ return 0;
+ }
+ if (len < INFOKEY_NMAGIC + strlen(VERSION) + 1
|| strcmp(VERSION, (char *) (buf + 4)) != 0)
- {
- info_error
- ((char *) _("Your infokey file `%s' is out of date -- run infokey to update it"),
+ {
+ info_error
+ (_("Your infokey file `%s' is out of date -- run infokey to update it"),
filename, NULL);
- free(filename);
- return 0;
- }
+ free(filename);
+ return 0;
+ }
- /* Extract the pieces. */
- for (p = buf + 4 + strlen(VERSION) + 1;
+ /* Extract the pieces. */
+ for (p = buf + 4 + strlen(VERSION) + 1;
(unsigned int) (p - buf) < len - 4;
p += n)
- {
- int s = *p++;
+ {
+ int s = *p++;
- n = getint(&p);
- if (n < 0 || (unsigned int) n > len - 4 - (p - buf))
- {
- info_error((char *) _("Invalid infokey file `%s' (bad section length) -- run infokey to update it"),
+ n = getint(&p);
+ if (n < 0 || (unsigned int) n > len - 4 - (p - buf))
+ {
+ info_error(_("Invalid infokey file `%s' (bad section length) -- run infokey to update it"),
filename, NULL);
- free(filename);
- return 0;
- }
-
- switch (s)
- {
- case INFOKEY_SECTION_INFO:
- user_info_keys = p;
- user_info_keys_len = n;
- break;
- case INFOKEY_SECTION_EA:
- user_ea_keys = p;
- user_ea_keys_len = n;
- break;
- case INFOKEY_SECTION_VAR:
- user_vars = p;
- user_vars_len = n;
- break;
- default:
- info_error((char *) _("Invalid infokey file `%s' (bad section code) -- run infokey to update it"),
+ free(filename);
+ return 0;
+ }
+
+ switch (s)
+ {
+ case INFOKEY_SECTION_INFO:
+ user_info_keys = p;
+ user_info_keys_len = n;
+ break;
+ case INFOKEY_SECTION_EA:
+ user_ea_keys = p;
+ user_ea_keys_len = n;
+ break;
+ case INFOKEY_SECTION_VAR:
+ user_vars = p;
+ user_vars_len = n;
+ break;
+ default:
+ info_error(_("Invalid infokey file `%s' (bad section code) -- run infokey to update it"),
filename, NULL);
- free(filename);
- return 0;
- }
- }
+ free(filename);
+ return 0;
+ }
+ }
- free(filename);
- return 1;
+ free(filename);
+ return 1;
}
/* Decode special key sequences from the infokey file. Return zero
@@ -1597,55 +1052,55 @@ static int
decode_keys(unsigned char *src, unsigned int slen,
unsigned char *dst, unsigned int dlen)
{
- unsigned char *s = src;
- unsigned char *d = dst;
+ unsigned char *s = src;
+ unsigned char *d = dst;
#define To_dst(c) do { \
if ((unsigned int) (d - dst) < dlen) *d++ = (c); \
} while (0)
- while ((unsigned int) (s - src) < slen)
- {
- unsigned char c = ISMETA(*s) ? UNMETA(*s) : *s;
-
- if (c == SK_ESCAPE)
- {
- char *t;
- static char lit[] = { SK_ESCAPE, NUL };
-
- switch ((unsigned int) (s + 1 - src) < slen ? s[1] : '\0')
- {
- case SK_RIGHT_ARROW: t = term_kr; break;
- case SK_LEFT_ARROW: t = term_kl; break;
- case SK_UP_ARROW: t = term_ku; break;
- case SK_DOWN_ARROW: t = term_kd; break;
- case SK_PAGE_UP: t = term_kP; break;
- case SK_PAGE_DOWN: t = term_kN; break;
- case SK_HOME: t = term_kh; break;
- case SK_END: t = term_ke; break;
- case SK_DELETE: t = term_kx; break;
- case SK_INSERT: t = term_ki; break;
- case SK_LITERAL:
- default: t = lit; break;
- }
- if (t == NULL)
- return 0;
- while (*t)
- To_dst(ISMETA(*s) ? Meta(*t++) : *t++);
- s += 2;
- }
- else
- {
- if (ISMETA(*s))
- To_dst(Meta(*s++));
- else
- To_dst(*s++);
- }
- }
-
- To_dst('\0');
-
- return 1;
+ while ((unsigned int) (s - src) < slen)
+ {
+ unsigned char c = ISMETA(*s) ? UNMETA(*s) : *s;
+
+ if (c == SK_ESCAPE)
+ {
+ char *t;
+ static char lit[] = { SK_ESCAPE, NUL };
+
+ switch ((unsigned int) (s + 1 - src) < slen ? s[1] : '\0')
+ {
+ case SK_RIGHT_ARROW: t = term_kr; break;
+ case SK_LEFT_ARROW: t = term_kl; break;
+ case SK_UP_ARROW: t = term_ku; break;
+ case SK_DOWN_ARROW: t = term_kd; break;
+ case SK_PAGE_UP: t = term_kP; break;
+ case SK_PAGE_DOWN: t = term_kN; break;
+ case SK_HOME: t = term_kh; break;
+ case SK_END: t = term_ke; break;
+ case SK_DELETE: t = term_kx; break;
+ case SK_INSERT: t = term_ki; break;
+ case SK_LITERAL:
+ default: t = lit; break;
+ }
+ if (t == NULL)
+ return 0;
+ while (*t)
+ To_dst(ISMETA(*s) ? Meta(*t++) : *t++);
+ s += 2;
+ }
+ else
+ {
+ if (ISMETA(*s))
+ To_dst(Meta(*s++));
+ else
+ To_dst(*s++);
+ }
+ }
+
+ To_dst('\0');
+
+ return 1;
#undef To_dst
@@ -1656,66 +1111,66 @@ decode_keys(unsigned char *src, unsigned int slen,
static int
section_to_keymaps(Keymap map, unsigned char *table, unsigned int len)
{
- int stop;
- unsigned char *p;
- unsigned char *seq = NULL;
- unsigned int seqlen = 0;
- enum { getseq, gotseq, getaction } state = getseq;
-
- stop = len > 0 ? table[0] : 0;
-
- for (p = table + 1; (unsigned int) (p - table) < len; p++)
- {
- switch (state)
- {
- case getseq:
- if (*p)
- {
- seq = p;
- state = gotseq;
- }
- break;
-
- case gotseq:
- if (!*p)
- {
- seqlen = p - seq;
- state = getaction;
- }
- break;
-
- case getaction:
- {
- unsigned int action = *p;
- unsigned char keyseq[256];
- KEYMAP_ENTRY ke;
-
- state = getseq;
- /* If decode_keys returns zero, it
- means that seq includes keys which
- the terminal doesn't support, like
- PageDown. In that case, don't bind
- the key sequence. */
- if (decode_keys(seq, seqlen, keyseq,
- sizeof keyseq))
- {
- keyseq[sizeof keyseq - 1] = '\0';
- ke.type = ISFUNC;
- ke.function =
- action < A_NCOMMANDS
- ? &function_doc_array[action]
- : NULL;
- keymap_bind_keyseq(map,
+ int stop;
+ unsigned char *p;
+ unsigned char *seq = NULL;
+ unsigned int seqlen = 0;
+ enum { getseq, gotseq, getaction } state = getseq;
+
+ stop = len > 0 ? table[0] : 0;
+
+ for (p = table + 1; (unsigned int) (p - table) < len; p++)
+ {
+ switch (state)
+ {
+ case getseq:
+ if (*p)
+ {
+ seq = p;
+ state = gotseq;
+ }
+ break;
+
+ case gotseq:
+ if (!*p)
+ {
+ seqlen = p - seq;
+ state = getaction;
+ }
+ break;
+
+ case getaction:
+ {
+ unsigned int action = *p;
+ unsigned char keyseq[256];
+ KEYMAP_ENTRY ke;
+
+ state = getseq;
+ /* If decode_keys returns zero, it
+ means that seq includes keys which
+ the terminal doesn't support, like
+ PageDown. In that case, don't bind
+ the key sequence. */
+ if (decode_keys(seq, seqlen, keyseq,
+ sizeof keyseq))
+ {
+ keyseq[sizeof keyseq - 1] = '\0';
+ ke.type = ISFUNC;
+ ke.function =
+ action < A_NCOMMANDS
+ ? &function_doc_array[action]
+ : NULL;
+ keymap_bind_keyseq(map,
(const char *) keyseq, &ke);
- }
- }
- break;
- }
- }
- if (state != getseq)
- info_error((char *) _("Bad data in infokey file -- some key bindings ignored"),
+ }
+ }
+ break;
+ }
+ }
+ if (state != getseq)
+ info_error(_("Bad data in infokey file -- some key bindings ignored"),
NULL, NULL);
- return !stop;
+ return !stop;
}
/* Convert an infokey file section to variable settings.
@@ -1723,47 +1178,47 @@ section_to_keymaps(Keymap map, unsigned char *table, unsigned int len)
static void
section_to_vars(unsigned char *table, unsigned int len)
{
- enum { getvar, gotvar, getval, gotval } state = getvar;
- unsigned char *var = NULL;
- unsigned char *val = NULL;
- unsigned char *p;
-
- for (p = table; (unsigned int) (p - table) < len; p++)
- {
- switch (state)
- {
- case getvar:
- if (*p)
- {
- var = p;
- state = gotvar;
- }
- break;
-
- case gotvar:
- if (!*p)
- state = getval;
- break;
-
- case getval:
- if (*p)
- {
- val = p;
- state = gotval;
- }
- break;
-
- case gotval:
- if (!*p)
- {
- set_variable_to_value((char *) var, (char *) val);
- state = getvar;
- }
- break;
- }
- }
+ enum { getvar, gotvar, getval, gotval } state = getvar;
+ unsigned char *var = NULL;
+ unsigned char *val = NULL;
+ unsigned char *p;
+
+ for (p = table; (unsigned int) (p - table) < len; p++)
+ {
+ switch (state)
+ {
+ case getvar:
+ if (*p)
+ {
+ var = p;
+ state = gotvar;
+ }
+ break;
+
+ case gotvar:
+ if (!*p)
+ state = getval;
+ break;
+
+ case getval:
+ if (*p)
+ {
+ val = p;
+ state = gotval;
+ }
+ break;
+
+ case gotval:
+ if (!*p)
+ {
+ set_variable_to_value((char *) var, (char *) val);
+ state = getvar;
+ }
+ break;
+ }
+ }
if (state != getvar)
- info_error((char *) _("Bad data in infokey file -- some var settings ignored"),
+ info_error(_("Bad data in infokey file -- some var settings ignored"),
NULL, NULL);
}
@@ -1789,9 +1244,9 @@ initialize_info_keymaps (void)
if (fetch_user_maps())
{
if (user_info_keys_len && user_info_keys[0])
- suppress_info_default_bindings = 1;
+ suppress_info_default_bindings = 1;
if (user_ea_keys_len && user_ea_keys[0])
- suppress_ea_default_bindings = 1;
+ suppress_ea_default_bindings = 1;
}
/* Apply the default bindings, unless the user says to suppress
@@ -1799,20 +1254,20 @@ initialize_info_keymaps (void)
if (vi_keys_p)
{
if (!suppress_info_default_bindings)
- section_to_keymaps(info_keymap, default_vi_like_info_keys,
- sizeof(default_vi_like_info_keys));
+ section_to_keymaps(info_keymap, default_vi_like_info_keys,
+ sizeof(default_vi_like_info_keys));
if (!suppress_ea_default_bindings)
- section_to_keymaps(echo_area_keymap, default_vi_like_ea_keys,
- sizeof(default_vi_like_ea_keys));
+ section_to_keymaps(echo_area_keymap, default_vi_like_ea_keys,
+ sizeof(default_vi_like_ea_keys));
}
else
{
if (!suppress_info_default_bindings)
- section_to_keymaps(info_keymap, default_emacs_like_info_keys,
- sizeof(default_emacs_like_info_keys));
+ section_to_keymaps(info_keymap, default_emacs_like_info_keys,
+ sizeof(default_emacs_like_info_keys));
if (!suppress_ea_default_bindings)
- section_to_keymaps(echo_area_keymap, default_emacs_like_ea_keys,
- sizeof(default_emacs_like_ea_keys));
+ section_to_keymaps(echo_area_keymap, default_emacs_like_ea_keys,
+ sizeof(default_emacs_like_ea_keys));
}
/* If the user specified custom bindings, apply them on top of the
@@ -1827,5 +1282,4 @@ initialize_info_keymaps (void)
section_to_vars(user_vars, user_vars_len);
}
-#endif /* defined(INFOKEY) */
/* vim: set sw=2 cino={1s>2sn-s^-se-s: */
diff --git a/Build/source/utils/texinfo/info/infomap.h b/Build/source/utils/texinfo/info/infomap.h
index 31e4d8275f0..1e670693d22 100644
--- a/Build/source/utils/texinfo/info/infomap.h
+++ b/Build/source/utils/texinfo/info/infomap.h
@@ -1,12 +1,12 @@
/* infomap.h -- description of a keymap in Info and related functions.
- $Id: infomap.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: infomap.h,v 1.6 2007/07/01 21:20:30 karl Exp $
- Copyright (C) 1993, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2001, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +14,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/key.h b/Build/source/utils/texinfo/info/key.h
index 35d2762211f..e8409da00e7 100644
--- a/Build/source/utils/texinfo/info/key.h
+++ b/Build/source/utils/texinfo/info/key.h
@@ -3,12 +3,12 @@
/* This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,8 +16,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Andrew Bettison <andrewb@zip.com.au> */
diff --git a/Build/source/utils/texinfo/info/m-x.c b/Build/source/utils/texinfo/info/m-x.c
index 52365d1843e..6499256472c 100644
--- a/Build/source/utils/texinfo/info/m-x.c
+++ b/Build/source/utils/texinfo/info/m-x.c
@@ -1,13 +1,13 @@
/* m-x.c -- Meta-x minibuffer reader.
- $Id: m-x.c,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: m-x.c,v 1.7 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2001, 2002, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2001, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -33,7 +32,7 @@
name. A return value of NULL indicates that no function name could
be read. */
char *
-read_function_name (char *prompt, WINDOW *window)
+read_function_name (const char *prompt, WINDOW *window)
{
register int i;
char *line;
@@ -70,7 +69,7 @@ DECLARE_INFO_COMMAND (describe_command,
{
char *line;
- line = read_function_name ((char *) _("Describe command: "), window);
+ line = read_function_name (_("Describe command: "), window);
if (!line)
{
@@ -137,7 +136,7 @@ DECLARE_INFO_COMMAND (info_execute_command,
(strncmp (line, "echo-area-", 10) == 0))
{
free (line);
- info_error ((char *) _("Cannot execute an `echo-area' command here."),
+ info_error (_("Cannot execute an `echo-area' command here."),
NULL, NULL);
return;
}
@@ -151,7 +150,7 @@ DECLARE_INFO_COMMAND (info_execute_command,
if (InfoFunction(command))
(*InfoFunction(command)) (active_window, count, 0);
else
- info_error ((char *) _("Undefined command: %s"), line, NULL);
+ info_error (_("Undefined command: %s"), line, NULL);
}
}
diff --git a/Build/source/utils/texinfo/info/makedoc.c b/Build/source/utils/texinfo/info/makedoc.c
index 41b1beb9679..7142f3db493 100644
--- a/Build/source/utils/texinfo/info/makedoc.c
+++ b/Build/source/utils/texinfo/info/makedoc.c
@@ -1,13 +1,13 @@
/* makedoc.c -- make doc.c and funs.h from input files.
- $Id: makedoc.c,v 1.4 2004/04/11 17:56:46 karl Exp $
+ $Id: makedoc.c,v 1.9 2007/12/09 23:30:40 karl Exp $
- Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -28,6 +27,8 @@
#include "info.h"
#include "infokey.h"
+char *program_name = "makedoc";
+
static void fatal_file_error (char *filename);
/* Name of the header file which receives the declarations of functions. */
@@ -143,9 +144,12 @@ main (int argc, char **argv)
key_filename = NULL_DEVICE;
}
+ /* The order of these calls depends exactly on the order in the
+ Makefile.{in,am}, or they might fail on filesystems with
+ high-precision times; see also the fclose calls below. */
funs_stream = must_fopen (funs_filename, "w");
- doc_stream = must_fopen (doc_filename, "w");
key_stream = must_fopen (key_filename, "w");
+ doc_stream = must_fopen (doc_filename, "w");
fprintf (funs_stream,
"/* %s -- Generated declarations for Info commands. */\n\n\
@@ -224,9 +228,11 @@ main (int argc, char **argv)
fprintf (key_stream, " { (char *)NULL, 0 }\n};\n");
fprintf (funs_stream, "\n#define A_NCOMMANDS %u\n", next_func_key());
+ /* The order of these calls also depends exactly on the order in the
+ * Makefile.{in,am}; see the must_fopen calls above. */
fclose (funs_stream);
- fclose (doc_stream);
fclose (key_stream);
+ fclose (doc_stream);
if (tags_only)
maybe_dump_tags (stdout);
diff --git a/Build/source/utils/texinfo/info/man.c b/Build/source/utils/texinfo/info/man.c
index 33fd6d4be0b..22919677052 100644
--- a/Build/source/utils/texinfo/info/man.c
+++ b/Build/source/utils/texinfo/info/man.c
@@ -1,13 +1,13 @@
/* man.c: How to read and format man files.
- $Id: man.c,v 1.4 2004/04/11 17:56:46 karl Exp $
+ $Id: man.c,v 1.11 2007/12/03 01:38:42 karl Exp $
- Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,10 +15,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox Thu May 4 09:17:52 1995 (bfox@ai.mit.edu). */
+ Originally written by Brian Fox Thu May 4 09:17:52 1995. */
#include "info.h"
#include <sys/ioctl.h>
@@ -290,8 +289,10 @@ get_manpage_contents (char *pagename)
get_page_and_section (pagename);
- if (manpage_section != (char *)NULL)
+ if (manpage_section)
formatter_args[arg_index++] = manpage_section;
+ else
+ formatter_args[arg_index++] = "-a";
formatter_args[arg_index++] = manpage_pagename;
formatter_args[arg_index] = (char *)NULL;
@@ -325,6 +326,19 @@ get_manpage_contents (char *pagename)
freopen (NULL_DEVICE, "r", stdin);
dup2 (pipes[1], fileno (stdout));
+ if (MB_CUR_MAX > 1)
+ {
+ /* Info has trouble wrapping man output if it contains
+ multibyte characters */
+ setenv("LANGUAGE", "C", 1);
+ setenv("LANG", "C", 1);
+#ifdef LC_MESSAGES
+ setenv("LC_MESSAGES", "C", 1);
+#endif
+ setenv("LC_CTYPE", "C", 1);
+ setenv("LC_ALL", "C", 1);
+ }
+
execv (formatter_args[0], formatter_args);
/* If we get here, we couldn't exec, so close out the pipe and
@@ -440,7 +454,7 @@ manpage_node_of_file_buffer (FILE_BUFFER *file_buffer, char *pagename)
for (i = 0; (tag = file_buffer->tags[i]); i++)
{
- if (strcasecmp (pagename, tag->nodename) == 0)
+ if (mbscasecmp (pagename, tag->nodename) == 0)
break;
}
}
diff --git a/Build/source/utils/texinfo/info/man.h b/Build/source/utils/texinfo/info/man.h
index 73ef1b6274a..89377cbcbd0 100644
--- a/Build/source/utils/texinfo/info/man.h
+++ b/Build/source/utils/texinfo/info/man.h
@@ -1,15 +1,15 @@
/* man.h: Defines and external function declarations for man.c.
- $Id: man.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: man.h,v 1.6 2007/07/01 21:20:30 karl Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Author: Brian J. Fox (bfox@ai.mit.edu) Sat May 6 16:19:13 1995. */
diff --git a/Build/source/utils/texinfo/info/nodemenu.c b/Build/source/utils/texinfo/info/nodemenu.c
index 1090d08db02..c230db02e74 100644
--- a/Build/source/utils/texinfo/info/nodemenu.c
+++ b/Build/source/utils/texinfo/info/nodemenu.c
@@ -1,13 +1,13 @@
/* nodemenu.c -- produce a menu of all visited nodes.
- $Id: nodemenu.c,v 1.5 2004/04/11 17:56:46 karl Exp $
+ $Id: nodemenu.c,v 1.10 2008/02/26 16:51:05 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2002, 2003, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -116,7 +115,7 @@ compare_strings (const void *entry1, const void *entry2)
char **e1 = (char **) entry1;
char **e2 = (char **) entry2;
- return (strcasecmp (*e1, *e2));
+ return (mbscasecmp (*e1, *e2));
}
/* The name of the nodemenu node. */
@@ -199,7 +198,7 @@ get_visited_nodes (Function *filter_func)
printf_to_message_buffer
("%s", replace_in_documentation
- ((char *) _("Here is the menu of nodes you have recently visited.\n\
+ (_("Here is the menu of nodes you have recently visited.\n\
Select one from this menu, or use `\\[history-node]' in another window.\n"), 0),
NULL, NULL);
@@ -314,7 +313,7 @@ DECLARE_INFO_COMMAND (select_visited_node,
line =
info_read_completing_in_echo_area (window,
- (char *) _("Select visited node: "), menu);
+ _("Select visited node: "), menu);
window = active_window;
@@ -334,7 +333,7 @@ DECLARE_INFO_COMMAND (select_visited_node,
entry = info_get_labeled_reference (line, menu);
if (!entry)
- info_error ((char *) _("The reference disappeared! (%s)."), line, NULL);
+ info_error (_("The reference disappeared! (%s)."), line, NULL);
else
info_select_reference (window, entry);
}
diff --git a/Build/source/utils/texinfo/info/nodes.c b/Build/source/utils/texinfo/info/nodes.c
index a3381a83145..a0b95411609 100644
--- a/Build/source/utils/texinfo/info/nodes.c
+++ b/Build/source/utils/texinfo/info/nodes.c
@@ -1,13 +1,13 @@
/* nodes.c -- how to get an Info file and node.
- $Id: nodes.c,v 1.4 2004/04/11 17:56:46 karl Exp $
+ $Id: nodes.c,v 1.10 2007/12/03 01:38:43 karl Exp $
- Copyright (C) 1993, 1998, 1999, 2000, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1998, 1999, 2000, 2002, 2003, 2004, 2006, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -116,8 +115,11 @@ info_get_node (char *filename, char *nodename)
/* Look for the node. */
node = info_get_node_of_file_buffer (nodename, file_buffer);
- /* If the node not found was "Top", try again with different case. */
- if (!node && (nodename == NULL || strcasecmp (nodename, "Top") == 0))
+ /* If the node not found was "Top", try again with different case,
+ unless this was a man page. */
+ if (!node
+ && mbscasecmp (filename, MANPAGE_FILE_BUFFER_NAME) != 0
+ && (nodename == NULL || mbscasecmp (nodename, "Top") == 0))
{
node = info_get_node_of_file_buffer ("Top", file_buffer);
if (!node)
@@ -137,6 +139,7 @@ NODE *
info_get_node_of_file_buffer (char *nodename, FILE_BUFFER *file_buffer)
{
NODE *node = NULL;
+ int implicit_nodename = 0;
/* If we are unable to find the file, we have to give up. There isn't
anything else we can do. */
@@ -149,7 +152,10 @@ info_get_node_of_file_buffer (char *nodename, FILE_BUFFER *file_buffer)
/* If NODENAME is not specified, it defaults to "Top". */
if (!nodename)
- nodename = "Top";
+ {
+ nodename = "Top";
+ implicit_nodename = 1; /* don't return man page for top */
+ }
/* If the name of the node that we wish to find is exactly "*", then the
node body is the contents of the entire file. Create and return such
@@ -168,9 +174,9 @@ info_get_node_of_file_buffer (char *nodename, FILE_BUFFER *file_buffer)
#if defined (HANDLE_MAN_PAGES)
/* If the file buffer is the magic one associated with manpages, call
the manpage node finding function instead. */
- else if (file_buffer->flags & N_IsManPage)
+ else if (!implicit_nodename && file_buffer->flags & N_IsManPage)
{
- node = get_manpage_node (file_buffer, nodename);
+ node = get_manpage_node (file_buffer, nodename);
}
#endif /* HANDLE_MAN_PAGES */
/* If this is the "main" info file, it might contain a tags table. Search
@@ -288,7 +294,7 @@ info_find_file_internal (char *filename, int get_tags)
#if defined (HANDLE_MAN_PAGES)
/* If the name of the file that we want is our special file buffer for
Unix manual pages, then create the file buffer, and return it now. */
- if (strcasecmp (filename, MANPAGE_FILE_BUFFER_NAME) == 0)
+ if (mbscasecmp (filename, MANPAGE_FILE_BUFFER_NAME) == 0)
file_buffer = create_manpage_file_buffer ();
else
#endif /* HANDLE_MAN_PAGES */
@@ -325,7 +331,7 @@ info_load_file_internal (char *filename, int get_tags)
doesn't exist, then try again with the last part of the filename
appearing in lowercase. */
/* This is probably not needed at all on those systems which define
- FILENAME_CMP to be strcasecmp. But let's do it anyway, lest some
+ FILENAME_CMP to be mbscasecmp. But let's do it anyway, lest some
network redirector supports case sensitivity. */
if (retcode < 0)
{
diff --git a/Build/source/utils/texinfo/info/nodes.h b/Build/source/utils/texinfo/info/nodes.h
index e2fbabea172..213dc3c85f7 100644
--- a/Build/source/utils/texinfo/info/nodes.h
+++ b/Build/source/utils/texinfo/info/nodes.h
@@ -1,12 +1,13 @@
/* nodes.h -- How we represent nodes internally.
- $Id: nodes.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: nodes.h,v 1.6 2007/07/01 21:20:31 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/pcterm.c b/Build/source/utils/texinfo/info/pcterm.c
index ed348dc54d1..1c3d6861ce2 100644
--- a/Build/source/utils/texinfo/info/pcterm.c
+++ b/Build/source/utils/texinfo/info/pcterm.c
@@ -1,21 +1,20 @@
/* pcterm.c -- How to handle the PC terminal for Info under MS-DOS/MS-Windows.
- $Id: pcterm.c,v 1.4 2004/04/11 17:56:46 karl Exp $
+ $Id: pcterm.c,v 1.7 2007/07/01 21:20:31 karl Exp $
- Copyright (C) 1998, 1999, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2003, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* WARNING WARNING WARNING!!!
diff --git a/Build/source/utils/texinfo/info/search.c b/Build/source/utils/texinfo/info/search.c
index a1d5da6c711..83cb9d47867 100644
--- a/Build/source/utils/texinfo/info/search.c
+++ b/Build/source/utils/texinfo/info/search.c
@@ -1,12 +1,13 @@
/* search.c -- searching large bodies of text.
- $Id: search.c,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: search.c,v 1.7 2007/12/17 19:12:11 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,12 +15,12 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox (bfox@ai.mit.edu). */
#include "info.h"
+#include <regex.h>
#include "search.h"
#include "nodes.h"
@@ -83,6 +84,164 @@ search (char *string, SEARCH_BINDING *binding)
return (result);
}
+/* Search forwards or backwards for anything matching the regexp in the text
+ delimited by BINDING. The search is forwards if BINDING->start is greater
+ than BINDING->end. */
+long
+regexp_search (char *regexp, SEARCH_BINDING *binding, long length)
+{
+ static char *previous_regexp = NULL;
+ static char *previous_content = NULL;
+ static int was_insensitive = 0;
+ static regex_t preg;
+ static regmatch_t *matches;
+ static int match_alloc = 0;
+ static int match_count = 0;
+ regoff_t pos;
+ long result;
+
+ if (previous_regexp == NULL
+ || (binding->flags & S_FoldCase != was_insensitive)
+ || (strcmp (previous_regexp, regexp) != 0))
+ {
+ /* need to compile a new regexp */
+ int result;
+ char *unescaped_regexp;
+ char *p, *q;
+
+ previous_content = NULL;
+
+ if (previous_regexp != NULL)
+ {
+ free (previous_regexp);
+ previous_regexp = NULL;
+ regfree (&preg);
+ }
+
+ was_insensitive = binding->flags & S_FoldCase;
+
+ /* expand the \n and \t in regexp */
+ unescaped_regexp = xmalloc (1 + strlen (regexp));
+ for (p = regexp, q = unescaped_regexp; *p != '\0'; p++, q++)
+ {
+ if (*p == '\\')
+ switch(*++p)
+ {
+ case 'n':
+ *q = '\n';
+ break;
+ case 't':
+ *q = '\t';
+ break;
+ case '\0':
+ *q = '\\';
+ p--;
+ break;
+ default:
+ *q++ = '\\';
+ *q = *p;
+ break;
+ }
+ else
+ *q = *p;
+ }
+ *q = '\0';
+
+ result = regcomp (&preg, unescaped_regexp,
+ REG_EXTENDED|
+ REG_NEWLINE|
+ (was_insensitive ? REG_ICASE : 0));
+ free (unescaped_regexp);
+
+ if (result != 0)
+ {
+ int size = regerror (result, &preg, NULL, 0);
+ char *buf = xmalloc (size);
+ regerror (result, &preg, buf, size);
+ info_error (_("regexp error: %s"), buf, NULL);
+ return -1;
+ }
+
+ previous_regexp = xstrdup(regexp);
+ }
+
+ if (previous_content != binding->buffer)
+ {
+ /* new buffer to search in, let's scan it */
+ regoff_t start = 0;
+ char saved_char;
+
+ previous_content = binding->buffer;
+ saved_char = previous_content[length-1];
+ previous_content[length-1] = '\0';
+
+ for (match_count = 0; start < length; )
+ {
+ int result = 0;
+ if (match_count >= match_alloc)
+ {
+ /* match list full. Initially allocate 256 entries, then double
+ every time we fill it */
+ match_alloc = (match_alloc > 0 ? match_alloc * 2 : 256);
+ matches = (regmatch_t*) xrealloc (matches,
+ match_alloc * sizeof(regmatch_t));
+ }
+
+ result = regexec (&preg, &previous_content[start],
+ 1, &matches[match_count], 0);
+ if (result == 0)
+ {
+ if (matches[match_count].rm_eo == 0)
+ {
+ /* ignore empty matches */
+ start++;
+ }
+ else
+ {
+ matches[match_count].rm_so += start;
+ matches[match_count].rm_eo += start;
+ start = matches[match_count++].rm_eo;
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+ previous_content[length-1] = saved_char;
+ }
+
+ pos = binding->start;
+ if (pos > binding->end)
+ {
+ /* searching backward */
+ int i;
+ for (i = match_count - 1; i >= 0; i--)
+ {
+ if (matches[i].rm_so <= pos)
+ return matches[i].rm_so;
+ }
+ }
+ else
+ {
+ /* searching forward */
+ int i;
+ for (i = 0; i < match_count; i++)
+ {
+ if (matches[i].rm_so >= pos)
+ {
+ if (binding->flags & S_SkipDest)
+ return matches[i].rm_eo;
+ else
+ return matches[i].rm_so;
+ }
+ }
+ }
+
+ /* not found */
+ return -1;
+}
+
/* Search forwards for STRING through the text delimited in BINDING. */
long
search_forward (char *string, SEARCH_BINDING *binding)
diff --git a/Build/source/utils/texinfo/info/search.h b/Build/source/utils/texinfo/info/search.h
index 3e0610799ba..b2943f0adb3 100644
--- a/Build/source/utils/texinfo/info/search.h
+++ b/Build/source/utils/texinfo/info/search.h
@@ -1,12 +1,13 @@
/* search.h -- Structure used to search large bodies of text, with bounds.
- $Id: search.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: search.h,v 1.7 2007/12/17 19:12:11 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,10 +15,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox (bfox@ai.mit.edu). */
/* The search functions take two arguments:
@@ -47,6 +47,7 @@ SEARCH_BINDING *copy_binding (SEARCH_BINDING *binding);
extern long search_forward (char *string, SEARCH_BINDING *binding);
extern long search_backward (char *input_string, SEARCH_BINDING *binding);
extern long search (char *string, SEARCH_BINDING *binding);
+extern long regexp_search (char *regexp, SEARCH_BINDING *binding, long length);
extern int looking_at (char *string, SEARCH_BINDING *binding);
/* Note that STRING_IN_LINE () always returns the offset of the 1st character
diff --git a/Build/source/utils/texinfo/info/session.c b/Build/source/utils/texinfo/info/session.c
index 7a8996bbe20..36f12d6794e 100644
--- a/Build/source/utils/texinfo/info/session.c
+++ b/Build/source/utils/texinfo/info/session.c
@@ -1,13 +1,13 @@
/* session.c -- user windowing interface to Info.
- $Id: session.c,v 1.16 2004/12/14 00:15:36 karl Exp $
+ $Id: session.c,v 1.37 2008/03/23 23:32:22 karl Exp $
- Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright (C) 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004, 2007, 2008 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
@@ -64,6 +63,9 @@ static int info_windows_index = 0;
/* Number of slots allocated to `info_windows'. */
static int info_windows_slots = 0;
+/* Whether to use regexps or not for search. */
+static int use_regex = 1;
+
void remember_window_and_node (WINDOW *window, NODE *node);
void forget_window_and_nodes (WINDOW *window);
void display_startup_message_and_start (void);
@@ -110,7 +112,7 @@ begin_multiple_window_info_session (char *filename, char **nodenames)
if (!largest)
{
display_update_display (windows);
- info_error ((char *) msg_cant_find_window, NULL, NULL);
+ info_error (msg_cant_find_window, NULL, NULL);
info_session ();
xexit (0);
}
@@ -125,7 +127,7 @@ begin_multiple_window_info_session (char *filename, char **nodenames)
else
{
display_update_display (windows);
- info_error ((char *) msg_win_too_small, NULL, NULL);
+ info_error (msg_win_too_small, NULL, NULL);
info_session ();
xexit (0);
}
@@ -137,7 +139,7 @@ begin_multiple_window_info_session (char *filename, char **nodenames)
/* Start an info session with INITIAL_NODE, and an error message in the echo
area made from FORMAT and ARG. */
void
-begin_info_session_with_error (NODE *initial_node, char *format,
+begin_info_session_with_error (NODE *initial_node, const char *format,
void *arg1, void *arg2)
{
initialize_info_session (initial_node, 1);
@@ -159,7 +161,7 @@ display_startup_message_and_start (void)
char *format;
format = replace_in_documentation
- ((char *) _("Welcome to Info version %s. Type \\[get-help-window] for help, \\[menu-item] for menu item."),
+ (_("Welcome to Info version %s. Type \\[get-help-window] for help, \\[menu-item] for menu item."),
0);
window_message_in_echo_area (format, VERSION, NULL);
@@ -266,7 +268,7 @@ initialize_info_session (NODE *node, int clear_screen)
if (!term_name)
term_name = "dumb";
- info_error ((char *) msg_term_too_dumb, term_name, NULL);
+ info_error (msg_term_too_dumb, term_name, NULL);
xexit (1);
}
@@ -598,7 +600,7 @@ move_to_new_line (int old, int new, WINDOW *window)
{
if (old == -1)
{
- info_error ((char *) msg_cant_find_point, NULL, NULL);
+ info_error (msg_cant_find_point, NULL, NULL);
}
else
{
@@ -606,7 +608,7 @@ move_to_new_line (int old, int new, WINDOW *window)
if (new >= window->line_count || new < 0)
return;
-
+
goal = window_get_goal_column (window);
window->goal_column = goal;
@@ -616,6 +618,9 @@ move_to_new_line (int old, int new, WINDOW *window)
}
}
+static int forward_move_node_structure (WINDOW *window, int behaviour);
+static int backward_move_node_structure (WINDOW *window, int behaviour);
+
/* Move WINDOW's point down to the next line if possible. */
DECLARE_INFO_COMMAND (info_next_line, _("Move down to the next line"))
{
@@ -624,11 +629,32 @@ DECLARE_INFO_COMMAND (info_next_line, _("Move down to the next line"))
if (count < 0)
info_prev_line (window, -count, key);
else
- {
- old_line = window_line_of_point (window);
- new_line = old_line + count;
- move_to_new_line (old_line, new_line, window);
- }
+ while (count)
+ {
+ int diff;
+
+ old_line = window_line_of_point (window);
+ diff = window->line_count - old_line;
+ if (diff > count)
+ diff = count;
+
+ count -= diff;
+ new_line = old_line + diff;
+ if (new_line >= window->line_count)
+ {
+ if (cursor_movement_scrolls_p)
+ {
+ if (forward_move_node_structure (window,
+ info_scroll_behaviour))
+ break;
+ move_to_new_line (0, 0, window);
+ }
+ else
+ break;
+ }
+ else
+ move_to_new_line (old_line, new_line, window);
+ }
}
/* Move WINDOW's point up to the previous line if possible. */
@@ -639,11 +665,31 @@ DECLARE_INFO_COMMAND (info_prev_line, _("Move up to the previous line"))
if (count < 0)
info_next_line (window, -count, key);
else
- {
- old_line = window_line_of_point (window);
- new_line = old_line - count;
- move_to_new_line (old_line, new_line, window);
- }
+ while (count)
+ {
+ int diff;
+
+ old_line = window_line_of_point (window);
+ diff = old_line + 1;
+ if (diff > count)
+ diff = count;
+
+ count -= diff;
+ new_line = old_line - diff;
+
+ if (new_line < 0
+ && cursor_movement_scrolls_p)
+ {
+ if (backward_move_node_structure (window, info_scroll_behaviour))
+ break;
+ if (window->line_count > window->height)
+ set_window_pagetop (window, window->line_count - window->height);
+ move_to_new_line (window->line_count,
+ window->line_count - 1, window);
+ }
+ else
+ move_to_new_line (old_line, new_line, window);
+ }
}
/* Move WINDOW's point to the end of the true line. */
@@ -692,11 +738,27 @@ DECLARE_INFO_COMMAND (info_forward_char, _("Move forward a character"))
info_backward_char (window, -count, key);
else
{
- window->point += count;
-
- if (window->point >= window->node->nodelen)
- window->point = window->node->nodelen - 1;
-
+ while (count)
+ {
+ int diff = window->node->nodelen - window->point;
+
+ if (diff > count)
+ diff = count;
+ window->point += diff;
+ count -= diff;
+ if (window->point >= window->node->nodelen)
+ {
+ if (cursor_movement_scrolls_p
+ && forward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ window->point = 0;
+ else
+ {
+ window->point = window->node->nodelen - 1;
+ break;
+ }
+ }
+ }
info_show_point (window);
}
}
@@ -708,11 +770,34 @@ DECLARE_INFO_COMMAND (info_backward_char, _("Move backward a character"))
info_forward_char (window, -count, key);
else
{
- window->point -= count;
+ while (count)
+ {
+ int diff = count;
- if (window->point < 0)
- window->point = 0;
+ if (window->point < diff)
+ diff = window->point + 1;
+
+ window->point -= diff;
+ count -= diff;
+ if (window->point < 0)
+ {
+ if (cursor_movement_scrolls_p
+ && backward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ window->point = window->node->nodelen - 1;
+ if (window->line_count > window->height)
+ set_window_pagetop (window,
+ window->line_count - window->height);
+ }
+ else
+ {
+ window->point = 0;
+ break;
+ }
+ }
+ }
info_show_point (window);
}
}
@@ -739,8 +824,19 @@ DECLARE_INFO_COMMAND (info_forward_word, _("Move forward a word"))
while (count)
{
if (point + 1 >= end)
- return;
-
+ {
+ if (cursor_movement_scrolls_p
+ && forward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ point = 0;
+ buffer = window->node->contents;
+ end = window->node->nodelen;
+ }
+ else
+ return;
+ }
+
/* If we are not in a word, move forward until we are in one.
Then, move forward until we hit a non-alphabetic character. */
c = buffer[point];
@@ -755,7 +851,20 @@ DECLARE_INFO_COMMAND (info_forward_word, _("Move forward a word"))
}
}
- if (point >= end) return;
+ if (point >= end)
+ {
+ if (cursor_movement_scrolls_p
+ && forward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ point = 0;
+ buffer = window->node->contents;
+ end = window->node->nodelen;
+ }
+ else
+ return;
+ }
+
while (++point < end)
{
@@ -787,8 +896,21 @@ DECLARE_INFO_COMMAND (info_backward_word, _("Move backward a word"))
while (count)
{
if (point == 0)
- break;
-
+ {
+ if (cursor_movement_scrolls_p
+ && backward_move_node_structure (window,
+ info_scroll_behaviour) == 0)
+ {
+ if (window->line_count > window->height)
+ set_window_pagetop (window,
+ window->line_count - window->height);
+ buffer = window->node->contents;
+ point = window->node->nodelen;
+ }
+ else
+ break;
+ }
+
/* Like info_forward_word (), except that we look at the
characters just before point. */
@@ -836,64 +958,106 @@ char *info_scroll_choices[] = {
"Continuous", "Next Only", "Page Only", (char *)NULL
};
+/* Controls whether scroll-behavior affects line movement commands */
+int cursor_movement_scrolls_p = 1;
+
+/* Choices for the scroll-last-node variable */
+char *scroll_last_node_choices[] = {
+ "Stop", "Scroll", "Top", NULL
+};
+
+/* Controls what to do when a scrolling command is issued at the end of the
+ last node. */
+int scroll_last_node = SLN_Stop;
+
/* Default window sizes for scrolling commands. */
-int default_window_size = -1; /* meaning 1 window-full */
-int default_scroll_size = -1; /* meaning half screen size */
+int default_window_size = -1; /* meaning 1 window-full */
+int default_scroll_size = -1; /* meaning half screen size */
#define INFO_LABEL_FOUND() \
(info_parsed_nodename || (info_parsed_filename \
&& !is_dir_name (info_parsed_filename)))
+static int
+last_node_p (NODE *node)
+{
+ info_next_label_of_node (node);
+ if (!INFO_LABEL_FOUND ())
+ {
+ info_up_label_of_node (node);
+ return !INFO_LABEL_FOUND () || strcmp (info_parsed_nodename, "Top") == 0;
+ }
+ return 0;
+}
+
/* Move to 1st menu item, Next, Up/Next, or error in this window. */
-static void
+static int
forward_move_node_structure (WINDOW *window, int behaviour)
{
switch (behaviour)
{
case IS_PageOnly:
- info_error ((char *) msg_at_node_bottom, NULL, NULL);
- break;
+ info_error (msg_at_node_bottom, NULL, NULL);
+ return 1;
case IS_NextOnly:
info_next_label_of_node (window->node);
if (!info_parsed_nodename && !info_parsed_filename)
- info_error ((char *) msg_no_pointer, (char *) _("Next"), NULL);
+ {
+ info_error (msg_no_pointer, (char *) _("Next"), NULL);
+ return 1;
+ }
else
{
- window_message_in_echo_area ((char *) _("Following Next node..."),
- NULL, NULL);
info_handle_pointer ("Next", window);
}
break;
case IS_Continuous:
{
+ if (last_node_p (window->node))
+ {
+ switch (scroll_last_node)
+ {
+ case SLN_Stop:
+ info_error (_("No more nodes within this document."),
+ NULL, NULL);
+ return 1;
+
+ case SLN_Scroll:
+ break;
+
+ case SLN_Top:
+ info_top_node (window, 1, 0);
+ return 0;
+
+ default:
+ abort ();
+ }
+ }
+
/* First things first. If this node contains a menu, move down
into the menu. */
- {
- REFERENCE **menu;
-
- menu = info_menu_of_node (window->node);
+ {
+ REFERENCE **menu;
- if (menu)
- {
- info_free_references (menu);
- window_message_in_echo_area ((char *) _("Selecting first menu item..."),
- NULL, NULL);
- info_menu_digit (window, 1, '1');
- return;
- }
- }
+ menu = info_menu_of_node (window->node);
+
+ if (menu)
+ {
+ info_free_references (menu);
+ info_menu_digit (window, 1, '1');
+ return 0;
+ }
+ }
/* Okay, this node does not contain a menu. If it contains a
"Next:" pointer, use that. */
info_next_label_of_node (window->node);
if (INFO_LABEL_FOUND ())
{
- window_message_in_echo_area ((char *) _("Selecting Next node..."),
- NULL, NULL);
info_handle_pointer ("Next", window);
- return;
+ return 0;
}
/* Okay, there wasn't a "Next:" for this node. Move "Up:" until we
@@ -960,12 +1124,8 @@ forward_move_node_structure (WINDOW *window, int behaviour)
/* This node has a "Next" pointer, and it is not the
same as the first menu item found in this node. */
- window_message_in_echo_area
- ((char *) _("Moving Up %d time(s), then Next."),
- (void *) (long) up_counter, NULL);
-
info_handle_pointer ("Next", window);
- return;
+ return 0;
}
else
{
@@ -985,34 +1145,37 @@ forward_move_node_structure (WINDOW *window, int behaviour)
window->point = info_win->points[old_current];
recalculate_line_starts (window);
window->flags |= W_UpdateWindow;
- info_error ((char *) _("No more nodes within this document."),
+ info_error (_("No more nodes within this document."),
NULL, NULL);
+ return 1;
}
}
}
break;
}
}
+ return info_error_was_printed; /*FIXME*/
}
/* Move Prev, Up or error in WINDOW depending on BEHAVIOUR. */
-static void
+static int
backward_move_node_structure (WINDOW *window, int behaviour)
{
switch (behaviour)
{
case IS_PageOnly:
- info_error ((char *) msg_at_node_top, NULL, NULL);
- break;
+ info_error (msg_at_node_top, NULL, NULL);
+ return 1;
case IS_NextOnly:
info_prev_label_of_node (window->node);
if (!info_parsed_nodename && !info_parsed_filename)
- info_error ((char *) _("No `Prev' for this node."), NULL, NULL);
+ {
+ info_error (_("No `Prev' for this node."), NULL, NULL);
+ return 1;
+ }
else
{
- window_message_in_echo_area ((char *) _("Moving Prev in this window."),
- NULL, NULL);
info_handle_pointer ("Prev", window);
}
break;
@@ -1026,13 +1189,14 @@ backward_move_node_structure (WINDOW *window, int behaviour)
info_up_label_of_node (window->node);
if (!info_parsed_nodename && (!info_parsed_filename
|| is_dir_name (info_parsed_filename)))
- info_error ((char *)
- _("No `Prev' or `Up' for this node within this document."),
- NULL, NULL);
+ {
+ info_error (
+ _("No `Prev' or `Up' for this node within this document."),
+ NULL, NULL);
+ return 1;
+ }
else
{
- window_message_in_echo_area ((char *) _("Moving Up in this window."),
- NULL, NULL);
info_handle_pointer ("Up", window);
}
}
@@ -1070,8 +1234,6 @@ backward_move_node_structure (WINDOW *window, int behaviour)
/* Move to the previous node. If this node now contains a menu,
and we have not inhibited movement to it, move to the node
corresponding to the last menu item. */
- window_message_in_echo_area ((char *) _("Moving Prev in this window."),
- NULL, NULL);
info_handle_pointer ("Prev", window);
if (!inhibit_menu_traversing)
@@ -1080,14 +1242,13 @@ backward_move_node_structure (WINDOW *window, int behaviour)
(menu = info_menu_of_node (window->node)))
{
info_free_references (menu);
- window_message_in_echo_area
- ((char *) _("Moving to `Prev's last menu item."), NULL, NULL);
info_menu_digit (window, 1, '0');
}
}
}
break;
}
+ return 0;
}
/* Move continuously forward through the node structure of this info file. */
@@ -1139,7 +1300,7 @@ _scroll_forward(WINDOW *window, int count, unsigned char key, int behaviour)
/* Without an explicit numeric argument, scroll the bottom two
lines to the top of this window, Or, if at bottom of window,
and the chosen behaviour is to scroll through nodes get the
- "Next" node for this window. */
+ "Next" node for this window. */
if (default_window_size > 0)
desired_top = window->pagetop + default_window_size;
else if (!info_explicit_arg && count == 1)
@@ -1150,7 +1311,8 @@ _scroll_forward(WINDOW *window, int count, unsigned char key, int behaviour)
another node, depending on BEHAVIOUR. */
if (desired_top > window->line_count)
{
- forward_move_node_structure (window, behaviour);
+ if (forward_move_node_structure (window, behaviour))
+ info_end_of_node (window, 1, 0);
return;
}
}
@@ -1178,16 +1340,20 @@ _scroll_backward(WINDOW *window, int count, unsigned char key, int behaviour)
/* Without an explicit numeric argument, scroll the top two lines
to the bottom of this window, or, depending on the selected
- behaviour, move to the previous, or Up'th node. */
+ behaviour, move to the previous, or Up'th node. */
if (default_window_size > 0)
desired_top = window->pagetop - default_window_size;
else if (!info_explicit_arg && count == 1)
{
- desired_top = window->pagetop - (window->height - 2);
-
+ desired_top = window->pagetop - (window->height - 2);
+
if ((desired_top < 0) && (window->pagetop == 0))
{
- backward_move_node_structure (window, behaviour);
+ if ((backward_move_node_structure (window, behaviour) == 0)
+ && (cursor_movement_scrolls_p))
+ info_end_of_node (window, 1, 0);
+ window->point = (window->line_starts[window->pagetop]
+ - window->node->contents);
return;
}
}
@@ -1198,6 +1364,8 @@ _scroll_backward(WINDOW *window, int count, unsigned char key, int behaviour)
desired_top = 0;
set_window_pagetop (window, desired_top);
+ window->point = (window->line_starts[window->pagetop]
+ - window->node->contents);
}
}
@@ -1210,7 +1378,7 @@ DECLARE_INFO_COMMAND (info_scroll_forward, _("Scroll forward in this window"))
/* Like info_scroll_forward, but sets default_window_size as a side
effect. */
DECLARE_INFO_COMMAND (info_scroll_forward_set_window,
- _("Scroll forward in this window and set default window size"))
+ _("Scroll forward in this window and set default window size"))
{
if (info_explicit_arg)
default_window_size = count;
@@ -1226,7 +1394,7 @@ DECLARE_INFO_COMMAND (info_scroll_forward_page_only, _("Scroll forward in this w
/* Like info_scroll_forward_page_only, but sets default_window_size as a side
effect. */
DECLARE_INFO_COMMAND (info_scroll_forward_page_only_set_window,
- _("Scroll forward in this window staying within node and set default window size"))
+ _("Scroll forward in this window staying within node and set default window size"))
{
if (info_explicit_arg)
default_window_size = count;
@@ -1242,7 +1410,7 @@ DECLARE_INFO_COMMAND (info_scroll_backward, _("Scroll backward in this window"))
/* Like info_scroll_backward, but sets default_window_size as a side
effect. */
DECLARE_INFO_COMMAND (info_scroll_backward_set_window,
- _("Scroll backward in this window and set default window size"))
+ _("Scroll backward in this window and set default window size"))
{
if (info_explicit_arg)
default_window_size = count;
@@ -1259,7 +1427,7 @@ DECLARE_INFO_COMMAND (info_scroll_backward_page_only, _("Scroll backward in this
/* Like info_scroll_backward_page_only, but sets default_window_size as a side
effect. */
DECLARE_INFO_COMMAND (info_scroll_backward_page_only_set_window,
- _("Scroll backward in this window staying within node and set default window size"))
+ _("Scroll backward in this window staying within node and set default window size"))
{
if (info_explicit_arg)
default_window_size = count;
@@ -1290,10 +1458,10 @@ DECLARE_INFO_COMMAND (info_down_line, _("Scroll down by lines"))
int desired_top = window->pagetop + count;
if (desired_top >= window->line_count)
- desired_top = window->line_count - 2;
+ desired_top = window->line_count - 2;
if (window->pagetop <= desired_top)
- set_window_pagetop (window, desired_top);
+ set_window_pagetop (window, desired_top);
}
}
@@ -1307,7 +1475,7 @@ DECLARE_INFO_COMMAND (info_up_line, _("Scroll up by lines"))
int desired_top = window->pagetop - count;
if (desired_top < 0)
- desired_top = 0;
+ desired_top = 0;
set_window_pagetop (window, desired_top);
}
@@ -1316,7 +1484,7 @@ DECLARE_INFO_COMMAND (info_up_line, _("Scroll up by lines"))
/* Scroll the window forward by N lines and remember N as default for
subsequent commands. */
DECLARE_INFO_COMMAND (info_scroll_half_screen_down,
- _("Scroll down by half screen size"))
+ _("Scroll down by half screen size"))
{
if (count < 0)
info_scroll_half_screen_up (window, -count, key);
@@ -1326,23 +1494,23 @@ DECLARE_INFO_COMMAND (info_scroll_half_screen_down,
int desired_top;
if (info_explicit_arg)
- default_scroll_size = count;
+ default_scroll_size = count;
if (default_scroll_size > 0)
- scroll_size = default_scroll_size;
+ scroll_size = default_scroll_size;
desired_top = window->pagetop + scroll_size;
if (desired_top >= window->line_count)
- desired_top = window->line_count - 2;
+ desired_top = window->line_count - 2;
if (window->pagetop <= desired_top)
- set_window_pagetop (window, desired_top);
+ set_window_pagetop (window, desired_top);
}
}
/* Scroll the window backward by N lines and remember N as default for
subsequent commands. */
DECLARE_INFO_COMMAND (info_scroll_half_screen_up,
- _("Scroll up by half screen size"))
+ _("Scroll up by half screen size"))
{
if (count < 0)
info_scroll_half_screen_down (window, -count, key);
@@ -1352,13 +1520,13 @@ DECLARE_INFO_COMMAND (info_scroll_half_screen_up,
int desired_top;
if (info_explicit_arg)
- default_scroll_size = count;
+ default_scroll_size = count;
if (default_scroll_size > 0)
- scroll_size = default_scroll_size;
+ scroll_size = default_scroll_size;
desired_top = window->pagetop - scroll_size;
if (desired_top < 0)
- desired_top = 0;
+ desired_top = 0;
set_window_pagetop (window, desired_top);
}
@@ -1382,7 +1550,7 @@ DECLARE_INFO_COMMAND (info_next_window, _("Select the next window"))
/* If no other window, error now. */
if (!windows->next && !echo_area_is_active)
{
- info_error ((char *) msg_one_window, NULL, NULL);
+ info_error (msg_one_window, NULL, NULL);
return;
}
@@ -1422,7 +1590,7 @@ DECLARE_INFO_COMMAND (info_prev_window, _("Select the previous window"))
if (!windows->next && !echo_area_is_active)
{
- info_error ((char *) msg_one_window, NULL, NULL);
+ info_error (msg_one_window, NULL, NULL);
return;
}
@@ -1478,7 +1646,7 @@ DECLARE_INFO_COMMAND (info_split_window, _("Split the current window"))
if (!split)
{
- info_error ((char *) msg_win_too_small, NULL, NULL);
+ info_error (msg_win_too_small, NULL, NULL);
}
else
{
@@ -1546,11 +1714,11 @@ DECLARE_INFO_COMMAND (info_delete_window, _("Delete the current window"))
{
if (!windows->next)
{
- info_error ((char *) msg_cant_kill_last, NULL, NULL);
+ info_error (msg_cant_kill_last, NULL, NULL);
}
else if (window->flags & W_WindowIsPerm)
{
- info_error ((char *) _("Cannot delete a permanent window"), NULL, NULL);
+ info_error (_("Cannot delete a permanent window"), NULL, NULL);
}
else
{
@@ -1635,7 +1803,7 @@ DECLARE_INFO_COMMAND (info_scroll_other_window, _("Scroll the other window"))
/* If only one window, give up. */
if (!windows->next)
{
- info_error ((char *) msg_one_window, NULL, NULL);
+ info_error (msg_one_window, NULL, NULL);
return;
}
@@ -1677,6 +1845,17 @@ DECLARE_INFO_COMMAND (info_toggle_wrap,
{
window_toggle_wrap (window);
}
+
+/* Toggle the usage of regular expressions in searches. */
+DECLARE_INFO_COMMAND (info_toggle_regexp,
+ _("Toggle the usage of regular expressions in searches"))
+{
+ use_regex = 1 - use_regex;
+ window_message_in_echo_area (use_regex
+ ? _("Using regular expressions for searches.")
+ : _("Using literal strings for searches."),
+ NULL, NULL);
+}
/* **************************************************************** */
/* */
@@ -1755,7 +1934,7 @@ info_select_reference (WINDOW *window, REFERENCE *entry)
if (file_system_error)
info_error (file_system_error, NULL, NULL);
else
- info_error ((char *) msg_cant_find_node, nodename, NULL);
+ info_error (msg_cant_find_node, nodename, NULL);
}
maybe_free (file_system_error);
@@ -1831,7 +2010,7 @@ info_handle_pointer (char *label, WINDOW *window)
if (info_recent_file_error)
info_error (info_recent_file_error, NULL, NULL);
else
- info_error ((char *) msg_cant_file_node, filename, nodename);
+ info_error (msg_cant_file_node, filename, nodename);
}
free (filename);
@@ -1839,7 +2018,7 @@ info_handle_pointer (char *label, WINDOW *window)
}
else
{
- info_error ((char *) msg_no_pointer, label, NULL);
+ info_error (msg_no_pointer, label, NULL);
}
}
@@ -1895,7 +2074,7 @@ DECLARE_INFO_COMMAND (info_last_node, _("Select the last node in this file"))
}
if (!node)
- info_error ((char *) _("This window has no additional nodes"), NULL, NULL);
+ info_error (_("This window has no additional nodes"), NULL, NULL);
else
info_set_node_of_window (1, window, node);
}
@@ -1928,7 +2107,7 @@ DECLARE_INFO_COMMAND (info_first_node, _("Select the first node in this file"))
}
if (!node)
- info_error ((char *) _("This window has no additional nodes"), NULL, NULL);
+ info_error (_("This window has no additional nodes"), NULL, NULL);
else
info_set_node_of_window (1, window, node);
}
@@ -1950,7 +2129,7 @@ DECLARE_INFO_COMMAND (info_menu_digit, _("Select this menu item"))
if (!menu)
{
- info_error ((char *) msg_no_menu_node, NULL, NULL);
+ info_error (msg_no_menu_node, NULL, NULL);
return;
}
@@ -1974,7 +2153,7 @@ DECLARE_INFO_COMMAND (info_menu_digit, _("Select this menu item"))
info_next_line (window, menu[i]->line_number - 1, key);
}
else
- info_error ((char *) _("There aren't %d items in this menu."),
+ info_error (_("There aren't %d items in this menu."),
(void *) (long) item, NULL);
info_free_references (menu);
@@ -2063,9 +2242,9 @@ info_menu_or_ref_item (WINDOW *window, int count,
if (!menu)
{
if (builder == info_menu_of_node)
- info_error ((char *) msg_no_menu_node, NULL, NULL);
+ info_error (msg_no_menu_node, NULL, NULL);
else
- info_error ((char *) msg_no_xref_node, NULL, NULL);
+ info_error (msg_no_xref_node, NULL, NULL);
return;
}
@@ -2132,13 +2311,13 @@ info_menu_or_ref_item (WINDOW *window, int count,
else if (window->point < refs[which]->start)
break;
}
- if (which > 0)
- {
- if (closest == -1)
- which--;
- else
- which = closest;
- }
+ if (which > 0)
+ {
+ if (closest == -1)
+ which--;
+ else
+ which = closest;
+ }
}
defentry = (REFERENCE *)xmalloc (sizeof (REFERENCE));
@@ -2166,24 +2345,24 @@ info_menu_or_ref_item (WINDOW *window, int count,
if (builder == info_menu_of_node)
{
if (defentry)
- {
- prompt = xmalloc (strlen (defentry->label)
- + strlen (_("Menu item (%s): ")));
- sprintf (prompt, _("Menu item (%s): "), defentry->label);
- }
+ {
+ prompt = xmalloc (strlen (defentry->label)
+ + strlen (_("Menu item (%s): ")));
+ sprintf (prompt, _("Menu item (%s): "), defentry->label);
+ }
else
- prompt = xstrdup (_("Menu item: "));
+ prompt = xstrdup (_("Menu item: "));
}
else
{
if (defentry)
- {
- prompt = xmalloc (strlen (defentry->label)
- + strlen (_("Follow xref (%s): ")));
- sprintf (prompt, _("Follow xref (%s): "), defentry->label);
- }
+ {
+ prompt = xmalloc (strlen (defentry->label)
+ + strlen (_("Follow xref (%s): ")));
+ sprintf (prompt, _("Follow xref (%s): "), defentry->label);
+ }
else
- prompt = xstrdup (_("Follow xref: "));
+ prompt = xstrdup (_("Follow xref: "));
}
line = info_read_completing_in_echo_area (window, prompt, menu);
@@ -2239,9 +2418,9 @@ info_menu_or_ref_item (WINDOW *window, int count,
for (i = 0; menu && (ref = menu[i]); i++)
{
- /* Need to use strcasecmp because LINE is downcased
+ /* Need to use mbscasecmp because LINE is downcased
inside info_read_completing_in_echo_area. */
- if (strcasecmp (line, ref->label) == 0)
+ if (mbscasecmp (line, ref->label) == 0)
{
/* ref->end is more accurate estimate of position
for menus than ref->start. Go figure. */
@@ -2261,7 +2440,7 @@ info_menu_or_ref_item (WINDOW *window, int count,
}
if (!entry && defentry)
- info_error ((char *) _("The reference disappeared! (%s)."), line, NULL);
+ info_error (_("The reference disappeared! (%s)."), line, NULL);
else
{
NODE *orig = window->node;
@@ -2339,7 +2518,7 @@ DECLARE_INFO_COMMAND (info_find_menu, _("Move to the start of this node's menu")
position = search (INFO_MENU_LABEL, &binding);
if (position == -1)
- info_error ((char *) msg_no_menu_node, NULL, NULL);
+ info_error (msg_no_menu_node, NULL, NULL);
else
{
window->point = position;
@@ -2358,7 +2537,7 @@ DECLARE_INFO_COMMAND (info_visit_menu,
menu = info_menu_of_node (window->node);
if (!menu)
- info_error ((char *) msg_no_menu_node, NULL, NULL);
+ info_error (msg_no_menu_node, NULL, NULL);
for (i = 0; (!info_error_was_printed) && (entry = menu[i]); i++)
{
@@ -2368,7 +2547,7 @@ DECLARE_INFO_COMMAND (info_visit_menu,
window_tile_windows (TILE_INTERNALS);
if (!new)
- info_error ((char *) msg_win_too_small, NULL, NULL);
+ info_error (msg_win_too_small, NULL, NULL);
else
{
active_window = new;
@@ -2417,28 +2596,28 @@ DECLARE_INFO_COMMAND (info_goto_node, _("Read a node name and select it"))
{
entry = (REFERENCE *)xmalloc (sizeof (REFERENCE));
entry->filename = entry->nodename = (char *)NULL;
- if (this_is_the_current_fb)
- entry->label = xstrdup (fb->tags[i]->nodename);
- else
- {
- entry->label = (char *) xmalloc
- (4 + strlen (fb->filename) +
- strlen (fb->tags[i]->nodename));
- sprintf (entry->label, "(%s)%s",
- fb->filename, fb->tags[i]->nodename);
- }
+ if (this_is_the_current_fb)
+ entry->label = xstrdup (fb->tags[i]->nodename);
+ else
+ {
+ entry->label = (char *) xmalloc
+ (4 + strlen (fb->filename) +
+ strlen (fb->tags[i]->nodename));
+ sprintf (entry->label, "(%s)%s",
+ fb->filename, fb->tags[i]->nodename);
+ }
add_pointer_to_array
(entry, items_index, items, items_slots, 100, REFERENCE *);
}
}
}
- line = info_read_maybe_completing (window, (char *) _("Goto node: "),
+ line = info_read_maybe_completing (window, _("Goto node: "),
items);
info_free_references (items);
}
#else /* !GOTO_COMPLETES */
- line = info_read_in_echo_area (window, (char *) _("Goto node: "));
+ line = info_read_in_echo_area (window, _("Goto node: "));
#endif /* !GOTO_COMPLETES */
/* If the user aborted, quit now. */
@@ -2480,11 +2659,11 @@ info_follow_menus (NODE *initial_node, char **menus,
char *arg = *menus; /* Remember the name of the menu entry we want. */
/* A leading space is certainly NOT part of a node name. Most
- probably, they typed a space after the separating comma. The
- strings in menus[] have their whitespace canonicalized, so
- there's at most one space to ignore. */
+ probably, they typed a space after the separating comma. The
+ strings in menus[] have their whitespace canonicalized, so
+ there's at most one space to ignore. */
if (*arg == ' ')
- arg++;
+ arg++;
if (!first_arg)
first_arg = arg;
@@ -2519,11 +2698,11 @@ info_follow_menus (NODE *initial_node, char **menus,
for (i = 0; (entry = menu[i]); i++)
{
- if (strcasecmp (entry->label, arg) == 0)
+ if (mbscasecmp (entry->label, arg) == 0)
break;
else
if ((best_guess == -1)
- && (strncasecmp (entry->label, arg, strlen (arg)) == 0))
+ && (mbsncasecmp (entry->label, arg, strlen (arg)) == 0))
best_guess = i;
}
@@ -2537,12 +2716,12 @@ info_follow_menus (NODE *initial_node, char **menus,
{
if (arg == first_arg)
{
- /* Maybe they typed "info foo" instead of "info -f foo". */
- node = info_get_node (first_arg, 0);
- if (node)
- add_file_directory_to_path (first_arg);
- else
- node = make_manpage_node (first_arg);
+ /* Maybe they typed "info foo" instead of "info -f foo". */
+ node = info_get_node (first_arg, 0);
+ if (node)
+ add_file_directory_to_path (first_arg);
+ else
+ node = make_manpage_node (first_arg);
if (node)
goto maybe_got_node;
}
@@ -2563,11 +2742,11 @@ info_follow_menus (NODE *initial_node, char **menus,
/* Try to find this node. */
node = info_get_node (entry->filename, entry->nodename);
if (!node && arg == first_arg)
- {
- node = make_manpage_node (first_arg);
- if (node)
- goto maybe_got_node;
- }
+ {
+ node = make_manpage_node (first_arg);
+ if (node)
+ goto maybe_got_node;
+ }
/* Since we cannot find it, try using the label of the entry as a
file, i.e., "(LABEL)Top". */
@@ -2612,7 +2791,7 @@ split_list_of_nodenames (char *str)
{
if (*str == ',')
{
- *str++ = 0; /* get past the null byte */
+ *str++ = 0; /* get past the null byte */
len++;
nodes = xrealloc (nodes, len * sizeof (char *));
nodes[len - 2] = str;
@@ -2630,7 +2809,7 @@ split_list_of_nodenames (char *str)
DECLARE_INFO_COMMAND (info_menu_sequence,
_("Read a list of menus starting from dir and follow them"))
{
- char *line = info_read_in_echo_area (window, (char *) _("Follow menus: "));
+ char *line = info_read_in_echo_area (window, _("Follow menus: "));
/* If the user aborted, quit now. */
if (!line)
@@ -2650,28 +2829,28 @@ DECLARE_INFO_COMMAND (info_menu_sequence,
NODE *node = NULL;
/* If DIR_NODE is NULL, they might be reading a file directly,
- like in "info -d . -f ./foo". Try using "Top" instead. */
+ like in "info -d . -f ./foo". Try using "Top" instead. */
if (!dir_node)
- {
- char *file_name = window->node->parent;
+ {
+ char *file_name = window->node->parent;
- if (!file_name)
- file_name = window->node->filename;
- dir_node = info_get_node (file_name, NULL);
- }
+ if (!file_name)
+ file_name = window->node->filename;
+ dir_node = info_get_node (file_name, NULL);
+ }
/* If we still cannot find the starting point, give up.
- We cannot allow a NULL pointer inside info_follow_menus. */
+ We cannot allow a NULL pointer inside info_follow_menus. */
if (!dir_node)
- info_error ((char *) msg_cant_find_node, "Top", NULL);
+ info_error (msg_cant_find_node, "Top", NULL);
else
- node = info_follow_menus (dir_node, nodes, &errstr, &errarg1, &errarg2);
+ node = info_follow_menus (dir_node, nodes, &errstr, &errarg1, &errarg2);
free (nodes);
if (!errstr)
info_set_node_of_window (1, window, node);
else
- info_error ((char *) errstr, errarg1, errarg2);
+ info_error (errstr, errarg1, errarg2);
}
free (line);
@@ -2699,16 +2878,16 @@ entry_in_menu (char *arg, REFERENCE **menu, int exact)
int best_guess = -1;
for (i = 0; (entry = menu[i]); i++)
- {
- if (strcasecmp (entry->label, arg) == 0)
- break;
- else
- if (strncasecmp (entry->label, arg, strlen (arg)) == 0)
- best_guess = i;
- }
+ {
+ if (mbscasecmp (entry->label, arg) == 0)
+ break;
+ else
+ if (mbsncasecmp (entry->label, arg, strlen (arg)) == 0)
+ best_guess = i;
+ }
if (!entry && best_guess != -1)
- entry = menu[best_guess];
+ entry = menu[best_guess];
}
return entry;
@@ -2729,18 +2908,18 @@ info_intuit_options_node (WINDOW *window, NODE *initial_node, char *program)
static const char *invocation_nodes[] = {
"%s invocation",
"Invoking %s",
- "Preliminaries", /* m4 has Invoking under Preliminaries! */
+ "Preliminaries", /* m4 has Invoking under Preliminaries! */
"Invocation",
"Command Arguments",/* Emacs */
"Invoking `%s'",
"%s options",
"Options",
- "Option ", /* e.g. "Option Summary" */
+ "Option ", /* e.g. "Option Summary" */
"Invoking",
- "All options", /* tar, paxutils */
+ "All options", /* tar, paxutils */
"Arguments",
- "%s cmdline", /* ar */
- "%s", /* last resort */
+ "%s cmdline", /* ar */
+ "%s", /* last resort */
(const char *)0
};
NODE *node = NULL;
@@ -2759,37 +2938,37 @@ info_intuit_options_node (WINDOW *window, NODE *initial_node, char *program)
menu = info_menu_of_node (initial_node);
/* If no menu item in this node, stop here. Perhaps this node
- is the one they need. */
+ is the one they need. */
if (!menu)
- break;
+ break;
/* Look for node names typical for usage nodes in this menu. */
for (try_node = invocation_nodes; *try_node; try_node++)
- {
- char *nodename;
+ {
+ char *nodename;
- nodename = xmalloc (strlen (program) + strlen (*try_node));
- sprintf (nodename, *try_node, program);
- /* The last resort "%s" is dangerous, so we restrict it
+ nodename = xmalloc (strlen (program) + strlen (*try_node));
+ sprintf (nodename, *try_node, program);
+ /* The last resort "%s" is dangerous, so we restrict it
to exact matches here. */
- entry = entry_in_menu (nodename, menu,
- strcmp (*try_node, "%s") == 0);
- free (nodename);
- if (entry)
- break;
- }
+ entry = entry_in_menu (nodename, menu,
+ strcmp (*try_node, "%s") == 0);
+ free (nodename);
+ if (entry)
+ break;
+ }
if (!entry)
- break;
+ break;
if (!entry->filename)
- entry->filename = xstrdup (initial_node->parent ? initial_node->parent
- : initial_node->filename);
+ entry->filename = xstrdup (initial_node->parent ? initial_node->parent
+ : initial_node->filename);
/* Try to find this node. */
node = info_get_node (entry->filename, entry->nodename);
info_free_references (menu);
if (!node)
- break;
+ break;
}
/* We've got our best shot at the invocation node. Now select it. */
@@ -2809,21 +2988,21 @@ program_name_from_file_name (char *file_name)
for (i = strlen (program_name) - 1; i > 0; i--)
if (program_name[i] == '.'
- && (FILENAME_CMPN (program_name + i, ".info", 5) == 0
- || FILENAME_CMPN (program_name + i, ".inf", 4) == 0
+ && (FILENAME_CMPN (program_name + i, ".info", 5) == 0
+ || FILENAME_CMPN (program_name + i, ".inf", 4) == 0
#ifdef __MSDOS__
- || FILENAME_CMPN (program_name + i, ".i", 2) == 0
+ || FILENAME_CMPN (program_name + i, ".i", 2) == 0
#endif
- || isdigit (program_name[i + 1]))) /* a man page foo.1 */
+ || isdigit (program_name[i + 1]))) /* a man page foo.1 */
{
- program_name[i] = 0;
- break;
+ program_name[i] = 0;
+ break;
}
return program_name;
}
DECLARE_INFO_COMMAND (info_goto_invocation_node,
- _("Find the node describing program invocation"))
+ _("Find the node describing program invocation"))
{
const char *invocation_prompt = _("Find Invocation node of [%s]: ");
char *program_name, *line;
@@ -2833,11 +3012,11 @@ DECLARE_INFO_COMMAND (info_goto_invocation_node,
/* Intuit the name of the program they are likely to want.
We use the file name of the current Info file as a hint. */
file_name = window->node->parent ? window->node->parent
- : window->node->filename;
+ : window->node->filename;
default_program_name = program_name_from_file_name (file_name);
prompt = (char *)xmalloc (strlen (default_program_name) +
- strlen (invocation_prompt));
+ strlen (invocation_prompt));
sprintf (prompt, invocation_prompt, default_program_name);
line = info_read_in_echo_area (window, prompt);
free (prompt);
@@ -2855,7 +3034,7 @@ DECLARE_INFO_COMMAND (info_goto_invocation_node,
from the Top node. */
top_node = info_get_node (file_name, NULL);
if (!top_node)
- info_error ((char *) msg_cant_find_node, "Top", NULL);
+ info_error (msg_cant_find_node, "Top", NULL);
info_intuit_options_node (window, top_node, program_name);
free (line);
@@ -2867,7 +3046,7 @@ DECLARE_INFO_COMMAND (info_man, _("Read a manpage reference and select it"))
{
char *line;
- line = info_read_in_echo_area (window, (char *) _("Get Manpage: "));
+ line = info_read_in_echo_area (window, _("Get Manpage: "));
if (!line)
{
@@ -2968,13 +3147,13 @@ kill_node (WINDOW *window, char *nodename)
/* If there is a nodename, find it in our window list. */
for (iw = 0; (info_win = info_windows[iw]); iw++)
if (strcmp (nodename, info_win->nodes[info_win->current]->nodename) == 0
- && info_win->window == window)
+ && info_win->window == window)
break;
if (!info_win)
{
if (*nodename)
- info_error ((char *) _("Cannot kill node `%s'"), nodename, NULL);
+ info_error (_("Cannot kill node `%s'"), nodename, NULL);
else
window_clear_echo_area ();
@@ -2984,7 +3163,7 @@ kill_node (WINDOW *window, char *nodename)
/* If there are no more nodes left anywhere to view, complain and exit. */
if (info_windows_index == 1 && info_windows[0]->nodes_index == 1)
{
- info_error ((char *) _("Cannot kill the last node"), NULL, NULL);
+ info_error (_("Cannot kill the last node"), NULL, NULL);
return;
}
@@ -3088,7 +3267,7 @@ DECLARE_INFO_COMMAND (info_view_file, _("Read the name of a file and select it")
{
char *line;
- line = info_read_in_echo_area (window, (char *) _("Find file: "));
+ line = info_read_in_echo_area (window, _("Find file: "));
if (!line)
{
info_abort_key (active_window, 1, 0);
@@ -3105,7 +3284,7 @@ DECLARE_INFO_COMMAND (info_view_file, _("Read the name of a file and select it")
if (info_recent_file_error)
info_error (info_recent_file_error, NULL, NULL);
else
- info_error ((char *) _("Cannot find `%s'."), line, NULL);
+ info_error (_("Cannot find `%s'."), line, NULL);
}
else
info_set_node_of_window (1, window, node);
@@ -3148,7 +3327,7 @@ dump_nodes_to_file (char *filename, char **nodenames,
if (!output_stream)
{
- info_error ((char *) _("Could not create output file `%s'."),
+ info_error (_("Could not create output file `%s'."),
output_filename, NULL);
return;
}
@@ -3162,7 +3341,7 @@ dump_nodes_to_file (char *filename, char **nodenames,
fclose (output_stream);
#if defined (VERBOSE_NODE_DUMPING)
- info_error ((char *) _("Done."), NULL, NULL);
+ info_error (_("Done."), NULL, NULL);
#endif /* VERBOSE_NODE_DUMPING */
}
@@ -3196,11 +3375,11 @@ dump_node_to_stream (char *filename, char *nodename,
else
{
if (filename && *nodename != '(')
- info_error ((char *) msg_cant_file_node,
+ info_error (msg_cant_file_node,
filename_non_directory (filename),
nodename);
else
- info_error ((char *) msg_cant_find_node, nodename, NULL);
+ info_error (msg_cant_find_node, nodename, NULL);
}
return;
}
@@ -3217,7 +3396,7 @@ dump_node_to_stream (char *filename, char *nodename,
#if defined (VERBOSE_NODE_DUMPING)
/* Maybe we should print some information about the node being output. */
- info_error ((char *) _("Writing node %s..."), node_printed_rep (node), NULL);
+ info_error (_("Writing node %s..."), node_printed_rep (node), NULL);
#endif /* VERBOSE_NODE_DUMPING */
write_node_to_stream (node, stream);
@@ -3266,7 +3445,7 @@ dump_node_to_file (NODE *node, char *filename, int dump_subnodes)
if (!output_stream)
{
- info_error ((char *) _("Could not create output file `%s'."), filename,
+ info_error (_("Could not create output file `%s'."), filename,
NULL);
return;
}
@@ -3284,7 +3463,7 @@ dump_node_to_file (NODE *node, char *filename, int dump_subnodes)
fclose (output_stream);
#if defined (VERBOSE_NODE_DUMPING)
- info_error ((char *) _("Done."), NULL, NULL);
+ info_error (_("Done."), NULL, NULL);
#endif /* VERBOSE_NODE_DUMPING */
}
@@ -3328,13 +3507,13 @@ print_node (NODE *node)
if (!printer_pipe)
{
- info_error ((char *) _("Cannot open pipe to `%s'."), print_command, NULL);
+ info_error (_("Cannot open pipe to `%s'."), print_command, NULL);
return;
}
#if defined (VERBOSE_NODE_DUMPING)
/* Maybe we should print some information about the node being output. */
- info_error ((char *) _("Printing node %s..."), node_printed_rep (node), NULL);
+ info_error (_("Printing node %s..."), node_printed_rep (node), NULL);
#endif /* VERBOSE_NODE_DUMPING */
write_node_to_stream (node, printer_pipe);
@@ -3344,7 +3523,7 @@ print_node (NODE *node)
fclose (printer_pipe);
#if defined (VERBOSE_NODE_DUMPING)
- info_error ((char *) _("Done."), NULL, NULL);
+ info_error (_("Done."), NULL, NULL);
#endif /* VERBOSE_NODE_DUMPING */
}
@@ -3427,7 +3606,9 @@ info_search_in_node (char *string, NODE *node, long int start,
if (isearch_is_active)
binding.flags |= S_SkipDest;
- offset = search (string, &binding);
+ offset = (use_regex ?
+ regexp_search (string, &binding, node->nodelen):
+ search (string, &binding));
if (offset != -1 && window)
{
@@ -3517,6 +3698,7 @@ info_search_internal (char *string, WINDOW *window,
register int current_tag = 0, number_of_tags;
char *last_subfile;
TAG *tag;
+ char *msg = NULL;
/* Find number of tags and current tag. */
last_subfile = (char *)NULL;
@@ -3539,7 +3721,7 @@ info_search_internal (char *string, WINDOW *window,
while (1)
{
NODE *node;
-
+
/* Allow C-g to quit the search, failing it if pressed. */
return_if_control_g (-1);
@@ -3547,10 +3729,16 @@ info_search_internal (char *string, WINDOW *window,
for (i = current_tag + dir; i != current_tag; i += dir)
{
if (i < 0)
- i = number_of_tags - 1;
+ {
+ msg = N_("Search continued from the end of the document.");
+ i = number_of_tags - 1;
+ }
else if (i == number_of_tags)
- i = 0;
-
+ {
+ msg = N_("Search continued from the beginning of the document.");
+ i = 0;
+ }
+
tag = file_buffer->tags[i];
if (tag->nodelen != 0)
break;
@@ -3564,7 +3752,7 @@ info_search_internal (char *string, WINDOW *window,
if (!echo_area_is_active && (last_subfile != tag->filename))
{
window_message_in_echo_area
- ((char *) _("Searching subfile %s ..."),
+ (_("Searching subfile %s ..."),
filename_non_directory (tag->filename), NULL);
last_subfile = tag->filename;
@@ -3580,7 +3768,7 @@ info_search_internal (char *string, WINDOW *window,
if (info_recent_file_error)
info_error (info_recent_file_error, NULL, NULL);
else
- info_error ((char *) msg_cant_file_node,
+ info_error (msg_cant_file_node,
filename_non_directory (file_buffer->filename),
tag->nodename);
}
@@ -3600,7 +3788,12 @@ info_search_internal (char *string, WINDOW *window,
/* Yes! We win. */
remember_window_and_node (window, node);
if (!echo_area_is_active)
- window_clear_echo_area ();
+ {
+ if (msg)
+ window_message_in_echo_area ("%s", gettext (msg), NULL);
+ else
+ window_clear_echo_area ();
+ }
return (0);
}
@@ -3631,7 +3824,7 @@ DECLARE_INFO_COMMAND (info_search, _("Read a string and search for it"))
}
DECLARE_INFO_COMMAND (info_search_backward,
- _("Read a string and search backward for it"))
+ _("Read a string and search backward for it"))
{
last_search_direction = count > 0 ? -1 : 1;
last_search_case_sensitive = 0;
@@ -3655,7 +3848,7 @@ info_search_1 (WINDOW *window, int count, unsigned char key,
{
direction = 1;
if (count == 0)
- count = 1; /* for backward compatibility */
+ count = 1; /* for backward compatibility */
}
/* Read a string from the user, defaulting the search to SEARCH_STRING. */
@@ -3667,16 +3860,16 @@ info_search_1 (WINDOW *window, int count, unsigned char key,
if (ask_for_string)
{
- prompt = (char *)xmalloc (strlen (_("%s%sfor string [%s]: "))
- + strlen (_("Search backward"))
- + strlen (_("Search"))
- + strlen (_(" case-sensitively "))
- + strlen (_(" "))
- + strlen (search_string));
+ prompt = (char *)xmalloc (strlen (_("%s%s%s [%s]: "))
+ + strlen (_("Regexp search"))
+ + strlen (_(" case-sensitively"))
+ + strlen (_(" backward"))
+ + strlen (search_string));
- sprintf (prompt, _("%s%sfor string [%s]: "),
- direction < 0 ? _("Search backward") : _("Search"),
- case_sensitive ? _(" case-sensitively ") : _(" "),
+ sprintf (prompt, _("%s%s%s [%s]: "),
+ use_regex ? _("Regexp search") : _("Search"),
+ case_sensitive ? _(" case-sensitively") : "",
+ direction < 0 ? _(" backward") : "",
search_string);
line = info_read_in_echo_area (window, prompt);
@@ -3715,7 +3908,7 @@ info_search_1 (WINDOW *window, int count, unsigned char key,
active_window, direction, case_sensitive);
if (result != 0 && !info_error_was_printed)
- info_error ((char *) _("Search failed."), NULL, NULL);
+ info_error (_("Search failed."), NULL, NULL);
else if (old_pagetop != active_window->pagetop)
{
int new_pagetop;
@@ -3733,23 +3926,23 @@ info_search_1 (WINDOW *window, int count, unsigned char key,
}
DECLARE_INFO_COMMAND (info_search_next,
- _("Repeat last search in the same direction"))
+ _("Repeat last search in the same direction"))
{
if (!last_search_direction)
- info_error ((char *) _("No previous search string"), NULL, NULL);
+ info_error (_("No previous search string"), NULL, NULL);
else
info_search_1 (window, last_search_direction * count,
- key, last_search_case_sensitive, 0);
+ key, last_search_case_sensitive, 0);
}
DECLARE_INFO_COMMAND (info_search_previous,
- _("Repeat last search in the reverse direction"))
+ _("Repeat last search in the reverse direction"))
{
if (!last_search_direction)
- info_error ((char *) _("No previous search string"), NULL, NULL);
+ info_error (_("No previous search string"), NULL, NULL);
else
info_search_1 (window, -last_search_direction * count,
- key, last_search_case_sensitive, 0);
+ key, last_search_case_sensitive, 0);
}
/* **************************************************************** */
@@ -3848,9 +4041,11 @@ show_isearch_prompt (int dir, unsigned char *string, int failing_p)
unsigned int prompt_len, p_rep_index, p_rep_size;
if (dir < 0)
- prefix = _("I-search backward: ");
+ prefix = use_regex ? _("Regexp I-search backward: ")
+ : _("I-search backward: ");
else
- prefix = _("I-search: ");
+ prefix = use_regex ? _("Regexp I-search: ")
+ : _("I-search: ");
p_rep_index = p_rep_size = 0;
p_rep = (char *)NULL;
@@ -3986,11 +4181,11 @@ incremental_search (WINDOW *window, int count, unsigned char ignore)
else if (func == (VFunction *) isearch_forward
|| func == (VFunction *) isearch_backward)
{
- /* If this key invokes an incremental search, then this
- means that we will either search again in the same
- direction, search again in the reverse direction, or
- insert the last search string that was accepted through
- incremental searching. */
+ /* If this key invokes an incremental search, then this
+ means that we will either search again in the same
+ direction, search again in the reverse direction, or
+ insert the last search string that was accepted through
+ incremental searching. */
if ((func == (VFunction *) isearch_forward && dir > 0) ||
(func == (VFunction *) isearch_backward && dir < 0))
{
@@ -4062,17 +4257,17 @@ incremental_search (WINDOW *window, int count, unsigned char ignore)
last_isearch_accepted = xstrdup (isearch_string);
}
- /* If the key is the isearch_terminate_search_key, but some buffered
- input is pending, it is almost invariably because the ESC key is
- actually the beginning of an escape sequence, like in case they
- pressed an arrow key. So don't gobble the ESC key, push it back
- into pending input. */
- /* FIXME: this seems like a kludge! We need a more reliable
- mechanism to know when ESC is a separate key and when it is
- part of an escape sequence. */
+ /* If the key is the isearch_terminate_search_key, but some buffered
+ input is pending, it is almost invariably because the ESC key is
+ actually the beginning of an escape sequence, like in case they
+ pressed an arrow key. So don't gobble the ESC key, push it back
+ into pending input. */
+ /* FIXME: this seems like a kludge! We need a more reliable
+ mechanism to know when ESC is a separate key and when it is
+ part of an escape sequence. */
if (key != RET /* Emacs addicts want RET to get lost */
- && (key != isearch_terminate_search_key
- || info_any_buffered_input_p ()))
+ && (key != isearch_terminate_search_key
+ || info_any_buffered_input_p ()))
info_set_pending_input (key);
if (func == (VFunction *) info_abort_key)
@@ -4104,19 +4299,29 @@ incremental_search (WINDOW *window, int count, unsigned char ignore)
break;
}
-
- if (search_result == 0)
+ /* Regex isearch means we better search again every time. We
+ might have had a failed search for "\", for example, but now we
+ have "\.". */
+ if (use_regex)
{
+ search_result = info_search_internal (isearch_string,
+ window, dir, case_sensitive);
+ }
+ else if (search_result == 0)
+ { /* I don't understand why we test for search_result being
+ zero; it means if the search failed we don't search again.
+ Clearly the special check isn't applicable to regex search
+ anyway. --karl, 11feb08. */
/* Check to see if the current search string is right here. If
we are looking at it, then don't bother calling the search
function. */
if (((dir < 0) &&
- ((case_sensitive ? strncmp : strncasecmp)
+ ((case_sensitive ? strncmp : mbsncasecmp)
(window->node->contents + window->point,
isearch_string, isearch_string_index) == 0)) ||
((dir > 0) &&
((window->point - isearch_string_index) >= 0) &&
- ((case_sensitive ? strncmp : strncasecmp)
+ ((case_sensitive ? strncmp : mbsncasecmp)
(window->node->contents +
(window->point - (isearch_string_index - 1)),
isearch_string, isearch_string_index) == 0)))
@@ -4126,7 +4331,7 @@ incremental_search (WINDOW *window, int count, unsigned char ignore)
}
else
search_result = info_search_internal (isearch_string,
- window, dir, case_sensitive);
+ window, dir, case_sensitive);
}
/* If this search failed, and we didn't already have a failed search,
@@ -4227,7 +4432,7 @@ info_gc_file_buffers (void)
/* **************************************************************** */
/* Move to the next or previous cross reference in this node. */
-static void
+static int
info_move_to_xref (WINDOW *window, int count, unsigned char key, int dir)
{
long firstmenu, firstxref;
@@ -4235,6 +4440,10 @@ info_move_to_xref (WINDOW *window, int count, unsigned char key, int dir)
long placement = -1;
long start = 0;
NODE *node = window->node;
+ int save_use_regex = use_regex;
+
+ /* Most of our keywords contain * characters; don't use regexes. */
+ use_regex = 0;
if (dir < 0)
start = node->nodelen;
@@ -4270,8 +4479,10 @@ info_move_to_xref (WINDOW *window, int count, unsigned char key, int dir)
if (firstmenu == -1 && firstxref == -1)
{
- info_error ((char *) msg_no_xref_node, NULL, NULL);
- return;
+ if (!cursor_movement_scrolls_p)
+ info_error (msg_no_xref_node, NULL, NULL);
+ use_regex = save_use_regex;
+ return cursor_movement_scrolls_p;
}
/* There is at least one cross reference or menu entry in this node.
@@ -4298,6 +4509,9 @@ info_move_to_xref (WINDOW *window, int count, unsigned char key, int dir)
(INFO_MENU_ENTRY_LABEL, node, nextmenu + dir, (WINDOW *)NULL, dir, 0);
}
+ /* No more searches, back to whatever the user wanted. */
+ use_regex = save_use_regex;
+
/* If there is both a next menu entry, and a next xref entry, choose the
one which occurs first. Otherwise, select the one which actually
appears in this node following point. */
@@ -4318,22 +4532,28 @@ info_move_to_xref (WINDOW *window, int count, unsigned char key, int dir)
point, choose the first menu or xref entry appearing in this node. */
if (placement == -1)
{
- if (firstmenu != -1 && firstxref != -1)
+ if (cursor_movement_scrolls_p)
+ return 1;
+ else
{
- if (((dir == 1) && (firstmenu < firstxref)) ||
- ((dir == -1) && (firstmenu > firstxref)))
+ if (firstmenu != -1 && firstxref != -1)
+ {
+ if (((dir == 1) && (firstmenu < firstxref)) ||
+ ((dir == -1) && (firstmenu > firstxref)))
+ placement = firstmenu + 1;
+ else
+ placement = firstxref;
+ }
+ else if (firstmenu != -1)
placement = firstmenu + 1;
else
placement = firstxref;
}
- else if (firstmenu != -1)
- placement = firstmenu + 1;
- else
- placement = firstxref;
}
window->point = placement;
window_adjust_pagetop (window);
window->flags |= W_UpdateWindow;
+ return 0;
}
DECLARE_INFO_COMMAND (info_move_to_prev_xref,
@@ -4342,7 +4562,16 @@ DECLARE_INFO_COMMAND (info_move_to_prev_xref,
if (count < 0)
info_move_to_prev_xref (window, -count, key);
else
- info_move_to_xref (window, count, key, -1);
+ {
+ while (info_move_to_xref (window, count, key, -1))
+ {
+ info_error_was_printed = 0;
+ if (backward_move_node_structure (window, info_scroll_behaviour))
+ break;
+ move_to_new_line (window->line_count, window->line_count - 1,
+ window);
+ }
+ }
}
DECLARE_INFO_COMMAND (info_move_to_next_xref,
@@ -4351,7 +4580,19 @@ DECLARE_INFO_COMMAND (info_move_to_next_xref,
if (count < 0)
info_move_to_next_xref (window, -count, key);
else
- info_move_to_xref (window, count, key, 1);
+ {
+ /* Note: This can cause some blinking when the next cross reference is
+ located several nodes further. This effect can be easily suppressed
+ by setting display_inhibited to 1, however this will also make
+ error messages to be dumped on stderr, instead on the echo area. */
+ while (info_move_to_xref (window, count, key, 1))
+ {
+ info_error_was_printed = 0;
+ if (forward_move_node_structure (window, info_scroll_behaviour))
+ break;
+ move_to_new_line (0, 0, window);
+ }
+ }
}
/* Select the menu item or reference that appears on this line. */
@@ -4386,7 +4627,7 @@ DECLARE_INFO_COMMAND (info_abort_key, _("Cancel current operation"))
do it. */
if (!info_error_rings_bell_p)
terminal_ring_bell ();
- info_error ((char *) _("Quit"), NULL, NULL);
+ info_error (_("Quit"), NULL, NULL);
info_initialize_numeric_arg ();
info_clear_pending_input ();
@@ -4477,7 +4718,7 @@ DECLARE_INFO_COMMAND (info_quit, _("Quit using Info"))
/* Declaration only. Special cased in info_dispatch_on_key ().
Doc string is to avoid ugly results with describe_key etc. */
DECLARE_INFO_COMMAND (info_do_lowercase_version,
- _("Run command bound to this key's lowercase variant"))
+ _("Run command bound to this key's lowercase variant"))
{}
static void
@@ -4488,7 +4729,7 @@ dispatch_error (char *keyseq)
rep = pretty_keyseq (keyseq);
if (!echo_area_is_active)
- info_error ((char *) _("Unknown command (%s)."), rep, NULL);
+ info_error (_("Unknown command (%s)."), rep, NULL);
else
{
char *temp = xmalloc (1 + strlen (rep) + strlen (_("\"%s\" is invalid")));
@@ -4618,15 +4859,15 @@ info_dispatch_on_key (unsigned char key, Keymap map)
if (func == (VFunction *) info_do_lowercase_version)
{
#if defined(INFOKEY)
- unsigned char lowerkey;
-
- lowerkey = Meta_p(key) ? Meta (tolower (UnMeta (key))) : tolower (key);
- if (lowerkey == key)
- {
- add_char_to_keyseq (key);
- dispatch_error (info_keyseq);
- return;
- }
+ unsigned char lowerkey;
+
+ lowerkey = Meta_p(key) ? Meta (tolower (UnMeta (key))) : tolower (key);
+ if (lowerkey == key)
+ {
+ add_char_to_keyseq (key);
+ dispatch_error (info_keyseq);
+ return;
+ }
info_dispatch_on_key (lowerkey, map);
#else /* !INFOKEY */
info_dispatch_on_key (tolower (key), map);
@@ -4942,15 +5183,15 @@ info_gather_typeahead (void)
chars_avail = pc_term_chars_avail ();
else
{
- /* We could be more accurate by calling ltell, but we have no idea
- whether tty is buffered by stdio functions, and if so, how many
- characters are already waiting in the buffer. So we punt. */
- struct stat st;
-
- if (fstat (tty, &st) < 0)
- chars_avail = 1;
- else
- chars_avail = st.st_size;
+ /* We could be more accurate by calling ltell, but we have no idea
+ whether tty is buffered by stdio functions, and if so, how many
+ characters are already waiting in the buffer. So we punt. */
+ struct stat st;
+
+ if (fstat (tty, &st) < 0)
+ chars_avail = 1;
+ else
+ chars_avail = st.st_size;
}
if (chars_avail > space_avail)
chars_avail = space_avail;
@@ -4999,7 +5240,7 @@ info_get_input_char (void)
{
int n;
do
- n = read (tty, &c, 1);
+ n = read (tty, &c, 1);
while (n == -1 && errno == EINTR);
rawkey = n == 1 ? c : EOF;
}
@@ -5015,7 +5256,7 @@ info_get_input_char (void)
{
fclose (info_input_stream);
info_input_stream = stdin;
- tty = fileno (info_input_stream);
+ tty = fileno (info_input_stream);
display_inhibited = 0;
display_update_display (windows);
display_cursor_at_point (active_window);
diff --git a/Build/source/utils/texinfo/info/session.h b/Build/source/utils/texinfo/info/session.h
index 62f8ffe57d2..2052d07cae8 100644
--- a/Build/source/utils/texinfo/info/session.h
+++ b/Build/source/utils/texinfo/info/session.h
@@ -1,13 +1,13 @@
/* session.h -- Functions found in session.c.
- $Id: session.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: session.h,v 1.10 2008/03/04 09:44:57 gray Exp $
- Copyright (C) 1993, 1998, 1999, 2001, 2002, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1998, 1999, 2001, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,10 +15,9 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
- Written by Brian Fox (bfox@ai.mit.edu). */
+ Originally written by Brian Fox (bfox@ai.mit.edu). */
#ifndef SESSION_H
#define SESSION_H
@@ -60,6 +59,18 @@ extern char *info_scroll_choices[];
#define IS_NextOnly 1 /* Try to get "Next:" menu item. */
#define IS_PageOnly 2 /* Simply give up at the bottom of a node. */
+extern int cursor_movement_scrolls_p;
+
+/* Values for scroll_last_node */
+#define SLN_Stop 0 /* Stop at the last node */
+#define SLN_Scroll 1 /* Do usual scrolling */
+#define SLN_Top 2 /* Go to the top node */
+
+extern char *scroll_last_node_choices[];
+/* Controls what to do when a scrolling command is issued at the end of the
+ last node. */
+extern int scroll_last_node;
+
/* Utility functions found in session.c */
extern void info_dispatch_on_key (unsigned char key, Keymap map);
extern unsigned char info_get_input_char (void);
@@ -108,7 +119,7 @@ extern void begin_multiple_window_info_session (char *filename,
char **nodenames);
extern void begin_info_session (NODE *initial_node);
extern void begin_info_session_with_error (NODE *initial_node,
- char *format, void *arg1, void *arg2);
+ const char *format, void *arg1, void *arg2);
extern void info_session (void);
extern void initialize_info_session (NODE *node, int clear_screen);
extern void info_read_and_dispatch (void);
@@ -134,6 +145,7 @@ extern void info_scroll_forward (WINDOW *window, int count, unsigned char key);
extern void info_scroll_backward (WINDOW *window, int count, unsigned char key);
extern void info_redraw_display (WINDOW *window, int count, unsigned char key);
extern void info_toggle_wrap (WINDOW *window, int count, unsigned char key);
+extern void info_toggle_regexp (WINDOW *window, int count, unsigned char key);
extern void info_move_to_window_line (WINDOW *window, int count,
unsigned char key);
extern void info_up_line (WINDOW *window, int count, unsigned char key);
diff --git a/Build/source/utils/texinfo/info/signals.c b/Build/source/utils/texinfo/info/signals.c
index 724768b4ec7..0657f97f69e 100644
--- a/Build/source/utils/texinfo/info/signals.c
+++ b/Build/source/utils/texinfo/info/signals.c
@@ -1,13 +1,13 @@
/* signals.c -- install and maintain signal handlers.
- $Id: signals.c,v 1.7 2004/04/11 17:56:46 karl Exp $
+ $Id: signals.c,v 1.10 2007/07/01 21:20:31 karl Exp $
- Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/signals.h b/Build/source/utils/texinfo/info/signals.h
index 2e3761e37b8..08992adfef6 100644
--- a/Build/source/utils/texinfo/info/signals.h
+++ b/Build/source/utils/texinfo/info/signals.h
@@ -1,12 +1,13 @@
/* signals.h -- header to include system dependent signal definitions.
- $Id: signals.h,v 1.2 2004/04/11 17:56:46 karl Exp $
+ $Id: signals.h,v 1.5 2007/07/01 21:20:31 karl Exp $
- Copyright (C) 1993, 1994, 1995, 1997, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1995, 1997, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/termdep.h b/Build/source/utils/texinfo/info/termdep.h
index 45f38aca5b3..d8343d53fe3 100644
--- a/Build/source/utils/texinfo/info/termdep.h
+++ b/Build/source/utils/texinfo/info/termdep.h
@@ -1,13 +1,13 @@
/* termdep.h -- system things that terminal.c depends on.
- $Id: termdep.h,v 1.2 2004/04/11 17:56:46 karl Exp $
+ $Id: termdep.h,v 1.5 2007/07/01 21:20:31 karl Exp $
- Copyright (C) 1993, 1996, 1997, 1998, 2001, 2002 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1996, 1997, 1998, 2001, 2002, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/terminal.c b/Build/source/utils/texinfo/info/terminal.c
index 9238643d456..c3ddd56fe09 100644
--- a/Build/source/utils/texinfo/info/terminal.c
+++ b/Build/source/utils/texinfo/info/terminal.c
@@ -1,13 +1,13 @@
/* terminal.c -- how to handle the physical terminal for Info.
- $Id: terminal.c,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: terminal.c,v 1.6 2007/07/01 21:20:31 karl Exp $
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1996, 1997, 1998,
- 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
+ 1999, 2001, 2002, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Originally written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/terminal.h b/Build/source/utils/texinfo/info/terminal.h
index dbf6b496ff8..135b3aea10d 100644
--- a/Build/source/utils/texinfo/info/terminal.h
+++ b/Build/source/utils/texinfo/info/terminal.h
@@ -1,13 +1,13 @@
/* terminal.h -- The external interface to terminal I/O.
- $Id: terminal.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: terminal.h,v 1.6 2007/07/01 21:20:31 karl Exp $
- Copyright (C) 1993, 1996, 1997, 2001, 2002, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1996, 1997, 2001, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/tilde.c b/Build/source/utils/texinfo/info/tilde.c
index ac32abd040a..602963115b8 100644
--- a/Build/source/utils/texinfo/info/tilde.c
+++ b/Build/source/utils/texinfo/info/tilde.c
@@ -1,13 +1,13 @@
/* tilde.c -- tilde expansion code (~/foo := $HOME/foo).
- $Id: tilde.c,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: tilde.c,v 1.7 2007/07/01 21:20:31 karl Exp $
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1996, 1998, 1999,
- 2002, 2004 Free Software Foundation, Inc.
+ 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,12 +15,10 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
-/* Include config.h before doing alloca. */
#include "info.h"
#include "tilde.h"
diff --git a/Build/source/utils/texinfo/info/tilde.h b/Build/source/utils/texinfo/info/tilde.h
index b499f3efea2..4287cb5a78e 100644
--- a/Build/source/utils/texinfo/info/tilde.h
+++ b/Build/source/utils/texinfo/info/tilde.h
@@ -1,16 +1,16 @@
/* tilde.h: Externally available variables and function in libtilde.a.
- $Id: tilde.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: tilde.h,v 1.6 2007/07/01 21:20:31 karl Exp $
This file has appeared in prior works by the Free Software Foundation;
thus it carries copyright dates from 1988 through 1993.
- Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,8 +18,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
diff --git a/Build/source/utils/texinfo/info/variables.c b/Build/source/utils/texinfo/info/variables.c
index 3636801a49b..834094632ae 100644
--- a/Build/source/utils/texinfo/info/variables.c
+++ b/Build/source/utils/texinfo/info/variables.c
@@ -1,12 +1,13 @@
/* variables.c -- how to manipulate user visible variables in Info.
- $Id: variables.c,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: variables.c,v 1.9 2008/03/04 09:45:15 gray Exp $
- Copyright (C) 1993, 1997, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2001, 2002, 2004, 2007
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -60,14 +60,28 @@ VARIABLE_ALIST info_variables[] = {
N_("Controls what happens when scrolling is requested at the end of a node"),
&info_scroll_behaviour, (char **)info_scroll_choices },
+ /* Alternate spelling */
+ { "scroll-behavior",
+ N_("Same as scroll-behaviour"),
+ &info_scroll_behaviour, (char **)info_scroll_choices },
+
{ "scroll-step",
N_("The number lines to scroll when the cursor moves out of the window"),
&window_scroll_step, (char **)NULL },
+ { "cursor-movement-scrolls",
+ N_("Controls whether scroll-behavior affects cursor movement commands"),
+ &cursor_movement_scrolls_p, (char **)on_off_choices },
+
{ "ISO-Latin",
N_("When \"On\", Info accepts and displays ISO Latin characters"),
&ISO_Latin_p, (char **)on_off_choices },
+ { "scroll-last-node",
+ N_("What to do when a scrolling command is issued at the end of the "
+ "last node"),
+ &scroll_last_node, (char**)scroll_last_node_choices },
+
{ (char *)NULL, (char *)NULL, (int *)NULL, (char **)NULL }
};
@@ -77,7 +91,7 @@ DECLARE_INFO_COMMAND (describe_variable, _("Explain the use of a variable"))
char *description;
/* Get the variable's name. */
- var = read_variable_name ((char *) _("Describe variable: "), window);
+ var = read_variable_name (_("Describe variable: "), window);
if (!var)
return;
@@ -102,7 +116,7 @@ DECLARE_INFO_COMMAND (set_variable, _("Set the value of an Info variable"))
char *line;
/* Get the variable's name and value. */
- var = read_variable_name ((char *) _("Set variable: "), window);
+ var = read_variable_name (_("Set variable: "), window);
if (!var)
return;
@@ -201,7 +215,7 @@ DECLARE_INFO_COMMAND (set_variable, _("Set the value of an Info variable"))
address of a VARIABLE_ALIST member. A return value of NULL indicates
that no variable could be read. */
VARIABLE_ALIST *
-read_variable_name (char *prompt, WINDOW *window)
+read_variable_name (const char *prompt, WINDOW *window)
{
register int i;
char *line;
diff --git a/Build/source/utils/texinfo/info/variables.h b/Build/source/utils/texinfo/info/variables.h
index 7e5b08239b0..309814e932d 100644
--- a/Build/source/utils/texinfo/info/variables.h
+++ b/Build/source/utils/texinfo/info/variables.h
@@ -1,15 +1,15 @@
/* variables.h -- Description of user visible variables in Info.
- $Id: variables.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: variables.h,v 1.9 2008/03/04 09:45:27 gray Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -42,7 +41,7 @@ typedef struct {
/* Read the name of an Info variable in the echo area and return the
address of a VARIABLE_ALIST member. A return value of NULL indicates
that no variable could be read. */
-extern VARIABLE_ALIST *read_variable_name (char *prompt, WINDOW *window);
+extern VARIABLE_ALIST *read_variable_name (const char *prompt, WINDOW *window);
/* Make an array of REFERENCE which actually contains the names of the
variables available in Info. */
@@ -61,6 +60,8 @@ extern int gc_compressed_files;
extern int show_index_match;
extern int info_scroll_behaviour;
extern int window_scroll_step;
+extern int cursor_movement_scrolls_p;
extern int ISO_Latin_p;
+extern int scroll_last_node;
#endif /* not INFO_VARIABLES_H */
diff --git a/Build/source/utils/texinfo/info/window.c b/Build/source/utils/texinfo/info/window.c
index cf5665b038d..7612a3699eb 100644
--- a/Build/source/utils/texinfo/info/window.c
+++ b/Build/source/utils/texinfo/info/window.c
@@ -1,13 +1,13 @@
/* window.c -- windows in Info.
- $Id: window.c,v 1.4 2004/04/11 17:56:46 karl Exp $
+ $Id: window.c,v 1.10 2008/02/26 16:51:06 karl Exp $
- Copyright (C) 1993, 1997, 1998, 2001, 2002, 2003, 2004 Free Software
- Foundation, Inc.
+ Copyright (C) 1993, 1997, 1998, 2001, 2002, 2003, 2004, 2007, 2008
+ Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,8 +15,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -250,9 +249,22 @@ window_new_screen_size (int width, int height)
break;
}
else
- win= win->next;
+ win = win->next;
}
}
+
+ /* One more loop. If any heights or widths have become negative,
+ set them to zero. This can apparently happen with resizing down to
+ very small sizes. Sadly, it is not apparent to me where in the
+ above calculations it goes wrong. */
+ for (win = windows; win; win = win->next)
+ {
+ if (win->height < 0)
+ win->height = 0;
+
+ if (win->width < 0)
+ win->width = 0;
+ }
}
/* Make a new window showing NODE, and return that window structure.
@@ -905,11 +917,11 @@ recalculate_line_starts (WINDOW *window)
calculate_line_starts (window);
}
-/* Global variable control redisplay of scrolled windows. If non-zero, it
- is the desired number of lines to scroll the window in order to make
- point visible. A user might set this to 1 for smooth scrolling. If
- set to zero, the line containing point is centered within the window. */
-int window_scroll_step = 0;
+/* Global variable control redisplay of scrolled windows. If non-zero,
+ it is the desired number of lines to scroll the window in order to
+ make point visible. A value of 1 produces smooth scrolling. If set
+ to zero, the line containing point is centered within the window. */
+int window_scroll_step = 1;
/* Adjust the pagetop of WINDOW such that the cursor point will be visible. */
void
@@ -1257,7 +1269,7 @@ window_clear_echo_area (void)
printf () hair is present. The message appears immediately. If there was
already a message appearing in the echo area, it is removed. */
void
-window_message_in_echo_area (char *format, void *arg1, void *arg2)
+window_message_in_echo_area (const char *format, void *arg1, void *arg2)
{
free_echo_area ();
echo_area_node = build_message_node (format, arg1, arg2);
@@ -1274,7 +1286,7 @@ static int old_echo_area_nodes_index = 0;
static int old_echo_area_nodes_slots = 0;
void
-message_in_echo_area (char *format, void *arg1, void *arg2)
+message_in_echo_area (const char *format, void *arg1, void *arg2)
{
if (echo_area_node)
{
@@ -1324,7 +1336,7 @@ message_buffer_resize (int length)
/* Format MESSAGE_BUFFER with the results of printing FORMAT with ARG1 and
ARG2. */
static void
-build_message_buffer (char *format, void *arg1, void *arg2, void *arg3)
+build_message_buffer (const char *format, void *arg1, void *arg2, void *arg3)
{
register int i, len;
void *args[3];
@@ -1348,7 +1360,7 @@ build_message_buffer (char *format, void *arg1, void *arg2, void *arg3)
else
{
char c;
- char *fmt_start = format + i;
+ const char *fmt_start = format + i;
char *fmt;
int fmt_len, formatted_len;
int paramed = 0;
@@ -1471,7 +1483,7 @@ build_message_buffer (char *format, void *arg1, void *arg2, void *arg3)
/* Build a new node which has FORMAT printed with ARG1 and ARG2 as the
contents. */
NODE *
-build_message_node (char *format, void *arg1, void *arg2)
+build_message_node (const char *format, void *arg1, void *arg2)
{
NODE *node;
@@ -1513,7 +1525,7 @@ initialize_message_buffer (void)
/* Print FORMAT with ARG1,2 to the end of the current message buffer. */
void
-printf_to_message_buffer (char *format, void *arg1, void *arg2, void *arg3)
+printf_to_message_buffer (const char *format, void *arg1, void *arg2, void *arg3)
{
build_message_buffer (format, arg1, arg2, arg3);
}
diff --git a/Build/source/utils/texinfo/info/window.h b/Build/source/utils/texinfo/info/window.h
index 44f620f0a46..dd0138f42ed 100644
--- a/Build/source/utils/texinfo/info/window.h
+++ b/Build/source/utils/texinfo/info/window.h
@@ -1,15 +1,15 @@
/* window.h -- Structure and flags used in manipulating Info windows.
- $Id: window.h,v 1.3 2004/04/11 17:56:46 karl Exp $
+ $Id: window.h,v 1.7 2008/02/26 16:51:06 karl Exp $
This file is part of GNU Info, a program for reading online documentation
stored in Info format.
- Copyright (C) 1993, 1997, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1997, 2004, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -17,8 +17,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Written by Brian Fox (bfox@ai.mit.edu). */
@@ -167,13 +166,13 @@ extern void window_goto_percentage (WINDOW *window, int percent);
/* Build a new node which has FORMAT printed with ARG1 and ARG2 as the
contents. */
-extern NODE *build_message_node (char *format, void *arg1, void *arg2);
+extern NODE *build_message_node (const char *format, void *arg1, void *arg2);
/* Useful functions can be called from outside of window.c. */
extern void initialize_message_buffer (void);
/* Print FORMAT with ARG1,2 to the end of the current message buffer. */
-extern void printf_to_message_buffer (char *format, void *arg1, void *arg2,
+extern void printf_to_message_buffer (const char *format, void *arg1, void *arg2,
void *arg3);
/* Convert the contents of the message buffer to a node. */
@@ -189,13 +188,13 @@ extern int pad_to (int count, char *string);
The arguments are treated similar to printf () arguments, but not all of
printf () hair is present. The message appears immediately. If there was
already a message appearing in the echo area, it is removed. */
-extern void window_message_in_echo_area (char *format, void *arg1, void *arg2);
+extern void window_message_in_echo_area (const char *format, void *arg1, void *arg2);
/* Place a temporary message in the echo area built from FORMAT, ARG1
and ARG2. The message appears immediately, but does not destroy
any existing message. A future call to unmessage_in_echo_area ()
restores the old contents. */
-extern void message_in_echo_area (char *format, void *arg1, void *arg2);
+extern void message_in_echo_area (const char *format, void *arg1, void *arg2);
extern void unmessage_in_echo_area (void);
/* Clear the echo area, removing any message that is already present.