diff -Nrc2 readline-4.2/CHANGELOG readline-4.2a/CHANGELOG *** readline-4.2/CHANGELOG Fri Apr 6 15:15:12 2001 --- readline-4.2a/CHANGELOG Fri Nov 2 11:42:09 2001 *************** *** 464,465 **** --- 464,610 ---- --- [readline-4.2 frozen] + + 4/9 + --- + [readline-4.2 released] + + 5/2 + --- + Makefile.in,{doc,examples,shlib}/Makefile.in + - added support for DESTDIR installation root prefix, to support + building packages + + doc/Makefile.in + - add an info `dir' file entry for rluserman.info on `make install' + - change man1ext to `.1' and man3ext to `.3' + - install man pages with a $(man3ext) extension in the target directory + - add support for installing html documentation if `htmldir' has a + value + + Makefile.in + - on `make install', install from the `shlib' directory, too + - on `make uninstall', uninstall in the `doc' and `shlib' + subdirectories, too + + support/shlib-install + - add `freebsdelf*', `freebsdaout*', Hurd, `sysv4*', `sysv5*', `dgux*' + targets for symlink creation + + 5/7 + --- + configure.in, config.h.in + - check for , define HAVE_LIMITS_H if found + + 5/8 + --- + aclocal.m4 + - pick up change to BASH_CHECK_LIB_TERMCAP that adds check for + libtinfo (termcap-specific portion of ncurses-5.2) + + 5/9 + --- + configure.in + - call AC_C_CONST to find out whether or not the compiler supports + `const' + + config.h.in + - placeholder for `const' define, if any + + 5/10 + ---- + configure.in + - fix AC_CHECK_PROG(ar, ...) test to specify right value for the + case where ar is not found; should produce a better error message + + 5/14 + ---- + configure.in,config.h.in + - check for vsnprintf, define HAVE_VSNPRINTF if found + + 5/21 + ---- + configure.in, config.h.in + - add checks for size_t, ssize_t + + 5/30 + ---- + configure.in + - update autoconf to version 2.50, use in AC_PREREQ + - changed AC_INIT to new flavor + - added AC_CONFIG_SRCDIR + - AC_CONFIG_HEADER -> AC_CONFIG_HEADERS + - call AC_C_PROTOTYPES + - AC_RETSIGTYPE -> AC_TYPE_SIGNAL + + 8/22 + ---- + configure.in + - updated the version number to 4.2a + + Makefile.in,shlib/Makefile.in + - make sure tilde.o is built -DREADLINE_LIBRARY when being built as + part of the standalone library, so it picks up the right include + files + + 8/23 + ---- + support/shlib-install + - support for Darwin/MacOS X shared library installation + + 9/24 + ---- + examples/readlinebuf.h + - a new file, a C++ streambuf interface that uses readline for I/O. + Donated by Dimitris Vyzovitis + + 10/9 + ---- + configure.in + - replaced call to BASH_HAVE_TIOCGWINSZ with AC_HEADER_TIOCGWINSZ + + [readline-4.2a-beta1 frozen] + + 10/15 + ----- + configure.in, config.h.in + - check for , define HAVE_MEMORY_H if found + - check for , define HAVE_STRINGS_H if found + + 10/18 + ----- + configure.in, config.h.in + - check for isascii, define HAVE_ISASCII if found + + configure.in + - changed the macro names from bash as appropriate: + BASH_SIGNAL_CHECK -> BASH_SYS_SIGNAL_VINTAGE + BASH_REINSTALL_SIGHANDLERS -> BASH_SYS_REINSTALL_SIGHANDLERS + BASH_MISC_SPEED_T -> BASH_CHECK_SPEED_T + + 10/22 + ----- + configure.in + - check for isxdigit with AC_CHECK_FUNCS + + config.h.in + - new define for HAVE_ISXDIGIT + + 10/29 + ----- + configure.in, config.h.in + - check for strpbrk with AC_CHECK_FUNCS, define HAVE_STRPBRK if found + + 11/1 + ---- + Makefile.in + - make sure DESTDIR is passed to install and uninstall makes in + subdirectories + - when saving old copies of installed libraries, make sure we use + DESTDIR for the old installation tree + + [readline-4.2a-rc1 frozen] + + 11/2 + ---- + Makefile.in, shlib/Makefile.in + - don't put -I$(includedir) into CFLAGS diff -Nrc2 readline-4.2/CHANGES readline-4.2a/CHANGES *** readline-4.2/CHANGES Tue Apr 3 10:34:07 2001 --- readline-4.2a/CHANGES Wed Nov 7 17:00:32 2001 *************** *** 1,2 **** --- 1,81 ---- + This document details the changes between this version, readline-4.2a, + and the previous version, readline-4.2. + + 1. Changes to Readline + + a. More `const' and type casting fixes. + + b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer + overflow problems. + + c. The completion code no longer appends a `/' or ` ' to a match when + completing a symbolic link that resolves to a directory name, unless + the match does not add anything to the word being completed. This + means that a tab will complete the word up to the full name, but not + add anything, and a subsequent tab will add a slash. + + d. Fixed a trivial typo that made the vi-mode `dT' command not work. + + e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert. + + f. Fixed the tty code so that ^V works more than once. + + g. Changed the use of __P((...)) for function prototypes to PARAMS((...)) + because the use of __P in typedefs conflicted g++ and glibc. + + h. The completion code now attempts to do a better job of preserving the + case of the word the user typed if ignoring case in completions. + + i. Readline defaults to not echoing the input and lets the terminal + initialization code enable echoing if there is a controlling terminal. + + j. The key binding code now processes only two hex digits after a `\x' + escape sequence, and the documentation was changed to note that the + octal and hex escape sequences result in an eight-bit value rather + than strict ASCII. + + k. Fixed a few places where negative array subscripts could have occurred. + + l. Fixed the vi-mode code to use a better method to determine the bounds of + the array used to hold the marks, and to avoid out-of-bounds references. + + m. Fixed the defines in chardefs.h to work better when chars are signed. + + n. Fixed configure.in to use the new names for bash autoconf macros. + + o. Readline no longer attempts to define its own versions of some ctype + macros if they are implemented as functions in libc but not as macros in + . + + p. Fixed a problem where rl_backward could possibly set point to before + the beginning of the line. + + q. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause + include file problems. + + 2. New Features in Readline + + a. Added extern declaration for rl_get_termcap to readline.h, making it a + public function (it was always there, just not in readline.h). + + b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402, + RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2. + + c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION. + + d. New bindable boolean readline variable: match-hidden-files. Controls + completion of files beginning with a `.' (on Unix). Enabled by default. + + e. The history expansion code now allows any character to terminate a + `:first-' modifier, like csh. + + f. The incremental search code remembers the last search string and uses + it if ^R^R is typed without a search string. + + h. New bindable variable `history-preserve-point'. If set, the history + code attempts to place the user at the same location on each history + line retrived with previous-history or next-history. + + ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.2, and the previous version, readline-4.1. diff -Nrc2 readline-4.2/INSTALL readline-4.2a/INSTALL *** readline-4.2/INSTALL Tue Apr 11 14:44:59 1995 --- readline-4.2a/INSTALL Wed Aug 22 13:43:01 2001 *************** *** 2,66 **** ================== ! These are generic installation instructions. ! The `configure' shell script attempts to guess correct values for ! various system-dependent variables used during compilation. It uses ! those values to create a `Makefile' in each directory of the package. ! It may also create one or more `.h' files containing system-dependent ! definitions. Finally, it creates a shell script `config.status' that ! you can run in the future to recreate the current configuration, a file ! `config.cache' that saves the results of its tests to speed up ! reconfiguring, and a file `config.log' containing compiler output ! (useful mainly for debugging `configure'). ! ! If you need to do unusual things to compile the package, please try ! to figure out how `configure' could check whether to do them, and mail ! diffs or instructions to the address given in the `README' so they can ! be considered for the next release. If at some point `config.cache' ! contains results you don't want to keep, you may remove or edit it. ! ! The file `configure.in' is used to create `configure' by a program ! called `autoconf'. You only need `configure.in' if you want to change ! it or regenerate `configure' using a newer version of `autoconf'. ! The simplest way to compile this package is: ! ! 1. `cd' to the directory containing the package's source code and type ! `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. ! Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. ! 2. Type `make' to compile the package. ! ! 3. Optionally, type `make check' to run any self-tests that come with ! the package. ! ! 4. Type `make install' to install the programs and any data files and ! documentation. ! ! 5. You can remove the program binaries and object files from the ! source code directory by typing `make clean'. To also remove the ! files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly ! for the package's developers. If you use it, you may have to get ! all sorts of other programs in order to regenerate files that came ! with the distribution. Compilers and Options ===================== ! Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure --- 2,71 ---- ================== ! These are installation instructions for Readline 4.2a. ! The simplest way to compile readline is: ! 1. `cd' to the directory containing the readline source code and type ! `./configure' to configure readline for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. ! Running `configure' takes some time. While running, it prints some messages telling which features it is checking for. ! 2. Type `make' to compile readline and build the static libreadline ! and libhistory libraries. See below for instructions on compiling ! the other parts of the distribution. Typing `make everything' will ! cause the static and shared libraries (if supported) and the example ! programs to be built. ! ! 3. Type `make install' to install the static libreadline and libhistory ! libraries, the readline include files, and the documentation. ! ! 4. You can remove the created libraries and object files from the ! build directory by typing `make clean'. To also remove the ! files that `configure' created (so you can compile readline for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly ! for the readline developers, and should be used with care. ! ! The `configure' shell script attempts to guess correct values for ! various system-dependent variables used during compilation. It ! uses those values to create a `Makefile' in the build directory, ! and Makefiles in the `doc', `shlib', and `examples' ! subdirectories. It also creates a `config.h' file containing ! system-dependent definitions. Finally, it creates a shell script ! `config.status' that you can run in the future to recreate the ! current configuration, a file `config.cache' that saves the ! results of its tests to speed up reconfiguring, and a file ! `config.log' containing compiler output (useful mainly for ! debugging `configure'). ! ! If you need to do unusual things to compile readline, please try ! to figure out how `configure' could check whether to do them, and ! mail diffs or instructions to so they can ! be considered for the next release. If at some point ! `config.cache' contains results you don't want to keep, you may ! remove or edit it. ! ! The file `configure.in' is used to create `configure' by a ! program called `autoconf'. You only need `configure.in' if you ! want to change it or regenerate `configure' using a newer version ! of `autoconf'. Compilers and Options ===================== ! Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure *************** *** 68,72 **** ==================================== ! You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that --- 73,77 ---- ==================================== ! You can compile readline for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that *************** *** 76,142 **** source code in the directory that `configure' is in and in `..'. ! If you have to use a `make' that does not supports the `VPATH' ! variable, you have to compile the package for one architecture at a time ! in the source code directory. After you have installed the package for ! one architecture, use `make distclean' before reconfiguring for another ! architecture. Installation Names ================== ! By default, `make install' will install the package's files in ! `/usr/local/bin', `/usr/local/man', etc. You can specify an ! installation prefix other than `/usr/local' by giving `configure' the ! option `--prefix=PATH'. ! ! You can specify separate installation prefixes for ! architecture-specific files and architecture-independent files. If you ! give `configure' the option `--exec-prefix=PATH', the package will use ! PATH as the prefix for installing programs and libraries. ! Documentation and other data files will still use the regular prefix. ! ! If the package supports it, you can cause programs to be installed ! with an extra prefix or suffix on their names by giving `configure' the ! option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. ! ! Optional Features ! ================= ! ! Some packages pay attention to `--enable-FEATURE' options to ! `configure', where FEATURE indicates an optional part of the package. ! They may also pay attention to `--with-PACKAGE' options, where PACKAGE ! is something like `gnu-as' or `x' (for the X Window System). The ! `README' should mention any `--enable-' and `--with-' options that the ! package recognizes. ! ! For packages that use the X Window System, `configure' can usually ! find the X include and library files automatically, but if it doesn't, ! you can use the `configure' options `--x-includes=DIR' and ! `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== ! There may be some features `configure' can not figure out ! automatically, but needs to determine by the type of host the package ! will run on. Usually `configure' can figure that out, but if it prints ! a message saying it can not guess the host type, give it the ! `--host=TYPE' option. TYPE can either be a short name for the system ! type, such as `sun4', or a canonical name with three fields: ! CPU-COMPANY-SYSTEM ! ! See the file `config.sub' for the possible values of each field. If ! `config.sub' isn't included in this package, then this package doesn't ! need to know the host type. ! ! If you are building compiler tools for cross-compiling, you can also ! use the `--target=TYPE' option to select the type of system they will ! produce code for and the `--build=TYPE' option to select the type of ! system on which you are compiling the package. Sharing Defaults ================ ! If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. --- 81,125 ---- source code in the directory that `configure' is in and in `..'. ! If you have to use a `make' that does not supports the `VPATH' ! variable, you have to compile readline for one architecture at a ! time in the source code directory. After you have installed ! readline for one architecture, use `make distclean' before ! reconfiguring for another architecture. Installation Names ================== ! By default, `make install' will install the readline libraries in ! `/usr/local/lib', the include files in ! `/usr/local/include/readline', the man pages in `/usr/local/man', ! and the info files in `/usr/local/info'. You can specify an ! installation prefix other than `/usr/local' by giving `configure' ! the option `--prefix=PATH' or by supplying a value for the ! DESTDIR variable when running `make install'. ! ! You can specify separate installation prefixes for ! architecture-specific files and architecture-independent files. ! If you give `configure' the option `--exec-prefix=PATH', the ! readline Makefiles will use PATH as the prefix for installing the ! libraries. Documentation and other data files will still use the ! regular prefix. Specifying the System Type ========================== ! There may be some features `configure' can not figure out ! automatically, but need to determine by the type of host readline ! will run on. Usually `configure' can figure that out, but if it ! prints a message saying it can not guess the host type, give it ! the `--host=TYPE' option. TYPE can either be a short name for ! the system type, such as `sun4', or a canonical name with three ! fields: CPU-COMPANY-SYSTEM (e.g., i386-unknown-freebsd4.2). ! ! See the file `config.sub' for the possible values of each field. Sharing Defaults ================ ! If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. *************** *** 144,153 **** `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. ! A warning: not all `configure' scripts look for a site script. Operation Controls ================== ! `configure' recognizes the following options to control how it operates. --- 127,137 ---- `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. ! A warning: the readline `configure' looks for a site script, but not ! all `configure' scripts do. Operation Controls ================== ! `configure' recognizes the following options to control how it operates. *************** *** 175,176 **** --- 159,256 ---- `configure' also accepts some other, not widely useful, options. + Optional Features + ================= + + The readline `configure' takes a single `--with-PACKAGE' option: + + `--with-curses' + This tells readline that it can find the termcap library functions + (tgetent, et al.) in the curses library, rather than a separate + termcap library. Readline uses the termcap functions, but does not + link with the termcap or curses library itself, allowing applications + which link with readline the to choose an appropriate library. + This option tells readline to link the example programs with the + curses library rather than libtermcap. + + Shared Libraries + ================ + + There is support for building shared versions of the readline and + history libraries. The configure script creates a Makefile in + the `shlib' subdirectory, and typing `make shared' will cause + shared versions of the readline and history libraries to be built + on supported platforms. `make everything' will run `make shared' + after building the static libraries. + + Configure calls the script support/shobj-conf to test whether or + not shared library creation is supported and to generate the values + of variables that are substituted into shlib/Makefile. If you + try to build shared libraries on an unsupported platform, `make' + will display a message asking you to update support/shobj-conf for + your platform. + + If you need to update support/shobj-conf, you will need to create + a `stanza' for your operating system and compiler. The script uses + the value of host_os and ${CC} as determined by configure. For + instance, FreeBSD 4.2 with any version of gcc is identified as + `freebsd4.2-gcc*'. + + In the stanza for your operating system-compiler pair, you will need to + define several variables. They are: + + SHOBJ_CC The C compiler used to compile source files into shareable + object files. This is normally set to the value of ${CC} + by configure, and should not need to be changed. + + SHOBJ_CFLAGS Flags to pass to the C compiler ($SHOBJ_CC) to create + position-independent code. If you are using gcc, this + should probably be set to `-fpic'. + + SHOBJ_LD The link editor to be used to create the shared library from + the object files created by $SHOBJ_CC. If you are using + gcc, a value of `gcc' will probably work. + + SHOBJ_LDFLAGS Flags to pass to SHOBJ_LD to enable shared object creation. + If you are using gcc, `-shared' may be all that is necessary. + These should be the flags needed for generic shared object + creation. + + SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library + creation. Many systems use the -R option to the link + editor to embed a path within the library for run-time + library searches. A reasonable value for such systems would + be `-R$(libdir)'. + + SHLIB_LIBS Any additional libraries that shared libraries should be + linked against when they are created. + + SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when + generating the filename of the shared library. Many systems + use `so'; HP-UX uses `sl'. + + SHLIB_LIBVERSION The string to append to the filename to indicate the version + of the shared library. It should begin with $(SHLIB_LIBSUFF), + and possibly include version information that allows the + run-time loader to load the version of the shared library + appropriate for a particular program. Systems using shared + libraries similar to SunOS 4.x use major and minor library + version numbers; for those systems a value of + `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate. + Systems based on System V Release 4 don't use minor version + numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems. + Other Unix versions use different schemes. + + SHLIB_STATUS Set this to `supported' when you have defined the other + necessary variables. Make uses this to determine whether + or not shared library creation should be attempted. + + You should look at the existing stanzas in support/shobj-conf for ideas. + + Once you have updated support/shobj-conf, re-run configure and type + `make shared'. The shared libraries will be created in the shlib + subdirectory. + + Since shared libraries are not created on all platforms, `make install' + will not automatically install the shared libraries. To install them, + change the current directory to shlib and type `make install'. Running + `make install-shared' from the top-level build directory will also work. diff -Nrc2 readline-4.2/MANIFEST readline-4.2a/MANIFEST *** readline-4.2/MANIFEST Mon Mar 5 14:34:36 2001 --- readline-4.2a/MANIFEST Mon Sep 24 08:40:53 2001 *************** *** 95,98 **** --- 95,99 ---- examples/fileman.c f examples/manexamp.c f + examples/readlinebuf.h f examples/rlfe.c f examples/rltest.c f diff -Nrc2 readline-4.2/Makefile.in readline-4.2a/Makefile.in *** readline-4.2/Makefile.in Mon Nov 27 11:57:09 2000 --- readline-4.2a/Makefile.in Fri Nov 2 11:41:09 2001 *************** *** 51,54 **** --- 51,57 ---- man3dir = $(mandir)/man3 + # Support an alternate destination root directory for package building + DESTDIR = + # Programs to make tags files. ETAGS = etags -tw *************** *** 65,69 **** # For libraries which include headers from other libraries. ! INCLUDES = -I. -I$(srcdir) -I$(includedir) XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) --- 68,72 ---- # For libraries which include headers from other libraries. ! INCLUDES = -I. -I$(srcdir) XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) *************** *** 73,77 **** GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \ -Wwrite-strings -Wstrict-prototypes \ ! -Wmissing-prototypes -Wno-implicit GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@ --- 76,80 ---- GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \ -Wwrite-strings -Wstrict-prototypes \ ! -Wmissing-prototypes -Wno-implicit -pedantic GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@ *************** *** 142,145 **** --- 145,154 ---- -test -n "$(RANLIB)" && $(RANLIB) $@ + # Since tilde.c is shared between readline and bash, make sure we compile + # it with the right flags when it's built as part of readline + tilde.o: tilde.c + rm -f $@ + $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c + readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB} *************** *** 185,193 **** install-headers: installdirs ${INSTALLED_HEADERS} for f in ${INSTALLED_HEADERS}; do \ ! $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/readline ; \ done uninstall-headers: ! -test -n "$(includedir)" && cd $(includedir)/readline && \ ${RM} ${INSTALLED_HEADERS} --- 194,202 ---- install-headers: installdirs ${INSTALLED_HEADERS} for f in ${INSTALLED_HEADERS}; do \ ! $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/readline ; \ done uninstall-headers: ! -test -n "$(includedir)" && cd $(DESTDIR)$(includedir)/readline && \ ${RM} ${INSTALLED_HEADERS} *************** *** 195,222 **** install: installdirs $(STATIC_LIBS) install-headers ! -$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old ! $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a ! -test -n "$(RANLIB)" && $(RANLIB) $(libdir)/libreadline.a ! -$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old ! $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a ! -test -n "$(RANLIB)" && $(RANLIB) $(libdir)/libhistory.a -( if test -d doc ; then \ cd doc && \ ! ${MAKE} ${MFLAGS} infodir=$(infodir) $@; \ fi ) installdirs: $(srcdir)/support/mkdirs ! -$(SHELL) $(srcdir)/support/mkdirs $(includedir) \ ! $(includedir)/readline $(libdir) $(infodir) $(man3dir) uninstall: uninstall-headers ! -test -n "$(libdir)" && cd $(libdir) && \ ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS) install-shared: installdirs install-headers shared ! -( cd shlib ; ${MAKE} ${MFLAGS} install ) uninstall-shared: maybe-uninstall-headers ! -( cd shlib; ${MAKE} ${MFLAGS} uninstall ) TAGS: force --- 204,238 ---- install: installdirs $(STATIC_LIBS) install-headers ! -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old ! $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a ! -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a ! -$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old ! $(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a ! -test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a -( if test -d doc ; then \ cd doc && \ ! ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} $@; \ fi ) + -( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install ) installdirs: $(srcdir)/support/mkdirs ! -$(SHELL) $(srcdir)/support/mkdirs $(DESTDIR)$(includedir) \ ! $(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \ ! $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) uninstall: uninstall-headers ! -test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \ ${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS) + -( if test -d doc ; then \ + cd doc && \ + ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} $@; \ + fi ) + -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) install-shared: installdirs install-headers shared ! -( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install ) uninstall-shared: maybe-uninstall-headers ! -( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall ) TAGS: force diff -Nrc2 readline-4.2/README readline-4.2a/README *** readline-4.2/README Wed Apr 4 14:32:26 2001 --- readline-4.2a/README Wed Aug 22 13:47:43 2001 *************** *** 2,6 **** ============ ! This is the Gnu Readline library, version 4.2. The Readline library provides a set of functions for use by applications --- 2,6 ---- ============ ! This is the Gnu Readline library, version 4.2a. The Readline library provides a set of functions for use by applications *************** *** 17,22 **** The Readline library is free software, distributed under the terms of ! the GNU Public License, version 2. For more information, see the file ! COPYING. To build the library, try typing `./configure', then `make'. The --- 17,22 ---- The Readline library is free software, distributed under the terms of ! the [GNU] General Public License, version 2. For more information, see ! the file COPYING. To build the library, try typing `./configure', then `make'. The *************** *** 68,73 **** a `stanza' for your operating system and compiler. The script uses the value of host_os and ${CC} as determined by configure. For ! instance, FreeBSD 4.2 using the ELF object file format with any ! version of gcc is identified as `freebsdelf4.2-gcc*'. In the stanza for your operating system-compiler pair, you will need to --- 68,73 ---- a `stanza' for your operating system and compiler. The script uses the value of host_os and ${CC} as determined by configure. For ! instance, FreeBSD 4.2 with any version of gcc is identified as ! `freebsd4.2-gcc*'. In the stanza for your operating system-compiler pair, you will need to diff -Nrc2 readline-4.2/aclocal.m4 readline-4.2a/aclocal.m4 *** readline-4.2/aclocal.m4 Tue Nov 21 10:42:10 2000 --- readline-4.2a/aclocal.m4 Wed Nov 7 10:59:37 2001 *************** *** 4,143 **** dnl Some derived from PDKSH 5.1.3 autoconf tests dnl ! dnl ! dnl Check if dup2() does not clear the close on exec flag ! dnl ! AC_DEFUN(BASH_DUP2_CLOEXEC_CHECK, ! [AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag) ! AC_CACHE_VAL(bash_cv_dup2_broken, ! [AC_TRY_RUN([ ! #include ! #include main() { ! int fd1, fd2, fl; ! fd1 = open("/dev/null", 2); ! if (fcntl(fd1, 2, 1) < 0) ! exit(1); ! fd2 = dup2(fd1, 1); ! if (fd2 < 0) ! exit(2); ! fl = fcntl(fd2, 1, 0); ! /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ ! exit(fl != 1); } ! ], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no, ! [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no) ! bash_cv_dup2_broken=no]) ! ]) ! AC_MSG_RESULT($bash_cv_dup2_broken) ! if test $bash_cv_dup2_broken = yes; then ! AC_DEFINE(DUP2_BROKEN) ! fi ! ]) ! ! dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) ! AC_DEFUN(BASH_SIGNAL_CHECK, ! [AC_REQUIRE([AC_TYPE_SIGNAL]) ! AC_MSG_CHECKING(for type of signal functions) ! AC_CACHE_VAL(bash_cv_signal_vintage, ! [ ! AC_TRY_LINK([#include ],[ ! sigset_t ss; ! struct sigaction sa; ! sigemptyset(&ss); sigsuspend(&ss); ! sigaction(SIGINT, &sa, (struct sigaction *) 0); ! sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); ! ], bash_cv_signal_vintage=posix, ! [ ! AC_TRY_LINK([#include ], [ ! int mask = sigmask(SIGINT); ! sigsetmask(mask); sigblock(mask); sigpause(mask); ! ], bash_cv_signal_vintage=4.2bsd, ! [ ! AC_TRY_LINK([ ! #include ! RETSIGTYPE foo() { }], [ ! int mask = sigmask(SIGINT); ! sigset(SIGINT, foo); sigrelse(SIGINT); ! sighold(SIGINT); sigpause(SIGINT); ! ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7 ! )] ! )] ! ) ! ]) ! AC_MSG_RESULT($bash_cv_signal_vintage) ! if test "$bash_cv_signal_vintage" = posix; then ! AC_DEFINE(HAVE_POSIX_SIGNALS) ! elif test "$bash_cv_signal_vintage" = "4.2bsd"; then ! AC_DEFINE(HAVE_BSD_SIGNALS) ! elif test "$bash_cv_signal_vintage" = svr3; then ! AC_DEFINE(HAVE_USG_SIGHOLD) fi ]) ! dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process. ! AC_DEFUN(BASH_PGRP_SYNC, ! [AC_REQUIRE([AC_FUNC_GETPGRP]) ! AC_MSG_CHECKING(whether pgrps need synchronization) ! AC_CACHE_VAL(bash_cv_pgrp_pipe, ! [AC_TRY_RUN([ ! #ifdef HAVE_UNISTD_H ! # include ! #endif main() { ! # ifdef GETPGRP_VOID ! # define getpgID() getpgrp() ! # else ! # define getpgID() getpgrp(0) ! # define setpgid(x,y) setpgrp(x,y) ! # endif ! int pid1, pid2, fds[2]; ! int status; ! char ok; ! ! switch (pid1 = fork()) { ! case -1: ! exit(1); ! case 0: ! setpgid(0, getpid()); ! exit(0); ! } ! setpgid(pid1, pid1); ! ! sleep(2); /* let first child die */ ! ! if (pipe(fds) < 0) ! exit(2); ! ! switch (pid2 = fork()) { ! case -1: ! exit(3); ! case 0: ! setpgid(0, pid1); ! ok = getpgID() == pid1; ! write(fds[1], &ok, 1); ! exit(0); ! } ! setpgid(pid2, pid1); ! ! close(fds[1]); ! if (read(fds[0], &ok, 1) != 1) ! exit(4); ! wait(&status); ! wait(&status); ! exit(ok ? 0 : 5); } ! ], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes, ! [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no) ! bash_cv_pgrp_pipe=no]) ! ]) ! AC_MSG_RESULT($bash_cv_pgrp_pipe) ! if test $bash_cv_pgrp_pipe = yes; then ! AC_DEFINE(PGRP_PIPE) fi ]) dnl dnl check for typedef'd symbols in header files, but allow the caller to dnl specify the include files to be checked in addition to the default --- 4,66 ---- dnl Some derived from PDKSH 5.1.3 autoconf tests dnl ! ! AC_DEFUN(BASH_C_LONG_LONG, ! [AC_CACHE_CHECK(for long long, ac_cv_c_long_long, ! [if test "$GCC" = yes; then ! ac_cv_c_long_long=yes ! else ! AC_TRY_RUN([ ! int main() { ! long long foo = 0; ! exit(sizeof(long long) < sizeof(long)); } ! ], ac_cv_c_long_long=yes, ac_cv_c_long_long=no) ! fi]) ! if test $ac_cv_c_long_long = yes; then ! AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.]) fi ]) ! dnl ! dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX ! dnl (< changed to <=) added. ! dnl ! AC_DEFUN(BASH_C_LONG_DOUBLE, ! [AC_CACHE_CHECK(for long double, ac_cv_c_long_double, ! [if test "$GCC" = yes; then ! ac_cv_c_long_double=yes ! else ! AC_TRY_RUN([ ! int main() { ! /* The Stardent Vistra knows sizeof(long double), but does not ! support it. */ ! long double foo = 0.0; ! /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ ! /* On IRIX 5.3, the compiler converts long double to double with a warning, ! but compiles this successfully. */ ! exit(sizeof(long double) <= sizeof(double)); } ! ], ac_cv_c_long_double=yes, ac_cv_c_long_double=no) ! fi]) ! if test $ac_cv_c_long_double = yes; then ! AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.]) fi ]) dnl + dnl Check for . This is separated out so that it can be + dnl AC_REQUIREd. + dnl + dnl BASH_HEADER_INTTYPES + AC_DEFUN(BASH_HEADER_INTTYPES, + [ + AC_CHECK_HEADERS(inttypes.h) + ]) + + dnl dnl check for typedef'd symbols in header files, but allow the caller to dnl specify the include files to be checked in addition to the default *************** *** 145,149 **** dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND]) AC_DEFUN(BASH_CHECK_TYPE, ! [AC_REQUIRE([AC_HEADER_STDC])dnl AC_MSG_CHECKING(for $1) AC_CACHE_VAL(bash_cv_type_$1, --- 68,74 ---- dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND]) AC_DEFUN(BASH_CHECK_TYPE, ! [ ! AC_REQUIRE([AC_HEADER_STDC])dnl ! AC_REQUIRE([BASH_HEADER_INTTYPES]) AC_MSG_CHECKING(for $1) AC_CACHE_VAL(bash_cv_type_$1, *************** *** 151,154 **** --- 76,83 ---- #if STDC_HEADERS #include + #include + #endif + #if HAVE_INTTYPES_H + #include #endif $2 *************** *** 159,199 **** fi]) if test $bash_cv_type_$1 = no; then ! AC_DEFINE($1, $3) fi ]) dnl ! dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0) ! dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use ! dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify ! dnl matters, this just checks for rlim_t, quad_t, or long. dnl ! AC_DEFUN(BASH_RLIMIT_TYPE, ! [AC_MSG_CHECKING(for size and type of struct rlimit fields) ! AC_CACHE_VAL(bash_cv_type_rlimit, ! [AC_TRY_COMPILE([#include ! #include ], ! [rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[ ! AC_TRY_RUN([ ! #include ! #include ! #include main() { ! #ifdef HAVE_QUAD_T ! struct rlimit rl; ! if (sizeof(rl.rlim_cur) == sizeof(quad_t)) ! exit(0); ! #endif ! exit(1); ! }], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long, ! [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long) ! bash_cv_type_rlimit=long])]) ]) ! AC_MSG_RESULT($bash_cv_type_rlimit) ! if test $bash_cv_type_rlimit = quad_t; then ! AC_DEFINE(RLIMTYPE, quad_t) ! elif test $bash_cv_type_rlimit = rlim_t; then ! AC_DEFINE(RLIMTYPE, rlim_t) fi ]) --- 88,159 ---- fi]) if test $bash_cv_type_$1 = no; then ! AC_DEFINE_UNQUOTED($1, $3) fi ]) dnl ! dnl BASH_CHECK_DECL(FUNC) dnl ! dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like ! dnl AC_CHECK_DECL ! dnl ! AC_DEFUN(BASH_CHECK_DECL, ! [ ! AC_REQUIRE([AC_HEADER_STDC]) ! AC_REQUIRE([BASH_HEADER_INTTYPES]) ! AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1, ! [AC_TRY_LINK( ! [ ! #if STDC_HEADERS ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #endif ! ], ! [return !$1;], ! bash_cv_decl_$1=yes, bash_cv_decl_$1=no)]) ! bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` ! if test $bash_cv_decl_$1 = yes; then ! AC_DEFINE_UNQUOTED($bash_tr_func, 1) ! else ! AC_DEFINE_UNQUOTED($bash_tr_func, 0) ! fi ! ]) ! ! AC_DEFUN(BASH_DECL_PRINTF, ! [AC_MSG_CHECKING(for declaration of printf in ) ! AC_CACHE_VAL(bash_cv_printf_declared, ! [AC_TRY_RUN([ ! #include ! #ifdef __STDC__ ! typedef int (*_bashfunc)(const char *, ...); ! #else ! typedef int (*_bashfunc)(); ! #endif main() { ! _bashfunc pf; ! pf = (_bashfunc) printf; ! exit(pf == 0); ! } ! ], bash_cv_printf_declared=yes, bash_cv_printf_declared=no, ! [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes) ! bash_cv_printf_declared=yes] ! )]) ! AC_MSG_RESULT($bash_cv_printf_declared) ! if test $bash_cv_printf_declared = yes; then ! AC_DEFINE(PRINTF_DECLARED) ! fi ]) ! ! AC_DEFUN(BASH_DECL_SBRK, ! [AC_MSG_CHECKING(for declaration of sbrk in ) ! AC_CACHE_VAL(bash_cv_sbrk_declared, ! [AC_EGREP_HEADER(sbrk, unistd.h, ! bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)]) ! AC_MSG_RESULT($bash_cv_sbrk_declared) ! if test $bash_cv_sbrk_declared = yes; then ! AC_DEFINE(SBRK_DECLARED) fi ]) *************** *** 273,276 **** --- 233,250 ---- ]) + dnl Check for the various permutations of sys_siglist and make sure we + dnl compile in siglist.o if they're not defined + AC_DEFUN(BASH_CHECK_SYS_SIGLIST, [ + AC_REQUIRE([BASH_SYS_SIGLIST]) + AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST]) + AC_REQUIRE([BASH_FUNC_STRSIGNAL]) + if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then + SIGLIST_O=siglist.o + else + SIGLIST_O= + fi + AC_SUBST([SIGLIST_O]) + ]) + dnl Check for sys_errlist[] and sys_nerr, check for declaration AC_DEFUN(BASH_SYS_ERRLIST, *************** *** 288,291 **** --- 262,310 ---- ]) + dnl + dnl Check if dup2() does not clear the close on exec flag + dnl + AC_DEFUN(BASH_FUNC_DUP2_CLOEXEC_CHECK, + [AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag) + AC_CACHE_VAL(bash_cv_dup2_broken, + [AC_TRY_RUN([ + #include + #include + main() + { + int fd1, fd2, fl; + fd1 = open("/dev/null", 2); + if (fcntl(fd1, 2, 1) < 0) + exit(1); + fd2 = dup2(fd1, 1); + if (fd2 < 0) + exit(2); + fl = fcntl(fd2, 1, 0); + /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ + exit(fl != 1); + } + ], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no, + [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no) + bash_cv_dup2_broken=no]) + ]) + AC_MSG_RESULT($bash_cv_dup2_broken) + if test $bash_cv_dup2_broken = yes; then + AC_DEFINE(DUP2_BROKEN) + fi + ]) + + AC_DEFUN(BASH_FUNC_STRSIGNAL, + [AC_MSG_CHECKING([for the existence of strsignal]) + AC_CACHE_VAL(bash_cv_have_strsignal, + [AC_TRY_LINK([#include + #include ], + [char *s = (char *)strsignal(2);], + bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)]) + AC_MSG_RESULT($bash_cv_have_strsignal) + if test $bash_cv_have_strsignal = yes; then + AC_DEFINE(HAVE_STRSIGNAL) + fi + ]) + dnl Check to see if opendir will open non-directories (not a nice thing) AC_DEFUN(BASH_FUNC_OPENDIR_CHECK, *************** *** 423,426 **** --- 442,447 ---- elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then AC_CHECK_TYPE(ptrdiff_t, long) + elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then + AC_CHECK_TYPE(ptrdiff_t, [long long]) else AC_CHECK_TYPE(ptrdiff_t, int) *************** *** 433,440 **** AC_DEFUN(BASH_TYPE_BITS64_T, [ ! if test "$ac_sv_sizeof_char_p" = 8; then AC_CHECK_TYPE(bits64_t, char *) elif test "$ac_cv_sizeof_double" = 8; then AC_CHECK_TYPE(bits64_t, double) elif test "$ac_cv_sizeof_long" = 8; then AC_CHECK_TYPE(bits64_t, long) --- 454,463 ---- AC_DEFUN(BASH_TYPE_BITS64_T, [ ! if test "$ac_cv_sizeof_char_p" = 8; then AC_CHECK_TYPE(bits64_t, char *) elif test "$ac_cv_sizeof_double" = 8; then AC_CHECK_TYPE(bits64_t, double) + elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then + AC_CHECK_TYPE(bits64_t, [long long]) elif test "$ac_cv_sizeof_long" = 8; then AC_CHECK_TYPE(bits64_t, long) *************** *** 444,457 **** ]) ! AC_DEFUN(BASH_FUNC_STRSIGNAL, ! [AC_MSG_CHECKING([for the existence of strsignal]) ! AC_CACHE_VAL(bash_cv_have_strsignal, ! [AC_TRY_LINK([#include ! #include ], ! [char *s = (char *)strsignal(2);], ! bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)]) ! AC_MSG_RESULT($bash_cv_have_strsignal) ! if test $bash_cv_have_strsignal = yes; then ! AC_DEFINE(HAVE_STRSIGNAL) fi ]) --- 467,532 ---- ]) ! AC_DEFUN(BASH_TYPE_LONG_LONG, ! [ ! AC_CACHE_CHECK([for long long], bash_cv_type_long_long, ! [AC_TRY_LINK([ ! long long ll = 1; int i = 63;], ! [ ! long long llm = (long long) -1; ! return ll << i | ll >> i | llm / ll | llm % ll; ! ], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')]) ! if test "$bash_cv_type_long_long" = 'long long'; then ! AC_DEFINE(HAVE_LONG_LONG, 1) ! fi ! ]) ! ! AC_DEFUN(BASH_TYPE_UNSIGNED_LONG_LONG, ! [ ! AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long, ! [AC_TRY_LINK([ ! unsigned long long ull = 1; int i = 63;], ! [ ! unsigned long long ullmax = (unsigned long long) -1; ! return ull << i | ull >> i | ullmax / ull | ullmax % ull; ! ], bash_cv_type_unsigned_long_long='unsigned long long', ! bash_cv_type_unsigned_long_long='unsigned long')]) ! if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then ! AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1) ! fi ! ]) ! ! dnl ! dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0) ! dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use ! dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify ! dnl matters, this just checks for rlim_t, quad_t, or long. ! dnl ! AC_DEFUN(BASH_TYPE_RLIMIT, ! [AC_MSG_CHECKING(for size and type of struct rlimit fields) ! AC_CACHE_VAL(bash_cv_type_rlimit, ! [AC_TRY_COMPILE([#include ! #include ], ! [rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[ ! AC_TRY_RUN([ ! #include ! #include ! #include ! main() ! { ! #ifdef HAVE_QUAD_T ! struct rlimit rl; ! if (sizeof(rl.rlim_cur) == sizeof(quad_t)) ! exit(0); ! #endif ! exit(1); ! }], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long, ! [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long) ! bash_cv_type_rlimit=long])]) ! ]) ! AC_MSG_RESULT($bash_cv_type_rlimit) ! if test $bash_cv_type_rlimit = quad_t; then ! AC_DEFINE(RLIMTYPE, quad_t) ! elif test $bash_cv_type_rlimit = rlim_t; then ! AC_DEFINE(RLIMTYPE, rlim_t) fi ]) *************** *** 482,509 **** if test $bash_cv_func_inet_aton = yes; then AC_DEFINE(HAVE_INET_ATON) ! fi ! ]) ! ! AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC, ! [AC_MSG_CHECKING([for a c_line member of struct termios]) ! AC_CACHE_VAL(bash_cv_termios_ldisc, ! [AC_TRY_COMPILE([#include ! #include ],[struct termios t; int i; i = t.c_line;], ! bash_cv_termios_ldisc=yes, bash_cv_termios_ldisc=no)])dnl ! AC_MSG_RESULT($bash_cv_termios_ldisc) ! if test $bash_cv_termios_ldisc = yes; then ! AC_DEFINE(TERMIOS_LDISC) ! fi ! ]) ! ! AC_DEFUN(BASH_STRUCT_TERMIO_LDISC, ! [AC_MSG_CHECKING([for a c_line member of struct termio]) ! AC_CACHE_VAL(bash_cv_termio_ldisc, ! [AC_TRY_COMPILE([#include ! #include ],[struct termio t; int i; i = t.c_line;], ! bash_cv_termio_ldisc=yes, bash_cv_termio_ldisc=no)])dnl ! AC_MSG_RESULT($bash_cv_termio_ldisc) ! if test $bash_cv_termio_ldisc = yes; then ! AC_DEFINE(TERMIO_LDISC) fi ]) --- 557,562 ---- if test $bash_cv_func_inet_aton = yes; then AC_DEFINE(HAVE_INET_ATON) ! else ! AC_LIBOBJ(inet_aton) fi ]) *************** *** 553,582 **** ]) - AC_DEFUN(BASH_FUNC_PRINTF, - [AC_MSG_CHECKING(for declaration of printf in ) - AC_CACHE_VAL(bash_cv_printf_declared, - [AC_TRY_RUN([ - #include - #ifdef __STDC__ - typedef int (*_bashfunc)(const char *, ...); - #else - typedef int (*_bashfunc)(); - #endif - main() - { - _bashfunc pf; - pf = (_bashfunc) printf; - exit(pf == 0); - } - ], bash_cv_printf_declared=yes, bash_cv_printf_declared=no, - [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes) - bash_cv_printf_declared=yes] - )]) - AC_MSG_RESULT($bash_cv_printf_declared) - if test $bash_cv_printf_declared = yes; then - AC_DEFINE(PRINTF_DECLARED) - fi - ]) - AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS, [AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize) --- 606,609 ---- *************** *** 598,634 **** ]) - AC_DEFUN(BASH_CHECK_LIB_TERMCAP, - [ - if test "X$bash_cv_termcap_lib" = "X"; then - _bash_needmsg=yes - else - AC_MSG_CHECKING(which library has the termcap functions) - _bash_needmsg= - fi - AC_CACHE_VAL(bash_cv_termcap_lib, - [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, - [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, - [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, - bash_cv_termcap_lib=gnutermcap)])])]) - if test "X$_bash_needmsg" = "Xyes"; then - AC_MSG_CHECKING(which library has the termcap functions) - fi - AC_MSG_RESULT(using $bash_cv_termcap_lib) - if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then - LDFLAGS="$LDFLAGS -L./lib/termcap" - TERMCAP_LIB="./lib/termcap/libtermcap.a" - TERMCAP_DEP="./lib/termcap/libtermcap.a" - elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then - TERMCAP_LIB=-ltermcap - TERMCAP_DEP= - elif test $bash_cv_termcap_lib = libncurses; then - TERMCAP_LIB=-lncurses - TERMCAP_DEP= - else - TERMCAP_LIB=-lcurses - TERMCAP_DEP= - fi - ]) - AC_DEFUN(BASH_FUNC_GETCWD, [AC_MSG_CHECKING([if getcwd() calls popen()]) --- 625,628 ---- *************** *** 692,695 **** --- 686,1000 ---- if test $bash_cv_getcwd_calls_popen = yes; then AC_DEFINE(GETCWD_BROKEN) + AC_LIBOBJ(getcwd) + fi + ]) + + dnl + dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every + dnl system, we can't use AC_PREREQ + dnl + AC_DEFUN(BASH_FUNC_GETHOSTBYNAME, + [if test "X$bash_cv_have_gethostbyname" = "X"; then + _bash_needmsg=yes + else + AC_MSG_CHECKING(for gethostbyname in socket library) + _bash_needmsg= + fi + AC_CACHE_VAL(bash_cv_have_gethostbyname, + [AC_TRY_LINK([#include ], + [ struct hostent *hp; + hp = gethostbyname("localhost"); + ], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)] + ) + if test "X$_bash_needmsg" = Xyes; then + AC_MSG_CHECKING(for gethostbyname in socket library) + fi + AC_MSG_RESULT($bash_cv_have_gethostbyname) + if test "$bash_cv_have_gethostbyname" = yes; then + AC_DEFINE(HAVE_GETHOSTBYNAME) + fi + ]) + + AC_DEFUN(BASH_FUNC_FNMATCH_EXTMATCH, + [AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH) + AC_CACHE_VAL(bash_cv_fnm_extmatch, + [AC_TRY_RUN([ + #include + + main() + { + #ifdef FNM_EXTMATCH + exit (0); + #else + exit (1); + #endif + } + ], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no, + [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no) + bash_cv_fnm_extmatch=no]) + ]) + AC_MSG_RESULT($bash_cv_fnm_extmatch) + if test $bash_cv_fnm_extmatch = yes; then + AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH) + fi + ]) + + AC_DEFUN(BASH_FUNC_POSIX_SETJMP, + [AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE]) + AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp) + AC_CACHE_VAL(bash_cv_func_sigsetjmp, + [AC_TRY_RUN([ + #ifdef HAVE_UNISTD_H + #include + #endif + #include + #include + #include + + main() + { + #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) + exit (1); + #else + + int code; + sigset_t set, oset; + sigjmp_buf xx; + + /* get the mask */ + sigemptyset(&set); + sigemptyset(&oset); + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); + sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); + + /* save it */ + code = sigsetjmp(xx, 1); + if (code) + exit(0); /* could get sigmask and compare to oset here. */ + + /* change it */ + sigaddset(&set, SIGINT); + sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); + + /* and siglongjmp */ + siglongjmp(xx, 10); + exit(1); + #endif + }], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing, + [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing) + bash_cv_func_sigsetjmp=missing] + )]) + AC_MSG_RESULT($bash_cv_func_sigsetjmp) + if test $bash_cv_func_sigsetjmp = present; then + AC_DEFINE(HAVE_POSIX_SIGSETJMP) + fi + ]) + + AC_DEFUN(BASH_FUNC_STRCOLL, + [ + AC_MSG_CHECKING(whether or not strcoll and strcmp differ) + AC_CACHE_VAL(bash_cv_func_strcoll_broken, + [AC_TRY_RUN([ + #include + #if defined (HAVE_LOCALE_H) + #include + #endif + + main(c, v) + int c; + char *v[]; + { + int r1, r2; + char *deflocale, *defcoll; + + #ifdef HAVE_SETLOCALE + deflocale = setlocale(LC_ALL, ""); + defcoll = setlocale(LC_COLLATE, ""); + #endif + + #ifdef HAVE_STRCOLL + /* These two values are taken from tests/glob-test. */ + r1 = strcoll("abd", "aXd"); + #else + r1 = 0; + #endif + r2 = strcmp("abd", "aXd"); + + /* These two should both be greater than 0. It is permissible for + a system to return different values, as long as the sign is the + same. */ + + /* Exit with 1 (failure) if these two values are both > 0, since + this tests whether strcoll(3) is broken with respect to strcmp(3) + in the default locale. */ + exit (r1 > 0 && r2 > 0); + } + ], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no, + [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no) + bash_cv_func_strcoll_broken=no] + )]) + AC_MSG_RESULT($bash_cv_func_strcoll_broken) + if test $bash_cv_func_strcoll_broken = yes; then + AC_DEFINE(STRCOLL_BROKEN) + fi + ]) + + AC_DEFUN(BASH_FUNC_PRINTF_A_FORMAT, + [AC_MSG_CHECKING([for printf floating point output in hex notation]) + AC_CACHE_VAL(bash_cv_printf_a_format, + [AC_TRY_RUN([ + #include + #include + + int + main() + { + double y = 0.0; + char abuf[1024]; + + sprintf(abuf, "%A", y); + exit(strchr(abuf, 'P') == (char *)0); + } + ], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no, + [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no) + bash_cv_printf_a_format=no] + )]) + AC_MSG_RESULT($bash_cv_printf_a_format) + if test $bash_cv_printf_a_format = yes; then + AC_DEFINE(HAVE_PRINTF_A_FORMAT) + fi + ]) + + AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC, + [ + AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[ + #include + #include + ]) + ]) + + AC_DEFUN(BASH_STRUCT_TERMIO_LDISC, + [ + AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[ + #include + #include + ]) + ]) + + dnl + dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS + dnl + dnl sets bash_cv_struct_stat_st_blocks + dnl + dnl unused for now; we'll see how AC_CHECK_MEMBERS works + dnl + AC_DEFUN(BASH_STRUCT_ST_BLOCKS, + [ + AC_MSG_CHECKING([for struct stat.st_blocks]) + AC_CACHE_VAL(bash_cv_struct_stat_st_blocks, + [AC_TRY_COMPILE( + [ + #include + #include + ], + [ + main() + { + static struct stat a; + if (a.st_blocks) return 0; + return 0; + } + ], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no) + ]) + AC_MSG_RESULT($bash_cv_struct_stat_st_blocks) + if test "$bash_cv_struct_stat_st_blocks" = "yes"; then + AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS) + fi + ]) + + AC_DEFUN(BASH_CHECK_LIB_TERMCAP, + [ + if test "X$bash_cv_termcap_lib" = "X"; then + _bash_needmsg=yes + else + AC_MSG_CHECKING(which library has the termcap functions) + _bash_needmsg= + fi + AC_CACHE_VAL(bash_cv_termcap_lib, + [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, + [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcal_lib=libtinfo, + [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, + [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, + bash_cv_termcap_lib=gnutermcap)])])])]) + if test "X$_bash_needmsg" = "Xyes"; then + AC_MSG_CHECKING(which library has the termcap functions) + fi + AC_MSG_RESULT(using $bash_cv_termcap_lib) + if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then + LDFLAGS="$LDFLAGS -L./lib/termcap" + TERMCAP_LIB="./lib/termcap/libtermcap.a" + TERMCAP_DEP="./lib/termcap/libtermcap.a" + elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then + TERMCAP_LIB=-ltermcap + TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libtinfo; then + TERMCAP_LIB=-ltinfo + TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libncurses; then + TERMCAP_LIB=-lncurses + TERMCAP_DEP= + else + TERMCAP_LIB=-lcurses + TERMCAP_DEP= + fi + ]) + + dnl + dnl Check for the presence of getpeername in libsocket. + dnl If libsocket is present, check for libnsl and add it to LIBS if + dnl it's there, since most systems with libsocket require linking + dnl with libnsl as well. This should only be called if getpeername + dnl was not found in libc. + dnl + dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT + dnl AS WELL + dnl + AC_DEFUN(BASH_CHECK_LIB_SOCKET, + [ + if test "X$bash_cv_have_socklib" = "X"; then + _bash_needmsg= + else + AC_MSG_CHECKING(for socket library) + _bash_needmsg=yes + fi + AC_CACHE_VAL(bash_cv_have_socklib, + [AC_CHECK_LIB(socket, getpeername, + bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)]) + if test "X$_bash_needmsg" = Xyes; then + AC_MSG_RESULT($bash_cv_have_socklib) + _bash_needmsg= + fi + if test $bash_cv_have_socklib = yes; then + # check for libnsl, add it to LIBS if present + if test "X$bash_cv_have_libnsl" = "X"; then + _bash_needmsg= + else + AC_MSG_CHECKING(for libnsl) + _bash_needmsg=yes + fi + AC_CACHE_VAL(bash_cv_have_libnsl, + [AC_CHECK_LIB(nsl, t_open, + bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)]) + if test "X$_bash_needmsg" = Xyes; then + AC_MSG_RESULT($bash_cv_have_libnsl) + _bash_needmsg= + fi + if test $bash_cv_have_libnsl = yes; then + LIBS="-lsocket -lnsl $LIBS" + else + LIBS="-lsocket $LIBS" + fi + AC_DEFINE(HAVE_LIBSOCKET) + AC_DEFINE(HAVE_GETPEERNAME) fi ]) *************** *** 761,767 **** ]) ! AC_DEFUN(BASH_REINSTALL_SIGHANDLERS, [AC_REQUIRE([AC_TYPE_SIGNAL]) ! AC_REQUIRE([BASH_SIGNAL_CHECK]) AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers, --- 1066,1212 ---- ]) ! AC_DEFUN(BASH_STRUCT_TIMEVAL, ! [AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h) ! AC_CACHE_VAL(bash_cv_struct_timeval, ! [ ! AC_EGREP_HEADER(struct timeval, sys/time.h, ! bash_cv_struct_timeval=yes, ! AC_EGREP_HEADER(struct timeval, time.h, ! bash_cv_struct_timeval=yes, ! bash_cv_struct_timeval=no)) ! ]) ! AC_MSG_RESULT($bash_cv_struct_timeval) ! if test $bash_cv_struct_timeval = yes; then ! AC_DEFINE(HAVE_TIMEVAL) ! fi ! ]) ! ! AC_DEFUN(BASH_STRUCT_WINSIZE, ! [AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h) ! AC_CACHE_VAL(bash_cv_struct_winsize_header, ! [AC_TRY_COMPILE([#include ! #include ], [struct winsize x;], ! bash_cv_struct_winsize_header=ioctl_h, ! [AC_TRY_COMPILE([#include ! #include ], [struct winsize x;], ! bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other) ! ])]) ! if test $bash_cv_struct_winsize_header = ioctl_h; then ! AC_MSG_RESULT(sys/ioctl.h) ! AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL) ! elif test $bash_cv_struct_winsize_header = termios_h; then ! AC_MSG_RESULT(termios.h) ! AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS) ! else ! AC_MSG_RESULT(not found) ! fi ! ]) ! ! dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7) ! AC_DEFUN(BASH_SYS_SIGNAL_VINTAGE, ! [AC_REQUIRE([AC_TYPE_SIGNAL]) ! AC_MSG_CHECKING(for type of signal functions) ! AC_CACHE_VAL(bash_cv_signal_vintage, ! [ ! AC_TRY_LINK([#include ],[ ! sigset_t ss; ! struct sigaction sa; ! sigemptyset(&ss); sigsuspend(&ss); ! sigaction(SIGINT, &sa, (struct sigaction *) 0); ! sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); ! ], bash_cv_signal_vintage=posix, ! [ ! AC_TRY_LINK([#include ], [ ! int mask = sigmask(SIGINT); ! sigsetmask(mask); sigblock(mask); sigpause(mask); ! ], bash_cv_signal_vintage=4.2bsd, ! [ ! AC_TRY_LINK([ ! #include ! RETSIGTYPE foo() { }], [ ! int mask = sigmask(SIGINT); ! sigset(SIGINT, foo); sigrelse(SIGINT); ! sighold(SIGINT); sigpause(SIGINT); ! ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7 ! )] ! )] ! ) ! ]) ! AC_MSG_RESULT($bash_cv_signal_vintage) ! if test "$bash_cv_signal_vintage" = posix; then ! AC_DEFINE(HAVE_POSIX_SIGNALS) ! elif test "$bash_cv_signal_vintage" = "4.2bsd"; then ! AC_DEFINE(HAVE_BSD_SIGNALS) ! elif test "$bash_cv_signal_vintage" = svr3; then ! AC_DEFINE(HAVE_USG_SIGHOLD) ! fi ! ]) ! ! dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process. ! AC_DEFUN(BASH_SYS_PGRP_SYNC, ! [AC_REQUIRE([AC_FUNC_GETPGRP]) ! AC_MSG_CHECKING(whether pgrps need synchronization) ! AC_CACHE_VAL(bash_cv_pgrp_pipe, ! [AC_TRY_RUN([ ! #ifdef HAVE_UNISTD_H ! # include ! #endif ! main() ! { ! # ifdef GETPGRP_VOID ! # define getpgID() getpgrp() ! # else ! # define getpgID() getpgrp(0) ! # define setpgid(x,y) setpgrp(x,y) ! # endif ! int pid1, pid2, fds[2]; ! int status; ! char ok; ! ! switch (pid1 = fork()) { ! case -1: ! exit(1); ! case 0: ! setpgid(0, getpid()); ! exit(0); ! } ! setpgid(pid1, pid1); ! ! sleep(2); /* let first child die */ ! ! if (pipe(fds) < 0) ! exit(2); ! ! switch (pid2 = fork()) { ! case -1: ! exit(3); ! case 0: ! setpgid(0, pid1); ! ok = getpgID() == pid1; ! write(fds[1], &ok, 1); ! exit(0); ! } ! setpgid(pid2, pid1); ! ! close(fds[1]); ! if (read(fds[0], &ok, 1) != 1) ! exit(4); ! wait(&status); ! wait(&status); ! exit(ok ? 0 : 5); ! } ! ], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes, ! [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no) ! bash_cv_pgrp_pipe=no]) ! ]) ! AC_MSG_RESULT($bash_cv_pgrp_pipe) ! if test $bash_cv_pgrp_pipe = yes; then ! AC_DEFINE(PGRP_PIPE) ! fi ! ]) ! ! AC_DEFUN(BASH_SYS_REINSTALL_SIGHANDLERS, [AC_REQUIRE([AC_TYPE_SIGNAL]) ! AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE]) AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked]) AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers, *************** *** 819,836 **** ]) - AC_DEFUN(BASH_FUNC_SBRK_DECLARED, - [AC_MSG_CHECKING(for declaration of sbrk in ) - AC_CACHE_VAL(bash_cv_sbrk_declared, - [AC_EGREP_HEADER(sbrk, unistd.h, - bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)]) - AC_MSG_RESULT($bash_cv_sbrk_declared) - if test $bash_cv_sbrk_declared = yes; then - AC_DEFINE(SBRK_DECLARED) - fi - ]) - dnl check that some necessary job control definitions are present ! AC_DEFUN(BASH_JOB_CONTROL_MISSING, ! [AC_REQUIRE([BASH_SIGNAL_CHECK]) AC_MSG_CHECKING(for presence of necessary job control definitions) AC_CACHE_VAL(bash_cv_job_control_missing, --- 1264,1270 ---- ]) dnl check that some necessary job control definitions are present ! AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING, ! [AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE]) AC_MSG_CHECKING(for presence of necessary job control definitions) AC_CACHE_VAL(bash_cv_job_control_missing, *************** *** 940,991 **** ]) ! AC_DEFUN(BASH_FUNC_POSIX_SETJMP, ! [AC_REQUIRE([BASH_SIGNAL_CHECK]) ! AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp) ! AC_CACHE_VAL(bash_cv_func_sigsetjmp, ! [AC_TRY_RUN([ ! #ifdef HAVE_UNISTD_H ! #include ! #endif ! #include ! #include ! #include ! ! main() ! { ! #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) ! exit (1); ! #else ! ! int code; ! sigset_t set, oset; ! sigjmp_buf xx; ! ! /* get the mask */ ! sigemptyset(&set); ! sigemptyset(&oset); ! sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set); ! sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); ! ! /* save it */ ! code = sigsetjmp(xx, 1); ! if (code) ! exit(0); /* could get sigmask and compare to oset here. */ ! ! /* change it */ ! sigaddset(&set, SIGINT); ! sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); ! ! /* and siglongjmp */ ! siglongjmp(xx, 10); ! exit(1); ! #endif ! }], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing, ! [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing) ! bash_cv_func_sigsetjmp=missing] ! )]) ! AC_MSG_RESULT($bash_cv_func_sigsetjmp) ! if test $bash_cv_func_sigsetjmp = present; then ! AC_DEFINE(HAVE_POSIX_SIGSETJMP) fi ]) --- 1374,1403 ---- ]) ! AC_DEFUN(BASH_SYS_DEFAULT_MAIL_DIR, ! [AC_MSG_CHECKING(for default mail directory) ! AC_CACHE_VAL(bash_cv_mail_dir, ! [if test -d /var/mail; then ! bash_cv_mail_dir=/var/mail ! elif test -d /usr/mail; then ! bash_cv_mail_dir=/usr/mail ! elif test -d /var/spool/mail; then ! bash_cv_mail_dir=/var/spool/mail ! elif test -d /usr/spool/mail; then ! bash_cv_mail_dir=/usr/spool/mail ! else ! bash_cv_mail_dir=unknown ! fi ! ]) ! AC_MSG_RESULT($bash_cv_mail_dir) ! if test $bash_cv_mail_dir = "/var/mail"; then ! AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/var/mail") ! elif test $bash_cv_mail_dir = "/usr/mail"; then ! AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/usr/mail") ! elif test $bash_cv_mail_dir = "/var/spool/mail"; then ! AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/var/spool/mail") ! elif test $bash_cv_mail_dir = "/usr/spool/mail"; then ! AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/usr/spool/mail") ! else ! AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "unknown") fi ]) *************** *** 1003,1027 **** ]) - AC_DEFUN(BASH_STRUCT_WINSIZE, - [AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h) - AC_CACHE_VAL(bash_cv_struct_winsize_header, - [AC_TRY_COMPILE([#include - #include ], [struct winsize x;], - bash_cv_struct_winsize_header=ioctl_h, - [AC_TRY_COMPILE([#include - #include ], [struct winsize x;], - bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other) - ])]) - if test $bash_cv_struct_winsize_header = ioctl_h; then - AC_MSG_RESULT(sys/ioctl.h) - AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL) - elif test $bash_cv_struct_winsize_header = termios_h; then - AC_MSG_RESULT(termios.h) - AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS) - else - AC_MSG_RESULT(not found) - fi - ]) - AC_DEFUN(BASH_HAVE_TIOCSTAT, [AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h) --- 1415,1418 ---- *************** *** 1054,1058 **** dnl versions) or (on others). dnl ! AC_DEFUN(BASH_MISC_SPEED_T, [AC_MSG_CHECKING(for speed_t in sys/types.h) AC_CACHE_VAL(bash_cv_speed_t_in_sys_types, --- 1445,1449 ---- dnl versions) or (on others). dnl ! AC_DEFUN(BASH_CHECK_SPEED_T, [AC_MSG_CHECKING(for speed_t in sys/types.h) AC_CACHE_VAL(bash_cv_speed_t_in_sys_types, *************** *** 1122,1233 **** dnl - dnl Check for the presence of getpeername in libsocket. - dnl If libsocket is present, check for libnsl and add it to LIBS if - dnl it's there, since most systems with libsocket require linking - dnl with libnsl as well. This should only be called if getpeername - dnl was not found in libc. - dnl - dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT - dnl AS WELL - dnl - AC_DEFUN(BASH_CHECK_SOCKLIB, - [ - if test "X$bash_cv_have_socklib" = "X"; then - _bash_needmsg= - else - AC_MSG_CHECKING(for socket library) - _bash_needmsg=yes - fi - AC_CACHE_VAL(bash_cv_have_socklib, - [AC_CHECK_LIB(socket, getpeername, - bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)]) - if test "X$_bash_needmsg" = Xyes; then - AC_MSG_RESULT($bash_cv_have_socklib) - _bash_needmsg= - fi - if test $bash_cv_have_socklib = yes; then - # check for libnsl, add it to LIBS if present - if test "X$bash_cv_have_libnsl" = "X"; then - _bash_needmsg= - else - AC_MSG_CHECKING(for libnsl) - _bash_needmsg=yes - fi - AC_CACHE_VAL(bash_cv_have_libnsl, - [AC_CHECK_LIB(nsl, t_open, - bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)]) - if test "X$_bash_needmsg" = Xyes; then - AC_MSG_RESULT($bash_cv_have_libnsl) - _bash_needmsg= - fi - if test $bash_cv_have_libnsl = yes; then - LIBS="-lsocket -lnsl $LIBS" - else - LIBS="-lsocket $LIBS" - fi - AC_DEFINE(HAVE_LIBSOCKET) - AC_DEFINE(HAVE_GETPEERNAME) - fi - ]) - - dnl - dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every - dnl system, we can't use AC_PREREQ - dnl - AC_DEFUN(BASH_FUNC_GETHOSTBYNAME, - [if test "X$bash_cv_have_gethostbyname" = "X"; then - _bash_needmsg=yes - else - AC_MSG_CHECKING(for gethostbyname in socket library) - _bash_needmsg= - fi - AC_CACHE_VAL(bash_cv_have_gethostbyname, - [AC_TRY_LINK([#include ], - [ struct hostent *hp; - hp = gethostbyname("localhost"); - ], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)] - ) - if test "X$_bash_needmsg" = Xyes; then - AC_MSG_CHECKING(for gethostbyname in socket library) - fi - AC_MSG_RESULT($bash_cv_have_gethostbyname) - if test "$bash_cv_have_gethostbyname" = yes; then - AC_DEFINE(HAVE_GETHOSTBYNAME) - fi - ]) - - AC_DEFUN(BASH_DEFAULT_MAIL_DIR, - [AC_MSG_CHECKING(for default mail directory) - AC_CACHE_VAL(bash_cv_mail_dir, - [if test -d /var/mail; then - bash_cv_mail_dir=/var/mail - elif test -d /usr/mail; then - bash_cv_mail_dir=/usr/mail - elif test -d /var/spool/mail; then - bash_cv_mail_dir=/var/spool/mail - elif test -d /usr/spool/mail; then - bash_cv_mail_dir=/usr/spool/mail - else - bash_cv_mail_dir=unknown - fi - ]) - AC_MSG_RESULT($bash_cv_mail_dir) - if test $bash_cv_mail_dir = "/var/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/var/mail") - elif test $bash_cv_mail_dir = "/usr/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/usr/mail") - elif test $bash_cv_mail_dir = "/var/spool/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/var/spool/mail") - elif test $bash_cv_mail_dir = "/usr/spool/mail"; then - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "/usr/spool/mail") - else - AC_DEFINE(DEFAULT_MAIL_DIRECTORY, "unknown") - fi - ]) - - dnl dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions dnl ! AC_DEFUN(BASH_KERNEL_RLIMIT_CHECK, [AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines]) AC_CACHE_VAL(bash_cv_kernel_rlimit, --- 1513,1519 ---- dnl dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions dnl ! AC_DEFUN(BASH_CHECK_KERNEL_RLIMIT, [AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines]) AC_CACHE_VAL(bash_cv_kernel_rlimit, *************** *** 1257,1399 **** ]) - AC_DEFUN(BASH_FUNC_STRCOLL, - [ - AC_MSG_CHECKING(whether or not strcoll and strcmp differ) - AC_CACHE_VAL(bash_cv_func_strcoll_broken, - [AC_TRY_RUN([ - #include - #if defined (HAVE_LOCALE_H) - #include - #endif - - main(c, v) - int c; - char *v[]; - { - int r1, r2; - char *deflocale, *defcoll; - - #ifdef HAVE_SETLOCALE - deflocale = setlocale(LC_ALL, ""); - defcoll = setlocale(LC_COLLATE, ""); - #endif - - #ifdef HAVE_STRCOLL - /* These two values are taken from tests/glob-test. */ - r1 = strcoll("abd", "aXd"); - #else - r1 = 0; - #endif - r2 = strcmp("abd", "aXd"); - - /* These two should both be greater than 0. It is permissible for - a system to return different values, as long as the sign is the - same. */ - - /* Exit with 1 (failure) if these two values are both > 0, since - this tests whether strcoll(3) is broken with respect to strcmp(3) - in the default locale. */ - exit (r1 > 0 && r2 > 0); - } - ], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no, - [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no) - bash_cv_func_strcoll_broken=no] - )]) - AC_MSG_RESULT($bash_cv_func_strcoll_broken) - if test $bash_cv_func_strcoll_broken = yes; then - AC_DEFINE(STRCOLL_BROKEN) - fi - ]) - - dnl - dnl If available, use support for large files unless the user specified - dnl one of the CPPFLAGS, LDFLAGS, or LIBS variables ( - dnl via GNU patch 2.5) - dnl - AC_DEFUN(BASH_LARGE_FILE_SUPPORT, - [AC_MSG_CHECKING(whether large file support needs explicit enabling) - ac_getconfs='' - ac_result=yes - ac_set='' - ac_shellvars='CPPFLAGS LDFLAGS LIBS' - for ac_shellvar in $ac_shellvars; do - case $ac_shellvar in - CPPFLAGS) ac_lfsvar=LFS_CFLAGS ac_lfs64var=LFS64_CFLAGS ;; - *) ac_lfsvar=LFS_$ac_shellvar ac_lfs64var=LFS64_$ac_shellvar ;; - esac - eval test '"${'$ac_shellvar'+set}"' = set && ac_set=$ac_shellvar - (getconf $ac_lfsvar) >/dev/null 2>&1 || { ac_result=no; break; } - ac_getconf=`getconf $ac_lfsvar` - ac_getconf64=`getconf $ac_lfs64var` - ac_getconfs=$ac_getconfs$ac_getconf\ $ac_getconf64 - eval ac_test_$ac_shellvar="\$ac_getconf\ \$ac_getconf64" - done - case "$ac_result$ac_getconfs" in - yes) ac_result=no ;; - esac - case "$ac_result$ac_set" in - yes?*) ac_result="yes, but $ac_set is already set, so use its settings" - esac - AC_MSG_RESULT($ac_result) - case $ac_result in - yes) - for ac_shellvar in $ac_shellvars; do - eval $ac_shellvar=\$ac_test_$ac_shellvar - done ;; - esac - ]) - - dnl - dnl AC_SYS_RESTARTABLE_SYSCALLS tests only for restarted system calls - dnl after a signal handler has been installed with signal(). Since - dnl Bash uses sigaction() if it is available, we need to check whether - dnl or not a signal handler installed with sigaction and SA_RESTART - dnl causes system calls to be restarted after the signal is caught - dnl - AC_DEFUN(BASH_SYS_RESTARTABLE_SYSCALLS, - [AC_REQUIRE([BASH_SIGNAL_CHECK]) - AC_CACHE_CHECK(whether posix sigaction restarts system calls by default, - bash_cv_sys_restartable_syscalls, - [AC_TRY_RUN( - [/* Exit 0 (true) if wait returns something other than -1, - i.e. the pid of the child, which means that wait was restarted - after getting the signal. */ - #ifdef HAVE_UNISTD_H - # include - #endif - #include - #include - static int caught = 0; - void ucatch (isig) int isig; { caught = 1; } - main () - { - #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) - exit (1); - #else - struct sigaction act, oact; - int i, status; - - act.sa_handler = ucatch; - /* Might want to add SA_RESTART here, but bash's set_signal_handler - does not. */ - act.sa_flags = 0; - sigemptyset(&act.sa_mask); - sigemptyset(&oact.sa_mask); - i = fork (); - /* A possible race condition here, but in practice it never happens. */ - if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } - sigaction(SIGINT, &act, &oact); - status = wait(&i); - if (status == -1) wait(&i); - exit (status == -1); - #endif - } - ], bash_cv_sys_restartable_syscalls=yes, bash_cv_sys_restartable_syscalls=no, - AC_MSG_WARN(cannot check restartable syscalls if cross compiling)) - ]) - if test $bash_cv_sys_restartable_syscalls = yes; then - AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS) - fi - ]) dnl dnl Check for 64-bit off_t -- used for malloc alignment --- 1543,1546 ---- *************** *** 1416,1435 **** fi]) - AC_DEFUN(BASH_STRUCT_TIMEVAL, - [AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h) - AC_CACHE_VAL(bash_cv_struct_timeval, - [ - AC_EGREP_HEADER(struct timeval, sys/time.h, - bash_cv_struct_timeval=yes, - AC_EGREP_HEADER(struct timeval, time.h, - bash_cv_struct_timeval=yes, - bash_cv_struct_timeval=no)) - ]) - AC_MSG_RESULT($bash_cv_struct_timeval) - if test $bash_cv_struct_timeval = yes; then - AC_DEFINE(HAVE_TIMEVAL) - fi - ]) - AC_DEFUN(BASH_CHECK_RTSIGS, [AC_MSG_CHECKING(for unusable real-time signals due to large values) --- 1563,1566 ---- *************** *** 1460,1463 **** --- 1591,1706 ---- if test $bash_cv_unusable_rtsigs = yes; then AC_DEFINE(UNUSABLE_RT_SIGNALS) + fi + ]) + + dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB + dnl require: + dnl AC_PROG_CC + dnl BASH_CHECK_LIB_TERMCAP + + AC_DEFUN(RL_LIB_READLINE_VERSION, + [ + AC_REQUIRE([BASH_CHECK_LIB_TERMCAP]) + + AC_MSG_CHECKING([version of installed readline library]) + + # What a pain in the ass this is. + + # save cpp and ld options + _save_CFLAGS="$CFLAGS" + _save_LDFLAGS="$LDFLAGS" + _save_LIBS="$LIBS" + + # Don't set ac_cv_rl_prefix if the caller has already assigned a value. This + # allows the caller to do something like $_rl_prefix=$withval if the user + # specifies --with-installed-readline=PREFIX as an argument to configure + + if test -z "$ac_cv_rl_prefix"; then + test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix} + fi + + eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include + eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib + + LIBS="$LIBS -lreadline ${TERMCAP_LIB}" + CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}" + LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" + + AC_TRY_RUN([ + #include + #include + + main() + { + FILE *fp; + fp = fopen("conftest.rlv", "w"); + if (fp == 0) exit(1); + fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0"); + fclose(fp); + exit(0); + } + ], + ac_cv_rl_version=`cat conftest.rlv`, + ac_cv_rl_version='0.0', + ac_cv_rl_version='4.2') + + CFLAGS="$_save_CFLAGS" + LDFLAGS="$_save_LDFLAGS" + LIBS="$_save_LIBS" + + RL_MAJOR=0 + RL_MINOR=0 + + # ( + case "$ac_cv_rl_version" in + 2*|3*|4*|5*|6*|7*|8*|9*) + RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'` + RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'` + ;; + esac + + # ((( + case $RL_MAJOR in + [[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;; + [[0-9]]) _RL_MAJOR=0$RL_MAJOR ;; + *) _RL_MAJOR=00 ;; + esac + + # ((( + case $RL_MINOR in + [[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;; + [[0-9]]) _RL_MINOR=0$RL_MINOR ;; + *) _RL_MINOR=00 ;; + esac + + RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}" + + # Readline versions greater than 4.2 have these defines in readline.h + + if test $ac_cv_rl_version = '0.0' ; then + AC_MSG_WARN([Could not test version of installed readline library.]) + elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then + # set these for use by the caller + RL_PREFIX=$ac_cv_rl_prefix + RL_LIBDIR=$ac_cv_rl_libdir + RL_INCLUDEDIR=$ac_cv_rl_includedir + AC_MSG_RESULT($ac_cv_rl_version) + else + + AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library]) + AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library]) + AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library]) + + AC_SUBST(RL_VERSION) + AC_SUBST(RL_MAJOR) + AC_SUBST(RL_MINOR) + + # set these for use by the caller + RL_PREFIX=$ac_cv_rl_prefix + RL_LIBDIR=$ac_cv_rl_libdir + RL_INCLUDEDIR=$ac_cv_rl_includedir + + AC_MSG_RESULT($ac_cv_rl_version) + fi ]) diff -Nrc2 readline-4.2/ansi_stdlib.h readline-4.2a/ansi_stdlib.h *** readline-4.2/ansi_stdlib.h Thu Sep 7 12:07:49 2000 --- readline-4.2a/ansi_stdlib.h Wed Oct 17 16:08:40 2001 *************** *** 26,30 **** /* String conversion functions. */ extern int atoi (); - extern long int atol (); extern double atof (); --- 26,29 ---- *************** *** 32,37 **** /* Memory allocation functions. */ ! extern char *malloc (); ! extern char *realloc (); extern void free (); --- 31,47 ---- /* Memory allocation functions. */ ! /* Generic pointer type. */ ! #ifndef PTR_T ! ! #if defined (__STDC__) ! # define PTR_T void * ! #else ! # define PTR_T char * ! #endif ! ! #endif /* PTR_T */ ! ! extern PTR_T malloc (); ! extern PTR_T realloc (); extern void free (); diff -Nrc2 readline-4.2/bind.c readline-4.2a/bind.c *** readline-4.2/bind.c Mon Mar 5 10:10:07 2001 --- readline-4.2a/bind.c Mon Oct 15 14:30:43 2001 *************** *** 69,75 **** Keymap rl_binding_keymap; ! static int _rl_read_init_file __P((const char *, int)); ! static int glean_key_from_name __P((char *)); ! static int substring_member_of_array __P((char *, const char **)); static int currently_reading_init_file; --- 69,75 ---- Keymap rl_binding_keymap; ! static int _rl_read_init_file PARAMS((const char *, int)); ! static int glean_key_from_name PARAMS((char *)); ! static int substring_member_of_array PARAMS((char *, const char **)); static int currently_reading_init_file; *************** *** 256,260 **** } ! keys = xmalloc (1 + (2 * strlen (keyseq))); /* Translate the ASCII representation of KEYSEQ into an array of --- 256,260 ---- } ! keys = (char *)xmalloc (1 + (2 * strlen (keyseq))); /* Translate the ASCII representation of KEYSEQ into an array of *************** *** 270,274 **** for (i = 0; i < keys_len; i++) { ! int ic = (int) ((unsigned char)keys[i]); if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic)) --- 270,274 ---- for (i = 0; i < keys_len; i++) { ! unsigned char ic = keys[i]; if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic)) *************** *** 394,407 **** c = (c * 8) + OCTVALUE (seq[i]); i--; /* auto-increment in for loop */ ! array[l++] = c % (largest_char + 1); break; case 'x': i++; ! for (temp = 3, c = 0; isxdigit (seq[i]) && temp--; i++) c = (c * 16) + HEXVALUE (seq[i]); ! if (temp == 3) c = 'x'; i--; /* auto-increment in for loop */ ! array[l++] = c % (largest_char + 1); break; default: /* backslashes before non-special chars just add the char */ --- 394,407 ---- c = (c * 8) + OCTVALUE (seq[i]); i--; /* auto-increment in for loop */ ! array[l++] = c & largest_char; break; case 'x': i++; ! for (temp = 2, c = 0; ISXDIGIT ((unsigned char)seq[i]) && temp--; i++) c = (c * 16) + HEXVALUE (seq[i]); ! if (temp == 2) c = 'x'; i--; /* auto-increment in for loop */ ! array[l++] = c & largest_char; break; default: /* backslashes before non-special chars just add the char */ *************** *** 473,477 **** int c; ! r = ret = xmalloc (7 * strlen (seq) + 1); for (s = seq; *s; s++) { --- 473,477 ---- int c; ! r = ret = (char *)xmalloc (7 * strlen (seq) + 1); for (s = seq; *s; s++) { *************** *** 548,552 **** for (i = 0; keyseq && keyseq[i]; i++) { ! int ic = keyseq[i]; if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) --- 548,552 ---- for (i = 0; keyseq && keyseq[i]; i++) { ! unsigned char ic = keyseq[i]; if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) *************** *** 783,787 **** /* **************************************************************** */ ! typedef int _rl_parser_func_t __P((char *)); /* Things that mean `Control'. */ --- 783,787 ---- /* **************************************************************** */ ! typedef int _rl_parser_func_t PARAMS((char *)); /* Things that mean `Control'. */ *************** *** 1146,1150 **** register int j, k, passc; ! seq = xmalloc (1 + strlen (string)); for (j = 1, k = passc = 0; string[j]; j++) { --- 1146,1150 ---- register int j, k, passc; ! seq = (char *)xmalloc (1 + strlen (string)); for (j = 1, k = passc = 0; string[j]; j++) { *************** *** 1204,1208 **** if (*funname == '\'' || *funname == '"') { ! unsigned char useq[2]; int fl = strlen (funname); --- 1204,1208 ---- if (*funname == '\'' || *funname == '"') { ! char useq[2]; int fl = strlen (funname); *************** *** 1246,1253 **** --- 1246,1255 ---- { "enable-keypad", &_rl_enable_keypad, 0 }, { "expand-tilde", &rl_complete_with_tilde_expansion, 0 }, + { "history-preserve-point", &_rl_history_preserve_point, 0 }, { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 }, { "input-meta", &_rl_meta_flag, 0 }, { "mark-directories", &_rl_complete_mark_directories, 0 }, { "mark-modified-lines", &_rl_mark_modified_lines, 0 }, + { "match-hidden-files", &_rl_match_hidden_files, 0 }, { "meta-flag", &_rl_meta_flag, 0 }, { "output-meta", &_rl_output_meta_chars, 0 }, *************** *** 1295,1299 **** } ! typedef int _rl_sv_func_t __P((const char *)); /* These *must* correspond to the array indices for the appropriate --- 1297,1301 ---- } ! typedef int _rl_sv_func_t PARAMS((const char *)); /* These *must* correspond to the array indices for the appropriate *************** *** 1309,1318 **** /* Forward declarations */ ! static int sv_bell_style __P((const char *)); ! static int sv_combegin __P((const char *)); ! static int sv_compquery __P((const char *)); ! static int sv_editmode __P((const char *)); ! static int sv_isrchterm __P((const char *)); ! static int sv_keymap __P((const char *)); static struct { --- 1311,1320 ---- /* Forward declarations */ ! static int sv_bell_style PARAMS((const char *)); ! static int sv_combegin PARAMS((const char *)); ! static int sv_compquery PARAMS((const char *)); ! static int sv_editmode PARAMS((const char *)); ! static int sv_isrchterm PARAMS((const char *)); ! static int sv_keymap PARAMS((const char *)); static struct { *************** *** 1447,1452 **** } - #define _SET_BELL(v) do { _rl_bell_preference = v; return 0; } while (0) - static int sv_bell_style (value) --- 1449,1452 ---- *************** *** 1454,1468 **** { if (value == 0 || *value == '\0') ! _SET_BELL (AUDIBLE_BELL); else if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0) ! _SET_BELL (NO_BELL); else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0) ! _SET_BELL (AUDIBLE_BELL); else if (_rl_stricmp (value, "visible") == 0) ! _SET_BELL (VISIBLE_BELL); else return 1; } - #undef _SET_BELL static int --- 1454,1468 ---- { if (value == 0 || *value == '\0') ! _rl_bell_preference = AUDIBLE_BELL; else if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0) ! _rl_bell_preference = NO_BELL; else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0) ! _rl_bell_preference = AUDIBLE_BELL; else if (_rl_stricmp (value, "visible") == 0) ! _rl_bell_preference = VISIBLE_BELL; else return 1; + return 0; } static int *************** *** 1494,1498 **** /* The value starts at v + beg. Translate it into a character string. */ ! _rl_isearch_terminators = (unsigned char *)xmalloc (2 * strlen (v) + 1); rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end); _rl_isearch_terminators[end] = '\0'; --- 1494,1498 ---- /* The value starts at v + beg. Translate it into a character string. */ ! _rl_isearch_terminators = (char *)xmalloc (2 * strlen (v) + 1); rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end); _rl_isearch_terminators[end] = '\0'; *************** *** 1752,1756 **** { result_size += 10; ! result = (char **) xrealloc (result, result_size * sizeof (char *)); } --- 1752,1756 ---- { result_size += 10; ! result = (char **)xrealloc (result, result_size * sizeof (char *)); } *************** *** 1804,1808 **** { result_size += 10; ! result = (char **) xrealloc (result, result_size * sizeof (char *)); } --- 1804,1808 ---- { result_size += 10; ! result = (char **)xrealloc (result, result_size * sizeof (char *)); } *************** *** 1952,1956 **** if (key == ESC) { ! keyname = xmalloc (3 + prefix_len); if (prefix) strcpy (keyname, prefix); --- 1952,1956 ---- if (key == ESC) { ! keyname = (char *)xmalloc (3 + prefix_len); if (prefix) strcpy (keyname, prefix); *************** *** 1964,1968 **** if (prefix) { ! out = xmalloc (strlen (keyname) + prefix_len + 1); strcpy (out, prefix); strcpy (out + prefix_len, keyname); --- 1964,1968 ---- if (prefix) { ! out = (char *)xmalloc (strlen (keyname) + prefix_len + 1); strcpy (out, prefix); strcpy (out + prefix_len, keyname); diff -Nrc2 readline-4.2/callback.c readline-4.2a/callback.c *** readline-4.2/callback.c Tue Dec 12 14:48:21 2000 --- readline-4.2a/callback.c Mon Sep 10 10:05:28 2001 *************** *** 31,34 **** --- 31,41 ---- #include + + #ifdef HAVE_STDLIB_H + # include + #else + # include "ansi_stdlib.h" + #endif + #include diff -Nrc2 readline-4.2/chardefs.h readline-4.2a/chardefs.h *** readline-4.2/chardefs.h Wed Sep 13 17:20:15 2000 --- readline-4.2a/chardefs.h Thu Nov 8 08:17:21 2001 *************** *** 28,35 **** #if defined (HAVE_CONFIG_H) # if defined (HAVE_STRING_H) # include - # else - # include # endif /* HAVE_STRING_H */ #else # include --- 28,39 ---- #if defined (HAVE_CONFIG_H) # if defined (HAVE_STRING_H) + # if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H) + # include + # endif # include # endif /* HAVE_STRING_H */ + # if defined (HAVE_STRINGS_H) + # include + # endif /* HAVE_STRINGS_H */ #else # include *************** *** 61,91 **** #define UNCTRL(c) _rl_to_upper(((c)|control_character_bit)) ! /* Old versions ! #define _rl_lowercase_p(c) (((c) > ('a' - 1) && (c) < ('z' + 1))) ! #define _rl_uppercase_p(c) (((c) > ('A' - 1) && (c) < ('Z' + 1))) ! #define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') ! */ ! ! #define _rl_lowercase_p(c) (islower(c)) ! #define _rl_uppercase_p(c) (isupper(c)) ! #define _rl_digit_p(x) (isdigit (x)) ! ! #define _rl_pure_alphabetic(c) (_rl_lowercase_p(c) || _rl_uppercase_p(c)) ! #define ALPHABETIC(c) (_rl_lowercase_p(c) || _rl_uppercase_p(c) || _rl_digit_p(c)) ! ! /* Old versions ! # define _rl_to_upper(c) (_rl_lowercase_p(c) ? ((c) - 32) : (c)) ! # define _rl_to_lower(c) (_rl_uppercase_p(c) ? ((c) + 32) : (c)) ! */ #ifndef _rl_to_upper ! # define _rl_to_upper(c) (islower(c) ? toupper(c) : (c)) ! # define _rl_to_lower(c) (isupper(c) ? tolower(c) : (c)) #endif #ifndef _rl_digit_value ! #define _rl_digit_value(x) ((x) - '0') #endif #ifndef NEWLINE #define NEWLINE '\n' --- 65,118 ---- #define UNCTRL(c) _rl_to_upper(((c)|control_character_bit)) ! #if defined STDC_HEADERS || (!defined (isascii) && !defined (HAVE_ISASCII)) ! # define IN_CTYPE_DOMAIN(c) 1 ! #else ! # define IN_CTYPE_DOMAIN(c) isascii(c) ! #endif ! ! #if !defined (isxdigit) && !defined (HAVE_ISXDIGIT) ! # define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) ! #endif ! ! #define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) ! ! #define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) ! #define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) ! #define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) ! #define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) ! #define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c)) ! #define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c)) ! #define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c)) ! ! #define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c)) ! #define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c)) ! #define _rl_digit_p(c) ((c) >= '0' && (c) <= '9') ! ! #define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c)) ! #define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c)) #ifndef _rl_to_upper ! # define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c)) ! # define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c)) #endif #ifndef _rl_digit_value ! # define _rl_digit_value(x) ((x) - '0') ! #endif ! ! #ifndef _rl_isident ! # define _rl_isident(c) (ISALNUM(c) || (c) == '_') #endif + #ifndef ISOCTAL + # define ISOCTAL(c) ((c) >= '0' && (c) <= '7') + #endif + #define OCTVALUE(c) ((c) - '0') + + #define HEXVALUE(c) \ + (((c) >= 'a' && (c) <= 'f') \ + ? (c)-'a'+10 \ + : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') + #ifndef NEWLINE #define NEWLINE '\n' *************** *** 123,140 **** #endif #define ESC CTRL('[') - - #ifndef ISOCTAL - #define ISOCTAL(c) ((c) >= '0' && (c) <= '7') - #endif - #define OCTVALUE(c) ((c) - '0') - - #ifndef isxdigit - # define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F')) - #endif - - #define HEXVALUE(c) \ - (((c) >= 'a' && (c) <= 'f') \ - ? (c)-'a'+10 \ - : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0') #endif /* _CHARDEFS_H_ */ --- 150,153 ---- diff -Nrc2 readline-4.2/compat.c readline-4.2a/compat.c *** readline-4.2/compat.c Tue Feb 6 14:15:13 2001 --- readline-4.2a/compat.c Wed Aug 22 09:38:45 2001 *************** *** 31,46 **** #include "rltypedefs.h" ! extern void rl_free_undo_list __P((void)); ! extern int rl_maybe_save_line __P((void)); ! extern int rl_maybe_unsave_line __P((void)); ! extern int rl_maybe_replace_line __P((void)); ! extern int rl_crlf __P((void)); ! extern int rl_ding __P((void)); ! extern int rl_alphabetic __P((int)); ! extern char **rl_completion_matches __P((const char *, rl_compentry_func_t *)); ! extern char *rl_username_completion_function __P((const char *, int)); ! extern char *rl_filename_completion_function __P((const char *, int)); /* Provide backwards-compatible entry points for old function names. */ --- 31,46 ---- #include "rltypedefs.h" ! extern void rl_free_undo_list PARAMS((void)); ! extern int rl_maybe_save_line PARAMS((void)); ! extern int rl_maybe_unsave_line PARAMS((void)); ! extern int rl_maybe_replace_line PARAMS((void)); ! extern int rl_crlf PARAMS((void)); ! extern int rl_ding PARAMS((void)); ! extern int rl_alphabetic PARAMS((int)); ! extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *)); ! extern char *rl_username_completion_function PARAMS((const char *, int)); ! extern char *rl_filename_completion_function PARAMS((const char *, int)); /* Provide backwards-compatible entry points for old function names. */ diff -Nrc2 readline-4.2/complete.c readline-4.2a/complete.c *** readline-4.2/complete.c Wed Feb 14 07:47:18 2001 --- readline-4.2a/complete.c Mon Oct 15 14:31:41 2001 *************** *** 68,75 **** #endif /* Most systems don't declare getpwent in if _POSIX_SOURCE is defined. */ #if !defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE) ! extern struct passwd *getpwent __P((void)); #endif /* !HAVE_GETPW_DECLS || _POSIX_SOURCE */ --- 68,84 ---- #endif + #ifdef HAVE_LSTAT + # define LSTAT lstat + #else + # define LSTAT stat + #endif + + /* Unix version of a hidden file. Could be different on other systems. */ + #define HIDDEN_FILE(fname) ((fname)[0] == '.') + /* Most systems don't declare getpwent in if _POSIX_SOURCE is defined. */ #if !defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE) ! extern struct passwd *getpwent PARAMS((void)); #endif /* !HAVE_GETPW_DECLS || _POSIX_SOURCE */ *************** *** 87,101 **** # define X_OK 1 # endif ! static int stat_char __P((char *)); #endif ! static char *rl_quote_filename __P((char *, int, char *)); ! static char **remove_duplicate_matches __P((char **)); ! static void insert_match __P((char *, int, int, char *)); ! static int append_to_match __P((char *, int, int)); ! static void insert_all_matches __P((char **, int, char *)); ! static void display_matches __P((char **)); ! static int compute_lcd_of_matches __P((char **, int, const char *)); /* **************************************************************** */ --- 96,121 ---- # define X_OK 1 # endif ! static int stat_char PARAMS((char *)); #endif ! static char *rl_quote_filename PARAMS((char *, int, char *)); ! ! static int get_y_or_n PARAMS((void)); ! static char *printable_part PARAMS((char *)); ! static int print_filename PARAMS((char *, char *)); ! static char find_completion_word PARAMS((int *, int *)); ! ! static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int)); ! ! static char **remove_duplicate_matches PARAMS((char **)); ! static void insert_match PARAMS((char *, int, int, char *)); ! static int append_to_match PARAMS((char *, int, int, int)); ! static void insert_all_matches PARAMS((char **, int, char *)); ! static void display_matches PARAMS((char **)); ! static int compute_lcd_of_matches PARAMS((char **, int, const char *)); ! static int postprocess_matches PARAMS((char ***, int)); ! static char *make_quoted_replacement PARAMS((char *, int, char *)); ! static void free_match_list PARAMS((char **)); /* **************************************************************** */ *************** *** 124,127 **** --- 144,151 ---- #endif + /* If non-zero, don't match hidden files (filenames beginning with a `.' on + Unix) when doing filename completion. */ + int _rl_match_hidden_files = 1; + /* Global variables available to applications using readline. */ *************** *** 388,392 **** temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL; #if defined (__MSDOS__) ! if (rl_filename_completion_desired && temp == 0 && isalpha (pathname[0]) && pathname[1] == ':') temp = pathname + 1; #endif --- 412,416 ---- temp = rl_filename_completion_desired ? strrchr (pathname, '/') : (char *)NULL; #if defined (__MSDOS__) ! if (rl_filename_completion_desired && temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':') temp = pathname + 1; #endif *************** *** 462,466 **** slen = strlen (s); tlen = strlen (to_print); ! new_full_pathname = xmalloc (slen + tlen + 2); strcpy (new_full_pathname, s); new_full_pathname[slen] = '/'; --- 486,490 ---- slen = strlen (s); tlen = strlen (to_print); ! new_full_pathname = (char *)xmalloc (slen + tlen + 2); strcpy (new_full_pathname, s); new_full_pathname[slen] = '/'; *************** *** 497,501 **** char *r; ! r = xmalloc (strlen (s) + 2); *r = *rl_completer_quote_characters; strcpy (r + 1, s); --- 521,525 ---- char *r; ! r = (char *)xmalloc (strlen (s) + 2); *r = *rl_completer_quote_characters; strcpy (r + 1, s); *************** *** 508,512 **** rl_point set to the end of the word. This function skips quoted substrings (characters between matched pairs of characters in ! rl_completer_quote_characters. First we try to find an unclosed quoted substring on which to do matching. If one is not found, we use the word break characters to find the boundaries of the current word. --- 532,536 ---- rl_point set to the end of the word. This function skips quoted substrings (characters between matched pairs of characters in ! rl_completer_quote_characters). First we try to find an unclosed quoted substring on which to do matching. If one is not found, we use the word break characters to find the boundaries of the current word. *************** *** 798,808 **** if (low == 0 && text && *text) { ! match_list[0] = xmalloc (strlen (text) + 1); strcpy (match_list[0], text); } else { ! match_list[0] = xmalloc (low + 1); ! strncpy (match_list[0], match_list[1], low); match_list[0][low] = '\0'; } --- 822,859 ---- if (low == 0 && text && *text) { ! match_list[0] = (char *)xmalloc (strlen (text) + 1); strcpy (match_list[0], text); } else { ! match_list[0] = (char *)xmalloc (low + 1); ! ! /* If we are ignoring case, try to preserve the case of the string ! the user typed in the face of multiple matches differing in case. */ ! if (_rl_completion_case_fold) ! { ! /* sort the list to get consistent answers. */ ! qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare); ! ! si = strlen (text); ! if (si <= low) ! { ! for (i = 1; i <= matches; i++) ! if (strncmp (match_list[i], text, si) == 0) ! { ! strncpy (match_list[0], match_list[i], low); ! break; ! } ! /* no casematch, use first entry */ ! if (i > matches) ! strncpy (match_list[0], match_list[1], low); ! } ! else ! /* otherwise, just use the text the user typed. */ ! strncpy (match_list[0], text, low); ! } ! else ! strncpy (match_list[0], match_list[1], low); ! match_list[0][low] = '\0'; } *************** *** 1103,1114 **** should be marked by a trailing `/', append one of those instead. The default trailing character is a space. Returns the number of characters ! appended. */ static int ! append_to_match (text, delimiter, quote_char) char *text; ! int delimiter, quote_char; { char temp_string[4], *filename; ! int temp_string_index; struct stat finfo; --- 1154,1167 ---- should be marked by a trailing `/', append one of those instead. The default trailing character is a space. Returns the number of characters ! appended. If NONTRIVIAL_MATCH is set, we test for a symlink (if the OS ! has them) and don't add a suffix for a symlink to a directory. A ! nontrivial match is one that actually adds to the word being completed. */ static int ! append_to_match (text, delimiter, quote_char, nontrivial_match) char *text; ! int delimiter, quote_char, nontrivial_match; { char temp_string[4], *filename; ! int temp_string_index, s; struct stat finfo; *************** *** 1127,1135 **** { filename = tilde_expand (text); ! if (stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)) { if (_rl_complete_mark_directories && rl_line_buffer[rl_point] != '/') rl_insert_text ("/"); } else { --- 1180,1196 ---- { filename = tilde_expand (text); ! s = nontrivial_match ? LSTAT (filename, &finfo) : stat (filename, &finfo); ! if (s == 0 && S_ISDIR (finfo.st_mode)) { if (_rl_complete_mark_directories && rl_line_buffer[rl_point] != '/') rl_insert_text ("/"); } + #ifdef S_ISLNK + /* Don't add anything if the filename is a symlink and resolves to a + directory. */ + else if (s == 0 && S_ISLNK (finfo.st_mode) && + stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode)) + ; + #endif else { *************** *** 1211,1215 **** char **matches; rl_compentry_func_t *our_func; ! int start, end, delimiter, found_quote, i; char *text, *saved_line_buffer; char quote_char; --- 1272,1276 ---- char **matches; rl_compentry_func_t *our_func; ! int start, end, delimiter, found_quote, i, nontrivial_lcd; char *text, *saved_line_buffer; char quote_char; *************** *** 1241,1244 **** --- 1302,1308 ---- text = rl_copy_text (start, end); matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char); + /* nontrivial_lcd is set if the common prefix adds something to the word + being completed. */ + nontrivial_lcd = matches && strcmp (text, matches[0]) != 0; free (text); *************** *** 1292,1296 **** } else ! append_to_match (matches[0], delimiter, quote_char); break; --- 1356,1360 ---- } else ! append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd); break; *************** *** 1429,1433 **** else { ! value = xmalloc (2 + strlen (entry->pw_name)); *value = *text; --- 1493,1497 ---- else { ! value = (char *)xmalloc (2 + strlen (entry->pw_name)); *value = *text; *************** *** 1484,1488 **** #if defined (__MSDOS__) /* special hack for //X/... */ ! if (dirname[0] == '/' && dirname[1] == '/' && isalpha (dirname[2]) && dirname[3] == '/') temp = strrchr (dirname + 3, '/'); #endif --- 1548,1552 ---- #if defined (__MSDOS__) /* special hack for //X/... */ ! if (dirname[0] == '/' && dirname[1] == '/' && ISALPHA ((unsigned char)dirname[2]) && dirname[3] == '/') temp = strrchr (dirname + 3, '/'); #endif *************** *** 1495,1499 **** #if defined (__MSDOS__) /* searches from current directory on the drive */ ! else if (isalpha (dirname[0]) && dirname[1] == ':') { strcpy (filename, dirname + 2); --- 1559,1563 ---- #if defined (__MSDOS__) /* searches from current directory on the drive */ ! else if (ISALPHA ((unsigned char)dirname[0]) && dirname[1] == ':') { strcpy (filename, dirname + 2); *************** *** 1545,1552 **** while (directory && (entry = readdir (directory))) { ! /* Special case for no filename. ! All entries except "." and ".." match. */ if (filename_len == 0) { if (entry->d_name[0] != '.' || (entry->d_name[1] && --- 1609,1620 ---- while (directory && (entry = readdir (directory))) { ! /* Special case for no filename. If the user has disabled the ! `match-hidden-files' variable, skip filenames beginning with `.'. ! All other entries except "." and ".." match. */ if (filename_len == 0) { + if (_rl_match_hidden_files == 0 && HIDDEN_FILE (entry->d_name)) + continue; + if (entry->d_name[0] != '.' || (entry->d_name[1] && *************** *** 1608,1612 **** { dirlen = strlen (dirname); ! temp = xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, dirname); /* Canonicalization cuts off any final slash present. We --- 1676,1680 ---- { dirlen = strlen (dirname); ! temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, dirname); /* Canonicalization cuts off any final slash present. We *************** *** 1621,1625 **** { dirlen = strlen (users_dirname); ! temp = xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, users_dirname); /* Make sure that temp has a trailing slash here. */ --- 1689,1693 ---- { dirlen = strlen (users_dirname); ! temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, users_dirname); /* Make sure that temp has a trailing slash here. */ *************** *** 1746,1750 **** { insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); ! append_to_match (matches[match_list_index], delimiter, quote_char); } --- 1814,1819 ---- { insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, "e_char); ! append_to_match (matches[match_list_index], delimiter, quote_char, ! strcmp (orig_text, matches[match_list_index])); } diff -Nrc2 readline-4.2/config.h.in readline-4.2a/config.h.in *** readline-4.2/config.h.in Wed Feb 7 13:31:08 2001 --- readline-4.2a/config.h.in Mon Oct 29 10:21:04 2001 *************** *** 7,10 **** --- 7,17 ---- #undef RETSIGTYPE + /* Characteristics of the compiler. */ + #undef const + + #undef size_t + + #undef ssize_t + /* Define if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN *************** *** 12,15 **** --- 19,28 ---- #undef VOID_SIGHANDLER + /* Define if you have the isascii function. */ + #undef HAVE_ISASCII + + /* Define if you have the isxdigit function. */ + #undef HAVE_ISXDIGIT + /* Define if you have the lstat function. */ #undef HAVE_LSTAT *************** *** 27,39 **** #undef HAVE_SETENV /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP ! /* Define if you have the setlocale function. */ ! #undef HAVE_SETLOCALE /* Define if you have the tcgetattr function. */ #undef HAVE_TCGETATTR /* Define if you have the strcoll function. */ #undef HAVE_STRCOLL --- 40,58 ---- #undef HAVE_SETENV + /* Define if you have the setlocale function. */ + #undef HAVE_SETLOCALE + /* Define if you have the strcasecmp function. */ #undef HAVE_STRCASECMP ! /* Define if you have the strpbrk function. */ ! #undef HAVE_STRPBRK /* Define if you have the tcgetattr function. */ #undef HAVE_TCGETATTR + /* Define if you have the vsnprintf function. */ + #undef HAVE_VSNPRINTF + /* Define if you have the strcoll function. */ #undef HAVE_STRCOLL *************** *** 53,56 **** --- 72,78 ---- #undef HAVE_STRING_H + /* Define if you have the header file. */ + #undef HAVE_STRINGS_H + /* Define if you have the header file. */ #undef HAVE_SYS_DIR_H *************** *** 93,96 **** --- 115,122 ---- #undef HAVE_LOCALE_H + + #undef HAVE_LIMITS_H + + #undef HAVE_MEMORY_H /* Definitions pulled in from aclocal.m4. */ diff -Nrc2 readline-4.2/configure readline-4.2a/configure *** readline-4.2/configure Mon Apr 2 15:56:02 2001 --- readline-4.2a/configure Mon Nov 12 11:49:27 2001 *************** *** 1,132 **** #! /bin/sh ! # From configure.in for Readline 4.2, version 2.26, from autoconf version 2.13 ! LIBVERSION=4.2 ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! - # Guess values for system-dependent variables and create Makefiles. - # Generated automatically using autoconf version 2.13 - # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # ! # This configure script is free software; the Free Software Foundation ! # gives unlimited permission to copy, distribute and modify it. ! ! # Defaults: ! ac_help= ac_default_prefix=/usr/local ! # Any additions from configure.in: ! ac_help="$ac_help ! --with-curses use the curses library instead of the termcap library" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. ! build=NONE ! cache_file=./config.cache exec_prefix=NONE - host=NONE no_create= - nonopt=NONE no_recursion= prefix=NONE --- 1,157 ---- #! /bin/sh + # From configure.in for Readline 4.2a, version 2.40, from autoconf version 2.52. + # Guess values for system-dependent variables and create Makefiles. + # Generated by Autoconf 2.52 for readline 4.2a. + # + # Report bugs to . + # + # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 + # Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. ! # Avoid depending upon Character Ranges. ! as_cr_letters='abcdefghijklmnopqrstuvwxyz' ! as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' ! as_cr_Letters=$as_cr_letters$as_cr_LETTERS ! as_cr_digits='0123456789' ! as_cr_alnum=$as_cr_Letters$as_cr_digits ! ! # Sed expression to map a string onto a valid variable name. ! as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" ! ! # Sed expression to map a string onto a valid CPP name. ! as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" ! ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! ! # Name of the executable. ! as_me=`echo "$0" |sed 's,.*[\\/],,'` ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' ! else ! as_ln_s='ln -s' ! fi ! elif ln conf$$.file conf$$ 2>/dev/null; then ! as_ln_s=ln ! else ! as_ln_s='cp -p' ! fi ! rm -f conf$$ conf$$.exe conf$$.file + as_executable_p="test -f" + # Support unset when possible. + if (FOO=FOO; unset FOO) >/dev/null 2>&1; then + as_unset=unset + else + as_unset=false + fi + # NLS nuisances. + $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } + $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } + $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } + $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } + $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } + $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } + $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } + $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } + + # IFS + # We need space, tab and new line, in precisely that order. + as_nl=' + ' + IFS=" $as_nl" + + # CDPATH. + $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } + + # Name of the host. + # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + exec 6>&1 # ! # Initializations. ! # ac_default_prefix=/usr/local ! cross_compiling=no ! subdirs= ! MFLAGS= MAKEFLAGS= ! SHELL=${CONFIG_SHELL-/bin/sh} ! ! # Maximum number of lines to put in a shell here document. ! # This variable seems obsolete. It should probably be removed, and ! # only ac_max_sed_lines should be used. ! : ${ac_max_here_lines=38} ! ! ac_unique_file="readline.h" ! # Factoring default headers for most tests. ! ac_includes_default="\ ! #include ! #if HAVE_SYS_TYPES_H ! # include ! #endif ! #if HAVE_SYS_STAT_H ! # include ! #endif ! #if STDC_HEADERS ! # include ! # include ! #else ! # if HAVE_STDLIB_H ! # include ! # endif ! #endif ! #if HAVE_STRING_H ! # if !STDC_HEADERS && HAVE_MEMORY_H ! # include ! # endif ! # include ! #endif ! #if HAVE_STRINGS_H ! # include ! #endif ! #if HAVE_INTTYPES_H ! # include ! #else ! # if HAVE_STDINT_H ! # include ! # endif ! #endif ! #if HAVE_UNISTD_H ! # include ! #endif" # Initialize some variables set by options. + ac_init_help= + ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. ! cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE *************** *** 137,144 **** site= srcdir= - target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' --- 162,174 ---- site= srcdir= verbose= x_includes=NONE x_libraries=NONE + + # Installation directory options. + # These are left unexpanded so users can "make install exec_prefix=/foo" + # and all the variables that are supposed to be based on exec_prefix + # by default will actually change. + # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' *************** *** 154,168 **** mandir='${prefix}/man' ! # Initialize some other variables. ! subdirs= ! MFLAGS= MAKEFLAGS= ! SHELL=${CONFIG_SHELL-/bin/sh} ! # Maximum number of lines to put in a shell here document. ! ac_max_here_lines=12 ac_prev= for ac_option do - # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then --- 184,197 ---- mandir='${prefix}/man' ! # Identity of this package. ! PACKAGE_NAME='readline' ! PACKAGE_TARNAME='readline' ! PACKAGE_VERSION='4.2a' ! PACKAGE_STRING='readline 4.2a' ! PACKAGE_BUGREPORT='bug-readline@gnu.org' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then *************** *** 172,193 **** fi ! case "$ac_option" in ! -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; ! *) ac_optarg= ;; ! esac # Accept the important Cygnus configure options, so we can diagnose typos. ! case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ --- 201,219 ---- fi ! ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. ! case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) ! bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ! ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) ! build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ *************** *** 196,200 **** -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) --- 222,229 ---- -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) ! cache_file=$ac_optarg ;; ! ! --config-cache | -C) ! cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) *************** *** 202,228 **** -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir="$ac_optarg" ;; -disable-* | --disable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ! ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } ! fi ! ac_feature=`echo $ac_feature| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ --- 231,257 ---- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) ! datadir=$ac_optarg ;; -disable-* | --disable-*) ! ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ! ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid feature name: $ac_feature" >&2 ! { (exit 1); exit 1; }; } ! ac_feature=`echo $ac_feature | sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ *************** *** 233,237 **** | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) --- 262,266 ---- | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) ! exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) *************** *** 239,301 **** with_gas=yes ;; ! -help | --help | --hel | --he) ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat << EOF ! Usage: configure [options] [host] ! Options: [defaults in brackets after descriptions] ! Configuration: ! --cache-file=FILE cache test results in FILE ! --help print this message ! --no-create do not create output files ! --quiet, --silent do not print \`checking...' messages ! --version print the version of autoconf that created configure ! Directory and file names: ! --prefix=PREFIX install architecture-independent files in PREFIX ! [$ac_default_prefix] ! --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX ! [same as prefix] ! --bindir=DIR user executables in DIR [EPREFIX/bin] ! --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] ! --libexecdir=DIR program executables in DIR [EPREFIX/libexec] ! --datadir=DIR read-only architecture-independent data in DIR ! [PREFIX/share] ! --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] ! --sharedstatedir=DIR modifiable architecture-independent data in DIR ! [PREFIX/com] ! --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] ! --libdir=DIR object code libraries in DIR [EPREFIX/lib] ! --includedir=DIR C header files in DIR [PREFIX/include] ! --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] ! --infodir=DIR info documentation in DIR [PREFIX/info] ! --mandir=DIR man documentation in DIR [PREFIX/man] ! --srcdir=DIR find the sources in DIR [configure dir or ..] ! --program-prefix=PREFIX prepend PREFIX to installed program names ! --program-suffix=SUFFIX append SUFFIX to installed program names ! --program-transform-name=PROGRAM ! run sed PROGRAM on installed program names ! EOF ! cat << EOF ! Host type: ! --build=BUILD configure for building on BUILD [BUILD=HOST] ! --host=HOST configure for HOST [guessed] ! --target=TARGET configure for TARGET [TARGET=HOST] ! Features and packages: ! --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) ! --enable-FEATURE[=ARG] include FEATURE [ARG=yes] ! --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] ! --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) ! --x-includes=DIR X include files are in DIR ! --x-libraries=DIR X library files are in DIR ! EOF ! if test -n "$ac_help"; then ! echo "--enable and --with options recognized:$ac_help" ! fi ! exit 0 ;; -host | --host | --hos | --ho) ! ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) ! host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ --- 268,282 ---- with_gas=yes ;; ! -help | --help | --hel | --he | -h) ! ac_init_help=long ;; ! -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ! ac_init_help=recursive ;; ! -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ! ac_init_help=short ;; -host | --host | --hos | --ho) ! ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) ! host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ *************** *** 304,318 **** -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ --- 285,299 ---- -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) ! includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) ! infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) ! libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ *************** *** 321,325 **** -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ --- 302,306 ---- -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) ! libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ *************** *** 330,339 **** | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir="$ac_optarg" ;; -nfp | --nfp | --nf) --- 311,320 ---- | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) ! localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) ! mandir=$ac_optarg ;; -nfp | --nfp | --nf) *************** *** 356,365 **** | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ --- 337,346 ---- | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) ! oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ! prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ *************** *** 368,372 **** -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ --- 349,353 ---- -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) ! program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ *************** *** 375,379 **** -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ --- 356,360 ---- -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) ! program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ *************** *** 392,396 **** | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ --- 373,377 ---- | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) ! program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ *************** *** 402,406 **** -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ --- 383,387 ---- -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) ! sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ *************** *** 413,427 **** | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ --- 394,408 ---- | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) ! sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) ! site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ! srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ *************** *** 430,468 **** -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers) ! echo "configure generated by autoconf version 2.13" ! exit 0 ;; -with-* | --with-*) ! ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ac_package=`echo $ac_package| sed 's/-/_/g'` ! case "$ac_option" in ! *=*) ;; *) ac_optarg=yes ;; esac ! eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. ! if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then ! { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } ! fi ! ac_package=`echo $ac_package| sed 's/-/_/g'` ! eval "with_${ac_package}=no" ;; --x) --- 411,448 ---- -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) ! sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ! ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ! target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; ! -version | --version | --versio | --versi | --vers | -V) ! ac_init_version=: ;; -with-* | --with-*) ! ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` ! case $ac_option in ! *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac ! eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ! ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. ! expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && ! { echo "$as_me: error: invalid package name: $ac_package" >&2 ! { (exit 1); exit 1; }; } ! ac_package=`echo $ac_package | sed 's/-/_/g'` ! eval "with_$ac_package=no" ;; --x) *************** *** 475,479 **** -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ --- 455,459 ---- -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) ! x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ *************** *** 482,498 **** -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries="$ac_optarg" ;; ! -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) ! if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then ! echo "configure: warning: $ac_option: invalid host type" 1>&2 ! fi ! if test "x$nonopt" != xNONE; then ! { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ! fi ! nonopt="$ac_option" ;; --- 462,488 ---- -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) ! x_libraries=$ac_optarg ;; ! -*) { echo "$as_me: error: unrecognized option: $ac_option ! Try \`$0 --help' for more information." >&2 ! { (exit 1); exit 1; }; } ;; + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + *) ! # FIXME: should be removed in autoconf 3.0. ! echo "$as_me: WARNING: you should use --build, --host, --target" >&2 ! expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && ! echo "$as_me: WARNING: invalid host type: $ac_option" >&2 ! : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; *************** *** 501,563 **** if test -n "$ac_prev"; then ! { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } ! fi ! ! trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 ! ! # File descriptor usage: ! # 0 standard input ! # 1 file creation ! # 2 errors and warnings ! # 3 some systems may open it to /dev/tty ! # 4 used on the Kubota Titan ! # 6 checking for... messages and results ! # 5 compiler messages saved in config.log ! if test "$silent" = yes; then ! exec 6>/dev/null ! else ! exec 6>&1 fi - exec 5>./config.log ! echo "\ ! This file contains any messages produced by compilers while ! running configure, to aid debugging if configure makes a mistake. ! " 1>&5 ! # Strip out --no-create and --no-recursion so they do not pile up. ! # Also quote any args containing shell metacharacters. ! ac_configure_args= ! for ac_arg do ! case "$ac_arg" in ! -no-create | --no-create | --no-creat | --no-crea | --no-cre \ ! | --no-cr | --no-c) ;; ! -no-recursion | --no-recursion | --no-recursio | --no-recursi \ ! | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ! ac_configure_args="$ac_configure_args '$ac_arg'" ;; ! *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done ! # NLS nuisances. ! # Only set these to C if already set. These must not be set unconditionally ! # because not all systems understand e.g. LANG=C (notably SCO). ! # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! ! # Non-C LC_CTYPE values break the ctype check. ! if test "${LANG+set}" = set; then LANG=C; export LANG; fi ! if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi ! if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi ! if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi ! # confdefs.h avoids OS command line length limits that DEFS can exceed. ! rm -rf conftest* confdefs.h ! # AIX cpp loses on an empty file, so make sure it contains at least a newline. ! echo > confdefs.h ! # A filename unique to this package, relative to the directory that ! # configure is in, which we can look for to find out if srcdir is correct. ! ac_unique_file=readline.h # Find the source files, if location was not specified. --- 491,543 ---- if test -n "$ac_prev"; then ! ac_option=--`echo $ac_prev | sed 's/_/-/g'` ! { echo "$as_me: error: missing argument to $ac_option" >&2 ! { (exit 1); exit 1; }; } fi ! # Be sure to have absolute paths. ! for ac_var in exec_prefix prefix ! do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* | NONE | '' ) ;; ! *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; ! esac ! done ! # Be sure to have absolute paths. ! for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ ! localstatedir libdir includedir oldincludedir infodir mandir do ! eval ac_val=$`echo $ac_var` ! case $ac_val in ! [\\/$]* | ?:[\\/]* ) ;; ! *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 ! { (exit 1); exit 1; }; };; esac done ! # There might be people who depend on the old broken behavior: `$host' ! # used to hold the argument of --host etc. ! build=$build_alias ! host=$host_alias ! target=$target_alias ! ! # FIXME: should be removed in autoconf 3.0. ! if test "x$host_alias" != x; then ! if test "x$build_alias" = x; then ! cross_compiling=maybe ! echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. ! If a cross compiler is detected then cross compile mode will be used." >&2 ! elif test "x$build_alias" != "x$host_alias"; then ! cross_compiling=yes ! fi ! fi ! ac_tool_prefix= ! test -n "$host_alias" && ac_tool_prefix=$host_alias- ! test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. *************** *** 566,570 **** # Try the directory containing this script, then its parent. ac_prog=$0 ! ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir --- 546,550 ---- # Try the directory containing this script, then its parent. ac_prog=$0 ! ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir *************** *** 577,793 **** if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else ! { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi ! srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` ! # Prefer explicitly selected file to automatically selected ones. ! if test -z "$CONFIG_SITE"; then ! if test "x$prefix" != xNONE; then ! CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" ! else ! CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" ! fi ! fi ! for ac_site_file in $CONFIG_SITE; do ! if test -r "$ac_site_file"; then ! echo "loading site script $ac_site_file" ! . "$ac_site_file" ! fi ! done ! if test -r "$cache_file"; then ! echo "loading cache $cache_file" ! . $cache_file ! else ! echo "creating cache $cache_file" ! > $cache_file ! fi ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! ! ac_exeext= ! ac_objext=o ! if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then ! # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. ! if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ! ac_n= ac_c=' ! ' ac_t=' ' ! else ! ac_n=-n ac_c= ac_t= ! fi ! else ! ac_n= ac_c='\c' ac_t= ! fi ! ac_aux_dir= ! for ac_dir in ./support $srcdir/./support; do ! if test -f $ac_dir/install-sh; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/install-sh -c" ! break ! elif test -f $ac_dir/install.sh; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/install.sh -c" ! break ! fi ! done ! if test -z "$ac_aux_dir"; then ! { echo "configure: error: can not find install-sh or install.sh in ./support $srcdir/./support" 1>&2; exit 1; } ! fi ! ac_config_guess=$ac_aux_dir/config.guess ! ac_config_sub=$ac_aux_dir/config.sub ! ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. ! # Make sure we can run config.sub. ! if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : ! else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi ! echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:663: checking host system type" >&5 ! ! host_alias=$host ! case "$host_alias" in ! NONE) ! case $nonopt in ! NONE) ! if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : ! else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } ! fi ;; ! *) host_alias=$nonopt ;; ! esac ;; ! esac ! host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` ! host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$ac_t""$host" 1>&6 ! opt_curses=no ! opt_shared=no ! # Check whether --with-curses or --without-curses was given. ! if test "${with_curses+set}" = set; then ! withval="$with_curses" ! opt_curses=$withval fi ! ! if test "$opt_curses" = "yes"; then ! prefer_curses=yes fi ! # We want these before the checks, so the checks can modify their values. ! test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 - echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 - echo "configure:702: checking whether ${MAKE-make} sets \${MAKE}" >&5 - set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` - if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 - else - cat > conftestmake <<\EOF - all: - @echo 'ac_maketemp="${MAKE}"' EOF ! # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` ! if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$ac_t""yes" 1>&6 SET_MAKE= else ! echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:731: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_CC="gcc" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:761: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! break ! fi ! done ! IFS="$ac_save_ifs" if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# -gt 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" --- 557,1295 ---- if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then ! { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 ! { (exit 1); exit 1; }; } else ! { echo "$as_me: error: cannot find sources in $srcdir" >&2 ! { (exit 1); exit 1; }; } fi fi ! srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ! ac_env_build_alias_set=${build_alias+set} ! ac_env_build_alias_value=$build_alias ! ac_cv_env_build_alias_set=${build_alias+set} ! ac_cv_env_build_alias_value=$build_alias ! ac_env_host_alias_set=${host_alias+set} ! ac_env_host_alias_value=$host_alias ! ac_cv_env_host_alias_set=${host_alias+set} ! ac_cv_env_host_alias_value=$host_alias ! ac_env_target_alias_set=${target_alias+set} ! ac_env_target_alias_value=$target_alias ! ac_cv_env_target_alias_set=${target_alias+set} ! ac_cv_env_target_alias_value=$target_alias ! ac_env_CC_set=${CC+set} ! ac_env_CC_value=$CC ! ac_cv_env_CC_set=${CC+set} ! ac_cv_env_CC_value=$CC ! ac_env_CFLAGS_set=${CFLAGS+set} ! ac_env_CFLAGS_value=$CFLAGS ! ac_cv_env_CFLAGS_set=${CFLAGS+set} ! ac_cv_env_CFLAGS_value=$CFLAGS ! ac_env_LDFLAGS_set=${LDFLAGS+set} ! ac_env_LDFLAGS_value=$LDFLAGS ! ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ! ac_cv_env_LDFLAGS_value=$LDFLAGS ! ac_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_env_CPPFLAGS_value=$CPPFLAGS ! ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ! ac_cv_env_CPPFLAGS_value=$CPPFLAGS ! ac_env_CPP_set=${CPP+set} ! ac_env_CPP_value=$CPP ! ac_cv_env_CPP_set=${CPP+set} ! ac_cv_env_CPP_value=$CPP ! # ! # Report the --help message. ! # ! if test "$ac_init_help" = "long"; then ! # Omit some internal or obsolete options to make the list less imposing. ! # This message is too long to be a string in the A/UX 3.1 sh. ! cat < if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. + + Report bugs to . + EOF + fi ! if test "$ac_init_help" = "recursive"; then ! # If there are subdirs, report their specific --help. ! ac_popdir=`pwd` ! for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue ! cd $ac_subdir ! # A "../" for each directory in /$ac_subdir. ! ac_dots=`echo $ac_subdir | ! sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` ! ! case $srcdir in ! .) # No --srcdir option. We are building in place. ! ac_sub_srcdir=$srcdir ;; ! [\\/]* | ?:[\\/]* ) # Absolute path. ! ac_sub_srcdir=$srcdir/$ac_subdir ;; ! *) # Relative path. ! ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; ! esac ! # Check for guested configure; otherwise get Cygnus style configure. ! if test -f $ac_sub_srcdir/configure.gnu; then ! echo ! $SHELL $ac_sub_srcdir/configure.gnu --help=recursive ! elif test -f $ac_sub_srcdir/configure; then ! echo ! $SHELL $ac_sub_srcdir/configure --help=recursive ! elif test -f $ac_sub_srcdir/configure.ac || ! test -f $ac_sub_srcdir/configure.in; then ! echo ! $ac_configure --help ! else ! echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 ! fi ! cd $ac_popdir ! done fi ! test -n "$ac_init_help" && exit 0 ! if $ac_init_version; then ! cat <<\EOF ! readline configure 4.2a ! generated by GNU Autoconf 2.52 ! ! Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 ! Free Software Foundation, Inc. ! This configure script is free software; the Free Software Foundation ! gives unlimited permission to copy, distribute and modify it. ! EOF ! exit 0 fi + exec 5>config.log + cat >&5 </dev/null | sed 1q` ! uname -m = `(uname -m) 2>/dev/null || echo unknown` ! uname -r = `(uname -r) 2>/dev/null || echo unknown` ! uname -s = `(uname -s) 2>/dev/null || echo unknown` ! uname -v = `(uname -v) 2>/dev/null || echo unknown` ! ! /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` ! /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` ! ! /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` ! /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` ! /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` ! hostinfo = `(hostinfo) 2>/dev/null || echo unknown` ! /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` ! /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` ! /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` ! ! PATH = $PATH ! ! _ASUNAME ! } >&5 ! ! cat >&5 <\?\"\']*) ! ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ! ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" ! ac_sep=" " ;; ! *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" ! ac_sep=" " ;; ! esac ! # Get rid of the leading space. ! done ! ! # When interrupted or exit'd, cleanup temporary files, and complete ! # config.log. We remove comments because anyway the quotes in there ! # would cause problems or look ugly. ! trap 'exit_status=$? ! # Save into config.log some information that might help in debugging. ! echo >&5 ! echo "## ----------------- ##" >&5 ! echo "## Cache variables. ##" >&5 ! echo "## ----------------- ##" >&5 ! echo >&5 ! # The following way of writing the cache mishandles newlines in values, ! { ! (set) 2>&1 | ! case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! sed -n \ ! "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; ! s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ! ;; ! *) ! sed -n \ ! "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ! ;; ! esac; ! } >&5 ! sed "/^$/d" confdefs.h >conftest.log ! if test -s conftest.log; then ! echo >&5 ! echo "## ------------ ##" >&5 ! echo "## confdefs.h. ##" >&5 ! echo "## ------------ ##" >&5 ! echo >&5 ! cat conftest.log >&5 ! fi ! (echo; echo) >&5 ! test "$ac_signal" != 0 && ! echo "$as_me: caught signal $ac_signal" >&5 ! echo "$as_me: exit $exit_status" >&5 ! rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && ! exit $exit_status ! ' 0 ! for ac_signal in 1 2 13 15; do ! trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal ! done ! ac_signal=0 ! ! # confdefs.h avoids OS command line length limits that DEFS can exceed. ! rm -rf conftest* confdefs.h ! # AIX cpp loses on an empty file, so make sure it contains at least a newline. ! echo >confdefs.h ! ! # Let the site file select an alternate cache file if it wants to. ! # Prefer explicitly selected file to automatically selected ones. ! if test -z "$CONFIG_SITE"; then ! if test "x$prefix" != xNONE; then ! CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" ! else ! CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" ! fi ! fi ! for ac_site_file in $CONFIG_SITE; do ! if test -r "$ac_site_file"; then ! { echo "$as_me:872: loading site script $ac_site_file" >&5 ! echo "$as_me: loading site script $ac_site_file" >&6;} ! cat "$ac_site_file" >&5 ! . "$ac_site_file" ! fi ! done ! ! if test -r "$cache_file"; then ! # Some versions of bash will fail to source /dev/null (special ! # files actually), so we avoid doing that. ! if test -f "$cache_file"; then ! { echo "$as_me:883: loading cache $cache_file" >&5 ! echo "$as_me: loading cache $cache_file" >&6;} ! case $cache_file in ! [\\/]* | ?:[\\/]* ) . $cache_file;; ! *) . ./$cache_file;; ! esac ! fi ! else ! { echo "$as_me:891: creating cache $cache_file" >&5 ! echo "$as_me: creating cache $cache_file" >&6;} ! >$cache_file ! fi ! ! # Check that the precious variables saved in the cache have kept the same ! # value. ! ac_cache_corrupted=false ! for ac_var in `(set) 2>&1 | ! sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do ! eval ac_old_set=\$ac_cv_env_${ac_var}_set ! eval ac_new_set=\$ac_env_${ac_var}_set ! eval ac_old_val="\$ac_cv_env_${ac_var}_value" ! eval ac_new_val="\$ac_env_${ac_var}_value" ! case $ac_old_set,$ac_new_set in ! set,) ! { echo "$as_me:907: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,set) ! { echo "$as_me:911: error: \`$ac_var' was not set in the previous run" >&5 ! echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ! ac_cache_corrupted=: ;; ! ,);; ! *) ! if test "x$ac_old_val" != "x$ac_new_val"; then ! { echo "$as_me:917: error: \`$ac_var' has changed since the previous run:" >&5 ! echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ! { echo "$as_me:919: former value: $ac_old_val" >&5 ! echo "$as_me: former value: $ac_old_val" >&2;} ! { echo "$as_me:921: current value: $ac_new_val" >&5 ! echo "$as_me: current value: $ac_new_val" >&2;} ! ac_cache_corrupted=: ! fi;; ! esac ! # Pass precious variables to config.status. It doesn't matter if ! # we pass some twice (in addition to the command line arguments). ! if test "$ac_new_set" = set; then ! case $ac_new_val in ! *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ! ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ! ac_configure_args="$ac_configure_args '$ac_arg'" ! ;; ! *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" ! ;; ! esac ! fi ! done ! if $ac_cache_corrupted; then ! { echo "$as_me:940: error: changes in the environment can compromise the build" >&5 ! echo "$as_me: error: changes in the environment can compromise the build" >&2;} ! { { echo "$as_me:942: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 ! echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in ! *c*,-n*) ECHO_N= ECHO_C=' ! ' ECHO_T=' ' ;; ! *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; ! *) ECHO_N= ECHO_C='\c' ECHO_T= ;; ! esac ! echo "#! $SHELL" >conftest.sh ! echo "exit 0" >>conftest.sh ! chmod +x conftest.sh ! if { (echo "$as_me:962: PATH=\".;.\"; conftest.sh") >&5 ! (PATH=".;."; conftest.sh) 2>&5 ! ac_status=$? ! echo "$as_me:965: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! ac_path_separator=';' ! else ! ac_path_separator=: ! fi ! PATH_SEPARATOR="$ac_path_separator" ! rm -f conftest.sh ! ! ac_aux_dir= ! for ac_dir in ./support $srcdir/./support; do ! if test -f $ac_dir/install-sh; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/install-sh -c" ! break ! elif test -f $ac_dir/install.sh; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/install.sh -c" ! break ! elif test -f $ac_dir/shtool; then ! ac_aux_dir=$ac_dir ! ac_install_sh="$ac_aux_dir/shtool install -c" ! break ! fi ! done ! if test -z "$ac_aux_dir"; then ! { { echo "$as_me:991: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&5 ! echo "$as_me: error: cannot find install-sh or install.sh in ./support $srcdir/./support" >&2;} ! { (exit 1); exit 1; }; } ! fi ! ac_config_guess="$SHELL $ac_aux_dir/config.guess" ! ac_config_sub="$SHELL $ac_aux_dir/config.sub" ! ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. ! ! ac_config_headers="$ac_config_headers config.h" ! ! LIBVERSION=4.2a ! ! # Make sure we can run config.sub. ! $ac_config_sub sun4 >/dev/null 2>&1 || ! { { echo "$as_me:1005: error: cannot run $ac_config_sub" >&5 ! echo "$as_me: error: cannot run $ac_config_sub" >&2;} ! { (exit 1); exit 1; }; } ! ! echo "$as_me:1009: checking build system type" >&5 ! echo $ECHO_N "checking build system type... $ECHO_C" >&6 ! if test "${ac_cv_build+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_cv_build_alias=$build_alias ! test -z "$ac_cv_build_alias" && ! ac_cv_build_alias=`$ac_config_guess` ! test -z "$ac_cv_build_alias" && ! { { echo "$as_me:1018: error: cannot guess build type; you must specify one" >&5 ! echo "$as_me: error: cannot guess build type; you must specify one" >&2;} ! { (exit 1); exit 1; }; } ! ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || ! { { echo "$as_me:1022: error: $ac_config_sub $ac_cv_build_alias failed." >&5 ! echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} ! { (exit 1); exit 1; }; } ! ! fi ! echo "$as_me:1027: result: $ac_cv_build" >&5 ! echo "${ECHO_T}$ac_cv_build" >&6 ! build=$ac_cv_build ! build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! ! echo "$as_me:1034: checking host system type" >&5 ! echo $ECHO_N "checking host system type... $ECHO_C" >&6 ! if test "${ac_cv_host+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_cv_host_alias=$host_alias ! test -z "$ac_cv_host_alias" && ! ac_cv_host_alias=$ac_cv_build_alias ! ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || ! { { echo "$as_me:1043: error: $ac_config_sub $ac_cv_host_alias failed" >&5 ! echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} ! { (exit 1); exit 1; }; } ! ! fi ! echo "$as_me:1048: result: $ac_cv_host" >&5 ! echo "${ECHO_T}$ac_cv_host" >&6 ! host=$ac_cv_host ! host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ! host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ! host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! ! opt_curses=no ! opt_shared=no ! ! # Check whether --with-curses or --without-curses was given. ! if test "${with_curses+set}" = set; then ! withval="$with_curses" ! opt_curses=$withval ! fi; ! ! if test "$opt_curses" = "yes"; then ! prefer_curses=yes ! fi ! ! echo "" ! echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" ! echo "" ! ! # We want these before the checks, so the checks can modify their values. ! test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 ! ! echo "$as_me:1075: checking whether ${MAKE-make} sets \${MAKE}" >&5 ! echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 ! set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` ! if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.make <<\EOF ! all: ! @echo 'ac_maketemp="${MAKE}"' ! EOF ! # GNU make sometimes prints "make[1]: Entering...", which would confuse us. ! eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` ! if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi ! rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$as_me:1095: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 SET_MAKE= else ! echo "$as_me:1099: result: no" >&5 ! echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}gcc; ac_word=$2 ! echo "$as_me:1112: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$CC"; then ! ac_cv_prog_CC="$CC" # Let the user override the test. ! else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_CC="${ac_tool_prefix}gcc" ! echo "$as_me:1127: found $ac_dir/$ac_word" >&5 ! break ! done ! ! fi ! fi ! CC=$ac_cv_prog_CC ! if test -n "$CC"; then ! echo "$as_me:1135: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 ! else ! echo "$as_me:1138: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_CC"; then ! ac_ct_CC=$CC ! # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo "$as_me:1147: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_ac_ct_CC="gcc" ! echo "$as_me:1162: found $ac_dir/$ac_word" >&5 ! break ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:1170: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:1173: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! CC=$ac_ct_CC ! else ! CC="$ac_cv_prog_CC" ! fi ! ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. ! set dummy ${ac_tool_prefix}cc; ac_word=$2 ! echo "$as_me:1186: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_CC="${ac_tool_prefix}cc" ! echo "$as_me:1201: found $ac_dir/$ac_word" >&5 ! break ! done ! fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1209: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 ! else ! echo "$as_me:1212: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_CC"; then ! ac_ct_CC=$CC ! # Extract the first word of "cc", so it can be a program name with args. ! set dummy cc; ac_word=$2 ! echo "$as_me:1221: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_CC"; then ! ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. ! else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_ac_ct_CC="cc" ! echo "$as_me:1236: found $ac_dir/$ac_word" >&5 ! break ! done ! ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:1244: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:1247: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! CC=$ac_ct_CC else ! CC="$ac_cv_prog_CC" fi + fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:1260: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ! ac_prog_rejected=yes ! continue ! fi ! ac_cv_prog_CC="cc" ! echo "$as_me:1280: found $ac_dir/$ac_word" >&5 ! break ! done ! if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift ! if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ! set dummy "$ac_dir/$ac_word" ${1+"$@"} shift ac_cv_prog_CC="$@" *************** *** 796,936 **** fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! if test -z "$CC"; then ! case "`uname -s`" in ! *win32* | *WIN32*) ! # Extract the first word of "cl", so it can be a program name with args. ! set dummy cl; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:812: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_CC="cl" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! CC="$ac_cv_prog_CC" if test -n "$CC"; then ! echo "$ac_t""$CC" 1>&6 else ! echo "$ac_t""no" 1>&6 fi ! ;; ! esac ! fi ! test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi ! echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ! ac_ext=c ! # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ! ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ! cross_compiling=$ac_cv_prog_cc_cross ! cat > conftest.$ac_ext << EOF ! #line 855 "configure" #include "confdefs.h" ! main(){return(0);} ! EOF ! if { (eval echo configure:860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! ac_cv_prog_cc_works=yes ! # If we can't run a trivial program, we are probably using a cross compiler. ! if (./conftest; exit) 2>/dev/null; then ! ac_cv_prog_cc_cross=no else ! ac_cv_prog_cc_cross=yes fi - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - ac_cv_prog_cc_works=no - fi - rm -fr conftest* - ac_ext=c - # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. - ac_cpp='$CPP $CPPFLAGS' - ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' - ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' - cross_compiling=$ac_cv_prog_cc_cross - - echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 - if test $ac_cv_prog_cc_works = no; then - { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi ! echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 ! echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 ! cross_compiling=$ac_cv_prog_cc_cross ! echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:891: checking whether we are using GNU C" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ! ac_cv_prog_gcc=yes else ! ac_cv_prog_gcc=no ! fi ! fi ! echo "$ac_t""$ac_cv_prog_gcc" 1>&6 ! if test $ac_cv_prog_gcc = yes; then ! GCC=yes else ! GCC= ! fi ! ac_test_CFLAGS="${CFLAGS+set}" ! ac_save_CFLAGS="$CFLAGS" ! CFLAGS= ! echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:919: checking whether ${CC-cc} accepts -g" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! echo 'void f(){}' > conftest.c ! if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ! ac_cv_prog_cc_g=no fi ! rm -f conftest* ! fi ! ! echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 if test "$ac_test_CFLAGS" = set; then ! CFLAGS="$ac_save_CFLAGS" elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then --- 1298,1677 ---- fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1302: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1305: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! fi ! if test -z "$CC"; then ! if test -n "$ac_tool_prefix"; then ! for ac_prog in cl ! do ! # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. ! set dummy $ac_tool_prefix$ac_prog; ac_word=$2 ! echo "$as_me:1316: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_CC+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ! echo "$as_me:1331: found $ac_dir/$ac_word" >&5 ! break ! done ! fi fi ! CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1339: result: $CC" >&5 ! echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1342: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi ! ! test -n "$CC" && break ! done fi + if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl + do + # Extract the first word of "$ac_prog", so it can be a program name with args. + set dummy $ac_prog; ac_word=$2 + echo "$as_me:1355: checking for $ac_word" >&5 + echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 + if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + else + ac_save_IFS=$IFS; IFS=$ac_path_separator + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + IFS=$ac_save_IFS + test -z "$ac_dir" && ac_dir=. + $as_executable_p "$ac_dir/$ac_word" || continue + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:1370: found $ac_dir/$ac_word" >&5 + break + done ! fi ! fi ! ac_ct_CC=$ac_cv_prog_ac_ct_CC ! if test -n "$ac_ct_CC"; then ! echo "$as_me:1378: result: $ac_ct_CC" >&5 ! echo "${ECHO_T}$ac_ct_CC" >&6 ! else ! echo "$as_me:1381: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! test -n "$ac_ct_CC" && break ! done ! ! CC=$ac_ct_CC ! fi ! ! fi ! test -z "$CC" && { { echo "$as_me:1393: error: no acceptable cc found in \$PATH" >&5 ! echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} ! { (exit 1); exit 1; }; } ! ! # Provide some information about the compiler. ! echo "$as_me:1398:" \ ! "checking for C compiler version" >&5 ! ac_compiler=`set X $ac_compile; echo $2` ! { (eval echo "$as_me:1401: \"$ac_compiler --version &5\"") >&5 ! (eval $ac_compiler --version &5) 2>&5 ! ac_status=$? ! echo "$as_me:1404: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:1406: \"$ac_compiler -v &5\"") >&5 ! (eval $ac_compiler -v &5) 2>&5 ! ac_status=$? ! echo "$as_me:1409: \$? = $ac_status" >&5 ! (exit $ac_status); } ! { (eval echo "$as_me:1411: \"$ac_compiler -V &5\"") >&5 ! (eval $ac_compiler -V &5) 2>&5 ! ac_status=$? ! echo "$as_me:1414: \$? = $ac_status" >&5 ! (exit $ac_status); } ! cat >conftest.$ac_ext <<_ACEOF ! #line 1418 "configure" #include "confdefs.h" ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files a.out a.exe" ! # Try to create an executable without -o first, disregard a.out. ! # It will help us diagnose broken compilers, and finding out an intuition ! # of exeext. ! echo "$as_me:1434: checking for C compiler default output" >&5 ! echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ! ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` ! if { (eval echo "$as_me:1437: \"$ac_link_default\"") >&5 ! (eval $ac_link_default) 2>&5 ! ac_status=$? ! echo "$as_me:1440: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # Find the output, starting from the most likely. This scheme is ! # not robust to junk in `.', hence go to wildcards (a.*) only as a last ! # resort. ! for ac_file in `ls a.exe conftest.exe 2>/dev/null; ! ls a.out conftest 2>/dev/null; ! ls a.* conftest.* 2>/dev/null`; do ! case $ac_file in ! *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; ! a.out ) # We found the default executable, but exeext='' is most ! # certainly right. ! break;; ! *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! # FIXME: I believe we export ac_cv_exeext for Libtool --akim. ! export ac_cv_exeext ! break;; ! * ) break;; ! esac ! done ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! { { echo "$as_me:1463: error: C compiler cannot create executables" >&5 ! echo "$as_me: error: C compiler cannot create executables" >&2;} ! { (exit 77); exit 77; }; } ! fi ! ! ac_exeext=$ac_cv_exeext ! echo "$as_me:1469: result: $ac_file" >&5 ! echo "${ECHO_T}$ac_file" >&6 ! ! # Check the compiler produces executables we can run. If not, either ! # the compiler is broken, or we cross compile. ! echo "$as_me:1474: checking whether the C compiler works" >&5 ! echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 ! # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 ! # If not cross compiling, check that we can run a simple program. ! if test "$cross_compiling" != yes; then ! if { ac_try='./$ac_file' ! { (eval echo "$as_me:1480: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:1483: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! cross_compiling=no else ! if test "$cross_compiling" = maybe; then ! cross_compiling=yes ! else ! { { echo "$as_me:1490: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'." >&5 ! echo "$as_me: error: cannot run C compiled programs. ! If you meant to cross compile, use \`--host'." >&2;} ! { (exit 1); exit 1; }; } ! fi fi fi ! echo "$as_me:1498: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! rm -f a.out a.exe conftest$ac_cv_exeext ! ac_clean_files=$ac_clean_files_save ! # Check the compiler produces executables we can run. If not, either ! # the compiler is broken, or we cross compile. ! echo "$as_me:1505: checking whether we are cross compiling" >&5 ! echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ! echo "$as_me:1507: result: $cross_compiling" >&5 ! echo "${ECHO_T}$cross_compiling" >&6 ! ! echo "$as_me:1510: checking for executable suffix" >&5 ! echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 ! if { (eval echo "$as_me:1512: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:1515: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! # If both `conftest.exe' and `conftest' are `present' (well, observable) ! # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will ! # work properly (i.e., refer to `conftest.exe'), while it won't with ! # `rm'. ! for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do ! case $ac_file in ! *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; ! *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` ! export ac_cv_exeext ! break;; ! * ) break;; ! esac ! done else ! { { echo "$as_me:1531: error: cannot compute EXEEXT: cannot compile and link" >&5 ! echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! rm -f conftest$ac_cv_exeext ! echo "$as_me:1537: result: $ac_cv_exeext" >&5 ! echo "${ECHO_T}$ac_cv_exeext" >&6 ! ! rm -f conftest.$ac_ext ! EXEEXT=$ac_cv_exeext ! ac_exeext=$EXEEXT ! echo "$as_me:1543: checking for object suffix" >&5 ! echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 ! if test "${ac_cv_objext+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 1549 "configure" ! #include "confdefs.h" ! int ! main () ! { ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.o conftest.obj ! if { (eval echo "$as_me:1561: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:1564: \$? = $ac_status" >&5 ! (exit $ac_status); }; then ! for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do ! case $ac_file in ! *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; ! *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` ! break;; ! esac ! done else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! { { echo "$as_me:1576: error: cannot compute OBJEXT: cannot compile" >&5 ! echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} ! { (exit 1); exit 1; }; } ! fi ! ! rm -f conftest.$ac_cv_objext conftest.$ac_ext ! fi ! echo "$as_me:1583: result: $ac_cv_objext" >&5 ! echo "${ECHO_T}$ac_cv_objext" >&6 ! OBJEXT=$ac_cv_objext ! ac_objext=$OBJEXT ! echo "$as_me:1587: checking whether we are using the GNU C compiler" >&5 ! echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 ! if test "${ac_cv_c_compiler_gnu+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 1593 "configure" ! #include "confdefs.h" ! int ! main () ! { ! #ifndef __GNUC__ ! choke me ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:1608: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:1611: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:1614: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:1617: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_compiler_gnu=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_compiler_gnu=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! ac_cv_c_compiler_gnu=$ac_compiler_gnu ! ! fi ! echo "$as_me:1629: result: $ac_cv_c_compiler_gnu" >&5 ! echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 ! GCC=`test $ac_compiler_gnu = yes && echo yes` ! ac_test_CFLAGS=${CFLAGS+set} ! ac_save_CFLAGS=$CFLAGS ! CFLAGS="-g" ! echo "$as_me:1635: checking whether $CC accepts -g" >&5 ! echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 ! if test "${ac_cv_prog_cc_g+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 1641 "configure" ! #include "confdefs.h" ! ! int ! main () ! { ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:1653: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:1656: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:1659: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:1662: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_prog_cc_g=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:1672: result: $ac_cv_prog_cc_g" >&5 ! echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then ! CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then *************** *** 946,952 **** fi fi ! echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:951: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then --- 1687,1808 ---- fi fi + # Some people use a C++ compiler to compile C. Since we use `exit', + # in C++ we need to declare it. In case someone uses the same compiler + # for both compiling C and C++ we need to have the C++ compiler decide + # the declaration of exit, since it's the most demanding environment. + cat >conftest.$ac_ext <<_ACEOF + #ifndef __cplusplus + choke me + #endif + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:1699: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1702: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1705: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1708: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + ''\ + '#include ' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' + do + cat >conftest.$ac_ext <<_ACEOF + #line 1720 "configure" + #include "confdefs.h" + #include + $ac_declaration + int + main () + { + exit (42); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:1733: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1736: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1739: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1742: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + continue + fi + rm -f conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF + #line 1752 "configure" + #include "confdefs.h" + $ac_declaration + int + main () + { + exit (42); + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:1764: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:1767: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:1770: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:1773: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest.$ac_objext conftest.$ac_ext + done + rm -f conftest* + if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h + fi ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! echo "$as_me:1805: checking how to run the C preprocessor" >&5 ! echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then *************** *** 954,1074 **** fi if test -z "$CPP"; then ! if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! # This must be in double quotes, not single quotes, because CPP may get ! # substituted into the Makefile and "${CC-cc}" will confuse make. ! CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -E -traditional-cpp" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP="${CC-cc} -nologo -E" ! cat > conftest.$ac_ext < ! Syntax Error ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then : else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -rf conftest* ! CPP=/lib/cpp ! fi ! rm -f conftest* fi ! rm -f conftest* fi ! rm -f conftest* ! ac_cv_prog_CPP="$CPP" fi ! CPP="$ac_cv_prog_CPP" else ! ac_cv_prog_CPP="$CPP" fi - echo "$ac_t""$CPP" 1>&6 ! ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 ! echo "configure:1032: checking for minix/config.h" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 MINIX=yes else ! echo "$ac_t""no" 1>&6 ! MINIX= fi if test "$MINIX" = yes; then ! cat >> confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF ! cat >> confdefs.h <<\EOF #define _POSIX_1_SOURCE 2 EOF ! cat >> confdefs.h <<\EOF #define _MINIX 1 EOF --- 1810,2055 ---- fi if test -z "$CPP"; then ! if test "${ac_cv_prog_CPP+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! # Double quotes because CPP needs to be expanded ! for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" ! do ! ac_preproc_ok=false ! for ac_c_preproc_warn_flag in '' yes ! do ! # Use a header file that comes with gcc, so configuring glibc ! # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. "Syntax error" is here to catch this case. ! cat >conftest.$ac_ext <<_ACEOF ! #line 1826 "configure" #include "confdefs.h" #include ! Syntax error ! _ACEOF ! if { (eval echo "$as_me:1831: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:1837: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then : else ! echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! # Broken: fails on valid input. ! continue ! fi ! rm -f conftest.err conftest.$ac_ext ! ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! #line 1860 "configure" #include "confdefs.h" ! #include ! _ACEOF ! if { (eval echo "$as_me:1864: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:1870: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue else ! echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! # Passes both tests. ! ac_preproc_ok=: ! break ! fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then ! break ! fi ! ! done ! ac_cv_prog_CPP=$CPP ! ! fi ! CPP=$ac_cv_prog_CPP ! else ! ac_cv_prog_CPP=$CPP ! fi ! echo "$as_me:1907: result: $CPP" >&5 ! echo "${ECHO_T}$CPP" >&6 ! ac_preproc_ok=false ! for ac_c_preproc_warn_flag in '' yes ! do ! # Use a header file that comes with gcc, so configuring glibc ! # with a fresh cross-compiler works. ! # On the NeXT, cc -E runs the code through the compiler's parser, ! # not just through cpp. "Syntax error" is here to catch this case. ! cat >conftest.$ac_ext <<_ACEOF ! #line 1917 "configure" #include "confdefs.h" #include ! Syntax error ! _ACEOF ! if { (eval echo "$as_me:1922: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:1928: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then : else ! echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! # Broken: fails on valid input. ! continue fi ! rm -f conftest.err conftest.$ac_ext ! ! # OK, works on sane cases. Now check whether non-existent headers ! # can be detected and how. ! cat >conftest.$ac_ext <<_ACEOF ! #line 1951 "configure" ! #include "confdefs.h" ! #include ! _ACEOF ! if { (eval echo "$as_me:1955: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:1961: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes fi ! if test -z "$ac_cpp_err"; then ! # Broken: success on invalid input. ! continue ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! # Passes both tests. ! ac_preproc_ok=: ! break fi ! rm -f conftest.err conftest.$ac_ext ! ! done ! # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. ! rm -f conftest.err conftest.$ac_ext ! if $ac_preproc_ok; then ! : else ! { { echo "$as_me:1989: error: C preprocessor \"$CPP\" fails sanity check" >&5 ! echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} ! { (exit 1); exit 1; }; } fi ! ac_ext=c ! ac_cpp='$CPP $CPPFLAGS' ! ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ! ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ! ac_compiler_gnu=$ac_cv_c_compiler_gnu ! ! echo "$as_me:2000: checking for minix/config.h" >&5 ! echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6 ! if test "${ac_cv_header_minix_config_h+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2006 "configure" #include "confdefs.h" #include ! _ACEOF ! if { (eval echo "$as_me:2010: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:2016: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! ac_cv_header_minix_config_h=yes ! else ! echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! ac_cv_header_minix_config_h=no fi ! rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:2035: result: $ac_cv_header_minix_config_h" >&5 ! echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6 ! if test $ac_cv_header_minix_config_h = yes; then MINIX=yes else ! MINIX= fi if test "$MINIX" = yes; then ! ! cat >>confdefs.h <<\EOF #define _POSIX_SOURCE 1 EOF ! cat >>confdefs.h <<\EOF #define _POSIX_1_SOURCE 2 EOF ! cat >>confdefs.h <<\EOF #define _MINIX 1 EOF *************** *** 1076,1117 **** fi - # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" ! if test $ac_cv_prog_gcc = yes; then ! echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 ! echo "configure:1085: checking whether ${CC-cc} needs -traditional" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" ! cat > conftest.$ac_ext < Autoconf TIOCGETP ! EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* ac_cv_prog_gcc_traditional=yes else - rm -rf conftest* ac_cv_prog_gcc_traditional=no fi rm -f conftest* - if test $ac_cv_prog_gcc_traditional = no; then ! cat > conftest.$ac_ext < Autoconf TCGETA ! EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then - rm -rf conftest* ac_cv_prog_gcc_traditional=yes fi --- 2057,2093 ---- fi # If we're using gcc and the user hasn't specified CFLAGS, add -O to CFLAGS. test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O" ! if test $ac_cv_c_compiler_gnu = yes; then ! echo "$as_me:2063: checking whether $CC needs -traditional" >&5 ! echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 ! if test "${ac_cv_prog_gcc_traditional+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_pattern="Autoconf.*'x'" ! cat >conftest.$ac_ext <<_ACEOF ! #line 2070 "configure" #include "confdefs.h" #include Autoconf TIOCGETP ! _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes else ac_cv_prog_gcc_traditional=no fi rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then ! cat >conftest.$ac_ext <<_ACEOF ! #line 2085 "configure" #include "confdefs.h" #include Autoconf TCGETA ! _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "$ac_pattern" >/dev/null 2>&1; then ac_cv_prog_gcc_traditional=yes fi *************** *** 1120,1125 **** fi fi ! ! echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" --- 2096,2101 ---- fi fi ! echo "$as_me:2098: result: $ac_cv_prog_gcc_traditional" >&5 ! echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" *************** *** 1134,1152 **** # IRIX /sbin/install # AIX /bin/install # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1142: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then ! if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. ! case "$ac_dir/" in ! /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. --- 2110,2132 ---- # IRIX /sbin/install # AIX /bin/install + # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. ! echo "$as_me:2117: checking for a BSD compatible install" >&5 ! echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then ! if test "${ac_cv_path_install+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_save_IFS=$IFS; IFS=$ac_path_separator for ac_dir in $PATH; do + IFS=$ac_save_IFS # Account for people who put trailing slashes in PATH elements. ! case $ac_dir/ in ! / | ./ | .// | /cC/* \ ! | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \ ! | /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. *************** *** 1154,1162 **** # by default. for ac_prog in ginstall scoinst install; do ! if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && ! grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" --- 2134,2146 ---- # by default. for ac_prog in ginstall scoinst install; do ! if $as_executable_p "$ac_dir/$ac_prog"; then if test $ac_prog = install && ! grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : + elif test $ac_prog = install && + grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : else ac_cv_path_install="$ac_dir/$ac_prog -c" *************** *** 1168,1176 **** esac done - IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a --- 2152,2159 ---- esac done fi if test "${ac_cv_path_install+set}" = set; then ! INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a *************** *** 1178,1185 **** # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL="$ac_install_sh" fi fi ! echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. --- 2161,2169 ---- # break other packages using the cache if that directory is # removed, or if the path is relative. ! INSTALL=$ac_install_sh fi fi ! echo "$as_me:2166: result: $INSTALL" >&5 ! echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. *************** *** 1187,1191 **** test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' --- 2171,2175 ---- test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' ! test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' *************** *** 1193,1270 **** # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1197: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_AR="ar" ! break ! fi ! done ! IFS="$ac_save_ifs" fi fi ! AR="$ac_cv_prog_AR" if test -n "$AR"; then ! echo "$ac_t""$AR" 1>&6 else ! echo "$ac_t""no" 1>&6 fi test -n "$ARFLAGS" || ARFLAGS="cr" ! # Extract the first word of "ranlib", so it can be a program name with args. ! set dummy ranlib; ac_word=$2 ! echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1227: checking for $ac_word" >&5 ! if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! test -z "$ac_dir" && ac_dir=. ! if test -f $ac_dir/$ac_word; then ! ac_cv_prog_RANLIB="ranlib" ! break ! fi ! done ! IFS="$ac_save_ifs" ! test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" fi fi ! RANLIB="$ac_cv_prog_RANLIB" if test -n "$RANLIB"; then ! echo "$ac_t""$RANLIB" 1>&6 else ! echo "$ac_t""no" 1>&6 fi MAKE_SHELL=/bin/sh ! echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:1259: checking return type of signal handlers" >&5 ! if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include #ifdef signal ! #undef signal #endif #ifdef __cplusplus --- 2177,2499 ---- # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 ! echo "$as_me:2179: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_AR+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_AR="" ! echo "$as_me:2194: found $ac_dir/$ac_word" >&5 ! break ! done ! ! test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar" fi fi ! AR=$ac_cv_prog_AR if test -n "$AR"; then ! echo "$as_me:2203: result: $AR" >&5 ! echo "${ECHO_T}$AR" >&6 else ! echo "$as_me:2206: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi test -n "$ARFLAGS" || ARFLAGS="cr" ! if test -n "$ac_tool_prefix"; then ! # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. ! set dummy ${ac_tool_prefix}ranlib; ac_word=$2 ! echo "$as_me:2214: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_RANLIB+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! echo "$as_me:2229: found $ac_dir/$ac_word" >&5 ! break ! done ! fi fi ! RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then ! echo "$as_me:2237: result: $RANLIB" >&5 ! echo "${ECHO_T}$RANLIB" >&6 ! else ! echo "$as_me:2240: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! fi ! if test -z "$ac_cv_prog_RANLIB"; then ! ac_ct_RANLIB=$RANLIB ! # Extract the first word of "ranlib", so it can be a program name with args. ! set dummy ranlib; ac_word=$2 ! echo "$as_me:2249: checking for $ac_word" >&5 ! echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 ! if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test -n "$ac_ct_RANLIB"; then ! ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. ! else ! ac_save_IFS=$IFS; IFS=$ac_path_separator ! ac_dummy="$PATH" ! for ac_dir in $ac_dummy; do ! IFS=$ac_save_IFS ! test -z "$ac_dir" && ac_dir=. ! $as_executable_p "$ac_dir/$ac_word" || continue ! ac_cv_prog_ac_ct_RANLIB="ranlib" ! echo "$as_me:2264: found $ac_dir/$ac_word" >&5 ! break ! done ! ! test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" ! fi ! fi ! ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB ! if test -n "$ac_ct_RANLIB"; then ! echo "$as_me:2273: result: $ac_ct_RANLIB" >&5 ! echo "${ECHO_T}$ac_ct_RANLIB" >&6 else ! echo "$as_me:2276: result: no" >&5 ! echo "${ECHO_T}no" >&6 fi + RANLIB=$ac_ct_RANLIB + else + RANLIB="$ac_cv_prog_RANLIB" + fi MAKE_SHELL=/bin/sh + echo "$as_me:2287: checking for $CC option to accept ANSI C" >&5 + echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 + if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_cv_prog_cc_stdc=no + ac_save_CC=$CC + cat >conftest.$ac_ext <<_ACEOF + #line 2295 "configure" + #include "confdefs.h" + #include + #include + #include + #include + /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ + struct buf { int x; }; + FILE * (*rcsopen) (struct buf *, struct stat *, int); + static char *e (p, i) + char **p; + int i; + { + return p[i]; + } + static char *f (char * (*g) (char **, int), char **p, ...) + { + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; + } + int test (int i, double x); + struct s1 {int (*f) (int a);}; + struct s2 {int (*f) (double a);}; + int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); + int argc; + char **argv; + int + main () + { + return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; + } + _ACEOF + # Don't try gcc -ansi; that turns off useful extensions and + # breaks some systems' header files. + # AIX -qlanglvl=ansi + # Ultrix and OSF/1 -std1 + # HP-UX 10.20 and later -Ae + # HP-UX older versions -Aa -D_HPUX_SOURCE + # SVR4 -Xc -D__EXTENSIONS__ + for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" + do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext + if { (eval echo "$as_me:2344: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2347: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2350: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2353: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg + break + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest.$ac_objext + done + rm -f conftest.$ac_ext conftest.$ac_objext + CC=$ac_save_CC + + fi + + case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:2370: result: none needed" >&5 + echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:2373: result: $ac_cv_prog_cc_stdc" >&5 + echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; + esac ! echo "$as_me:2378: checking for an ANSI C-conforming const" >&5 ! echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 ! if test "${ac_cv_c_const+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2384 "configure" ! #include "confdefs.h" ! ! int ! main () ! { ! /* FIXME: Include the comments suggested by Paul. */ ! #ifndef __cplusplus ! /* Ultrix mips cc rejects this. */ ! typedef int charset[2]; ! const charset x; ! /* SunOS 4.1.1 cc rejects this. */ ! char const *const *ccp; ! char **p; ! /* NEC SVR4.0.2 mips cc rejects this. */ ! struct point {int x, y;}; ! static struct point const zero = {0,0}; ! /* AIX XL C 1.02.0.0 rejects this. ! It does not let you subtract one const X* pointer from another in ! an arm of an if-expression whose if-part is not a constant ! expression */ ! const char *g = "string"; ! ccp = &g + (g ? g-g : 0); ! /* HPUX 7.0 cc rejects these. */ ! ++ccp; ! p = (char**) ccp; ! ccp = (char const *const *) p; ! { /* SCO 3.2v4 cc rejects this. */ ! char *t; ! char const *s = 0 ? (char *) 0 : (char const *) 0; ! ! *t++ = 0; ! } ! { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ ! int x[] = {25, 17}; ! const int *foo = &x[0]; ! ++foo; ! } ! { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ ! typedef const int *iptr; ! iptr p = 0; ! ++p; ! } ! { /* AIX XL C 1.02.0.0 rejects this saying ! "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ ! struct s { int j; const int *ap[3]; }; ! struct s *b; b->j = 5; ! } ! { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ ! const int foo = 10; ! } ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2442: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:2445: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2448: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2451: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_c_const=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_c_const=no ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:2461: result: $ac_cv_c_const" >&5 ! echo "${ECHO_T}$ac_cv_c_const" >&6 ! if test $ac_cv_c_const = no; then ! ! cat >>confdefs.h <<\EOF ! #define const ! EOF ! ! fi ! ! echo "$as_me:2471: checking for function prototypes" >&5 ! echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6 ! if test "$ac_cv_prog_cc_stdc" != no; then ! echo "$as_me:2474: result: yes" >&5 ! echo "${ECHO_T}yes" >&6 ! ! cat >>confdefs.h <<\EOF ! #define PROTOTYPES 1 ! EOF ! ! else ! echo "$as_me:2482: result: no" >&5 ! echo "${ECHO_T}no" >&6 ! fi ! ! echo "$as_me:2486: checking return type of signal handlers" >&5 ! echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 ! if test "${ac_cv_type_signal+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2492 "configure" #include "confdefs.h" #include #include #ifdef signal ! # undef signal #endif #ifdef __cplusplus *************** *** 1274,1307 **** #endif ! int main() { int i; ! ; return 0; } ! EOF ! if { (eval echo configure:1281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ac_cv_type_signal=void else ! echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ac_cv_type_signal=int fi rm -f conftest* fi ! echo "$ac_t""$ac_cv_type_signal" 1>&6 ! cat >> confdefs.h <&6 ! echo "configure:1301: checking whether stat file-mode macros are broken" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < --- 2503,2837 ---- #endif ! int ! main () ! { int i; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2514: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:2517: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2520: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2523: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_type_signal=void else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_type_signal=int ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:2533: result: $ac_cv_type_signal" >&5 ! echo "${ECHO_T}$ac_cv_type_signal" >&6 ! ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 ! if test "${ac_cv_header_stdc+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2546 "configure" ! #include "confdefs.h" ! #include ! #include ! #include ! #include ! ! _ACEOF ! if { (eval echo "$as_me:2554: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:2560: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! ac_cv_header_stdc=yes ! else ! echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! ac_cv_header_stdc=no ! fi ! rm -f conftest.err conftest.$ac_ext ! ! if test $ac_cv_header_stdc = yes; then ! # SunOS 4.x string.h does not declare mem*, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! #line 2582 "configure" ! #include "confdefs.h" ! #include ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "memchr" >/dev/null 2>&1; then ! : ! else ! ac_cv_header_stdc=no fi rm -f conftest* + fi ! if test $ac_cv_header_stdc = yes; then ! # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. ! cat >conftest.$ac_ext <<_ACEOF ! #line 2600 "configure" ! #include "confdefs.h" ! #include ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "free" >/dev/null 2>&1; then ! : ! else ! ac_cv_header_stdc=no ! fi ! rm -f conftest* ! ! fi ! ! if test $ac_cv_header_stdc = yes; then ! # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. ! if test "$cross_compiling" = yes; then ! : ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2621 "configure" ! #include "confdefs.h" ! #include ! #if ((' ' & 0x0FF) == 0x020) ! # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') ! # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) ! #else ! # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \ ! || ('j' <= (c) && (c) <= 'r') \ ! || ('s' <= (c) && (c) <= 'z')) ! # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) ! #endif ! ! #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) ! int ! main () ! { ! int i; ! for (i = 0; i < 256; i++) ! if (XOR (islower (i), ISLOWER (i)) ! || toupper (i) != TOUPPER (i)) ! exit(2); ! exit (0); ! } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:2647: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:2650: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:2652: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2655: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! : ! else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_header_stdc=no ! fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! fi ! fi ! echo "$as_me:2668: result: $ac_cv_header_stdc" >&5 ! echo "${ECHO_T}$ac_cv_header_stdc" >&6 ! if test $ac_cv_header_stdc = yes; then ! ! cat >>confdefs.h <<\EOF ! #define STDC_HEADERS 1 EOF + fi + + # On IRIX 5.3, sys/types and inttypes.h are conflicting. + + for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + echo "$as_me:2684: checking for $ac_header" >&5 + echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 + if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line 2690 "configure" + #include "confdefs.h" + $ac_includes_default + #include <$ac_header> + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:2696: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2699: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2702: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2705: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + eval "$as_ac_Header=no" + fi + rm -f conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:2715: result: `eval echo '${'$as_ac_Header'}'`" >&5 + echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <&5 + echo $ECHO_N "checking for size_t... $ECHO_C" >&6 + if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line 2731 "configure" + #include "confdefs.h" + $ac_includes_default + int + main () + { + if ((size_t *) 0) + return 0; + if (sizeof (size_t)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:2746: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2749: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2752: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2755: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_type_size_t=no + fi + rm -f conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:2765: result: $ac_cv_type_size_t" >&5 + echo "${ECHO_T}$ac_cv_type_size_t" >&6 + if test $ac_cv_type_size_t = yes; then + : + else + + cat >>confdefs.h <&5 + echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 + if test "${ac_cv_type_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line 2783 "configure" + #include "confdefs.h" + $ac_includes_default + int + main () + { + if ((ssize_t *) 0) + return 0; + if (sizeof (ssize_t)) + return 0; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:2798: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:2801: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:2804: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:2807: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_ssize_t=yes + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_type_ssize_t=no + fi + rm -f conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:2817: result: $ac_cv_type_ssize_t" >&5 + echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 + if test $ac_cv_type_ssize_t = yes; then + : + else + + cat >>confdefs.h <&5 ! echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6 ! if test "${ac_cv_header_stat_broken+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2835 "configure" #include "confdefs.h" #include *************** *** 1332,1342 **** #endif ! EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "You lose" >/dev/null 2>&1; then - rm -rf conftest* ac_cv_header_stat_broken=yes else - rm -rf conftest* ac_cv_header_stat_broken=no fi --- 2862,2870 ---- #endif ! _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "You lose" >/dev/null 2>&1; then ac_cv_header_stat_broken=yes else ac_cv_header_stat_broken=no fi *************** *** 1344,1351 **** fi ! ! echo "$ac_t""$ac_cv_header_stat_broken" 1>&6 if test $ac_cv_header_stat_broken = yes; then ! cat >> confdefs.h <<\EOF #define STAT_MACROS_BROKEN 1 EOF --- 2872,2880 ---- fi ! echo "$as_me:2874: result: $ac_cv_header_stat_broken" >&5 ! echo "${ECHO_T}$ac_cv_header_stat_broken" >&6 if test $ac_cv_header_stat_broken = yes; then ! ! cat >>confdefs.h <<\EOF #define STAT_MACROS_BROKEN 1 EOF *************** *** 1354,1503 **** ac_header_dirent=no ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h ! do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:1361: checking for $ac_hdr that defines DIR" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include <$ac_hdr> ! int main() { ! DIR *dirp = 0; ! ; return 0; } ! EOF ! if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! eval "ac_cv_header_dirent_$ac_safe=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_dirent_$ac_safe=no" ! fi ! rm -f conftest* ! fi ! if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then ! echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1399: checking for opendir in -ldir" >&5 ! ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 LIBS="$LIBS -ldir" - else - echo "$ac_t""no" 1>&6 fi else ! echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1440: checking for opendir in -lx" >&5 ! ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 LIBS="$LIBS -lx" - else - echo "$ac_t""no" 1>&6 fi fi - for ac_func in lstat memmove putenv select setenv setlocale \ ! strcasecmp tcgetattr do ! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:1486: checking for $ac_func" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func(); ! ! int main() { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named --- 2883,3077 ---- ac_header_dirent=no ! for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do ! as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` ! echo "$as_me:2887: checking for $ac_hdr that defines DIR" >&5 ! echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2893 "configure" #include "confdefs.h" #include #include <$ac_hdr> ! ! int ! main () ! { ! if ((DIR *) 0) ! return 0; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2908: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:2911: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2914: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2917: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_Header=yes" ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:2927: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 ! if test "${ac_cv_lib_dir_opendir+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS LIBS="-ldir $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 2948 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:2967: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:2970: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:2973: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2976: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_dir_opendir=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_dir_opendir=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:2987: result: $ac_cv_lib_dir_opendir" >&5 ! echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6 ! if test $ac_cv_lib_dir_opendir = yes; then LIBS="$LIBS -ldir" fi else ! echo "$as_me:2994: checking for opendir in -lx" >&5 ! echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6 ! if test "${ac_cv_lib_x_opendir+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS LIBS="-lx $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 3002 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char opendir (); ! int ! main () ! { ! opendir (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3021: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3024: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3027: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3030: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_x_opendir=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_x_opendir=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:3041: result: $ac_cv_lib_x_opendir" >&5 ! echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6 ! if test $ac_cv_lib_x_opendir = yes; then LIBS="$LIBS -lx" fi fi for ac_func in lstat memmove putenv select setenv setlocale \ ! strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit do ! as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:3053: checking for $ac_func" >&5 ! echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_var+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3059 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char $ac_func (); below. */ #include /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char $ac_func (); ! char (*f) (); + int + main () + { /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named *************** *** 1506,1575 **** choke me #else ! $ac_func(); #endif ! ; return 0; } EOF - if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then - rm -rf conftest* - eval "ac_cv_func_$ac_func=yes" - else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 - rm -rf conftest* - eval "ac_cv_func_$ac_func=no" - fi - rm -f conftest* - fi - if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then - echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` - cat >> confdefs.h <&6 fi done ! ! echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 ! echo "configure:1540: checking for working strcoll" >&5 ! if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ac_cv_func_strcoll_works=no else ! cat > conftest.$ac_ext < main () { ! exit (strcoll ("abc", "def") >= 0 || ! strcoll ("ABC", "DEF") >= 0 || ! strcoll ("123", "456") >= 0); } ! EOF ! if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then ac_cv_func_strcoll_works=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! ac_cv_func_strcoll_works=no fi ! rm -fr conftest* fi - fi ! ! echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6 if test $ac_cv_func_strcoll_works = yes; then ! cat >> confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF --- 3080,3168 ---- choke me #else ! f = $ac_func; #endif ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3090: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3093: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3096: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3099: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! eval "$as_ac_var=yes" ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! eval "$as_ac_var=no" ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:3109: result: `eval echo '${'$as_ac_var'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 ! if test `eval echo '${'$as_ac_var'}'` = yes; then ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6 ! if test "${ac_cv_func_strcoll_works+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_strcoll_works=no else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3128 "configure" #include "confdefs.h" ! $ac_includes_default ! int main () { ! exit (strcoll ("abc", "def") >= 0 || ! strcoll ("ABC", "DEF") >= 0 || ! strcoll ("123", "456") >= 0) ! ; ! return 0; } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3142: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3145: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3147: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3150: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ac_cv_func_strcoll_works=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_strcoll_works=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:3162: result: $ac_cv_func_strcoll_works" >&5 ! echo "${ECHO_T}$ac_cv_func_strcoll_works" >&6 if test $ac_cv_func_strcoll_works = yes; then ! ! cat >>confdefs.h <<\EOF #define HAVE_STRCOLL 1 EOF *************** *** 1577,1636 **** fi ! ! for ac_hdr in unistd.h stdlib.h varargs.h stdarg.h string.h \ ! sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ ! termcap.h termios.h termio.h sys/file.h locale.h do ! ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ! echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1587: checking for $ac_hdr" >&5 ! if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! EOF ! ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ! ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ! if test -z "$ac_err"; then ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=yes" else ! echo "$ac_err" >&5 ! echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_header_$ac_safe=no" fi ! rm -f conftest* fi ! if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then ! echo "$ac_t""yes" 1>&6 ! ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` ! cat >> confdefs.h <&6 fi done ! ! ! echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6 ! echo "configure:1626: checking for type of signal functions" >&5 ! if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ! cat > conftest.$ac_ext < ! int main() { sigset_t ss; --- 3170,3236 ---- fi ! for ac_header in unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ ! limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ ! termcap.h termios.h termio.h sys/file.h locale.h memory.h do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:3177: checking for $ac_header" >&5 ! echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 ! if eval "test \"\${$as_ac_Header+set}\" = set"; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3183 "configure" #include "confdefs.h" ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:3187: \"$ac_cpp conftest.$ac_ext\"") >&5 ! (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ! ac_status=$? ! egrep -v '^ *\+' conftest.er1 >conftest.err ! rm -f conftest.er1 ! cat conftest.err >&5 ! echo "$as_me:3193: \$? = $ac_status" >&5 ! (exit $ac_status); } >/dev/null; then ! if test -s conftest.err; then ! ac_cpp_err=$ac_c_preproc_warn_flag ! else ! ac_cpp_err= ! fi ! else ! ac_cpp_err=yes ! fi ! if test -z "$ac_cpp_err"; then ! eval "$as_ac_Header=yes" else ! echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! eval "$as_ac_Header=no" fi ! rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:3212: result: `eval echo '${'$as_ac_Header'}'`" >&5 ! echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 ! if test `eval echo '${'$as_ac_Header'}'` = yes; then ! cat >>confdefs.h <&5 ! echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6 ! if test "${bash_cv_signal_vintage+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ! cat >conftest.$ac_ext <<_ACEOF ! #line 3229 "configure" #include "confdefs.h" #include ! int ! main () ! { sigset_t ss; *************** *** 1639,1719 **** sigaction(SIGINT, &sa, (struct sigaction *) 0); sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); ! ! ; return 0; } ! EOF ! if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* bash_cv_signal_vintage=posix else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ! cat > conftest.$ac_ext < ! int main() { int mask = sigmask(SIGINT); sigsetmask(mask); sigblock(mask); sigpause(mask); ! ! ; return 0; } ! EOF ! if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* bash_cv_signal_vintage=4.2bsd else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! ! cat > conftest.$ac_ext < RETSIGTYPE foo() { } ! int main() { int mask = sigmask(SIGINT); sigset(SIGINT, foo); sigrelse(SIGINT); sighold(SIGINT); sigpause(SIGINT); ! ! ; return 0; } ! EOF ! if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* bash_cv_signal_vintage=svr3 else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_signal_vintage=v7 ! fi ! rm -f conftest* ! fi ! rm -f conftest* fi ! rm -f conftest* fi ! echo "$ac_t""$bash_cv_signal_vintage" 1>&6 if test "$bash_cv_signal_vintage" = posix; then ! cat >> confdefs.h <<\EOF #define HAVE_POSIX_SIGNALS 1 EOF elif test "$bash_cv_signal_vintage" = "4.2bsd"; then ! cat >> confdefs.h <<\EOF #define HAVE_BSD_SIGNALS 1 EOF elif test "$bash_cv_signal_vintage" = svr3; then ! cat >> confdefs.h <<\EOF #define HAVE_USG_SIGHOLD 1 EOF --- 3239,3357 ---- sigaction(SIGINT, &sa, (struct sigaction *) 0); sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3247: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3250: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3253: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3256: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_signal_vintage=posix else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ! cat >conftest.$ac_ext <<_ACEOF ! #line 3264 "configure" #include "confdefs.h" #include ! int ! main () ! { int mask = sigmask(SIGINT); sigsetmask(mask); sigblock(mask); sigpause(mask); ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3279: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3282: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3285: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3288: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_signal_vintage=4.2bsd else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ! cat >conftest.$ac_ext <<_ACEOF ! #line 3296 "configure" #include "confdefs.h" #include RETSIGTYPE foo() { } ! int ! main () ! { int mask = sigmask(SIGINT); sigset(SIGINT, foo); sigrelse(SIGINT); sighold(SIGINT); sigpause(SIGINT); ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3314: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3317: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3320: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3323: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_signal_vintage=svr3 else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_signal_vintage=v7 ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:3342: result: $bash_cv_signal_vintage" >&5 ! echo "${ECHO_T}$bash_cv_signal_vintage" >&6 if test "$bash_cv_signal_vintage" = posix; then ! cat >>confdefs.h <<\EOF #define HAVE_POSIX_SIGNALS 1 EOF elif test "$bash_cv_signal_vintage" = "4.2bsd"; then ! cat >>confdefs.h <<\EOF #define HAVE_BSD_SIGNALS 1 EOF elif test "$bash_cv_signal_vintage" = svr3; then ! cat >>confdefs.h <<\EOF #define HAVE_USG_SIGHOLD 1 EOF *************** *** 1721,1738 **** fi ! ! ! echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6 ! echo "configure:1727: checking if signal handlers must be reinstalled when invoked" >&5 ! if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! echo "configure: warning: cannot check signal handling if cross compiling -- defaulting to no" 1>&2 bash_cv_must_reinstall_sighandlers=no else ! cat > conftest.$ac_ext <&5 ! echo $ECHO_N "checking if signal handlers must be reinstalled when invoked... $ECHO_C" >&6 ! if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ! { echo "$as_me:3367: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 ! echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} bash_cv_must_reinstall_sighandlers=no else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3373 "configure" #include "confdefs.h" *************** *** 1780,1801 **** } ! EOF ! if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then bash_cv_must_reinstall_sighandlers=no else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! bash_cv_must_reinstall_sighandlers=yes fi ! rm -fr conftest* fi - fi ! echo "$ac_t""$bash_cv_must_reinstall_sighandlers" 1>&6 if test $bash_cv_must_reinstall_sighandlers = yes; then ! cat >> confdefs.h <<\EOF #define MUST_REINSTALL_SIGHANDLERS 1 EOF --- 3417,3447 ---- } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3421: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3424: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3426: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3429: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_must_reinstall_sighandlers=no else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_must_reinstall_sighandlers=yes fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:3442: result: $bash_cv_must_reinstall_sighandlers" >&5 ! echo "${ECHO_T}$bash_cv_must_reinstall_sighandlers" >&6 if test $bash_cv_must_reinstall_sighandlers = yes; then ! cat >>confdefs.h <<\EOF #define MUST_REINSTALL_SIGHANDLERS 1 EOF *************** *** 1803,1820 **** fi ! ! ! echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6 ! echo "configure:1809: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 ! if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! echo "configure: warning: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" 1>&2 bash_cv_func_sigsetjmp=missing else ! cat > conftest.$ac_ext <&5 ! echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6 ! if test "${bash_cv_func_sigsetjmp+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ! { echo "$as_me:3457: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5 ! echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;} bash_cv_func_sigsetjmp=missing else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3463 "configure" #include "confdefs.h" *************** *** 1856,1877 **** #endif } ! EOF ! if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then bash_cv_func_sigsetjmp=present else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! bash_cv_func_sigsetjmp=missing fi ! rm -fr conftest* fi - fi ! echo "$ac_t""$bash_cv_func_sigsetjmp" 1>&6 if test $bash_cv_func_sigsetjmp = present; then ! cat >> confdefs.h <<\EOF #define HAVE_POSIX_SIGSETJMP 1 EOF --- 3501,3531 ---- #endif } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3505: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3508: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3510: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3513: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_func_sigsetjmp=present else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_func_sigsetjmp=missing fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:3526: result: $bash_cv_func_sigsetjmp" >&5 ! echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6 if test $bash_cv_func_sigsetjmp = present; then ! cat >>confdefs.h <<\EOF #define HAVE_POSIX_SIGSETJMP 1 EOF *************** *** 1879,1889 **** fi ! echo $ac_n "checking for lstat""... $ac_c" 1>&6 ! echo "configure:1883: checking for lstat" >&5 ! if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext <&5 ! echo $ECHO_N "checking for lstat... $ECHO_C" >&6 ! if test "${bash_cv_func_lstat+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3541 "configure" #include "confdefs.h" *************** *** 1891,1913 **** #include ! int main() { ! lstat(".",(struct stat *)0); ! ; return 0; } ! EOF ! if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* bash_cv_func_lstat=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_func_lstat=no fi ! rm -f conftest* fi ! ! echo "$ac_t""$bash_cv_func_lstat" 1>&6 if test $bash_cv_func_lstat = yes; then ! cat >> confdefs.h <<\EOF #define HAVE_LSTAT 1 EOF --- 3545,3580 ---- #include ! int ! main () ! { ! lstat(".",(struct stat *)0); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3556: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3559: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3562: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3565: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_func_lstat=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_func_lstat=no fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:3575: result: $bash_cv_func_lstat" >&5 ! echo "${ECHO_T}$bash_cv_func_lstat" >&6 if test $bash_cv_func_lstat = yes; then ! cat >>confdefs.h <<\EOF #define HAVE_LSTAT 1 EOF *************** *** 1915,1967 **** fi ! echo $ac_n "checking whether getpw functions are declared in pwd.h""... $ac_c" 1>&6 ! echo "configure:1919: checking whether getpw functions are declared in pwd.h" >&5 ! if eval "test \"`echo '$''{'bash_cv_getpw_declared'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! cat > conftest.$ac_ext < ! #ifdef HAVE_UNISTD_H ! # include ! #endif ! #include ! ! EOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "getpwuid" >/dev/null 2>&1; then ! rm -rf conftest* ! bash_cv_getpw_declared=yes ! else ! rm -rf conftest* ! bash_cv_getpw_declared=no ! fi ! rm -f conftest* ! ! fi ! ! echo "$ac_t""$bash_cv_getpw_declared" 1>&6 ! if test $bash_cv_getpw_declared = yes; then ! cat >> confdefs.h <<\EOF ! #define HAVE_GETPW_DECLS 1 ! EOF ! ! fi ! ! ! echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6 ! echo "configure:1956: checking whether or not strcoll and strcmp differ" >&5 ! if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then ! echo "configure: warning: cannot check strcoll if cross compiling -- defaulting to no" 1>&2 bash_cv_func_strcoll_broken=no else ! cat > conftest.$ac_ext <&5 ! echo $ECHO_N "checking whether or not strcoll and strcmp differ... $ECHO_C" >&6 ! if test "${bash_cv_func_strcoll_broken+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ! { echo "$as_me:3590: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 ! echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} bash_cv_func_strcoll_broken=no else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3596 "configure" #include "confdefs.h" *************** *** 2001,2022 **** } ! EOF ! if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null ! then bash_cv_func_strcoll_broken=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -fr conftest* ! bash_cv_func_strcoll_broken=no fi ! rm -fr conftest* fi - fi ! echo "$ac_t""$bash_cv_func_strcoll_broken" 1>&6 if test $bash_cv_func_strcoll_broken = yes; then ! cat >> confdefs.h <<\EOF #define STRCOLL_BROKEN 1 EOF --- 3632,3662 ---- } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3636: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3639: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3641: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3644: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_func_strcoll_broken=yes else ! echo "$as_me: program exited with status $ac_status" >&5 ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_func_strcoll_broken=no fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi ! echo "$as_me:3657: result: $bash_cv_func_strcoll_broken" >&5 ! echo "${ECHO_T}$bash_cv_func_strcoll_broken" >&6 if test $bash_cv_func_strcoll_broken = yes; then ! cat >>confdefs.h <<\EOF #define STRCOLL_BROKEN 1 EOF *************** *** 2024,2131 **** fi ! ! echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6 ! echo "configure:2029: checking whether signal handlers are of type void" >&5 ! if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! #include ! #ifdef signal ! #undef signal ! #endif ! #ifdef __cplusplus ! extern "C" #endif ! void (*signal ()) (); ! int main() { ! int i; ! ; return 0; } ! EOF ! if { (eval echo configure:2049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! bash_cv_void_sighandler=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_void_sighandler=no fi rm -f conftest* fi ! echo "$ac_t""$bash_cv_void_sighandler" 1>&6 ! if test $bash_cv_void_sighandler = yes; then ! cat >> confdefs.h <<\EOF ! #define VOID_SIGHANDLER 1 EOF fi ! echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2069: checking for TIOCGWINSZ in sys/ioctl.h" >&5 ! if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include ! int main() { ! int x = TIOCGWINSZ; ! ; return 0; } ! EOF ! if { (eval echo configure:2082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* ! bash_cv_tiocgwinsz_in_ioctl=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_tiocgwinsz_in_ioctl=no fi rm -f conftest* fi ! echo "$ac_t""$bash_cv_tiocgwinsz_in_ioctl" 1>&6 ! if test $bash_cv_tiocgwinsz_in_ioctl = yes; then ! cat >> confdefs.h <<\EOF #define GWINSZ_IN_SYS_IOCTL 1 EOF fi ! echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2103: checking for TIOCSTAT in sys/ioctl.h" >&5 ! if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include ! int main() { int x = TIOCSTAT; ! ; return 0; } ! EOF ! if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* bash_cv_tiocstat_in_ioctl=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_tiocstat_in_ioctl=no fi ! rm -f conftest* fi ! echo "$ac_t""$bash_cv_tiocstat_in_ioctl" 1>&6 ! if test $bash_cv_tiocstat_in_ioctl = yes; then ! cat >> confdefs.h <<\EOF #define TIOCSTAT_IN_SYS_IOCTL 1 EOF --- 3664,3908 ---- fi ! echo "$as_me:3666: checking whether getpw functions are declared in pwd.h" >&5 ! echo $ECHO_N "checking whether getpw functions are declared in pwd.h... $ECHO_C" >&6 ! if test "${bash_cv_getpw_declared+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3672 "configure" #include "confdefs.h" + #include ! #ifdef HAVE_UNISTD_H ! # include #endif ! #include ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "getpwuid" >/dev/null 2>&1; then ! bash_cv_getpw_declared=yes else ! bash_cv_getpw_declared=no fi rm -f conftest* + fi ! ! echo "$as_me:3692: result: $bash_cv_getpw_declared" >&5 ! echo "${ECHO_T}$bash_cv_getpw_declared" >&6 ! if test $bash_cv_getpw_declared = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_GETPW_DECLS 1 EOF fi ! echo "$as_me:3701: checking POSIX termios" >&5 ! echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6 ! if test "${ac_cv_sys_posix_termios+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3707 "configure" ! #include "confdefs.h" ! #include ! #include ! #include ! int ! main () ! { ! /* SunOS 4.0.3 has termios.h but not the library calls. */ ! tcgetattr(0, 0); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3722: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:3725: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3728: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3731: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_sys_posix_termios=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_sys_posix_termios=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:3741: result: $ac_cv_sys_posix_termios" >&5 ! echo "${ECHO_T}$ac_cv_sys_posix_termios" >&6 ! ! if test $ac_cv_sys_posix_termios = yes; then ! echo "$as_me:3745: checking whether termios.h defines TIOCGWINSZ" >&5 ! echo $ECHO_N "checking whether termios.h defines TIOCGWINSZ... $ECHO_C" >&6 ! if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3751 "configure" ! #include "confdefs.h" ! #include ! #include ! #ifdef TIOCGWINSZ ! yes ! #endif ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "yes" >/dev/null 2>&1; then ! ac_cv_sys_tiocgwinsz_in_termios_h=yes ! else ! ac_cv_sys_tiocgwinsz_in_termios_h=no ! fi ! rm -f conftest* ! ! fi ! echo "$as_me:3769: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 ! echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_termios_h" >&6 ! ! fi ! if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then ! echo "$as_me:3774: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 ! echo $ECHO_N "checking whether sys/ioctl.h defines TIOCGWINSZ... $ECHO_C" >&6 ! if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3780 "configure" #include "confdefs.h" #include #include ! #ifdef TIOCGWINSZ ! yes ! #endif ! ! _ACEOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "yes" >/dev/null 2>&1; then ! ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes else ! ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no fi rm -f conftest* + fi + echo "$as_me:3798: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 + echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6 + + if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then ! cat >>confdefs.h <<\EOF #define GWINSZ_IN_SYS_IOCTL 1 EOF + fi + fi + + echo "$as_me:3810: checking whether signal handlers are of type void" >&5 + echo $ECHO_N "checking whether signal handlers are of type void... $ECHO_C" >&6 + if test "${bash_cv_void_sighandler+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + cat >conftest.$ac_ext <<_ACEOF + #line 3816 "configure" + #include "confdefs.h" + #include + #include + #ifdef signal + #undef signal + #endif + #ifdef __cplusplus + extern "C" + #endif + void (*signal ()) (); + int + main () + { + int i; + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (eval echo "$as_me:3836: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:3839: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:3842: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:3845: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + bash_cv_void_sighandler=yes + else + echo "$as_me: failed program was:" >&5 + cat conftest.$ac_ext >&5 + bash_cv_void_sighandler=no + fi + rm -f conftest.$ac_objext conftest.$ac_ext + fi + echo "$as_me:3855: result: $bash_cv_void_sighandler" >&5 + echo "${ECHO_T}$bash_cv_void_sighandler" >&6 + if test $bash_cv_void_sighandler = yes; then + cat >>confdefs.h <<\EOF + #define VOID_SIGHANDLER 1 + EOF + fi ! echo "$as_me:3864: checking for TIOCSTAT in sys/ioctl.h" >&5 ! echo $ECHO_N "checking for TIOCSTAT in sys/ioctl.h... $ECHO_C" >&6 ! if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3870 "configure" #include "confdefs.h" #include #include ! int ! main () ! { int x = TIOCSTAT; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3883: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:3886: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3889: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3892: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_tiocstat_in_ioctl=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_tiocstat_in_ioctl=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:3903: result: $bash_cv_tiocstat_in_ioctl" >&5 ! echo "${ECHO_T}$bash_cv_tiocstat_in_ioctl" >&6 ! if test $bash_cv_tiocstat_in_ioctl = yes; then ! cat >>confdefs.h <<\EOF #define TIOCSTAT_IN_SYS_IOCTL 1 EOF *************** *** 2133,2165 **** fi ! echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2137: checking for FIONREAD in sys/ioctl.h" >&5 ! if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include ! int main() { int x = FIONREAD; ! ; return 0; } ! EOF ! if { (eval echo configure:2150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* bash_cv_fionread_in_ioctl=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_fionread_in_ioctl=no fi ! rm -f conftest* fi ! echo "$ac_t""$bash_cv_fionread_in_ioctl" 1>&6 ! if test $bash_cv_fionread_in_ioctl = yes; then ! cat >> confdefs.h <<\EOF #define FIONREAD_IN_SYS_IOCTL 1 EOF --- 3910,3956 ---- fi ! echo "$as_me:3912: checking for FIONREAD in sys/ioctl.h" >&5 ! echo $ECHO_N "checking for FIONREAD in sys/ioctl.h... $ECHO_C" >&6 ! if test "${bash_cv_fionread_in_ioctl+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3918 "configure" #include "confdefs.h" #include #include ! int ! main () ! { int x = FIONREAD; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3931: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:3934: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3937: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3940: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_fionread_in_ioctl=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_fionread_in_ioctl=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:3951: result: $bash_cv_fionread_in_ioctl" >&5 ! echo "${ECHO_T}$bash_cv_fionread_in_ioctl" >&6 ! if test $bash_cv_fionread_in_ioctl = yes; then ! cat >>confdefs.h <<\EOF #define FIONREAD_IN_SYS_IOCTL 1 EOF *************** *** 2167,2198 **** fi ! echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:2171: checking for speed_t in sys/types.h" >&5 ! if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < ! int main() { speed_t x; ! ; return 0; } ! EOF ! if { (eval echo configure:2183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* bash_cv_speed_t_in_sys_types=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_speed_t_in_sys_types=no fi ! rm -f conftest* fi ! echo "$ac_t""$bash_cv_speed_t_in_sys_types" 1>&6 ! if test $bash_cv_speed_t_in_sys_types = yes; then ! cat >> confdefs.h <<\EOF #define SPEED_T_IN_SYS_TYPES 1 EOF --- 3958,4003 ---- fi ! echo "$as_me:3960: checking for speed_t in sys/types.h" >&5 ! echo $ECHO_N "checking for speed_t in sys/types.h... $ECHO_C" >&6 ! if test "${bash_cv_speed_t_in_sys_types+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 3966 "configure" #include "confdefs.h" #include ! int ! main () ! { speed_t x; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3978: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:3981: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3984: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:3987: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_speed_t_in_sys_types=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_speed_t_in_sys_types=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:3998: result: $bash_cv_speed_t_in_sys_types" >&5 ! echo "${ECHO_T}$bash_cv_speed_t_in_sys_types" >&6 ! if test $bash_cv_speed_t_in_sys_types = yes; then ! cat >>confdefs.h <<\EOF #define SPEED_T_IN_SYS_TYPES 1 EOF *************** *** 2200,2272 **** fi ! echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6 ! echo "configure:2204: checking for struct winsize in sys/ioctl.h and termios.h" >&5 ! if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext < #include ! int main() { struct winsize x; ! ; return 0; } ! EOF ! if { (eval echo configure:2217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* bash_cv_struct_winsize_header=ioctl_h else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! cat > conftest.$ac_ext < #include ! int main() { struct winsize x; ! ; return 0; } ! EOF ! if { (eval echo configure:2233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* bash_cv_struct_winsize_header=termios_h else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_struct_winsize_header=other fi ! rm -f conftest* fi ! rm -f conftest* fi if test $bash_cv_struct_winsize_header = ioctl_h; then ! echo "$ac_t""sys/ioctl.h" 1>&6 ! cat >> confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 EOF elif test $bash_cv_struct_winsize_header = termios_h; then ! echo "$ac_t""termios.h" 1>&6 ! cat >> confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_TERMIOS 1 EOF else ! echo "$ac_t""not found" 1>&6 fi ! ! echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6 ! echo "configure:2266: checking if struct dirent has a d_ino member" >&5 ! if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext <&5 ! echo $ECHO_N "checking for struct winsize in sys/ioctl.h and termios.h... $ECHO_C" >&6 ! if test "${bash_cv_struct_winsize_header+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4013 "configure" #include "confdefs.h" #include #include ! int ! main () ! { struct winsize x; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4026: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:4029: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4032: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4035: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_struct_winsize_header=ioctl_h else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! cat >conftest.$ac_ext <<_ACEOF ! #line 4042 "configure" #include "confdefs.h" #include #include ! int ! main () ! { struct winsize x; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4055: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:4058: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4061: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4064: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_struct_winsize_header=termios_h else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_struct_winsize_header=other fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi if test $bash_cv_struct_winsize_header = ioctl_h; then ! echo "$as_me:4079: result: sys/ioctl.h" >&5 ! echo "${ECHO_T}sys/ioctl.h" >&6 ! cat >>confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 EOF elif test $bash_cv_struct_winsize_header = termios_h; then ! echo "$as_me:4086: result: termios.h" >&5 ! echo "${ECHO_T}termios.h" >&6 ! cat >>confdefs.h <<\EOF #define STRUCT_WINSIZE_IN_TERMIOS 1 EOF else ! echo "$as_me:4093: result: not found" >&5 ! echo "${ECHO_T}not found" >&6 fi ! echo "$as_me:4097: checking if struct dirent has a d_ino member" >&5 ! echo $ECHO_N "checking if struct dirent has a d_ino member... $ECHO_C" >&6 ! if test "${bash_cv_dirent_has_dino+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4103 "configure" #include "confdefs.h" *************** *** 2291,2315 **** #endif /* HAVE_DIRENT_H */ ! int main() { struct dirent d; int z; z = d.d_ino; ! ; return 0; } ! EOF ! if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* bash_cv_dirent_has_dino=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_dirent_has_dino=no fi ! rm -f conftest* fi ! echo "$ac_t""$bash_cv_dirent_has_dino" 1>&6 if test $bash_cv_dirent_has_dino = yes; then ! cat >> confdefs.h <<\EOF #define STRUCT_DIRENT_HAS_D_INO 1 EOF --- 4124,4162 ---- #endif /* HAVE_DIRENT_H */ ! int ! main () ! { struct dirent d; int z; z = d.d_ino; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4137: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:4140: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4143: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4146: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_dirent_has_dino=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_dirent_has_dino=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:4157: result: $bash_cv_dirent_has_dino" >&5 ! echo "${ECHO_T}$bash_cv_dirent_has_dino" >&6 if test $bash_cv_dirent_has_dino = yes; then ! cat >>confdefs.h <<\EOF #define STRUCT_DIRENT_HAS_D_INO 1 EOF *************** *** 2317,2328 **** fi ! ! echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6 ! echo "configure:2322: checking if struct dirent has a d_fileno member" >&5 ! if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! cat > conftest.$ac_ext <&5 ! echo $ECHO_N "checking if struct dirent has a d_fileno member... $ECHO_C" >&6 ! if test "${bash_cv_dirent_has_d_fileno+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4172 "configure" #include "confdefs.h" *************** *** 2347,2371 **** #endif /* HAVE_DIRENT_H */ ! int main() { struct dirent d; int z; z = d.d_fileno; ! ; return 0; } ! EOF ! if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then ! rm -rf conftest* bash_cv_dirent_has_d_fileno=yes else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! bash_cv_dirent_has_d_fileno=no fi ! rm -f conftest* fi ! echo "$ac_t""$bash_cv_dirent_has_d_fileno" 1>&6 if test $bash_cv_dirent_has_d_fileno = yes; then ! cat >> confdefs.h <<\EOF #define STRUCT_DIRENT_HAS_D_FILENO 1 EOF --- 4193,4231 ---- #endif /* HAVE_DIRENT_H */ ! int ! main () ! { struct dirent d; int z; z = d.d_fileno; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4206: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:4209: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4212: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4215: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then bash_cv_dirent_has_d_fileno=yes else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_dirent_has_d_fileno=no fi ! rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:4226: result: $bash_cv_dirent_has_d_fileno" >&5 ! echo "${ECHO_T}$bash_cv_dirent_has_d_fileno" >&6 if test $bash_cv_dirent_has_d_fileno = yes; then ! cat >>confdefs.h <<\EOF #define STRUCT_DIRENT_HAS_D_FILENO 1 EOF *************** *** 2373,2377 **** fi - case "$host_os" in aix*) prefer_curses=yes ;; --- 4233,4236 ---- *************** *** 2381,2507 **** _bash_needmsg=yes else ! echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 ! echo "configure:2385: checking which library has the termcap functions" >&5 _bash_needmsg= fi ! if eval "test \"`echo '$''{'bash_cv_termcap_lib'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 ! echo "configure:2392: checking for tgetent in -ltermcap" >&5 ! ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" LIBS="-ltermcap $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" ! else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 bash_cv_termcap_lib=libtermcap else ! echo "$ac_t""no" 1>&6 ! echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 ! echo "configure:2430: checking for tgetent in -lcurses" >&5 ! ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 ! else ! ac_save_LIBS="$LIBS" ! LIBS="-lcurses $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" ! fi ! rm -f conftest* ! LIBS="$ac_save_LIBS" ! fi ! if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then ! echo "$ac_t""yes" 1>&6 bash_cv_termcap_lib=libcurses else ! echo "$ac_t""no" 1>&6 ! echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 ! echo "configure:2468: checking for tgetent in -lncurses" >&5 ! ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` ! if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then ! echo $ac_n "(cached) $ac_c" 1>&6 else ! ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" ! cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=yes" else ! echo "configure: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! rm -rf conftest* ! eval "ac_cv_lib_$ac_lib_var=no" fi - rm -f conftest* - LIBS="$ac_save_LIBS" fi - if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 - bash_cv_termcap_lib=libncurses - else - echo "$ac_t""no" 1>&6 - bash_cv_termcap_lib=gnutermcap - fi fi --- 4240,4462 ---- _bash_needmsg=yes else ! echo "$as_me:4242: checking which library has the termcap functions" >&5 ! echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 _bash_needmsg= fi ! if test "${bash_cv_termcap_lib+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:4249: checking for tgetent in -ltermcap" >&5 ! echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6 ! if test "${ac_cv_lib_termcap_tgetent+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS LIBS="-ltermcap $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 4257 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char tgetent (); ! int ! main () ! { ! tgetent (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4276: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4279: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4282: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4285: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_termcap_tgetent=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_termcap_tgetent=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:4296: result: $ac_cv_lib_termcap_tgetent" >&5 ! echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6 ! if test $ac_cv_lib_termcap_tgetent = yes; then bash_cv_termcap_lib=libtermcap else ! echo "$as_me:4301: checking for tgetent in -ltinfo" >&5 ! echo $ECHO_N "checking for tgetent in -ltinfo... $ECHO_C" >&6 ! if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-ltinfo $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 4309 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char tgetent (); ! int ! main () ! { ! tgetent (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4328: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4331: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4334: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4337: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_tinfo_tgetent=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_tinfo_tgetent=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:4348: result: $ac_cv_lib_tinfo_tgetent" >&5 ! echo "${ECHO_T}$ac_cv_lib_tinfo_tgetent" >&6 ! if test $ac_cv_lib_tinfo_tgetent = yes; then ! bash_cv_termcal_lib=libtinfo ! else ! echo "$as_me:4353: checking for tgetent in -lcurses" >&5 ! echo $ECHO_N "checking for tgetent in -lcurses... $ECHO_C" >&6 ! if test "${ac_cv_lib_curses_tgetent+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS ! LIBS="-lcurses $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 4361 "configure" ! #include "confdefs.h" ! /* Override any gcc2 internal prototype to avoid an error. */ ! #ifdef __cplusplus ! extern "C" ! #endif ! /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char tgetent (); ! int ! main () ! { ! tgetent (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4380: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4383: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4386: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4389: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_curses_tgetent=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_curses_tgetent=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:4400: result: $ac_cv_lib_curses_tgetent" >&5 ! echo "${ECHO_T}$ac_cv_lib_curses_tgetent" >&6 ! if test $ac_cv_lib_curses_tgetent = yes; then bash_cv_termcap_lib=libcurses else ! echo "$as_me:4405: checking for tgetent in -lncurses" >&5 ! echo $ECHO_N "checking for tgetent in -lncurses... $ECHO_C" >&6 ! if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 else ! ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" ! cat >conftest.$ac_ext <<_ACEOF ! #line 4413 "configure" #include "confdefs.h" + /* Override any gcc2 internal prototype to avoid an error. */ + #ifdef __cplusplus + extern "C" + #endif /* We use char because int might match the return type of a gcc2 ! builtin and then its argument prototype would still apply. */ ! char tgetent (); ! int ! main () ! { ! tgetent (); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4432: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4435: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4438: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4441: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_lib_ncurses_tgetent=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_lib_ncurses_tgetent=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! LIBS=$ac_check_lib_save_LIBS ! fi ! echo "$as_me:4452: result: $ac_cv_lib_ncurses_tgetent" >&5 ! echo "${ECHO_T}$ac_cv_lib_ncurses_tgetent" >&6 ! if test $ac_cv_lib_ncurses_tgetent = yes; then ! bash_cv_termcap_lib=libncurses else ! bash_cv_termcap_lib=gnutermcap fi fi fi *************** *** 2512,2519 **** if test "X$_bash_needmsg" = "Xyes"; then ! echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 ! echo "configure:2516: checking which library has the termcap functions" >&5 fi ! echo "$ac_t""using $bash_cv_termcap_lib" 1>&6 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then LDFLAGS="$LDFLAGS -L./lib/termcap" --- 4467,4475 ---- if test "X$_bash_needmsg" = "Xyes"; then ! echo "$as_me:4469: checking which library has the termcap functions" >&5 ! echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 fi ! echo "$as_me:4472: result: using $bash_cv_termcap_lib" >&5 ! echo "${ECHO_T}using $bash_cv_termcap_lib" >&6 if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then LDFLAGS="$LDFLAGS -L./lib/termcap" *************** *** 2523,2526 **** --- 4479,4485 ---- TERMCAP_LIB=-ltermcap TERMCAP_DEP= + elif test $bash_cv_termcap_lib = libtinfo; then + TERMCAP_LIB=-ltinfo + TERMCAP_DEP= elif test $bash_cv_termcap_lib = libncurses; then TERMCAP_LIB=-lncurses *************** *** 2550,2569 **** # if test -f ${srcdir}/support/shobj-conf; then ! echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6 ! echo "configure:2554: checking configuration for building shared libraries" >&5 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` ! ! ! ! ! ! ! ! ! ! ! ! ! echo "$ac_t""$SHLIB_STATUS" 1>&6 # shared library versioning --- 4509,4518 ---- # if test -f ${srcdir}/support/shobj-conf; then ! echo "$as_me:4511: checking configuration for building shared libraries" >&5 ! echo $ECHO_N "checking configuration for building shared libraries... $ECHO_C" >&6 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` ! ! echo "$as_me:4515: result: $SHLIB_STATUS" >&5 ! echo "${ECHO_T}$SHLIB_STATUS" >&6 # shared library versioning *************** *** 2571,2576 **** SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'` SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'` ! ! fi --- 4520,4524 ---- SHLIB_MAJOR=`expr "$LIBVERSION" : '\([0-9]\)\..*'` SHLIB_MINOR=`expr "$LIBVERSION" : '[0-9]\.\([0-9]\).*'` ! fi *************** *** 2580,2617 **** esac ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! trap '' 1 2 15 ! cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs. It is not useful on other systems. ! # If it contains results you don't want to keep, you may remove or edit it. # ! # By default, configure uses ./config.cache as the cache file, ! # creating it if it does not exist already. You can give configure ! # the --cache-file=FILE option to use a different cache file; that is ! # what configure does when it calls configure scripts in ! # subdirectories, so they share the cache. ! # Giving --cache-file=/dev/null disables caching, for debugging configure. ! # config.status only pays attention to the cache file if you give it the ! # --recheck option to rerun configure. # ! EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. --- 4528,4549 ---- esac ! ac_config_files="$ac_config_files Makefile doc/Makefile examples/Makefile shlib/Makefile" ! ac_config_commands="$ac_config_commands default" ! cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure ! # scripts and configure runs, see configure's option --config-cache. ! # It is not useful on other systems. If it contains results you don't ! # want to keep, you may remove or edit it. # ! # config.status only pays attention to the cache file if you give it ! # the --recheck option to rerun configure. # ! # `ac_cv_env_foo' variables (set or unset) will be overriden when ! # loading this file, other *unset* `ac_cv_foo' will be assigned the ! # following values. ! ! _ACEOF ! # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. *************** *** 2619,2642 **** # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote substitution ! # turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! -e "s/'/'\\\\''/g" \ ! -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ! ;; ! esac >> confcache ! if cmp -s $cache_file confcache; then ! : ! else if test -w $cache_file; then ! echo "updating cache $cache_file" ! cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" --- 4551,4582 ---- # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ! { ! (set) 2>&1 | ! case `(ac_space=' '; set | grep ac_space) 2>&1` in ! *ac_space=\ *) ! # `set' does not quote correctly, so add quotes (double-quote ! # substitution turns \\\\ into \\, and sed turns \\ into \). ! sed -n \ ! "s/'/'\\\\''/g; ! s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ! ;; ! *) ! # `set' quotes correctly as required by POSIX, so do not add quotes. ! sed -n \ ! "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ! ;; ! esac; ! } | ! sed ' ! t clear ! : clear ! s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ ! t end ! /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ ! : end' >>confcache ! if cmp -s $cache_file confcache; then :; else if test -w $cache_file; then ! test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" ! cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" *************** *** 2645,2867 **** rm -f confcache - trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 - test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # Any assignment to VPATH causes Sun make to only execute ! # the first set of double-colon rules, so remove it if not needed. ! # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi - trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 - DEFS=-DHAVE_CONFIG_H - # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} ! ! echo creating $CONFIG_STATUS ! rm -f $CONFIG_STATUS ! cat > $CONFIG_STATUS </dev/null | sed 1q`: - # - # $0 $ac_configure_args - # # Compiler output produced by configure, useful for debugging ! # configure, is in ./config.log if it exists. ! ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" ! for ac_option do ! case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ! echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" ! exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; ! -version | --version | --versio | --versi | --vers | --ver | --ve | --v) ! echo "$CONFIG_STATUS generated by autoconf version 2.13" ! exit 0 ;; ! -help | --help | --hel | --he | --h) ! echo "\$ac_cs_usage"; exit 0 ;; ! *) echo "\$ac_cs_usage"; exit 1 ;; esac done ! ac_given_srcdir=$srcdir ! ac_given_INSTALL="$INSTALL" ! trap 'rm -fr `echo "Makefile doc/Makefile examples/Makefile shlib/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF - cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF ! $ac_vpsub ! $extrasub ! s%@SHELL@%$SHELL%g ! s%@CFLAGS@%$CFLAGS%g ! s%@CPPFLAGS@%$CPPFLAGS%g ! s%@CXXFLAGS@%$CXXFLAGS%g ! s%@FFLAGS@%$FFLAGS%g ! s%@DEFS@%$DEFS%g ! s%@LDFLAGS@%$LDFLAGS%g ! s%@LIBS@%$LIBS%g ! s%@exec_prefix@%$exec_prefix%g ! s%@prefix@%$prefix%g ! s%@program_transform_name@%$program_transform_name%g ! s%@bindir@%$bindir%g ! s%@sbindir@%$sbindir%g ! s%@libexecdir@%$libexecdir%g ! s%@datadir@%$datadir%g ! s%@sysconfdir@%$sysconfdir%g ! s%@sharedstatedir@%$sharedstatedir%g ! s%@localstatedir@%$localstatedir%g ! s%@libdir@%$libdir%g ! s%@includedir@%$includedir%g ! s%@oldincludedir@%$oldincludedir%g ! s%@infodir@%$infodir%g ! s%@mandir@%$mandir%g ! s%@host@%$host%g ! s%@host_alias@%$host_alias%g ! s%@host_cpu@%$host_cpu%g ! s%@host_vendor@%$host_vendor%g ! s%@host_os@%$host_os%g ! s%@SET_MAKE@%$SET_MAKE%g ! s%@CC@%$CC%g ! s%@CPP@%$CPP%g ! s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g ! s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g ! s%@INSTALL_DATA@%$INSTALL_DATA%g ! s%@AR@%$AR%g ! s%@RANLIB@%$RANLIB%g ! s%@MAKE_SHELL@%$MAKE_SHELL%g ! s%@SHOBJ_CC@%$SHOBJ_CC%g ! s%@SHOBJ_CFLAGS@%$SHOBJ_CFLAGS%g ! s%@SHOBJ_LD@%$SHOBJ_LD%g ! s%@SHOBJ_LDFLAGS@%$SHOBJ_LDFLAGS%g ! s%@SHOBJ_XLDFLAGS@%$SHOBJ_XLDFLAGS%g ! s%@SHOBJ_LIBS@%$SHOBJ_LIBS%g ! s%@SHOBJ_STATUS@%$SHOBJ_STATUS%g ! s%@SHLIB_STATUS@%$SHLIB_STATUS%g ! s%@SHLIB_XLDFLAGS@%$SHLIB_XLDFLAGS%g ! s%@SHLIB_LIBSUFF@%$SHLIB_LIBSUFF%g ! s%@SHLIB_LIBVERSION@%$SHLIB_LIBVERSION%g ! s%@SHLIB_LIBS@%$SHLIB_LIBS%g ! s%@SHLIB_MAJOR@%$SHLIB_MAJOR%g ! s%@SHLIB_MINOR@%$SHLIB_MINOR%g ! s%@BUILD_DIR@%$BUILD_DIR%g ! s%@LOCAL_CFLAGS@%$LOCAL_CFLAGS%g ! s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g ! s%@LOCAL_DEFS@%$LOCAL_DEFS%g ! s%@ARFLAGS@%$ARFLAGS%g ! s%@LIBVERSION@%$LIBVERSION%g ! s%@TERMCAP_LIB@%$TERMCAP_LIB%g - CEOF EOF ! cat >> $CONFIG_STATUS <<\EOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ! ac_file=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_cmds # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds="" ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file ! else ! sed "${ac_end}q" conftest.subs > conftest.s$ac_file ! fi ! if test ! -s conftest.s$ac_file; then ! ac_more_lines=false ! rm -f conftest.s$ac_file ! else ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f conftest.s$ac_file" else ! ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ! ac_file=`expr $ac_file + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_cmds` fi ! done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat ! fi ! EOF - cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. ! ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" ! ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ! ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi ! case "$ac_given_srcdir" in ! .) srcdir=. ! if test -z "$ac_dots"; then top_srcdir=. ! else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; ! /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. ! srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" ! top_srcdir="$ac_dots$ac_given_srcdir" ;; esac ! case "$ac_given_INSTALL" in ! [/$]*) INSTALL="$ac_given_INSTALL" ;; ! *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac ! echo creating "$ac_file" ! rm -f "$ac_file" ! configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." ! case "$ac_file" in ! *Makefile*) ac_comsub="1i\\ ! # $configure_input" ;; ! *) ac_comsub= ;; ! esac ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! sed -e "$ac_comsub ! s%@configure_input@%$configure_input%g ! s%@srcdir@%$srcdir%g ! s%@top_srcdir@%$top_srcdir%g ! s%@INSTALL@%$INSTALL%g ! " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file ! fi; done ! rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where --- 4585,5154 ---- rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' ! # VPATH may cause trouble with some makes, so we remove $(srcdir), ! # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ! # trailing colons and then remove the whole line if VPATH becomes empty ! # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ! ac_vpsub='/^[ ]*VPATH[ ]*=/{ ! s/:*\$(srcdir):*/:/; ! s/:*\${srcdir}:*/:/; ! s/:*@srcdir@:*/:/; ! s/^\([^=]*=[ ]*\):*/\1/; ! s/:*$//; ! s/^[^=]*=[ ]*$//; ! }' fi DEFS=-DHAVE_CONFIG_H : ${CONFIG_STATUS=./config.status} ! ac_clean_files_save=$ac_clean_files ! ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:4611: creating $CONFIG_STATUS" >&5 ! echo "$as_me: creating $CONFIG_STATUS" >&6;} ! cat >$CONFIG_STATUS <<_ACEOF ! #! $SHELL # Generated automatically by configure. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging ! # configure, is in config.log if it exists. ! debug=false ! SHELL=\${CONFIG_SHELL-$SHELL} ! ac_cs_invocation="\$0 \$@" ! ! _ACEOF ! ! cat >>$CONFIG_STATUS <<\_ACEOF ! # Be Bourne compatible ! if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then ! emulate sh ! NULLCMD=: ! elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then ! set -o posix ! fi ! ! # Name of the executable. ! as_me=`echo "$0" |sed 's,.*[\\/],,'` ! ! if expr a : '\(a\)' >/dev/null 2>&1; then ! as_expr=expr ! else ! as_expr=false ! fi ! ! rm -f conf$$ conf$$.exe conf$$.file ! echo >conf$$.file ! if ln -s conf$$.file conf$$ 2>/dev/null; then ! # We could just check for DJGPP; but this test a) works b) is more generic ! # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). ! if test -f conf$$.exe; then ! # Don't use ln at all; we don't have any links ! as_ln_s='cp -p' ! else ! as_ln_s='ln -s' ! fi ! elif ln conf$$.file conf$$ 2>/dev/null; then ! as_ln_s=ln ! else ! as_ln_s='cp -p' ! fi ! rm -f conf$$ conf$$.exe conf$$.file ! ! as_executable_p="test -f" ! ! # Support unset when possible. ! if (FOO=FOO; unset FOO) >/dev/null 2>&1; then ! as_unset=unset ! else ! as_unset=false ! fi ! ! # NLS nuisances. ! $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } ! $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } ! $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } ! $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } ! $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } ! $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } ! $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } ! $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } ! ! # IFS ! # We need space, tab and new line, in precisely that order. ! as_nl=' ! ' ! IFS=" $as_nl" ! ! # CDPATH. ! $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } ! ! exec 6>&1 ! ! _ACEOF ! ! # Files that config.status was made for. ! if test -n "$ac_config_files"; then ! echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS ! fi ! ! if test -n "$ac_config_headers"; then ! echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS ! fi ! ! if test -n "$ac_config_links"; then ! echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS ! fi ! ! if test -n "$ac_config_commands"; then ! echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS ! fi ! ! cat >>$CONFIG_STATUS <<\EOF ! ! ac_cs_usage="\ ! \`$as_me' instantiates files from templates according to the ! current configuration. ! ! Usage: $0 [OPTIONS] [FILE]... ! ! -h, --help print this help, then exit ! -V, --version print version number, then exit ! -d, --debug don't remove temporary files ! --recheck update $as_me by reconfiguring in the same conditions ! --file=FILE[:TEMPLATE] ! instantiate the configuration file FILE ! --header=FILE[:TEMPLATE] ! instantiate the configuration header FILE ! ! Configuration files: ! $config_files ! ! Configuration headers: ! $config_headers ! ! Configuration commands: ! $config_commands ! ! Report bugs to ." ! EOF ! ! cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF ! # If no file are specified by the user, then we need to provide default ! # value. By we need to know if files were specified by the user. ! ac_need_defaults=: ! while test $# != 0 do ! case $1 in ! --*=*) ! ac_option=`expr "x$1" : 'x\([^=]*\)='` ! ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ! shift ! set dummy "$ac_option" "$ac_optarg" ${1+"$@"} ! shift ! ;; ! -*);; ! *) # This is not an option, so the user has probably given explicit ! # arguments. ! ac_need_defaults=false;; ! esac ! ! case $1 in ! # Handling of the options. ! EOF ! cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF ! --version | --vers* | -V ) ! echo "$ac_cs_version"; exit 0 ;; ! --he | --h) ! # Conflict between --help and --header ! { { echo "$as_me:4787: error: ambiguous option: $1 ! Try \`$0 --help' for more information." >&5 ! echo "$as_me: error: ambiguous option: $1 ! Try \`$0 --help' for more information." >&2;} ! { (exit 1); exit 1; }; };; ! --help | --hel | -h ) ! echo "$ac_cs_usage"; exit 0 ;; ! --debug | --d* | -d ) ! debug=: ;; ! --file | --fil | --fi | --f ) ! shift ! CONFIG_FILES="$CONFIG_FILES $1" ! ac_need_defaults=false;; ! --header | --heade | --head | --hea ) ! shift ! CONFIG_HEADERS="$CONFIG_HEADERS $1" ! ac_need_defaults=false;; ! ! # This is an error. ! -*) { { echo "$as_me:4806: error: unrecognized option: $1 ! Try \`$0 --help' for more information." >&5 ! echo "$as_me: error: unrecognized option: $1 ! Try \`$0 --help' for more information." >&2;} ! { (exit 1); exit 1; }; } ;; ! ! *) ac_config_targets="$ac_config_targets $1" ;; ! esac + shift done ! exec 5>>config.log ! cat >&5 << _ACEOF ! ! ## ----------------------- ## ! ## Running config.status. ## ! ## ----------------------- ## ! ! This file was extended by $as_me (readline 4.2a) 2.52, executed with ! CONFIG_FILES = $CONFIG_FILES ! CONFIG_HEADERS = $CONFIG_HEADERS ! CONFIG_LINKS = $CONFIG_LINKS ! CONFIG_COMMANDS = $CONFIG_COMMANDS ! > $ac_cs_invocation ! on `(hostname || uname -n) 2>/dev/null | sed 1q` ! _ACEOF EOF ! cat >>$CONFIG_STATUS <<\EOF ! for ac_config_target in $ac_config_targets ! do ! case "$ac_config_target" in ! # Handling of arguments. ! "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; ! "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; ! "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; ! "shlib/Makefile" ) CONFIG_FILES="$CONFIG_FILES shlib/Makefile" ;; ! "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; ! "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ! *) { { echo "$as_me:4847: error: invalid argument: $ac_config_target" >&5 ! echo "$as_me: error: invalid argument: $ac_config_target" >&2;} ! { (exit 1); exit 1; }; };; ! esac ! done ! ! # If the user did not use the arguments to specify the items to instantiate, ! # then the envvar interface is used. Set only those that are not. ! # We use the long form for the default assignment because of an extremely ! # bizarre bug on SunOS 4.1.3. ! if $ac_need_defaults; then ! test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files ! test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers ! test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands ! fi ! ! # Create a temporary directory, and hook for its removal unless debugging. ! $debug || ! { ! trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 ! trap '{ (exit 1); exit 1; }' 1 2 13 15 ! } ! ! # Create a (secure) tmp directory for tmp files. ! : ${TMPDIR=/tmp} ! { ! tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && ! test -n "$tmp" && test -d "$tmp" ! } || ! { ! tmp=$TMPDIR/cs$$-$RANDOM ! (umask 077 && mkdir $tmp) ! } || ! { ! echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ! { (exit 1); exit 1; } ! } EOF ! cat >>$CONFIG_STATUS <\$tmp/subs.sed <<\\CEOF ! s,@SHELL@,$SHELL,;t t ! s,@exec_prefix@,$exec_prefix,;t t ! s,@prefix@,$prefix,;t t ! s,@program_transform_name@,$program_transform_name,;t t ! s,@bindir@,$bindir,;t t ! s,@sbindir@,$sbindir,;t t ! s,@libexecdir@,$libexecdir,;t t ! s,@datadir@,$datadir,;t t ! s,@sysconfdir@,$sysconfdir,;t t ! s,@sharedstatedir@,$sharedstatedir,;t t ! s,@localstatedir@,$localstatedir,;t t ! s,@libdir@,$libdir,;t t ! s,@includedir@,$includedir,;t t ! s,@oldincludedir@,$oldincludedir,;t t ! s,@infodir@,$infodir,;t t ! s,@mandir@,$mandir,;t t ! s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t ! s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t ! s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t ! s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t ! s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t ! s,@build_alias@,$build_alias,;t t ! s,@host_alias@,$host_alias,;t t ! s,@target_alias@,$target_alias,;t t ! s,@ECHO_C@,$ECHO_C,;t t ! s,@ECHO_N@,$ECHO_N,;t t ! s,@ECHO_T@,$ECHO_T,;t t ! s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t ! s,@DEFS@,$DEFS,;t t ! s,@LIBS@,$LIBS,;t t ! s,@build@,$build,;t t ! s,@build_cpu@,$build_cpu,;t t ! s,@build_vendor@,$build_vendor,;t t ! s,@build_os@,$build_os,;t t ! s,@host@,$host,;t t ! s,@host_cpu@,$host_cpu,;t t ! s,@host_vendor@,$host_vendor,;t t ! s,@host_os@,$host_os,;t t ! s,@SET_MAKE@,$SET_MAKE,;t t ! s,@CC@,$CC,;t t ! s,@CFLAGS@,$CFLAGS,;t t ! s,@LDFLAGS@,$LDFLAGS,;t t ! s,@CPPFLAGS@,$CPPFLAGS,;t t ! s,@ac_ct_CC@,$ac_ct_CC,;t t ! s,@EXEEXT@,$EXEEXT,;t t ! s,@OBJEXT@,$OBJEXT,;t t ! s,@CPP@,$CPP,;t t ! s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t ! s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t ! s,@INSTALL_DATA@,$INSTALL_DATA,;t t ! s,@AR@,$AR,;t t ! s,@RANLIB@,$RANLIB,;t t ! s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t ! s,@MAKE_SHELL@,$MAKE_SHELL,;t t ! s,@SHOBJ_CC@,$SHOBJ_CC,;t t ! s,@SHOBJ_CFLAGS@,$SHOBJ_CFLAGS,;t t ! s,@SHOBJ_LD@,$SHOBJ_LD,;t t ! s,@SHOBJ_LDFLAGS@,$SHOBJ_LDFLAGS,;t t ! s,@SHOBJ_XLDFLAGS@,$SHOBJ_XLDFLAGS,;t t ! s,@SHOBJ_LIBS@,$SHOBJ_LIBS,;t t ! s,@SHOBJ_STATUS@,$SHOBJ_STATUS,;t t ! s,@SHLIB_STATUS@,$SHLIB_STATUS,;t t ! s,@SHLIB_XLDFLAGS@,$SHLIB_XLDFLAGS,;t t ! s,@SHLIB_LIBSUFF@,$SHLIB_LIBSUFF,;t t ! s,@SHLIB_LIBVERSION@,$SHLIB_LIBVERSION,;t t ! s,@SHLIB_LIBS@,$SHLIB_LIBS,;t t ! s,@SHLIB_MAJOR@,$SHLIB_MAJOR,;t t ! s,@SHLIB_MINOR@,$SHLIB_MINOR,;t t ! s,@BUILD_DIR@,$BUILD_DIR,;t t ! s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t ! s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t ! s,@LOCAL_DEFS@,$LOCAL_DEFS,;t t ! s,@ARFLAGS@,$ARFLAGS,;t t ! s,@LIBVERSION@,$LIBVERSION,;t t ! s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t ! CEOF ! ! EOF ! ! cat >>$CONFIG_STATUS <<\EOF ! # Split the substitutions into bite-sized pieces for seds with ! # small command number limits, like on Digital OSF/1 and HP-UX. ! ac_max_sed_lines=48 ! ac_sed_frag=1 # Number of current file. ! ac_beg=1 # First line for current file. ! ac_end=$ac_max_sed_lines # Line after last line for current file. ! ac_more_lines=: ! ac_sed_cmds= ! while $ac_more_lines; do ! if test $ac_beg -gt 1; then ! sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! else ! sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag ! fi ! if test ! -s $tmp/subs.frag; then ! ac_more_lines=false else ! # The purpose of the label and of the branching condition is to ! # speed up the sed processing (if there are no `@' at all, there ! # is no need to browse any of the substitutions). ! # These are the two extra sed commands mentioned above. ! (echo ':t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" ! else ! ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" ! fi ! ac_sed_frag=`expr $ac_sed_frag + 1` ! ac_beg=$ac_end ! ac_end=`expr $ac_end + $ac_max_sed_lines` fi ! done ! if test -z "$ac_sed_cmds"; then ! ac_sed_cmds=cat fi ! fi # test -n "$CONFIG_FILES" EOF ! cat >>$CONFIG_STATUS <<\EOF ! for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ! ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! { case "$ac_dir" in ! [\\/]* | ?:[\\/]* ) as_incr_dir=;; ! *) as_incr_dir=.;; ! esac ! as_dummy="$ac_dir" ! for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ! case $as_mkdir_dir in ! # Skip DOS drivespec ! ?:) as_incr_dir=$as_mkdir_dir ;; ! *) ! as_incr_dir=$as_incr_dir/$as_mkdir_dir ! test -d "$as_incr_dir" || mkdir "$as_incr_dir" ! ;; ! esac ! done; } ! ! ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" # A "../" for each directory in $ac_dir_suffix. ! ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` else ac_dir_suffix= ac_dots= fi ! case $srcdir in ! .) ac_srcdir=. ! if test -z "$ac_dots"; then ! ac_top_srcdir=. ! else ! ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` ! fi ;; ! [\\/]* | ?:[\\/]* ) ! ac_srcdir=$srcdir$ac_dir_suffix; ! ac_top_srcdir=$srcdir ;; *) # Relative path. ! ac_srcdir=$ac_dots$srcdir$ac_dir_suffix ! ac_top_srcdir=$ac_dots$srcdir ;; esac ! case $INSTALL in ! [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; ! *) ac_INSTALL=$ac_dots$INSTALL ;; esac ! if test x"$ac_file" != x-; then ! { echo "$as_me:5088: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! rm -f "$ac_file" ! fi ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated automatically by config.status. */ ! configure_input="Generated automatically from `echo $ac_file_in | ! sed 's,.*/,,'` by configure." ! ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:5106: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! echo $f;; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo $f ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo $srcdir/$f ! else ! # /dev/null tree ! { { echo "$as_me:5119: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! EOF ! cat >>$CONFIG_STATUS <>$CONFIG_STATUS <<\EOF ! :t ! /@[a-zA-Z_][a-zA-Z_0-9]*@/!b ! s,@configure_input@,$configure_input,;t t ! s,@srcdir@,$ac_srcdir,;t t ! s,@top_srcdir@,$ac_top_srcdir,;t t ! s,@INSTALL@,$ac_INSTALL,;t t ! " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out ! rm -f $tmp/stdin ! if test x"$ac_file" != x-; then ! mv $tmp/out $ac_file ! else ! cat $tmp/out ! rm -f $tmp/out ! fi ! ! done ! EOF ! cat >>$CONFIG_STATUS <<\EOF ! # ! # CONFIG_HEADER section. ! # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where *************** *** 2869,2988 **** # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ! ac_dC='\3' ! ac_dD='%g' ! # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ! ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ! ac_uD='\4%g' ! # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_eB='$%\1#\2define\3' ! ac_eC=' ' ! ac_eD='%g' ! if test "${CONFIG_HEADERS+set}" != set; then ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF ! fi ! for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case "$ac_file" in ! *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ! ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; ! *) ac_file_in="${ac_file}.in" ;; esac ! echo creating $ac_file ! rm -f conftest.frag conftest.in conftest.out ! ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` ! cat $ac_file_inputs > conftest.in EOF ! # Transform confdefs.h into a sed script conftest.vals that substitutes ! # the proper values into config.h.in to produce config.h. And first: ! # Protect against being on the right side of a sed subst in config.status. ! # Protect against being in an unquoted here document in config.status. ! rm -f conftest.vals ! cat > conftest.hdr <<\EOF ! s/[\\&%]/\\&/g ! s%[\\$`]%\\&%g ! s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp ! s%ac_d%ac_u%gp ! s%ac_u%ac_e%gp ! EOF ! sed -n -f conftest.hdr confdefs.h > conftest.vals ! rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >> conftest.vals <<\EOF ! s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF ! # Break up conftest.vals because some shells have a limit on ! # the size of here documents, and old seds have small limits too. ! rm -f conftest.tail ! while : do ! ac_lines=`grep -c . conftest.vals` ! # grep -c gives empty output for an empty file on some AIX systems. ! if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi ! # Write a limited-size here document to conftest.frag. ! echo ' cat > conftest.frag <> $CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF ! sed -f conftest.frag conftest.in > conftest.out ! rm -f conftest.in ! mv conftest.out conftest.in ! ' >> $CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail ! rm -f conftest.vals ! mv conftest.tail conftest.vals ! done ! rm -f conftest.vals ! ! cat >> $CONFIG_STATUS <<\EOF ! rm -f conftest.frag conftest.h ! echo "/* $ac_file. Generated automatically by configure. */" > conftest.h ! cat conftest.in >> conftest.h ! rm -f conftest.in ! if cmp -s $ac_file conftest.h 2>/dev/null; then ! echo "$ac_file is unchanged" ! rm -f conftest.h else ! # Remove last slash and all that follows it. Not all systems have dirname. ! ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! # The file is in a subdirectory. ! test ! -d "$ac_dir" && mkdir "$ac_dir" fi ! rm -f $ac_file ! mv conftest.h $ac_file fi ! fi; done ! EOF ! cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h ! exit 0 EOF chmod +x $CONFIG_STATUS ! rm -fr confdefs* $ac_clean_files ! test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 --- 5156,5404 ---- # # ac_d sets the value in "#define NAME VALUE" lines. ! ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ! ac_dB='[ ].*$,\1#\2' ! ac_dC=' ' ! ac_dD=',;t' ! # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ! ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ! ac_uB='$,\1#\2define\3' ac_uC=' ' ! ac_uD=',;t' ! for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". ! case $ac_file in ! - | *:- | *:-:* ) # input from stdin ! cat >$tmp/stdin ! ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ! ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; ! * ) ac_file_in=$ac_file.in ;; esac ! test x"$ac_file" != x- && { echo "$as_me:5180: creating $ac_file" >&5 ! echo "$as_me: creating $ac_file" >&6;} ! # First look for the input files in the build tree, otherwise in the ! # src tree. ! ac_file_inputs=`IFS=: ! for f in $ac_file_in; do ! case $f in ! -) echo $tmp/stdin ;; ! [\\/$]*) ! # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:5191: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! echo $f;; ! *) # Relative ! if test -f "$f"; then ! # Build tree ! echo $f ! elif test -f "$srcdir/$f"; then ! # Source tree ! echo $srcdir/$f ! else ! # /dev/null tree ! { { echo "$as_me:5204: error: cannot find input file: $f" >&5 ! echo "$as_me: error: cannot find input file: $f" >&2;} ! { (exit 1); exit 1; }; } ! fi;; ! esac ! done` || { (exit 1); exit 1; } ! # Remove the trailing spaces. ! sed 's/[ ]*$//' $ac_file_inputs >$tmp/in EOF ! # Transform confdefs.h into two sed scripts, `conftest.defines' and ! # `conftest.undefs', that substitutes the proper values into ! # config.h.in to produce config.h. The first handles `#define' ! # templates, and the second `#undef' templates. ! # And first: Protect against being on the right side of a sed subst in ! # config.status. Protect against being in an unquoted here document ! # in config.status. ! rm -f conftest.defines conftest.undefs ! # Using a here document instead of a string reduces the quoting nightmare. ! # Putting comments in sed scripts is not portable. ! # ! # `end' is used to avoid that the second main sed command (meant for ! # 0-ary CPP macros) applies to n-ary macro definitions. ! # See the Autoconf documentation for `clear'. ! cat >confdef2sed.sed <<\EOF ! s/[\\&,]/\\&/g ! s,[\\$`],\\&,g ! t clear ! : clear ! s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp ! t end ! s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp ! : end ! EOF ! # If some macros were called several times there might be several times ! # the same #defines, which is useless. Nevertheless, we may not want to ! # sort them, since we want the *last* AC-DEFINE to be honored. ! uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines ! sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs ! rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. ! cat >>conftest.undefs <<\EOF ! s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, EOF ! # Break up conftest.defines because some shells have a limit on the size ! # of here documents, and old seds have small limits too (100 cmds). ! echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS ! echo ' if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS ! echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS ! echo ' :' >>$CONFIG_STATUS ! rm -f conftest.tail ! while grep . conftest.defines >/dev/null ! do ! # Write a limited-size here document to $tmp/defines.sed. ! echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#define' lines. ! echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS ! echo 'CEOF ! sed -f $tmp/defines.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail ! rm -f conftest.defines ! mv conftest.tail conftest.defines ! done ! rm -f conftest.defines ! echo ' fi # egrep' >>$CONFIG_STATUS ! echo >>$CONFIG_STATUS ! ! # Break up conftest.undefs because some shells have a limit on the size ! # of here documents, and old seds have small limits too (100 cmds). ! echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail ! while grep . conftest.undefs >/dev/null do ! # Write a limited-size here document to $tmp/undefs.sed. ! echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS ! # Speed up: don't consider the non `#undef' ! echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS ! # Work around the forget-to-reset-the-flag bug. ! echo 't clr' >>$CONFIG_STATUS ! echo ': clr' >>$CONFIG_STATUS ! sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF ! sed -f $tmp/undefs.sed $tmp/in >$tmp/out ! rm -f $tmp/in ! mv $tmp/out $tmp/in ! ' >>$CONFIG_STATUS ! sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail ! rm -f conftest.undefs ! mv conftest.tail conftest.undefs ! done ! rm -f conftest.undefs ! ! cat >>$CONFIG_STATUS <<\EOF ! # Let's still pretend it is `configure' which instantiates (i.e., don't ! # use $as_me), people would be surprised to read: ! # /* config.h. Generated automatically by config.status. */ ! if test x"$ac_file" = x-; then ! echo "/* Generated automatically by configure. */" >$tmp/config.h else ! echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h ! fi ! cat $tmp/in >>$tmp/config.h ! rm -f $tmp/in ! if test x"$ac_file" != x-; then ! if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:5321: $ac_file is unchanged" >&5 ! echo "$as_me: $ac_file is unchanged" >&6;} ! else ! ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ ! X"$ac_file" : 'X\(//\)[^/]' \| \ ! X"$ac_file" : 'X\(//\)$' \| \ ! X"$ac_file" : 'X\(/\)' \| \ ! . : '\(.\)' 2>/dev/null || ! echo X"$ac_file" | ! sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } ! /^X\(\/\/\)[^/].*/{ s//\1/; q; } ! /^X\(\/\/\)$/{ s//\1/; q; } ! /^X\(\/\).*/{ s//\1/; q; } ! s/.*/./; q'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then ! { case "$ac_dir" in ! [\\/]* | ?:[\\/]* ) as_incr_dir=;; ! *) as_incr_dir=.;; ! esac ! as_dummy="$ac_dir" ! for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do ! case $as_mkdir_dir in ! # Skip DOS drivespec ! ?:) as_incr_dir=$as_mkdir_dir ;; ! *) ! as_incr_dir=$as_incr_dir/$as_mkdir_dir ! test -d "$as_incr_dir" || mkdir "$as_incr_dir" ! ;; ! esac ! done; } ! ! fi ! rm -f $ac_file ! mv $tmp/config.h $ac_file fi ! else ! cat $tmp/config.h ! rm -f $tmp/config.h fi ! done EOF ! cat >>$CONFIG_STATUS <<\EOF ! # ! # CONFIG_COMMANDS section. ! # ! for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ! ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ! ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + case $ac_dest in + default ) # Makefile uses this timestamp file to record whether config.h is up to date. echo > stamp-h + ;; + esac + done + EOF + + cat >>$CONFIG_STATUS <<\EOF ! { (exit 0); exit 0; } EOF chmod +x $CONFIG_STATUS ! ac_clean_files=$ac_clean_files_save ! ! # configure is writing to config.log, and then calls config.status. ! # config.status does its own redirection, appending to config.log. ! # Unfortunately, on DOS this fails, as config.log is still kept open ! # by configure, so config.status won't be able to write to it; its ! # output is simply discarded. So we exec the FD to /dev/null, ! # effectively closing config.log, so it can be properly (re)opened and ! # appended to by config.status. When coming back to configure, we ! # need to make the FD available again. ! if test "$no_create" != yes; then ! ac_cs_success=: ! exec 5>/dev/null ! $SHELL $CONFIG_STATUS || ac_cs_success=false ! exec 5>>config.log ! # Use ||, not &&, to avoid exiting from the if with $? = 1, which ! # would make configure fail if this is the last instruction. ! $ac_cs_success || { (exit 1); exit 1; } ! fi diff -Nrc2 readline-4.2/configure.in readline-4.2a/configure.in *** readline-4.2/configure.in Mon Apr 2 15:55:12 2001 --- readline-4.2a/configure.in Mon Oct 29 10:20:33 2001 *************** *** 5,18 **** dnl dnl Process this file with autoconf to produce a configure script. ! AC_REVISION([for Readline 4.2, version 2.26, from autoconf version] AC_ACVERSION) ! LIBVERSION=4.2 ! AC_INIT(readline.h) ! AC_CONFIG_HEADER(config.h) dnl make sure we are using a recent autoconf version ! AC_PREREQ(2.10) AC_CONFIG_AUX_DIR(./support) AC_CANONICAL_HOST --- 5,21 ---- dnl dnl Process this file with autoconf to produce a configure script. ! AC_REVISION([for Readline 4.2a, version 2.40, from autoconf version] AC_ACVERSION) ! AC_INIT(readline, 4.2a, bug-readline@gnu.org) dnl make sure we are using a recent autoconf version ! AC_PREREQ(2.50) + AC_CONFIG_SRCDIR(readline.h) AC_CONFIG_AUX_DIR(./support) + AC_CONFIG_HEADERS(config.h) + + dnl update the value of RL_READLINE_VERSION in readline.h when this changes + LIBVERSION=4.2a AC_CANONICAL_HOST *************** *** 29,32 **** --- 32,39 ---- fi + echo "" + echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" + echo "" + # We want these before the checks, so the checks can modify their values. test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 *************** *** 42,46 **** AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL ! AC_CHECK_PROG(AR, ar, ar) dnl Set default for ARFLAGS, since autoconf does not have a macro for it. dnl This allows people to set it when running configure or make --- 49,53 ---- AC_PROG_GCC_TRADITIONAL AC_PROG_INSTALL ! AC_CHECK_PROG(AR, ar, , ar) dnl Set default for ARFLAGS, since autoconf does not have a macro for it. dnl This allows people to set it when running configure or make *************** *** 51,55 **** AC_SUBST(MAKE_SHELL) ! AC_RETSIGTYPE AC_HEADER_STAT --- 58,68 ---- AC_SUBST(MAKE_SHELL) ! AC_C_CONST ! AC_C_PROTOTYPES ! ! AC_TYPE_SIGNAL ! ! AC_TYPE_SIZE_T ! AC_CHECK_TYPE(ssize_t, int) AC_HEADER_STAT *************** *** 57,81 **** AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \ ! strcasecmp tcgetattr) AC_FUNC_STRCOLL ! AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h \ ! sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ ! termcap.h termios.h termio.h sys/file.h locale.h) ! BASH_SIGNAL_CHECK ! BASH_REINSTALL_SIGHANDLERS BASH_FUNC_POSIX_SETJMP BASH_FUNC_LSTAT - BASH_CHECK_GETPW_FUNCS BASH_FUNC_STRCOLL BASH_TYPE_SIGHANDLER - BASH_HAVE_TIOCGWINSZ BASH_HAVE_TIOCSTAT BASH_HAVE_FIONREAD ! BASH_MISC_SPEED_T BASH_STRUCT_WINSIZE BASH_STRUCT_DIRENT_D_INO --- 70,96 ---- AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \ ! strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit) AC_FUNC_STRCOLL ! AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ ! limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ ! termcap.h termios.h termio.h sys/file.h locale.h memory.h ) ! BASH_SYS_SIGNAL_VINTAGE ! BASH_SYS_REINSTALL_SIGHANDLERS BASH_FUNC_POSIX_SETJMP BASH_FUNC_LSTAT BASH_FUNC_STRCOLL + BASH_CHECK_GETPW_FUNCS + + AC_HEADER_TIOCGWINSZ + BASH_TYPE_SIGHANDLER BASH_HAVE_TIOCSTAT BASH_HAVE_FIONREAD ! BASH_CHECK_SPEED_T BASH_STRUCT_WINSIZE BASH_STRUCT_DIRENT_D_INO diff -Nrc2 readline-4.2/display.c readline-4.2a/display.c *** readline-4.2/display.c Fri Feb 2 13:25:10 2001 --- readline-4.2a/display.c Tue Oct 30 16:11:44 2001 *************** *** 63,71 **** #endif ! static void update_line __P((char *, char *, int, int, int, int)); ! static void space_to_eol __P((int)); ! static void delete_chars __P((int)); ! static void insert_some_chars __P((char *, int)); ! static void cr __P((void)); static int *inv_lbreaks, *vis_lbreaks; --- 63,71 ---- #endif ! static void update_line PARAMS((char *, char *, int, int, int, int)); ! static void space_to_eol PARAMS((int)); ! static void delete_chars PARAMS((int)); ! static void insert_some_chars PARAMS((char *, int)); ! static void cr PARAMS((void)); static int *inv_lbreaks, *vis_lbreaks; *************** *** 203,207 **** l = strlen (pmt); ! r = ret = xmalloc (l + 1); invfl = 0; /* invisible chars in first line of prompt */ --- 203,207 ---- l = strlen (pmt); ! r = ret = (char *)xmalloc (l + 1); invfl = 0; /* invisible chars in first line of prompt */ *************** *** 336,341 **** if (line_size < minsize) line_size = minsize; ! visible_line = xmalloc (line_size); ! invisible_line = xmalloc (line_size); } else if (line_size < minsize) /* ensure it can hold MINSIZE chars */ --- 336,341 ---- if (line_size < minsize) line_size = minsize; ! visible_line = (char *)xmalloc (line_size); ! invisible_line = (char *)xmalloc (line_size); } else if (line_size < minsize) /* ensure it can hold MINSIZE chars */ *************** *** 344,349 **** if (line_size < minsize) line_size = minsize; ! visible_line = xrealloc (visible_line, line_size); ! invisible_line = xrealloc (invisible_line, line_size); } --- 344,349 ---- if (line_size < minsize) line_size = minsize; ! visible_line = (char *)xrealloc (visible_line, line_size); ! invisible_line = (char *)xrealloc (invisible_line, line_size); } *************** *** 422,427 **** { line_size = (temp + 1024) - (temp % 1024); ! visible_line = xrealloc (visible_line, line_size); ! line = invisible_line = xrealloc (invisible_line, line_size); } strncpy (line + out, local_prompt, local_len); --- 422,427 ---- { line_size = (temp + 1024) - (temp % 1024); ! visible_line = (char *)xrealloc (visible_line, line_size); ! line = invisible_line = (char *)xrealloc (invisible_line, line_size); } strncpy (line + out, local_prompt, local_len); *************** *** 456,461 **** { line_size = (temp + 1024) - (temp % 1024); ! visible_line = xrealloc (visible_line, line_size); ! line = invisible_line = xrealloc (invisible_line, line_size); } strncpy (line + out, prompt_this_line, pmtlen); --- 456,461 ---- { line_size = (temp + 1024) - (temp % 1024); ! visible_line = (char *)xrealloc (visible_line, line_size); ! line = invisible_line = (char *)xrealloc (invisible_line, line_size); } strncpy (line + out, prompt_this_line, pmtlen); *************** *** 531,536 **** { line_size *= 2; ! visible_line = xrealloc (visible_line, line_size); ! invisible_line = xrealloc (invisible_line, line_size); line = invisible_line; } --- 531,536 ---- { line_size *= 2; ! visible_line = (char *)xrealloc (visible_line, line_size); ! invisible_line = (char *)xrealloc (invisible_line, line_size); line = invisible_line; } *************** *** 1331,1335 **** return (2); ! return ((isprint (uc)) ? 1 : 2); } --- 1331,1335 ---- return (2); ! return ((ISPRINT (uc)) ? 1 : 2); } *************** *** 1358,1362 **** --- 1358,1367 ---- #endif + #if defined (HAVE_VSNPRINTF) + vsnprintf (msg_buf, sizeof (msg_buf) - 1, format, args); + #else vsprintf (msg_buf, format, args); + msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ + #endif va_end (args); *************** *** 1371,1374 **** --- 1376,1380 ---- { sprintf (msg_buf, format, arg1, arg2); + msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */ rl_display_prompt = msg_buf; (*rl_redisplay_function) (); *************** *** 1437,1441 **** { len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; ! pmt = xmalloc (len + 2); if (len) strcpy (pmt, rl_prompt); --- 1443,1447 ---- { len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0; ! pmt = (char *)xmalloc (len + 2); if (len) strcpy (pmt, rl_prompt); *************** *** 1446,1450 **** { len = *saved_local_prompt ? strlen (saved_local_prompt) : 0; ! pmt = xmalloc (len + 2); if (len) strcpy (pmt, saved_local_prompt); --- 1452,1456 ---- { len = *saved_local_prompt ? strlen (saved_local_prompt) : 0; ! pmt = (char *)xmalloc (len + 2); if (len) strcpy (pmt, saved_local_prompt); diff -Nrc2 readline-4.2/doc/Makefile.in readline-4.2a/doc/Makefile.in *** readline-4.2/doc/Makefile.in Tue Mar 6 09:05:46 2001 --- readline-4.2a/doc/Makefile.in Wed May 2 11:20:57 2001 *************** *** 28,35 **** manpfx = man ! man1ext = 1 ! man1dir = $(mandir)/$(manpfx)$(man1ext) ! man3ext = 3 ! man3dir = $(mandir)/$(manpfx)$(man3ext) SHELL = @MAKE_SHELL@ --- 28,41 ---- manpfx = man ! man1ext = .1 ! man1dir = $(mandir)/$(manpfx)1 ! man3ext = .3 ! man3dir = $(mandir)/$(manpfx)3 ! ! # set this to a value to have the HTML documentation installed ! htmldir = ! ! # Support an alternate destination root directory for package building ! DESTDIR = SHELL = @MAKE_SHELL@ *************** *** 160,192 **** installdirs: $(topdir)/support/mkdirs ! -$(SHELL) $(topdir)/support/mkdirs $(infodir) $(man3dir) install: installdirs if test -f readline.info; then \ ! ${INSTALL_DATA} readline.info $(infodir)/readline.info; \ else \ ! ${INSTALL_DATA} $(srcdir)/readline.info $(infodir)/readline.info; \ fi if test -f rluserman.info; then \ ! ${INSTALL_DATA} rluserman.info $(infodir)/rluserman.info; \ else \ ! ${INSTALL_DATA} $(srcdir)/rluserman.info $(infodir)/rluserman.info; \ fi if test -f history.info; then \ ! ${INSTALL_DATA} history.info $(infodir)/history.info; \ else \ ! ${INSTALL_DATA} $(srcdir)/history.info $(infodir)/history.info; \ fi -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ ! install-info --dir-file=$(infodir)/dir $(infodir)/readline.info ; \ ! install-info --dir-file=$(infodir)/dir $(infodir)/history.info ; \ else true; fi ! -${INSTALL_DATA} $(srcdir)/readline.3 $(man3dir)/readline.3 ! -${INSTALL_DATA} $(srcdir)/history.3 $(man3dir)/history.3 uninstall: ! $(RM) $(infodir)/readline.info ! $(RM) $(infodir)/rluserman.info ! $(RM) $(infodir)/history.info ! $(RM) $(man3dir)/readline.3 ! $(RM) $(man3dir)/history.3 --- 166,227 ---- installdirs: $(topdir)/support/mkdirs ! -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) ! -if test -n "${htmldir}" ; then \ ! $(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(htmldir) ; \ ! fi install: installdirs if test -f readline.info; then \ ! ${INSTALL_DATA} readline.info $(DESTDIR)$(infodir)/readline.info; \ else \ ! ${INSTALL_DATA} $(srcdir)/readline.info $(DESTDIR)$(infodir)/readline.info; \ fi if test -f rluserman.info; then \ ! ${INSTALL_DATA} rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ else \ ! ${INSTALL_DATA} $(srcdir)/rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ fi if test -f history.info; then \ ! ${INSTALL_DATA} history.info $(DESTDIR)$(infodir)/history.info; \ else \ ! ${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \ fi -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ ! install-info --dir-file=$(DESTDIR)$(infodir)/dir \ ! $(DESTDIR)$(infodir)/readline.info ; \ ! install-info --dir-file=$(DESTDIR)$(infodir)/dir \ ! $(DESTDIR)$(infodir)/history.info ; \ ! install-info --dir-file=$(DESTDIR)$(infodir)/dir \ ! $(DESTDIR)$(infodir)/rluserman.info ; \ else true; fi ! -${INSTALL_DATA} $(srcdir)/readline.3 $(DESTDIR)$(man3dir)/readline$(man3ext) ! -${INSTALL_DATA} $(srcdir)/history.3 $(DESTDIR)$(man3dir)/history$(man3ext) ! -if test -n "${htmldir}" ; then \ ! if test -f readline.html; then \ ! ${INSTALL_DATA} readline.html $(DESTDIR)$(htmldir)/readline.html; \ ! else \ ! ${INSTALL_DATA} $(srcdir)/readline.html $(DESTDIR)$(htmldir)/readline.html; \ ! fi ; \ ! if test -f history.html; then \ ! ${INSTALL_DATA} history.html $(DESTDIR)$(htmldir)/history.html; \ ! else \ ! ${INSTALL_DATA} $(srcdir)/history.html $(DESTDIR)$(htmldir)/history.html; \ ! fi ; \ ! if test -f rluserman.html; then \ ! ${INSTALL_DATA} rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ ! else \ ! ${INSTALL_DATA} $(srcdir)/rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ ! fi ; \ ! fi uninstall: ! $(RM) $(DESTDIR)$(infodir)/readline.info ! $(RM) $(DESTDIR)$(infodir)/rluserman.info ! $(RM) $(DESTDIR)$(infodir)/history.info ! $(RM) $(DESTDIR)$(man3dir)/readline$(man3ext) ! $(RM) $(DESTDIR)$(man3dir)/history$(man3ext) ! -if test -n "${htmldir}" ; then \ ! $(RM) $(DESTDIR)$(htmldir)/readline.html ; \ ! $(RM) $(DESTDIR)$(htmldir)/rluserman.html ; \ ! $(RM) $(DESTDIR)$(htmldir)/history.html ; \ ! fi Binary files readline-4.2/doc/history.dvi and readline-4.2a/doc/history.dvi differ diff -Nrc2 readline-4.2/doc/history.html readline-4.2a/doc/history.html *** readline-4.2/doc/history.html Mon Apr 16 11:05:46 2001 --- readline-4.2a/doc/history.html Tue Oct 9 15:08:11 2001 *************** *** 1,124 **** ! - GNU History Library - -

GNU History Library

-

Edition 4.2, for History Library Version 4.2.

-

Apr 2001

-
Brian Fox, Free Software Foundation
-
Chet Ramey, Case Western Reserve University
-

-


-

Table of Contents

- -


!

This document describes the GNU History library, a programming tool that provides a consistent user interface for recalling lines of previously typed input. !

!

! Published by the Free Software Foundation
! 59 Temple Place, Suite 330,
! Boston, MA 02111 USA ! !

!

! Permission is granted to make and distribute verbatim copies of ! this manual provided the copyright notice and this permission notice ! are preserved on all copies. ! !

!

! Permission is granted to copy and distribute modified versions of this ! manual under the conditions for verbatim copying, provided that the entire ! resulting derived work is distributed under the terms of a permission ! notice identical to this one. ! !

- Permission is granted to copy and distribute translations of this manual - into another language, under the above conditions for modified versions, - except that this permission notice may be stated in a translation approved - by the Free Software Foundation. -

-

- Copyright (C) 1988-2001 Free Software Foundation, Inc. - -

- - - -

Using History Interactively

- -

This chapter describes how to use the GNU History Library interactively, from a user's standpoint. It should be considered a user's guide. For information on using the GNU History Library in your own programs, ! see section Programming with GNU History. !

! ! ! ! ! !

History Expansion

- -

-

The History library provides a history expansion feature that is similar to the history expansion provided by csh. This section describes the syntax used to manipulate the history information. -

-

History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly. -

-

History expansion takes place in two parts. The first is to determine which line from the history list should be used during substitution. --- 1,108 ---- + + + ! GNU History Library: ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
[Top][Contents][Index][ ? ]
!

GNU History Library

! This document describes the GNU History library, a programming tool that provides a consistent user interface for recalling lines of previously typed input. +

!

! ! ! ! !
1. Using History Interactively  GNU History User's Manual.
2. Programming with GNU History  GNU History Programmer's Manual.
A. Concept Index  Index of concepts described in this manual.
B. Function and Variable Index  Index of externally visible functions ! and variables.
!

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
! !

1. Using History Interactively

!

This chapter describes how to use the GNU History Library interactively, from a user's standpoint. It should be considered a user's guide. For information on using the GNU History Library in your own programs, ! see section 2. Programming with GNU History. !

!

! !
1.1 History Expansion  What it feels like using History as a user.
!

! ! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

1.1 History Expansion

!

The History library provides a history expansion feature that is similar to the history expansion provided by csh. This section describes the syntax used to manipulate the history information. +

History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly. +

History expansion takes place in two parts. The first is to determine which line from the history list should be used during substitution. *************** *** 132,204 **** History expansions are introduced by the appearance of the history expansion character, which is `!' by default. !

! ! ! ! ! ! !

Event Designators

- -

-

An event designator is a reference to a command line entry in the history list. ! -

! !
! Start a history substitution, except when followed by a space, tab, the end of the line, `=' or `('.
!n !
! Refer to command line n.
!-n !
! Refer to the command n lines back.
!! !
! Refer to the previous command. This is a synonym for `!-1'.
!string !
! Refer to the most recent command starting with string.
!?string[?] !
! Refer to the most recent command containing string. The trailing `?' may be omitted if the string is followed immediately by a newline.
^string1^string2^ !
! Quick Substitution. Repeat the last command, replacing string1 with string2. Equivalent to !!:s/string1/string2/.
!# !
! The entire command line typed so far.
! ! !

Word Designators

!

Word designators are used to select desired words from the event. A `:' separates the event specification from the word designator. It --- 116,211 ---- History expansions are introduced by the appearance of the history expansion character, which is `!' by default. +

!

! ! ! !
1.1.1 Event Designators  How to specify which history line to use.
1.1.2 Word Designators  Specifying which words are of interest.
1.1.3 Modifiers  Modifying the results of substitution.
!

! ! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

1.1.1 Event Designators

!

An event designator is a reference to a command line entry in the history list. ! !

! !
Start a history substitution, except when followed by a space, tab, the end of the line, `=' or `('. +

!n !
Refer to command line n. !

!-n !
Refer to the command n lines back. !

!! !
Refer to the previous command. This is a synonym for `!-1'. !

!string !
Refer to the most recent command starting with string. !

!?string[?] !
Refer to the most recent command containing string. The trailing `?' may be omitted if the string is followed immediately by a newline. +

^string1^string2^ !
Quick Substitution. Repeat the last command, replacing string1 with string2. Equivalent to !!:s/string1/string2/. +

!# !
The entire command line typed so far. !

+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

1.1.2 Word Designators

!

+ Word designators are used to select desired words from the event. A `:' separates the event specification from the word designator. It *************** *** 207,235 **** of the line, with the first word being denoted by 0 (zero). Words are inserted into the current line separated by single spaces. -

-

For example, -

-
!! !
! designates the preceding command. When you type this, the preceding command is repeated in toto.
!!:$ !
! designates the last argument of the preceding command. This may be shortened to !$.
!fi:2 !
! designates the second argument of the most recent command starting with the letters fi.
-

Here are the word designators: --- 214,239 ---- of the line, with the first word being denoted by 0 (zero). Words are inserted into the current line separated by single spaces. +

For example, +

!! !
designates the preceding command. When you type this, the preceding command is repeated in toto. +

!!:$ !
designates the last argument of the preceding command. This may be shortened to !$. +

!fi:2 !
designates the second argument of the most recent command starting with the letters fi.

+ Here are the word designators: *************** *** 237,319 ****

0 (zero) !
! The 0th word. For many applications, this is the command word.
n !
! The nth word.
^ !
! The first argument; that is, word 1.
$ !
! The last argument.
% !
! The word matched by the most recent `?string?' search.
x-y !
! A range of words; `-y' abbreviates `0-y'.
* !
! All of the words, except the 0th. This is a synonym for `1-$'. It is not an error to use `*' if there is just one word in the event; the empty string is returned in that case.
x* !
! Abbreviates `x-$'
x- !
! Abbreviates `x-$' like `x*', but omits the last word. -

If a word designator is supplied without an event specification, the previous command is used as the event. !

! ! !

Modifiers

!

After the optional word designator, you can add a sequence of one or more of the following modifiers, each preceded by a `:'. -

h !
! Remove a trailing pathname component, leaving only the head.
t !
! Remove all leading pathname components, leaving the tail.
r !
! Remove a trailing suffix of the form `.suffix', leaving the basename.
e !
! Remove all but the trailing suffix.
p !
! Print the new command but do not execute it.
s/old/new/ !
! Substitute new for the first occurrence of old in the event line. Any delimiter may be used in place of `/'. The delimiter may be quoted in old and new --- 241,335 ----
0 (zero) !
The 0th word. For many applications, this is the command word. !

n !
The nth word. !

^ !
The first argument; that is, word 1. !

$ !
The last argument. !

% !
The word matched by the most recent `?string?' search. !

x-y !
A range of words; `-y' abbreviates `0-y'. !

* !
All of the words, except the 0th. This is a synonym for `1-$'. It is not an error to use `*' if there is just one word in the event; the empty string is returned in that case. +

x* !
Abbreviates `x-$' !

x- !
Abbreviates `x-$' like `x*', but omits the last word. !

+ If a word designator is supplied without an event specification, the previous command is used as the event. +

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

1.1.3 Modifiers

!

+ After the optional word designator, you can add a sequence of one or more of the following modifiers, each preceded by a `:'. +

h !
Remove a trailing pathname component, leaving only the head. !

t !
Remove all leading pathname components, leaving the tail. !

r !
Remove a trailing suffix of the form `.suffix', leaving the basename. +

e !
Remove all but the trailing suffix. !

p !
Print the new command but do not execute it. !

s/old/new/ !
Substitute new for the first occurrence of old in the event line. Any delimiter may be used in place of `/'. The delimiter may be quoted in old and new *************** *** 322,370 **** the `&'. The final delimiter is optional if it is the last character on the input line.
& !
! Repeat the previous substitution.
g !
! Cause changes to be applied over the entire event line. Used in conjunction with `s', as in gs/old/new/, or with `&'.
! ! !

Programming with GNU History

!

This chapter describes how to interface programs that you write with the GNU History Library. It should be considered a technical guide. ! For information on the interactive use of GNU History, see section Using History Interactively. ! !

! ! ! ! ! !

Introduction to History

Many programs read input from the user a line at a time. The GNU History library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones. -

-

The programmer using the History library has available functions for remembering lines on a history list, associating arbitrary data --- 338,413 ---- the `&'. The final delimiter is optional if it is the last character on the input line. +

& !
Repeat the previous substitution. !

g !
Cause changes to be applied over the entire event line. Used in conjunction with `s', as in gs/old/new/, or with `&'. +

+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2. Programming with GNU History

!

+ This chapter describes how to interface programs that you write with the GNU History Library. It should be considered a technical guide. ! For information on the interactive use of GNU History, see section 1. Using History Interactively. !

+

+ + + + + +
2.1 Introduction to History  What is the GNU History library for?
2.2 History Storage  How information is stored.
2.3 History Functions  Functions that you can use.
2.4 History Variables  Variables that control behaviour.
2.5 History Programming Example  Example of using the GNU History Library.
+

+ + +


+ + + + + + + + + + + +
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
+

2.1 Introduction to History

+

+ Many programs read input from the user a line at a time. The GNU History library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones. +

The programmer using the History library has available functions for remembering lines on a history list, associating arbitrary data *************** *** 374,380 **** is available which provides for a consistent user interface across different programs. -

-

The user using programs written with the History library has the benefit of a consistent user interface with a set of well-known --- 417,422 ---- is available which provides for a consistent user interface across different programs. +

The user using programs written with the History library has the benefit of a consistent user interface with a set of well-known *************** *** 382,394 **** in new commands. The basic history manipulation commands are similar to the history substitution provided by csh. -

-

If the programmer desires, he can use the Readline library, which includes some history manipulation by default, and has the added advantage of command line editing. -

-

Before declaring any functions using any functionality the History library provides in other code, an application writer should include --- 424,434 ---- in new commands. The basic history manipulation commands are similar to the history substitution provided by csh. +

If the programmer desires, he can use the Readline library, which includes some history manipulation by default, and has the added advantage of command line editing. +

Before declaring any functions using any functionality the History library provides in other code, an application writer should include *************** *** 397,414 **** of the library's public functions and variables, and declares all of the public data structures. !

! ! !

History Storage

!

The history list is an array of history entries. A history entry is declared as follows: !

! !
! typedef void *histdata_t;
  
  typedef struct _hist_entry {
--- 437,465 ----
  of the library's public functions and variables, and declares all of
  the public data structures.
+ 

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.2 History Storage

!

+ The history list is an array of history entries. A history entry is declared as follows: +

!
 
typedef void *histdata_t;
  
  typedef struct _hist_entry {
***************
*** 416,437 ****
    histdata_t data;
  } HIST_ENTRY;
! 
-

The history list itself might therefore be declared as !

! !
! HIST_ENTRY **the_history_list;
! 
-

The state of the History library is encapsulated into a single structure: !

! !
! /*
   * A structure used to pass around the current state of the history.
   */
--- 467,482 ----
    histdata_t data;
  } HIST_ENTRY;
! 

The history list itself might therefore be declared as +

!
 
HIST_ENTRY **the_history_list;
! 

The state of the History library is encapsulated into a single structure: +

!
 
/*
   * A structure used to pass around the current state of the history.
   */
***************
*** 443,706 ****
    int flags;
  } HISTORY_STATE;
! 
-

If the flags member includes HS_STIFLED, the history has been stifled. !

! ! !

History Functions

!

This section describes the calling sequence for the various functions exported by the GNU History library. !

! ! ! ! ! !

Initializing History and State Management

!

This section describes functions used to initialize and manage the state of the History library when you want to use the history functions in your program. !

!

Function: void using_history (void) !
! Begin a session in which the history functions might be used. This initializes the interactive variables.
!

!

Function: HISTORY_STATE * history_get_history_state (void) !
! Return a structure describing the current state of the input history.
!

!

Function: void history_set_history_state (HISTORY_STATE *state) !
! Set the state of the history list according to state.
!

! ! !

History List Management

!

These functions manage individual entries on the history list, or set parameters managing the list itself. !

!

Function: void add_history (const char *string) !
! Place string at the end of the history list. The associated data field (if any) is set to NULL.
!

!

Function: HIST_ENTRY * remove_history (int which) !
! Remove history entry at offset which from the history. The removed element is returned so you can free the line, data, and containing structure.
!

!

Function: HIST_ENTRY * replace_history_entry (int which, const char *line, histdata_t data) !
! Make the history entry at offset which have line and data. This returns the old entry so you can dispose of the data. In the case of an invalid which, a NULL pointer is returned.
!

!

Function: void clear_history (void) !
! Clear the history list by deleting all the entries.
!

!

Function: void stifle_history (int max) !
! Stifle the history list, remembering only the last max entries.
!

!

Function: int unstifle_history (void) !
! Stop stifling the history. This returns the previous amount the history was stifled. The value is positive if the history was stifled, negative if it wasn't.
!

!

Function: int history_is_stifled (void) !
! Returns non-zero if the history is stifled, zero if it is not.
!

! ! !

Information About the History List

!

These functions return information about the entire history list or individual list entries. !

!

Function: HIST_ENTRY ** history_list (void) !
! Return a NULL terminated array of HIST_ENTRY * which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL.
!

!

Function: int where_history (void) !
! Returns the offset of the current history element.
!

!

Function: HIST_ENTRY * current_history (void) !
! Return the history entry at the current position, as determined by where_history(). If there is no entry there, return a NULL pointer.
!

!

Function: HIST_ENTRY * history_get (int offset) !
! Return the history entry at position offset, starting from ! history_base (see section History Variables). If there is no entry there, or if offset is greater than the history length, return a NULL pointer.
!

!

Function: int history_total_bytes (void) !
! Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the lines in the history.
!

! ! !

Moving Around the History List

!

These functions allow the current index into the history list to be set or changed. !

!

Function: int history_set_pos (int pos) !
! Set the current history offset to pos, an absolute index into the list. Returns 1 on success, 0 if pos is less than zero or greater than the number of history entries.
!

!

Function: HIST_ENTRY * previous_history (void) !
! Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer.
!

!

Function: HIST_ENTRY * next_history (void) !
! Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next entry, return a NULL pointer.
!

! ! !

Searching the History List

- -

-

These functions allow searching of the history list for entries containing a specific string. Searching may be performed both forward and backward from the current history position. The search may be anchored, meaning that the string must match at the beginning of the history entry. ! !

!

Function: int history_search (const char *string, int direction) !
! Search the history for string, starting at the current history offset. If direction is less than 0, then the search is through previous entries, otherwise through subsequent entries. --- 488,806 ---- int flags; } HISTORY_STATE; !

If the flags member includes HS_STIFLED, the history has been stifled. +

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3 History Functions

!

+ This section describes the calling sequence for the various functions exported by the GNU History library. +

!

! ! ! ! ! ! ! !
2.3.1 Initializing History and State Management  Functions to call when you want to use history in a ! program.
2.3.2 History List Management  Functions used to manage the list ! of history entries.
2.3.3 Information About the History List  Functions returning information about ! the history list.
2.3.4 Moving Around the History List  Functions used to change the position ! in the history list.
2.3.5 Searching the History List  Functions to search the history list ! for entries containing a string.
2.3.6 Managing the History File  Functions that read and write a file ! containing the history list.
2.3.7 History Expansion  Functions to perform csh-like history ! expansion.
!

! ! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3.1 Initializing History and State Management

!

+ This section describes functions used to initialize and manage the state of the History library when you want to use the history functions in your program. +

!

Function: void using_history (void) !
Begin a session in which the history functions might be used. This initializes the interactive variables.
+

!

Function: HISTORY_STATE * history_get_history_state (void) !
Return a structure describing the current state of the input history.
+

!

Function: void history_set_history_state (HISTORY_STATE *state) !
Set the state of the history list according to state.
+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3.2 History List Management

!

+ These functions manage individual entries on the history list, or set parameters managing the list itself. +

!

Function: void add_history (const char *string) !
Place string at the end of the history list. The associated data field (if any) is set to NULL.
+

!

Function: HIST_ENTRY * remove_history (int which) !
Remove history entry at offset which from the history. The removed element is returned so you can free the line, data, and containing structure.
+

!

Function: HIST_ENTRY * replace_history_entry (int which, const char *line, histdata_t data) !
Make the history entry at offset which have line and data. This returns the old entry so you can dispose of the data. In the case of an invalid which, a NULL pointer is returned.
+

!

Function: void clear_history (void) !
Clear the history list by deleting all the entries.
+

!

Function: void stifle_history (int max) !
Stifle the history list, remembering only the last max entries.
+

!

Function: int unstifle_history (void) !
Stop stifling the history. This returns the previous amount the history was stifled. The value is positive if the history was stifled, negative if it wasn't.
+

!

Function: int history_is_stifled (void) !
Returns non-zero if the history is stifled, zero if it is not.
+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3.3 Information About the History List

!

+ These functions return information about the entire history list or individual list entries. +

!

Function: HIST_ENTRY ** history_list (void) !
Return a NULL terminated array of HIST_ENTRY * which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return NULL.
+

!

Function: int where_history (void) !
Returns the offset of the current history element.
+

!

Function: HIST_ENTRY * current_history (void) !
Return the history entry at the current position, as determined by where_history(). If there is no entry there, return a NULL pointer.
+

!

Function: HIST_ENTRY * history_get (int offset) !
Return the history entry at position offset, starting from ! history_base (see section 2.4 History Variables). If there is no entry there, or if offset is greater than the history length, return a NULL pointer.
+

!

Function: int history_total_bytes (void) !
Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the lines in the history.
+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3.4 Moving Around the History List

!

+ These functions allow the current index into the history list to be set or changed. +

!

Function: int history_set_pos (int pos) !
Set the current history offset to pos, an absolute index into the list. Returns 1 on success, 0 if pos is less than zero or greater than the number of history entries.
+

!

Function: HIST_ENTRY * previous_history (void) !
Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a NULL pointer.
+

!

Function: HIST_ENTRY * next_history (void) !
Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next entry, return a NULL pointer.
+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3.5 Searching the History List

!

These functions allow searching of the history list for entries containing a specific string. Searching may be performed both forward and backward from the current history position. The search may be anchored, meaning that the string must match at the beginning of the history entry. ! !

!

Function: int history_search (const char *string, int direction) !
Search the history for string, starting at the current history offset. If direction is less than 0, then the search is through previous entries, otherwise through subsequent entries. *************** *** 711,721 **** returned.
!

!

Function: int history_search_prefix (const char *string, int direction) !
! Search the history for string, starting at the current history offset. The search is anchored: matching lines must begin with string. If direction is less than 0, then the search is --- 811,820 ---- returned.
+

!

Function: int history_search_prefix (const char *string, int direction) !
Search the history for string, starting at the current history offset. The search is anchored: matching lines must begin with string. If direction is less than 0, then the search is *************** *** 725,765 **** Otherwise, nothing is changed, and a -1 is returned.
!

!

Function: int history_search_pos (const char *string, int direction, int pos) !
! Search for string in the history list, starting at pos, an absolute index into the list. If direction is negative, the search proceeds backward from pos, otherwise forward. Returns the absolute index of the history element where string was found, or -1 otherwise.
!

! ! !

Managing the History File

!

The History library can read the history from and write it to a file. This section documents the functions for managing a history file. !

!

Function: int read_history (const char *filename) !
! Add the contents of filename to the history list, a line at a time. If filename is NULL, then read from `~/.history'. Returns 0 if successful, or errno if not.
!

!

Function: int read_history_range (const char *filename, int from, int to) !
! Read a range of lines from filename, adding them to the history list. Start reading at line from and end at to. If from is zero, start at the beginning. If to is less than --- 824,874 ---- Otherwise, nothing is changed, and a -1 is returned.
+

!

Function: int history_search_pos (const char *string, int direction, int pos) !
Search for string in the history list, starting at pos, an absolute index into the list. If direction is negative, the search proceeds backward from pos, otherwise forward. Returns the absolute index of the history element where string was found, or -1 otherwise.
+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3.6 Managing the History File

!

+ The History library can read the history from and write it to a file. This section documents the functions for managing a history file. +

!

Function: int read_history (const char *filename) !
Add the contents of filename to the history list, a line at a time. If filename is NULL, then read from `~/.history'. Returns 0 if successful, or errno if not.
+

!

Function: int read_history_range (const char *filename, int from, int to) !
Read a range of lines from filename, adding them to the history list. Start reading at line from and end at to. If from is zero, start at the beginning. If to is less than *************** *** 768,778 **** or errno if not.
!

!

Function: int write_history (const char *filename) !
! Write the current history to filename, overwriting filename if necessary. If filename is NULL, then write the history list to --- 877,886 ---- or errno if not.
+

!

Function: int write_history (const char *filename) !
Write the current history to filename, overwriting filename if necessary. If filename is NULL, then write the history list to *************** *** 780,850 **** Returns 0 on success, or errno on a read or write error.
!

!

Function: int append_history (int nelements, const char *filename) !
! Append the last nelements of the history list to filename. If filename is NULL, then append to `~/.history'. Returns 0 on success, or errno on a read or write error.
!

!

Function: int history_truncate_file (const char *filename, int nlines) !
! Truncate the history file filename, leaving only the last nlines lines. If filename is NULL, then `~/.history' is truncated. Returns 0 on success, or errno on failure.
!

! ! !

History Expansion

!

These functions implement history expansion. !

!

Function: int history_expand (char *string, char **output) !
! Expand string, placing the result into output, a pointer ! to a string (see section History Expansion). Returns:
-
0 !
! If no expansions took place (or, if the only change in the text was the removal of escape characters preceding the history expansion character);
1 !
! if expansions did take place;
-1 !
! if there was an error in expansion;
2 !
! if the returned line should be displayed, but not executed, ! as with the :p modifier (see section Modifiers).
-

If an error ocurred in expansion, then output contains a descriptive error message.

!

!

Function: char * get_history_event (const char *string, int *cindex, int qchar) !
! Returns the text of the history event beginning at string + *cindex. *cindex is modified to point to after the event specifier. At function entry, cindex points to the index into --- 888,962 ---- Returns 0 on success, or errno on a read or write error.
+

!

Function: int append_history (int nelements, const char *filename) !
Append the last nelements of the history list to filename. If filename is NULL, then append to `~/.history'. Returns 0 on success, or errno on a read or write error.
+

!

Function: int history_truncate_file (const char *filename, int nlines) !
Truncate the history file filename, leaving only the last nlines lines. If filename is NULL, then `~/.history' is truncated. Returns 0 on success, or errno on failure.
+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.3.7 History Expansion

!

+ These functions implement history expansion. +

!

Function: int history_expand (char *string, char **output) !
Expand string, placing the result into output, a pointer ! to a string (see section 1.1 History Expansion). Returns:
0 !
If no expansions took place (or, if the only change in the text was the removal of escape characters preceding the history expansion character);
1 !
if expansions did take place;
-1 !
if there was an error in expansion;
2 !
if the returned line should be displayed, but not executed, ! as with the :p modifier (see section 1.1.3 Modifiers).

+ If an error ocurred in expansion, then output contains a descriptive error message.

+

!

Function: char * get_history_event (const char *string, int *cindex, int qchar) !
Returns the text of the history event beginning at string + *cindex. *cindex is modified to point to after the event specifier. At function entry, cindex points to the index into *************** *** 853,985 **** to the "normal" terminating characters.
!

!

Function: char ** history_tokenize (const char *string) !
! Return an array of tokens parsed out of string, much as the shell might. The tokens are split on the characters in the history_word_delimiters variable, and shell quoting conventions are obeyed.
!

!

Function: char * history_arg_extract (int first, int last, const char *string) !
! Extract a string segment consisting of the first through last arguments present in string. Arguments are split using history_tokenize.
!

! ! !

History Variables

!

This section describes the externally-visible variables exported by the GNU History Library. !

!

Variable: int history_base !
! The logical offset of the first entry in the history list.
!

!

Variable: int history_length !
! The number of entries currently stored in the history list.
!

!

Variable: int history_max_entries !
! The maximum number of history entries. This must be changed using stifle_history().
!

!

Variable: char history_expansion_char !
! The character that introduces a history event. The default is `!'. Setting this to 0 inhibits history expansion.
!

!

Variable: char history_subst_char !
! The character that invokes word substitution if found at the start of a line. The default is `^'.
!

!

Variable: char history_comment_char !
! During tokenization, if this character is seen as the first character of a word, then it and all subsequent characters up to a newline are ignored, suppressing history expansion for the remainder of the line. This is disabled by default.
!

!

Variable: char * history_word_delimiters !
! The characters that separate tokens for \fBhistory_tokenize()\fP. ! The default value is " \t\n()<>;&|".
!

!

Variable: char * history_no_expand_chars !
! The list of characters which inhibit history expansion if found immediately following history_expansion_char. The default is space, tab, newline, carriage return, and `='.
!

!

Variable: char * history_search_delimiter_chars !
! The list of additional characters which can delimit a history search string, in addition to space, TAB, `:' and `?' in the case of a substring search. The default is empty.
!

!

Variable: int history_quotes_inhibit_expansion !
! If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0.
!

!

Variable: rl_linebuf_func_t * history_inhibit_expansion_function !
! This should be set to the address of a function that takes two arguments: a char * (string) and an int index into that string (i). --- 965,1097 ---- to the "normal" terminating characters.
+

!

Function: char ** history_tokenize (const char *string) !
Return an array of tokens parsed out of string, much as the shell might. The tokens are split on the characters in the history_word_delimiters variable, and shell quoting conventions are obeyed.
+

!

Function: char * history_arg_extract (int first, int last, const char *string) !
Extract a string segment consisting of the first through last arguments present in string. Arguments are split using history_tokenize.
+

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.4 History Variables

!

+ This section describes the externally-visible variables exported by the GNU History Library. +

!

Variable: int history_base !
The logical offset of the first entry in the history list.
+

!

Variable: int history_length !
The number of entries currently stored in the history list.
+

!

Variable: int history_max_entries !
The maximum number of history entries. This must be changed using stifle_history().
+

!

Variable: char history_expansion_char !
The character that introduces a history event. The default is `!'. Setting this to 0 inhibits history expansion.
+

!

Variable: char history_subst_char !
The character that invokes word substitution if found at the start of a line. The default is `^'.
+

!

Variable: char history_comment_char !
During tokenization, if this character is seen as the first character of a word, then it and all subsequent characters up to a newline are ignored, suppressing history expansion for the remainder of the line. This is disabled by default.
+

!

Variable: char * history_word_delimiters !
The characters that separate tokens for history_tokenize(). ! The default value is " \t\n()<>;&|".
+

!

Variable: char * history_no_expand_chars !
The list of characters which inhibit history expansion if found immediately following history_expansion_char. The default is space, tab, newline, carriage return, and `='.
+

!

Variable: char * history_search_delimiter_chars !
The list of additional characters which can delimit a history search string, in addition to space, TAB, `:' and `?' in the case of a substring search. The default is empty.
+

!

Variable: int history_quotes_inhibit_expansion !
If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0.
+

!

Variable: rl_linebuf_func_t * history_inhibit_expansion_function !
This should be set to the address of a function that takes two arguments: a char * (string) and an int index into that string (i). *************** *** 991,1007 **** By default, this variable is set to NULL.
!

! ! !

History Programming Example

!

- The following program demonstrates simple use of the GNU History Library. !

!
! #include <stdio.h>
  #include <readline/history.h>
  
--- 1103,1130 ----
  By default, this variable is set to NULL.
  
+ 

! !


! ! ! ! ! ! ! ! ! ! ! !
[ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
!

2.5 History Programming Example

!

! The following program demonstrates simple use of the GNU History Library. !

!
 
#include <stdio.h>
  #include <readline/history.h>
  
***************
*** 1088,1222 ****
      }
  }
! 
-

Concept Index

-

- Jump to: - a - - - e - - - h -

-

a

- -
  • anchored search -
  • -

    e

    - -
  • event designators -
  • -

    h

    - -
  • history events -
  • history expansion -
  • History Searching -
  • - -

    - - -

    Function and Variable Index

    -

    - Jump to: - a - - - c - - - g - - - h - - - n - - - p - - - r - - - s - - - u - - - w -

    -

    a

    - -
  • add_history -
  • append_history -
  • -

    c

    - -
  • clear_history -
  • current_history -
  • -

    g

    - -
  • get_history_event -
  • -

    h

    - -
  • history_arg_extract -
  • history_base -
  • history_comment_char -
  • history_expand -
  • history_expansion_char -
  • history_get -
  • history_get_history_state -
  • history_inhibit_expansion_function -
  • history_is_stifled -
  • history_length -
  • history_list -
  • history_max_entries -
  • history_no_expand_chars -
  • history_quotes_inhibit_expansion -
  • history_search -
  • history_search_delimiter_chars -
  • history_search_pos -
  • history_search_prefix -
  • history_set_history_state -
  • history_set_pos -
  • history_subst_char -
  • history_tokenize -
  • history_total_bytes -
  • history_truncate_file -
  • history_word_delimiters -
  • -

    n

    - -
  • next_history -
  • -

    p

    - -
  • previous_history -
  • -

    r

    - -
  • read_history -
  • read_history_range -
  • remove_history -
  • replace_history_entry -
  • -

    s

    - -
  • stifle_history -
  • -

    u

    - -
  • unstifle_history -
  • using_history -
  • -

    w

    - -
  • where_history -
  • write_history -
  • - -

    -


    - This document was generated on 16 April 2001 using the - texi2html - translator version 1.52.

    --- 1211,1638 ---- } } !

    + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    A. Concept Index

    + +
    Jump to:   A +   + E +   + H +   +

    + + + + + + + + + + + + + + +
    Index Entry Section

    A
    anchored search2.3.5 Searching the History List

    E
    event designators1.1.1 Event Designators

    H
    history events1.1.1 Event Designators
    history expansion1.1 History Expansion
    History Searching2.3.5 Searching the History List

    Jump to:   A +   + E +   + H +   +

    + + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    B. Function and Variable Index

    + +
    Jump to:   A +   + C +   + G +   + H +   + N +   + P +   + R +   + S +   + U +   + W +   +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Index Entry Section

    A
    add_history2.3.2 History List Management
    append_history2.3.6 Managing the History File

    C
    clear_history2.3.2 History List Management
    current_history2.3.3 Information About the History List

    G
    get_history_event2.3.7 History Expansion

    H
    history_arg_extract2.3.7 History Expansion
    history_base2.4 History Variables
    history_comment_char2.4 History Variables
    history_expand2.3.7 History Expansion
    history_expansion_char2.4 History Variables
    history_get2.3.3 Information About the History List
    history_get_history_state2.3.1 Initializing History and State Management
    history_inhibit_expansion_function2.4 History Variables
    history_is_stifled2.3.2 History List Management
    history_length2.4 History Variables
    history_list2.3.3 Information About the History List
    history_max_entries2.4 History Variables
    history_no_expand_chars2.4 History Variables
    history_quotes_inhibit_expansion2.4 History Variables
    history_search2.3.5 Searching the History List
    history_search_delimiter_chars2.4 History Variables
    history_search_pos2.3.5 Searching the History List
    history_search_prefix2.3.5 Searching the History List
    history_set_history_state2.3.1 Initializing History and State Management
    history_set_pos2.3.4 Moving Around the History List
    history_subst_char2.4 History Variables
    history_tokenize2.3.7 History Expansion
    history_total_bytes2.3.3 Information About the History List
    history_truncate_file2.3.6 Managing the History File
    history_word_delimiters2.4 History Variables

    N
    next_history2.3.4 Moving Around the History List

    P
    previous_history2.3.4 Moving Around the History List

    R
    read_history2.3.6 Managing the History File
    read_history_range2.3.6 Managing the History File
    remove_history2.3.2 History List Management
    replace_history_entry2.3.2 History List Management

    S
    stifle_history2.3.2 History List Management

    U
    unstifle_history2.3.2 History List Management
    using_history2.3.1 Initializing History and State Management

    W
    where_history2.3.3 Information About the History List
    write_history2.3.6 Managing the History File

    Jump to:   A +   + C +   + G +   + H +   + N +   + P +   + R +   + S +   + U +   + W +   +

    + +


    + + + + + + +
    [Top][Contents][Index][ ? ]
    +

    Table of Contents

    + +
    + + + + + + +
    [Top][Contents][Index][ ? ]
    +

    Short Table of Contents

    +
    + 1. Using History Interactively +
    + 2. Programming with GNU History +
    + A. Concept Index +
    + B. Function and Variable Index +
    + +
    +
    + + + + + + +
    [Top][Contents][Index][ ? ]
    +

    About this document

    + This document was generated by Chet Ramey on October, 9 2001 + using texi2html +

    + The buttons in the navigation panels have the following meaning: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Button Name Go to From 1.2.3 go to
    + [ < ] + Back + + previous section in reading order + + 1.2.2 +
    + [ > ] + Forward + + next section in reading order + + 1.2.4 +
    + [ << ] + FastBack + + previous or up-and-previous section + + 1.1 +
    + [ Up ] + Up + + up section + + 1.2 +
    + [ >> ] + FastForward + + next or up-and-next section + + 1.3 +
    + [Top] + Top + + cover (top) of document + +   +
    + [Contents] + Contents + + table of contents + +   +
    + [Index] + Index + + concept index + +   +
    + [ ? ] + About + + this page + +   +
    +

    + where the Example assumes that the current position + is at Subsubsection One-Two-Three of a document of + the following structure: +
      +
    • 1. Section One
    • +
        +
      • 1.1 Subsection One-One
      • +
          +
        • ...
        • +
        +
      • 1.2 Subsection One-Two
      • +
          +
        • 1.2.1 Subsubsection One-Two-One +
        • 1.2.2 Subsubsection One-Two-Two +
        • 1.2.3 Subsubsection One-Two-Three     + <== Current Position +
        • 1.2.4 Subsubsection One-Two-Four +
        +
      • 1.3 Subsection One-Three
      • +
          +
        • ...
        • +
        +
      • 1.4 Subsection One-Four
      • +
      +
    +
    +
    + + This document was generated + by Chet Ramey on October, 9 2001 + using texi2html diff -Nrc2 readline-4.2/doc/history.info readline-4.2a/doc/history.info *** readline-4.2/doc/history.info Mon Apr 16 11:05:39 2001 --- readline-4.2a/doc/history.info Tue Oct 9 15:08:02 2001 *************** *** 627,632 **** - Variable: char * history_word_delimiters ! The characters that separate tokens for \fBhistory_tokenize()\fP. ! The default value is `" \t\n()<>;&|"'. - Variable: char * history_no_expand_chars --- 627,632 ---- - Variable: char * history_word_delimiters ! The characters that separate tokens for `history_tokenize()'. The ! default value is `" \t\n()<>;&|"'. - Variable: char * history_no_expand_chars *************** *** 833,839 **** Node: History Expansion20260 Node: History Variables22155 ! Node: History Programming Example24725 ! Node: Concept Index27447 ! Node: Function and Variable Index27933  End Tag Table --- 833,839 ---- Node: History Expansion20260 Node: History Variables22155 ! Node: History Programming Example24722 ! Node: Concept Index27444 ! Node: Function and Variable Index27930  End Tag Table diff -Nrc2 readline-4.2/doc/history.ps readline-4.2a/doc/history.ps *** readline-4.2/doc/history.ps Mon Apr 16 11:05:46 2001 --- readline-4.2a/doc/history.ps Tue Oct 9 15:08:12 2001 *************** *** 9,13 **** %DVIPSCommandLine: dvips -D 300 -t letter -o history.ps history.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2001.04.16:1105 %%BeginProcSet: texc.pro %! --- 9,13 ---- %DVIPSCommandLine: dvips -D 300 -t letter -o history.ps history.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2001.10.09:1508 %%BeginProcSet: texc.pro %! *************** *** 821,830 **** %%Page: 1 1 1 0 bop 75 659 a Fq(GNU)33 b(History)f(Library)p 75 709 ! 1800 17 v 960 757 a Fp(Edition)16 b(4.2,)e(for)h Fo(History)f(Library)g ! Fp(V)l(ersion)i(4.2.)1692 811 y(Apr)f(2001)75 2467 y ! Fn(Brian)23 b(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 b(Soft)n(w)n(are)f(F)-6 ! b(oundation)75 2534 y(Chet)22 b(Ramey)-6 b(,)23 b(Case)e(W)-6 ! b(estern)23 b(Reserv)n(e)f(Univ)n(ersit)n(y)p 75 2570 ! 1800 9 v eop %%Page: 2 2 2 1 bop 75 217 a Fp(This)21 b(do)q(cumen)o(t)g(describ)q(es)h(the)f --- 821,830 ---- %%Page: 1 1 1 0 bop 75 659 a Fq(GNU)33 b(History)f(Library)p 75 709 ! 1800 17 v 915 757 a Fp(Edition)16 b(4.2a,)e(for)g Fo(History)g(Library) ! h Fp(V)l(ersion)h(4.2a.)1608 811 y(Octob)q(er)g(2001)75 ! 2467 y Fn(Brian)23 b(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 ! b(Soft)n(w)n(are)f(F)-6 b(oundation)75 2534 y(Chet)22 ! b(Ramey)-6 b(,)23 b(Case)e(W)-6 b(estern)23 b(Reserv)n(e)f(Univ)n ! (ersit)n(y)p 75 2570 1800 9 v eop %%Page: 2 2 2 1 bop 75 217 a Fp(This)21 b(do)q(cumen)o(t)g(describ)q(es)h(the)f *************** *** 1373,1381 **** 1835 y(V)l(ariable)-1861 b Fh(char)20 b(*)f Fg(history)p 422 1835 V 21 w(w)n(ord)p 567 1835 V 20 w(delimiters)195 ! 1889 y Fp(The)e(c)o(haracters)g(that)f(separate)h(tok)o(ens)g(for)f ! Fo(\\)p Fp(fBhistory)p 1217 1889 14 2 v 17 w(tok)o(enize\(\))p ! Fo(\\)p Fp(fP)l(.)g(The)i(default)g(v)m(alue)195 1944 ! y(is)e Fo(")f(\\t\\n\(\)<>;&|")p Fp(.)1773 2077 y(V)l(ariable)-1861 ! b Fh(char)20 b(*)f Fg(history)p 422 2077 18 3 v 21 w(no)p 504 2077 V 20 w(expand)p 704 2077 V 20 w(c)n(hars)195 2131 y Fp(The)c(list)h(of)e(c)o(haracters)g(whic)o(h)i(inhibit)h --- 1373,1380 ---- 1835 y(V)l(ariable)-1861 b Fh(char)20 b(*)f Fg(history)p 422 1835 V 21 w(w)n(ord)p 567 1835 V 20 w(delimiters)195 ! 1889 y Fp(The)14 b(c)o(haracters)f(that)g(separate)g(tok)o(ens)h(for)f ! Fo(history_tokenize\(\))p Fp(.)k(The)d(default)g(v)m(alue)h(is)f ! Fo(")195 1944 y(\\t\\n\(\)<>;&|")p Fp(.)1773 2077 y(V)l(ariable)-1861 ! b Fh(char)20 b(*)f Fg(history)p 422 2077 V 21 w(no)p 504 2077 V 20 w(expand)p 704 2077 V 20 w(c)n(hars)195 2131 y Fp(The)c(list)h(of)e(c)o(haracters)g(whic)o(h)i(inhibit)h diff -Nrc2 readline-4.2/doc/hstech.texinfo readline-4.2a/doc/hstech.texinfo *** readline-4.2/doc/hstech.texinfo Mon Mar 12 05:37:38 2001 --- readline-4.2a/doc/hstech.texinfo Tue Jul 24 16:42:23 2001 *************** *** 423,427 **** @deftypevar {char *} history_word_delimiters ! The characters that separate tokens for \fBhistory_tokenize()\fP. The default value is @code{" \t\n()<>;&|"}. @end deftypevar --- 423,427 ---- @deftypevar {char *} history_word_delimiters ! The characters that separate tokens for @code{history_tokenize()}. The default value is @code{" \t\n()<>;&|"}. @end deftypevar diff -Nrc2 readline-4.2/doc/manvers.texinfo readline-4.2a/doc/manvers.texinfo *** readline-4.2/doc/manvers.texinfo Mon Apr 16 10:54:00 2001 --- readline-4.2a/doc/manvers.texinfo Tue Oct 9 15:06:21 2001 *************** *** 1,6 **** ! @set EDITION 4.2 ! @set VERSION 4.2 ! @set UPDATED 2001 Apr 16 ! @set UPDATE-MONTH Apr 2001 ! @set LASTCHANGE Mon Apr 16 10:53:58 EDT 2001 --- 1,6 ---- ! @set EDITION 4.2a ! @set VERSION 4.2a ! @set UPDATED 2001 October 9 ! @set UPDATE-MONTH October 2001 ! @set LASTCHANGE Tue Oct 9 15:03:34 EDT 2001 diff -Nrc2 readline-4.2/doc/readline.0 readline-4.2a/doc/readline.0 *** readline-4.2/doc/readline.0 Mon Mar 5 11:20:23 2001 --- readline-4.2a/doc/readline.0 Tue Oct 9 15:08:13 2001 *************** *** 62,66 **** ! GNU Readline 4.2 2001 Mar 5 1 --- 62,66 ---- ! GNU Readline 4.2a 2001 October 9 1 *************** *** 128,132 **** ! GNU Readline 4.2 2001 Mar 5 2 --- 128,132 ---- ! GNU Readline 4.2a 2001 October 9 2 *************** *** 182,198 **** \\tt horizontal tab \\vv vertical tab ! \\_n_n_n the character whose ASCII code is the octal ! value _n_n_n (one to three digits) ! \\xx_n_n_n the character whose ASCII code is the hex- ! adecimal value _n_n_n (one to three digits) When entering the text of a macro, single or double quotes ! should be used to indicate a macro definition. Unquoted text is assumed to be a function name. In the macro body, ! the backslash escapes described above are expanded. ! GNU Readline 4.2 2001 Mar 5 3 --- 182,198 ---- \\tt horizontal tab \\vv vertical tab ! \\_n_n_n the eight-bit character whose value is the ! octal value _n_n_n (one to three digits) ! \\xx_H_H the eight-bit character whose value is the ! hexadecimal value _H_H (one or two hex digits) When entering the text of a macro, single or double quotes ! should be used to indicate a macro definition. Unquoted text is assumed to be a function name. In the macro body, ! the backslash escapes described above are expanded. ! GNU Readline 4.2a 2001 October 9 3 *************** *** 203,220 **** ! Backslash will quote any other character in the macro text, including " and '. ! BBaasshh allows the current readline key bindings to be dis- ! played or modified with the bbiinndd builtin command. The ! editing mode may be switched during interactive use by ! using the --oo option to the sseett builtin command. Other ! programs using this library provide similar mechanisms. ! The _i_n_p_u_t_r_c file may be edited and re-read if a program ! does not provide any other means to incorporate new bind- ings. VVaarriiaabblleess ! Readline has variables that can be used to further cus- tomize its behavior. A variable may be set in the _i_n_p_u_t_r_c file with a statement of the form --- 203,220 ---- ! Backslash will quote any other character in the macro text, including " and '. ! BBaasshh allows the current readline key bindings to be dis- ! played or modified with the bbiinndd builtin command. The ! editing mode may be switched during interactive use by ! using the --oo option to the sseett builtin command. Other ! programs using this library provide similar mechanisms. ! The _i_n_p_u_t_r_c file may be edited and re-read if a program ! does not provide any other means to incorporate new bind- ings. VVaarriiaabblleess ! Readline has variables that can be used to further cus- tomize its behavior. A variable may be set in the _i_n_p_u_t_r_c file with a statement of the form *************** *** 223,258 **** Except where noted, readline variables can take the values ! OOnn or OOffff (without regard to case). The variables and their default values are: bbeellll--ssttyyllee ((aauuddiibbllee)) ! Controls what happens when readline wants to ring ! the terminal bell. If set to nnoonnee, readline never rings the bell. If set to vviissiibbllee, readline uses a ! visible bell if one is available. If set to aauuddii-- bbllee, readline attempts to ring the terminal's bell. ccoommmmeenntt--bbeeggiinn ((````##'''')) ! The string that is inserted in vvii mode when the ! iinnsseerrtt--ccoommmmeenntt command is executed. This command ! is bound to MM--## in emacs mode and to ## in vi com- mand mode. ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff)) ! If set to OOnn, readline performs filename matching and completion in a case-insensitive fashion. ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000)) ! This determines when the user is queried about ! viewing the number of possible completions gener- ! ated by the ppoossssiibbllee--ccoommpplleettiioonnss command. It may ! be set to any integer value greater than or equal ! to zero. If the number of possible completions is ! greater than or equal to the value of this vari- able, the user is asked whether or not he wishes to ! view them; otherwise they are simply listed on the terminal. ccoonnvveerrtt--mmeettaa ((OOnn)) If set to OOnn, readline will convert characters with ! the eighth bit set to an ASCII key sequence by ! stripping the eighth bit and prefixing it with an ! escape character (in effect, using escape as the _m_e_t_a _p_r_e_f_i_x). --- 223,258 ---- Except where noted, readline variables can take the values ! OOnn or OOffff (without regard to case). The variables and their default values are: bbeellll--ssttyyllee ((aauuddiibbllee)) ! Controls what happens when readline wants to ring ! the terminal bell. If set to nnoonnee, readline never rings the bell. If set to vviissiibbllee, readline uses a ! visible bell if one is available. If set to aauuddii-- bbllee, readline attempts to ring the terminal's bell. ccoommmmeenntt--bbeeggiinn ((````##'''')) ! The string that is inserted in vvii mode when the ! iinnsseerrtt--ccoommmmeenntt command is executed. This command ! is bound to MM--## in emacs mode and to ## in vi com- mand mode. ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff)) ! If set to OOnn, readline performs filename matching and completion in a case-insensitive fashion. ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000)) ! This determines when the user is queried about ! viewing the number of possible completions gener- ! ated by the ppoossssiibbllee--ccoommpplleettiioonnss command. It may ! be set to any integer value greater than or equal ! to zero. If the number of possible completions is ! greater than or equal to the value of this vari- able, the user is asked whether or not he wishes to ! view them; otherwise they are simply listed on the terminal. ccoonnvveerrtt--mmeettaa ((OOnn)) If set to OOnn, readline will convert characters with ! the eighth bit set to an ASCII key sequence by ! stripping the eighth bit and prefixing it with an ! escape character (in effect, using escape as the _m_e_t_a _p_r_e_f_i_x). *************** *** 260,264 **** ! GNU Readline 4.2 2001 Mar 5 4 --- 260,264 ---- ! GNU Readline 4.2a 2001 October 9 4 *************** *** 270,330 **** ddiissaabbllee--ccoommpplleettiioonn ((OOffff)) ! If set to OOnn, readline will inhibit word comple- ! tion. Completion characters will be inserted into the line as if they had been mapped to sseellff--iinnsseerrtt. eeddiittiinngg--mmooddee ((eemmaaccss)) ! Controls whether readline begins with a set of key ! bindings similar to emacs or vi. eeddiittiinngg--mmooddee can be set to either eemmaaccss or vvii. eennaabbllee--kkeeyyppaadd ((OOffff)) ! When set to OOnn, readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys. eexxppaanndd--ttiillddee ((OOffff)) ! If set to oonn, tilde expansion is performed when readline attempts word completion. hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff)) ! When set to OOnn, makes readline use a single line ! for display, scrolling the input horizontally on a ! single screen line when it becomes longer than the screen width rather than wrapping to a new line. iinnppuutt--mmeettaa ((OOffff)) ! If set to OOnn, readline will enable eight-bit input ! (that is, it will not clear the eighth bit in the characters it reads), regardless of what the termi- nal claims it can support. The name mmeettaa--ffllaagg is a synonym for this variable. iisseeaarrcchh--tteerrmmiinnaattoorrss ((````CC--[[ CC--JJ'''')) ! The string of characters that should terminate an ! incremental search without subsequently executing ! the character as a command. If this variable has ! not been given a value, the characters _E_S_C and _C_-_J will terminate an incremental search. kkeeyymmaapp ((eemmaaccss)) ! Set the current readline keymap. The set of legal ! keymap names is _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d, and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is equivalent ! to _e_m_a_c_s_-_s_t_a_n_d_a_r_d. The default value is _e_m_a_c_s. ! The value of eeddiittiinngg--mmooddee also affects the default keymap. mmaarrkk--ddiirreeccttoorriieess ((OOnn)) ! If set to OOnn, completed directory names have a slash appended. mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff)) If set to OOnn, history lines that have been modified are displayed with a preceding asterisk (**). ! oouuttppuutt--mmeettaa ((OOffff)) ! If set to OOnn, readline will display characters with ! the eighth bit set directly rather than as a meta- ! prefixed escape sequence. ! pprriinntt--ccoommpplleettiioonnss--hhoorriizzoonnttaallllyy ((OOffff)) ! If set to OOnn, readline will display completions ! with matches sorted horizontally in alphabetical ! order, rather than down the screen. ! GNU Readline 4.2 2001 Mar 5 5 --- 270,330 ---- ddiissaabbllee--ccoommpplleettiioonn ((OOffff)) ! If set to OOnn, readline will inhibit word comple- ! tion. Completion characters will be inserted into the line as if they had been mapped to sseellff--iinnsseerrtt. eeddiittiinngg--mmooddee ((eemmaaccss)) ! Controls whether readline begins with a set of key ! bindings similar to emacs or vi. eeddiittiinngg--mmooddee can be set to either eemmaaccss or vvii. eennaabbllee--kkeeyyppaadd ((OOffff)) ! When set to OOnn, readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys. eexxppaanndd--ttiillddee ((OOffff)) ! If set to oonn, tilde expansion is performed when readline attempts word completion. + hhiissttoorryy--pprreesseerrvvee--ppooiinntt + If set to oonn, the history code attempts to place + point at the same location on each history line + retrived with pprreevviioouuss--hhiissttoorryy or nneexxtt--hhiissttoorryy. hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff)) ! When set to OOnn, makes readline use a single line ! for display, scrolling the input horizontally on a ! single screen line when it becomes longer than the screen width rather than wrapping to a new line. iinnppuutt--mmeettaa ((OOffff)) ! If set to OOnn, readline will enable eight-bit input ! (that is, it will not clear the eighth bit in the characters it reads), regardless of what the termi- nal claims it can support. The name mmeettaa--ffllaagg is a synonym for this variable. iisseeaarrcchh--tteerrmmiinnaattoorrss ((````CC--[[ CC--JJ'''')) ! The string of characters that should terminate an ! incremental search without subsequently executing ! the character as a command. If this variable has ! not been given a value, the characters _E_S_C and _C_-_J will terminate an incremental search. kkeeyymmaapp ((eemmaaccss)) ! Set the current readline keymap. The set of legal ! keymap names is _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d, and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is equivalent ! to _e_m_a_c_s_-_s_t_a_n_d_a_r_d. The default value is _e_m_a_c_s. ! The value of eeddiittiinngg--mmooddee also affects the default keymap. mmaarrkk--ddiirreeccttoorriieess ((OOnn)) ! If set to OOnn, completed directory names have a slash appended. mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff)) If set to OOnn, history lines that have been modified are displayed with a preceding asterisk (**). ! mmaattcchh--hhiiddddeenn--ffiilleess ((OOnn)) ! This variable, when set to OOnn, causes readline to ! match files whose names begin with a `.' (hidden ! files) when performing filename completion, unless ! GNU Readline 4.2a 2001 October 9 5 *************** *** 335,374 **** sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff)) ! This alters the default behavior of the completion ! functions. If set to oonn, words which have more ! than one possible completion cause the matches to ! be listed immediately instead of ringing the bell. vviissiibbllee--ssttaattss ((OOffff)) If set to OOnn, a character denoting a file's type as ! reported by _s_t_a_t(2) is appended to the filename when listing possible completions. CCoonnddiittiioonnaall CCoonnssttrruuccttss ! Readline implements a facility similar in spirit to the ! conditional compilation features of the C preprocessor which allows key bindings and variable settings to be per- ! formed as the result of tests. There are four parser directives used. ! $$iiff The $$iiff construct allows bindings to be made based ! on the editing mode, the terminal being used, or ! the application using readline. The text of the ! test extends to the end of the line; no characters are required to isolate it. ! mmooddee The mmooddee== form of the $$iiff directive is used ! to test whether readline is in emacs or vi ! mode. This may be used in conjunction with the sseett kkeeyymmaapp command, for instance, to set ! bindings in the _e_m_a_c_s_-_s_t_a_n_d_a_r_d and _e_m_a_c_s_- ! _c_t_l_x keymaps only if readline is starting out in emacs mode. tteerrmm The tteerrmm== form may be used to include termi- ! nal-specific key bindings, perhaps to bind ! the key sequences output by the terminal's ! function keys. The word on the right side ! of the == is tested against the full name of the terminal and the portion of the terminal name before the first --. This allows _s_u_n to --- 335,384 ---- + the leading `.' is supplied by the user in the + filename to be completed. + oouuttppuutt--mmeettaa ((OOffff)) + If set to OOnn, readline will display characters with + the eighth bit set directly rather than as a meta- + prefixed escape sequence. + pprriinntt--ccoommpplleettiioonnss--hhoorriizzoonnttaallllyy ((OOffff)) + If set to OOnn, readline will display completions + with matches sorted horizontally in alphabetical + order, rather than down the screen. sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff)) ! This alters the default behavior of the completion ! functions. If set to oonn, words which have more ! than one possible completion cause the matches to ! be listed immediately instead of ringing the bell. vviissiibbllee--ssttaattss ((OOffff)) If set to OOnn, a character denoting a file's type as ! reported by _s_t_a_t(2) is appended to the filename when listing possible completions. CCoonnddiittiioonnaall CCoonnssttrruuccttss ! Readline implements a facility similar in spirit to the ! conditional compilation features of the C preprocessor which allows key bindings and variable settings to be per- ! formed as the result of tests. There are four parser directives used. ! $$iiff The $$iiff construct allows bindings to be made based ! on the editing mode, the terminal being used, or ! the application using readline. The text of the ! test extends to the end of the line; no characters are required to isolate it. ! mmooddee The mmooddee== form of the $$iiff directive is used ! to test whether readline is in emacs or vi ! mode. This may be used in conjunction with the sseett kkeeyymmaapp command, for instance, to set ! bindings in the _e_m_a_c_s_-_s_t_a_n_d_a_r_d and _e_m_a_c_s_- ! _c_t_l_x keymaps only if readline is starting out in emacs mode. tteerrmm The tteerrmm== form may be used to include termi- ! nal-specific key bindings, perhaps to bind ! the key sequences output by the terminal's ! function keys. The word on the right side ! of the == is tested against the full name of the terminal and the portion of the terminal name before the first --. This allows _s_u_n to *************** *** 378,396 **** The aapppplliiccaattiioonn construct is used to include application-specific settings. Each program ! using the readline library sets the _a_p_p_l_i_c_a_- ! _t_i_o_n _n_a_m_e, and an initialization file can ! test for a particular value. This could be ! used to bind key sequences to functions use- ! ful for a specific program. For instance, ! the following command adds a key sequence ! that quotes the current or previous word in ! Bash: - $$iiff Bash - # Quote the current or previous word ! ! GNU Readline 4.2 2001 Mar 5 6 --- 388,396 ---- The aapppplliiccaattiioonn construct is used to include application-specific settings. Each program ! using the readline library sets the ! GNU Readline 4.2a 2001 October 9 6 *************** *** 401,404 **** --- 401,414 ---- + _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization file + can test for a particular value. This could + be used to bind key sequences to functions + useful for a specific program. For + instance, the following command adds a key + sequence that quotes the current or previous + word in Bash: + + $$iiff Bash + # Quote the current or previous word "\C-xq": "\eb\"\ef\"" $$eennddiiff *************** *** 407,417 **** minates an $$iiff command. ! $$eellssee Commands in this branch of the $$iiff directive are executed if the test fails. $$iinncclluuddee ! This directive takes a single filename as an argu- ! ment and reads commands and bindings from that ! file. For example, the following directive would read _/_e_t_c_/_i_n_p_u_t_r_c: --- 417,427 ---- minates an $$iiff command. ! $$eellssee Commands in this branch of the $$iiff directive are executed if the test fails. $$iinncclluuddee ! This directive takes a single filename as an argu- ! ment and reads commands and bindings from that ! file. For example, the following directive would read _/_e_t_c_/_i_n_p_u_t_r_c: *************** *** 419,438 **** SSEEAARRCCHHIINNGG ! Readline provides commands for searching through the com- ! mand history for lines containing a specified string. ! There are two search modes: _i_n_c_r_e_m_e_n_t_a_l and _n_o_n_-_i_n_c_r_e_m_e_n_- _t_a_l. ! Incremental searches begin before the user has finished typing the search string. As each character of the search string is typed, readline displays the next entry from the ! history matching the string typed so far. An incremental ! search requires only as many characters as needed to find the desired history entry. To search backward in the his- ! tory for a particular string, type CC--rr. Typing CC--ss searches forward through the history. The characters pre- ! sent in the value of the iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used to terminate an incremental search. If that variable ! has not been assigned a value the _E_s_c_a_p_e and CC--JJ charac- ters will terminate an incremental search. CC--GG will abort an incremental search and restore the original line. When --- 429,448 ---- SSEEAARRCCHHIINNGG ! Readline provides commands for searching through the com- ! mand history for lines containing a specified string. ! There are two search modes: _i_n_c_r_e_m_e_n_t_a_l and _n_o_n_-_i_n_c_r_e_m_e_n_- _t_a_l. ! Incremental searches begin before the user has finished typing the search string. As each character of the search string is typed, readline displays the next entry from the ! history matching the string typed so far. An incremental ! search requires only as many characters as needed to find the desired history entry. To search backward in the his- ! tory for a particular string, type CC--rr. Typing CC--ss searches forward through the history. The characters pre- ! sent in the value of the iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used to terminate an incremental search. If that variable ! has not been assigned a value the _E_s_c_a_p_e and CC--JJ charac- ters will terminate an incremental search. CC--GG will abort an incremental search and restore the original line. When *************** *** 440,462 **** search string becomes the current line. ! To find other matching entries in the history list, type ! CC--ss or CC--rr as appropriate. This will search backward or ! forward in the history for the next line matching the ! search string typed so far. Any other key sequence bound ! to a readline command will terminate the search and exe- ! cute that command. For instance, a newline will terminate ! the search and accept the line, thereby executing the com- ! mand from the history list. A movement command will ter- ! minate the search, make the last line found the current ! line, and begin editing. - Non-incremental searches read the entire search string - before starting to search for matching history lines. The - search string may be typed by the user or be part of the - contents of the current line. ! ! GNU Readline 4.2 2001 Mar 5 7 --- 450,462 ---- search string becomes the current line. ! To find other matching entries in the history list, type ! CC--ss or CC--rr as appropriate. This will search backward or ! forward in the history for the next line matching the ! search string typed so far. Any other key sequence bound ! to a readline command will terminate the search and ! GNU Readline 4.2a 2001 October 9 7 *************** *** 467,478 **** EEDDIITTIINNGG CCOOMMMMAANNDDSS ! The following is a list of the names of the commands and ! the default key sequences to which they are bound. Com- mand names without an accompanying key sequence are unbound by default. In the following descriptions, _p_o_i_n_t refers to the current ! cursor position, and _m_a_r_k refers to a cursor position saved by the sseett--mmaarrkk command. The text between the point and mark is referred to as the _r_e_g_i_o_n. --- 467,489 ---- + execute that command. For instance, a newline will termi- + nate the search and accept the line, thereby executing the + command from the history list. A movement command will + terminate the search, make the last line found the current + line, and begin editing. + + Non-incremental searches read the entire search string + before starting to search for matching history lines. The + search string may be typed by the user or be part of the + contents of the current line. + EEDDIITTIINNGG CCOOMMMMAANNDDSS ! The following is a list of the names of the commands and ! the default key sequences to which they are bound. Com- mand names without an accompanying key sequence are unbound by default. In the following descriptions, _p_o_i_n_t refers to the current ! cursor position, and _m_a_r_k refers to a cursor position saved by the sseett--mmaarrkk command. The text between the point and mark is referred to as the _r_e_g_i_o_n. *************** *** 488,501 **** Move back a character. ffoorrwwaarrdd--wwoorrdd ((MM--ff)) ! Move forward to the end of the next word. Words ! are composed of alphanumeric characters (letters and digits). bbaacckkwwaarrdd--wwoorrdd ((MM--bb)) ! Move back to the start of the current or previous ! word. Words are composed of alphanumeric charac- ters (letters and digits). cclleeaarr--ssccrreeeenn ((CC--ll)) ! Clear the screen leaving the current line at the ! top of the screen. With an argument, refresh the current line without clearing the screen. rreeddrraaww--ccuurrrreenntt--lliinnee --- 499,512 ---- Move back a character. ffoorrwwaarrdd--wwoorrdd ((MM--ff)) ! Move forward to the end of the next word. Words ! are composed of alphanumeric characters (letters and digits). bbaacckkwwaarrdd--wwoorrdd ((MM--bb)) ! Move back to the start of the current or previous ! word. Words are composed of alphanumeric charac- ters (letters and digits). cclleeaarr--ssccrreeeenn ((CC--ll)) ! Clear the screen leaving the current line at the ! top of the screen. With an argument, refresh the current line without clearing the screen. rreeddrraaww--ccuurrrreenntt--lliinnee *************** *** 504,528 **** CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn)) ! Accept the line regardless of where the cursor is. ! If this line is non-empty, it may be added to the ! history list for future recall with aadddd__hhiissttoorryy(()). If the line is a modified history line, the history line is restored to its original state. - pprreevviioouuss--hhiissttoorryy ((CC--pp)) - Fetch the previous command from the history list, - moving back in the list. - nneexxtt--hhiissttoorryy ((CC--nn)) - Fetch the next command from the history list, mov- - ing forward in the list. - bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<)) - Move to the first line in the history. - eenndd--ooff--hhiissttoorryy ((MM-->>)) - Move to the end of the input history, i.e., the - line currently being entered. ! GNU Readline 4.2 2001 Mar 5 8 --- 515,528 ---- CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn)) ! Accept the line regardless of where the cursor is. ! If this line is non-empty, it may be added to the ! history list for future recall with aadddd__hhiissttoorryy(()). If the line is a modified history line, the history line is restored to its original state. ! GNU Readline 4.2a 2001 October 9 8 *************** *** 533,594 **** rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr)) ! Search backward starting at the current line and moving `up' through the history as necessary. This is an incremental search. ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss)) ! Search forward starting at the current line and ! moving `down' through the history as necessary. This is an incremental search. nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp)) Search backward through the history starting at the ! current line using a non-incremental search for a string supplied by the user. nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn)) ! Search forward through the history using a non- ! incremental search for a string supplied by the user. hhiissttoorryy--sseeaarrcchh--ffoorrwwaarrdd ! Search forward through the history for the string of characters between the start of the current line ! and the current cursor position (the _p_o_i_n_t). This is a non-incremental search. hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd ! Search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search. yyaannkk--nntthh--aarrgg ((MM--CC--yy)) ! Insert the first argument to the previous command ! (usually the second word on the previous line) at ! point. With an argument _n, insert the _nth word ! from the previous command (the words in the previ- ! ous command begin with word 0). A negative argu- ! ment inserts the _nth word from the end of the pre- vious command. yyaannkk--llaasstt--aarrgg ((MM--..,, MM--__)) ! Insert the last argument to the previous command ! (the last word of the previous history entry). With an argument, behave exactly like yyaannkk--nntthh--aarrgg. Successive calls to yyaannkk--llaasstt--aarrgg move back through ! the history list, inserting the last argument of each line in turn. CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt - ddeelleettee--cchhaarr ((CC--dd)) - Delete the character at point. If point is at the - beginning of the line, there are no characters in - the line, and the last character typed was not - bound to ddeelleettee--cchhaarr, then return EEOOFF. - bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt)) - Delete the character behind the cursor. When given - a numeric argument, save the deleted text on the - kill ring. - ffoorrwwaarrdd--bbaacckkwwaarrdd--ddeelleettee--cchhaarr - Delete the character under the cursor, unless the - cursor is at the end of the line, in which case the ! GNU Readline 4.2 2001 Mar 5 9 --- 533,594 ---- + pprreevviioouuss--hhiissttoorryy ((CC--pp)) + Fetch the previous command from the history list, + moving back in the list. + nneexxtt--hhiissttoorryy ((CC--nn)) + Fetch the next command from the history list, mov- + ing forward in the list. + bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<)) + Move to the first line in the history. + eenndd--ooff--hhiissttoorryy ((MM-->>)) + Move to the end of the input history, i.e., the + line currently being entered. rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr)) ! Search backward starting at the current line and moving `up' through the history as necessary. This is an incremental search. ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss)) ! Search forward starting at the current line and ! moving `down' through the history as necessary. This is an incremental search. nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp)) Search backward through the history starting at the ! current line using a non-incremental search for a string supplied by the user. nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn)) ! Search forward through the history using a non- ! incremental search for a string supplied by the user. hhiissttoorryy--sseeaarrcchh--ffoorrwwaarrdd ! Search forward through the history for the string of characters between the start of the current line ! and the current cursor position (the _p_o_i_n_t). This is a non-incremental search. hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd ! Search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search. yyaannkk--nntthh--aarrgg ((MM--CC--yy)) ! Insert the first argument to the previous command ! (usually the second word on the previous line) at ! point. With an argument _n, insert the _nth word ! from the previous command (the words in the previ- ! ous command begin with word 0). A negative argu- ! ment inserts the _nth word from the end of the pre- vious command. yyaannkk--llaasstt--aarrgg ((MM--..,, MM--__)) ! Insert the last argument to the previous command ! (the last word of the previous history entry). With an argument, behave exactly like yyaannkk--nntthh--aarrgg. Successive calls to yyaannkk--llaasstt--aarrgg move back through ! the history list, inserting the last argument of each line in turn. CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt ! ! GNU Readline 4.2a 2001 October 9 9 *************** *** 599,606 **** character behind the cursor is deleted. qquuootteedd--iinnsseerrtt ((CC--qq,, CC--vv)) ! Add the next character that you type to the line ! verbatim. This is how to insert characters like CC--qq, for example. ttaabb--iinnsseerrtt ((MM--TTAABB)) --- 599,618 ---- + ddeelleettee--cchhaarr ((CC--dd)) + Delete the character at point. If point is at the + beginning of the line, there are no characters in + the line, and the last character typed was not + bound to ddeelleettee--cchhaarr, then return EEOOFF. + bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt)) + Delete the character behind the cursor. When given + a numeric argument, save the deleted text on the + kill ring. + ffoorrwwaarrdd--bbaacckkwwaarrdd--ddeelleettee--cchhaarr + Delete the character under the cursor, unless the + cursor is at the end of the line, in which case the character behind the cursor is deleted. qquuootteedd--iinnsseerrtt ((CC--qq,, CC--vv)) ! Add the next character that you type to the line ! verbatim. This is how to insert characters like CC--qq, for example. ttaabb--iinnsseerrtt ((MM--TTAABB)) *************** *** 609,631 **** Insert the character typed. ttrraannssppoossee--cchhaarrss ((CC--tt)) ! Drag the character before point forward over the ! character at point, moving point forward as well. ! If point is at the end of the line, then this ! transposes the two characters before point. Nega- tive arguments have no effect. ttrraannssppoossee--wwoorrddss ((MM--tt)) ! Drag the word before point past the word after ! point, moving point over that word as well. uuppccaassee--wwoorrdd ((MM--uu)) ! Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move point. ddoowwnnccaassee--wwoorrdd ((MM--ll)) ! Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move point. ccaappiittaalliizzee--wwoorrdd ((MM--cc)) Capitalize the current (or following) word. With a ! negative argument, capitalize the previous word, but do not move point. --- 621,645 ---- Insert the character typed. ttrraannssppoossee--cchhaarrss ((CC--tt)) ! Drag the character before point forward over the ! character at point, moving point forward as well. ! If point is at the end of the line, then this ! transposes the two characters before point. Nega- tive arguments have no effect. ttrraannssppoossee--wwoorrddss ((MM--tt)) ! Drag the word before point past the word after ! point, moving point over that word as well. If ! point is at the end of the line, this transposes ! the last two words on the line. uuppccaassee--wwoorrdd ((MM--uu)) ! Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move point. ddoowwnnccaassee--wwoorrdd ((MM--ll)) ! Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move point. ccaappiittaalliizzee--wwoorrdd ((MM--cc)) Capitalize the current (or following) word. With a ! negative argument, capitalize the previous word, but do not move point. *************** *** 636,660 **** Kill backward to the beginning of the line. uunniixx--lliinnee--ddiissccaarrdd ((CC--uu)) ! Kill backward from point to the beginning of the line. The killed text is saved on the kill-ring. - kkiillll--wwhhoollee--lliinnee - Kill all characters on the current line, no matter - where point is. - kkiillll--wwoorrdd ((MM--dd)) - Kill from point the end of the current word, or if - between words, to the end of the next word. Word - boundaries are the same as those used by ffoorr-- - wwaarrdd--wwoorrdd. - bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt)) - Kill the word behind point. Word boundaries are - the same as those used by bbaacckkwwaarrdd--wwoorrdd. - uunniixx--wwoorrdd--rruubboouutt ((CC--ww)) - Kill the word behind point, using white space as a - word boundary. The killed text is saved on the - kill-ring. ! GNU Readline 4.2 2001 Mar 5 10 --- 650,660 ---- Kill backward to the beginning of the line. uunniixx--lliinnee--ddiissccaarrdd ((CC--uu)) ! Kill backward from point to the beginning of the line. The killed text is saved on the kill-ring. ! ! GNU Readline 4.2a 2001 October 9 10 *************** *** 665,673 **** ddeelleettee--hhoorriizzoonnttaall--ssppaaccee ((MM--\\)) Delete all spaces and tabs around point. kkiillll--rreeggiioonn ! Kill the text between the point and _m_a_r_k (saved ! cursor position). This text is referred to as the _r_e_g_i_o_n. ccooppyy--rreeggiioonn--aass--kkiillll --- 665,688 ---- + kkiillll--wwhhoollee--lliinnee + Kill all characters on the current line, no matter + where point is. + kkiillll--wwoorrdd ((MM--dd)) + Kill from point the end of the current word, or if + between words, to the end of the next word. Word + boundaries are the same as those used by ffoorr-- + wwaarrdd--wwoorrdd. + bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt)) + Kill the word behind point. Word boundaries are + the same as those used by bbaacckkwwaarrdd--wwoorrdd. + uunniixx--wwoorrdd--rruubboouutt ((CC--ww)) + Kill the word behind point, using white space as a + word boundary. The killed text is saved on the + kill-ring. ddeelleettee--hhoorriizzoonnttaall--ssppaaccee ((MM--\\)) Delete all spaces and tabs around point. kkiillll--rreeggiioonn ! Kill the text between the point and _m_a_r_k (saved ! cursor position). This text is referred to as the _r_e_g_i_o_n. ccooppyy--rreeggiioonn--aass--kkiillll *************** *** 677,726 **** word boundaries are the same as bbaacckkwwaarrdd--wwoorrdd. ccooppyy--ffoorrwwaarrdd--wwoorrdd ! Copy the word following point to the kill buffer. The word boundaries are the same as ffoorrwwaarrdd--wwoorrdd. yyaannkk ((CC--yy)) ! Yank the top of the kill ring into the buffer at point. yyaannkk--ppoopp ((MM--yy)) ! Rotate the kill ring, and yank the new top. Only works following yyaannkk or yyaannkk--ppoopp. NNuummeerriicc AArrgguummeennttss ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ......,, MM----)) ! Add this digit to the argument already accumulat- ! ing, or start a new argument. M-- starts a nega- tive argument. uunniivveerrssaall--aarrgguummeenntt ! This is another way to specify an argument. If ! this command is followed by one or more digits, ! optionally with a leading minus sign, those digits define the argument. If the command is followed by digits, executing uunniivveerrssaall--aarrgguummeenntt again ends the ! numeric argument, but is otherwise ignored. As a ! special case, if this command is immediately fol- ! lowed by a character that is neither a digit or minus sign, the argument count for the next command ! is multiplied by four. The argument count is ini- ! tially one, so executing this function the first ! time makes the argument count four, a second time ! makes the argument count sixteen, and so on. ! ! CCoommpplleettiinngg ! ccoommpplleettee ((TTAABB)) ! Attempt to perform completion on the text before ! point. The actual completion performed is applica- ! tion-specific. BBaasshh, for instance, attempts com- ! pletion treating the text as a variable (if the ! text begins with $$), username (if the text begins ! with ~~), hostname (if the text begins with @@), or ! command (including aliases and functions) in turn. ! If none of these produces a match, filename comple- ! tion is attempted. GGddbb, on the other hand, allows ! completion of program functions and variables, and ! only attempts filename completion under certain ! GNU Readline 4.2 2001 Mar 5 11 --- 692,726 ---- word boundaries are the same as bbaacckkwwaarrdd--wwoorrdd. ccooppyy--ffoorrwwaarrdd--wwoorrdd ! Copy the word following point to the kill buffer. The word boundaries are the same as ffoorrwwaarrdd--wwoorrdd. yyaannkk ((CC--yy)) ! Yank the top of the kill ring into the buffer at point. yyaannkk--ppoopp ((MM--yy)) ! Rotate the kill ring, and yank the new top. Only works following yyaannkk or yyaannkk--ppoopp. NNuummeerriicc AArrgguummeennttss ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ......,, MM----)) ! Add this digit to the argument already accumulat- ! ing, or start a new argument. M-- starts a nega- tive argument. uunniivveerrssaall--aarrgguummeenntt ! This is another way to specify an argument. If ! this command is followed by one or more digits, ! optionally with a leading minus sign, those digits define the argument. If the command is followed by digits, executing uunniivveerrssaall--aarrgguummeenntt again ends the ! numeric argument, but is otherwise ignored. As a ! special case, if this command is immediately fol- ! lowed by a character that is neither a digit or minus sign, the argument count for the next command ! is multiplied by four. The argument count is ini- ! tially one, so executing this function the first ! time makes the argument count four, a second time ! GNU Readline 4.2a 2001 October 9 11 *************** *** 731,792 **** circumstances. ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??)) ! List the possible completions of the text before point. iinnsseerrtt--ccoommpplleettiioonnss ((MM--**)) ! Insert all completions of the text before point ! that would have been generated by ppoossssiibbllee--ccoommppllee-- ttiioonnss. mmeennuu--ccoommpplleettee ! Similar to ccoommpplleettee, but replaces the word to be completed with a single match from the list of pos- sible completions. Repeated execution of mmeennuu--ccoomm-- ! pplleettee steps through the list of possible comple- tions, inserting each match in turn. At the end of ! the list of completions, the bell is rung (subject ! to the setting of Bbell-style)) aanndd tthhee oorriiggiinnaall ! tteexxtt iiss rreessttoorreedd.. AAnn aarrgguummeenntt ooff _n mmoovveess _n ppoossii-- ! ttiioonnss ffoorrwwaarrdd iinn tthhee lliisstt ooff mmaattcchheess;; aa nneeggaattiivvee ! aarrgguummeenntt mmaayy bbee uusseedd ttoo mmoovvee bbaacckkwwaarrdd tthhrroouugghh tthhee lliisstt.. TThhiiss ccoommmmaanndd iiss iinntteennddeedd ttoo bbee bboouunndd ttoo TTAABB,, bbuutt iiss uunnbboouunndd bbyy ddeeffaauulltt.. ddeelleettee--cchhaarr--oorr--lliisstt ! Deletes the character under the cursor if not at ! the beginning or end of the line (like ddeelleettee-- ! cchhaarr). If at the end of the line, behaves identi- cally to ppoossssiibbllee--ccoommpplleettiioonnss. KKeeyybbooaarrdd MMaaccrrooss ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (()) ! Begin saving the characters typed into the current keyboard macro. eenndd--kkbbdd--mmaaccrroo ((CC--xx )))) ! Stop saving the characters typed into the current keyboard macro and store the definition. ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee)) Re-execute the last keyboard macro defined, by mak- ! ing the characters in the macro appear as if typed at the keyboard. - MMiisscceellllaanneeoouuss - rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr)) - Read in the contents of the _i_n_p_u_t_r_c file, and - incorporate any bindings or variable assignments - found there. - aabboorrtt ((CC--gg)) - Abort the current editing command and ring the ter- - minal's bell (subject to the setting of - bbeellll--ssttyyllee). - ddoo--uuppppeerrccaassee--vveerrssiioonn ((MM--aa,, MM--bb,, MM--_x,, ......)) - If the metafied character _x is lowercase, run the - command that is bound to the corresponding upper- - case character. - pprreeffiixx--mmeettaa ((EESSCC)) - Metafy the next character typed. EESSCC ff is ! GNU Readline 4.2 2001 Mar 5 12 --- 731,792 ---- + makes the argument count sixteen, and so on. + + CCoommpplleettiinngg + ccoommpplleettee ((TTAABB)) + Attempt to perform completion on the text before + point. The actual completion performed is applica- + tion-specific. BBaasshh, for instance, attempts com- + pletion treating the text as a variable (if the + text begins with $$), username (if the text begins + with ~~), hostname (if the text begins with @@), or + command (including aliases and functions) in turn. + If none of these produces a match, filename comple- + tion is attempted. GGddbb, on the other hand, allows + completion of program functions and variables, and + only attempts filename completion under certain circumstances. ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??)) ! List the possible completions of the text before point. iinnsseerrtt--ccoommpplleettiioonnss ((MM--**)) ! Insert all completions of the text before point ! that would have been generated by ppoossssiibbllee--ccoommppllee-- ttiioonnss. mmeennuu--ccoommpplleettee ! Similar to ccoommpplleettee, but replaces the word to be completed with a single match from the list of pos- sible completions. Repeated execution of mmeennuu--ccoomm-- ! pplleettee steps through the list of possible comple- tions, inserting each match in turn. At the end of ! the list of completions, the bell is rung (subject ! to the setting of Bbell-style)) aanndd tthhee oorriiggiinnaall ! tteexxtt iiss rreessttoorreedd.. AAnn aarrgguummeenntt ooff _n mmoovveess _n ppoossii-- ! ttiioonnss ffoorrwwaarrdd iinn tthhee lliisstt ooff mmaattcchheess;; aa nneeggaattiivvee ! aarrgguummeenntt mmaayy bbee uusseedd ttoo mmoovvee bbaacckkwwaarrdd tthhrroouugghh tthhee lliisstt.. TThhiiss ccoommmmaanndd iiss iinntteennddeedd ttoo bbee bboouunndd ttoo TTAABB,, bbuutt iiss uunnbboouunndd bbyy ddeeffaauulltt.. ddeelleettee--cchhaarr--oorr--lliisstt ! Deletes the character under the cursor if not at ! the beginning or end of the line (like ddeelleettee-- ! cchhaarr). If at the end of the line, behaves identi- cally to ppoossssiibbllee--ccoommpplleettiioonnss. KKeeyybbooaarrdd MMaaccrrooss ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (()) ! Begin saving the characters typed into the current keyboard macro. eenndd--kkbbdd--mmaaccrroo ((CC--xx )))) ! Stop saving the characters typed into the current keyboard macro and store the definition. ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee)) Re-execute the last keyboard macro defined, by mak- ! ing the characters in the macro appear as if typed at the keyboard. ! GNU Readline 4.2a 2001 October 9 12 *************** *** 797,858 **** ! equivalent to MMeettaa--ff. uunnddoo ((CC--__,, CC--xx CC--uu)) ! Incremental undo, separately remembered for each line. rreevveerrtt--lliinnee ((MM--rr)) ! Undo all changes made to this line. This is like ! executing the uunnddoo command enough times to return the line to its initial state. ttiillddee--eexxppaanndd ((MM--&&)) Perform tilde expansion on the current word. sseett--mmaarrkk ((CC--@@,, MM--<>)) ! Set the mark to the point. If a numeric argument is supplied, the mark is set to that position. eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx)) ! Swap the point with the mark. The current cursor ! position is set to the saved position, and the old cursor position is saved as the mark. cchhaarraacctteerr--sseeaarrcchh ((CC--]])) ! A character is read and point is moved to the next ! occurrence of that character. A negative count searches for previous occurrences. cchhaarraacctteerr--sseeaarrcchh--bbaacckkwwaarrdd ((MM--CC--]])) ! A character is read and point is moved to the pre- ! vious occurrence of that character. A negative count searches for subsequent occurrences. iinnsseerrtt--ccoommmmeenntt ((MM--##)) The value of the readline ccoommmmeenntt--bbeeggiinn variable is ! inserted at the beginning of the current line, and ! the line is accepted as if a newline had been ! typed. The default value of ccoommmmeenntt--bbeeggiinn makes the current line a shell comment. dduummpp--ffuunnccttiioonnss ! Print all of the functions and their key bindings ! to the readline output stream. If a numeric argu- ment is supplied, the output is formatted in such a way that it can be made part of an _i_n_p_u_t_r_c file. dduummpp--vvaarriiaabblleess ! Print all of the settable variables and their val- ! ues to the readline output stream. If a numeric ! argument is supplied, the output is formatted in ! such a way that it can be made part of an _i_n_p_u_t_r_c ! file. ! dduummpp--mmaaccrrooss ! Print all of the readline key sequences bound to ! macros and the strings they ouput. If a numeric ! argument is supplied, the output is formatted in ! such a way that it can be made part of an _i_n_p_u_t_r_c ! file. ! eemmaaccss--eeddiittiinngg--mmooddee ((CC--ee)) ! When in vvii editing mode, this causes a switch to ! eemmaaccss editing mode. ! vvii--eeddiittiinngg--mmooddee ((MM--CC--jj)) ! When in eemmaaccss editing mode, this causes a switch to ! vvii editing mode. ! GNU Readline 4.2 2001 Mar 5 13 --- 797,858 ---- ! MMiisscceellllaanneeoouuss ! rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr)) ! Read in the contents of the _i_n_p_u_t_r_c file, and ! incorporate any bindings or variable assignments ! found there. ! aabboorrtt ((CC--gg)) ! Abort the current editing command and ring the ter- ! minal's bell (subject to the setting of ! bbeellll--ssttyyllee). ! ddoo--uuppppeerrccaassee--vveerrssiioonn ((MM--aa,, MM--bb,, MM--_x,, ......)) ! If the metafied character _x is lowercase, run the ! command that is bound to the corresponding upper- ! case character. ! pprreeffiixx--mmeettaa ((EESSCC)) ! Metafy the next character typed. EESSCC ff is equiva- ! lent to MMeettaa--ff. uunnddoo ((CC--__,, CC--xx CC--uu)) ! Incremental undo, separately remembered for each line. rreevveerrtt--lliinnee ((MM--rr)) ! Undo all changes made to this line. This is like ! executing the uunnddoo command enough times to return the line to its initial state. ttiillddee--eexxppaanndd ((MM--&&)) Perform tilde expansion on the current word. sseett--mmaarrkk ((CC--@@,, MM--<>)) ! Set the mark to the point. If a numeric argument is supplied, the mark is set to that position. eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx)) ! Swap the point with the mark. The current cursor ! position is set to the saved position, and the old cursor position is saved as the mark. cchhaarraacctteerr--sseeaarrcchh ((CC--]])) ! A character is read and point is moved to the next ! occurrence of that character. A negative count searches for previous occurrences. cchhaarraacctteerr--sseeaarrcchh--bbaacckkwwaarrdd ((MM--CC--]])) ! A character is read and point is moved to the pre- ! vious occurrence of that character. A negative count searches for subsequent occurrences. iinnsseerrtt--ccoommmmeenntt ((MM--##)) The value of the readline ccoommmmeenntt--bbeeggiinn variable is ! inserted at the beginning of the current line, and ! the line is accepted as if a newline had been ! typed. The default value of ccoommmmeenntt--bbeeggiinn makes the current line a shell comment. dduummpp--ffuunnccttiioonnss ! Print all of the functions and their key bindings ! to the readline output stream. If a numeric argu- ment is supplied, the output is formatted in such a way that it can be made part of an _i_n_p_u_t_r_c file. dduummpp--vvaarriiaabblleess ! Print all of the settable variables and their val- ! ues to the readline output stream. If a numeric ! GNU Readline 4.2a 2001 October 9 13 *************** *** 863,881 **** DDEEFFAAUULLTT KKEEYY BBIINNDDIINNGGSS ! The following is a list of the default emacs and vi bind- ! ings. Characters with the eighth bit set are written as M-, and are referred to as _m_e_t_a_f_i_e_d characters. ! The printable ASCII characters not mentioned in the list ! of emacs standard bindings are bound to the sseellff--iinnsseerrtt ! function, which just inserts the given character into the ! input line. In vi insertion mode, all characters not ! specifically mentioned are bound to sseellff--iinnsseerrtt. Charac- ! ters assigned to signal generation by _s_t_t_y(1) or the ter- ! minal driver, such as C-Z or C-C, retain that function. ! Upper and lower case metafied characters are bound to the ! same function in the emacs mode meta keymap. The remain- ! ing characters are unbound, which causes readline to ring ! the bell (subject to the setting of the bbeellll--ssttyyllee vari- able). --- 863,897 ---- + argument is supplied, the output is formatted in + such a way that it can be made part of an _i_n_p_u_t_r_c + file. + dduummpp--mmaaccrrooss + Print all of the readline key sequences bound to + macros and the strings they ouput. If a numeric + argument is supplied, the output is formatted in + such a way that it can be made part of an _i_n_p_u_t_r_c + file. + eemmaaccss--eeddiittiinngg--mmooddee ((CC--ee)) + When in vvii editing mode, this causes a switch to + eemmaaccss editing mode. + vvii--eeddiittiinngg--mmooddee ((MM--CC--jj)) + When in eemmaaccss editing mode, this causes a switch to + vvii editing mode. + DDEEFFAAUULLTT KKEEYY BBIINNDDIINNGGSS ! The following is a list of the default emacs and vi bind- ! ings. Characters with the eighth bit set are written as M-, and are referred to as _m_e_t_a_f_i_e_d characters. ! The printable ASCII characters not mentioned in the list ! of emacs standard bindings are bound to the sseellff--iinnsseerrtt ! function, which just inserts the given character into the ! input line. In vi insertion mode, all characters not ! specifically mentioned are bound to sseellff--iinnsseerrtt. Charac- ! ters assigned to signal generation by _s_t_t_y(1) or the ter- ! minal driver, such as C-Z or C-C, retain that function. ! Upper and lower case metafied characters are bound to the ! same function in the emacs mode meta keymap. The remain- ! ing characters are unbound, which causes readline to ring ! the bell (subject to the setting of the bbeellll--ssttyyllee vari- able). *************** *** 901,904 **** --- 917,932 ---- "C-R" reverse-search-history "C-S" forward-search-history + + + + GNU Readline 4.2a 2001 October 9 14 + + + + + + READLINE(3) READLINE(3) + + "C-T" transpose-chars "C-U" unix-line-discard *************** *** 917,932 **** "M-C-G" abort "M-C-H" backward-kill-word - - - - GNU Readline 4.2 2001 Mar 5 14 - - - - - - READLINE(3) READLINE(3) - - "M-C-I" tab-insert "M-C-J" vi-editing-mode --- 945,948 ---- *************** *** 967,970 **** --- 983,998 ---- "M-U" upcase-word "M-Y" yank-pop + + + + GNU Readline 4.2a 2001 October 9 15 + + + + + + READLINE(3) READLINE(3) + + "M-\" delete-horizontal-space "M-~" tilde-expand *************** *** 984,998 **** - - - GNU Readline 4.2 2001 Mar 5 15 - - - - - - READLINE(3) READLINE(3) - - VVII MMooddee bbiinnddiinnggss VI Insert Mode functions --- 1012,1015 ---- *************** *** 1032,1035 **** --- 1049,1064 ---- "C-T" transpose-chars "C-U" unix-line-discard + + + + GNU Readline 4.2a 2001 October 9 16 + + + + + + READLINE(3) READLINE(3) + + "C-V" quoted-insert "C-W" unix-word-rubout *************** *** 1049,1064 **** "0" beginning-of-line "1" to "9" vi-arg-digit - - - - GNU Readline 4.2 2001 Mar 5 16 - - - - - - READLINE(3) READLINE(3) - - ";" vi-char-search "=" vi-complete --- 1078,1081 ---- *************** *** 1098,1101 **** --- 1115,1130 ---- "m" vi-set-mark "n" vi-search-again + + + + GNU Readline 4.2a 2001 October 9 17 + + + + + + READLINE(3) READLINE(3) + + "p" vi-put "r" vi-change-char *************** *** 1114,1130 **** _b_a_s_h(1) - - - - - GNU Readline 4.2 2001 Mar 5 17 - - - - - - READLINE(3) READLINE(3) - - FFIILLEESS _~_/_._i_n_p_u_t_r_c --- 1143,1146 ---- *************** *** 1139,1155 **** BBUUGG RREEPPOORRTTSS ! If you find a bug in rreeaaddlliinnee,, you should report it. But ! first, you should make sure that it really is a bug, and ! that it appears in the latest version of the rreeaaddlliinnee library that you have. ! Once you have determined that a bug actually exists, mail ! a bug report to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g. If you have a fix, ! you are welcome to mail that as well! Suggestions and ! `philosophical' bug reports may be mailed to _b_u_g_-_r_e_a_d_- _l_i_n_e@_g_n_u_._o_r_g or posted to the Usenet newsgroup ggnnuu..bbaasshh..bbuugg. ! Comments and bug reports concerning this manual page should be directed to _c_h_e_t_@_i_n_s_._C_W_R_U_._E_d_u. --- 1155,1171 ---- BBUUGG RREEPPOORRTTSS ! If you find a bug in rreeaaddlliinnee,, you should report it. But ! first, you should make sure that it really is a bug, and ! that it appears in the latest version of the rreeaaddlliinnee library that you have. ! Once you have determined that a bug actually exists, mail ! a bug report to _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g. If you have a fix, ! you are welcome to mail that as well! Suggestions and ! `philosophical' bug reports may be mailed to _b_u_g_-_r_e_a_d_- _l_i_n_e@_g_n_u_._o_r_g or posted to the Usenet newsgroup ggnnuu..bbaasshh..bbuugg. ! Comments and bug reports concerning this manual page should be directed to _c_h_e_t_@_i_n_s_._C_W_R_U_._E_d_u. *************** *** 1168,1188 **** ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! GNU Readline 4.2 2001 Mar 5 18 --- 1184,1188 ---- ! GNU Readline 4.2a 2001 October 9 18 diff -Nrc2 readline-4.2/doc/readline.3 readline-4.2a/doc/readline.3 *** readline-4.2/doc/readline.3 Mon Mar 5 11:11:38 2001 --- readline-4.2a/doc/readline.3 Tue Oct 9 15:06:09 2001 *************** *** 7,13 **** .\" chet@ins.CWRU.Edu .\" ! .\" Last Change: Mon Mar 5 09:58:38 EST 2001 .\" ! .TH READLINE 3 "2001 Mar 5" "GNU Readline 4.2" .\" .\" File Name macro. This used to be `.PN', for Path Name, --- 7,13 ---- .\" chet@ins.CWRU.Edu .\" ! .\" Last Change: Tue Oct 9 15:06:03 EDT 2001 .\" ! .TH READLINE 3 "2001 October 9" "GNU Readline 4.2a" .\" .\" File Name macro. This used to be `.PN', for Path Name, *************** *** 283,292 **** .TP .B \e\fInnn\fP ! the character whose ASCII code is the octal value \fInnn\fP (one to three digits) .TP ! .B \ex\fInnn\fP ! the character whose ASCII code is the hexadecimal value \fInnn\fP ! (one to three digits) .RE .PD --- 283,292 ---- .TP .B \e\fInnn\fP ! the eight-bit character whose value is the octal value \fInnn\fP (one to three digits) .TP ! .B \ex\fIHH\fP ! the eight-bit character whose value is the hexadecimal value \fIHH\fP ! (one or two hex digits) .RE .PD *************** *** 392,395 **** --- 392,400 ---- attempts word completion. .TP + .B history-preserve-point + If set to \fBon\fP, the history code attempts to place point at the + same location on each history line retrived with \fBprevious-history\fP + or \fBnext-history\fP. + .TP .B horizontal\-scroll\-mode (Off) When set to \fBOn\fP, makes readline use a single line for display, *************** *** 430,433 **** --- 435,444 ---- with a preceding asterisk (\fB*\fP). .TP + .B match\-hidden\-files (On) + This variable, when set to \fBOn\fP, causes readline to match files whose + names begin with a `.' (hidden files) when performing filename + completion, unless the leading `.' is + supplied by the user in the filename to be completed. + .TP .B output\-meta (Off) If set to \fBOn\fP, readline will display characters with the *************** *** 711,714 **** --- 722,727 ---- Drag the word before point past the word after point, moving point over that word as well. + If point is at the end of the line, this transposes + the last two words on the line. .TP .B upcase\-word (M\-u) Binary files readline-4.2/doc/readline.dvi and readline-4.2a/doc/readline.dvi differ diff -Nrc2 readline-4.2/doc/readline.html readline-4.2a/doc/readline.html *** readline-4.2/doc/readline.html Mon Apr 16 11:05:45 2001 --- readline-4.2a/doc/readline.html Tue Oct 9 15:08:10 2001 *************** *** 1,161 **** ! - GNU Readline Library - -

    GNU Readline Library

    -

    Edition 4.2, for Readline Library Version 4.2.

    -

    Apr 2001

    -
    Brian Fox, Free Software Foundation
    -
    Chet Ramey, Case Western Reserve University
    -

    -


    -

    Table of Contents

    - -


    !

    This document describes the GNU Readline Library, a utility which aids in the consistency of user interface across discrete programs that need to provide a command line interface. !

    !

    ! Published by the Free Software Foundation
    ! 59 Temple Place, Suite 330,
    ! Boston, MA 02111 USA ! !

    !

    ! Permission is granted to make and distribute verbatim copies of ! this manual provided the copyright notice and this permission notice ! are preserved on all copies. ! !

    !

    ! Permission is granted to copy and distribute modified versions of this ! manual under the conditions for verbatim copying, provided that the entire ! resulting derived work is distributed under the terms of a permission ! notice identical to this one. ! !

    !

    ! Permission is granted to copy and distribute translations of this manual ! into another language, under the above conditions for modified versions, ! except that this permission notice may be stated in a translation approved ! by the Free Software Foundation. ! !

    - Copyright (C) 1988-2001 Free Software Foundation, Inc. - -

    - - -

    Command Line Editing

    - -

    This chapter describes the basic features of the GNU command line editing interface. !

    ! ! ! ! ! !

    Introduction to Line Editing

    !

    The following paragraphs describe the notation used to represent keystrokes. -

    -

    The text C-k is read as `Control-K' and describes the character produced when the k key is pressed while the Control key is depressed. -

    -

    The text M-k is read as `Meta-K' and describes the character produced when the Meta key (if you have one) is depressed, and the k --- 1,110 ---- + + + ! GNU Readline Library: ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
    [Top][Contents][Index][ ? ]
    !

    GNU Readline Library

    ! This document describes the GNU Readline Library, a utility which aids in the consistency of user interface across discrete programs that need to provide a command line interface. +

    !

    ! ! ! ! !
    1. Command Line Editing  GNU Readline User's Manual.
    2. Programming with GNU Readline  GNU Readline Programmer's Manual.
    Concept Index  Index of concepts described in this manual.
    Function and Variable Index  Index of externally visible functions ! and variables.
    !

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    ! !

    1. Command Line Editing

    !

    This chapter describes the basic features of the GNU command line editing interface. +

    !

    ! ! ! ! ! !
    1.1 Introduction to Line Editing  Notation used in this text.
    1.2 Readline Interaction  The minimum set of commands for editing a line.
    1.3 Readline Init File  Customizing Readline from a user's view.
    1.4 Bindable Readline Commands  A description of most of the Readline commands ! available for binding
    1.5 Readline vi Mode  A short description of how to make Readline ! behave like the vi editor.
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.1 Introduction to Line Editing

    !

    + The following paragraphs describe the notation used to represent keystrokes. +

    The text C-k is read as `Control-K' and describes the character produced when the k key is pressed while the Control key is depressed. +

    The text M-k is read as `Meta-K' and describes the character produced when the Meta key (if you have one) is depressed, and the k *************** *** 168,204 **** Meta key or may be configured as some other modifier, such as a Compose key for typing accented characters. -

    -

    If you do not have a Meta or ALT key, or another key working as a Meta key, the identical keystroke can be generated by typing ESC first, and then typing k. Either process is known as metafying the k key. -

    -

    The text M-C-k is read as `Meta-Control-k' and describes the character produced by metafying C-k. -

    -

    In addition, several keys have their own names. Specifically, DEL, ESC, LFD, SPC, RET, and TAB all stand for themselves when seen in this text, or in an init file ! (see section Readline Init File). If your keyboard lacks a LFD key, typing C-j will produce the desired character. The RET key may be labeled Return or Enter on some keyboards. !

    ! ! !

    Readline Interaction

    - -

    -

    Often during an interactive session you type in a long line of text, only to notice that the first word on the line is misspelled. The --- 117,160 ---- Meta key or may be configured as some other modifier, such as a Compose key for typing accented characters. +

    If you do not have a Meta or ALT key, or another key working as a Meta key, the identical keystroke can be generated by typing ESC first, and then typing k. Either process is known as metafying the k key. +

    The text M-C-k is read as `Meta-Control-k' and describes the character produced by metafying C-k. +

    In addition, several keys have their own names. Specifically, DEL, ESC, LFD, SPC, RET, and TAB all stand for themselves when seen in this text, or in an init file ! (see section 1.3 Readline Init File). If your keyboard lacks a LFD key, typing C-j will produce the desired character. The RET key may be labeled Return or Enter on some keyboards. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.2 Readline Interaction

    !

    Often during an interactive session you type in a long line of text, only to notice that the first word on the line is misspelled. The *************** *** 211,242 **** end of the line to press RET; the entire line is accepted regardless of the location of the cursor within the line. !

    ! ! ! ! ! !

    Readline Bare Essentials

    - - - -

    -

    In order to enter characters into the line, simply type them. The typed character appears where the cursor was, and then the cursor moves one space to the right. If you mistype a character, you can use your erase character to back up and delete the mistyped character. -

    -

    Sometimes you may mistype a character, and not notice the error until you have typed several other characters. In --- 167,205 ---- end of the line to press RET; the entire line is accepted regardless of the location of the cursor within the line. +

    !

    ! ! ! ! ! !
    1.2.1 Readline Bare Essentials  The least you need to know about Readline.
    1.2.2 Readline Movement Commands  Moving about the input line.
    1.2.3 Readline Killing Commands  How to delete text, and how to get it back!
    1.2.4 Readline Arguments  Giving numeric arguments to commands.
    1.2.5 Searching for Commands in the History  Searching through previous lines.
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.2.1 Readline Bare Essentials

    !

    In order to enter characters into the line, simply type them. The typed character appears where the cursor was, and then the cursor moves one space to the right. If you mistype a character, you can use your erase character to back up and delete the mistyped character. +

    Sometimes you may mistype a character, and not notice the error until you have typed several other characters. In *************** *** 244,250 **** correct your mistake. Afterwards, you can move the cursor to the right with C-f. -

    -

    When you add text in the middle of a line, you will notice that characters to the right of the cursor are `pushed over' to make room for the text --- 207,212 ---- correct your mistake. Afterwards, you can move the cursor to the right with C-f. +

    When you add text in the middle of a line, you will notice that characters to the right of the cursor are `pushed over' to make room for the text *************** *** 253,293 **** blank space created by the removal of the text. A list of the bare essentials for editing the text of an input line follows. -

    -
    C-b !
    ! Move back one character.
    C-f !
    ! Move forward one character.
    DEL or Backspace !
    ! Delete the character to the left of the cursor.
    C-d !
    ! Delete the character underneath the cursor.
    Printing characters !
    ! Insert the character into the line at the cursor.
    C-_ or C-x C-u !
    ! Undo the last editing command. You can undo all the way back to an empty line.
    -

    (Depending on your configuration, the Backspace key be set to delete the character to the left of the cursor and the DEL key set to delete the character underneath the cursor, like C-d, rather than the character to the left of the cursor.) !

    ! ! !

    Readline Movement Commands

    !

    The above table describes the most basic keystrokes that you need in order to do editing of the input line. For your convenience, many --- 215,261 ---- blank space created by the removal of the text. A list of the bare essentials for editing the text of an input line follows. +

    C-b !
    Move back one character.
    C-f !
    Move forward one character.
    DEL or Backspace !
    Delete the character to the left of the cursor.
    C-d !
    Delete the character underneath the cursor.
    Printing characters !
    Insert the character into the line at the cursor.
    C-_ or C-x C-u !
    Undo the last editing command. You can undo all the way back to an empty line.

    + (Depending on your configuration, the Backspace key be set to delete the character to the left of the cursor and the DEL key set to delete the character underneath the cursor, like C-d, rather than the character to the left of the cursor.) +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.2.2 Readline Movement Commands

    !

    + The above table describes the most basic keystrokes that you need in order to do editing of the input line. For your convenience, many *************** *** 295,348 **** C-d, and DEL. Here are some commands for moving more rapidly about the line. -

    -
    C-a !
    ! Move to the start of the line.
    C-e !
    ! Move to the end of the line.
    M-f !
    ! Move forward a word, where a word is composed of letters and digits.
    M-b !
    ! Move backward a word.
    C-l !
    ! Clear the screen, reprinting the current line at the top.
    -

    Notice how C-f moves forward a character, while M-f moves forward a word. It is a loose convention that control keystrokes operate on characters while meta keystrokes operate on words. !

    ! ! !

    Readline Killing Commands

    !

    - - !

    !

    Killing text means to delete the text from the line, but to save it away for later use, usually by yanking (re-inserting) it back into the line. (`Cut' and `paste' are more recent jargon for `kill' and `yank'.) -

    -

    If the description for a command says that it `kills' text, then you can be sure that you can get the text back in a different (or the same) place later. -

    -

    When you use a kill command, the text is saved in a kill-ring. Any number of consecutive kills save all of the killed text together, so --- 263,320 ---- C-d, and DEL. Here are some commands for moving more rapidly about the line. +

    C-a !
    Move to the start of the line.
    C-e !
    Move to the end of the line.
    M-f !
    Move forward a word, where a word is composed of letters and digits.
    M-b !
    Move backward a word.
    C-l !
    Clear the screen, reprinting the current line at the top.

    + Notice how C-f moves forward a character, while M-f moves forward a word. It is a loose convention that control keystrokes operate on characters while meta keystrokes operate on words. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.2.3 Readline Killing Commands

    !

    ! ! !

    ! Killing text means to delete the text from the line, but to save it away for later use, usually by yanking (re-inserting) it back into the line. (`Cut' and `paste' are more recent jargon for `kill' and `yank'.) +

    If the description for a command says that it `kills' text, then you can be sure that you can get the text back in a different (or the same) place later. +

    When you use a kill command, the text is saved in a kill-ring. Any number of consecutive kills save all of the killed text together, so *************** *** 351,408 **** typed line is available to be yanked back later, when you are typing another line. ! -

    -

    Here is the list of commands for killing text. -

    -
    C-k !
    ! Kill the text from the current cursor position to the end of the line.
    M-d !
    ! Kill from the cursor to the end of the current word, or, if between words, to the end of the next word. Word boundaries are the same as those used by M-f.
    M-DEL !
    ! Kill from the cursor the start of the previous word, or, if between words, to the start of the previous word. Word boundaries are the same as those used by M-b.
    C-w !
    ! Kill from the cursor to the previous whitespace. This is different than M-DEL because the word boundaries differ.
    -

    Here is how to yank the text back into the line. Yanking means to copy the most-recently-killed text from the kill buffer. -

    -
    C-y !
    ! Yank the most recently killed text back into the buffer at the cursor.
    M-y !
    ! Rotate the kill-ring, and yank the new top. You can only do this if the prior command is C-y or M-y.
    ! ! !

    Readline Arguments

    !

    You can pass numeric arguments to Readline commands. Sometimes the argument acts as a repeat count, other times it is the sign of the --- 323,390 ---- typed line is available to be yanked back later, when you are typing another line. ! !

    Here is the list of commands for killing text. +

    C-k !
    Kill the text from the current cursor position to the end of the line. !

    M-d !
    Kill from the cursor to the end of the current word, or, if between words, to the end of the next word. Word boundaries are the same as those used by M-f. +

    M-DEL !
    Kill from the cursor the start of the current word, or, if between words, to the start of the previous word. Word boundaries are the same as those used by M-b. +

    C-w !
    Kill from the cursor to the previous whitespace. This is different than M-DEL because the word boundaries differ. +

    + Here is how to yank the text back into the line. Yanking means to copy the most-recently-killed text from the kill buffer. +

    C-y !
    Yank the most recently killed text back into the buffer at the cursor. !

    M-y !
    Rotate the kill-ring, and yank the new top. You can only do this if the prior command is C-y or M-y.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.2.4 Readline Arguments

    !

    + You can pass numeric arguments to Readline commands. Sometimes the argument acts as a repeat count, other times it is the sign of the *************** *** 411,417 **** act in a backward direction. For example, to kill text back to the start of the line, you might type `M-- C-k'. -

    -

    The general way to pass numeric arguments to a command is to type meta digits before the command. If the first `digit' typed is a minus --- 393,398 ---- act in a backward direction. For example, to kill text back to the start of the line, you might type `M-- C-k'. +

    The general way to pass numeric arguments to a command is to type meta digits before the command. If the first `digit' typed is a minus *************** *** 421,437 **** the C-d command an argument of 10, you could type `M-1 0 C-d', which will delete the next ten characters on the input line. !

    ! ! !

    Searching for Commands in the History

    !

    Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: incremental and non-incremental. -

    -

    Incremental searches begin before the user has finished typing the search string. --- 402,430 ---- the C-d command an argument of 10, you could type `M-1 0 C-d', which will delete the next ten characters on the input line. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.2.5 Searching for Commands in the History

    !

    + Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: incremental and non-incremental. +

    Incremental searches begin before the user has finished typing the search string. *************** *** 449,455 **** When the search is terminated, the history entry containing the search string becomes the current line. -

    -

    To find other matching entries in the history list, type C-r or C-s as appropriate. --- 442,447 ---- When the search is terminated, the history entry containing the search string becomes the current line. +

    To find other matching entries in the history list, type C-r or C-s as appropriate. *************** *** 462,481 **** A movement command will terminate the search, make the last line found the current line, and begin editing. -

    -

    Non-incremental searches read the entire search string before starting to search for matching history lines. The search string may be typed by the user or be part of the contents of the current line. !

    ! ! !

    Readline Init File

    - -

    -

    Although the Readline library comes with a set of Emacs-like keybindings installed by default, it is possible to use a different set --- 454,487 ---- A movement command will terminate the search, make the last line found the current line, and begin editing. +

    + + Readline remembers the last incremental search string. If two + C-rs are typed without any intervening characters defining a new + search string, any remembered search string is used. +

    Non-incremental searches read the entire search string before starting to search for matching history lines. The search string may be typed by the user or be part of the contents of the current line. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.3 Readline Init File

    !

    Although the Readline library comes with a set of Emacs-like keybindings installed by default, it is possible to use a different set *************** *** 484,558 **** commands in an inputrc file, conventionally in his home directory. The name of this ! file is taken from the value of the environment variable @env{INPUTRC}. If that variable is unset, the default is `~/.inputrc'. -

    -

    When a program which uses the Readline library starts up, the init file is read, and the key bindings are set. -

    -

    In addition, the C-x C-r command re-reads this init file, thus incorporating any changes that you might have made to it. !

    ! ! ! ! ! !

    Readline Init File Syntax

    !

    There are only a few basic constructs allowed in the Readline init file. Blank lines are ignored. Lines beginning with a `#' are comments. Lines beginning with a `$' indicate conditional ! constructs (see section Conditional Init Constructs). Other lines denote variable settings and key bindings. -

    -
    Variable Settings !
    ! You can modify the run-time behavior of Readline by altering the values of variables in Readline using the set command within the init file. The syntax is simple: ! !
    ! set variable value
    ! 
    Here, for example, is how to change from the default Emacs-like key binding to use vi line editing commands: ! !
    ! set editing-mode vi
    ! 
    Variable names and values, where appropriate, are recognized without regard to case. A great deal of run-time behavior is changeable with the following variables. !
    bell-style !
    ! Controls what happens when Readline wants to ring the terminal bell. If set to `none', Readline never rings the bell. If set to --- 490,578 ---- commands in an inputrc file, conventionally in his home directory. The name of this ! file is taken from the value of the environment variable INPUTRC. If that variable is unset, the default is `~/.inputrc'. +

    When a program which uses the Readline library starts up, the init file is read, and the key bindings are set. +

    In addition, the C-x C-r command re-reads this init file, thus incorporating any changes that you might have made to it. +

    !

    ! !
    1.3.1 Readline Init File Syntax  Syntax for the commands in the inputrc file.
    ! !
    ! ! !
    1.3.2 Conditional Init Constructs  Conditional key bindings in the inputrc file.
    ! !
    ! ! !
    1.3.3 Sample Init File  An example inputrc file.
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.3.1 Readline Init File Syntax

    !

    + There are only a few basic constructs allowed in the Readline init file. Blank lines are ignored. Lines beginning with a `#' are comments. Lines beginning with a `$' indicate conditional ! constructs (see section 1.3.2 Conditional Init Constructs). Other lines denote variable settings and key bindings. +

    Variable Settings !
    You can modify the run-time behavior of Readline by altering the values of variables in Readline using the set command within the init file. The syntax is simple: +

    !
     
    set variable value
    ! 

    Here, for example, is how to change from the default Emacs-like key binding to use vi line editing commands: +

    !
     
    set editing-mode vi
    ! 

    Variable names and values, where appropriate, are recognized without regard to case. +

    A great deal of run-time behavior is changeable with the following variables. +

    !

    bell-style !
    Controls what happens when Readline wants to ring the terminal bell. If set to `none', Readline never rings the bell. If set to *************** *** 560,580 **** If set to `audible' (the default), Readline attempts to ring the terminal's bell.
    comment-begin !
    ! The string to insert at the beginning of the line when the insert-comment command is executed. The default value is "#".
    completion-ignore-case !
    ! If set to `on', Readline performs filename matching and completion in a case-insensitive fashion. The default value is `off'.
    completion-query-items !
    ! The number of possible completions that determines when the user is asked whether he wants to see the list of possibilities. If the --- 580,600 ---- If set to `audible' (the default), Readline attempts to ring the terminal's bell. +

    comment-begin !
    The string to insert at the beginning of the line when the insert-comment command is executed. The default value is "#". +

    completion-ignore-case !
    If set to `on', Readline performs filename matching and completion in a case-insensitive fashion. The default value is `off'. +

    completion-query-items !
    The number of possible completions that determines when the user is asked whether he wants to see the list of possibilities. If the *************** *** 584,627 **** This variable must be set to an integer value greater than or equal to 0. The default limit is 100.
    convert-meta !
    ! If set to `on', Readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing an ESC character, converting them to a meta-prefixed key sequence. The default value is `on'.
    disable-completion !
    ! If set to `On', Readline will inhibit word completion. Completion characters will be inserted into the line as if they had been mapped to self-insert. The default is `off'.
    editing-mode !
    ! The editing-mode variable controls which default set of key bindings is used. By default, Readline starts up in Emacs editing mode, where the keystrokes are most similar to Emacs. This variable can be set to either `emacs' or `vi'.
    enable-keypad !
    ! When set to `on', Readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys. The default is `off'.
    expand-tilde !
    ! If set to `on', tilde expansion is performed when Readline attempts word completion. The default is `off'.
    horizontal-scroll-mode !
    ! This variable can be set to either `on' or `off'. Setting it to `on' means that the text of the lines being edited will scroll --- 604,653 ---- This variable must be set to an integer value greater than or equal to 0. The default limit is 100. +

    convert-meta !
    If set to `on', Readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth bit and prefixing an ESC character, converting them to a meta-prefixed key sequence. The default value is `on'. +

    disable-completion !
    If set to `On', Readline will inhibit word completion. Completion characters will be inserted into the line as if they had been mapped to self-insert. The default is `off'. +

    editing-mode !
    The editing-mode variable controls which default set of key bindings is used. By default, Readline starts up in Emacs editing mode, where the keystrokes are most similar to Emacs. This variable can be set to either `emacs' or `vi'. +

    enable-keypad !
    When set to `on', Readline will try to enable the application keypad when it is called. Some systems need this to enable the arrow keys. The default is `off'. +

    expand-tilde !
    If set to `on', tilde expansion is performed when Readline attempts word completion. The default is `off'. +

    + + + If set to `on', the history code attempts to place point at the + same location on each history line retrived with previous-history + or next-history. +

    horizontal-scroll-mode !
    This variable can be set to either `on' or `off'. Setting it to `on' means that the text of the lines being edited will scroll *************** *** 629,637 **** of the screen, instead of wrapping onto a new screen line. By default, this variable is set to `off'.
    input-meta !
    ! ! If set to `on', Readline will enable eight-bit input (it will not clear the eighth bit in the characters it reads), --- 655,663 ---- of the screen, instead of wrapping onto a new screen line. By default, this variable is set to `off'. +

    input-meta !
    ! If set to `on', Readline will enable eight-bit input (it will not clear the eighth bit in the characters it reads), *************** *** 639,654 **** default value is `off'. The name meta-flag is a synonym for this variable.
    isearch-terminators !
    ! The string of characters that should terminate an incremental search without ! subsequently executing the character as a command (see section Searching for Commands in the History). If this variable has not been given a value, the characters ESC and C-J will terminate an incremental search.
    keymap !
    ! Sets Readline's idea of the current keymap for key binding commands. Acceptable keymap names are --- 665,680 ---- default value is `off'. The name meta-flag is a synonym for this variable. +

    isearch-terminators !
    The string of characters that should terminate an incremental search without ! subsequently executing the character as a command (see section 1.2.5 Searching for Commands in the History). If this variable has not been given a value, the characters ESC and C-J will terminate an incremental search. +

    keymap !
    Sets Readline's idea of the current keymap for key binding commands. Acceptable keymap names are *************** *** 665,697 **** The value of the editing-mode variable also affects the default keymap.
    mark-directories !
    ! If set to `on', completed directory names have a slash appended. The default is `on'.
    mark-modified-lines !
    ! This variable, when set to `on', causes Readline to display an asterisk (`*') at the start of history lines which have been modified. This variable is `off' by default.
    output-meta !
    ! If set to `on', Readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. The default is `off'.
    print-completions-horizontally !
    ! If set to `on', Readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen. The default is `off'.
    show-all-if-ambiguous !
    ! This alters the default behavior of the completion functions. If set to `on', --- 691,732 ---- The value of the editing-mode variable also affects the default keymap. +

    mark-directories !
    If set to `on', completed directory names have a slash appended. The default is `on'. +

    mark-modified-lines !
    This variable, when set to `on', causes Readline to display an asterisk (`*') at the start of history lines which have been modified. This variable is `off' by default. +

    + +

    match-hidden-files +
    + This variable, when set to `on', causes Readline to match files whose + names begin with a `.' (hidden files) when performing filename + completion, unless the leading `.' is + supplied by the user in the filename to be completed. + This variable is `on' by default. +

    output-meta !
    If set to `on', Readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape sequence. The default is `off'. +

    print-completions-horizontally !
    If set to `on', Readline will display completions with matches sorted horizontally in alphabetical order, rather than down the screen. The default is `off'. +

    show-all-if-ambiguous !
    This alters the default behavior of the completion functions. If set to `on', *************** *** 699,719 **** matches to be listed immediately instead of ringing the bell. The default value is `off'.
    visible-stats !
    ! If set to `on', a character denoting a file's type is appended to the filename when listing possible completions. The default is `off'.
    Key Bindings !
    ! The syntax for controlling key bindings in the init file is simple. First you need to find the name of the command that you want to change. The following sections contain tables of the command name, the default keybinding, if any, and a short description of what the command does. Once you know the name of the command, simply place on a line --- 734,756 ---- matches to be listed immediately instead of ringing the bell. The default value is `off'. +

    visible-stats !
    If set to `on', a character denoting a file's type is appended to the filename when listing possible completions. The default is `off'. +

    +

    Key Bindings !
    The syntax for controlling key bindings in the init file is simple. First you need to find the name of the command that you want to change. The following sections contain tables of the command name, the default keybinding, if any, and a short description of what the command does. +

    Once you know the name of the command, simply place on a line *************** *** 723,741 **** can be expressed in different ways, depending on what you find most comfortable. In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a macro).

    -
    keyname: function-name or macro !
    ! keyname is the name of a key spelled out in English. For example: ! !
    ! Control-u: universal-argument
      Meta-Rubout: backward-kill-word
      Control-o: "> output"
    ! 
    In the above example, C-u is bound to the function --- 760,776 ---- can be expressed in different ways, depending on what you find most comfortable. +

    In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a macro). +

    keyname: function-name or macro !
    keyname is the name of a key spelled out in English. For example: !
     
    Control-u: universal-argument
      Meta-Rubout: backward-kill-word
      Control-o: "> output"
    ! 

    In the above example, C-u is bound to the function *************** *** 745,748 **** --- 780,784 ---- expressed on the right hand side (that is, to insert the text `> output' into the line). +

    A number of symbolic character names are recognized while *************** *** 760,778 **** and TAB.

    "keyseq": function-name or macro !
    ! keyseq differs from keyname above in that strings denoting an entire key sequence can be specified, by placing the key sequence in double quotes. Some GNU Emacs style key escapes can be used, as in the following example, but the special character names are not recognized. ! !
    ! "\C-u": universal-argument
      "\C-x\C-r": re-read-init-file
      "\e[11~": "Function Key 1"
    ! 
    In the above example, C-u is again bound to the function --- 796,813 ---- and TAB. +

    "keyseq": function-name or macro !
    keyseq differs from keyname above in that strings denoting an entire key sequence can be specified, by placing the key sequence in double quotes. Some GNU Emacs style key escapes can be used, as in the following example, but the special character names are not recognized. +

    !
     
    "\C-u": universal-argument
      "\C-x\C-r": re-read-init-file
      "\e[11~": "Function Key 1"
    ! 

    In the above example, C-u is again bound to the function *************** *** 781,850 **** and `ESC [ 1 1 ~' is bound to insert the text `Function Key 1'.

    The following GNU Emacs style escape sequences are available when specifying key sequences:
    -
    \C- !
    ! control prefix
    \M- !
    ! meta prefix
    \e !
    ! an escape character
    \\ !
    ! backslash
    \" !
    ! ", a double quotation mark
    \' !
    ! ', a single quote or apostrophe
    In addition to the GNU Emacs style escape sequences, a second set of backslash escapes is available:
    -
    \a !
    ! alert (bell)
    \b !
    ! backspace
    \d !
    ! delete
    \f !
    ! form feed
    \n !
    ! newline
    \r !
    ! carriage return
    \t !
    ! horizontal tab
    \v !
    ! vertical tab
    \nnn !
    ! the character whose ASCII code is the octal value nnn ! (one to three digits) !
    \xnnn !
    ! the character whose ASCII code is the hexadecimal value nnn (one to three digits)
    When entering the text of a macro, single or double quotes must --- 816,873 ---- and `ESC [ 1 1 ~' is bound to insert the text `Function Key 1'. +

    +

    The following GNU Emacs style escape sequences are available when specifying key sequences: +

    \C- !
    control prefix
    \M- !
    meta prefix
    \e !
    an escape character
    \\ !
    backslash
    \" !
    ", a double quotation mark
    \' !
    ', a single quote or apostrophe
    +

    In addition to the GNU Emacs style escape sequences, a second set of backslash escapes is available: +

    \a !
    alert (bell)
    \b !
    backspace
    \d !
    delete
    \f !
    form feed
    \n !
    newline
    \r !
    carriage return
    \t !
    horizontal tab
    \v !
    vertical tab
    \nnn !
    the eight-bit character whose value is the octal value nnn (one to three digits) +
    \xHH +
    the eight-bit character whose value is the hexadecimal value HH + (one or two hex digits)
    +

    When entering the text of a macro, single or double quotes must *************** *** 856,891 **** For example, the following binding will make `C-x \' insert a single `\' into the line: ! !

    ! "\C-x\\": "\\"
    ! 
    ! ! !

    Conditional Init Constructs

    !

    Readline implements a facility similar in spirit to the conditional compilation features of the C preprocessor which allows key bindings and variable settings to be performed as the result of tests. There are four parser directives used. -

    -
    $if !
    ! The $if construct allows bindings to be made based on the editing mode, the terminal being used, or the application using Readline. The text of the test extends to the end of the line; no characters are required to isolate it.
    -
    mode !
    ! The mode= form of the $if directive is used to test whether Readline is in emacs or vi mode. This may be used in conjunction --- 879,923 ---- For example, the following binding will make `C-x \' insert a single `\' into the line: !
     
    "\C-x\\": "\\"
    ! 

    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.3.2 Conditional Init Constructs

    !

    + Readline implements a facility similar in spirit to the conditional compilation features of the C preprocessor which allows key bindings and variable settings to be performed as the result of tests. There are four parser directives used. +

    $if !
    The $if construct allows bindings to be made based on the editing mode, the terminal being used, or the application using Readline. The text of the test extends to the end of the line; no characters are required to isolate it. +

    mode !
    The mode= form of the $if directive is used to test whether Readline is in emacs or vi mode. This may be used in conjunction *************** *** 893,900 **** the emacs-standard and emacs-ctlx keymaps only if Readline is starting out in emacs mode.
    term !
    ! The term= form may be used to include terminal-specific key bindings, perhaps to bind the key sequences output by the terminal's function keys. The word on the right side of the --- 925,932 ---- the emacs-standard and emacs-ctlx keymaps only if Readline is starting out in emacs mode. +

    term !
    The term= form may be used to include terminal-specific key bindings, perhaps to bind the key sequences output by the terminal's function keys. The word on the right side of the *************** *** 903,910 **** allows sun to match both sun and sun-cmd, for instance.
    application !
    ! The application construct is used to include application-specific settings. Each program using the Readline library sets the application name, and you can test for --- 935,942 ---- allows sun to match both sun and sun-cmd, for instance. +

    application !
    The application construct is used to include application-specific settings. Each program using the Readline library sets the application name, and you can test for *************** *** 913,960 **** a specific program. For instance, the following command adds a key sequence that quotes the current or previous word in Bash: ! !
    ! $if Bash
      # Quote the current or previous word
      "\C-xq": "\eb\"\ef\""
      $endif
    ! 
    ! !
    $endif !
    ! This command, as seen in the previous example, terminates an $if command.
    $else !
    ! Commands in this branch of the $if directive are executed if the test fails.
    $include !
    ! This directive takes a single filename as an argument and reads commands and bindings from that file. For example, the following directive reads from `/etc/inputrc': !
    ! $include /etc/inputrc
    ! 
    ! !
    ! ! ! !

    Sample Init File

    !

    Here is an example of an inputrc file. This illustrates key binding, variable assignment, and conditional syntax. !

    ! !
    ! # This file controls the behaviour of line input editing for
      # programs that use the Gnu Readline library.  Existing programs
      # include FTP, Bash, and Gdb.
    --- 945,996 ----
      a specific program.  For instance, the following command adds a
      key sequence that quotes the current or previous word in Bash:
    ! 
     
    $if Bash
      # Quote the current or previous word
      "\C-xq": "\eb\"\ef\""
      $endif
    ! 
    !

    $endif !
    This command, as seen in the previous example, terminates an $if command. +

    $else !
    Commands in this branch of the $if directive are executed if the test fails. +

    $include !
    This directive takes a single filename as an argument and reads commands and bindings from that file. For example, the following directive reads from `/etc/inputrc': +
     
    $include /etc/inputrc
    + 
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.3.3 Sample Init File

    !

    + Here is an example of an inputrc file. This illustrates key binding, variable assignment, and conditional syntax. +

    !
     
    # This file controls the behaviour of line input editing for
      # programs that use the Gnu Readline library.  Existing programs
      # include FTP, Bash, and Gdb.
    ***************
    *** 1053,1146 ****
      "\M-.": yank-last-arg
      $endif
    ! 
    ! ! ! !

    Bindable Readline Commands

    ! ! !

    This section describes Readline commands that may be bound to key sequences. Command names without an accompanying key sequence are unbound by default. -

    -

    In the following descriptions, point refers to the current cursor position, and mark refers to a cursor position saved by the set-mark command. The text between the point and mark is referred to as the region. !

    ! ! !

    Commands For Moving

    !
    beginning-of-line (C-a) !
    ! Move to the start of the current line.
    end-of-line (C-e) !
    ! Move to the end of the line.
    forward-char (C-f) !
    ! Move forward a character. -
    backward-char (C-b) -
    Move back a character.
    forward-word (M-f) !
    ! Move forward to the end of the next word. Words are composed of letters and digits.
    backward-word (M-b) !
    ! Move back to the start of the current or previous word. Words are composed of letters and digits.
    clear-screen (C-l) !
    ! Clear the screen and redraw the current line, leaving the current line at the top of the screen.
    redraw-current-line () !
    ! Refresh the current line. By default, this is unbound.
    ! ! !

    Commands For Manipulating The History

    !
    accept-line (Newline or Return) !
    ! Accept the line regardless of where the cursor is. If this line is --- 1089,1228 ---- "\M-.": yank-last-arg $endif !

    + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    1.4 Bindable Readline Commands

    + +

    + +

    + + + + + + + + +
    1.4.1 Commands For Moving  Moving about the line.
    1.4.2 Commands For Manipulating The History  Getting at previous lines.
    1.4.3 Commands For Changing Text  Commands for changing text.
    1.4.4 Killing And Yanking  Commands for killing and yanking.
    1.4.5 Specifying Numeric Arguments  Specifying numeric arguments, repeat counts.
    1.4.6 Letting Readline Type For You  Getting Readline to do the typing for you.
    1.4.7 Keyboard Macros  Saving and re-executing typed characters
    1.4.8 Some Miscellaneous Commands  Other miscellaneous commands.

    + This section describes Readline commands that may be bound to key sequences. Command names without an accompanying key sequence are unbound by default. +

    In the following descriptions, point refers to the current cursor position, and mark refers to a cursor position saved by the set-mark command. The text between the point and mark is referred to as the region. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.1 Commands For Moving

    !
    !
    beginning-of-line (C-a) !
    Move to the start of the current line. +

    +

    end-of-line (C-e) !
    Move to the end of the line. +

    +

    forward-char (C-f) !
    Move forward a character. +

    +

    backward-char (C-b) +
    Move back a character. +

    +

    forward-word (M-f) !
    Move forward to the end of the next word. Words are composed of letters and digits. +

    +

    backward-word (M-b) !
    Move back to the start of the current or previous word. Words are composed of letters and digits. +

    +

    clear-screen (C-l) !
    Clear the screen and redraw the current line, leaving the current line at the top of the screen. +

    +

    redraw-current-line () !
    Refresh the current line. By default, this is unbound. +

    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.2 Commands For Manipulating The History

    ! !

    !
    accept-line (Newline or Return) !
    Accept the line regardless of where the cursor is. If this line is *************** *** 1149,1218 **** If this line is a modified history line, the history line is restored to its original state.
    previous-history (C-p) !
    ! Move `back' through the history list, fetching the previous command.
    next-history (C-n) !
    ! Move `forward' through the history list, fetching the next command.
    beginning-of-history (M-<) !
    ! Move to the first line in the history.
    end-of-history (M->) !
    ! Move to the end of the input history, i.e., the line currently being entered.
    reverse-search-history (C-r) !
    ! Search backward starting at the current line and moving `up' through the history as necessary. This is an incremental search.
    forward-search-history (C-s) !
    ! Search forward starting at the current line and moving `down' through the the history as necessary. This is an incremental search.
    non-incremental-reverse-search-history (M-p) !
    ! Search backward starting at the current line and moving `up' through the history as necessary using a non-incremental search for a string supplied by the user.
    non-incremental-forward-search-history (M-n) !
    ! Search forward starting at the current line and moving `down' through the the history as necessary using a non-incremental search for a string supplied by the user.
    history-search-forward () !
    ! Search forward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search. By default, this command is unbound.
    history-search-backward () !
    ! Search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search. By default, this command is unbound.
    yank-nth-arg (M-C-y) !
    ! Insert the first argument to the previous command (usually the second word on the previous line) at point. --- 1231,1311 ---- If this line is a modified history line, the history line is restored to its original state. +

    +

    previous-history (C-p) !
    Move `back' through the history list, fetching the previous command. +

    +

    next-history (C-n) !
    Move `forward' through the history list, fetching the next command. +

    +

    beginning-of-history (M-<) !
    Move to the first line in the history. +

    +

    end-of-history (M->) !
    Move to the end of the input history, i.e., the line currently being entered. +

    +

    reverse-search-history (C-r) !
    Search backward starting at the current line and moving `up' through the history as necessary. This is an incremental search. +

    +

    forward-search-history (C-s) !
    Search forward starting at the current line and moving `down' through the the history as necessary. This is an incremental search. +

    +

    non-incremental-reverse-search-history (M-p) !
    Search backward starting at the current line and moving `up' through the history as necessary using a non-incremental search for a string supplied by the user. +

    +

    non-incremental-forward-search-history (M-n) !
    Search forward starting at the current line and moving `down' through the the history as necessary using a non-incremental search for a string supplied by the user. +

    +

    history-search-forward () !
    Search forward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search. By default, this command is unbound. +

    +

    history-search-backward () !
    Search backward through the history for the string of characters between the start of the current line and the point. This is a non-incremental search. By default, this command is unbound. +

    +

    yank-nth-arg (M-C-y) !
    Insert the first argument to the previous command (usually the second word on the previous line) at point. *************** *** 1221,1228 **** in the previous command begin with word 0). A negative argument inserts the nth word from the end of the previous command.
    yank-last-arg (M-. or M-_) !
    ! Insert last argument to the previous command (the last word of the previous history entry). With an --- 1314,1322 ---- in the previous command begin with word 0). A negative argument inserts the nth word from the end of the previous command. +

    +

    yank-last-arg (M-. or M-_) !
    Insert last argument to the previous command (the last word of the previous history entry). With an *************** *** 1230,1282 **** Successive calls to yank-last-arg move back through the history list, inserting the last argument of each line in turn.
    ! ! !

    Commands For Changing Text

    !
    delete-char (C-d) !
    ! Delete the character at point. If point is at the beginning of the line, there are no characters in the line, and the last character typed was not bound to delete-char, then return EOF.
    backward-delete-char (Rubout) !
    ! Delete the character behind the cursor. A numeric argument means to kill the characters instead of deleting them.
    forward-backward-delete-char () !
    ! Delete the character under the cursor, unless the cursor is at the end of the line, in which case the character behind the cursor is deleted. By default, this is not bound to a key.
    quoted-insert (C-q or C-v) !
    ! Add the next character typed to the line verbatim. This is how to insert key sequences like C-q, for example.
    tab-insert (M-TAB) !
    ! Insert a tab character. !
    self-insert (a, b, A, 1, !, ...) !
    ! Insert yourself.
    transpose-chars (C-t) !
    ! Drag the character before the cursor forward over the character at the cursor, moving the --- 1324,1397 ---- Successive calls to yank-last-arg move back through the history list, inserting the last argument of each line in turn. +

    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.3 Commands For Changing Text

    ! !

    !
    delete-char (C-d) !
    Delete the character at point. If point is at the beginning of the line, there are no characters in the line, and the last character typed was not bound to delete-char, then return EOF. +

    +

    backward-delete-char (Rubout) !
    Delete the character behind the cursor. A numeric argument means to kill the characters instead of deleting them. +

    +

    forward-backward-delete-char () !
    Delete the character under the cursor, unless the cursor is at the end of the line, in which case the character behind the cursor is deleted. By default, this is not bound to a key. +

    +

    quoted-insert (C-q or C-v) !
    Add the next character typed to the line verbatim. This is how to insert key sequences like C-q, for example. +

    +

    tab-insert (M-TAB) !
    Insert a tab character. +

    ! !

    self-insert (a, b, A, 1, !, ...) !
    Insert yourself. +

    +

    transpose-chars (C-t) !
    Drag the character before the cursor forward over the character at the cursor, moving the *************** *** 1285,1418 **** transposes the last two characters of the line. Negative arguments have no effect.
    transpose-words (M-t) !
    ! Drag the word before point past the word after point, moving point past that word as well.
    upcase-word (M-u) !
    ! Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move the cursor.
    downcase-word (M-l) !
    ! Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move the cursor.
    capitalize-word (M-c) !
    ! Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move the cursor.
    ! ! !

    Killing And Yanking

    kill-line (C-k) !
    ! Kill the text from point to the end of the line.
    backward-kill-line (C-x Rubout) !
    ! Kill backward to the beginning of the line.
    unix-line-discard (C-u) !
    ! Kill backward from the cursor to the beginning of the current line.
    kill-whole-line () !
    ! Kill all characters on the current line, no matter where point is. By default, this is unbound.
    kill-word (M-d) !
    ! Kill from point to the end of the current word, or if between words, to the end of the next word. Word boundaries are the same as forward-word.
    backward-kill-word (M-DEL) !
    ! Kill the word behind point. Word boundaries are the same as backward-word.
    unix-word-rubout (C-w) !
    ! Kill the word behind point, using white space as a word boundary. The killed text is saved on the kill-ring.
    delete-horizontal-space () !
    ! Delete all spaces and tabs around point. By default, this is unbound.
    kill-region () !
    ! Kill the text in the current region. By default, this command is unbound.
    copy-region-as-kill () !
    ! Copy the text in the region to the kill buffer, so it can be yanked right away. By default, this command is unbound.
    copy-backward-word () !
    ! Copy the word before point to the kill buffer. The word boundaries are the same as backward-word. By default, this command is unbound.
    copy-forward-word () !
    ! Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. By default, this command is unbound.
    yank (C-y) !
    ! Yank the top of the kill ring into the buffer at point.
    yank-pop (M-y) !
    ! Rotate the kill-ring, and yank the new top. You can only do this if the prior command is yank or yank-pop.
    ! ! !

    Specifying Numeric Arguments

    !
    digit-argument (M-0, M-1, ... M--) !
    ! Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument.
    universal-argument () !
    ! This is another way to specify an argument. If this command is followed by one or more digits, optionally with a --- 1400,1583 ---- transposes the last two characters of the line. Negative arguments have no effect. +

    +

    transpose-words (M-t) !
    Drag the word before point past the word after point, moving point past that word as well. + If the insertion point is at the end of the line, this transposes + the last two words on the line. +

    +

    upcase-word (M-u) !
    Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move the cursor. +

    +

    downcase-word (M-l) !
    Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move the cursor. +

    +

    capitalize-word (M-c) !
    Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move the cursor. +

    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.4 Killing And Yanking

    ! !

    +
    kill-line (C-k) !
    Kill the text from point to the end of the line. +

    +

    backward-kill-line (C-x Rubout) !
    Kill backward to the beginning of the line. +

    +

    unix-line-discard (C-u) !
    Kill backward from the cursor to the beginning of the current line. +

    +

    kill-whole-line () !
    Kill all characters on the current line, no matter where point is. By default, this is unbound. +

    +

    kill-word (M-d) !
    Kill from point to the end of the current word, or if between words, to the end of the next word. Word boundaries are the same as forward-word. +

    +

    backward-kill-word (M-DEL) !
    Kill the word behind point. Word boundaries are the same as backward-word. +

    +

    unix-word-rubout (C-w) !
    Kill the word behind point, using white space as a word boundary. The killed text is saved on the kill-ring. +

    +

    delete-horizontal-space () !
    Delete all spaces and tabs around point. By default, this is unbound. +

    +

    kill-region () !
    Kill the text in the current region. By default, this command is unbound. +

    +

    copy-region-as-kill () !
    Copy the text in the region to the kill buffer, so it can be yanked right away. By default, this command is unbound. +

    +

    copy-backward-word () !
    Copy the word before point to the kill buffer. The word boundaries are the same as backward-word. By default, this command is unbound. +

    +

    copy-forward-word () !
    Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. By default, this command is unbound. +

    +

    yank (C-y) !
    Yank the top of the kill ring into the buffer at point. +

    +

    yank-pop (M-y) !
    Rotate the kill-ring, and yank the new top. You can only do this if the prior command is yank or yank-pop.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.5 Specifying Numeric Arguments

    !
    ! !
    digit-argument (M-0, M-1, ... M--) !
    Add this digit to the argument already accumulating, or start a new argument. M-- starts a negative argument. +

    +

    universal-argument () !
    This is another way to specify an argument. If this command is followed by one or more digits, optionally with a *************** *** 1428,1459 **** By default, this is not bound to a key.
    ! ! !

    Letting Readline Type For You

    !
    complete (TAB) !
    ! Attempt to perform completion on the text before point. The actual completion performed is application-specific. The default is filename completion.
    possible-completions (M-?) !
    ! List the possible completions of the text before point.
    insert-completions (M-*) !
    ! Insert all completions of the text before point that would have been generated by possible-completions.
    menu-complete () !
    ! Similar to complete, but replaces the word to be completed with a single match from the list of possible completions. --- 1593,1641 ---- By default, this is not bound to a key.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.6 Letting Readline Type For You

    ! !

    !
    complete (TAB) !
    Attempt to perform completion on the text before point. The actual completion performed is application-specific. The default is filename completion. +

    +

    possible-completions (M-?) !
    List the possible completions of the text before point. +

    +

    insert-completions (M-*) !
    Insert all completions of the text before point that would have been generated by possible-completions. +

    +

    menu-complete () !
    Similar to complete, but replaces the word to be completed with a single match from the list of possible completions. *************** *** 1468,1475 **** This command is intended to be bound to TAB, but is unbound by default.
    delete-char-or-list () !
    ! Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). --- 1650,1658 ---- This command is intended to be bound to TAB, but is unbound by default. +

    +

    delete-char-or-list () !
    Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). *************** *** 1477,1631 **** possible-completions. This command is unbound by default.
    ! ! !

    Keyboard Macros

    start-kbd-macro (C-x () !
    ! Begin saving the characters typed into the current keyboard macro.
    end-kbd-macro (C-x )) !
    ! Stop saving the characters typed into the current keyboard macro and save the definition.
    call-last-kbd-macro (C-x e) !
    ! Re-execute the last keyboard macro defined, by making the characters in the macro appear as if typed at the keyboard.
    ! ! !

    Some Miscellaneous Commands

    re-read-init-file (C-x C-r) !
    ! Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there.
    abort (C-g) !
    ! Abort the current editing command and ring the terminal's bell (subject to the setting of bell-style). !
    do-uppercase-version (M-a, M-b, M-x, ...) !
    ! If the metafied character x is lowercase, run the command that is bound to the corresponding uppercase character.
    prefix-meta (ESC) !
    ! Metafy the next character typed. This is for keyboards without a meta key. Typing `ESC f' is equivalent to typing M-f.
    undo (C-_ or C-x C-u) !
    ! Incremental undo, separately remembered for each line.
    revert-line (M-r) !
    ! Undo all changes made to this line. This is like executing the undo command enough times to get back to the beginning.
    tilde-expand (M-~) !
    ! Perform tilde expansion on the current word.
    set-mark (C-@) !
    ! Set the mark to the point. If a numeric argument is supplied, the mark is set to that position.
    exchange-point-and-mark (C-x C-x) !
    ! Swap the point with the mark. The current cursor position is set to the saved position, and the old cursor position is saved as the mark.
    character-search (C-]) !
    ! A character is read and point is moved to the next occurrence of that character. A negative count searches for previous occurrences.
    character-search-backward (M-C-]) !
    ! A character is read and point is moved to the previous occurrence of that character. A negative count searches for subsequent occurrences.
    insert-comment (M-#) !
    ! The value of the comment-begin variable is inserted at the beginning of the current line, and the line is accepted as if a newline had been typed.
    dump-functions () !
    ! Print all of the functions and their key bindings to the Readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default.
    dump-variables () !
    ! Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default.
    dump-macros () !
    ! Print all of the Readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default.
    ! ! !

    Readline vi Mode

    !

    While the Readline library does not have a full set of vi editing functions, it does contain enough to allow simple editing of the line. The Readline vi mode behaves as specified in the POSIX 1003.2 standard. -

    -

    In order to switch interactively between emacs and vi editing modes, use the command M-C-j (bound to emacs-editing-mode when in vi mode and to vi-editing-mode in emacs mode). The Readline default is emacs mode. -

    -

    When you enter a line in vi mode, you are already placed in `insertion' mode, as if you had typed an `i'. Pressing ESC --- 1660,1873 ---- possible-completions. This command is unbound by default. +

    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.7 Keyboard Macros

    !
    +
    start-kbd-macro (C-x () !
    Begin saving the characters typed into the current keyboard macro. +

    +

    end-kbd-macro (C-x )) !
    Stop saving the characters typed into the current keyboard macro and save the definition. +

    +

    call-last-kbd-macro (C-x e) !
    Re-execute the last keyboard macro defined, by making the characters in the macro appear as if typed at the keyboard. +

    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.4.8 Some Miscellaneous Commands

    !
    +
    re-read-init-file (C-x C-r) !
    Read in the contents of the inputrc file, and incorporate any bindings or variable assignments found there. +

    +

    abort (C-g) !
    Abort the current editing command and ring the terminal's bell (subject to the setting of bell-style). +

    ! !

    do-uppercase-version (M-a, M-b, M-x, ...) !
    If the metafied character x is lowercase, run the command that is bound to the corresponding uppercase character. +

    +

    prefix-meta (ESC) !
    Metafy the next character typed. This is for keyboards without a meta key. Typing `ESC f' is equivalent to typing M-f. +

    +

    undo (C-_ or C-x C-u) !
    Incremental undo, separately remembered for each line. +

    +

    revert-line (M-r) !
    Undo all changes made to this line. This is like executing the undo command enough times to get back to the beginning. +

    +

    tilde-expand (M-~) !
    Perform tilde expansion on the current word. +

    +

    set-mark (C-@) !
    Set the mark to the point. If a numeric argument is supplied, the mark is set to that position. +

    +

    exchange-point-and-mark (C-x C-x) !
    Swap the point with the mark. The current cursor position is set to the saved position, and the old cursor position is saved as the mark. +

    +

    character-search (C-]) !
    A character is read and point is moved to the next occurrence of that character. A negative count searches for previous occurrences. +

    +

    character-search-backward (M-C-]) !
    A character is read and point is moved to the previous occurrence of that character. A negative count searches for subsequent occurrences. +

    +

    insert-comment (M-#) !
    The value of the comment-begin variable is inserted at the beginning of the current line, and the line is accepted as if a newline had been typed. +

    +

    dump-functions () !
    Print all of the functions and their key bindings to the Readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default. +

    +

    dump-variables () !
    Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default. +

    +

    dump-macros () !
    Print all of the Readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default. +

    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    1.5 Readline vi Mode

    !

    + While the Readline library does not have a full set of vi editing functions, it does contain enough to allow simple editing of the line. The Readline vi mode behaves as specified in the POSIX 1003.2 standard. +

    In order to switch interactively between emacs and vi editing modes, use the command M-C-j (bound to emacs-editing-mode when in vi mode and to vi-editing-mode in emacs mode). The Readline default is emacs mode. +

    When you enter a line in vi mode, you are already placed in `insertion' mode, as if you had typed an `i'. Pressing ESC *************** *** 1634,1645 **** history lines with `k' and subsequent lines with `j', and so forth. !

    !

    Programming with GNU Readline

    This chapter describes the interface between the GNU Readline Library and other programs. If you are a programmer, and you wish to include the --- 1876,1924 ---- history lines with `k' and subsequent lines with `j', and so forth. +

    ! This document describes the GNU Readline Library, a utility for aiding ! in the consitency of user interface across discrete programs that need ! to provide a command line interface. !

    + Copyright (C) 1988-2001 Free Software Foundation, Inc. +

    + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice + pare preserved on all copies. +

    + + Permission is granted to copy and distribute modified versions of this + manual under the conditions for verbatim copying, provided that the entire + resulting derived work is distributed under the terms of a permission + notice identical to this one. +

    ! Permission is granted to copy and distribute translations of this manual ! into another language, under the above conditions for modified versions, ! except that this permission notice may be stated in a translation approved ! by the Foundation. !

    + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    2. Programming with GNU Readline

    +

    + This chapter describes the interface between the GNU Readline Library and other programs. If you are a programmer, and you wish to include the *************** *** 1647,1671 **** such as completion, line editing, and interactive history manipulation in your own programs, this section is for you. !

    ! ! ! ! ! !

    Basic Behavior

    !

    Many programs provide a command line interface, such as mail, ftp, and sh. For such programs, the default behaviour of --- 1926,1963 ---- such as completion, line editing, and interactive history manipulation in your own programs, this section is for you. +

    !

    ! ! ! ! ! ! !
    2.1 Basic Behavior  Using the default behavior of Readline.
    2.2 Custom Functions  Adding your own functions to Readline.
    2.3 Readline Variables  Variables accessible to custom ! functions.
    2.4 Readline Convenience Functions  Functions which Readline supplies to aid in writing your own custom ! functions.
    2.5 Readline Signal Handling  How Readline behaves when it receives signals.
    2.6 Custom Completers  Supplanting or supplementing Readline's ! completion functions.
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.1 Basic Behavior

    !

    + Many programs provide a command line interface, such as mail, ftp, and sh. For such programs, the default behaviour of *************** *** 1673,1684 **** the simplest way possible, perhaps to replace calls in your code to gets() or fgets(). !

    !

    ! ! -

    -

    The function readline() prints a prompt prompt and then reads and returns a single line of text from the user. --- 1965,1974 ---- the simplest way possible, perhaps to replace calls in your code to gets() or fgets(). +

    ! ! !

    The function readline() prints a prompt prompt and then reads and returns a single line of text from the user. *************** *** 1687,1741 **** the caller should free() the line when it has finished with it. The declaration for readline in ANSI C is !

    -
    - char *readline (const char *prompt);
    - 
    - -

    So, one might say ! !

    ! char *line = readline ("Enter a line: ");
    ! 
    ! !

    ! in order to read a line of text from the user. The line returned has the final newline removed, so only the text remains. -

    -

    If readline encounters an EOF while reading the line, and the line is empty at that point, then (char *)NULL is returned. Otherwise, the line is ended just as if a newline had been typed. -

    -

    If you want the user to be able to get at the line later, (with C-p for example), you must call add_history() to save the line away in a history list of such lines. !

    ! !
    ! add_history (line);
    ! 
    -

    For full details on the GNU History Library, see the associated manual. -

    -

    It is preferable to avoid saving empty lines on the history list, since users rarely have a burning need to reuse a blank line. Here is a function which usefully replaces the standard gets() library function, and has the advantage of no static buffer to overflow: !

    ! !
    ! /* A static variable for holding the line. */
      static char *line_read = (char *)NULL;
      
    --- 1977,2015 ----
      the caller should free() the line when it has finished with it.
      The declaration for readline in ANSI C is
    + 

    !
     
    char *readline (const char *prompt);
    ! 

    So, one might say !
     
    char *line = readline ("Enter a line: ");
    ! 
    in order to read a line of text from the user. The line returned has the final newline removed, so only the text remains. +

    If readline encounters an EOF while reading the line, and the line is empty at that point, then (char *)NULL is returned. Otherwise, the line is ended just as if a newline had been typed. +

    If you want the user to be able to get at the line later, (with C-p for example), you must call add_history() to save the line away in a history list of such lines. +

    !
     
    add_history (line);
    ! 

    For full details on the GNU History Library, see the associated manual. +

    It is preferable to avoid saving empty lines on the history list, since users rarely have a burning need to reuse a blank line. Here is a function which usefully replaces the standard gets() library function, and has the advantage of no static buffer to overflow: +

    !
     
    /* A static variable for holding the line. */
      static char *line_read = (char *)NULL;
      
    ***************
    *** 1761,1779 ****
        return (line_read);
      }
    ! 
    -

    This function gives the user the default behaviour of TAB completion: completion on file names. If you do not want Readline to complete on filenames, you can change the binding of the TAB key with rl_bind_key(). !

    ! !
    ! int rl_bind_key (int key, rl_command_func_t *function);
    ! 
    -

    rl_bind_key() takes two arguments: key is the character that you want to bind, and function is the address of the function to --- 2035,2049 ---- return (line_read); } !

    This function gives the user the default behaviour of TAB completion: completion on file names. If you do not want Readline to complete on filenames, you can change the binding of the TAB key with rl_bind_key(). +

    !
     
    int rl_bind_key (int key, rl_command_func_t *function);
    ! 

    rl_bind_key() takes two arguments: key is the character that you want to bind, and function is the address of the function to *************** *** 1782,1806 **** rl_bind_key() returns non-zero if key is not a valid ASCII character code (between 0 and 255). -

    -

    Thus, to disable the default TAB behavior, the following suffices: -

    - rl_bind_key ('\t', rl_insert);
    - 
    - -

    This code should be executed once at the start of your program; you might write a function called initialize_readline() which performs this and other desired initializations, such as installing ! custom completers (see section Custom Completers). ! !

    ! ! !

    Custom Functions

    Readline provides many functions for manipulating the text of the line, but it isn't possible to anticipate the needs of all --- 2052,2085 ---- rl_bind_key() returns non-zero if key is not a valid ASCII character code (between 0 and 255). +

    Thus, to disable the default TAB behavior, the following suffices: +
     
    rl_bind_key ('\t', rl_insert);
    + 

    This code should be executed once at the start of your program; you might write a function called initialize_readline() which performs this and other desired initializations, such as installing ! custom completers (see section 2.6 Custom Completers). !

    + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    2.2 Custom Functions

    +

    + Readline provides many functions for manipulating the text of the line, but it isn't possible to anticipate the needs of all *************** *** 1808,1814 **** defined within the Readline library which allow a user program to add customized functionality to Readline. -

    -

    Before declaring any functions that customize Readline's behavior, or using any functionality Readline provides in other code, an --- 2087,2092 ---- defined within the Readline library which allow a user program to add customized functionality to Readline. +

    Before declaring any functions that customize Readline's behavior, or using any functionality Readline provides in other code, an *************** *** 1817,1939 **** in readline.h use the stdio library, the file <stdio.h> should be included before readline.h. !

    ! ! ! ! ! !

    Readline Typedefs

    !

    For readabilty, we declare a number of new object types, all pointers to functions. -

    -

    The reason for declaring these new types is to make it easier to write code describing pointers to C functions with appropriately prototyped arguments and return values. -

    -

    For instance, say we want to declare a variable func as a pointer to a function which takes two int arguments and returns an int (this is the type of all of the Readline bindable functions). Instead of the classic C declaration -

    -

    int (*func)(); -

    -

    or the ANSI-C style declaration -

    -

    int (*func)(int, int); -

    -

    we may write -

    -

    rl_command_func_t *func; -

    -

    The full list of function pointer types available is -

    -
    typedef int rl_command_func_t (int, int); !
    typedef char *rl_compentry_func_t (const char *, int); !
    typedef char **rl_completion_func_t (const char *, int, int); !
    typedef char *rl_quote_func_t (char *, int, char *); !
    typedef char *rl_dequote_func_t (char *, int); !
    typedef int rl_compignore_func_t (char **); !
    typedef void rl_compdisp_func_t (char **, int, int); !
    typedef int rl_hook_func_t (void); !
    typedef int rl_getc_func_t (FILE *); !
    typedef int rl_linebuf_func_t (char *, int); !
    !
    typedef int rl_intfunc_t (int); !
    !
    #define rl_ivoidfunc_t rl_hook_func_t !
    !
    typedef int rl_icpfunc_t (char *); !
    !
    typedef int rl_icppfunc_t (char **); !
    !
    typedef void rl_voidfunc_t (void); !
    !
    typedef void rl_vintfunc_t (int); !
    !
    typedef void rl_vcpfunc_t (char *); !
    !
    typedef void rl_vcppfunc_t (char **); !
    !
    !

    Writing a New Function

    In order to write new functions for Readline, you need to know the calling conventions for keyboard-invoked functions, and the names of the variables that describe the current state of the line read so far. -

    -

    The calling sequence for a command foo looks like !

    ! !
    ! foo (int count, int key)
    ! 
    -

    where count is the numeric argument (or 1 if defaulted) and key is the key that invoked this function. -

    -

    It is completely up to the function as to what should be done with the numeric argument. Some functions use it as a repeat count, some --- 2095,2247 ---- in readline.h use the stdio library, the file <stdio.h> should be included before readline.h. +

    ! readline.h defines a C preprocessor variable that should ! be treated as an integer, RL_READLINE_VERSION, which may ! be used to conditionally compile application code depending on ! the installed Readline version. The value is a hexadecimal ! encoding of the major and minor version numbers of the library, ! of the form 0xMMmm. MM is the two-digit major ! version number; mm is the two-digit minor version number. ! For Readline 4.2, for example, the value of ! RL_READLINE_VERSION would be 0x0402. !

    ! !

    ! ! !
    2.2.1 Readline Typedefs  C declarations to make code readable.
    2.2.2 Writing a New Function  Variables and calling conventions.
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.2.1 Readline Typedefs

    !

    + For readabilty, we declare a number of new object types, all pointers to functions. +

    The reason for declaring these new types is to make it easier to write code describing pointers to C functions with appropriately prototyped arguments and return values. +

    For instance, say we want to declare a variable func as a pointer to a function which takes two int arguments and returns an int (this is the type of all of the Readline bindable functions). Instead of the classic C declaration +

    int (*func)(); +

    or the ANSI-C style declaration +

    int (*func)(int, int); +

    we may write +

    rl_command_func_t *func; +

    The full list of function pointer types available is +

    typedef int rl_command_func_t (int, int); !

    !

    typedef char *rl_compentry_func_t (const char *, int); !

    !

    typedef char **rl_completion_func_t (const char *, int, int); !

    !

    typedef char *rl_quote_func_t (char *, int, char *); !

    !

    typedef char *rl_dequote_func_t (char *, int); !

    !

    typedef int rl_compignore_func_t (char **); !

    !

    typedef void rl_compdisp_func_t (char **, int, int); !

    !

    typedef int rl_hook_func_t (void); !

    !

    typedef int rl_getc_func_t (FILE *); !

    !

    typedef int rl_linebuf_func_t (char *, int); !

    +

    typedef int rl_intfunc_t (int); +
    #define rl_ivoidfunc_t rl_hook_func_t +
    typedef int rl_icpfunc_t (char *); +
    typedef int rl_icppfunc_t (char **); +

    +

    typedef void rl_voidfunc_t (void); +
    typedef void rl_vintfunc_t (int); +
    typedef void rl_vcpfunc_t (char *); +
    typedef void rl_vcppfunc_t (char **); +

    !

    !

    + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    2.2.2 Writing a New Function

    +

    + In order to write new functions for Readline, you need to know the calling conventions for keyboard-invoked functions, and the names of the variables that describe the current state of the line read so far. +

    The calling sequence for a command foo looks like +

    !
     
    foo (int count, int key)
    ! 

    where count is the numeric argument (or 1 if defaulted) and key is the key that invoked this function. +

    It is completely up to the function as to what should be done with the numeric argument. Some functions use it as a repeat count, some *************** *** 1945,2062 **** At the very least, it should be aware that it can be passed a negative argument. !

    ! ! !

    Readline Variables

    !

    These variables are available to function writers. !

    !

    Variable: char * rl_line_buffer !
    ! This is the line gathered so far. You are welcome to modify the ! contents of the line, but see section Allowing Undoing. The function rl_extend_line_buffer is available to increase the memory allocated to rl_line_buffer.
    !

    !

    Variable: int rl_point !
    ! The offset of the current cursor position in rl_line_buffer (the point).
    !

    !

    Variable: int rl_end !
    ! The number of characters present in rl_line_buffer. When rl_point is at the end of the line, rl_point and rl_end are equal.
    !

    !

    Variable: int rl_mark !
    ! The mark (saved position) in the current line. If set, the mark and point define a region.
    !

    !

    Variable: int rl_done !
    ! Setting this to a non-zero value causes Readline to return the current line immediately.
    !

    !

    Variable: int rl_num_chars_to_read !
    ! Setting this to a positive value before calling readline() causes Readline to return after accepting that many characters, rather than reading up to a character bound to accept-line.
    !

    !

    Variable: int rl_pending_input !
    ! Setting this to a value makes it the next keystroke read. This is a way to stuff a single character into the input stream.
    !

    !

    Variable: int rl_dispatching !
    ! Set to a non-zero value if a function is being called from a key binding; zero otherwise. Application functions can test this to discover whether they were called directly or by Readline's dispatching mechanism.
    !

    !

    Variable: int rl_erase_empty_line !
    ! Setting this to a non-zero value causes Readline to completely erase the current line, including any prompt, any time a newline is typed as the only character on an otherwise-empty line. The cursor is moved to the beginning of the newly-blank line.
    !

    !

    Variable: char * rl_prompt !
    ! The prompt Readline uses. This is set from the argument to readline(), and should not be assigned to directly. ! The rl_set_prompt() function (see section Redisplay) may be used to modify the prompt string after calling readline().
    !

    !

    Variable: int rl_already_prompted !
    ! If an application wishes to display the prompt itself, rather than have Readline do it the first time readline() is called, it should set this variable to a non-zero value after displaying the prompt. --- 2253,2372 ---- At the very least, it should be aware that it can be passed a negative argument. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.3 Readline Variables

    !

    + These variables are available to function writers. +

    !

    Variable: char * rl_line_buffer !
    This is the line gathered so far. You are welcome to modify the ! contents of the line, but see 2.4.5 Allowing Undoing. The function rl_extend_line_buffer is available to increase the memory allocated to rl_line_buffer.
    +

    !

    Variable: int rl_point !
    The offset of the current cursor position in rl_line_buffer (the point).
    +

    !

    Variable: int rl_end !
    The number of characters present in rl_line_buffer. When rl_point is at the end of the line, rl_point and rl_end are equal.
    +

    !

    Variable: int rl_mark !
    The mark (saved position) in the current line. If set, the mark and point define a region.
    +

    !

    Variable: int rl_done !
    Setting this to a non-zero value causes Readline to return the current line immediately.
    +

    !

    Variable: int rl_num_chars_to_read !
    Setting this to a positive value before calling readline() causes Readline to return after accepting that many characters, rather than reading up to a character bound to accept-line.
    +

    !

    Variable: int rl_pending_input !
    Setting this to a value makes it the next keystroke read. This is a way to stuff a single character into the input stream.
    +

    !

    Variable: int rl_dispatching !
    Set to a non-zero value if a function is being called from a key binding; zero otherwise. Application functions can test this to discover whether they were called directly or by Readline's dispatching mechanism.
    +

    !

    Variable: int rl_erase_empty_line !
    Setting this to a non-zero value causes Readline to completely erase the current line, including any prompt, any time a newline is typed as the only character on an otherwise-empty line. The cursor is moved to the beginning of the newly-blank line.
    +

    !

    Variable: char * rl_prompt !
    The prompt Readline uses. This is set from the argument to readline(), and should not be assigned to directly. ! The rl_set_prompt() function (see section 2.4.6 Redisplay) may be used to modify the prompt string after calling readline().
    +

    !

    Variable: int rl_already_prompted !
    If an application wishes to display the prompt itself, rather than have Readline do it the first time readline() is called, it should set this variable to a non-zero value after displaying the prompt. *************** *** 2066,2397 **** never sets it.
    !

    !

    Variable: const char * rl_library_version !
    ! The version number of this revision of the library.
    !

    !

    Variable: int rl_gnu_readline_p !
    ! Always set to 1, denoting that this is GNU readline rather than some emulation.
    !

    !

    Variable: const char * rl_terminal_name !
    ! The terminal type, used for initialization. If not set by the application, ! Readline sets this to the value of the @env{TERM} environment variable the first time it is called.
    !

    !

    Variable: const char * rl_readline_name !
    ! This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file ! (see section Conditional Init Constructs).
    !

    !

    Variable: FILE * rl_instream !
    ! The stdio stream from which Readline reads input.
    !

    !

    Variable: FILE * rl_outstream !
    ! The stdio stream to which Readline performs output.
    !

    !

    Variable: rl_command_func_t * rl_last_func !
    ! The address of the last command function Readline executed. May be used to test whether or not a function is being executed twice in succession, for example.
    !

    !

    Variable: rl_hook_func_t * rl_startup_hook !
    ! If non-zero, this is the address of a function to call just before readline prints the first prompt.
    !

    !

    Variable: rl_hook_func_t * rl_pre_input_hook !
    ! If non-zero, this is the address of a function to call after the first prompt has been printed and just before readline starts reading input characters.
    !

    !

    Variable: rl_hook_func_t * rl_event_hook !
    ! If non-zero, this is the address of a function to call periodically when Readline is waiting for terminal input. By default, this will be called at most ten times a second if there is no keyboard input.
    !

    !

    Variable: rl_getc_func_t * rl_getc_function !
    ! If non-zero, Readline will call indirectly through this pointer to get a character from the input stream. By default, it is set to rl_getc, the default Readline character input function ! (see section Character Input).
    !

    !

    Variable: rl_voidfunc_t * rl_redisplay_function !
    ! If non-zero, Readline will call indirectly through this pointer to update the display with the current contents of the editing buffer. By default, it is set to rl_redisplay, the default Readline ! redisplay function (see section Redisplay).
    !

    !

    Variable: rl_vintfunc_t * rl_prep_term_function !
    ! If non-zero, Readline will call indirectly through this pointer to initialize the terminal. The function takes a single argument, an int flag that says whether or not to use eight-bit characters. By default, this is set to rl_prep_terminal ! (see section Terminal Management).
    !

    !

    Variable: rl_voidfunc_t * rl_deprep_term_function !
    ! If non-zero, Readline will call indirectly through this pointer to reset the terminal. This function should undo the effects of rl_prep_term_function. By default, this is set to rl_deprep_terminal ! (see section Terminal Management).
    !

    !

    Variable: Keymap rl_executing_keymap !
    ! This variable is set to the keymap (see section Selecting a Keymap) in which the currently executing readline function was found.
    !

    !

    Variable: Keymap rl_binding_keymap !
    ! This variable is set to the keymap (see section Selecting a Keymap) in which the last key binding occurred.
    !

    !

    Variable: char * rl_executing_macro !
    ! This variable is set to the text of any currently-executing macro.
    !

    !

    Variable: int rl_readline_state !
    ! A variable with bit values that encapsulate the current Readline state. A bit is set with the RL_SETSTATE macro, and unset with the RL_UNSETSTATE macro. Use the RL_ISSTATE macro to test whether a particular state bit is set. Current state bits include: -

    -
    RL_STATE_NONE !
    ! Readline has not yet been called, nor has it begun to intialize.
    RL_STATE_INITIALIZING !
    ! Readline is initializing its internal data structures.
    RL_STATE_INITIALIZED !
    ! Readline has completed its initialization.
    RL_STATE_TERMPREPPED !
    ! Readline has modified the terminal modes to do its own input and redisplay.
    RL_STATE_READCMD !
    ! Readline is reading a command from the keyboard.
    RL_STATE_METANEXT !
    ! Readline is reading more input after reading the meta-prefix character.
    RL_STATE_DISPATCHING !
    ! Readline is dispatching to a command.
    RL_STATE_MOREINPUT !
    ! Readline is reading more input while executing an editing command.
    RL_STATE_ISEARCH !
    ! Readline is performing an incremental history search.
    RL_STATE_NSEARCH !
    ! Readline is performing a non-incremental history search.
    RL_STATE_SEARCH !
    ! Readline is searching backward or forward through the history for a string.
    RL_STATE_NUMERICARG !
    ! Readline is reading a numeric argument.
    RL_STATE_MACROINPUT !
    ! Readline is currently getting its input from a previously-defined keyboard macro.
    RL_STATE_MACRODEF !
    ! Readline is currently reading characters defining a keyboard macro.
    RL_STATE_OVERWRITE !
    ! Readline is in overwrite mode.
    RL_STATE_COMPLETING !
    ! Readline is performing word completion.
    RL_STATE_SIGHANDLER !
    ! Readline is currently executing the readline signal handler.
    RL_STATE_UNDOING !
    ! Readline is performing an undo.
    RL_STATE_DONE !
    ! Readline has read a key sequence bound to accept-line and is about to return the line to the caller.
    !

    Variable: int rl_explicit_arg !
    ! Set to a non-zero value if an explicit numeric argument was specified by the user. Only valid in a bindable command function.
    !

    !

    Variable: int rl_numeric_arg !
    ! Set to the value of any numeric argument explicitly specified by the user before executing the current Readline function. Only valid in a bindable command function.
    !

    !

    Variable: int rl_editing_mode !
    ! Set to a value denoting Readline's current editing mode. A value of 1 means Readline is currently in emacs mode; 0 means that vi mode is active.
    !

    ! ! ! !

    Readline Convenience Functions

    ! ! ! ! ! ! !

    Naming a Function

    !

    The user can dynamically change the bindings of keys while using Readline. This is done by representing the function with a descriptive name. The user is able to type the descriptive name when referring to the function. Thus, in an init file, one might find !

    -
    - Meta-Rubout:	backward-kill-word
    - 
    - -

    This binds the keystroke Meta-Rubout to the function descriptively named backward-kill-word. You, as the programmer, should bind the functions you write to descriptive names as well. Readline provides a function for doing that: !

    !

    Function: int rl_add_defun (const char *name, rl_command_func_t *function, int key) !
    ! Add name to the list of named functions. Make function be the function that gets called. If key is not -1, then bind it to function using rl_bind_key().
    -

    -

    Using this function alone is sufficient for most applications. It is the recommended way to add a few functions to the default functions that --- 2376,2700 ---- never sets it.

    +

    !

    Variable: const char * rl_library_version !
    The version number of this revision of the library.
    +

    ! !

    !
    Variable: int rl_readline_version !
    An integer encoding the current version of the library. The encoding is ! of the form 0xMMmm, where MM is the two-digit major version ! number, and mm is the two-digit minor version number. ! For example, for Readline-4.2, rl_readline_version would have the ! value 0x0402. !
    !

    ! !

    Variable: int rl_gnu_readline_p !
    Always set to 1, denoting that this is GNU readline rather than some emulation.
    +

    !

    Variable: const char * rl_terminal_name !
    The terminal type, used for initialization. If not set by the application, ! Readline sets this to the value of the TERM environment variable the first time it is called.
    +

    !

    Variable: const char * rl_readline_name !
    This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file ! (see section 1.3.2 Conditional Init Constructs).
    +

    !

    Variable: FILE * rl_instream !
    The stdio stream from which Readline reads input.
    +

    !

    Variable: FILE * rl_outstream !
    The stdio stream to which Readline performs output.
    +

    !

    Variable: rl_command_func_t * rl_last_func !
    The address of the last command function Readline executed. May be used to test whether or not a function is being executed twice in succession, for example.
    +

    !

    Variable: rl_hook_func_t * rl_startup_hook !
    If non-zero, this is the address of a function to call just before readline prints the first prompt.
    +

    !

    Variable: rl_hook_func_t * rl_pre_input_hook !
    If non-zero, this is the address of a function to call after the first prompt has been printed and just before readline starts reading input characters.
    +

    !

    Variable: rl_hook_func_t * rl_event_hook !
    If non-zero, this is the address of a function to call periodically when Readline is waiting for terminal input. By default, this will be called at most ten times a second if there is no keyboard input.
    +

    !

    Variable: rl_getc_func_t * rl_getc_function !
    If non-zero, Readline will call indirectly through this pointer to get a character from the input stream. By default, it is set to rl_getc, the default Readline character input function ! (see section 2.4.8 Character Input).
    +

    !

    Variable: rl_voidfunc_t * rl_redisplay_function !
    If non-zero, Readline will call indirectly through this pointer to update the display with the current contents of the editing buffer. By default, it is set to rl_redisplay, the default Readline ! redisplay function (see section 2.4.6 Redisplay).
    +

    !

    Variable: rl_vintfunc_t * rl_prep_term_function !
    If non-zero, Readline will call indirectly through this pointer to initialize the terminal. The function takes a single argument, an int flag that says whether or not to use eight-bit characters. By default, this is set to rl_prep_terminal ! (see section 2.4.9 Terminal Management).
    +

    !

    Variable: rl_voidfunc_t * rl_deprep_term_function !
    If non-zero, Readline will call indirectly through this pointer to reset the terminal. This function should undo the effects of rl_prep_term_function. By default, this is set to rl_deprep_terminal ! (see section 2.4.9 Terminal Management).
    +

    !

    Variable: Keymap rl_executing_keymap !
    This variable is set to the keymap (see section 2.4.2 Selecting a Keymap) in which the currently executing readline function was found.
    +

    !

    Variable: Keymap rl_binding_keymap !
    This variable is set to the keymap (see section 2.4.2 Selecting a Keymap) in which the last key binding occurred.
    +

    !

    Variable: char * rl_executing_macro !
    This variable is set to the text of any currently-executing macro.
    +

    !

    Variable: int rl_readline_state !
    A variable with bit values that encapsulate the current Readline state. A bit is set with the RL_SETSTATE macro, and unset with the RL_UNSETSTATE macro. Use the RL_ISSTATE macro to test whether a particular state bit is set. Current state bits include: +

    RL_STATE_NONE !
    Readline has not yet been called, nor has it begun to intialize.
    RL_STATE_INITIALIZING !
    Readline is initializing its internal data structures.
    RL_STATE_INITIALIZED !
    Readline has completed its initialization.
    RL_STATE_TERMPREPPED !
    Readline has modified the terminal modes to do its own input and redisplay.
    RL_STATE_READCMD !
    Readline is reading a command from the keyboard.
    RL_STATE_METANEXT !
    Readline is reading more input after reading the meta-prefix character.
    RL_STATE_DISPATCHING !
    Readline is dispatching to a command.
    RL_STATE_MOREINPUT !
    Readline is reading more input while executing an editing command.
    RL_STATE_ISEARCH !
    Readline is performing an incremental history search.
    RL_STATE_NSEARCH !
    Readline is performing a non-incremental history search.
    RL_STATE_SEARCH !
    Readline is searching backward or forward through the history for a string.
    RL_STATE_NUMERICARG !
    Readline is reading a numeric argument.
    RL_STATE_MACROINPUT !
    Readline is currently getting its input from a previously-defined keyboard macro.
    RL_STATE_MACRODEF !
    Readline is currently reading characters defining a keyboard macro.
    RL_STATE_OVERWRITE !
    Readline is in overwrite mode.
    RL_STATE_COMPLETING !
    Readline is performing word completion.
    RL_STATE_SIGHANDLER !
    Readline is currently executing the readline signal handler.
    RL_STATE_UNDOING !
    Readline is performing an undo.
    RL_STATE_DONE !
    Readline has read a key sequence bound to accept-line and is about to return the line to the caller.
    +

    +

    !

    Variable: int rl_explicit_arg !
    Set to a non-zero value if an explicit numeric argument was specified by the user. Only valid in a bindable command function.
    +

    !

    Variable: int rl_numeric_arg !
    Set to the value of any numeric argument explicitly specified by the user before executing the current Readline function. Only valid in a bindable command function.
    +

    !

    Variable: int rl_editing_mode !
    Set to a value denoting Readline's current editing mode. A value of 1 means Readline is currently in emacs mode; 0 means that vi mode is active.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4 Readline Convenience Functions

    ! !

    ! !

    ! ! ! ! ! ! ! ! ! ! ! ! ! !
    2.4.1 Naming a Function  How to give a function you write a name.
    2.4.2 Selecting a Keymap  Making keymaps.
    2.4.3 Binding Keys  Changing Keymaps.
    2.4.4 Associating Function Names and Bindings  Translate function names to ! key sequences.
    2.4.5 Allowing Undoing  How to make your functions undoable.
    2.4.6 Redisplay  Functions to control line display.
    2.4.7 Modifying Text  Functions to modify rl_line_buffer.
    2.4.8 Character Input  Functions to read keyboard input.
    2.4.9 Terminal Management  Functions to manage terminal settings.
    2.4.10 Utility Functions  Generally useful functions and hooks.
    2.4.11 Miscellaneous Functions  Functions that don't fall into any category.
    2.4.12 Alternate Interface  Using Readline in a `callback' fashion.
    2.4.13 A Readline Example  An example Readline function.
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.1 Naming a Function

    !

    + The user can dynamically change the bindings of keys while using Readline. This is done by representing the function with a descriptive name. The user is able to type the descriptive name when referring to the function. Thus, in an init file, one might find +

    !
     
    Meta-Rubout:	backward-kill-word
    ! 

    This binds the keystroke Meta-Rubout to the function descriptively named backward-kill-word. You, as the programmer, should bind the functions you write to descriptive names as well. Readline provides a function for doing that: +

    !

    Function: int rl_add_defun (const char *name, rl_command_func_t *function, int key) !
    Add name to the list of named functions. Make function be the function that gets called. If key is not -1, then bind it to function using rl_bind_key().
    +

    Using this function alone is sufficient for most applications. It is the recommended way to add a few functions to the default functions that *************** *** 2399,2495 **** than adding a function to Readline, you may need to use the underlying functions described below. !

    ! ! !

    Selecting a Keymap

    !

    Key bindings take place on a keymap. The keymap is the association between the keys that the user types and the functions that get run. You can make your own keymaps, copy existing keymaps, and tell Readline which keymap to use. !

    !

    Function: Keymap rl_make_bare_keymap (void) !
    ! Returns a new, empty keymap. The space for the keymap is allocated with malloc(); the caller should free it by calling rl_discard_keymap() when done.
    !

    !

    Function: Keymap rl_copy_keymap (Keymap map) !
    ! Return a new keymap which is a copy of map.
    !

    !

    Function: Keymap rl_make_keymap (void) !
    ! Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and the Meta digits bound to produce numeric arguments.
    !

    !

    Function: void rl_discard_keymap (Keymap keymap) !
    ! Free the storage associated with keymap.
    -

    -

    Readline has several internal keymaps. These functions allow you to change which keymap is active. !

    !

    Function: Keymap rl_get_keymap (void) !
    ! Returns the currently active keymap.
    !

    !

    Function: void rl_set_keymap (Keymap keymap) !
    ! Makes keymap the currently active keymap.
    !

    !

    Function: Keymap rl_get_keymap_by_name (const char *name) !
    ! Return the keymap matching name. name is one which would ! be supplied in a set keymap inputrc line (see section Readline Init File).
    !

    !

    Function: char * rl_get_keymap_name (Keymap keymap) !
    ! Return the name matching keymap. name is one which would ! be supplied in a set keymap inputrc line (see section Readline Init File).
    !

    ! ! !

    Binding Keys

    !

    Key sequences are associate with functions through the keymap. Readline has several internal keymaps: emacs_standard_keymap, --- 2702,2815 ---- than adding a function to Readline, you may need to use the underlying functions described below. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.2 Selecting a Keymap

    !

    + Key bindings take place on a keymap. The keymap is the association between the keys that the user types and the functions that get run. You can make your own keymaps, copy existing keymaps, and tell Readline which keymap to use. +

    !

    Function: Keymap rl_make_bare_keymap (void) !
    Returns a new, empty keymap. The space for the keymap is allocated with malloc(); the caller should free it by calling rl_discard_keymap() when done.
    +

    !

    Function: Keymap rl_copy_keymap (Keymap map) !
    Return a new keymap which is a copy of map.
    +

    !

    Function: Keymap rl_make_keymap (void) !
    Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and the Meta digits bound to produce numeric arguments.
    +

    !

    Function: void rl_discard_keymap (Keymap keymap) !
    Free the storage associated with keymap.
    +

    Readline has several internal keymaps. These functions allow you to change which keymap is active. +

    !

    Function: Keymap rl_get_keymap (void) !
    Returns the currently active keymap.
    +

    !

    Function: void rl_set_keymap (Keymap keymap) !
    Makes keymap the currently active keymap.
    +

    !

    Function: Keymap rl_get_keymap_by_name (const char *name) !
    Return the keymap matching name. name is one which would ! be supplied in a set keymap inputrc line (see section 1.3 Readline Init File).
    +

    !

    Function: char * rl_get_keymap_name (Keymap keymap) !
    Return the name matching keymap. name is one which would ! be supplied in a set keymap inputrc line (see section 1.3 Readline Init File).
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.3 Binding Keys

    !

    + Key sequences are associate with functions through the keymap. Readline has several internal keymaps: emacs_standard_keymap, *************** *** 2498,2504 **** emacs_standard_keymap is the default, and the examples in this manual assume that. -

    -

    Since readline() installs a set of default key bindings the first time it is called, there is always the danger that a custom binding --- 2818,2823 ---- emacs_standard_keymap is the default, and the examples in this manual assume that. +

    Since readline() installs a set of default key bindings the first time it is called, there is always the danger that a custom binding *************** *** 2506,2583 **** An alternate mechanism is to install custom key bindings in an initialization function assigned to the rl_startup_hook variable ! (see section Readline Variables). -

    -

    These functions manage key bindings. !

    !

    Function: int rl_bind_key (int key, rl_command_func_t *function) !
    ! Binds key to function in the currently active keymap. Returns non-zero in the case of an invalid key.
    !

    !

    Function: int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) !
    ! Bind key to function in map. Returns non-zero in the case of an invalid key.
    !

    !

    Function: int rl_unbind_key (int key) !
    ! Bind key to the null function in the currently active keymap. Returns non-zero in case of error.
    !

    !

    Function: int rl_unbind_key_in_map (int key, Keymap map) !
    ! Bind key to the null function in map. Returns non-zero in case of error.
    !

    !

    Function: int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) !
    ! Unbind all keys that execute function in map.
    !

    !

    Function: int rl_unbind_command_in_map (const char *command, Keymap map) !
    ! Unbind all keys that are bound to command in map.
    !

    !

    Function: int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) !
    ! Bind the key sequence represented by the string keyseq to the function function. This makes new keymaps as necessary. The initial keymap in which to do bindings is map.
    !

    !

    Function: int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) !
    ! Bind the key sequence represented by the string keyseq to the arbitrary pointer data. type says what kind of data is pointed to by data; this can be a function (ISFUNC), a macro --- 2825,2893 ---- An alternate mechanism is to install custom key bindings in an initialization function assigned to the rl_startup_hook variable ! (see section 2.3 Readline Variables). !

    These functions manage key bindings. +

    !

    Function: int rl_bind_key (int key, rl_command_func_t *function) !
    Binds key to function in the currently active keymap. Returns non-zero in the case of an invalid key.
    +

    !

    Function: int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) !
    Bind key to function in map. Returns non-zero in the case of an invalid key.
    +

    !

    Function: int rl_unbind_key (int key) !
    Bind key to the null function in the currently active keymap. Returns non-zero in case of error.
    +

    !

    Function: int rl_unbind_key_in_map (int key, Keymap map) !
    Bind key to the null function in map. Returns non-zero in case of error.
    +

    !

    Function: int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) !
    Unbind all keys that execute function in map.
    +

    !

    Function: int rl_unbind_command_in_map (const char *command, Keymap map) !
    Unbind all keys that are bound to command in map.
    +

    !

    Function: int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) !
    Bind the key sequence represented by the string keyseq to the function function. This makes new keymaps as necessary. The initial keymap in which to do bindings is map.
    +

    !

    Function: int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) !
    Bind the key sequence represented by the string keyseq to the arbitrary pointer data. type says what kind of data is pointed to by data; this can be a function (ISFUNC), a macro *************** *** 2585,2727 **** necessary. The initial keymap in which to do bindings is map.
    !

    !

    Function: int rl_parse_and_bind (char *line) !
    ! Parse line as if it had been read from the inputrc file and perform any key bindings and variable assignments found ! (see section Readline Init File).
    !

    !

    Function: int rl_read_init_file (const char *filename) !
    ! Read keybindings and variable assignments from filename ! (see section Readline Init File).
    !

    ! ! !

    Associating Function Names and Bindings

    !

    These functions allow you to find out what keys invoke named functions and the functions invoked by a particular key sequence. You may also associate a new function name with an arbitrary function. !

    !

    Function: rl_command_func_t * rl_named_function (const char *name) !
    ! Return the function with name name.
    !

    !

    Function: rl_command_func_t * rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) !
    ! Return the function invoked by keyseq in keymap map. If map is NULL, the current keymap is used. If type is not NULL, the type of the object is returned in the int variable it points to (one of ISFUNC, ISKMAP, or ISMACR).
    !

    !

    Function: char ** rl_invoking_keyseqs (rl_command_func_t *function) !
    ! Return an array of strings representing the key sequences used to invoke function in the current keymap.
    !

    !

    Function: char ** rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) !
    ! Return an array of strings representing the key sequences used to invoke function in the keymap map.
    !

    !

    Function: void rl_function_dumper (int readable) !
    ! Print the readline function names and the key sequences currently bound to them to rl_outstream. If readable is non-zero, the list is formatted in such a way that it can be made part of an inputrc file and re-read.
    !

    !

    Function: void rl_list_funmap_names (void) !
    ! Print the names of all bindable Readline functions to rl_outstream.
    !

    !

    Function: const char ** rl_funmap_names (void) !
    ! Return a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings inside. You should free() the array when you are done, but not the pointers.
    !

    !

    Function: int rl_add_funmap_entry (const char *name, rl_command_func_t *function) !
    ! Add name to the list of bindable Readline command names, and make function the function to be called when name is invoked.
    !

    ! ! !

    Allowing Undoing

    !

    Supporting the undo command is a painless thing, and makes your functions much more useful. It is certainly easy to try something if you know you can undo it. -

    -

    If your function simply inserts text once, or deletes text once, and uses rl_insert_text() or rl_delete_text() to do it, then undoing is already done for you automatically. -

    -

    If you do multiple insertions or multiple deletions, or any combination of these operations, you should group them together into one operation. This is done with rl_begin_undo_group() and rl_end_undo_group(). -

    -

    The types of events that can be undone are: !

    -
    - enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; 
    - 
    - -

    Notice that UNDO_DELETE means to insert some text, and UNDO_INSERT means to delete some text. That is, the undo code --- 2895,3047 ---- necessary. The initial keymap in which to do bindings is map.

    +

    !

    Function: int rl_parse_and_bind (char *line) !
    Parse line as if it had been read from the inputrc file and perform any key bindings and variable assignments found ! (see section 1.3 Readline Init File).
    +

    !

    Function: int rl_read_init_file (const char *filename) !
    Read keybindings and variable assignments from filename ! (see section 1.3 Readline Init File).
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.4 Associating Function Names and Bindings

    !

    + These functions allow you to find out what keys invoke named functions and the functions invoked by a particular key sequence. You may also associate a new function name with an arbitrary function. +

    !

    Function: rl_command_func_t * rl_named_function (const char *name) !
    Return the function with name name.
    +

    !

    Function: rl_command_func_t * rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) !
    Return the function invoked by keyseq in keymap map. If map is NULL, the current keymap is used. If type is not NULL, the type of the object is returned in the int variable it points to (one of ISFUNC, ISKMAP, or ISMACR).
    +

    !

    Function: char ** rl_invoking_keyseqs (rl_command_func_t *function) !
    Return an array of strings representing the key sequences used to invoke function in the current keymap.
    +

    !

    Function: char ** rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) !
    Return an array of strings representing the key sequences used to invoke function in the keymap map.
    +

    !

    Function: void rl_function_dumper (int readable) !
    Print the readline function names and the key sequences currently bound to them to rl_outstream. If readable is non-zero, the list is formatted in such a way that it can be made part of an inputrc file and re-read.
    +

    !

    Function: void rl_list_funmap_names (void) !
    Print the names of all bindable Readline functions to rl_outstream.
    +

    !

    Function: const char ** rl_funmap_names (void) !
    Return a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings inside. You should free() the array when you are done, but not the pointers.
    +

    !

    Function: int rl_add_funmap_entry (const char *name, rl_command_func_t *function) !
    Add name to the list of bindable Readline command names, and make function the function to be called when name is invoked.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.5 Allowing Undoing

    !

    + Supporting the undo command is a painless thing, and makes your functions much more useful. It is certainly easy to try something if you know you can undo it. +

    If your function simply inserts text once, or deletes text once, and uses rl_insert_text() or rl_delete_text() to do it, then undoing is already done for you automatically. +

    If you do multiple insertions or multiple deletions, or any combination of these operations, you should group them together into one operation. This is done with rl_begin_undo_group() and rl_end_undo_group(). +

    The types of events that can be undone are: +

    !
     
    enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END }; 
    ! 

    Notice that UNDO_DELETE means to insert some text, and UNDO_INSERT means to delete some text. That is, the undo code *************** *** 2729,2834 **** UNDO_END are tags added by rl_begin_undo_group() and rl_end_undo_group(). !

    !

    Function: int rl_begin_undo_group (void) !
    ! Begins saving undo information in a group construct. The undo information usually comes from calls to rl_insert_text() and rl_delete_text(), but could be the result of calls to rl_add_undo().
    !

    !

    Function: int rl_end_undo_group (void) !
    ! Closes the current undo group started with rl_begin_undo_group (). There should be one call to rl_end_undo_group() for each call to rl_begin_undo_group().
    !

    !

    Function: void rl_add_undo (enum undo_code what, int start, int end, char *text) !
    ! Remember how to undo an event (according to what). The affected text runs from start to end, and encompasses text.
    !

    !

    Function: void rl_free_undo_list (void) !
    ! Free the existing undo list.
    !

    !

    Function: int rl_do_undo (void) !
    ! Undo the first thing on the undo list. Returns 0 if there was nothing to undo, non-zero if something was undone.
    -

    -

    Finally, if you neither insert nor delete text, but directly modify the existing text (e.g., change its case), call rl_modifying() once, just before you modify the text. You must supply the indices of the text range that you are going to modify. !

    !

    Function: int rl_modifying (int start, int end) !
    ! Tell Readline to save the text between start and end as a single undo unit. It is assumed that you will subsequently modify that text.
    !

    ! ! !

    Redisplay

    !

    Function: void rl_redisplay (void) !
    ! Change what's displayed on the screen to reflect the current contents of rl_line_buffer.
    !

    !

    Function: int rl_forced_update_display (void) !
    ! Force the line to be updated and redisplayed, whether or not Readline thinks the screen display is correct.
    !

    !

    Function: int rl_on_new_line (void) !
    ! Tell the update functions that we have moved onto a new (empty) line, usually after ouputting a newline.
    !

    !

    Function: int rl_on_new_line_with_prompt (void) !
    ! Tell the update functions that we have moved onto a new line, with rl_prompt already displayed. This could be used by applications that want to output the prompt string --- 3049,3157 ---- UNDO_END are tags added by rl_begin_undo_group() and rl_end_undo_group(). +

    !

    Function: int rl_begin_undo_group (void) !
    Begins saving undo information in a group construct. The undo information usually comes from calls to rl_insert_text() and rl_delete_text(), but could be the result of calls to rl_add_undo().
    +

    !

    Function: int rl_end_undo_group (void) !
    Closes the current undo group started with rl_begin_undo_group (). There should be one call to rl_end_undo_group() for each call to rl_begin_undo_group().
    +

    !

    Function: void rl_add_undo (enum undo_code what, int start, int end, char *text) !
    Remember how to undo an event (according to what). The affected text runs from start to end, and encompasses text.
    +

    !

    Function: void rl_free_undo_list (void) !
    Free the existing undo list.
    +

    !

    Function: int rl_do_undo (void) !
    Undo the first thing on the undo list. Returns 0 if there was nothing to undo, non-zero if something was undone.
    +

    Finally, if you neither insert nor delete text, but directly modify the existing text (e.g., change its case), call rl_modifying() once, just before you modify the text. You must supply the indices of the text range that you are going to modify. +

    !

    Function: int rl_modifying (int start, int end) !
    Tell Readline to save the text between start and end as a single undo unit. It is assumed that you will subsequently modify that text.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.6 Redisplay

    !

    + +

    Function: void rl_redisplay (void) !
    Change what's displayed on the screen to reflect the current contents of rl_line_buffer.
    +

    !

    Function: int rl_forced_update_display (void) !
    Force the line to be updated and redisplayed, whether or not Readline thinks the screen display is correct.
    +

    !

    Function: int rl_on_new_line (void) !
    Tell the update functions that we have moved onto a new (empty) line, usually after ouputting a newline.
    +

    !

    Function: int rl_on_new_line_with_prompt (void) !
    Tell the update functions that we have moved onto a new line, with rl_prompt already displayed. This could be used by applications that want to output the prompt string *************** *** 2837,2864 **** It should be used after setting rl_already_prompted.
    !

    !

    Function: int rl_reset_line_state (void) !
    ! Reset the display state to a clean state and redisplay the current line starting on a new line.
    !

    !

    Function: int rl_crlf (void) !
    ! Move the cursor to the start of the next screen line.
    !

    !

    Function: int rl_show_char (int c) !
    ! Display character c on rl_outstream. If Readline has not been set to display meta characters directly, this will convert meta characters to a meta-prefixed key sequence. --- 3160,3184 ---- It should be used after setting rl_already_prompted.
    +

    !

    Function: int rl_reset_line_state (void) !
    Reset the display state to a clean state and redisplay the current line starting on a new line.
    +

    !

    Function: int rl_crlf (void) !
    Move the cursor to the start of the next screen line.
    +

    !

    Function: int rl_show_char (int c) !
    Display character c on rl_outstream. If Readline has not been set to display meta characters directly, this will convert meta characters to a meta-prefixed key sequence. *************** *** 2866,2876 **** redisplay.
    !

    !

    !
    Function: int rl_message (const char *, ...) !
    ! The arguments are a format string as would be supplied to printf, possibly containing conversion specifications such as `%d', and any additional arguments necessary to satisfy the conversion specifications. --- 3186,3195 ---- redisplay.
    +

    !

    !
    Function: int rl_message (const char *, ...) !
    The arguments are a format string as would be supplied to printf, possibly containing conversion specifications such as `%d', and any additional arguments necessary to satisfy the conversion specifications. *************** *** 2878,2914 **** is also used to display numeric arguments and search strings.
    !

    !

    Function: int rl_clear_message (void) !
    ! Clear the message in the echo area.
    !

    !

    Function: void rl_save_prompt (void) !
    ! Save the local Readline prompt display state in preparation for displaying a new message in the message area with rl_message().
    !

    !

    Function: void rl_restore_prompt (void) !
    ! Restore the local Readline prompt display state saved by the most recent call to rl_save_prompt.
    !

    !

    Function: int rl_expand_prompt (char *prompt) !
    ! Expand any special character sequences in prompt and set up the local Readline prompt redisplay variables. This function is called by readline(). It may also be called to --- 3197,3229 ---- is also used to display numeric arguments and search strings.
    +

    !

    Function: int rl_clear_message (void) !
    Clear the message in the echo area.
    +

    !

    Function: void rl_save_prompt (void) !
    Save the local Readline prompt display state in preparation for displaying a new message in the message area with rl_message().
    +

    !

    Function: void rl_restore_prompt (void) !
    Restore the local Readline prompt display state saved by the most recent call to rl_save_prompt.
    +

    !

    Function: int rl_expand_prompt (char *prompt) !
    Expand any special character sequences in prompt and set up the local Readline prompt redisplay variables. This function is called by readline(). It may also be called to *************** *** 2918,2967 **** (possibly multi-line) prompt.
    !

    !

    Function: int rl_set_prompt (const char *prompt) !
    ! Make Readline use prompt for subsequent redisplay. This calls rl_expand_prompt() to expand the prompt and sets rl_prompt to the result.
    !

    ! ! !

    Modifying Text

    !

    Function: int rl_insert_text (const char *text) !
    ! Insert text into the line at the current cursor position.
    !

    !

    Function: int rl_delete_text (int start, int end) !
    ! Delete the text between start and end in the current line.
    !

    !

    Function: char * rl_copy_text (int start, int end) !
    ! Return a copy of the text between start and end in the current line.
    !

    !

    Function: int rl_kill_text (int start, int end) !
    ! Copy the text between start and end in the current line to the kill ring, appending or prepending to the last kill if the last command was a kill command. The text is deleted. --- 3233,3291 ---- (possibly multi-line) prompt.
    +

    !

    Function: int rl_set_prompt (const char *prompt) !
    Make Readline use prompt for subsequent redisplay. This calls rl_expand_prompt() to expand the prompt and sets rl_prompt to the result.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.7 Modifying Text

    !

    + +

    Function: int rl_insert_text (const char *text) !
    Insert text into the line at the current cursor position.
    +

    !

    Function: int rl_delete_text (int start, int end) !
    Delete the text between start and end in the current line.
    +

    !

    Function: char * rl_copy_text (int start, int end) !
    Return a copy of the text between start and end in the current line.
    +

    !

    Function: int rl_kill_text (int start, int end) !
    Copy the text between start and end in the current line to the kill ring, appending or prepending to the last kill if the last command was a kill command. The text is deleted. *************** *** 2970,3141 **** not a kill, a new kill ring slot is used.
    !

    !

    Function: int rl_push_macro_input (char *macro) !
    ! Cause macro to be inserted into the line, as if it had been invoked by a key bound to a macro. Not especially useful; use rl_insert_text() instead.
    !

    ! ! !

    Character Input

    !

    Function: int rl_read_key (void) !
    ! Return the next character available from Readline's current input stream. This handles input inserted into ! the input stream via rl_pending_input (see section Readline Variables) and rl_stuff_char(), macros, and characters read from the keyboard. While waiting for input, this function will call any function assigned to the rl_event_hook variable.
    !

    !

    Function: int rl_getc (FILE *stream) !
    ! Return the next character available from stream, which is assumed to be the keyboard.
    !

    !

    Function: int rl_stuff_char (int c) !
    ! Insert c into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with rl_read_key().
    !

    !

    Function: int rl_execute_next (int c) !
    ! Make c be the next command to be executed when rl_read_key() is called. This sets rl_pending_input.
    !

    !

    Function: int rl_clear_pending_input (void) !
    ! Unset rl_pending_input, effectively negating the effect of any previous call to rl_execute_next(). This works only if the pending input has not already been read with rl_read_key().
    !

    !

    Function: int rl_set_keyboard_input_timeout (int u) !
    ! While waiting for keyboard input in rl_read_key(), Readline will wait for u microseconds for input before calling any function assigned to rl_event_hook. The default waiting period is one-tenth of a second. Returns the old timeout value.
    !

    ! ! !

    Terminal Management

    !

    Function: void rl_prep_terminal (int meta_flag) !
    ! Modify the terminal settings for Readline's use, so readline() can read a single character at a time from the keyboard. The meta_flag argument should be non-zero if Readline should read eight-bit input.
    !

    !

    Function: void rl_deprep_terminal (void) !
    ! Undo the effects of rl_prep_terminal(), leaving the terminal in the state in which it was before the most recent call to rl_prep_terminal().
    !

    !

    Function: void rl_tty_set_default_bindings (Keymap kmap) !
    ! Read the operating system's terminal editing characters (as would be displayed by stty) to their Readline equivalents. The bindings are performed in kmap.
    !

    !

    Function: int rl_reset_terminal (const char *terminal_name) !
    ! Reinitialize Readline's idea of the terminal settings using terminal_name as the terminal type (e.g., vt100). If terminal_name is NULL, the value of the TERM environment variable is used.
    !

    ! ! !

    Utility Functions

    !

    Function: int rl_extend_line_buffer (int len) !
    ! Ensure that rl_line_buffer has enough space to hold len characters, possibly reallocating it if necessary.
    !

    !

    Function: int rl_initialize (void) !
    ! Initialize or re-initialize Readline's internal state. It's not strictly necessary to call this; readline() calls it before reading any input.
    !

    !

    Function: int rl_ding (void) !
    ! Ring the terminal bell, obeying the setting of bell-style.
    !

    !

    Function: int rl_alphabetic (int c) !
    ! Return 1 if c is an alphabetic character.
    !

    !

    Function: void rl_display_match_list (char **matches, int len, int max) !
    ! A convenience function for displaying a list of strings in columnar format on Readline's output stream. matches is the list of strings, in argv format, such as a list of completion matches. --- 3294,3491 ---- not a kill, a new kill ring slot is used.
    +

    !

    Function: int rl_push_macro_input (char *macro) !
    Cause macro to be inserted into the line, as if it had been invoked by a key bound to a macro. Not especially useful; use rl_insert_text() instead.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.8 Character Input

    !

    + +

    Function: int rl_read_key (void) !
    Return the next character available from Readline's current input stream. This handles input inserted into ! the input stream via rl_pending_input (see section 2.3 Readline Variables) and rl_stuff_char(), macros, and characters read from the keyboard. While waiting for input, this function will call any function assigned to the rl_event_hook variable.
    +

    !

    Function: int rl_getc (FILE *stream) !
    Return the next character available from stream, which is assumed to be the keyboard.
    +

    !

    Function: int rl_stuff_char (int c) !
    Insert c into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with rl_read_key().
    +

    !

    Function: int rl_execute_next (int c) !
    Make c be the next command to be executed when rl_read_key() is called. This sets rl_pending_input.
    +

    !

    Function: int rl_clear_pending_input (void) !
    Unset rl_pending_input, effectively negating the effect of any previous call to rl_execute_next(). This works only if the pending input has not already been read with rl_read_key().
    +

    !

    Function: int rl_set_keyboard_input_timeout (int u) !
    While waiting for keyboard input in rl_read_key(), Readline will wait for u microseconds for input before calling any function assigned to rl_event_hook. The default waiting period is one-tenth of a second. Returns the old timeout value.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.9 Terminal Management

    !

    + +

    Function: void rl_prep_terminal (int meta_flag) !
    Modify the terminal settings for Readline's use, so readline() can read a single character at a time from the keyboard. The meta_flag argument should be non-zero if Readline should read eight-bit input.
    +

    !

    Function: void rl_deprep_terminal (void) !
    Undo the effects of rl_prep_terminal(), leaving the terminal in the state in which it was before the most recent call to rl_prep_terminal().
    +

    !

    Function: void rl_tty_set_default_bindings (Keymap kmap) !
    Read the operating system's terminal editing characters (as would be displayed by stty) to their Readline equivalents. The bindings are performed in kmap.
    +

    !

    Function: int rl_reset_terminal (const char *terminal_name) !
    Reinitialize Readline's idea of the terminal settings using terminal_name as the terminal type (e.g., vt100). If terminal_name is NULL, the value of the TERM environment variable is used.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.10 Utility Functions

    !

    + +

    Function: int rl_extend_line_buffer (int len) !
    Ensure that rl_line_buffer has enough space to hold len characters, possibly reallocating it if necessary.
    +

    !

    Function: int rl_initialize (void) !
    Initialize or re-initialize Readline's internal state. It's not strictly necessary to call this; readline() calls it before reading any input.
    +

    !

    Function: int rl_ding (void) !
    Ring the terminal bell, obeying the setting of bell-style.
    +

    !

    Function: int rl_alphabetic (int c) !
    Return 1 if c is an alphabetic character.
    +

    !

    Function: void rl_display_match_list (char **matches, int len, int max) !
    A convenience function for displaying a list of strings in columnar format on Readline's output stream. matches is the list of strings, in argv format, such as a list of completion matches. *************** *** 3143,3267 **** is the length of the longest string in matches. This function uses the setting of print-completions-horizontally to select how the ! matches are displayed (see section Readline Init File Syntax).
    -

    -

    The following are implemented as macros, defined in chardefs.h. Applications should refrain from using them. !

    !

    Function: int _rl_uppercase_p (int c) !
    ! Return 1 if c is an uppercase alphabetic character.
    !

    !

    Function: int _rl_lowercase_p (int c) !
    ! Return 1 if c is a lowercase alphabetic character.
    !

    !

    Function: int _rl_digit_p (int c) !
    ! Return 1 if c is a numeric character.
    !

    !

    Function: int _rl_to_upper (int c) !
    ! If c is a lowercase alphabetic character, return the corresponding uppercase character.
    !

    !

    Function: int _rl_to_lower (int c) !
    ! If c is an uppercase alphabetic character, return the corresponding lowercase character.
    !

    !

    Function: int _rl_digit_value (int c) !
    ! If c is a number, return the value it represents.
    !

    ! ! !

    Miscellaneous Functions

    !

    Function: int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) !
    ! Bind the key sequence keyseq to invoke the macro macro. The binding is performed in map. When keyseq is invoked, the macro will be inserted into the line. This function is deprecated; use rl_generic_bind() instead.
    !

    !

    Function: void rl_macro_dumper (int readable) !
    ! Print the key sequences bound to macros and their values, using the current keymap, to rl_outstream. If readable is non-zero, the list is formatted in such a way that it can be made part of an inputrc file and re-read.
    !

    !

    Function: int rl_variable_bind (const char *variable, const char *value) !
    ! Make the Readline variable variable have value. This behaves as if the readline command `set variable value' had been executed in an inputrc ! file (see section Readline Init File Syntax).
    !

    !

    Function: void rl_variable_dumper (int readable) !
    ! Print the readline variable names and their current values to rl_outstream. If readable is non-zero, the list is formatted in such a way that it can be made part of an inputrc file and re-read.
    !

    !

    Function: int rl_set_paren_blink_timeout (int u) !
    ! Set the time interval (in microseconds) that Readline waits when showing a balancing character when blink-matching-paren has been enabled.
    !

    ! ! !

    Alternate Interface

    !

    An alternate interface is available to plain readline(). Some applications need to interleave keyboard I/O with file, device, or --- 3493,3644 ---- is the length of the longest string in matches. This function uses the setting of print-completions-horizontally to select how the ! matches are displayed (see section 1.3.1 Readline Init File Syntax).

    +

    The following are implemented as macros, defined in chardefs.h. Applications should refrain from using them. +

    !

    Function: int _rl_uppercase_p (int c) !
    Return 1 if c is an uppercase alphabetic character.
    +

    !

    Function: int _rl_lowercase_p (int c) !
    Return 1 if c is a lowercase alphabetic character.
    +

    !

    Function: int _rl_digit_p (int c) !
    Return 1 if c is a numeric character.
    +

    !

    Function: int _rl_to_upper (int c) !
    If c is a lowercase alphabetic character, return the corresponding uppercase character.
    +

    !

    Function: int _rl_to_lower (int c) !
    If c is an uppercase alphabetic character, return the corresponding lowercase character.
    +

    !

    Function: int _rl_digit_value (int c) !
    If c is a number, return the value it represents.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.11 Miscellaneous Functions

    !

    + +

    Function: int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) !
    Bind the key sequence keyseq to invoke the macro macro. The binding is performed in map. When keyseq is invoked, the macro will be inserted into the line. This function is deprecated; use rl_generic_bind() instead.
    +

    !

    Function: void rl_macro_dumper (int readable) !
    Print the key sequences bound to macros and their values, using the current keymap, to rl_outstream. If readable is non-zero, the list is formatted in such a way that it can be made part of an inputrc file and re-read.
    +

    !

    Function: int rl_variable_bind (const char *variable, const char *value) !
    Make the Readline variable variable have value. This behaves as if the readline command `set variable value' had been executed in an inputrc ! file (see section 1.3.1 Readline Init File Syntax).
    +

    !

    Function: void rl_variable_dumper (int readable) !
    Print the readline variable names and their current values to rl_outstream. If readable is non-zero, the list is formatted in such a way that it can be made part of an inputrc file and re-read.
    +

    !

    Function: int rl_set_paren_blink_timeout (int u) !
    Set the time interval (in microseconds) that Readline waits when showing a balancing character when blink-matching-paren has been enabled.
    +

    ! !

    !
    Function: char * rl_get_termcap (const char *cap) !
    Retrieve the string value of the termcap capability cap. ! Readline fetches the termcap entry for the current terminal name and ! uses those capabilities to move around the screen line and perform other ! terminal-specific operations, like erasing a line. Readline does not ! use all of a terminal's capabilities, and this function will return ! values for only those capabilities Readline uses. !
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.12 Alternate Interface

    !

    + An alternate interface is available to plain readline(). Some applications need to interleave keyboard I/O with file, device, or *************** *** 3270,3291 **** also be invoked as a `callback' function from an event loop. There are functions available to make this easy. !

    !

    Function: void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) !
    ! Set up the terminal for readline I/O and display the initial expanded value of prompt. Save the value of lhandler to use as a function to call when a complete line of input has been entered. The function takes the text of the line as an argument.
    !

    !

    Function: void rl_callback_read_char (void) !
    ! Whenever an application determines that keyboard input is available, it should call rl_callback_read_char(), which will read the next character from the current input source. If that character completes the --- 3647,3666 ---- also be invoked as a `callback' function from an event loop. There are functions available to make this easy. +

    !

    Function: void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) !
    Set up the terminal for readline I/O and display the initial expanded value of prompt. Save the value of lhandler to use as a function to call when a complete line of input has been entered. The function takes the text of the line as an argument.
    +

    !

    Function: void rl_callback_read_char (void) !
    Whenever an application determines that keyboard input is available, it should call rl_callback_read_char(), which will read the next character from the current input source. If that character completes the *************** *** 3295,3314 **** NULL line.
    !

    !

    Function: void rl_callback_handler_remove (void) !
    ! Restore the terminal to its initial state and remove the line handler. This may be called from within a callback as well as independently.
    !

    ! ! !

    A Readline Example

    !

    Here is a function which changes lowercase characters to their uppercase equivalents, and uppercase characters to lowercase. If --- 3670,3701 ---- NULL line.

    +

    !

    Function: void rl_callback_handler_remove (void) !
    Restore the terminal to its initial state and remove the line handler. This may be called from within a callback as well as independently.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.4.13 A Readline Example

    !

    + Here is a function which changes lowercase characters to their uppercase equivalents, and uppercase characters to lowercase. If *************** *** 3317,3325 **** would change the case of the following 10 characters, leaving the cursor on the last character changed. !

    ! !
    ! /* Invert the case of the COUNT following characters. */
      int
      invert_case_line (count, key)
    --- 3704,3710 ----
      would change the case of the following 10 characters, leaving the cursor on
      the last character changed.
    + 

    !
     
    /* Invert the case of the COUNT following characters. */
      int
      invert_case_line (count, key)
    ***************
    *** 3375,3385 ****
        return (0);
      }
    ! 
    ! ! ! !

    Readline Signal Handling

    Signals are asynchronous events sent to a process by the Unix kernel, sometimes on behalf of another process. They are intended to indicate --- 3760,3783 ---- return (0); } !

    + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    2.5 Readline Signal Handling

    +

    + Signals are asynchronous events sent to a process by the Unix kernel, sometimes on behalf of another process. They are intended to indicate *************** *** 3391,3397 **** restore the terminal to a sane state, or provide application writers with functions to do so manually. -

    -

    Readline contains an internal signal handler that is installed for a number of signals (SIGINT, SIGQUIT, SIGTERM, --- 3789,3794 ---- restore the terminal to a sane state, or provide application writers with functions to do so manually. +

    Readline contains an internal signal handler that is installed for a number of signals (SIGINT, SIGQUIT, SIGTERM, *************** *** 3407,3413 **** some additional work, which will cause any partially-entered line to be aborted (see the description of rl_free_line_state() below). -

    -

    There is an additional Readline signal handler, for SIGWINCH, which the kernel sends to a process whenever the terminal's size changes (for --- 3804,3809 ---- some additional work, which will cause any partially-entered line to be aborted (see the description of rl_free_line_state() below). +

    There is an additional Readline signal handler, for SIGWINCH, which the kernel sends to a process whenever the terminal's size changes (for *************** *** 3421,3427 **** call rl_cleanup_after_signal() (described below), to restore the terminal state. -

    -

    Readline provides two variables that allow application writers to control whether or not it will catch certain signals and act on them --- 3817,3822 ---- call rl_cleanup_after_signal() (described below), to restore the terminal state. +

    Readline provides two variables that allow application writers to control whether or not it will catch certain signals and act on them *************** *** 3429,3462 **** values of these variables only when calling readline(), not in a signal handler, so Readline's internal signal state is not corrupted. !

    !

    Variable: int rl_catch_signals !
    ! If this variable is non-zero, Readline will install signal handlers for SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. -

    -

    The default value of rl_catch_signals is 1.

    !

    !

    Variable: int rl_catch_sigwinch !
    ! If this variable is non-zero, Readline will install a signal handler for SIGWINCH. -

    -

    The default value of rl_catch_sigwinch is 1.

    -

    -

    If an application does not wish to have Readline catch any signals, or to handle signals other than those Readline catches (SIGHUP, --- 3824,3852 ---- values of these variables only when calling readline(), not in a signal handler, so Readline's internal signal state is not corrupted. +

    !

    Variable: int rl_catch_signals !
    If this variable is non-zero, Readline will install signal handlers for SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. +

    The default value of rl_catch_signals is 1.

    +

    !

    Variable: int rl_catch_sigwinch !
    If this variable is non-zero, Readline will install a signal handler for SIGWINCH. +

    The default value of rl_catch_sigwinch is 1.

    +

    If an application does not wish to have Readline catch any signals, or to handle signals other than those Readline catches (SIGHUP, *************** *** 3464,3485 **** Readline provides convenience functions to do the necessary terminal and internal state cleanup upon receipt of a signal. !

    !

    Function: void rl_cleanup_after_signal (void) !
    ! This function will reset the state of the terminal to what it was before readline() was called, and remove the Readline signal handlers for all signals, depending on the values of rl_catch_signals and rl_catch_sigwinch.
    !

    !

    Function: void rl_free_line_state (void) !
    ! This will free any partial state associated with the current input line (undo information, any partial history entry, any partially-entered keyboard macro, and any partially-entered numeric argument). This --- 3854,3873 ---- Readline provides convenience functions to do the necessary terminal and internal state cleanup upon receipt of a signal. +

    !

    Function: void rl_cleanup_after_signal (void) !
    This function will reset the state of the terminal to what it was before readline() was called, and remove the Readline signal handlers for all signals, depending on the values of rl_catch_signals and rl_catch_sigwinch.
    +

    !

    Function: void rl_free_line_state (void) !
    This will free any partial state associated with the current input line (undo information, any partial history entry, any partially-entered keyboard macro, and any partially-entered numeric argument). This *************** *** 3488,3571 **** current input line.
    !

    !

    Function: void rl_reset_after_signal (void) !
    ! This will reinitialize the terminal and reinstall any Readline signal handlers, depending on the values of rl_catch_signals and rl_catch_sigwinch.
    -

    -

    If an application does not wish Readline to catch SIGWINCH, it may call rl_resize_terminal() or rl_set_screen_size() to force Readline to update its idea of the terminal size when a SIGWINCH is received. !

    !

    Function: void rl_resize_terminal (void) !
    ! Update Readline's internal screen size by reading values from the kernel.
    !

    !

    Function: void rl_set_screen_size (int rows, int cols) !
    ! Set Readline's idea of the terminal size to rows rows and cols columns.
    -

    -

    If an application does not want to install a SIGWINCH handler, but is still interested in the screen dimensions, Readline's idea of the screen size may be queried. !

    !

    Function: void rl_get_screen_size (int *rows, int *cols) !
    ! Return Readline's idea of the terminal's size in the variables pointed to by the arguments.
    -

    -

    The following functions install and remove Readline's signal handlers. !

    !

    Function: int rl_set_signals (void) !
    ! Install Readline's signal handler for SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, SIGTTOU, and SIGWINCH, depending on the values of rl_catch_signals and rl_catch_sigwinch.
    !

    !

    Function: int rl_clear_signals (void) !
    ! Remove all of the Readline signal handlers installed by rl_set_signals().
    !

    ! ! !

    Custom Completers

    !

    Typically, a program that reads commands from the user has a way of disambiguating commands and data. If your program is one of these, then --- 3876,3963 ---- current input line.

    +

    !

    Function: void rl_reset_after_signal (void) !
    This will reinitialize the terminal and reinstall any Readline signal handlers, depending on the values of rl_catch_signals and rl_catch_sigwinch.
    +

    If an application does not wish Readline to catch SIGWINCH, it may call rl_resize_terminal() or rl_set_screen_size() to force Readline to update its idea of the terminal size when a SIGWINCH is received. +

    !

    Function: void rl_resize_terminal (void) !
    Update Readline's internal screen size by reading values from the kernel.
    +

    !

    Function: void rl_set_screen_size (int rows, int cols) !
    Set Readline's idea of the terminal size to rows rows and cols columns.
    +

    If an application does not want to install a SIGWINCH handler, but is still interested in the screen dimensions, Readline's idea of the screen size may be queried. +

    !

    Function: void rl_get_screen_size (int *rows, int *cols) !
    Return Readline's idea of the terminal's size in the variables pointed to by the arguments.
    +

    The following functions install and remove Readline's signal handlers. +

    !

    Function: int rl_set_signals (void) !
    Install Readline's signal handler for SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, SIGTTOU, and SIGWINCH, depending on the values of rl_catch_signals and rl_catch_sigwinch.
    +

    !

    Function: int rl_clear_signals (void) !
    Remove all of the Readline signal handlers installed by rl_set_signals().
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.6 Custom Completers

    !

    + Typically, a program that reads commands from the user has a way of disambiguating commands and data. If your program is one of these, then *************** *** 3573,3591 **** The following sections describe how your program and Readline cooperate to provide this service. !

    ! ! ! ! ! !

    How Completing Works

    !

    In order to complete some text, the full list of possible completions must be available. That is, it is not possible to accurately --- 3965,3996 ---- The following sections describe how your program and Readline cooperate to provide this service. +

    !

    ! ! ! ! !
    2.6.1 How Completing Works  The logic used to do completion.
    2.6.2 Completion Functions  Functions provided by Readline.
    2.6.3 Completion Variables  Variables which control completion.
    2.6.4 A Short Completion Example  An example of writing completer subroutines.
    !

    ! ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.6.1 How Completing Works

    !

    + In order to complete some text, the full list of possible completions must be available. That is, it is not possible to accurately *************** *** 3596,3609 **** of text, you must write your own completion function. This section describes exactly what such functions must do, and provides an example. -

    -

    There are three major functions used to perform completion: ! !

    1. - The user-interface function rl_complete(). This function is called with the same arguments as other bindable Readline functions: --- 4001,4011 ---- of text, you must write your own completion function. This section describes exactly what such functions must do, and provides an example. +

      There are three major functions used to perform completion: !

      1. The user-interface function rl_complete(). This function is called with the same arguments as other bindable Readline functions: *************** *** 3614,3620 **** completions, or actually performs the completion, depending on which behavior is desired.
      2. - The internal function rl_completion_matches() uses an application-supplied generator function to generate the list of --- 4016,4022 ---- completions, or actually performs the completion, depending on which behavior is desired. +

      3. The internal function rl_completion_matches() uses an application-supplied generator function to generate the list of *************** *** 3622,3628 **** The caller should place the address of its generator function in rl_completion_entry_function.
      4. - The generator function is called repeatedly from rl_completion_matches(), returning a string each time. The --- 4024,4030 ---- The caller should place the address of its generator function in rl_completion_entry_function. +

      5. The generator function is called repeatedly from rl_completion_matches(), returning a string each time. The *************** *** 3638,3659 **** returns as a match must be allocated with malloc(); Readline frees the strings when it has finished with them.
      -

      Function: int rl_complete (int ignore, int invoking_key) !
      ! Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see rl_completion_matches()). The default is to do filename completion.
      !

      !

      Variable: rl_compentry_func_t * rl_completion_entry_function !
      ! This is a pointer to the generator function for rl_completion_matches(). If the value of rl_completion_entry_function is --- 4040,4061 ---- returns as a match must be allocated with malloc(); Readline frees the strings when it has finished with them. +

    + +

    Function: int rl_complete (int ignore, int invoking_key) !
    Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see rl_completion_matches()). The default is to do filename completion.
    +

    !

    Variable: rl_compentry_func_t * rl_completion_entry_function !
    This is a pointer to the generator function for rl_completion_matches(). If the value of rl_completion_entry_function is *************** *** 3661,3680 **** function, rl_filename_completion_function(), is used.
    !

    ! ! !

    Completion Functions

    !

    Here is the complete list of callable completion functions present in Readline. !

    !

    Function: int rl_complete_internal (int what_to_do) !
    ! Complete the word at or before point. what_to_do says what to do with the completion. A value of `?' means list the possible completions. `TAB' means do standard completion. `*' means --- 4063,4094 ---- function, rl_filename_completion_function(), is used.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.6.2 Completion Functions

    !

    + Here is the complete list of callable completion functions present in Readline. +

    !

    Function: int rl_complete_internal (int what_to_do) !
    Complete the word at or before point. what_to_do says what to do with the completion. A value of `?' means list the possible completions. `TAB' means do standard completion. `*' means *************** *** 3683,3693 **** performing partial completion.
    !

    !

    Function: int rl_complete (int ignore, int invoking_key) !
    ! Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see rl_completion_matches() and rl_completion_entry_function). --- 4097,4106 ---- performing partial completion.
    +

    !

    Function: int rl_complete (int ignore, int invoking_key) !
    Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see rl_completion_matches() and rl_completion_entry_function). *************** *** 3696,3733 **** argument depending on invoking_key.
    !

    !

    Function: int rl_possible_completions (int count, int invoking_key) !
    ! List the possible completions. See description of rl_complete (). This calls rl_complete_internal() with an argument of `?'.
    !

    !

    Function: int rl_insert_completions (int count, int invoking_key) !
    ! Insert the list of possible completions into the line, deleting the partially-completed word. See description of rl_complete(). This calls rl_complete_internal() with an argument of `*'.
    !

    !

    Function: char ** rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) !
    ! Returns an array of strings which is a list of completions for text. If there are no completions, returns NULL. The first entry in the returned array is the substitution for text. The remaining entries are the possible completions. The array is terminated with a NULL pointer. -

    -

    entry_func is a function of two args, and returns a char *. The first argument is text. The second is a --- 4109,4142 ---- argument depending on invoking_key.

    +

    !

    Function: int rl_possible_completions (int count, int invoking_key) !
    List the possible completions. See description of rl_complete (). This calls rl_complete_internal() with an argument of `?'.
    +

    !

    Function: int rl_insert_completions (int count, int invoking_key) !
    Insert the list of possible completions into the line, deleting the partially-completed word. See description of rl_complete(). This calls rl_complete_internal() with an argument of `*'.
    +

    !

    Function: char ** rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) !
    Returns an array of strings which is a list of completions for text. If there are no completions, returns NULL. The first entry in the returned array is the substitution for text. The remaining entries are the possible completions. The array is terminated with a NULL pointer. +

    entry_func is a function of two args, and returns a char *. The first argument is text. The second is a *************** *** 3736,3746 **** when there are no more matches.

    !

    !

    Function: char * rl_filename_completion_function (const char *text, int state) !
    ! A generator function for filename completion in the general case. text is a partial filename. The Bash source is a useful reference for writing custom --- 4145,4154 ---- when there are no more matches.
    +

    !

    Function: char * rl_filename_completion_function (const char *text, int state) !
    A generator function for filename completion in the general case. text is a partial filename. The Bash source is a useful reference for writing custom *************** *** 3748,3783 **** Readline functions).
    !

    !

    Function: char * rl_username_completion_function (const char *text, int state) !
    ! A completion generator for usernames. text contains a partial username preceded by a random character (usually `~'). As with all completion generators, state is zero on the first call and non-zero for subsequent calls.
    !

    ! ! !

    Completion Variables

    !

    Variable: rl_compentry_func_t * rl_completion_entry_function !
    ! A pointer to the generator function for rl_completion_matches(). NULL means to use rl_filename_completion_function(), the default filename completer.
    !

    !

    Variable: rl_completion_func_t * rl_attempted_completion_function !
    ! A pointer to an alternative function to create matches. The function is called with text, start, and end. start and end are indices in rl_line_buffer defining --- 4156,4202 ---- Readline functions).
    +

    !

    Function: char * rl_username_completion_function (const char *text, int state) !
    A completion generator for usernames. text contains a partial username preceded by a random character (usually `~'). As with all completion generators, state is zero on the first call and non-zero for subsequent calls.
    +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.6.3 Completion Variables

    !

    + +

    Variable: rl_compentry_func_t * rl_completion_entry_function !
    A pointer to the generator function for rl_completion_matches(). NULL means to use rl_filename_completion_function(), the default filename completer.
    +

    !

    Variable: rl_completion_func_t * rl_attempted_completion_function !
    A pointer to an alternative function to create matches. The function is called with text, start, and end. start and end are indices in rl_line_buffer defining *************** *** 3791,3801 **** completion even if this function returns no matches.
    !

    !

    Variable: rl_quote_func_t * rl_filename_quoting_function !
    ! A pointer to a function that will quote a filename in an application-specific fashion. This is called if filename completion is being attempted and one of the characters in rl_filename_quote_characters --- 4210,4219 ---- completion even if this function returns no matches.
    +

    !

    Variable: rl_quote_func_t * rl_filename_quoting_function !
    A pointer to a function that will quote a filename in an application-specific fashion. This is called if filename completion is being attempted and one of the characters in rl_filename_quote_characters *************** *** 3809,3819 **** to reset this character.
    !

    !

    Variable: rl_dequote_func_t * rl_filename_dequoting_function !
    ! A pointer to a function that will remove application-specific quoting characters from a filename before completion is attempted, so those characters do not interfere with matching the text against names in --- 4227,4236 ---- to reset this character.
    +

    !

    Variable: rl_dequote_func_t * rl_filename_dequoting_function !
    A pointer to a function that will remove application-specific quoting characters from a filename before completion is attempted, so those characters do not interfere with matching the text against names in *************** *** 3823,3833 **** quote_char is zero, the filename was not in an embedded string.
    !

    !

    Variable: rl_linebuf_func_t * rl_char_is_quoted_p !
    ! A pointer to a function to call that determines whether or not a specific character in the line buffer is quoted, according to whatever quoting mechanism the program calling Readline uses. The function is called with --- 4240,4249 ---- quote_char is zero, the filename was not in an embedded string.
    +

    !

    Variable: rl_linebuf_func_t * rl_char_is_quoted_p !
    A pointer to a function to call that determines whether or not a specific character in the line buffer is quoted, according to whatever quoting mechanism the program calling Readline uses. The function is called with *************** *** 3837,3906 **** used to break words for the completer.
    !

    !

    Variable: int rl_completion_query_items !
    ! Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she is sure she wants to see them all. The default value is 100.
    !

    !

    Variable: const char * rl_basic_word_break_characters !
    ! The basic list of characters that signal a break between words for the completer routine. The default value of this variable is the characters which break words for completion in Bash: ! " \t\n\"\\'`@$><=;|&{(".
    !

    !

    Variable: const char * rl_basic_quote_characters !
    ! A list of quote characters which can cause a word break.
    !

    !

    Variable: const char * rl_completer_word_break_characters !
    ! The list of characters that signal a break between words for rl_complete_internal(). The default list is the value of rl_basic_word_break_characters.
    !

    !

    Variable: const char * rl_completer_quote_characters !
    ! A list of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list.
    !

    !

    Variable: const char * rl_filename_quote_characters !
    ! A list of characters that cause a filename to be quoted by the completer when they appear in a completed filename. The default is the null string.
    !

    !

    Variable: const char * rl_special_prefixes !
    ! The list of characters that are word break characters, but should be left in text when it is passed to the completion function. Programs can use this to help determine what kind of completing to do. --- 4253,4315 ---- used to break words for the completer.
    +

    !

    Variable: int rl_completion_query_items !
    Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she is sure she wants to see them all. The default value is 100.
    +

    !

    Variable: const char * rl_basic_word_break_characters !
    The basic list of characters that signal a break between words for the completer routine. The default value of this variable is the characters which break words for completion in Bash: ! " \t\n\"\\'`@$><=;|&{(".
    +

    !

    Variable: const char * rl_basic_quote_characters !
    A list of quote characters which can cause a word break.
    +

    !

    Variable: const char * rl_completer_word_break_characters !
    The list of characters that signal a break between words for rl_complete_internal(). The default list is the value of rl_basic_word_break_characters.
    +

    !

    Variable: const char * rl_completer_quote_characters !
    A list of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, unless they also appear within this list.
    +

    !

    Variable: const char * rl_filename_quote_characters !
    A list of characters that cause a filename to be quoted by the completer when they appear in a completed filename. The default is the null string.
    +

    !

    Variable: const char * rl_special_prefixes !
    The list of characters that are word break characters, but should be left in text when it is passed to the completion function. Programs can use this to help determine what kind of completing to do. *************** *** 3908,3918 **** shell variables and hostnames.
    !

    !

    Variable: int rl_completion_append_character !
    ! When a single completion alternative matches at the end of the command line, this character is appended to the inserted completion text. The default is a space character (` '). Setting this to the null --- 4317,4326 ---- shell variables and hostnames.
    +

    !

    Variable: int rl_completion_append_character !
    When a single completion alternative matches at the end of the command line, this character is appended to the inserted completion text. The default is a space character (` '). Setting this to the null *************** *** 3922,3941 **** an application-specific command line syntax specification.
    !

    !

    Variable: int rl_ignore_completion_duplicates !
    ! If non-zero, then duplicates in the matches are removed. The default is 1.
    !

    !

    Variable: int rl_filename_completion_desired !
    ! Non-zero means that the results of the matches are to be treated as filenames. This is always zero on entry, and can only be changed within a completion entry generator function. If it is set to a non-zero --- 4330,4347 ---- an application-specific command line syntax specification.
    +

    !

    Variable: int rl_ignore_completion_duplicates !
    If non-zero, then duplicates in the matches are removed. The default is 1.
    +

    !

    Variable: int rl_filename_completion_desired !
    Non-zero means that the results of the matches are to be treated as filenames. This is always zero on entry, and can only be changed within a completion entry generator function. If it is set to a non-zero *************** *** 3945,3955 **** is set to a non-zero value.
    !

    !

    Variable: int rl_filename_quoting_desired !
    ! Non-zero means that the results of the matches are to be quoted using double quotes (or an application-specific quoting mechanism) if the completed filename contains any characters in --- 4351,4360 ---- is set to a non-zero value.
    +

    !

    Variable: int rl_filename_quoting_desired !
    Non-zero means that the results of the matches are to be quoted using double quotes (or an application-specific quoting mechanism) if the completed filename contains any characters in *************** *** 3959,3969 **** by rl_filename_quoting_function.
    !

    !

    Variable: int rl_attempted_completion_over !
    ! If an application-specific completion function assigned to rl_attempted_completion_function sets this variable to a non-zero value, Readline will not perform its default filename completion even --- 4364,4373 ---- by rl_filename_quoting_function.
    +

    !

    Variable: int rl_attempted_completion_over !
    If an application-specific completion function assigned to rl_attempted_completion_function sets this variable to a non-zero value, Readline will not perform its default filename completion even *************** *** 3971,4000 **** It should be set only by an application's completion function.
    !

    !

    Variable: int rl_completion_type !
    ! Set to a character describing the type of completion Readline is currently attempting; see the description of rl_complete_internal() ! (see section Completion Functions) for the list of characters.
    !

    !

    Variable: int rl_inhibit_completion !
    ! If this variable is non-zero, completion is inhibited. The completion character will be inserted as any other bound to self-insert.
    !

    !

    Variable: rl_compignore_func_t * rl_ignore_some_completions_function !
    ! This function, if defined, is called by the completer when real filename completion is done, after all the matching names have been generated. It is passed a NULL terminated array of matches. --- 4375,4401 ---- It should be set only by an application's completion function.
    +

    !

    Variable: int rl_completion_type !
    Set to a character describing the type of completion Readline is currently attempting; see the description of rl_complete_internal() ! (see section 2.6.2 Completion Functions) for the list of characters.
    +

    !

    Variable: int rl_inhibit_completion !
    If this variable is non-zero, completion is inhibited. The completion character will be inserted as any other bound to self-insert.
    +

    !

    Variable: rl_compignore_func_t * rl_ignore_some_completions_function !
    This function, if defined, is called by the completer when real filename completion is done, after all the matching names have been generated. It is passed a NULL terminated array of matches. *************** *** 4004,4014 **** from the array must be freed.
    !

    !

    Variable: rl_icppfunc_t * rl_directory_completion_hook !
    ! This function, if defined, is allowed to modify the directory portion of filenames Readline completes. It is called with the address of a string (the current directory name) as an argument, and may modify that string. --- 4405,4414 ---- from the array must be freed.
    +

    !

    Variable: rl_icppfunc_t * rl_directory_completion_hook !
    This function, if defined, is allowed to modify the directory portion of filenames Readline completes. It is called with the address of a string (the current directory name) as an argument, and may modify that string. *************** *** 4021,4031 **** It could be used to expand symbolic links or shell variables in pathnames.
    !

    !

    Variable: rl_compdisp_func_t * rl_completion_display_matches_hook !
    ! If non-zero, then this is the address of a function to call when completing a word would normally display the list of possible matches. This function is called in lieu of Readline displaying the list. --- 4421,4430 ---- It could be used to expand symbolic links or shell variables in pathnames.
    +

    !

    Variable: rl_compdisp_func_t * rl_completion_display_matches_hook !
    If non-zero, then this is the address of a function to call when completing a word would normally display the list of possible matches. This function is called in lieu of Readline displaying the list. *************** *** 4039,4049 **** function may be called from this hook.
    !

    ! ! !

    A Short Completion Example

    !

    Here is a small application demonstrating the use of the GNU Readline library. It is called fileman, and the source code resides in --- 4438,4461 ---- function may be called from this hook. +

    ! !


    ! ! ! ! ! ! ! ! ! ! ! !
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    !

    2.6.4 A Short Completion Example

    !

    + Here is a small application demonstrating the use of the GNU Readline library. It is called fileman, and the source code resides in *************** *** 4051,4059 **** completion of command names, line editing features, and access to the history list. !

    ! !
    ! /* fileman.c -- A tiny application which demonstrates how to use the
         GNU Readline library.  This application interactively allows users
         to manipulate files and their modes. */
    --- 4463,4469 ----
      completion of command names, line editing features, and access to the
      history list.
    + 

    !
     
    /* fileman.c -- A tiny application which demonstrates how to use the
         GNU Readline library.  This application interactively allows users
         to manipulate files and their modes. */
    ***************
    *** 4489,4907 ****
        return (1);
      }
    ! 
    -

    Concept Index

    -

    - Jump to: - c - - - e - - - i - - - k - - - n - - - r - - - v - - - y -

    -

    c

    - -
  • command editing -
  • -

    e

    - -
  • editing command lines -
  • -

    i

    - -
  • initialization file, readline -
  • interaction, readline -
  • -

    k

    - -
  • kill ring -
  • killing text -
  • -

    n

    - -
  • notation, readline -
  • -

    r

    - -
  • readline, function -
  • -

    v

    - -
  • variables, readline -
  • -

    y

    - -
  • yanking text -
  • - -

    - - -

    Function and Variable Index

    -

    - Jump to: - _ - - - a - - - b - - - c - - - d - - - e - - - f - - - h - - - i - - - k - - - m - - - n - - - o - - - p - - - q - - - r - - - s - - - t - - - u - - - v - - - y -

    -

    _

    - -
  • _rl_digit_p -
  • _rl_digit_value -
  • _rl_lowercase_p -
  • _rl_to_lower -
  • _rl_to_upper -
  • _rl_uppercase_p -
  • -

    a

    - -
  • abort (C-g) -
  • accept-line (Newline or Return) -
  • -

    b

    - -
  • backward-char (C-b) -
  • backward-delete-char (Rubout) -
  • backward-kill-line (C-x Rubout) -
  • backward-kill-word (M-DEL) -
  • backward-word (M-b) -
  • beginning-of-history (M-&#60;) -
  • beginning-of-line (C-a) -
  • bell-style -
  • -

    c

    - -
  • call-last-kbd-macro (C-x e) -
  • capitalize-word (M-c) -
  • character-search (C-]) -
  • character-search-backward (M-C-]) -
  • clear-screen (C-l) -
  • comment-begin -
  • complete (TAB) -
  • completion-query-items -
  • convert-meta -
  • copy-backward-word () -
  • copy-forward-word () -
  • copy-region-as-kill () -
  • -

    d

    - -
  • delete-char (C-d) -
  • delete-char-or-list () -
  • delete-horizontal-space () -
  • digit-argument (M-0, M-1, ... M--) -
  • disable-completion -
  • do-uppercase-version (M-a, M-b, M-x, ...) -
  • downcase-word (M-l) -
  • dump-functions () -
  • dump-macros () -
  • dump-variables () -
  • -

    e

    - -
  • editing-mode -
  • enable-keypad -
  • end-kbd-macro (C-x )) -
  • end-of-history (M-&#62;) -
  • end-of-line (C-e) -
  • exchange-point-and-mark (C-x C-x) -
  • expand-tilde -
  • -

    f

    - -
  • forward-backward-delete-char () -
  • forward-char (C-f) -
  • forward-search-history (C-s) -
  • forward-word (M-f) -
  • -

    h

    - -
  • history-search-backward () -
  • history-search-forward () -
  • horizontal-scroll-mode -
  • -

    i

    - -
  • input-meta -
  • insert-comment (M-#) -
  • insert-completions (M-*) -
  • isearch-terminators -
  • -

    k

    - -
  • keymap -
  • kill-line (C-k) -
  • kill-region () -
  • kill-whole-line () -
  • kill-word (M-d) -
  • -

    m

    - -
  • mark-modified-lines -
  • menu-complete () -
  • meta-flag -
  • -

    n

    - -
  • next-history (C-n) -
  • non-incremental-forward-search-history (M-n) -
  • non-incremental-reverse-search-history (M-p) -
  • -

    o

    - -
  • output-meta -
  • -

    p

    - -
  • possible-completions (M-?) -
  • prefix-meta (ESC) -
  • previous-history (C-p) -
  • -

    q

    - -
  • quoted-insert (C-q or C-v) -
  • -

    r

    - -
  • re-read-init-file (C-x C-r) -
  • readline -
  • redraw-current-line () -
  • reverse-search-history (C-r) -
  • revert-line (M-r) -
  • rl_add_defun -
  • rl_add_funmap_entry -
  • rl_add_undo -
  • rl_alphabetic -
  • rl_already_prompted -
  • rl_attempted_completion_function -
  • rl_attempted_completion_over -
  • rl_basic_quote_characters -
  • rl_basic_word_break_characters -
  • rl_begin_undo_group -
  • rl_bind_key -
  • rl_bind_key_in_map -
  • rl_binding_keymap -
  • rl_callback_handler_install -
  • rl_callback_handler_remove -
  • rl_callback_read_char -
  • rl_catch_signals -
  • rl_catch_sigwinch -
  • rl_char_is_quoted_p -
  • rl_cleanup_after_signal -
  • rl_clear_message -
  • rl_clear_pending_input -
  • rl_clear_signals -
  • rl_complete, rl_complete -
  • rl_complete_internal -
  • rl_completer_quote_characters -
  • rl_completer_word_break_characters -
  • rl_completion_append_character -
  • rl_completion_display_matches_hook -
  • rl_completion_entry_function, rl_completion_entry_function -
  • rl_completion_matches -
  • rl_completion_query_items -
  • rl_completion_type -
  • rl_copy_keymap -
  • rl_copy_text -
  • rl_crlf -
  • rl_delete_text -
  • rl_deprep_term_function -
  • rl_deprep_terminal -
  • rl_ding -
  • rl_directory_completion_hook -
  • rl_discard_keymap -
  • rl_dispatching -
  • rl_display_match_list -
  • rl_do_undo -
  • rl_done -
  • rl_editing_mode -
  • rl_end -
  • rl_end_undo_group -
  • rl_erase_empty_line -
  • rl_event_hook -
  • rl_execute_next -
  • rl_executing_keymap -
  • rl_executing_macro -
  • rl_expand_prompt -
  • rl_explicit_arg -
  • rl_extend_line_buffer -
  • rl_filename_completion_desired -
  • rl_filename_completion_function -
  • rl_filename_dequoting_function -
  • rl_filename_quote_characters -
  • rl_filename_quoting_desired -
  • rl_filename_quoting_function -
  • rl_forced_update_display -
  • rl_free_line_state -
  • rl_free_undo_list -
  • rl_function_dumper -
  • rl_function_of_keyseq -
  • rl_funmap_names -
  • rl_generic_bind -
  • rl_get_keymap -
  • rl_get_keymap_by_name -
  • rl_get_keymap_name -
  • rl_get_screen_size -
  • rl_getc -
  • rl_getc_function -
  • rl_gnu_readline_p -
  • rl_ignore_completion_duplicates -
  • rl_ignore_some_completions_function -
  • rl_inhibit_completion -
  • rl_initialize -
  • rl_insert_completions -
  • rl_insert_text -
  • rl_instream -
  • rl_invoking_keyseqs -
  • rl_invoking_keyseqs_in_map -
  • rl_kill_text -
  • rl_last_func -
  • rl_library_version -
  • rl_line_buffer -
  • rl_list_funmap_names -
  • rl_macro_bind -
  • rl_macro_dumper -
  • rl_make_bare_keymap -
  • rl_make_keymap -
  • rl_mark -
  • rl_message -
  • rl_modifying -
  • rl_named_function -
  • rl_num_chars_to_read -
  • rl_numeric_arg -
  • rl_on_new_line -
  • rl_on_new_line_with_prompt -
  • rl_outstream -
  • rl_parse_and_bind -
  • rl_pending_input -
  • rl_point -
  • rl_possible_completions -
  • rl_pre_input_hook -
  • rl_prep_term_function -
  • rl_prep_terminal -
  • rl_prompt -
  • rl_push_macro_input -
  • rl_read_init_file -
  • rl_read_key -
  • rl_readline_name -
  • rl_readline_state -
  • rl_redisplay -
  • rl_redisplay_function -
  • rl_reset_after_signal -
  • rl_reset_line_state -
  • rl_reset_terminal -
  • rl_resize_terminal -
  • rl_restore_prompt -
  • rl_save_prompt -
  • rl_set_key -
  • rl_set_keyboard_input_timeout -
  • rl_set_keymap -
  • rl_set_paren_blink_timeout -
  • rl_set_prompt -
  • rl_set_screen_size -
  • rl_set_signals -
  • rl_show_char -
  • rl_special_prefixes -
  • rl_startup_hook -
  • rl_stuff_char -
  • rl_terminal_name -
  • rl_tty_set_default_bindings -
  • rl_unbind_command_in_map -
  • rl_unbind_function_in_map -
  • rl_unbind_key -
  • rl_unbind_key_in_map -
  • rl_username_completion_function -
  • rl_variable_bind -
  • rl_variable_dumper -
  • -

    s

    - -
  • self-insert (a, b, A, 1, !, ...) -
  • set-mark (C-@) -
  • show-all-if-ambiguous -
  • start-kbd-macro (C-x () -
  • -

    t

    - -
  • tab-insert (M-TAB) -
  • tilde-expand (M-~) -
  • transpose-chars (C-t) -
  • transpose-words (M-t) -
  • -

    u

    - -
  • undo (C-_ or C-x C-u) -
  • universal-argument () -
  • unix-line-discard (C-u) -
  • unix-word-rubout (C-w) -
  • upcase-word (M-u) -
  • -

    v

    - -
  • visible-stats -
  • -

    y

    - -
  • yank (C-y) -
  • yank-last-arg (M-. or M-_) -
  • yank-nth-arg (M-C-y) -
  • yank-pop (M-y) -
  • - -

    -


    - This document was generated on 16 April 2001 using the - texi2html - translator version 1.52.

    --- 4899,5773 ---- return (1); } !

    + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    Concept Index

    + +
    Jump to:   C +   + E +   + I +   + K +   + N +   + R +   + V +   + Y +   +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Index Entry Section

    C
    command editing1.2.1 Readline Bare Essentials

    E
    editing command lines1.2.1 Readline Bare Essentials

    I
    initialization file, readline1.3 Readline Init File
    interaction, readline1.2 Readline Interaction

    K
    kill ring1.2.3 Readline Killing Commands
    killing text1.2.3 Readline Killing Commands

    N
    notation, readline1.2.1 Readline Bare Essentials

    R
    readline, function2.1 Basic Behavior

    V
    variables, readline1.3.1 Readline Init File Syntax

    Y
    yanking text1.2.3 Readline Killing Commands

    Jump to:   C +   + E +   + I +   + K +   + N +   + R +   + V +   + Y +   +

    + + +


    + + + + + + + + + + + +
    [ < ][ > ]   [ << ][ Up ][ >> ]         [Top][Contents][Index][ ? ]
    +

    Function and Variable Index

    + +
    Jump to:   _ +   +
    + A +   + B +   + C +   + D +   + E +   + F +   + H +   + I +   + K +   + M +   + N +   + O +   + P +   + Q +   + R +   + S +   + T +   + U +   + V +   + Y +   +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Index Entry Section

    _
    _rl_digit_p2.4.10 Utility Functions
    _rl_digit_value2.4.10 Utility Functions
    _rl_lowercase_p2.4.10 Utility Functions
    _rl_to_lower2.4.10 Utility Functions
    _rl_to_upper2.4.10 Utility Functions
    _rl_uppercase_p2.4.10 Utility Functions

    A
    abort (C-g)1.4.8 Some Miscellaneous Commands
    abort (C-g)1.4.8 Some Miscellaneous Commands
    accept-line (Newline or Return)1.4.2 Commands For Manipulating The History
    accept-line (Newline or Return)1.4.2 Commands For Manipulating The History

    B
    backward-char (C-b)1.4.1 Commands For Moving
    backward-char (C-b)1.4.1 Commands For Moving
    backward-delete-char (Rubout)1.4.3 Commands For Changing Text
    backward-delete-char (Rubout)1.4.3 Commands For Changing Text
    backward-kill-line (C-x Rubout)1.4.4 Killing And Yanking
    backward-kill-line (C-x Rubout)1.4.4 Killing And Yanking
    backward-kill-word (M-DEL)1.4.4 Killing And Yanking
    backward-kill-word (M-DEL)1.4.4 Killing And Yanking
    backward-word (M-b)1.4.1 Commands For Moving
    backward-word (M-b)1.4.1 Commands For Moving
    beginning-of-history (M-&#60;)1.4.2 Commands For Manipulating The History
    beginning-of-history (M-&#60;)1.4.2 Commands For Manipulating The History
    beginning-of-line (C-a)1.4.1 Commands For Moving
    beginning-of-line (C-a)1.4.1 Commands For Moving
    bell-style1.3.1 Readline Init File Syntax

    C
    call-last-kbd-macro (C-x e)1.4.7 Keyboard Macros
    call-last-kbd-macro (C-x e)1.4.7 Keyboard Macros
    capitalize-word (M-c)1.4.3 Commands For Changing Text
    capitalize-word (M-c)1.4.3 Commands For Changing Text
    character-search (C-])1.4.8 Some Miscellaneous Commands
    character-search (C-])1.4.8 Some Miscellaneous Commands
    character-search-backward (M-C-])1.4.8 Some Miscellaneous Commands
    character-search-backward (M-C-])1.4.8 Some Miscellaneous Commands
    clear-screen (C-l)1.4.1 Commands For Moving
    clear-screen (C-l)1.4.1 Commands For Moving
    comment-begin1.3.1 Readline Init File Syntax
    complete (TAB)1.4.6 Letting Readline Type For You
    complete (TAB)1.4.6 Letting Readline Type For You
    completion-query-items1.3.1 Readline Init File Syntax
    convert-meta1.3.1 Readline Init File Syntax
    copy-backward-word ()1.4.4 Killing And Yanking
    copy-backward-word ()1.4.4 Killing And Yanking
    copy-forward-word ()1.4.4 Killing And Yanking
    copy-forward-word ()1.4.4 Killing And Yanking
    copy-region-as-kill ()1.4.4 Killing And Yanking
    copy-region-as-kill ()1.4.4 Killing And Yanking

    D
    delete-char (C-d)1.4.3 Commands For Changing Text
    delete-char (C-d)1.4.3 Commands For Changing Text
    delete-char-or-list ()1.4.6 Letting Readline Type For You
    delete-char-or-list ()1.4.6 Letting Readline Type For You
    delete-horizontal-space ()1.4.4 Killing And Yanking
    delete-horizontal-space ()1.4.4 Killing And Yanking
    digit-argument (M-0, M-1, <small>...</small> M--)1.4.5 Specifying Numeric Arguments
    digit-argument (M-0, M-1, <small>...</small> M--)1.4.5 Specifying Numeric Arguments
    disable-completion1.3.1 Readline Init File Syntax
    do-uppercase-version (M-a, M-b, M-x, <small>...</small>)1.4.8 Some Miscellaneous Commands
    do-uppercase-version (M-a, M-b, M-x, <small>...</small>)1.4.8 Some Miscellaneous Commands
    downcase-word (M-l)1.4.3 Commands For Changing Text
    downcase-word (M-l)1.4.3 Commands For Changing Text
    dump-functions ()1.4.8 Some Miscellaneous Commands
    dump-functions ()1.4.8 Some Miscellaneous Commands
    dump-macros ()1.4.8 Some Miscellaneous Commands
    dump-macros ()1.4.8 Some Miscellaneous Commands
    dump-variables ()1.4.8 Some Miscellaneous Commands
    dump-variables ()1.4.8 Some Miscellaneous Commands

    E
    editing-mode1.3.1 Readline Init File Syntax
    enable-keypad1.3.1 Readline Init File Syntax
    end-kbd-macro (C-x ))1.4.7 Keyboard Macros
    end-kbd-macro (C-x ))1.4.7 Keyboard Macros
    end-of-history (M-&#62;)1.4.2 Commands For Manipulating The History
    end-of-history (M-&#62;)1.4.2 Commands For Manipulating The History
    end-of-line (C-e)1.4.1 Commands For Moving
    end-of-line (C-e)1.4.1 Commands For Moving
    exchange-point-and-mark (C-x C-x)1.4.8 Some Miscellaneous Commands
    exchange-point-and-mark (C-x C-x)1.4.8 Some Miscellaneous Commands
    expand-tilde1.3.1 Readline Init File Syntax

    F
    forward-backward-delete-char ()1.4.3 Commands For Changing Text
    forward-backward-delete-char ()1.4.3 Commands For Changing Text
    forward-char (C-f)1.4.1 Commands For Moving
    forward-char (C-f)1.4.1 Commands For Moving
    forward-search-history (C-s)1.4.2 Commands For Manipulating The History
    forward-search-history (C-s)1.4.2 Commands For Manipulating The History
    forward-word (M-f)1.4.1 Commands For Moving
    forward-word (M-f)1.4.1 Commands For Moving

    H
    history-preserve-point1.3.1 Readline Init File Syntax
    history-search-backward ()1.4.2 Commands For Manipulating The History
    history-search-backward ()1.4.2 Commands For Manipulating The History
    history-search-forward ()1.4.2 Commands For Manipulating The History
    history-search-forward ()1.4.2 Commands For Manipulating The History
    horizontal-scroll-mode1.3.1 Readline Init File Syntax

    I
    input-meta1.3.1 Readline Init File Syntax
    insert-comment (M-#)1.4.8 Some Miscellaneous Commands
    insert-comment (M-#)1.4.8 Some Miscellaneous Commands
    insert-completions (M-*)1.4.6 Letting Readline Type For You
    insert-completions (M-*)1.4.6 Letting Readline Type For You
    isearch-terminators1.3.1 Readline Init File Syntax

    K
    keymap1.3.1 Readline Init File Syntax
    kill-line (C-k)1.4.4 Killing And Yanking
    kill-line (C-k)1.4.4 Killing And Yanking
    kill-region ()1.4.4 Killing And Yanking
    kill-region ()1.4.4 Killing And Yanking
    kill-whole-line ()1.4.4 Killing And Yanking
    kill-whole-line ()1.4.4 Killing And Yanking
    kill-word (M-d)1.4.4 Killing And Yanking
    kill-word (M-d)1.4.4 Killing And Yanking

    M
    mark-modified-lines1.3.1 Readline Init File Syntax
    match-hidden-files1.3.1 Readline Init File Syntax
    menu-complete ()1.4.6 Letting Readline Type For You
    menu-complete ()1.4.6 Letting Readline Type For You
    meta-flag1.3.1 Readline Init File Syntax

    N
    next-history (C-n)1.4.2 Commands For Manipulating The History
    next-history (C-n)1.4.2 Commands For Manipulating The History
    non-incremental-forward-search-history (M-n)1.4.2 Commands For Manipulating The History
    non-incremental-forward-search-history (M-n)1.4.2 Commands For Manipulating The History
    non-incremental-reverse-search-history (M-p)1.4.2 Commands For Manipulating The History
    non-incremental-reverse-search-history (M-p)1.4.2 Commands For Manipulating The History

    O
    output-meta1.3.1 Readline Init File Syntax

    P
    possible-completions (M-?)1.4.6 Letting Readline Type For You
    possible-completions (M-?)1.4.6 Letting Readline Type For You
    prefix-meta (ESC)1.4.8 Some Miscellaneous Commands
    prefix-meta (ESC)1.4.8 Some Miscellaneous Commands
    previous-history (C-p)1.4.2 Commands For Manipulating The History
    previous-history (C-p)1.4.2 Commands For Manipulating The History

    Q
    quoted-insert (C-q or C-v)1.4.3 Commands For Changing Text
    quoted-insert (C-q or C-v)1.4.3 Commands For Changing Text

    R
    re-read-init-file (C-x C-r)1.4.8 Some Miscellaneous Commands
    re-read-init-file (C-x C-r)1.4.8 Some Miscellaneous Commands
    readline2.1 Basic Behavior
    redraw-current-line ()1.4.1 Commands For Moving
    redraw-current-line ()1.4.1 Commands For Moving
    reverse-search-history (C-r)1.4.2 Commands For Manipulating The History
    reverse-search-history (C-r)1.4.2 Commands For Manipulating The History
    revert-line (M-r)1.4.8 Some Miscellaneous Commands
    revert-line (M-r)1.4.8 Some Miscellaneous Commands
    rl_add_defun2.4.1 Naming a Function
    rl_add_funmap_entry2.4.4 Associating Function Names and Bindings
    rl_add_undo2.4.5 Allowing Undoing
    rl_alphabetic2.4.10 Utility Functions
    rl_already_prompted2.3 Readline Variables
    rl_attempted_completion_function2.6.3 Completion Variables
    rl_attempted_completion_over2.6.3 Completion Variables
    rl_basic_quote_characters2.6.3 Completion Variables
    rl_basic_word_break_characters2.6.3 Completion Variables
    rl_begin_undo_group2.4.5 Allowing Undoing
    rl_bind_key2.4.3 Binding Keys
    rl_bind_key_in_map2.4.3 Binding Keys
    rl_binding_keymap2.3 Readline Variables
    rl_callback_handler_install2.4.12 Alternate Interface
    rl_callback_handler_remove2.4.12 Alternate Interface
    rl_callback_read_char2.4.12 Alternate Interface
    rl_catch_signals2.5 Readline Signal Handling
    rl_catch_sigwinch2.5 Readline Signal Handling
    rl_char_is_quoted_p2.6.3 Completion Variables
    rl_cleanup_after_signal2.5 Readline Signal Handling
    rl_clear_message2.4.6 Redisplay
    rl_clear_pending_input2.4.8 Character Input
    rl_clear_signals2.5 Readline Signal Handling
    rl_complete2.6.1 How Completing Works
    rl_complete2.6.2 Completion Functions
    rl_complete_internal2.6.2 Completion Functions
    rl_completer_quote_characters2.6.3 Completion Variables
    rl_completer_word_break_characters2.6.3 Completion Variables
    rl_completion_append_character2.6.3 Completion Variables
    rl_completion_display_matches_hook2.6.3 Completion Variables
    rl_completion_entry_function2.6.1 How Completing Works
    rl_completion_entry_function2.6.3 Completion Variables
    rl_completion_matches2.6.2 Completion Functions
    rl_completion_query_items2.6.3 Completion Variables
    rl_completion_type2.6.3 Completion Variables
    rl_copy_keymap2.4.2 Selecting a Keymap
    rl_copy_text2.4.7 Modifying Text
    rl_crlf2.4.6 Redisplay
    rl_delete_text2.4.7 Modifying Text
    rl_deprep_term_function2.3 Readline Variables
    rl_deprep_terminal2.4.9 Terminal Management
    rl_ding2.4.10 Utility Functions
    rl_directory_completion_hook2.6.3 Completion Variables
    rl_discard_keymap2.4.2 Selecting a Keymap
    rl_dispatching2.3 Readline Variables
    rl_display_match_list2.4.10 Utility Functions
    rl_do_undo2.4.5 Allowing Undoing
    rl_done2.3 Readline Variables
    rl_editing_mode2.3 Readline Variables
    rl_end2.3 Readline Variables
    rl_end_undo_group2.4.5 Allowing Undoing
    rl_erase_empty_line2.3 Readline Variables
    rl_event_hook2.3 Readline Variables
    rl_execute_next2.4.8 Character Input
    rl_executing_keymap2.3 Readline Variables
    rl_executing_macro2.3 Readline Variables
    rl_expand_prompt2.4.6 Redisplay
    rl_explicit_arg2.3 Readline Variables
    rl_extend_line_buffer2.4.10 Utility Functions
    rl_filename_completion_desired2.6.3 Completion Variables
    rl_filename_completion_function2.6.2 Completion Functions
    rl_filename_dequoting_function2.6.3 Completion Variables
    rl_filename_quote_characters2.6.3 Completion Variables
    rl_filename_quoting_desired2.6.3 Completion Variables
    rl_filename_quoting_function2.6.3 Completion Variables
    rl_forced_update_display2.4.6 Redisplay
    rl_free_line_state2.5 Readline Signal Handling
    rl_free_undo_list2.4.5 Allowing Undoing
    rl_function_dumper2.4.4 Associating Function Names and Bindings
    rl_function_of_keyseq2.4.4 Associating Function Names and Bindings
    rl_funmap_names2.4.4 Associating Function Names and Bindings
    rl_generic_bind2.4.3 Binding Keys
    rl_get_keymap2.4.2 Selecting a Keymap
    rl_get_keymap_by_name2.4.2 Selecting a Keymap
    rl_get_keymap_name2.4.2 Selecting a Keymap
    rl_get_screen_size2.5 Readline Signal Handling
    rl_get_termcap2.4.11 Miscellaneous Functions
    rl_getc2.4.8 Character Input
    rl_getc_function2.3 Readline Variables
    rl_gnu_readline_p2.3 Readline Variables
    rl_ignore_completion_duplicates2.6.3 Completion Variables
    rl_ignore_some_completions_function2.6.3 Completion Variables
    rl_inhibit_completion2.6.3 Completion Variables
    rl_initialize2.4.10 Utility Functions
    rl_insert_completions2.6.2 Completion Functions
    rl_insert_text2.4.7 Modifying Text
    rl_instream2.3 Readline Variables
    rl_invoking_keyseqs2.4.4 Associating Function Names and Bindings
    rl_invoking_keyseqs_in_map2.4.4 Associating Function Names and Bindings
    rl_kill_text2.4.7 Modifying Text
    rl_last_func2.3 Readline Variables
    rl_library_version2.3 Readline Variables
    rl_line_buffer2.3 Readline Variables
    rl_list_funmap_names2.4.4 Associating Function Names and Bindings
    rl_macro_bind2.4.11 Miscellaneous Functions
    rl_macro_dumper2.4.11 Miscellaneous Functions
    rl_make_bare_keymap2.4.2 Selecting a Keymap
    rl_make_keymap2.4.2 Selecting a Keymap
    rl_mark2.3 Readline Variables
    rl_message2.4.6 Redisplay
    rl_modifying2.4.5 Allowing Undoing
    rl_named_function2.4.4 Associating Function Names and Bindings
    rl_num_chars_to_read2.3 Readline Variables
    rl_numeric_arg2.3 Readline Variables
    rl_on_new_line2.4.6 Redisplay
    rl_on_new_line_with_prompt2.4.6 Redisplay
    rl_outstream2.3 Readline Variables
    rl_parse_and_bind2.4.3 Binding Keys
    rl_pending_input2.3 Readline Variables
    rl_point2.3 Readline Variables
    rl_possible_completions2.6.2 Completion Functions
    rl_pre_input_hook2.3 Readline Variables
    rl_prep_term_function2.3 Readline Variables
    rl_prep_terminal2.4.9 Terminal Management
    rl_prompt2.3 Readline Variables
    rl_push_macro_input2.4.7 Modifying Text
    rl_read_init_file2.4.3 Binding Keys
    rl_read_key2.4.8 Character Input
    rl_readline_name2.3 Readline Variables
    rl_readline_state2.3 Readline Variables
    rl_readline_version2.3 Readline Variables
    rl_redisplay2.4.6 Redisplay
    rl_redisplay_function2.3 Readline Variables
    rl_reset_after_signal2.5 Readline Signal Handling
    rl_reset_line_state2.4.6 Redisplay
    rl_reset_terminal2.4.9 Terminal Management
    rl_resize_terminal2.5 Readline Signal Handling
    rl_restore_prompt2.4.6 Redisplay
    rl_save_prompt2.4.6 Redisplay
    rl_set_key2.4.3 Binding Keys
    rl_set_keyboard_input_timeout2.4.8 Character Input
    rl_set_keymap2.4.2 Selecting a Keymap
    rl_set_paren_blink_timeout2.4.11 Miscellaneous Functions
    rl_set_prompt2.4.6 Redisplay
    rl_set_screen_size2.5 Readline Signal Handling
    rl_set_signals2.5 Readline Signal Handling
    rl_show_char2.4.6 Redisplay
    rl_special_prefixes2.6.3 Completion Variables
    rl_startup_hook2.3 Readline Variables
    rl_stuff_char2.4.8 Character Input
    rl_terminal_name2.3 Readline Variables
    rl_tty_set_default_bindings2.4.9 Terminal Management
    rl_unbind_command_in_map2.4.3 Binding Keys
    rl_unbind_function_in_map2.4.3 Binding Keys
    rl_unbind_key2.4.3 Binding Keys
    rl_unbind_key_in_map2.4.3 Binding Keys
    rl_username_completion_function2.6.2 Completion Functions
    rl_variable_bind2.4.11 Miscellaneous Functions
    rl_variable_dumper2.4.11 Miscellaneous Functions

    S
    self-insert (a, b, A, 1, !, <small>...</small>)1.4.3 Commands For Changing Text
    self-insert (a, b, A, 1, !, <small>...</small>)1.4.3 Commands For Changing Text
    set-mark (C-@)1.4.8 Some Miscellaneous Commands
    set-mark (C-@)1.4.8 Some Miscellaneous Commands
    show-all-if-ambiguous1.3.1 Readline Init File Syntax
    start-kbd-macro (C-x ()1.4.7 Keyboard Macros
    start-kbd-macro (C-x ()1.4.7 Keyboard Macros

    T
    tab-insert (M-TAB)1.4.3 Commands For Changing Text
    tab-insert (M-TAB)1.4.3 Commands For Changing Text
    tilde-expand (M-~)1.4.8 Some Miscellaneous Commands
    tilde-expand (M-~)1.4.8 Some Miscellaneous Commands
    transpose-chars (C-t)1.4.3 Commands For Changing Text
    transpose-chars (C-t)1.4.3 Commands For Changing Text
    transpose-words (M-t)1.4.3 Commands For Changing Text
    transpose-words (M-t)1.4.3 Commands For Changing Text

    U
    undo (C-_ or C-x C-u)1.4.8 Some Miscellaneous Commands
    undo (C-_ or C-x C-u)1.4.8 Some Miscellaneous Commands
    universal-argument ()1.4.5 Specifying Numeric Arguments
    universal-argument ()1.4.5 Specifying Numeric Arguments
    unix-line-discard (C-u)1.4.4 Killing And Yanking
    unix-line-discard (C-u)1.4.4 Killing And Yanking
    unix-word-rubout (C-w)1.4.4 Killing And Yanking
    unix-word-rubout (C-w)1.4.4 Killing And Yanking
    upcase-word (M-u)1.4.3 Commands For Changing Text
    upcase-word (M-u)1.4.3 Commands For Changing Text

    V
    visible-stats1.3.1 Readline Init File Syntax

    Y
    yank (C-y)1.4.4 Killing And Yanking
    yank (C-y)1.4.4 Killing And Yanking
    yank-last-arg (M-. or M-_)1.4.2 Commands For Manipulating The History
    yank-last-arg (M-. or M-_)1.4.2 Commands For Manipulating The History
    yank-nth-arg (M-C-y)1.4.2 Commands For Manipulating The History
    yank-nth-arg (M-C-y)1.4.2 Commands For Manipulating The History
    yank-pop (M-y)1.4.4 Killing And Yanking
    yank-pop (M-y)1.4.4 Killing And Yanking

    Jump to:   _ +   +
    + A +   + B +   + C +   + D +   + E +   + F +   + H +   + I +   + K +   + M +   + N +   + O +   + P +   + Q +   + R +   + S +   + T +   + U +   + V +   + Y +   +

    + +


    + + + + + + +
    [Top][Contents][Index][ ? ]
    +

    Table of Contents

    + +
    + + + + + + +
    [Top][Contents][Index][ ? ]
    +

    Short Table of Contents

    +
    + 1. Command Line Editing +
    + 2. Programming with GNU Readline +
    + Concept Index +
    + Function and Variable Index +
    + +
    +
    + + + + + + +
    [Top][Contents][Index][ ? ]
    +

    About this document

    + This document was generated by Chet Ramey on October, 9 2001 + using texi2html +

    + The buttons in the navigation panels have the following meaning: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Button Name Go to From 1.2.3 go to
    + [ < ] + Back + + previous section in reading order + + 1.2.2 +
    + [ > ] + Forward + + next section in reading order + + 1.2.4 +
    + [ << ] + FastBack + + previous or up-and-previous section + + 1.1 +
    + [ Up ] + Up + + up section + + 1.2 +
    + [ >> ] + FastForward + + next or up-and-next section + + 1.3 +
    + [Top] + Top + + cover (top) of document + +   +
    + [Contents] + Contents + + table of contents + +   +
    + [Index] + Index + + concept index + +   +
    + [ ? ] + About + + this page + +   +
    +

    + where the Example assumes that the current position + is at Subsubsection One-Two-Three of a document of + the following structure: +
      +
    • 1. Section One
    • +
        +
      • 1.1 Subsection One-One
      • +
          +
        • ...
        • +
        +
      • 1.2 Subsection One-Two
      • +
          +
        • 1.2.1 Subsubsection One-Two-One +
        • 1.2.2 Subsubsection One-Two-Two +
        • 1.2.3 Subsubsection One-Two-Three     + <== Current Position +
        • 1.2.4 Subsubsection One-Two-Four +
        +
      • 1.3 Subsection One-Three
      • +
          +
        • ...
        • +
        +
      • 1.4 Subsection One-Four
      • +
      +
    +
    +
    + + This document was generated + by Chet Ramey on October, 9 2001 + using texi2html diff -Nrc2 readline-4.2/doc/readline.info readline-4.2a/doc/readline.info *** readline-4.2/doc/readline.info Mon Apr 16 11:05:39 2001 --- readline-4.2a/doc/readline.info Tue Oct 9 15:08:02 2001 *************** *** 237,241 **** `M-' ! Kill from the cursor the start of the previous word, or, if between words, to the start of the previous word. Word boundaries are the same as those used by `M-b'. --- 237,241 ---- `M-' ! Kill from the cursor the start of the current word, or, if between words, to the start of the previous word. Word boundaries are the same as those used by `M-b'. *************** *** 310,313 **** --- 310,317 ---- last line found the current line, and begin editing. + Readline remembers the last incremental search string. If two + `C-r's are typed without any intervening characters defining a new + search string, any remembered search string is used. + Non-incremental searches read the entire search string before starting to search for matching history lines. The search string may be *************** *** 424,427 **** --- 428,435 ---- attempts word completion. The default is `off'. + If set to `on', the history code attempts to place point at + the same location on each history line retrived with + `previous-history' or `next-history'. + `horizontal-scroll-mode' This variable can be set to either `on' or `off'. Setting it *************** *** 463,466 **** --- 471,481 ---- modified. This variable is `off' by default. + `match-hidden-files' + This variable, when set to `on', causes Readline to match + files whose names begin with a `.' (hidden files) when + performing filename completion, unless the leading `.' is + supplied by the user in the filename to be completed. This + variable is `on' by default. + `output-meta' If set to `on', Readline will display characters with the *************** *** 583,593 **** `\NNN' ! the character whose ASCII code is the octal value NNN (one to ! three digits) ! ! `\xNNN' ! the character whose ASCII code is the hexadecimal value NNN (one to three digits) When entering the text of a macro, single or double quotes must be used to indicate a macro definition. Unquoted text is assumed to --- 598,608 ---- `\NNN' ! the eight-bit character whose value is the octal value NNN (one to three digits) + `\xHH' + the eight-bit character whose value is the hexadecimal value + HH (one or two hex digits) + When entering the text of a macro, single or double quotes must be used to indicate a macro definition. Unquoted text is assumed to *************** *** 933,937 **** `transpose-words (M-t)' Drag the word before point past the word after point, moving point ! past that word as well. `upcase-word (M-u)' --- 948,953 ---- `transpose-words (M-t)' Drag the word before point past the word after point, moving point ! past that word as well. If the insertion point is at the end of ! the line, this transposes the last two words on the line. `upcase-word (M-u)' *************** *** 1333,1336 **** --- 1349,1361 ---- included before `readline.h'. + `readline.h' defines a C preprocessor variable that should be + treated as an integer, `RL_READLINE_VERSION', which may be used to + conditionally compile application code depending on the installed + Readline version. The value is a hexadecimal encoding of the major and + minor version numbers of the library, of the form 0xMMMM. MM is the + two-digit major version number; MM is the two-digit minor version + number. For Readline 4.2, for example, the value of + `RL_READLINE_VERSION' would be `0x0402'. + * Menu: *************** *** 1499,1502 **** --- 1524,1534 ---- The version number of this revision of the library. + - Variable: int rl_readline_version + An integer encoding the current version of the library. The + encoding is of the form 0xMMMM, where MM is the two-digit major + version number, and MM is the two-digit minor version number. For + example, for Readline-4.2, `rl_readline_version' would have the + value 0x0402. + - Variable: int rl_gnu_readline_p Always set to 1, denoting that this is GNU readline rather than *************** *** 2196,2199 **** --- 2228,2239 ---- enabled. + - Function: char * rl_get_termcap (const char *cap) + Retrieve the string value of the termcap capability CAP. Readline + fetches the termcap entry for the current terminal name and uses + those capabilities to move around the screen line and perform other + terminal-specific operations, like erasing a line. Readline does + not use all of a terminal's capabilities, and this function will + return values for only those capabilities Readline uses. +  File: readline.info, Node: Alternate Interface, Next: A Readline Example, Prev: Miscellaneous Functions, Up: Readline Convenience Functions *************** *** 3251,3254 **** --- 3291,3295 ---- * forward-search-history (C-s): Commands For History. * forward-word (M-f): Commands For Moving. + * history-preserve-point: Readline Init File Syntax. * history-search-backward (): Commands For History. * history-search-forward (): Commands For History. *************** *** 3264,3267 **** --- 3305,3309 ---- * kill-word (M-d): Commands For Killing. * mark-modified-lines: Readline Init File Syntax. + * match-hidden-files: Readline Init File Syntax. * menu-complete (): Commands For Completion. * meta-flag: Readline Init File Syntax. *************** *** 3355,3358 **** --- 3397,3401 ---- * rl_get_keymap_name: Keymaps. * rl_get_screen_size: Readline Signal Handling. + * rl_get_termcap: Miscellaneous Functions. * rl_getc: Character Input. * rl_getc_function: Readline Variables. *************** *** 3398,3401 **** --- 3441,3445 ---- * rl_readline_name: Readline Variables. * rl_readline_state: Readline Variables. + * rl_readline_version: Readline Variables. * rl_redisplay: Redisplay. * rl_redisplay_function: Readline Variables. *************** *** 3453,3500 **** Node: Readline Movement Commands7000 Node: Readline Killing Commands7957 ! Node: Readline Arguments9867 ! Node: Searching10903 ! Node: Readline Init File12859 ! Node: Readline Init File Syntax13920 ! Node: Conditional Init Constructs23842 ! Node: Sample Init File26367 ! Node: Bindable Readline Commands29537 ! Node: Commands For Moving30587 ! Node: Commands For History31436 ! Node: Commands For Text34294 ! Node: Commands For Killing36281 ! Node: Numeric Arguments38232 ! Node: Commands For Completion39360 ! Node: Keyboard Macros40892 ! Node: Miscellaneous Commands41451 ! Node: Readline vi Mode44244 ! Node: Programming with GNU Readline46062 ! Node: Basic Behavior47030 ! Node: Custom Functions50443 ! Node: Readline Typedefs51421 ! Node: Function Writing53050 ! Node: Readline Variables54134 ! Node: Readline Convenience Functions63133 ! Node: Function Naming64115 ! Node: Keymaps65367 ! Node: Binding Keys67123 ! Node: Associating Function Names and Bindings70049 ! Node: Allowing Undoing72294 ! Node: Redisplay74829 ! Node: Modifying Text77900 ! Node: Character Input79033 ! Node: Terminal Management80678 ! Node: Utility Functions81853 ! Node: Miscellaneous Functions83920 ! Node: Alternate Interface85512 ! Node: A Readline Example87135 ! Node: Readline Signal Handling89072 ! Node: Custom Completers94675 ! Node: How Completing Works95390 ! Node: Completion Functions98388 ! Node: Completion Variables101392 ! Node: A Short Completion Example110763 ! Node: Concept Index123288 ! Node: Function and Variable Index124110  End Tag Table --- 3497,3544 ---- Node: Readline Movement Commands7000 Node: Readline Killing Commands7957 ! Node: Readline Arguments9866 ! Node: Searching10902 ! Node: Readline Init File13045 ! Node: Readline Init File Syntax14106 ! Node: Conditional Init Constructs24556 ! Node: Sample Init File27081 ! Node: Bindable Readline Commands30251 ! Node: Commands For Moving31301 ! Node: Commands For History32150 ! Node: Commands For Text35008 ! Node: Commands For Killing37099 ! Node: Numeric Arguments39050 ! Node: Commands For Completion40178 ! Node: Keyboard Macros41710 ! Node: Miscellaneous Commands42269 ! Node: Readline vi Mode45062 ! Node: Programming with GNU Readline46880 ! Node: Basic Behavior47848 ! Node: Custom Functions51261 ! Node: Readline Typedefs52739 ! Node: Function Writing54368 ! Node: Readline Variables55452 ! Node: Readline Convenience Functions64784 ! Node: Function Naming65766 ! Node: Keymaps67018 ! Node: Binding Keys68774 ! Node: Associating Function Names and Bindings71700 ! Node: Allowing Undoing73945 ! Node: Redisplay76480 ! Node: Modifying Text79551 ! Node: Character Input80684 ! Node: Terminal Management82329 ! Node: Utility Functions83504 ! Node: Miscellaneous Functions85571 ! Node: Alternate Interface87635 ! Node: A Readline Example89258 ! Node: Readline Signal Handling91195 ! Node: Custom Completers96798 ! Node: How Completing Works97513 ! Node: Completion Functions100511 ! Node: Completion Variables103515 ! Node: A Short Completion Example112886 ! Node: Concept Index125411 ! Node: Function and Variable Index126233  End Tag Table diff -Nrc2 readline-4.2/doc/readline.ps readline-4.2a/doc/readline.ps *** readline-4.2/doc/readline.ps Mon Apr 16 11:05:46 2001 --- readline-4.2a/doc/readline.ps Tue Oct 9 15:08:12 2001 *************** *** 2,6 **** %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: readline.dvi ! %%Pages: 62 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 --- 2,6 ---- %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: readline.dvi ! %%Pages: 64 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 *************** *** 9,13 **** %DVIPSCommandLine: dvips -D 300 -t letter -o readline.ps readline.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2001.04.16:1105 %%BeginProcSet: texc.pro %! --- 9,13 ---- %DVIPSCommandLine: dvips -D 300 -t letter -o readline.ps readline.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2001.10.09:1508 %%BeginProcSet: texc.pro %! *************** *** 390,395 **** >I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fk cmsl10 10.95 46 ! /Fk 46 122 df12 DI E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fk cmsl10 10.95 48 ! /Fk 48 122 df12 DI<0007B512F83900F800780178133815185B1508A53901E00800A314181438EBFFF8 ! 3803C0301410A491C7FC485AA648C8FC7FEAFFFC1D1F7E9E1E>I<3807FF803800F80013 ! 78A25BA6485AA6485AA6485AA648C7FC7FEAFFF0111F7E9E10>73 ! D<3A07FF803FE03A00F8001F000178130C5D4913205D5D4AC7FC1402140848485A5C1460 ! 14F013E1EBE4F83803C878EBD07CEBE03CEBC03E141E141F48487E81140781140381380F ! 00016D487E39FFF00FFE231F7E9E23>75 D<3807FFE0D800FCC7FC1378A25BA6485AA648 ! 5AA41580EC0100EA0780A25C14021406140E380F001E147CB512FC191F7E9E1C>I78 DI< ! 0007B5FC3900F803C090387800F015785B157CA41578484813F815F0EC01E0EC03C0EC0F ! 00EBFFFCD803C0C7FCA6485AA648C8FC7FEAFFF81E1F7E9E1F>I<3807FFFE3900F80780 ! 90387801E0EC00F05B15F8A415F03801E00115E0EC03C0EC0780EC1E00EBFFF03803C038 ! 80141E140EA2140F48485AA51501D80F0013029038800F8239FFF8078CC7EA01F020207E ! 9E22>82 DI<003FB512F0383C07800030 ! 1430126039400F0010A212C01280A3D8001E1300A65BA65BA65B7F383FFFE01C1F7A9E21 ! >I<39FFF00FF8391F0003E06CEB01801400001EEB0100A6481302A6485BA600705BA25C ! A200785B1238001813C06C48C7FCEA0706EA01F81D20799E22>I<3BFFF07FF81FF03B1F ! 000FC007C0001E903907800380001FED01006C1502140F5EEC17C002135B142301805C00 ! 0713435E14C3913883E0401481D981015B13C1D803C213E193C7FC13C415F2EBC80015F4 ! EA01F015F85B5D5B15605B000014402C207A9E2F>87 D97 D<1207123F120F7EA2120EA65A137CEA1D83381E0180001C13C0EB00E05A14 ! F0A5387001E0A214C013031480EB0700EAE80EEACC38EA83E014207B9F19>I<13FEEA03 ! 83380E0780121C0038130090C7FC12785AA45AA37E5BEA70026C5AEA1C18EA07E011147D ! 9314>I<1438EB01F8EB00781438A21470A614E013FCEA0382EA0601121CEA3C00383801 ! C0127812F0A438E00380A412F0EA700738380F00381C37803807C7E015207D9F19>I<13 ! F8EA070EEA0E07381C038012381278127012F0B5FC00F0C7FCA25AA46C5AEA7002EA3004 ! EA1C18EA07E011147D9314>II<140EEB3E11EBE1A33801 ! C1C2380381E0EA07801301120FA3380703C01480EB8700EA04FC48C7FCA21218121CEA0F ! FF14C014E0381800F04813305A5AA3006013606C13C0381C0700EA07FC181F809417>I< ! 13E0120712011200A2485AA6485AEB8F80EB90E013A0EBC0601380000713E01300A5380E ! 01C0A6381C0380001E13C038FF8FF014207E9F19>II<13E0120712 ! 011200A2485AA6485AEB81FCEB80F014C0EB81801400EA07045B13181338137C131C120E ! 7FA2130F7F1480EA1C03381E07C038FF8FF016207E9F18>107 D<13E0120712011200A2 ! EA01C0A6EA0380A6EA0700A6120EA65A121EEAFF800B207F9F0C>I<390387C07C391F98 ! 61863907A072073903C03403EB80380007EB7807EB0070A5000EEBE00EA64848485A001E ! EBE01E3AFFCFFCFFC022147E9326>I<38038F80381F90E0EA07A03803C0601380000713 ! E01300A5380E01C0A6381C0380001E13C038FF8FF014147E9319>I<13FCEA0387380E01 ! 80381C00C04813E0A24813F012F0A438E001E0A214C0130300F0138038700700EA380E6C ! 5AEA07E014147D9317>IIII< ! EA01F9EA0607EA080312181301EA3802EA3C00121F13F0EA07FCEA01FEEA001FEA400713 ! 03A212601306EAF004EAC818EA87E010147F9312>I<1380EA0100A35A5A5A121EEAFFF8 ! EA0E00A45AA65A1310A41320A2EA1840EA0F800D1C7C9B12>I<381C0380EAFC1FEA3C07 ! EA1C03A238380700A6EA700EA4131EA25BEA305E381F9F8011147B9319>I<38FF83F838 ! 1E00E0001C13C01480121E380E01005B13025B12075BA25BEA039013A013E05B5B120190 ! C7FC15147C9318>I<39FF9FE1FC393C078070391C030060148015401580EA0E0790380D ! 81001309EB19C21311380F21C4EA0720EB40C814E8EB80F0A26C485A1460000213401E14 ! 7C9321>I<381FF0FF3803C0780001137014403800E0C0EBE180EB73001376133CA2131C ! 132E134E1387EA0107380203801204380C01C0383C03E038FE07FC18147F9318>I<390F ! F83F803901E00E00EBC00C140813E000005B143014205C13705CA20171C7FC1339133A13 ! 3E133C133813181310A25BA25BEA70C0EAF08000F1C8FC12E61278191D809318>I ! E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fl cmti10 10.95 20 --- 410,479 ---- EBE0383803C010A4EC00081510485AA21520A2156015C0380F00011407B612801E1F7E9E 1F>I<0007B512F83900F800780178133815185B1508A53901E00800A314181438EBFFF8 ! 3803C0301410A491C7FC485AA648C8FC7FEAFFFC1D1F7E9E1E>I<3A07FF83FFC03A00F8 ! 007C000178133CA2495BA648485BA490B5FCEBE0004848485AA64848485AA64848485A01 ! 807F39FFF07FF8221F7E9E22>72 D<3807FF803800F8001378A25BA6485AA6485AA6485A ! A648C7FC7FEAFFF0111F7E9E10>I<3A07FF803FE03A00F8001F000178130C5D4913205D ! 5D4AC7FC1402140848485A5C146014F013E1EBE4F83803C878EBD07CEBE03CEBC03E141E ! 141F48487E81140781140381380F00016D487E39FFF00FFE231F7E9E23>75 ! D<3807FFE0D800FCC7FC1378A25BA6485AA6485AA41580EC0100EA0780A25C1402140614 ! 0E380F001E147CB512FC191F7E9E1C>IIII<0007B5FC3900F803C090387800F015785B157CA41578484813F815F0EC ! 01E0EC03C0EC0F00EBFFFCD803C0C7FCA6485AA648C8FC7FEAFFF81E1F7E9E1F>I<3807 ! FFFE3900F8078090387801E0EC00F05B15F8A415F03801E00115E0EC03C0EC0780EC1E00 ! EBFFF03803C03880141E140EA2140F48485AA51501D80F0013029038800F8239FFF8078C ! C7EA01F020207E9E22>82 DI<003FB512 ! F0383C078000301430126039400F0010A212C01280A3D8001E1300A65BA65BA65B7F383F ! FFE01C1F7A9E21>I<39FFF00FF8391F0003E06CEB01801400001EEB0100A6481302A648 ! 5BA600705BA25CA200785B1238001813C06C48C7FCEA0706EA01F81D20799E22>I<3BFF ! F07FF81FF03B1F000FC007C0001E903907800380001FED01006C1502140F5EEC17C00213 ! 5B142301805C000713435E14C3913883E0401481D981015B13C1D803C213E193C7FC13C4 ! 15F2EBC80015F4EA01F015F85B5D5B15605B000014402C207A9E2F>87 ! D97 D<1207123F120F7EA2120EA65A137CEA1D ! 83381E0180001C13C0EB00E05A14F0A5387001E0A214C013031480EB0700EAE80EEACC38 ! EA83E014207B9F19>I<13FEEA0383380E0780121C0038130090C7FC12785AA45AA37E5B ! EA70026C5AEA1C18EA07E011147D9314>I<1438EB01F8EB00781438A21470A614E013FC ! EA0382EA0601121CEA3C00383801C0127812F0A438E00380A412F0EA700738380F00381C ! 37803807C7E015207D9F19>I<13F8EA070EEA0E07381C038012381278127012F0B5FC00 ! F0C7FCA25AA46C5AEA7002EA3004EA1C18EA07E011147D9314>II<140EEB3E11EBE1A33801C1C2380381E0EA07801301120FA3380703C01480EB87 ! 00EA04FC48C7FCA21218121CEA0FFF14C014E0381800F04813305A5AA3006013606C13C0 ! 381C0700EA07FC181F809417>I<13E0120712011200A2485AA6485AEB8F80EB90E013A0 ! EBC0601380000713E01300A5380E01C0A6381C0380001E13C038FF8FF014207E9F19>I< ! EA01C0EA03E0A213C0EA0180C7FCA6EA0380121F12071203A2EA0700A6120EA65A121EEA ! FF800B1F7F9E0C>I<13E0120712011200A2485AA6485AEB81FCEB80F014C0EB81801400 ! EA07045B13181338137C131C120E7FA2130F7F1480EA1C03381E07C038FF8FF016207E9F ! 18>107 D<13E0120712011200A2EA01C0A6EA0380A6EA0700A6120EA65A121EEAFF800B ! 207F9F0C>I<390387C07C391F9861863907A072073903C03403EB80380007EB7807EB00 ! 70A5000EEBE00EA64848485A001EEBE01E3AFFCFFCFFC022147E9326>I<38038F80381F ! 90E0EA07A03803C0601380000713E01300A5380E01C0A6381C0380001E13C038FF8FF014 ! 147E9319>I<13FCEA0387380E0180381C00C04813E0A24813F012F0A438E001E0A214C0 ! 130300F0138038700700EA380E6C5AEA07E014147D9317>IIIII< ! 1380EA0100A35A5A5A121EEAFFF8EA0E00A45AA65A1310A41320A2EA1840EA0F800D1C7C ! 9B12>I<381C0380EAFC1FEA3C07EA1C03A238380700A6EA700EA4131EA25BEA305E381F ! 9F8011147B9319>I<38FF83F8381E00E0001C13C01480121E380E01005B13025B12075B ! A25BEA039013A013E05B5B120190C7FC15147C9318>I<39FF9FE1FC393C078070391C03 ! 0060148015401580EA0E0790380D81001309EB19C21311380F21C4EA0720EB40C814E8EB ! 80F0A26C485A1460000213401E147C9321>I<381FF0FF3803C0780001137014403800E0 ! C0EBE180EB73001376133CA2131C132E134E1387EA0107380203801204380C01C0383C03 ! E038FE07FC18147F9318>I<390FF83F803901E00E00EBC00C140813E000005B14301420 ! 5C13705CA20171C7FC1339133A133E133C133813181310A25BA25BEA70C0EAF08000F1C8 ! FC12E61278191D809318>I E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fl cmti10 10.95 20 *************** *** 706,711 **** D900FEC7FC272B7DA02E>13 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fs cmbx12 14.4 54 ! /Fs 54 122 df<123C127FEAFF80A213C0A3127F123E1200A2EA0180A3EA0300A2120612 0E5A5A12100A157B8813>44 D<121C127FA2EAFF80A3EA7F00A2121C09097B8813>46 D<130E131E137EEA07FE12FFA212F81200B3ABB512FEA317277BA622>49 --- 710,715 ---- D900FEC7FC272B7DA02E>13 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fs cmbx12 14.4 55 ! /Fs 55 122 df<123C127FEAFF80A213C0A3127F123E1200A2EA0180A3EA0300A2120612 0E5A5A12100A157B8813>44 D<121C127FA2EAFF80A3EA7F00A2121C09097B8813>46 D<130E131E137EEA07FE12FFA212F81200B3ABB512FEA317277BA622>49 *************** *** 723,787 **** 8091C7FC127EA3EAFE02EB1FF0EB3FFCEB603EEB801F00FF14809038000FC0A24814E0A4 127EA4123E003F14C07EEC1F80D80F8013003807E07E6CB45A6C5B38003FC01B277DA622 ! >I ! 57 D65 DI<91387FE003903907FFFC07011FEBFF0F90397FF0 ! 0F9F9039FF0001FFD801FC7F4848147F4848143F4848141F485A160F485A1607127FA290 ! C9FC5AA97E7F1607123FA26C7E160E6C7E6C6C141C6C6C143C6C6C14786CB4EB01F09039 ! 7FF007C0011FB512800107EBFE009038007FF028297CA831>IIII<91387F ! E003903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FFD801FC7F48488048488048 ! 4880485A82485A82127FA290CAFC5AA892B512F87E7F03001300123FA26C7EA26C7E6C7E ! 6C7E6C7E6CB45B90387FF007011FB5129F0107EBFE0F9039007FF0032D297CA835>III75 DII ! III< ! ECFFC0010F13FC90383FC0FF9039FE001FC048486D7ED803F0EB03F000078148486D7E48 ! 486D7EA24848147FA2007F1680A290C8123FA24816C0AA6C16806D147FA2003F1600A26C ! 6C14FE143E3A0FE07F81FC00079038C1C1F83A03F18063F0D801F9EB67E0D800FFEB3FC0 ! 90263FC07FC7FC90380FFFFC01004913C0EC003C811601ED1F8316FF6F1380A21700816F ! 5A6F5A6F5A2A357CA833>II<9038FF80600003EBF0E0 ! 000F13F8381F80FD383F001F003E1307481303A200FC1301A214007EA26C140013C0EA7F ! FCEBFFE06C13F86C13FE80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E0 ! 1303A46C14E0A26C13076C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA8 ! 25>I<007FB71280A39039807F807FD87C00140F00781507A20070150300F016C0A24815 ! 01A5C791C7FCB3A490B612C0A32A287EA72F>IIII89 D<3803FF80000F13F0381F01FC383F80FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA 0FE0EA1F80EA3F00127E5AA4145F007E13DF393F839FFC381FFE0F3803FC031E1B7E9A21 --- 727,793 ---- 8091C7FC127EA3EAFE02EB1FF0EB3FFCEB603EEB801F00FF14809038000FC0A24814E0A4 127EA4123E003F14C07EEC1F80D80F8013003807E07E6CB45A6C5B38003FC01B277DA622 ! >I<1238123E003FB512F0A34814E015C0158015003870000EA25C485B5C5CC6485AA249 ! 5A130791C7FC5B5B131E133EA2137E137CA213FCA41201A76C5A13701C297CA822>I57 ! D65 DI<91387FE003903907FFFC07011FEBFF0F90397FF00F9F ! 9039FF0001FFD801FC7F4848147F4848143F4848141F485A160F485A1607127FA290C9FC ! 5AA97E7F1607123FA26C7E160E6C7E6C6C141C6C6C143C6C6C14786CB4EB01F090397FF0 ! 07C0011FB512800107EBFE009038007FF028297CA831>IIII<91387FE003 ! 903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FFD801FC7F484880484880484880 ! 485A82485A82127FA290CAFC5AA892B512F87E7F03001300123FA26C7EA26C7E6C7E6C7E ! 6C7E6CB45B90387FF007011FB5129F0107EBFE0F9039007FF0032D297CA835>II< ! B512F0A33803FC00B3B1B512F0A314297EA819>I75 DIII< ! ECFFC0010F13FC90383F807F9039FE001FC0D801F8EB07E048486D7E48486D7E000F8148 ! 486D7EA24848147FA2007F168090C8123FA34816C0AA6C16806D147FA2003F1600A26C6C ! 14FEA26C6C495A6C6C495A6C6C495A6C6C495A6C6C495A90263FC0FFC7FC90380FFFFC01 ! 0013C02A297CA833>IIII<9038FF80600003EBF0E000 ! 0F13F8381F80FD383F001F003E1307481303A200FC1301A214007EA26C140013C0EA7FFC ! EBFFE06C13F86C13FE80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E013 ! 03A46C14E0A26C13076C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA825 ! >I<007FB71280A39039807F807FD87C00140F00781507A20070150300F016C0A2481501 ! A5C791C7FCB3A490B612C0A32A287EA72F>IIII89 D<3803FF80000F13F0381F01FC383F80FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA 0FE0EA1F80EA3F00127E5AA4145F007E13DF393F839FFC381FFE0F3803FC031E1B7E9A21 *************** *** 1125,1131 **** %%Page: 1 1 1 0 bop 75 659 a Fv(GNU)33 b(Readline)h(Library)p 75 ! 709 1800 17 v 936 757 a Fu(Edition)17 b(4.2,)c(for)i ! Ft(Readline)f(Library)g Fu(V)l(ersion)i(4.2.)1692 811 ! y(Apr)f(2001)75 2467 y Fs(Brian)23 b(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 b(Soft)n(w)n(are)f(F)-6 b(oundation)75 2534 y(Chet)22 b(Ramey)-6 b(,)23 b(Case)e(W)-6 b(estern)23 --- 1131,1137 ---- %%Page: 1 1 1 0 bop 75 659 a Fv(GNU)33 b(Readline)h(Library)p 75 ! 709 1800 17 v 891 757 a Fu(Edition)16 b(4.2a,)e(for)g ! Ft(Readline)g(Library)h Fu(V)l(ersion)h(4.2a.)1608 811 ! y(Octob)q(er)g(2001)75 2467 y Fs(Brian)23 b(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 b(Soft)n(w)n(are)f(F)-6 b(oundation)75 2534 y(Chet)22 b(Ramey)-6 b(,)23 b(Case)e(W)-6 b(estern)23 *************** *** 1361,1370 **** Fo(M-f)p Fu(.)75 668 y Fo(M-)123 666 y Fn(h)p 135 640 73 2 v 135 668 a Fm(DEL)p 135 675 V 206 666 a Fn(i)315 ! 668 y Fu(Kill)21 b(from)e(the)g(cursor)f(the)h(start)f(of)h(the)g ! (previous)h(w)o(ord,)f(or,)g(if)g(b)q(et)o(w)o(een)h(w)o(ords,)f(to)315 ! 723 y(the)14 b(start)f(of)g(the)h(previous)g(w)o(ord.)19 ! b(W)l(ord)14 b(b)q(oundaries)h(are)e(the)h(same)g(as)f(those)h(used)g ! (b)o(y)315 777 y Fo(M-b)p Fu(.)75 855 y Fo(C-w)168 b ! Fu(Kill)18 b(from)d(the)g(cursor)h(to)f(the)g(previous)i(whitespace.)22 b(This)16 b(is)g(di\013eren)o(t)g(than)f Fo(M-)1777 853 y Fn(h)p 1789 827 V 1789 855 a Fm(DEL)p 1789 863 V 1860 --- 1367,1376 ---- Fo(M-f)p Fu(.)75 668 y Fo(M-)123 666 y Fn(h)p 135 640 73 2 v 135 668 a Fm(DEL)p 135 675 V 206 666 a Fn(i)315 ! 668 y Fu(Kill)i(from)e(the)g(cursor)g(the)h(start)e(of)h(the)g(curren)o ! (t)g(w)o(ord,)f(or,)h(if)g(b)q(et)o(w)o(een)h(w)o(ords,)e(to)h(the)315 ! 723 y(start)j(of)h(the)g(previous)h(w)o(ord.)31 b(W)l(ord)19 ! b(b)q(oundaries)h(are)f(the)h(same)e(as)h(those)g(used)h(b)o(y)315 ! 777 y Fo(M-b)p Fu(.)75 855 y Fo(C-w)168 b Fu(Kill)18 ! b(from)d(the)g(cursor)h(to)f(the)g(previous)i(whitespace.)22 b(This)16 b(is)g(di\013eren)o(t)g(than)f Fo(M-)1777 853 y Fn(h)p 1789 827 V 1789 855 a Fm(DEL)p 1789 863 V 1860 *************** *** 1434,1441 **** b(When)15 b(the)f(searc)o(h)g(is)h(terminated,)g(the)f(history)h(en)o (try)f(con)o(taining)h(the)g(searc)o(h)f(string)75 259 ! y(b)q(ecomes)i(the)f(curren)o(t)g(line.)137 324 y(T)l(o)g(\014nd)i (other)e(matc)o(hing)g(en)o(tries)h(in)h(the)e(history)h(list,)g(t)o (yp)q(e)f Fo(C-r)g Fu(or)g Fo(C-s)g Fu(as)h(appropriate.)k(This)75 ! 379 y(will)15 b(searc)o(h)e(bac)o(kw)o(ard)f(or)g(forw)o(ard)g(in)i (the)f(history)g(for)g(the)g(next)g(en)o(try)g(matc)o(hing)g(the)g (searc)o(h)g(string)75 434 y(t)o(yp)q(ed)19 b(so)g(far.)30 --- 1440,1447 ---- b(When)15 b(the)f(searc)o(h)g(is)h(terminated,)g(the)f(history)h(en)o (try)f(con)o(taining)h(the)g(searc)o(h)f(string)75 259 ! y(b)q(ecomes)i(the)f(curren)o(t)g(line.)137 325 y(T)l(o)g(\014nd)i (other)e(matc)o(hing)g(en)o(tries)h(in)h(the)e(history)h(list,)g(t)o (yp)q(e)f Fo(C-r)g Fu(or)g Fo(C-s)g Fu(as)h(appropriate.)k(This)75 ! 380 y(will)15 b(searc)o(h)e(bac)o(kw)o(ard)f(or)g(forw)o(ard)g(in)i (the)f(history)g(for)g(the)g(next)g(en)o(try)g(matc)o(hing)g(the)g (searc)o(h)g(string)75 434 y(t)o(yp)q(ed)19 b(so)g(far.)30 *************** *** 1444,1789 **** b(and)h(execute)g(that)f(command.)18 b(F)l(or)10 b(instance,)i(a)1063 487 y Fn(h)p 1076 461 76 2 v 1076 489 a Fm(RET)p 1076 ! 496 V 1149 487 a Fn(i)1174 489 y Fu(will)g(terminate)f(the)g(searc)o(h) ! f(and)h(accept)75 543 y(the)k(line,)h(thereb)o(y)f(executing)g(the)g (command)g(from)f(the)g(history)h(list.)20 b(A)15 b(mo)o(v)o(emen)o(t)f ! (command)g(will)75 598 y(terminate)h(the)g(searc)o(h,)g(mak)o(e)g(the)g (last)g(line)i(found)f(the)f(curren)o(t)g(line,)h(and)g(b)q(egin)g ! (editing.)137 664 y(Non-incremen)o(tal)25 b(searc)o(hes)e(read)h(the)f ! (en)o(tire)h(searc)o(h)f(string)g(b)q(efore)h(starting)f(to)f(searc)o ! (h)i(for)75 718 y(matc)o(hing)d(history)h(lines.)39 b(The)22 b(searc)o(h)f(string)g(ma)o(y)g(b)q(e)h(t)o(yp)q(ed)f(b)o(y)h(the)f ! (user)h(or)e(b)q(e)i(part)f(of)g(the)75 773 y(con)o(ten)o(ts)15 ! b(of)f(the)i(curren)o(t)f(line.)75 896 y Fs(1.3)33 b(Readline)23 ! b(Init)h(File)137 990 y Fu(Although)f(the)g(Readline)h(library)f(comes) ! g(with)g(a)f(set)g(of)g(Emacs-lik)o(e)i(k)o(eybindings)g(installed)75 ! 1045 y(b)o(y)d(default,)h(it)f(is)h(p)q(ossible)g(to)e(use)i(a)e ! (di\013eren)o(t)h(set)g(of)f(k)o(eybindings.)39 b(An)o(y)20 ! b(user)h(can)g(customize)75 1100 y(programs)15 b(that)h(use)g(Readline) ! i(b)o(y)e(putting)g(commands)g(in)i(an)e Fk(inputrc)k ! Fu(\014le,)d(con)o(v)o(en)o(tionally)g(in)g(his)75 1155 ! y(home)g(directory)l(.)24 b(The)17 b(name)g(of)f(this)h(\014le)g(is)g ! (tak)o(en)g(from)e(the)i(v)m(alue)h(of)e(the)h(en)o(vironmen)o(t)g(v)m ! (ariable)75 1209 y Ft(INPUTRC)p Fu(.)i(If)c(that)g(v)m(ariable)h(is)g ! (unset,)f(the)g(default)h(is)g(`)p Ft(~/.inputrc)p Fu('.)137 ! 1275 y(When)f(a)g(program)f(whic)o(h)h(uses)g(the)g(Readline)h(library) ! g(starts)d(up,)i(the)g(init)h(\014le)g(is)f(read,)g(and)g(the)75 ! 1329 y(k)o(ey)g(bindings)i(are)e(set.)137 1395 y(In)f(addition,)h(the)e ! Ft(C-x)i(C-r)e Fu(command)g(re-reads)h(this)g(init)g(\014le,)h(th)o(us) ! e(incorp)q(orating)h(an)o(y)f(c)o(hanges)75 1450 y(that)h(y)o(ou)h ! (migh)o(t)g(ha)o(v)o(e)g(made)g(to)g(it.)75 1556 y Fj(1.3.1)30 ! b(Readline)20 b(Init)g(File)h(Syn)n(tax)137 1650 y Fu(There)c(are)g ! (only)g(a)g(few)f(basic)i(constructs)e(allo)o(w)o(ed)i(in)f(the)g ! (Readline)h(init)g(\014le.)26 b(Blank)18 b(lines)g(are)75 ! 1705 y(ignored.)36 b(Lines)22 b(b)q(eginning)h(with)d(a)h(`)p ! Ft(#)p Fu(')e(are)h(commen)o(ts.)35 b(Lines)22 b(b)q(eginning)h(with)e ! (a)f(`)p Ft($)p Fu(')f(indicate)75 1760 y(conditional)c(constructs)f ! (\(see)g(Section)g(1.3.2)f([Conditional)h(Init)h(Constructs],)e(page)h ! (8\).)k(Other)c(lines)75 1814 y(denote)h(v)m(ariable)i(settings)e(and)h ! (k)o(ey)f(bindings.)75 1890 y(V)l(ariable)h(Settings)315 ! 1945 y(Y)l(ou)k(can)h(mo)q(dify)g(the)f(run-time)h(b)q(eha)o(vior)g(of) ! e(Readline)j(b)o(y)e(altering)h(the)f(v)m(alues)h(of)315 ! 2000 y(v)m(ariables)d(in)g(Readline)g(using)f(the)g Ft(set)g ! Fu(command)f(within)i(the)f(init)h(\014le.)26 b(The)17 ! b(syn)o(tax)315 2055 y(is)f(simple:)435 2117 y Ft(set)23 ! b Fk(v)m(ariable)28 b(v)m(alue)315 2182 y Fu(Here,)14 ! b(for)f(example,)h(is)g(ho)o(w)f(to)g(c)o(hange)h(from)f(the)h(default) ! g(Emacs-lik)o(e)h(k)o(ey)e(binding)j(to)315 2237 y(use)g ! Ft(vi)e Fu(line)j(editing)g(commands:)435 2299 y Ft(set)23 ! b(editing-mode)g(vi)315 2365 y Fu(V)l(ariable)c(names)e(and)h(v)m ! (alues,)h(where)e(appropriate,)h(are)f(recognized)i(without)e(regard) ! 315 2419 y(to)e(case.)315 2485 y(A)g(great)g(deal)g(of)g(run-time)h(b)q ! (eha)o(vior)g(is)g(c)o(hangeable)g(with)f(the)h(follo)o(wing)f(v)m ! (ariables.)315 2560 y Ft(bell-style)555 2615 y Fu(Con)o(trols)21 ! b(what)h(happ)q(ens)h(when)f(Readline)h(w)o(an)o(ts)e(to)g(ring)i(the)f ! (termi-)555 2670 y(nal)d(b)q(ell.)32 b(If)19 b(set)f(to)g(`)p ! Ft(none)p Fu(',)g(Readline)i(nev)o(er)f(rings)g(the)f(b)q(ell.)32 ! b(If)19 b(set)g(to)p eop %%Page: 5 7 5 6 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(5)555 149 y(`)p Ft(visible)p Fu(',)15 b(Readline)i(uses)g(a)f ! (visible)j(b)q(ell)g(if)e(one)f(is)h(a)o(v)m(ailable.)26 ! b(If)16 b(set)h(to)555 204 y(`)p Ft(audible)p Fu(')g(\(the)h (default\),)i(Readline)g(attempts)e(to)g(ring)h(the)g(terminal's)555 ! 259 y(b)q(ell.)315 338 y Ft(comment-begin)555 393 y Fu(The)c(string)f (to)g(insert)i(at)d(the)i(b)q(eginning)i(of)d(the)h(line)h(when)f(the)g ! Ft(insert-)555 448 y(comment)f Fu(command)h(is)h(executed.)21 b(The)15 b(default)h(v)m(alue)g(is)g Ft("#")p Fu(.)315 ! 527 y Ft(completion-ignore-case)555 582 y Fu(If)e(set)f(to)g(`)p Ft(on)p Fu(',)g(Readline)i(p)q(erforms)e(\014lename)i(matc)o(hing)f ! (and)g(completion)555 637 y(in)i(a)f(case-insensitiv)o(e)i(fashion.)k (The)15 b(default)h(v)m(alue)g(is)g(`)p Ft(off)p Fu('.)315 ! 716 y Ft(completion-query-items)555 770 y Fu(The)d(n)o(um)o(b)q(er)h (of)e(p)q(ossible)j(completions)g(that)d(determines)i(when)g(the)f ! (user)555 825 y(is)21 b(ask)o(ed)g(whether)g(he)h(w)o(an)o(ts)d(to)i (see)g(the)g(list)h(of)e(p)q(ossibilitie)q(s.)40 b(If)21 ! b(the)555 880 y(n)o(um)o(b)q(er)14 b(of)f(p)q(ossible)i(completions)f (is)g(greater)f(than)g(this)h(v)m(alue,)h(Readline)555 ! 935 y(will)g(ask)e(the)g(user)h(whether)f(or)g(not)g(he)g(wishes)h(to)f ! (view)h(them;)f(otherwise,)555 990 y(they)f(are)g(simply)i(listed.)20 b(This)13 b(v)m(ariable)g(m)o(ust)f(b)q(e)h(set)f(to)f(an)h(in)o(teger) ! h(v)m(alue)555 1044 y(greater)h(than)h(or)g(equal)h(to)f(0.)k(The)d ! (default)f(limit)i(is)f Ft(100)p Fu(.)315 1124 y Ft(convert-meta)555 ! 1178 y Fu(If)11 b(set)g(to)g(`)p Ft(on)p Fu(',)f(Readline)i(will)h(con) o(v)o(ert)d(c)o(haracters)h(with)g(the)g(eigh)o(th)h(bit)f(set)555 ! 1233 y(to)f(an)h Fp(asci)q(i)e Fu(k)o(ey)i(sequence)g(b)o(y)g (stripping)h(the)e(eigh)o(th)h(bit)h(and)e(pre\014xing)i(an)555 ! 1286 y Fn(h)p 567 1260 70 2 v 567 1288 a Fm(ESC)p 567 ! 1296 V 634 1286 a Fn(i)666 1288 y Fu(c)o(haracter,)k(con)o(v)o(erting)h (them)g(to)f(a)h(meta-pre\014xed)g(k)o(ey)g(sequence.)555 ! 1343 y(The)e(default)h(v)m(alue)h(is)e(`)p Ft(on)p Fu('.)315 ! 1422 y Ft(disable-completion)555 1477 y Fu(If)k(set)f(to)f(`)p Ft(On)p Fu(',)h(Readline)i(will)g(inhibit)g(w)o(ord)e(completion.)30 ! b(Completion)555 1531 y(c)o(haracters)12 b(will)j(b)q(e)f(inserted)g (in)o(to)f(the)g(line)h(as)f(if)h(they)f(had)g(b)q(een)h(mapp)q(ed)555 ! 1586 y(to)h Ft(self-insert)p Fu(.)j(The)d(default)h(is)g(`)p ! Ft(off)p Fu('.)315 1665 y Ft(editing-mode)555 1720 y Fu(The)f Ft(editing-mode)d Fu(v)m(ariable)k(con)o(trols)e(whic)o(h)h ! (default)g(set)f(of)g(k)o(ey)g(bind-)555 1775 y(ings)f(is)g(used.)20 b(By)12 b(default,)i(Readline)f(starts)f(up)h(in)g(Emacs)f(editing)i ! (mo)q(de,)555 1830 y(where)h(the)f(k)o(eystrok)o(es)g(are)g(most)g (similar)i(to)d(Emacs.)20 b(This)15 b(v)m(ariable)h(can)555 ! 1885 y(b)q(e)g(set)f(to)f(either)i(`)p Ft(emacs)p Fu(')e(or)h(`)p ! Ft(vi)p Fu('.)315 1964 y Ft(enable-keypad)555 2019 y Fu(When)d(set)f(to)h(`)p Ft(on)p Fu(',)e(Readline)j(will)h(try)d(to)g ! (enable)i(the)f(application)h(k)o(eypad)555 2073 y(when)h(it)f(is)h (called.)21 b(Some)13 b(systems)g(need)h(this)g(to)f(enable)h(the)g ! (arro)o(w)e(k)o(eys.)555 2128 y(The)j(default)h(is)g(`)p ! Ft(off)p Fu('.)315 2207 y Ft(expand-tilde)555 2262 y Fu(If)e(set)g(to)f(`)p Ft(on)p Fu(',)f(tilde)k(expansion)e(is)h(p)q ! (erformed)f(when)g(Readline)h(attempts)555 2317 y(w)o(ord)g (completion.)21 b(The)15 b(default)h(is)f(`)p Ft(off)p ! Fu('.)315 2396 y Ft(horizontal-scroll-mode)555 2451 y ! Fu(This)k(v)m(ariable)g(can)f(b)q(e)g(set)g(to)f(either)i(`)p ! Ft(on)p Fu(')e(or)g(`)p Ft(off)p Fu('.)27 b(Setting)19 ! b(it)f(to)f(`)p Ft(on)p Fu(')555 2506 y(means)c(that)f(the)i(text)e(of) ! h(the)g(lines)i(b)q(eing)f(edited)g(will)h(scroll)f(horizon)o(tally)555 ! 2560 y(on)i(a)f(single)i(screen)g(line)g(when)g(they)f(are)f(longer)h ! (than)g(the)g(width)g(of)g(the)555 2615 y(screen,)e(instead)f(of)g ! (wrapping)g(on)o(to)f(a)h(new)g(screen)h(line.)21 b(By)13 ! b(default,)h(this)555 2670 y(v)m(ariable)j(is)e(set)g(to)g(`)p ! Ft(off)p Fu('.)p eop %%Page: 6 8 6 7 bop 75 -58 a Fu(6)1322 b(GNU)15 b(Readline)h(Library)315 ! 149 y Ft(input-meta)555 204 y Fu(If)g(set)f(to)g(`)p Ft(on)p Fu(',)f(Readline)j(will)h(enable)e(eigh)o(t-bit)h(input)f(\(it) ! g(will)h(not)e(clear)555 259 y(the)20 b(eigh)o(th)g(bit)g(in)h(the)f(c) o(haracters)f(it)h(reads\),)g(regardless)g(of)g(what)f(the)555 ! 314 y(terminal)i(claims)g(it)f(can)g(supp)q(ort.)34 b(The)20 b(default)h(v)m(alue)g(is)g(`)p Ft(off)p Fu('.)33 b(The)555 ! 369 y(name)15 b Ft(meta-flag)f Fu(is)i(a)f(synon)o(ym)g(for)f(this)i(v) ! m(ariable.)315 448 y Ft(isearch-terminators)555 503 y Fu(The)26 b(string)g(of)f(c)o(haracters)g(that)g(should)i(terminate)f ! (an)g(incremen)o(tal)555 557 y(searc)o(h)12 b(without)h(subsequen)o (tly)g(executing)h(the)e(c)o(haracter)g(as)g(a)g(command)555 ! 612 y(\(see)22 b(Section)h(1.2.5)e([Searc)o(hing],)j(page)e(3\).)40 ! b(If)23 b(this)g(v)m(ariable)g(has)f(not)555 667 y(b)q(een)17 b(giv)o(en)f(a)g(v)m(alue,)g(the)g(c)o(haracters)1247 ! 665 y Fn(h)p 1259 639 70 2 v 1259 667 a Fm(ESC)p 1259 ! 675 V 1326 665 a Fn(i)1357 667 y Fu(and)g Fo(C-J)f Fu(will)i(terminate) ! f(an)555 722 y(incremen)o(tal)g(searc)o(h.)315 801 y ! Ft(keymap)96 b Fu(Sets)19 b(Readline's)i(idea)f(of)f(the)g(curren)o(t)h ! (k)o(eymap)f(for)f(k)o(ey)i(binding)h(com-)555 856 y(mands.)41 ! b(Acceptable)23 b Ft(keymap)f Fu(names)g(are)f Ft(emacs)p ! Fu(,)i Ft(emacs-standard)p Fu(,)555 910 y Ft(emacs-meta)p ! Fu(,)49 b Ft(emacs-ctlx)p Fu(,)g Ft(vi)p Fu(,)h Ft(vi-move)p ! Fu(,)f Ft(vi-command)p Fu(,)g(and)555 965 y Ft(vi-insert)p ! Fu(.)31 b Ft(vi)20 b Fu(is)g(equiv)m(alen)o(t)h(to)e ! Ft(vi-command)p Fu(;)g Ft(emacs)g Fu(is)h(equiv)m(alen)o(t)555 ! 1020 y(to)15 b Ft(emacs-standard)p Fu(.)20 b(The)d(default)f(v)m(alue)h (is)g Ft(emacs)p Fu(.)k(The)16 b(v)m(alue)h(of)f(the)555 ! 1075 y Ft(editing-mode)e Fu(v)m(ariable)i(also)f(a\013ects)g(the)g ! (default)h(k)o(eymap.)315 1154 y Ft(mark-directories)555 ! 1209 y Fu(If)j(set)g(to)g(`)p Ft(on)p Fu(',)f(completed)i(directory)g ! (names)f(ha)o(v)o(e)f(a)h(slash)h(app)q(ended.)555 1264 ! y(The)15 b(default)h(is)g(`)p Ft(on)p Fu('.)315 1343 ! y Ft(mark-modified-lines)555 1398 y Fu(This)j(v)m(ariable,)g(when)g (set)e(to)h(`)p Ft(on)p Fu(',)f(causes)h(Readline)h(to)e(displa)o(y)i ! (an)f(as-)555 1452 y(terisk)f(\(`)p Ft(*)p Fu('\))e(at)i(the)f(start)g (of)h(history)f(lines)j(whic)o(h)e(ha)o(v)o(e)g(b)q(een)h(mo)q ! (di\014ed.)555 1507 y(This)e(v)m(ariable)g(is)g(`)p Ft(off)p ! Fu(')e(b)o(y)h(default.)315 1586 y Ft(output-meta)555 ! 1641 y Fu(If)j(set)f(to)g(`)p Ft(on)p Fu(',)g(Readline)i(will)h(displa) o(y)f(c)o(haracters)d(with)j(the)e(eigh)o(th)h(bit)555 ! 1696 y(set)g(directly)i(rather)d(than)h(as)g(a)g(meta-pre\014xed)h ! (escap)q(e)g(sequence.)30 b(The)555 1751 y(default)16 ! b(is)f(`)p Ft(off)p Fu('.)315 1830 y Ft(print-completions-horizont)o ! (ally)555 1885 y Fu(If)d(set)g(to)f(`)p Ft(on)p Fu(',)h(Readline)h (will)g(displa)o(y)h(completions)f(with)f(matc)o(hes)f(sorted)555 ! 1939 y(horizon)o(tally)23 b(in)f(alphab)q(etical)i(order,)f(rather)e ! (than)g(do)o(wn)h(the)g(screen.)555 1994 y(The)15 b(default)h(is)g(`)p ! Ft(off)p Fu('.)315 2073 y Ft(show-all-if-ambiguous)555 ! 2128 y Fu(This)g(alters)e(the)i(default)f(b)q(eha)o(vior)h(of)e(the)h ! (completion)h(functions.)21 b(If)15 b(set)555 2183 y(to)e(`)p ! Ft(on)p Fu(',)g(w)o(ords)g(whic)o(h)h(ha)o(v)o(e)g(more)f(than)g(one)h ! (p)q(ossible)i(completion)f(cause)555 2238 y(the)20 b(matc)o(hes)f(to)f ! (b)q(e)j(listed)f(immediately)h(instead)f(of)f(ringing)i(the)e(b)q ! (ell.)555 2293 y(The)c(default)h(v)m(alue)h(is)e(`)p ! Ft(off)p Fu('.)315 2372 y Ft(visible-stats)555 2426 y ! Fu(If)h(set)g(to)f(`)p Ft(on)p Fu(',)g(a)h(c)o(haracter)f(denoting)h(a) ! g(\014le's)h(t)o(yp)q(e)f(is)g(app)q(ended)i(to)d(the)555 ! 2481 y(\014lename)h(when)g(listing)h(p)q(ossible)g(completions.)j(The)c ! (default)g(is)f(`)p Ft(off)p Fu('.)75 2560 y(Key)h(Bindings)315 ! 2615 y(The)21 b(syn)o(tax)f(for)h(con)o(trolling)h(k)o(ey)f(bindings)h ! (in)g(the)f(init)h(\014le)g(is)g(simple.)39 b(First)20 ! b(y)o(ou)315 2670 y(need)15 b(to)e(\014nd)h(the)g(name)g(of)g(the)f ! (command)h(that)f(y)o(ou)h(w)o(an)o(t)f(to)g(c)o(hange.)19 ! b(The)14 b(follo)o(wing)p eop %%Page: 7 9 7 8 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(7)315 149 y(sections)18 b(con)o(tain)h(tables)f(of)f(the)h(command)g ! (name,)g(the)g(default)h(k)o(eybinding,)h(if)e(an)o(y)l(,)315 ! 204 y(and)d(a)g(short)g(description)i(of)d(what)h(the)g(command)g(do)q ! (es.)315 273 y(Once)k(y)o(ou)f(kno)o(w)f(the)h(name)g(of)g(the)g (command,)g(simply)h(place)g(on)f(a)f(line)j(in)f(the)f(init)315 ! 328 y(\014le)g(the)f(name)g(of)f(the)h(k)o(ey)g(y)o(ou)f(wish)i(to)e (bind)i(the)f(command)g(to,)f(a)g(colon,)i(and)f(then)315 ! 382 y(the)f(name)g(of)g(the)g(command.)22 b(The)16 b(name)g(of)g(the)g (k)o(ey)f(can)i(b)q(e)f(expressed)h(in)g(di\013eren)o(t)315 ! 437 y(w)o(a)o(ys,)d(dep)q(ending)j(on)e(what)g(y)o(ou)g(\014nd)h(most)e ! (comfortable.)315 506 y(In)19 b(addition)g(to)e(command)h(names,)g (readline)i(allo)o(ws)e(k)o(eys)g(to)f(b)q(e)i(b)q(ound)g(to)e(a)h ! (string)315 561 y(that)c(is)i(inserted)g(when)g(the)f(k)o(ey)g(is)h ! (pressed)g(\(a)e Fk(macro)r Fu(\).)315 643 y Fk(k)o(eyname)s ! Fu(:)19 b Fk(function-name)g Fu(or)c Fk(macro)555 698 y(k)o(eyname)i Fu(is)e(the)f(name)h(of)f(a)g(k)o(ey)g(sp)q(elled)j(out) ! d(in)h(English.)21 b(F)l(or)13 b(example:)675 764 y Ft(Control-u:)22 ! b(universal-argument)675 816 y(Meta-Rubout:)g(backward-kill-word)675 ! 867 y(Control-o:)g(">)i(output")555 936 y Fu(In)c(the)f(ab)q(o)o(v)o(e) ! g(example,)i Fo(C-u)e Fu(is)h(b)q(ound)g(to)f(the)g(function)h ! Ft(universal-)555 991 y(argument)p Fu(,)e Fo(M-DEL)h ! Fu(is)g(b)q(ound)h(to)e(the)h(function)h Ft(backward-kill-word)p ! Fu(,)555 1046 y(and)g Fo(C-o)f Fu(is)h(b)q(ound)g(to)f(run)h(the)f ! (macro)g(expressed)h(on)g(the)f(righ)o(t)h(hand)555 1101 ! y(side)c(\(that)e(is,)i(to)e(insert)i(the)f(text)g(`)p ! Ft(>)f(output)p Fu(')g(in)o(to)i(the)f(line\).)555 1169 ! y(A)k(n)o(um)o(b)q(er)f(of)g(sym)o(b)q(olic)i(c)o(haracter)e(names)g ! (are)g(recognized)i(while)g(pro-)555 1224 y(cessing)13 b(this)f(k)o(ey)g(binding)h(syn)o(tax:)18 b Fk(DEL)p Fu(,)11 b Fk(ESC)p Fu(,)h Fk(ESCAPE)p Fu(,)f Fk(LFD)p ! Fu(,)g Fk(NEW-)555 1279 y(LINE)p Fu(,)16 b Fk(RET)p Fu(,)e Fk(RETURN)p Fu(,)f Fk(R)o(UBOUT)p Fu(,)i Fk(SP)l(A)o(CE)p ! Fu(,)g Fk(SPC)p Fu(,)f(and)i Fk(T)l(AB)p Fu(.)315 1361 y Ft(")p Fk(k)o(eyseq)q Ft(")p Fu(:)k Fk(function-name)e ! Fu(or)d Fk(macro)555 1416 y(k)o(eyseq)i Fu(di\013ers)e(from)g Fk(k)o(eyname)j Fu(ab)q(o)o(v)o(e)d(in)i(that)d(strings)i(denoting)g ! (an)f(en-)555 1471 y(tire)i(k)o(ey)g(sequence)h(can)f(b)q(e)g(sp)q (eci\014ed,)i(b)o(y)e(placing)h(the)f(k)o(ey)g(sequence)h(in)555 ! 1526 y(double)e(quotes.)j(Some)c Fp(gnu)g Fu(Emacs)f(st)o(yle)h(k)o(ey) ! g(escap)q(es)g(can)g(b)q(e)g(used,)g(as)555 1580 y(in)j(the)f(follo)o (wing)g(example,)h(but)f(the)g(sp)q(ecial)i(c)o(haracter)d(names)h(are) ! f(not)555 1635 y(recognized.)675 1701 y Ft("\\C-u":)23 ! b(universal-argument)675 1753 y("\\C-x\\C-r":)f(re-read-init-file)675 ! 1805 y("\\e[11~":)h("Function)f(Key)i(1")555 1873 y Fu(In)33 b(the)f(ab)q(o)o(v)o(e)g(example,)37 b Fo(C-u)32 b Fu(is)h(again)f(b)q ! (ound)h(to)f(the)g(function)555 1928 y Ft(universal-argument)19 b Fu(\(just)j(as)f(it)h(w)o(as)f(in)i(the)f(\014rst)f(example\),)j(`)p ! Fo(C-x)555 1983 y(C-r)p Fu(')c(is)h(b)q(ound)g(to)f(the)h(function)g ! Ft(re-read-init-file)p Fu(,)f(and)g(`)1731 1981 y Fn(h)p ! 1743 1955 70 2 v 1743 1983 a Fm(ESC)p 1743 1991 V 1810 ! 1981 a Fn(i)15 b(h)p 1852 1955 10 2 v 1852 1983 a Fm([)p ! 1852 1991 V 1860 1981 a Fn(i)555 2036 y(h)p 567 2010 ! 18 2 v 567 2038 a Fm(1)p 567 2045 V 583 2036 a Fn(i)g(h)p ! 625 2010 V 625 2038 a Fm(1)p 625 2045 V 640 2036 a Fn(i)g(h)p ! 683 2010 24 2 v 683 2038 a Ft(~)p 683 2045 V 704 2036 ! a Fn(i)719 2038 y Fu(')g(is)h(b)q(ound)g(to)e(insert)i(the)f(text)g(`)p ! Ft(Function)f(Key)g(1)p Fu('.)315 2120 y(The)h(follo)o(wing)h ! Fp(gnu)e Fu(Emacs)h(st)o(yle)g(escap)q(e)h(sequences)g(are)e(a)o(v)m ! (ailable)j(when)e(sp)q(ecifying)315 2175 y(k)o(ey)g(sequences:)315 ! 2258 y Fo(\\C-)168 b Fu(con)o(trol)15 b(pre\014x)315 ! 2340 y Fo(\\M-)168 b Fu(meta)15 b(pre\014x)315 2423 y ! Fo(\\e)192 b Fu(an)15 b(escap)q(e)h(c)o(haracter)315 ! 2505 y Fo(\\\\)192 b Fu(bac)o(kslash)315 2587 y Fo(\\)p ! Ft(")555 2585 y Fn(h)p 567 2559 V 567 2587 a Ft(")p 567 ! 2595 V 589 2585 a Fn(i)604 2587 y Fu(,)15 b(a)f(double)j(quotation)e ! (mark)315 2670 y Fo(\\')555 2668 y Fn(h)p 567 2642 10 ! 2 v 567 2670 a Fm(')p 567 2678 V 575 2668 a Fn(i)590 ! 2670 y Fu(,)g(a)f(single)j(quote)e(or)g(ap)q(ostrophe)p ! eop %%Page: 8 10 8 9 bop 75 -58 a Fu(8)1322 b(GNU)15 b(Readline)h(Library)315 ! 149 y(In)e(addition)h(to)f(the)f Fp(gnu)h Fu(Emacs)g(st)o(yle)f(escap)q ! (e)i(sequences,)g(a)e(second)i(set)e(of)h(bac)o(kslash)315 ! 204 y(escap)q(es)i(is)g(a)o(v)m(ailable:)315 286 y Ft(\\a)192 ! b Fu(alert)15 b(\(b)q(ell\))315 368 y Ft(\\b)192 b Fu(bac)o(kspace)315 ! 449 y Ft(\\d)g Fu(delete)315 531 y Ft(\\f)g Fu(form)14 ! b(feed)315 613 y Ft(\\n)192 b Fu(newline)315 694 y Ft(\\r)g ! Fu(carriage)15 b(return)315 776 y Ft(\\t)192 b Fu(horizon)o(tal)16 ! b(tab)315 858 y Ft(\\v)192 b Fu(v)o(ertical)16 b(tab)315 ! 940 y Ft(\\)p Fk(nnn)141 b Fu(the)14 b(c)o(haracter)f(whose)h ! Fp(asci)q(i)e Fu(co)q(de)j(is)f(the)g(o)q(ctal)g(v)m(alue)h ! Fk(nnn)f Fu(\(one)g(to)f(three)555 994 y(digits\))315 ! 1076 y Ft(\\x)p Fk(nnn)117 b Fu(the)16 b(c)o(haracter)f(whose)h ! Fp(asci)q(i)f Fu(co)q(de)i(is)f(the)h(hexadecimal)g(v)m(alue)g ! Fk(nnn)g Fu(\(one)555 1131 y(to)e(three)g(digits\))315 ! 1213 y(When)k(en)o(tering)g(the)g(text)f(of)g(a)h(macro,)f(single)i(or) ! e(double)i(quotes)f(m)o(ust)f(b)q(e)h(used)h(to)315 1267 y(indicate)12 b(a)f(macro)f(de\014nition.)20 b(Unquoted)11 b(text)f(is)i(assumed)e(to)h(b)q(e)g(a)f(function)i(name.)18 ! b(In)315 1322 y(the)11 b(macro)f(b)q(o)q(dy)l(,)i(the)f(bac)o(kslash)g (escap)q(es)g(describ)q(ed)i(ab)q(o)o(v)o(e)d(are)g(expanded.)20 ! b(Bac)o(kslash)315 1377 y(will)i(quote)d(an)o(y)h(other)g(c)o(haracter) f(in)i(the)f(macro)f(text,)h(including)j(`)p Ft(")p Fu(')c(and)h(`)p ! Ft(')p Fu('.)34 b(F)l(or)315 1432 y(example,)14 b(the)f(follo)o(wing)g (binding)i(will)g(mak)o(e)d(`)p Fo(C-x)i Ft(\\)p Fu(')f(insert)g(a)g (single)h(`)p Ft(\\)p Fu(')e(in)o(to)h(the)g(line:)435 ! 1497 y Ft("\\C-x\\\\":)23 b("\\\\")75 1613 y Fj(1.3.2)30 ! b(Conditional)20 b(Init)g(Constructs)137 1712 y Fu(Readline)f(implemen) o(ts)g(a)f(facilit)o(y)g(similar)h(in)g(spirit)f(to)f(the)h ! (conditional)h(compilation)g(features)75 1766 y(of)e(the)g(C)g(prepro)q (cessor)g(whic)o(h)i(allo)o(ws)e(k)o(ey)g(bindings)i(and)f(v)m(ariable) ! g(settings)f(to)g(b)q(e)h(p)q(erformed)f(as)75 1821 y(the)e(result)h (of)f(tests.)k(There)c(are)g(four)g(parser)g(directiv)o(es)h(used.)75 ! 1904 y Ft($if)168 b Fu(The)16 b Ft($if)f Fu(construct)g(allo)o(ws)h (bindings)i(to)d(b)q(e)h(made)g(based)g(on)f(the)h(editing)h(mo)q(de,)f ! (the)315 1959 y(terminal)k(b)q(eing)g(used,)g(or)f(the)g(application)i (using)e(Readline.)33 b(The)19 b(text)g(of)f(the)i(test)315 ! 2013 y(extends)c(to)e(the)h(end)h(of)f(the)g(line;)i(no)e(c)o ! (haracters)f(are)h(required)i(to)d(isolate)i(it.)315 ! 2095 y Ft(mode)144 b Fu(The)11 b Ft(mode=)e Fu(form)h(of)g(the)h Ft($if)f Fu(directiv)o(e)h(is)g(used)g(to)f(test)g(whether)h(Readline) ! 555 2150 y(is)k(in)h Ft(emacs)e Fu(or)g Ft(vi)g Fu(mo)q(de.)20 b(This)c(ma)o(y)e(b)q(e)h(used)g(in)h(conjunction)g(with)f(the)555 ! 2205 y(`)p Ft(set)f(keymap)p Fu(')f(command,)g(for)h(instance,)g(to)f ! (set)h(bindings)h(in)g(the)f Ft(emacs-)555 2260 y(standard)d Fu(and)i Ft(emacs-ctlx)e Fu(k)o(eymaps)h(only)i(if)f(Readline)g(is)g ! (starting)f(out)555 2314 y(in)k Ft(emacs)f Fu(mo)q(de.)315 ! 2396 y Ft(term)144 b Fu(The)14 b Ft(term=)e Fu(form)h(ma)o(y)g(b)q(e)h (used)g(to)f(include)j(terminal-sp)q(eci\014c)g(k)o(ey)d(bind-)555 ! 2451 y(ings,)19 b(p)q(erhaps)g(to)e(bind)i(the)g(k)o(ey)e(sequences)j ! (output)e(b)o(y)g(the)g(terminal's)555 2506 y(function)13 b(k)o(eys.)18 b(The)13 b(w)o(ord)e(on)h(the)g(righ)o(t)g(side)g(of)g ! (the)g(`)p Ft(=)p Fu(')f(is)h(tested)g(against)555 2560 y(b)q(oth)j(the)g(full)i(name)e(of)f(the)h(terminal)h(and)f(the)g(p)q ! (ortion)h(of)e(the)h(terminal)555 2615 y(name)i(b)q(efore)g(the)g (\014rst)f(`)p Ft(-)p Fu('.)24 b(This)17 b(allo)o(ws)g Ft(sun)f Fu(to)g(matc)o(h)h(b)q(oth)f Ft(sun)h Fu(and)555 ! 2670 y Ft(sun-cmd)p Fu(,)d(for)g(instance.)p eop ! %%Page: 9 11 ! 9 10 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(9)315 149 y Ft(application)555 204 y Fu(The)11 b Fk(application)i ! Fu(construct)e(is)g(used)h(to)e(include)j(application-sp)q(eci)q(\014c) ! h(set-)555 259 y(tings.)19 b(Eac)o(h)12 b(program)f(using)j(the)e ! (Readline)i(library)f(sets)f(the)g Fk(application)555 ! 314 y(name)p Fu(,)g(and)g(y)o(ou)f(can)h(test)f(for)g(a)g(particular)h ! (v)m(alue.)20 b(This)12 b(could)h(b)q(e)f(used)h(to)555 ! 369 y(bind)18 b(k)o(ey)e(sequences)i(to)d(functions)j(useful)f(for)f(a) ! g(sp)q(eci\014c)i(program.)23 b(F)l(or)555 423 y(instance,)17 ! b(the)g(follo)o(wing)g(command)g(adds)f(a)g(k)o(ey)h(sequence)g(that)f ! (quotes)555 478 y(the)f(curren)o(t)g(or)g(previous)h(w)o(ord)e(in)j ! (Bash:)675 543 y Ft($if)23 b(Bash)675 594 y(#)h(Quote)f(the)g(current)g ! (or)h(previous)f(word)675 646 y("\\C-xq":)g("\\eb\\"\\ef\\"")675 ! 698 y($endif)75 778 y($endif)96 b Fu(This)16 b(command,)e(as)h(seen)h ! (in)g(the)f(previous)h(example,)g(terminates)f(an)g Ft($if)f ! Fu(command.)75 858 y Ft($else)120 b Fu(Commands)15 b(in)h(this)f(branc) ! o(h)h(of)e(the)i Ft($if)e Fu(directiv)o(e)j(are)e(executed)h(if)g(the)f ! (test)g(fails.)75 937 y Ft($include)48 b Fu(This)22 b(directiv)o(e)h ! (tak)o(es)e(a)h(single)h(\014lename)g(as)e(an)h(argumen)o(t)f(and)h ! (reads)f(commands)315 992 y(and)e(bindings)j(from)c(that)h(\014le.)33 b(F)l(or)19 b(example,)i(the)e(follo)o(wing)h(directiv)o(e)h(reads)e ! (from)315 1047 y(`)p Ft(/etc/inputrc)p Fu(':)435 1111 ! y Ft($include)k(/etc/inputrc)75 1223 y Fj(1.3.3)30 b(Sample)20 ! b(Init)h(File)137 1320 y Fu(Here)16 b(is)g(an)f(example)h(of)f(an)g Fk(inputrc)k Fu(\014le.)i(This)16 b(illustrates)g(k)o(ey)f(binding,)i ! (v)m(ariable)f(assignmen)o(t,)75 1374 y(and)f(conditional)i(syn)o(tax.) p eop %%Page: 10 12 --- 1450,1811 ---- b(and)h(execute)g(that)f(command.)18 b(F)l(or)10 b(instance,)i(a)1063 487 y Fn(h)p 1076 461 76 2 v 1076 489 a Fm(RET)p 1076 ! 497 V 1149 487 a Fn(i)1174 489 y Fu(will)g(terminate)f(the)g(searc)o(h) ! f(and)h(accept)75 544 y(the)k(line,)h(thereb)o(y)f(executing)g(the)g (command)g(from)f(the)g(history)h(list.)20 b(A)15 b(mo)o(v)o(emen)o(t)f ! (command)g(will)75 599 y(terminate)h(the)g(searc)o(h,)g(mak)o(e)g(the)g (last)g(line)i(found)f(the)f(curren)o(t)g(line,)h(and)g(b)q(egin)g ! (editing.)137 665 y(Readline)j(remem)o(b)q(ers)e(the)h(last)f(incremen) ! o(tal)i(searc)o(h)e(string.)27 b(If)17 b(t)o(w)o(o)f ! Fo(C-r)p Fu(s)h(are)g(t)o(yp)q(ed)h(without)75 719 y(an)o(y)g(in)o ! (terv)o(ening)h(c)o(haracters)f(de\014ning)h(a)f(new)h(searc)o(h)f ! (string,)g(an)o(y)g(remem)o(b)q(ered)h(searc)o(h)f(string)g(is)75 ! 774 y(used.)137 840 y(Non-incremen)o(tal)25 b(searc)o(hes)e(read)h(the) ! f(en)o(tire)h(searc)o(h)f(string)g(b)q(efore)h(starting)f(to)f(searc)o ! (h)i(for)75 895 y(matc)o(hing)d(history)h(lines.)39 b(The)22 b(searc)o(h)f(string)g(ma)o(y)g(b)q(e)h(t)o(yp)q(ed)f(b)o(y)h(the)f ! (user)h(or)e(b)q(e)i(part)f(of)g(the)75 950 y(con)o(ten)o(ts)15 ! b(of)f(the)i(curren)o(t)f(line.)75 1074 y Fs(1.3)33 b(Readline)23 ! b(Init)h(File)137 1169 y Fu(Although)f(the)g(Readline)h(library)f ! (comes)g(with)g(a)f(set)g(of)g(Emacs-lik)o(e)i(k)o(eybindings)g ! (installed)75 1224 y(b)o(y)d(default,)h(it)f(is)h(p)q(ossible)g(to)e ! (use)i(a)e(di\013eren)o(t)h(set)g(of)f(k)o(eybindings.)39 ! b(An)o(y)20 b(user)h(can)g(customize)75 1278 y(programs)15 ! b(that)h(use)g(Readline)i(b)o(y)e(putting)g(commands)g(in)i(an)e ! Fk(inputrc)k Fu(\014le,)d(con)o(v)o(en)o(tionally)g(in)g(his)75 ! 1333 y(home)g(directory)l(.)24 b(The)17 b(name)g(of)f(this)h(\014le)g ! (is)g(tak)o(en)g(from)e(the)i(v)m(alue)h(of)e(the)h(en)o(vironmen)o(t)g ! (v)m(ariable)75 1388 y Ft(INPUTRC)p Fu(.)i(If)c(that)g(v)m(ariable)h ! (is)g(unset,)f(the)g(default)h(is)g(`)p Ft(~/.inputrc)p ! Fu('.)137 1454 y(When)f(a)g(program)f(whic)o(h)h(uses)g(the)g(Readline) ! h(library)g(starts)d(up,)i(the)g(init)h(\014le)g(is)f(read,)g(and)g ! (the)75 1509 y(k)o(ey)g(bindings)i(are)e(set.)137 1574 ! y(In)f(addition,)h(the)e Ft(C-x)i(C-r)e Fu(command)g(re-reads)h(this)g ! (init)g(\014le,)h(th)o(us)e(incorp)q(orating)h(an)o(y)f(c)o(hanges)75 ! 1629 y(that)h(y)o(ou)h(migh)o(t)g(ha)o(v)o(e)g(made)g(to)g(it.)75 ! 1737 y Fj(1.3.1)30 b(Readline)20 b(Init)g(File)h(Syn)n(tax)137 ! 1832 y Fu(There)c(are)g(only)g(a)g(few)f(basic)i(constructs)e(allo)o(w) ! o(ed)i(in)f(the)g(Readline)h(init)g(\014le.)26 b(Blank)18 ! b(lines)g(are)75 1886 y(ignored.)36 b(Lines)22 b(b)q(eginning)h(with)d ! (a)h(`)p Ft(#)p Fu(')e(are)h(commen)o(ts.)35 b(Lines)22 ! b(b)q(eginning)h(with)e(a)f(`)p Ft($)p Fu(')f(indicate)75 ! 1941 y(conditional)c(constructs)f(\(see)g(Section)g(1.3.2)f ! ([Conditional)h(Init)h(Constructs],)e(page)h(8\).)k(Other)c(lines)75 ! 1996 y(denote)h(v)m(ariable)i(settings)e(and)h(k)o(ey)f(bindings.)75 ! 2073 y(V)l(ariable)h(Settings)315 2128 y(Y)l(ou)k(can)h(mo)q(dify)g ! (the)f(run-time)h(b)q(eha)o(vior)g(of)e(Readline)j(b)o(y)e(altering)h ! (the)f(v)m(alues)h(of)315 2182 y(v)m(ariables)d(in)g(Readline)g(using)f ! (the)g Ft(set)g Fu(command)f(within)i(the)f(init)h(\014le.)26 ! b(The)17 b(syn)o(tax)315 2237 y(is)f(simple:)435 2300 ! y Ft(set)23 b Fk(v)m(ariable)28 b(v)m(alue)315 2366 y ! Fu(Here,)14 b(for)f(example,)h(is)g(ho)o(w)f(to)g(c)o(hange)h(from)f ! (the)h(default)g(Emacs-lik)o(e)h(k)o(ey)e(binding)j(to)315 ! 2421 y(use)g Ft(vi)e Fu(line)j(editing)g(commands:)435 ! 2484 y Ft(set)23 b(editing-mode)g(vi)315 2549 y Fu(V)l(ariable)c(names) ! e(and)h(v)m(alues,)h(where)e(appropriate,)h(are)f(recognized)i(without) ! e(regard)315 2604 y(to)e(case.)315 2670 y(A)g(great)g(deal)g(of)g ! (run-time)h(b)q(eha)o(vior)g(is)g(c)o(hangeable)g(with)f(the)h(follo)o ! (wing)f(v)m(ariables.)p eop %%Page: 5 7 5 6 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(5)315 149 y Ft(bell-style)555 204 y Fu(Con)o(trols)21 ! b(what)h(happ)q(ens)h(when)f(Readline)h(w)o(an)o(ts)e(to)g(ring)i(the)f ! (termi-)555 259 y(nal)d(b)q(ell.)32 b(If)19 b(set)f(to)g(`)p ! Ft(none)p Fu(',)g(Readline)i(nev)o(er)f(rings)g(the)f(b)q(ell.)32 ! b(If)19 b(set)g(to)555 314 y(`)p Ft(visible)p Fu(',)c(Readline)i(uses)g ! (a)f(visible)j(b)q(ell)g(if)e(one)f(is)h(a)o(v)m(ailable.)26 ! b(If)16 b(set)h(to)555 369 y(`)p Ft(audible)p Fu(')g(\(the)h (default\),)i(Readline)g(attempts)e(to)g(ring)h(the)g(terminal's)555 ! 423 y(b)q(ell.)315 504 y Ft(comment-begin)555 559 y Fu(The)c(string)f (to)g(insert)i(at)d(the)i(b)q(eginning)i(of)d(the)h(line)h(when)f(the)g ! Ft(insert-)555 614 y(comment)f Fu(command)h(is)h(executed.)21 b(The)15 b(default)h(v)m(alue)g(is)g Ft("#")p Fu(.)315 ! 694 y Ft(completion-ignore-case)555 749 y Fu(If)e(set)f(to)g(`)p Ft(on)p Fu(',)g(Readline)i(p)q(erforms)e(\014lename)i(matc)o(hing)f ! (and)g(completion)555 804 y(in)i(a)f(case-insensitiv)o(e)i(fashion.)k (The)15 b(default)h(v)m(alue)g(is)g(`)p Ft(off)p Fu('.)315 ! 884 y Ft(completion-query-items)555 939 y Fu(The)d(n)o(um)o(b)q(er)h (of)e(p)q(ossible)j(completions)g(that)d(determines)i(when)g(the)f ! (user)555 994 y(is)21 b(ask)o(ed)g(whether)g(he)h(w)o(an)o(ts)d(to)i (see)g(the)g(list)h(of)e(p)q(ossibilitie)q(s.)40 b(If)21 ! b(the)555 1049 y(n)o(um)o(b)q(er)14 b(of)f(p)q(ossible)i(completions)f (is)g(greater)f(than)g(this)h(v)m(alue,)h(Readline)555 ! 1104 y(will)g(ask)e(the)g(user)h(whether)f(or)g(not)g(he)g(wishes)h(to) ! f(view)h(them;)f(otherwise,)555 1158 y(they)f(are)g(simply)i(listed.)20 b(This)13 b(v)m(ariable)g(m)o(ust)f(b)q(e)h(set)f(to)f(an)h(in)o(teger) ! h(v)m(alue)555 1213 y(greater)h(than)h(or)g(equal)h(to)f(0.)k(The)d ! (default)f(limit)i(is)f Ft(100)p Fu(.)315 1294 y Ft(convert-meta)555 ! 1348 y Fu(If)11 b(set)g(to)g(`)p Ft(on)p Fu(',)f(Readline)i(will)h(con) o(v)o(ert)d(c)o(haracters)h(with)g(the)g(eigh)o(th)h(bit)f(set)555 ! 1403 y(to)f(an)h Fp(asci)q(i)e Fu(k)o(ey)i(sequence)g(b)o(y)g (stripping)h(the)e(eigh)o(th)h(bit)h(and)e(pre\014xing)i(an)555 ! 1456 y Fn(h)p 567 1430 70 2 v 567 1458 a Fm(ESC)p 567 ! 1466 V 634 1456 a Fn(i)666 1458 y Fu(c)o(haracter,)k(con)o(v)o(erting)h (them)g(to)f(a)h(meta-pre\014xed)g(k)o(ey)g(sequence.)555 ! 1513 y(The)e(default)h(v)m(alue)h(is)e(`)p Ft(on)p Fu('.)315 ! 1593 y Ft(disable-completion)555 1648 y Fu(If)k(set)f(to)f(`)p Ft(On)p Fu(',)h(Readline)i(will)g(inhibit)g(w)o(ord)e(completion.)30 ! b(Completion)555 1703 y(c)o(haracters)12 b(will)j(b)q(e)f(inserted)g (in)o(to)f(the)g(line)h(as)f(if)h(they)f(had)g(b)q(een)h(mapp)q(ed)555 ! 1758 y(to)h Ft(self-insert)p Fu(.)j(The)d(default)h(is)g(`)p ! Ft(off)p Fu('.)315 1838 y Ft(editing-mode)555 1893 y Fu(The)f Ft(editing-mode)d Fu(v)m(ariable)k(con)o(trols)e(whic)o(h)h ! (default)g(set)f(of)g(k)o(ey)g(bind-)555 1948 y(ings)f(is)g(used.)20 b(By)12 b(default,)i(Readline)f(starts)f(up)h(in)g(Emacs)f(editing)i ! (mo)q(de,)555 2003 y(where)h(the)f(k)o(eystrok)o(es)g(are)g(most)g (similar)i(to)d(Emacs.)20 b(This)15 b(v)m(ariable)h(can)555 ! 2058 y(b)q(e)g(set)f(to)f(either)i(`)p Ft(emacs)p Fu(')e(or)h(`)p ! Ft(vi)p Fu('.)315 2138 y Ft(enable-keypad)555 2193 y Fu(When)d(set)f(to)h(`)p Ft(on)p Fu(',)e(Readline)j(will)h(try)d(to)g ! (enable)i(the)f(application)h(k)o(eypad)555 2248 y(when)h(it)f(is)h (called.)21 b(Some)13 b(systems)g(need)h(this)g(to)f(enable)h(the)g ! (arro)o(w)e(k)o(eys.)555 2303 y(The)j(default)h(is)g(`)p ! Ft(off)p Fu('.)315 2383 y Ft(expand-tilde)555 2438 y Fu(If)e(set)g(to)f(`)p Ft(on)p Fu(',)f(tilde)k(expansion)e(is)h(p)q ! (erformed)f(when)g(Readline)h(attempts)555 2493 y(w)o(ord)g (completion.)21 b(The)15 b(default)h(is)f(`)p Ft(off)p ! Fu('.)555 2560 y(If)g(set)g(to)f(`)p Ft(on)p Fu(',)g(the)g(history)h ! (co)q(de)h(attempts)e(to)g(place)i(p)q(oin)o(t)f(at)f(the)h(same)555 ! 2615 y(lo)q(cation)20 b(on)f(eac)o(h)g(history)h(line)g(retriv)o(ed)g ! (with)f Ft(previous-history)e Fu(or)555 2670 y Ft(next-history)p ! Fu(.)p eop %%Page: 6 8 6 7 bop 75 -58 a Fu(6)1322 b(GNU)15 b(Readline)h(Library)315 ! 149 y Ft(horizontal-scroll-mode)555 204 y Fu(This)j(v)m(ariable)g(can)f ! (b)q(e)g(set)g(to)f(either)i(`)p Ft(on)p Fu(')e(or)g(`)p ! Ft(off)p Fu('.)27 b(Setting)19 b(it)f(to)f(`)p Ft(on)p ! Fu(')555 259 y(means)c(that)f(the)i(text)e(of)h(the)g(lines)i(b)q(eing) ! f(edited)g(will)h(scroll)f(horizon)o(tally)555 314 y(on)i(a)f(single)i ! (screen)g(line)g(when)g(they)f(are)f(longer)h(than)g(the)g(width)g(of)g ! (the)555 369 y(screen,)e(instead)f(of)g(wrapping)g(on)o(to)f(a)h(new)g ! (screen)h(line.)21 b(By)13 b(default,)h(this)555 423 ! y(v)m(ariable)j(is)e(set)g(to)g(`)p Ft(off)p Fu('.)315 ! 506 y Ft(input-meta)555 560 y Fu(If)h(set)f(to)g(`)p Ft(on)p Fu(',)f(Readline)j(will)h(enable)e(eigh)o(t-bit)h(input)f(\(it) ! g(will)h(not)e(clear)555 615 y(the)20 b(eigh)o(th)g(bit)g(in)h(the)f(c) o(haracters)f(it)h(reads\),)g(regardless)g(of)g(what)f(the)555 ! 670 y(terminal)i(claims)g(it)f(can)g(supp)q(ort.)34 b(The)20 b(default)h(v)m(alue)g(is)g(`)p Ft(off)p Fu('.)33 b(The)555 ! 725 y(name)15 b Ft(meta-flag)f Fu(is)i(a)f(synon)o(ym)g(for)f(this)i(v) ! m(ariable.)315 807 y Ft(isearch-terminators)555 862 y Fu(The)26 b(string)g(of)f(c)o(haracters)g(that)g(should)i(terminate)f ! (an)g(incremen)o(tal)555 917 y(searc)o(h)12 b(without)h(subsequen)o (tly)g(executing)h(the)e(c)o(haracter)g(as)g(a)g(command)555 ! 971 y(\(see)22 b(Section)h(1.2.5)e([Searc)o(hing],)j(page)e(3\).)40 ! b(If)23 b(this)g(v)m(ariable)g(has)f(not)555 1026 y(b)q(een)17 b(giv)o(en)f(a)g(v)m(alue,)g(the)g(c)o(haracters)1247 ! 1024 y Fn(h)p 1259 998 70 2 v 1259 1026 a Fm(ESC)p 1259 ! 1034 V 1326 1024 a Fn(i)1357 1026 y Fu(and)g Fo(C-J)f ! Fu(will)i(terminate)f(an)555 1081 y(incremen)o(tal)g(searc)o(h.)315 ! 1163 y Ft(keymap)96 b Fu(Sets)19 b(Readline's)i(idea)f(of)f(the)g ! (curren)o(t)h(k)o(eymap)f(for)f(k)o(ey)i(binding)h(com-)555 ! 1218 y(mands.)41 b(Acceptable)23 b Ft(keymap)f Fu(names)g(are)f ! Ft(emacs)p Fu(,)i Ft(emacs-standard)p Fu(,)555 1273 y ! Ft(emacs-meta)p Fu(,)49 b Ft(emacs-ctlx)p Fu(,)g Ft(vi)p ! Fu(,)h Ft(vi-move)p Fu(,)f Ft(vi-command)p Fu(,)g(and)555 ! 1328 y Ft(vi-insert)p Fu(.)31 b Ft(vi)20 b Fu(is)g(equiv)m(alen)o(t)h ! (to)e Ft(vi-command)p Fu(;)g Ft(emacs)g Fu(is)h(equiv)m(alen)o(t)555 ! 1382 y(to)15 b Ft(emacs-standard)p Fu(.)20 b(The)d(default)f(v)m(alue)h (is)g Ft(emacs)p Fu(.)k(The)16 b(v)m(alue)h(of)f(the)555 ! 1437 y Ft(editing-mode)e Fu(v)m(ariable)i(also)f(a\013ects)g(the)g ! (default)h(k)o(eymap.)315 1519 y Ft(mark-directories)555 ! 1574 y Fu(If)j(set)g(to)g(`)p Ft(on)p Fu(',)f(completed)i(directory)g ! (names)f(ha)o(v)o(e)f(a)h(slash)h(app)q(ended.)555 1629 ! y(The)15 b(default)h(is)g(`)p Ft(on)p Fu('.)315 1711 ! y Ft(mark-modified-lines)555 1766 y Fu(This)j(v)m(ariable,)g(when)g (set)e(to)h(`)p Ft(on)p Fu(',)f(causes)h(Readline)h(to)e(displa)o(y)i ! (an)f(as-)555 1821 y(terisk)f(\(`)p Ft(*)p Fu('\))e(at)i(the)f(start)g (of)h(history)f(lines)j(whic)o(h)e(ha)o(v)o(e)g(b)q(een)h(mo)q ! (di\014ed.)555 1875 y(This)e(v)m(ariable)g(is)g(`)p Ft(off)p ! Fu(')e(b)o(y)h(default.)315 1958 y Ft(match-hidden-files)555 ! 2012 y Fu(This)d(v)m(ariable,)h(when)e(set)g(to)g(`)p ! Ft(on)p Fu(',)f(causes)h(Readline)i(to)d(matc)o(h)h(\014les)h(whose)555 ! 2067 y(names)22 b(b)q(egin)h(with)g(a)e(`)p Ft(.)p Fu(')h(\(hidden)h ! (\014les\))g(when)f(p)q(erforming)h(\014lename)555 2122 ! y(completion,)g(unless)f(the)f(leading)h(`)p Ft(.)p Fu(')e(is)h ! (supplied)i(b)o(y)e(the)f(user)h(in)h(the)555 2177 y(\014lename)16 ! b(to)f(b)q(e)h(completed.)21 b(This)15 b(v)m(ariable)i(is)f(`)p ! Ft(on)p Fu(')e(b)o(y)h(default.)315 2259 y Ft(output-meta)555 ! 2314 y Fu(If)j(set)f(to)g(`)p Ft(on)p Fu(',)g(Readline)i(will)h(displa) o(y)f(c)o(haracters)d(with)j(the)e(eigh)o(th)h(bit)555 ! 2369 y(set)g(directly)i(rather)d(than)h(as)g(a)g(meta-pre\014xed)h ! (escap)q(e)g(sequence.)30 b(The)555 2423 y(default)16 ! b(is)f(`)p Ft(off)p Fu('.)315 2506 y Ft(print-completions-horizont)o ! (ally)555 2560 y Fu(If)d(set)g(to)f(`)p Ft(on)p Fu(',)h(Readline)h (will)g(displa)o(y)h(completions)f(with)f(matc)o(hes)f(sorted)555 ! 2615 y(horizon)o(tally)23 b(in)f(alphab)q(etical)i(order,)f(rather)e ! (than)g(do)o(wn)h(the)g(screen.)555 2670 y(The)15 b(default)h(is)g(`)p ! Ft(off)p Fu('.)p eop %%Page: 7 9 7 8 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(7)315 149 y Ft(show-all-if-ambiguous)555 204 y Fu(This)16 ! b(alters)e(the)i(default)f(b)q(eha)o(vior)h(of)e(the)h(completion)h ! (functions.)21 b(If)15 b(set)555 259 y(to)e(`)p Ft(on)p ! Fu(',)g(w)o(ords)g(whic)o(h)h(ha)o(v)o(e)g(more)f(than)g(one)h(p)q ! (ossible)i(completion)f(cause)555 314 y(the)20 b(matc)o(hes)f(to)f(b)q ! (e)j(listed)f(immediately)h(instead)f(of)f(ringing)i(the)e(b)q(ell.)555 ! 369 y(The)c(default)h(v)m(alue)h(is)e(`)p Ft(off)p Fu('.)315 ! 448 y Ft(visible-stats)555 502 y Fu(If)h(set)g(to)f(`)p ! Ft(on)p Fu(',)g(a)h(c)o(haracter)f(denoting)h(a)g(\014le's)h(t)o(yp)q ! (e)f(is)g(app)q(ended)i(to)d(the)555 557 y(\014lename)h(when)g(listing) ! h(p)q(ossible)g(completions.)j(The)c(default)g(is)f(`)p ! Ft(off)p Fu('.)75 636 y(Key)h(Bindings)315 691 y(The)21 ! b(syn)o(tax)f(for)h(con)o(trolling)h(k)o(ey)f(bindings)h(in)g(the)f ! (init)h(\014le)g(is)g(simple.)39 b(First)20 b(y)o(ou)315 ! 746 y(need)15 b(to)e(\014nd)h(the)g(name)g(of)g(the)f(command)h(that)f ! (y)o(ou)h(w)o(an)o(t)f(to)g(c)o(hange.)19 b(The)14 b(follo)o(wing)315 ! 801 y(sections)k(con)o(tain)h(tables)f(of)f(the)h(command)g(name,)g ! (the)g(default)h(k)o(eybinding,)h(if)e(an)o(y)l(,)315 ! 855 y(and)d(a)g(short)g(description)i(of)d(what)h(the)g(command)g(do)q ! (es.)315 922 y(Once)k(y)o(ou)f(kno)o(w)f(the)h(name)g(of)g(the)g (command,)g(simply)h(place)g(on)f(a)f(line)j(in)f(the)f(init)315 ! 977 y(\014le)g(the)f(name)g(of)f(the)h(k)o(ey)g(y)o(ou)f(wish)i(to)e (bind)i(the)f(command)g(to,)f(a)g(colon,)i(and)f(then)315 ! 1032 y(the)f(name)g(of)g(the)g(command.)22 b(The)16 b(name)g(of)g(the)g (k)o(ey)f(can)i(b)q(e)f(expressed)h(in)g(di\013eren)o(t)315 ! 1087 y(w)o(a)o(ys,)d(dep)q(ending)j(on)e(what)g(y)o(ou)g(\014nd)h(most) ! e(comfortable.)315 1154 y(In)19 b(addition)g(to)e(command)h(names,)g (readline)i(allo)o(ws)e(k)o(eys)g(to)f(b)q(e)i(b)q(ound)g(to)e(a)h ! (string)315 1208 y(that)c(is)i(inserted)g(when)g(the)f(k)o(ey)g(is)h ! (pressed)g(\(a)e Fk(macro)r Fu(\).)315 1288 y Fk(k)o(eyname)s ! Fu(:)19 b Fk(function-name)g Fu(or)c Fk(macro)555 1342 y(k)o(eyname)i Fu(is)e(the)f(name)h(of)f(a)g(k)o(ey)g(sp)q(elled)j(out) ! d(in)h(English.)21 b(F)l(or)13 b(example:)675 1406 y ! Ft(Control-u:)22 b(universal-argument)675 1458 y(Meta-Rubout:)g ! (backward-kill-word)675 1510 y(Control-o:)g(">)i(output")555 ! 1577 y Fu(In)c(the)f(ab)q(o)o(v)o(e)g(example,)i Fo(C-u)e ! Fu(is)h(b)q(ound)g(to)f(the)g(function)h Ft(universal-)555 ! 1632 y(argument)p Fu(,)e Fo(M-DEL)h Fu(is)g(b)q(ound)h(to)e(the)h ! (function)h Ft(backward-kill-word)p Fu(,)555 1687 y(and)g ! Fo(C-o)f Fu(is)h(b)q(ound)g(to)f(run)h(the)f(macro)g(expressed)h(on)g ! (the)f(righ)o(t)h(hand)555 1741 y(side)c(\(that)e(is,)i(to)e(insert)i ! (the)f(text)g(`)p Ft(>)f(output)p Fu(')g(in)o(to)i(the)f(line\).)555 ! 1808 y(A)k(n)o(um)o(b)q(er)f(of)g(sym)o(b)q(olic)i(c)o(haracter)e ! (names)g(are)g(recognized)i(while)g(pro-)555 1863 y(cessing)13 b(this)f(k)o(ey)g(binding)h(syn)o(tax:)18 b Fk(DEL)p Fu(,)11 b Fk(ESC)p Fu(,)h Fk(ESCAPE)p Fu(,)f Fk(LFD)p ! Fu(,)g Fk(NEW-)555 1918 y(LINE)p Fu(,)16 b Fk(RET)p Fu(,)e Fk(RETURN)p Fu(,)f Fk(R)o(UBOUT)p Fu(,)i Fk(SP)l(A)o(CE)p ! Fu(,)g Fk(SPC)p Fu(,)f(and)i Fk(T)l(AB)p Fu(.)315 1997 y Ft(")p Fk(k)o(eyseq)q Ft(")p Fu(:)k Fk(function-name)e ! Fu(or)d Fk(macro)555 2052 y(k)o(eyseq)i Fu(di\013ers)e(from)g Fk(k)o(eyname)j Fu(ab)q(o)o(v)o(e)d(in)i(that)d(strings)i(denoting)g ! (an)f(en-)555 2107 y(tire)i(k)o(ey)g(sequence)h(can)f(b)q(e)g(sp)q (eci\014ed,)i(b)o(y)e(placing)h(the)f(k)o(ey)g(sequence)h(in)555 ! 2161 y(double)e(quotes.)j(Some)c Fp(gnu)g Fu(Emacs)f(st)o(yle)h(k)o(ey) ! g(escap)q(es)g(can)g(b)q(e)g(used,)g(as)555 2216 y(in)j(the)f(follo)o (wing)g(example,)h(but)f(the)g(sp)q(ecial)i(c)o(haracter)d(names)h(are) ! f(not)555 2271 y(recognized.)675 2335 y Ft("\\C-u":)23 ! b(universal-argument)675 2387 y("\\C-x\\C-r":)f(re-read-init-file)675 ! 2439 y("\\e[11~":)h("Function)f(Key)i(1")555 2506 y Fu(In)33 b(the)f(ab)q(o)o(v)o(e)g(example,)37 b Fo(C-u)32 b Fu(is)h(again)f(b)q ! (ound)h(to)f(the)g(function)555 2560 y Ft(universal-argument)19 b Fu(\(just)j(as)f(it)h(w)o(as)f(in)i(the)f(\014rst)f(example\),)j(`)p ! Fo(C-x)555 2615 y(C-r)p Fu(')c(is)h(b)q(ound)g(to)f(the)h(function)g ! Ft(re-read-init-file)p Fu(,)f(and)g(`)1731 2613 y Fn(h)p ! 1743 2587 70 2 v 1743 2615 a Fm(ESC)p 1743 2623 V 1810 ! 2613 a Fn(i)15 b(h)p 1852 2587 10 2 v 1852 2615 a Fm([)p ! 1852 2623 V 1860 2613 a Fn(i)555 2668 y(h)p 567 2642 ! 18 2 v 567 2670 a Fm(1)p 567 2678 V 583 2668 a Fn(i)g(h)p ! 625 2642 V 625 2670 a Fm(1)p 625 2678 V 640 2668 a Fn(i)g(h)p ! 683 2642 24 2 v 683 2670 a Ft(~)p 683 2678 V 704 2668 ! a Fn(i)719 2670 y Fu(')g(is)h(b)q(ound)g(to)e(insert)i(the)f(text)g(`)p ! Ft(Function)f(Key)g(1)p Fu('.)p eop %%Page: 8 10 8 9 bop 75 -58 a Fu(8)1322 b(GNU)15 b(Readline)h(Library)315 ! 149 y(The)f(follo)o(wing)h Fp(gnu)e Fu(Emacs)h(st)o(yle)g(escap)q(e)h ! (sequences)g(are)e(a)o(v)m(ailable)j(when)e(sp)q(ecifying)315 ! 204 y(k)o(ey)g(sequences:)315 287 y Fo(\\C-)168 b Fu(con)o(trol)15 ! b(pre\014x)315 370 y Fo(\\M-)168 b Fu(meta)15 b(pre\014x)315 ! 453 y Fo(\\e)192 b Fu(an)15 b(escap)q(e)h(c)o(haracter)315 ! 536 y Fo(\\\\)192 b Fu(bac)o(kslash)315 619 y Fo(\\)p ! Ft(")555 617 y Fn(h)p 567 591 24 2 v 567 619 a Ft(")p ! 567 627 V 589 617 a Fn(i)604 619 y Fu(,)15 b(a)f(double)j(quotation)e ! (mark)315 702 y Fo(\\')555 700 y Fn(h)p 567 674 10 2 ! v 567 702 a Fm(')p 567 710 V 575 700 a Fn(i)590 702 y ! Fu(,)g(a)f(single)j(quote)e(or)g(ap)q(ostrophe)315 785 ! y(In)f(addition)h(to)f(the)f Fp(gnu)h Fu(Emacs)g(st)o(yle)f(escap)q(e)i ! (sequences,)g(a)e(second)i(set)e(of)h(bac)o(kslash)315 ! 840 y(escap)q(es)i(is)g(a)o(v)m(ailable:)315 923 y Ft(\\a)192 ! b Fu(alert)15 b(\(b)q(ell\))315 1006 y Ft(\\b)192 b Fu(bac)o(kspace)315 ! 1089 y Ft(\\d)g Fu(delete)315 1172 y Ft(\\f)g Fu(form)14 ! b(feed)315 1255 y Ft(\\n)192 b Fu(newline)315 1338 y ! Ft(\\r)g Fu(carriage)15 b(return)315 1421 y Ft(\\t)192 ! b Fu(horizon)o(tal)16 b(tab)315 1504 y Ft(\\v)192 b Fu(v)o(ertical)16 ! b(tab)315 1587 y Ft(\\)p Fk(nnn)141 b Fu(the)17 b(eigh)o(t-bit)h(c)o ! (haracter)f(whose)g(v)m(alue)i(is)e(the)h(o)q(ctal)f(v)m(alue)i ! Fk(nnn)f Fu(\(one)f(to)555 1642 y(three)e(digits\))315 ! 1725 y Ft(\\x)p Fk(HH)124 b Fu(the)20 b(eigh)o(t-bit)g(c)o(haracter)f ! (whose)h(v)m(alue)h(is)f(the)g(hexadecimal)h(v)m(alue)g ! Fk(HH)555 1780 y Fu(\(one)15 b(or)g(t)o(w)o(o)f(hex)h(digits\))315 ! 1863 y(When)k(en)o(tering)g(the)g(text)f(of)g(a)h(macro,)f(single)i(or) ! e(double)i(quotes)f(m)o(ust)f(b)q(e)h(used)h(to)315 1917 y(indicate)12 b(a)f(macro)f(de\014nition.)20 b(Unquoted)11 b(text)f(is)i(assumed)e(to)h(b)q(e)g(a)f(function)i(name.)18 ! b(In)315 1972 y(the)11 b(macro)f(b)q(o)q(dy)l(,)i(the)f(bac)o(kslash)g (escap)q(es)g(describ)q(ed)i(ab)q(o)o(v)o(e)d(are)g(expanded.)20 ! b(Bac)o(kslash)315 2027 y(will)i(quote)d(an)o(y)h(other)g(c)o(haracter) f(in)i(the)f(macro)f(text,)h(including)j(`)p Ft(")p Fu(')c(and)h(`)p ! Ft(')p Fu('.)34 b(F)l(or)315 2082 y(example,)14 b(the)f(follo)o(wing)g (binding)i(will)g(mak)o(e)d(`)p Fo(C-x)i Ft(\\)p Fu(')f(insert)g(a)g (single)h(`)p Ft(\\)p Fu(')e(in)o(to)h(the)g(line:)435 ! 2148 y Ft("\\C-x\\\\":)23 b("\\\\")75 2267 y Fj(1.3.2)30 ! b(Conditional)20 b(Init)g(Constructs)137 2366 y Fu(Readline)f(implemen) o(ts)g(a)f(facilit)o(y)g(similar)h(in)g(spirit)f(to)f(the)h ! (conditional)h(compilation)g(features)75 2421 y(of)e(the)g(C)g(prepro)q (cessor)g(whic)o(h)i(allo)o(ws)e(k)o(ey)g(bindings)i(and)f(v)m(ariable) ! g(settings)f(to)g(b)q(e)h(p)q(erformed)f(as)75 2476 y(the)e(result)h (of)f(tests.)k(There)c(are)g(four)g(parser)g(directiv)o(es)h(used.)75 ! 2560 y Ft($if)168 b Fu(The)16 b Ft($if)f Fu(construct)g(allo)o(ws)h (bindings)i(to)d(b)q(e)h(made)g(based)g(on)f(the)h(editing)h(mo)q(de,)f ! (the)315 2615 y(terminal)k(b)q(eing)g(used,)g(or)f(the)g(application)i (using)e(Readline.)33 b(The)19 b(text)g(of)f(the)i(test)315 ! 2670 y(extends)c(to)e(the)h(end)h(of)f(the)g(line;)i(no)e(c)o ! (haracters)f(are)h(required)i(to)d(isolate)i(it.)p eop ! %%Page: 9 11 ! 9 10 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(9)315 149 y Ft(mode)144 b Fu(The)11 b Ft(mode=)e Fu(form)h(of)g(the)h Ft($if)f Fu(directiv)o(e)h(is)g(used)g(to)f(test)g(whether)h(Readline) ! 555 204 y(is)k(in)h Ft(emacs)e Fu(or)g Ft(vi)g Fu(mo)q(de.)20 b(This)c(ma)o(y)e(b)q(e)h(used)g(in)h(conjunction)g(with)f(the)555 ! 259 y(`)p Ft(set)f(keymap)p Fu(')f(command,)g(for)h(instance,)g(to)f ! (set)h(bindings)h(in)g(the)f Ft(emacs-)555 314 y(standard)d Fu(and)i Ft(emacs-ctlx)e Fu(k)o(eymaps)h(only)i(if)f(Readline)g(is)g ! (starting)f(out)555 369 y(in)k Ft(emacs)f Fu(mo)q(de.)315 ! 448 y Ft(term)144 b Fu(The)14 b Ft(term=)e Fu(form)h(ma)o(y)g(b)q(e)h (used)g(to)f(include)j(terminal-sp)q(eci\014c)g(k)o(ey)d(bind-)555 ! 503 y(ings,)19 b(p)q(erhaps)g(to)e(bind)i(the)g(k)o(ey)e(sequences)j ! (output)e(b)o(y)g(the)g(terminal's)555 558 y(function)13 b(k)o(eys.)18 b(The)13 b(w)o(ord)e(on)h(the)g(righ)o(t)g(side)g(of)g ! (the)g(`)p Ft(=)p Fu(')f(is)h(tested)g(against)555 613 y(b)q(oth)j(the)g(full)i(name)e(of)f(the)h(terminal)h(and)f(the)g(p)q ! (ortion)h(of)e(the)h(terminal)555 667 y(name)i(b)q(efore)g(the)g (\014rst)f(`)p Ft(-)p Fu('.)24 b(This)17 b(allo)o(ws)g Ft(sun)f Fu(to)g(matc)o(h)h(b)q(oth)f Ft(sun)h Fu(and)555 ! 722 y Ft(sun-cmd)p Fu(,)d(for)g(instance.)315 802 y Ft(application)555 ! 857 y Fu(The)d Fk(application)i Fu(construct)e(is)g(used)h(to)e ! (include)j(application-sp)q(eci)q(\014c)h(set-)555 912 ! y(tings.)19 b(Eac)o(h)12 b(program)f(using)j(the)e(Readline)i(library)f ! (sets)f(the)g Fk(application)555 966 y(name)p Fu(,)g(and)g(y)o(ou)f ! (can)h(test)f(for)g(a)g(particular)h(v)m(alue.)20 b(This)12 ! b(could)h(b)q(e)f(used)h(to)555 1021 y(bind)18 b(k)o(ey)e(sequences)i ! (to)d(functions)j(useful)f(for)f(a)g(sp)q(eci\014c)i(program.)23 ! b(F)l(or)555 1076 y(instance,)17 b(the)g(follo)o(wing)g(command)g(adds) ! f(a)g(k)o(ey)h(sequence)g(that)f(quotes)555 1131 y(the)f(curren)o(t)g ! (or)g(previous)h(w)o(ord)e(in)j(Bash:)675 1195 y Ft($if)23 ! b(Bash)675 1247 y(#)h(Quote)f(the)g(current)g(or)h(previous)f(word)675 ! 1299 y("\\C-xq":)g("\\eb\\"\\ef\\"")675 1351 y($endif)75 ! 1430 y($endif)96 b Fu(This)16 b(command,)e(as)h(seen)h(in)g(the)f ! (previous)h(example,)g(terminates)f(an)g Ft($if)f Fu(command.)75 ! 1510 y Ft($else)120 b Fu(Commands)15 b(in)h(this)f(branc)o(h)h(of)e ! (the)i Ft($if)e Fu(directiv)o(e)j(are)e(executed)h(if)g(the)f(test)g ! (fails.)75 1590 y Ft($include)48 b Fu(This)22 b(directiv)o(e)h(tak)o ! (es)e(a)h(single)h(\014lename)g(as)e(an)h(argumen)o(t)f(and)h(reads)f ! (commands)315 1645 y(and)e(bindings)j(from)c(that)h(\014le.)33 b(F)l(or)19 b(example,)i(the)e(follo)o(wing)h(directiv)o(e)h(reads)e ! (from)315 1699 y(`)p Ft(/etc/inputrc)p Fu(':)435 1764 ! y Ft($include)k(/etc/inputrc)75 1876 y Fj(1.3.3)30 b(Sample)20 ! b(Init)h(File)137 1972 y Fu(Here)16 b(is)g(an)f(example)h(of)f(an)g Fk(inputrc)k Fu(\014le.)i(This)16 b(illustrates)g(k)o(ey)f(binding,)i ! (v)m(ariable)f(assignmen)o(t,)75 2027 y(and)f(conditional)i(syn)o(tax.) p eop %%Page: 10 12 *************** *** 1963,2008 **** (c)o(haracter)e(t)o(yp)q(ed)i(w)o(as)f(not)g(b)q(ound)i(to)315 314 y Ft(delete-char)p Fu(,)13 b(then)j(return)f Fp(eof)p ! Fu(.)75 406 y Ft(backward-delete-char)d(\(Rubout\))315 ! 460 y Fu(Delete)k(the)f(c)o(haracter)f(b)q(ehind)j(the)f(cursor.)j(A)c (n)o(umeric)h(argumen)o(t)e(means)i(to)e(kill)j(the)315 ! 515 y(c)o(haracters)d(instead)i(of)f(deleting)i(them.)75 ! 607 y Ft(forward-backward-delete-ch)o(ar)12 b(\(\))315 ! 662 y Fu(Delete)20 b(the)f(c)o(haracter)f(under)i(the)f(cursor,)h (unless)g(the)f(cursor)g(is)h(at)e(the)h(end)h(of)f(the)315 ! 717 y(line,)e(in)g(whic)o(h)g(case)e(the)h(c)o(haracter)g(b)q(ehind)h (the)f(cursor)g(is)g(deleted.)23 b(By)16 b(default,)h(this)315 ! 771 y(is)f(not)f(b)q(ound)h(to)e(a)h(k)o(ey)l(.)75 863 ! y Ft(quoted-insert)e(\(C-q)i(or)g(C-v\))315 918 y Fu(Add)j(the)f(next)g (c)o(haracter)g(t)o(yp)q(ed)g(to)f(the)i(line)g(v)o(erbatim.)26 ! b(This)18 b(is)f(ho)o(w)g(to)g(insert)g(k)o(ey)315 973 y(sequences)f(lik)o(e)h Fo(C-q)p Fu(,)d(for)h(example.)75 ! 1065 y Ft(tab-insert)f(\(M-)401 1063 y Fn(h)p 412 1037 ! 74 2 v 412 1065 a Fm(T)m(AB)p 412 1072 V 484 1063 a Fn(i)499 ! 1065 y Ft(\))315 1119 y Fu(Insert)h(a)g(tab)g(c)o(haracter.)75 ! 1211 y Ft(self-insert)f(\(a,)g(b,)h(A,)g(1,)g(!,)g(...)o(\))315 ! 1266 y Fu(Insert)g(y)o(ourself.)75 1358 y Ft(transpose-chars)e(\(C-t\)) ! 315 1413 y Fu(Drag)i(the)h(c)o(haracter)f(b)q(efore)h(the)h(cursor)e (forw)o(ard)g(o)o(v)o(er)g(the)h(c)o(haracter)f(at)h(the)g(cursor,)315 ! 1467 y(mo)o(ving)i(the)f(cursor)h(forw)o(ard)e(as)i(w)o(ell.)28 b(If)18 b(the)g(insertion)h(p)q(oin)o(t)f(is)g(at)f(the)h(end)h(of)e ! (the)315 1522 y(line,)c(then)e(this)h(transp)q(oses)e(the)h(last)g(t)o (w)o(o)f(c)o(haracters)g(of)h(the)g(line.)20 b(Negativ)o(e)11 ! b(argumen)o(ts)315 1577 y(ha)o(v)o(e)k(no)g(e\013ect.)75 ! 1669 y Ft(transpose-words)e(\(M-t\))315 1724 y Fu(Drag)i(the)h(w)o(ord) g(b)q(efore)g(p)q(oin)o(t)h(past)f(the)g(w)o(ord)f(after)h(p)q(oin)o ! (t,)g(mo)o(ving)g(p)q(oin)o(t)h(past)f(that)315 1778 ! y(w)o(ord)f(as)f(w)o(ell.)75 1870 y Ft(upcase-word)g(\(M-u\))315 ! 1925 y Fu(Upp)q(ercase)j(the)f(curren)o(t)g(\(or)f(follo)o(wing\))h(w)o ! (ord.)22 b(With)16 b(a)g(negativ)o(e)g(argumen)o(t,)f(upp)q(er-)315 ! 1980 y(case)g(the)g(previous)h(w)o(ord,)f(but)g(do)g(not)g(mo)o(v)o(e)f ! (the)i(cursor.)75 2072 y Ft(downcase-word)d(\(M-l\))315 ! 2126 y Fu(Lo)o(w)o(ercase)d(the)h(curren)o(t)g(\(or)f(follo)o(wing\))h ! (w)o(ord.)17 b(With)11 b(a)g(negativ)o(e)g(argumen)o(t,)f(lo)o(w)o ! (ercase)315 2181 y(the)15 b(previous)h(w)o(ord,)e(but)i(do)f(not)g(mo)o ! (v)o(e)f(the)h(cursor.)75 2273 y Ft(capitalize-word)e(\(M-c\))315 ! 2328 y Fu(Capitalize)f(the)f(curren)o(t)f(\(or)g(follo)o(wing\))h(w)o (ord.)18 b(With)11 b(a)f(negativ)o(e)h(argumen)o(t,)f(capitalize)315 ! 2383 y(the)15 b(previous)h(w)o(ord,)e(but)i(do)f(not)g(mo)o(v)o(e)f ! (the)h(cursor.)75 2494 y Fj(1.4.4)30 b(Killing)20 b(And)h(Y)-5 b(anking)75 2615 y Ft(kill-line)14 b(\(C-k\))315 2670 y Fu(Kill)j(the)f(text)e(from)h(p)q(oin)o(t)h(to)e(the)h(end)h(of)f --- 1985,2033 ---- (c)o(haracter)e(t)o(yp)q(ed)i(w)o(as)f(not)g(b)q(ound)i(to)315 314 y Ft(delete-char)p Fu(,)13 b(then)j(return)f Fp(eof)p ! Fu(.)75 401 y Ft(backward-delete-char)d(\(Rubout\))315 ! 456 y Fu(Delete)k(the)f(c)o(haracter)f(b)q(ehind)j(the)f(cursor.)j(A)c (n)o(umeric)h(argumen)o(t)e(means)i(to)e(kill)j(the)315 ! 511 y(c)o(haracters)d(instead)i(of)f(deleting)i(them.)75 ! 598 y Ft(forward-backward-delete-ch)o(ar)12 b(\(\))315 ! 653 y Fu(Delete)20 b(the)f(c)o(haracter)f(under)i(the)f(cursor,)h (unless)g(the)f(cursor)g(is)h(at)e(the)h(end)h(of)f(the)315 ! 707 y(line,)e(in)g(whic)o(h)g(case)e(the)h(c)o(haracter)g(b)q(ehind)h (the)f(cursor)g(is)g(deleted.)23 b(By)16 b(default,)h(this)315 ! 762 y(is)f(not)f(b)q(ound)h(to)e(a)h(k)o(ey)l(.)75 850 ! y Ft(quoted-insert)e(\(C-q)i(or)g(C-v\))315 904 y Fu(Add)j(the)f(next)g (c)o(haracter)g(t)o(yp)q(ed)g(to)f(the)i(line)g(v)o(erbatim.)26 ! b(This)18 b(is)f(ho)o(w)g(to)g(insert)g(k)o(ey)315 959 y(sequences)f(lik)o(e)h Fo(C-q)p Fu(,)d(for)h(example.)75 ! 1046 y Ft(tab-insert)f(\(M-)401 1044 y Fn(h)p 412 1018 ! 74 2 v 412 1046 a Fm(T)m(AB)p 412 1054 V 484 1044 a Fn(i)499 ! 1046 y Ft(\))315 1101 y Fu(Insert)h(a)g(tab)g(c)o(haracter.)75 ! 1188 y Ft(self-insert)f(\(a,)g(b,)h(A,)g(1,)g(!,)g(...)o(\))315 ! 1243 y Fu(Insert)g(y)o(ourself.)75 1330 y Ft(transpose-chars)e(\(C-t\)) ! 315 1385 y Fu(Drag)i(the)h(c)o(haracter)f(b)q(efore)h(the)h(cursor)e (forw)o(ard)g(o)o(v)o(er)g(the)h(c)o(haracter)f(at)h(the)g(cursor,)315 ! 1440 y(mo)o(ving)i(the)f(cursor)h(forw)o(ard)e(as)i(w)o(ell.)28 b(If)18 b(the)g(insertion)h(p)q(oin)o(t)f(is)g(at)f(the)h(end)h(of)e ! (the)315 1495 y(line,)c(then)e(this)h(transp)q(oses)e(the)h(last)g(t)o (w)o(o)f(c)o(haracters)g(of)h(the)g(line.)20 b(Negativ)o(e)11 ! b(argumen)o(ts)315 1550 y(ha)o(v)o(e)k(no)g(e\013ect.)75 ! 1637 y Ft(transpose-words)e(\(M-t\))315 1692 y Fu(Drag)i(the)h(w)o(ord) g(b)q(efore)g(p)q(oin)o(t)h(past)f(the)g(w)o(ord)f(after)h(p)q(oin)o ! (t,)g(mo)o(ving)g(p)q(oin)o(t)h(past)f(that)315 1746 ! y(w)o(ord)d(as)h(w)o(ell.)21 b(If)14 b(the)g(insertion)i(p)q(oin)o(t)e ! (is)h(at)f(the)g(end)h(of)e(the)i(line,)g(this)g(transp)q(oses)f(the) ! 315 1801 y(last)h(t)o(w)o(o)f(w)o(ords)g(on)i(the)f(line.)75 ! 1888 y Ft(upcase-word)f(\(M-u\))315 1943 y Fu(Upp)q(ercase)j(the)f ! (curren)o(t)g(\(or)f(follo)o(wing\))h(w)o(ord.)22 b(With)16 ! b(a)g(negativ)o(e)g(argumen)o(t,)f(upp)q(er-)315 1998 ! y(case)g(the)g(previous)h(w)o(ord,)f(but)g(do)g(not)g(mo)o(v)o(e)f(the) ! i(cursor.)75 2085 y Ft(downcase-word)d(\(M-l\))315 2140 ! y Fu(Lo)o(w)o(ercase)d(the)h(curren)o(t)g(\(or)f(follo)o(wing\))h(w)o ! (ord.)17 b(With)11 b(a)g(negativ)o(e)g(argumen)o(t,)f(lo)o(w)o(ercase) ! 315 2195 y(the)15 b(previous)h(w)o(ord,)e(but)i(do)f(not)g(mo)o(v)o(e)f ! (the)h(cursor.)75 2282 y Ft(capitalize-word)e(\(M-c\))315 ! 2337 y Fu(Capitalize)f(the)f(curren)o(t)f(\(or)g(follo)o(wing\))h(w)o (ord.)18 b(With)11 b(a)f(negativ)o(e)h(argumen)o(t,)f(capitalize)315 ! 2392 y(the)15 b(previous)h(w)o(ord,)e(but)i(do)f(not)g(mo)o(v)o(e)f ! (the)h(cursor.)75 2499 y Fj(1.4.4)30 b(Killing)20 b(And)h(Y)-5 b(anking)75 2615 y Ft(kill-line)14 b(\(C-k\))315 2670 y Fu(Kill)j(the)f(text)e(from)h(p)q(oin)o(t)h(to)e(the)h(end)h(of)f *************** *** 2294,4026 **** (the)h(history.)f(*/)243 461 y(if)g(\(line_read)g(&&)g(*line_read\))290 513 y(add_history)g(\(line_read\);)243 616 y(return)g(\(line_read\);) ! 195 668 y(})137 738 y Fu(This)13 b(function)f(giv)o(es)h(the)e(user)h ! (the)g(default)h(b)q(eha)o(viour)g(of)1169 736 y Fn(h)p ! 1181 710 74 2 v 1181 738 a Fm(T)m(AB)p 1181 746 V 1253 ! 736 a Fn(i)1280 738 y Fu(completion:)19 b(completion)13 ! b(on)f(\014le)75 793 y(names.)20 b(If)c(y)o(ou)f(do)g(not)g(w)o(an)o(t) f(Readline)j(to)d(complete)j(on)e(\014lenames,)h(y)o(ou)f(can)g(c)o ! (hange)h(the)f(binding)75 848 y(of)g(the)205 846 y Fn(h)p ! 217 820 V 217 848 a Fm(T)m(AB)p 217 855 V 289 846 a Fn(i)319 ! 848 y Fu(k)o(ey)g(with)h Ft(rl_bind_key\(\))p Fu(.)195 ! 914 y Ft(int)23 b(rl_bind_key)g(\(int)g Fk(k)o(ey)p Ft(,)h ! (rl_command_func_t)d(*)p Fk(function)p Ft(\);)137 984 y(rl_bind_key\(\))15 b Fu(tak)o(es)h(t)o(w)o(o)g(argumen)o(ts:)22 b Fk(k)o(ey)e Fu(is)e(the)e(c)o(haracter)g(that)g(y)o(ou)h(w)o(an)o(t)f ! (to)g(bind,)i(and)75 1039 y Fk(function)h Fu(is)f(the)g(address)g(of)g (the)g(function)g(to)g(call)h(when)f Fk(k)o(ey)k Fu(is)c(pressed.)29 ! b(Binding)1628 1037 y Fn(h)p 1641 1011 V 1641 1039 a ! Fm(T)m(AB)p 1641 1046 V 1712 1037 a Fn(i)1745 1039 y ! Fu(to)17 b Ft(rl_)75 1094 y(insert\(\))f Fu(mak)o(es)422 ! 1092 y Fn(h)p 434 1066 V 434 1094 a Fm(T)m(AB)p 434 1101 ! V 506 1092 a Fn(i)539 1094 y Fu(insert)i(itself.)28 b Ft(rl_bind_key\(\))15 b Fu(returns)j(non-zero)g(if)g ! Fk(k)o(ey)j Fu(is)d(not)f(a)g(v)m(alid)75 1148 y(ASCI)q(I)f(c)o (haracter)f(co)q(de)h(\(b)q(et)o(w)o(een)f(0)g(and)g(255\).)137 ! 1218 y(Th)o(us,)g(to)g(disable)h(the)g(default)703 1216 ! y Fn(h)p 716 1190 V 716 1218 a Fm(T)m(AB)p 716 1226 V ! 787 1216 a Fn(i)817 1218 y Fu(b)q(eha)o(vior,)g(the)f(follo)o(wing)h ! (su\016ces:)195 1285 y Ft(rl_bind_key)22 b(\('\\t',)h(rl_insert\);)137 ! 1354 y Fu(This)14 b(co)q(de)g(should)g(b)q(e)g(executed)g(once)g(at)e (the)h(start)f(of)h(y)o(our)g(program;)f(y)o(ou)h(migh)o(t)g(write)g(a) ! g(func-)75 1409 y(tion)k(called)h Ft(initialize_readline\(\))13 b Fu(whic)o(h)k(p)q(erforms)f(this)h(and)g(other)f(desired)h ! (initializations,)75 1464 y(suc)o(h)f(as)e(installing)k(custom)c (completers)i(\(see)f(Section)h(2.6)f([Custom)f(Completers],)g(page)h ! (38\).)75 1599 y Fs(2.2)33 b(Custom)21 b(F)-6 b(unctions)137 ! 1697 y Fu(Readline)14 b(pro)o(vides)f(man)o(y)e(functions)i(for)f (manipulating)i(the)e(text)g(of)g(the)g(line,)i(but)e(it)h(isn't)f(p)q ! (ossi-)75 1752 y(ble)i(to)f(an)o(ticipate)h(the)f(needs)h(of)f(all)h (programs.)k(This)13 b(section)h(describ)q(es)h(the)e(v)m(arious)h ! (functions)g(and)75 1807 y(v)m(ariables)g(de\014ned)h(within)f(the)f (Readline)i(library)e(whic)o(h)h(allo)o(w)g(a)e(user)h(program)f(to)h ! (add)g(customized)75 1862 y(functionalit)o(y)j(to)f(Readline.)137 ! 1931 y(Before)j(declaring)i(an)o(y)e(functions)h(that)f(customize)g (Readline's)h(b)q(eha)o(vior,)h(or)d(using)i(an)o(y)f(func-)75 ! 1986 y(tionalit)o(y)23 b(Readline)h(pro)o(vides)g(in)f(other)g(co)q (de,)h(an)f(application)i(writer)d(should)i(include)h(the)e(\014le)75 ! 2041 y Ft()14 b Fu(in)j(an)o(y)g(\014le)h(that)e (uses)h(Readline's)g(features.)24 b(Since)19 b(some)d(of)g(the)h ! (de\014-)75 2096 y(nitions)g(in)f Ft(readline.h)e Fu(use)i(the)g Ft(stdio)f Fu(library)l(,)h(the)g(\014le)g Ft()f ! Fu(should)h(b)q(e)g(included)j(b)q(efore)75 2151 y Ft(readline.h)p ! Fu(.)75 2268 y Fj(2.2.1)30 b(Readline)20 b(T)n(yp)r(edefs)137 ! 2366 y Fu(F)l(or)15 b(readabilt)o(y)l(,)g(w)o(e)g(declare)i(a)d(n)o(um) o(b)q(er)i(of)f(new)g(ob)s(ject)g(t)o(yp)q(es,)g(all)h(p)q(oin)o(ters)f ! (to)g(functions.)137 2436 y(The)j(reason)g(for)f(declaring)i(these)f ! (new)g(t)o(yp)q(es)g(is)h(to)e(mak)o(e)g(it)h(easier)h(to)e(write)h(co) ! q(de)g(describing)75 2491 y(p)q(oin)o(ters)e(to)e(C)h(functions)h(with) ! g(appropriately)f(protot)o(yp)q(ed)g(argumen)o(ts)g(and)g(return)g(v)m ! (alues.)137 2560 y(F)l(or)j(instance,)i(sa)o(y)e(w)o(e)g(w)o(an)o(t)f ! (to)h(declare)h(a)f(v)m(ariable)i Fk(func)i Fu(as)c(a)g(p)q(oin)o(ter)h ! (to)f(a)g(function)h(whic)o(h)75 2615 y(tak)o(es)12 b(t)o(w)o(o)g ! Ft(int)g Fu(argumen)o(ts)g(and)h(returns)g(an)g Ft(int)f ! Fu(\(this)h(is)g(the)g(t)o(yp)q(e)g(of)g(all)g(of)g(the)g(Readline)h ! (bindable)75 2670 y(functions\).)20 b(Instead)c(of)f(the)g(classic)h(C) ! f(declaration)p eop %%Page: 21 23 21 22 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(21)137 149 y Ft(int)15 b(\(*func\)\(\);)75 ! 220 y Fu(or)g(the)g(ANSI-C)h(st)o(yle)f(declaration)137 ! 290 y Ft(int)g(\(*func\)\(int,)f(int\);)75 360 y Fu(w)o(e)h(ma)o(y)f ! (write)137 430 y Ft(rl_command_func_t)f(*func;)137 500 y Fu(The)j(full)g(list)g(of)f(function)h(p)q(oin)o(ter)g(t)o(yp)q(es)f ! (a)o(v)m(ailable)i(is)75 584 y Ft(typedef)d(int)h(rl_command_func_t)e ! (\(int,)h(int\);)75 652 y(typedef)g(char)h(*rl_compentry_func_t)d ! (\(const)j(char)f(*,)h(int\);)75 721 y(typedef)f(char)h (**rl_completion_func_t)d(\(const)i(char)h(*,)g(int,)f(int\);)75 ! 790 y(typedef)g(char)h(*rl_quote_func_t)e(\(char)h(*,)h(int,)g(char)f ! (*\);)75 858 y(typedef)g(char)h(*rl_dequote_func_t)d(\(char)j(*,)g ! (int\);)75 927 y(typedef)f(int)h(rl_compignore_func_t)d(\(char)j(**\);) ! 75 996 y(typedef)f(void)h(rl_compdisp_func_t)d(\(char)j(**,)g(int,)f ! (int\);)75 1064 y(typedef)g(int)h(rl_hook_func_t)e(\(void\);)75 ! 1133 y(typedef)h(int)h(rl_getc_func_t)e(\(FILE)i(*\);)75 ! 1202 y(typedef)f(int)h(rl_linebuf_func_t)e(\(char)h(*,)h(int\);)75 ! 1270 y(typedef)f(int)h(rl_intfunc_t)e(\(int\);)75 1339 ! y(#define)h(rl_ivoidfunc_t)f(rl_hook_func_t)75 1408 y(typedef)h(int)h ! (rl_icpfunc_t)e(\(char)i(*\);)75 1476 y(typedef)f(int)h(rl_icppfunc_t)e ! (\(char)i(**\);)75 1545 y(typedef)f(void)h(rl_voidfunc_t)e(\(void\);)75 ! 1614 y(typedef)h(void)h(rl_vintfunc_t)e(\(int\);)75 1682 ! y(typedef)h(void)h(rl_vcpfunc_t)e(\(char)i(*\);)75 1751 y(typedef)f(void)h(rl_vcppfunc_t)e(\(char)i(**\);)75 ! 1855 y Fj(2.2.2)30 b(W)-5 b(riting)20 b(a)h(New)f(F)-5 ! b(unction)137 1954 y Fu(In)17 b(order)f(to)f(write)h(new)h(functions)g (for)e(Readline,)i(y)o(ou)f(need)h(to)e(kno)o(w)h(the)g(calling)i(con)o ! (v)o(en)o(tions)75 2009 y(for)g(k)o(eyb)q(oard-in)o(v)o(ok)o(ed)h (functions,)g(and)g(the)f(names)h(of)f(the)g(v)m(ariables)i(that)d ! (describ)q(e)k(the)d(curren)o(t)75 2064 y(state)c(of)h(the)g(line)i ! (read)e(so)g(far.)137 2134 y(The)h(calling)h(sequence)f(for)f(a)f ! (command)i Ft(foo)e Fu(lo)q(oks)i(lik)o(e)195 2201 y ! Ft(foo)23 b(\(int)h(count,)f(int)g(key\))75 2271 y Fu(where)18 b Fk(coun)o(t)h Fu(is)f(the)g(n)o(umeric)h(argumen)o(t)e(\(or)h(1)f(if) i(defaulted\))f(and)g Fk(k)o(ey)k Fu(is)d(the)f(k)o(ey)g(that)f(in)o(v) ! o(ok)o(ed)75 2326 y(this)f(function.)137 2396 y(It)c(is)g(completely)h (up)f(to)f(the)g(function)i(as)e(to)g(what)g(should)h(b)q(e)g(done)g ! (with)g(the)g(n)o(umeric)g(argumen)o(t.)75 2451 y(Some)20 b(functions)h(use)f(it)g(as)g(a)g(rep)q(eat)g(coun)o(t,)g(some)g(as)g ! (a)f(\015ag,)i(and)f(others)g(to)f(c)o(ho)q(ose)h(alternate)75 ! 2506 y(b)q(eha)o(vior)i(\(refreshing)g(the)g(curren)o(t)f(line)j(as)d (opp)q(osed)h(to)f(refreshing)i(the)e(screen,)j(for)d(example\).)75 ! 2560 y(Some)c(c)o(ho)q(ose)f(to)g(ignore)h(it.)24 b(In)18 b(general,)f(if)g(a)f(fu