diff -Nrc2 readline-4.2a/CHANGELOG readline-4.3/CHANGELOG *** readline-4.2a/CHANGELOG Fri Nov 2 11:42:09 2001 --- readline-4.3/CHANGELOG Mon May 20 12:55:41 2002 *************** *** 609,610 **** --- 609,699 ---- Makefile.in, shlib/Makefile.in - don't put -I$(includedir) into CFLAGS + + 11/15 + ----- + [readline-4.2a released] + + 11/20 + ----- + examples/rlcat.c + - new file + + examples/Makefile.in + - changes for rlcat + + 11/28 + ----- + configure.in + - default TERMCAP_LIB to -lcurses if $prefer_curses == yes (as when + --with-curses is supplied) + + examples/Makefile.in + - substitute @LDFLAGS@ in LDFLAGS assignment + + 11/29 + ----- + config.h.in + - add necessary defines for multibyte include files and functions + - add code to define HANDLE_MULTIBYTE if prerequisites are met + + configure.in + - call BASH_CHECK_MULTIBYTE + + 12/14 + ----- + config.h.in + - add #undef PROTOTYPES, filled in by AC_C_PROTOTYPES + + 12/17 + ----- + config.h.in + - moved HANDLE_MULTIBYTE code to rlmbutil.h + + rlmbutil.h, mbutil.c + - new files + + Makefile.in, shlib/Makefile.in + - added rules for mbutil.c + + 12/20 + ----- + configure.in + - added --enable-shared, --enable-static options to configure to + say which libraries are built by default (both default to yes) + - if SHLIB_STATUS == 'unsupported', turn off default shared library + building + - substitute new STATIC_TARGET, SHARED_TARGET, STATIC_INSTALL_TARGET, + and SHARED_INSTALL_TARGET + + Makefile.in + - `all' target now depends on (substituted) @STATIC_TARGET@ and + @SHARED_TARGET@ + - `install' target now depends on (substituted) @STATIC_INSTALL_TARGET@ + and @SHARED_INSTALL_TARGET@ + + INSTALL, README + - updated with new info about --enable-shared and --enable-static + + 1/10/2002 + --------- + configure.in + - bumped the library version number to 4.3 + + 1/24 + ---- + Makefile.in,shlib/Makefile.in + - changes for new file, text.c, with character and text handling + functions from readline.c + + 2/20 + ---- + {configure.config.h}.in + - call AC_C_CHAR_UNSIGNED, define __CHAR_UNSIGNED__ if chars are + unsigned by default + + 5/20 + ---- + doc/Makefile.in + - new maybe-clean target that removes the generated documentation if + the build directory differs from the source directory + - distclean target now depends on maybe-clean diff -Nrc2 readline-4.2a/CHANGES readline-4.3/CHANGES *** readline-4.2a/CHANGES Wed Nov 7 17:00:32 2001 --- readline-4.3/CHANGES Tue Jul 9 15:53:40 2002 *************** *** 1,2 **** --- 1,81 ---- + This document details the changes between this version, readline-4.3, + and the previous version, readline-4.2a. + + 1. Changes to Readline + + a. Fixed output of comment-begin character when listing variable values. + + b. Added some default key bindings for common escape sequences produced by + HOME and END keys. + + c. Fixed the mark handling code to be more emacs-compatible. + + d. A bug was fixed in the code that prints possible completions to keep it + from printing empty strings in certain circumstances. + + e. Change the key sequence printing code to print ESC as M\- if ESC is a + meta-prefix character -- it's easier for users to understand than \e. + + f. Fixed unstifle_history() to return values that match the documentation. + + g. Fixed the event loop (rl_event_hook) to handle the case where the input + file descriptor is invalidated. + + h. Fixed the prompt display code to work better when the application has a + custom redisplay function. + + i. Changes to make reading and writing the history file a little faster, and + to cope with huge history files without calling abort(3) from xmalloc. + + j. The vi-mode `S' and `s' commands are now undone correctly. + + k. Fixed a problem which caused the display to be messed up when the last + line of a multi-line prompt (possibly containing invisible characters) + was longer than the screen width. + + 2. New Features in Readline + + a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both + be bound to readline functions. Now the arrow keys may be used in vi + insert mode. + + b. When listing completions, and the number of lines displayed is more than + the screen length, readline uses an internal pager to display the results. + This is controlled by the `page-completions' variable (default on). + + c. New code to handle editing and displaying multibyte characters. + + d. The behavior introduced in bash-2.05a of deciding whether or not to + append a slash to a completed name that is a symlink to a directory has + been made optional, controlled by the `mark-symlinked-directories' + variable (default is the 2.05a behavior). + + e. The `insert-comment' command now acts as a toggle if given a numeric + argument: if the first characters on the line don't specify a + comment, insert one; if they do, delete the comment text + + f. New application-settable completion variable: + rl_completion_mark_symlink_dirs, allows an application's completion + function to temporarily override the user's preference for appending + slashes to names which are symlinks to directories. + + g. New function available to application completion functions: + rl_completion_mode, to tell how the completion function was invoked + and decide which argument to supply to rl_complete_internal (to list + completions, etc.). + + h. Readline now has an overwrite mode, toggled by the `overwrite-mode' + bindable command, which could be bound to `Insert'. + + i. New application-settable completion variable: + rl_completion_suppress_append, inhibits appending of + rl_completion_append_character to completed words. + + j. New key bindings when reading an incremental search string: ^W yanks + the currently-matched word out of the current line into the search + string; ^Y yanks the rest of the current line into the search string, + DEL or ^H deletes characters from the search string. + + ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.2a, and the previous version, readline-4.2. diff -Nrc2 readline-4.2a/INSTALL readline-4.3/INSTALL *** readline-4.2a/INSTALL Wed Aug 22 13:43:01 2001 --- readline-4.3/INSTALL Wed Jul 3 17:29:50 2002 *************** *** 2,6 **** ================== ! These are installation instructions for Readline 4.2a. The simplest way to compile readline is: --- 2,6 ---- ================== ! These are installation instructions for Readline-4.3. The simplest way to compile readline is: *************** *** 15,26 **** 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 --- 15,28 ---- messages telling which features it is checking for. ! 2. Type `make' to compile readline and build the static readline ! and history libraries. If supported, the shared readline and history ! libraries will be built also. 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 readline and history ! libraries, the readline include files, the documentation, and, if ! supported, the shared readline and history libraries. 4. You can remove the created libraries and object files from the *************** *** 53,57 **** 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 --- 55,60 ---- program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version ! of `autoconf'. The readline `configure.in' requires autoconf ! version 2.50 or newer. Compilers and Options *************** *** 162,166 **** ================= ! The readline `configure' takes a single `--with-PACKAGE' option: `--with-curses' --- 165,169 ---- ================= ! The readline `configure' recognizes a single `--with-PACKAGE' option: `--with-curses' *************** *** 172,175 **** --- 175,187 ---- This option tells readline to link the example programs with the curses library rather than libtermcap. + + `configure' also recognizes two `--enable-FEATURE' options: + + `--enable-shared' + Build the shared libraries by default on supported platforms. The + default is `yes'. + + `--enable-static' + Build the static libraries by default. The default is `yes'. Shared Libraries *************** *** 180,185 **** 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 --- 192,199 ---- the `shlib' subdirectory, and typing `make shared' will cause shared versions of the readline and history libraries to be built ! on supported platforms. ! ! If `configure' is given the `--enable-shared' option, it will attempt ! to build the shared libraries by default on supported platforms. Configure calls the script support/shobj-conf to test whether or *************** *** 243,256 **** 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. --- 257,273 ---- 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. If ! shared libraries are not supported, this will be set to ! `unsupported'. 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' or `make'. The shared libraries will be created in the ! shlib subdirectory. ! If shared libraries are created, `make install' will install them. ! You may install only the shared libraries by running `make ! install-shared' from the top-level build directory. Running `make ! install' in the shlib subdirectory will also work. If you don't want ! to install any created shared libraries, run `make install-static'. diff -Nrc2 readline-4.2a/MANIFEST readline-4.3/MANIFEST *** readline-4.2a/MANIFEST Mon Sep 24 08:40:53 2001 --- readline-4.3/MANIFEST Thu Jan 24 09:40:24 2002 *************** *** 29,32 **** --- 29,33 ---- rlconf.h f rldefs.h f + rlmbutil.h f rlprivate.h f rlshell.h f *************** *** 39,42 **** --- 40,44 ---- xmalloc.h f bind.c f + callback.c f compat.c f complete.c f *************** *** 49,52 **** --- 51,56 ---- kill.c f macro.c f + mbutil.c f + misc.c f nls.c f parens.c f *************** *** 58,61 **** --- 62,66 ---- signals.c f terminal.c f + text.c f tilde.c f undo.c f *************** *** 63,67 **** vi_keymap.c f vi_mode.c f - callback.c f xmalloc.c f history.c f --- 68,71 ---- *************** *** 77,80 **** --- 81,85 ---- support/shobj-conf f support/shlib-install f + support/wcwidth.c f doc/Makefile.in f doc/texinfo.tex f *************** *** 96,99 **** --- 101,105 ---- examples/manexamp.c f examples/readlinebuf.h f + examples/rlcat.c f examples/rlfe.c f examples/rltest.c f diff -Nrc2 readline-4.2a/Makefile.in readline-4.3/Makefile.in *** readline-4.2a/Makefile.in Fri Nov 2 11:41:09 2001 --- readline-4.3/Makefile.in Thu Jan 24 10:15:24 2002 *************** *** 98,102 **** $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ ! $(srcdir)/compat.c # The header files for this library. --- 98,103 ---- $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ ! $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ ! $(srcdir)/mbutil.c # The header files for this library. *************** *** 104,115 **** posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \ ansi_stdlib.h tcap.h rlstdc.h xmalloc.h rlprivate.h rlshell.h \ ! rltypedefs.h ! HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o TILDEOBJ = tilde.o OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ rltty.o complete.o bind.o isearch.o display.o signals.o \ util.o kill.o undo.o macro.o input.o callback.o terminal.o \ ! nls.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) # The texinfo files which document this library. --- 105,116 ---- posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \ ansi_stdlib.h tcap.h rlstdc.h xmalloc.h rlprivate.h rlshell.h \ ! rltypedefs.h rlmbutil.h ! HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o TILDEOBJ = tilde.o OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ rltty.o complete.o bind.o isearch.o display.o signals.o \ util.o kill.o undo.o macro.o input.o callback.o terminal.o \ ! text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) # The texinfo files which document this library. *************** *** 128,135 **** ########################################################################## ! all: static ! everything: static shared examples static: $(STATIC_LIBS) --- 129,138 ---- ########################################################################## + TARGETS = @STATIC_TARGET@ @SHARED_TARGET@ + INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@ ! all: $(TARGETS) ! everything: all examples static: $(STATIC_LIBS) *************** *** 203,207 **** maybe-uninstall-headers: uninstall-headers ! install: installdirs $(STATIC_LIBS) install-headers -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a --- 206,212 ---- maybe-uninstall-headers: uninstall-headers ! install: $(INSTALL_TARGETS) ! ! install-static: installdirs $(STATIC_LIBS) install-headers -$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old $(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a *************** *** 212,218 **** -( 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 --- 217,222 ---- -( if test -d doc ; then \ cd doc && \ ! ${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \ fi ) installdirs: $(srcdir)/support/mkdirs *************** *** 330,333 **** --- 334,342 ---- macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h macro.o: history.h rlstdc.h + mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h + mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h + misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h + misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h + misc.o: history.h rlstdc.h ansi_stdlib.h nls.o: ansi_stdlib.h nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h *************** *** 356,359 **** --- 365,371 ---- terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h terminal.o: history.h rlstdc.h + text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h + text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h + text.o: history.h rlstdc.h ansi_stdlib.h tilde.o: ansi_stdlib.h tilde.o: ${BUILD_DIR}/config.h *************** *** 388,391 **** --- 400,405 ---- kill.o: rlprivate.h macro.o: rlprivate.h + mbutil.o: rlprivate.h + misc.o: rlprivate.h nls.o: rlprivate.h parens.o: rlprivate.h *************** *** 395,398 **** --- 409,413 ---- signals.o: rlprivate.h terminal.o: rlprivate.h + text.o: rlprivate.h undo.o: rlprivate.h util.o: rlprivate.h *************** *** 411,480 **** kill.o: xmalloc.h macro.o: xmalloc.h readline.o: xmalloc.h savestring.o: xmalloc.h search.o: xmalloc.h shell.o: xmalloc.h tilde.o: xmalloc.h ! tilde.o: xmalloc.h util.o: xmalloc.h vi_mode.o: xmalloc.h ! readline.o: $(srcdir)/readline.c ! vi_mode.o: $(srcdir)/vi_mode.c ! funmap.o: $(srcdir)/funmap.c ! keymaps.o: $(srcdir)/keymaps.c ! parens.o: $(srcdir)/parens.c ! search.o: $(srcdir)/search.c ! rltty.o: $(srcdir)/rltty.c compat.o: $(srcdir)/compat.c complete.o: $(srcdir)/complete.c - bind.o: $(srcdir)/bind.c - isearch.o: $(srcdir)/isearch.c display.o: $(srcdir)/display.c ! signals.o: $(srcdir)/signals.c ! util.o: $(srcdir)/util.c kill.o: $(srcdir)/kill.c - undo.o: $(srcdir)/undo.c macro.o: $(srcdir)/macro.c ! input.o: $(srcdir)/input.c ! callback.o: $(srcdir)/callback.c ! terminal.o: $(srcdir)/terminal.c nls.o: $(srcdir)/nls.c xmalloc.o: $(srcdir)/xmalloc.c ! history.o: $(srcdir)/history.c histexpand.o: $(srcdir)/histexpand.c histfile.o: $(srcdir)/histfile.c histsearch.o: $(srcdir)/histsearch.c - savestring.o: $(srcdir)/savestring.c - shell.o: $(srcdir)/shell.c - tilde.o: $(srcdir)/tilde.c ! readline.o: readline.c ! vi_mode.o: vi_mode.c ! funmap.o: funmap.c ! keymaps.o: keymaps.c ! parens.o: parens.c ! search.o: search.c ! rltty.o: rltty.c compat.o: compat.c complete.o: complete.c - bind.o: bind.c - isearch.o: isearch.c display.o: display.c ! signals.o: signals.c ! util.o: util.c kill.o: kill.c - undo.o: undo.c macro.o: macro.c ! input.o: input.c ! callback.o: callback.c ! terminal.o: terminal.c nls.o: nls.c xmalloc.o: xmalloc.c ! history.o: history.c histexpand.o: histexpand.c histfile.o: histfile.c histsearch.o: histsearch.c - savestring.o: savestring.c - shell.o: shell.c - tilde.o: tilde.c --- 426,520 ---- kill.o: xmalloc.h macro.o: xmalloc.h + mbutil.o: xmalloc.h + misc.o: xmalloc.h readline.o: xmalloc.h savestring.o: xmalloc.h search.o: xmalloc.h shell.o: xmalloc.h + terminal.o: xmalloc.h + text.o: xmalloc.h tilde.o: xmalloc.h ! undo.o: xmalloc.h util.o: xmalloc.h vi_mode.o: xmalloc.h + xmalloc.o: xmalloc.h ! complete.o: rlmbutil.h ! display.o: rlmbutil.h ! histexpand.o: rlmbutil.h ! input.o: rlmbutil.h ! isearch.o: rlmbutil.h ! mbutil.o: rlmbutil.h ! misc.o: rlmbutil.h ! readline.o: rlmbutil.h ! search.o: rlmbutil.h ! text.o: rlmbutil.h ! vi_mode.o: rlmbutil.h ! ! bind.o: $(srcdir)/bind.c ! callback.o: $(srcdir)/callback.c compat.o: $(srcdir)/compat.c complete.o: $(srcdir)/complete.c display.o: $(srcdir)/display.c ! funmap.o: $(srcdir)/funmap.c ! input.o: $(srcdir)/input.c ! isearch.o: $(srcdir)/isearch.c ! keymaps.o: $(srcdir)/keymaps.c $(srcdir)/emacs_keymap.c $(srcdir)/vi_keymap.c kill.o: $(srcdir)/kill.c macro.o: $(srcdir)/macro.c ! mbutil.o: $(srcdir)/mbutil.c ! misc.o: $(srcdir)/misc.c nls.o: $(srcdir)/nls.c + parens.o: $(srcdir)/parens.c + readline.o: $(srcdir)/readline.c + rltty.o: $(srcdir)/rltty.c + savestring.o: $(srcdir)/savestring.c + search.o: $(srcdir)/search.c + shell.o: $(srcdir)/shell.c + signals.o: $(srcdir)/signals.c + terminal.o: $(srcdir)/terminal.c + text.o: $(srcdir)/text.c + tilde.o: $(srcdir)/tilde.c + undo.o: $(srcdir)/undo.c + util.o: $(srcdir)/util.c + vi_mode.o: $(srcdir)/vi_mode.c xmalloc.o: $(srcdir)/xmalloc.c ! histexpand.o: $(srcdir)/histexpand.c histfile.o: $(srcdir)/histfile.c + history.o: $(srcdir)/history.c histsearch.o: $(srcdir)/histsearch.c ! bind.o: bind.c ! callback.o: callback.c compat.o: compat.c complete.o: complete.c display.o: display.c ! funmap.o: funmap.c ! input.o: input.c ! isearch.o: isearch.c ! keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c kill.o: kill.c macro.o: macro.c ! mbutil.o: mbutil.c ! misc.o: misc.c nls.o: nls.c + parens.o: parens.c + readline.o: readline.c + rltty.o: rltty.c + savestring.o: savestring.c + search.o: search.c + shell.o: shell.c + signals.o: signals.c + terminal.o: terminal.c + text.o: text.c + tilde.o: tilde.c + undo.o: undo.c + util.o: util.c + vi_mode.o: vi_mode.c xmalloc.o: xmalloc.c ! histexpand.o: histexpand.c histfile.o: histfile.c + history.o: history.c histsearch.o: histsearch.c diff -Nrc2 readline-4.2a/README readline-4.3/README *** readline-4.2a/README Wed Aug 22 13:47:43 2001 --- readline-4.3/README Tue Apr 2 09:41:22 2002 *************** *** 2,6 **** ============ ! This is the Gnu Readline library, version 4.2a. The Readline library provides a set of functions for use by applications --- 2,6 ---- ============ ! This is the Gnu Readline library, version 4.3. The Readline library provides a set of functions for use by applications *************** *** 58,61 **** --- 58,64 ---- to be built on supported platforms. + If `configure' is given the `--enable-shared' option, it will attempt + to build the shared libraries by default on supported platforms. + Configure calls the script support/shobj-conf to test whether or not shared library creation is supported and to generate the values *************** *** 126,141 **** 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. Documentation ============= ! The documentation for the Readline and History libraries appears in the ! `doc' subdirectory. There are two texinfo files and a Unix-style manual ! page describing the programming facilities available in the Readline ! library. The texinfo files include both user and programmer's manuals. Reporting Bugs --- 129,147 ---- subdirectory. ! If shared libraries are created, `make install' will install them. ! You may install only the shared libraries by running `make ! install-shared' from the top-level build directory. Running `make ! install' in the shlib subdirectory will also work. If you don't want ! to install any created shared libraries, run `make install-static'. Documentation ============= ! The documentation for the Readline and History libraries appears in ! the `doc' subdirectory. There are three texinfo files and a ! Unix-style manual page describing the facilities available in the ! Readline library. The texinfo files include both user and ! programmer's manuals. HTML versions of the manuals appear in the ! `doc' subdirectory as well. Reporting Bugs diff -Nrc2 readline-4.2a/aclocal.m4 readline-4.3/aclocal.m4 *** readline-4.2a/aclocal.m4 Wed Nov 7 10:59:37 2001 --- readline-4.3/aclocal.m4 Tue Jun 25 09:45:43 2002 *************** *** 606,609 **** --- 606,669 ---- ]) + # We should check for putenv before calling this + AC_DEFUN(BASH_FUNC_STD_PUTENV, + [ + AC_REQUIRE([AC_HEADER_STDC]) + AC_REQUIRE([AC_C_PROTOTYPES]) + AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv, + [AC_TRY_LINK([ + #if STDC_HEADERS + #include + #include + #endif + #ifndef __STDC__ + # ifndef const + # define const + # endif + #endif + #ifdef PROTOTYPES + extern int putenv (char *); + #else + extern int putenv (); + #endif + ], + [return (putenv == 0);], + bash_cv_std_putenv=yes, bash_cv_std_putenv=no + )]) + if test $bash_cv_std_putenv = yes; then + AC_DEFINE(HAVE_STD_PUTENV) + fi + ]) + + # We should check for unsetenv before calling this + AC_DEFUN(BASH_FUNC_STD_UNSETENV, + [ + AC_REQUIRE([AC_HEADER_STDC]) + AC_REQUIRE([AC_C_PROTOTYPES]) + AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv, + [AC_TRY_LINK([ + #if STDC_HEADERS + #include + #include + #endif + #ifndef __STDC__ + # ifndef const + # define const + # endif + #endif + #ifdef PROTOTYPES + extern int unsetenv (const char *); + #else + extern int unsetenv (); + #endif + ], + [return (unsetenv == 0);], + bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no + )]) + if test $bash_cv_std_unsetenv = yes; then + AC_DEFINE(HAVE_STD_UNSETENV) + fi + ]) + AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS, [AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize) *************** *** 923,927 **** 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, --- 983,987 ---- AC_CACHE_VAL(bash_cv_termcap_lib, [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap, ! [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo, [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses, [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses, *************** *** 1379,1386 **** [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 --- 1439,1446 ---- [if test -d /var/mail; then bash_cv_mail_dir=/var/mail elif test -d /var/spool/mail; then bash_cv_mail_dir=/var/spool/mail + elif test -d /usr/mail; then + bash_cv_mail_dir=/usr/mail elif test -d /usr/spool/mail; then bash_cv_mail_dir=/usr/spool/mail *************** *** 1390,1404 **** ]) 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 ]) --- 1450,1454 ---- ]) AC_MSG_RESULT($bash_cv_mail_dir) ! AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir") ]) *************** *** 1594,1597 **** --- 1644,1683 ---- ]) + dnl + dnl check for availability of multibyte characters and functions + dnl + AC_DEFUN(BASH_CHECK_MULTIBYTE, + [ + AC_CHECK_HEADERS(wctype.h) + AC_CHECK_HEADERS(wchar.h) + AC_CHECK_HEADERS(langinfo.h) + + AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) + AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) + + AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, + [AC_TRY_RUN([ + #include + int + main () + { + mbstate_t ps; + return 0; + }], bash_cv_have_mbstate_t=yes, bash_cv_have_mbstate_t=no)]) + if test $bash_cv_have_mbstate_t = yes; then + AC_DEFINE(HAVE_MBSTATE_T) + fi + + AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset, + [AC_TRY_LINK( + [#include ], + [char* cs = nl_langinfo(CODESET);], + bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)]) + if test $bash_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET) + fi + + ]) + dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB dnl require: *************** *** 1656,1660 **** 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 --- 1742,1746 ---- 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 diff -Nrc2 readline-4.2a/bind.c readline-4.3/bind.c *** readline-4.2a/bind.c Mon Oct 15 14:30:43 2001 --- readline-4.3/bind.c Thu Jan 24 11:15:52 2002 *************** *** 69,72 **** --- 69,74 ---- Keymap rl_binding_keymap; + static char *_rl_read_file PARAMS((char *, size_t *)); + static void _rl_init_file_error PARAMS((const char *)); static int _rl_read_init_file PARAMS((const char *, int)); static int glean_key_from_name PARAMS((char *)); *************** *** 247,250 **** --- 249,255 ---- int keys_len; register int i; + KEYMAP_ENTRY k; + + k.function = 0; /* If no keys to bind to, exit right away. */ *************** *** 270,274 **** for (i = 0; i < keys_len; i++) { ! unsigned char ic = keys[i]; if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic)) --- 275,284 ---- for (i = 0; i < keys_len; i++) { ! unsigned char uc = keys[i]; ! int ic; ! ! ic = uc; ! if (ic < 0 || ic >= KEYMAP_SIZE) ! return -1; if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic)) *************** *** 283,288 **** if (map[ic].type != ISKMAP) { ! if (map[ic].type == ISMACR) ! free ((char *)map[ic].function); map[ic].type = ISKMAP; --- 293,304 ---- if (map[ic].type != ISKMAP) { ! /* We allow subsequences of keys. If a keymap is being ! created that will `shadow' an existing function or macro ! key binding, we save that keybinding into the ANYOTHERKEY ! index in the new map. The dispatch code will look there ! to find the function to execute if the subsequence is not ! matched. ANYOTHERKEY was chosen to be greater than ! UCHAR_MAX. */ ! k = map[ic]; map[ic].type = ISKMAP; *************** *** 290,293 **** --- 306,320 ---- } map = FUNCTION_TO_KEYMAP (map, ic); + /* The dispatch code will return this function if no matching + key sequence is found in the keymap. This (with a little + help from the dispatch code in readline.c) allows `a' to be + mapped to something, `abc' to be mapped to something else, + and the function bound to `a' to be executed when the user + types `abx', leaving `bx' in the input queue. */ + if (k.function /* && k.type == ISFUNC */) + { + map[ANYOTHERKEY] = k; + k.function = 0; + } } else *************** *** 295,298 **** --- 322,330 ---- if (map[ic].type == ISMACR) free ((char *)map[ic].function); + else if (map[ic].type == ISKMAP) + { + map = FUNCTION_TO_KEYMAP (map, ic); + ic = ANYOTHERKEY; + } map[ic].function = KEYMAP_TO_FUNCTION (data); *************** *** 332,336 **** if (strncmp (&seq[i], "C-\\M-", 5) == 0) { ! array[l++] = ESC; i += 5; array[l++] = CTRL (_rl_to_upper (seq[i])); --- 364,368 ---- if (strncmp (&seq[i], "C-\\M-", 5) == 0) { ! array[l++] = ESC; /* ESC is meta-prefix */ i += 5; array[l++] = CTRL (_rl_to_upper (seq[i])); *************** *** 341,345 **** { i++; ! array[l++] = ESC; /* XXX */ } else if (c == 'C') --- 373,377 ---- { i++; ! array[l++] = ESC; /* ESC is meta-prefix */ } else if (c == 'C') *************** *** 633,641 **** close (file); - #if 0 - if (i < file_size) - #else if (i < 0) - #endif { free (buffer); --- 665,669 ---- *************** *** 643,655 **** } - #if 0 - buffer[file_size] = '\0'; - if (sizep) - *sizep = file_size; - #else buffer[i] = '\0'; if (sizep) *sizep = i; - #endif return (buffer); --- 671,677 ---- *************** *** 768,772 **** static void _rl_init_file_error (msg) ! char *msg; { if (currently_reading_init_file) --- 790,794 ---- static void _rl_init_file_error (msg) ! const char *msg; { if (currently_reading_init_file) *************** *** 1076,1080 **** while (*var && whitespace (*var)) var++; ! /* Make value point to start of value string. */ value = var; while (*value && !whitespace (*value)) value++; --- 1098,1102 ---- while (*var && whitespace (*var)) var++; ! /* Make VALUE point to start of value string. */ value = var; while (*value && !whitespace (*value)) value++; *************** *** 1241,1244 **** --- 1263,1267 ---- } boolean_varlist [] = { { "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL }, + { "byte-oriented", &rl_byte_oriented, 0 }, { "completion-ignore-case", &_rl_completion_case_fold, 0 }, { "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 }, *************** *** 1251,1257 **** --- 1274,1282 ---- { "mark-directories", &_rl_complete_mark_directories, 0 }, { "mark-modified-lines", &_rl_mark_modified_lines, 0 }, + { "mark-symlinked-directories", &_rl_complete_mark_symlink_dirs, 0 }, { "match-hidden-files", &_rl_match_hidden_files, 0 }, { "meta-flag", &_rl_meta_flag, 0 }, { "output-meta", &_rl_output_meta_chars, 0 }, + { "page-completions", &_rl_page_completions, 0 }, { "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL }, { "print-completions-horizontally", &_rl_print_completions_horizontally, 0 }, *************** *** 1265,1269 **** static int find_boolean_var (name) ! char *name; { register int i; --- 1290,1294 ---- static int find_boolean_var (name) ! const char *name; { register int i; *************** *** 1334,1338 **** static int find_string_var (name) ! char *name; { register int i; --- 1359,1363 ---- static int find_string_var (name) ! const char *name; { register int i; *************** *** 1660,1664 **** do any special meta processing on KEY. */ ! #if 0 /* We might want to do this, but the old version of the code did not. */ --- 1685,1690 ---- do any special meta processing on KEY. */ ! #if 1 ! /* XXX - Experimental */ /* We might want to do this, but the old version of the code did not. */ *************** *** 1667,1674 **** if (c == ESC) { ! keyseq[0] = '\\'; ! keyseq[1] = 'e'; ! keyseq[2] = '\0'; ! return keyseq; } #endif --- 1693,1700 ---- if (c == ESC) { ! keyname[0] = '\\'; ! keyname[1] = 'e'; ! keyname[2] = '\0'; ! return keyname; } #endif *************** *** 1781,1785 **** --- 1807,1816 ---- if (key == ESC) + #if 0 sprintf (keyname, "\\e"); + #else + /* XXX - experimental */ + sprintf (keyname, "\\M-"); + #endif else if (CTRL_CHAR (key)) sprintf (keyname, "\\C-%c", _rl_to_lower (UNCTRL (key))); *************** *** 1928,1936 **** case ISMACR: keyname = _rl_get_keyname (key); - #if 0 - out = (char *)map[key].function; - #else out = _rl_untranslate_macro_value ((char *)map[key].function); ! #endif if (print_readably) fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "", --- 1959,1964 ---- case ISMACR: keyname = _rl_get_keyname (key); out = _rl_untranslate_macro_value ((char *)map[key].function); ! if (print_readably) fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "", *************** *** 1942,1948 **** out ? out : ""); free (keyname); - #if 1 free (out); - #endif break; case ISFUNC: --- 1970,1974 ---- *************** *** 2034,2038 **** fprintf (rl_outstream, "set comment-begin %s\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); else ! fprintf (rl_outstream, "comment-begin is set to `%s'\n", _rl_comment_begin ? _rl_comment_begin : ""); /* completion-query-items */ --- 2060,2064 ---- fprintf (rl_outstream, "set comment-begin %s\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); else ! fprintf (rl_outstream, "comment-begin is set to `%s'\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT); /* completion-query-items */ *************** *** 2048,2060 **** fprintf (rl_outstream, "editing-mode is set to `%s'\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi"); - /* keymap */ - kname = rl_get_keymap_name (_rl_keymap); - if (kname == 0) - kname = rl_get_keymap_name_from_edit_mode (); - if (print_readably) - fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none"); - else - fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none"); - /* isearch-terminators */ if (_rl_isearch_terminators) --- 2074,2077 ---- *************** *** 2071,2074 **** --- 2088,2100 ---- free (disp); } + + /* keymap */ + kname = rl_get_keymap_name (_rl_keymap); + if (kname == 0) + kname = rl_get_keymap_name_from_edit_mode (); + if (print_readably) + fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none"); + else + fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none"); } *************** *** 2087,2091 **** } ! /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. */ void _rl_bind_if_unbound (keyseq, default_func) --- 2113,2119 ---- } ! /* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right ! now, this is always used to attempt to bind the arrow keys, hence the ! check for rl_vi_movement_mode. */ void _rl_bind_if_unbound (keyseq, default_func) *************** *** 2098,2102 **** --- 2126,2134 ---- { func = rl_function_of_keyseq (keyseq, _rl_keymap, (int *)NULL); + #if defined (VI_MODE) + if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode) + #else if (!func || func == rl_do_lowercase_version) + #endif rl_set_key (keyseq, default_func, _rl_keymap); } diff -Nrc2 readline-4.2a/chardefs.h readline-4.3/chardefs.h *** readline-4.2a/chardefs.h Thu Nov 8 08:17:21 2001 --- readline-4.3/chardefs.h Thu Feb 14 11:38:18 2002 *************** *** 45,49 **** #ifdef CTRL ! #undef CTRL #endif --- 45,52 ---- #ifdef CTRL ! # undef CTRL ! #endif ! #ifdef UNCTRL ! # undef UNCTRL #endif *************** *** 76,79 **** --- 79,85 ---- #define NON_NEGATIVE(c) ((unsigned char)(c) == (c)) + + /* Some systems define these; we want our definitions. */ + #undef ISPRINT #define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c)) diff -Nrc2 readline-4.2a/complete.c readline-4.3/complete.c *** readline-4.2a/complete.c Mon Oct 15 14:31:41 2001 --- readline-4.3/complete.c Tue May 7 15:39:32 2002 *************** *** 56,59 **** --- 56,60 ---- /* System-specific feature definitions and include files. */ #include "rldefs.h" + #include "rlmbutil.h" /* Some standard library routines. */ *************** *** 101,108 **** 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)); --- 102,110 ---- static char *rl_quote_filename PARAMS((char *, int, char *)); ! static void set_completion_defaults PARAMS((int)); ! static int get_y_or_n PARAMS((int)); ! static int _rl_internal_pager PARAMS((int)); static char *printable_part PARAMS((char *)); static int print_filename PARAMS((char *, char *)); static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int)); *************** *** 117,121 **** static char *make_quoted_replacement PARAMS((char *, int, char *)); - static void free_match_list PARAMS((char **)); /* **************************************************************** */ --- 119,122 ---- *************** *** 133,136 **** --- 134,143 ---- int _rl_complete_mark_directories = 1; + /* If non-zero, the symlinked directory completion behavior introduced in + readline-4.2a is disabled, and symlinks that point to directories have + a slash appended (subject to the value of _rl_complete_mark_directories). + This is user-settable via the mark-symlinked-directories variable. */ + int _rl_complete_mark_symlink_dirs = 0; + /* If non-zero, completions are printed horizontally in alphabetical order, like `ls -x'. */ *************** *** 195,202 **** int rl_completion_query_items = 100; /* The basic list of characters that signal a break between words for the completer routine. The contents of this variable is what breaks words in the shell, i.e. " \t\n\"\\'`@$><=" */ ! const char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* List of basic quoting characters. */ --- 202,211 ---- int rl_completion_query_items = 100; + int _rl_page_completions = 1; + /* The basic list of characters that signal a break between words for the completer routine. The contents of this variable is what breaks words in the shell, i.e. " \t\n\"\\'`@$><=" */ ! const char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* }) */ /* List of basic quoting characters. */ *************** *** 265,272 **** --- 274,297 ---- rl_linebuf_func_t *rl_char_is_quoted_p = (rl_linebuf_func_t *)NULL; + /* If non-zero, the completion functions don't append anything except a + possible closing quote. This is set to 0 by rl_complete_internal and + may be changed by an application-specific completion function. */ + int rl_completion_suppress_append = 0; + /* Character appended to completed words when at the end of the line. The default is a space. */ int rl_completion_append_character = ' '; + /* If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + mark-directories variable (which is user-settable). This exists so + that application completion functions can override the user's preference + (set via the mark-symlinked-directories variable) if appropriate. + It's set to the value of _rl_complete_mark_symlink_dirs in + rl_complete_internal before any application-specific completion + function is called, so without that function doing anything, the user's + preferences are honored. */ + int rl_completion_mark_symlink_dirs; + /* If non-zero, inhibit completion (temporarily). */ int rl_inhibit_completion; *************** *** 291,295 **** { if (rl_inhibit_completion) ! return (rl_insert (ignore, invoking_key)); else if (rl_last_func == rl_complete && !completion_changed_buffer) return (rl_complete_internal ('?')); --- 316,320 ---- { if (rl_inhibit_completion) ! return (_rl_insert_char (ignore, invoking_key)); else if (rl_last_func == rl_complete && !completion_changed_buffer) return (rl_complete_internal ('?')); *************** *** 315,318 **** --- 340,360 ---- } + /* Return the correct value to pass to rl_complete_internal performing + the same tests as rl_complete. This allows consecutive calls to an + application's completion function to list possible completions and for + an application-specific completion function to honor the + show-all-if-ambiguous readline variable. */ + int + rl_completion_mode (cfunc) + rl_command_func_t *cfunc; + { + if (rl_last_func == cfunc && !completion_changed_buffer) + return '?'; + else if (_rl_complete_show_all) + return '!'; + else + return TAB; + } + /************************************/ /* */ *************** *** 321,327 **** /************************************/ /* The user must press "y" or "n". Non-zero return means "y" pressed. */ static int ! get_y_or_n () { int c; --- 363,386 ---- /************************************/ + /* Set default values for readline word completion. These are the variables + that application completion functions can change or inspect. */ + static void + set_completion_defaults (what_to_do) + int what_to_do; + { + /* Only the completion entry function can change these. */ + rl_filename_completion_desired = 0; + rl_filename_quoting_desired = 1; + rl_completion_type = what_to_do; + rl_completion_suppress_append = 0; + + /* The completion entry function may optionally change this. */ + rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs; + } + /* The user must press "y" or "n". Non-zero return means "y" pressed. */ static int ! get_y_or_n (for_pager) ! int for_pager; { int c; *************** *** 339,346 **** --- 398,427 ---- if (c == ABORT_CHAR) _rl_abort_internal (); + if (for_pager && (c == NEWLINE || c == RETURN)) + return (2); + if (for_pager && (c == 'q' || c == 'Q')) + return (0); rl_ding (); } } + static int + _rl_internal_pager (lines) + int lines; + { + int i; + + fprintf (rl_outstream, "--More--"); + fflush (rl_outstream); + i = get_y_or_n (1); + _rl_erase_entire_line (); + if (i == 0) + return -1; + else if (i == 2) + return (lines - 1); + else + return 0; + } + #if defined (VISIBLE_STATS) /* Return the character which best describes FILENAME. *************** *** 403,419 **** possible completions. If we are hacking filename completion, we are only interested in the basename, the portion following the ! final slash. Otherwise, we return what we were passed. */ static char * printable_part (pathname) char *pathname; { ! char *temp; ! 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 ! return (temp ? ++temp : pathname); } --- 484,522 ---- possible completions. If we are hacking filename completion, we are only interested in the basename, the portion following the ! final slash. Otherwise, we return what we were passed. Since ! printing empty strings is not very informative, if we're doing ! filename completion, and the basename is the empty string, we look ! for the previous slash and return the portion following that. If ! there's no previous slash, we just return what we were passed. */ static char * printable_part (pathname) char *pathname; { ! char *temp, *x; ! ! if (rl_filename_completion_desired == 0) /* don't need to do anything */ ! return (pathname); ! temp = strrchr (pathname, '/'); #if defined (__MSDOS__) ! if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':') temp = pathname + 1; #endif ! ! if (temp == 0 || *temp == '\0') ! return (pathname); ! /* If the basename is NULL, we might have a pathname like '/usr/src/'. ! Look for a previous slash and, if one is found, return the portion ! following that slash. If there's no previous slash, just return the ! pathname we were passed. */ ! else if (temp[1] == '\0') ! { ! for (x = temp - 1; x > pathname; x--) ! if (*x == '/') ! break; ! return ((*x == '/') ? x + 1 : pathname); ! } ! else ! return ++temp; } *************** *** 544,549 **** the value of the delimiter character that caused a word break. */ ! static char ! find_completion_word (fp, dp) int *fp, *dp; { --- 647,652 ---- the value of the delimiter character that caused a word break. */ ! char ! _rl_find_completion_word (fp, dp) int *fp, *dp; { *************** *** 600,603 **** --- 703,708 ---- else if (quote_char == '"') found_quote |= RL_QF_DOUBLE_QUOTE; + else + found_quote |= RL_QF_OTHER_QUOTE; } } *************** *** 609,613 **** --- 714,722 ---- completion, so use the word break characters to find the substring on which to complete. */ + #if defined (HANDLE_MULTIBYTE) + while (rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_ANY)) + #else while (--rl_point) + #endif { scan = rl_line_buffer[rl_point]; *************** *** 781,784 **** --- 890,898 ---- register int i, c1, c2, si; int low; /* Count of max-matched characters. */ + #if defined (HANDLE_MULTIBYTE) + int v; + mbstate_t ps1, ps2; + wchar_t wc1, wc2; + #endif /* If only one match, just use that. Otherwise, compare each *************** *** 794,797 **** --- 908,918 ---- for (i = 1, low = 100000; i < matches; i++) { + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + memset (&ps1, 0, sizeof (mbstate_t)); + memset (&ps2, 0, sizeof (mbstate_t)); + } + #endif if (_rl_completion_case_fold) { *************** *** 800,803 **** --- 921,938 ---- (c2 = _rl_to_lower(match_list[i + 1][si])); si++) + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + v = mbrtowc (&wc1, match_list[i]+si, strlen (match_list[i]+si), &ps1); + mbrtowc (&wc2, match_list[i+1]+si, strlen (match_list[i+1]+si), &ps2); + wc1 = towlower (wc1); + wc2 = towlower (wc2); + if (wc1 != wc2) + break; + else if (v > 1) + si += v - 1; + } + else + #endif if (c1 != c2) break; *************** *** 809,812 **** --- 944,958 ---- (c2 = match_list[i + 1][si]); si++) + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + mbstate_t ps_back = ps1; + if (!_rl_compare_chars (match_list[i], si, &ps1, match_list[i+1], si, &ps2)) + break; + else if ((v = _rl_get_char_len (&match_list[i][si], &ps_back)) > 1) + si += v - 1; + } + else + #endif if (c1 != c2) break; *************** *** 829,832 **** --- 975,980 ---- match_list[0] = (char *)xmalloc (low + 1); + /* XXX - this might need changes in the presence of multibyte chars */ + /* 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. */ *************** *** 872,875 **** --- 1020,1026 ---- matches = *matchesp; + if (matches == 0) + return 0; + /* It seems to me that in all the cases we handle we would like to ignore duplicate possiblilities. Scan for the text to *************** *** 924,928 **** int len, max; { ! int count, limit, printed_len; int i, j, k, l; char *temp; --- 1075,1079 ---- int len, max; { ! int count, limit, printed_len, lines; int i, j, k, l; char *temp; *************** *** 952,955 **** --- 1103,1107 ---- rl_crlf (); + lines = 0; if (_rl_print_completions_horizontally == 0) { *************** *** 973,976 **** --- 1125,1135 ---- } rl_crlf (); + lines++; + if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count) + { + lines = _rl_internal_pager (lines); + if (lines < 0) + return; + } } } *************** *** 986,990 **** { if (i && (limit > 1) && (i % limit) == 0) ! rl_crlf (); else for (k = 0; k < max - printed_len; k++) --- 1145,1158 ---- { if (i && (limit > 1) && (i % limit) == 0) ! { ! rl_crlf (); ! lines++; ! if (_rl_page_completions && lines >= _rl_screenheight - 1) ! { ! lines = _rl_internal_pager (lines); ! if (lines < 0) ! return; ! } ! } else for (k = 0; k < max - printed_len; k++) *************** *** 1058,1062 **** fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len); fflush (rl_outstream); ! if (get_y_or_n () == 0) { rl_crlf (); --- 1226,1230 ---- fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len); fflush (rl_outstream); ! if (get_y_or_n (0) == 0) { rl_crlf (); *************** *** 1156,1160 **** 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) --- 1324,1332 ---- 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. ! The variable rl_completion_mark_symlink_dirs controls this behavior ! (it's initially set to the what the user has chosen, indicated by the ! value of _rl_complete_mark_symlink_dirs, but may be modified by an ! application's completion function). */ static int append_to_match (text, delimiter, quote_char, nontrivial_match) *************** *** 1172,1176 **** if (delimiter) temp_string[temp_string_index++] = delimiter; ! else if (rl_completion_append_character) temp_string[temp_string_index++] = rl_completion_append_character; --- 1344,1348 ---- if (delimiter) temp_string[temp_string_index++] = delimiter; ! else if (rl_completion_suppress_append == 0 && rl_completion_append_character) temp_string[temp_string_index++] = rl_completion_append_character; *************** *** 1180,1188 **** { 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 --- 1352,1370 ---- { filename = tilde_expand (text); ! s = (nontrivial_match && rl_completion_mark_symlink_dirs == 0) ! ? LSTAT (filename, &finfo) ! : stat (filename, &finfo); if (s == 0 && S_ISDIR (finfo.st_mode)) { ! if (_rl_complete_mark_directories) ! { ! /* This is clumsy. Avoid putting in a double slash if point ! is at the end of the line and the previous character is a ! slash. */ ! if (rl_point && rl_line_buffer[rl_point] == '\0' && rl_line_buffer[rl_point - 1] == '/') ! ; ! else if (rl_line_buffer[rl_point] != '/') ! rl_insert_text ("/"); ! } } #ifdef S_ISLNK *************** *** 1195,1199 **** else { ! if (rl_point == rl_end) rl_insert_text (temp_string); } --- 1377,1381 ---- else { ! if (rl_point == rl_end && temp_string_index) rl_insert_text (temp_string); } *************** *** 1202,1206 **** else { ! if (rl_point == rl_end) rl_insert_text (temp_string); } --- 1384,1388 ---- else { ! if (rl_point == rl_end && temp_string_index) rl_insert_text (temp_string); } *************** *** 1248,1257 **** } ! static void ! free_match_list (matches) char **matches; { register int i; for (i = 0; matches[i]; i++) free (matches[i]); --- 1430,1442 ---- } ! void ! _rl_free_match_list (matches) char **matches; { register int i; + if (matches == 0) + return; + for (i = 0; matches[i]; i++) free (matches[i]); *************** *** 1277,1284 **** RL_SETSTATE(RL_STATE_COMPLETING); ! /* Only the completion entry function can change these. */ ! rl_filename_completion_desired = 0; ! rl_filename_quoting_desired = 1; ! rl_completion_type = what_to_do; saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL; --- 1462,1467 ---- RL_SETSTATE(RL_STATE_COMPLETING); ! ! set_completion_defaults (what_to_do); saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL; *************** *** 1295,1299 **** /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ ! quote_char = find_completion_word (&found_quote, &delimiter); start = rl_point; --- 1478,1482 ---- /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ ! quote_char = _rl_find_completion_word (&found_quote, &delimiter); start = rl_point; *************** *** 1311,1314 **** --- 1494,1498 ---- rl_ding (); FREE (saved_line_buffer); + completion_changed_buffer = 0; RL_UNSETSTATE(RL_STATE_COMPLETING); return (0); *************** *** 1376,1380 **** } ! free_match_list (matches); /* Check to see if the line has changed through all of this manipulation. */ --- 1560,1564 ---- } ! _rl_free_match_list (matches); /* Check to see if the line has changed through all of this manipulation. */ *************** *** 1736,1740 **** FREE (orig_text); if (matches) ! free_match_list (matches); match_list_index = match_list_size = 0; --- 1920,1924 ---- FREE (orig_text); if (matches) ! _rl_free_match_list (matches); match_list_index = match_list_size = 0; *************** *** 1742,1748 **** /* Only the completion entry function can change these. */ ! rl_filename_completion_desired = 0; ! rl_filename_quoting_desired = 1; ! rl_completion_type = '%'; our_func = rl_completion_entry_function --- 1926,1930 ---- /* Only the completion entry function can change these. */ ! set_completion_defaults ('%'); our_func = rl_completion_entry_function *************** *** 1758,1762 **** /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ ! quote_char = find_completion_word (&found_quote, &delimiter); orig_start = rl_point; --- 1940,1944 ---- /* This (possibly) changes rl_point. If it returns a non-zero char, we know we have an open quote. */ ! quote_char = _rl_find_completion_word (&found_quote, &delimiter); orig_start = rl_point; diff -Nrc2 readline-4.2a/config.h.in readline-4.3/config.h.in *** readline-4.2a/config.h.in Mon Oct 29 10:21:04 2001 --- readline-4.3/config.h.in Wed Feb 20 10:04:55 2002 *************** *** 14,17 **** --- 14,21 ---- #undef ssize_t + #undef PROTOTYPES + + #undef __CHAR_UNSIGNED__ + /* Define if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN *************** *** 28,31 **** --- 32,38 ---- #undef HAVE_LSTAT + /* Define if you have the mbsrtowcs function. */ + #undef HAVE_MBSRTOWCS + /* Define if you have the memmove function. */ #undef HAVE_MEMMOVE *************** *** 46,49 **** --- 53,61 ---- #undef HAVE_STRCASECMP + /* Define if you have the strcoll function. */ + #undef HAVE_STRCOLL + + #undef STRCOLL_BROKEN + /* Define if you have the strpbrk function. */ #undef HAVE_STRPBRK *************** *** 55,69 **** #undef HAVE_VSNPRINTF ! /* Define if you have the strcoll function. */ ! #undef HAVE_STRCOLL ! ! #undef STRCOLL_BROKEN /* Define if you have the header file. */ #undef HAVE_DIRENT_H /* Define if you have the header file. */ #undef HAVE_NDIR_H /* Define if you have the header file. */ #undef HAVE_STDLIB_H --- 67,94 ---- #undef HAVE_VSNPRINTF ! /* Define if you have the wcwidth function. */ ! #undef HAVE_WCWIDTH /* Define if you have the header file. */ #undef HAVE_DIRENT_H + /* Define if you have the header file. */ + #undef HAVE_LANGINFO_H + + /* Define if you have the header file. */ + #undef HAVE_LIMITS_H + + /* Define if you have the header file. */ + #undef HAVE_LOCALE_H + + /* Define if you have the header file. */ + #undef HAVE_MEMORY_H + /* Define if you have the header file. */ #undef HAVE_NDIR_H + /* Define if you have the header file. */ + #undef HAVE_STDARG_H + /* Define if you have the header file. */ #undef HAVE_STDLIB_H *************** *** 111,122 **** #undef HAVE_VARARGS_H ! /* Define if you have the header file. */ ! #undef HAVE_STDARG_H ! #undef HAVE_LOCALE_H ! #undef HAVE_LIMITS_H ! #undef HAVE_MEMORY_H /* Definitions pulled in from aclocal.m4. */ --- 136,149 ---- #undef HAVE_VARARGS_H ! /* Define if you have the header file. */ ! #undef HAVE_WCHAR_H ! /* Define if you have the header file. */ ! #undef HAVE_WCTYPE_H ! #undef HAVE_MBSTATE_T ! /* Define if you have and nl_langinfo(CODESET). */ ! #undef HAVE_LANGINFO_CODESET /* Definitions pulled in from aclocal.m4. */ diff -Nrc2 readline-4.2a/configure readline-4.3/configure *** readline-4.2a/configure Mon Nov 12 11:49:27 2001 --- readline-4.3/configure Thu Jun 27 13:54:29 2002 *************** *** 1,6 **** #! /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 . --- 1,6 ---- #! /bin/sh ! # From configure.in for Readline 4.3, version 2.45, from autoconf version 2.52. # Guess values for system-dependent variables and create Makefiles. ! # Generated by Autoconf 2.52 for readline 4.3. # # Report bugs to . *************** *** 187,192 **** PACKAGE_NAME='readline' PACKAGE_TARNAME='readline' ! PACKAGE_VERSION='4.2a' ! PACKAGE_STRING='readline 4.2a' PACKAGE_BUGREPORT='bug-readline@gnu.org' --- 187,192 ---- PACKAGE_NAME='readline' PACKAGE_TARNAME='readline' ! PACKAGE_VERSION='4.3' ! PACKAGE_STRING='readline 4.3' PACKAGE_BUGREPORT='bug-readline@gnu.org' *************** *** 605,609 **** # This message is too long to be a string in the A/UX 3.1 sh. cat <&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 --- 877,881 ---- for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then ! { echo "$as_me:879: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} cat "$ac_site_file" >&5 *************** *** 881,885 **** # 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 --- 888,892 ---- # files actually), so we avoid doing that. if test -f "$cache_file"; then ! { echo "$as_me:890: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in *************** *** 889,893 **** fi else ! { echo "$as_me:891: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file --- 896,900 ---- fi else ! { echo "$as_me:898: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file *************** *** 905,913 **** 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=: ;; --- 912,920 ---- case $ac_old_set,$ac_new_set in set,) ! { echo "$as_me:914: 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:918: 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=: ;; *************** *** 915,923 **** *) 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=: --- 922,930 ---- *) if test "x$ac_old_val" != "x$ac_new_val"; then ! { echo "$as_me:924: 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:926: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} ! { echo "$as_me:928: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: *************** *** 938,944 **** 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; }; } --- 945,951 ---- done if $ac_cache_corrupted; then ! { echo "$as_me:947: 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:949: 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; }; } *************** *** 960,967 **** 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=';' --- 967,974 ---- echo "exit 0" >>conftest.sh chmod +x conftest.sh ! if { (echo "$as_me:969: PATH=\".;.\"; conftest.sh") >&5 (PATH=".;."; conftest.sh) 2>&5 ac_status=$? ! echo "$as_me:972: \$? = $ac_status" >&5 (exit $ac_status); }; then ac_path_separator=';' *************** *** 989,993 **** 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; }; } --- 996,1000 ---- done if test -z "$ac_aux_dir"; then ! { { echo "$as_me:998: 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; }; } *************** *** 999,1011 **** 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 --- 1006,1018 ---- ac_config_headers="$ac_config_headers config.h" ! LIBVERSION=4.3 # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || ! { { echo "$as_me:1012: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } ! echo "$as_me:1016: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then *************** *** 1016,1029 **** 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 --- 1023,1036 ---- ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && ! { { echo "$as_me:1025: 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:1029: 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:1034: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build *************** *** 1032,1036 **** 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 --- 1039,1043 ---- build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ! echo "$as_me:1041: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then *************** *** 1041,1050 **** 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 --- 1048,1057 ---- ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || ! { { echo "$as_me:1050: 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:1055: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host *************** *** 1054,1058 **** opt_curses=no - opt_shared=no # Check whether --with-curses or --without-curses was given. --- 1061,1064 ---- *************** *** 1066,1069 **** --- 1072,1089 ---- fi + opt_static_libs=yes + opt_shared_libs=yes + + # Check whether --enable-shared or --disable-shared was given. + if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + opt_shared_libs=$enableval + fi; + # Check whether --enable-static or --disable-static was given. + if test "${enable_static+set}" = set; then + enableval="$enable_static" + opt_static_libs=$enableval + fi; + echo "" echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" *************** *** 1073,1077 **** 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_,'` --- 1093,1097 ---- test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 ! echo "$as_me:1095: 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_,'` *************** *** 1093,1101 **** 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}" --- 1113,1121 ---- fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then ! echo "$as_me:1115: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else ! echo "$as_me:1119: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" *************** *** 1110,1114 **** # 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 --- 1130,1134 ---- # 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:1132: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then *************** *** 1125,1129 **** $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 --- 1145,1149 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}gcc" ! echo "$as_me:1147: found $ac_dir/$ac_word" >&5 break done *************** *** 1133,1140 **** 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 --- 1153,1160 ---- CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1155: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1158: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 1145,1149 **** # 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 --- 1165,1169 ---- # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 ! echo "$as_me:1167: 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 *************** *** 1160,1164 **** $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 --- 1180,1184 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="gcc" ! echo "$as_me:1182: found $ac_dir/$ac_word" >&5 break done *************** *** 1168,1175 **** 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 --- 1188,1195 ---- ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then ! echo "$as_me:1190: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else ! echo "$as_me:1193: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 1184,1188 **** # 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 --- 1204,1208 ---- # 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:1206: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then *************** *** 1199,1203 **** $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 --- 1219,1223 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="${ac_tool_prefix}cc" ! echo "$as_me:1221: found $ac_dir/$ac_word" >&5 break done *************** *** 1207,1214 **** 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 --- 1227,1234 ---- CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1229: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1232: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 1219,1223 **** # 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 --- 1239,1243 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:1241: 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 *************** *** 1234,1238 **** $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 --- 1254,1258 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="cc" ! echo "$as_me:1256: found $ac_dir/$ac_word" >&5 break done *************** *** 1242,1249 **** 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 --- 1262,1269 ---- ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then ! echo "$as_me:1264: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else ! echo "$as_me:1267: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 1258,1262 **** # 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 --- 1278,1282 ---- # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 ! echo "$as_me:1280: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then *************** *** 1278,1282 **** fi ac_cv_prog_CC="cc" ! echo "$as_me:1280: found $ac_dir/$ac_word" >&5 break done --- 1298,1302 ---- fi ac_cv_prog_CC="cc" ! echo "$as_me:1300: found $ac_dir/$ac_word" >&5 break done *************** *** 1300,1307 **** 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 --- 1320,1327 ---- CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1322: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1325: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 1314,1318 **** # 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 --- 1334,1338 ---- # 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:1336: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then *************** *** 1329,1333 **** $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 --- 1349,1353 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_CC="$ac_tool_prefix$ac_prog" ! echo "$as_me:1351: found $ac_dir/$ac_word" >&5 break done *************** *** 1337,1344 **** 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 --- 1357,1364 ---- CC=$ac_cv_prog_CC if test -n "$CC"; then ! echo "$as_me:1359: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else ! echo "$as_me:1362: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 1353,1357 **** # 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 --- 1373,1377 ---- # 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:1375: 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 *************** *** 1368,1372 **** $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 --- 1388,1392 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_CC="$ac_prog" ! echo "$as_me:1390: found $ac_dir/$ac_word" >&5 break done *************** *** 1376,1383 **** 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 --- 1396,1403 ---- ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then ! echo "$as_me:1398: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else ! echo "$as_me:1401: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 1391,1420 **** 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" --- 1411,1440 ---- fi ! test -z "$CC" && { { echo "$as_me:1413: 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:1418:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` ! { (eval echo "$as_me:1421: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? ! echo "$as_me:1424: \$? = $ac_status" >&5 (exit $ac_status); } ! { (eval echo "$as_me:1426: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? ! echo "$as_me:1429: \$? = $ac_status" >&5 (exit $ac_status); } ! { (eval echo "$as_me:1431: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? ! echo "$as_me:1434: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF ! #line 1438 "configure" #include "confdefs.h" *************** *** 1432,1442 **** # 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 --- 1452,1462 ---- # It will help us diagnose broken compilers, and finding out an intuition # of exeext. ! echo "$as_me:1454: 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:1457: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? ! echo "$as_me:1460: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is *************** *** 1461,1465 **** 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; }; } --- 1481,1485 ---- echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! { { echo "$as_me:1483: error: C compiler cannot create executables" >&5 echo "$as_me: error: C compiler cannot create executables" >&2;} { (exit 77); exit 77; }; } *************** *** 1467,1476 **** 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 --- 1487,1496 ---- ac_exeext=$ac_cv_exeext ! echo "$as_me:1489: 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:1494: 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 *************** *** 1478,1485 **** 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 --- 1498,1505 ---- if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' ! { (eval echo "$as_me:1500: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:1503: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no *************** *** 1488,1492 **** 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. --- 1508,1512 ---- cross_compiling=yes else ! { { echo "$as_me:1510: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'." >&5 echo "$as_me: error: cannot run C compiled programs. *************** *** 1496,1500 **** fi fi ! echo "$as_me:1498: result: yes" >&5 echo "${ECHO_T}yes" >&6 --- 1516,1520 ---- fi fi ! echo "$as_me:1518: result: yes" >&5 echo "${ECHO_T}yes" >&6 *************** *** 1503,1517 **** # 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) --- 1523,1537 ---- # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. ! echo "$as_me:1525: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 ! echo "$as_me:1527: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 ! echo "$as_me:1530: checking for executable suffix" >&5 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 ! if { (eval echo "$as_me:1532: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:1535: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) *************** *** 1529,1533 **** 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; }; } --- 1549,1553 ---- done else ! { { echo "$as_me:1551: 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; }; } *************** *** 1535,1539 **** rm -f conftest$ac_cv_exeext ! echo "$as_me:1537: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 --- 1555,1559 ---- rm -f conftest$ac_cv_exeext ! echo "$as_me:1557: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 *************** *** 1541,1545 **** 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 --- 1561,1565 ---- EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT ! echo "$as_me:1563: checking for object suffix" >&5 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then *************** *** 1547,1551 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 1549 "configure" #include "confdefs.h" --- 1567,1571 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 1569 "configure" #include "confdefs.h" *************** *** 1559,1566 **** _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 --- 1579,1586 ---- _ACEOF rm -f conftest.o conftest.obj ! if { (eval echo "$as_me:1581: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:1584: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do *************** *** 1574,1578 **** 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; }; } --- 1594,1598 ---- echo "$as_me: failed program was:" >&5 cat conftest.$ac_ext >&5 ! { { echo "$as_me:1596: error: cannot compute OBJEXT: cannot compile" >&5 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} { (exit 1); exit 1; }; } *************** *** 1581,1589 **** 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 --- 1601,1609 ---- rm -f conftest.$ac_cv_objext conftest.$ac_ext fi ! echo "$as_me:1603: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT ! echo "$as_me:1607: 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 *************** *** 1591,1595 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 1593 "configure" #include "confdefs.h" --- 1611,1615 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 1613 "configure" #include "confdefs.h" *************** *** 1606,1619 **** _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 --- 1626,1639 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:1628: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:1631: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:1634: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:1637: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes *************** *** 1627,1631 **** 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` --- 1647,1651 ---- fi ! echo "$as_me:1649: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` *************** *** 1633,1637 **** 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 --- 1653,1657 ---- ac_save_CFLAGS=$CFLAGS CFLAGS="-g" ! echo "$as_me:1655: 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 *************** *** 1639,1643 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 1641 "configure" #include "confdefs.h" --- 1659,1663 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 1661 "configure" #include "confdefs.h" *************** *** 1651,1664 **** _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 --- 1671,1684 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:1673: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:1676: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:1679: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:1682: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes *************** *** 1670,1674 **** 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 --- 1690,1694 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:1692: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then *************** *** 1697,1710 **** _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 \ --- 1717,1730 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:1719: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:1722: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:1725: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:1728: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ *************** *** 1718,1722 **** do cat >conftest.$ac_ext <<_ACEOF ! #line 1720 "configure" #include "confdefs.h" #include --- 1738,1742 ---- do cat >conftest.$ac_ext <<_ACEOF ! #line 1740 "configure" #include "confdefs.h" #include *************** *** 1731,1744 **** _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 : --- 1751,1764 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:1753: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:1756: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:1759: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:1762: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : *************** *** 1750,1754 **** rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF ! #line 1752 "configure" #include "confdefs.h" $ac_declaration --- 1770,1774 ---- rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF ! #line 1772 "configure" #include "confdefs.h" $ac_declaration *************** *** 1762,1775 **** _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 --- 1782,1795 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:1787: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:1790: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:1793: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break *************** *** 1803,1807 **** 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. --- 1823,1827 ---- 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:1825: 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. *************** *** 1824,1833 **** # 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=$? --- 1844,1853 ---- # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF ! #line 1846 "configure" #include "confdefs.h" #include Syntax error _ACEOF ! if { (eval echo "$as_me:1851: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? *************** *** 1835,1839 **** 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 --- 1855,1859 ---- rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:1857: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then *************** *** 1858,1866 **** # 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=$? --- 1878,1886 ---- # can be detected and how. cat >conftest.$ac_ext <<_ACEOF ! #line 1880 "configure" #include "confdefs.h" #include _ACEOF ! if { (eval echo "$as_me:1884: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? *************** *** 1868,1872 **** 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 --- 1888,1892 ---- rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:1890: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then *************** *** 1905,1909 **** ac_cv_prog_CPP=$CPP fi ! echo "$as_me:1907: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false --- 1925,1929 ---- ac_cv_prog_CPP=$CPP fi ! echo "$as_me:1927: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false *************** *** 1915,1924 **** # 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=$? --- 1935,1944 ---- # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF ! #line 1937 "configure" #include "confdefs.h" #include Syntax error _ACEOF ! if { (eval echo "$as_me:1942: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? *************** *** 1926,1930 **** 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 --- 1946,1950 ---- rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:1948: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then *************** *** 1949,1957 **** # 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=$? --- 1969,1977 ---- # can be detected and how. cat >conftest.$ac_ext <<_ACEOF ! #line 1971 "configure" #include "confdefs.h" #include _ACEOF ! if { (eval echo "$as_me:1975: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? *************** *** 1959,1963 **** 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 --- 1979,1983 ---- rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:1981: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then *************** *** 1987,1991 **** : 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; }; } --- 2007,2011 ---- : else ! { { echo "$as_me:2009: error: C preprocessor \"$CPP\" fails sanity check" >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} { (exit 1); exit 1; }; } *************** *** 1998,2002 **** 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 --- 2018,2022 ---- ac_compiler_gnu=$ac_cv_c_compiler_gnu ! echo "$as_me:2020: 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 *************** *** 2004,2012 **** 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=$? --- 2024,2032 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2026 "configure" #include "confdefs.h" #include _ACEOF ! if { (eval echo "$as_me:2030: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? *************** *** 2014,2018 **** 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 --- 2034,2038 ---- rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:2036: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then *************** *** 2033,2037 **** 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 --- 2053,2057 ---- rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:2055: 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 *************** *** 2061,2065 **** 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 --- 2081,2085 ---- if test $ac_cv_c_compiler_gnu = yes; then ! echo "$as_me:2083: 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 *************** *** 2068,2072 **** ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF ! #line 2070 "configure" #include "confdefs.h" #include --- 2088,2092 ---- ac_pattern="Autoconf.*'x'" cat >conftest.$ac_ext <<_ACEOF ! #line 2090 "configure" #include "confdefs.h" #include *************** *** 2083,2087 **** if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF ! #line 2085 "configure" #include "confdefs.h" #include --- 2103,2107 ---- if test $ac_cv_prog_gcc_traditional = no; then cat >conftest.$ac_ext <<_ACEOF ! #line 2105 "configure" #include "confdefs.h" #include *************** *** 2096,2100 **** 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 --- 2116,2120 ---- fi fi ! echo "$as_me:2118: 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 *************** *** 2115,2119 **** # 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 --- 2135,2139 ---- # 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:2137: checking for a BSD compatible install" >&5 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then *************** *** 2164,2168 **** fi fi ! echo "$as_me:2166: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 --- 2184,2188 ---- fi fi ! echo "$as_me:2186: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 *************** *** 2177,2181 **** # 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 --- 2197,2201 ---- # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 ! echo "$as_me:2199: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then *************** *** 2192,2196 **** $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="" ! echo "$as_me:2194: found $ac_dir/$ac_word" >&5 break done --- 2212,2216 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_AR="" ! echo "$as_me:2214: found $ac_dir/$ac_word" >&5 break done *************** *** 2201,2208 **** 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 --- 2221,2228 ---- AR=$ac_cv_prog_AR if test -n "$AR"; then ! echo "$as_me:2223: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else ! echo "$as_me:2226: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 2212,2216 **** # 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 --- 2232,2236 ---- # 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:2234: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then *************** *** 2227,2231 **** $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 --- 2247,2251 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" ! echo "$as_me:2249: found $ac_dir/$ac_word" >&5 break done *************** *** 2235,2242 **** 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 --- 2255,2262 ---- RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then ! echo "$as_me:2257: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else ! echo "$as_me:2260: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 2247,2251 **** # 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 --- 2267,2271 ---- # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 ! echo "$as_me:2269: 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 *************** *** 2262,2266 **** $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 --- 2282,2286 ---- $as_executable_p "$ac_dir/$ac_word" || continue ac_cv_prog_ac_ct_RANLIB="ranlib" ! echo "$as_me:2284: found $ac_dir/$ac_word" >&5 break done *************** *** 2271,2278 **** 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 --- 2291,2298 ---- ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then ! echo "$as_me:2293: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else ! echo "$as_me:2296: result: no" >&5 echo "${ECHO_T}no" >&6 fi *************** *** 2285,2289 **** 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 --- 2305,2309 ---- MAKE_SHELL=/bin/sh ! echo "$as_me:2307: 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 *************** *** 2293,2297 **** ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF ! #line 2295 "configure" #include "confdefs.h" #include --- 2313,2317 ---- ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF ! #line 2315 "configure" #include "confdefs.h" #include *************** *** 2342,2355 **** 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 --- 2362,2375 ---- CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2364: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2367: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2370: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2373: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg *************** *** 2368,2380 **** 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 --- 2388,2400 ---- case "x$ac_cv_prog_cc_stdc" in x|xno) ! echo "$as_me:2390: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) ! echo "$as_me:2393: 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:2398: 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 *************** *** 2382,2386 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2384 "configure" #include "confdefs.h" --- 2402,2406 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2404 "configure" #include "confdefs.h" *************** *** 2440,2453 **** _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 --- 2460,2473 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2462: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2465: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2468: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2471: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes *************** *** 2459,2463 **** 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 --- 2479,2483 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2481: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then *************** *** 2469,2476 **** 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 --- 2489,2496 ---- fi ! echo "$as_me:2491: 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:2494: result: yes" >&5 echo "${ECHO_T}yes" >&6 *************** *** 2480,2542 **** 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 ! extern "C" void (*signal (int, void (*)(int)))(int); ! #else ! void (*signal ()) (); ! #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 --- 2500,2508 ---- else ! echo "$as_me:2502: result: no" >&5 echo "${ECHO_T}no" >&6 fi ! echo "$as_me:2506: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then *************** *** 2544,2548 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2546 "configure" #include "confdefs.h" #include --- 2510,2514 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2512 "configure" #include "confdefs.h" #include *************** *** 2552,2556 **** _ACEOF ! if { (eval echo "$as_me:2554: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? --- 2518,2522 ---- _ACEOF ! if { (eval echo "$as_me:2520: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? *************** *** 2558,2562 **** 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 --- 2524,2528 ---- rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:2526: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then *************** *** 2580,2584 **** # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF ! #line 2582 "configure" #include "confdefs.h" #include --- 2546,2550 ---- # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF ! #line 2548 "configure" #include "confdefs.h" #include *************** *** 2598,2602 **** # 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 --- 2564,2568 ---- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF ! #line 2566 "configure" #include "confdefs.h" #include *************** *** 2619,2623 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2621 "configure" #include "confdefs.h" #include --- 2585,2589 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2587 "configure" #include "confdefs.h" #include *************** *** 2645,2657 **** _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 : --- 2611,2623 ---- _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:2613: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:2616: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:2618: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2621: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : *************** *** 2666,2670 **** 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 --- 2632,2636 ---- fi fi ! echo "$as_me:2634: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then *************** *** 2682,2686 **** 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 --- 2648,2652 ---- do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:2650: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then *************** *** 2688,2692 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2690 "configure" #include "confdefs.h" $ac_includes_default --- 2654,2658 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2656 "configure" #include "confdefs.h" $ac_includes_default *************** *** 2694,2707 **** _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" --- 2660,2673 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2662: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2665: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2668: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2671: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" *************** *** 2713,2717 **** 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 --- 2679,2683 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2681: 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 *************** *** 2723,2727 **** done ! echo "$as_me:2725: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then --- 2689,2793 ---- done ! echo "$as_me:2691: checking whether char is unsigned" >&5 ! echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6 ! if test "${ac_cv_c_char_unsigned+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 2697 "configure" ! #include "confdefs.h" ! $ac_includes_default ! int ! main () ! { ! int _array_ [1 - 2 * !(((char) -1) < 0)] ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2709: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:2712: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2715: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2718: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_c_char_unsigned=no ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_c_char_unsigned=yes ! fi ! rm -f conftest.$ac_objext conftest.$ac_ext ! fi ! echo "$as_me:2728: result: $ac_cv_c_char_unsigned" >&5 ! echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6 ! if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then ! cat >>confdefs.h <<\EOF ! #define __CHAR_UNSIGNED__ 1 ! EOF ! ! fi ! ! echo "$as_me:2737: 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 2743 "configure" ! #include "confdefs.h" ! #include ! #include ! #ifdef signal ! # undef signal ! #endif ! #ifdef __cplusplus ! extern "C" void (*signal (int, void (*)(int)))(int); ! #else ! void (*signal ()) (); ! #endif ! ! int ! main () ! { ! int i; ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2765: \"$ac_compile\"") >&5 ! (eval $ac_compile) 2>&5 ! ac_status=$? ! echo "$as_me:2768: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2771: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:2774: \$? = $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:2784: result: $ac_cv_type_signal" >&5 ! echo "${ECHO_T}$ac_cv_type_signal" >&6 ! ! cat >>confdefs.h <&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then *************** *** 2729,2733 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2731 "configure" #include "confdefs.h" $ac_includes_default --- 2795,2799 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2797 "configure" #include "confdefs.h" $ac_includes_default *************** *** 2744,2757 **** _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 --- 2810,2823 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2812: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2815: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2818: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2821: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes *************** *** 2763,2767 **** 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 --- 2829,2833 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2831: 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 *************** *** 2775,2779 **** fi ! echo "$as_me:2777: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then --- 2841,2845 ---- fi ! echo "$as_me:2843: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 if test "${ac_cv_type_ssize_t+set}" = set; then *************** *** 2781,2785 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2783 "configure" #include "confdefs.h" $ac_includes_default --- 2847,2851 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2849 "configure" #include "confdefs.h" $ac_includes_default *************** *** 2796,2809 **** _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 --- 2862,2875 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2867: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2870: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2873: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_ssize_t=yes *************** *** 2815,2819 **** 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 --- 2881,2885 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2883: 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 *************** *** 2827,2831 **** fi ! echo "$as_me:2829: checking whether stat file-mode macros are broken" >&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 --- 2893,2897 ---- fi ! echo "$as_me:2895: checking whether stat file-mode macros are broken" >&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 *************** *** 2833,2837 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2835 "configure" #include "confdefs.h" #include --- 2899,2903 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2901 "configure" #include "confdefs.h" #include *************** *** 2872,2876 **** 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 --- 2938,2942 ---- fi ! echo "$as_me:2940: 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 *************** *** 2885,2889 **** 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 --- 2951,2955 ---- 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:2953: 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 *************** *** 2891,2895 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 2893 "configure" #include "confdefs.h" #include --- 2957,2961 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 2959 "configure" #include "confdefs.h" #include *************** *** 2906,2919 **** _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" --- 2972,2985 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:2974: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:2977: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:2980: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:2983: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" *************** *** 2925,2929 **** 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 --- 2991,2995 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:2993: 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 *************** *** 2938,2942 **** # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then ! echo "$as_me:2940: checking for opendir in -ldir" >&5 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 if test "${ac_cv_lib_dir_opendir+set}" = set; then --- 3004,3008 ---- # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then ! echo "$as_me:3006: checking for opendir in -ldir" >&5 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6 if test "${ac_cv_lib_dir_opendir+set}" = set; then *************** *** 2946,2950 **** LIBS="-ldir $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 2948 "configure" #include "confdefs.h" --- 3012,3016 ---- LIBS="-ldir $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3014 "configure" #include "confdefs.h" *************** *** 2965,2978 **** _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 --- 3031,3044 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3033: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3036: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3039: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3042: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dir_opendir=yes *************** *** 2985,2989 **** 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 --- 3051,3055 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3053: 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 *************** *** 2992,2996 **** 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 --- 3058,3062 ---- else ! echo "$as_me:3060: 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 *************** *** 3000,3004 **** LIBS="-lx $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3002 "configure" #include "confdefs.h" --- 3066,3070 ---- LIBS="-lx $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 3068 "configure" #include "confdefs.h" *************** *** 3019,3032 **** _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 --- 3085,3098 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3087: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3090: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3093: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3096: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_x_opendir=yes *************** *** 3039,3043 **** 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 --- 3105,3109 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:3107: 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 *************** *** 3051,3055 **** 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 --- 3117,3121 ---- do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` ! echo "$as_me:3119: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then *************** *** 3057,3061 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3059 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, --- 3123,3127 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3125 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, *************** *** 3088,3101 **** _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" --- 3154,3167 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3156: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3159: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3162: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3165: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" *************** *** 3107,3111 **** 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 --- 3173,3177 ---- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:3175: 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 *************** *** 3117,3121 **** done ! echo "$as_me:3119: checking for working strcoll" >&5 echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6 if test "${ac_cv_func_strcoll_works+set}" = set; then --- 3183,3187 ---- done ! echo "$as_me:3185: checking for working strcoll" >&5 echo $ECHO_N "checking for working strcoll... $ECHO_C" >&6 if test "${ac_cv_func_strcoll_works+set}" = set; then *************** *** 3126,3130 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3128 "configure" #include "confdefs.h" $ac_includes_default --- 3192,3196 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3194 "configure" #include "confdefs.h" $ac_includes_default *************** *** 3140,3152 **** _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 --- 3206,3218 ---- _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3208: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3211: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3213: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3216: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_strcoll_works=yes *************** *** 3160,3164 **** 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 --- 3226,3230 ---- fi fi ! echo "$as_me:3228: 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 *************** *** 3175,3179 **** 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 --- 3241,3245 ---- do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:3243: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then *************** *** 3181,3189 **** 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=$? --- 3247,3255 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3249 "configure" #include "confdefs.h" #include <$ac_header> _ACEOF ! if { (eval echo "$as_me:3253: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? *************** *** 3191,3195 **** 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 --- 3257,3261 ---- rm -f conftest.er1 cat conftest.err >&5 ! echo "$as_me:3259: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then *************** *** 3210,3214 **** 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 --- 3276,3280 ---- rm -f conftest.err conftest.$ac_ext fi ! echo "$as_me:3278: 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 *************** *** 3220,3224 **** done ! echo "$as_me:3222: checking for type of signal functions" >&5 echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6 if test "${bash_cv_signal_vintage+set}" = set; then --- 3286,3290 ---- done ! echo "$as_me:3288: checking for type of signal functions" >&5 echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6 if test "${bash_cv_signal_vintage+set}" = set; then *************** *** 3227,3231 **** cat >conftest.$ac_ext <<_ACEOF ! #line 3229 "configure" #include "confdefs.h" #include --- 3293,3297 ---- cat >conftest.$ac_ext <<_ACEOF ! #line 3295 "configure" #include "confdefs.h" #include *************** *** 3245,3258 **** _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 --- 3311,3324 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3313: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3316: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3319: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3322: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_signal_vintage=posix *************** *** 3262,3266 **** cat >conftest.$ac_ext <<_ACEOF ! #line 3264 "configure" #include "confdefs.h" #include --- 3328,3332 ---- cat >conftest.$ac_ext <<_ACEOF ! #line 3330 "configure" #include "confdefs.h" #include *************** *** 3277,3290 **** _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 --- 3343,3356 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3345: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3348: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3351: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3354: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_signal_vintage=4.2bsd *************** *** 3294,3298 **** cat >conftest.$ac_ext <<_ACEOF ! #line 3296 "configure" #include "confdefs.h" --- 3360,3364 ---- cat >conftest.$ac_ext <<_ACEOF ! #line 3362 "configure" #include "confdefs.h" *************** *** 3312,3325 **** _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 --- 3378,3391 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3380: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3383: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3386: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3389: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_signal_vintage=svr3 *************** *** 3340,3344 **** 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 --- 3406,3410 ---- fi ! echo "$as_me:3408: result: $bash_cv_signal_vintage" >&5 echo "${ECHO_T}$bash_cv_signal_vintage" >&6 if test "$bash_cv_signal_vintage" = posix; then *************** *** 3359,3363 **** fi ! echo "$as_me:3361: checking if signal handlers must be reinstalled when invoked" >&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 --- 3425,3429 ---- fi ! echo "$as_me:3427: checking if signal handlers must be reinstalled when invoked" >&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 *************** *** 3365,3369 **** 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 --- 3431,3435 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:3433: 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 *************** *** 3371,3375 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3373 "configure" #include "confdefs.h" --- 3437,3441 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3439 "configure" #include "confdefs.h" *************** *** 3419,3431 **** _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 --- 3485,3497 ---- _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3487: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3490: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3492: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3495: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_must_reinstall_sighandlers=no *************** *** 3440,3444 **** 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 --- 3506,3510 ---- fi ! echo "$as_me:3508: 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 *************** *** 3449,3453 **** fi ! echo "$as_me:3451: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6 if test "${bash_cv_func_sigsetjmp+set}" = set; then --- 3515,3519 ---- fi ! echo "$as_me:3517: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 echo $ECHO_N "checking for presence of POSIX-style sigsetjmp/siglongjmp... $ECHO_C" >&6 if test "${bash_cv_func_sigsetjmp+set}" = set; then *************** *** 3455,3459 **** 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 --- 3521,3525 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:3523: 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 *************** *** 3461,3465 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3463 "configure" #include "confdefs.h" --- 3527,3531 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3529 "configure" #include "confdefs.h" *************** *** 3503,3515 **** _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 --- 3569,3581 ---- _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3571: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3574: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3576: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3579: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_func_sigsetjmp=present *************** *** 3524,3528 **** 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 --- 3590,3594 ---- fi ! echo "$as_me:3592: result: $bash_cv_func_sigsetjmp" >&5 echo "${ECHO_T}$bash_cv_func_sigsetjmp" >&6 if test $bash_cv_func_sigsetjmp = present; then *************** *** 3533,3537 **** fi ! echo "$as_me:3535: checking for lstat" >&5 echo $ECHO_N "checking for lstat... $ECHO_C" >&6 if test "${bash_cv_func_lstat+set}" = set; then --- 3599,3603 ---- fi ! echo "$as_me:3601: checking for lstat" >&5 echo $ECHO_N "checking for lstat... $ECHO_C" >&6 if test "${bash_cv_func_lstat+set}" = set; then *************** *** 3539,3543 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3541 "configure" #include "confdefs.h" --- 3605,3609 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3607 "configure" #include "confdefs.h" *************** *** 3554,3567 **** _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 --- 3620,3633 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3622: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3625: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3628: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3631: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_func_lstat=yes *************** *** 3573,3577 **** 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 --- 3639,3643 ---- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:3641: result: $bash_cv_func_lstat" >&5 echo "${ECHO_T}$bash_cv_func_lstat" >&6 if test $bash_cv_func_lstat = yes; then *************** *** 3582,3586 **** fi ! echo "$as_me:3584: checking whether or not strcoll and strcmp differ" >&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 --- 3648,3652 ---- fi ! echo "$as_me:3650: checking whether or not strcoll and strcmp differ" >&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 *************** *** 3588,3592 **** 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 --- 3654,3658 ---- else if test "$cross_compiling" = yes; then ! { echo "$as_me:3656: 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 *************** *** 3594,3598 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3596 "configure" #include "confdefs.h" --- 3660,3664 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3662 "configure" #include "confdefs.h" *************** *** 3634,3646 **** _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 --- 3700,3712 ---- _ACEOF rm -f conftest$ac_exeext ! if { (eval echo "$as_me:3702: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3705: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:3707: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3710: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_func_strcoll_broken=yes *************** *** 3655,3659 **** 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 --- 3721,3725 ---- fi ! echo "$as_me:3723: 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 *************** *** 3664,3668 **** 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 --- 3730,3734 ---- fi ! echo "$as_me:3732: 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 *************** *** 3670,3674 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3672 "configure" #include "confdefs.h" --- 3736,3740 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3738 "configure" #include "confdefs.h" *************** *** 3690,3694 **** 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 --- 3756,3760 ---- fi ! echo "$as_me:3758: result: $bash_cv_getpw_declared" >&5 echo "${ECHO_T}$bash_cv_getpw_declared" >&6 if test $bash_cv_getpw_declared = yes; then *************** *** 3699,3703 **** 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 --- 3765,3769 ---- fi ! echo "$as_me:3767: checking POSIX termios" >&5 echo $ECHO_N "checking POSIX termios... $ECHO_C" >&6 if test "${ac_cv_sys_posix_termios+set}" = set; then *************** *** 3705,3709 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3707 "configure" #include "confdefs.h" #include --- 3771,3775 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3773 "configure" #include "confdefs.h" #include *************** *** 3720,3733 **** _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 --- 3786,3799 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:3788: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:3791: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:3794: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3797: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sys_posix_termios=yes *************** *** 3739,3747 **** 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 --- 3805,3813 ---- rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext fi ! echo "$as_me:3807: 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:3811: 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 *************** *** 3749,3753 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3751 "configure" #include "confdefs.h" #include --- 3815,3819 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3817 "configure" #include "confdefs.h" #include *************** *** 3767,3776 **** 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 --- 3833,3842 ---- fi ! echo "$as_me:3835: 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:3840: 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 *************** *** 3778,3782 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3780 "configure" #include "confdefs.h" #include --- 3844,3848 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3846 "configure" #include "confdefs.h" #include *************** *** 3796,3800 **** 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 --- 3862,3866 ---- fi ! echo "$as_me:3864: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 echo "${ECHO_T}$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6 *************** *** 3808,3812 **** 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 --- 3874,3878 ---- fi ! echo "$as_me:3876: 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 *************** *** 3814,3818 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3816 "configure" #include "confdefs.h" #include --- 3880,3884 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3882 "configure" #include "confdefs.h" #include *************** *** 3834,3847 **** _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 --- 3900,3913 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3902: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:3905: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3908: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3911: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_void_sighandler=yes *************** *** 3853,3857 **** 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 --- 3919,3923 ---- rm -f conftest.$ac_objext conftest.$ac_ext fi ! echo "$as_me:3921: result: $bash_cv_void_sighandler" >&5 echo "${ECHO_T}$bash_cv_void_sighandler" >&6 if test $bash_cv_void_sighandler = yes; then *************** *** 3862,3866 **** 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 --- 3928,3932 ---- fi ! echo "$as_me:3930: 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 *************** *** 3868,3872 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3870 "configure" #include "confdefs.h" #include --- 3934,3938 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3936 "configure" #include "confdefs.h" #include *************** *** 3881,3894 **** _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 --- 3947,3960 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3949: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:3952: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:3955: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:3958: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_tiocstat_in_ioctl=yes *************** *** 3901,3905 **** 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 --- 3967,3971 ---- fi ! echo "$as_me:3969: 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 *************** *** 3910,3914 **** 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 --- 3976,3980 ---- fi ! echo "$as_me:3978: 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 *************** *** 3916,3920 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3918 "configure" #include "confdefs.h" #include --- 3982,3986 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 3984 "configure" #include "confdefs.h" #include *************** *** 3929,3942 **** _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 --- 3995,4008 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:3997: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4000: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4003: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4006: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_fionread_in_ioctl=yes *************** *** 3949,3953 **** 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 --- 4015,4019 ---- fi ! echo "$as_me:4017: 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 *************** *** 3958,3962 **** 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 --- 4024,4028 ---- fi ! echo "$as_me:4026: 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 *************** *** 3964,3968 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 3966 "configure" #include "confdefs.h" #include --- 4030,4034 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 4032 "configure" #include "confdefs.h" #include *************** *** 3976,3989 **** _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 --- 4042,4055 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4044: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4047: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4050: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4053: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_speed_t_in_sys_types=yes *************** *** 3996,4000 **** 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 --- 4062,4066 ---- fi ! echo "$as_me:4064: 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 *************** *** 4005,4009 **** fi ! echo "$as_me:4007: checking for struct winsize in sys/ioctl.h and termios.h" >&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 --- 4071,4075 ---- fi ! echo "$as_me:4073: checking for struct winsize in sys/ioctl.h and termios.h" >&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 *************** *** 4011,4015 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 4013 "configure" #include "confdefs.h" #include --- 4077,4081 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 4079 "configure" #include "confdefs.h" #include *************** *** 4024,4037 **** _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 --- 4090,4103 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4092: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4095: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4098: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4101: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_struct_winsize_header=ioctl_h *************** *** 4040,4044 **** cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF ! #line 4042 "configure" #include "confdefs.h" #include --- 4106,4110 ---- cat conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF ! #line 4108 "configure" #include "confdefs.h" #include *************** *** 4053,4066 **** _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 --- 4119,4132 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4121: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4124: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4127: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4130: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_struct_winsize_header=termios_h *************** *** 4077,4081 **** 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 --- 4143,4147 ---- if test $bash_cv_struct_winsize_header = ioctl_h; then ! echo "$as_me:4145: result: sys/ioctl.h" >&5 echo "${ECHO_T}sys/ioctl.h" >&6 cat >>confdefs.h <<\EOF *************** *** 4084,4088 **** 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 --- 4150,4154 ---- elif test $bash_cv_struct_winsize_header = termios_h; then ! echo "$as_me:4152: result: termios.h" >&5 echo "${ECHO_T}termios.h" >&6 cat >>confdefs.h <<\EOF *************** *** 4091,4099 **** 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 --- 4157,4165 ---- else ! echo "$as_me:4159: result: not found" >&5 echo "${ECHO_T}not found" >&6 fi ! echo "$as_me:4163: 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 *************** *** 4101,4105 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 4103 "configure" #include "confdefs.h" --- 4167,4171 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 4169 "configure" #include "confdefs.h" *************** *** 4135,4148 **** _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 --- 4201,4214 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4203: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4206: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4209: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4212: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_dirent_has_dino=yes *************** *** 4155,4159 **** 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 --- 4221,4225 ---- fi ! echo "$as_me:4223: 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 *************** *** 4164,4168 **** fi ! echo "$as_me:4166: checking if struct dirent has a d_fileno member" >&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 --- 4230,4234 ---- fi ! echo "$as_me:4232: checking if struct dirent has a d_fileno member" >&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 *************** *** 4170,4174 **** else cat >conftest.$ac_ext <<_ACEOF ! #line 4172 "configure" #include "confdefs.h" --- 4236,4240 ---- else cat >conftest.$ac_ext <<_ACEOF ! #line 4238 "configure" #include "confdefs.h" *************** *** 4204,4217 **** _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 --- 4270,4283 ---- _ACEOF rm -f conftest.$ac_objext ! if { (eval echo "$as_me:4272: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? ! echo "$as_me:4275: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' ! { (eval echo "$as_me:4278: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4281: \$? = $ac_status" >&5 (exit $ac_status); }; }; then bash_cv_dirent_has_d_fileno=yes *************** *** 4224,4228 **** 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 --- 4290,4294 ---- fi ! echo "$as_me:4292: 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 *************** *** 4240,4244 **** _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= --- 4306,4310 ---- _bash_needmsg=yes else ! echo "$as_me:4308: checking which library has the termcap functions" >&5 echo $ECHO_N "checking which library has the termcap functions... $ECHO_C" >&6 _bash_needmsg= *************** *** 4247,4251 **** 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 --- 4313,4317 ---- echo $ECHO_N "(cached) $ECHO_C" >&6 else ! echo "$as_me:4315: 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 *************** *** 4255,4259 **** LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4257 "configure" #include "confdefs.h" --- 4321,4325 ---- LIBS="-ltermcap $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4323 "configure" #include "confdefs.h" *************** *** 4274,4287 **** _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 --- 4340,4353 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4342: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4345: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4348: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4351: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_termcap_tgetent=yes *************** *** 4294,4303 **** 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 --- 4360,4369 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:4362: 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:4367: 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 *************** *** 4307,4311 **** LIBS="-ltinfo $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4309 "configure" #include "confdefs.h" --- 4373,4377 ---- LIBS="-ltinfo $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4375 "configure" #include "confdefs.h" *************** *** 4326,4339 **** _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 --- 4392,4405 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4394: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4397: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4400: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4403: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_tinfo_tgetent=yes *************** *** 4346,4355 **** 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 --- 4412,4421 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:4414: 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_termcap_lib=libtinfo else ! echo "$as_me:4419: 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 *************** *** 4359,4363 **** LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4361 "configure" #include "confdefs.h" --- 4425,4429 ---- LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4427 "configure" #include "confdefs.h" *************** *** 4378,4391 **** _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 --- 4444,4457 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4446: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4449: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4452: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4455: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_curses_tgetent=yes *************** *** 4398,4407 **** 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 --- 4464,4473 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:4466: 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:4471: 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 *************** *** 4411,4415 **** LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4413 "configure" #include "confdefs.h" --- 4477,4481 ---- LIBS="-lncurses $LIBS" cat >conftest.$ac_ext <<_ACEOF ! #line 4479 "configure" #include "confdefs.h" *************** *** 4430,4443 **** _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 --- 4496,4509 ---- _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4498: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? ! echo "$as_me:4501: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4504: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? ! echo "$as_me:4507: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_ncurses_tgetent=yes *************** *** 4450,4454 **** 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 --- 4516,4520 ---- LIBS=$ac_check_lib_save_LIBS fi ! echo "$as_me:4518: 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 *************** *** 4467,4474 **** 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 --- 4533,4540 ---- if test "X$_bash_needmsg" = "Xyes"; then ! echo "$as_me:4535: 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:4538: 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 *************** *** 4491,4495 **** if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then ! TERMCAP_LIB=-ltermcap #default fi --- 4557,4937 ---- if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then ! if test "$prefer_curses" = yes; then ! TERMCAP_LIB=-lcurses ! else ! TERMCAP_LIB=-ltermcap #default ! fi ! fi ! ! for ac_header in wctype.h ! do ! as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` ! echo "$as_me:4569: 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 4575 "configure" ! #include "confdefs.h" ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:4579: \"$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:4585: \$? = $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:4604: 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 $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 4623 "configure" ! #include "confdefs.h" ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:4627: \"$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:4633: \$? = $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:4652: 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 $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 4671 "configure" ! #include "confdefs.h" ! #include <$ac_header> ! _ACEOF ! if { (eval echo "$as_me:4675: \"$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:4681: \$? = $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:4700: 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 mbsrtowcs... $ECHO_C" >&6 ! if test "${ac_cv_func_mbsrtowcs+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4716 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char mbsrtowcs (); 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 mbsrtowcs (); ! 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 ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_mbsrtowcs) || defined (__stub___mbsrtowcs) ! choke me ! #else ! f = mbsrtowcs; ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4747: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4750: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4753: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4756: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_mbsrtowcs=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_mbsrtowcs=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:4766: result: $ac_cv_func_mbsrtowcs" >&5 ! echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6 ! if test $ac_cv_func_mbsrtowcs = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_MBSRTOWCS 1 ! EOF ! ! fi ! ! echo "$as_me:4775: checking for wcwidth" >&5 ! echo $ECHO_N "checking for wcwidth... $ECHO_C" >&6 ! if test "${ac_cv_func_wcwidth+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4781 "configure" ! #include "confdefs.h" ! /* System header to define __stub macros and hopefully few prototypes, ! which can conflict with char wcwidth (); 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 wcwidth (); ! 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 ! something starting with __ and the normal name is an alias. */ ! #if defined (__stub_wcwidth) || defined (__stub___wcwidth) ! choke me ! #else ! f = wcwidth; ! #endif ! ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4812: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4815: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4818: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4821: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! ac_cv_func_wcwidth=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! ac_cv_func_wcwidth=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:4831: result: $ac_cv_func_wcwidth" >&5 ! echo "${ECHO_T}$ac_cv_func_wcwidth" >&6 ! if test $ac_cv_func_wcwidth = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_WCWIDTH 1 ! EOF ! ! fi ! ! echo "$as_me:4840: checking for mbstate_t" >&5 ! echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6 ! if test "${bash_cv_have_mbstate_t+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! if test "$cross_compiling" = yes; then ! { { echo "$as_me:4846: error: cannot run test program while cross compiling" >&5 ! echo "$as_me: error: cannot run test program while cross compiling" >&2;} ! { (exit 1); exit 1; }; } ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4851 "configure" ! #include "confdefs.h" ! ! #include ! int ! main () ! { ! mbstate_t ps; ! return 0; ! } ! _ACEOF ! rm -f conftest$ac_exeext ! if { (eval echo "$as_me:4863: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4866: \$? = $ac_status" >&5 ! (exit $ac_status); } && { ac_try='./conftest$ac_exeext' ! { (eval echo "$as_me:4868: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4871: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! bash_cv_have_mbstate_t=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_have_mbstate_t=no ! fi ! rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext ! fi ! fi ! echo "$as_me:4883: result: $bash_cv_have_mbstate_t" >&5 ! echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6 ! if test $bash_cv_have_mbstate_t = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_MBSTATE_T 1 ! EOF ! ! fi ! ! echo "$as_me:4892: checking for nl_langinfo and CODESET" >&5 ! echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 ! if test "${bash_cv_langinfo_codeset+set}" = set; then ! echo $ECHO_N "(cached) $ECHO_C" >&6 ! else ! cat >conftest.$ac_ext <<_ACEOF ! #line 4898 "configure" ! #include "confdefs.h" ! #include ! int ! main () ! { ! char* cs = nl_langinfo(CODESET); ! ; ! return 0; ! } ! _ACEOF ! rm -f conftest.$ac_objext conftest$ac_exeext ! if { (eval echo "$as_me:4910: \"$ac_link\"") >&5 ! (eval $ac_link) 2>&5 ! ac_status=$? ! echo "$as_me:4913: \$? = $ac_status" >&5 ! (exit $ac_status); } && ! { ac_try='test -s conftest$ac_exeext' ! { (eval echo "$as_me:4916: \"$ac_try\"") >&5 ! (eval $ac_try) 2>&5 ! ac_status=$? ! echo "$as_me:4919: \$? = $ac_status" >&5 ! (exit $ac_status); }; }; then ! bash_cv_langinfo_codeset=yes ! else ! echo "$as_me: failed program was:" >&5 ! cat conftest.$ac_ext >&5 ! bash_cv_langinfo_codeset=no ! fi ! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext ! fi ! echo "$as_me:4929: result: $bash_cv_langinfo_codeset" >&5 ! echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6 ! if test $bash_cv_langinfo_codeset = yes; then ! cat >>confdefs.h <<\EOF ! #define HAVE_LANGINFO_CODESET 1 ! EOF ! fi *************** *** 4509,4519 **** # 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 # quoted for m4 so I can use character classes --- 4951,4967 ---- # if test -f ${srcdir}/support/shobj-conf; then ! echo "$as_me:4953: 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:4957: result: $SHLIB_STATUS" >&5 echo "${ECHO_T}$SHLIB_STATUS" >&6 + # SHLIB_STATUS is either `supported' or `unsupported'. If it's + # `unsupported', turn off any default shared library building + if test "$SHLIB_STATUS" = 'unsupported'; then + opt_shared_libs=no + fi + # shared library versioning # quoted for m4 so I can use character classes *************** *** 4523,4526 **** --- 4971,4983 ---- fi + if test "$opt_static_libs" = "yes"; then + STATIC_TARGET=static + STATIC_INSTALL_TARGET=install-static + fi + if test "$opt_shared_libs" = "yes"; then + SHARED_TARGET=shared + SHARED_INSTALL_TARGET=install-shared + fi + case "$host_os" in msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file *************** *** 4609,4613 **** 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 --- 5066,5070 ---- ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" ! { echo "$as_me:5068: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF *************** *** 4740,4744 **** cat >>$CONFIG_STATUS <>$CONFIG_STATUS <&5 echo "$as_me: error: ambiguous option: $1 --- 5242,5246 ---- --he | --h) # Conflict between --help and --header ! { { echo "$as_me:5244: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 *************** *** 4804,4808 **** # 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 --- 5261,5265 ---- # This is an error. ! -*) { { echo "$as_me:5263: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 *************** *** 4823,4827 **** ## ----------------------- ## ! This file was extended by $as_me (readline 4.2a) 2.52, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS --- 5280,5284 ---- ## ----------------------- ## ! This file was extended by $as_me (readline 4.3) 2.52, executed with CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS *************** *** 4845,4849 **** "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; }; };; --- 5302,5306 ---- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; ! *) { { echo "$as_me:5304: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; *************** *** 4965,4968 **** --- 5422,5429 ---- s,@SHLIB_MAJOR@,$SHLIB_MAJOR,;t t s,@SHLIB_MINOR@,$SHLIB_MINOR,;t t + s,@STATIC_TARGET@,$STATIC_TARGET,;t t + s,@SHARED_TARGET@,$SHARED_TARGET,;t t + s,@STATIC_INSTALL_TARGET@,$STATIC_INSTALL_TARGET,;t t + s,@SHARED_INSTALL_TARGET@,$SHARED_INSTALL_TARGET,;t t s,@BUILD_DIR@,$BUILD_DIR,;t t s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t *************** *** 5086,5090 **** 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" --- 5547,5551 ---- if test x"$ac_file" != x-; then ! { echo "$as_me:5549: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" *************** *** 5104,5108 **** [\\/$]*) # 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; }; } --- 5565,5569 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:5567: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 5117,5121 **** 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; }; } --- 5578,5582 ---- else # /dev/null tree ! { { echo "$as_me:5580: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 5178,5182 **** esac ! test x"$ac_file" != x- && { echo "$as_me:5180: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} --- 5639,5643 ---- esac ! test x"$ac_file" != x- && { echo "$as_me:5641: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} *************** *** 5189,5193 **** [\\/$]*) # 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; }; } --- 5650,5654 ---- [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) ! test -f "$f" || { { echo "$as_me:5652: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 5202,5206 **** 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; }; } --- 5663,5667 ---- else # /dev/null tree ! { { echo "$as_me:5665: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } *************** *** 5319,5323 **** 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 --- 5780,5784 ---- if test x"$ac_file" != x-; then if cmp -s $ac_file $tmp/config.h 2>/dev/null; then ! { echo "$as_me:5782: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else diff -Nrc2 readline-4.2a/configure.in readline-4.3/configure.in *** readline-4.2a/configure.in Mon Oct 29 10:20:33 2001 --- readline-4.3/configure.in Wed Feb 20 10:05:17 2002 *************** *** 5,11 **** 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 --- 5,11 ---- dnl dnl Process this file with autoconf to produce a configure script. ! AC_REVISION([for Readline 4.3, version 2.45, from autoconf version] AC_ACVERSION) ! AC_INIT(readline, 4.3, bug-readline@gnu.org) dnl make sure we are using a recent autoconf version *************** *** 17,21 **** dnl update the value of RL_READLINE_VERSION in readline.h when this changes ! LIBVERSION=4.2a AC_CANONICAL_HOST --- 17,21 ---- dnl update the value of RL_READLINE_VERSION in readline.h when this changes ! LIBVERSION=4.3 AC_CANONICAL_HOST *************** *** 23,30 **** dnl configure defaults opt_curses=no - opt_shared=no dnl arguments to configure ! AC_ARG_WITH(curses, --with-curses use the curses library instead of the termcap library,opt_curses=$withval) if test "$opt_curses" = "yes"; then --- 23,29 ---- dnl configure defaults opt_curses=no dnl arguments to configure ! AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval) if test "$opt_curses" = "yes"; then *************** *** 32,35 **** --- 31,41 ---- fi + dnl option parsing for optional features + opt_static_libs=yes + opt_shared_libs=yes + + AC_ARG_ENABLE(shared, AC_HELP_STRING([--enable-shared], [build shared libraries [[default=YES]]]), opt_shared_libs=$enableval) + AC_ARG_ENABLE(static, AC_HELP_STRING([--enable-static], [build static libraries [[default=YES]]]), opt_static_libs=$enableval) + echo "" echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}" *************** *** 60,63 **** --- 66,70 ---- AC_C_CONST AC_C_PROTOTYPES + AC_C_CHAR_UNSIGNED AC_TYPE_SIGNAL *************** *** 103,109 **** BASH_CHECK_LIB_TERMCAP if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then ! TERMCAP_LIB=-ltermcap #default fi case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; --- 110,122 ---- BASH_CHECK_LIB_TERMCAP if test "$TERMCAP_LIB" = "./lib/termcap/libtermcap.a"; then ! if test "$prefer_curses" = yes; then ! TERMCAP_LIB=-lcurses ! else ! TERMCAP_LIB=-ltermcap #default ! fi fi + BASH_CHECK_MULTIBYTE + case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; *************** *** 137,140 **** --- 150,159 ---- AC_MSG_RESULT($SHLIB_STATUS) + # SHLIB_STATUS is either `supported' or `unsupported'. If it's + # `unsupported', turn off any default shared library building + if test "$SHLIB_STATUS" = 'unsupported'; then + opt_shared_libs=no + fi + # shared library versioning # quoted for m4 so I can use character classes *************** *** 144,147 **** --- 163,180 ---- AC_SUBST(SHLIB_MINOR) fi + + if test "$opt_static_libs" = "yes"; then + STATIC_TARGET=static + STATIC_INSTALL_TARGET=install-static + fi + if test "$opt_shared_libs" = "yes"; then + SHARED_TARGET=shared + SHARED_INSTALL_TARGET=install-shared + fi + + AC_SUBST(STATIC_TARGET) + AC_SUBST(SHARED_TARGET) + AC_SUBST(STATIC_INSTALL_TARGET) + AC_SUBST(SHARED_INSTALL_TARGET) case "$host_os" in diff -Nrc2 readline-4.2a/display.c readline-4.3/display.c *** readline-4.2a/display.c Tue Oct 30 16:11:44 2001 --- readline-4.3/display.c Tue Jun 4 10:54:47 2002 *************** *** 44,47 **** --- 44,48 ---- /* System-specific feature definitions and include files. */ #include "rldefs.h" + #include "rlmbutil.h" /* Termcap library stuff. */ *************** *** 66,72 **** 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; static int inv_lbsize, vis_lbsize; --- 67,80 ---- static void space_to_eol PARAMS((int)); static void delete_chars PARAMS((int)); ! static void insert_some_chars PARAMS((char *, int, int)); static void cr PARAMS((void)); + #if defined (HANDLE_MULTIBYTE) + static int _rl_col_width PARAMS((char *, int, int)); + static int *_rl_wrapped_line; + #else + # define _rl_col_width(l, s, e) (((e) <= (s)) ? 0 : (e) - (s)) + #endif + static int *inv_lbreaks, *vis_lbreaks; static int inv_lbsize, vis_lbsize; *************** *** 360,363 **** --- 368,374 ---- inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int)); vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int)); + #if defined (HANDLE_MULTIBYTE) + _rl_wrapped_line = (int *)xmalloc (vis_lbsize * sizeof (int)); + #endif inv_lbreaks[0] = vis_lbreaks[0] = 0; } *************** *** 373,376 **** --- 384,394 ---- int newlines, lpos, temp; char *prompt_this_line; + #if defined (HANDLE_MULTIBYTE) + wchar_t wc; + size_t wc_bytes; + int wc_width; + mbstate_t ps; + int _rl_wrapped_multicolumn = 0; + #endif if (!readline_echoing_p) *************** *** 473,477 **** } \ } while (0) ! #define CHECK_LPOS() \ do { \ --- 491,513 ---- } \ } while (0) ! ! #if defined (HANDLE_MULTIBYTE) ! #define CHECK_LPOS() \ ! do { \ ! lpos++; \ ! if (lpos >= _rl_screenwidth) \ ! { \ ! if (newlines >= (inv_lbsize - 2)) \ ! { \ ! inv_lbsize *= 2; \ ! inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \ ! _rl_wrapped_line = (int *)xrealloc (_rl_wrapped_line, inv_lbsize * sizeof (int)); \ ! } \ ! inv_lbreaks[++newlines] = out; \ ! _rl_wrapped_line[newlines] = _rl_wrapped_multicolumn; \ ! lpos = 0; \ ! } \ ! } while (0) ! #else #define CHECK_LPOS() \ do { \ *************** *** 488,495 **** --- 524,535 ---- } \ } while (0) + #endif /* inv_lbreaks[i] is where line i starts in the buffer. */ inv_lbreaks[newlines = 0] = 0; lpos = out - wrap_offset; + #if defined (HANDLE_MULTIBYTE) + memset (_rl_wrapped_line, 0, vis_lbsize); + #endif /* prompt_invis_chars_first_line is the number of invisible characters in *************** *** 509,513 **** --- 549,557 ---- prompts that exceed two physical lines? */ temp = ((newlines + 1) * _rl_screenwidth) + + #if 0 ((newlines == 0) ? prompt_invis_chars_first_line : 0) + + #else + ((newlines == 0 && local_prompt_prefix == 0) ? prompt_invis_chars_first_line : 0) + + #endif ((newlines == 1) ? wrap_offset : 0); *************** *** 524,531 **** --- 568,609 ---- This handles expanding tabs for display and displaying meta characters. */ lb_linenum = 0; + #if defined (HANDLE_MULTIBYTE) + in = 0; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + memset (&ps, 0, sizeof (mbstate_t)); + wc_bytes = mbrtowc (&wc, rl_line_buffer, rl_end, &ps); + } + else + wc_bytes = 1; + while (in < rl_end) + #else for (in = 0; in < rl_end; in++) + #endif { c = (unsigned char)rl_line_buffer[in]; + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + if (wc_bytes == (size_t)-1 || wc_bytes == (size_t)-2) + { + /* Byte sequence is invalid or shortened. Assume that the + first byte represents a character. */ + wc_bytes = 1; + /* Assume that a character occupies a single column. */ + wc_width = 1; + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (wc_bytes == (size_t)0) + break; /* Found '\0' */ + else + { + temp = wcwidth (wc); + wc_width = (temp < 0) ? 1 : temp; + } + } + #endif + if (out + 8 >= line_size) /* XXX - 8 for \t */ { *************** *** 542,546 **** --- 620,628 ---- } + #if defined (HANDLE_MULTIBYTE) + if (META_CHAR (c) && _rl_output_meta_chars == 0) /* XXX - clean up */ + #else if (META_CHAR (c)) + #endif { if (_rl_output_meta_chars == 0) *************** *** 611,617 **** --- 693,742 ---- else { + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + register int i; + + _rl_wrapped_multicolumn = 0; + + if (_rl_screenwidth < lpos + wc_width) + for (i = lpos; i < _rl_screenwidth; i++) + { + /* The space will be removed in update_line() */ + line[out++] = ' '; + _rl_wrapped_multicolumn++; + CHECK_LPOS(); + } + if (in == rl_point) + { + c_pos = out; + lb_linenum = newlines; + } + for (i = in; i < in+wc_bytes; i++) + line[out++] = rl_line_buffer[i]; + for (i = 0; i < wc_width; i++) + CHECK_LPOS(); + } + else + { + line[out++] = c; + CHECK_LPOS(); + } + #else line[out++] = c; CHECK_LPOS(); + #endif + } + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + in += wc_bytes; + wc_bytes = mbrtowc (&wc, rl_line_buffer + in, rl_end - in, &ps); } + else + in++; + #endif + } line[out] = '\0'; *************** *** 651,655 **** not the first. */ if (out >= _rl_screenchars) ! out = _rl_screenchars - 1; /* The first line is at character position 0 in the buffer. The --- 776,785 ---- not the first. */ if (out >= _rl_screenchars) ! { ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! out = _rl_find_prev_mbchar (line, _rl_screenchars, MB_FIND_ANY); ! else ! out = _rl_screenchars - 1; ! } /* The first line is at character position 0 in the buffer. The *************** *** 737,741 **** #endif _rl_output_some_chars (local_prompt, nleft); ! _rl_last_c_pos = nleft; } --- 867,874 ---- #endif _rl_output_some_chars (local_prompt, nleft); ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_last_c_pos = _rl_col_width(local_prompt, 0, nleft); ! else ! _rl_last_c_pos = nleft; } *************** *** 753,760 **** { _rl_backspace (_rl_last_c_pos - nleft); ! _rl_last_c_pos = nleft; } ! if (nleft != _rl_last_c_pos) _rl_move_cursor_relative (nleft, &invisible_line[pos]); } --- 886,898 ---- { _rl_backspace (_rl_last_c_pos - nleft); ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_last_c_pos = _rl_col_width (&visible_line[pos], 0, nleft); ! else ! _rl_last_c_pos = nleft; } ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_move_cursor_relative (nleft, &invisible_line[pos]); ! else if (nleft != _rl_last_c_pos) _rl_move_cursor_relative (nleft, &invisible_line[pos]); } *************** *** 901,904 **** --- 1039,1047 ---- int temp, lendiff, wsatend, od, nd; int current_invis_chars; + int col_lendiff, col_temp; + #if defined (HANDLE_MULTIBYTE) + mbstate_t ps_new, ps_old; + int new_offset, old_offset, tmp; + #endif /* If we're at the right edge of a terminal that supports xn, we're *************** *** 909,925 **** temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode ! && _rl_last_v_pos == current_line - 1) { ! if (new[0]) ! putc (new[0], rl_outstream); else ! putc (' ', rl_outstream); ! _rl_last_c_pos = 1; /* XXX */ ! _rl_last_v_pos++; ! if (old[0] && new[0]) ! old[0] = new[0]; } /* Find first difference. */ for (ofd = old, nfd = new; (ofd - old < omax) && *ofd && (*ofd == *nfd); --- 1052,1146 ---- temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode ! && _rl_last_v_pos == current_line - 1) { ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! wchar_t wc; ! mbstate_t ps; ! int tempwidth, bytes; ! size_t ret; ! ! /* This fixes only double-column characters, but if the wrapped ! character comsumes more than three columns, spaces will be ! inserted in the string buffer. */ ! if (_rl_wrapped_line[current_line] > 0) ! _rl_clear_to_eol (_rl_wrapped_line[current_line]); ! ! memset (&ps, 0, sizeof (mbstate_t)); ! ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps); ! if (ret == (size_t)-1 || ret == (size_t)-2) ! { ! tempwidth = 1; ! ret = 1; ! } ! else if (ret == 0) ! tempwidth = 0; ! else ! tempwidth = wcwidth (wc); ! ! if (tempwidth > 0) ! { ! int count; ! bytes = ret; ! for (count = 0; count < bytes; count++) ! putc (new[count], rl_outstream); ! _rl_last_c_pos = tempwidth; ! _rl_last_v_pos++; ! memset (&ps, 0, sizeof (mbstate_t)); ! ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps); ! if (ret != 0 && bytes != 0) ! { ! if (ret == (size_t)-1 || ret == (size_t)-2) ! memmove (old+bytes, old+1, strlen (old+1)); ! else ! memmove (old+bytes, old+ret, strlen (old+ret)); ! memcpy (old, new, bytes); ! } ! } ! else ! { ! putc (' ', rl_outstream); ! _rl_last_c_pos = 1; ! _rl_last_v_pos++; ! if (old[0] && new[0]) ! old[0] = new[0]; ! } ! } else ! #endif ! { ! if (new[0]) ! putc (new[0], rl_outstream); ! else ! putc (' ', rl_outstream); ! _rl_last_c_pos = 1; /* XXX */ ! _rl_last_v_pos++; ! if (old[0] && new[0]) ! old[0] = new[0]; ! } } + /* Find first difference. */ + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + memset (&ps_new, 0, sizeof(mbstate_t)); + memset (&ps_old, 0, sizeof(mbstate_t)); + + new_offset = old_offset = 0; + for (ofd = old, nfd = new; + (ofd - old < omax) && *ofd && + _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); ) + { + old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY); + new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY); + ofd = old + old_offset; + nfd = new + new_offset; + } + } + else + #endif for (ofd = old, nfd = new; (ofd - old < omax) && *ofd && (*ofd == *nfd); *************** *** 938,941 **** --- 1159,1189 ---- wsatend = 1; /* flag for trailing whitespace */ + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY); + nls = new + _rl_find_prev_mbchar (new, ne - new, MB_FIND_ANY); + while ((ols > ofd) && (nls > nfd)) + { + memset (&ps_old, 0, sizeof (mbstate_t)); + memset (&ps_new, 0, sizeof (mbstate_t)); + + _rl_adjust_point (old, ols - old, &ps_old); + _rl_adjust_point (new, nls - new, &ps_new); + + if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0) + break; + + if (*ols == ' ') + wsatend = 0; + + ols = old + _rl_find_prev_mbchar (old, ols - old, MB_FIND_ANY); + nls = new + _rl_find_prev_mbchar (new, nls - new, MB_FIND_ANY); + } + } + else + { + #endif /* HANDLE_MULTIBYTE */ ols = oe - 1; /* find last same */ nls = ne - 1; *************** *** 947,950 **** --- 1195,1201 ---- nls--; } + #if defined (HANDLE_MULTIBYTE) + } + #endif if (wsatend) *************** *** 953,962 **** nls = ne; } else if (*ols != *nls) { if (*ols) /* don't step past the NUL */ ! ols++; if (*nls) ! nls++; } --- 1204,1230 ---- nls = ne; } + #if defined (HANDLE_MULTIBYTE) + /* This may not work for stateful encoding, but who cares? To handle + stateful encoding properly, we have to scan each string from the + beginning and compare. */ + else if (_rl_compare_chars (ols, 0, NULL, nls, 0, NULL) == 0) + #else else if (*ols != *nls) + #endif { if (*ols) /* don't step past the NUL */ ! { ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! ols = old + _rl_find_next_mbchar (old, ols - old, 1, MB_FIND_ANY); ! else ! ols++; ! } if (*nls) ! { ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! nls = new + _rl_find_next_mbchar (new, nls - new, 1, MB_FIND_ANY); ! else ! nls++; ! } } *************** *** 994,1004 **** #endif _rl_output_some_chars (local_prompt, lendiff); ! _rl_last_c_pos = lendiff; } _rl_move_cursor_relative (od, old); ! /* if (len (new) > len (old)) */ lendiff = (nls - nfd) - (ols - ofd); /* If we are changing the number of invisible characters in a line, and --- 1262,1282 ---- #endif _rl_output_some_chars (local_prompt, lendiff); ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff); ! else ! _rl_last_c_pos = lendiff; } _rl_move_cursor_relative (od, old); ! /* if (len (new) > len (old)) ! lendiff == difference in buffer ! col_lendiff == difference on screen ! When not using multibyte characters, these are equal */ lendiff = (nls - nfd) - (ols - ofd); + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + col_lendiff = _rl_col_width (new, nfd - new, nls - new) - _rl_col_width (old, ofd - old, ols - old); + else + col_lendiff = lendiff; /* If we are changing the number of invisible characters in a line, and *************** *** 1007,1015 **** if (current_line == 0 && !_rl_horizontal_scroll_mode && current_invis_chars != visible_wrap_offset) ! lendiff += visible_wrap_offset - current_invis_chars; /* Insert (diff (len (old), len (new)) ch. */ temp = ne - nfd; ! if (lendiff > 0) { /* Non-zero if we're increasing the number of lines. */ --- 1285,1309 ---- if (current_line == 0 && !_rl_horizontal_scroll_mode && current_invis_chars != visible_wrap_offset) ! { ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! lendiff += visible_wrap_offset - current_invis_chars; ! col_lendiff += visible_wrap_offset - current_invis_chars; ! } ! else ! { ! lendiff += visible_wrap_offset - current_invis_chars; ! col_lendiff = lendiff; ! } ! } /* Insert (diff (len (old), len (new)) ch. */ temp = ne - nfd; ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! col_temp = _rl_col_width (new, nfd - new, ne - new); ! else ! col_temp = temp; ! ! if (col_lendiff > 0) /* XXX - was lendiff */ { /* Non-zero if we're increasing the number of lines. */ *************** *** 1019,1023 **** of lines, make sure we actually cause the new line to wrap around on auto-wrapping terminals. */ ! if (_rl_terminal_can_insert && ((2 * temp) >= lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl)) { /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and --- 1313,1317 ---- of lines, make sure we actually cause the new line to wrap around on auto-wrapping terminals. */ ! if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl)) { /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and *************** *** 1028,1033 **** lendiff <= prompt_visible_length || !current_invis_chars)) { ! insert_some_chars (nfd, lendiff); ! _rl_last_c_pos += lendiff; } else if (*ols == 0) --- 1322,1327 ---- lendiff <= prompt_visible_length || !current_invis_chars)) { ! insert_some_chars (nfd, lendiff, col_lendiff); ! _rl_last_c_pos += col_lendiff; } else if (*ols == 0) *************** *** 1038,1042 **** assumes you've done the insert because you can. */ _rl_output_some_chars (nfd, lendiff); ! _rl_last_c_pos += lendiff; } else --- 1332,1336 ---- assumes you've done the insert because you can. */ _rl_output_some_chars (nfd, lendiff); ! _rl_last_c_pos += col_lendiff; } else *************** *** 1046,1050 **** is a dumb update. */ _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += temp; return; } --- 1340,1344 ---- is a dumb update. */ _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += col_temp; return; } *************** *** 1054,1058 **** { _rl_output_some_chars (nfd + lendiff, temp - lendiff); ! _rl_last_c_pos += temp - lendiff; } } --- 1348,1356 ---- { _rl_output_some_chars (nfd + lendiff, temp - lendiff); ! #if 0 ! _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-lendiff) - col_lendiff; ! #else ! _rl_last_c_pos += _rl_col_width (nfd+lendiff, 0, temp-col_lendiff); ! #endif } } *************** *** 1061,1065 **** /* cannot insert chars, write to EOL */ _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += temp; } } --- 1359,1363 ---- /* cannot insert chars, write to EOL */ _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += col_temp; } } *************** *** 1067,1071 **** { /* If possible and inexpensive to use terminal deletion, then do so. */ ! if (_rl_term_dc && (2 * temp) >= -lendiff) { /* If all we're doing is erasing the invisible characters in the --- 1365,1369 ---- { /* If possible and inexpensive to use terminal deletion, then do so. */ ! if (_rl_term_dc && (2 * col_temp) >= -col_lendiff) { /* If all we're doing is erasing the invisible characters in the *************** *** 1074,1081 **** if (_rl_horizontal_scroll_mode && _rl_last_c_pos == 0 && -lendiff == visible_wrap_offset) ! lendiff = 0; ! if (lendiff) ! delete_chars (-lendiff); /* delete (diff) characters */ /* Copy (new) chars to screen from first diff to last match */ --- 1372,1379 ---- if (_rl_horizontal_scroll_mode && _rl_last_c_pos == 0 && -lendiff == visible_wrap_offset) ! col_lendiff = 0; ! if (col_lendiff) ! delete_chars (-col_lendiff); /* delete (diff) characters */ /* Copy (new) chars to screen from first diff to last match */ *************** *** 1084,1088 **** { _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += temp; } } --- 1382,1386 ---- { _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += _rl_col_width (nfd, 0, temp);; } } *************** *** 1093,1105 **** { _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += temp; } lendiff = (oe - old) - (ne - new); ! if (lendiff) { if (_rl_term_autowrap && current_line < inv_botlin) ! space_to_eol (lendiff); else ! _rl_clear_to_eol (lendiff); } } --- 1391,1408 ---- { _rl_output_some_chars (nfd, temp); ! _rl_last_c_pos += col_temp; } lendiff = (oe - old) - (ne - new); ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! col_lendiff = _rl_col_width (old, 0, oe - old) - _rl_col_width (new, 0, ne - new); ! else ! col_lendiff = lendiff; ! ! if (col_lendiff) { if (_rl_term_autowrap && current_line < inv_botlin) ! space_to_eol (col_lendiff); else ! _rl_clear_to_eol (col_lendiff); } } *************** *** 1147,1151 **** l = strlen (prompt_last_line); ! _rl_last_c_pos = l; /* Dissect prompt_last_line into screen lines. Note that here we have --- 1450,1457 ---- l = strlen (prompt_last_line); ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l); ! else ! _rl_last_c_pos = l; /* Dissect prompt_last_line into screen lines. Note that here we have *************** *** 1202,1206 **** --- 1508,1519 ---- /* If we don't have to do anything, then return. */ + #if defined (HANDLE_MULTIBYTE) + /* If we have multibyte characters, NEW is indexed by the buffer point in + a multibyte string, but _rl_last_c_pos is the display position. In + this case, NEW's display position is not obvious. */ + if ((MB_CUR_MAX == 1 || rl_byte_oriented ) && _rl_last_c_pos == new) return; + #else if (_rl_last_c_pos == new) return; + #endif /* It may be faster to output a CR, and then move forwards instead *************** *** 1232,1248 **** #if defined (HACK_TERMCAP_MOTION) if (_rl_term_forward_char) for (i = _rl_last_c_pos; i < new; i++) ! tputs (_rl_term_forward_char, 1, _rl_output_character_function); else for (i = _rl_last_c_pos; i < new; i++) putc (data[i], rl_outstream); ! #else ! for (i = _rl_last_c_pos; i < new; i++) ! putc (data[i], rl_outstream); ! #endif /* HACK_TERMCAP_MOTION */ } else if (_rl_last_c_pos > new) ! _rl_backspace (_rl_last_c_pos - new); ! _rl_last_c_pos = new; } --- 1545,1611 ---- #if defined (HACK_TERMCAP_MOTION) if (_rl_term_forward_char) + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int width; + width = _rl_col_width (data, _rl_last_c_pos, new); + for (i = 0; i < width; i++) + tputs (_rl_term_forward_char, 1, _rl_output_character_function); + } + else + { + for (i = _rl_last_c_pos; i < new; i++) + tputs (_rl_term_forward_char, 1, _rl_output_character_function); + } + } + else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + tputs (_rl_term_cr, 1, _rl_output_character_function); + for (i = 0; i < new; i++) + putc (data[i], rl_outstream); + } + else for (i = _rl_last_c_pos; i < new; i++) ! putc (data[i], rl_outstream); ! ! #else /* !HACK_TERMCAP_MOTION */ ! ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! tputs (_rl_term_cr, 1, _rl_output_character_function); ! for (i = 0; i < new; i++) ! putc (data[i], rl_outstream); ! } else for (i = _rl_last_c_pos; i < new; i++) putc (data[i], rl_outstream); ! ! #endif /* !HACK_TERMCAP_MOTION */ ! } + #if defined (HANDLE_MULTIBYTE) + /* NEW points to the buffer point, but _rl_last_c_pos is the display point. + The byte length of the string is probably bigger than the column width + of the string, which means that if NEW == _rl_last_c_pos, then NEW's + display point is less than _rl_last_c_pos. */ + else if (_rl_last_c_pos >= new) + #else else if (_rl_last_c_pos > new) ! #endif ! { ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! tputs (_rl_term_cr, 1, _rl_output_character_function); ! for (i = 0; i < new; i++) ! putc (data[i], rl_outstream); ! } ! else ! _rl_backspace (_rl_last_c_pos - new); ! } ! ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! _rl_last_c_pos = _rl_col_width (data, 0, new); ! else ! _rl_last_c_pos = new; } *************** *** 1515,1529 **** } ! /* Insert COUNT characters from STRING to the output stream. */ static void ! insert_some_chars (string, count) char *string; ! int count; { /* If IC is defined, then we do not have to "enter" insert mode. */ if (_rl_term_IC) { char *buffer; ! buffer = tgoto (_rl_term_IC, 0, count); tputs (buffer, 1, _rl_output_character_function); _rl_output_some_chars (string, count); --- 1878,1898 ---- } ! /* Insert COUNT characters from STRING to the output stream at column COL. */ static void ! insert_some_chars (string, count, col) char *string; ! int count, col; { + /* DEBUGGING */ + if (MB_CUR_MAX == 1 || rl_byte_oriented) + if (count != col) + fprintf(stderr, "readline: debug: insert_some_chars: count (%d) != col (%d)\n", count, col); + /* If IC is defined, then we do not have to "enter" insert mode. */ if (_rl_term_IC) { char *buffer; ! ! buffer = tgoto (_rl_term_IC, 0, col); tputs (buffer, 1, _rl_output_character_function); _rl_output_some_chars (string, count); *************** *** 1541,1545 **** if (_rl_term_ic && *_rl_term_ic) { ! for (i = count; i--; ) tputs (_rl_term_ic, 1, _rl_output_character_function); } --- 1910,1914 ---- if (_rl_term_ic && *_rl_term_ic) { ! for (i = col; i--; ) tputs (_rl_term_ic, 1, _rl_output_character_function); } *************** *** 1596,1604 **** { char *last_line; ! #if 0 ! last_line = &visible_line[inv_lbreaks[_rl_vis_botlin]]; ! #else last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; - #endif _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); _rl_clear_to_eol (0); --- 1965,1970 ---- { char *last_line; ! last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); _rl_clear_to_eol (0); *************** *** 1745,1746 **** --- 2111,2196 ---- return ret; } + + #if defined (HANDLE_MULTIBYTE) + /* Calculate the number of screen columns occupied by STR from START to END. + In the case of multibyte characters with stateful encoding, we have to + scan from the beginning of the string to take the state into account. */ + static int + _rl_col_width (str, start, end) + char *str; + int start, end; + { + wchar_t wc; + mbstate_t ps = {0}; + int tmp, point, width, max; + + if (end <= start) + return 0; + + point = 0; + max = end; + + while (point < start) + { + tmp = mbrlen (str + point, max, &ps); + if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2) + { + /* In this case, the bytes are invalid or too short to compose a + multibyte character, so we assume that the first byte represents + a single character. */ + point++; + max--; + + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (tmp == 0) + break; /* Found '\0' */ + else + { + point += tmp; + max -= tmp; + } + } + + /* If START is not a byte that starts a character, then POINT will be + greater than START. In this case, assume that (POINT - START) gives + a byte count that is the number of columns of difference. */ + width = point - start; + + while (point < end) + { + tmp = mbrtowc (&wc, str + point, max, &ps); + if ((size_t)tmp == (size_t)-1 || (size_t)tmp == (size_t)-2) + { + /* In this case, the bytes are invalid or too short to compose a + multibyte character, so we assume that the first byte represents + a single character. */ + point++; + max--; + + /* and assume that the byte occupies a single column. */ + width++; + + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (tmp == 0) + break; /* Found '\0' */ + else + { + point += tmp; + max -= tmp; + tmp = wcwidth(wc); + width += (tmp >= 0) ? tmp : 1; + } + } + + width += point - end; + + return width; + } + #endif /* HANDLE_MULTIBYTE */ + diff -Nrc2 readline-4.2a/doc/Makefile.in readline-4.3/doc/Makefile.in *** readline-4.2a/doc/Makefile.in Wed May 2 11:20:57 2001 --- readline-4.3/doc/Makefile.in Mon May 20 12:54:51 2002 *************** *** 119,126 **** $(DVIPS) history.dvi readline.html: ${RLSRC} $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html - $(RM) rlman.html rluserman.html: ${RLSRC} --- 119,128 ---- $(DVIPS) history.dvi + # + # This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org + # readline.html: ${RLSRC} $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html rluserman.html: ${RLSRC} *************** *** 152,162 **** clean: $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ ! *.fns *.kys *.tps *.vrs *.bt *.bts *.o core ! distclean: clean $(RM) $(INTERMEDIATE_OBJ) $(RM) Makefile ! mostlyclean: clean maintainer-clean: clean --- 154,169 ---- clean: $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ ! *.fns *.kys *.tps *.vrs *.bt *.bts *.o core *.core ! mostlyclean: clean ! ! distclean: clean maybe-clean $(RM) $(INTERMEDIATE_OBJ) $(RM) Makefile ! maybe-clean: ! -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \ ! $(RM) $(DIST_DOCS); \ ! fi maintainer-clean: clean diff -Nrc2 readline-4.2a/doc/hist.texinfo readline-4.3/doc/hist.texinfo *** readline-4.2a/doc/hist.texinfo Fri Feb 2 11:37:12 2001 --- readline-4.3/doc/hist.texinfo Tue Apr 16 17:11:02 2002 *************** *** 19,23 **** typed input. ! Copyright (C) 1988-2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 19,23 ---- typed input. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 74,78 **** @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-2001 Free Software Foundation, Inc. @end titlepage --- 74,78 ---- @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-2002 Free Software Foundation, Inc. @end titlepage diff -Nrc2 readline-4.2a/doc/history.0 readline-4.3/doc/history.0 *** readline-4.2a/doc/history.0 Mon Apr 16 10:53:07 2001 --- readline-4.3/doc/history.0 Mon Mar 18 10:17:27 2002 *************** *** 9,13 **** CCOOPPYYRRIIGGHHTT ! The GNU History Library is Copyright (C) 1989-2001 by the Free Software Foundation, Inc. --- 9,13 ---- CCOOPPYYRRIIGGHHTT ! The GNU History Library is Copyright (C) 1989-2002 by the Free Software Foundation, Inc. *************** *** 62,66 **** ! GNU History 4.2 2001 Mar 6 1 --- 62,66 ---- ! GNU History 4.3 2002 January 31 1 *************** *** 128,132 **** ! GNU History 4.2 2001 Mar 6 2 --- 128,132 ---- ! GNU History 4.3 2002 January 31 2 *************** *** 194,198 **** ! GNU History 4.2 2001 Mar 6 3 --- 194,198 ---- ! GNU History 4.3 2002 January 31 3 *************** *** 260,264 **** ! GNU History 4.2 2001 Mar 6 4 --- 260,264 ---- ! GNU History 4.3 2002 January 31 4 *************** *** 300,319 **** _i_n_t uunnssttiiffllee__hhiissttoorryy (_v_o_i_d) ! 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. _i_n_t hhiissttoorryy__iiss__ssttiifflleedd (_v_o_i_d) ! Returns non-zero if the history is stifled, zero if it is not. IInnffoorrmmaattiioonn AAbboouutt tthhee HHiissttoorryy LLiisstt ! These functions return information about the entire his- tory list or individual list entries. _H_I_S_T___E_N_T_R_Y _*_* hhiissttoorryy__lliisstt (_v_o_i_d) ! Return a NNUULLLL terminated array of _H_I_S_T___E_N_T_R_Y _* which is ! the current input history. Element 0 of this list is the beginning of time. If there is no history, return NNUULLLL. --- 300,320 ---- _i_n_t uunnssttiiffllee__hhiissttoorryy (_v_o_i_d) ! Stop stifling the history. This returns the previously- ! set maximum number of history entries (as set by ssttii-- ! ffllee__hhiissttoorryy(())). history was stifled. The value is posi- ! tive if the history was stifled, negative if it wasn't. _i_n_t hhiissttoorryy__iiss__ssttiifflleedd (_v_o_i_d) ! Returns non-zero if the history is stifled, zero if it is not. IInnffoorrmmaattiioonn AAbboouutt tthhee HHiissttoorryy LLiisstt ! These functions return information about the entire his- tory list or individual list entries. _H_I_S_T___E_N_T_R_Y _*_* hhiissttoorryy__lliisstt (_v_o_i_d) ! Return a NNUULLLL terminated array of _H_I_S_T___E_N_T_R_Y _* which is ! the current input history. Element 0 of this list is the beginning of time. If there is no history, return NNUULLLL. *************** *** 322,330 **** _H_I_S_T___E_N_T_R_Y _* ccuurrrreenntt__hhiissttoorryy (_v_o_i_d) - Return the history entry at the current position, as ! GNU History 4.2 2001 Mar 6 5 --- 323,330 ---- _H_I_S_T___E_N_T_R_Y _* ccuurrrreenntt__hhiissttoorryy (_v_o_i_d) ! GNU History 4.3 2002 January 31 5 *************** *** 335,339 **** ! determined by wwhheerree__hhiissttoorryy(()). If there is no entry there, return a NNUULLLL pointer. --- 335,340 ---- ! Return the history entry at the current position, as ! determined by wwhheerree__hhiissttoorryy(()). If there is no entry there, return a NNUULLLL pointer. *************** *** 344,359 **** _i_n_t hhiissttoorryy__ttoottaall__bbyytteess (_v_o_i_d) ! 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. MMoovviinngg AArroouunndd tthhee HHiissttoorryy LLiisstt ! These functions allow the current index into the history list to be set or changed. _i_n_t hhiissttoorryy__sseett__ppooss (_i_n_t _p_o_s) ! Set the current history offset to _p_o_s, an absolute index ! into the list. Returns 1 on success, 0 if _p_o_s is less than zero or greater than the number of history entries. --- 345,360 ---- _i_n_t hhiissttoorryy__ttoottaall__bbyytteess (_v_o_i_d) ! 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. MMoovviinngg AArroouunndd tthhee HHiissttoorryy LLiisstt ! These functions allow the current index into the history list to be set or changed. _i_n_t hhiissttoorryy__sseett__ppooss (_i_n_t _p_o_s) ! Set the current history offset to _p_o_s, an absolute index ! into the list. Returns 1 on success, 0 if _p_o_s is less than zero or greater than the number of history entries. *************** *** 364,396 **** _H_I_S_T___E_N_T_R_Y _* nneexxtt__hhiissttoorryy (_v_o_i_d) ! Move the current history offset forward to the next his- ! tory entry, and return the a pointer to that entry. If there is no next entry, return a NNUULLLL pointer. SSeeaarrcchhiinngg tthhee HHiissttoorryy LLiisstt ! 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 his- ! tory position. The search may be _a_n_c_h_o_r_e_d, meaning that ! the string must match at the beginning of the history entry. _i_n_t hhiissttoorryy__sseeaarrcchh (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _d_i_r_e_c_t_i_o_n) ! Search the history for _s_t_r_i_n_g, starting at the current ! history offset. If _d_i_r_e_c_t_i_o_n is less than 0, then the search is through previous entries, otherwise through sub- ! sequent entries. If _s_t_r_i_n_g is found, then the current ! history index is set to that history entry, and the value ! returned is the offset in the line of the entry where _s_t_r_i_n_g was found. Otherwise, nothing is changed, and a -1 is returned. ! _i_n_t hhiissttoorryy__sseeaarrcchh__pprreeffiixx (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t ! _d_i_r_e_c_t_i_o_n) ! GNU History 4.2 2001 Mar 6 6 --- 365,396 ---- _H_I_S_T___E_N_T_R_Y _* nneexxtt__hhiissttoorryy (_v_o_i_d) ! Move the current history offset forward to the next his- ! tory entry, and return the a pointer to that entry. If there is no next entry, return a NNUULLLL pointer. SSeeaarrcchhiinngg tthhee HHiissttoorryy LLiisstt ! 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 his- ! tory position. The search may be _a_n_c_h_o_r_e_d, meaning that ! the string must match at the beginning of the history entry. _i_n_t hhiissttoorryy__sseeaarrcchh (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _d_i_r_e_c_t_i_o_n) ! Search the history for _s_t_r_i_n_g, starting at the current ! history offset. If _d_i_r_e_c_t_i_o_n is less than 0, then the search is through previous entries, otherwise through sub- ! sequent entries. If _s_t_r_i_n_g is found, then the current ! history index is set to that history entry, and the value ! returned is the offset in the line of the entry where _s_t_r_i_n_g was found. Otherwise, nothing is changed, and a -1 is returned. ! _i_n_t hhiissttoorryy__sseeaarrcchh__pprreeffiixx (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t ! GNU History 4.3 2002 January 31 6 *************** *** 401,410 **** ! Search the history for _s_t_r_i_n_g, starting at the current ! history offset. The search is anchored: matching lines must begin with _s_t_r_i_n_g. If _d_i_r_e_c_t_i_o_n is less than 0, then ! the search is through previous entries, otherwise through ! subsequent entries. If _s_t_r_i_n_g is found, then the current ! history index is set to that entry, and the return value is 0. Otherwise, nothing is changed, and a -1 is returned. --- 401,411 ---- ! _d_i_r_e_c_t_i_o_n) ! Search the history for _s_t_r_i_n_g, starting at the current ! history offset. The search is anchored: matching lines must begin with _s_t_r_i_n_g. If _d_i_r_e_c_t_i_o_n is less than 0, then ! the search is through previous entries, otherwise through ! subsequent entries. If _s_t_r_i_n_g is found, then the current ! history index is set to that entry, and the return value is 0. Otherwise, nothing is changed, and a -1 is returned. *************** *** 413,419 **** _i_n_t _p_o_s) Search for _s_t_r_i_n_g in the history list, starting at _p_o_s, an ! absolute index into the list. If _d_i_r_e_c_t_i_o_n is negative, ! the search proceeds backward from _p_o_s, otherwise forward. ! Returns the absolute index of the history element where _s_t_r_i_n_g was found, or -1 otherwise. --- 414,420 ---- _i_n_t _p_o_s) Search for _s_t_r_i_n_g in the history list, starting at _p_o_s, an ! absolute index into the list. If _d_i_r_e_c_t_i_o_n is negative, ! the search proceeds backward from _p_o_s, otherwise forward. ! Returns the absolute index of the history element where _s_t_r_i_n_g was found, or -1 otherwise. *************** *** 421,445 **** MMaannaaggiinngg tthhee HHiissttoorryy FFiillee The History library can read the history from and write it ! to a file. This section documents the functions for man- aging a history file. _i_n_t rreeaadd__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e) ! Add the contents of _f_i_l_e_n_a_m_e to the history list, a line ! at a time. If _f_i_l_e_n_a_m_e is NNUULLLL, then read from _~_/_._h_i_s_- _t_o_r_y. Returns 0 if successful, or eerrrrnnoo if not. ! _i_n_t rreeaadd__hhiissttoorryy__rraannggee (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e_, _i_n_t _f_r_o_m_, _i_n_t _t_o) ! Read a range of lines from _f_i_l_e_n_a_m_e, adding them to the ! history list. Start reading at line _f_r_o_m and end at _t_o. ! If _f_r_o_m is zero, start at the beginning. If _t_o is less ! than _f_r_o_m, then read until the end of the file. If _f_i_l_e_- ! _n_a_m_e is NNUULLLL, then read from _~_/_._h_i_s_t_o_r_y. Returns 0 if successful, or eerrrrnnoo if not. _i_n_t wwrriittee__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e) ! Write the current history to _f_i_l_e_n_a_m_e, overwriting _f_i_l_e_- ! _n_a_m_e if necessary. If _f_i_l_e_n_a_m_e is NNUULLLL, then write the ! history list to _~_/_._h_i_s_t_o_r_y. Returns 0 on success, or eerrrrnnoo on a read or write error. --- 422,446 ---- MMaannaaggiinngg tthhee HHiissttoorryy FFiillee The History library can read the history from and write it ! to a file. This section documents the functions for man- aging a history file. _i_n_t rreeaadd__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e) ! Add the contents of _f_i_l_e_n_a_m_e to the history list, a line ! at a time. If _f_i_l_e_n_a_m_e is NNUULLLL, then read from _~_/_._h_i_s_- _t_o_r_y. Returns 0 if successful, or eerrrrnnoo if not. ! _i_n_t rreeaadd__hhiissttoorryy__rraannggee (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e_, _i_n_t _f_r_o_m_, _i_n_t _t_o) ! Read a range of lines from _f_i_l_e_n_a_m_e, adding them to the ! history list. Start reading at line _f_r_o_m and end at _t_o. ! If _f_r_o_m is zero, start at the beginning. If _t_o is less ! than _f_r_o_m, then read until the end of the file. If _f_i_l_e_- ! _n_a_m_e is NNUULLLL, then read from _~_/_._h_i_s_t_o_r_y. Returns 0 if successful, or eerrrrnnoo if not. _i_n_t wwrriittee__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e) ! Write the current history to _f_i_l_e_n_a_m_e, overwriting _f_i_l_e_- ! _n_a_m_e if necessary. If _f_i_l_e_n_a_m_e is NNUULLLL, then write the ! history list to _~_/_._h_i_s_t_o_r_y. Returns 0 on success, or eerrrrnnoo on a read or write error. *************** *** 450,462 **** on success, or eerrrrnnoo on a read or write error. ! _i_n_t hhiissttoorryy__ttrruunnccaattee__ffiillee (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e_, _i_n_t _n_l_i_n_e_s) ! Truncate the history file _f_i_l_e_n_a_m_e, leaving only the last ! _n_l_i_n_e_s lines. If _f_i_l_e_n_a_m_e is NNUULLLL, then _~_/_._h_i_s_t_o_r_y is ! truncated. Returns 0 on success, or eerrrrnnoo on failure. ! GNU History 4.2 2001 Mar 6 7 --- 451,462 ---- on success, or eerrrrnnoo on a read or write error. ! _i_n_t hhiissttoorryy__ttrruunnccaattee__ffiillee (_c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e_, _i_n_t _n_l_i_n_e_s) ! Truncate the history file _f_i_l_e_n_a_m_e, leaving only the last ! _n_l_i_n_e_s lines. If _f_i_l_e_n_a_m_e is NNUULLLL, then _~_/_._h_i_s_t_o_r_y is ! GNU History 4.3 2002 January 31 7 *************** *** 467,512 **** HHiissttoorryy EExxppaannssiioonn These functions implement history expansion. _i_n_t hhiissttoorryy__eexxppaanndd (_c_h_a_r _*_s_t_r_i_n_g_, _c_h_a_r _*_*_o_u_t_p_u_t) ! Expand _s_t_r_i_n_g, placing the result into _o_u_t_p_u_t, a pointer to a string. 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 ::pp modifier. ! If an error ocurred in expansion, then _o_u_t_p_u_t contains a descriptive error message. _c_h_a_r _* ggeett__hhiissttoorryy__eevveenntt (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _*_c_i_n_d_e_x_, _i_n_t _q_c_h_a_r) ! Returns the text of the history event beginning at _s_t_r_i_n_g ! + _*_c_i_n_d_e_x. _*_c_i_n_d_e_x is modified to point to after the ! event specifier. At function entry, _c_i_n_d_e_x points to the ! index into _s_t_r_i_n_g where the history event specification ! begins. _q_c_h_a_r is a character that is allowed to end the ! event specification in addition to the ``normal'' termi- nating characters. _c_h_a_r _*_* hhiissttoorryy__ttookkeenniizzee (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g) ! Return an array of tokens parsed out of _s_t_r_i_n_g, much as ! the shell might. The tokens are split on the characters in the hhiissttoorryy__wwoorrdd__ddeelliimmiitteerrss variable, and shell quoting conventions are obeyed. ! _c_h_a_r _* hhiissttoorryy__aarrgg__eexxttrraacctt (_i_n_t _f_i_r_s_t_, _i_n_t _l_a_s_t_, _c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g) ! Extract a string segment consisting of the _f_i_r_s_t through ! _l_a_s_t arguments present in _s_t_r_i_n_g. Arguments are split using hhiissttoorryy__ttookkeenniizzee(()). HHiissttoorryy VVaarriiaabblleess ! This section describes the externally-visible variables exported by the GNU History Library. --- 467,515 ---- + truncated. Returns 0 on success, or eerrrrnnoo on failure. + + HHiissttoorryy EExxppaannssiioonn These functions implement history expansion. _i_n_t hhiissttoorryy__eexxppaanndd (_c_h_a_r _*_s_t_r_i_n_g_, _c_h_a_r _*_*_o_u_t_p_u_t) ! Expand _s_t_r_i_n_g, placing the result into _o_u_t_p_u_t, a pointer to a string. 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 ::pp modifier. ! If an error ocurred in expansion, then _o_u_t_p_u_t contains a descriptive error message. _c_h_a_r _* ggeett__hhiissttoorryy__eevveenntt (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g_, _i_n_t _*_c_i_n_d_e_x_, _i_n_t _q_c_h_a_r) ! Returns the text of the history event beginning at _s_t_r_i_n_g ! + _*_c_i_n_d_e_x. _*_c_i_n_d_e_x is modified to point to after the ! event specifier. At function entry, _c_i_n_d_e_x points to the ! index into _s_t_r_i_n_g where the history event specification ! begins. _q_c_h_a_r is a character that is allowed to end the ! event specification in addition to the ``normal'' termi- nating characters. _c_h_a_r _*_* hhiissttoorryy__ttookkeenniizzee (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g) ! Return an array of tokens parsed out of _s_t_r_i_n_g, much as ! the shell might. The tokens are split on the characters in the hhiissttoorryy__wwoorrdd__ddeelliimmiitteerrss variable, and shell quoting conventions are obeyed. ! _c_h_a_r _* hhiissttoorryy__aarrgg__eexxttrraacctt (_i_n_t _f_i_r_s_t_, _i_n_t _l_a_s_t_, _c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g) ! Extract a string segment consisting of the _f_i_r_s_t through ! _l_a_s_t arguments present in _s_t_r_i_n_g. Arguments are split using hhiissttoorryy__ttookkeenniizzee(()). HHiissttoorryy VVaarriiaabblleess ! This section describes the externally-visible variables exported by the GNU History Library. *************** *** 515,528 **** _i_n_t hhiissttoorryy__lleennggtthh ! The number of entries currently stored in the history list. - _i_n_t hhiissttoorryy__mmaaxx__eennttrriieess - The maximum number of history entries. This must be - changed using ssttiiffllee__hhiissttoorryy(()). ! GNU History 4.2 2001 Mar 6 8 --- 518,528 ---- _i_n_t hhiissttoorryy__lleennggtthh ! The number of entries currently stored in the history list. ! GNU History 4.3 2002 January 31 8 *************** *** 533,550 **** _c_h_a_r hhiissttoorryy__eexxppaannssiioonn__cchhaarr The character that introduces a history event. The ! default is !!. Setting this to 0 inhibits history expan- sion. _c_h_a_r hhiissttoorryy__ssuubbsstt__cchhaarr ! The character that invokes word substitution if found at the start of a line. The default is ^^. _c_h_a_r hhiissttoorryy__ccoommmmeenntt__cchhaarr ! 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 his- ! tory expansion for the remainder of the line. This is disabled by default. --- 533,554 ---- + _i_n_t hhiissttoorryy__mmaaxx__eennttrriieess + The maximum number of history entries. This must be + changed using ssttiiffllee__hhiissttoorryy(()). + _c_h_a_r hhiissttoorryy__eexxppaannssiioonn__cchhaarr The character that introduces a history event. The ! default is !!. Setting this to 0 inhibits history expan- sion. _c_h_a_r hhiissttoorryy__ssuubbsstt__cchhaarr ! The character that invokes word substitution if found at the start of a line. The default is ^^. _c_h_a_r hhiissttoorryy__ccoommmmeenntt__cchhaarr ! 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 his- ! tory expansion for the remainder of the line. This is disabled by default. *************** *** 554,578 **** _c_h_a_r _* hhiissttoorryy__nnoo__eexxppaanndd__cchhaarrss ! The list of characters which inhibit history expansion if ! found immediately following hhiissttoorryy__eexxppaannssiioonn__cchhaarr. The default is space, tab, newline, \\rr, and ==. _c_h_a_r _* hhiissttoorryy__sseeaarrcchh__ddeelliimmiitteerr__cchhaarrss The list of additional characters which can delimit a his- ! tory search string, in addition to space, tab, _: and _? in the case of a substring search. The default is empty. _i_n_t hhiissttoorryy__qquuootteess__iinnhhiibbiitt__eexxppaannssiioonn ! If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0. _r_l___l_i_n_e_b_u_f___f_u_n_c___t _* hhiissttoorryy__iinnhhiibbiitt__eexxppaannssiioonn__ffuunnccttiioonn This should be set to the address of a function that takes ! two arguments: a cchhaarr ** (_s_t_r_i_n_g) and an iinntt index into that string (_i). It should return a non-zero value if the history expansion starting at _s_t_r_i_n_g_[_i_] should not be per- ! formed; zero if the expansion should be done. It is ! intended for use by applications like bbaasshh that use the ! history expansion character for additional purposes. By default, this variable is set to NNUULLLL. --- 558,582 ---- _c_h_a_r _* hhiissttoorryy__nnoo__eexxppaanndd__cchhaarrss ! The list of characters which inhibit history expansion if ! found immediately following hhiissttoorryy__eexxppaannssiioonn__cchhaarr. The default is space, tab, newline, \\rr, and ==. _c_h_a_r _* hhiissttoorryy__sseeaarrcchh__ddeelliimmiitteerr__cchhaarrss The list of additional characters which can delimit a his- ! tory search string, in addition to space, tab, _: and _? in the case of a substring search. The default is empty. _i_n_t hhiissttoorryy__qquuootteess__iinnhhiibbiitt__eexxppaannssiioonn ! If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0. _r_l___l_i_n_e_b_u_f___f_u_n_c___t _* hhiissttoorryy__iinnhhiibbiitt__eexxppaannssiioonn__ffuunnccttiioonn This should be set to the address of a function that takes ! two arguments: a cchhaarr ** (_s_t_r_i_n_g) and an iinntt index into that string (_i). It should return a non-zero value if the history expansion starting at _s_t_r_i_n_g_[_i_] should not be per- ! formed; zero if the expansion should be done. It is ! intended for use by applications like bbaasshh that use the ! history expansion character for additional purposes. By default, this variable is set to NNUULLLL. *************** *** 582,594 **** tory - SSEEEE AALLSSOO - _T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey - _T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey - _b_a_s_h(1) ! GNU History 4.2 2001 Mar 6 9 --- 586,594 ---- tory ! GNU History 4.3 2002 January 31 9 *************** *** 599,602 **** --- 599,606 ---- + SSEEEE AALLSSOO + _T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey + _T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey + _b_a_s_h(1) _r_e_a_d_l_i_n_e(3) *************** *** 609,625 **** BBUUGG RREEPPOORRTTSS ! If you find a bug in the hhiissttoorryy library, 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 hhiissttoorryy 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. --- 613,629 ---- BBUUGG RREEPPOORRTTSS ! If you find a bug in the hhiissttoorryy library, 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 hhiissttoorryy 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. *************** *** 652,660 **** ! ! ! ! ! GNU History 4.2 2001 Mar 6 10 --- 656,660 ---- ! GNU History 4.3 2002 January 31 10 diff -Nrc2 readline-4.2a/doc/history.3 readline-4.3/doc/history.3 *** readline-4.2a/doc/history.3 Mon Mar 12 05:38:09 2001 --- readline-4.3/doc/history.3 Thu Jan 31 16:11:05 2002 *************** *** 7,13 **** .\" chet@ins.CWRU.Edu .\" ! .\" Last Change: Tue Mar 6 12:50:54 EST 2001 .\" ! .TH HISTORY 3 "2001 Mar 6" "GNU History 4.2" .\" .\" File Name macro. This used to be `.PN', for Path Name, --- 7,13 ---- .\" chet@ins.CWRU.Edu .\" ! .\" Last Change: Thu Jan 31 16:08:07 EST 2002 .\" ! .TH HISTORY 3 "2002 January 31" "GNU History 4.3" .\" .\" File Name macro. This used to be `.PN', for Path Name, *************** *** 41,46 **** history \- GNU History Library .SH COPYRIGHT ! .if t The GNU History Library is Copyright \(co 1989-2001 by the Free Software Foundation, Inc. ! .if n The GNU History Library is Copyright (C) 1989-2001 by the Free Software Foundation, Inc. .SH DESCRIPTION Many programs read input from the user a line at a time. The GNU --- 41,46 ---- history \- GNU History Library .SH COPYRIGHT ! .if t The GNU History Library is Copyright \(co 1989-2002 by the Free Software Foundation, Inc. ! .if n The GNU History Library is Copyright (C) 1989-2002 by the Free Software Foundation, Inc. .SH DESCRIPTION Many programs read input from the user a line at a time. The GNU *************** *** 363,367 **** .Fn1 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. --- 363,368 ---- .Fn1 int unstifle_history "void" ! Stop stifling the history. This returns the previously-set ! maximum number of history entries (as set by \fBstifle_history()\fP). history was stifled. The value is positive if the history was stifled, negative if it wasn't. Binary files readline-4.2a/doc/history.dvi and readline-4.3/doc/history.dvi differ diff -Nrc2 readline-4.2a/doc/history.html readline-4.3/doc/history.html *** readline-4.2a/doc/history.html Tue Oct 9 15:08:11 2001 --- readline-4.3/doc/history.html Thu Jun 27 13:54:41 2002 *************** *** 1,5 **** !
!
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.

--- 1166,1217 ----

!
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.

*************** *** 1222,1228 ****

!
accept-line (Newline or Return) !
Accept the line regardless of where the cursor is. If this line is --- 1239,1245 ----
!
accept-line (Newline or Return) !
Accept the line regardless of where the cursor is. If this line is *************** *** 1233,1278 ****

!

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 --- 1250,1295 ----

!

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 *************** *** 1280,1286 ****

!

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 --- 1297,1303 ----

!

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 *************** *** 1288,1294 ****

!

history-search-forward () !
Search forward through the history for the string of characters between the start of the current line and the point. --- 1305,1311 ----

!

history-search-forward () !
Search forward through the history for the string of characters between the start of the current line and the point. *************** *** 1297,1303 ****

!

history-search-backward () !
Search backward through the history for the string of characters between the start of the current line and the point. This --- 1314,1320 ----

!

history-search-backward () !
Search backward through the history for the string of characters between the start of the current line and the point. This *************** *** 1305,1311 ****

!

yank-nth-arg (M-C-y) !
Insert the first argument to the previous command (usually the second word on the previous line) at point. --- 1322,1328 ----

!

yank-nth-arg (M-C-y) !
Insert the first argument to the previous command (usually the second word on the previous line) at point. *************** *** 1316,1322 ****

!

yank-last-arg (M-. or M-_) !
Insert last argument to the previous command (the last word of the previous history entry). With an --- 1333,1339 ----

!

yank-last-arg (M-. or M-_) !
Insert last argument to the previous command (the last word of the previous history entry). With an *************** *** 1348,1354 ****
!
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 --- 1365,1371 ----
!
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 *************** *** 1357,1370 ****

!

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 --- 1374,1387 ----

!

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 *************** *** 1372,1397 ****

!

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 --- 1389,1414 ----

!

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 *************** *** 1402,1408 ****

!

transpose-words (M-t) !
Drag the word before point past the word after point, moving point past that word as well. --- 1419,1425 ----

!

transpose-words (M-t) !
Drag the word before point past the word after point, moving point past that word as well. *************** *** 1411,1435 ****

!

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.

--- 1428,1471 ----

!

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.

+ +

overwrite-mode () +
+ Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + emacs mode; vi mode does overwrite differently. + Each call to readline() starts in insert mode. +

+ + In overwrite mode, characters bound to self-insert replace + the text at point rather than pushing the text to the right. + Characters bound to backward-delete-char replace the character + before point with a space. +

+ + By default, this command is unbound. +

+

*************** *** 1455,1486 ****

!
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. --- 1491,1522 ----
!
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. *************** *** 1488,1528 ****

!

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. --- 1524,1564 ----

!

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. *************** *** 1530,1536 ****

!

copy-forward-word () !
Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. --- 1566,1572 ----

!

copy-forward-word () !
Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. *************** *** 1538,1550 ****

!

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. --- 1574,1586 ----

!

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. *************** *** 1570,1583 ****
!
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 --- 1606,1619 ----
!
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 *************** *** 1614,1620 ****
!
complete (TAB) !
Attempt to perform completion on the text before point. The actual completion performed is application-specific. --- 1650,1656 ----
!
complete (TAB) !
Attempt to perform completion on the text before point. The actual completion performed is application-specific. *************** *** 1622,1641 ****

!

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. --- 1658,1677 ----

!

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. *************** *** 1652,1658 ****

!

delete-char-or-list () !
Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). --- 1688,1694 ----

!

delete-char-or-list () !
Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). *************** *** 1683,1702 ****
!
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. --- 1719,1738 ----
!
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. *************** *** 1724,1737 ****
!
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 --- 1760,1773 ----
!
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 *************** *** 1739,1752 ****

!

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 --- 1775,1788 ----

!

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 *************** *** 1754,1800 ****

!

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 --- 1790,1836 ----

!

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 *************** *** 1802,1816 ****

!

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, --- 1838,1857 ----

!

insert-comment (M-#) !
! Without a numeric argument, the value of the comment-begin ! variable is inserted at the beginning of the current line. ! If a numeric argument is supplied, this command acts as a toggle: if ! the characters at the beginning of the line do not match the value ! of comment-begin, the value is inserted, otherwise ! the characters in comment-begin are deleted from the beginning of ! the line. ! In either case, 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, *************** *** 1819,1825 ****

!

dump-variables () !
Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, --- 1860,1866 ----

!

dump-variables () !
Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, *************** *** 1828,1834 ****

!

dump-macros () !
Print all of the Readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, --- 1869,1875 ----

!

dump-macros () !
Print all of the Readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, *************** *** 1837,1840 **** --- 1878,1895 ----

+ +

emacs-editing-mode (C-e) +
+ When in vi command mode, this causes a switch to emacs + editing mode. +

+ + +

vi-editing-mode (M-C-j) +
+ When in emacs editing mode, this causes a switch to vi + editing mode. +

+

*************** *** 1883,1887 ****

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

--- 1938,1942 ----

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

*************** *** 1967,1972 ****

! !

--- 2022,2027 ----

! !

*************** *** 2014,2023 **** static char *line_read = (char *)NULL; ! /* Read a string, and return a pointer to it. Returns NULL on EOF. */ char * rl_gets () { ! /* If the buffer has already been allocated, return the memory ! to the free pool. */ if (line_read) { --- 2069,2079 ---- static char *line_read = (char *)NULL; ! /* Read a string, and return a pointer to it. ! Returns NULL on EOF. */ char * rl_gets () { ! /* If the buffer has already been allocated, ! return the memory to the free pool. */ if (line_read) { *************** *** 2029,2033 **** line_read = readline (""); ! /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) add_history (line_read); --- 2085,2090 ---- line_read = readline (""); ! /* If the line has any text in it, ! save it on the history. */ if (line_read && *line_read) add_history (line_read); *************** *** 2237,2241 ****

!
 
foo (int count, int key)
  

--- 2294,2298 ----

!
 
int foo (int count, int key)
  

*************** *** 2255,2258 **** --- 2312,2319 ----

+ A command function should return 0 if its action completes successfully, + and a non-zero value if some error occurs. +

+


*************** *** 2276,2280 ****

!

Variable: char * rl_line_buffer --- 2337,2341 ----

!

Variable: char * rl_line_buffer *************** *** 2286,2290 ****

!

Variable: int rl_point --- 2347,2351 ----

!

Variable: int rl_point *************** *** 2294,2298 ****

!

Variable: int rl_end --- 2355,2359 ----

!

Variable: int rl_end *************** *** 2303,2307 ****

!

Variable: int rl_mark --- 2364,2368 ----

!

Variable: int rl_mark *************** *** 2311,2315 ****

!

Variable: int rl_done --- 2372,2376 ----

!

Variable: int rl_done *************** *** 2319,2323 ****

!

Variable: int rl_num_chars_to_read --- 2380,2384 ----

!

Variable: int rl_num_chars_to_read *************** *** 2328,2332 ****

!

Variable: int rl_pending_input --- 2389,2393 ----

!

Variable: int rl_pending_input *************** *** 2336,2340 ****

!

Variable: int rl_dispatching --- 2397,2401 ----

!

Variable: int rl_dispatching *************** *** 2345,2349 ****

!

Variable: int rl_erase_empty_line --- 2406,2410 ----

!

Variable: int rl_erase_empty_line *************** *** 2355,2359 ****

!

Variable: char * rl_prompt --- 2416,2420 ----

!

Variable: char * rl_prompt *************** *** 2365,2369 ****

!

Variable: int rl_already_prompted --- 2426,2430 ----

!

Variable: int rl_already_prompted *************** *** 2378,2382 ****

!

Variable: const char * rl_library_version --- 2439,2443 ----

!

Variable: const char * rl_library_version *************** *** 2385,2389 ****

!

Variable: int rl_readline_version --- 2446,2450 ----

!

Variable: int rl_readline_version *************** *** 2396,2400 ****

!

Variable: int rl_gnu_readline_p --- 2457,2461 ----

!

Variable: int rl_gnu_readline_p *************** *** 2404,2408 ****

!

Variable: const char * rl_terminal_name --- 2465,2469 ----

!

Variable: const char * rl_terminal_name *************** *** 2413,2417 ****

!

Variable: const char * rl_readline_name --- 2474,2478 ----

!

Variable: const char * rl_readline_name *************** *** 2422,2440 ****

!

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 --- 2483,2503 ----

!

Variable: FILE * rl_instream
The stdio stream from which Readline reads input. + If NULL, Readline defaults to stdin.

!

Variable: FILE * rl_outstream
The stdio stream to which Readline performs output. + If NULL, Readline defaults to stdout.

!

Variable: rl_command_func_t * rl_last_func *************** *** 2445,2449 ****

!

Variable: rl_hook_func_t * rl_startup_hook --- 2508,2512 ----

!

Variable: rl_hook_func_t * rl_startup_hook *************** *** 2453,2457 ****

!

Variable: rl_hook_func_t * rl_pre_input_hook --- 2516,2520 ----

!

Variable: rl_hook_func_t * rl_pre_input_hook *************** *** 2462,2466 ****

!

Variable: rl_hook_func_t * rl_event_hook --- 2525,2529 ----

!

Variable: rl_hook_func_t * rl_event_hook *************** *** 2472,2476 ****

!

Variable: rl_getc_func_t * rl_getc_function --- 2535,2539 ----

!

Variable: rl_getc_func_t * rl_getc_function *************** *** 2482,2486 ****

!

Variable: rl_voidfunc_t * rl_redisplay_function --- 2545,2549 ----

!

Variable: rl_voidfunc_t * rl_redisplay_function *************** *** 2492,2496 ****

!

Variable: rl_vintfunc_t * rl_prep_term_function --- 2555,2559 ----

!

Variable: rl_vintfunc_t * rl_prep_term_function *************** *** 2503,2507 ****

!

Variable: rl_voidfunc_t * rl_deprep_term_function --- 2566,2570 ----

!

Variable: rl_voidfunc_t * rl_deprep_term_function *************** *** 2514,2518 ****

!

Variable: Keymap rl_executing_keymap --- 2577,2581 ----

!

Variable: Keymap rl_executing_keymap *************** *** 2522,2526 ****

!

Variable: Keymap rl_binding_keymap --- 2585,2589 ----

!

Variable: Keymap rl_binding_keymap *************** *** 2530,2534 ****

!

Variable: char * rl_executing_macro --- 2593,2597 ----

!

Variable: char * rl_executing_macro *************** *** 2537,2541 ****

!

Variable: int rl_readline_state --- 2600,2604 ----

!

Variable: int rl_readline_state *************** *** 2593,2597 ****

!

Variable: int rl_explicit_arg --- 2656,2660 ----

!

Variable: int rl_explicit_arg *************** *** 2601,2605 ****

!

Variable: int rl_numeric_arg --- 2664,2668 ----

!

Variable: int rl_numeric_arg *************** *** 2610,2614 ****

!

Variable: int rl_editing_mode --- 2673,2677 ----

!

Variable: int rl_editing_mode *************** *** 2688,2692 ****

!

Function: int rl_add_defun (const char *name, rl_command_func_t *function, int key) --- 2751,2755 ----

!

Function: int rl_add_defun (const char *name, rl_command_func_t *function, int key) *************** *** 2728,2732 ****

!

Function: Keymap rl_make_bare_keymap (void) --- 2791,2795 ----

!

Function: Keymap rl_make_bare_keymap (void) *************** *** 2737,2741 ****

!

Function: Keymap rl_copy_keymap (Keymap map) --- 2800,2804 ----

!

Function: Keymap rl_copy_keymap (Keymap map) *************** *** 2744,2748 ****

!

Function: Keymap rl_make_keymap (void) --- 2807,2811 ----

!

Function: Keymap rl_make_keymap (void) *************** *** 2753,2757 ****

!

Function: void rl_discard_keymap (Keymap keymap) --- 2816,2820 ----

!

Function: void rl_discard_keymap (Keymap keymap) *************** *** 2764,2768 ****

!

Function: Keymap rl_get_keymap (void) --- 2827,2831 ----

!

Function: Keymap rl_get_keymap (void) *************** *** 2771,2775 ****

!

Function: void rl_set_keymap (Keymap keymap) --- 2834,2838 ----

!

Function: void rl_set_keymap (Keymap keymap) *************** *** 2778,2782 ****

!

Function: Keymap rl_get_keymap_by_name (const char *name) --- 2841,2845 ----

!

Function: Keymap rl_get_keymap_by_name (const char *name) *************** *** 2786,2790 ****

!

Function: char * rl_get_keymap_name (Keymap keymap) --- 2849,2853 ----

!

Function: char * rl_get_keymap_name (Keymap keymap) *************** *** 2831,2835 ****

!

Function: int rl_bind_key (int key, rl_command_func_t *function) --- 2894,2898 ----

!

Function: int rl_bind_key (int key, rl_command_func_t *function) *************** *** 2839,2843 ****

!

Function: int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) --- 2902,2906 ----

!

Function: int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) *************** *** 2847,2851 ****

!

Function: int rl_unbind_key (int key) --- 2910,2914 ----

!

Function: int rl_unbind_key (int key) *************** *** 2855,2859 ****

!

Function: int rl_unbind_key_in_map (int key, Keymap map) --- 2918,2922 ----

!

Function: int rl_unbind_key_in_map (int key, Keymap map) *************** *** 2863,2867 ****

!

Function: int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) --- 2926,2930 ----

!

Function: int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map) *************** *** 2870,2874 ****

!

Function: int rl_unbind_command_in_map (const char *command, Keymap map) --- 2933,2937 ----

!

Function: int rl_unbind_command_in_map (const char *command, Keymap map) *************** *** 2877,2881 ****

!

Function: int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) --- 2940,2944 ----

!

Function: int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map) *************** *** 2886,2890 ****

!

Function: int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) --- 2949,2953 ----

!

Function: int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) *************** *** 2897,2901 ****

!

Function: int rl_parse_and_bind (char *line) --- 2960,2964 ----

!

Function: int rl_parse_and_bind (char *line) *************** *** 2906,2910 ****

!

Function: int rl_read_init_file (const char *filename) --- 2969,2973 ----

!

Function: int rl_read_init_file (const char *filename) *************** *** 2937,2941 ****

!

Function: rl_command_func_t * rl_named_function (const char *name) --- 3000,3004 ----

!

Function: rl_command_func_t * rl_named_function (const char *name) *************** *** 2944,2948 ****

!

Function: rl_command_func_t * rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) --- 3007,3011 ----

!

Function: rl_command_func_t * rl_function_of_keyseq (const char *keyseq, Keymap map, int *type) *************** *** 2954,2958 ****

!

Function: char ** rl_invoking_keyseqs (rl_command_func_t *function) --- 3017,3021 ----

!

Function: char ** rl_invoking_keyseqs (rl_command_func_t *function) *************** *** 2962,2966 ****

!

Function: char ** rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) --- 3025,3029 ----

!

Function: char ** rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) *************** *** 2970,2974 ****

!

Function: void rl_function_dumper (int readable) --- 3033,3037 ----

!

Function: void rl_function_dumper (int readable) *************** *** 2980,2984 ****

!

Function: void rl_list_funmap_names (void) --- 3043,3047 ----

!

Function: void rl_list_funmap_names (void) *************** *** 2987,2991 ****

!

Function: const char ** rl_funmap_names (void) --- 3050,3054 ----

!

Function: const char ** rl_funmap_names (void) *************** *** 2996,3000 ****

!

Function: int rl_add_funmap_entry (const char *name, rl_command_func_t *function) --- 3059,3063 ----

!

Function: int rl_add_funmap_entry (const char *name, rl_command_func_t *function) *************** *** 3041,3046 ****

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

Notice that UNDO_DELETE means to insert some text, and --- 3104,3109 ----

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

Notice that UNDO_DELETE means to insert some text, and *************** *** 3051,3055 ****

!

Function: int rl_begin_undo_group (void) --- 3114,3118 ----

!

Function: int rl_begin_undo_group (void) *************** *** 3061,3065 ****

!

Function: int rl_end_undo_group (void) --- 3124,3128 ----

!

Function: int rl_end_undo_group (void) *************** *** 3070,3074 ****

!

Function: void rl_add_undo (enum undo_code what, int start, int end, char *text) --- 3133,3137 ----

!

Function: void rl_add_undo (enum undo_code what, int start, int end, char *text) *************** *** 3078,3082 ****

!

Function: void rl_free_undo_list (void) --- 3141,3145 ----

!

Function: void rl_free_undo_list (void) *************** *** 3085,3089 ****

!

Function: int rl_do_undo (void) --- 3148,3152 ----

!

Function: int rl_do_undo (void) *************** *** 3099,3103 ****

!

Function: int rl_modifying (int start, int end) --- 3162,3166 ----

!

Function: int rl_modifying (int start, int end) *************** *** 3126,3130 ****

!

Function: void rl_redisplay (void) --- 3189,3193 ----

!

Function: void rl_redisplay (void) *************** *** 3134,3138 ****

!

Function: int rl_forced_update_display (void) --- 3197,3201 ----

!

Function: int rl_forced_update_display (void) *************** *** 3142,3146 ****

!

Function: int rl_on_new_line (void) --- 3205,3209 ----

!

Function: int rl_on_new_line (void) *************** *** 3150,3154 ****

!

Function: int rl_on_new_line_with_prompt (void) --- 3213,3217 ----

!

Function: int rl_on_new_line_with_prompt (void) *************** *** 3162,3166 ****

!

Function: int rl_reset_line_state (void) --- 3225,3229 ----

!

Function: int rl_reset_line_state (void) *************** *** 3170,3174 ****

!

Function: int rl_crlf (void) --- 3233,3237 ----

!

Function: int rl_crlf (void) *************** *** 3177,3181 ****

!

Function: int rl_show_char (int c) --- 3240,3244 ----

!

Function: int rl_show_char (int c) *************** *** 3188,3192 ****

!

Function: int rl_message (const char *, ...) --- 3251,3255 ----

!

Function: int rl_message (const char *, ...) *************** *** 3199,3203 ****

!

Function: int rl_clear_message (void) --- 3262,3266 ----

!

Function: int rl_clear_message (void) *************** *** 3206,3210 ****

!

Function: void rl_save_prompt (void) --- 3269,3273 ----

!

Function: void rl_save_prompt (void) *************** *** 3214,3218 ****

!

Function: void rl_restore_prompt (void) --- 3277,3281 ----

!

Function: void rl_restore_prompt (void) *************** *** 3222,3226 ****

!

Function: int rl_expand_prompt (char *prompt) --- 3285,3289 ----

!

Function: int rl_expand_prompt (char *prompt) *************** *** 3235,3239 ****

!

Function: int rl_set_prompt (const char *prompt) --- 3298,3302 ----

!

Function: int rl_set_prompt (const char *prompt) *************** *** 3262,3280 ****

!

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) --- 3325,3345 ----

!

Function: int rl_insert_text (const char *text)
Insert text into the line at the current cursor position. + Returns the number of characters inserted.

!

Function: int rl_delete_text (int start, int end)
Delete the text between start and end in the current line. + Returns the number of characters deleted.

!

Function: char * rl_copy_text (int start, int end) *************** *** 3284,3288 ****

!

Function: int rl_kill_text (int start, int end) --- 3349,3353 ----

!

Function: int rl_kill_text (int start, int end) *************** *** 3296,3300 ****

!

Function: int rl_push_macro_input (char *macro) --- 3361,3365 ----

!

Function: int rl_push_macro_input (char *macro) *************** *** 3323,3327 ****

!

Function: int rl_read_key (void) --- 3388,3392 ----

!

Function: int rl_read_key (void) *************** *** 3335,3339 ****

!

Function: int rl_getc (FILE *stream) --- 3400,3404 ----

!

Function: int rl_getc (FILE *stream) *************** *** 3343,3356 ****

!

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) --- 3408,3423 ----

!

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(). Up to 512 characters may be pushed back. ! rl_stuff_char returns 1 if the character was successfully inserted; ! 0 otherwise.

!

Function: int rl_execute_next (int c) *************** *** 3360,3364 ****

!

Function: int rl_clear_pending_input (void) --- 3427,3431 ----

!

Function: int rl_clear_pending_input (void) *************** *** 3369,3373 ****

!

Function: int rl_set_keyboard_input_timeout (int u) --- 3436,3440 ----

!

Function: int rl_set_keyboard_input_timeout (int u) *************** *** 3397,3401 ****

!

Function: void rl_prep_terminal (int meta_flag) --- 3464,3468 ----

!

Function: void rl_prep_terminal (int meta_flag) *************** *** 3407,3411 ****

!

Function: void rl_deprep_terminal (void) --- 3474,3478 ----

!

Function: void rl_deprep_terminal (void) *************** *** 3416,3420 ****

!

Function: void rl_tty_set_default_bindings (Keymap kmap) --- 3483,3487 ----

!

Function: void rl_tty_set_default_bindings (Keymap kmap) *************** *** 3425,3429 ****

!

Function: int rl_reset_terminal (const char *terminal_name) --- 3492,3496 ----

!

Function: int rl_reset_terminal (const char *terminal_name) *************** *** 3453,3457 ****

!

Function: int rl_extend_line_buffer (int len) --- 3520,3534 ----

! !

!
Function: void rl_replace_line (const char *text, int clear_undo) !
Replace the contents of rl_line_buffer with text. ! The point and mark are preserved, if possible. ! If clear_undo is non-zero, the undo list associated with the ! current line is cleared. !
!

! !

Function: int rl_extend_line_buffer (int len) *************** *** 3461,3465 ****

!

Function: int rl_initialize (void) --- 3538,3542 ----

!

Function: int rl_initialize (void) *************** *** 3470,3474 ****

!

Function: int rl_ding (void) --- 3547,3551 ----

!

Function: int rl_ding (void) *************** *** 3477,3481 ****

!

Function: int rl_alphabetic (int c) --- 3554,3558 ----

!

Function: int rl_alphabetic (int c) *************** *** 3484,3488 ****

!

Function: void rl_display_match_list (char **matches, int len, int max) --- 3561,3565 ----

!

Function: void rl_display_match_list (char **matches, int len, int max) *************** *** 3501,3505 ****

!

Function: int _rl_uppercase_p (int c) --- 3578,3582 ----

!

Function: int _rl_uppercase_p (int c) *************** *** 3508,3512 ****

!

Function: int _rl_lowercase_p (int c) --- 3585,3589 ----

!

Function: int _rl_lowercase_p (int c) *************** *** 3515,3519 ****

!

Function: int _rl_digit_p (int c) --- 3592,3596 ----

!

Function: int _rl_digit_p (int c) *************** *** 3522,3526 ****

!

Function: int _rl_to_upper (int c) --- 3599,3603 ----

!

Function: int _rl_to_upper (int c) *************** *** 3530,3534 ****

!

Function: int _rl_to_lower (int c) --- 3607,3611 ----

!

Function: int _rl_to_lower (int c) *************** *** 3538,3542 ****

!

Function: int _rl_digit_value (int c) --- 3615,3619 ----

!

Function: int _rl_digit_value (int c) *************** *** 3563,3567 ****

!

Function: int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) --- 3640,3644 ----

!

Function: int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) *************** *** 3573,3577 ****

!

Function: void rl_macro_dumper (int readable) --- 3650,3654 ----

!

Function: void rl_macro_dumper (int readable) *************** *** 3583,3587 ****

!

Function: int rl_variable_bind (const char *variable, const char *value) --- 3660,3664 ----

!

Function: int rl_variable_bind (const char *variable, const char *value) *************** *** 3593,3597 ****

!

Function: void rl_variable_dumper (int readable) --- 3670,3674 ----

!

Function: void rl_variable_dumper (int readable) *************** *** 3603,3607 ****

!

Function: int rl_set_paren_blink_timeout (int u) --- 3680,3684 ----

!

Function: int rl_set_paren_blink_timeout (int u) *************** *** 3611,3615 ****

!

Function: char * rl_get_termcap (const char *cap) --- 3688,3692 ----

!

Function: char * rl_get_termcap (const char *cap) *************** *** 3649,3653 ****

!

Function: void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) --- 3726,3730 ----

!

Function: void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) *************** *** 3659,3680 ****

!

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 ! line, rl_callback_read_char will invoke the lhandler ! function saved by rl_callback_handler_install to process the ! line. EOF is indicated by calling lhandler with a 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.

--- 3736,3767 ----

!

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 line, rl_callback_read_char will ! invoke the lhandler function saved by rl_callback_handler_install ! to process the line. ! Before calling the lhandler function, the terminal settings are ! reset to the values they had before calling ! rl_callback_handler_install. ! If the lhandler function returns, ! the terminal settings are modified for Readline's use again. ! EOF is indicated by calling lhandler with a 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. + If the lhandler installed by rl_callback_handler_install + does not exit the program, either this function or the function referred + to by the value of rl_deprep_term_function should be called before + the program exits to reset the terminal settings.

*************** *** 3745,3750 **** } ! /* Tell readline that we are modifying the line, so it will save ! the undo information. */ rl_modifying (start, end); --- 3832,3837 ---- } ! /* Tell readline that we are modifying the line, ! so it will save the undo information. */ rl_modifying (start, end); *************** *** 3826,3830 ****

!

Variable: int rl_catch_signals --- 3913,3917 ----

!

Variable: int rl_catch_signals *************** *** 3838,3842 ****

!

Variable: int rl_catch_sigwinch --- 3925,3929 ----

!

Variable: int rl_catch_sigwinch *************** *** 3856,3860 ****

!

Function: void rl_cleanup_after_signal (void) --- 3943,3947 ----

!

Function: void rl_cleanup_after_signal (void) *************** *** 3866,3870 ****

!

Function: void rl_free_line_state (void) --- 3953,3957 ----

!

Function: void rl_free_line_state (void) *************** *** 3878,3882 ****

!

Function: void rl_reset_after_signal (void) --- 3965,3969 ----

!

Function: void rl_reset_after_signal (void) *************** *** 3893,3897 ****

!

Function: void rl_resize_terminal (void) --- 3980,3984 ----

!

Function: void rl_resize_terminal (void) *************** *** 3900,3904 ****

!

Function: void rl_set_screen_size (int rows, int cols) --- 3987,3991 ----

!

Function: void rl_set_screen_size (int rows, int cols) *************** *** 3913,3917 ****

!

Function: void rl_get_screen_size (int *rows, int *cols) --- 4000,4004 ----

!

Function: void rl_get_screen_size (int *rows, int *cols) *************** *** 3924,3928 ****

!

Function: int rl_set_signals (void) --- 4011,4015 ----

!

Function: int rl_set_signals (void) *************** *** 3934,3938 ****

!

Function: int rl_clear_signals (void) --- 4021,4025 ----

!

Function: int rl_clear_signals (void) *************** *** 4045,4049 ****

!

Function: int rl_complete (int ignore, int invoking_key) --- 4132,4136 ----

!

Function: int rl_complete (int ignore, int invoking_key) *************** *** 4054,4058 ****

!

Variable: rl_compentry_func_t * rl_completion_entry_function --- 4141,4145 ----

!

Variable: rl_compentry_func_t * rl_completion_entry_function *************** *** 4087,4091 ****

!

Function: int rl_complete_internal (int what_to_do) --- 4174,4178 ----

!

Function: int rl_complete_internal (int what_to_do) *************** *** 4099,4103 ****

!

Function: int rl_complete (int ignore, int invoking_key) --- 4186,4190 ----

!

Function: int rl_complete (int ignore, int invoking_key) *************** *** 4111,4115 ****

!

Function: int rl_possible_completions (int count, int invoking_key) --- 4198,4202 ----

!

Function: int rl_possible_completions (int count, int invoking_key) *************** *** 4120,4124 ****

!

Function: int rl_insert_completions (int count, int invoking_key) --- 4207,4211 ----

!

Function: int rl_insert_completions (int count, int invoking_key) *************** *** 4129,4133 ****

!

Function: char ** rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) --- 4216,4231 ----

! !

!
Function: int rl_completion_mode (rl_command_func_t *cfunc) !
Returns the apppriate value to pass to rl_complete_internal() ! depending on whether cfunc was called twice in succession and ! the value of the show-all-if-ambiguous variable. ! Application-specific completion functions may use this function to present ! the same interface as rl_complete(). !
!

! !

Function: char ** rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) *************** *** 4147,4151 ****

!

Function: char * rl_filename_completion_function (const char *text, int state) --- 4245,4249 ----

!

Function: char * rl_filename_completion_function (const char *text, int state) *************** *** 4158,4162 ****

!

Function: char * rl_username_completion_function (const char *text, int state) --- 4256,4260 ----

!

Function: char * rl_username_completion_function (const char *text, int state) *************** *** 4186,4190 ****

!

Variable: rl_compentry_func_t * rl_completion_entry_function --- 4284,4288 ----

!

Variable: rl_compentry_func_t * rl_completion_entry_function *************** *** 4195,4199 ****

!

Variable: rl_completion_func_t * rl_attempted_completion_function --- 4293,4297 ----

!

Variable: rl_completion_func_t * rl_attempted_completion_function *************** *** 4212,4216 ****

!

Variable: rl_quote_func_t * rl_filename_quoting_function --- 4310,4314 ----

!

Variable: rl_quote_func_t * rl_filename_quoting_function *************** *** 4229,4233 ****

!

Variable: rl_dequote_func_t * rl_filename_dequoting_function --- 4327,4331 ----

!

Variable: rl_dequote_func_t * rl_filename_dequoting_function *************** *** 4242,4246 ****

!

Variable: rl_linebuf_func_t * rl_char_is_quoted_p --- 4340,4344 ----

!

Variable: rl_linebuf_func_t * rl_char_is_quoted_p *************** *** 4255,4268 ****

!

!
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 --- 4353,4403 ----

!

!
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. ! The first element (matches[0]) is the ! maximal substring common to all matches. This function can ! re-arrange the list of matches as required, but each element deleted ! 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. ! If the string is replaced with a new string, the old value should be freed. ! Any modified directory name should have a trailing slash. ! The modified value will be displayed as part of the completion, replacing ! the directory portion of the pathname the user typed. ! It returns an integer that should be non-zero if the function modifies ! its directory argument. ! 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. ! It takes three arguments: ! (char **matches, int num_matches, int max_length) ! where matches is the array of matching strings, ! num_matches is the number of strings in that array, and ! max_length is the length of the longest string in that array. ! Readline provides a convenience function, rl_display_match_list, ! that takes care of doing the display to Readline's output stream. That ! function may be called from this hook. !
!

! !

Variable: const char * rl_basic_word_break_characters *************** *** 4274,4278 ****

!

Variable: const char * rl_basic_quote_characters --- 4409,4413 ----

!

Variable: const char * rl_basic_quote_characters *************** *** 4281,4285 ****

!

Variable: const char * rl_completer_word_break_characters --- 4416,4420 ----

!

Variable: const char * rl_completer_word_break_characters *************** *** 4290,4294 ****

!

Variable: const char * rl_completer_quote_characters --- 4425,4429 ----

!

Variable: const char * rl_completer_quote_characters *************** *** 4300,4304 ****

!

Variable: const char * rl_filename_quote_characters --- 4435,4439 ----

!

Variable: const char * rl_filename_quote_characters *************** *** 4308,4312 ****

!

Variable: const char * rl_special_prefixes --- 4443,4447 ----

!

Variable: const char * rl_special_prefixes *************** *** 4319,4323 ****

!

Variable: int rl_completion_append_character --- 4454,4467 ----

! !

!
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: int rl_completion_append_character *************** *** 4332,4336 ****

!

Variable: int rl_ignore_completion_duplicates --- 4476,4504 ----

! !

!
Variable: int rl_completion_suppress_append !
If non-zero, rl_completion_append_character is not appended to ! matches at the end of the command line, as described above. It is ! set to 0 before any application-specific completion function is called. !
!

! ! !

!
Variable: int rl_completion_mark_symlink_dirs !
If non-zero, a slash will be appended to completed filenames that are ! symbolic links to directory names, subject to the value of the ! user-settable mark-directories variable. ! This variable exists so that application completion functions can ! override the user's global preference (set via the ! mark-symlinked-directories Readline variable) if appropriate. ! This variable is set to the user's preference before any ! application completion function is called, so unless that function ! modifies the value, the user's preferences are honored. !
!

! !

Variable: int rl_ignore_completion_duplicates *************** *** 4340,4344 ****

!

Variable: int rl_filename_completion_desired --- 4508,4512 ----

!

Variable: int rl_filename_completion_desired *************** *** 4353,4357 ****

!

Variable: int rl_filename_quoting_desired --- 4521,4525 ----

!

Variable: int rl_filename_quoting_desired *************** *** 4366,4370 ****

!

Variable: int rl_attempted_completion_over --- 4534,4538 ----

!

Variable: int rl_attempted_completion_over *************** *** 4377,4381 ****

!

Variable: int rl_completion_type --- 4545,4549 ----

!

Variable: int rl_completion_type *************** *** 4386,4390 ****

!

Variable: int rl_inhibit_completion --- 4554,4558 ----

!

Variable: int rl_inhibit_completion *************** *** 4394,4443 ****

- -

-
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. - The first element (matches[0]) is the - maximal substring common to all matches. This function can - re-arrange the list of matches as required, but each element deleted - 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. - If the string is replaced with a new string, the old value should be freed. - Any modified directory name should have a trailing slash. - The modified value will be displayed as part of the completion, replacing - the directory portion of the pathname the user typed. - It returns an integer that should be non-zero if the function modifies - its directory argument. - 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. - It takes three arguments: - (char **matches, int num_matches, int max_length) - where matches is the array of matching strings, - num_matches is the number of strings in that array, and - max_length is the length of the longest string in that array. - Readline provides a convenience function, rl_display_match_list, - that takes care of doing the display to Readline's output stream. That - function may be called from this hook. -
-

-


--- 4562,4565 ---- *************** *** 4881,4890 **** { fprintf (stderr, ! "%s: Too dangerous for me to distribute. Write it yourself.\n", caller); } ! /* Return non-zero if ARG is a valid argument for CALLER, else print ! an error message and return zero. */ int valid_argument (caller, arg) --- 5003,5013 ---- { fprintf (stderr, ! "%s: Too dangerous for me to distribute.\n" caller); + fprintf (stderr, "Write it yourself.\n"); } ! /* Return non-zero if ARG is a valid argument for CALLER, ! else print an error message and return zero. */ int valid_argument (caller, arg) *************** *** 4955,4959 ****
R ! readline, function2.1 Basic Behavior
V --- 5078,5082 ----
R ! readline, function2.1 Basic Behavior
V *************** *** 5045,5405 ****
_ ! _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:   _ --- 5168,5540 ----

_
_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
emacs-editing-mode (C-e)1.4.8 Some Miscellaneous Commands
emacs-editing-mode (C-e)1.4.8 Some Miscellaneous Commands
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
mark-symlinked-directories1.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
overwrite-mode ()1.4.3 Commands For Changing Text
overwrite-mode ()1.4.3 Commands For Changing Text

P
page-completions1.3.1 Readline Init File Syntax
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_mark_symlink_dirs2.6.3 Completion Variables
rl_completion_matches2.6.2 Completion Functions
rl_completion_mode2.6.2 Completion Functions
rl_completion_query_items2.6.3 Completion Variables
rl_completion_suppress_append2.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_replace_line2.4.10 Utility Functions
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
vi-editing-mode (M-C-j)1.4.8 Some Miscellaneous Commands
vi-editing-mode (M-C-j)1.4.8 Some Miscellaneous Commands
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:   _ *************** *** 5604,5608 ****

About this document

! This document was generated by Chet Ramey on October, 9 2001 using texi2html --- 5739,5743 ----

About this document

! This document was generated by Chet Ramey on June, 27 2002 using texi2html *************** *** 5766,5770 **** This document was generated ! by Chet Ramey on October, 9 2001 using texi2html --- 5901,5905 ---- This document was generated ! by Chet Ramey on June, 27 2002 using texi2html diff -Nrc2 readline-4.2a/doc/readline.info readline-4.3/doc/readline.info *** readline-4.2a/doc/readline.info Tue Oct 9 15:08:02 2001 --- readline-4.3/doc/readline.info Thu Jun 27 13:54:34 2002 *************** *** 1,3 **** ! This is readline.info, produced by makeinfo version 4.0 from /usr/homes/chet/src/bash/readline-src/doc/rlman.texinfo. --- 1,3 ---- ! This is readline.info, produced by makeinfo version 4.1 from /usr/homes/chet/src/bash/readline-src/doc/rlman.texinfo. *************** *** 11,15 **** 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 --- 11,15 ---- need to provide a command line interface. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this *************** *** 471,474 **** --- 471,479 ---- modified. This variable is `off' by default. + `mark-symlinked-directories' + If set to `on', completed names which are symbolic links to + directories have a slash appended (subject to the value of + `mark-directories'). The default is `off'. + `match-hidden-files' This variable, when set to `on', causes Readline to match *************** *** 483,486 **** --- 488,496 ---- sequence. The default is `off'. + `page-completions' + If set to `on', Readline uses an internal `more'-like pager + to display a screenful of possible completions at a time. + This variable is `on' by default. + `print-completions-horizontally' If set to `on', Readline will display completions with matches *************** *** 685,696 **** # This file controls the behaviour of line input editing for ! # programs that use the Gnu Readline library. Existing programs ! # include FTP, Bash, and Gdb. # # You can re-read the inputrc file with C-x C-r. # Lines beginning with '#' are comments. # ! # First, include any systemwide bindings and variable assignments from ! # /etc/Inputrc $include /etc/Inputrc --- 695,706 ---- # This file controls the behaviour of line input editing for ! # programs that use the GNU Readline library. Existing ! # programs include FTP, Bash, and GDB. # # You can re-read the inputrc file with C-x C-r. # Lines beginning with '#' are comments. # ! # First, include any systemwide bindings and variable ! # assignments from /etc/Inputrc $include /etc/Inputrc *************** *** 744,751 **** # edit the path "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" ! # prepare to type a quoted word -- insert open and close double quotes # and move to just after the open quote "\C-x\"": "\"\"\C-b" ! # insert a backslash (testing backslash escapes in sequences and macros) "\C-x\\": "\\" # Quote the current or previous word --- 754,763 ---- # edit the path "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" ! # prepare to type a quoted word -- ! # insert open and close double quotes # and move to just after the open quote "\C-x\"": "\"\"\C-b" ! # insert a backslash (testing backslash escapes ! # in sequences and macros) "\C-x\\": "\\" # Quote the current or previous word *************** *** 763,776 **** set input-meta on ! # allow iso-latin1 characters to be inserted rather than converted to ! # prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly rather than ! # as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for a word, ask the ! # user if he wants to see all of them set completion-query-items 150 --- 775,788 ---- set input-meta on ! # allow iso-latin1 characters to be inserted rather ! # than converted to prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly ! # rather than as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for ! # a word, ask the user if he wants to see all of them set completion-query-items 150 *************** *** 963,966 **** --- 975,992 ---- argument, capitalize the previous word, but do not move the cursor. + `overwrite-mode ()' + Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + `emacs' mode; `vi' mode does overwrite differently. Each call to + `readline()' starts in insert mode. + + In overwrite mode, characters bound to `self-insert' replace the + text at point rather than pushing the text to the right. + Characters bound to `backward-delete-char' replace the character + before point with a space. + + By default, this command is unbound. +  File: readline.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands *************** *** 1152,1158 **** `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 ()' --- 1178,1189 ---- `insert-comment (M-#)' ! Without a numeric argument, the value of the `comment-begin' ! variable is inserted at the beginning of the current line. If a ! numeric argument is supplied, this command acts as a toggle: if ! the characters at the beginning of the line do not match the value ! of `comment-begin', the value is inserted, otherwise the ! characters in `comment-begin' are deleted from the beginning of ! the line. In either case, the line is accepted as if a newline ! had been typed. `dump-functions ()' *************** *** 1174,1177 **** --- 1205,1216 ---- INPUTRC file. This command is unbound by default. + `emacs-editing-mode (C-e)' + When in `vi' command mode, this causes a switch to `emacs' editing + mode. + + `vi-editing-mode (M-C-j)' + When in `emacs' editing mode, this causes a switch to `vi' editing + mode. +  File: readline.info, Node: Readline vi Mode, Prev: Bindable Readline Commands, Up: Command Line Editing *************** *** 1200,1204 **** 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 --- 1239,1243 ---- that need to provide a command line interface. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this *************** *** 1287,1296 **** static char *line_read = (char *)NULL; ! /* Read a string, and return a pointer to it. Returns NULL on EOF. */ char * rl_gets () { ! /* If the buffer has already been allocated, return the memory ! to the free pool. */ if (line_read) { --- 1326,1336 ---- static char *line_read = (char *)NULL; ! /* Read a string, and return a pointer to it. ! Returns NULL on EOF. */ char * rl_gets () { ! /* If the buffer has already been allocated, ! return the memory to the free pool. */ if (line_read) { *************** *** 1302,1306 **** line_read = readline (""); ! /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) add_history (line_read); --- 1342,1347 ---- line_read = readline (""); ! /* If the line has any text in it, ! save it on the history. */ if (line_read && *line_read) add_history (line_read); *************** *** 1440,1444 **** 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 --- 1481,1485 ---- The calling sequence for a command `foo' looks like ! `int foo (int count, int key)' where COUNT is the numeric argument (or 1 if defaulted) and KEY is the *************** *** 1454,1457 **** --- 1495,1501 ---- that it can be passed a negative argument. + A command function should return 0 if its action completes + successfully, and a non-zero value if some error occurs. +  File: readline.info, Node: Readline Variables, Next: Readline Convenience Functions, Prev: Custom Functions, Up: Programming with GNU Readline *************** *** 1546,1553 **** - 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 --- 1590,1599 ---- - Variable: FILE * rl_instream ! The stdio stream from which Readline reads input. If `NULL', ! Readline defaults to STDIN. - Variable: FILE * rl_outstream ! The stdio stream to which Readline performs output. If `NULL', ! Readline defaults to STDOUT. - Variable: rl_command_func_t * rl_last_func *************** *** 2051,2058 **** - 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) --- 2097,2106 ---- - Function: int rl_insert_text (const char *text) ! Insert TEXT into the line at the current cursor position. Returns ! the number of characters inserted. - Function: int rl_delete_text (int start, int end) Delete the text between START and END in the current line. + Returns the number of characters deleted. - Function: char * rl_copy_text (int start, int end) *************** *** 2093,2097 **** 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) --- 2141,2147 ---- Insert C into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with ! `rl_read_key()'. Up to 512 characters may be pushed back. ! `rl_stuff_char' returns 1 if the character was successfully ! inserted; 0 otherwise. - Function: int rl_execute_next (int c) *************** *** 2144,2147 **** --- 2194,2202 ---- ----------------- + - Function: void rl_replace_line (const char *text, int clear_undo) + Replace the contents of `rl_line_buffer' with TEXT. The point and + mark are preserved, if possible. If CLEAR_UNDO is non-zero, the + undo list associated with the current line is cleared. + - Function: int rl_extend_line_buffer (int len) Ensure that `rl_line_buffer' has enough space to hold LEN *************** *** 2262,2272 **** character completes the line, `rl_callback_read_char' will invoke the LHANDLER function saved by `rl_callback_handler_install' to ! process the line. `EOF' is indicated by calling LHANDLER with a ! `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.  --- 2317,2334 ---- character completes the line, `rl_callback_read_char' will invoke the LHANDLER function saved by `rl_callback_handler_install' to ! process the line. Before calling the LHANDLER function, the ! terminal settings are reset to the values they had before calling ! `rl_callback_handler_install'. If the LHANDLER function returns, ! the terminal settings are modified for Readline's use again. ! `EOF' is indicated by calling LHANDLER with a `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. If the LHANDLER installed by ! `rl_callback_handler_install' does not exit the program, either ! this function or the function referred to by the value of ! `rl_deprep_term_function' should be called before the program ! exits to reset the terminal settings.  *************** *** 2322,2327 **** } ! /* Tell readline that we are modifying the line, so it will save ! the undo information. */ rl_modifying (start, end); --- 2384,2389 ---- } ! /* Tell readline that we are modifying the line, ! so it will save the undo information. */ rl_modifying (start, end); *************** *** 2566,2569 **** --- 2628,2638 ---- This calls `rl_complete_internal()' with an argument of `*'. + - Function: int rl_completion_mode (rl_command_func_t *cfunc) + Returns the apppriate value to pass to `rl_complete_internal()' + depending on whether CFUNC was called twice in succession and the + value of the `show-all-if-ambiguous' variable. + Application-specific completion functions may use this function to + present the same interface as `rl_complete()'. + - Function: char ** rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) *************** *** 2649,2656 **** 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 --- 2718,2754 ---- for the completer. ! - 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. ! The first element (`matches[0]') is the maximal substring common ! to all matches. This function can re-arrange the list of matches ! as required, but each element deleted 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. If the string is replaced with a new ! string, the old value should be freed. Any modified directory ! name should have a trailing slash. The modified value will be ! displayed as part of the completion, replacing the directory ! portion of the pathname the user typed. It returns an integer ! that should be non-zero if the function modifies its directory ! argument. 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. It takes three arguments: (`char **'MATCHES, `int' ! NUM_MATCHES, `int' MAX_LENGTH) where MATCHES is the array of ! matching strings, NUM_MATCHES is the number of strings in that ! array, and MAX_LENGTH is the length of the longest string in that ! array. Readline provides a convenience function, ! `rl_display_match_list', that takes care of doing the display to ! Readline's output stream. That function may be called from this ! hook. - Variable: const char * rl_basic_word_break_characters *************** *** 2686,2689 **** --- 2784,2792 ---- complete shell variables and hostnames. + - 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: int rl_completion_append_character When a single completion alternative matches at the end of the *************** *** 2695,2698 **** --- 2798,2818 ---- to an application-specific command line syntax specification. + - Variable: int rl_completion_suppress_append + If non-zero, RL_COMPLETION_APPEND_CHARACTER is not appended to + matches at the end of the command line, as described above. It is + set to 0 before any application-specific completion function is + called. + + - Variable: int rl_completion_mark_symlink_dirs + If non-zero, a slash will be appended to completed filenames that + are symbolic links to directory names, subject to the value of the + user-settable MARK-DIRECTORIES variable. This variable exists so + that application completion functions can override the user's + global preference (set via the MARK-SYMLINKED-DIRECTORIES Readline + variable) if appropriate. This variable is set to the user's + preference before any application completion function is called, + so unless that function modifies the value, the user's preferences + are honored. + - Variable: int rl_ignore_completion_duplicates If non-zero, then duplicates in the matches are removed. The *************** *** 2735,2772 **** `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. - The first element (`matches[0]') is the maximal substring common - to all matches. This function can re-arrange the list of matches - as required, but each element deleted 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. If the string is replaced with a new - string, the old value should be freed. Any modified directory - name should have a trailing slash. The modified value will be - displayed as part of the completion, replacing the directory - portion of the pathname the user typed. It returns an integer - that should be non-zero if the function modifies its directory - argument. 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. It takes three arguments: (`char **'MATCHES, `int' - NUM_MATCHES, `int' MAX_LENGTH) where MATCHES is the array of - matching strings, NUM_MATCHES is the number of strings in that - array, and MAX_LENGTH is the length of the longest string in that - array. Readline provides a convenience function, - `rl_display_match_list', that takes care of doing the display to - Readline's output stream. That function may be called from this - hook. -  File: readline.info, Node: A Short Completion Example, Prev: Completion Variables, Up: Custom Completers --- 2855,2858 ---- *************** *** 3196,3205 **** { fprintf (stderr, ! "%s: Too dangerous for me to distribute. Write it yourself.\n", caller); } ! /* Return non-zero if ARG is a valid argument for CALLER, else print ! an error message and return zero. */ int valid_argument (caller, arg) --- 3282,3292 ---- { fprintf (stderr, ! "%s: Too dangerous for me to distribute.\n" caller); + fprintf (stderr, "Write it yourself.\n"); } ! /* Return non-zero if ARG is a valid argument for CALLER, ! else print an error message and return zero. */ int valid_argument (caller, arg) *************** *** 3305,3308 **** --- 3392,3396 ---- * kill-word (M-d): Commands For Killing. * mark-modified-lines: Readline Init File Syntax. + * mark-symlinked-directories: Readline Init File Syntax. * match-hidden-files: Readline Init File Syntax. * menu-complete (): Commands For Completion. *************** *** 3312,3315 **** --- 3400,3405 ---- * non-incremental-reverse-search-history (M-p): Commands For History. * output-meta: Readline Init File Syntax. + * overwrite-mode (): Commands For Text. + * page-completions: Readline Init File Syntax. * possible-completions (M-?): Commands For Completion. * prefix-meta (): Miscellaneous Commands. *************** *** 3344,3349 **** * rl_clear_pending_input: Character Input. * rl_clear_signals: Readline Signal Handling. ! * rl_complete <1>: Completion Functions. ! * rl_complete: How Completing Works. * rl_complete_internal: Completion Functions. * rl_completer_quote_characters: Completion Variables. --- 3434,3439 ---- * rl_clear_pending_input: Character Input. * rl_clear_signals: Readline Signal Handling. ! * rl_complete <1>: How Completing Works. ! * rl_complete: Completion Functions. * rl_complete_internal: Completion Functions. * rl_completer_quote_characters: Completion Variables. *************** *** 3353,3358 **** --- 3443,3451 ---- * rl_completion_entry_function <1>: Completion Variables. * rl_completion_entry_function: How Completing Works. + * rl_completion_mark_symlink_dirs: Completion Variables. * rl_completion_matches: Completion Functions. + * rl_completion_mode: Completion Functions. * rl_completion_query_items: Completion Variables. + * rl_completion_suppress_append: Completion Variables. * rl_completion_type: Completion Variables. * rl_copy_keymap: Keymaps. *************** *** 3444,3447 **** --- 3537,3541 ---- * rl_redisplay: Redisplay. * rl_redisplay_function: Readline Variables. + * rl_replace_line: Utility Functions. * rl_reset_after_signal: Readline Signal Handling. * rl_reset_line_state: Redisplay. *************** *** 3501,3544 **** 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 --- 3595,3638 ---- Node: Readline Init File13045 Node: Readline Init File Syntax14106 ! Node: Conditional Init Constructs24989 ! Node: Sample Init File27514 ! Node: Bindable Readline Commands30698 ! Node: Commands For Moving31748 ! Node: Commands For History32597 ! Node: Commands For Text35455 ! Node: Commands For Killing38169 ! Node: Numeric Arguments40120 ! Node: Commands For Completion41248 ! Node: Keyboard Macros42780 ! Node: Miscellaneous Commands43339 ! Node: Readline vi Mode46688 ! Node: Programming with GNU Readline48506 ! Node: Basic Behavior49474 ! Node: Custom Functions52904 ! Node: Readline Typedefs54382 ! Node: Function Writing56011 ! Node: Readline Variables57219 ! Node: Readline Convenience Functions66642 ! Node: Function Naming67624 ! Node: Keymaps68876 ! Node: Binding Keys70632 ! Node: Associating Function Names and Bindings73558 ! Node: Allowing Undoing75803 ! Node: Redisplay78338 ! Node: Modifying Text81409 ! Node: Character Input82638 ! Node: Terminal Management84418 ! Node: Utility Functions85593 ! Node: Miscellaneous Functions87932 ! Node: Alternate Interface89996 ! Node: A Readline Example92141 ! Node: Readline Signal Handling94078 ! Node: Custom Completers99681 ! Node: How Completing Works100396 ! Node: Completion Functions103394 ! Node: Completion Variables106778 ! Node: A Short Completion Example117049 ! Node: Concept Index129602 ! Node: Function and Variable Index130424  End Tag Table diff -Nrc2 readline-4.2a/doc/readline.ps readline-4.3/doc/readline.ps *** readline-4.2a/doc/readline.ps Tue Oct 9 15:08:12 2001 --- readline-4.3/doc/readline.ps Thu Jun 27 13:54:43 2002 *************** *** 2,6 **** %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: readline.dvi ! %%Pages: 64 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 --- 2,6 ---- %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: readline.dvi ! %%Pages: 66 %%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.10.09:1508 %%BeginProcSet: texc.pro %! --- 9,13 ---- %DVIPSCommandLine: dvips -D 300 -t letter -o readline.ps readline.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2002.06.27:1354 %%BeginProcSet: texc.pro %! *************** *** 85,90 **** 38E3801303A53870070038FC0FC0A215177F9614>77 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fd cmtt9 9 46 ! /Fd 46 127 df<126012F0AD12601200A4126012F0A212600417789614>33 D35 D77 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fd cmtt9 9 47 ! /Fd 47 127 df<126012F0AD12601200A4126012F0A212600417789614>33 D35 DI<12FCA2121CA51378EA1D FEEA1F86EA1E07121CAA38FF8FE0A21317809614>I<1206120FA21206C7FCA4B4FCA212 ! 07ACEAFFF8A20D187C9714>I<12FCA2121CA5EBFF80A2EB1C005B5B5BEA1DC0EA1FE0A2 ! EA1E70EA1C38133C131C7F38FF1F80A21117809614>107 DIIIIIIII<1206120EA4EA7FFC12FFEA ! 0E00A8130EA3131CEA07F8EA01F00F157F9414>II<38FE3F80A2383C1E00EA1C1CA36C5AA3EA0630EA0770A36C5AA311 ! 107F8F14>I<38FE3F80A238700700EA380EA3EA39CEA3EA1B6C121AA3EA1E7CA2EA0E38 ! 11107F8F14>II<38FE3F80A2381C0E005BA2120E5BA212071330A2EA03 ! 70A25B1201A25BA3485A12730077C7FC127E123C11187F8F14>II126 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmti9 9 1 --- 118,140 ---- 0F38E00380A438700700EA3C1EEA1FFCEA07F011197F8F14>I<12FCA2121CA51378EA1D FEEA1F86EA1E07121CAA38FF8FE0A21317809614>I<1206120FA21206C7FCA4B4FCA212 ! 07ACEAFFF8A20D187C9714>I<136013F0A213601300A4EA1FF0A2EA0070B2EA40E0EAE0 ! C0EA7F80EA3F000C207E9714>I<12FCA2121CA5EBFF80A2EB1C005B5B5BEA1DC0EA1FE0 ! A2EA1E70EA1C38133C131C7F38FF1F80A21117809614>IIIIIIIII<1206120EA4EA7FFC12FFEA0E ! 00A8130EA3131CEA07F8EA01F00F157F9414>II<38FE3F80A2383C1E00EA1C1CA36C5AA3EA0630EA0770A36C5AA31110 ! 7F8F14>I<38FE3F80A238700700EA380EA3EA39CEA3EA1B6C121AA3EA1E7CA2EA0E3811 ! 107F8F14>II<38FE3F80A2381C0E005BA2120E5BA212071330A2EA0370 ! A25B1201A25BA3485A12730077C7FC127E123C11187F8F14>II126 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmti9 9 1 *************** *** 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 --- 1132,1138 ---- %%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.3,)c(for)i ! Ft(Readline)f(Library)g Fu(V)l(ersion)i(4.3.)1643 811 ! y(Marc)o(h)e(2002)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 *************** *** 1162,1166 **** (translation)g(appro)o(v)o(ed)g(b)o(y)g(the)g(F)l(ree)h(Soft)o(w)o(are) d(F)l(oundation.)75 2661 y(Cop)o(yrigh)o(t)301 2660 y(c)289 ! 2661 y Fr(\015)h Fu(1988-2001)f(F)l(ree)i(Soft)o(w)o(are)f(F)l (oundation,)h(Inc.)p eop %%Page: 1 3 --- 1163,1167 ---- (translation)g(appro)o(v)o(ed)g(b)o(y)g(the)g(F)l(ree)h(Soft)o(w)o(are) d(F)l(oundation.)75 2661 y(Cop)o(yrigh)o(t)301 2660 y(c)289 ! 2661 y Fr(\015)h Fu(1988-2002)f(F)l(ree)i(Soft)o(w)o(are)f(F)l (oundation,)h(Inc.)p eop %%Page: 1 3 *************** *** 1490,1494 **** 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 --- 1491,1495 ---- 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(9\).)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 *************** *** 1617,1825 **** (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 10 11 bop 75 -58 a Fu(10)1299 b(GNU)15 b(Readline)h(Library)195 201 y Ft(#)24 b(This)f(file)g(controls)g(the)h(behaviour)e(of)i(line)f ! (input)g(editing)g(for)195 253 y(#)h(programs)e(that)i(use)f(the)h(Gnu) ! f(Readline)g(library.)47 b(Existing)22 b(programs)195 ! 305 y(#)i(include)f(FTP,)g(Bash,)g(and)h(Gdb.)195 357 ! y(#)195 409 y(#)g(You)f(can)h(re-read)f(the)g(inputrc)g(file)g(with)h ! (C-x)f(C-r.)195 461 y(#)h(Lines)f(beginning)g(with)g('#')g(are)h ! (comments.)195 513 y(#)195 565 y(#)g(First,)f(include)g(any)g ! (systemwide)g(bindings)f(and)i(variable)f(assignments)f(from)195 ! 616 y(#)i(/etc/Inputrc)195 668 y($include)f(/etc/Inputrc)195 ! 772 y(#)195 824 y(#)h(Set)f(various)g(bindings)g(for)g(emacs)g(mode.) ! 195 928 y(set)g(editing-mode)g(emacs)195 1032 y($if)g(mode=emacs)195 1135 y(Meta-Control-h:)46 b(backward-kill-word)21 b(Text)i(after)h(the) f(function)g(name)g(is)h(ignored)p 1986 1145 21 38 v --- 1618,1839 ---- (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(mark-symlinked-directories)555 ! 2012 y Fu(If)23 b(set)f(to)f(`)p Ft(on)p Fu(',)i(completed)g(names)g ! (whic)o(h)g(are)f(sym)o(b)q(olic)i(links)f(to)f(di-)555 ! 2067 y(rectories)h(ha)o(v)o(e)g(a)g(slash)g(app)q(ended)i(\(sub)s(ject) ! e(to)f(the)i(v)m(alue)g(of)f Ft(mark-)555 2122 y(directories)p ! Fu(\).)18 b(The)d(default)h(is)g(`)p Ft(off)p Fu('.)315 ! 2204 y Ft(match-hidden-files)555 2259 y Fu(This)c(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 2314 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 2369 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 ! 2423 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 ! 2506 y Ft(output-meta)555 2560 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 2615 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 ! 2670 y(default)16 b(is)f(`)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(page-completions)555 204 y Fu(If)17 ! b(set)g(to)f(`)p Ft(on)p Fu(',)g(Readline)i(uses)g(an)e(in)o(ternal)i ! Ft(more)p Fu(-lik)o(e)g(pager)f(to)f(displa)o(y)555 259 ! y(a)g(screenful)h(of)f(p)q(ossible)i(completions)f(at)f(a)g(time.)23 ! b(This)17 b(v)m(ariable)g(is)g(`)p Ft(on)p Fu(')555 314 ! y(b)o(y)e(default.)315 395 y Ft(print-completions-horizont)o(ally)555 ! 450 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 505 ! 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 560 y(The)15 b(default)h(is)g(`)p ! Ft(off)p Fu('.)315 641 y Ft(show-all-if-ambiguous)555 ! 696 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 751 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 806 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 861 y(The)c(default)h(v)m(alue)h(is)e(`)p Ft(off)p ! Fu('.)315 942 y Ft(visible-stats)555 997 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 1052 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 1133 y(Key)h(Bindings)315 1188 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 ! 1243 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 ! 1298 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 ! 1353 y(and)d(a)g(short)g(description)i(of)d(what)h(the)g(command)g(do)q ! (es.)315 1421 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 ! 1476 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 ! 1530 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 ! 1585 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 1653 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 1708 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 1790 y Fk(k)o(eyname)s ! Fu(:)19 b Fk(function-name)g Fu(or)c Fk(macro)555 1845 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 1910 y ! Ft(Control-u:)22 b(universal-argument)675 1962 y(Meta-Rubout:)g ! (backward-kill-word)675 2014 y(Control-o:)g(">)i(output")555 ! 2082 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 ! 2137 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 2191 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 2246 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 ! 2314 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 2369 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 2424 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 2506 y Ft(")p Fk(k)o(eyseq)q Ft(")p Fu(:)k Fk(function-name)e ! Fu(or)d Fk(macro)555 2560 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 2615 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 ! 2670 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)p eop %%Page: 8 10 ! 8 9 bop 75 -58 a Fu(8)1322 b(GNU)15 b(Readline)h(Library)555 ! 149 y(in)i(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 204 y(recognized.)675 ! 270 y Ft("\\C-u":)23 b(universal-argument)675 322 y("\\C-x\\C-r":)f ! (re-read-init-file)675 373 y("\\e[11~":)h("Function)f(Key)i(1")555 ! 442 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 ! 497 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 551 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 549 y Fn(h)p 1743 523 70 2 v 1743 ! 551 a Fm(ESC)p 1743 559 V 1810 549 a Fn(i)15 b(h)p 1852 ! 523 10 2 v 1852 551 a Fm([)p 1852 560 V 1860 549 a Fn(i)555 ! 604 y(h)p 567 578 18 2 v 567 606 a Fm(1)p 567 614 V 583 ! 604 a Fn(i)g(h)p 625 578 V 625 606 a Fm(1)p 625 614 V ! 640 604 a Fn(i)g(h)p 683 578 24 2 v 683 606 a Ft(~)p ! 683 614 V 704 604 a Fn(i)719 606 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 688 ! 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 ! 743 y(k)o(ey)g(sequences:)315 825 y Fo(\\C-)168 b Fu(con)o(trol)15 ! b(pre\014x)315 907 y Fo(\\M-)168 b Fu(meta)15 b(pre\014x)315 ! 989 y Fo(\\e)192 b Fu(an)15 b(escap)q(e)h(c)o(haracter)315 ! 1071 y Fo(\\\\)192 b Fu(bac)o(kslash)315 1152 y Fo(\\)p ! Ft(")555 1150 y Fn(h)p 567 1124 V 567 1152 a Ft(")p 567 ! 1160 V 589 1150 a Fn(i)604 1152 y Fu(,)15 b(a)f(double)j(quotation)e ! (mark)315 1234 y Fo(\\')555 1232 y Fn(h)p 567 1206 10 ! 2 v 567 1234 a Fm(')p 567 1242 V 575 1232 a Fn(i)590 ! 1234 y Fu(,)g(a)f(single)j(quote)e(or)g(ap)q(ostrophe)315 ! 1316 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 ! 1371 y(escap)q(es)i(is)g(a)o(v)m(ailable:)315 1453 y ! Ft(\\a)192 b Fu(alert)15 b(\(b)q(ell\))315 1535 y Ft(\\b)192 ! b Fu(bac)o(kspace)315 1617 y Ft(\\d)g Fu(delete)315 1699 ! y Ft(\\f)g Fu(form)14 b(feed)315 1781 y Ft(\\n)192 b ! Fu(newline)315 1862 y Ft(\\r)g Fu(carriage)15 b(return)315 ! 1944 y Ft(\\t)192 b Fu(horizon)o(tal)16 b(tab)315 2026 ! y Ft(\\v)192 b Fu(v)o(ertical)16 b(tab)315 2108 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 ! 2163 y(three)e(digits\))315 2245 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 2300 y Fu(\(one)15 ! b(or)g(t)o(w)o(o)f(hex)h(digits\))315 2382 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 2436 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 2491 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 2546 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 ! 2601 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 2666 y Ft("\\C-x\\\\":)23 ! b("\\\\")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)75 149 y Fj(1.3.2)30 b(Conditional)20 b(Init)g(Constructs)137 ! 246 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 ! 301 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 355 y(the)e(result)h(of)f(tests.)k(There)c(are)g(four)g(parser)g ! (directiv)o(es)h(used.)75 435 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 490 ! 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 545 ! 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 624 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 ! 679 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 ! 734 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 789 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 844 y(in)k Ft(emacs)f Fu(mo)q(de.)315 ! 923 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 ! 978 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 1033 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 1088 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 1142 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 ! 1197 y Ft(sun-cmd)p Fu(,)d(for)g(instance.)315 1277 y ! Ft(application)555 1332 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 ! 1386 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 1441 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 1496 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 1551 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 1606 y(the)f(curren)o(t)g(or)g(previous)h(w)o(ord)e(in)j ! (Bash:)675 1670 y Ft($if)23 b(Bash)675 1722 y(#)h(Quote)f(the)g ! (current)g(or)h(previous)f(word)675 1774 y("\\C-xq":)g ! ("\\eb\\"\\ef\\"")675 1826 y($endif)75 1905 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 1985 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 ! 2065 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 2120 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 2174 y(`)p Ft(/etc/inputrc)p Fu(':)435 2239 ! y Ft($include)k(/etc/inputrc)75 2351 y Fj(1.3.3)30 b(Sample)20 ! b(Init)h(File)137 2447 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 2502 y(and)f(conditional)i(syn)o(tax.) p eop %%Page: 10 12 10 11 bop 75 -58 a Fu(10)1299 b(GNU)15 b(Readline)h(Library)195 201 y Ft(#)24 b(This)f(file)g(controls)g(the)h(behaviour)e(of)i(line)f ! (input)g(editing)g(for)195 253 y(#)h(programs)e(that)i(use)f(the)h(GNU) ! f(Readline)g(library.)47 b(Existing)195 305 y(#)24 b(programs)e ! (include)h(FTP,)h(Bash,)f(and)g(GDB.)195 357 y(#)195 ! 409 y(#)h(You)f(can)h(re-read)f(the)g(inputrc)g(file)g(with)h(C-x)f ! (C-r.)195 461 y(#)h(Lines)f(beginning)g(with)g('#')g(are)h(comments.) ! 195 513 y(#)195 565 y(#)g(First,)f(include)g(any)g(systemwide)g ! (bindings)f(and)i(variable)195 616 y(#)g(assignments)e(from)h ! (/etc/Inputrc)195 668 y($include)g(/etc/Inputrc)195 772 ! y(#)195 824 y(#)h(Set)f(various)g(bindings)g(for)g(emacs)g(mode.)195 ! 928 y(set)g(editing-mode)g(emacs)195 1032 y($if)g(mode=emacs)195 1135 y(Meta-Control-h:)46 b(backward-kill-word)21 b(Text)i(after)h(the) f(function)g(name)g(is)h(ignored)p 1986 1145 21 38 v *************** *** 1849,2253 **** y($if)f(Bash)195 668 y(#)h(edit)f(the)g(path)195 720 y("\\C-xp":)g("PATH=${PATH}\\e\\C-e\\C-a\\)o(ef\\C-f")195 ! 772 y(#)h(prepare)f(to)g(type)h(a)f(quoted)g(word)h(--)f(insert)g(open) ! h(and)f(close)g(double)g(quotes)195 824 y(#)h(and)f(move)g(to)h(just)f ! (after)h(the)f(open)g(quote)195 876 y("\\C-x\\"":)g("\\"\\"\\C-b")195 ! 928 y(#)h(insert)f(a)g(backslash)g(\(testing)g(backslash)g(escapes)f ! (in)i(sequences)f(and)g(macros\))195 980 y("\\C-x\\\\":)g("\\\\")195 ! 1032 y(#)h(Quote)f(the)g(current)g(or)h(previous)f(word)195 ! 1083 y("\\C-xq":)g("\\eb\\"\\ef\\"")195 1135 y(#)h(Add)f(a)h(binding)f ! (to)g(refresh)g(the)h(line,)f(which)g(is)h(unbound)195 ! 1187 y("\\C-xr":)f(redraw-current-line)195 1239 y(#)h(Edit)f(variable)g ! (on)g(current)g(line.)195 1291 y("\\M-\\C-v":)f ! ("\\C-a\\C-k$\\C-y\\M-\\C-e\\C-a\\C-y=)o(")195 1343 y($endif)195 ! 1447 y(#)i(use)f(a)h(visible)f(bell)g(if)h(one)f(is)h(available)195 ! 1499 y(set)f(bell-style)g(visible)195 1602 y(#)h(don't)f(strip)g ! (characters)g(to)g(7)h(bits)f(when)h(reading)195 1654 ! y(set)f(input-meta)g(on)195 1758 y(#)h(allow)f(iso-latin1)f(characters) ! h(to)g(be)h(inserted)f(rather)g(than)g(converted)g(to)195 ! 1810 y(#)h(prefix-meta)e(sequences)195 1862 y(set)h(convert-meta)g(off) ! 195 1966 y(#)h(display)f(characters)f(with)h(the)h(eighth)f(bit)g(set)h ! (directly)f(rather)g(than)195 2017 y(#)h(as)f(meta-prefixed)f ! (characters)195 2069 y(set)h(output-meta)g(on)195 2173 ! y(#)h(if)f(there)g(are)h(more)f(than)h(150)f(possible)g(completions)f ! (for)i(a)f(word,)h(ask)f(the)195 2225 y(#)h(user)f(if)h(he)f(wants)g ! (to)h(see)f(all)h(of)f(them)195 2277 y(set)g(completion-query-items)e ! (150)195 2381 y(#)j(For)f(FTP)195 2433 y($if)g(Ftp)195 ! 2484 y("\\C-xg":)g("get)g(\\M-?")195 2536 y("\\C-xt":)g("put)g(\\M-?") ! 195 2588 y("\\M-.":)g(yank-last-arg)195 2640 y($endif)p ! eop %%Page: 12 14 ! 12 13 bop 75 -58 a Fu(12)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fs(1.4)33 b(Bindable)24 b(Readline)f(Commands)137 ! 247 y Fu(This)17 b(section)f(describ)q(es)h(Readline)g(commands)f(that) e(ma)o(y)h(b)q(e)i(b)q(ound)f(to)f(k)o(ey)h(sequences.)22 ! b(Com-)75 301 y(mand)15 b(names)g(without)h(an)f(accompan)o(ying)g(k)o (ey)g(sequence)i(are)e(un)o(b)q(ound)h(b)o(y)f(default.)137 ! 369 y(In)f(the)f(follo)o(wing)h(descriptions,)h Fk(p)q(oin)o(t)f Fu(refers)f(to)g(the)g(curren)o(t)g(cursor)f(p)q(osition,)j(and)e ! Fk(mark)i Fu(refers)75 424 y(to)k(a)g(cursor)g(p)q(osition)h(sa)o(v)o (ed)f(b)o(y)h(the)f Ft(set-mark)g Fu(command.)32 b(The)20 b(text)f(b)q(et)o(w)o(een)g(the)h(p)q(oin)o(t)g(and)75 ! 479 y(mark)15 b(is)g(referred)h(to)e(as)h(the)g Fk(region)p ! Fu(.)75 593 y Fj(1.4.1)30 b(Commands)21 b(F)-5 b(or)19 ! b(Mo)n(ving)75 716 y Ft(beginning-of-line)13 b(\(C-a\))315 ! 771 y Fu(Mo)o(v)o(e)h(to)h(the)g(start)f(of)h(the)g(curren)o(t)g(line.) ! 75 864 y Ft(end-of-line)f(\(C-e\))315 919 y Fu(Mo)o(v)o(e)g(to)h(the)g ! (end)h(of)f(the)g(line.)75 1012 y Ft(forward-char)f(\(C-f\))315 ! 1067 y Fu(Mo)o(v)o(e)g(forw)o(ard)g(a)h(c)o(haracter.)75 ! 1160 y Ft(backward-char)e(\(C-b\))315 1215 y Fu(Mo)o(v)o(e)h(bac)o(k)h ! (a)g(c)o(haracter.)75 1309 y Ft(forward-word)f(\(M-f\))315 ! 1363 y Fu(Mo)o(v)o(e)g(forw)o(ard)g(to)g(the)i(end)g(of)e(the)h(next)h (w)o(ord.)j(W)l(ords)c(are)f(comp)q(osed)i(of)f(letters)g(and)315 ! 1418 y(digits.)75 1512 y Ft(backward-word)e(\(M-b\))315 ! 1566 y Fu(Mo)o(v)o(e)j(bac)o(k)g(to)h(the)f(start)g(of)g(the)h(curren)o (t)g(or)f(previous)i(w)o(ord.)24 b(W)l(ords)16 b(are)h(comp)q(osed)315 ! 1621 y(of)e(letters)g(and)g(digits.)75 1715 y Ft(clear-screen)f ! (\(C-l\))315 1769 y Fu(Clear)f(the)h(screen)g(and)f(redra)o(w)g(the)g (curren)o(t)g(line,)i(lea)o(ving)g(the)e(curren)o(t)g(line)i(at)e(the)g ! (top)315 1824 y(of)i(the)g(screen.)75 1918 y Ft(redraw-current-line)e ! (\(\))315 1972 y Fu(Refresh)i(the)g(curren)o(t)g(line.)22 ! b(By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 2086 y Fj(1.4.2)30 b(Commands)21 b(F)-5 b(or)19 b(Manipulating)i(The)f ! (History)75 2209 y Ft(accept-line)14 b(\(Newline)g(or)h(Return\))315 ! 2264 y Fu(Accept)j(the)g(line)h(regardless)f(of)f(where)h(the)g(cursor) f(is.)27 b(If)18 b(this)g(line)h(is)g(non-empt)o(y)l(,)f(it)315 ! 2319 y(ma)o(y)d(b)q(e)i(added)f(to)g(the)g(history)g(list)g(for)g (future)g(recall)h(with)f Ft(add_history\(\))p Fu(.)k(If)d(this)315 ! 2374 y(line)g(is)f(a)e(mo)q(di\014ed)j(history)e(line,)i(the)e(history) g(line)i(is)f(restored)e(to)h(its)g(original)i(state.)75 ! 2467 y Ft(previous-history)c(\(C-p\))315 2522 y Fu(Mo)o(v)o(e)h(`bac)o (k')h(through)f(the)i(history)f(list,)g(fetc)o(hing)h(the)f(previous)h ! (command.)75 2615 y Ft(next-history)e(\(C-n\))315 2670 ! y Fu(Mo)o(v)o(e)g(`forw)o(ard')f(through)i(the)h(history)f(list,)g ! (fetc)o(hing)h(the)f(next)h(command.)p eop %%Page: 13 15 13 14 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(13)75 149 y Ft(beginning-of-history)12 b(\(M-<\))315 ! 204 y Fu(Mo)o(v)o(e)i(to)h(the)g(\014rst)g(line)i(in)f(the)f(history)l ! (.)75 307 y Ft(end-of-history)e(\(M->\))315 362 y Fu(Mo)o(v)o(e)h(to)h ! (the)g(end)h(of)f(the)g(input)h(history)l(,)f(i.e.,)g(the)g(line)i ! (curren)o(tly)f(b)q(eing)g(en)o(tered.)75 466 y Ft ! (reverse-search-history)c(\(C-r\))315 520 y Fu(Searc)o(h)k(bac)o(kw)o ! (ard)e(starting)h(at)g(the)h(curren)o(t)f(line)j(and)d(mo)o(ving)h ! (`up')f(through)g(the)h(his-)315 575 y(tory)e(as)h(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 678 ! y Ft(forward-search-history)c(\(C-s\))315 733 y Fu(Searc)o(h)j(forw)o (ard)e(starting)h(at)h(the)f(curren)o(t)h(line)h(and)f(mo)o(ving)g(`do) ! o(wn')f(through)g(the)h(the)315 788 y(history)g(as)g(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 891 y Ft(non-incremental-reverse-se)o(arch-hi)o(story)c(\(M-p\))315 ! 946 y Fu(Searc)o(h)k(bac)o(kw)o(ard)e(starting)h(at)g(the)h(curren)o(t) ! f(line)j(and)d(mo)o(ving)h(`up')f(through)g(the)h(his-)315 ! 1001 y(tory)h(as)h(necessary)g(using)h(a)e(non-incremen)o(tal)j(searc)o ! (h)e(for)f(a)h(string)g(supplied)i(b)o(y)e(the)315 1056 ! y(user.)75 1159 y Ft(non-incremental-forward-se)o(arch-hi)o(story)12 ! b(\(M-n\))315 1214 y Fu(Searc)o(h)j(forw)o(ard)e(starting)h(at)h(the)f (curren)o(t)h(line)h(and)f(mo)o(ving)g(`do)o(wn')f(through)g(the)h(the) ! 315 1268 y(history)e(as)g(necessary)h(using)g(a)f(non-incremen)o(tal)i (searc)o(h)e(for)g(a)g(string)g(supplied)j(b)o(y)d(the)315 ! 1323 y(user.)75 1427 y Ft(history-search-forward)f(\(\))315 ! 1481 y Fu(Searc)o(h)21 b(forw)o(ard)e(through)i(the)f(history)h(for)f (the)h(string)g(of)f(c)o(haracters)g(b)q(et)o(w)o(een)h(the)315 ! 1536 y(start)16 b(of)h(the)h(curren)o(t)g(line)h(and)e(the)h(p)q(oin)o (t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 ! b(By)315 1591 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 1694 y Ft(history-search-backward)c(\(\))315 1749 y Fu(Searc)o(h)18 b(bac)o(kw)o(ard)e(through)h(the)h(history)f(for)g(the)g(string)h(of)f ! (c)o(haracters)f(b)q(et)o(w)o(een)i(the)315 1804 y(start)e(of)h(the)h (curren)o(t)g(line)h(and)e(the)h(p)q(oin)o(t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 b(By)315 ! 1859 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 1962 y Ft(yank-nth-arg)e(\(M-C-y\))315 2017 y Fu(Insert)f(the)g (\014rst)g(argumen)o(t)f(to)g(the)i(previous)f(command)g(\(usually)h ! (the)f(second)h(w)o(ord)e(on)315 2071 y(the)j(previous)h(line\))g(at)e (p)q(oin)o(t.)21 b(With)15 b(an)g(argumen)o(t)f Fk(n)p Fu(,)h(insert)g(the)g Fk(n)p Fu(th)g(w)o(ord)g(from)f(the)315 ! 2126 y(previous)g(command)g(\(the)f(w)o(ords)f(in)j(the)e(previous)i (command)e(b)q(egin)i(with)e(w)o(ord)g(0\).)19 b(A)315 ! 2181 y(negativ)o(e)13 b(argumen)o(t)f(inserts)h(the)g Fk(n)p Fu(th)g(w)o(ord)f(from)g(the)h(end)h(of)e(the)h(previous)g ! (command.)75 2284 y Ft(yank-last-arg)g(\(M-.)i(or)g(M-_\))315 ! 2339 y Fu(Insert)j(last)f(argumen)o(t)g(to)g(the)g(previous)i(command)e ! (\(the)g(last)h(w)o(ord)f(of)g(the)g(previous)315 2394 y(history)e(en)o(try\).)20 b(With)15 b(an)g(argumen)o(t,)g(b)q(eha)o(v) o(e)g(exactly)h(lik)o(e)g Ft(yank-nth-arg)p Fu(.)j(Succes-)315 ! 2449 y(siv)o(e)f(calls)g(to)f Ft(yank-last-arg)e Fu(mo)o(v)o(e)i(bac)o (k)g(through)g(the)g(history)g(list,)i(inserting)f(the)315 ! 2503 y(last)d(argumen)o(t)g(of)f(eac)o(h)i(line)g(in)g(turn.)75 ! 2630 y Fj(1.4.3)30 b(Commands)21 b(F)-5 b(or)19 b(Changing)i(T)-5 ! b(ext)p eop %%Page: 14 16 14 15 bop 75 -58 a Fu(14)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Ft(delete-char)e(\(C-d\))315 204 y Fu(Delete)20 ! b(the)g(c)o(haracter)e(at)h(p)q(oin)o(t.)33 b(If)20 b(p)q(oin)o(t)g(is) ! g(at)e(the)i(b)q(eginning)i(of)d(the)g(line,)j(there)315 ! 259 y(are)c(no)h(c)o(haracters)e(in)j(the)e(line,)j(and)e(the)f(last)h ! (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 ! (the)g(line.)p eop %%Page: 15 17 15 16 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(15)75 149 y Ft(backward-kill-line)13 b(\(C-x)h(Rubout\))315 ! 204 y Fu(Kill)j(bac)o(kw)o(ard)e(to)f(the)i(b)q(eginning)h(of)e(the)g ! (line.)75 295 y Ft(unix-line-discard)e(\(C-u\))315 349 y Fu(Kill)k(bac)o(kw)o(ard)e(from)f(the)i(cursor)e(to)h(the)g(b)q ! (eginning)j(of)c(the)i(curren)o(t)f(line.)75 440 y Ft(kill-whole-line)e ! (\(\))315 495 y Fu(Kill)20 b(all)g(c)o(haracters)d(on)h(the)h(curren)o ! (t)f(line,)i(no)e(matter)g(where)g(p)q(oin)o(t)h(is.)29 ! b(By)19 b(default,)315 549 y(this)d(is)f(un)o(b)q(ound.)75 ! 640 y Ft(kill-word)f(\(M-d\))315 695 y Fu(Kill)j(from)d(p)q(oin)o(t)h (to)f(the)h(end)g(of)f(the)h(curren)o(t)g(w)o(ord,)e(or)i(if)g(b)q(et)o ! (w)o(een)g(w)o(ords,)e(to)i(the)f(end)315 750 y(of)h(the)g(next)g(w)o (ord.)20 b(W)l(ord)14 b(b)q(oundaries)j(are)e(the)g(same)g(as)g ! Ft(forward-word)p Fu(.)75 840 y Ft(backward-kill-word)e(\(M-)592 ! 838 y Fn(h)p 603 812 73 2 v 603 840 a Fm(DEL)p 603 848 ! V 674 838 a Fn(i)689 840 y Ft(\))315 895 y Fu(Kill)k(the)d(w)o(ord)g(b) ! q(ehind)i(p)q(oin)o(t.)21 b(W)l(ord)14 b(b)q(oundaries)h(are)f(the)h ! (same)f(as)g Ft(backward-word)p Fu(.)75 985 y Ft(unix-word-rubout)f ! (\(C-w\))315 1040 y Fu(Kill)18 b(the)e(w)o(ord)f(b)q(ehind)j(p)q(oin)o ! (t,)e(using)h(white)f(space)g(as)g(a)f(w)o(ord)g(b)q(oundary)l(.)23 ! b(The)16 b(killed)315 1095 y(text)f(is)g(sa)o(v)o(ed)g(on)g(the)h ! (kill-ring.)75 1185 y Ft(delete-horizontal-space)c(\(\))315 ! 1240 y Fu(Delete)k(all)g(spaces)f(and)h(tabs)e(around)i(p)q(oin)o(t.)k ! (By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 1330 ! y Ft(kill-region)e(\(\))315 1385 y Fu(Kill)j(the)f(text)e(in)i(the)g ! (curren)o(t)f(region.)20 b(By)15 b(default,)h(this)f(command)g(is)h(un) ! o(b)q(ound.)75 1476 y Ft(copy-region-as-kill)d(\(\))315 ! 1530 y Fu(Cop)o(y)j(the)i(text)e(in)i(the)f(region)g(to)g(the)g(kill)h (bu\013er,)f(so)g(it)g(can)g(b)q(e)h(y)o(ank)o(ed)f(righ)o(t)g(a)o(w)o ! (a)o(y)l(.)315 1585 y(By)e(default,)h(this)f(command)g(is)h(un)o(b)q ! (ound.)75 1676 y Ft(copy-backward-word)d(\(\))315 1730 y Fu(Cop)o(y)19 b(the)g(w)o(ord)g(b)q(efore)g(p)q(oin)o(t)h(to)e(the)i (kill)h(bu\013er.)32 b(The)19 b(w)o(ord)g(b)q(oundaries)h(are)f(the)315 ! 1785 y(same)c(as)g Ft(backward-word)p Fu(.)j(By)d(default,)g(this)h ! (command)f(is)h(un)o(b)q(ound.)75 1876 y Ft(copy-forward-word)d(\(\)) ! 315 1930 y Fu(Cop)o(y)i(the)h(w)o(ord)e(follo)o(wing)j(p)q(oin)o(t)f ! (to)f(the)g(kill)j(bu\013er.)i(The)c(w)o(ord)f(b)q(oundaries)i(are)e ! (the)315 1985 y(same)g(as)g Ft(forward-word)p Fu(.)j(By)d(default,)h ! (this)f(command)g(is)h(un)o(b)q(ound.)75 2076 y Ft(yank)f(\(C-y\))315 ! 2131 y Fu(Y)l(ank)g(the)h(top)f(of)f(the)i(kill)h(ring)e(in)o(to)g(the) ! h(bu\013er)f(at)f(p)q(oin)o(t.)75 2221 y Ft(yank-pop)g(\(M-y\))315 ! 2276 y Fu(Rotate)i(the)h(kill-ring,)j(and)d(y)o(ank)g(the)h(new)f(top.) ! 26 b(Y)l(ou)17 b(can)h(only)g(do)f(this)h(if)f(the)h(prior)315 ! 2331 y(command)d(is)h Ft(yank)e Fu(or)h Ft(yank-pop)p ! Fu(.)75 2441 y Fj(1.4.5)30 b(Sp)r(ecifying)20 b(Numeric)h(Argumen)n(ts) ! 75 2560 y Ft(digit-argument)13 b(\()p Fo(M-0)p Ft(,)i ! Fo(M-1)p Ft(,)f(...)h Fo(M--)p Ft(\))315 2615 y Fu(Add)f(this)g(digit)g ! (to)f(the)h(argumen)o(t)e(already)i(accum)o(ulating,)g(or)f(start)f(a)h ! (new)h(argumen)o(t.)315 2670 y Fo(M--)h Fu(starts)f(a)h(negativ)o(e)g ! (argumen)o(t.)p eop %%Page: 16 18 16 17 bop 75 -58 a Fu(16)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Ft(universal-argument)d(\(\))315 204 y Fu(This)g(is)h(another)e (w)o(a)o(y)g(to)g(sp)q(ecify)i(an)f(argumen)o(t.)18 b(If)13 b(this)g(command)g(is)g(follo)o(w)o(ed)g(b)o(y)g(one)315 ! 259 y(or)h(more)h(digits,)g(optionally)h(with)f(a)g(leading)h(min)o(us) ! f(sign,)g(those)g(digits)g(de\014ne)h(the)f(ar-)315 314 ! y(gumen)o(t.)k(If)c(the)g(command)f(is)h(follo)o(w)o(ed)g(b)o(y)g ! (digits,)g(executing)g Ft(universal-argument)315 369 y Fu(again)h(ends)g(the)g(n)o(umeric)h(argumen)o(t,)e(but)h(is)h (otherwise)f(ignored.)22 b(As)16 b(a)g(sp)q(ecial)h(case,)315 ! 423 y(if)g(this)g(command)f(is)h(immediately)h(follo)o(w)o(ed)f(b)o(y)f ! (a)g(c)o(haracter)g(that)g(is)h(neither)g(a)f(digit)315 ! 478 y(or)d(min)o(us)i(sign,)f(the)g(argumen)o(t)g(coun)o(t)f(for)h(the) ! g(next)g(command)g(is)g(m)o(ultiplied)j(b)o(y)d(four.)315 ! 533 y(The)19 b(argumen)o(t)f(coun)o(t)g(is)h(initially)j(one,)d(so)f (executing)i(this)f(function)h(the)e(\014rst)h(time)315 ! 588 y(mak)o(es)c(the)h(argumen)o(t)f(coun)o(t)h(four,)f(a)h(second)g (time)g(mak)o(es)g(the)g(argumen)o(t)f(coun)o(t)g(six-)315 ! 643 y(teen,)g(and)g(so)g(on.)20 b(By)15 b(default,)h(this)f(is)h(not)f ! (b)q(ound)h(to)f(a)g(k)o(ey)l(.)75 762 y Fj(1.4.6)30 b(Letting)20 b(Readline)g(T)n(yp)r(e)h(F)-5 b(or)19 b(Y)-5 ! b(ou)75 892 y Ft(complete)14 b(\()305 890 y Fn(h)p 317 ! 864 74 2 v 317 892 a Fm(T)m(AB)p 317 900 V 389 890 a ! Fn(i)404 892 y Ft(\))315 947 y Fu(A)o(ttempt)c(to)h(p)q(erform)g ! (completion)i(on)e(the)g(text)g(b)q(efore)h(p)q(oin)o(t.)19 ! b(The)11 b(actual)h(completion)315 1002 y(p)q(erformed)j(is)h (application-sp)q(eci\014)q(c.)23 b(The)15 b(default)h(is)g(\014lename) ! g(completion.)75 1099 y Ft(possible-completions)c(\(M-?\))315 ! 1154 y Fu(List)k(the)f(p)q(ossible)i(completions)f(of)f(the)g(text)g(b) ! q(efore)h(p)q(oin)o(t.)75 1251 y Ft(insert-completions)d(\(M-*\))315 ! 1306 y Fu(Insert)j(all)g(completions)g(of)f(the)g(text)g(b)q(efore)h(p) q(oin)o(t)f(that)g(w)o(ould)h(ha)o(v)o(e)f(b)q(een)h(generated)315 ! 1361 y(b)o(y)f Ft(possible-completions)p Fu(.)75 1458 ! y Ft(menu-complete)e(\(\))315 1513 y Fu(Similar)g(to)f Ft(complete)p Fu(,)f(but)h(replaces)h(the)f(w)o(ord)f(to)g(b)q(e)i ! (completed)f(with)h(a)e(single)j(matc)o(h)315 1568 y(from)k(the)h(list) h(of)e(p)q(ossible)j(completions.)32 b(Rep)q(eated)19 ! b(execution)h(of)f Ft(menu-complete)315 1623 y Fu(steps)h(through)g (the)g(list)h(of)f(p)q(ossible)i(completions,)g(inserting)f(eac)o(h)f ! (matc)o(h)f(in)i(turn.)315 1678 y(A)o(t)d(the)g(end)h(of)f(the)h(list)g (of)f(completions,)i(the)e(b)q(ell)j(is)d(rung)h(\(sub)s(ject)f(to)f ! (the)i(setting)315 1732 y(of)f Ft(bell-style)p Fu(\))e(and)i(the)g (original)h(text)f(is)g(restored.)28 b(An)19 b(argumen)o(t)e(of)g ! Fk(n)i Fu(mo)o(v)o(es)e Fk(n)315 1787 y Fu(p)q(ositions)h(forw)o(ard)e (in)j(the)e(list)h(of)f(matc)o(hes;)h(a)f(negativ)o(e)g(argumen)o(t)g ! (ma)o(y)g(b)q(e)h(used)g(to)315 1842 y(mo)o(v)o(e)g(bac)o(kw)o(ard)h (through)g(the)g(list.)32 b(This)20 b(command)f(is)h(in)o(tended)g(to)f ! (b)q(e)h(b)q(ound)g(to)315 1895 y Fn(h)p 327 1869 V 327 ! 1897 a Fm(T)m(AB)p 327 1905 V 399 1895 a Fn(i)414 1897 ! y Fu(,)15 b(but)g(is)h(un)o(b)q(ound)g(b)o(y)f(default.)75 ! 1994 y Ft(delete-char-or-list)e(\(\))315 2049 y Fu(Deletes)h(the)f(c)o ! (haracter)g(under)h(the)g(cursor)f(if)h(not)f(at)g(the)g(b)q(eginning)j ! (or)d(end)h(of)f(the)g(line)315 2104 y(\(lik)o(e)i Ft(delete-char)p ! Fu(\).)j(If)d(at)f(the)h(end)g(of)f(the)g(line,)i(b)q(eha)o(v)o(es)f ! (iden)o(tically)i(to)d Ft(possible-)315 2159 y(completions)p ! Fu(.)k(This)e(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.)75 ! 2278 y Fj(1.4.7)30 b(Keyb)r(oard)20 b(Macros)75 2408 ! y Ft(start-kbd-macro)13 b(\(C-x)i(\(\))315 2463 y Fu(Begin)h(sa)o(ving) ! f(the)h(c)o(haracters)e(t)o(yp)q(ed)i(in)o(to)f(the)g(curren)o(t)g(k)o ! (eyb)q(oard)g(macro.)75 2560 y Ft(end-kbd-macro)e(\(C-x)i(\)\))315 ! 2615 y Fu(Stop)f(sa)o(ving)f(the)h(c)o(haracters)f(t)o(yp)q(ed)h(in)o ! (to)f(the)h(curren)o(t)g(k)o(eyb)q(oard)f(macro)g(and)h(sa)o(v)o(e)f ! (the)315 2670 y(de\014nition.)p eop %%Page: 17 19 17 18 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(17)75 149 y Ft(call-last-kbd-macro)13 b(\(C-x)h(e\))315 ! 204 y Fu(Re-execute)k(the)g(last)f(k)o(eyb)q(oard)h(macro)f(de\014ned,) ! i(b)o(y)e(making)h(the)g(c)o(haracters)e(in)j(the)315 ! 259 y(macro)14 b(app)q(ear)i(as)f(if)g(t)o(yp)q(ed)h(at)e(the)i(k)o ! (eyb)q(oard.)75 368 y Fj(1.4.8)30 b(Some)20 b(Miscellaneous)h(Commands) ! 75 486 y Ft(re-read-init-file)13 b(\(C-x)h(C-r\))315 ! 541 y Fu(Read)d(in)g(the)g(con)o(ten)o(ts)g(of)f(the)h ! Fk(inputrc)k Fu(\014le,)d(and)g(incorp)q(orate)f(an)o(y)f(bindings)j ! (or)e(v)m(ariable)315 596 y(assignmen)o(ts)k(found)h(there.)75 ! 684 y Ft(abort)e(\(C-g\))315 739 y Fu(Ab)q(ort)f(the)g(curren)o(t)h (editing)g(command)f(and)h(ring)f(the)h(terminal's)f(b)q(ell)i(\(sub)s ! (ject)e(to)g(the)315 794 y(setting)i(of)g Ft(bell-style)p ! Fu(\).)75 883 y Ft(do-uppercase-version)d(\(M-a,)j(M-b,)f(M-)p ! Fk(x)p Ft(,)h(...\))315 938 y Fu(If)f(the)g(meta\014ed)g(c)o(haracter)f ! Fk(x)k Fu(is)d(lo)o(w)o(ercase,)g(run)g(the)g(command)f(that)h(is)g(b)q ! (ound)h(to)e(the)315 993 y(corresp)q(onding)j(upp)q(ercase)g(c)o ! (haracter.)75 1082 y Ft(prefix-meta)e(\()377 1080 y Fn(h)p ! 389 1054 70 2 v 389 1082 a Fm(ESC)p 389 1089 V 456 1080 ! a Fn(i)471 1082 y Ft(\))315 1136 y Fu(Metafy)k(the)h(next)g(c)o (haracter)f(t)o(yp)q(ed.)30 b(This)20 b(is)f(for)f(k)o(eyb)q(oards)h ! (without)g(a)f(meta)g(k)o(ey)l(.)315 1191 y(T)o(yping)e(`)485 ! 1189 y Fn(h)p 496 1163 V 496 1191 a Fm(ESC)p 496 1199 ! V 563 1189 a Fn(i)593 1191 y Ft(f)p Fu(')f(is)h(equiv)m(alen)o(t)h(to)d ! (t)o(yping)i Fo(M-f)p Fu(.)75 1280 y Ft(undo)f(\(C-_)f(or)h(C-x)g ! (C-u\))315 1335 y Fu(Incremen)o(tal)h(undo,)f(separately)h(remem)o(b)q ! (ered)g(for)e(eac)o(h)h(line.)75 1424 y Ft(revert-line)f(\(M-r\))315 ! 1479 y Fu(Undo)j(all)g(c)o(hanges)g(made)f(to)g(this)h(line.)26 b(This)17 b(is)g(lik)o(e)h(executing)f(the)g Ft(undo)f ! Fu(command)315 1533 y(enough)g(times)f(to)g(get)f(bac)o(k)h(to)g(the)g ! (b)q(eginning.)75 1622 y Ft(tilde-expand)f(\(M-~\))315 ! 1677 y Fu(P)o(erform)g(tilde)j(expansion)f(on)f(the)g(curren)o(t)g(w)o ! (ord.)75 1766 y Ft(set-mark)f(\(C-@\))315 1821 y Fu(Set)i(the)h(mark)f (to)f(the)i(p)q(oin)o(t.)24 b(If)17 b(a)f(n)o(umeric)h(argumen)o(t)f ! (is)g(supplied,)j(the)e(mark)e(is)i(set)315 1876 y(to)e(that)f(p)q ! (osition.)75 1965 y Ft(exchange-point-and-mark)e(\(C-x)j(C-x\))315 ! 2020 y Fu(Sw)o(ap)g(the)h(p)q(oin)o(t)g(with)g(the)g(mark.)k(The)c ! (curren)o(t)f(cursor)h(p)q(osition)g(is)g(set)g(to)f(the)g(sa)o(v)o(ed) ! 315 2074 y(p)q(osition,)h(and)f(the)h(old)f(cursor)g(p)q(osition)h(is)g ! (sa)o(v)o(ed)f(as)g(the)g(mark.)75 2163 y Ft(character-search)e ! (\(C-]\))315 2218 y Fu(A)f(c)o(haracter)g(is)h(read)g(and)f(p)q(oin)o ! (t)h(is)g(mo)o(v)o(ed)f(to)g(the)g(next)h(o)q(ccurrence)g(of)f(that)g ! (c)o(haracter.)315 2273 y(A)j(negativ)o(e)h(coun)o(t)f(searc)o(hes)g ! (for)f(previous)i(o)q(ccurrences.)75 2362 y Ft ! (character-search-backward)c(\(M-C-]\))315 2417 y Fu(A)22 ! b(c)o(haracter)g(is)h(read)f(and)h(p)q(oin)o(t)g(is)g(mo)o(v)o(ed)f(to) ! g(the)g(previous)h(o)q(ccurrence)h(of)e(that)315 2471 ! y(c)o(haracter.)d(A)c(negativ)o(e)h(coun)o(t)f(searc)o(hes)g(for)f ! (subsequen)o(t)i(o)q(ccurrences.)75 2560 y Ft(insert-comment)d(\(M-#\)) ! 315 2615 y Fu(The)19 b(v)m(alue)i(of)e(the)g Ft(comment-begin)e ! Fu(v)m(ariable)k(is)f(inserted)g(at)e(the)i(b)q(eginning)h(of)e(the)315 ! 2670 y(curren)o(t)c(line,)i(and)e(the)g(line)i(is)f(accepted)g(as)e(if) ! i(a)f(newline)i(had)f(b)q(een)g(t)o(yp)q(ed.)p eop %%Page: 18 20 18 19 bop 75 -58 a Fu(18)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Ft(dump-functions)d(\(\))315 204 y Fu(Prin)o(t)g(all)h(of)f(the)g (functions)h(and)g(their)g(k)o(ey)f(bindings)i(to)d(the)i(Readline)g ! (output)f(stream.)315 259 y(If)j(a)g(n)o(umeric)g(argumen)o(t)f(is)i (supplied,)h(the)e(output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o ! (y)f(that)315 314 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fk(inputrc)k Fu(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o ! (y)f(default.)75 406 y Ft(dump-variables)e(\(\))315 461 ! y Fu(Prin)o(t)e(all)g(of)f(the)h(settable)g(v)m(ariables)h(and)f(their) ! g(v)m(alues)h(to)e(the)h(Readline)h(output)e(stream.)315 ! 516 y(If)16 b(a)g(n)o(umeric)g(argumen)o(t)f(is)i(supplied,)h(the)e (output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o(y)f(that)315 ! 570 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fk(inputrc)k Fu(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.) ! 75 663 y Ft(dump-macros)f(\(\))315 717 y Fu(Prin)o(t)j(all)h(of)e(the)h ! (Readline)h(k)o(ey)f(sequences)h(b)q(ound)g(to)e(macros)g(and)h(the)g ! (strings)g(they)315 772 y(output.)26 b(If)18 b(a)f(n)o(umeric)h (argumen)o(t)f(is)h(supplied,)i(the)d(output)g(is)h(formatted)e(in)j ! (suc)o(h)e(a)315 827 y(w)o(a)o(y)d(that)g(it)i(can)f(b)q(e)g(made)g (part)g(of)f(an)h Fk(inputrc)k Fu(\014le.)i(This)15 b(command)g(is)h ! (un)o(b)q(ound)g(b)o(y)315 882 y(default.)75 1010 y Fs(1.5)33 ! b(Readline)23 b(vi)h(Mo)r(de)137 1107 y Fu(While)13 b(the)f(Readline)i ! (library)e(do)q(es)g(not)g(ha)o(v)o(e)f(a)h(full)h(set)f(of)f ! Ft(vi)g Fu(editing)j(functions,)f(it)f(do)q(es)g(con)o(tain)75 ! 1161 y(enough)17 b(to)g(allo)o(w)g(simple)h(editing)h(of)d(the)i(line.) ! 27 b(The)17 b(Readline)h Ft(vi)f Fu(mo)q(de)g(b)q(eha)o(v)o(es)g(as)g ! (sp)q(eci\014ed)i(in)75 1216 y(the)c Fp(posix)g Fu(1003.2)f(standard.) ! 137 1284 y(In)h(order)g(to)f(switc)o(h)g(in)o(teractiv)o(ely)i(b)q(et)o ! (w)o(een)f Ft(emacs)e Fu(and)i Ft(vi)f Fu(editing)i(mo)q(des,)f(use)f ! (the)h(command)75 1338 y Fo(M-C-j)j Fu(\(b)q(ound)i(to)e ! (emacs-editing-mo)q(de)j(when)e(in)h Ft(vi)f Fu(mo)q(de)g(and)g(to)f ! (vi-editing-mo)q(de)k(in)e Ft(emacs)75 1393 y Fu(mo)q(de\).)g(The)15 ! b(Readline)i(default)f(is)f Ft(emacs)g Fu(mo)q(de.)137 ! 1460 y(When)h(y)o(ou)e(en)o(ter)h(a)g(line)i(in)e Ft(vi)g ! Fu(mo)q(de,)g(y)o(ou)g(are)f(already)i(placed)g(in)g(`insertion')f(mo)q ! (de,)g(as)g(if)g(y)o(ou)75 1515 y(had)e(t)o(yp)q(ed)h(an)f(`)p ! Ft(i)p Fu('.)18 b(Pressing)608 1513 y Fn(h)p 620 1487 ! 70 2 v 620 1515 a Fm(ESC)p 620 1523 V 687 1513 a Fn(i)715 ! 1515 y Fu(switc)o(hes)13 b(y)o(ou)g(in)o(to)g(`command')f(mo)q(de,)i ! (where)f(y)o(ou)g(can)g(edit)h(the)75 1570 y(text)i(of)h(the)g(line)h ! (with)g(the)f(standard)f Ft(vi)h Fu(mo)o(v)o(emen)o(t)f(k)o(eys,)g(mo)o ! (v)o(e)g(to)h(previous)g(history)g(lines)i(with)75 1625 ! y(`)p Ft(k)p Fu(')14 b(and)i(subsequen)o(t)f(lines)i(with)f(`)p ! Ft(j)p Fu(',)e(and)h(so)g(forth.)p eop %%Page: 19 21 ! 19 20 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(19)75 149 y Fq(2)41 b(Programming)28 b(with)e(GNU)i(Readline)137 267 y Fu(This)18 b(c)o(hapter)f(describ)q (es)h(the)f(in)o(terface)g(b)q(et)o(w)o(een)h(the)f Fp(gnu)g --- 1863,2302 ---- y($if)f(Bash)195 668 y(#)h(edit)f(the)g(path)195 720 y("\\C-xp":)g("PATH=${PATH}\\e\\C-e\\C-a\\)o(ef\\C-f")195 ! 772 y(#)h(prepare)f(to)g(type)h(a)f(quoted)g(word)h(--)195 ! 824 y(#)g(insert)f(open)g(and)h(close)f(double)g(quotes)195 ! 876 y(#)h(and)f(move)g(to)h(just)f(after)h(the)f(open)g(quote)195 ! 928 y("\\C-x\\"":)g("\\"\\"\\C-b")195 980 y(#)h(insert)f(a)g(backslash) ! g(\(testing)g(backslash)g(escapes)195 1032 y(#)h(in)f(sequences)g(and)g ! (macros\))195 1083 y("\\C-x\\\\":)g("\\\\")195 1135 y(#)h(Quote)f(the)g ! (current)g(or)h(previous)f(word)195 1187 y("\\C-xq":)g ! ("\\eb\\"\\ef\\"")195 1239 y(#)h(Add)f(a)h(binding)f(to)g(refresh)g ! (the)h(line,)f(which)g(is)h(unbound)195 1291 y("\\C-xr":)f ! (redraw-current-line)195 1343 y(#)h(Edit)f(variable)g(on)g(current)g ! (line.)195 1395 y("\\M-\\C-v":)f("\\C-a\\C-k$\\C-y\\M-\\C-e\\C-a\\C-y=) ! o(")195 1447 y($endif)195 1550 y(#)i(use)f(a)h(visible)f(bell)g(if)h ! (one)f(is)h(available)195 1602 y(set)f(bell-style)g(visible)195 ! 1706 y(#)h(don't)f(strip)g(characters)g(to)g(7)h(bits)f(when)h(reading) ! 195 1758 y(set)f(input-meta)g(on)195 1862 y(#)h(allow)f(iso-latin1)f ! (characters)h(to)g(be)h(inserted)f(rather)195 1914 y(#)h(than)f ! (converted)g(to)g(prefix-meta)g(sequences)195 1966 y(set)g ! (convert-meta)g(off)195 2069 y(#)h(display)f(characters)f(with)h(the)h ! (eighth)f(bit)g(set)h(directly)195 2121 y(#)g(rather)f(than)g(as)h ! (meta-prefixed)e(characters)195 2173 y(set)h(output-meta)g(on)195 ! 2277 y(#)h(if)f(there)g(are)h(more)f(than)h(150)f(possible)g ! (completions)f(for)195 2329 y(#)i(a)f(word,)h(ask)f(the)h(user)f(if)g ! (he)h(wants)f(to)h(see)f(all)h(of)f(them)195 2381 y(set)g ! (completion-query-items)e(150)195 2484 y(#)j(For)f(FTP)195 ! 2536 y($if)g(Ftp)195 2588 y("\\C-xg":)g("get)g(\\M-?")195 ! 2640 y("\\C-xt":)g("put)g(\\M-?")p eop %%Page: 12 14 ! 12 13 bop 75 -58 a Fu(12)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y Ft("\\M-.":)23 b(yank-last-arg)195 201 y($endif)75 ! 329 y Fs(1.4)33 b(Bindable)24 b(Readline)f(Commands)137 ! 425 y Fu(This)17 b(section)f(describ)q(es)h(Readline)g(commands)f(that) e(ma)o(y)h(b)q(e)i(b)q(ound)f(to)f(k)o(ey)h(sequences.)22 ! b(Com-)75 480 y(mand)15 b(names)g(without)h(an)f(accompan)o(ying)g(k)o (ey)g(sequence)i(are)e(un)o(b)q(ound)h(b)o(y)f(default.)137 ! 547 y(In)f(the)f(follo)o(wing)h(descriptions,)h Fk(p)q(oin)o(t)f Fu(refers)f(to)g(the)g(curren)o(t)g(cursor)f(p)q(osition,)j(and)e ! Fk(mark)i Fu(refers)75 601 y(to)k(a)g(cursor)g(p)q(osition)h(sa)o(v)o (ed)f(b)o(y)h(the)f Ft(set-mark)g Fu(command.)32 b(The)20 b(text)f(b)q(et)o(w)o(een)g(the)h(p)q(oin)o(t)g(and)75 ! 656 y(mark)15 b(is)g(referred)h(to)e(as)h(the)g Fk(region)p ! Fu(.)75 767 y Fj(1.4.1)30 b(Commands)21 b(F)-5 b(or)19 ! b(Mo)n(ving)75 888 y Ft(beginning-of-line)13 b(\(C-a\))315 ! 942 y Fu(Mo)o(v)o(e)h(to)h(the)g(start)f(of)h(the)g(curren)o(t)g(line.) ! 75 1034 y Ft(end-of-line)f(\(C-e\))315 1088 y Fu(Mo)o(v)o(e)g(to)h(the) ! g(end)h(of)f(the)g(line.)75 1179 y Ft(forward-char)f(\(C-f\))315 ! 1234 y Fu(Mo)o(v)o(e)g(forw)o(ard)g(a)h(c)o(haracter.)75 ! 1325 y Ft(backward-char)e(\(C-b\))315 1380 y Fu(Mo)o(v)o(e)h(bac)o(k)h ! (a)g(c)o(haracter.)75 1471 y Ft(forward-word)f(\(M-f\))315 ! 1526 y Fu(Mo)o(v)o(e)g(forw)o(ard)g(to)g(the)i(end)g(of)e(the)h(next)h (w)o(ord.)j(W)l(ords)c(are)f(comp)q(osed)i(of)f(letters)g(and)315 ! 1581 y(digits.)75 1672 y Ft(backward-word)e(\(M-b\))315 ! 1727 y Fu(Mo)o(v)o(e)j(bac)o(k)g(to)h(the)f(start)g(of)g(the)h(curren)o (t)g(or)f(previous)i(w)o(ord.)24 b(W)l(ords)16 b(are)h(comp)q(osed)315 ! 1782 y(of)e(letters)g(and)g(digits.)75 1873 y Ft(clear-screen)f ! (\(C-l\))315 1928 y Fu(Clear)f(the)h(screen)g(and)f(redra)o(w)g(the)g (curren)o(t)g(line,)i(lea)o(ving)g(the)e(curren)o(t)g(line)i(at)e(the)g ! (top)315 1982 y(of)i(the)g(screen.)75 2074 y Ft(redraw-current-line)e ! (\(\))315 2128 y Fu(Refresh)i(the)g(curren)o(t)g(line.)22 ! b(By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 2239 y Fj(1.4.2)30 b(Commands)21 b(F)-5 b(or)19 b(Manipulating)i(The)f ! (History)75 2360 y Ft(accept-line)14 b(\(Newline)g(or)h(Return\))315 ! 2414 y Fu(Accept)j(the)g(line)h(regardless)f(of)f(where)h(the)g(cursor) f(is.)27 b(If)18 b(this)g(line)h(is)g(non-empt)o(y)l(,)f(it)315 ! 2469 y(ma)o(y)d(b)q(e)i(added)f(to)g(the)g(history)g(list)g(for)g (future)g(recall)h(with)f Ft(add_history\(\))p Fu(.)k(If)d(this)315 ! 2524 y(line)g(is)f(a)e(mo)q(di\014ed)j(history)e(line,)i(the)e(history) g(line)i(is)f(restored)e(to)h(its)g(original)i(state.)75 ! 2615 y Ft(previous-history)c(\(C-p\))315 2670 y Fu(Mo)o(v)o(e)h(`bac)o (k')h(through)f(the)i(history)f(list,)g(fetc)o(hing)h(the)f(previous)h ! (command.)p eop %%Page: 13 15 13 14 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(13)75 149 y Ft(next-history)14 b(\(C-n\))315 204 y ! Fu(Mo)o(v)o(e)g(`forw)o(ard')f(through)i(the)h(history)f(list,)g(fetc)o ! (hing)h(the)f(next)h(command.)75 307 y Ft(beginning-of-history)c ! (\(M-<\))315 362 y Fu(Mo)o(v)o(e)i(to)h(the)g(\014rst)g(line)i(in)f ! (the)f(history)l(.)75 465 y Ft(end-of-history)e(\(M->\))315 ! 520 y Fu(Mo)o(v)o(e)h(to)h(the)g(end)h(of)f(the)g(input)h(history)l(,)f ! (i.e.,)g(the)g(line)i(curren)o(tly)f(b)q(eing)g(en)o(tered.)75 ! 624 y Ft(reverse-search-history)c(\(C-r\))315 678 y Fu(Searc)o(h)k(bac) ! o(kw)o(ard)e(starting)h(at)g(the)h(curren)o(t)f(line)j(and)d(mo)o(ving) ! h(`up')f(through)g(the)h(his-)315 733 y(tory)e(as)h(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 836 ! y Ft(forward-search-history)c(\(C-s\))315 891 y Fu(Searc)o(h)j(forw)o (ard)e(starting)h(at)h(the)f(curren)o(t)h(line)h(and)f(mo)o(ving)g(`do) ! o(wn')f(through)g(the)h(the)315 946 y(history)g(as)g(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 1049 y Ft(non-incremental-reverse-se)o(arch-hi)o(story)c(\(M-p\))315 ! 1104 y Fu(Searc)o(h)k(bac)o(kw)o(ard)e(starting)h(at)g(the)h(curren)o ! (t)f(line)j(and)d(mo)o(ving)h(`up')f(through)g(the)h(his-)315 ! 1159 y(tory)h(as)h(necessary)g(using)h(a)e(non-incremen)o(tal)j(searc)o ! (h)e(for)f(a)h(string)g(supplied)i(b)o(y)e(the)315 1214 ! y(user.)75 1317 y Ft(non-incremental-forward-se)o(arch-hi)o(story)12 ! b(\(M-n\))315 1372 y Fu(Searc)o(h)j(forw)o(ard)e(starting)h(at)h(the)f (curren)o(t)h(line)h(and)f(mo)o(ving)g(`do)o(wn')f(through)g(the)h(the) ! 315 1426 y(history)e(as)g(necessary)h(using)g(a)f(non-incremen)o(tal)i (searc)o(h)e(for)g(a)g(string)g(supplied)j(b)o(y)d(the)315 ! 1481 y(user.)75 1584 y Ft(history-search-forward)f(\(\))315 ! 1639 y Fu(Searc)o(h)21 b(forw)o(ard)e(through)i(the)f(history)h(for)f (the)h(string)g(of)f(c)o(haracters)g(b)q(et)o(w)o(een)h(the)315 ! 1694 y(start)16 b(of)h(the)h(curren)o(t)g(line)h(and)e(the)h(p)q(oin)o (t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 ! b(By)315 1749 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 1852 y Ft(history-search-backward)c(\(\))315 1907 y Fu(Searc)o(h)18 b(bac)o(kw)o(ard)e(through)h(the)h(history)f(for)g(the)g(string)h(of)f ! (c)o(haracters)f(b)q(et)o(w)o(een)i(the)315 1962 y(start)e(of)h(the)h (curren)o(t)g(line)h(and)e(the)h(p)q(oin)o(t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 b(By)315 ! 2016 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 2120 y Ft(yank-nth-arg)e(\(M-C-y\))315 2174 y Fu(Insert)f(the)g (\014rst)g(argumen)o(t)f(to)g(the)i(previous)f(command)g(\(usually)h ! (the)f(second)h(w)o(ord)e(on)315 2229 y(the)j(previous)h(line\))g(at)e (p)q(oin)o(t.)21 b(With)15 b(an)g(argumen)o(t)f Fk(n)p Fu(,)h(insert)g(the)g Fk(n)p Fu(th)g(w)o(ord)g(from)f(the)315 ! 2284 y(previous)g(command)g(\(the)f(w)o(ords)f(in)j(the)e(previous)i (command)e(b)q(egin)i(with)e(w)o(ord)g(0\).)19 b(A)315 ! 2339 y(negativ)o(e)13 b(argumen)o(t)f(inserts)h(the)g Fk(n)p Fu(th)g(w)o(ord)f(from)g(the)h(end)h(of)e(the)h(previous)g ! (command.)75 2442 y Ft(yank-last-arg)g(\(M-.)i(or)g(M-_\))315 ! 2497 y Fu(Insert)j(last)f(argumen)o(t)g(to)g(the)g(previous)i(command)e ! (\(the)g(last)h(w)o(ord)f(of)g(the)g(previous)315 2552 y(history)e(en)o(try\).)20 b(With)15 b(an)g(argumen)o(t,)g(b)q(eha)o(v) o(e)g(exactly)h(lik)o(e)g Ft(yank-nth-arg)p Fu(.)j(Succes-)315 ! 2606 y(siv)o(e)f(calls)g(to)f Ft(yank-last-arg)e Fu(mo)o(v)o(e)i(bac)o (k)g(through)g(the)g(history)g(list,)i(inserting)f(the)315 ! 2661 y(last)d(argumen)o(t)g(of)f(eac)o(h)i(line)g(in)g(turn.)p ! eop %%Page: 14 16 14 15 bop 75 -58 a Fu(14)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fj(1.4.3)30 b(Commands)21 b(F)-5 b(or)19 b(Changing)i(T)-5 ! b(ext)75 286 y Ft(delete-char)14 b(\(C-d\))315 341 y ! Fu(Delete)20 b(the)g(c)o(haracter)e(at)h(p)q(oin)o(t.)33 ! b(If)20 b(p)q(oin)o(t)g(is)g(at)e(the)i(b)q(eginning)i(of)d(the)g ! (line,)j(there)315 396 y(are)c(no)h(c)o(haracters)e(in)j(the)e(line,)j ! (and)e(the)f(last)h(c)o(haracter)e(t)o(yp)q(ed)i(w)o(as)f(not)g(b)q ! (ound)i(to)315 450 y Ft(delete-char)p Fu(,)13 b(then)j(return)f ! Fp(eof)p Fu(.)75 552 y Ft(backward-delete-char)d(\(Rubout\))315 ! 607 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 ! 661 y(c)o(haracters)d(instead)i(of)f(deleting)i(them.)75 ! 763 y Ft(forward-backward-delete-ch)o(ar)12 b(\(\))315 ! 818 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 ! 872 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 ! 927 y(is)f(not)f(b)q(ound)h(to)e(a)h(k)o(ey)l(.)75 1029 ! y Ft(quoted-insert)e(\(C-q)i(or)g(C-v\))315 1083 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 1138 y(sequences)f(lik)o(e)h Fo(C-q)p Fu(,)d(for)h(example.)75 ! 1240 y Ft(tab-insert)f(\(M-)401 1238 y Fn(h)p 412 1212 ! 74 2 v 412 1240 a Fm(T)m(AB)p 412 1247 V 484 1238 a Fn(i)499 ! 1240 y Ft(\))315 1294 y Fu(Insert)h(a)g(tab)g(c)o(haracter.)75 ! 1396 y Ft(self-insert)f(\(a,)g(b,)h(A,)g(1,)g(!,)g(...)o(\))315 ! 1451 y Fu(Insert)g(y)o(ourself.)75 1552 y Ft(transpose-chars)e(\(C-t\)) ! 315 1607 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 ! 1662 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 1716 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 1771 y(ha)o(v)o(e)k(no)g(e\013ect.)75 ! 1873 y Ft(transpose-words)e(\(M-t\))315 1927 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 1982 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 2037 y(last)h(t)o(w)o(o)f(w)o(ords)g(on)i(the)f(line.)75 ! 2138 y Ft(upcase-word)f(\(M-u\))315 2193 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 2248 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 2349 y Ft(downcase-word)d(\(M-l\))315 2404 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 2459 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 2560 y Ft(capitalize-word)e(\(M-c\))315 ! 2615 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 ! 2670 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.)p eop %%Page: 15 17 15 16 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(15)75 149 y Ft(overwrite-mode)13 b(\(\))315 204 y Fu(T)l(oggle)j(o)o ! (v)o(erwrite)g(mo)q(de.)24 b(With)17 b(an)f(explicit)j(p)q(ositiv)o(e)f ! (n)o(umeric)f(argumen)o(t,)f(switc)o(hes)315 259 y(to)10 ! b(o)o(v)o(erwrite)g(mo)q(de.)19 b(With)11 b(an)g(explicit)i(non-p)q ! (ositiv)o(e)f(n)o(umeric)g(argumen)o(t,)e(switc)o(hes)i(to)315 ! 314 y(insert)k(mo)q(de.)k(This)c(command)f(a\013ects)g(only)h ! Ft(emacs)e Fu(mo)q(de;)h Ft(vi)g Fu(mo)q(de)h(do)q(es)g(o)o(v)o ! (erwrite)315 369 y(di\013eren)o(tly)l(.)21 b(Eac)o(h)15 ! b(call)h(to)f Ft(readline\(\))f Fu(starts)f(in)k(insert)e(mo)q(de.)315 ! 436 y(In)g(o)o(v)o(erwrite)f(mo)q(de,)h(c)o(haracters)f(b)q(ound)h(to)f ! Ft(self-insert)f Fu(replace)j(the)e(text)h(at)e(p)q(oin)o(t)315 ! 491 y(rather)20 b(than)h(pushing)h(the)f(text)f(to)g(the)h(righ)o(t.)36 ! b(Characters)20 b(b)q(ound)i(to)e Ft(backward-)315 546 ! y(delete-char)14 b Fu(replace)i(the)f(c)o(haracter)g(b)q(efore)g(p)q ! (oin)o(t)h(with)f(a)g(space.)315 614 y(By)g(default,)h(this)f(command)g ! (is)h(un)o(b)q(ound.)75 729 y Fj(1.4.4)30 b(Killing)20 ! b(And)h(Y)-5 b(anking)75 853 y Ft(kill-line)14 b(\(C-k\))315 ! 908 y Fu(Kill)j(the)f(text)e(from)h(p)q(oin)o(t)h(to)e(the)h(end)h(of)f ! (the)g(line.)75 1002 y Ft(backward-kill-line)e(\(C-x)h(Rubout\))315 ! 1057 y Fu(Kill)j(bac)o(kw)o(ard)e(to)f(the)i(b)q(eginning)h(of)e(the)g ! (line.)75 1151 y Ft(unix-line-discard)e(\(C-u\))315 1205 y Fu(Kill)k(bac)o(kw)o(ard)e(from)f(the)i(cursor)e(to)h(the)g(b)q ! (eginning)j(of)c(the)i(curren)o(t)f(line.)75 1299 y Ft(kill-whole-line) ! e(\(\))315 1354 y Fu(Kill)20 b(all)g(c)o(haracters)d(on)h(the)h(curren) ! o(t)f(line,)i(no)e(matter)g(where)g(p)q(oin)o(t)h(is.)29 ! b(By)19 b(default,)315 1409 y(this)d(is)f(un)o(b)q(ound.)75 ! 1503 y Ft(kill-word)f(\(M-d\))315 1558 y Fu(Kill)j(from)d(p)q(oin)o(t)h (to)f(the)h(end)g(of)f(the)h(curren)o(t)g(w)o(ord,)e(or)i(if)g(b)q(et)o ! (w)o(een)g(w)o(ords,)e(to)i(the)f(end)315 1613 y(of)h(the)g(next)g(w)o (ord.)20 b(W)l(ord)14 b(b)q(oundaries)j(are)e(the)g(same)g(as)g ! Ft(forward-word)p Fu(.)75 1707 y Ft(backward-kill-word)e(\(M-)592 ! 1705 y Fn(h)p 603 1679 73 2 v 603 1707 a Fm(DEL)p 603 ! 1714 V 674 1705 a Fn(i)689 1707 y Ft(\))315 1761 y Fu(Kill)k(the)d(w)o ! (ord)g(b)q(ehind)i(p)q(oin)o(t.)21 b(W)l(ord)14 b(b)q(oundaries)h(are)f ! (the)h(same)f(as)g Ft(backward-word)p Fu(.)75 1855 y ! Ft(unix-word-rubout)f(\(C-w\))315 1910 y Fu(Kill)18 b(the)e(w)o(ord)f ! (b)q(ehind)j(p)q(oin)o(t,)e(using)h(white)f(space)g(as)g(a)f(w)o(ord)g ! (b)q(oundary)l(.)23 b(The)16 b(killed)315 1965 y(text)f(is)g(sa)o(v)o ! (ed)g(on)g(the)h(kill-ring.)75 2059 y Ft(delete-horizontal-space)c ! (\(\))315 2114 y Fu(Delete)k(all)g(spaces)f(and)h(tabs)e(around)i(p)q ! (oin)o(t.)k(By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 ! 2208 y Ft(kill-region)e(\(\))315 2263 y Fu(Kill)j(the)f(text)e(in)i ! (the)g(curren)o(t)f(region.)20 b(By)15 b(default,)h(this)f(command)g ! (is)h(un)o(b)q(ound.)75 2357 y Ft(copy-region-as-kill)d(\(\))315 ! 2412 y Fu(Cop)o(y)j(the)i(text)e(in)i(the)f(region)g(to)g(the)g(kill)h (bu\013er,)f(so)g(it)g(can)g(b)q(e)h(y)o(ank)o(ed)f(righ)o(t)g(a)o(w)o ! (a)o(y)l(.)315 2466 y(By)e(default,)h(this)f(command)g(is)h(un)o(b)q ! (ound.)75 2560 y Ft(copy-backward-word)d(\(\))315 2615 y Fu(Cop)o(y)19 b(the)g(w)o(ord)g(b)q(efore)g(p)q(oin)o(t)h(to)e(the)i (kill)h(bu\013er.)32 b(The)19 b(w)o(ord)g(b)q(oundaries)h(are)f(the)315 ! 2670 y(same)c(as)g Ft(backward-word)p Fu(.)j(By)d(default,)g(this)h ! (command)f(is)h(un)o(b)q(ound.)p eop %%Page: 16 18 16 17 bop 75 -58 a Fu(16)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Ft(copy-forward-word)d(\(\))315 204 y Fu(Cop)o(y)i(the)h(w)o(ord) ! e(follo)o(wing)j(p)q(oin)o(t)f(to)f(the)g(kill)j(bu\013er.)i(The)c(w)o ! (ord)f(b)q(oundaries)i(are)e(the)315 259 y(same)g(as)g ! Ft(forward-word)p Fu(.)j(By)d(default,)h(this)f(command)g(is)h(un)o(b)q ! (ound.)75 342 y Ft(yank)f(\(C-y\))315 397 y Fu(Y)l(ank)g(the)h(top)f ! (of)f(the)i(kill)h(ring)e(in)o(to)g(the)h(bu\013er)f(at)f(p)q(oin)o(t.) ! 75 481 y Ft(yank-pop)g(\(M-y\))315 535 y Fu(Rotate)i(the)h(kill-ring,)j ! (and)d(y)o(ank)g(the)h(new)f(top.)26 b(Y)l(ou)17 b(can)h(only)g(do)f ! (this)h(if)f(the)h(prior)315 590 y(command)d(is)h Ft(yank)e ! Fu(or)h Ft(yank-pop)p Fu(.)75 693 y Fj(1.4.5)30 b(Sp)r(ecifying)20 ! b(Numeric)h(Argumen)n(ts)75 806 y Ft(digit-argument)13 ! b(\()p Fo(M-0)p Ft(,)i Fo(M-1)p Ft(,)f(...)h Fo(M--)p ! Ft(\))315 861 y Fu(Add)f(this)g(digit)g(to)f(the)h(argumen)o(t)e ! (already)i(accum)o(ulating,)g(or)f(start)f(a)h(new)h(argumen)o(t.)315 ! 915 y Fo(M--)h Fu(starts)f(a)h(negativ)o(e)g(argumen)o(t.)75 ! 999 y Ft(universal-argument)e(\(\))315 1054 y Fu(This)g(is)h(another)e (w)o(a)o(y)g(to)g(sp)q(ecify)i(an)f(argumen)o(t.)18 b(If)13 b(this)g(command)g(is)g(follo)o(w)o(ed)g(b)o(y)g(one)315 ! 1108 y(or)h(more)h(digits,)g(optionally)h(with)f(a)g(leading)h(min)o ! (us)f(sign,)g(those)g(digits)g(de\014ne)h(the)f(ar-)315 ! 1163 y(gumen)o(t.)k(If)c(the)g(command)f(is)h(follo)o(w)o(ed)g(b)o(y)g ! (digits,)g(executing)g Ft(universal-argument)315 1218 y Fu(again)h(ends)g(the)g(n)o(umeric)h(argumen)o(t,)e(but)h(is)h (otherwise)f(ignored.)22 b(As)16 b(a)g(sp)q(ecial)h(case,)315 ! 1273 y(if)g(this)g(command)f(is)h(immediately)h(follo)o(w)o(ed)f(b)o(y) ! f(a)g(c)o(haracter)g(that)g(is)h(neither)g(a)f(digit)315 ! 1328 y(or)d(min)o(us)i(sign,)f(the)g(argumen)o(t)g(coun)o(t)f(for)h ! (the)g(next)g(command)g(is)g(m)o(ultiplied)j(b)o(y)d(four.)315 ! 1382 y(The)19 b(argumen)o(t)f(coun)o(t)g(is)h(initially)j(one,)d(so)f (executing)i(this)f(function)h(the)e(\014rst)h(time)315 ! 1437 y(mak)o(es)c(the)h(argumen)o(t)f(coun)o(t)h(four,)f(a)h(second)g (time)g(mak)o(es)g(the)g(argumen)o(t)f(coun)o(t)g(six-)315 ! 1492 y(teen,)g(and)g(so)g(on.)20 b(By)15 b(default,)h(this)f(is)h(not)f ! (b)q(ound)h(to)f(a)g(k)o(ey)l(.)75 1595 y Fj(1.4.6)30 b(Letting)20 b(Readline)g(T)n(yp)r(e)h(F)-5 b(or)19 b(Y)-5 ! b(ou)75 1708 y Ft(complete)14 b(\()305 1706 y Fn(h)p ! 317 1680 74 2 v 317 1708 a Fm(T)m(AB)p 317 1715 V 389 ! 1706 a Fn(i)404 1708 y Ft(\))315 1762 y Fu(A)o(ttempt)c(to)h(p)q ! (erform)g(completion)i(on)e(the)g(text)g(b)q(efore)h(p)q(oin)o(t.)19 ! b(The)11 b(actual)h(completion)315 1817 y(p)q(erformed)j(is)h (application-sp)q(eci\014)q(c.)23 b(The)15 b(default)h(is)g(\014lename) ! g(completion.)75 1901 y Ft(possible-completions)c(\(M-?\))315 ! 1955 y Fu(List)k(the)f(p)q(ossible)i(completions)f(of)f(the)g(text)g(b) ! q(efore)h(p)q(oin)o(t.)75 2039 y Ft(insert-completions)d(\(M-*\))315 ! 2093 y Fu(Insert)j(all)g(completions)g(of)f(the)g(text)g(b)q(efore)h(p) q(oin)o(t)f(that)g(w)o(ould)h(ha)o(v)o(e)f(b)q(een)h(generated)315 ! 2148 y(b)o(y)f Ft(possible-completions)p Fu(.)75 2232 ! y Ft(menu-complete)e(\(\))315 2286 y Fu(Similar)g(to)f Ft(complete)p Fu(,)f(but)h(replaces)h(the)f(w)o(ord)f(to)g(b)q(e)i ! (completed)f(with)h(a)e(single)j(matc)o(h)315 2341 y(from)k(the)h(list) h(of)e(p)q(ossible)j(completions.)32 b(Rep)q(eated)19 ! b(execution)h(of)f Ft(menu-complete)315 2396 y Fu(steps)h(through)g (the)g(list)h(of)f(p)q(ossible)i(completions,)g(inserting)f(eac)o(h)f ! (matc)o(h)f(in)i(turn.)315 2451 y(A)o(t)d(the)g(end)h(of)f(the)h(list)g (of)f(completions,)i(the)e(b)q(ell)j(is)d(rung)h(\(sub)s(ject)f(to)f ! (the)i(setting)315 2506 y(of)f Ft(bell-style)p Fu(\))e(and)i(the)g (original)h(text)f(is)g(restored.)28 b(An)19 b(argumen)o(t)e(of)g ! Fk(n)i Fu(mo)o(v)o(es)e Fk(n)315 2560 y Fu(p)q(ositions)h(forw)o(ard)e (in)j(the)e(list)h(of)f(matc)o(hes;)h(a)f(negativ)o(e)g(argumen)o(t)g ! (ma)o(y)g(b)q(e)h(used)g(to)315 2615 y(mo)o(v)o(e)g(bac)o(kw)o(ard)h (through)g(the)g(list.)32 b(This)20 b(command)f(is)h(in)o(tended)g(to)f ! (b)q(e)h(b)q(ound)g(to)315 2668 y Fn(h)p 327 2642 V 327 ! 2670 a Fm(T)m(AB)p 327 2678 V 399 2668 a Fn(i)414 2670 ! y Fu(,)15 b(but)g(is)h(un)o(b)q(ound)g(b)o(y)f(default.)p ! eop %%Page: 17 19 17 18 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(17)75 149 y Ft(delete-char-or-list)13 b(\(\))315 204 ! y Fu(Deletes)h(the)f(c)o(haracter)g(under)h(the)g(cursor)f(if)h(not)f ! (at)g(the)g(b)q(eginning)j(or)d(end)h(of)f(the)g(line)315 ! 259 y(\(lik)o(e)i Ft(delete-char)p Fu(\).)j(If)d(at)f(the)h(end)g(of)f ! (the)g(line,)i(b)q(eha)o(v)o(es)f(iden)o(tically)i(to)d ! Ft(possible-)315 314 y(completions)p Fu(.)k(This)e(command)f(is)h(un)o ! (b)q(ound)g(b)o(y)f(default.)75 428 y Fj(1.4.7)30 b(Keyb)r(oard)20 ! b(Macros)75 551 y Ft(start-kbd-macro)13 b(\(C-x)i(\(\))315 ! 606 y Fu(Begin)h(sa)o(ving)f(the)h(c)o(haracters)e(t)o(yp)q(ed)i(in)o ! (to)f(the)g(curren)o(t)g(k)o(eyb)q(oard)g(macro.)75 699 ! y Ft(end-kbd-macro)e(\(C-x)i(\)\))315 754 y Fu(Stop)f(sa)o(ving)f(the)h ! (c)o(haracters)f(t)o(yp)q(ed)h(in)o(to)f(the)h(curren)o(t)g(k)o(eyb)q ! (oard)f(macro)g(and)h(sa)o(v)o(e)f(the)315 809 y(de\014nition.)75 ! 902 y Ft(call-last-kbd-macro)g(\(C-x)h(e\))315 957 y ! Fu(Re-execute)k(the)g(last)f(k)o(eyb)q(oard)h(macro)f(de\014ned,)i(b)o ! (y)e(making)h(the)g(c)o(haracters)e(in)j(the)315 1012 ! y(macro)14 b(app)q(ear)i(as)f(if)g(t)o(yp)q(ed)h(at)e(the)i(k)o(eyb)q ! (oard.)75 1126 y Fj(1.4.8)30 b(Some)20 b(Miscellaneous)h(Commands)75 ! 1249 y Ft(re-read-init-file)13 b(\(C-x)h(C-r\))315 1304 ! y Fu(Read)d(in)g(the)g(con)o(ten)o(ts)g(of)f(the)h Fk(inputrc)k ! Fu(\014le,)d(and)g(incorp)q(orate)f(an)o(y)f(bindings)j(or)e(v)m ! (ariable)315 1358 y(assignmen)o(ts)k(found)h(there.)75 ! 1452 y Ft(abort)e(\(C-g\))315 1507 y Fu(Ab)q(ort)f(the)g(curren)o(t)h (editing)g(command)f(and)h(ring)f(the)h(terminal's)f(b)q(ell)i(\(sub)s ! (ject)e(to)g(the)315 1561 y(setting)i(of)g Ft(bell-style)p ! Fu(\).)75 1655 y Ft(do-uppercase-version)d(\(M-a,)j(M-b,)f(M-)p ! Fk(x)p Ft(,)h(...\))315 1710 y Fu(If)f(the)g(meta\014ed)g(c)o(haracter) ! f Fk(x)k Fu(is)d(lo)o(w)o(ercase,)g(run)g(the)g(command)f(that)h(is)g ! (b)q(ound)h(to)e(the)315 1764 y(corresp)q(onding)j(upp)q(ercase)g(c)o ! (haracter.)75 1858 y Ft(prefix-meta)e(\()377 1856 y Fn(h)p ! 389 1830 70 2 v 389 1858 a Fm(ESC)p 389 1866 V 456 1856 ! a Fn(i)471 1858 y Ft(\))315 1913 y Fu(Metafy)k(the)h(next)g(c)o (haracter)f(t)o(yp)q(ed.)30 b(This)20 b(is)f(for)f(k)o(eyb)q(oards)h ! (without)g(a)f(meta)g(k)o(ey)l(.)315 1968 y(T)o(yping)e(`)485 ! 1966 y Fn(h)p 496 1939 V 496 1968 a Fm(ESC)p 496 1975 ! V 563 1966 a Fn(i)593 1968 y Ft(f)p Fu(')f(is)h(equiv)m(alen)o(t)h(to)d ! (t)o(yping)i Fo(M-f)p Fu(.)75 2061 y Ft(undo)f(\(C-_)f(or)h(C-x)g ! (C-u\))315 2116 y Fu(Incremen)o(tal)h(undo,)f(separately)h(remem)o(b)q ! (ered)g(for)e(eac)o(h)h(line.)75 2209 y Ft(revert-line)f(\(M-r\))315 ! 2264 y Fu(Undo)j(all)g(c)o(hanges)g(made)f(to)g(this)h(line.)26 b(This)17 b(is)g(lik)o(e)h(executing)f(the)g Ft(undo)f ! Fu(command)315 2319 y(enough)g(times)f(to)g(get)f(bac)o(k)h(to)g(the)g ! (b)q(eginning.)75 2412 y Ft(tilde-expand)f(\(M-~\))315 ! 2467 y Fu(P)o(erform)g(tilde)j(expansion)f(on)f(the)g(curren)o(t)g(w)o ! (ord.)75 2560 y Ft(set-mark)f(\(C-@\))315 2615 y Fu(Set)i(the)h(mark)f (to)f(the)i(p)q(oin)o(t.)24 b(If)17 b(a)f(n)o(umeric)h(argumen)o(t)f ! (is)g(supplied,)j(the)e(mark)e(is)i(set)315 2670 y(to)e(that)f(p)q ! (osition.)p eop %%Page: 18 20 18 19 bop 75 -58 a Fu(18)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Ft(exchange-point-and-mark)c(\(C-x)j(C-x\))315 ! 204 y Fu(Sw)o(ap)g(the)h(p)q(oin)o(t)g(with)g(the)g(mark.)k(The)c ! (curren)o(t)f(cursor)h(p)q(osition)g(is)g(set)g(to)f(the)g(sa)o(v)o(ed) ! 315 259 y(p)q(osition,)h(and)f(the)h(old)f(cursor)g(p)q(osition)h(is)g ! (sa)o(v)o(ed)f(as)g(the)g(mark.)75 347 y Ft(character-search)e(\(C-]\)) ! 315 402 y Fu(A)f(c)o(haracter)g(is)h(read)g(and)f(p)q(oin)o(t)h(is)g ! (mo)o(v)o(ed)f(to)g(the)g(next)h(o)q(ccurrence)g(of)f(that)g(c)o ! (haracter.)315 456 y(A)j(negativ)o(e)h(coun)o(t)f(searc)o(hes)g(for)f ! (previous)i(o)q(ccurrences.)75 544 y Ft(character-search-backward)c ! (\(M-C-]\))315 599 y Fu(A)22 b(c)o(haracter)g(is)h(read)f(and)h(p)q ! (oin)o(t)g(is)g(mo)o(v)o(ed)f(to)g(the)g(previous)h(o)q(ccurrence)h(of) ! e(that)315 654 y(c)o(haracter.)d(A)c(negativ)o(e)h(coun)o(t)f(searc)o ! (hes)g(for)f(subsequen)o(t)i(o)q(ccurrences.)75 741 y ! Ft(insert-comment)d(\(M-#\))315 796 y Fu(Without)18 b(a)f(n)o(umeric)i ! (argumen)o(t,)e(the)h(v)m(alue)h(of)f(the)f Ft(comment-begin)f ! Fu(v)m(ariable)k(is)e(in-)315 851 y(serted)e(at)f(the)h(b)q(eginning)i ! (of)d(the)h(curren)o(t)g(line.)23 b(If)16 b(a)g(n)o(umeric)h(argumen)o ! (t)e(is)h(supplied,)315 906 y(this)j(command)f(acts)g(as)f(a)h(toggle:) ! 26 b(if)19 b(the)f(c)o(haracters)g(at)f(the)i(b)q(eginning)h(of)e(the)g ! (line)315 960 y(do)d(not)g(matc)o(h)g(the)g(v)m(alue)i(of)e ! Ft(comment-begin)p Fu(,)e(the)i(v)m(alue)i(is)f(inserted,)f(otherwise)h ! (the)315 1015 y(c)o(haracters)j(in)i Ft(comment-begin)d ! Fu(are)i(deleted)i(from)d(the)h(b)q(eginning)i(of)e(the)g(line.)36 ! b(In)315 1070 y(either)16 b(case,)f(the)g(line)i(is)f(accepted)f(as)g ! (if)h(a)f(newline)i(had)e(b)q(een)i(t)o(yp)q(ed.)75 1158 ! y Ft(dump-functions)c(\(\))315 1213 y Fu(Prin)o(t)g(all)h(of)f(the)g (functions)h(and)g(their)g(k)o(ey)f(bindings)i(to)d(the)i(Readline)g ! (output)f(stream.)315 1267 y(If)j(a)g(n)o(umeric)g(argumen)o(t)f(is)i (supplied,)h(the)e(output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o ! (y)f(that)315 1322 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fk(inputrc)k Fu(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o ! (y)f(default.)75 1410 y Ft(dump-variables)e(\(\))315 ! 1465 y Fu(Prin)o(t)e(all)g(of)f(the)h(settable)g(v)m(ariables)h(and)f ! (their)g(v)m(alues)h(to)e(the)h(Readline)h(output)e(stream.)315 ! 1519 y(If)16 b(a)g(n)o(umeric)g(argumen)o(t)f(is)i(supplied,)h(the)e (output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o(y)f(that)315 ! 1574 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fk(inputrc)k Fu(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.) ! 75 1662 y Ft(dump-macros)f(\(\))315 1717 y Fu(Prin)o(t)j(all)h(of)e ! (the)h(Readline)h(k)o(ey)f(sequences)h(b)q(ound)g(to)e(macros)g(and)h ! (the)g(strings)g(they)315 1771 y(output.)26 b(If)18 b(a)f(n)o(umeric)h (argumen)o(t)f(is)h(supplied,)i(the)d(output)g(is)h(formatted)e(in)j ! (suc)o(h)e(a)315 1826 y(w)o(a)o(y)d(that)g(it)i(can)f(b)q(e)g(made)g (part)g(of)f(an)h Fk(inputrc)k Fu(\014le.)i(This)15 b(command)g(is)h ! (un)o(b)q(ound)g(b)o(y)315 1881 y(default.)75 1969 y ! Ft(emacs-editing-mode)d(\(C-e\))315 2024 y Fu(When)j(in)g ! Ft(vi)e Fu(command)i(mo)q(de,)f(this)g(causes)h(a)f(switc)o(h)g(to)g ! Ft(emacs)f Fu(editing)j(mo)q(de.)75 2111 y Ft(vi-editing-mode)c ! (\(M-C-j\))315 2166 y Fu(When)j(in)g Ft(emacs)e Fu(editing)j(mo)q(de,)e ! (this)g(causes)h(a)f(switc)o(h)g(to)g Ft(vi)f Fu(editing)j(mo)q(de.)75 ! 2290 y Fs(1.5)33 b(Readline)23 b(vi)h(Mo)r(de)137 2385 ! y Fu(While)13 b(the)f(Readline)i(library)e(do)q(es)g(not)g(ha)o(v)o(e)f ! (a)h(full)h(set)f(of)f Ft(vi)g Fu(editing)j(functions,)f(it)f(do)q(es)g ! (con)o(tain)75 2440 y(enough)17 b(to)g(allo)o(w)g(simple)h(editing)h ! (of)d(the)i(line.)27 b(The)17 b(Readline)h Ft(vi)f Fu(mo)q(de)g(b)q ! (eha)o(v)o(es)g(as)g(sp)q(eci\014ed)i(in)75 2495 y(the)c ! Fp(posix)g Fu(1003.2)f(standard.)137 2560 y(In)h(order)g(to)f(switc)o ! (h)g(in)o(teractiv)o(ely)i(b)q(et)o(w)o(een)f Ft(emacs)e ! Fu(and)i Ft(vi)f Fu(editing)i(mo)q(des,)f(use)f(the)h(command)75 ! 2615 y Fo(M-C-j)j Fu(\(b)q(ound)i(to)e(emacs-editing-mo)q(de)j(when)e ! (in)h Ft(vi)f Fu(mo)q(de)g(and)g(to)f(vi-editing-mo)q(de)k(in)e ! Ft(emacs)75 2670 y Fu(mo)q(de\).)g(The)15 b(Readline)i(default)f(is)f ! Ft(emacs)g Fu(mo)q(de.)p eop %%Page: 19 21 ! 19 20 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(19)137 149 y(When)16 b(y)o(ou)e(en)o(ter)h(a)g(line)i(in)e ! Ft(vi)g Fu(mo)q(de,)g(y)o(ou)g(are)f(already)i(placed)g(in)g ! (`insertion')f(mo)q(de,)g(as)g(if)g(y)o(ou)75 204 y(had)e(t)o(yp)q(ed)h ! (an)f(`)p Ft(i)p Fu('.)18 b(Pressing)608 202 y Fn(h)p ! 620 176 70 2 v 620 204 a Fm(ESC)p 620 212 V 687 202 a ! Fn(i)715 204 y Fu(switc)o(hes)13 b(y)o(ou)g(in)o(to)g(`command')f(mo)q ! (de,)i(where)f(y)o(ou)g(can)g(edit)h(the)75 259 y(text)i(of)h(the)g ! (line)h(with)g(the)f(standard)f Ft(vi)h Fu(mo)o(v)o(emen)o(t)f(k)o ! (eys,)g(mo)o(v)o(e)g(to)h(previous)g(history)g(lines)i(with)75 ! 314 y(`)p Ft(k)p Fu(')14 b(and)i(subsequen)o(t)f(lines)i(with)f(`)p ! Ft(j)p Fu(',)e(and)h(so)g(forth.)p eop ! %%Page: 20 22 ! 20 21 bop 75 -58 a Fu(20)1299 b(GNU)15 b(Readline)h(Library)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)75 149 y Fq(2)41 b(Programming)28 b(with)e(GNU)i(Readline)137 267 y Fu(This)18 b(c)o(hapter)f(describ)q (es)h(the)f(in)o(terface)g(b)q(et)o(w)o(een)h(the)f Fp(gnu)g *************** *** 2306,4087 **** 195 2099 y(static)g(char)g(*line_read)g(=)h(\(char)f(*\)NULL;)195 2203 y(/*)h(Read)f(a)h(string,)f(and)g(return)g(a)h(pointer)f(to)g(it.) ! 48 b(Returns)22 b(NULL)i(on)f(EOF.)h(*/)195 2255 y(char)f(*)195 ! 2307 y(rl_gets)g(\(\))195 2359 y({)243 2411 y(/*)g(If)h(the)f(buffer)g ! (has)h(already)f(been)g(allocated,)g(return)g(the)g(memory)314 ! 2462 y(to)h(the)f(free)h(pool.)f(*/)243 2514 y(if)g(\(line_read\))290 ! 2566 y({)338 2618 y(free)g(\(line_read\);)338 2670 y(line_read)g(=)h ! (\(char)f(*\)NULL;)p eop ! %%Page: 20 22 ! 20 21 bop 75 -58 a Fu(20)1299 b(GNU)15 b(Readline)h(Library)290 ! 149 y Ft(})243 253 y(/*)23 b(Get)h(a)f(line)h(from)f(the)h(user.)f(*/) ! 243 305 y(line_read)f(=)i(readline)f(\(""\);)243 409 ! y(/*)g(If)h(the)f(line)h(has)f(any)h(text)f(in)g(it,)h(save)f(it)h(on)f ! (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 735 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 733 y Fn(h)p ! 1181 707 74 2 v 1181 735 a Fm(T)m(AB)p 1181 743 V 1253 ! 733 a Fn(i)1280 735 y Fu(completion:)19 b(completion)13 ! b(on)f(\014le)75 790 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 845 y(of)g(the)205 843 y Fn(h)p ! 217 817 V 217 845 a Fm(T)m(AB)p 217 853 V 289 843 a Fn(i)319 ! 845 y Fu(k)o(ey)g(with)h Ft(rl_bind_key\(\))p Fu(.)195 ! 909 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 976 ! 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 1031 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 1029 y Fn(h)p 1641 1003 V 1641 1031 a ! Fm(T)m(AB)p 1641 1038 V 1712 1029 a Fn(i)1745 1031 y ! Fu(to)17 b Ft(rl_)75 1085 y(insert\(\))f Fu(mak)o(es)422 ! 1083 y Fn(h)p 434 1057 V 434 1085 a Fm(T)m(AB)p 434 1093 ! V 506 1083 a Fn(i)539 1085 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 1140 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 ! 1207 y(Th)o(us,)g(to)g(disable)h(the)g(default)703 1205 ! y Fn(h)p 716 1179 V 716 1207 a Fm(T)m(AB)p 716 1215 V ! 787 1205 a Fn(i)817 1207 y Fu(b)q(eha)o(vior,)g(the)f(follo)o(wing)h ! (su\016ces:)195 1271 y Ft(rl_bind_key)22 b(\('\\t',)h(rl_insert\);)137 ! 1338 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 1393 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 1448 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 ! (39\).)75 1575 y Fs(2.2)33 b(Custom)21 b(F)-6 b(unctions)137 ! 1671 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 1726 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 1781 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 1836 y(functionalit)o(y)j(to)f(Readline.)137 ! 1903 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 ! 1958 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 ! 2012 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 2067 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 2122 y Ft(readline.h)p ! Fu(.)137 2189 y Ft(readline.h)14 b Fu(de\014nes)i(a)f(C)h(prepro)q (cessor)f(v)m(ariable)i(that)d(should)i(b)q(e)g(treated)f(as)g(an)g(in) ! o(teger,)g Ft(RL_)75 2244 y(READLINE_VERSION)p Fu(,)9 b(whic)o(h)j(ma)o(y)f(b)q(e)g(used)h(to)e(conditionally)k(compile)e ! (application)h(co)q(de)f(dep)q(ending)75 2298 y(on)17 b(the)h(installed)h(Readline)g(v)o(ersion.)27 b(The)18 b(v)m(alue)h(is)f(a)f(hexadecimal)i(enco)q(ding)g(of)e(the)h(ma)s(jor)e ! (and)75 2353 y(minor)h(v)o(ersion)h(n)o(um)o(b)q(ers)f(of)g(the)g (library)l(,)h(of)f(the)g(form)f(0x)p Fk(MMmm)p Fu(.)25 b Fk(MM)c Fu(is)c(the)h(t)o(w)o(o-digit)e(ma)s(jor)75 ! 2408 y(v)o(ersion)f(n)o(um)o(b)q(er;)f Fk(mm)h Fu(is)g(the)f(t)o(w)o (o-digit)g(minor)h(v)o(ersion)g(n)o(um)o(b)q(er.)20 b(F)l(or)14 ! b(Readline)h(4.2,)f(for)f(example,)75 2463 y(the)i(v)m(alue)i(of)d Ft(RL_READLINE_VERSION)f Fu(w)o(ould)j(b)q(e)f Ft(0x0402)p ! Fu(.)75 2574 y Fj(2.2.1)30 b(Readline)20 b(T)n(yp)r(edefs)137 ! 2670 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.)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(The)18 b(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 204 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 271 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 326 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 381 y(functions\).)20 b(Instead)c(of)f(the)g ! (classic)h(C)f(declaration)137 447 y Ft(int)g(\(*func\)\(\);)75 ! 514 y Fu(or)g(the)g(ANSI-C)h(st)o(yle)f(declaration)137 ! 581 y Ft(int)g(\(*func\)\(int,)f(int\);)75 647 y Fu(w)o(e)h(ma)o(y)f ! (write)137 714 y Ft(rl_command_func_t)f(*func;)137 781 ! 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 859 y Ft(typedef)d(int)h(rl_command_func_t)e ! (\(int,)h(int\);)75 926 y(typedef)g(char)h(*rl_compentry_func_t)d ! (\(const)j(char)f(*,)h(int\);)75 993 y(typedef)f(char)h ! (**rl_completion_func_t)d(\(const)i(char)h(*,)g(int,)f(int\);)75 ! 1059 y(typedef)g(char)h(*rl_quote_func_t)e(\(char)h(*,)h(int,)g(char)f ! (*\);)75 1126 y(typedef)g(char)h(*rl_dequote_func_t)d(\(char)j(*,)g ! (int\);)75 1193 y(typedef)f(int)h(rl_compignore_func_t)d(\(char)j ! (**\);)75 1259 y(typedef)f(void)h(rl_compdisp_func_t)d(\(char)j(**,)g ! (int,)f(int\);)75 1326 y(typedef)g(int)h(rl_hook_func_t)e(\(void\);)75 ! 1393 y(typedef)h(int)h(rl_getc_func_t)e(\(FILE)i(*\);)75 ! 1459 y(typedef)f(int)h(rl_linebuf_func_t)e(\(char)h(*,)h(int\);)75 ! 1526 y(typedef)f(int)h(rl_intfunc_t)e(\(int\);)75 1593 ! y(#define)h(rl_ivoidfunc_t)f(rl_hook_func_t)75 1659 y(typedef)h(int)h ! (rl_icpfunc_t)e(\(char)i(*\);)75 1726 y(typedef)f(int)h(rl_icppfunc_t)e ! (\(char)i(**\);)75 1793 y(typedef)f(void)h(rl_voidfunc_t)e(\(void\);)75 ! 1859 y(typedef)h(void)h(rl_vintfunc_t)e(\(int\);)75 1926 ! y(typedef)h(void)h(rl_vcpfunc_t)e(\(char)i(*\);)75 1993 y(typedef)f(void)h(rl_vcppfunc_t)e(\(char)i(**\);)75 ! 2091 y Fj(2.2.2)30 b(W)-5 b(riting)20 b(a)h(New)f(F)-5 ! b(unction)137 2187 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 2242 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 2297 y(state)c(of)h(the)g(line)i ! (read)e(so)g(far.)137 2363 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 2427 y ! Ft(foo)23 b(\(int)h(count,)f(int)g(key\))75 2494 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 2549 y(this)f(function.)137 2615 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 2670 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)p eop ! %%Page: 22 24 ! 22 23 bop 75 -58 a Fu(22)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y(b)q(eha)o(vior)22 b(\(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 ! 204 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(function)h(uses)g(the)g(n)o(umeric)h(argumen)o(t) ! d(as)i(a)f(rep)q(eat)75 259 y(coun)o(t,)e(it)g(should)h(b)q(e)f(able)h ! (to)e(do)h(something)h(useful)g(with)f(b)q(oth)g(negativ)o(e)g(and)g(p) ! q(ositiv)o(e)h(argumen)o(ts.)75 314 y(A)o(t)g(the)g(v)o(ery)g(least,)g ! (it)g(should)h(b)q(e)g(a)o(w)o(are)e(that)h(it)g(can)g(b)q(e)h(passed)g ! (a)f(negativ)o(e)g(argumen)o(t.)75 438 y Fs(2.3)33 b(Readline)23 ! b(V)-6 b(ariables)137 533 y Fu(These)16 b(v)m(ariables)g(are)f(a)o(v)m ! (ailable)i(to)e(function)h(writers.)1773 642 y(V)l(ariable)-1861 ! b Fi(char)20 b(*)f Fh(rl)p 286 642 18 3 v 21 w(line)p ! 395 642 V 23 w(bu\013er)195 697 y Fu(This)d(is)g(the)g(line)h(gathered) ! f(so)f(far.)20 b(Y)l(ou)c(are)f(w)o(elcome)h(to)f(mo)q(dify)h(the)g ! (con)o(ten)o(ts)f(of)g(the)h(line,)195 752 y(but)i(see)g(Section)h ! (2.4.5)d([Allo)o(wing)i(Undoing],)h(page)e(29.)27 b(The)18 ! b(function)h Ft(rl_extend_line_)195 807 y(buffer)14 b ! Fu(is)i(a)o(v)m(ailable)h(to)d(increase)j(the)e(memory)f(allo)q(cated)j ! (to)d Ft(rl_line_buffer)p Fu(.)1773 916 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 916 V 21 w(p)r(oin)n(t)195 ! 971 y Fu(The)15 b(o\013set)g(of)f(the)i(curren)o(t)f(cursor)g(p)q ! (osition)h(in)g Ft(rl_line_buffer)d Fu(\(the)i Fl(p)n(oint)t ! Fu(\).)1773 1081 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p ! 215 1081 V 21 w(end)195 1136 y Fu(The)14 b(n)o(um)o(b)q(er)g(of)g(c)o ! (haracters)f(presen)o(t)h(in)h Ft(rl_line_buffer)p Fu(.)i(When)e ! Ft(rl_point)e Fu(is)h(at)f(the)h(end)195 1190 y(of)h(the)g(line,)i ! Ft(rl_point)d Fu(and)h Ft(rl_end)f Fu(are)h(equal.)1773 ! 1300 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 1300 ! V 21 w(mark)195 1355 y Fu(The)f Fk(mark)h Fu(\(sa)o(v)o(ed)e(p)q ! (osition\))h(in)g(the)g(curren)o(t)f(line.)31 b(If)19 ! b(set,)g(the)f(mark)g(and)h(p)q(oin)o(t)g(de\014ne)g(a)195 ! 1410 y Fl(r)n(e)n(gion)p Fu(.)1773 1519 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1519 V 21 w(done)195 1574 y ! Fu(Setting)11 b(this)g(to)g(a)f(non-zero)h(v)m(alue)h(causes)f ! (Readline)h(to)f(return)f(the)h(curren)o(t)g(line)h(immediately)l(.) ! 1773 1684 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 ! 1684 V 21 w(n)n(um)p 347 1684 V 19 w(c)n(hars)p 496 1684 ! V 20 w(to)p 567 1684 V 21 w(read)195 1738 y Fu(Setting)d(this)g(to)f(a) ! g(p)q(ositiv)o(e)h(v)m(alue)h(b)q(efore)f(calling)h Ft(readline\(\))d ! Fu(causes)h(Readline)i(to)e(return)195 1793 y(after)h(accepting)i(that) ! e(man)o(y)g(c)o(haracters,)h(rather)f(than)h(reading)g(up)g(to)f(a)h(c) ! o(haracter)f(b)q(ound)195 1848 y(to)e Ft(accept-line)p ! Fu(.)1773 1958 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p ! 215 1958 V 21 w(p)r(ending)p 436 1958 V 20 w(input)195 ! 2012 y Fu(Setting)13 b(this)g(to)f(a)g(v)m(alue)i(mak)o(es)e(it)h(the)f ! (next)h(k)o(eystrok)o(e)f(read.)19 b(This)13 b(is)g(a)f(w)o(a)o(y)g(to) ! f(stu\013)h(a)h(single)195 2067 y(c)o(haracter)h(in)o(to)i(the)f(input) ! h(stream.)1773 2177 y(V)l(ariable)-1861 b Fi(int)20 b ! Fh(rl)p 215 2177 V 21 w(dispatc)n(hing)195 2232 y Fu(Set)12 ! b(to)g(a)f(non-zero)i(v)m(alue)g(if)g(a)f(function)h(is)f(b)q(eing)i ! (called)f(from)f(a)f(k)o(ey)h(binding;)j(zero)d(otherwise.)195 ! 2286 y(Application)20 b(functions)e(can)g(test)g(this)g(to)f(disco)o(v) ! o(er)h(whether)g(they)g(w)o(ere)g(called)h(directly)g(or)195 ! 2341 y(b)o(y)c(Readline's)h(dispatc)o(hing)h(mec)o(hanism.)1773 ! 2451 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 2451 ! V 21 w(erase)p 363 2451 V 20 w(empt)n(y)p 540 2451 V ! 20 w(line)195 2506 y Fu(Setting)j(this)h(to)e(a)h(non-zero)g(v)m(alue)h (causes)f(Readline)i(to)d(completely)i(erase)f(the)g(curren)o(t)195 ! 2560 y(line,)g(including)h(an)o(y)c(prompt,)h(an)o(y)g(time)g(a)f (newline)j(is)e(t)o(yp)q(ed)g(as)f(the)h(only)g(c)o(haracter)f(on)195 ! 2615 y(an)e(otherwise-empt)o(y)g(line.)31 b(The)18 b(cursor)g(is)h(mo)o (v)o(ed)e(to)h(the)g(b)q(eginning)i(of)e(the)g(newly-blank)195 ! 2670 y(line.)p eop ! %%Page: 23 25 ! 23 24 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(23)1773 149 y(V)l(ariable)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 149 18 3 v 21 w(prompt)195 204 y Fu(The)13 b(prompt)g(Readline)h(uses.)20 b(This)13 b(is)h(set)f(from)f(the)h (argumen)o(t)g(to)f Ft(readline\(\))p Fu(,)g(and)h(should)195 ! 259 y(not)g(b)q(e)h(assigned)g(to)f(directly)l(.)21 b(The)14 b Ft(rl_set_prompt\(\))d Fu(function)j(\(see)g(Section)g(2.4.6)e ! ([Redis-)195 314 y(pla)o(y],)j(page)g(30\))f(ma)o(y)h(b)q(e)g(used)h (to)f(mo)q(dify)h(the)f(prompt)g(string)g(after)f(calling)j ! Ft(readline\(\))p Fu(.)1773 429 y(V)l(ariable)-1861 b ! Fi(int)20 b Fh(rl)p 215 429 V 21 w(already)p 419 429 ! V 21 w(prompted)195 484 y Fu(If)e(an)g(application)i(wishes)f(to)f (displa)o(y)h(the)f(prompt)g(itself,)h(rather)f(than)g(ha)o(v)o(e)g ! (Readline)h(do)195 538 y(it)e(the)f(\014rst)g(time)h Ft(readline\(\))e Fu(is)i(called,)h(it)e(should)i(set)e(this)h(v)m ! (ariable)g(to)f(a)g(non-zero)h(v)m(alue)195 593 y(after)h(displa)o (ying)j(the)e(prompt.)31 b(The)19 b(prompt)g(m)o(ust)f(also)h(b)q(e)h ! (passed)f(as)f(the)h(argumen)o(t)g(to)195 648 y Ft(readline\(\))c Fu(so)h(the)h(redispla)o(y)g(functions)h(can)e(up)q(date)h(the)g (displa)o(y)h(prop)q(erly)l(.)24 b(The)17 b(calling)195 ! 703 y(application)g(is)f(resp)q(onsible)h(for)d(managing)h(the)h(v)m ! (alue;)g(Readline)g(nev)o(er)g(sets)e(it.)1773 818 y(V)l(ariable)-1861 ! b Fi(const)20 b(char)g(*)f Fh(rl)p 436 818 V 21 w(library)p ! 625 818 V 21 w(v)n(ersion)195 873 y Fu(The)c(v)o(ersion)h(n)o(um)o(b)q ! (er)f(of)g(this)h(revision)g(of)f(the)g(library)l(.)1773 ! 988 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 988 ! V 21 w(readline)p 434 988 V 22 w(v)n(ersion)195 1043 y Fu(An)d(in)o(teger)h(enco)q(ding)g(the)f(curren)o(t)g(v)o(ersion)g (of)g(the)g(library)l(.)27 b(The)17 b(enco)q(ding)h(is)g(of)f(the)g ! (form)195 1097 y(0x)p Fk(MMmm)p Fu(,)g(where)i Fk(MM)j Fu(is)d(the)f(t)o(w)o(o-digit)g(ma)s(jor)f(v)o(ersion)i(n)o(um)o(b)q ! (er,)g(and)f Fk(mm)g Fu(is)h(the)f(t)o(w)o(o-)195 1152 y(digit)i(minor)e(v)o(ersion)h(n)o(um)o(b)q(er.)31 b(F)l(or)18 b(example,)i(for)e(Readline-4.2,)i Ft(rl_readline_version)195 ! 1207 y Fu(w)o(ould)c(ha)o(v)o(e)e(the)i(v)m(alue)g(0x0402.)1773 ! 1322 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 1322 ! V 21 w(gn)n(u)p 327 1322 V 20 w(readline)p 545 1322 V ! 22 w(p)195 1377 y Fu(Alw)o(a)o(ys)15 b(set)g(to)f(1,)h(denoting)h(that) e(this)i(is)g Fp(gnu)f Fu(readline)h(rather)f(than)g(some)g(em)o ! (ulation.)1773 1492 y(V)l(ariable)-1861 b Fi(const)20 ! b(char)g(*)f Fh(rl)p 436 1492 V 21 w(terminal)p 668 1492 ! V 21 w(name)195 1547 y Fu(The)14 b(terminal)h(t)o(yp)q(e,)f(used)h(for) e(initialization.)23 b(If)14 b(not)f(set)h(b)o(y)g(the)g(application,)i ! (Readline)f(sets)195 1601 y(this)h(to)e(the)h(v)m(alue)i(of)e(the)g Ft(TERM)g Fu(en)o(vironmen)o(t)g(v)m(ariable)i(the)e(\014rst)g(time)g ! (it)h(is)f(called.)1773 1717 y(V)l(ariable)-1861 b Fi(const)20 ! b(char)g(*)f Fh(rl)p 436 1717 V 21 w(readline)p 655 1717 ! V 22 w(name)195 1771 y Fu(This)d(v)m(ariable)h(is)f(set)g(to)f(a)g (unique)i(name)f(b)o(y)f(eac)o(h)h(application)h(using)f(Readline.)23 ! b(The)16 b(v)m(alue)195 1826 y(allo)o(ws)e(conditional)i(parsing)e(of)g (the)g(inputrc)h(\014le)g(\(see)f(Section)h(1.3.2)d([Conditional)j ! (Init)g(Con-)195 1881 y(structs],)f(page)h(8\).)1773 ! 1996 y(V)l(ariable)-1861 b Fi(FILE)20 b(*)f Fh(rl)p 286 ! 1996 V 21 w(instream)195 2051 y Fu(The)c(stdio)h(stream)e(from)h(whic)o ! (h)h(Readline)g(reads)f(input.)1773 2166 y(V)l(ariable)-1861 ! b Fi(FILE)20 b(*)f Fh(rl)p 286 2166 V 21 w(outstream)195 ! 2221 y Fu(The)c(stdio)h(stream)e(to)h(whic)o(h)h(Readline)g(p)q ! (erforms)f(output.)1773 2336 y(V)l(ariable)-1861 b Fi ! (rl_command_func_t)22 b(*)d Fh(rl)p 626 2336 V 21 w(last)p ! 735 2336 V 21 w(func)195 2391 y Fu(The)f(address)f(of)g(the)g(last)h ! (command)f(function)h(Readline)h(executed.)27 b(Ma)o(y)17 ! b(b)q(e)h(used)g(to)f(test)195 2445 y(whether)e(or)g(not)g(a)g ! (function)h(is)f(b)q(eing)i(executed)f(t)o(wice)g(in)g(succession,)g ! (for)e(example.)1773 2560 y(V)l(ariable)-1861 b Fi(rl_hook_func_t)21 ! b(*)e Fh(rl)p 547 2560 V 22 w(startup)p 752 2560 V 19 ! w(ho)r(ok)195 2615 y Fu(If)e(non-zero,)h(this)g(is)f(the)h(address)f ! (of)f(a)h(function)h(to)f(call)h(just)f(b)q(efore)g Ft(readline)f ! Fu(prin)o(ts)i(the)195 2670 y(\014rst)d(prompt.)p eop ! %%Page: 24 26 ! 24 25 bop 75 -58 a Fu(24)1299 b(GNU)15 b(Readline)h(Library)1773 ! 149 y(V)l(ariable)-1861 b Fi(rl_hook_func_t)21 b(*)e ! Fh(rl)p 547 149 18 3 v 22 w(pre)p 651 149 V 20 w(input)p ! 804 149 V 21 w(ho)r(ok)195 204 y Fu(If)f(non-zero,)g(this)g(is)h(the)f (address)f(of)h(a)f(function)i(to)e(call)i(after)e(the)h(\014rst)f ! (prompt)g(has)h(b)q(een)195 259 y(prin)o(ted)e(and)f(just)g(b)q(efore)h Ft(readline)e Fu(starts)g(reading)h(input)i(c)o(haracters.)1773 ! 375 y(V)l(ariable)-1861 b Fi(rl_hook_func_t)21 b(*)e ! Fh(rl)p 547 375 V 22 w(ev)n(en)n(t)p 701 375 V 22 w(ho)r(ok)195 ! 430 y Fu(If)i(non-zero,)g(this)g(is)g(the)f(address)g(of)g(a)g (function)h(to)f(call)i(p)q(erio)q(dically)h(when)e(Readline)g(is)195 ! 484 y(w)o(aiting)15 b(for)f(terminal)h(input.)21 b(By)14 b(default,)h(this)g(will)i(b)q(e)e(called)h(at)e(most)g(ten)g(times)h ! (a)f(second)195 539 y(if)i(there)f(is)h(no)f(k)o(eyb)q(oard)g(input.) ! 1773 655 y(V)l(ariable)-1861 b Fi(rl_getc_func_t)21 b(*)e ! Fh(rl)p 547 655 V 22 w(getc)p 671 655 V 21 w(function)195 ! 710 y Fu(If)c(non-zero,)h(Readline)g(will)h(call)f(indirectly)i (through)d(this)g(p)q(oin)o(ter)h(to)f(get)f(a)h(c)o(haracter)g(from) ! 195 764 y(the)k(input)i(stream.)31 b(By)19 b(default,)h(it)g(is)g(set)f ! (to)f Ft(rl_getc)p Fu(,)h(the)g(default)h(Readline)h(c)o(haracter)195 ! 819 y(input)16 b(function)g(\(see)f(Section)h(2.4.8)e([Character)g ! (Input],)h(page)g(32\).)1773 935 y(V)l(ariable)-1861 ! b Fi(rl_voidfunc_t)21 b(*)e Fh(rl)p 521 935 V 21 w(redispla)n(y)p ! 765 935 V 22 w(function)195 990 y Fu(If)f(non-zero,)h(Readline)g(will)h ! (call)f(indirectly)h(through)e(this)g(p)q(oin)o(ter)h(to)e(up)q(date)i ! (the)f(displa)o(y)195 1044 y(with)c(the)f(curren)o(t)h(con)o(ten)o(ts)f ! (of)g(the)g(editing)i(bu\013er.)k(By)14 b(default,)g(it)g(is)g(set)f ! (to)g Ft(rl_redisplay)p Fu(,)195 1099 y(the)i(default)h(Readline)h ! (redispla)o(y)f(function)g(\(see)f(Section)h(2.4.6)e([Redispla)o(y],)h ! (page)g(30\).)1773 1215 y(V)l(ariable)-1861 b Fi(rl_vintfunc_t)21 ! b(*)e Fh(rl)p 521 1215 V 21 w(prep)p 656 1215 V 21 w(term)p ! 798 1215 V 19 w(function)195 1270 y Fu(If)12 b(non-zero,)h(Readline)g ! (will)h(call)f(indirectly)h(through)e(this)g(p)q(oin)o(ter)h(to)e ! (initialize)k(the)e(terminal.)195 1324 y(The)19 b(function)g(tak)o(es)f ! (a)g(single)i(argumen)o(t,)e(an)h Ft(int)f Fu(\015ag)g(that)g(sa)o(ys)g ! (whether)g(or)h(not)f(to)g(use)195 1379 y(eigh)o(t-bit)g(c)o ! (haracters.)25 b(By)17 b(default,)h(this)f(is)h(set)e(to)h ! Ft(rl_prep_terminal)e Fu(\(see)i(Section)h(2.4.9)195 ! 1434 y([T)l(erminal)e(Managemen)o(t],)d(page)i(33\).)1773 ! 1550 y(V)l(ariable)-1861 b Fi(rl_voidfunc_t)21 b(*)e ! Fh(rl)p 521 1550 V 21 w(deprep)p 714 1550 V 21 w(term)p ! 856 1550 V 19 w(function)195 1605 y Fu(If)g(non-zero,)g(Readline)g (will)h(call)g(indirectly)g(through)e(this)h(p)q(oin)o(ter)f(to)g ! (reset)g(the)h(terminal.)195 1659 y(This)f(function)g(should)h(undo)f (the)f(e\013ects)h(of)f Ft(rl_prep_term_function)p Fu(.)24 ! b(By)17 b(default,)i(this)195 1714 y(is)d(set)f(to)f Ft(rl_deprep_terminal)f Fu(\(see)i(Section)h(2.4.9)e([T)l(erminal)i ! (Managemen)o(t],)d(page)i(33\).)1773 1830 y(V)l(ariable)-1861 ! b Fi(Keymap)20 b Fh(rl)p 293 1830 V 21 w(executing)p ! 551 1830 V 22 w(k)n(eymap)195 1885 y Fu(This)f(v)m(ariable)g(is)f(set)g (to)g(the)g(k)o(eymap)f(\(see)h(Section)h(2.4.2)e([Keymaps],)g(page)h ! (26\))f(in)i(whic)o(h)195 1939 y(the)c(curren)o(tly)h(executing)g ! (readline)h(function)f(w)o(as)f(found.)1773 2055 y(V)l(ariable)-1861 ! b Fi(Keymap)20 b Fh(rl)p 293 2055 V 21 w(binding)p 501 ! 2055 V 22 w(k)n(eymap)195 2110 y Fu(This)f(v)m(ariable)g(is)f(set)g(to) ! g(the)g(k)o(eymap)f(\(see)h(Section)h(2.4.2)e([Keymaps],)g(page)h(26\)) ! f(in)i(whic)o(h)195 2165 y(the)c(last)g(k)o(ey)g(binding)j(o)q ! (ccurred.)1773 2280 y(V)l(ariable)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 2280 V 21 w(executing)p 544 2280 V ! 22 w(macro)195 2335 y Fu(This)d(v)m(ariable)g(is)g(set)f(to)g(the)g ! (text)g(of)f(an)o(y)h(curren)o(tly-executing)i(macro.)1773 ! 2451 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 2451 ! V 21 w(readline)p 434 2451 V 22 w(state)195 2506 y Fu(A)d(v)m(ariable)i ! (with)e(bit)h(v)m(alues)h(that)d(encapsulate)i(the)g(curren)o(t)f ! (Readline)h(state.)25 b(A)18 b(bit)f(is)h(set)195 2560 ! y(with)h(the)g Ft(RL_SETSTATE)f Fu(macro,)h(and)g(unset)g(with)g(the)g ! Ft(RL_UNSETSTATE)e Fu(macro.)31 b(Use)19 b(the)195 2615 ! y Ft(RL_ISSTATE)e Fu(macro)h(to)g(test)g(whether)h(a)f(particular)i ! (state)d(bit)j(is)f(set.)30 b(Curren)o(t)18 b(state)g(bits)195 ! 2670 y(include:)p eop ! %%Page: 25 27 ! 25 26 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(25)195 149 y Ft(RL_STATE_NONE)435 204 ! y Fu(Readline)16 b(has)g(not)e(y)o(et)h(b)q(een)h(called,)h(nor)e(has)g ! (it)g(b)q(egun)h(to)f(in)o(tialize.)195 277 y Ft(RL_STATE_INITIALIZING) ! 435 332 y Fu(Readline)h(is)g(initializi)q(ng)i(its)d(in)o(ternal)h ! (data)f(structures.)195 405 y Ft(RL_STATE_INITIALIZED)435 ! 460 y Fu(Readline)h(has)g(completed)g(its)f(initialization.)195 ! 533 y Ft(RL_STATE_TERMPREPPED)435 588 y Fu(Readline)h(has)e(mo)q ! (di\014ed)i(the)e(terminal)h(mo)q(des)g(to)e(do)i(its)f(o)o(wn)g(input) ! h(and)g(redis-)435 643 y(pla)o(y)l(.)195 716 y Ft(RL_STATE_READCMD)435 ! 770 y Fu(Readline)h(is)g(reading)g(a)f(command)g(from)f(the)i(k)o(eyb)q ! (oard.)195 844 y Ft(RL_STATE_METANEXT)435 898 y Fu(Readline)g(is)g (reading)g(more)f(input)h(after)e(reading)i(the)f(meta-pre\014x)h(c)o ! (haracter.)195 971 y Ft(RL_STATE_DISPATCHING)435 1026 y Fu(Readline)g(is)g(dispatc)o(hing)h(to)d(a)h(command.)195 ! 1099 y Ft(RL_STATE_MOREINPUT)435 1154 y Fu(Readline)h(is)g(reading)g (more)f(input)h(while)h(executing)f(an)f(editing)i(command.)195 ! 1227 y Ft(RL_STATE_ISEARCH)435 1282 y Fu(Readline)f(is)g(p)q(erforming) ! g(an)f(incremen)o(tal)h(history)f(searc)o(h.)195 1355 ! y Ft(RL_STATE_NSEARCH)435 1410 y Fu(Readline)h(is)g(p)q(erforming)g(a)f ! (non-incremen)o(tal)h(history)g(searc)o(h.)195 1483 y ! Ft(RL_STATE_SEARCH)435 1538 y Fu(Readline)11 b(is)g(searc)o(hing)g(bac) o(kw)o(ard)e(or)h(forw)o(ard)f(through)h(the)g(history)g(for)f(a)h ! (string.)195 1611 y Ft(RL_STATE_NUMERICARG)435 1665 y Fu(Readline)16 b(is)g(reading)g(a)f(n)o(umeric)h(argumen)o(t.)195 ! 1738 y Ft(RL_STATE_MACROINPUT)435 1793 y Fu(Readline)d(is)g(curren)o (tly)g(getting)f(its)g(input)h(from)e(a)h(previously-de\014ned)j(k)o ! (eyb)q(oard)435 1848 y(macro.)195 1921 y Ft(RL_STATE_MACRODEF)435 ! 1976 y Fu(Readline)h(is)g(curren)o(tly)g(reading)g(c)o(haracters)e ! (de\014ning)j(a)e(k)o(eyb)q(oard)g(macro.)195 2049 y ! Ft(RL_STATE_OVERWRITE)435 2104 y Fu(Readline)h(is)g(in)g(o)o(v)o ! (erwrite)f(mo)q(de.)195 2177 y Ft(RL_STATE_COMPLETING)435 ! 2232 y Fu(Readline)h(is)g(p)q(erforming)g(w)o(ord)e(completion.)195 ! 2305 y Ft(RL_STATE_SIGHANDLER)435 2359 y Fu(Readline)i(is)g(curren)o ! (tly)g(executing)g(the)f(readline)i(signal)f(handler.)195 ! 2433 y Ft(RL_STATE_UNDOING)435 2487 y Fu(Readline)g(is)g(p)q(erforming) ! g(an)f(undo.)195 2560 y Ft(RL_STATE_DONE)435 2615 y Fu(Readline)g(has)f (read)g(a)f(k)o(ey)h(sequence)h(b)q(ound)g(to)e Ft(accept-line)f ! Fu(and)i(is)h(ab)q(out)f(to)435 2670 y(return)h(the)g(line)i(to)e(the)g ! (caller.)p eop ! %%Page: 26 28 ! 26 27 bop 75 -58 a Fu(26)1299 b(GNU)15 b(Readline)h(Library)1773 ! 149 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 149 ! 18 3 v 21 w(explicit)p 417 149 V 24 w(arg)195 204 y Fu(Set)f(to)g(a)g ! (non-zero)h(v)m(alue)h(if)e(an)h(explicit)h(n)o(umeric)g(argumen)o(t)d ! (w)o(as)h(sp)q(eci\014ed)i(b)o(y)f(the)f(user.)195 259 ! y(Only)d(v)m(alid)h(in)f(a)f(bindable)i(command)f(function.)1773 ! 374 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 374 ! V 21 w(n)n(umeric)p 437 374 V 20 w(arg)195 429 y Fu(Set)j(to)f(the)g(v) ! m(alue)i(of)f(an)o(y)f(n)o(umeric)h(argumen)o(t)f(explicitly)k(sp)q ! (eci\014ed)f(b)o(y)d(the)h(user)g(b)q(efore)195 484 y(executing)14 ! b(the)f(curren)o(t)g(Readline)h(function.)20 b(Only)14 ! b(v)m(alid)h(in)f(a)f(bindable)i(command)d(function.)1773 ! 599 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 599 ! V 21 w(editing)p 407 599 V 22 w(mo)r(de)195 654 y Fu(Set)13 ! b(to)f(a)g(v)m(alue)i(denoting)f(Readline's)g(curren)o(t)g(editing)h ! (mo)q(de.)19 b(A)12 b(v)m(alue)i(of)e Fk(1)k Fu(means)d(Readline)195 ! 709 y(is)j(curren)o(tly)f(in)h(emacs)g(mo)q(de;)f Fk(0)j ! Fu(means)d(that)g(vi)h(mo)q(de)f(is)h(activ)o(e.)75 837 y Fs(2.4)33 b(Readline)23 b(Con)n(v)n(enience)g(F)-6 ! b(unctions)75 977 y Fj(2.4.1)30 b(Naming)20 b(a)g(F)-5 ! b(unction)137 1073 y Fu(The)20 b(user)g(can)g(dynamically)i(c)o(hange)e (the)g(bindings)i(of)d(k)o(eys)h(while)h(using)g(Readline.)35 ! b(This)20 b(is)75 1128 y(done)f(b)o(y)f(represen)o(ting)h(the)g (function)g(with)g(a)f(descriptiv)o(e)i(name.)29 b(The)19 ! b(user)f(is)h(able)h(to)d(t)o(yp)q(e)i(the)75 1182 y(descriptiv)o(e)e (name)e(when)h(referring)f(to)g(the)g(function.)21 b(Th)o(us,)14 b(in)i(an)f(init)i(\014le,)f(one)f(migh)o(t)g(\014nd)195 ! 1246 y Ft(Meta-Rubout:)46 b(backward-kill-word)137 1313 ! y Fu(This)21 b(binds)g(the)f(k)o(eystrok)o(e)661 1311 ! y Fn(h)p 673 1285 209 2 v 673 1313 a Fm(Meta-Rub)q(out)p ! 673 1321 V 879 1311 a Fn(i)914 1313 y Fu(to)g(the)g(function)g ! Fl(descriptively)k Fu(named)c Ft(backward-)75 1368 y(kill-word)p Fu(.)29 b(Y)l(ou,)19 b(as)f(the)h(programmer,)f(should)i(bind)f(the)g (functions)h(y)o(ou)e(write)h(to)e(descriptiv)o(e)75 ! 1423 y(names)e(as)g(w)o(ell.)21 b(Readline)16 b(pro)o(vides)g(a)f ! (function)h(for)e(doing)i(that:)1762 1538 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1538 18 3 v 21 w(add)p 328 ! 1538 V 20 w(defun)i Fg(\()p Ft(const)14 b(char)h(*name,)f ! (rl_command_func_t)283 1593 y(*function,)f(int)i(key)p ! Fg(\))195 1648 y Fu(Add)j Fk(name)i Fu(to)d(the)h(list)h(of)e(named)h (functions.)28 b(Mak)o(e)17 b Fk(function)h Fu(b)q(e)g(the)g(function)h ! (that)d(gets)195 1703 y(called.)21 b(If)16 b Fk(k)o(ey)j Fu(is)d(not)e(-1,)h(then)h(bind)g(it)g(to)e Fk(function)i ! Fu(using)g Ft(rl_bind_key\(\))p Fu(.)137 1794 y(Using)g(this)f ! (function)h(alone)g(is)f(su\016cien)o(t)h(for)f(most)f(applications.)21 ! b(It)15 b(is)h(the)f(recommended)h(w)o(a)o(y)75 1849 ! y(to)d(add)h(a)f(few)g(functions)h(to)f(the)h(default)g(functions)g ! (that)f(Readline)i(has)e(built)i(in.)20 b(If)14 b(y)o(ou)f(need)h(to)f ! (do)75 1903 y(something)k(other)g(than)f(adding)i(a)e(function)i(to)e (Readline,)i(y)o(ou)f(ma)o(y)f(need)i(to)e(use)h(the)g(underlying)75 ! 1958 y(functions)f(describ)q(ed)h(b)q(elo)o(w.)75 2069 ! y Fj(2.4.2)30 b(Selecting)20 b(a)h(Keymap)137 2165 y ! Fu(Key)16 b(bindings)i(tak)o(e)c(place)j(on)e(a)g Fk(k)o(eymap)p Fu(.)21 b(The)15 b(k)o(eymap)h(is)f(the)h(asso)q(ciation)g(b)q(et)o(w)o ! (een)g(the)f(k)o(eys)75 2220 y(that)f(the)g(user)g(t)o(yp)q(es)g(and)h (the)f(functions)h(that)f(get)g(run.)19 b(Y)l(ou)c(can)f(mak)o(e)g(y)o ! (our)g(o)o(wn)f(k)o(eymaps,)h(cop)o(y)75 2275 y(existing)i(k)o(eymaps,) ! f(and)g(tell)h(Readline)h(whic)o(h)f(k)o(eymap)f(to)f(use.)1762 ! 2390 y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p 293 ! 2390 V 21 w(mak)n(e)p 445 2390 V 20 w(bare)p 575 2390 ! V 20 w(k)n(eymap)j Fg(\()p Ft(void)p Fg(\))195 2445 y Fu(Returns)12 b(a)f(new,)i(empt)o(y)f(k)o(eymap.)18 b(The)13 b(space)f(for)f(the)i(k)o(eymap)e(is)i(allo)q(cated)g(with)f ! Ft(malloc\(\))p Fu(;)195 2500 y(the)j(caller)i(should)f(free)f(it)h(b)o (y)f(calling)i Ft(rl_discard_keymap\(\))12 b Fu(when)k(done.)1762 ! 2615 y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p 293 ! 2615 V 21 w(cop)n(y)p 428 2615 V 21 w(k)n(eymap)j Fg(\()p ! Ft(Keymap)14 b(map)p Fg(\))195 2670 y Fu(Return)h(a)g(new)g(k)o(eymap)g ! (whic)o(h)h(is)g(a)f(cop)o(y)g(of)g Fk(map)p Fu(.)p eop ! %%Page: 27 29 ! 27 28 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(27)1762 149 y(F)l(unction)-1861 b Fi(Keymap)20 ! b Fh(rl)p 293 149 18 3 v 21 w(mak)n(e)p 445 149 V 20 ! w(k)n(eymap)j Fg(\()p Ft(void)p Fg(\))195 204 y Fu(Return)16 ! b(a)f(new)i(k)o(eymap)e(with)i(the)f(prin)o(ting)h(c)o(haracters)e(b)q ! (ound)i(to)e(rl)p 1457 204 14 2 v 17 w(insert,)h(the)g(lo)o(w)o(ercase) ! 195 259 y(Meta)11 b(c)o(haracters)f(b)q(ound)i(to)f(run)h(their)f ! (equiv)m(alen)o(ts,)j(and)d(the)h(Meta)e(digits)i(b)q(ound)g(to)f(pro)q ! (duce)195 314 y(n)o(umeric)16 b(argumen)o(ts.)1762 437 ! y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 437 18 ! 3 v 21 w(discard)p 441 437 V 21 w(k)n(eymap)i Fg(\()p ! Ft(Keymap)14 b(keymap)p Fg(\))195 492 y Fu(F)l(ree)h(the)h(storage)d ! (asso)q(ciated)j(with)f Fk(k)o(eymap)p Fu(.)137 589 y(Readline)24 ! b(has)f(sev)o(eral)g(in)o(ternal)g(k)o(eymaps.)42 b(These)23 ! b(functions)g(allo)o(w)g(y)o(ou)f(to)g(c)o(hange)h(whic)o(h)75 ! 643 y(k)o(eymap)15 b(is)h(activ)o(e.)1762 767 y(F)l(unction)-1861 ! b Fi(Keymap)20 b Fh(rl)p 293 767 V 21 w(get)p 391 767 ! V 21 w(k)n(eymap)i Fg(\()p Ft(void)p Fg(\))195 822 y ! Fu(Returns)15 b(the)g(curren)o(tly)h(activ)o(e)f(k)o(eymap.)1762 ! 945 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 945 ! V 21 w(set)p 333 945 V 21 w(k)n(eymap)i Fg(\()p Ft(Keymap)14 ! b(keymap)p Fg(\))195 1000 y Fu(Mak)o(es)g Fk(k)o(eymap)j ! Fu(the)e(curren)o(tly)h(activ)o(e)f(k)o(eymap.)1762 1124 ! y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p 293 1124 ! V 21 w(get)p 391 1124 V 21 w(k)n(eymap)p 605 1124 V 20 ! w(b)n(y)p 685 1124 V 21 w(name)i Fg(\()p Ft(const)14 ! b(char)g(*name)p Fg(\))195 1178 y Fu(Return)i(the)h(k)o(eymap)f(matc)o (hing)h Fk(name)p Fu(.)24 b Fk(name)19 b Fu(is)e(one)g(whic)o(h)g(w)o ! (ould)g(b)q(e)h(supplied)h(in)e(a)f Ft(set)195 1233 y(keymap)e Fu(inputrc)j(line)f(\(see)g(Section)g(1.3)e([Readline)i(Init)g(File],)g ! (page)f(4\).)1762 1357 y(F)l(unction)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 1357 V 21 w(get)p 384 1357 V 21 w(k)n(eymap)p ! 598 1357 V 20 w(name)i Fg(\()p Ft(Keymap)14 b(keymap)p ! Fg(\))195 1412 y Fu(Return)i(the)h(name)g(matc)o(hing)f Fk(k)o(eymap)p Fu(.)24 b Fk(name)19 b Fu(is)e(one)g(whic)o(h)g(w)o ! (ould)g(b)q(e)h(supplied)h(in)e(a)f Ft(set)195 1466 y(keymap)e Fu(inputrc)j(line)f(\(see)g(Section)g(1.3)e([Readline)i(Init)g(File],)g ! (page)f(4\).)75 1583 y Fj(2.4.3)30 b(Binding)20 b(Keys)137 ! 1681 y Fu(Key)13 b(sequences)g(are)e(asso)q(ciate)h(with)h(functions)f ! (through)g(the)g(k)o(eymap.)19 b(Readline)13 b(has)f(sev)o(eral)g(in-) ! 75 1736 y(ternal)j(k)o(eymaps:)k Ft(emacs_standard_keymap)p Fu(,)11 b Ft(emacs_meta_keymap)p Fu(,)h Ft(emacs_ctlx_keymap)p ! Fu(,)g Ft(vi_)75 1791 y(movement_keymap)p Fu(,)20 b(and)i Ft(vi_insertion_keymap)p Fu(.)35 b Ft(emacs_standard_keymap)18 ! b Fu(is)k(the)f(default,)75 1846 y(and)15 b(the)h(examples)g(in)g(this) ! f(man)o(ual)h(assume)f(that.)137 1915 y(Since)h Ft(readline\(\))c Fu(installs)j(a)f(set)f(of)h(default)g(k)o(ey)g(bindings)h(the)f ! (\014rst)g(time)g(it)g(is)g(called,)i(there)d(is)75 1970 y(alw)o(a)o(ys)j(the)g(danger)g(that)g(a)g(custom)g(binding)i (installed)g(b)q(efore)f(the)f(\014rst)g(call)i(to)d ! Ft(readline\(\))g Fu(will)75 2025 y(b)q(e)f(o)o(v)o(erridden.)19 b(An)13 b(alternate)g(mec)o(hanism)h(is)f(to)f(install)i(custom)f(k)o ! (ey)g(bindings)h(in)g(an)f(initialization)75 2079 y(function)19 b(assigned)h(to)d(the)i Ft(rl_startup_hook)e Fu(v)m(ariable)j(\(see)e ! (Section)h(2.3)f([Readline)i(V)l(ariables],)75 2134 y(page)15 ! b(22\).)137 2204 y(These)h(functions)g(manage)e(k)o(ey)i(bindings.)1762 ! 2327 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2327 ! V 21 w(bind)p 347 2327 V 21 w(k)n(ey)k Fg(\()p Ft(int)14 ! b(key,)h(rl_command_func_t)d(*function)p Fg(\))195 2382 y Fu(Binds)18 b Fk(k)o(ey)i Fu(to)c Fk(function)h Fu(in)h(the)e(curren) o(tly)h(activ)o(e)g(k)o(eymap.)23 b(Returns)16 b(non-zero)h(in)g(the)g ! (case)195 2437 y(of)e(an)g(in)o(v)m(alid)i Fk(k)o(ey)p ! Fu(.)1762 2560 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 2560 V 21 w(bind)p 347 2560 V 21 w(k)n(ey)p 452 2560 ! V 21 w(in)p 520 2560 V 22 w(map)h Fg(\()p Ft(int)14 b(key,)h ! (rl_command_func_t)e(*function,)283 2615 y(Keymap)h(map)p ! Fg(\))195 2670 y Fu(Bind)i Fk(k)o(ey)j Fu(to)c Fk(function)h Fu(in)g Fk(map)p Fu(.)k(Returns)14 b(non-zero)i(in)g(the)f(case)g(of)g ! (an)g(in)o(v)m(alid)j Fk(k)o(ey)p Fu(.)p eop ! %%Page: 28 30 ! 28 29 bop 75 -58 a Fu(28)1299 b(GNU)15 b(Readline)h(Library)1762 ! 149 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 149 ! 18 3 v 21 w(un)n(bind)p 409 149 V 21 w(k)n(ey)k Fg(\()p ! Ft(int)14 b(key)p Fg(\))195 204 y Fu(Bind)19 b Fk(k)o(ey)j ! Fu(to)c(the)g(n)o(ull)i(function)f(in)g(the)f(curren)o(tly)g(activ)o(e) ! h(k)o(eymap.)28 b(Returns)18 b(non-zero)g(in)195 259 ! y(case)d(of)g(error.)1762 395 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 395 V 21 w(un)n(bind)p 409 395 V 21 w(k)n(ey)p ! 514 395 V 21 w(in)p 582 395 V 22 w(map)h Fg(\()p Ft(int)14 ! b(key,)h(Keymap)f(map)p Fg(\))195 450 y Fu(Bind)i Fk(k)o(ey)j ! Fu(to)c(the)g(n)o(ull)i(function)f(in)g Fk(map)p Fu(.)k(Returns)14 ! b(non-zero)i(in)g(case)f(of)g(error.)1762 586 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 586 V 21 w(un)n(bind)p 409 ! 586 V 21 w(function)p 635 586 V 21 w(in)p 703 586 V 21 ! w(map)h Fg(\()p Ft(rl_command_func_t)13 b(*function,)283 ! 641 y(Keymap)h(map)p Fg(\))195 695 y Fu(Un)o(bind)j(all)f(k)o(eys)f ! (that)f(execute)i Fk(function)g Fu(in)g Fk(map)p Fu(.)1762 ! 831 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 831 ! V 21 w(un)n(bind)p 409 831 V 21 w(command)p 674 831 V ! 17 w(in)p 738 831 V 22 w(map)h Fg(\()p Ft(const)14 b(char)h(*command,)f ! (Keymap)283 886 y(map)p Fg(\))195 941 y Fu(Un)o(bind)j(all)f(k)o(eys)f ! (that)f(are)h(b)q(ound)h(to)f Fk(command)i Fu(in)f Fk(map)p ! Fu(.)1762 1077 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 1077 V 21 w(set)p 307 1077 V 20 w(k)n(ey)k Fg(\()p Ft(const)14 b(char)h(*keyseq,)f(rl_command_func_t)f(*function,)283 ! 1132 y(Keymap)h(map)p Fg(\))195 1186 y Fu(Bind)g(the)e(k)o(ey)h (sequence)h(represen)o(ted)f(b)o(y)f(the)h(string)f Fk(k)o(eyseq)i Fu(to)e(the)g(function)i Fk(function)p Fu(.)19 b(This)195 ! 1241 y(mak)o(es)13 b(new)g(k)o(eymaps)g(as)f(necessary)l(.)20 b(The)13 b(initial)j(k)o(eymap)c(in)i(whic)o(h)g(to)f(do)g(bindings)i ! (is)f Fk(map)p Fu(.)1762 1377 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 1377 V 21 w(generic)p 413 1377 V 21 w(bind)j Fg(\()p Ft(int)15 b(type,)f(const)h(char)f(*keyseq,)g(char)h(*data,)283 ! 1432 y(Keymap)f(map)p Fg(\))195 1487 y Fu(Bind)h(the)e(k)o(ey)h (sequence)h(represen)o(ted)e(b)o(y)h(the)g(string)f Fk(k)o(eyseq)i Fu(to)d(the)i(arbitrary)f(p)q(oin)o(ter)h Fk(data)p Fu(.)195 ! 1542 y Fk(t)o(yp)q(e)j Fu(sa)o(ys)c(what)h(kind)h(of)f(data)g(is)g(p)q (oin)o(ted)i(to)d(b)o(y)h Fk(data)p Fu(;)g(this)h(can)f(b)q(e)h(a)f ! (function)h(\()p Ft(ISFUNC)p Fu(\),)d(a)195 1596 y(macro)i(\()p Ft(ISMACR)p Fu(\),)f(or)h(a)h(k)o(eymap)f(\()p Ft(ISKMAP)p Fu(\).)k(This)e(mak)o(es)e(new)h(k)o(eymaps)f(as)h(necessary)l(.)20 ! b(The)195 1651 y(initial)d(k)o(eymap)e(in)h(whic)o(h)g(to)f(do)g ! (bindings)i(is)f Fk(map)p Fu(.)1762 1787 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1787 V 21 w(parse)p 369 1787 ! V 19 w(and)p 480 1787 V 21 w(bind)j Fg(\()p Ft(char)14 ! b(*line)p Fg(\))195 1842 y Fu(P)o(arse)g Fk(line)19 b ! Fu(as)14 b(if)h(it)g(had)g(b)q(een)h(read)f(from)f(the)g ! Ft(inputrc)g Fu(\014le)i(and)f(p)q(erform)f(an)o(y)h(k)o(ey)f(bindings) ! 195 1897 y(and)h(v)m(ariable)i(assignmen)o(ts)e(found)h(\(see)f ! (Section)h(1.3)e([Readline)i(Init)g(File],)g(page)f(4\).)1762 ! 2033 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2033 ! V 21 w(read)p 346 2033 V 20 w(init)p 450 2033 V 22 w(\014le)k ! Fg(\()p Ft(const)14 b(char)h(*filename)p Fg(\))195 2088 ! y Fu(Read)g(k)o(eybindings)j(and)e(v)m(ariable)h(assignmen)o(ts)f(from) ! f Fk(\014lename)k Fu(\(see)d(Section)g(1.3)f([Readline)195 ! 2142 y(Init)h(File],)g(page)f(4\).)75 2267 y Fj(2.4.4)30 ! b(Asso)r(ciating)20 b(F)-5 b(unction)20 b(Names)h(and)f(Bindings)137 ! 2370 y Fu(These)11 b(functions)h(allo)o(w)e(y)o(ou)h(to)f(\014nd)h(out) ! f(what)g(k)o(eys)h(in)o(v)o(ok)o(e)f(named)h(functions)h(and)e(the)h ! (functions)75 2424 y(in)o(v)o(ok)o(ed)j(b)o(y)g(a)f(particular)h(k)o ! (ey)g(sequence.)21 b(Y)l(ou)14 b(ma)o(y)f(also)g(asso)q(ciate)h(a)g ! (new)g(function)g(name)g(with)g(an)75 2479 y(arbitrary)h(function.)1762 ! 2615 y(F)l(unction)-1861 b Fi(rl_command_func_t)22 b(*)d ! Fh(rl)p 626 2615 V 21 w(named)p 814 2615 V 19 w(function)k ! Fg(\()p Ft(const)14 b(char)h(*name)p Fg(\))195 2670 y ! Fu(Return)g(the)g(function)h(with)g(name)f Fk(name)p ! Fu(.)p eop ! %%Page: 29 31 ! 29 30 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(29)1762 149 y(F)l(unction)-1861 b Fi(rl_command_func_t) ! 22 b(*)d Fh(rl)p 626 149 18 3 v 21 w(function)p 852 149 ! V 21 w(of)p 920 149 V 20 w(k)n(eyseq)24 b Fg(\()p Ft(const)14 ! b(char)283 204 y(*keyseq,)g(Keymap)g(map,)h(int)f(*type)p ! Fg(\))195 259 y Fu(Return)i(the)g(function)h(in)o(v)o(ok)o(ed)g(b)o(y)f ! Fk(k)o(eyseq)h Fu(in)g(k)o(eymap)f Fk(map)p Fu(.)23 b(If)17 ! b Fk(map)g Fu(is)g Ft(NULL)p Fu(,)f(the)g(curren)o(t)195 ! 314 y(k)o(eymap)i(is)h(used.)31 b(If)18 b Fk(t)o(yp)q(e)j Fu(is)e(not)g Ft(NULL)p Fu(,)f(the)g(t)o(yp)q(e)h(of)f(the)h(ob)s(ject) ! f(is)h(returned)g(in)g(the)f Ft(int)195 369 y Fu(v)m(ariable)f(it)e(p)q ! (oin)o(ts)h(to)e(\(one)h(of)g Ft(ISFUNC)p Fu(,)f Ft(ISKMAP)p ! Fu(,)g(or)h Ft(ISMACR)p Fu(\).)1762 474 y(F)l(unction)-1861 ! b Fi(char)20 b(**)f Fh(rl)p 312 474 V 21 w(in)n(v)n(oking)p ! 541 474 V 23 w(k)n(eyseqs)k Fg(\()p Ft(rl_command_func_t)13 ! b(*function)p Fg(\))195 528 y Fu(Return)i(an)h(arra)o(y)e(of)h(strings) ! h(represen)o(ting)g(the)g(k)o(ey)f(sequences)i(used)f(to)f(in)o(v)o(ok) ! o(e)h Fk(function)g Fu(in)195 583 y(the)f(curren)o(t)g(k)o(eymap.)1762 ! 688 y(F)l(unction)-1861 b Fi(char)20 b(**)f Fh(rl)p 312 ! 688 V 21 w(in)n(v)n(oking)p 541 688 V 23 w(k)n(eyseqs)p ! 750 688 V 21 w(in)p 818 688 V 22 w(map)i Fg(\()p Ft(rl_command_func_t) ! 283 743 y(*function,)13 b(Keymap)i(map)p Fg(\))195 798 ! y Fu(Return)g(an)h(arra)o(y)e(of)h(strings)h(represen)o(ting)g(the)g(k) ! o(ey)f(sequences)i(used)f(to)f(in)o(v)o(ok)o(e)h Fk(function)g ! Fu(in)195 853 y(the)f(k)o(eymap)g Fk(map)p Fu(.)1762 ! 958 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 958 ! V 21 w(function)p 467 958 V 21 w(dump)r(er)g Fg(\()p ! Ft(int)15 b(readable)p Fg(\))195 1013 y Fu(Prin)o(t)g(the)f(readline)j ! (function)e(names)g(and)f(the)h(k)o(ey)g(sequences)g(curren)o(tly)g(b)q ! (ound)h(to)e(them)h(to)195 1067 y Ft(rl_outstream)p Fu(.)j(If)c ! Fk(readable)j Fu(is)d(non-zero,)g(the)g(list)g(is)h(formatted)d(in)j ! (suc)o(h)f(a)f(w)o(a)o(y)g(that)g(it)h(can)195 1122 y(b)q(e)i(made)f ! (part)g(of)f(an)i Ft(inputrc)e Fu(\014le)i(and)f(re-read.)1762 ! 1227 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 1227 ! V 21 w(list)p 337 1227 V 22 w(funmap)p 550 1227 V 18 ! w(names)h Fg(\()p Ft(void)p Fg(\))195 1282 y Fu(Prin)o(t)15 ! b(the)g(names)h(of)e(all)j(bindable)g(Readline)f(functions)g(to)f ! Ft(rl_outstream)p Fu(.)1762 1387 y(F)l(unction)-1861 ! b Fi(const)20 b(char)g(**)f Fh(rl)p 462 1387 V 21 w(funmap)p ! 674 1387 V 18 w(names)i Fg(\()p Ft(void)p Fg(\))195 1442 y Fu(Return)13 b(a)f(NULL)i(terminated)g(arra)o(y)d(of)i(kno)o(wn)g (function)g(names.)20 b(The)13 b(arra)o(y)f(is)h(sorted.)19 ! b(The)195 1497 y(arra)o(y)11 b(itself)j(is)f(allo)q(cated,)h(but)f(not) f(the)h(strings)f(inside.)21 b(Y)l(ou)13 b(should)h Ft(free\(\))d ! Fu(the)i(arra)o(y)e(when)195 1552 y(y)o(ou)k(are)g(done,)g(but)g(not)g ! (the)g(p)q(oin)o(ters.)1762 1657 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1657 V 21 w(add)p 328 1657 ! V 20 w(funmap)p 539 1657 V 18 w(en)n(try)j Fg(\()p Ft(const)14 ! b(char)h(*name,)f(rl_command_func_t)283 1711 y(*function)p ! Fg(\))195 1766 y Fu(Add)j Fk(name)i Fu(to)d(the)g(list)h(of)f(bindable) j(Readline)f(command)e(names,)g(and)h(mak)o(e)f Fk(function)h ! Fu(the)195 1821 y(function)f(to)f(b)q(e)g(called)i(when)f ! Fk(name)i Fu(is)d(in)o(v)o(ok)o(ed.)75 1926 y Fj(2.4.5)30 ! b(Allo)n(wing)21 b(Undoing)137 2020 y Fu(Supp)q(orting)14 ! b(the)g(undo)f(command)g(is)h(a)f(painless)h(thing,)g(and)f(mak)o(es)g ! (y)o(our)f(functions)i(m)o(uc)o(h)f(more)75 2075 y(useful.)21 ! b(It)15 b(is)h(certainly)g(easy)f(to)g(try)f(something)i(if)f(y)o(ou)g ! (kno)o(w)g(y)o(ou)g(can)g(undo)h(it.)137 2140 y(If)21 ! b(y)o(our)f(function)h(simply)h(inserts)f(text)e(once,)j(or)e(deletes)h ! (text)f(once,)i(and)f(uses)f Ft(rl_insert_)75 2194 y(text\(\))13 ! b Fu(or)h Ft(rl_delete_text\(\))d Fu(to)j(do)f(it,)h(then)h(undoing)g ! (is)f(already)g(done)h(for)e(y)o(ou)h(automatically)l(.)137 ! 2259 y(If)d(y)o(ou)f(do)g(m)o(ultiple)i(insertions)f(or)f(m)o(ultiple)i ! (deletions,)g(or)e(an)o(y)g(com)o(bination)h(of)f(these)g(op)q ! (erations,)75 2314 y(y)o(ou)19 b(should)h(group)e(them)h(together)g(in) o(to)g(one)g(op)q(eration.)31 b(This)20 b(is)f(done)h(with)f ! Ft(rl_begin_undo_)75 2369 y(group\(\))14 b Fu(and)i Ft ! (rl_end_undo_group\(\))p Fu(.)137 2434 y(The)g(t)o(yp)q(es)f(of)g(ev)o ! (en)o(ts)g(that)f(can)h(b)q(e)h(undone)g(are:)195 2496 y Ft(enum)23 b(undo_code)g({)h(UNDO_DELETE,)e(UNDO_INSERT,)g ! (UNDO_BEGIN,)g(UNDO_END)h(};)137 2560 y Fu(Notice)16 ! b(that)e Ft(UNDO_DELETE)g Fu(means)h(to)g(insert)g(some)g(text,)f(and)i ! Ft(UNDO_INSERT)d Fu(means)i(to)g(delete)75 2615 y(some)e(text.)19 b(That)14 b(is,)g(the)g(undo)g(co)q(de)g(tells)h(what)e(to)h(undo,)g (not)f(ho)o(w)g(to)g(undo)i(it.)k Ft(UNDO_BEGIN)13 b ! Fu(and)75 2670 y Ft(UNDO_END)h Fu(are)h(tags)f(added)i(b)o(y)f Ft(rl_begin_undo_group\(\))d Fu(and)k Ft(rl_end_undo_group\(\))p ! Fu(.)p eop ! %%Page: 30 32 ! 30 31 bop 75 -58 a Fu(30)1299 b(GNU)15 b(Readline)h(Library)1762 ! 149 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 149 ! 18 3 v 21 w(b)r(egin)p 372 149 V 20 w(undo)p 517 149 ! V 20 w(group)h Fg(\()p Ft(void)p Fg(\))195 204 y Fu(Begins)16 ! b(sa)o(ving)g(undo)g(information)f(in)i(a)e(group)g(construct.)20 ! b(The)c(undo)g(information)g(usually)195 259 y(comes)21 ! b(from)f(calls)i(to)e Ft(rl_insert_text\(\))e Fu(and)j ! Ft(rl_delete_text\(\))p Fu(,)f(but)h(could)g(b)q(e)h(the)195 ! 314 y(result)16 b(of)e(calls)j(to)d Ft(rl_add_undo\(\))p ! Fu(.)1762 418 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 418 V 21 w(end)p 326 418 V 20 w(undo)p 471 418 V ! 20 w(group)h Fg(\()p Ft(void)p Fg(\))195 472 y Fu(Closes)15 b(the)f(curren)o(t)h(undo)g(group)f(started)g(with)g Ft(rl_begin_undo_group)f(\(\))p Fu(.)19 b(There)c(should)195 ! 527 y(b)q(e)h(one)f(call)i(to)d Ft(rl_end_undo_group\(\))f Fu(for)h(eac)o(h)h(call)i(to)d Ft(rl_begin_undo_group\(\))p ! Fu(.)1762 631 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p ! 241 631 V 21 w(add)p 354 631 V 20 w(undo)i Fg(\()p Ft(enum)14 ! b(undo_code)g(what,)g(int)h(start,)g(int)f(end,)h(char)283 ! 686 y(*text)p Fg(\))195 740 y Fu(Remem)o(b)q(er)i(ho)o(w)f(to)h(undo)g ! (an)g(ev)o(en)o(t)g(\(according)g(to)g Fk(what)q Fu(\).)24 ! b(The)17 b(a\013ected)g(text)f(runs)i(from)195 795 y Fk(start)d Fu(to)g Fk(end)p Fu(,)g(and)g(encompasses)h ! Fk(text)p Fu(.)1762 899 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 899 V 21 w(free)p 356 899 V 20 w(undo)p ! 501 899 V 20 w(list)k Fg(\()p Ft(void)p Fg(\))195 954 y Fu(F)l(ree)15 b(the)h(existing)g(undo)f(list.)1762 ! 1057 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 1057 ! V 21 w(do)p 297 1057 V 20 w(undo)i Fg(\()p Ft(void)p ! Fg(\))195 1112 y Fu(Undo)12 b(the)f(\014rst)g(thing)h(on)g(the)f(undo)h (list.)19 b(Returns)11 b Ft(0)h Fu(if)g(there)f(w)o(as)g(nothing)h(to)e ! (undo,)j(non-zero)195 1167 y(if)j(something)f(w)o(as)f(undone.)137 ! 1251 y(Finally)l(,)j(if)f(y)o(ou)f(neither)i(insert)f(nor)f(delete)i (text,)e(but)g(directly)i(mo)q(dify)f(the)g(existing)g(text)g(\(e.g.,) ! 75 1306 y(c)o(hange)j(its)h(case\),)g(call)g Ft(rl_modifying\(\))e Fu(once,)i(just)f(b)q(efore)h(y)o(ou)f(mo)q(dify)h(the)f(text.)32 ! b(Y)l(ou)20 b(m)o(ust)75 1361 y(supply)c(the)g(indices)h(of)e(the)g (text)g(range)g(that)f(y)o(ou)h(are)g(going)g(to)g(mo)q(dify)l(.)1762 ! 1464 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 1464 V 21 w(mo)r(difying)h Fg(\()p Ft(int)15 b(start,)f(int)h(end)p ! Fg(\))195 1519 y Fu(T)l(ell)22 b(Readline)f(to)e(sa)o(v)o(e)h(the)g (text)g(b)q(et)o(w)o(een)g Fk(start)g Fu(and)g Fk(end)j Fu(as)c(a)h(single)h(undo)g(unit.)35 b(It)20 b(is)195 ! 1574 y(assumed)15 b(that)g(y)o(ou)g(will)i(subsequen)o(tly)f(mo)q(dify) ! g(that)e(text.)75 1678 y Fj(2.4.6)30 b(Redispla)n(y)1762 ! 1811 y Fu(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 ! 1811 V 21 w(redispla)n(y)k Fg(\()p Ft(void)p Fg(\))195 ! 1866 y Fu(Change)19 b(what's)f(displa)o(y)o(ed)i(on)f(the)g(screen)g ! (to)f(re\015ect)i(the)f(curren)o(t)f(con)o(ten)o(ts)h(of)f ! Ft(rl_line_)195 1920 y(buffer)p Fu(.)1762 2024 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2024 V 21 w(forced)p 390 2024 ! V 20 w(up)r(date)p 584 2024 V 20 w(displa)n(y)k Fg(\()p ! Ft(void)p Fg(\))195 2079 y Fu(F)l(orce)c(the)g(line)h(to)e(b)q(e)i(up)q (dated)f(and)g(redispla)o(y)o(ed,)i(whether)e(or)g(not)f(Readline)i ! (thinks)g(the)195 2134 y(screen)16 b(displa)o(y)g(is)g(correct.)1762 ! 2238 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2238 ! V 21 w(on)p 297 2238 V 20 w(new)p 416 2238 V 21 w(line)k ! Fg(\()p Ft(void)p Fg(\))195 2292 y Fu(T)l(ell)16 b(the)f(up)q(date)h (functions)g(that)e(w)o(e)g(ha)o(v)o(e)h(mo)o(v)o(ed)f(on)o(to)g(a)h ! (new)g(\(empt)o(y\))f(line,)i(usually)h(after)195 2347 ! y(ouputting)f(a)e(newline.)1762 2451 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2451 V 21 w(on)p 297 2451 V ! 20 w(new)p 416 2451 V 21 w(line)p 525 2451 V 22 w(with)p ! 657 2451 V 22 w(prompt)h Fg(\()p Ft(void)p Fg(\))195 ! 2506 y Fu(T)l(ell)14 b(the)e(up)q(date)h(functions)g(that)f(w)o(e)g(ha) o(v)o(e)g(mo)o(v)o(ed)f(on)o(to)h(a)g(new)g(line,)i(with)f ! Fk(rl)p 1556 2506 14 2 v 17 w(prompt)g Fu(already)195 ! 2560 y(displa)o(y)o(ed.)21 b(This)15 b(could)g(b)q(e)g(used)g(b)o(y)f (applications)i(that)e(w)o(an)o(t)f(to)h(output)g(the)g(prompt)g ! (string)195 2615 y(themselv)o(es,)g(but)g(still)h(need)g(Readline)g(to) e(kno)o(w)g(the)h(prompt)f(string)h(length)g(for)f(redispla)o(y)l(.)21 ! b(It)195 2670 y(should)16 b(b)q(e)g(used)g(after)e(setting)i ! Fk(rl)p 795 2670 V 16 w(already)p 956 2670 V 17 w(prompted)p ! Fu(.)p eop ! %%Page: 31 33 ! 31 32 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(31)1762 149 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 149 18 3 v 21 w(reset)p 357 149 V 20 w(line)p ! 465 149 V 23 w(state)j Fg(\()p Ft(void)p Fg(\))195 204 y Fu(Reset)17 b(the)g(displa)o(y)i(state)d(to)h(a)g(clean)h(state)f (and)g(redispla)o(y)i(the)e(curren)o(t)g(line)i(starting)e(on)g(a)195 ! 259 y(new)e(line.)1762 383 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 383 V 21 w(crlf)j Fg(\()p Ft(void)p Fg(\))195 ! 438 y Fu(Mo)o(v)o(e)14 b(the)h(cursor)g(to)g(the)g(start)f(of)h(the)g ! (next)g(screen)h(line.)1762 562 y(F)l(unction)-1861 b ! Fi(int)20 b Fh(rl)p 215 562 V 21 w(sho)n(w)p 359 562 ! V 20 w(c)n(har)j Fg(\()p Ft(int)14 b(c)p Fg(\))195 616 y Fu(Displa)o(y)j(c)o(haracter)e Fk(c)20 b Fu(on)c Ft(rl_outstream)p Fu(.)21 b(If)c(Readline)g(has)f(not)g(b)q(een)i(set)e(to)f(displa)o(y)j ! (meta)195 671 y(c)o(haracters)12 b(directly)l(,)j(this)e(will)i(con)o (v)o(ert)d(meta)h(c)o(haracters)f(to)g(a)h(meta-pre\014xed)g(k)o(ey)g ! (sequence.)195 726 y(This)j(is)f(in)o(tended)i(for)e(use)g(b)o(y)g (applications)i(whic)o(h)f(wish)g(to)f(do)g(their)g(o)o(wn)g(redispla)o ! (y)l(.)1762 850 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 850 V 21 w(message)g Fg(\()p Ft(const)14 b(char)h(*,)g(...)p ! Fg(\))195 905 y Fu(The)c(argumen)o(ts)e(are)h(a)g(format)f(string)h(as) ! g(w)o(ould)h(b)q(e)g(supplied)i(to)c Ft(printf)p Fu(,)h(p)q(ossibly)i ! (con)o(taining)195 959 y(con)o(v)o(ersion)22 b(sp)q(eci\014cations)i ! (suc)o(h)f(as)e(`)p Ft(\045d)p Fu(',)i(and)f(an)o(y)g(additional)h ! (argumen)o(ts)e(necessary)i(to)195 1014 y(satisfy)d(the)h(con)o(v)o ! (ersion)g(sp)q(eci\014cations.)38 b(The)21 b(resulting)h(string)e(is)i ! (displa)o(y)o(ed)g(in)f(the)g Fk(ec)o(ho)195 1069 y(area)p ! Fu(.)e(The)d(ec)o(ho)f(area)g(is)g(also)g(used)h(to)f(displa)o(y)h(n)o ! (umeric)g(argumen)o(ts)f(and)g(searc)o(h)g(strings.)1762 ! 1193 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 1193 ! V 21 w(clear)p 354 1193 V 21 w(message)h Fg(\()p Ft(void)p ! Fg(\))195 1248 y Fu(Clear)15 b(the)h(message)e(in)i(the)g(ec)o(ho)f ! (area.)1762 1371 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p ! 241 1371 V 21 w(sa)n(v)n(e)p 365 1371 V 21 w(prompt)h ! Fg(\()p Ft(void)p Fg(\))195 1426 y Fu(Sa)o(v)o(e)g(the)h(lo)q(cal)g ! (Readline)h(prompt)e(displa)o(y)i(state)e(in)h(preparation)f(for)g ! (displa)o(ying)j(a)d(new)195 1481 y(message)15 b(in)h(the)f(message)g ! (area)f(with)i Ft(rl_message\(\))p Fu(.)1762 1605 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 1605 V 21 w(restore)p 436 ! 1605 V 20 w(prompt)g Fg(\()p Ft(void)p Fg(\))195 1660 ! y Fu(Restore)g(the)i(lo)q(cal)g(Readline)h(prompt)e(displa)o(y)h(state) ! f(sa)o(v)o(ed)g(b)o(y)g(the)g(most)g(recen)o(t)g(call)i(to)195 ! 1714 y Ft(rl_save_prompt)p Fu(.)1762 1838 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1838 V 21 w(expand)p 416 1838 ! V 20 w(prompt)h Fg(\()p Ft(char)14 b(*prompt)p Fg(\))195 ! 1893 y Fu(Expand)22 b(an)o(y)f(sp)q(ecial)i(c)o(haracter)e(sequences)h ! (in)g Fk(prompt)g Fu(and)g(set)f(up)h(the)f(lo)q(cal)i(Readline)195 ! 1948 y(prompt)17 b(redispla)o(y)i(v)m(ariables.)30 b(This)18 b(function)h(is)f(called)i(b)o(y)e Ft(readline\(\))p ! Fu(.)26 b(It)18 b(ma)o(y)f(also)h(b)q(e)195 2003 y(called)12 b(to)e(expand)h(the)g(primary)g(prompt)f(if)h(the)f Ft ! (rl_on_new_line_with_prompt\(\))d Fu(function)195 2057 y(or)12 b Ft(rl_already_prompted)e Fu(v)m(ariable)k(is)g(used.)19 b(It)13 b(returns)g(the)f(n)o(um)o(b)q(er)i(of)e(visible)j(c)o ! (haracters)195 2112 y(on)g(the)g(last)h(line)g(of)f(the)g(\(p)q ! (ossibly)i(m)o(ulti-line\))g(prompt.)1762 2236 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2236 V 21 w(set)p 307 2236 ! V 20 w(prompt)h Fg(\()p Ft(const)14 b(char)h(*prompt)p ! Fg(\))195 2291 y Fu(Mak)o(e)e(Readline)i(use)e Fk(prompt)h Fu(for)f(subsequen)o(t)h(redispla)o(y)l(.)21 b(This)14 ! b(calls)g Ft(rl_expand_prompt\(\))195 2346 y Fu(to)h(expand)g(the)h (prompt)e(and)i(sets)f Ft(rl_prompt)f Fu(to)g(the)h(result.)75 ! 2462 y Fj(2.4.7)30 b(Mo)r(difying)20 b(T)-5 b(ext)1762 ! 2615 y Fu(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 ! 2615 V 21 w(insert)p 378 2615 V 21 w(text)k Fg(\()p Ft(const)14 ! b(char)g(*text)p Fg(\))195 2670 y Fu(Insert)h Fk(text)h ! Fu(in)o(to)f(the)h(line)g(at)f(the)g(curren)o(t)g(cursor)g(p)q ! (osition.)p eop ! %%Page: 32 34 ! 32 33 bop 75 -58 a Fu(32)1299 b(GNU)15 b(Readline)h(Library)1762 ! 149 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 149 ! 18 3 v 21 w(delete)p 383 149 V 22 w(text)k Fg(\()p Ft(int)14 ! b(start,)h(int)f(end)p Fg(\))195 204 y Fu(Delete)i(the)f(text)g(b)q(et) ! o(w)o(een)g Fk(start)g Fu(and)h Fk(end)h Fu(in)f(the)g(curren)o(t)f ! (line.)1762 321 y(F)l(unction)-1861 b Fi(char)20 b(*)f ! Fh(rl)p 286 321 V 21 w(cop)n(y)p 421 321 V 21 w(text)24 ! b Fg(\()p Ft(int)14 b(start,)h(int)g(end)p Fg(\))195 ! 376 y Fu(Return)g(a)g(cop)o(y)g(of)g(the)g(text)f(b)q(et)o(w)o(een)i ! Fk(start)f Fu(and)g Fk(end)j Fu(in)e(the)f(curren)o(t)g(line.)1762 ! 494 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 494 ! V 21 w(kill)p 311 494 V 23 w(text)k Fg(\()p Ft(int)14 ! b(start,)h(int)g(end)p Fg(\))195 548 y Fu(Cop)o(y)i(the)g(text)f(b)q ! (et)o(w)o(een)i Fk(start)f Fu(and)g Fk(end)i Fu(in)f(the)f(curren)o(t)g ! (line)i(to)e(the)g(kill)i(ring,)e(app)q(ending)195 603 ! y(or)f(prep)q(ending)k(to)c(the)h(last)g(kill)i(if)e(the)g(last)g ! (command)g(w)o(as)f(a)h(kill)i(command.)25 b(The)17 b(text)f(is)195 ! 658 y(deleted.)26 b(If)17 b Fk(start)g Fu(is)g(less)g(than)g ! Fk(end)p Fu(,)g(the)g(text)g(is)g(app)q(ended,)h(otherwise)f(prep)q ! (ended.)27 b(If)17 b(the)195 713 y(last)e(command)g(w)o(as)g(not)f(a)h ! (kill,)i(a)e(new)g(kill)i(ring)f(slot)f(is)h(used.)1762 ! 830 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 830 ! V 21 w(push)p 355 830 V 19 w(macro)p 529 830 V 19 w(input)k ! Fg(\()p Ft(char)14 b(*macro)p Fg(\))195 885 y Fu(Cause)g ! Fk(macro)i Fu(to)d(b)q(e)i(inserted)g(in)o(to)f(the)g(line,)i(as)e(if)g ! (it)h(had)f(b)q(een)h(in)o(v)o(ok)o(ed)g(b)o(y)f(a)g(k)o(ey)g(b)q(ound) ! h(to)195 940 y(a)g(macro.)k(Not)c(esp)q(ecially)i(useful;)f(use)g ! Ft(rl_insert_text\(\))d Fu(instead.)75 1052 y Fj(2.4.8)30 ! b(Character)21 b(Input)1762 1198 y Fu(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1198 V 21 w(read)p 346 1198 ! V 20 w(k)n(ey)k Fg(\()p Ft(void)p Fg(\))195 1253 y Fu(Return)14 b(the)h(next)g(c)o(haracter)f(a)o(v)m(ailable)i(from)e(Readline's)i ! (curren)o(t)f(input)g(stream.)k(This)d(han-)195 1308 y(dles)f(input)g(inserted)f(in)o(to)g(the)g(input)h(stream)e(via)h ! Fk(rl)p 1117 1308 14 2 v 17 w(p)q(ending)p 1290 1308 V 18 w(input)i Fu(\(see)e(Section)h(2.3)e([Read-)195 ! 1363 y(line)21 b(V)l(ariables],)g(page)f(22\))f(and)h Ft(rl_stuff_char\(\))p Fu(,)e(macros,)h(and)h(c)o(haracters)f(read)h ! (from)195 1417 y(the)d(k)o(eyb)q(oard.)25 b(While)19 b(w)o(aiting)e(for)f(input,)j(this)e(function)h(will)h(call)f(an)o(y)e ! (function)i(assigned)195 1472 y(to)d(the)g Ft(rl_event_hook)e ! Fu(v)m(ariable.)1762 1589 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 1589 18 3 v 21 w(getc)j Fg(\()p Ft(FILE)14 ! b(*stream)p Fg(\))195 1644 y Fu(Return)c(the)h(next)g(c)o(haracter)f(a) ! o(v)m(ailable)i(from)e Fk(stream)p Fu(,)g(whic)o(h)i(is)f(assumed)f(to) ! g(b)q(e)i(the)e(k)o(eyb)q(oard.)1762 1761 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1761 V 21 w(stu\013)p 346 1761 ! V 20 w(c)n(har)j Fg(\()p Ft(int)15 b(c)p Fg(\))195 1816 y Fu(Insert)i Fk(c)i Fu(in)o(to)d(the)h(Readline)h(input)f(stream.)23 b(It)16 b(will)i(b)q(e)f Ft(")p Fu(read)p Ft(")g Fu(b)q(efore)f ! (Readline)i(attempts)195 1871 y(to)d(read)g(c)o(haracters)f(from)h(the) ! g(terminal)h(with)f Ft(rl_read_key\(\))p Fu(.)1762 1988 ! y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 1988 V ! 21 w(execute)p 423 1988 V 22 w(next)j Fg(\()p Ft(int)15 ! b(c)p Fg(\))195 2043 y Fu(Mak)o(e)i Fk(c)k Fu(b)q(e)d(the)g(next)g (command)g(to)f(b)q(e)i(executed)f(when)h Ft(rl_read_key\(\))d ! Fu(is)i(called.)29 b(This)195 2098 y(sets)15 b Fk(rl)p ! 317 2098 14 2 v 17 w(p)q(ending)p 490 2098 V 18 w(input)p ! Fu(.)1762 2215 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 2215 18 3 v 21 w(clear)p 354 2215 V 21 w(p)r(ending)p ! 575 2215 V 21 w(input)j Fg(\()p Ft(void)p Fg(\))195 2270 ! y Fu(Unset)f Fk(rl)p 365 2270 14 2 v 16 w(p)q(ending)p ! 537 2270 V 19 w(input)p Fu(,)h(e\013ectiv)o(ely)g(negating)e(the)h (e\013ect)f(of)g(an)o(y)h(previous)g(call)h(to)d Ft(rl_)195 ! 2325 y(execute_next\(\))p Fu(.)29 b(This)19 b(w)o(orks)f(only)h(if)h (the)e(p)q(ending)j(input)f(has)f(not)f(already)h(b)q(een)h(read)195 ! 2380 y(with)c Ft(rl_read_key\(\))p Fu(.)1762 2497 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2497 18 3 v 21 w(set)p 307 ! 2497 V 20 w(k)n(eyb)r(oard)p 558 2497 V 21 w(input)p ! 712 2497 V 21 w(timeout)i Fg(\()p Ft(int)15 b(u)p Fg(\))195 ! 2552 y Fu(While)21 b(w)o(aiting)g(for)e(k)o(eyb)q(oard)h(input)h(in)g Ft(rl_read_key\(\))p Fu(,)e(Readline)i(will)h(w)o(ait)e(for)f ! Fk(u)h Fu(mi-)195 2606 y(croseconds)h(for)e(input)j(b)q(efore)f (calling)h(an)o(y)e(function)h(assigned)g(to)f Ft(rl_event_hook)p ! Fu(.)34 b(The)195 2661 y(default)16 b(w)o(aiting)f(p)q(erio)q(d)i(is)e (one-ten)o(th)h(of)e(a)h(second.)21 b(Returns)14 b(the)i(old)f(timeout) ! h(v)m(alue.)p eop ! %%Page: 33 35 ! 33 34 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(33)75 149 y Fj(2.4.9)30 b(T)-5 b(erminal)20 ! b(Managemen)n(t)1762 290 y Fu(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 290 18 3 v 21 w(prep)p 376 290 V 20 w(terminal)j ! Fg(\()p Ft(int)14 b(meta_flag)p Fg(\))195 345 y Fu(Mo)q(dify)22 b(the)f(terminal)h(settings)f(for)g(Readline's)h(use,)h(so)d ! Ft(readline\(\))g Fu(can)i(read)f(a)g(single)195 400 y(c)o(haracter)15 b(at)g(a)g(time)i(from)d(the)i(k)o(eyb)q(oard.)22 ! b(The)16 b Fk(meta)p 1192 400 14 2 v 15 w(\015ag)k Fu(argumen)o(t)15 ! b(should)h(b)q(e)h(non-zero)195 454 y(if)f(Readline)g(should)g(read)f ! (eigh)o(t-bit)i(input.)1762 566 y(F)l(unction)-1861 b ! Fi(void)20 b Fh(rl)p 241 566 18 3 v 21 w(deprep)p 434 ! 566 V 20 w(terminal)j Fg(\()p Ft(void)p Fg(\))195 621 ! y Fu(Undo)16 b(the)g(e\013ects)f(of)h Ft(rl_prep_terminal\(\))p Fu(,)d(lea)o(ving)k(the)e(terminal)i(in)g(the)e(state)g(in)i(whic)o(h) ! 195 676 y(it)e(w)o(as)g(b)q(efore)g(the)h(most)e(recen)o(t)h(call)i(to) ! d Ft(rl_prep_terminal\(\))p Fu(.)1762 787 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 787 V 21 w(tt)n(y)p 334 787 ! V 22 w(set)p 427 787 V 20 w(default)p 620 787 V 21 w(bindings)k ! Fg(\()p Ft(Keymap)14 b(kmap)p Fg(\))195 842 y Fu(Read)k(the)h(op)q ! (erating)f(system's)g(terminal)h(editing)h(c)o(haracters)e(\(as)f(w)o ! (ould)i(b)q(e)g(displa)o(y)o(ed)h(b)o(y)195 897 y Ft(stty)p ! Fu(\))14 b(to)h(their)h(Readline)g(equiv)m(alen)o(ts.)22 ! b(The)15 b(bindings)i(are)e(p)q(erformed)g(in)h Fk(kmap)p ! Fu(.)1762 1008 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 1008 V 21 w(reset)p 357 1008 V 20 w(terminal)j Fg(\()p ! Ft(const)15 b(char)f(*terminal_name)p Fg(\))195 1063 y Fu(Reinitialize)h(Readline's)e(idea)g(of)f(the)g(terminal)h(settings) ! g(using)g Fk(terminal)p 1491 1063 14 2 v 17 w(name)h ! Fu(as)e(the)h(termi-)195 1118 y(nal)k(t)o(yp)q(e)f(\(e.g.,)f ! Ft(vt100)p Fu(\).)21 b(If)c Fk(terminal)p 878 1118 V 17 w(name)i Fu(is)d Ft(NULL)p Fu(,)g(the)g(v)m(alue)h(of)f(the)g ! Ft(TERM)g Fu(en)o(vironmen)o(t)195 1173 y(v)m(ariable)h(is)e(used.)75 ! 1282 y Fj(2.4.10)29 b(Utilit)n(y)22 b(F)-5 b(unctions)1762 ! 1422 y Fu(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 ! 1422 18 3 v 21 w(extend)p 404 1422 V 21 w(line)p 513 ! 1422 V 22 w(bu\013er)j Fg(\()p Ft(int)15 b(len)p Fg(\))195 ! 1477 y Fu(Ensure)g(that)g Ft(rl_line_buffer)e Fu(has)i(enough)g(space)h ! (to)e(hold)i Fk(len)g Fu(c)o(haracters,)e(p)q(ossibly)i(real-)195 ! 1532 y(lo)q(cating)g(it)f(if)h(necessary)l(.)1762 1644 ! y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 1644 V ! 21 w(initiali)q(z)q(e)26 b Fg(\()p Ft(void)p Fg(\))195 ! 1698 y Fu(Initialize)21 b(or)d(re-initialize)k(Readline's)d(in)o ! (ternal)h(state.)28 b(It's)18 b(not)g(strictly)h(necessary)g(to)f(call) ! 195 1753 y(this;)d Ft(readline\(\))f Fu(calls)i(it)g(b)q(efore)f ! (reading)h(an)o(y)f(input.)1762 1865 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1865 V 21 w(ding)j Fg(\()p ! Ft(void)p Fg(\))195 1920 y Fu(Ring)15 b(the)g(terminal)h(b)q(ell,)h(ob) ! q(eying)f(the)g(setting)f(of)g Ft(bell-style)p Fu(.)1762 ! 2031 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2031 ! V 21 w(alphab)r(etic)k Fg(\()p Ft(int)14 b(c)p Fg(\))195 ! 2086 y Fu(Return)h(1)g(if)g Fk(c)j Fu(is)e(an)f(alphab)q(etic)i(c)o ! (haracter.)1762 2198 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 2198 V 21 w(displa)n(y)p 435 2198 V 22 ! w(matc)n(h)p 611 2198 V 20 w(list)25 b Fg(\()p Ft(char)14 ! b(**matches,)g(int)g(len,)h(int)g(max)p Fg(\))195 2252 ! y Fu(A)i(con)o(v)o(enience)i(function)f(for)f(displa)o(ying)i(a)e(list) ! h(of)e(strings)h(in)i(columnar)e(format)f(on)h(Read-)195 ! 2307 y(line's)h(output)f(stream.)23 b Ft(matches)16 b ! Fu(is)h(the)g(list)h(of)e(strings,)h(in)g(argv)f(format,)g(suc)o(h)h ! (as)f(a)h(list)g(of)195 2362 y(completion)c(matc)o(hes.)19 b Ft(len)11 b Fu(is)i(the)f(n)o(um)o(b)q(er)h(of)e(strings)h(in)h Ft(matches)p Fu(,)f(and)g Ft(max)g Fu(is)g(the)h(length)f(of)195 ! 2417 y(the)h(longest)g(string)g(in)h Ft(matches)p Fu(.)19 b(This)13 b(function)h(uses)f(the)h(setting)f(of)f Ft ! (print-completions-)195 2472 y(horizontally)k Fu(to)i(select)h(ho)o(w)e (the)i(matc)o(hes)e(are)h(displa)o(y)o(ed)h(\(see)g(Section)g(1.3.1)d ! ([Readline)195 2526 y(Init)g(File)g(Syn)o(tax],)e(page)h(4\).)137 ! 2615 y(The)i(follo)o(wing)f(are)g(implemen)o(ted)i(as)e(macros,)f (de\014ned)i(in)g Ft(chardefs.h)p Fu(.)k(Applications)d(should)75 ! 2670 y(refrain)d(from)g(using)h(them.)p eop ! %%Page: 34 36 ! 34 35 bop 75 -58 a Fu(34)1299 b(GNU)15 b(Readline)h(Library)1762 ! 149 y(F)l(unction)-1861 b Fi(int)p 176 149 18 3 v 40 ! w Fh(rl)p 235 149 V 21 w(upp)r(ercase)p 506 149 V 20 ! w(p)23 b Fg(\()p Ft(int)14 b(c)p Fg(\))195 204 y Fu(Return)h(1)g(if)g ! Fk(c)j Fu(is)e(an)f(upp)q(ercase)i(alphab)q(etic)f(c)o(haracter.)1762 ! 322 y(F)l(unction)-1861 b Fi(int)p 176 322 V 40 w Fh(rl)p ! 235 322 V 21 w(lo)n(w)n(ercase)p 489 322 V 23 w(p)22 ! b Fg(\()p Ft(int)15 b(c)p Fg(\))195 376 y Fu(Return)g(1)g(if)g ! Fk(c)j Fu(is)e(a)f(lo)o(w)o(ercase)g(alphab)q(etic)i(c)o(haracter.)1762 ! 494 y(F)l(unction)-1861 b Fi(int)p 176 494 V 40 w Fh(rl)p ! 235 494 V 21 w(digit)p 369 494 V 22 w(p)23 b Fg(\()p ! Ft(int)14 b(c)p Fg(\))195 549 y Fu(Return)h(1)g(if)g ! Fk(c)j Fu(is)e(a)f(n)o(umeric)h(c)o(haracter.)1762 666 ! y(F)l(unction)-1861 b Fi(int)p 176 666 V 40 w Fh(rl)p ! 235 666 V 21 w(to)p 307 666 V 21 w(upp)r(er)21 b Fg(\()p ! Ft(int)15 b(c)p Fg(\))195 721 y Fu(If)d Fk(c)j Fu(is)d(a)g(lo)o(w)o ! (ercase)f(alphab)q(etic)j(c)o(haracter,)d(return)h(the)g(corresp)q ! (onding)h(upp)q(ercase)g(c)o(haracter.)1762 838 y(F)l(unction)-1861 ! b Fi(int)p 176 838 V 40 w Fh(rl)p 235 838 V 21 w(to)p ! 307 838 V 21 w(lo)n(w)n(er)24 b Fg(\()p Ft(int)15 b(c)p ! Fg(\))195 893 y Fu(If)g Fk(c)i Fu(is)e(an)f(upp)q(ercase)i(alphab)q ! (etic)g(c)o(haracter,)e(return)g(the)h(corresp)q(onding)g(lo)o(w)o ! (ercase)f(c)o(harac-)195 948 y(ter.)1762 1065 y(F)l(unction)-1861 ! b Fi(int)p 176 1065 V 40 w Fh(rl)p 235 1065 V 21 w(digit)p ! 369 1065 V 22 w(v)m(alue)24 b Fg(\()p Ft(int)15 b(c)p ! Fg(\))195 1120 y Fu(If)g Fk(c)k Fu(is)c(a)g(n)o(um)o(b)q(er,)g(return)g ! (the)h(v)m(alue)g(it)g(represen)o(ts.)75 1232 y Fj(2.4.11)29 ! b(Miscellaneous)22 b(F)-5 b(unctions)1762 1379 y Fu(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1379 V 21 w(macro)p 391 1379 ! V 19 w(bind)j Fg(\()p Ft(const)14 b(char)g(*keyseq,)h(const)f(char)h ! (*macro,)283 1433 y(Keymap)f(map)p Fg(\))195 1488 y Fu(Bind)f(the)f(k)o ! (ey)f(sequence)i Fk(k)o(eyseq)g Fu(to)e(in)o(v)o(ok)o(e)g(the)h(macro)f Fk(macro)p Fu(.)18 b(The)12 b(binding)h(is)f(p)q(erformed)g(in)195 ! 1543 y Fk(map)p Fu(.)19 b(When)14 b Fk(k)o(eyseq)h Fu(is)f(in)o(v)o(ok) ! o(ed,)g(the)g Fk(macro)i Fu(will)f(b)q(e)f(inserted)h(in)o(to)f(the)g ! (line.)21 b(This)14 b(function)195 1598 y(is)i(deprecated;)f(use)h ! Ft(rl_generic_bind\(\))d Fu(instead.)1762 1715 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 1715 V 21 w(macro)p 417 1715 V 19 w(dump)r(er)g Fg(\()p Ft(int)15 b(readable)p Fg(\))195 ! 1770 y Fu(Prin)o(t)f(the)f(k)o(ey)h(sequences)g(b)q(ound)h(to)e(macros) ! g(and)g(their)h(v)m(alues,)h(using)f(the)g(curren)o(t)g(k)o(eymap,)195 ! 1825 y(to)h Ft(rl_outstream)p Fu(.)k(If)d Fk(readable)j Fu(is)d(non-zero,)g(the)g(list)g(is)g(formatted)f(in)h(suc)o(h)g(a)f(w) ! o(a)o(y)g(that)g(it)195 1880 y(can)g(b)q(e)h(made)f(part)g(of)g(an)g ! Ft(inputrc)f Fu(\014le)i(and)g(re-read.)1762 1997 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1997 V 21 w(v)m(ariable)p 431 ! 1997 V 22 w(bind)j Fg(\()p Ft(const)14 b(char)g(*variable,)g(const)h ! (char)f(*value)p Fg(\))195 2052 y Fu(Mak)o(e)22 b(the)g(Readline)i(v)m (ariable)g Fk(v)m(ariable)j Fu(ha)o(v)o(e)22 b Fk(v)m(alue)p Fu(.)43 b(This)23 b(b)q(eha)o(v)o(es)g(as)f(if)h(the)f(readline)195 ! 2106 y(command)12 b(`)p Ft(set)j Fk(v)m(ariable)k(v)m(alue)s Fu(')12 b(had)h(b)q(een)g(executed)h(in)f(an)f Ft(inputrc)g ! Fu(\014le)h(\(see)f(Section)i(1.3.1)195 2161 y([Readline)i(Init)g(File) ! h(Syn)o(tax],)d(page)h(4\).)1762 2279 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 2279 V 21 w(v)m(ariable)p ! 457 2279 V 22 w(dump)r(er)g Fg(\()p Ft(int)14 b(readable)p ! Fg(\))195 2333 y Fu(Prin)o(t)g(the)h(readline)h(v)m(ariable)f(names)g (and)f(their)h(curren)o(t)f(v)m(alues)i(to)d Ft(rl_outstream)p ! Fu(.)18 b(If)d Fk(read-)195 2388 y(able)20 b Fu(is)e(non-zero,)f(the)g (list)h(is)g(formatted)e(in)h(suc)o(h)h(a)e(w)o(a)o(y)g(that)h(it)g ! (can)g(b)q(e)h(made)f(part)f(of)h(an)195 2443 y Ft(inputrc)d ! Fu(\014le)i(and)g(re-read.)1762 2560 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2560 V 21 w(set)p 307 2560 ! V 20 w(paren)p 469 2560 V 20 w(blink)p 613 2560 V 23 ! w(timeout)i Fg(\()p Ft(int)15 b(u)p Fg(\))195 2615 y Fu(Set)e(the)f(time)h(in)o(terv)m(al)h(\(in)f(microseconds\))g(that)f (Readline)i(w)o(aits)e(when)h(sho)o(wing)f(a)h(balancing)195 ! 2670 y(c)o(haracter)h(when)i Ft(blink-matching-paren)d ! Fu(has)i(b)q(een)h(enabled.)p eop ! %%Page: 35 37 ! 35 36 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(35)1762 149 y(F)l(unction)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 149 18 3 v 21 w(get)p 384 149 V 21 ! w(termcap)j Fg(\()p Ft(const)14 b(char)g(*cap)p Fg(\))195 ! 204 y Fu(Retriev)o(e)f(the)h(string)f(v)m(alue)i(of)e(the)h(termcap)f ! (capabilit)o(y)i Fk(cap)p Fu(.)k(Readline)c(fetc)o(hes)f(the)f(termcap) ! 195 259 y(en)o(try)j(for)h(the)f(curren)o(t)h(terminal)h(name)e(and)h ! (uses)g(those)g(capabilities)i(to)d(mo)o(v)o(e)g(around)h(the)195 ! 314 y(screen)11 b(line)h(and)f(p)q(erform)f(other)g(terminal-sp)q ! (eci\014c)k(op)q(erations,)d(lik)o(e)h(erasing)e(a)h(line.)20 ! b(Readline)195 369 y(do)q(es)e(not)f(use)h(all)g(of)f(a)g(terminal's)h ! (capabilities,)i(and)e(this)g(function)g(will)h(return)f(v)m(alues)h ! (for)195 423 y(only)d(those)f(capabilities)i(Readline)g(uses.)75 ! 537 y Fj(2.4.12)29 b(Alternate)21 b(In)n(terface)137 ! 634 y Fu(An)i(alternate)f(in)o(terface)h(is)g(a)o(v)m(ailable)h(to)d (plain)j Ft(readline\(\))p Fu(.)40 b(Some)22 b(applications)i(need)g ! (to)75 689 y(in)o(terlea)o(v)o(e)15 b(k)o(eyb)q(oard)f(I/O)h(with)g (\014le,)h(device,)f(or)f(windo)o(w)h(system)f(I/O,)h(t)o(ypically)h(b) ! o(y)e(using)h(a)g(main)75 744 y(lo)q(op)f(to)g Ft(select\(\))e Fu(on)i(v)m(arious)g(\014le)h(descriptors.)20 b(T)l(o)14 b(accomo)q(date)f(this)h(need,)h(readline)g(can)f(also)g(b)q(e)75 ! 799 y(in)o(v)o(ok)o(ed)i(as)f(a)g(`callbac)o(k')h(function)h(from)d(an) ! i(ev)o(en)o(t)f(lo)q(op.)22 b(There)16 b(are)f(functions)h(a)o(v)m ! (ailable)i(to)c(mak)o(e)75 853 y(this)i(easy)l(.)1762 ! 973 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 973 ! V 21 w(callbac)n(k)p 458 973 V 23 w(handler)p 670 973 ! V 21 w(install)25 b Fg(\()p Ft(const)14 b(char)h(*prompt,)283 ! 1028 y(rl_vcpfunc_t)e(*lhandler)p Fg(\))195 1082 y Fu(Set)f(up)h(the)g (terminal)g(for)f(readline)i(I/O)f(and)f(displa)o(y)i(the)e(initial)j ! (expanded)e(v)m(alue)h(of)e Fk(prompt)p Fu(.)195 1137 y(Sa)o(v)o(e)j(the)h(v)m(alue)h(of)f Fk(lhandler)21 b Fu(to)15 b(use)h(as)f(a)h(function)h(to)e(call)i(when)f(a)g(complete)g ! (line)i(of)d(input)195 1192 y(has)g(b)q(een)h(en)o(tered.)21 b(The)15 b(function)h(tak)o(es)e(the)i(text)e(of)h(the)g(line)i(as)e ! (an)g(argumen)o(t.)1762 1312 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 1312 V 21 w(callbac)n(k)p 458 1312 V 23 ! w(read)p 591 1312 V 20 w(c)n(har)j Fg(\()p Ft(void)p ! Fg(\))195 1366 y Fu(Whenev)o(er)17 b(an)g(application)h(determines)g ! (that)e(k)o(eyb)q(oard)h(input)h(is)f(a)o(v)m(ailable,)i(it)e(should)h ! (call)195 1421 y Ft(rl_callback_read_char\(\))p Fu(,)8 ! b(whic)o(h)k(will)g(read)f(the)g(next)g(c)o(haracter)f(from)g(the)h ! (curren)o(t)g(input)195 1476 y(source.)20 b(If)14 b(that)f(c)o ! (haracter)g(completes)i(the)f(line,)h Ft(rl_callback_read_char)c ! Fu(will)16 b(in)o(v)o(ok)o(e)e(the)195 1531 y Fk(lhandler)21 ! b Fu(function)c(sa)o(v)o(ed)e(b)o(y)h Ft(rl_callback_handler_install)d ! Fu(to)i(pro)q(cess)h(the)g(line.)24 b Ft(EOF)195 1585 ! y Fu(is)16 b(indicated)h(b)o(y)e(calling)i Fk(lhandler)j ! Fu(with)15 b(a)g Ft(NULL)g Fu(line.)1762 1705 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 1705 V 21 w(callbac)n(k)p ! 458 1705 V 23 w(handler)p 670 1705 V 21 w(remo)n(v)n(e)i ! Fg(\()p Ft(void)p Fg(\))195 1760 y Fu(Restore)c(the)g(terminal)i(to)d ! (its)i(initial)i(state)d(and)g(remo)o(v)o(e)g(the)h(line)h(handler.)31 ! b(This)19 b(ma)o(y)f(b)q(e)195 1815 y(called)f(from)d(within)j(a)e ! (callbac)o(k)h(as)f(w)o(ell)h(as)f(indep)q(enden)o(tly)l(.)75 ! 1928 y Fj(2.4.13)29 b(A)21 b(Readline)g(Example)137 2025 ! y Fu(Here)f(is)g(a)f(function)i(whic)o(h)f(c)o(hanges)f(lo)o(w)o (ercase)h(c)o(haracters)e(to)h(their)h(upp)q(ercase)h(equiv)m(alen)o ! (ts,)75 2080 y(and)e(upp)q(ercase)i(c)o(haracters)d(to)h(lo)o(w)o (ercase.)31 b(If)20 b(this)f(function)h(w)o(as)f(b)q(ound)h(to)f(`)p ! Ft(M-c)p Fu(',)f(then)i(t)o(yping)75 2135 y(`)p Ft(M-c)p Fu(')12 b(w)o(ould)h(c)o(hange)h(the)f(case)g(of)g(the)g(c)o(haracter)g (under)g(p)q(oin)o(t.)20 b(T)o(yping)14 b(`)p Ft(M-1)g(0)h(M-c)p ! Fu(')d(w)o(ould)i(c)o(hange)75 2190 y(the)h(case)g(of)g(the)h(follo)o (wing)f(10)g(c)o(haracters,)f(lea)o(ving)i(the)f(cursor)g(on)g(the)h ! (last)f(c)o(haracter)f(c)o(hanged.)195 2255 y Ft(/*)24 b(Invert)f(the)g(case)g(of)h(the)f(COUNT)h(following)e(characters.)h ! (*/)195 2307 y(int)195 2359 y(invert_case_line)f(\(count,)h(key\))314 ! 2411 y(int)h(count,)f(key;)195 2462 y({)243 2514 y(register)f(int)i ! (start,)f(end,)g(i;)243 2618 y(start)g(=)h(rl_point;)p ! eop ! %%Page: 36 38 ! 36 37 bop 75 -58 a Fu(36)1299 b(GNU)15 b(Readline)h(Library)243 ! 149 y Ft(if)23 b(\(rl_point)g(>=)h(rl_end\))290 201 y(return)f(\(0\);) ! 243 305 y(if)g(\(count)g(<)h(0\))290 357 y({)338 409 ! y(direction)f(=)h(-1;)338 461 y(count)f(=)h(-count;)290 ! 513 y(})243 565 y(else)290 616 y(direction)f(=)h(1;)243 ! 720 y(/*)f(Find)h(the)f(end)h(of)f(the)h(range)f(to)g(modify.)g(*/)243 ! 772 y(end)g(=)h(start)f(+)h(\(count)f(*)h(direction\);)243 ! 876 y(/*)f(Force)g(it)h(to)g(be)f(within)g(range.)g(*/)243 ! 928 y(if)g(\(end)h(>)f(rl_end\))290 980 y(end)h(=)g(rl_end;)243 ! 1032 y(else)f(if)h(\(end)f(<)h(0\))290 1083 y(end)g(=)g(0;)243 ! 1187 y(if)f(\(start)g(==)h(end\))290 1239 y(return)f(\(0\);)243 ! 1343 y(if)g(\(start)g(>)h(end\))290 1395 y({)338 1447 ! y(int)g(temp)f(=)h(start;)338 1499 y(start)f(=)h(end;)338 ! 1550 y(end)g(=)f(temp;)290 1602 y(})243 1706 y(/*)g(Tell)h(readline)e ! (that)i(we)f(are)h(modifying)e(the)i(line,)f(so)h(it)f(will)h(save)314 ! 1758 y(the)g(undo)f(information.)f(*/)243 1810 y(rl_modifying)g ! (\(start,)h(end\);)243 1914 y(for)g(\(i)h(=)f(start;)h(i)f(!=)h(end;)f ! (i++\))290 1966 y({)338 2017 y(if)h(\(_rl_uppercase_p)d ! (\(rl_line_buffer[i]\)\))386 2069 y(rl_line_buffer[i])g(=)j ! (_rl_to_lower)e(\(rl_line_buffer[i]\);)338 2121 y(else)h(if)h ! (\(_rl_lowercase_p)e(\(rl_line_buffer[i]\)\))386 2173 ! y(rl_line_buffer[i])f(=)j(_rl_to_upper)e(\(rl_line_buffer[i]\);)290 ! 2225 y(})243 2277 y(/*)h(Move)h(point)f(to)g(on)h(top)f(of)h(the)f ! (last)h(character)e(changed.)h(*/)243 2329 y(rl_point)f(=)i ! (\(direction)f(==)g(1\))h(?)g(end)f(-)h(1)g(:)f(start;)243 ! 2381 y(return)g(\(0\);)195 2433 y(})p eop ! %%Page: 37 39 ! 37 38 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(37)75 149 y Fs(2.5)33 b(Readline)23 b(Signal)h ! (Handling)137 253 y Fu(Signals)e(are)f(async)o(hronous)f(ev)o(en)o(ts)h ! (sen)o(t)f(to)h(a)f(pro)q(cess)h(b)o(y)g(the)g(Unix)h(k)o(ernel,)g ! (sometimes)f(on)75 308 y(b)q(ehalf)g(of)e(another)h(pro)q(cess.)34 b(They)20 b(are)g(in)o(tended)h(to)e(indicate)j(exceptional)f(ev)o(en)o ! (ts,)f(lik)o(e)h(a)f(user)75 362 y(pressing)c(the)f(in)o(terrupt)g(k)o (ey)g(on)g(his)h(terminal,)f(or)g(a)f(net)o(w)o(ork)g(connection)i(b)q ! (eing)g(brok)o(en.)k(There)15 b(is)75 417 y(a)e(class)g(of)g(signals)h (that)f(can)g(b)q(e)h(sen)o(t)f(to)f(the)i(pro)q(cess)f(curren)o(tly)h ! (reading)f(input)i(from)d(the)h(k)o(eyb)q(oard.)75 472 y(Since)i(Readline)f(c)o(hanges)g(the)f(terminal)h(attributes)f(when)h (it)g(is)g(called,)h(it)e(needs)h(to)f(p)q(erform)g(sp)q(ecial)75 ! 527 y(pro)q(cessing)i(when)f(suc)o(h)g(a)g(signal)g(is)g(receiv)o(ed)h (in)g(order)f(to)f(restore)g(the)h(terminal)g(to)f(a)h(sane)g(state,)e ! (or)75 582 y(pro)o(vide)k(application)h(writers)e(with)g(functions)h ! (to)f(do)g(so)g(man)o(ually)l(.)137 656 y(Readline)22 b(con)o(tains)e(an)g(in)o(ternal)h(signal)g(handler)g(that)f(is)h (installed)h(for)d(a)h(n)o(um)o(b)q(er)g(of)g(signals)75 ! 711 y(\()p Ft(SIGINT)p Fu(,)h Ft(SIGQUIT)p Fu(,)g Ft(SIGTERM)p Fu(,)g Ft(SIGALRM)p Fu(,)g Ft(SIGTSTP)p Fu(,)g Ft(SIGTTIN)p Fu(,)h(and)f Ft(SIGTTOU)p Fu(\).)36 b(When)21 b(one)g(of)75 ! 766 y(these)16 b(signals)h(is)f(receiv)o(ed,)h(the)f(signal)h(handler)f ! (will)i(reset)e(the)g(terminal)g(attributes)g(to)f(those)h(that)75 ! 820 y(w)o(ere)d(in)i(e\013ect)e(b)q(efore)h Ft(readline\(\))e Fu(w)o(as)h(called,)i(reset)f(the)f(signal)i(handling)g(to)e(what)g(it) ! h(w)o(as)f(b)q(efore)75 875 y Ft(readline\(\))21 b Fu(w)o(as)h(called,) j(and)e(resend)g(the)g(signal)g(to)f(the)h(calling)h(application.)44 ! b(If)23 b(and)f(when)75 930 y(the)17 b(calling)i(application's)f (signal)g(handler)g(returns,)f(Readline)h(will)h(reinitialize)h(the)d ! (terminal)h(and)75 985 y(con)o(tin)o(ue)d(to)e(accept)i(input.)20 b(When)15 b(a)e Ft(SIGINT)h Fu(is)g(receiv)o(ed,)h(the)g(Readline)g ! (signal)g(handler)g(p)q(erforms)75 1040 y(some)k(additional)i(w)o(ork,) ! e(whic)o(h)h(will)h(cause)f(an)o(y)f(partially-en)o(tered)i(line)g(to)d ! (b)q(e)i(ab)q(orted)g(\(see)f(the)75 1094 y(description)e(of)d ! Ft(rl_free_line_state\(\))f Fu(b)q(elo)o(w\).)137 1169 y(There)g(is)f(an)g(additional)i(Readline)g(signal)f(handler,)g(for)f Ft(SIGWINCH)p Fu(,)f(whic)o(h)i(the)f(k)o(ernel)h(sends)g(to)e(a)75 ! 1224 y(pro)q(cess)k(whenev)o(er)g(the)f(terminal's)h(size)g(c)o(hanges) ! f(\(for)g(example,)h(if)g(a)f(user)h(resizes)g(an)f Ft(xterm)p ! Fu(\).)19 b(The)75 1278 y(Readline)g Ft(SIGWINCH)e Fu(handler)i(up)q (dates)f(Readline's)h(in)o(ternal)f(screen)h(size)f(information,)h(and) ! f(then)75 1333 y(calls)g(an)o(y)f Ft(SIGWINCH)e Fu(signal)j(handler)g (the)f(calling)i(application)f(has)f(installed.)27 b(Readline)18 ! b(calls)g(the)75 1388 y(application's)h Ft(SIGWINCH)d Fu(signal)j(handler)f(without)g(resetting)g(the)f(terminal)i(to)e(its)g ! (original)i(state.)75 1443 y(If)d(the)g(application's)h(signal)g (handler)g(do)q(es)g(more)e(than)h(up)q(date)h(its)f(idea)h(of)e(the)h ! (terminal)h(size)g(and)75 1498 y(return)e(\(for)f(example,)h(a)f Ft(longjmp)g Fu(bac)o(k)h(to)f(a)h(main)g(pro)q(cessing)g(lo)q(op\),)g ! (it)g Fl(must)20 b Fu(call)c Ft(rl_cleanup_)75 1552 y(after_signal\(\)) ! d Fu(\(describ)q(ed)k(b)q(elo)o(w\),)e(to)g(restore)f(the)h(terminal)h ! (state.)137 1627 y(Readline)g(pro)o(vides)f(t)o(w)o(o)e(v)m(ariables)i (that)f(allo)o(w)g(application)i(writers)e(to)g(con)o(trol)g(whether)h ! (or)e(not)75 1681 y(it)k(will)h(catc)o(h)e(certain)h(signals)h(and)f (act)f(on)g(them)h(when)g(they)f(are)h(receiv)o(ed.)25 ! b(It)16 b(is)i(imp)q(ortan)o(t)e(that)75 1736 y(applications)k(c)o (hange)e(the)h(v)m(alues)g(of)f(these)h(v)m(ariables)g(only)g(when)g ! (calling)h Ft(readline\(\))p Fu(,)d(not)h(in)h(a)75 1791 y(signal)d(handler,)g(so)f(Readline's)h(in)o(ternal)g(signal)g(state)e ! (is)i(not)f(corrupted.)1773 1930 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1930 18 3 v 21 w(catc)n(h)p ! 366 1930 V 22 w(signals)195 1984 y Fu(If)15 b(this)g(v)m(ariable)g(is)g (non-zero,)g(Readline)h(will)g(install)f(signal)h(handlers)f(for)f ! Ft(SIGINT)p Fu(,)f Ft(SIGQUIT)p Fu(,)195 2039 y Ft(SIGTERM)p Fu(,)h Ft(SIGALRM)p Fu(,)g Ft(SIGTSTP)p Fu(,)f Ft(SIGTTIN)p ! Fu(,)h(and)i Ft(SIGTTOU)p Fu(.)195 2113 y(The)f(default)h(v)m(alue)h ! (of)d Ft(rl_catch_signals)f Fu(is)j(1.)1773 2252 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 2252 V 21 w(catc)n(h)p 366 ! 2252 V 22 w(sigwinc)n(h)195 2307 y Fu(If)15 b(this)h(v)m(ariable)h(is)e (non-zero,)g(Readline)i(will)g(install)f(a)f(signal)h(handler)h(for)d ! Ft(SIGWINCH)p Fu(.)195 2381 y(The)h(default)h(v)m(alue)h(of)d ! Ft(rl_catch_sigwinch)f Fu(is)j(1.)137 2487 y(If)g(an)f(application)j (do)q(es)d(not)g(wish)i(to)d(ha)o(v)o(e)h(Readline)i(catc)o(h)f(an)o(y) ! f(signals,)h(or)f(to)f(handle)j(signals)75 2542 y(other)i(than)g(those) g(Readline)i(catc)o(hes)e(\()p Ft(SIGHUP)p Fu(,)g(for)g(example\),)h ! (Readline)h(pro)o(vides)e(con)o(v)o(enience)75 2597 y(functions)d(to)f (do)g(the)g(necessary)g(terminal)h(and)g(in)o(ternal)g(state)e(clean)o ! (up)i(up)q(on)g(receipt)g(of)f(a)g(signal.)p eop ! %%Page: 38 40 ! 38 39 bop 75 -58 a Fu(38)1299 b(GNU)15 b(Readline)h(Library)1762 ! 149 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 149 ! 18 3 v 21 w(clean)n(up)p 450 149 V 22 w(after)p 590 149 ! V 20 w(signal)j Fg(\()p Ft(void)p Fg(\))195 204 y Fu(This)18 b(function)f(will)i(reset)e(the)g(state)f(of)g(the)h(terminal)h(to)e (what)h(it)g(w)o(as)f(b)q(efore)h Ft(readline\(\))195 ! 259 y Fu(w)o(as)d(called,)i(and)f(remo)o(v)o(e)f(the)g(Readline)i (signal)g(handlers)g(for)e(all)h(signals,)g(dep)q(ending)i(on)e(the)195 ! 314 y(v)m(alues)h(of)f Ft(rl_catch_signals)e Fu(and)i ! Ft(rl_catch_sigwinch)p Fu(.)1762 460 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 460 V 21 w(free)p 356 460 ! V 20 w(line)p 464 460 V 23 w(state)j Fg(\()p Ft(void)p ! Fg(\))195 515 y Fu(This)d(will)h(free)f(an)o(y)f(partial)h(state)f (asso)q(ciated)h(with)g(the)g(curren)o(t)f(input)i(line)g(\(undo)f ! (infor-)195 570 y(mation,)i(an)o(y)f(partial)h(history)f(en)o(try)l(,)h ! (an)o(y)f(partially-en)o(tered)i(k)o(eyb)q(oard)e(macro,)h(and)f(an)o ! (y)195 625 y(partially-en)o(tered)k(n)o(umeric)g(argumen)o(t\).)45 b(This)24 b(should)h(b)q(e)g(called)g(b)q(efore)g Ft(rl_cleanup_)195 ! 679 y(after_signal\(\))p Fu(.)36 b(The)22 b(Readline)h(signal)f (handler)g(for)f Ft(SIGINT)f Fu(calls)j(this)e(to)g(ab)q(ort)g(the)195 ! 734 y(curren)o(t)15 b(input)h(line.)1762 881 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 881 V 21 w(reset)p 383 881 ! V 20 w(after)p 521 881 V 21 w(signal)j Fg(\()p Ft(void)p ! Fg(\))195 935 y Fu(This)15 b(will)h(reinitialize)h(the)d(terminal)h (and)g(reinstall)h(an)o(y)d(Readline)j(signal)f(handlers,)g(dep)q(end-) ! 195 990 y(ing)h(on)f(the)g(v)m(alues)i(of)d Ft(rl_catch_signals)f ! Fu(and)j Ft(rl_catch_sigwinch)p Fu(.)137 1102 y(If)k(an)g(application)h ! (do)q(es)f(not)g(wish)g(Readline)h(to)e(catc)o(h)g Ft(SIGWINCH)p ! Fu(,)h(it)g(ma)o(y)f(call)h Ft(rl_resize_)75 1157 y(terminal\(\))12 ! b Fu(or)h Ft(rl_set_screen_size\(\))e Fu(to)i(force)g(Readline)i(to)e ! (up)q(date)h(its)g(idea)g(of)g(the)f(terminal)75 1211 ! y(size)j(when)g(a)f Ft(SIGWINCH)f Fu(is)h(receiv)o(ed.)1762 ! 1358 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 1358 ! V 21 w(resize)p 401 1358 V 22 w(terminal)j Fg(\()p Ft(void)p ! Fg(\))195 1413 y Fu(Up)q(date)16 b(Readline's)g(in)o(ternal)g(screen)f ! (size)i(b)o(y)e(reading)g(v)m(alues)i(from)d(the)i(k)o(ernel.)1762 ! 1559 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 1559 ! V 21 w(set)p 333 1559 V 21 w(screen)p 510 1559 V 20 w(size)k ! Fg(\()p Ft(int)15 b(rows,)f(int)h(cols)p Fg(\))195 1614 y Fu(Set)g(Readline's)h(idea)g(of)f(the)g(terminal)h(size)g(to)f Fk(ro)o(ws)h Fu(ro)o(ws)e(and)i Fk(cols)h Fu(columns.)137 ! 1725 y(If)g(an)g(application)h(do)q(es)f(not)f(w)o(an)o(t)g(to)g (install)i(a)f Ft(SIGWINCH)e Fu(handler,)j(but)f(is)g(still)h(in)o ! (terested)f(in)75 1780 y(the)e(screen)h(dimensions,)g(Readline's)h ! (idea)e(of)g(the)h(screen)f(size)h(ma)o(y)f(b)q(e)h(queried.)1762 ! 1927 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 1927 ! V 21 w(get)p 339 1927 V 21 w(screen)p 516 1927 V 20 w(size)k Fg(\()p Ft(int)15 b(*rows,)f(int)h(*cols)p Fg(\))195 ! 1981 y Fu(Return)g(Readline's)h(idea)f(of)g(the)g(terminal's)g(size)h (in)g(the)f(v)m(ariables)i(p)q(oin)o(ted)f(to)e(b)o(y)h(the)g(argu-)195 ! 2036 y(men)o(ts.)137 2148 y(The)h(follo)o(wing)g(functions)g(install)g (and)g(remo)o(v)o(e)e(Readline's)i(signal)g(handlers.)1762 ! 2294 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2294 ! V 21 w(set)p 307 2294 V 20 w(signals)j Fg(\()p Ft(void)p ! Fg(\))195 2349 y Fu(Install)c(Readline's)f(signal)h(handler)f(for)f Ft(SIGINT)p Fu(,)g Ft(SIGQUIT)p Fu(,)g Ft(SIGTERM)p Fu(,)g ! Ft(SIGALRM)p Fu(,)f Ft(SIGTSTP)p Fu(,)195 2404 y Ft(SIGTTIN)p Fu(,)11 b Ft(SIGTTOU)p Fu(,)g(and)h Ft(SIGWINCH)p Fu(,)e(dep)q(ending)k (on)e(the)f(v)m(alues)i(of)e Ft(rl_catch_signals)f Fu(and)195 ! 2459 y Ft(rl_catch_sigwinch)p Fu(.)1762 2605 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2605 V 21 w(clear)p 354 2605 ! V 21 w(signals)j Fg(\()p Ft(void)p Fg(\))195 2660 y Fu(Remo)o(v)o(e)14 b(all)i(of)f(the)g(Readline)i(signal)f(handlers)g(installed)h(b)o(y)e ! Ft(rl_set_signals\(\))p Fu(.)p eop ! %%Page: 39 41 ! 39 40 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(39)75 149 y Fs(2.6)33 b(Custom)21 b(Completers)137 ! 246 y Fu(T)o(ypically)l(,)e(a)d(program)f(that)h(reads)h(commands)f ! (from)g(the)h(user)f(has)h(a)f(w)o(a)o(y)g(of)g(disam)o(biguating)75 ! 301 y(commands)i(and)f(data.)27 b(If)18 b(y)o(our)f(program)g(is)h(one) ! g(of)f(these,)i(then)f(it)g(can)f(pro)o(vide)i(completion)g(for)75 ! 356 y(commands,)14 b(data,)g(or)g(b)q(oth.)20 b(The)15 ! b(follo)o(wing)g(sections)g(describ)q(e)h(ho)o(w)e(y)o(our)g(program)g ! (and)h(Readline)75 410 y(co)q(op)q(erate)g(to)g(pro)o(vide)g(this)h ! (service.)75 523 y Fj(2.6.1)30 b(Ho)n(w)21 b(Completing)f(W)-5 ! b(orks)137 620 y Fu(In)18 b(order)f(to)f(complete)i(some)f(text,)g(the) ! g(full)i(list)e(of)g(p)q(ossible)i(completions)f(m)o(ust)f(b)q(e)h(a)o ! (v)m(ailable.)75 675 y(That)e(is,)i(it)f(is)h(not)f(p)q(ossible)h(to)f (accurately)g(expand)h(a)e(partial)i(w)o(ord)e(without)h(kno)o(wing)g ! (all)h(of)f(the)75 729 y(p)q(ossible)i(w)o(ords)e(whic)o(h)h(mak)o(e)f (sense)h(in)h(that)d(con)o(text.)26 b(The)18 b(Readline)h(library)f ! (pro)o(vides)g(the)g(user)75 784 y(in)o(terface)f(to)f(completion,)i (and)e(t)o(w)o(o)g(of)g(the)h(most)f(common)g(completion)i(functions:) ! 23 b(\014lename)18 b(and)75 839 y(username.)h(F)l(or)10 b(completing)i(other)e(t)o(yp)q(es)h(of)f(text,)h(y)o(ou)g(m)o(ust)f (write)h(y)o(our)f(o)o(wn)h(completion)g(function.)75 ! 894 y(This)16 b(section)g(describ)q(es)g(exactly)g(what)f(suc)o(h)g (functions)h(m)o(ust)f(do,)f(and)i(pro)o(vides)f(an)h(example.)137 ! 961 y(There)g(are)f(three)g(ma)s(jor)f(functions)i(used)f(to)g(p)q ! (erform)g(completion:)100 1029 y(1.)29 b(The)22 b(user-in)o(terface)g (function)h Ft(rl_complete\(\))p Fu(.)37 b(This)22 b(function)h(is)f ! (called)h(with)f(the)g(same)165 1084 y(argumen)o(ts)17 b(as)h(other)g(bindable)i(Readline)f(functions:)27 b ! Fk(coun)o(t)19 b Fu(and)f Fk(in)o(v)o(oking)p 1556 1084 ! 14 2 v 17 w(k)o(ey)p Fu(.)28 b(It)19 b(isolates)165 1138 y(the)g(w)o(ord)f(to)g(b)q(e)i(completed)f(and)g(calls)h Ft(rl_completion_matches\(\))c Fu(to)i(generate)g(a)h(list)g(of)165 ! 1193 y(p)q(ossible)e(completions.)22 b(It)16 b(then)g(either)g(lists)g (the)g(p)q(ossible)h(completions,)g(inserts)f(the)f(p)q(ossible)165 ! 1248 y(completions,)25 b(or)d(actually)i(p)q(erforms)e(the)g (completion,)k(dep)q(ending)e(on)f(whic)o(h)g(b)q(eha)o(vior)g(is)165 ! 1303 y(desired.)100 1370 y(2.)29 b(The)17 b(in)o(ternal)h(function)f ! Ft(rl_completion_matches\(\))d Fu(uses)j(an)g(application-supplie)q(d)j ! Fk(gener-)165 1425 y(ator)h Fu(function)e(to)f(generate)g(the)h(list)g (of)f(p)q(ossible)i(matc)o(hes,)f(and)f(then)h(returns)g(the)f(arra)o ! (y)f(of)165 1480 y(these)j(matc)o(hes.)32 b(The)20 b(caller)g(should)h (place)f(the)g(address)f(of)h(its)f(generator)g(function)h(in)g ! Ft(rl_)165 1535 y(completion_entry_function)p Fu(.)100 ! 1602 y(3.)29 b(The)12 b(generator)e(function)i(is)g(called)h(rep)q (eatedly)g(from)e Ft(rl_completion_matches\(\))p Fu(,)d(returning)165 ! 1657 y(a)16 b(string)g(eac)o(h)h(time.)24 b(The)17 b(argumen)o(ts)e(to) ! h(the)g(generator)g(function)h(are)f Fk(text)h Fu(and)g ! Fk(state)p Fu(.)22 b Fk(text)165 1712 y Fu(is)17 b(the)f(partial)g(w)o (ord)f(to)h(b)q(e)h(completed.)23 b Fk(state)18 b Fu(is)e(zero)g(the)g ! (\014rst)g(time)g(the)g(function)h(is)g(called,)165 1766 y(allo)o(wing)23 b(the)f(generator)f(to)g(p)q(erform)h(an)o(y)g (necessary)g(initialization,)k(and)c(a)g(p)q(ositiv)o(e)h(non-)165 ! 1821 y(zero)14 b(in)o(teger)h(for)f(eac)o(h)h(subsequen)o(t)g(call.)21 b(The)15 b(generator)e(function)j(returns)e Ft(\(char)h(*\)NULL)f ! Fu(to)165 1876 y(inform)19 b Ft(rl_completion_matches\(\))d Fu(that)i(there)h(are)g(no)g(more)g(p)q(ossibilities)j(left.)32 ! b(Usually)165 1931 y(the)19 b(generator)g(function)h(computes)g(the)f (list)h(of)f(p)q(ossible)i(completions)g(when)e Fk(state)j ! Fu(is)d(zero,)165 1986 y(and)13 b(returns)g(them)f(one)h(at)f(a)h(time) ! g(on)g(subsequen)o(t)g(calls.)20 b(Eac)o(h)13 b(string)f(the)h ! (generator)f(function)165 2040 y(returns)k(as)f(a)h(matc)o(h)f(m)o(ust) ! h(b)q(e)g(allo)q(cated)h(with)g Ft(malloc\(\))p Fu(;)d(Readline)k ! (frees)e(the)g(strings)f(when)165 2095 y(it)g(has)h(\014nished)g(with)g ! (them.)1762 2213 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 2213 18 3 v 21 w(complete)j Fg(\()p Ft(int)14 b(ignore,)g(int)h ! (invoking_key)p Fg(\))195 2268 y Fu(Complete)h(the)f(w)o(ord)g(at)f(or) h(b)q(efore)h(p)q(oin)o(t.)21 b(Y)l(ou)15 b(ha)o(v)o(e)g(supplied)j ! (the)d(function)i(that)d(do)q(es)i(the)195 2323 y(initial)23 b(simple)f(matc)o(hing)e(selection)i(algorithm)f(\(see)f ! Ft(rl_completion_matches\(\))p Fu(\).)33 b(The)195 2378 y(default)16 b(is)f(to)g(do)g(\014lename)h(completion.)1773 ! 2496 y(V)l(ariable)-1861 b Fi(rl_compentry_func_t)22 ! b(*)d Fh(rl)p 678 2496 V 21 w(completion)p 973 2496 V ! 21 w(en)n(try)p 1126 2496 V 22 w(function)195 2550 y Fu(This)i(is)f(a)g(p)q(oin)o(ter)g(to)f(the)h(generator)g(function)g (for)g Ft(rl_completion_matches\(\))p Fu(.)31 b(If)20 ! b(the)195 2605 y(v)m(alue)13 b(of)f Ft(rl_completion_entry_fun)o(ction) d Fu(is)j Ft(NULL)f Fu(then)h(the)g(default)h(\014lename)g(generator) ! 195 2660 y(function,)j Ft(rl_filename_completion_f)o(unction)o(\(\))p ! Fu(,)c(is)k(used.)p eop ! %%Page: 40 42 ! 40 41 bop 75 -58 a Fu(40)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fj(2.6.2)30 b(Completion)20 b(F)-5 b(unctions)137 ! 244 y Fu(Here)16 b(is)f(the)h(complete)g(list)g(of)e(callable)k ! (completion)e(functions)g(presen)o(t)f(in)h(Readline.)1762 ! 353 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 353 ! 18 3 v 21 w(complete)p 460 353 V 21 w(in)n(ternal)k Fg(\()p ! Ft(int)15 b(what_to_do)p Fg(\))195 408 y Fu(Complete)k(the)g(w)o(ord)f ! (at)g(or)g(b)q(efore)h(p)q(oin)o(t.)31 b Fk(what)p 1108 ! 408 14 2 v 16 w(to)p 1165 408 V 16 w(do)21 b Fu(sa)o(ys)d(what)g(to)g ! (do)h(with)g(the)g(com-)195 463 y(pletion.)j(A)16 b(v)m(alue)h(of)e(`)p ! Ft(?)p Fu(')g(means)g(list)i(the)e(p)q(ossible)j(completions.)k(`)p ! Ft(TAB)p Fu(')14 b(means)i(do)f(standard)195 517 y(completion.)22 ! b(`)p Ft(*)p Fu(')15 b(means)g(insert)h(all)h(of)e(the)h(p)q(ossible)h ! (completions.)22 b(`)p Ft(!)p Fu(')15 b(means)g(to)g(displa)o(y)i(all) ! 195 572 y(of)g(the)g(p)q(ossible)i(completions,)f(if)g(there)f(is)h ! (more)f(than)g(one,)g(as)g(w)o(ell)h(as)f(p)q(erforming)h(partial)195 ! 627 y(completion.)1762 736 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 736 18 3 v 21 w(complete)j Fg(\()p Ft(int)14 ! b(ignore,)g(int)h(invoking_key)p Fg(\))195 791 y Fu(Complete)21 ! b(the)g(w)o(ord)e(at)h(or)g(b)q(efore)h(p)q(oin)o(t.)37 ! b(Y)l(ou)21 b(ha)o(v)o(e)f(supplied)j(the)d(function)i(that)e(do)q(es) ! 195 845 y(the)d(initial)h(simple)g(matc)o(hing)f(selection)h(algorithm) ! e(\(see)g Ft(rl_completion_matches\(\))e Fu(and)195 900 ! y Ft(rl_completion_entry_functi)o(on)p Fu(\).)25 b(The)18 b(default)h(is)f(to)f(do)h(\014lename)h(completion.)29 ! b(This)195 955 y(calls)16 b Ft(rl_complete_internal\(\))c Fu(with)k(an)f(argumen)o(t)f(dep)q(ending)k(on)d Fk(in)o(v)o(oking)p ! 1657 955 14 2 v 17 w(k)o(ey)p Fu(.)1762 1064 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1064 18 3 v 21 w(p)r(ossible)p ! 433 1064 V 20 w(completions)j Fg(\()p Ft(int)15 b(count,)f(int)h ! (invoking_key)p Fg(\))195 1119 y Fu(List)21 b(the)f(p)q(ossible)i (completions.)36 b(See)21 b(description)h(of)e Ft(rl_complete)13 ! b(\(\))p Fu(.)35 b(This)21 b(calls)g Ft(rl_)195 1174 y(complete_internal\(\))13 b Fu(with)i(an)g(argumen)o(t)g(of)f(`)p ! Ft(?)p Fu('.)1762 1282 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 1282 V 21 w(insert)p 378 1282 V 21 w(completions)j Fg(\()p Ft(int)14 b(count,)g(int)h(invoking_key)p Fg(\))195 ! 1337 y Fu(Insert)i(the)g(list)h(of)e(p)q(ossible)j(completions)e(in)o (to)g(the)g(line,)i(deleting)f(the)f(partially-completed)195 ! 1392 y(w)o(ord.)k(See)c(description)g(of)e Ft(rl_complete\(\))p Fu(.)20 b(This)d(calls)g Ft(rl_complete_internal\(\))c ! Fu(with)195 1447 y(an)i(argumen)o(t)g(of)f(`)p Ft(*)p ! Fu('.)1762 1556 y(F)l(unction)-1861 b Fi(char)20 b(**)f ! Fh(rl)p 312 1556 V 21 w(completion)p 607 1556 V 21 w(matc)n(hes)j ! Fg(\()p Ft(const)15 b(char)f(*text,)283 1611 y(rl_compentry_func_t)e ! (*entry_func)p Fg(\))195 1665 y Fu(Returns)18 b(an)h(arra)o(y)f(of)g ! (strings)h(whic)o(h)h(is)g(a)e(list)i(of)e(completions)i(for)f ! Fk(text)p Fu(.)30 b(If)19 b(there)g(are)g(no)195 1720 ! y(completions,)f(returns)g Ft(NULL)p Fu(.)25 b(The)17 ! b(\014rst)g(en)o(try)g(in)h(the)f(returned)h(arra)o(y)e(is)i(the)f ! (substitution)195 1775 y(for)c Fk(text)p Fu(.)18 b(The)c(remaining)g ! (en)o(tries)f(are)g(the)h(p)q(ossible)g(completions.)21 ! b(The)13 b(arra)o(y)f(is)i(terminated)195 1830 y(with)i(a)e ! Ft(NULL)h Fu(p)q(oin)o(ter.)195 1895 y Fk(en)o(try)p ! 302 1895 14 2 v 16 w(func)h Fu(is)e(a)f(function)h(of)e(t)o(w)o(o)g ! (args,)g(and)i(returns)f(a)f Ft(char)j(*)p Fu(.)k(The)13 ! b(\014rst)g(argumen)o(t)f(is)i Fk(text)p Fu(.)195 1950 ! y(The)f(second)g(is)f(a)h(state)e(argumen)o(t;)h(it)h(is)g(zero)f(on)g ! (the)h(\014rst)f(call,)i(and)e(non-zero)h(on)f(subsequen)o(t)195 ! 2005 y(calls.)20 b Fk(en)o(try)p 420 2005 V 16 w(func)15 ! b Fu(returns)e(a)e Ft(NULL)h Fu(p)q(oin)o(ter)h(to)e(the)i(caller)g ! (when)g(there)f(are)g(no)g(more)g(matc)o(hes.)1762 2114 ! y(F)l(unction)-1861 b Fi(char)20 b(*)f Fh(rl)p 286 2114 ! 18 3 v 21 w(\014lename)p 515 2114 V 20 w(completion)p ! 809 2114 V 21 w(function)k Fg(\()p Ft(const)15 b(char)f(*text,)h(int) ! 283 2169 y(state)p Fg(\))195 2223 y Fu(A)e(generator)f(function)h(for)g (\014lename)h(completion)f(in)h(the)f(general)g(case.)19 ! b Fk(text)14 b Fu(is)f(a)g(partial)g(\014le-)195 2278 y(name.)20 b(The)15 b(Bash)f(source)h(is)g(a)g(useful)g(reference)h (for)e(writing)h(custom)f(completion)i(functions)195 ! 2333 y(\(the)f(Bash)g(completion)i(functions)e(call)i(this)e(and)h ! (other)f(Readline)h(functions\).)1762 2442 y(F)l(unction)-1861 ! b Fi(char)20 b(*)f Fh(rl)p 286 2442 V 21 w(username)p ! 547 2442 V 19 w(completion)p 840 2442 V 21 w(function)k ! Fg(\()p Ft(const)14 b(char)g(*text,)283 2497 y(int)g(state)p ! Fg(\))195 2552 y Fu(A)g(completion)i(generator)d(for)h(usernames.)19 b Fk(text)c Fu(con)o(tains)f(a)g(partial)h(username)f(preceded)i(b)o(y) ! 195 2606 y(a)f(random)g(c)o(haracter)f(\(usually)j(`)p Ft(~)p Fu('\).)i(As)c(with)g(all)i(completion)f(generators,)e ! Fk(state)j Fu(is)f(zero)f(on)195 2661 y(the)g(\014rst)g(call)h(and)g ! (non-zero)f(for)g(subsequen)o(t)h(calls.)p eop ! %%Page: 41 43 ! 41 42 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(41)75 149 y Fj(2.6.3)30 b(Completion)20 ! b(V)-5 b(ariables)1773 292 y Fu(V)l(ariable)-1861 b Fi ! (rl_compentry_func_t)22 b(*)d Fh(rl)p 678 292 18 3 v ! 21 w(completion)p 973 292 V 21 w(en)n(try)p 1126 292 ! V 22 w(function)195 347 y Fu(A)e(p)q(oin)o(ter)g(to)f(the)h(generator)f ! (function)h(for)f Ft(rl_completion_matches\(\))p Fu(.)22 ! b Ft(NULL)16 b Fu(means)h(to)195 402 y(use)f Ft (rl_filename_completion_)o(functio)o(n\(\))p Fu(,)c(the)j(default)h ! (\014lename)g(completer.)1773 516 y(V)l(ariable)-1861 ! b Fi(rl_completion_func_t)22 b(*)d Fh(rl)p 704 516 V ! 22 w(attempted)p 985 516 V 20 w(completion)p 1279 516 ! V 21 w(function)195 571 y Fu(A)e(p)q(oin)o(ter)h(to)f(an)g(alternativ)o ! (e)h(function)g(to)f(create)g(matc)o(hes.)26 b(The)18 ! b(function)g(is)g(called)h(with)195 625 y Fk(text)p Fu(,)11 ! b Fk(start)p Fu(,)g(and)h Fk(end)p Fu(.)19 b Fk(start)11 ! b Fu(and)h Fk(end)i Fu(are)d(indices)i(in)g Ft(rl_line_buffer)c ! Fu(de\014ning)k(the)f(b)q(ound-)195 680 y(aries)h(of)g ! Fk(text)p Fu(,)f(whic)o(h)i(is)g(a)e(c)o(haracter)h(string.)19 ! b(If)13 b(this)g(function)h(exists)g(and)f(returns)g ! Ft(NULL)p Fu(,)f(or)g(if)195 735 y(this)f(v)m(ariable)i(is)e(set)g(to)f ! Ft(NULL)p Fu(,)h(then)g Ft(rl_complete\(\))e Fu(will)k(call)f(the)f(v)m ! (alue)h(of)f Ft(rl_completion_)195 790 y(entry_function)h Fu(to)i(generate)g(matc)o(hes,)f(otherwise)i(the)f(arra)o(y)f(of)h ! (strings)g(returned)g(will)i(b)q(e)195 845 y(used.)j(If)12 ! b(this)f(function)h(sets)f(the)g Ft(rl_attempted_completion_over)d ! Fu(v)m(ariable)k(to)f(a)g(non-zero)195 899 y(v)m(alue,)18 ! b(Readline)h(will)f(not)f(p)q(erform)f(its)i(default)f(completion)h(ev) ! o(en)f(if)h(this)f(function)h(returns)195 954 y(no)d(matc)o(hes.)1773 ! 1068 y(V)l(ariable)-1861 b Fi(rl_quote_func_t)21 b(*)f ! Fh(rl)p 574 1068 V 21 w(\014lename)p 803 1068 V 20 w(quoting)p ! 1012 1068 V 21 w(function)195 1123 y Fu(A)c(p)q(oin)o(ter)h(to)f(a)g ! (function)h(that)e(will)j(quote)e(a)g(\014lename)i(in)f(an)f ! (application-sp)q(eci\014)q(c)j(fashion.)195 1178 y(This)h(is)g(called) ! i(if)e(\014lename)g(completion)h(is)f(b)q(eing)h(attempted)e(and)h(one) ! g(of)f(the)h(c)o(haracters)195 1232 y(in)d Ft ! (rl_filename_quote_characters)c Fu(app)q(ears)k(in)g(a)g(completed)g ! (\014lename.)25 b(The)17 b(function)195 1287 y(is)i(called)i(with)e ! Fk(text)p Fu(,)g Fk(matc)o(h)p 722 1287 14 2 v 16 w(t)o(yp)q(e)p ! Fu(,)g(and)g Fk(quote)p 1059 1287 V 17 w(p)q(oin)o(ter)p ! Fu(.)31 b(The)19 b Fk(text)h Fu(is)f(the)g(\014lename)h(to)e(b)q(e)195 ! 1342 y(quoted.)39 b(The)21 b Fk(matc)o(h)p 607 1342 V ! 16 w(t)o(yp)q(e)j Fu(is)e(either)g Ft(SINGLE_MATCH)p ! Fu(,)f(if)h(there)f(is)h(only)g(one)g(completion)195 ! 1397 y(matc)o(h,)15 b(or)g Ft(MULT_MATCH)p Fu(.)20 b(Some)c(functions)g ! (use)g(this)g(to)f(decide)j(whether)e(or)f(not)g(to)g(insert)h(a)195 ! 1452 y(closing)c(quote)e(c)o(haracter.)18 b(The)11 b ! Fk(quote)p 877 1452 V 16 w(p)q(oin)o(ter)k Fu(is)c(a)f(p)q(oin)o(ter)i ! (to)e(an)o(y)g(op)q(ening)i(quote)f(c)o(haracter)195 ! 1506 y(the)k(user)h(t)o(yp)q(ed.)k(Some)15 b(functions)h(c)o(ho)q(ose)f ! (to)g(reset)g(this)g(c)o(haracter.)1773 1620 y(V)l(ariable)-1861 ! b Fi(rl_dequote_func_t)22 b(*)d Fh(rl)p 626 1620 18 3 ! v 21 w(\014lename)p 855 1620 V 20 w(dequoting)p 1122 ! 1620 V 21 w(function)195 1675 y Fu(A)c(p)q(oin)o(ter)g(to)f(a)h ! (function)g(that)g(will)h(remo)o(v)o(e)e(application-sp)q(eci\014)q(c)k ! (quoting)d(c)o(haracters)f(from)195 1730 y(a)i(\014lename)h(b)q(efore)g ! (completion)g(is)g(attempted,)f(so)f(those)h(c)o(haracters)g(do)g(not)g ! (in)o(terfere)h(with)195 1785 y(matc)o(hing)i(the)g(text)g(against)f ! (names)h(in)h(the)f(\014lesystem.)33 b(It)19 b(is)g(called)i(with)e ! Fk(text)p Fu(,)g(the)g(text)195 1839 y(of)i(the)g(w)o(ord)g(to)g(b)q(e) ! h(dequoted,)h(and)e Fk(quote)p 1009 1839 14 2 v 17 w(c)o(har)p Fu(,)h(whic)o(h)g(is)g(the)f(quoting)h(c)o(haracter)f(that)195 ! 1894 y(delimits)d(the)e(\014lename)i(\(usually)f(`)p Ft(')p Fu(')f(or)f(`)p Ft(")p Fu('\).)22 b(If)17 b Fk(quote)p ! 1187 1894 V 16 w(c)o(har)i Fu(is)e(zero,)f(the)g(\014lename)i(w)o(as)d ! (not)195 1949 y(in)h(an)f(em)o(b)q(edded)i(string.)1773 ! 2063 y(V)l(ariable)-1861 b Fi(rl_linebuf_func_t)22 b(*)d ! Fh(rl)p 626 2063 18 3 v 21 w(c)n(har)p 754 2063 V 21 ! w(is)p 813 2063 V 21 w(quoted)p 1005 2063 V 21 w(p)195 ! 2118 y Fu(A)f(p)q(oin)o(ter)h(to)f(a)g(function)h(to)f(call)i(that)d (determines)j(whether)e(or)g(not)g(a)g(sp)q(eci\014c)j(c)o(haracter)195 ! 2173 y(in)d(the)f(line)i(bu\013er)e(is)h(quoted,)g(according)f(to)g (whatev)o(er)f(quoting)i(mec)o(hanism)g(the)f(program)195 ! 2227 y(calling)d(Readline)g(uses.)19 b(The)13 b(function)g(is)g(called) h(with)f(t)o(w)o(o)e(argumen)o(ts:)17 b Fk(text)p Fu(,)12 ! b(the)h(text)f(of)g(the)195 2282 y(line,)17 b(and)e Fk(index)p Fu(,)i(the)e(index)i(of)e(the)g(c)o(haracter)g(in)h(the)g(line.)22 ! b(It)15 b(is)h(used)g(to)f(decide)i(whether)e(a)195 2337 y(c)o(haracter)f(found)i(in)g Ft(rl_completer_word_break_)o(charact)o ! (ers)c Fu(should)k(b)q(e)g(used)g(to)e(break)195 2392 ! y(w)o(ords)g(for)h(the)g(completer.)1773 2506 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 2506 V 21 w(completion)p 510 ! 2506 V 21 w(query)p 673 2506 V 21 w(items)195 2560 y ! Fu(Up)e(to)g(this)g(man)o(y)g(items)g(will)i(b)q(e)f(displa)o(y)o(ed)g ! (in)g(resp)q(onse)g(to)e(a)h(p)q(ossible-completions)j(call.)195 ! 2615 y(After)14 b(that,)f(w)o(e)h(ask)g(the)h(user)f(if)h(she)f(is)h ! (sure)g(she)f(w)o(an)o(ts)f(to)h(see)h(them)f(all.)20 ! b(The)15 b(default)g(v)m(alue)195 2670 y(is)h(100.)p ! eop ! %%Page: 42 44 ! 42 43 bop 75 -58 a Fu(42)1299 b(GNU)15 b(Readline)h(Library)1773 ! 149 y(V)l(ariable)-1861 b Fi(const)20 b(char)g(*)f Fh(rl)p ! 436 149 18 3 v 21 w(basic)p 580 149 V 21 w(w)n(ord)p ! 725 149 V 21 w(break)p 886 149 V 20 w(c)n(haracters)195 ! 204 y Fu(The)j(basic)h(list)g(of)f(c)o(haracters)f(that)g(signal)i(a)f ! (break)g(b)q(et)o(w)o(een)g(w)o(ords)g(for)f(the)h(completer)195 ! 259 y(routine.)30 b(The)19 b(default)g(v)m(alue)h(of)e(this)h(v)m ! (ariable)h(is)f(the)g(c)o(haracters)f(whic)o(h)h(break)g(w)o(ords)f ! (for)195 314 y(completion)e(in)g(Bash:)k Ft(")15 b ! (\\t\\n\\"\\\\'`@$><=;|&{\(")p Fu(.)1773 430 y(V)l(ariable)-1861 ! b Fi(const)20 b(char)g(*)f Fh(rl)p 436 430 V 21 w(basic)p ! 580 430 V 21 w(quote)p 740 430 V 21 w(c)n(haracters)195 ! 485 y Fu(A)c(list)h(of)f(quote)g(c)o(haracters)f(whic)o(h)i(can)g ! (cause)f(a)g(w)o(ord)g(break.)1773 601 y(V)l(ariable)-1861 ! b Fi(const)20 b(char)g(*)f Fh(rl)p 436 601 V 21 w(completer)p ! 705 601 V 21 w(w)n(ord)p 850 601 V 20 w(break)p 1010 ! 601 V 20 w(c)n(haracters)195 656 y Fu(The)33 b(list)g(of)f(c)o ! (haracters)g(that)f(signal)j(a)e(break)g(b)q(et)o(w)o(een)h(w)o(ords)f ! (for)g Ft(rl_complete_)195 711 y(internal\(\))p Fu(.)18 ! b(The)e(default)g(list)g(is)f(the)h(v)m(alue)g(of)f Ft ! (rl_basic_word_break_chara)o(cters)p Fu(.)1773 828 y(V)l(ariable)-1861 ! b Fi(const)20 b(char)g(*)f Fh(rl)p 436 828 V 21 w(completer)p ! 705 828 V 21 w(quote)p 865 828 V 20 w(c)n(haracters)195 ! 882 y Fu(A)e(list)h(of)e(c)o(haracters)g(whic)o(h)i(can)f(b)q(e)g(used) ! h(to)e(quote)h(a)f(substring)h(of)g(the)g(line.)26 b(Completion)195 ! 937 y(o)q(ccurs)13 b(on)h(the)f(en)o(tire)g(substring,)h(and)f(within)i ! (the)e(substring)g Ft(rl_completer_word_break_)195 992 ! y(characters)j Fu(are)h(treated)g(as)h(an)o(y)f(other)g(c)o(haracter,)g ! (unless)i(they)e(also)h(app)q(ear)g(within)h(this)195 ! 1047 y(list.)1773 1163 y(V)l(ariable)-1861 b Fi(const)20 ! b(char)g(*)f Fh(rl)p 436 1163 V 21 w(\014lename)p 665 ! 1163 V 20 w(quote)p 824 1163 V 21 w(c)n(haracters)195 ! 1218 y Fu(A)e(list)h(of)e(c)o(haracters)g(that)g(cause)h(a)g ! (\014lename)h(to)e(b)q(e)i(quoted)e(b)o(y)h(the)g(completer)h(when)f ! (they)195 1273 y(app)q(ear)e(in)h(a)f(completed)h(\014lename.)21 ! b(The)16 b(default)g(is)f(the)h(n)o(ull)g(string.)1773 ! 1389 y(V)l(ariable)-1861 b Fi(const)20 b(char)g(*)f Fh(rl)p ! 436 1389 V 21 w(sp)r(ecial)p 623 1389 V 22 w(pre\014xes)195 ! 1444 y Fu(The)14 b(list)h(of)e(c)o(haracters)g(that)g(are)h(w)o(ord)f ! (break)h(c)o(haracters,)f(but)h(should)h(b)q(e)f(left)g(in)h ! Fk(text)f Fu(when)195 1499 y(it)f(is)f(passed)h(to)f(the)g(completion)h ! (function.)20 b(Programs)11 b(can)h(use)h(this)g(to)f(help)h(determine) ! h(what)195 1554 y(kind)i(of)e(completing)i(to)e(do.)19 ! b(F)l(or)14 b(instance,)i(Bash)e(sets)h(this)g(v)m(ariable)h(to)e ! Ft(")p Fu($)p Ft(@")g Fu(so)g(that)g(it)h(can)195 1608 ! y(complete)h(shell)h(v)m(ariables)f(and)g(hostnames.)1773 ! 1725 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 1725 ! V 21 w(completion)p 510 1725 V 21 w(app)r(end)p 715 1725 ! V 19 w(c)n(haracter)195 1780 y Fu(When)d(a)f(single)i(completion)g ! (alternativ)o(e)f(matc)o(hes)f(at)g(the)h(end)g(of)f(the)h(command)f ! (line,)j(this)195 1834 y(c)o(haracter)10 b(is)h(app)q(ended)i(to)d(the) ! g(inserted)i(completion)g(text.)18 b(The)11 b(default)g(is)g(a)g(space) ! g(c)o(haracter)195 1889 y(\(`)j('\).)19 b(Setting)14 ! b(this)f(to)g(the)g(n)o(ull)i(c)o(haracter)e(\(`)p Ft(\\0)p ! Fu('\))e(prev)o(en)o(ts)i(an)o(ything)h(b)q(eing)h(app)q(ended)f(auto-) ! 195 1944 y(matically)l(.)21 b(This)15 b(can)f(b)q(e)h(c)o(hanged)g(in)g ! (custom)f(completion)i(functions)f(to)f(pro)o(vide)h(the)f(\\most)195 ! 1999 y(sensible)i(w)o(ord)c(separator)h(c)o(haracter")f(according)i(to) ! f(an)h(application-sp)q(eci\014c)j(command)c(line)195 ! 2054 y(syn)o(tax)h(sp)q(eci\014cation.)1773 2170 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 2170 V 21 w(ignore)p 391 2170 ! V 20 w(completion)p 685 2170 V 21 w(duplicates)195 2225 ! y Fu(If)15 b(non-zero,)h(then)f(duplicates)i(in)f(the)f(matc)o(hes)g ! (are)g(remo)o(v)o(ed.)k(The)d(default)g(is)f(1.)1773 ! 2341 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 2341 ! V 21 w(\014lename)p 444 2341 V 20 w(completion)p 738 ! 2341 V 21 w(desired)195 2396 y Fu(Non-zero)c(means)g(that)f(the)h ! (results)g(of)g(the)g(matc)o(hes)f(are)h(to)f(b)q(e)i(treated)e(as)g ! (\014lenames.)23 b(This)195 2451 y(is)14 b Fl(always)j ! Fu(zero)c(on)g(en)o(try)l(,)g(and)h(can)f(only)h(b)q(e)g(c)o(hanged)f ! (within)i(a)e(completion)h(en)o(try)f(generator)195 2506 ! y(function.)38 b(If)21 b(it)g(is)g(set)g(to)f(a)g(non-zero)h(v)m(alue,) ! i(directory)e(names)g(ha)o(v)o(e)g(a)f(slash)h(app)q(ended)195 ! 2560 y(and)d(Readline)h(attempts)d(to)h(quote)g(completed)i ! (\014lenames)f(if)g(they)g(con)o(tain)g(an)o(y)f(c)o(haracters)195 ! 2615 y(in)f Ft(rl_filename_quote_character)o(s)d Fu(and)i ! Ft(rl_filename_quoting_desired)d Fu(is)k(set)f(to)f(a)195 ! 2670 y(non-zero)h(v)m(alue.)p eop ! %%Page: 43 45 ! 43 44 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(43)1773 149 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 149 18 3 v 21 w(\014lename)p 444 149 V ! 20 w(quoting)p 653 149 V 21 w(desired)195 204 y Fu(Non-zero)14 ! b(means)g(that)f(the)i(results)f(of)g(the)g(matc)o(hes)f(are)h(to)f(b)q ! (e)i(quoted)f(using)h(double)g(quotes)195 259 y(\(or)c(an)h ! (application-sp)q(eci\014)q(c)j(quoting)d(mec)o(hanism\))g(if)h(the)f ! (completed)h(\014lename)g(con)o(tains)f(an)o(y)195 314 ! y(c)o(haracters)i(in)i Ft(rl_filename_quote_chars)p Fu(.)h(This)f(is)f ! Fl(always)k Fu(non-zero)d(on)f(en)o(try)l(,)f(and)i(can)195 ! 369 y(only)c(b)q(e)g(c)o(hanged)g(within)h(a)f(completion)g(en)o(try)g ! (generator)e(function.)20 b(The)12 b(quoting)g(is)g(e\013ected)195 ! 423 y(via)j(a)g(call)i(to)d(the)i(function)g(p)q(oin)o(ted)g(to)e(b)o ! (y)h Ft(rl_filename_quoting_function)p Fu(.)1773 524 ! y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 524 V 21 ! w(attempted)p 495 524 V 20 w(completion)p 789 524 V 21 ! w(o)n(v)n(er)195 579 y Fu(If)47 b(an)g(application-sp)q(eci\014)q(c)j ! (completion)e(function)g(assigned)f(to)g Ft(rl_attempted_)195 ! 633 y(completion_function)24 b Fu(sets)i(this)h(v)m(ariable)h(to)e(a)g ! (non-zero)h(v)m(alue,)j(Readline)e(will)g(not)195 688 ! y(p)q(erform)15 b(its)g(default)g(\014lename)h(completion)g(ev)o(en)f ! (if)g(the)g(application's)h(completion)g(function)195 ! 743 y(returns)f(no)g(matc)o(hes.)20 b(It)15 b(should)h(b)q(e)g(set)f ! (only)h(b)o(y)f(an)g(application's)h(completion)h(function.)1773 ! 844 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 844 ! V 21 w(completion)p 510 844 V 21 w(t)n(yp)r(e)195 898 ! y Fu(Set)e(to)e(a)i(c)o(haracter)f(describing)i(the)e(t)o(yp)q(e)h(of)f ! (completion)i(Readline)g(is)f(curren)o(tly)g(attempt-)195 ! 953 y(ing;)g(see)f(the)f(description)i(of)f Ft ! (rl_complete_internal\(\))c Fu(\(see)k(Section)h(2.6.2)d([Completion) ! 195 1008 y(F)l(unctions],)g(page)g(40\))g(for)f(the)h(list)h(of)f(c)o ! (haracters.)1773 1108 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 1108 V 21 w(inhibit)p 399 1108 V 23 w(completion)195 ! 1163 y Fu(If)14 b(this)h(v)m(ariable)g(is)g(non-zero,)f(completion)i ! (is)e(inhibited.)22 b(The)15 b(completion)g(c)o(haracter)e(will)j(b)q ! (e)195 1218 y(inserted)g(as)f(an)o(y)g(other)g(b)q(ound)h(to)e ! Ft(self-insert)p Fu(.)1773 1318 y(V)l(ariable)-1861 b ! Fi(rl_compignore_func_t)22 b(*)d Fh(rl)p 704 1318 V 22 ! w(ignore)p 881 1318 V 20 w(some)p 1028 1318 V 19 w(completions)p ! 1344 1318 V 21 w(function)195 1373 y Fu(This)g(function,)i(if)e (de\014ned,)i(is)e(called)h(b)o(y)f(the)g(completer)g(when)h(real)f ! (\014lename)h(completion)195 1428 y(is)e(done,)f(after)f(all)i(the)f (matc)o(hing)g(names)g(ha)o(v)o(e)g(b)q(een)h(generated.)25 ! b(It)17 b(is)h(passed)f(a)g Ft(NULL)f Fu(ter-)195 1483 y(minated)g(arra)o(y)e(of)h(matc)o(hes.)20 b(The)c(\014rst)f(elemen)o (t)h(\()p Ft(matches[0])p Fu(\))d(is)j(the)g(maximal)g(substring)195 ! 1538 y(common)e(to)g(all)h(matc)o(hes.)k(This)c(function)g(can)g (re-arrange)f(the)g(list)h(of)f(matc)o(hes)g(as)g(required,)195 ! 1592 y(but)h(eac)o(h)h(elemen)o(t)g(deleted)g(from)f(the)g(arra)o(y)f ! (m)o(ust)g(b)q(e)i(freed.)1773 1693 y(V)l(ariable)-1861 ! b Fi(rl_icppfunc_t)21 b(*)e Fh(rl)p 521 1693 V 21 w(directory)p ! 769 1693 V 22 w(completion)p 1065 1693 V 21 w(ho)r(ok)195 ! 1748 y Fu(This)k(function,)i(if)e(de\014ned,)j(is)d(allo)o(w)o(ed)g(to) f(mo)q(dify)h(the)g(directory)g(p)q(ortion)g(of)f(\014lenames)195 ! 1802 y(Readline)e(completes.)29 b(It)19 b(is)f(called)i(with)f(the)f (address)h(of)e(a)h(string)h(\(the)f(curren)o(t)g(directory)195 ! 1857 y(name\))g(as)g(an)h(argumen)o(t,)f(and)h(ma)o(y)f(mo)q(dify)h (that)f(string.)30 b(If)19 b(the)f(string)h(is)g(replaced)h(with)195 ! 1912 y(a)g(new)g(string,)h(the)f(old)g(v)m(alue)h(should)g(b)q(e)g (freed.)34 b(An)o(y)20 b(mo)q(di\014ed)i(directory)e(name)g(should)195 ! 1967 y(ha)o(v)o(e)14 b(a)g(trailing)i(slash.)k(The)15 b(mo)q(di\014ed)h(v)m(alue)g(will)g(b)q(e)f(displa)o(y)o(ed)h(as)e ! (part)g(of)h(the)f(completion,)195 2022 y(replacing)h(the)g(directory)f (p)q(ortion)g(of)g(the)g(pathname)g(the)h(user)f(t)o(yp)q(ed.)20 ! b(It)14 b(returns)g(an)g(in)o(teger)195 2076 y(that)i(should)h(b)q(e)g (non-zero)g(if)g(the)g(function)g(mo)q(di\014es)h(its)e(directory)h ! (argumen)o(t.)23 b(It)17 b(could)g(b)q(e)195 2131 y(used)f(to)e(expand) i(sym)o(b)q(olic)h(links)f(or)f(shell)i(v)m(ariables)f(in)g(pathnames.) ! 1773 2232 y(V)l(ariable)-1861 b Fi(rl_compdisp_func_t)22 ! b(*)d Fh(rl)p 652 2232 V 21 w(completion)p 947 2232 V ! 21 w(displa)n(y)p 1141 2232 V 22 w(matc)n(hes)p 1366 ! 2232 V 21 w(ho)r(ok)195 2286 y Fu(If)11 b(non-zero,)h(then)f(this)h(is) ! f(the)g(address)g(of)g(a)g(function)g(to)g(call)h(when)f(completing)i ! (a)d(w)o(ord)h(w)o(ould)195 2341 y(normally)h(displa)o(y)g(the)f(list)h ! (of)f(p)q(ossible)h(matc)o(hes.)18 b(This)12 b(function)g(is)g(called)g ! (in)g(lieu)h(of)e(Readline)195 2396 y(displa)o(ying)21 ! b(the)d(list.)32 b(It)19 b(tak)o(es)f(three)h(argumen)o(ts:)26 ! b(\()p Ft(char)14 b(**)p Fk(matc)o(hes)p Fu(,)19 b Ft(int)f ! Fk(n)o(um)p 1688 2396 14 2 v 17 w(matc)o(hes)p Fu(,)195 ! 2451 y Ft(int)13 b Fk(max)p 368 2451 V 16 w(length)p ! Fu(\))i(where)f Fk(matc)o(hes)h Fu(is)f(the)g(arra)o(y)f(of)g(matc)o ! (hing)h(strings,)g Fk(n)o(um)p 1578 2451 V 16 w(matc)o(hes)i ! Fu(is)e(the)195 2506 y(n)o(um)o(b)q(er)h(of)f(strings)h(in)h(that)e ! (arra)o(y)l(,)f(and)i Fk(max)p 1012 2506 V 16 w(length)h ! Fu(is)f(the)g(length)g(of)g(the)f(longest)h(string)g(in)195 ! 2560 y(that)e(arra)o(y)l(.)19 b(Readline)c(pro)o(vides)g(a)e(con)o(v)o ! (enience)j(function,)f Ft(rl_display_match_list)p Fu(,)c(that)195 ! 2615 y(tak)o(es)17 b(care)g(of)g(doing)h(the)f(displa)o(y)i(to)d ! (Readline's)j(output)e(stream.)26 b(That)16 b(function)j(ma)o(y)d(b)q ! (e)195 2670 y(called)h(from)d(this)i(ho)q(ok.)p eop ! %%Page: 44 46 ! 44 45 bop 75 -58 a Fu(44)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fj(2.6.4)30 b(A)21 b(Short)f(Completion)g(Example)137 ! 246 y Fu(Here)11 b(is)f(a)g(small)h(application)h(demonstrating)e(the)g ! (use)h(of)e(the)i(GNU)f(Readline)h(library)l(.)19 b(It)11 ! b(is)f(called)75 301 y Ft(fileman)p Fu(,)17 b(and)h(the)g(source)g(co)q ! (de)g(resides)h(in)f(`)p Ft(examples/fileman.c)p Fu('.)25 ! b(This)18 b(sample)g(application)75 355 y(pro)o(vides)c(completion)g ! (of)e(command)h(names,)g(line)i(editing)g(features,)d(and)i(access)f ! (to)f(the)h(history)h(list.)p eop %%Page: 45 47 45 46 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(45)195 149 y Ft(/*)24 b(fileman.c)e(--)i(A)g(tiny)f ! (application)f(which)h(demonstrates)g(how)g(to)h(use)f(the)267 ! 201 y(GNU)g(Readline)g(library.)46 b(This)24 b(application)e ! (interactively)g(allows)h(users)267 253 y(to)g(manipulate)g(files)g ! (and)g(their)g(modes.)h(*/)195 357 y(#include)f()195 ! 409 y(#include)g()195 461 y(#include)g()195 ! 513 y(#include)g()195 565 y(#include)g()195 ! 668 y(#include)g()195 720 y(#include)g ! ()195 824 y(extern)g(char)g(*xmalloc)g(\(\);)195 ! 928 y(/*)h(The)f(names)g(of)h(functions)e(that)i(actually)f(do)g(the)h ! (manipulation.)e(*/)195 980 y(int)h(com_list)g(__P\(\(char)g(*\)\);)195 ! 1032 y(int)g(com_view)g(__P\(\(char)g(*\)\);)195 1083 ! y(int)g(com_rename)g(__P\(\(char)g(*\)\);)195 1135 y(int)g(com_stat)g ! (__P\(\(char)g(*\)\);)195 1187 y(int)g(com_pwd)g(__P\(\(char)g(*\)\);) ! 195 1239 y(int)g(com_delete)g(__P\(\(char)g(*\)\);)195 ! 1291 y(int)g(com_help)g(__P\(\(char)g(*\)\);)195 1343 ! y(int)g(com_cd)g(__P\(\(char)g(*\)\);)195 1395 y(int)g(com_quit)g ! (__P\(\(char)g(*\)\);)195 1499 y(/*)h(A)f(structure)g(which)g(contains) ! g(information)f(on)i(the)f(commands)g(this)g(program)267 ! 1550 y(can)g(understand.)f(*/)195 1654 y(typedef)h(struct)g({)243 ! 1706 y(char)g(*name;)g(/*)h(User)f(printable)g(name)g(of)h(the)f ! (function.)g(*/)243 1758 y(rl_icpfunc_t)f(*func;)h(/*)h(Function)e(to)i ! (call)f(to)h(do)f(the)h(job.)f(*/)243 1810 y(char)g(*doc;)g(/*)h ! (Documentation)e(for)h(this)h(function.)46 b(*/)195 1862 ! y(})24 b(COMMAND;)195 1966 y(COMMAND)f(commands[])f(=)i({)243 ! 2017 y({)f("cd",)h(com_cd,)f("Change)f(to)i(directory)f(DIR")g(},)243 ! 2069 y({)g("delete",)g(com_delete,)f("Delete)h(FILE")h(},)243 ! 2121 y({)f("help",)g(com_help,)g("Display)g(this)g(text")g(},)243 ! 2173 y({)g("?",)h(com_help,)e("Synonym)h(for)h(`help'")f(},)243 ! 2225 y({)g("list",)g(com_list,)g("List)g(files)g(in)h(DIR")f(},)243 ! 2277 y({)g("ls",)h(com_list,)e("Synonym)h(for)g(`list'")g(},)243 ! 2329 y({)g("pwd",)g(com_pwd,)g("Print)g(the)h(current)f(working)g ! (directory")f(},)243 2381 y({)h("quit",)g(com_quit,)g("Quit)g(using)g ! (Fileman")g(},)243 2433 y({)g("rename",)g(com_rename,)f("Rename)h(FILE) ! h(to)f(NEWNAME")g(},)243 2484 y({)g("stat",)g(com_stat,)g("Print)g(out) ! g(statistics)g(on)h(FILE")f(},)243 2536 y({)g("view",)g(com_view,)g ! ("View)g(the)h(contents)e(of)i(FILE")f(},)243 2588 y({)g(\(char)h ! (*\)NULL,)f(\(rl_icpfunc_t)f(*\)NULL,)h(\(char)g(*\)NULL)g(})195 ! 2640 y(};)p eop %%Page: 46 48 46 47 bop 75 -58 a Fu(46)1299 b(GNU)15 b(Readline)h(Library)195 ! 201 y Ft(/*)24 b(Forward)e(declarations.)h(*/)195 253 ! y(char)g(*stripwhite)g(\(\);)195 305 y(COMMAND)g(*find_command)f(\(\);) ! 195 409 y(/*)i(The)f(name)g(of)h(this)f(program,)g(as)h(taken)f(from)g ! (argv[0].)g(*/)195 461 y(char)g(*progname;)195 565 y(/*)h(When)f ! (non-zero,)g(this)g(means)g(the)g(user)h(is)f(done)h(using)f(this)g ! (program.)g(*/)195 616 y(int)g(done;)195 720 y(char)g(*)195 ! 772 y(dupstr)g(\(s\))314 824 y(int)h(s;)195 876 y({)243 ! 928 y(char)f(*r;)243 1032 y(r)g(=)h(xmalloc)f(\(strlen)g(\(s\))g(+)h ! (1\);)243 1083 y(strcpy)f(\(r,)g(s\);)243 1135 y(return)g(\(r\);)195 ! 1187 y(})195 1291 y(main)g(\(argc,)g(argv\))314 1343 ! y(int)h(argc;)314 1395 y(char)g(**argv;)195 1447 y({)243 ! 1499 y(char)f(*line,)g(*s;)243 1602 y(progname)f(=)i(argv[0];)243 ! 1706 y(initialize_readline)d(\(\);)i(/*)h(Bind)f(our)h(completer.)e(*/) ! 243 1810 y(/*)h(Loop)h(reading)f(and)g(executing)g(lines)g(until)g(the) ! g(user)h(quits.)f(*/)243 1862 y(for)g(\()h(;)g(done)f(==)h(0;)f(\))290 ! 1914 y({)338 1966 y(line)g(=)h(readline)f(\("FileMan:)f("\);)338 ! 2069 y(if)i(\(!line\))386 2121 y(break;)338 2225 y(/*)g(Remove)f ! (leading)g(and)g(trailing)g(whitespace)f(from)i(the)f(line.)410 ! 2277 y(Then,)g(if)h(there)f(is)g(anything)g(left,)g(add)h(it)f(to)h ! (the)f(history)g(list)410 2329 y(and)g(execute)g(it.)h(*/)338 ! 2381 y(s)g(=)g(stripwhite)e(\(line\);)338 2484 y(if)i(\(*s\))386 ! 2536 y({)434 2588 y(add_history)e(\(s\);)434 2640 y(execute_line)g ! (\(s\);)p eop %%Page: 47 49 47 48 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(47)386 149 y Ft(})338 253 y(free)23 b(\(line\);)290 ! 305 y(})243 357 y(exit)g(\(0\);)195 409 y(})195 513 y(/*)h(Execute)e(a) ! i(command)f(line.)g(*/)195 565 y(int)195 616 y(execute_line)f(\(line\)) ! 314 668 y(char)i(*line;)195 720 y({)243 772 y(register)e(int)i(i;)243 824 y(COMMAND)f(*command;)243 876 y(char)g(*word;)243 980 y(/*)g(Isolate)g(the)h(command)f(word.)g(*/)243 1032 --- 2355,4207 ---- 195 2099 y(static)g(char)g(*line_read)g(=)h(\(char)f(*\)NULL;)195 2203 y(/*)h(Read)f(a)h(string,)f(and)g(return)g(a)h(pointer)f(to)g(it.) ! 267 2255 y(Returns)f(NULL)i(on)f(EOF.)h(*/)195 2307 y(char)f(*)195 ! 2359 y(rl_gets)g(\(\))195 2411 y({)243 2462 y(/*)g(If)h(the)f(buffer)g ! (has)h(already)f(been)g(allocated,)314 2514 y(return)g(the)h(memory)f ! (to)g(the)h(free)f(pool.)g(*/)243 2566 y(if)g(\(line_read\))290 ! 2618 y({)338 2670 y(free)g(\(line_read\);)p eop ! %%Page: 22 24 ! 22 23 bop 75 -58 a Fu(22)1299 b(GNU)15 b(Readline)h(Library)338 ! 149 y Ft(line_read)23 b(=)h(\(char)f(*\)NULL;)290 201 ! y(})243 305 y(/*)g(Get)h(a)f(line)h(from)f(the)h(user.)f(*/)243 ! 357 y(line_read)f(=)i(readline)f(\(""\);)243 461 y(/*)g(If)h(the)f ! (line)h(has)f(any)h(text)f(in)g(it,)314 513 y(save)h(it)f(on)h(the)f ! (history.)g(*/)243 565 y(if)g(\(line_read)g(&&)g(*line_read\))290 ! 616 y(add_history)g(\(line_read\);)243 720 y(return)g(\(line_read\);) ! 195 772 y(})137 848 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 846 y Fn(h)p ! 1181 820 74 2 v 1181 848 a Fm(T)m(AB)p 1181 856 V 1253 ! 846 a Fn(i)1280 848 y Fu(completion:)19 b(completion)13 ! b(on)f(\014le)75 903 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 958 y(of)g(the)205 956 y Fn(h)p ! 217 930 V 217 958 a Fm(T)m(AB)p 217 965 V 289 956 a Fn(i)319 ! 958 y Fu(k)o(ey)g(with)h Ft(rl_bind_key\(\))p Fu(.)195 ! 1031 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 ! 1107 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 1161 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 1159 y Fn(h)p 1641 1133 V 1641 1161 a ! Fm(T)m(AB)p 1641 1169 V 1712 1159 a Fn(i)1745 1161 y ! Fu(to)17 b Ft(rl_)75 1216 y(insert\(\))f Fu(mak)o(es)422 ! 1214 y Fn(h)p 434 1188 V 434 1216 a Fm(T)m(AB)p 434 1224 ! V 506 1214 a Fn(i)539 1216 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 1271 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 ! 1347 y(Th)o(us,)g(to)g(disable)h(the)g(default)703 1345 ! y Fn(h)p 716 1319 V 716 1347 a Fm(T)m(AB)p 716 1354 V ! 787 1345 a Fn(i)817 1347 y Fu(b)q(eha)o(vior,)g(the)f(follo)o(wing)h ! (su\016ces:)195 1420 y Ft(rl_bind_key)22 b(\('\\t',)h(rl_insert\);)137 ! 1496 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 1551 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 1605 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 ! (41\).)75 1756 y Fs(2.2)33 b(Custom)21 b(F)-6 b(unctions)137 ! 1861 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 1915 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 1970 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 2025 y(functionalit)o(y)j(to)f(Readline.)137 ! 2101 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 ! 2156 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 ! 2211 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 2265 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 2320 y Ft(readline.h)p ! Fu(.)137 2396 y Ft(readline.h)14 b Fu(de\014nes)i(a)f(C)h(prepro)q (cessor)f(v)m(ariable)i(that)d(should)i(b)q(e)g(treated)f(as)g(an)g(in) ! o(teger,)g Ft(RL_)75 2451 y(READLINE_VERSION)p Fu(,)9 b(whic)o(h)j(ma)o(y)f(b)q(e)g(used)h(to)e(conditionally)k(compile)e ! (application)h(co)q(de)f(dep)q(ending)75 2506 y(on)17 b(the)h(installed)h(Readline)g(v)o(ersion.)27 b(The)18 b(v)m(alue)h(is)f(a)f(hexadecimal)i(enco)q(ding)g(of)e(the)h(ma)s(jor)e ! (and)75 2560 y(minor)h(v)o(ersion)h(n)o(um)o(b)q(ers)f(of)g(the)g (library)l(,)h(of)f(the)g(form)f(0x)p Fk(MMmm)p Fu(.)25 b Fk(MM)c Fu(is)c(the)h(t)o(w)o(o-digit)e(ma)s(jor)75 ! 2615 y(v)o(ersion)f(n)o(um)o(b)q(er;)f Fk(mm)h Fu(is)g(the)f(t)o(w)o (o-digit)g(minor)h(v)o(ersion)g(n)o(um)o(b)q(er.)20 b(F)l(or)14 ! b(Readline)h(4.2,)f(for)f(example,)75 2670 y(the)i(v)m(alue)i(of)d Ft(RL_READLINE_VERSION)f Fu(w)o(ould)j(b)q(e)f Ft(0x0402)p ! Fu(.)p eop ! %%Page: 23 25 ! 23 24 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(23)75 149 y Fj(2.2.1)30 b(Readline)20 ! b(T)n(yp)r(edefs)137 251 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 324 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 379 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 452 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 ! 507 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 561 y(functions\).)20 ! b(Instead)c(of)f(the)g(classic)h(C)f(declaration)137 ! 634 y Ft(int)g(\(*func\)\(\);)75 707 y Fu(or)g(the)g(ANSI-C)h(st)o(yle) ! f(declaration)137 780 y Ft(int)g(\(*func\)\(int,)f(int\);)75 ! 853 y Fu(w)o(e)h(ma)o(y)f(write)137 926 y Ft(rl_command_func_t)f ! (*func;)137 999 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 1087 y Ft(typedef)d(int)h ! (rl_command_func_t)e(\(int,)h(int\);)75 1157 y(typedef)g(char)h ! (*rl_compentry_func_t)d(\(const)j(char)f(*,)h(int\);)75 ! 1227 y(typedef)f(char)h(**rl_completion_func_t)d(\(const)i(char)h(*,)g ! (int,)f(int\);)75 1297 y(typedef)g(char)h(*rl_quote_func_t)e(\(char)h ! (*,)h(int,)g(char)f(*\);)75 1367 y(typedef)g(char)h(*rl_dequote_func_t) ! d(\(char)j(*,)g(int\);)75 1437 y(typedef)f(int)h(rl_compignore_func_t)d ! (\(char)j(**\);)75 1507 y(typedef)f(void)h(rl_compdisp_func_t)d(\(char) ! j(**,)g(int,)f(int\);)75 1577 y(typedef)g(int)h(rl_hook_func_t)e ! (\(void\);)75 1647 y(typedef)h(int)h(rl_getc_func_t)e(\(FILE)i(*\);)75 ! 1717 y(typedef)f(int)h(rl_linebuf_func_t)e(\(char)h(*,)h(int\);)75 ! 1787 y(typedef)f(int)h(rl_intfunc_t)e(\(int\);)75 1857 ! y(#define)h(rl_ivoidfunc_t)f(rl_hook_func_t)75 1927 y(typedef)h(int)h ! (rl_icpfunc_t)e(\(char)i(*\);)75 1997 y(typedef)f(int)h(rl_icppfunc_t)e ! (\(char)i(**\);)75 2067 y(typedef)f(void)h(rl_voidfunc_t)e(\(void\);)75 ! 2137 y(typedef)h(void)h(rl_vintfunc_t)e(\(int\);)75 2208 ! y(typedef)h(void)h(rl_vcpfunc_t)e(\(char)i(*\);)75 2278 y(typedef)f(void)h(rl_vcppfunc_t)e(\(char)i(**\);)75 ! 2386 y Fj(2.2.2)30 b(W)-5 b(riting)20 b(a)h(New)f(F)-5 ! b(unction)137 2488 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 2542 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 2597 y(state)c(of)h(the)g(line)i ! (read)e(so)g(far.)137 2670 y(The)h(calling)h(sequence)f(for)f(a)f ! (command)i Ft(foo)e Fu(lo)q(oks)i(lik)o(e)p eop ! %%Page: 24 26 ! 24 25 bop 75 -58 a Fu(24)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y Ft(int)23 b(foo)h(\(int)f(count,)g(int)h(key\))75 ! 221 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 276 ! y(this)f(function.)137 348 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 403 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 457 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 512 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(function)h(uses)g(the)g(n)o ! (umeric)h(argumen)o(t)d(as)i(a)f(rep)q(eat)75 567 y(coun)o(t,)e(it)g ! (should)h(b)q(e)f(able)h(to)e(do)h(something)h(useful)g(with)f(b)q(oth) ! g(negativ)o(e)g(and)g(p)q(ositiv)o(e)h(argumen)o(ts.)75 ! 622 y(A)o(t)g(the)g(v)o(ery)g(least,)g(it)g(should)h(b)q(e)g(a)o(w)o ! (are)e(that)h(it)g(can)g(b)q(e)h(passed)g(a)f(negativ)o(e)g(argumen)o ! (t.)137 693 y(A)f(command)g(function)h(should)g(return)e(0)h(if)g(its)g ! (action)h(completes)f(successfully)l(,)i(and)e(a)g(non-zero)75 ! 748 y(v)m(alue)i(if)g(some)f(error)f(o)q(ccurs.)75 888 ! y Fs(2.3)33 b(Readline)23 b(V)-6 b(ariables)137 989 y ! Fu(These)16 b(v)m(ariables)g(are)f(a)o(v)m(ailable)i(to)e(function)h ! (writers.)1773 1120 y(V)l(ariable)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 1120 18 3 v 21 w(line)p 395 1120 V ! 23 w(bu\013er)195 1174 y Fu(This)d(is)g(the)g(line)h(gathered)f(so)f ! (far.)20 b(Y)l(ou)c(are)f(w)o(elcome)h(to)f(mo)q(dify)h(the)g(con)o ! (ten)o(ts)f(of)g(the)h(line,)195 1229 y(but)i(see)g(Section)h(2.4.5)d ! ([Allo)o(wing)i(Undoing],)h(page)e(32.)27 b(The)18 b(function)h ! Ft(rl_extend_line_)195 1284 y(buffer)14 b Fu(is)i(a)o(v)m(ailable)h(to) ! d(increase)j(the)e(memory)f(allo)q(cated)j(to)d Ft(rl_line_buffer)p ! Fu(.)1773 1414 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p ! 215 1414 V 21 w(p)r(oin)n(t)195 1469 y Fu(The)15 b(o\013set)g(of)f(the) ! i(curren)o(t)f(cursor)g(p)q(osition)h(in)g Ft(rl_line_buffer)d ! Fu(\(the)i Fl(p)n(oint)t Fu(\).)1773 1600 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1600 V 21 w(end)195 1655 y ! Fu(The)14 b(n)o(um)o(b)q(er)g(of)g(c)o(haracters)f(presen)o(t)h(in)h ! Ft(rl_line_buffer)p Fu(.)i(When)e Ft(rl_point)e Fu(is)h(at)f(the)h(end) ! 195 1709 y(of)h(the)g(line,)i Ft(rl_point)d Fu(and)h ! Ft(rl_end)f Fu(are)h(equal.)1773 1840 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1840 V 21 w(mark)195 1895 y ! Fu(The)f Fk(mark)h Fu(\(sa)o(v)o(ed)e(p)q(osition\))h(in)g(the)g ! (curren)o(t)f(line.)31 b(If)19 b(set,)g(the)f(mark)g(and)h(p)q(oin)o(t) ! g(de\014ne)g(a)195 1950 y Fl(r)n(e)n(gion)p Fu(.)1773 ! 2080 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 2080 ! V 21 w(done)195 2135 y Fu(Setting)11 b(this)g(to)g(a)f(non-zero)h(v)m ! (alue)h(causes)f(Readline)h(to)f(return)f(the)h(curren)o(t)g(line)h ! (immediately)l(.)1773 2265 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 2265 V 21 w(n)n(um)p 347 2265 V 19 w(c)n(hars)p ! 496 2265 V 20 w(to)p 567 2265 V 21 w(read)195 2320 y ! Fu(Setting)d(this)g(to)f(a)g(p)q(ositiv)o(e)h(v)m(alue)h(b)q(efore)f ! (calling)h Ft(readline\(\))d Fu(causes)h(Readline)i(to)e(return)195 ! 2375 y(after)h(accepting)i(that)e(man)o(y)g(c)o(haracters,)h(rather)f ! (than)h(reading)g(up)g(to)f(a)h(c)o(haracter)f(b)q(ound)195 ! 2430 y(to)e Ft(accept-line)p Fu(.)1773 2560 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 2560 V 21 w(p)r(ending)p 436 ! 2560 V 20 w(input)195 2615 y Fu(Setting)13 b(this)g(to)f(a)g(v)m(alue)i ! (mak)o(es)e(it)h(the)f(next)h(k)o(eystrok)o(e)f(read.)19 ! b(This)13 b(is)g(a)f(w)o(a)o(y)g(to)f(stu\013)h(a)h(single)195 ! 2670 y(c)o(haracter)h(in)o(to)i(the)f(input)h(stream.)p eop ! %%Page: 25 27 ! 25 26 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(25)1773 149 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 149 18 3 v 21 w(dispatc)n(hing)195 204 ! y Fu(Set)12 b(to)g(a)f(non-zero)i(v)m(alue)g(if)g(a)f(function)h(is)f ! (b)q(eing)i(called)f(from)f(a)f(k)o(ey)h(binding;)j(zero)d(otherwise.) ! 195 259 y(Application)20 b(functions)e(can)g(test)g(this)g(to)f(disco)o ! (v)o(er)h(whether)g(they)g(w)o(ere)g(called)h(directly)g(or)195 ! 314 y(b)o(y)c(Readline's)h(dispatc)o(hing)h(mec)o(hanism.)1773 ! 423 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 423 ! V 21 w(erase)p 363 423 V 20 w(empt)n(y)p 540 423 V 20 ! w(line)195 478 y Fu(Setting)j(this)h(to)e(a)h(non-zero)g(v)m(alue)h (causes)f(Readline)i(to)d(completely)i(erase)f(the)g(curren)o(t)195 ! 533 y(line,)g(including)h(an)o(y)c(prompt,)h(an)o(y)g(time)g(a)f (newline)j(is)e(t)o(yp)q(ed)g(as)f(the)h(only)g(c)o(haracter)f(on)195 ! 588 y(an)e(otherwise-empt)o(y)g(line.)31 b(The)18 b(cursor)g(is)h(mo)o (v)o(ed)e(to)h(the)g(b)q(eginning)i(of)e(the)g(newly-blank)195 ! 643 y(line.)1773 752 y(V)l(ariable)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 752 V 21 w(prompt)195 807 y Fu(The)13 b(prompt)g(Readline)h(uses.)20 b(This)13 b(is)h(set)f(from)f(the)h (argumen)o(t)g(to)f Ft(readline\(\))p Fu(,)g(and)h(should)195 ! 862 y(not)g(b)q(e)h(assigned)g(to)f(directly)l(.)21 b(The)14 b Ft(rl_set_prompt\(\))d Fu(function)j(\(see)g(Section)g(2.4.6)e ! ([Redis-)195 917 y(pla)o(y],)j(page)g(33\))f(ma)o(y)h(b)q(e)g(used)h (to)f(mo)q(dify)h(the)f(prompt)g(string)g(after)f(calling)j ! Ft(readline\(\))p Fu(.)1773 1026 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1026 V 21 w(already)p 419 1026 ! V 21 w(prompted)195 1081 y Fu(If)e(an)g(application)i(wishes)f(to)f (displa)o(y)h(the)f(prompt)g(itself,)h(rather)f(than)g(ha)o(v)o(e)g ! (Readline)h(do)195 1136 y(it)e(the)f(\014rst)g(time)h Ft(readline\(\))e Fu(is)i(called,)h(it)e(should)i(set)e(this)h(v)m ! (ariable)g(to)f(a)g(non-zero)h(v)m(alue)195 1191 y(after)h(displa)o (ying)j(the)e(prompt.)31 b(The)19 b(prompt)g(m)o(ust)f(also)h(b)q(e)h ! (passed)f(as)f(the)h(argumen)o(t)g(to)195 1245 y Ft(readline\(\))c Fu(so)h(the)h(redispla)o(y)g(functions)h(can)e(up)q(date)h(the)g (displa)o(y)h(prop)q(erly)l(.)24 b(The)17 b(calling)195 ! 1300 y(application)g(is)f(resp)q(onsible)h(for)d(managing)h(the)h(v)m ! (alue;)g(Readline)g(nev)o(er)g(sets)e(it.)1773 1410 y(V)l(ariable)-1861 ! b Fi(const)20 b(char)g(*)f Fh(rl)p 436 1410 V 21 w(library)p ! 625 1410 V 21 w(v)n(ersion)195 1465 y Fu(The)c(v)o(ersion)h(n)o(um)o(b) ! q(er)f(of)g(this)h(revision)g(of)f(the)g(library)l(.)1773 ! 1574 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 1574 ! V 21 w(readline)p 434 1574 V 22 w(v)n(ersion)195 1629 y Fu(An)d(in)o(teger)h(enco)q(ding)g(the)f(curren)o(t)g(v)o(ersion)g (of)g(the)g(library)l(.)27 b(The)17 b(enco)q(ding)h(is)g(of)f(the)g ! (form)195 1684 y(0x)p Fk(MMmm)p Fu(,)g(where)i Fk(MM)j Fu(is)d(the)f(t)o(w)o(o-digit)g(ma)s(jor)f(v)o(ersion)i(n)o(um)o(b)q ! (er,)g(and)f Fk(mm)g Fu(is)h(the)f(t)o(w)o(o-)195 1738 y(digit)i(minor)e(v)o(ersion)h(n)o(um)o(b)q(er.)31 b(F)l(or)18 b(example,)i(for)e(Readline-4.2,)i Ft(rl_readline_version)195 ! 1793 y Fu(w)o(ould)c(ha)o(v)o(e)e(the)i(v)m(alue)g(0x0402.)1773 ! 1903 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 1903 ! V 21 w(gn)n(u)p 327 1903 V 20 w(readline)p 545 1903 V ! 22 w(p)195 1958 y Fu(Alw)o(a)o(ys)15 b(set)g(to)f(1,)h(denoting)h(that) e(this)i(is)g Fp(gnu)f Fu(readline)h(rather)f(than)g(some)g(em)o ! (ulation.)1773 2067 y(V)l(ariable)-1861 b Fi(const)20 ! b(char)g(*)f Fh(rl)p 436 2067 V 21 w(terminal)p 668 2067 ! V 21 w(name)195 2122 y Fu(The)14 b(terminal)h(t)o(yp)q(e,)f(used)h(for) e(initialization.)23 b(If)14 b(not)f(set)h(b)o(y)g(the)g(application,)i ! (Readline)f(sets)195 2177 y(this)h(to)e(the)h(v)m(alue)i(of)e(the)g Ft(TERM)g Fu(en)o(vironmen)o(t)g(v)m(ariable)i(the)e(\014rst)g(time)g ! (it)h(is)f(called.)1773 2286 y(V)l(ariable)-1861 b Fi(const)20 ! b(char)g(*)f Fh(rl)p 436 2286 V 21 w(readline)p 655 2286 ! V 22 w(name)195 2341 y Fu(This)d(v)m(ariable)h(is)f(set)g(to)f(a)g (unique)i(name)f(b)o(y)f(eac)o(h)h(application)h(using)f(Readline.)23 ! b(The)16 b(v)m(alue)195 2396 y(allo)o(ws)e(conditional)i(parsing)e(of)g (the)g(inputrc)h(\014le)g(\(see)f(Section)h(1.3.2)d([Conditional)j ! (Init)g(Con-)195 2451 y(structs],)f(page)h(9\).)1773 ! 2560 y(V)l(ariable)-1861 b Fi(FILE)20 b(*)f Fh(rl)p 286 ! 2560 V 21 w(instream)195 2615 y Fu(The)i(stdio)f(stream)g(from)g(whic)o ! (h)h(Readline)h(reads)e(input.)37 b(If)21 b Ft(NULL)p ! Fu(,)g(Readline)h(defaults)f(to)195 2670 y Fk(stdin)p ! Fu(.)p eop ! %%Page: 26 28 ! 26 27 bop 75 -58 a Fu(26)1299 b(GNU)15 b(Readline)h(Library)1773 ! 149 y(V)l(ariable)-1861 b Fi(FILE)20 b(*)f Fh(rl)p 286 ! 149 18 3 v 21 w(outstream)195 204 y Fu(The)e(stdio)h(stream)e(to)h ! (whic)o(h)h(Readline)g(p)q(erforms)f(output.)26 b(If)18 ! b Ft(NULL)p Fu(,)e(Readline)j(defaults)f(to)195 259 y ! Fk(stdout)p Fu(.)1773 381 y(V)l(ariable)-1861 b Fi(rl_command_func_t)22 ! b(*)d Fh(rl)p 626 381 V 21 w(last)p 735 381 V 21 w(func)195 ! 436 y Fu(The)f(address)f(of)g(the)g(last)h(command)f(function)h ! (Readline)h(executed.)27 b(Ma)o(y)17 b(b)q(e)h(used)g(to)f(test)195 ! 490 y(whether)e(or)g(not)g(a)g(function)h(is)f(b)q(eing)i(executed)f(t) ! o(wice)g(in)g(succession,)g(for)e(example.)1773 612 y(V)l(ariable)-1861 ! b Fi(rl_hook_func_t)21 b(*)e Fh(rl)p 547 612 V 22 w(startup)p ! 752 612 V 19 w(ho)r(ok)195 667 y Fu(If)e(non-zero,)h(this)g(is)f(the)h ! (address)f(of)f(a)h(function)h(to)f(call)h(just)f(b)q(efore)g ! Ft(readline)f Fu(prin)o(ts)i(the)195 722 y(\014rst)d(prompt.)1773 ! 844 y(V)l(ariable)-1861 b Fi(rl_hook_func_t)21 b(*)e ! Fh(rl)p 547 844 V 22 w(pre)p 651 844 V 20 w(input)p 804 ! 844 V 21 w(ho)r(ok)195 898 y Fu(If)f(non-zero,)g(this)g(is)h(the)f (address)f(of)h(a)f(function)i(to)e(call)i(after)e(the)h(\014rst)f ! (prompt)g(has)h(b)q(een)195 953 y(prin)o(ted)e(and)f(just)g(b)q(efore)h Ft(readline)e Fu(starts)g(reading)h(input)i(c)o(haracters.)1773 ! 1075 y(V)l(ariable)-1861 b Fi(rl_hook_func_t)21 b(*)e ! Fh(rl)p 547 1075 V 22 w(ev)n(en)n(t)p 701 1075 V 22 w(ho)r(ok)195 ! 1130 y Fu(If)i(non-zero,)g(this)g(is)g(the)f(address)g(of)g(a)g (function)h(to)f(call)i(p)q(erio)q(dically)h(when)e(Readline)g(is)195 ! 1184 y(w)o(aiting)15 b(for)f(terminal)h(input.)21 b(By)14 b(default,)h(this)g(will)i(b)q(e)e(called)h(at)e(most)g(ten)g(times)h ! (a)f(second)195 1239 y(if)i(there)f(is)h(no)f(k)o(eyb)q(oard)g(input.) ! 1773 1361 y(V)l(ariable)-1861 b Fi(rl_getc_func_t)21 ! b(*)e Fh(rl)p 547 1361 V 22 w(getc)p 671 1361 V 21 w(function)195 ! 1416 y Fu(If)c(non-zero,)h(Readline)g(will)h(call)f(indirectly)i (through)d(this)g(p)q(oin)o(ter)h(to)f(get)f(a)h(c)o(haracter)g(from) ! 195 1471 y(the)k(input)i(stream.)31 b(By)19 b(default,)h(it)g(is)g(set) ! f(to)f Ft(rl_getc)p Fu(,)h(the)g(default)h(Readline)h(c)o(haracter)195 ! 1525 y(input)16 b(function)g(\(see)f(Section)h(2.4.8)e([Character)g ! (Input],)h(page)g(34\).)1773 1647 y(V)l(ariable)-1861 ! b Fi(rl_voidfunc_t)21 b(*)e Fh(rl)p 521 1647 V 21 w(redispla)n(y)p ! 765 1647 V 22 w(function)195 1702 y Fu(If)f(non-zero,)h(Readline)g ! (will)h(call)f(indirectly)h(through)e(this)g(p)q(oin)o(ter)h(to)e(up)q ! (date)i(the)f(displa)o(y)195 1757 y(with)c(the)f(curren)o(t)h(con)o ! (ten)o(ts)f(of)g(the)g(editing)i(bu\013er.)k(By)14 b(default,)g(it)g ! (is)g(set)f(to)g Ft(rl_redisplay)p Fu(,)195 1812 y(the)i(default)h ! (Readline)h(redispla)o(y)f(function)g(\(see)f(Section)h(2.4.6)e ! ([Redispla)o(y],)h(page)g(33\).)1773 1933 y(V)l(ariable)-1861 ! b Fi(rl_vintfunc_t)21 b(*)e Fh(rl)p 521 1933 V 21 w(prep)p ! 656 1933 V 21 w(term)p 798 1933 V 19 w(function)195 1988 ! y Fu(If)12 b(non-zero,)h(Readline)g(will)h(call)f(indirectly)h(through) ! e(this)g(p)q(oin)o(ter)h(to)e(initialize)k(the)e(terminal.)195 ! 2043 y(The)19 b(function)g(tak)o(es)f(a)g(single)i(argumen)o(t,)e(an)h ! Ft(int)f Fu(\015ag)g(that)g(sa)o(ys)g(whether)g(or)h(not)f(to)g(use)195 ! 2098 y(eigh)o(t-bit)g(c)o(haracters.)25 b(By)17 b(default,)h(this)f(is) ! h(set)e(to)h Ft(rl_prep_terminal)e Fu(\(see)i(Section)h(2.4.9)195 ! 2152 y([T)l(erminal)e(Managemen)o(t],)d(page)i(35\).)1773 ! 2274 y(V)l(ariable)-1861 b Fi(rl_voidfunc_t)21 b(*)e ! Fh(rl)p 521 2274 V 21 w(deprep)p 714 2274 V 21 w(term)p ! 856 2274 V 19 w(function)195 2329 y Fu(If)g(non-zero,)g(Readline)g (will)h(call)g(indirectly)g(through)e(this)h(p)q(oin)o(ter)f(to)g ! (reset)g(the)h(terminal.)195 2384 y(This)f(function)g(should)h(undo)f (the)f(e\013ects)h(of)f Ft(rl_prep_term_function)p Fu(.)24 ! b(By)17 b(default,)i(this)195 2439 y(is)d(set)f(to)f Ft(rl_deprep_terminal)f Fu(\(see)i(Section)h(2.4.9)e([T)l(erminal)i ! (Managemen)o(t],)d(page)i(35\).)1773 2560 y(V)l(ariable)-1861 ! b Fi(Keymap)20 b Fh(rl)p 293 2560 V 21 w(executing)p ! 551 2560 V 22 w(k)n(eymap)195 2615 y Fu(This)f(v)m(ariable)g(is)f(set)g (to)g(the)g(k)o(eymap)f(\(see)h(Section)h(2.4.2)e([Keymaps],)g(page)h ! (29\))f(in)i(whic)o(h)195 2670 y(the)c(curren)o(tly)h(executing)g ! (readline)h(function)f(w)o(as)f(found.)p eop ! %%Page: 27 29 ! 27 28 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(27)1773 149 y(V)l(ariable)-1861 b Fi(Keymap)20 ! b Fh(rl)p 293 149 18 3 v 21 w(binding)p 501 149 V 22 ! w(k)n(eymap)195 204 y Fu(This)f(v)m(ariable)g(is)f(set)g(to)g(the)g(k)o ! (eymap)f(\(see)h(Section)h(2.4.2)e([Keymaps],)g(page)h(29\))f(in)i ! (whic)o(h)195 259 y(the)c(last)g(k)o(ey)g(binding)j(o)q(ccurred.)1773 ! 383 y(V)l(ariable)-1861 b Fi(char)20 b(*)f Fh(rl)p 286 ! 383 V 21 w(executing)p 544 383 V 22 w(macro)195 438 y ! Fu(This)d(v)m(ariable)g(is)g(set)f(to)g(the)g(text)g(of)f(an)o(y)h ! (curren)o(tly-executing)i(macro.)1773 562 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 562 V 21 w(readline)p 434 562 ! V 22 w(state)195 617 y Fu(A)d(v)m(ariable)i(with)e(bit)h(v)m(alues)h ! (that)d(encapsulate)i(the)g(curren)o(t)f(Readline)h(state.)25 ! b(A)18 b(bit)f(is)h(set)195 671 y(with)h(the)g Ft(RL_SETSTATE)f ! Fu(macro,)h(and)g(unset)g(with)g(the)g Ft(RL_UNSETSTATE)e ! Fu(macro.)31 b(Use)19 b(the)195 726 y Ft(RL_ISSTATE)e ! Fu(macro)h(to)g(test)g(whether)h(a)f(particular)i(state)d(bit)j(is)f ! (set.)30 b(Curren)o(t)18 b(state)g(bits)195 781 y(include:)195 ! 864 y Ft(RL_STATE_NONE)435 919 y Fu(Readline)e(has)g(not)e(y)o(et)h(b)q ! (een)h(called,)h(nor)e(has)g(it)g(b)q(egun)h(to)f(in)o(tialize.)195 ! 1001 y Ft(RL_STATE_INITIALIZING)435 1056 y Fu(Readline)h(is)g ! (initializi)q(ng)i(its)d(in)o(ternal)h(data)f(structures.)195 ! 1138 y Ft(RL_STATE_INITIALIZED)435 1192 y Fu(Readline)h(has)g ! (completed)g(its)f(initialization.)195 1274 y Ft(RL_STATE_TERMPREPPED) ! 435 1329 y Fu(Readline)h(has)e(mo)q(di\014ed)i(the)e(terminal)h(mo)q ! (des)g(to)e(do)i(its)f(o)o(wn)g(input)h(and)g(redis-)435 ! 1384 y(pla)o(y)l(.)195 1466 y Ft(RL_STATE_READCMD)435 ! 1521 y Fu(Readline)h(is)g(reading)g(a)f(command)g(from)f(the)i(k)o(eyb) ! q(oard.)195 1603 y Ft(RL_STATE_METANEXT)435 1658 y Fu(Readline)g(is)g (reading)g(more)f(input)h(after)e(reading)i(the)f(meta-pre\014x)h(c)o ! (haracter.)195 1740 y Ft(RL_STATE_DISPATCHING)435 1794 y Fu(Readline)g(is)g(dispatc)o(hing)h(to)d(a)h(command.)195 ! 1876 y Ft(RL_STATE_MOREINPUT)435 1931 y Fu(Readline)h(is)g(reading)g (more)f(input)h(while)h(executing)f(an)f(editing)i(command.)195 ! 2013 y Ft(RL_STATE_ISEARCH)435 2068 y Fu(Readline)f(is)g(p)q(erforming) ! g(an)f(incremen)o(tal)h(history)f(searc)o(h.)195 2150 ! y Ft(RL_STATE_NSEARCH)435 2205 y Fu(Readline)h(is)g(p)q(erforming)g(a)f ! (non-incremen)o(tal)h(history)g(searc)o(h.)195 2287 y ! Ft(RL_STATE_SEARCH)435 2342 y Fu(Readline)11 b(is)g(searc)o(hing)g(bac) o(kw)o(ard)e(or)h(forw)o(ard)f(through)h(the)g(history)g(for)f(a)h ! (string.)195 2424 y Ft(RL_STATE_NUMERICARG)435 2478 y Fu(Readline)16 b(is)g(reading)g(a)f(n)o(umeric)h(argumen)o(t.)195 ! 2560 y Ft(RL_STATE_MACROINPUT)435 2615 y Fu(Readline)d(is)g(curren)o (tly)g(getting)f(its)g(input)h(from)e(a)h(previously-de\014ned)j(k)o ! (eyb)q(oard)435 2670 y(macro.)p eop ! %%Page: 28 30 ! 28 29 bop 75 -58 a Fu(28)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y Ft(RL_STATE_MACRODEF)435 204 y Fu(Readline)g(is)g(curren)o(tly)g ! (reading)g(c)o(haracters)e(de\014ning)j(a)e(k)o(eyb)q(oard)g(macro.)195 ! 286 y Ft(RL_STATE_OVERWRITE)435 341 y Fu(Readline)h(is)g(in)g(o)o(v)o ! (erwrite)f(mo)q(de.)195 423 y Ft(RL_STATE_COMPLETING)435 ! 478 y Fu(Readline)h(is)g(p)q(erforming)g(w)o(ord)e(completion.)195 ! 560 y Ft(RL_STATE_SIGHANDLER)435 615 y Fu(Readline)i(is)g(curren)o(tly) ! g(executing)g(the)f(readline)i(signal)f(handler.)195 ! 697 y Ft(RL_STATE_UNDOING)435 752 y Fu(Readline)g(is)g(p)q(erforming)g ! (an)f(undo.)195 834 y Ft(RL_STATE_DONE)435 889 y Fu(Readline)g(has)f (read)g(a)f(k)o(ey)h(sequence)h(b)q(ound)g(to)e Ft(accept-line)f ! Fu(and)i(is)h(ab)q(out)f(to)435 944 y(return)h(the)g(line)i(to)e(the)g ! (caller.)1773 1068 y(V)l(ariable)-1861 b Fi(int)20 b ! Fh(rl)p 215 1068 18 3 v 21 w(explicit)p 417 1068 V 24 ! w(arg)195 1123 y Fu(Set)f(to)g(a)g(non-zero)h(v)m(alue)h(if)e(an)h ! (explicit)h(n)o(umeric)g(argumen)o(t)d(w)o(as)h(sp)q(eci\014ed)i(b)o(y) ! f(the)f(user.)195 1178 y(Only)d(v)m(alid)h(in)f(a)f(bindable)i(command) ! f(function.)1773 1302 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 1302 V 21 w(n)n(umeric)p 437 1302 V 20 ! w(arg)195 1357 y Fu(Set)j(to)f(the)g(v)m(alue)i(of)f(an)o(y)f(n)o ! (umeric)h(argumen)o(t)f(explicitly)k(sp)q(eci\014ed)f(b)o(y)d(the)h ! (user)g(b)q(efore)195 1412 y(executing)14 b(the)f(curren)o(t)g ! (Readline)h(function.)20 b(Only)14 b(v)m(alid)h(in)f(a)f(bindable)i ! (command)d(function.)1773 1536 y(V)l(ariable)-1861 b ! Fi(int)20 b Fh(rl)p 215 1536 V 21 w(editing)p 407 1536 ! V 22 w(mo)r(de)195 1591 y Fu(Set)13 b(to)f(a)g(v)m(alue)i(denoting)f ! (Readline's)g(curren)o(t)g(editing)h(mo)q(de.)19 b(A)12 ! b(v)m(alue)i(of)e Fk(1)k Fu(means)d(Readline)195 1646 ! y(is)j(curren)o(tly)f(in)h(emacs)g(mo)q(de;)f Fk(0)j ! Fu(means)d(that)g(vi)h(mo)q(de)f(is)h(activ)o(e.)75 1781 y Fs(2.4)33 b(Readline)23 b(Con)n(v)n(enience)g(F)-6 ! b(unctions)75 1927 y Fj(2.4.1)30 b(Naming)20 b(a)g(F)-5 ! b(unction)137 2025 y Fu(The)20 b(user)g(can)g(dynamically)i(c)o(hange)e (the)g(bindings)i(of)d(k)o(eys)h(while)h(using)g(Readline.)35 ! b(This)20 b(is)75 2080 y(done)f(b)o(y)f(represen)o(ting)h(the)g (function)g(with)g(a)f(descriptiv)o(e)i(name.)29 b(The)19 ! b(user)f(is)h(able)h(to)d(t)o(yp)q(e)i(the)75 2135 y(descriptiv)o(e)e (name)e(when)h(referring)f(to)g(the)g(function.)21 b(Th)o(us,)14 b(in)i(an)f(init)i(\014le,)f(one)f(migh)o(t)g(\014nd)195 ! 2202 y Ft(Meta-Rubout:)46 b(backward-kill-word)137 2272 ! y Fu(This)21 b(binds)g(the)f(k)o(eystrok)o(e)661 2270 ! y Fn(h)p 673 2244 209 2 v 673 2272 a Fm(Meta-Rub)q(out)p ! 673 2279 V 879 2270 a Fn(i)914 2272 y Fu(to)g(the)g(function)g ! Fl(descriptively)k Fu(named)c Ft(backward-)75 2326 y(kill-word)p Fu(.)29 b(Y)l(ou,)19 b(as)f(the)h(programmer,)f(should)i(bind)f(the)g (functions)h(y)o(ou)e(write)h(to)e(descriptiv)o(e)75 ! 2381 y(names)e(as)g(w)o(ell.)21 b(Readline)16 b(pro)o(vides)g(a)f ! (function)h(for)e(doing)i(that:)1762 2506 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2506 18 3 v 21 w(add)p 328 ! 2506 V 20 w(defun)i Fg(\()p Ft(const)14 b(char)h(*name,)f ! (rl_command_func_t)283 2560 y(*function,)f(int)i(key)p ! Fg(\))195 2615 y Fu(Add)j Fk(name)i Fu(to)d(the)h(list)h(of)e(named)h (functions.)28 b(Mak)o(e)17 b Fk(function)h Fu(b)q(e)g(the)g(function)h ! (that)d(gets)195 2670 y(called.)21 b(If)16 b Fk(k)o(ey)j Fu(is)d(not)e(-1,)h(then)h(bind)g(it)g(to)e Fk(function)i ! Fu(using)g Ft(rl_bind_key\(\))p Fu(.)p eop ! %%Page: 29 31 ! 29 30 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(29)137 149 y(Using)16 b(this)f(function)h(alone)g(is)f ! (su\016cien)o(t)h(for)f(most)f(applications.)21 b(It)15 ! b(is)h(the)f(recommended)h(w)o(a)o(y)75 204 y(to)d(add)h(a)f(few)g ! (functions)h(to)f(the)h(default)g(functions)g(that)f(Readline)i(has)e ! (built)i(in.)20 b(If)14 b(y)o(ou)f(need)h(to)f(do)75 ! 259 y(something)k(other)g(than)f(adding)i(a)e(function)i(to)e (Readline,)i(y)o(ou)f(ma)o(y)f(need)i(to)e(use)h(the)g(underlying)75 ! 314 y(functions)f(describ)q(ed)h(b)q(elo)o(w.)75 442 ! y Fj(2.4.2)30 b(Selecting)20 b(a)h(Keymap)137 546 y Fu(Key)16 ! b(bindings)i(tak)o(e)c(place)j(on)e(a)g Fk(k)o(eymap)p Fu(.)21 b(The)15 b(k)o(eymap)h(is)f(the)h(asso)q(ciation)g(b)q(et)o(w)o ! (een)g(the)f(k)o(eys)75 601 y(that)f(the)g(user)g(t)o(yp)q(es)g(and)h (the)f(functions)h(that)f(get)g(run.)19 b(Y)l(ou)c(can)f(mak)o(e)g(y)o ! (our)g(o)o(wn)f(k)o(eymaps,)h(cop)o(y)75 656 y(existing)i(k)o(eymaps,)f ! (and)g(tell)h(Readline)h(whic)o(h)f(k)o(eymap)f(to)f(use.)1762 ! 797 y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p 293 ! 797 18 3 v 21 w(mak)n(e)p 445 797 V 20 w(bare)p 575 797 ! V 20 w(k)n(eymap)j Fg(\()p Ft(void)p Fg(\))195 851 y Fu(Returns)12 b(a)f(new,)i(empt)o(y)f(k)o(eymap.)18 b(The)13 b(space)f(for)f(the)i(k)o(eymap)e(is)i(allo)q(cated)g(with)f ! Ft(malloc\(\))p Fu(;)195 906 y(the)j(caller)i(should)f(free)f(it)h(b)o (y)f(calling)i Ft(rl_discard_keymap\(\))12 b Fu(when)k(done.)1762 ! 1047 y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p 293 ! 1047 V 21 w(cop)n(y)p 428 1047 V 21 w(k)n(eymap)j Fg(\()p ! Ft(Keymap)14 b(map)p Fg(\))195 1102 y Fu(Return)h(a)g(new)g(k)o(eymap)g ! (whic)o(h)h(is)g(a)f(cop)o(y)g(of)g Fk(map)p Fu(.)1762 ! 1243 y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p 293 ! 1243 V 21 w(mak)n(e)p 445 1243 V 20 w(k)n(eymap)j Fg(\()p ! Ft(void)p Fg(\))195 1298 y Fu(Return)16 b(a)f(new)i(k)o(eymap)e(with)i ! (the)f(prin)o(ting)h(c)o(haracters)e(b)q(ound)i(to)e(rl)p ! 1457 1298 14 2 v 17 w(insert,)h(the)g(lo)o(w)o(ercase)195 ! 1353 y(Meta)11 b(c)o(haracters)f(b)q(ound)i(to)f(run)h(their)f(equiv)m ! (alen)o(ts,)j(and)d(the)h(Meta)e(digits)i(b)q(ound)g(to)f(pro)q(duce) ! 195 1407 y(n)o(umeric)16 b(argumen)o(ts.)1762 1548 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 1548 18 3 v 21 w(discard)p ! 441 1548 V 21 w(k)n(eymap)i Fg(\()p Ft(Keymap)14 b(keymap)p ! Fg(\))195 1603 y Fu(F)l(ree)h(the)h(storage)d(asso)q(ciated)j(with)f ! Fk(k)o(eymap)p Fu(.)137 1711 y(Readline)24 b(has)f(sev)o(eral)g(in)o ! (ternal)g(k)o(eymaps.)42 b(These)23 b(functions)g(allo)o(w)g(y)o(ou)f ! (to)g(c)o(hange)h(whic)o(h)75 1766 y(k)o(eymap)15 b(is)h(activ)o(e.) ! 1762 1907 y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p ! 293 1907 V 21 w(get)p 391 1907 V 21 w(k)n(eymap)i Fg(\()p ! Ft(void)p Fg(\))195 1962 y Fu(Returns)15 b(the)g(curren)o(tly)h(activ)o ! (e)f(k)o(eymap.)1762 2103 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 2103 V 21 w(set)p 333 2103 V 21 w(k)n(eymap)i ! Fg(\()p Ft(Keymap)14 b(keymap)p Fg(\))195 2158 y Fu(Mak)o(es)g ! Fk(k)o(eymap)j Fu(the)e(curren)o(tly)h(activ)o(e)f(k)o(eymap.)1762 ! 2298 y(F)l(unction)-1861 b Fi(Keymap)20 b Fh(rl)p 293 ! 2298 V 21 w(get)p 391 2298 V 21 w(k)n(eymap)p 605 2298 ! V 20 w(b)n(y)p 685 2298 V 21 w(name)i Fg(\()p Ft(const)14 ! b(char)g(*name)p Fg(\))195 2353 y Fu(Return)i(the)h(k)o(eymap)f(matc)o (hing)h Fk(name)p Fu(.)24 b Fk(name)19 b Fu(is)e(one)g(whic)o(h)g(w)o ! (ould)g(b)q(e)h(supplied)h(in)e(a)f Ft(set)195 2408 y(keymap)e Fu(inputrc)j(line)f(\(see)g(Section)g(1.3)e([Readline)i(Init)g(File],)g ! (page)f(4\).)1762 2549 y(F)l(unction)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 2549 V 21 w(get)p 384 2549 V 21 w(k)n(eymap)p ! 598 2549 V 20 w(name)i Fg(\()p Ft(Keymap)14 b(keymap)p ! Fg(\))195 2604 y Fu(Return)i(the)h(name)g(matc)o(hing)f Fk(k)o(eymap)p Fu(.)24 b Fk(name)19 b Fu(is)e(one)g(whic)o(h)g(w)o ! (ould)g(b)q(e)h(supplied)h(in)e(a)f Ft(set)195 2659 y(keymap)e Fu(inputrc)j(line)f(\(see)g(Section)g(1.3)e([Readline)i(Init)g(File],)g ! (page)f(4\).)p eop ! %%Page: 30 32 ! 30 31 bop 75 -58 a Fu(30)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fj(2.4.3)30 b(Binding)20 b(Keys)137 244 y Fu(Key)13 ! b(sequences)g(are)e(asso)q(ciate)h(with)h(functions)f(through)g(the)g ! (k)o(eymap.)19 b(Readline)13 b(has)f(sev)o(eral)g(in-)75 ! 299 y(ternal)j(k)o(eymaps:)k Ft(emacs_standard_keymap)p Fu(,)11 b Ft(emacs_meta_keymap)p Fu(,)h Ft(emacs_ctlx_keymap)p ! Fu(,)g Ft(vi_)75 354 y(movement_keymap)p Fu(,)20 b(and)i Ft(vi_insertion_keymap)p Fu(.)35 b Ft(emacs_standard_keymap)18 ! b Fu(is)k(the)f(default,)75 408 y(and)15 b(the)h(examples)g(in)g(this)f ! (man)o(ual)h(assume)f(that.)137 474 y(Since)h Ft(readline\(\))c Fu(installs)j(a)f(set)f(of)h(default)g(k)o(ey)g(bindings)h(the)f ! (\014rst)g(time)g(it)g(is)g(called,)i(there)d(is)75 529 y(alw)o(a)o(ys)j(the)g(danger)g(that)g(a)g(custom)g(binding)i (installed)g(b)q(efore)f(the)f(\014rst)g(call)i(to)d ! Ft(readline\(\))g Fu(will)75 584 y(b)q(e)f(o)o(v)o(erridden.)19 b(An)13 b(alternate)g(mec)o(hanism)h(is)f(to)f(install)i(custom)f(k)o ! (ey)g(bindings)h(in)g(an)f(initialization)75 638 y(function)19 b(assigned)h(to)d(the)i Ft(rl_startup_hook)e Fu(v)m(ariable)j(\(see)e ! (Section)h(2.3)f([Readline)i(V)l(ariables],)75 693 y(page)15 ! b(24\).)137 759 y(These)h(functions)g(manage)e(k)o(ey)i(bindings.)1762 ! 868 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 868 ! 18 3 v 21 w(bind)p 347 868 V 21 w(k)n(ey)k Fg(\()p Ft(int)14 ! b(key,)h(rl_command_func_t)d(*function)p Fg(\))195 922 y Fu(Binds)18 b Fk(k)o(ey)i Fu(to)c Fk(function)h Fu(in)h(the)e(curren) o(tly)h(activ)o(e)g(k)o(eymap.)23 b(Returns)16 b(non-zero)h(in)g(the)g ! (case)195 977 y(of)e(an)g(in)o(v)m(alid)i Fk(k)o(ey)p ! Fu(.)1762 1086 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 1086 V 21 w(bind)p 347 1086 V 21 w(k)n(ey)p 452 1086 ! V 21 w(in)p 520 1086 V 22 w(map)h Fg(\()p Ft(int)14 b(key,)h ! (rl_command_func_t)e(*function,)283 1141 y(Keymap)h(map)p ! Fg(\))195 1196 y Fu(Bind)i Fk(k)o(ey)j Fu(to)c Fk(function)h Fu(in)g Fk(map)p Fu(.)k(Returns)14 b(non-zero)i(in)g(the)f(case)g(of)g ! (an)g(in)o(v)m(alid)j Fk(k)o(ey)p Fu(.)1762 1304 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1304 V 21 w(un)n(bind)p 409 ! 1304 V 21 w(k)n(ey)k Fg(\()p Ft(int)14 b(key)p Fg(\))195 ! 1359 y Fu(Bind)19 b Fk(k)o(ey)j Fu(to)c(the)g(n)o(ull)i(function)f(in)g ! (the)f(curren)o(tly)g(activ)o(e)h(k)o(eymap.)28 b(Returns)18 ! b(non-zero)g(in)195 1414 y(case)d(of)g(error.)1762 1523 ! y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 1523 V ! 21 w(un)n(bind)p 409 1523 V 21 w(k)n(ey)p 514 1523 V ! 21 w(in)p 582 1523 V 22 w(map)h Fg(\()p Ft(int)14 b(key,)h(Keymap)f ! (map)p Fg(\))195 1577 y Fu(Bind)i Fk(k)o(ey)j Fu(to)c(the)g(n)o(ull)i ! (function)f(in)g Fk(map)p Fu(.)k(Returns)14 b(non-zero)i(in)g(case)f ! (of)g(error.)1762 1686 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 1686 V 21 w(un)n(bind)p 409 1686 V 21 w(function)p ! 635 1686 V 21 w(in)p 703 1686 V 21 w(map)h Fg(\()p Ft ! (rl_command_func_t)13 b(*function,)283 1741 y(Keymap)h(map)p ! Fg(\))195 1796 y Fu(Un)o(bind)j(all)f(k)o(eys)f(that)f(execute)i ! Fk(function)g Fu(in)g Fk(map)p Fu(.)1762 1905 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1905 V 21 w(un)n(bind)p 409 ! 1905 V 21 w(command)p 674 1905 V 17 w(in)p 738 1905 V ! 22 w(map)h Fg(\()p Ft(const)14 b(char)h(*command,)f(Keymap)283 ! 1959 y(map)p Fg(\))195 2014 y Fu(Un)o(bind)j(all)f(k)o(eys)f(that)f ! (are)h(b)q(ound)h(to)f Fk(command)i Fu(in)f Fk(map)p ! Fu(.)1762 2123 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 2123 V 21 w(set)p 307 2123 V 20 w(k)n(ey)k Fg(\()p Ft(const)14 b(char)h(*keyseq,)f(rl_command_func_t)f(*function,)283 ! 2178 y(Keymap)h(map)p Fg(\))195 2232 y Fu(Bind)g(the)e(k)o(ey)h (sequence)h(represen)o(ted)f(b)o(y)f(the)h(string)f Fk(k)o(eyseq)i Fu(to)e(the)g(function)i Fk(function)p Fu(.)19 b(This)195 ! 2287 y(mak)o(es)13 b(new)g(k)o(eymaps)g(as)f(necessary)l(.)20 b(The)13 b(initial)j(k)o(eymap)c(in)i(whic)o(h)g(to)f(do)g(bindings)i ! (is)f Fk(map)p Fu(.)1762 2396 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 2396 V 21 w(generic)p 413 2396 V 21 w(bind)j Fg(\()p Ft(int)15 b(type,)f(const)h(char)f(*keyseq,)g(char)h(*data,)283 ! 2451 y(Keymap)f(map)p Fg(\))195 2506 y Fu(Bind)h(the)e(k)o(ey)h (sequence)h(represen)o(ted)e(b)o(y)h(the)g(string)f Fk(k)o(eyseq)i Fu(to)d(the)i(arbitrary)f(p)q(oin)o(ter)h Fk(data)p Fu(.)195 ! 2560 y Fk(t)o(yp)q(e)j Fu(sa)o(ys)c(what)h(kind)h(of)f(data)g(is)g(p)q (oin)o(ted)i(to)d(b)o(y)h Fk(data)p Fu(;)g(this)h(can)f(b)q(e)h(a)f ! (function)h(\()p Ft(ISFUNC)p Fu(\),)d(a)195 2615 y(macro)i(\()p Ft(ISMACR)p Fu(\),)f(or)h(a)h(k)o(eymap)f(\()p Ft(ISKMAP)p Fu(\).)k(This)e(mak)o(es)e(new)h(k)o(eymaps)f(as)h(necessary)l(.)20 ! b(The)195 2670 y(initial)d(k)o(eymap)e(in)h(whic)o(h)g(to)f(do)g ! (bindings)i(is)f Fk(map)p Fu(.)p eop ! %%Page: 31 33 ! 31 32 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(31)1762 149 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 149 18 3 v 21 w(parse)p 369 149 V 19 w(and)p ! 480 149 V 21 w(bind)j Fg(\()p Ft(char)14 b(*line)p Fg(\))195 ! 204 y Fu(P)o(arse)g Fk(line)19 b Fu(as)14 b(if)h(it)g(had)g(b)q(een)h ! (read)f(from)f(the)g Ft(inputrc)g Fu(\014le)i(and)f(p)q(erform)f(an)o ! (y)h(k)o(ey)f(bindings)195 259 y(and)h(v)m(ariable)i(assignmen)o(ts)e ! (found)h(\(see)f(Section)h(1.3)e([Readline)i(Init)g(File],)g(page)f ! (4\).)1762 359 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 359 V 21 w(read)p 346 359 V 20 w(init)p 450 359 V ! 22 w(\014le)k Fg(\()p Ft(const)14 b(char)h(*filename)p ! Fg(\))195 414 y Fu(Read)g(k)o(eybindings)j(and)e(v)m(ariable)h ! (assignmen)o(ts)f(from)f Fk(\014lename)k Fu(\(see)d(Section)g(1.3)f ! ([Readline)195 469 y(Init)h(File],)g(page)f(4\).)75 571 ! y Fj(2.4.4)30 b(Asso)r(ciating)20 b(F)-5 b(unction)20 ! b(Names)h(and)f(Bindings)137 664 y Fu(These)11 b(functions)h(allo)o(w)e ! (y)o(ou)h(to)f(\014nd)h(out)f(what)g(k)o(eys)h(in)o(v)o(ok)o(e)f(named) ! h(functions)h(and)e(the)h(functions)75 718 y(in)o(v)o(ok)o(ed)j(b)o(y)g ! (a)f(particular)h(k)o(ey)g(sequence.)21 b(Y)l(ou)14 b(ma)o(y)f(also)g ! (asso)q(ciate)h(a)g(new)g(function)g(name)g(with)g(an)75 ! 773 y(arbitrary)h(function.)1762 873 y(F)l(unction)-1861 ! b Fi(rl_command_func_t)22 b(*)d Fh(rl)p 626 873 V 21 ! w(named)p 814 873 V 19 w(function)k Fg(\()p Ft(const)14 ! b(char)h(*name)p Fg(\))195 928 y Fu(Return)g(the)g(function)h(with)g ! (name)f Fk(name)p Fu(.)1762 1028 y(F)l(unction)-1861 ! b Fi(rl_command_func_t)22 b(*)d Fh(rl)p 626 1028 V 21 ! w(function)p 852 1028 V 21 w(of)p 920 1028 V 20 w(k)n(eyseq)24 ! b Fg(\()p Ft(const)14 b(char)283 1083 y(*keyseq,)g(Keymap)g(map,)h(int) ! f(*type)p Fg(\))195 1138 y Fu(Return)i(the)g(function)h(in)o(v)o(ok)o ! (ed)g(b)o(y)f Fk(k)o(eyseq)h Fu(in)g(k)o(eymap)f Fk(map)p ! Fu(.)23 b(If)17 b Fk(map)g Fu(is)g Ft(NULL)p Fu(,)f(the)g(curren)o(t) ! 195 1193 y(k)o(eymap)i(is)h(used.)31 b(If)18 b Fk(t)o(yp)q(e)j Fu(is)e(not)g Ft(NULL)p Fu(,)f(the)g(t)o(yp)q(e)h(of)f(the)h(ob)s(ject) ! f(is)h(returned)g(in)g(the)f Ft(int)195 1247 y Fu(v)m(ariable)f(it)e(p) ! q(oin)o(ts)h(to)e(\(one)h(of)g Ft(ISFUNC)p Fu(,)f Ft(ISKMAP)p ! Fu(,)g(or)h Ft(ISMACR)p Fu(\).)1762 1347 y(F)l(unction)-1861 ! b Fi(char)20 b(**)f Fh(rl)p 312 1347 V 21 w(in)n(v)n(oking)p ! 541 1347 V 23 w(k)n(eyseqs)k Fg(\()p Ft(rl_command_func_t)13 ! b(*function)p Fg(\))195 1402 y Fu(Return)i(an)h(arra)o(y)e(of)h ! (strings)h(represen)o(ting)g(the)g(k)o(ey)f(sequences)i(used)f(to)f(in) ! o(v)o(ok)o(e)h Fk(function)g Fu(in)195 1457 y(the)f(curren)o(t)g(k)o ! (eymap.)1762 1557 y(F)l(unction)-1861 b Fi(char)20 b(**)f ! Fh(rl)p 312 1557 V 21 w(in)n(v)n(oking)p 541 1557 V 23 ! w(k)n(eyseqs)p 750 1557 V 21 w(in)p 818 1557 V 22 w(map)i ! Fg(\()p Ft(rl_command_func_t)283 1612 y(*function,)13 ! b(Keymap)i(map)p Fg(\))195 1667 y Fu(Return)g(an)h(arra)o(y)e(of)h ! (strings)h(represen)o(ting)g(the)g(k)o(ey)f(sequences)i(used)f(to)f(in) ! o(v)o(ok)o(e)h Fk(function)g Fu(in)195 1722 y(the)f(k)o(eymap)g ! Fk(map)p Fu(.)1762 1822 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 1822 V 21 w(function)p 467 1822 V 21 w(dump)r(er)g ! Fg(\()p Ft(int)15 b(readable)p Fg(\))195 1876 y Fu(Prin)o(t)g(the)f ! (readline)j(function)e(names)g(and)f(the)h(k)o(ey)g(sequences)g(curren) ! o(tly)g(b)q(ound)h(to)e(them)h(to)195 1931 y Ft(rl_outstream)p ! Fu(.)j(If)c Fk(readable)j Fu(is)d(non-zero,)g(the)g(list)g(is)h ! (formatted)d(in)j(suc)o(h)f(a)f(w)o(a)o(y)g(that)g(it)h(can)195 ! 1986 y(b)q(e)i(made)f(part)g(of)f(an)i Ft(inputrc)e Fu(\014le)i(and)f ! (re-read.)1762 2086 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 2086 V 21 w(list)p 337 2086 V 22 w(funmap)p ! 550 2086 V 18 w(names)h Fg(\()p Ft(void)p Fg(\))195 2141 ! y Fu(Prin)o(t)15 b(the)g(names)h(of)e(all)j(bindable)g(Readline)f ! (functions)g(to)f Ft(rl_outstream)p Fu(.)1762 2241 y(F)l(unction)-1861 ! b Fi(const)20 b(char)g(**)f Fh(rl)p 462 2241 V 21 w(funmap)p ! 674 2241 V 18 w(names)i Fg(\()p Ft(void)p Fg(\))195 2296 y Fu(Return)13 b(a)f(NULL)i(terminated)g(arra)o(y)d(of)i(kno)o(wn)g (function)g(names.)20 b(The)13 b(arra)o(y)f(is)h(sorted.)19 ! b(The)195 2351 y(arra)o(y)11 b(itself)j(is)f(allo)q(cated,)h(but)f(not) f(the)h(strings)f(inside.)21 b(Y)l(ou)13 b(should)h Ft(free\(\))d ! Fu(the)i(arra)o(y)e(when)195 2405 y(y)o(ou)k(are)g(done,)g(but)g(not)g ! (the)g(p)q(oin)o(ters.)1762 2506 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2506 V 21 w(add)p 328 2506 ! V 20 w(funmap)p 539 2506 V 18 w(en)n(try)j Fg(\()p Ft(const)14 ! b(char)h(*name,)f(rl_command_func_t)283 2560 y(*function)p ! Fg(\))195 2615 y Fu(Add)j Fk(name)i Fu(to)d(the)g(list)h(of)f(bindable) j(Readline)f(command)e(names,)g(and)h(mak)o(e)f Fk(function)h ! Fu(the)195 2670 y(function)f(to)f(b)q(e)g(called)i(when)f ! Fk(name)i Fu(is)d(in)o(v)o(ok)o(ed.)p eop ! %%Page: 32 34 ! 32 33 bop 75 -58 a Fu(32)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fj(2.4.5)30 b(Allo)n(wing)21 b(Undoing)137 251 ! y Fu(Supp)q(orting)14 b(the)g(undo)f(command)g(is)h(a)f(painless)h ! (thing,)g(and)f(mak)o(es)g(y)o(our)f(functions)i(m)o(uc)o(h)f(more)75 ! 306 y(useful.)21 b(It)15 b(is)h(certainly)g(easy)f(to)g(try)f ! (something)i(if)f(y)o(ou)g(kno)o(w)g(y)o(ou)g(can)g(undo)h(it.)137 ! 378 y(If)21 b(y)o(our)f(function)h(simply)h(inserts)f(text)e(once,)j ! (or)e(deletes)h(text)f(once,)i(and)f(uses)f Ft(rl_insert_)75 ! 433 y(text\(\))13 b Fu(or)h Ft(rl_delete_text\(\))d Fu(to)j(do)f(it,)h ! (then)h(undoing)g(is)f(already)g(done)h(for)e(y)o(ou)h(automatically)l ! (.)137 506 y(If)d(y)o(ou)f(do)g(m)o(ultiple)i(insertions)f(or)f(m)o ! (ultiple)i(deletions,)g(or)e(an)o(y)g(com)o(bination)h(of)f(these)g(op) ! q(erations,)75 560 y(y)o(ou)19 b(should)h(group)e(them)h(together)g(in) o(to)g(one)g(op)q(eration.)31 b(This)20 b(is)f(done)h(with)f ! Ft(rl_begin_undo_)75 615 y(group\(\))14 b Fu(and)i Ft ! (rl_end_undo_group\(\))p Fu(.)137 688 y(The)g(t)o(yp)q(es)f(of)g(ev)o ! (en)o(ts)g(that)f(can)h(b)q(e)h(undone)g(are:)195 757 y Ft(enum)23 b(undo_code)g({)h(UNDO_DELETE,)e(UNDO_INSERT,)g ! (UNDO_BEGIN,)g(UNDO_END)h(};)137 830 y Fu(Notice)16 b(that)e ! Ft(UNDO_DELETE)g Fu(means)h(to)g(insert)g(some)g(text,)f(and)i ! Ft(UNDO_INSERT)d Fu(means)i(to)g(delete)75 885 y(some)e(text.)19 b(That)14 b(is,)g(the)g(undo)g(co)q(de)g(tells)h(what)e(to)h(undo,)g (not)f(ho)o(w)g(to)g(undo)i(it.)k Ft(UNDO_BEGIN)13 b ! Fu(and)75 939 y Ft(UNDO_END)h Fu(are)h(tags)f(added)i(b)o(y)f Ft(rl_begin_undo_group\(\))d Fu(and)k Ft(rl_end_undo_group\(\))p ! Fu(.)1762 1072 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 1072 18 3 v 21 w(b)r(egin)p 372 1072 V 20 w(undo)p ! 517 1072 V 20 w(group)h Fg(\()p Ft(void)p Fg(\))195 1127 ! y Fu(Begins)16 b(sa)o(ving)g(undo)g(information)f(in)i(a)e(group)g ! (construct.)20 b(The)c(undo)g(information)g(usually)195 ! 1182 y(comes)21 b(from)f(calls)i(to)e Ft(rl_insert_text\(\))e ! Fu(and)j Ft(rl_delete_text\(\))p Fu(,)f(but)h(could)g(b)q(e)h(the)195 ! 1237 y(result)16 b(of)e(calls)j(to)d Ft(rl_add_undo\(\))p ! Fu(.)1762 1370 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 1370 V 21 w(end)p 326 1370 V 20 w(undo)p 471 1370 ! V 20 w(group)h Fg(\()p Ft(void)p Fg(\))195 1424 y Fu(Closes)15 b(the)f(curren)o(t)h(undo)g(group)f(started)g(with)g Ft(rl_begin_undo_group)f(\(\))p Fu(.)19 b(There)c(should)195 ! 1479 y(b)q(e)h(one)f(call)i(to)d Ft(rl_end_undo_group\(\))f Fu(for)h(eac)o(h)h(call)i(to)d Ft(rl_begin_undo_group\(\))p ! Fu(.)1762 1612 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p ! 241 1612 V 21 w(add)p 354 1612 V 20 w(undo)i Fg(\()p ! Ft(enum)14 b(undo_code)g(what,)g(int)h(start,)g(int)f(end,)h(char)283 ! 1667 y(*text)p Fg(\))195 1722 y Fu(Remem)o(b)q(er)i(ho)o(w)f(to)h(undo) ! g(an)g(ev)o(en)o(t)g(\(according)g(to)g Fk(what)q Fu(\).)24 ! b(The)17 b(a\013ected)g(text)f(runs)i(from)195 1776 y Fk(start)d Fu(to)g Fk(end)p Fu(,)g(and)g(encompasses)h ! Fk(text)p Fu(.)1762 1909 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 1909 V 21 w(free)p 356 1909 V 20 w(undo)p ! 501 1909 V 20 w(list)k Fg(\()p Ft(void)p Fg(\))195 1964 y Fu(F)l(ree)15 b(the)h(existing)g(undo)f(list.)1762 ! 2097 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2097 ! V 21 w(do)p 297 2097 V 20 w(undo)i Fg(\()p Ft(void)p ! Fg(\))195 2152 y Fu(Undo)12 b(the)f(\014rst)g(thing)h(on)g(the)f(undo)h (list.)19 b(Returns)11 b Ft(0)h Fu(if)g(there)f(w)o(as)g(nothing)h(to)e ! (undo,)j(non-zero)195 2206 y(if)j(something)f(w)o(as)f(undone.)137 ! 2309 y(Finally)l(,)j(if)f(y)o(ou)f(neither)i(insert)f(nor)f(delete)i (text,)e(but)g(directly)i(mo)q(dify)f(the)g(existing)g(text)g(\(e.g.,) ! 75 2364 y(c)o(hange)j(its)h(case\),)g(call)g Ft(rl_modifying\(\))e Fu(once,)i(just)f(b)q(efore)h(y)o(ou)f(mo)q(dify)h(the)f(text.)32 ! b(Y)l(ou)20 b(m)o(ust)75 2419 y(supply)c(the)g(indices)h(of)e(the)g (text)g(range)g(that)f(y)o(ou)h(are)g(going)g(to)g(mo)q(dify)l(.)1762 ! 2552 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2552 V 21 w(mo)r(difying)h Fg(\()p Ft(int)15 b(start,)f(int)h(end)p ! Fg(\))195 2606 y Fu(T)l(ell)22 b(Readline)f(to)e(sa)o(v)o(e)h(the)g (text)g(b)q(et)o(w)o(een)g Fk(start)g Fu(and)g Fk(end)j Fu(as)c(a)h(single)h(undo)g(unit.)35 b(It)20 b(is)195 ! 2661 y(assumed)15 b(that)g(y)o(ou)g(will)i(subsequen)o(tly)f(mo)q(dify) ! g(that)e(text.)p eop ! %%Page: 33 35 ! 33 34 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(33)75 149 y Fj(2.4.6)30 b(Redispla)n(y)1762 ! 302 y Fu(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 ! 302 18 3 v 21 w(redispla)n(y)k Fg(\()p Ft(void)p Fg(\))195 ! 356 y Fu(Change)19 b(what's)f(displa)o(y)o(ed)i(on)f(the)g(screen)g(to) ! f(re\015ect)i(the)f(curren)o(t)f(con)o(ten)o(ts)h(of)f ! Ft(rl_line_)195 411 y(buffer)p Fu(.)1762 534 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 534 V 21 w(forced)p 390 534 ! V 20 w(up)r(date)p 584 534 V 20 w(displa)n(y)k Fg(\()p ! Ft(void)p Fg(\))195 589 y Fu(F)l(orce)c(the)g(line)h(to)e(b)q(e)i(up)q (dated)f(and)g(redispla)o(y)o(ed,)i(whether)e(or)g(not)f(Readline)i ! (thinks)g(the)195 644 y(screen)16 b(displa)o(y)g(is)g(correct.)1762 ! 767 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 767 ! V 21 w(on)p 297 767 V 20 w(new)p 416 767 V 21 w(line)k ! Fg(\()p Ft(void)p Fg(\))195 822 y Fu(T)l(ell)16 b(the)f(up)q(date)h (functions)g(that)e(w)o(e)g(ha)o(v)o(e)h(mo)o(v)o(ed)f(on)o(to)g(a)h ! (new)g(\(empt)o(y\))f(line,)i(usually)h(after)195 877 ! y(ouputting)f(a)e(newline.)1762 1000 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1000 V 21 w(on)p 297 1000 V ! 20 w(new)p 416 1000 V 21 w(line)p 525 1000 V 22 w(with)p ! 657 1000 V 22 w(prompt)h Fg(\()p Ft(void)p Fg(\))195 ! 1055 y Fu(T)l(ell)14 b(the)e(up)q(date)h(functions)g(that)f(w)o(e)g(ha) o(v)o(e)g(mo)o(v)o(ed)f(on)o(to)h(a)g(new)g(line,)i(with)f ! Fk(rl)p 1556 1055 14 2 v 17 w(prompt)g Fu(already)195 ! 1109 y(displa)o(y)o(ed.)21 b(This)15 b(could)g(b)q(e)g(used)g(b)o(y)f (applications)i(that)e(w)o(an)o(t)f(to)h(output)g(the)g(prompt)g ! (string)195 1164 y(themselv)o(es,)g(but)g(still)h(need)g(Readline)g(to) e(kno)o(w)g(the)h(prompt)f(string)h(length)g(for)f(redispla)o(y)l(.)21 ! b(It)195 1219 y(should)16 b(b)q(e)g(used)g(after)e(setting)i ! Fk(rl)p 795 1219 V 16 w(already)p 956 1219 V 17 w(prompted)p ! Fu(.)1762 1342 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 1342 18 3 v 21 w(reset)p 357 1342 V 20 w(line)p 465 ! 1342 V 23 w(state)j Fg(\()p Ft(void)p Fg(\))195 1397 y Fu(Reset)17 b(the)g(displa)o(y)i(state)d(to)h(a)g(clean)h(state)f (and)g(redispla)o(y)i(the)e(curren)o(t)g(line)i(starting)e(on)g(a)195 ! 1452 y(new)e(line.)1762 1575 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 1575 V 21 w(crlf)j Fg(\()p Ft(void)p Fg(\))195 ! 1630 y Fu(Mo)o(v)o(e)14 b(the)h(cursor)g(to)g(the)g(start)f(of)h(the)g ! (next)g(screen)h(line.)1762 1753 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1753 V 21 w(sho)n(w)p 359 1753 ! V 20 w(c)n(har)j Fg(\()p Ft(int)14 b(c)p Fg(\))195 1807 y Fu(Displa)o(y)j(c)o(haracter)e Fk(c)20 b Fu(on)c Ft(rl_outstream)p Fu(.)21 b(If)c(Readline)g(has)f(not)g(b)q(een)i(set)e(to)f(displa)o(y)j ! (meta)195 1862 y(c)o(haracters)12 b(directly)l(,)j(this)e(will)i(con)o (v)o(ert)d(meta)h(c)o(haracters)f(to)g(a)h(meta-pre\014xed)g(k)o(ey)g ! (sequence.)195 1917 y(This)j(is)f(in)o(tended)i(for)e(use)g(b)o(y)g (applications)i(whic)o(h)f(wish)g(to)f(do)g(their)g(o)o(wn)g(redispla)o ! (y)l(.)1762 2040 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 2040 V 21 w(message)g Fg(\()p Ft(const)14 b(char)h(*,)g(...)p ! Fg(\))195 2095 y Fu(The)c(argumen)o(ts)e(are)h(a)g(format)f(string)h ! (as)g(w)o(ould)h(b)q(e)g(supplied)i(to)c Ft(printf)p ! Fu(,)h(p)q(ossibly)i(con)o(taining)195 2150 y(con)o(v)o(ersion)22 ! b(sp)q(eci\014cations)i(suc)o(h)f(as)e(`)p Ft(\045d)p ! Fu(',)i(and)f(an)o(y)g(additional)h(argumen)o(ts)e(necessary)i(to)195 ! 2205 y(satisfy)d(the)h(con)o(v)o(ersion)g(sp)q(eci\014cations.)38 ! b(The)21 b(resulting)h(string)e(is)i(displa)o(y)o(ed)g(in)f(the)g ! Fk(ec)o(ho)195 2259 y(area)p Fu(.)e(The)d(ec)o(ho)f(area)g(is)g(also)g ! (used)h(to)f(displa)o(y)h(n)o(umeric)g(argumen)o(ts)f(and)g(searc)o(h)g ! (strings.)1762 2382 y(F)l(unction)-1861 b Fi(int)20 b ! Fh(rl)p 215 2382 V 21 w(clear)p 354 2382 V 21 w(message)h ! Fg(\()p Ft(void)p Fg(\))195 2437 y Fu(Clear)15 b(the)h(message)e(in)i ! (the)g(ec)o(ho)f(area.)1762 2560 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 2560 V 21 w(sa)n(v)n(e)p 365 ! 2560 V 21 w(prompt)h Fg(\()p Ft(void)p Fg(\))195 2615 ! y Fu(Sa)o(v)o(e)g(the)h(lo)q(cal)g(Readline)h(prompt)e(displa)o(y)i ! (state)e(in)h(preparation)f(for)g(displa)o(ying)j(a)d(new)195 ! 2670 y(message)15 b(in)h(the)f(message)g(area)f(with)i ! Ft(rl_message\(\))p Fu(.)p eop ! %%Page: 34 36 ! 34 35 bop 75 -58 a Fu(34)1299 b(GNU)15 b(Readline)h(Library)1762 ! 149 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 149 ! 18 3 v 21 w(restore)p 436 149 V 20 w(prompt)g Fg(\()p ! Ft(void)p Fg(\))195 204 y Fu(Restore)g(the)i(lo)q(cal)g(Readline)h ! (prompt)e(displa)o(y)h(state)f(sa)o(v)o(ed)g(b)o(y)g(the)g(most)g ! (recen)o(t)g(call)i(to)195 259 y Ft(rl_save_prompt)p ! Fu(.)1762 369 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 369 V 21 w(expand)p 416 369 V 20 w(prompt)h Fg(\()p ! Ft(char)14 b(*prompt)p Fg(\))195 423 y Fu(Expand)22 b(an)o(y)f(sp)q ! (ecial)i(c)o(haracter)e(sequences)h(in)g Fk(prompt)g ! Fu(and)g(set)f(up)h(the)f(lo)q(cal)i(Readline)195 478 ! y(prompt)17 b(redispla)o(y)i(v)m(ariables.)30 b(This)18 b(function)h(is)f(called)i(b)o(y)e Ft(readline\(\))p ! Fu(.)26 b(It)18 b(ma)o(y)f(also)h(b)q(e)195 533 y(called)12 b(to)e(expand)h(the)g(primary)g(prompt)f(if)h(the)f Ft ! (rl_on_new_line_with_prompt\(\))d Fu(function)195 588 y(or)12 b Ft(rl_already_prompted)e Fu(v)m(ariable)k(is)g(used.)19 b(It)13 b(returns)g(the)f(n)o(um)o(b)q(er)i(of)e(visible)j(c)o ! (haracters)195 643 y(on)g(the)g(last)h(line)g(of)f(the)g(\(p)q(ossibly) ! i(m)o(ulti-line\))g(prompt.)1762 752 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 752 V 21 w(set)p 307 752 V ! 20 w(prompt)h Fg(\()p Ft(const)14 b(char)h(*prompt)p ! Fg(\))195 807 y Fu(Mak)o(e)e(Readline)i(use)e Fk(prompt)h Fu(for)f(subsequen)o(t)h(redispla)o(y)l(.)21 b(This)14 ! b(calls)g Ft(rl_expand_prompt\(\))195 862 y Fu(to)h(expand)g(the)h (prompt)e(and)i(sets)f Ft(rl_prompt)f Fu(to)g(the)h(result.)75 ! 970 y Fj(2.4.7)30 b(Mo)r(difying)20 b(T)-5 b(ext)1762 ! 1108 y Fu(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 ! 1108 V 21 w(insert)p 378 1108 V 21 w(text)k Fg(\()p Ft(const)14 ! b(char)g(*text)p Fg(\))195 1163 y Fu(Insert)i Fk(text)g ! Fu(in)o(to)g(the)g(line)h(at)f(the)g(curren)o(t)f(cursor)h(p)q ! (osition.)22 b(Returns)16 b(the)g(n)o(um)o(b)q(er)g(of)f(c)o(har-)195 ! 1218 y(acters)g(inserted.)1762 1328 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1328 V 21 w(delete)p 383 1328 ! V 22 w(text)k Fg(\()p Ft(int)14 b(start,)h(int)f(end)p ! Fg(\))195 1382 y Fu(Delete)19 b(the)g(text)g(b)q(et)o(w)o(een)g ! Fk(start)g Fu(and)g Fk(end)i Fu(in)f(the)f(curren)o(t)f(line.)33 ! b(Returns)18 b(the)h(n)o(um)o(b)q(er)g(of)195 1437 y(c)o(haracters)14 ! b(deleted.)1762 1547 y(F)l(unction)-1861 b Fi(char)20 ! b(*)f Fh(rl)p 286 1547 V 21 w(cop)n(y)p 421 1547 V 21 ! w(text)24 b Fg(\()p Ft(int)14 b(start,)h(int)g(end)p ! Fg(\))195 1602 y Fu(Return)g(a)g(cop)o(y)g(of)g(the)g(text)f(b)q(et)o ! (w)o(een)i Fk(start)f Fu(and)g Fk(end)j Fu(in)e(the)f(curren)o(t)g ! (line.)1762 1711 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 1711 V 21 w(kill)p 311 1711 V 23 w(text)k Fg(\()p ! Ft(int)14 b(start,)h(int)g(end)p Fg(\))195 1766 y Fu(Cop)o(y)i(the)g ! (text)f(b)q(et)o(w)o(een)i Fk(start)f Fu(and)g Fk(end)i ! Fu(in)f(the)f(curren)o(t)g(line)i(to)e(the)g(kill)i(ring,)e(app)q ! (ending)195 1821 y(or)f(prep)q(ending)k(to)c(the)h(last)g(kill)i(if)e ! (the)g(last)g(command)g(w)o(as)f(a)h(kill)i(command.)25 ! b(The)17 b(text)f(is)195 1876 y(deleted.)26 b(If)17 b ! Fk(start)g Fu(is)g(less)g(than)g Fk(end)p Fu(,)g(the)g(text)g(is)g(app) ! q(ended,)h(otherwise)f(prep)q(ended.)27 b(If)17 b(the)195 ! 1930 y(last)e(command)g(w)o(as)g(not)f(a)h(kill,)i(a)e(new)g(kill)i ! (ring)f(slot)f(is)h(used.)1762 2040 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2040 V 21 w(push)p 355 2040 ! V 19 w(macro)p 529 2040 V 19 w(input)k Fg(\()p Ft(char)14 ! b(*macro)p Fg(\))195 2095 y Fu(Cause)g Fk(macro)i Fu(to)d(b)q(e)i ! (inserted)g(in)o(to)f(the)g(line,)i(as)e(if)g(it)h(had)f(b)q(een)h(in)o ! (v)o(ok)o(ed)g(b)o(y)f(a)g(k)o(ey)g(b)q(ound)h(to)195 ! 2150 y(a)g(macro.)k(Not)c(esp)q(ecially)i(useful;)f(use)g ! Ft(rl_insert_text\(\))d Fu(instead.)75 2257 y Fj(2.4.8)30 ! b(Character)21 b(Input)1762 2396 y Fu(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2396 V 21 w(read)p 346 2396 ! V 20 w(k)n(ey)k Fg(\()p Ft(void)p Fg(\))195 2451 y Fu(Return)14 b(the)h(next)g(c)o(haracter)f(a)o(v)m(ailable)i(from)e(Readline's)i ! (curren)o(t)f(input)g(stream.)k(This)d(han-)195 2506 y(dles)f(input)g(inserted)f(in)o(to)g(the)g(input)h(stream)e(via)h ! Fk(rl)p 1117 2506 14 2 v 17 w(p)q(ending)p 1290 2506 V 18 w(input)i Fu(\(see)e(Section)h(2.3)e([Read-)195 ! 2560 y(line)21 b(V)l(ariables],)g(page)f(24\))f(and)h Ft(rl_stuff_char\(\))p Fu(,)e(macros,)h(and)h(c)o(haracters)f(read)h ! (from)195 2615 y(the)d(k)o(eyb)q(oard.)25 b(While)19 b(w)o(aiting)e(for)f(input,)j(this)e(function)h(will)h(call)f(an)o(y)e ! (function)i(assigned)195 2670 y(to)d(the)g Ft(rl_event_hook)e ! Fu(v)m(ariable.)p eop ! %%Page: 35 37 ! 35 36 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(35)1762 149 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 149 18 3 v 21 w(getc)j Fg(\()p Ft(FILE)14 ! b(*stream)p Fg(\))195 204 y Fu(Return)c(the)h(next)g(c)o(haracter)f(a)o ! (v)m(ailable)i(from)e Fk(stream)p Fu(,)g(whic)o(h)i(is)f(assumed)f(to)g ! (b)q(e)i(the)e(k)o(eyb)q(oard.)1762 342 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 342 V 21 w(stu\013)p 346 342 ! V 20 w(c)n(har)j Fg(\()p Ft(int)15 b(c)p Fg(\))195 397 y Fu(Insert)i Fk(c)i Fu(in)o(to)d(the)h(Readline)h(input)f(stream.)23 b(It)16 b(will)i(b)q(e)f Ft(")p Fu(read)p Ft(")g Fu(b)q(efore)f ! (Readline)i(attempts)195 452 y(to)13 b(read)g(c)o(haracters)g(from)f ! (the)i(terminal)g(with)g Ft(rl_read_key\(\))p Fu(.)j(Up)d(to)f(512)f(c) ! o(haracters)h(ma)o(y)195 507 y(b)q(e)j(pushed)g(bac)o(k.)k ! Ft(rl_stuff_char)14 b Fu(returns)h(1)g(if)h(the)f(c)o(haracter)g(w)o ! (as)f(successfully)j(inserted;)195 562 y(0)e(otherwise.)1762 ! 700 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 700 ! V 21 w(execute)p 423 700 V 22 w(next)j Fg(\()p Ft(int)15 ! b(c)p Fg(\))195 754 y Fu(Mak)o(e)i Fk(c)k Fu(b)q(e)d(the)g(next)g (command)g(to)f(b)q(e)i(executed)f(when)h Ft(rl_read_key\(\))d ! Fu(is)i(called.)29 b(This)195 809 y(sets)15 b Fk(rl)p ! 317 809 14 2 v 17 w(p)q(ending)p 490 809 V 18 w(input)p ! Fu(.)1762 947 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 947 18 3 v 21 w(clear)p 354 947 V 21 w(p)r(ending)p ! 575 947 V 21 w(input)j Fg(\()p Ft(void)p Fg(\))195 1002 ! y Fu(Unset)f Fk(rl)p 365 1002 14 2 v 16 w(p)q(ending)p ! 537 1002 V 19 w(input)p Fu(,)h(e\013ectiv)o(ely)g(negating)e(the)h (e\013ect)f(of)g(an)o(y)h(previous)g(call)h(to)d Ft(rl_)195 ! 1057 y(execute_next\(\))p Fu(.)29 b(This)19 b(w)o(orks)f(only)h(if)h (the)e(p)q(ending)j(input)f(has)f(not)f(already)h(b)q(een)h(read)195 ! 1112 y(with)c Ft(rl_read_key\(\))p Fu(.)1762 1250 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1250 18 3 v 21 w(set)p 307 ! 1250 V 20 w(k)n(eyb)r(oard)p 558 1250 V 21 w(input)p ! 712 1250 V 21 w(timeout)i Fg(\()p Ft(int)15 b(u)p Fg(\))195 ! 1305 y Fu(While)21 b(w)o(aiting)g(for)e(k)o(eyb)q(oard)h(input)h(in)g Ft(rl_read_key\(\))p Fu(,)e(Readline)i(will)h(w)o(ait)e(for)f ! Fk(u)h Fu(mi-)195 1360 y(croseconds)h(for)e(input)j(b)q(efore)f (calling)h(an)o(y)e(function)h(assigned)g(to)f Ft(rl_event_hook)p ! Fu(.)34 b(The)195 1414 y(default)16 b(w)o(aiting)f(p)q(erio)q(d)i(is)e (one-ten)o(th)h(of)e(a)h(second.)21 b(Returns)14 b(the)i(old)f(timeout) ! h(v)m(alue.)75 1540 y Fj(2.4.9)30 b(T)-5 b(erminal)20 ! b(Managemen)n(t)1762 1708 y Fu(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 1708 V 21 w(prep)p 376 1708 V 20 w(terminal)j ! Fg(\()p Ft(int)14 b(meta_flag)p Fg(\))195 1762 y Fu(Mo)q(dify)22 b(the)f(terminal)h(settings)f(for)g(Readline's)h(use,)h(so)d ! Ft(readline\(\))g Fu(can)i(read)f(a)g(single)195 1817 y(c)o(haracter)15 b(at)g(a)g(time)i(from)d(the)i(k)o(eyb)q(oard.)22 ! b(The)16 b Fk(meta)p 1192 1817 14 2 v 15 w(\015ag)k Fu(argumen)o(t)15 ! b(should)h(b)q(e)h(non-zero)195 1872 y(if)f(Readline)g(should)g(read)f ! (eigh)o(t-bit)i(input.)1762 2010 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 2010 18 3 v 21 w(deprep)p ! 434 2010 V 20 w(terminal)j Fg(\()p Ft(void)p Fg(\))195 ! 2065 y Fu(Undo)16 b(the)g(e\013ects)f(of)h Ft(rl_prep_terminal\(\))p Fu(,)d(lea)o(ving)k(the)e(terminal)i(in)g(the)e(state)g(in)i(whic)o(h) ! 195 2120 y(it)e(w)o(as)g(b)q(efore)g(the)h(most)e(recen)o(t)h(call)i ! (to)d Ft(rl_prep_terminal\(\))p Fu(.)1762 2258 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 2258 V 21 w(tt)n(y)p 334 2258 ! V 22 w(set)p 427 2258 V 20 w(default)p 620 2258 V 21 ! w(bindings)k Fg(\()p Ft(Keymap)14 b(kmap)p Fg(\))195 ! 2313 y Fu(Read)k(the)h(op)q(erating)f(system's)g(terminal)h(editing)h ! (c)o(haracters)e(\(as)f(w)o(ould)i(b)q(e)g(displa)o(y)o(ed)h(b)o(y)195 ! 2367 y Ft(stty)p Fu(\))14 b(to)h(their)h(Readline)g(equiv)m(alen)o(ts.) ! 22 b(The)15 b(bindings)i(are)e(p)q(erformed)g(in)h Fk(kmap)p ! Fu(.)1762 2506 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 2506 V 21 w(reset)p 357 2506 V 20 w(terminal)j Fg(\()p ! Ft(const)15 b(char)f(*terminal_name)p Fg(\))195 2560 y Fu(Reinitialize)h(Readline's)e(idea)g(of)f(the)g(terminal)h(settings) ! g(using)g Fk(terminal)p 1491 2560 14 2 v 17 w(name)h ! Fu(as)e(the)h(termi-)195 2615 y(nal)k(t)o(yp)q(e)f(\(e.g.,)f ! Ft(vt100)p Fu(\).)21 b(If)c Fk(terminal)p 878 2615 V 17 w(name)i Fu(is)d Ft(NULL)p Fu(,)g(the)g(v)m(alue)h(of)f(the)g ! Ft(TERM)g Fu(en)o(vironmen)o(t)195 2670 y(v)m(ariable)h(is)e(used.)p ! eop ! %%Page: 36 38 ! 36 37 bop 75 -58 a Fu(36)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fj(2.4.10)29 b(Utilit)n(y)22 b(F)-5 b(unctions)1762 ! 287 y Fu(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 ! 287 18 3 v 21 w(replace)p 438 287 V 22 w(line)k Fg(\()p ! Ft(const)14 b(char)h(*text,)f(int)h(clear_undo)p Fg(\))195 ! 342 y Fu(Replace)20 b(the)g(con)o(ten)o(ts)f(of)g Ft(rl_line_buffer)f ! Fu(with)i Fk(text)p Fu(.)33 b(The)20 b(p)q(oin)o(t)g(and)g(mark)f(are)h ! (pre-)195 397 y(serv)o(ed,)13 b(if)h(p)q(ossible.)21 ! b(If)13 b Fk(clear)p 712 397 14 2 v 17 w(undo)j Fu(is)d(non-zero,)h ! (the)f(undo)g(list)h(asso)q(ciated)g(with)f(the)g(curren)o(t)195 ! 452 y(line)k(is)f(cleared.)1762 561 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 561 18 3 v 21 w(extend)p 404 ! 561 V 21 w(line)p 513 561 V 22 w(bu\013er)j Fg(\()p Ft(int)15 ! b(len)p Fg(\))195 616 y Fu(Ensure)g(that)g Ft(rl_line_buffer)e ! Fu(has)i(enough)g(space)h(to)e(hold)i Fk(len)g Fu(c)o(haracters,)e(p)q ! (ossibly)i(real-)195 670 y(lo)q(cating)g(it)f(if)h(necessary)l(.)1762 ! 779 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 779 ! V 21 w(initiali)q(z)q(e)26 b Fg(\()p Ft(void)p Fg(\))195 ! 834 y Fu(Initialize)21 b(or)d(re-initialize)k(Readline's)d(in)o(ternal) ! h(state.)28 b(It's)18 b(not)g(strictly)h(necessary)g(to)f(call)195 ! 889 y(this;)d Ft(readline\(\))f Fu(calls)i(it)g(b)q(efore)f(reading)h ! (an)o(y)f(input.)1762 998 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 998 V 21 w(ding)j Fg(\()p Ft(void)p Fg(\))195 ! 1053 y Fu(Ring)15 b(the)g(terminal)h(b)q(ell,)h(ob)q(eying)f(the)g ! (setting)f(of)g Ft(bell-style)p Fu(.)1762 1162 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1162 V 21 w(alphab)r(etic)k ! Fg(\()p Ft(int)14 b(c)p Fg(\))195 1217 y Fu(Return)h(1)g(if)g ! Fk(c)j Fu(is)e(an)f(alphab)q(etic)i(c)o(haracter.)1762 ! 1325 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 1325 ! V 21 w(displa)n(y)p 435 1325 V 22 w(matc)n(h)p 611 1325 ! V 20 w(list)25 b Fg(\()p Ft(char)14 b(**matches,)g(int)g(len,)h(int)g ! (max)p Fg(\))195 1380 y Fu(A)i(con)o(v)o(enience)i(function)f(for)f ! (displa)o(ying)i(a)e(list)h(of)e(strings)h(in)i(columnar)e(format)f(on) ! h(Read-)195 1435 y(line's)h(output)f(stream.)23 b Ft(matches)16 ! b Fu(is)h(the)g(list)h(of)e(strings,)h(in)g(argv)f(format,)g(suc)o(h)h ! (as)f(a)h(list)g(of)195 1490 y(completion)c(matc)o(hes.)19 b Ft(len)11 b Fu(is)i(the)f(n)o(um)o(b)q(er)h(of)e(strings)h(in)h Ft(matches)p Fu(,)f(and)g Ft(max)g Fu(is)g(the)h(length)f(of)195 ! 1545 y(the)h(longest)g(string)g(in)h Ft(matches)p Fu(.)19 b(This)13 b(function)h(uses)f(the)h(setting)f(of)f Ft ! (print-completions-)195 1599 y(horizontally)k Fu(to)i(select)h(ho)o(w)e (the)i(matc)o(hes)e(are)h(displa)o(y)o(ed)h(\(see)g(Section)g(1.3.1)d ! ([Readline)195 1654 y(Init)g(File)g(Syn)o(tax],)e(page)h(4\).)137 ! 1742 y(The)i(follo)o(wing)f(are)g(implemen)o(ted)i(as)e(macros,)f (de\014ned)i(in)g Ft(chardefs.h)p Fu(.)k(Applications)d(should)75 ! 1796 y(refrain)d(from)g(using)h(them.)1762 1905 y(F)l(unction)-1861 ! b Fi(int)p 176 1905 V 40 w Fh(rl)p 235 1905 V 21 w(upp)r(ercase)p ! 506 1905 V 20 w(p)23 b Fg(\()p Ft(int)14 b(c)p Fg(\))195 ! 1960 y Fu(Return)h(1)g(if)g Fk(c)j Fu(is)e(an)f(upp)q(ercase)i(alphab)q ! (etic)f(c)o(haracter.)1762 2069 y(F)l(unction)-1861 b ! Fi(int)p 176 2069 V 40 w Fh(rl)p 235 2069 V 21 w(lo)n(w)n(ercase)p ! 489 2069 V 23 w(p)22 b Fg(\()p Ft(int)15 b(c)p Fg(\))195 ! 2124 y Fu(Return)g(1)g(if)g Fk(c)j Fu(is)e(a)f(lo)o(w)o(ercase)g ! (alphab)q(etic)i(c)o(haracter.)1762 2233 y(F)l(unction)-1861 ! b Fi(int)p 176 2233 V 40 w Fh(rl)p 235 2233 V 21 w(digit)p ! 369 2233 V 22 w(p)23 b Fg(\()p Ft(int)14 b(c)p Fg(\))195 ! 2288 y Fu(Return)h(1)g(if)g Fk(c)j Fu(is)e(a)f(n)o(umeric)h(c)o ! (haracter.)1762 2397 y(F)l(unction)-1861 b Fi(int)p 176 ! 2397 V 40 w Fh(rl)p 235 2397 V 21 w(to)p 307 2397 V 21 ! w(upp)r(er)21 b Fg(\()p Ft(int)15 b(c)p Fg(\))195 2451 ! y Fu(If)d Fk(c)j Fu(is)d(a)g(lo)o(w)o(ercase)f(alphab)q(etic)j(c)o ! (haracter,)d(return)h(the)g(corresp)q(onding)h(upp)q(ercase)g(c)o ! (haracter.)1762 2560 y(F)l(unction)-1861 b Fi(int)p 176 ! 2560 V 40 w Fh(rl)p 235 2560 V 21 w(to)p 307 2560 V 21 ! w(lo)n(w)n(er)24 b Fg(\()p Ft(int)15 b(c)p Fg(\))195 ! 2615 y Fu(If)g Fk(c)i Fu(is)e(an)f(upp)q(ercase)i(alphab)q(etic)g(c)o ! (haracter,)e(return)g(the)h(corresp)q(onding)g(lo)o(w)o(ercase)f(c)o ! (harac-)195 2670 y(ter.)p eop ! %%Page: 37 39 ! 37 38 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(37)1762 149 y(F)l(unction)-1861 b Fi(int)p ! 176 149 18 3 v 40 w Fh(rl)p 235 149 V 21 w(digit)p 369 ! 149 V 22 w(v)m(alue)24 b Fg(\()p Ft(int)15 b(c)p Fg(\))195 ! 204 y Fu(If)g Fk(c)k Fu(is)c(a)g(n)o(um)o(b)q(er,)g(return)g(the)h(v)m ! (alue)g(it)g(represen)o(ts.)75 325 y Fj(2.4.11)29 b(Miscellaneous)22 ! b(F)-5 b(unctions)1762 484 y Fu(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 484 V 21 w(macro)p 391 484 V 19 w(bind)j ! Fg(\()p Ft(const)14 b(char)g(*keyseq,)h(const)f(char)h(*macro,)283 ! 539 y(Keymap)f(map)p Fg(\))195 593 y Fu(Bind)f(the)f(k)o(ey)f(sequence) ! i Fk(k)o(eyseq)g Fu(to)e(in)o(v)o(ok)o(e)g(the)h(macro)f Fk(macro)p Fu(.)18 b(The)12 b(binding)h(is)f(p)q(erformed)g(in)195 ! 648 y Fk(map)p Fu(.)19 b(When)14 b Fk(k)o(eyseq)h Fu(is)f(in)o(v)o(ok)o ! (ed,)g(the)g Fk(macro)i Fu(will)f(b)q(e)f(inserted)h(in)o(to)f(the)g ! (line.)21 b(This)14 b(function)195 703 y(is)i(deprecated;)f(use)h ! Ft(rl_generic_bind\(\))d Fu(instead.)1762 833 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 833 V 21 w(macro)p 417 833 V 19 w(dump)r(er)g Fg(\()p Ft(int)15 b(readable)p Fg(\))195 ! 888 y Fu(Prin)o(t)f(the)f(k)o(ey)h(sequences)g(b)q(ound)h(to)e(macros)g ! (and)g(their)h(v)m(alues,)h(using)f(the)g(curren)o(t)g(k)o(eymap,)195 ! 943 y(to)h Ft(rl_outstream)p Fu(.)k(If)d Fk(readable)j Fu(is)d(non-zero,)g(the)g(list)g(is)g(formatted)f(in)h(suc)o(h)g(a)f(w) ! o(a)o(y)g(that)g(it)195 997 y(can)g(b)q(e)h(made)f(part)g(of)g(an)g ! Ft(inputrc)f Fu(\014le)i(and)g(re-read.)1762 1127 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1127 V 21 w(v)m(ariable)p 431 ! 1127 V 22 w(bind)j Fg(\()p Ft(const)14 b(char)g(*variable,)g(const)h ! (char)f(*value)p Fg(\))195 1182 y Fu(Mak)o(e)22 b(the)g(Readline)i(v)m (ariable)g Fk(v)m(ariable)j Fu(ha)o(v)o(e)22 b Fk(v)m(alue)p Fu(.)43 b(This)23 b(b)q(eha)o(v)o(es)g(as)f(if)h(the)f(readline)195 ! 1237 y(command)12 b(`)p Ft(set)j Fk(v)m(ariable)k(v)m(alue)s Fu(')12 b(had)h(b)q(een)g(executed)h(in)f(an)f Ft(inputrc)g ! Fu(\014le)h(\(see)f(Section)i(1.3.1)195 1292 y([Readline)i(Init)g(File) ! h(Syn)o(tax],)d(page)h(4\).)1762 1422 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 1422 V 21 w(v)m(ariable)p ! 457 1422 V 22 w(dump)r(er)g Fg(\()p Ft(int)14 b(readable)p ! Fg(\))195 1476 y Fu(Prin)o(t)g(the)h(readline)h(v)m(ariable)f(names)g (and)f(their)h(curren)o(t)f(v)m(alues)i(to)d Ft(rl_outstream)p ! Fu(.)18 b(If)d Fk(read-)195 1531 y(able)20 b Fu(is)e(non-zero,)f(the)g (list)h(is)g(formatted)e(in)h(suc)o(h)h(a)e(w)o(a)o(y)g(that)h(it)g ! (can)g(b)q(e)h(made)f(part)f(of)h(an)195 1586 y Ft(inputrc)d ! Fu(\014le)i(and)g(re-read.)1762 1716 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1716 V 21 w(set)p 307 1716 ! V 20 w(paren)p 469 1716 V 20 w(blink)p 613 1716 V 23 ! w(timeout)i Fg(\()p Ft(int)15 b(u)p Fg(\))195 1771 y Fu(Set)e(the)f(time)h(in)o(terv)m(al)h(\(in)f(microseconds\))g(that)f (Readline)i(w)o(aits)e(when)h(sho)o(wing)f(a)h(balancing)195 ! 1826 y(c)o(haracter)h(when)i Ft(blink-matching-paren)d ! Fu(has)i(b)q(een)h(enabled.)1762 1956 y(F)l(unction)-1861 ! b Fi(char)20 b(*)f Fh(rl)p 286 1956 V 21 w(get)p 384 ! 1956 V 21 w(termcap)j Fg(\()p Ft(const)14 b(char)g(*cap)p ! Fg(\))195 2010 y Fu(Retriev)o(e)f(the)h(string)f(v)m(alue)i(of)e(the)h ! (termcap)f(capabilit)o(y)i Fk(cap)p Fu(.)k(Readline)c(fetc)o(hes)f(the) ! f(termcap)195 2065 y(en)o(try)j(for)h(the)f(curren)o(t)h(terminal)h ! (name)e(and)h(uses)g(those)g(capabilities)i(to)d(mo)o(v)o(e)g(around)h ! (the)195 2120 y(screen)11 b(line)h(and)f(p)q(erform)f(other)g ! (terminal-sp)q(eci\014c)k(op)q(erations,)d(lik)o(e)h(erasing)e(a)h ! (line.)20 b(Readline)195 2175 y(do)q(es)e(not)f(use)h(all)g(of)f(a)g ! (terminal's)h(capabilities,)i(and)e(this)g(function)g(will)h(return)f ! (v)m(alues)h(for)195 2230 y(only)d(those)f(capabilities)i(Readline)g ! (uses.)75 2350 y Fj(2.4.12)29 b(Alternate)21 b(In)n(terface)137 ! 2451 y Fu(An)i(alternate)f(in)o(terface)h(is)g(a)o(v)m(ailable)h(to)d (plain)j Ft(readline\(\))p Fu(.)40 b(Some)22 b(applications)i(need)g ! (to)75 2506 y(in)o(terlea)o(v)o(e)15 b(k)o(eyb)q(oard)f(I/O)h(with)g (\014le,)h(device,)f(or)f(windo)o(w)h(system)f(I/O,)h(t)o(ypically)h(b) ! o(y)e(using)h(a)g(main)75 2560 y(lo)q(op)f(to)g Ft(select\(\))e Fu(on)i(v)m(arious)g(\014le)h(descriptors.)20 b(T)l(o)14 b(accomo)q(date)f(this)h(need,)h(readline)g(can)f(also)g(b)q(e)75 ! 2615 y(in)o(v)o(ok)o(ed)i(as)f(a)g(`callbac)o(k')h(function)h(from)d ! (an)i(ev)o(en)o(t)f(lo)q(op.)22 b(There)16 b(are)f(functions)h(a)o(v)m ! (ailable)i(to)c(mak)o(e)75 2670 y(this)i(easy)l(.)p eop ! %%Page: 38 40 ! 38 39 bop 75 -58 a Fu(38)1299 b(GNU)15 b(Readline)h(Library)1762 ! 149 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 149 ! 18 3 v 21 w(callbac)n(k)p 458 149 V 23 w(handler)p 670 ! 149 V 21 w(install)25 b Fg(\()p Ft(const)14 b(char)h(*prompt,)283 ! 204 y(rl_vcpfunc_t)e(*lhandler)p Fg(\))195 259 y Fu(Set)f(up)h(the)g (terminal)g(for)f(readline)i(I/O)f(and)f(displa)o(y)i(the)e(initial)j ! (expanded)e(v)m(alue)h(of)e Fk(prompt)p Fu(.)195 314 y(Sa)o(v)o(e)j(the)h(v)m(alue)h(of)f Fk(lhandler)21 b Fu(to)15 b(use)h(as)f(a)h(function)h(to)e(call)i(when)f(a)g(complete)g ! (line)i(of)d(input)195 369 y(has)g(b)q(een)h(en)o(tered.)21 b(The)15 b(function)h(tak)o(es)e(the)i(text)e(of)h(the)g(line)i(as)e ! (an)g(argumen)o(t.)1762 480 y(F)l(unction)-1861 b Fi(void)20 ! b Fh(rl)p 241 480 V 21 w(callbac)n(k)p 458 480 V 23 w(read)p ! 591 480 V 20 w(c)n(har)j Fg(\()p Ft(void)p Fg(\))195 ! 535 y Fu(Whenev)o(er)17 b(an)g(application)h(determines)g(that)e(k)o ! (eyb)q(oard)h(input)h(is)f(a)o(v)m(ailable,)i(it)e(should)h(call)195 ! 590 y Ft(rl_callback_read_char\(\))p Fu(,)8 b(whic)o(h)k(will)g(read)f ! (the)g(next)g(c)o(haracter)f(from)g(the)h(curren)o(t)g(input)195 ! 645 y(source.)38 b(If)21 b(that)g(c)o(haracter)f(completes)i(the)f ! (line,)j Ft(rl_callback_read_char)18 b Fu(will)23 b(in)o(v)o(ok)o(e)195 ! 699 y(the)18 b Fk(lhandler)k Fu(function)d(sa)o(v)o(ed)e(b)o(y)h ! Ft(rl_callback_handler_insta)o(ll)d Fu(to)i(pro)q(cess)h(the)g(line.) ! 195 754 y(Before)13 b(calling)i(the)f Fk(lhandler)k Fu(function,)c(the) ! g(terminal)g(settings)f(are)g(reset)g(to)g(the)g(v)m(alues)i(they)195 ! 809 y(had)g(b)q(efore)g(calling)i Ft(rl_callback_handler_insta)o(ll)p ! Fu(.)g(If)e(the)g Fk(lhandler)20 b Fu(function)15 b(returns,)195 ! 864 y(the)d(terminal)i(settings)e(are)g(mo)q(di\014ed)i(for)d ! (Readline's)i(use)g(again.)19 b Ft(EOF)12 b Fu(is)h(indicated)h(b)o(y)e ! (calling)195 919 y Fk(lhandler)20 b Fu(with)c(a)f Ft(NULL)f ! Fu(line.)1762 1030 y(F)l(unction)-1861 b Fi(void)20 b ! Fh(rl)p 241 1030 V 21 w(callbac)n(k)p 458 1030 V 23 w(handler)p ! 670 1030 V 21 w(remo)n(v)n(e)i Fg(\()p Ft(void)p Fg(\))195 ! 1085 y Fu(Restore)c(the)g(terminal)i(to)d(its)i(initial)i(state)d(and)g ! (remo)o(v)o(e)g(the)h(line)h(handler.)31 b(This)19 b(ma)o(y)f(b)q(e)195 ! 1140 y(called)i(from)d(within)j(a)d(callbac)o(k)j(as)d(w)o(ell)i(as)f ! (indep)q(enden)o(tly)m(.)31 b(If)19 b(the)f Fk(lhandler)23 ! b Fu(installed)d(b)o(y)195 1195 y Ft(rl_callback_handler_instal)o(l)d ! Fu(do)q(es)i(not)g(exit)h(the)g(program,)e(either)i(this)g(function)g ! (or)195 1249 y(the)c(function)g(referred)g(to)f(b)o(y)h(the)g(v)m(alue) ! h(of)e Ft(rl_deprep_term_function)d Fu(should)17 b(b)q(e)f(called)195 ! 1304 y(b)q(efore)f(the)h(program)e(exits)h(to)g(reset)g(the)g(terminal) ! h(settings.)75 1413 y Fj(2.4.13)29 b(A)21 b(Readline)g(Example)137 ! 1508 y Fu(Here)f(is)g(a)f(function)i(whic)o(h)f(c)o(hanges)f(lo)o(w)o (ercase)h(c)o(haracters)e(to)h(their)h(upp)q(ercase)h(equiv)m(alen)o ! (ts,)75 1563 y(and)e(upp)q(ercase)i(c)o(haracters)d(to)h(lo)o(w)o (ercase.)31 b(If)20 b(this)f(function)h(w)o(as)f(b)q(ound)h(to)f(`)p ! Ft(M-c)p Fu(',)f(then)i(t)o(yping)75 1618 y(`)p Ft(M-c)p Fu(')12 b(w)o(ould)h(c)o(hange)h(the)f(case)g(of)g(the)g(c)o(haracter)g (under)g(p)q(oin)o(t.)20 b(T)o(yping)14 b(`)p Ft(M-1)g(0)h(M-c)p ! Fu(')d(w)o(ould)i(c)o(hange)75 1673 y(the)h(case)g(of)g(the)h(follo)o (wing)f(10)g(c)o(haracters,)f(lea)o(ving)i(the)f(cursor)g(on)g(the)h ! (last)f(c)o(haracter)f(c)o(hanged.)195 1736 y Ft(/*)24 b(Invert)f(the)g(case)g(of)h(the)f(COUNT)h(following)e(characters.)h ! (*/)195 1788 y(int)195 1840 y(invert_case_line)f(\(count,)h(key\))314 ! 1892 y(int)h(count,)f(key;)195 1944 y({)243 1995 y(register)f(int)i ! (start,)f(end,)g(i;)243 2099 y(start)g(=)h(rl_point;)243 ! 2203 y(if)f(\(rl_point)g(>=)h(rl_end\))290 2255 y(return)f(\(0\);)243 ! 2359 y(if)g(\(count)g(<)h(0\))290 2411 y({)338 2462 y(direction)f(=)h ! (-1;)338 2514 y(count)f(=)h(-count;)290 2566 y(})243 ! 2618 y(else)290 2670 y(direction)f(=)h(1;)p eop ! %%Page: 39 41 ! 39 40 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(39)243 201 y Ft(/*)23 b(Find)h(the)f(end)h(of)f(the)h ! (range)f(to)g(modify.)g(*/)243 253 y(end)g(=)h(start)f(+)h(\(count)f(*) ! h(direction\);)243 357 y(/*)f(Force)g(it)h(to)g(be)f(within)g(range.)g ! (*/)243 409 y(if)g(\(end)h(>)f(rl_end\))290 461 y(end)h(=)g(rl_end;)243 ! 513 y(else)f(if)h(\(end)f(<)h(0\))290 565 y(end)g(=)g(0;)243 ! 668 y(if)f(\(start)g(==)h(end\))290 720 y(return)f(\(0\);)243 ! 824 y(if)g(\(start)g(>)h(end\))290 876 y({)338 928 y(int)g(temp)f(=)h ! (start;)338 980 y(start)f(=)h(end;)338 1032 y(end)g(=)f(temp;)290 ! 1083 y(})243 1187 y(/*)g(Tell)h(readline)e(that)i(we)f(are)h(modifying) ! e(the)i(line,)314 1239 y(so)g(it)f(will)h(save)f(the)h(undo)f ! (information.)f(*/)243 1291 y(rl_modifying)g(\(start,)h(end\);)243 ! 1395 y(for)g(\(i)h(=)f(start;)h(i)f(!=)h(end;)f(i++\))290 ! 1447 y({)338 1499 y(if)h(\(_rl_uppercase_p)d(\(rl_line_buffer[i]\)\)) ! 386 1550 y(rl_line_buffer[i])g(=)j(_rl_to_lower)e ! (\(rl_line_buffer[i]\);)338 1602 y(else)h(if)h(\(_rl_lowercase_p)e ! (\(rl_line_buffer[i]\)\))386 1654 y(rl_line_buffer[i])f(=)j ! (_rl_to_upper)e(\(rl_line_buffer[i]\);)290 1706 y(})243 ! 1758 y(/*)h(Move)h(point)f(to)g(on)h(top)f(of)h(the)f(last)h(character) ! e(changed.)h(*/)243 1810 y(rl_point)f(=)i(\(direction)f(==)g(1\))h(?)g ! (end)f(-)h(1)g(:)f(start;)243 1862 y(return)g(\(0\);)195 ! 1914 y(})75 2057 y Fs(2.5)33 b(Readline)23 b(Signal)h(Handling)137 ! 2159 y Fu(Signals)e(are)f(async)o(hronous)f(ev)o(en)o(ts)h(sen)o(t)f ! (to)h(a)f(pro)q(cess)h(b)o(y)g(the)g(Unix)h(k)o(ernel,)g(sometimes)f ! (on)75 2213 y(b)q(ehalf)g(of)e(another)h(pro)q(cess.)34 b(They)20 b(are)g(in)o(tended)h(to)e(indicate)j(exceptional)f(ev)o(en)o ! (ts,)f(lik)o(e)h(a)f(user)75 2268 y(pressing)c(the)f(in)o(terrupt)g(k)o (ey)g(on)g(his)h(terminal,)f(or)g(a)f(net)o(w)o(ork)g(connection)i(b)q ! (eing)g(brok)o(en.)k(There)15 b(is)75 2323 y(a)e(class)g(of)g(signals)h (that)f(can)g(b)q(e)h(sen)o(t)f(to)f(the)i(pro)q(cess)f(curren)o(tly)h ! (reading)f(input)i(from)d(the)h(k)o(eyb)q(oard.)75 2378 y(Since)i(Readline)f(c)o(hanges)g(the)f(terminal)h(attributes)f(when)h (it)g(is)g(called,)h(it)e(needs)h(to)f(p)q(erform)g(sp)q(ecial)75 ! 2433 y(pro)q(cessing)i(when)f(suc)o(h)g(a)g(signal)g(is)g(receiv)o(ed)h (in)g(order)f(to)f(restore)g(the)h(terminal)g(to)f(a)h(sane)g(state,)e ! (or)75 2487 y(pro)o(vide)k(application)h(writers)e(with)g(functions)h ! (to)f(do)g(so)g(man)o(ually)l(.)137 2560 y(Readline)22 b(con)o(tains)e(an)g(in)o(ternal)h(signal)g(handler)g(that)f(is)h (installed)h(for)d(a)h(n)o(um)o(b)q(er)g(of)g(signals)75 ! 2615 y(\()p Ft(SIGINT)p Fu(,)h Ft(SIGQUIT)p Fu(,)g Ft(SIGTERM)p Fu(,)g Ft(SIGALRM)p Fu(,)g Ft(SIGTSTP)p Fu(,)g Ft(SIGTTIN)p Fu(,)h(and)f Ft(SIGTTOU)p Fu(\).)36 b(When)21 b(one)g(of)75 ! 2670 y(these)16 b(signals)h(is)f(receiv)o(ed,)h(the)f(signal)h(handler) ! f(will)i(reset)e(the)g(terminal)g(attributes)g(to)f(those)h(that)p ! eop ! %%Page: 40 42 ! 40 41 bop 75 -58 a Fu(40)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y(w)o(ere)d(in)i(e\013ect)e(b)q(efore)h Ft(readline\(\))e Fu(w)o(as)h(called,)i(reset)f(the)f(signal)i(handling)g(to)e(what)g(it) ! h(w)o(as)f(b)q(efore)75 204 y Ft(readline\(\))21 b Fu(w)o(as)h(called,) j(and)e(resend)g(the)g(signal)g(to)f(the)h(calling)h(application.)44 ! b(If)23 b(and)f(when)75 259 y(the)17 b(calling)i(application's)f (signal)g(handler)g(returns,)f(Readline)h(will)h(reinitialize)h(the)d ! (terminal)h(and)75 314 y(con)o(tin)o(ue)d(to)e(accept)i(input.)20 b(When)15 b(a)e Ft(SIGINT)h Fu(is)g(receiv)o(ed,)h(the)g(Readline)g ! (signal)g(handler)g(p)q(erforms)75 369 y(some)k(additional)i(w)o(ork,)e ! (whic)o(h)h(will)h(cause)f(an)o(y)f(partially-en)o(tered)i(line)g(to)d ! (b)q(e)i(ab)q(orted)g(\(see)f(the)75 423 y(description)e(of)d ! Ft(rl_free_line_state\(\))f Fu(b)q(elo)o(w\).)137 488 y(There)g(is)f(an)g(additional)i(Readline)g(signal)f(handler,)g(for)f Ft(SIGWINCH)p Fu(,)f(whic)o(h)i(the)f(k)o(ernel)h(sends)g(to)e(a)75 ! 543 y(pro)q(cess)k(whenev)o(er)g(the)f(terminal's)h(size)g(c)o(hanges)f ! (\(for)g(example,)h(if)g(a)f(user)h(resizes)g(an)f Ft(xterm)p ! Fu(\).)19 b(The)75 598 y(Readline)g Ft(SIGWINCH)e Fu(handler)i(up)q (dates)f(Readline's)h(in)o(ternal)f(screen)h(size)f(information,)h(and) ! f(then)75 653 y(calls)g(an)o(y)f Ft(SIGWINCH)e Fu(signal)j(handler)g (the)f(calling)i(application)f(has)f(installed.)27 b(Readline)18 ! b(calls)g(the)75 708 y(application's)h Ft(SIGWINCH)d Fu(signal)j(handler)f(without)g(resetting)g(the)f(terminal)i(to)e(its)g ! (original)i(state.)75 762 y(If)d(the)g(application's)h(signal)g (handler)g(do)q(es)g(more)e(than)h(up)q(date)h(its)f(idea)h(of)e(the)h ! (terminal)h(size)g(and)75 817 y(return)e(\(for)f(example,)h(a)f Ft(longjmp)g Fu(bac)o(k)h(to)f(a)h(main)g(pro)q(cessing)g(lo)q(op\),)g ! (it)g Fl(must)20 b Fu(call)c Ft(rl_cleanup_)75 872 y(after_signal\(\))d ! Fu(\(describ)q(ed)k(b)q(elo)o(w\),)e(to)g(restore)f(the)h(terminal)h ! (state.)137 937 y(Readline)g(pro)o(vides)f(t)o(w)o(o)e(v)m(ariables)i (that)f(allo)o(w)g(application)i(writers)e(to)g(con)o(trol)g(whether)h ! (or)e(not)75 992 y(it)k(will)h(catc)o(h)e(certain)h(signals)h(and)f (act)f(on)g(them)h(when)g(they)f(are)h(receiv)o(ed.)25 ! b(It)16 b(is)i(imp)q(ortan)o(t)e(that)75 1047 y(applications)k(c)o (hange)e(the)h(v)m(alues)g(of)f(these)h(v)m(ariables)g(only)g(when)g ! (calling)h Ft(readline\(\))p Fu(,)d(not)h(in)h(a)75 1101 y(signal)d(handler,)g(so)f(Readline's)h(in)o(ternal)g(signal)g(state)e ! (is)i(not)f(corrupted.)1773 1208 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1208 18 3 v 21 w(catc)n(h)p ! 366 1208 V 22 w(signals)195 1262 y Fu(If)15 b(this)g(v)m(ariable)g(is)g (non-zero,)g(Readline)h(will)g(install)f(signal)h(handlers)f(for)f ! Ft(SIGINT)p Fu(,)f Ft(SIGQUIT)p Fu(,)195 1317 y Ft(SIGTERM)p Fu(,)h Ft(SIGALRM)p Fu(,)g Ft(SIGTSTP)p Fu(,)f Ft(SIGTTIN)p ! Fu(,)h(and)i Ft(SIGTTOU)p Fu(.)195 1382 y(The)f(default)h(v)m(alue)h ! (of)d Ft(rl_catch_signals)f Fu(is)j(1.)1773 1488 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1488 V 21 w(catc)n(h)p 366 ! 1488 V 22 w(sigwinc)n(h)195 1543 y Fu(If)15 b(this)h(v)m(ariable)h(is)e (non-zero,)g(Readline)i(will)g(install)f(a)f(signal)h(handler)h(for)d ! Ft(SIGWINCH)p Fu(.)195 1608 y(The)h(default)h(v)m(alue)h(of)d ! Ft(rl_catch_sigwinch)f Fu(is)j(1.)137 1694 y(If)g(an)f(application)j (do)q(es)d(not)g(wish)i(to)d(ha)o(v)o(e)h(Readline)i(catc)o(h)f(an)o(y) ! f(signals,)h(or)f(to)f(handle)j(signals)75 1749 y(other)i(than)g(those) g(Readline)i(catc)o(hes)e(\()p Ft(SIGHUP)p Fu(,)g(for)g(example\),)h ! (Readline)h(pro)o(vides)e(con)o(v)o(enience)75 1804 y(functions)d(to)f (do)g(the)g(necessary)g(terminal)h(and)g(in)o(ternal)g(state)e(clean)o ! (up)i(up)q(on)g(receipt)g(of)f(a)g(signal.)1762 1910 ! y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 1910 V ! 21 w(clean)n(up)p 450 1910 V 22 w(after)p 590 1910 V ! 20 w(signal)j Fg(\()p Ft(void)p Fg(\))195 1965 y Fu(This)18 b(function)f(will)i(reset)e(the)g(state)f(of)g(the)h(terminal)h(to)e (what)h(it)g(w)o(as)f(b)q(efore)h Ft(readline\(\))195 ! 2019 y Fu(w)o(as)d(called,)i(and)f(remo)o(v)o(e)f(the)g(Readline)i (signal)g(handlers)g(for)e(all)h(signals,)g(dep)q(ending)i(on)e(the)195 ! 2074 y(v)m(alues)h(of)f Ft(rl_catch_signals)e Fu(and)i ! Ft(rl_catch_sigwinch)p Fu(.)1762 2180 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 2180 V 21 w(free)p 356 2180 ! V 20 w(line)p 464 2180 V 23 w(state)j Fg(\()p Ft(void)p ! Fg(\))195 2235 y Fu(This)d(will)h(free)f(an)o(y)f(partial)h(state)f (asso)q(ciated)h(with)g(the)g(curren)o(t)f(input)i(line)g(\(undo)f ! (infor-)195 2290 y(mation,)i(an)o(y)f(partial)h(history)f(en)o(try)l(,) ! h(an)o(y)f(partially-en)o(tered)i(k)o(eyb)q(oard)e(macro,)h(and)f(an)o ! (y)195 2345 y(partially-en)o(tered)k(n)o(umeric)g(argumen)o(t\).)45 b(This)24 b(should)h(b)q(e)g(called)g(b)q(efore)g Ft(rl_cleanup_)195 ! 2399 y(after_signal\(\))p Fu(.)36 b(The)22 b(Readline)h(signal)f (handler)g(for)f Ft(SIGINT)f Fu(calls)j(this)e(to)g(ab)q(ort)g(the)195 ! 2454 y(curren)o(t)15 b(input)h(line.)1762 2560 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 2560 V 21 w(reset)p 383 2560 ! V 20 w(after)p 521 2560 V 21 w(signal)j Fg(\()p Ft(void)p ! Fg(\))195 2615 y Fu(This)15 b(will)h(reinitialize)h(the)d(terminal)h (and)g(reinstall)h(an)o(y)d(Readline)j(signal)f(handlers,)g(dep)q(end-) ! 195 2670 y(ing)h(on)f(the)g(v)m(alues)i(of)d Ft(rl_catch_signals)f ! Fu(and)j Ft(rl_catch_sigwinch)p Fu(.)p eop ! %%Page: 41 43 ! 41 42 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(41)137 149 y(If)20 b(an)g(application)h(do)q(es)f(not)g ! (wish)g(Readline)h(to)e(catc)o(h)g Ft(SIGWINCH)p Fu(,)h(it)g(ma)o(y)f ! (call)h Ft(rl_resize_)75 204 y(terminal\(\))12 b Fu(or)h ! Ft(rl_set_screen_size\(\))e Fu(to)i(force)g(Readline)i(to)e(up)q(date)h ! (its)g(idea)g(of)g(the)f(terminal)75 259 y(size)j(when)g(a)f ! Ft(SIGWINCH)f Fu(is)h(receiv)o(ed.)1762 360 y(F)l(unction)-1861 ! b Fi(void)20 b Fh(rl)p 241 360 18 3 v 21 w(resize)p 401 ! 360 V 22 w(terminal)j Fg(\()p Ft(void)p Fg(\))195 415 ! y Fu(Up)q(date)16 b(Readline's)g(in)o(ternal)g(screen)f(size)i(b)o(y)e ! (reading)g(v)m(alues)i(from)d(the)i(k)o(ernel.)1762 516 ! y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 516 V ! 21 w(set)p 333 516 V 21 w(screen)p 510 516 V 20 w(size)k ! Fg(\()p Ft(int)15 b(rows,)f(int)h(cols)p Fg(\))195 571 y Fu(Set)g(Readline's)h(idea)g(of)f(the)g(terminal)h(size)g(to)f Fk(ro)o(ws)h Fu(ro)o(ws)e(and)i Fk(cols)h Fu(columns.)137 ! 653 y(If)g(an)g(application)h(do)q(es)f(not)f(w)o(an)o(t)g(to)g (install)i(a)f Ft(SIGWINCH)e Fu(handler,)j(but)f(is)g(still)h(in)o ! (terested)f(in)75 708 y(the)e(screen)h(dimensions,)g(Readline's)h(idea) ! e(of)g(the)h(screen)f(size)h(ma)o(y)f(b)q(e)h(queried.)1762 ! 809 y(F)l(unction)-1861 b Fi(void)20 b Fh(rl)p 241 809 ! V 21 w(get)p 339 809 V 21 w(screen)p 516 809 V 20 w(size)k Fg(\()p Ft(int)15 b(*rows,)f(int)h(*cols)p Fg(\))195 ! 864 y Fu(Return)g(Readline's)h(idea)f(of)g(the)g(terminal's)g(size)h (in)g(the)f(v)m(ariables)i(p)q(oin)o(ted)f(to)e(b)o(y)h(the)g(argu-)195 ! 918 y(men)o(ts.)137 1001 y(The)h(follo)o(wing)g(functions)g(install)g (and)g(remo)o(v)o(e)e(Readline's)i(signal)g(handlers.)1762 ! 1102 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 1102 ! V 21 w(set)p 307 1102 V 20 w(signals)j Fg(\()p Ft(void)p ! Fg(\))195 1157 y Fu(Install)c(Readline's)f(signal)h(handler)f(for)f Ft(SIGINT)p Fu(,)g Ft(SIGQUIT)p Fu(,)g Ft(SIGTERM)p Fu(,)g ! Ft(SIGALRM)p Fu(,)f Ft(SIGTSTP)p Fu(,)195 1211 y Ft(SIGTTIN)p Fu(,)11 b Ft(SIGTTOU)p Fu(,)g(and)h Ft(SIGWINCH)p Fu(,)e(dep)q(ending)k (on)e(the)f(v)m(alues)i(of)e Ft(rl_catch_signals)f Fu(and)195 ! 1266 y Ft(rl_catch_sigwinch)p Fu(.)1762 1367 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 1367 V 21 w(clear)p 354 1367 ! V 21 w(signals)j Fg(\()p Ft(void)p Fg(\))195 1422 y Fu(Remo)o(v)o(e)14 b(all)i(of)f(the)g(Readline)i(signal)f(handlers)g(installed)h(b)o(y)e ! Ft(rl_set_signals\(\))p Fu(.)75 1541 y Fs(2.6)33 b(Custom)21 ! b(Completers)137 1634 y Fu(T)o(ypically)l(,)e(a)d(program)f(that)h ! (reads)h(commands)f(from)g(the)h(user)f(has)h(a)f(w)o(a)o(y)g(of)g ! (disam)o(biguating)75 1689 y(commands)i(and)f(data.)27 ! b(If)18 b(y)o(our)f(program)g(is)h(one)g(of)f(these,)i(then)f(it)g(can) ! f(pro)o(vide)i(completion)g(for)75 1744 y(commands,)14 ! b(data,)g(or)g(b)q(oth.)20 b(The)15 b(follo)o(wing)g(sections)g ! (describ)q(e)h(ho)o(w)e(y)o(our)g(program)g(and)h(Readline)75 ! 1798 y(co)q(op)q(erate)g(to)g(pro)o(vide)g(this)h(service.)75 ! 1901 y Fj(2.6.1)30 b(Ho)n(w)21 b(Completing)f(W)-5 b(orks)137 ! 1994 y Fu(In)18 b(order)f(to)f(complete)i(some)f(text,)g(the)g(full)i ! (list)e(of)g(p)q(ossible)i(completions)f(m)o(ust)f(b)q(e)h(a)o(v)m ! (ailable.)75 2049 y(That)e(is,)i(it)f(is)h(not)f(p)q(ossible)h(to)f (accurately)g(expand)h(a)e(partial)i(w)o(ord)e(without)h(kno)o(wing)g ! (all)h(of)f(the)75 2104 y(p)q(ossible)i(w)o(ords)e(whic)o(h)h(mak)o(e)f (sense)h(in)h(that)d(con)o(text.)26 b(The)18 b(Readline)h(library)f ! (pro)o(vides)g(the)g(user)75 2158 y(in)o(terface)f(to)f(completion,)i (and)e(t)o(w)o(o)g(of)g(the)h(most)f(common)g(completion)i(functions:) ! 23 b(\014lename)18 b(and)75 2213 y(username.)h(F)l(or)10 b(completing)i(other)e(t)o(yp)q(es)h(of)f(text,)h(y)o(ou)g(m)o(ust)f (write)h(y)o(our)f(o)o(wn)h(completion)g(function.)75 ! 2268 y(This)16 b(section)g(describ)q(es)g(exactly)g(what)f(suc)o(h)g (functions)h(m)o(ust)f(do,)f(and)i(pro)o(vides)f(an)h(example.)137 ! 2332 y(There)g(are)f(three)g(ma)s(jor)f(functions)i(used)f(to)g(p)q ! (erform)g(completion:)100 2396 y(1.)29 b(The)22 b(user-in)o(terface)g (function)h Ft(rl_complete\(\))p Fu(.)37 b(This)22 b(function)h(is)f ! (called)h(with)f(the)g(same)165 2451 y(argumen)o(ts)17 b(as)h(other)g(bindable)i(Readline)f(functions:)27 b ! Fk(coun)o(t)19 b Fu(and)f Fk(in)o(v)o(oking)p 1556 2451 ! 14 2 v 17 w(k)o(ey)p Fu(.)28 b(It)19 b(isolates)165 2506 y(the)g(w)o(ord)f(to)g(b)q(e)i(completed)f(and)g(calls)h Ft(rl_completion_matches\(\))c Fu(to)i(generate)g(a)h(list)g(of)165 ! 2560 y(p)q(ossible)e(completions.)22 b(It)16 b(then)g(either)g(lists)g (the)g(p)q(ossible)h(completions,)g(inserts)f(the)f(p)q(ossible)165 ! 2615 y(completions,)25 b(or)d(actually)i(p)q(erforms)e(the)g (completion,)k(dep)q(ending)e(on)f(whic)o(h)g(b)q(eha)o(vior)g(is)165 ! 2670 y(desired.)p eop ! %%Page: 42 44 ! 42 43 bop 75 -58 a Fu(42)1299 b(GNU)15 b(Readline)h(Library)100 ! 149 y(2.)29 b(The)17 b(in)o(ternal)h(function)f Ft ! (rl_completion_matches\(\))d Fu(uses)j(an)g(application-supplie)q(d)j ! Fk(gener-)165 204 y(ator)h Fu(function)e(to)f(generate)g(the)h(list)g (of)f(p)q(ossible)i(matc)o(hes,)f(and)f(then)h(returns)g(the)f(arra)o ! (y)f(of)165 259 y(these)j(matc)o(hes.)32 b(The)20 b(caller)g(should)h (place)f(the)g(address)f(of)h(its)f(generator)g(function)h(in)g ! Ft(rl_)165 314 y(completion_entry_function)p Fu(.)100 ! 383 y(3.)29 b(The)12 b(generator)e(function)i(is)g(called)h(rep)q (eatedly)g(from)e Ft(rl_completion_matches\(\))p Fu(,)d(returning)165 ! 438 y(a)16 b(string)g(eac)o(h)h(time.)24 b(The)17 b(argumen)o(ts)e(to)h ! (the)g(generator)g(function)h(are)f Fk(text)h Fu(and)g ! Fk(state)p Fu(.)22 b Fk(text)165 493 y Fu(is)17 b(the)f(partial)g(w)o (ord)f(to)h(b)q(e)h(completed.)23 b Fk(state)18 b Fu(is)e(zero)g(the)g ! (\014rst)g(time)g(the)g(function)h(is)g(called,)165 547 y(allo)o(wing)23 b(the)f(generator)f(to)g(p)q(erform)h(an)o(y)g (necessary)g(initialization,)k(and)c(a)g(p)q(ositiv)o(e)h(non-)165 ! 602 y(zero)14 b(in)o(teger)h(for)f(eac)o(h)h(subsequen)o(t)g(call.)21 b(The)15 b(generator)e(function)j(returns)e Ft(\(char)h(*\)NULL)f ! Fu(to)165 657 y(inform)19 b Ft(rl_completion_matches\(\))d Fu(that)i(there)h(are)g(no)g(more)g(p)q(ossibilities)j(left.)32 ! b(Usually)165 712 y(the)19 b(generator)g(function)h(computes)g(the)f (list)h(of)f(p)q(ossible)i(completions)g(when)e Fk(state)j ! Fu(is)d(zero,)165 767 y(and)13 b(returns)g(them)f(one)h(at)f(a)h(time)g ! (on)g(subsequen)o(t)g(calls.)20 b(Eac)o(h)13 b(string)f(the)h ! (generator)f(function)165 821 y(returns)k(as)f(a)h(matc)o(h)f(m)o(ust)h ! (b)q(e)g(allo)q(cated)h(with)g Ft(malloc\(\))p Fu(;)d(Readline)k(frees) ! e(the)g(strings)f(when)165 876 y(it)g(has)h(\014nished)g(with)g(them.) ! 1762 1005 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 ! 1005 18 3 v 21 w(complete)j Fg(\()p Ft(int)14 b(ignore,)g(int)h ! (invoking_key)p Fg(\))195 1059 y Fu(Complete)h(the)f(w)o(ord)g(at)f(or) h(b)q(efore)h(p)q(oin)o(t.)21 b(Y)l(ou)15 b(ha)o(v)o(e)g(supplied)j ! (the)d(function)i(that)d(do)q(es)i(the)195 1114 y(initial)23 b(simple)f(matc)o(hing)e(selection)i(algorithm)f(\(see)f ! Ft(rl_completion_matches\(\))p Fu(\).)33 b(The)195 1169 y(default)16 b(is)f(to)g(do)g(\014lename)h(completion.)1773 ! 1298 y(V)l(ariable)-1861 b Fi(rl_compentry_func_t)22 ! b(*)d Fh(rl)p 678 1298 V 21 w(completion)p 973 1298 V ! 21 w(en)n(try)p 1126 1298 V 22 w(function)195 1352 y Fu(This)i(is)f(a)g(p)q(oin)o(ter)g(to)f(the)h(generator)g(function)g (for)g Ft(rl_completion_matches\(\))p Fu(.)31 b(If)20 ! b(the)195 1407 y(v)m(alue)13 b(of)f Ft(rl_completion_entry_fun)o(ction) d Fu(is)j Ft(NULL)f Fu(then)h(the)g(default)h(\014lename)g(generator) ! 195 1462 y(function,)j Ft(rl_filename_completion_f)o(unction)o(\(\))p ! Fu(,)c(is)k(used.)75 1582 y Fj(2.6.2)30 b(Completion)20 ! b(F)-5 b(unctions)137 1682 y Fu(Here)16 b(is)f(the)h(complete)g(list)g ! (of)e(callable)k(completion)e(functions)g(presen)o(t)f(in)h(Readline.) ! 1762 1810 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 ! 1810 V 21 w(complete)p 460 1810 V 21 w(in)n(ternal)k ! Fg(\()p Ft(int)15 b(what_to_do)p Fg(\))195 1865 y Fu(Complete)k(the)g ! (w)o(ord)f(at)g(or)g(b)q(efore)h(p)q(oin)o(t.)31 b Fk(what)p ! 1108 1865 14 2 v 16 w(to)p 1165 1865 V 16 w(do)21 b Fu(sa)o(ys)d(what)g ! (to)g(do)h(with)g(the)g(com-)195 1920 y(pletion.)j(A)16 ! b(v)m(alue)h(of)e(`)p Ft(?)p Fu(')g(means)g(list)i(the)e(p)q(ossible)j ! (completions.)k(`)p Ft(TAB)p Fu(')14 b(means)i(do)f(standard)195 ! 1975 y(completion.)22 b(`)p Ft(*)p Fu(')15 b(means)g(insert)h(all)h(of) ! e(the)h(p)q(ossible)h(completions.)22 b(`)p Ft(!)p Fu(')15 ! b(means)g(to)g(displa)o(y)i(all)195 2029 y(of)g(the)g(p)q(ossible)i ! (completions,)f(if)g(there)f(is)h(more)f(than)g(one,)g(as)g(w)o(ell)h ! (as)f(p)q(erforming)h(partial)195 2084 y(completion.)1762 ! 2213 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p 215 2213 ! 18 3 v 21 w(complete)j Fg(\()p Ft(int)14 b(ignore,)g(int)h ! (invoking_key)p Fg(\))195 2268 y Fu(Complete)21 b(the)g(w)o(ord)e(at)h ! (or)g(b)q(efore)h(p)q(oin)o(t.)37 b(Y)l(ou)21 b(ha)o(v)o(e)f(supplied)j ! (the)d(function)i(that)e(do)q(es)195 2322 y(the)d(initial)h(simple)g ! (matc)o(hing)f(selection)h(algorithm)e(\(see)g Ft ! (rl_completion_matches\(\))e Fu(and)195 2377 y Ft ! (rl_completion_entry_functi)o(on)p Fu(\).)25 b(The)18 b(default)h(is)f(to)f(do)h(\014lename)h(completion.)29 ! b(This)195 2432 y(calls)16 b Ft(rl_complete_internal\(\))c Fu(with)k(an)f(argumen)o(t)f(dep)q(ending)k(on)d Fk(in)o(v)o(oking)p ! 1657 2432 14 2 v 17 w(k)o(ey)p Fu(.)1762 2560 y(F)l(unction)-1861 ! b Fi(int)20 b Fh(rl)p 215 2560 18 3 v 21 w(p)r(ossible)p ! 433 2560 V 20 w(completions)j Fg(\()p Ft(int)15 b(count,)f(int)h ! (invoking_key)p Fg(\))195 2615 y Fu(List)21 b(the)f(p)q(ossible)i (completions.)36 b(See)21 b(description)h(of)e Ft(rl_complete)13 ! b(\(\))p Fu(.)35 b(This)21 b(calls)g Ft(rl_)195 2670 y(complete_internal\(\))13 b Fu(with)i(an)g(argumen)o(t)g(of)f(`)p ! Ft(?)p Fu('.)p eop ! %%Page: 43 45 ! 43 44 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(43)1762 149 y(F)l(unction)-1861 b Fi(int)20 ! b Fh(rl)p 215 149 18 3 v 21 w(insert)p 378 149 V 21 w(completions)j Fg(\()p Ft(int)14 b(count,)g(int)h(invoking_key)p Fg(\))195 ! 204 y Fu(Insert)i(the)g(list)h(of)e(p)q(ossible)j(completions)e(in)o (to)g(the)g(line,)i(deleting)f(the)f(partially-completed)195 ! 259 y(w)o(ord.)k(See)c(description)g(of)e Ft(rl_complete\(\))p Fu(.)20 b(This)d(calls)g Ft(rl_complete_internal\(\))c ! Fu(with)195 314 y(an)i(argumen)o(t)g(of)f(`)p Ft(*)p ! Fu('.)1762 434 y(F)l(unction)-1861 b Fi(int)20 b Fh(rl)p ! 215 434 V 21 w(completion)p 510 434 V 21 w(mo)r(de)h ! Fg(\()p Ft(rl_command_func_t)12 b(*cfunc)p Fg(\))195 ! 489 y Fu(Returns)25 b(the)g(apppriate)h(v)m(alue)g(to)f(pass)g(to)f ! Ft(rl_complete_internal\(\))f Fu(dep)q(ending)k(on)195 ! 543 y(whether)22 b Fk(cfunc)j Fu(w)o(as)d(called)h(t)o(wice)f(in)h ! (succession)g(and)f(the)g(v)m(alue)h(of)f(the)g Ft(show-all-if-)195 ! 598 y(ambiguous)14 b Fu(v)m(ariable.)21 b(Application-sp)q(ec)q(i\014c) ! e(completion)d(functions)g(ma)o(y)f(use)g(this)h(function)195 ! 653 y(to)f(presen)o(t)g(the)g(same)g(in)o(terface)g(as)g ! Ft(rl_complete\(\))p Fu(.)1762 773 y(F)l(unction)-1861 ! b Fi(char)20 b(**)f Fh(rl)p 312 773 V 21 w(completion)p ! 607 773 V 21 w(matc)n(hes)j Fg(\()p Ft(const)15 b(char)f(*text,)283 ! 828 y(rl_compentry_func_t)e(*entry_func)p Fg(\))195 883 ! y Fu(Returns)18 b(an)h(arra)o(y)f(of)g(strings)h(whic)o(h)h(is)g(a)e ! (list)i(of)e(completions)i(for)f Fk(text)p Fu(.)30 b(If)19 ! b(there)g(are)g(no)195 937 y(completions,)f(returns)g ! Ft(NULL)p Fu(.)25 b(The)17 b(\014rst)g(en)o(try)g(in)h(the)f(returned)h ! (arra)o(y)e(is)i(the)f(substitution)195 992 y(for)c Fk(text)p ! Fu(.)18 b(The)c(remaining)g(en)o(tries)f(are)g(the)h(p)q(ossible)g ! (completions.)21 b(The)13 b(arra)o(y)f(is)i(terminated)195 ! 1047 y(with)i(a)e Ft(NULL)h Fu(p)q(oin)o(ter.)195 1115 ! y Fk(en)o(try)p 302 1115 14 2 v 16 w(func)h Fu(is)e(a)f(function)h(of)e ! (t)o(w)o(o)g(args,)g(and)i(returns)f(a)f Ft(char)j(*)p ! Fu(.)k(The)13 b(\014rst)g(argumen)o(t)f(is)i Fk(text)p ! Fu(.)195 1170 y(The)f(second)g(is)f(a)h(state)e(argumen)o(t;)h(it)h(is) ! g(zero)f(on)g(the)h(\014rst)f(call,)i(and)e(non-zero)h(on)f(subsequen)o ! (t)195 1225 y(calls.)20 b Fk(en)o(try)p 420 1225 V 16 ! w(func)15 b Fu(returns)e(a)e Ft(NULL)h Fu(p)q(oin)o(ter)h(to)e(the)i ! (caller)g(when)g(there)f(are)g(no)g(more)g(matc)o(hes.)1762 ! 1345 y(F)l(unction)-1861 b Fi(char)20 b(*)f Fh(rl)p 286 ! 1345 18 3 v 21 w(\014lename)p 515 1345 V 20 w(completion)p ! 809 1345 V 21 w(function)k Fg(\()p Ft(const)15 b(char)f(*text,)h(int) ! 283 1400 y(state)p Fg(\))195 1454 y Fu(A)e(generator)f(function)h(for)g (\014lename)h(completion)f(in)h(the)f(general)g(case.)19 ! b Fk(text)14 b Fu(is)f(a)g(partial)g(\014le-)195 1509 y(name.)20 b(The)15 b(Bash)f(source)h(is)g(a)g(useful)g(reference)h (for)e(writing)h(custom)f(completion)i(functions)195 ! 1564 y(\(the)f(Bash)g(completion)i(functions)e(call)i(this)e(and)h ! (other)f(Readline)h(functions\).)1762 1684 y(F)l(unction)-1861 ! b Fi(char)20 b(*)f Fh(rl)p 286 1684 V 21 w(username)p ! 547 1684 V 19 w(completion)p 840 1684 V 21 w(function)k ! Fg(\()p Ft(const)14 b(char)g(*text,)283 1739 y(int)g(state)p ! Fg(\))195 1794 y Fu(A)g(completion)i(generator)d(for)h(usernames.)19 b Fk(text)c Fu(con)o(tains)f(a)g(partial)h(username)f(preceded)i(b)o(y) ! 195 1848 y(a)f(random)g(c)o(haracter)f(\(usually)j(`)p Ft(~)p Fu('\).)i(As)c(with)g(all)i(completion)f(generators,)e ! Fk(state)j Fu(is)f(zero)f(on)195 1903 y(the)g(\014rst)g(call)h(and)g ! (non-zero)f(for)g(subsequen)o(t)h(calls.)75 2017 y Fj(2.6.3)30 ! b(Completion)20 b(V)-5 b(ariables)1773 2166 y Fu(V)l(ariable)-1861 ! b Fi(rl_compentry_func_t)22 b(*)d Fh(rl)p 678 2166 V ! 21 w(completion)p 973 2166 V 21 w(en)n(try)p 1126 2166 ! V 22 w(function)195 2221 y Fu(A)e(p)q(oin)o(ter)g(to)f(the)h(generator) ! f(function)h(for)f Ft(rl_completion_matches\(\))p Fu(.)22 ! b Ft(NULL)16 b Fu(means)h(to)195 2276 y(use)f Ft (rl_filename_completion_)o(functio)o(n\(\))p Fu(,)c(the)j(default)h ! (\014lename)g(completer.)1773 2396 y(V)l(ariable)-1861 ! b Fi(rl_completion_func_t)22 b(*)d Fh(rl)p 704 2396 V ! 22 w(attempted)p 985 2396 V 20 w(completion)p 1279 2396 ! V 21 w(function)195 2451 y Fu(A)e(p)q(oin)o(ter)h(to)f(an)g(alternativ) ! o(e)h(function)g(to)f(create)g(matc)o(hes.)26 b(The)18 ! b(function)g(is)g(called)h(with)195 2506 y Fk(text)p ! Fu(,)11 b Fk(start)p Fu(,)g(and)h Fk(end)p Fu(.)19 b ! Fk(start)11 b Fu(and)h Fk(end)i Fu(are)d(indices)i(in)g ! Ft(rl_line_buffer)c Fu(de\014ning)k(the)f(b)q(ound-)195 ! 2560 y(aries)h(of)g Fk(text)p Fu(,)f(whic)o(h)i(is)g(a)e(c)o(haracter)h ! (string.)19 b(If)13 b(this)g(function)h(exists)g(and)f(returns)g ! Ft(NULL)p Fu(,)f(or)g(if)195 2615 y(this)f(v)m(ariable)i(is)e(set)g(to) ! f Ft(NULL)p Fu(,)h(then)g Ft(rl_complete\(\))e Fu(will)k(call)f(the)f ! (v)m(alue)h(of)f Ft(rl_completion_)195 2670 y(entry_function)h Fu(to)i(generate)g(matc)o(hes,)f(otherwise)i(the)f(arra)o(y)f(of)h ! (strings)g(returned)g(will)i(b)q(e)p eop ! %%Page: 44 46 ! 44 45 bop 75 -58 a Fu(44)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y(used.)j(If)12 b(this)f(function)h(sets)f(the)g ! Ft(rl_attempted_completion_over)d Fu(v)m(ariable)k(to)f(a)g(non-zero) ! 195 204 y(v)m(alue,)18 b(Readline)h(will)f(not)f(p)q(erform)f(its)i ! (default)f(completion)h(ev)o(en)f(if)h(this)f(function)h(returns)195 ! 259 y(no)d(matc)o(hes.)1773 380 y(V)l(ariable)-1861 b ! Fi(rl_quote_func_t)21 b(*)f Fh(rl)p 574 380 18 3 v 21 ! w(\014lename)p 803 380 V 20 w(quoting)p 1012 380 V 21 ! w(function)195 434 y Fu(A)c(p)q(oin)o(ter)h(to)f(a)g(function)h(that)e ! (will)j(quote)e(a)g(\014lename)i(in)f(an)f(application-sp)q(eci\014)q ! (c)j(fashion.)195 489 y(This)h(is)g(called)i(if)e(\014lename)g ! (completion)h(is)f(b)q(eing)h(attempted)e(and)h(one)g(of)f(the)h(c)o ! (haracters)195 544 y(in)d Ft(rl_filename_quote_characters)c ! Fu(app)q(ears)k(in)g(a)g(completed)g(\014lename.)25 b(The)17 ! b(function)195 599 y(is)i(called)i(with)e Fk(text)p Fu(,)g ! Fk(matc)o(h)p 722 599 14 2 v 16 w(t)o(yp)q(e)p Fu(,)g(and)g ! Fk(quote)p 1059 599 V 17 w(p)q(oin)o(ter)p Fu(.)31 b(The)19 ! b Fk(text)h Fu(is)f(the)g(\014lename)h(to)e(b)q(e)195 ! 654 y(quoted.)39 b(The)21 b Fk(matc)o(h)p 607 654 V 16 ! w(t)o(yp)q(e)j Fu(is)e(either)g Ft(SINGLE_MATCH)p Fu(,)f(if)h(there)f ! (is)h(only)g(one)g(completion)195 708 y(matc)o(h,)15 ! b(or)g Ft(MULT_MATCH)p Fu(.)20 b(Some)c(functions)g(use)g(this)g(to)f ! (decide)j(whether)e(or)f(not)g(to)g(insert)h(a)195 763 ! y(closing)c(quote)e(c)o(haracter.)18 b(The)11 b Fk(quote)p ! 877 763 V 16 w(p)q(oin)o(ter)k Fu(is)c(a)f(p)q(oin)o(ter)i(to)e(an)o(y) ! g(op)q(ening)i(quote)f(c)o(haracter)195 818 y(the)k(user)h(t)o(yp)q ! (ed.)k(Some)15 b(functions)h(c)o(ho)q(ose)f(to)g(reset)g(this)g(c)o ! (haracter.)1773 938 y(V)l(ariable)-1861 b Fi(rl_dequote_func_t)22 ! b(*)d Fh(rl)p 626 938 18 3 v 21 w(\014lename)p 855 938 ! V 20 w(dequoting)p 1122 938 V 21 w(function)195 993 y ! Fu(A)c(p)q(oin)o(ter)g(to)f(a)h(function)g(that)g(will)h(remo)o(v)o(e)e ! (application-sp)q(eci\014)q(c)k(quoting)d(c)o(haracters)f(from)195 ! 1048 y(a)i(\014lename)h(b)q(efore)g(completion)g(is)g(attempted,)f(so)f ! (those)h(c)o(haracters)g(do)g(not)g(in)o(terfere)h(with)195 ! 1103 y(matc)o(hing)i(the)g(text)g(against)f(names)h(in)h(the)f ! (\014lesystem.)33 b(It)19 b(is)g(called)i(with)e Fk(text)p ! Fu(,)g(the)g(text)195 1158 y(of)i(the)g(w)o(ord)g(to)g(b)q(e)h ! (dequoted,)h(and)e Fk(quote)p 1009 1158 14 2 v 17 w(c)o(har)p Fu(,)h(whic)o(h)g(is)g(the)f(quoting)h(c)o(haracter)f(that)195 ! 1212 y(delimits)d(the)e(\014lename)i(\(usually)f(`)p Ft(')p Fu(')f(or)f(`)p Ft(")p Fu('\).)22 b(If)17 b Fk(quote)p ! 1187 1212 V 16 w(c)o(har)i Fu(is)e(zero,)f(the)g(\014lename)i(w)o(as)d ! (not)195 1267 y(in)h(an)f(em)o(b)q(edded)i(string.)1773 ! 1388 y(V)l(ariable)-1861 b Fi(rl_linebuf_func_t)22 b(*)d ! Fh(rl)p 626 1388 18 3 v 21 w(c)n(har)p 754 1388 V 21 ! w(is)p 813 1388 V 21 w(quoted)p 1005 1388 V 21 w(p)195 ! 1443 y Fu(A)f(p)q(oin)o(ter)h(to)f(a)g(function)h(to)f(call)i(that)d (determines)j(whether)e(or)g(not)g(a)g(sp)q(eci\014c)j(c)o(haracter)195 ! 1497 y(in)d(the)f(line)i(bu\013er)e(is)h(quoted,)g(according)f(to)g (whatev)o(er)f(quoting)i(mec)o(hanism)g(the)f(program)195 ! 1552 y(calling)d(Readline)g(uses.)19 b(The)13 b(function)g(is)g(called) h(with)f(t)o(w)o(o)e(argumen)o(ts:)17 b Fk(text)p Fu(,)12 ! b(the)h(text)f(of)g(the)195 1607 y(line,)17 b(and)e Fk(index)p Fu(,)i(the)e(index)i(of)e(the)g(c)o(haracter)g(in)h(the)g(line.)22 ! b(It)15 b(is)h(used)g(to)f(decide)i(whether)e(a)195 1662 y(c)o(haracter)f(found)i(in)g Ft(rl_completer_word_break_)o(charact)o ! (ers)c Fu(should)k(b)q(e)g(used)g(to)e(break)195 1717 ! y(w)o(ords)g(for)h(the)g(completer.)1773 1837 y(V)l(ariable)-1861 ! b Fi(rl_compignore_func_t)22 b(*)d Fh(rl)p 704 1837 V ! 22 w(ignore)p 881 1837 V 20 w(some)p 1028 1837 V 19 w(completions)p ! 1344 1837 V 21 w(function)195 1892 y Fu(This)g(function,)i(if)e (de\014ned,)i(is)e(called)h(b)o(y)f(the)g(completer)g(when)h(real)f ! (\014lename)h(completion)195 1947 y(is)e(done,)f(after)f(all)i(the)f (matc)o(hing)g(names)g(ha)o(v)o(e)g(b)q(een)h(generated.)25 ! b(It)17 b(is)h(passed)f(a)g Ft(NULL)f Fu(ter-)195 2001 y(minated)g(arra)o(y)e(of)h(matc)o(hes.)20 b(The)c(\014rst)f(elemen)o (t)h(\()p Ft(matches[0])p Fu(\))d(is)j(the)g(maximal)g(substring)195 ! 2056 y(common)e(to)g(all)h(matc)o(hes.)k(This)c(function)g(can)g (re-arrange)f(the)g(list)h(of)f(matc)o(hes)g(as)g(required,)195 ! 2111 y(but)h(eac)o(h)h(elemen)o(t)g(deleted)g(from)f(the)g(arra)o(y)f ! (m)o(ust)g(b)q(e)i(freed.)1773 2232 y(V)l(ariable)-1861 ! b Fi(rl_icppfunc_t)21 b(*)e Fh(rl)p 521 2232 V 21 w(directory)p ! 769 2232 V 22 w(completion)p 1065 2232 V 21 w(ho)r(ok)195 ! 2286 y Fu(This)k(function,)i(if)e(de\014ned,)j(is)d(allo)o(w)o(ed)g(to) f(mo)q(dify)h(the)g(directory)g(p)q(ortion)g(of)f(\014lenames)195 ! 2341 y(Readline)e(completes.)29 b(It)19 b(is)f(called)i(with)f(the)f (address)h(of)e(a)h(string)h(\(the)f(curren)o(t)g(directory)195 ! 2396 y(name\))g(as)g(an)h(argumen)o(t,)f(and)h(ma)o(y)f(mo)q(dify)h (that)f(string.)30 b(If)19 b(the)f(string)h(is)g(replaced)h(with)195 ! 2451 y(a)g(new)g(string,)h(the)f(old)g(v)m(alue)h(should)g(b)q(e)g (freed.)34 b(An)o(y)20 b(mo)q(di\014ed)i(directory)e(name)g(should)195 ! 2506 y(ha)o(v)o(e)14 b(a)g(trailing)i(slash.)k(The)15 b(mo)q(di\014ed)h(v)m(alue)g(will)g(b)q(e)f(displa)o(y)o(ed)h(as)e ! (part)g(of)h(the)f(completion,)195 2560 y(replacing)h(the)g(directory)f (p)q(ortion)g(of)g(the)g(pathname)g(the)h(user)f(t)o(yp)q(ed.)20 ! b(It)14 b(returns)g(an)g(in)o(teger)195 2615 y(that)i(should)h(b)q(e)g (non-zero)g(if)g(the)g(function)g(mo)q(di\014es)h(its)e(directory)h ! (argumen)o(t.)23 b(It)17 b(could)g(b)q(e)195 2670 y(used)f(to)e(expand) i(sym)o(b)q(olic)h(links)f(or)f(shell)i(v)m(ariables)f(in)g(pathnames.) ! p eop %%Page: 45 47 45 46 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(45)1773 149 y(V)l(ariable)-1861 b Fi ! (rl_compdisp_func_t)22 b(*)d Fh(rl)p 652 149 18 3 v 21 ! w(completion)p 947 149 V 21 w(displa)n(y)p 1141 149 V ! 22 w(matc)n(hes)p 1366 149 V 21 w(ho)r(ok)195 204 y Fu(If)11 ! b(non-zero,)h(then)f(this)h(is)f(the)g(address)g(of)g(a)g(function)g ! (to)g(call)h(when)f(completing)i(a)d(w)o(ord)h(w)o(ould)195 ! 259 y(normally)h(displa)o(y)g(the)f(list)h(of)f(p)q(ossible)h(matc)o ! (hes.)18 b(This)12 b(function)g(is)g(called)g(in)g(lieu)h(of)e ! (Readline)195 314 y(displa)o(ying)21 b(the)d(list.)32 ! b(It)19 b(tak)o(es)f(three)h(argumen)o(ts:)26 b(\()p ! Ft(char)14 b(**)p Fk(matc)o(hes)p Fu(,)19 b Ft(int)f ! Fk(n)o(um)p 1688 314 14 2 v 17 w(matc)o(hes)p Fu(,)195 ! 369 y Ft(int)13 b Fk(max)p 368 369 V 16 w(length)p Fu(\))i(where)f ! Fk(matc)o(hes)h Fu(is)f(the)g(arra)o(y)f(of)g(matc)o(hing)h(strings,)g ! Fk(n)o(um)p 1578 369 V 16 w(matc)o(hes)i Fu(is)e(the)195 ! 423 y(n)o(um)o(b)q(er)h(of)f(strings)h(in)h(that)e(arra)o(y)l(,)f(and)i ! Fk(max)p 1012 423 V 16 w(length)h Fu(is)f(the)g(length)g(of)g(the)f ! (longest)h(string)g(in)195 478 y(that)e(arra)o(y)l(.)19 ! b(Readline)c(pro)o(vides)g(a)e(con)o(v)o(enience)j(function,)f ! Ft(rl_display_match_list)p Fu(,)c(that)195 533 y(tak)o(es)17 ! b(care)g(of)g(doing)h(the)f(displa)o(y)i(to)d(Readline's)j(output)e ! (stream.)26 b(That)16 b(function)j(ma)o(y)d(b)q(e)195 ! 588 y(called)h(from)d(this)i(ho)q(ok.)1773 704 y(V)l(ariable)-1861 ! b Fi(const)20 b(char)g(*)f Fh(rl)p 436 704 18 3 v 21 ! w(basic)p 580 704 V 21 w(w)n(ord)p 725 704 V 21 w(break)p ! 886 704 V 20 w(c)n(haracters)195 759 y Fu(The)j(basic)h(list)g(of)f(c)o ! (haracters)f(that)g(signal)i(a)f(break)g(b)q(et)o(w)o(een)g(w)o(ords)g ! (for)f(the)h(completer)195 814 y(routine.)30 b(The)19 ! b(default)g(v)m(alue)h(of)e(this)h(v)m(ariable)h(is)f(the)g(c)o ! (haracters)f(whic)o(h)h(break)g(w)o(ords)f(for)195 869 ! y(completion)e(in)g(Bash:)k Ft(")15 b(\\t\\n\\"\\\\'`@$><=;|&{\(")p ! Fu(.)1773 985 y(V)l(ariable)-1861 b Fi(const)20 b(char)g(*)f ! Fh(rl)p 436 985 V 21 w(basic)p 580 985 V 21 w(quote)p ! 740 985 V 21 w(c)n(haracters)195 1040 y Fu(A)c(list)h(of)f(quote)g(c)o ! (haracters)f(whic)o(h)i(can)g(cause)f(a)g(w)o(ord)g(break.)1773 ! 1156 y(V)l(ariable)-1861 b Fi(const)20 b(char)g(*)f Fh(rl)p ! 436 1156 V 21 w(completer)p 705 1156 V 21 w(w)n(ord)p ! 850 1156 V 20 w(break)p 1010 1156 V 20 w(c)n(haracters)195 ! 1211 y Fu(The)33 b(list)g(of)f(c)o(haracters)g(that)f(signal)j(a)e ! (break)g(b)q(et)o(w)o(een)h(w)o(ords)f(for)g Ft(rl_complete_)195 ! 1266 y(internal\(\))p Fu(.)18 b(The)e(default)g(list)g(is)f(the)h(v)m ! (alue)g(of)f Ft(rl_basic_word_break_chara)o(cters)p Fu(.)1773 ! 1382 y(V)l(ariable)-1861 b Fi(const)20 b(char)g(*)f Fh(rl)p ! 436 1382 V 21 w(completer)p 705 1382 V 21 w(quote)p 865 ! 1382 V 20 w(c)n(haracters)195 1437 y Fu(A)e(list)h(of)e(c)o(haracters)g ! (whic)o(h)i(can)f(b)q(e)g(used)h(to)e(quote)h(a)f(substring)h(of)g(the) ! g(line.)26 b(Completion)195 1492 y(o)q(ccurs)13 b(on)h(the)f(en)o(tire) ! g(substring,)h(and)f(within)i(the)e(substring)g Ft ! (rl_completer_word_break_)195 1547 y(characters)j Fu(are)h(treated)g ! (as)h(an)o(y)f(other)g(c)o(haracter,)g(unless)i(they)e(also)h(app)q ! (ear)g(within)h(this)195 1601 y(list.)1773 1718 y(V)l(ariable)-1861 ! b Fi(const)20 b(char)g(*)f Fh(rl)p 436 1718 V 21 w(\014lename)p ! 665 1718 V 20 w(quote)p 824 1718 V 21 w(c)n(haracters)195 ! 1773 y Fu(A)e(list)h(of)e(c)o(haracters)g(that)g(cause)h(a)g ! (\014lename)h(to)e(b)q(e)i(quoted)e(b)o(y)h(the)g(completer)h(when)f ! (they)195 1828 y(app)q(ear)e(in)h(a)f(completed)h(\014lename.)21 ! b(The)16 b(default)g(is)f(the)h(n)o(ull)g(string.)1773 ! 1944 y(V)l(ariable)-1861 b Fi(const)20 b(char)g(*)f Fh(rl)p ! 436 1944 V 21 w(sp)r(ecial)p 623 1944 V 22 w(pre\014xes)195 ! 1999 y Fu(The)14 b(list)h(of)e(c)o(haracters)g(that)g(are)h(w)o(ord)f ! (break)h(c)o(haracters,)f(but)h(should)h(b)q(e)f(left)g(in)h ! Fk(text)f Fu(when)195 2054 y(it)f(is)f(passed)h(to)f(the)g(completion)h ! (function.)20 b(Programs)11 b(can)h(use)h(this)g(to)f(help)h(determine) ! h(what)195 2108 y(kind)i(of)e(completing)i(to)e(do.)19 ! b(F)l(or)14 b(instance,)i(Bash)e(sets)h(this)g(v)m(ariable)h(to)e ! Ft(")p Fu($)p Ft(@")g Fu(so)g(that)g(it)h(can)195 2163 ! y(complete)h(shell)h(v)m(ariables)f(and)g(hostnames.)1773 ! 2280 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 2280 ! V 21 w(completion)p 510 2280 V 21 w(query)p 673 2280 ! V 21 w(items)195 2334 y Fu(Up)e(to)g(this)g(man)o(y)g(items)g(will)i(b) ! q(e)f(displa)o(y)o(ed)g(in)g(resp)q(onse)g(to)e(a)h(p)q ! (ossible-completions)j(call.)195 2389 y(After)14 b(that,)f(w)o(e)h(ask) ! g(the)h(user)f(if)h(she)f(is)h(sure)g(she)f(w)o(an)o(ts)f(to)h(see)h ! (them)f(all.)20 b(The)15 b(default)g(v)m(alue)195 2444 ! y(is)h(100.)1773 2560 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 2560 V 21 w(completion)p 510 2560 V 21 ! w(app)r(end)p 715 2560 V 19 w(c)n(haracter)195 2615 y ! Fu(When)d(a)f(single)i(completion)g(alternativ)o(e)f(matc)o(hes)f(at)g ! (the)h(end)g(of)f(the)h(command)f(line,)j(this)195 2670 ! y(c)o(haracter)10 b(is)h(app)q(ended)i(to)d(the)g(inserted)i ! (completion)g(text.)18 b(The)11 b(default)g(is)g(a)g(space)g(c)o ! (haracter)p eop %%Page: 46 48 46 47 bop 75 -58 a Fu(46)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y(\(`)e('\).)19 b(Setting)14 b(this)f(to)g(the)g(n)o(ull)i(c)o ! (haracter)e(\(`)p Ft(\\0)p Fu('\))e(prev)o(en)o(ts)i(an)o(ything)h(b)q ! (eing)h(app)q(ended)f(auto-)195 204 y(matically)l(.)21 ! b(This)15 b(can)f(b)q(e)h(c)o(hanged)g(in)g(custom)f(completion)i ! (functions)f(to)f(pro)o(vide)h(the)f(\\most)195 259 y(sensible)i(w)o ! (ord)c(separator)h(c)o(haracter")f(according)i(to)f(an)h ! (application-sp)q(eci\014c)j(command)c(line)195 314 y(syn)o(tax)h(sp)q ! (eci\014cation.)1773 423 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 423 18 3 v 21 w(completion)p 510 423 V ! 21 w(suppress)p 746 423 V 19 w(app)r(end)195 478 y Fu(If)e(non-zero,)g ! Fk(rl)p 476 478 14 2 v 17 w(completion)p 709 478 V 18 ! w(app)q(end)p 871 478 V 17 w(c)o(haracter)i Fu(is)f(not)e(app)q(ended)i ! (to)e(matc)o(hes)g(at)h(the)f(end)195 533 y(of)c(the)h(command)g(line,) ! h(as)f(describ)q(ed)h(ab)q(o)o(v)o(e.)k(It)14 b(is)h(set)e(to)g(0)h(b)q ! (efore)g(an)o(y)f(application-sp)q(eci)q(\014c)195 588 ! y(completion)j(function)g(is)g(called.)1773 697 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 697 18 3 v 21 w(completion)p ! 510 697 V 21 w(mark)p 662 697 V 19 w(symlink)p 875 697 ! V 21 w(dirs)195 752 y Fu(If)c(non-zero,)g(a)g(slash)g(will)i(b)q(e)e ! (app)q(ended)i(to)d(completed)i(\014lenames)g(that)e(are)g(sym)o(b)q ! (olic)j(links)195 807 y(to)11 b(directory)i(names,)f(sub)s(ject)g(to)f ! (the)i(v)m(alue)g(of)f(the)g(user-settable)g Fk(mark-directories)j ! Fu(v)m(ariable.)195 862 y(This)i(v)m(ariable)h(exists)f(so)g(that)e ! (application)k(completion)f(functions)f(can)g(o)o(v)o(erride)g(the)f ! (user's)195 917 y(global)f(preference)g(\(set)e(via)h(the)g ! Fk(mark-symlink)o(ed-directories)k Fu(Readline)e(v)m(ariable\))f(if)f ! (appro-)195 971 y(priate.)20 b(This)15 b(v)m(ariable)g(is)g(set)f(to)f ! (the)i(user's)e(preference)j(b)q(efore)e(an)o(y)g(application)i ! (completion)195 1026 y(function)j(is)g(called,)h(so)e(unless)h(that)f ! (function)h(mo)q(di\014es)g(the)f(v)m(alue,)i(the)e(user's)g ! (preferences)195 1081 y(are)d(honored.)1773 1191 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1191 V 21 w(ignore)p 391 1191 ! V 20 w(completion)p 685 1191 V 21 w(duplicates)195 1245 ! y Fu(If)15 b(non-zero,)h(then)f(duplicates)i(in)f(the)f(matc)o(hes)g ! (are)g(remo)o(v)o(ed.)k(The)d(default)g(is)f(1.)1773 ! 1355 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p 215 1355 ! V 21 w(\014lename)p 444 1355 V 20 w(completion)p 738 ! 1355 V 21 w(desired)195 1410 y Fu(Non-zero)c(means)g(that)f(the)h ! (results)g(of)g(the)g(matc)o(hes)f(are)h(to)f(b)q(e)i(treated)e(as)g ! (\014lenames.)23 b(This)195 1465 y(is)14 b Fl(always)j ! Fu(zero)c(on)g(en)o(try)l(,)g(and)h(can)f(only)h(b)q(e)g(c)o(hanged)f ! (within)i(a)e(completion)h(en)o(try)f(generator)195 1519 ! y(function.)38 b(If)21 b(it)g(is)g(set)g(to)f(a)g(non-zero)h(v)m(alue,) ! i(directory)e(names)g(ha)o(v)o(e)g(a)f(slash)h(app)q(ended)195 ! 1574 y(and)d(Readline)h(attempts)d(to)h(quote)g(completed)i ! (\014lenames)f(if)g(they)g(con)o(tain)g(an)o(y)f(c)o(haracters)195 ! 1629 y(in)f Ft(rl_filename_quote_character)o(s)d Fu(and)i ! Ft(rl_filename_quoting_desired)d Fu(is)k(set)f(to)f(a)195 ! 1684 y(non-zero)h(v)m(alue.)1773 1793 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 1793 V 21 w(\014lename)p 444 ! 1793 V 20 w(quoting)p 653 1793 V 21 w(desired)195 1848 ! y Fu(Non-zero)14 b(means)g(that)f(the)i(results)f(of)g(the)g(matc)o ! (hes)f(are)h(to)f(b)q(e)i(quoted)f(using)h(double)g(quotes)195 ! 1903 y(\(or)c(an)h(application-sp)q(eci\014)q(c)j(quoting)d(mec)o ! (hanism\))g(if)h(the)f(completed)h(\014lename)g(con)o(tains)f(an)o(y) ! 195 1958 y(c)o(haracters)i(in)i Ft(rl_filename_quote_chars)p ! Fu(.)h(This)f(is)f Fl(always)k Fu(non-zero)d(on)f(en)o(try)l(,)f(and)i ! (can)195 2012 y(only)c(b)q(e)g(c)o(hanged)g(within)h(a)f(completion)g ! (en)o(try)g(generator)e(function.)20 b(The)12 b(quoting)g(is)g ! (e\013ected)195 2067 y(via)j(a)g(call)i(to)d(the)i(function)g(p)q(oin)o ! (ted)g(to)e(b)o(y)h Ft(rl_filename_quoting_function)p ! Fu(.)1773 2177 y(V)l(ariable)-1861 b Fi(int)20 b Fh(rl)p ! 215 2177 V 21 w(attempted)p 495 2177 V 20 w(completion)p ! 789 2177 V 21 w(o)n(v)n(er)195 2232 y Fu(If)47 b(an)g(application-sp)q ! (eci\014)q(c)j(completion)e(function)g(assigned)f(to)g ! Ft(rl_attempted_)195 2286 y(completion_function)24 b ! Fu(sets)i(this)h(v)m(ariable)h(to)e(a)g(non-zero)h(v)m(alue,)j ! (Readline)e(will)g(not)195 2341 y(p)q(erform)15 b(its)g(default)g ! (\014lename)h(completion)g(ev)o(en)f(if)g(the)g(application's)h ! (completion)g(function)195 2396 y(returns)f(no)g(matc)o(hes.)20 ! b(It)15 b(should)h(b)q(e)g(set)f(only)h(b)o(y)f(an)g(application's)h ! (completion)h(function.)1773 2506 y(V)l(ariable)-1861 ! b Fi(int)20 b Fh(rl)p 215 2506 V 21 w(completion)p 510 ! 2506 V 21 w(t)n(yp)r(e)195 2560 y Fu(Set)e(to)e(a)i(c)o(haracter)f ! (describing)i(the)e(t)o(yp)q(e)h(of)f(completion)i(Readline)g(is)f ! (curren)o(tly)g(attempt-)195 2615 y(ing;)g(see)f(the)f(description)i ! (of)f Ft(rl_complete_internal\(\))c Fu(\(see)k(Section)h(2.6.2)d ! ([Completion)195 2670 y(F)l(unctions],)g(page)g(42\))g(for)f(the)h ! (list)h(of)f(c)o(haracters.)p eop %%Page: 47 49 47 48 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(47)1773 149 y(V)l(ariable)-1861 b Fi(int)20 ! b Fh(rl)p 215 149 18 3 v 21 w(inhibit)p 399 149 V 23 ! w(completion)195 204 y Fu(If)14 b(this)h(v)m(ariable)g(is)g(non-zero,)f ! (completion)i(is)e(inhibited.)22 b(The)15 b(completion)g(c)o(haracter)e ! (will)j(b)q(e)195 259 y(inserted)g(as)f(an)o(y)g(other)g(b)q(ound)h(to) ! e Ft(self-insert)p Fu(.)75 371 y Fj(2.6.4)30 b(A)21 b(Short)f ! (Completion)g(Example)137 467 y Fu(Here)11 b(is)f(a)g(small)h ! (application)h(demonstrating)e(the)g(use)h(of)e(the)i(GNU)f(Readline)h ! (library)l(.)19 b(It)11 b(is)f(called)75 522 y Ft(fileman)p ! Fu(,)17 b(and)h(the)g(source)g(co)q(de)g(resides)h(in)f(`)p ! Ft(examples/fileman.c)p Fu('.)25 b(This)18 b(sample)g(application)75 ! 577 y(pro)o(vides)c(completion)g(of)e(command)h(names,)g(line)i ! (editing)g(features,)d(and)i(access)f(to)f(the)h(history)h(list.)p ! eop ! %%Page: 48 50 ! 48 49 bop 75 -58 a Fu(48)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y Ft(/*)24 b(fileman.c)e(--)i(A)g(tiny)f(application)f(which)h ! (demonstrates)g(how)g(to)h(use)f(the)267 201 y(GNU)g(Readline)g ! (library.)46 b(This)24 b(application)e(interactively)g(allows)h(users) ! 267 253 y(to)g(manipulate)g(files)g(and)g(their)g(modes.)h(*/)195 ! 357 y(#include)f()195 409 y(#include)g()195 ! 461 y(#include)g()195 513 y(#include)g()195 ! 565 y(#include)g()195 668 y(#include)g ! ()195 720 y(#include)g()195 ! 824 y(extern)g(char)g(*xmalloc)g(\(\);)195 928 y(/*)h(The)f(names)g(of) ! h(functions)e(that)i(actually)f(do)g(the)h(manipulation.)e(*/)195 ! 980 y(int)h(com_list)g(__P\(\(char)g(*\)\);)195 1032 ! y(int)g(com_view)g(__P\(\(char)g(*\)\);)195 1083 y(int)g(com_rename)g ! (__P\(\(char)g(*\)\);)195 1135 y(int)g(com_stat)g(__P\(\(char)g(*\)\);) ! 195 1187 y(int)g(com_pwd)g(__P\(\(char)g(*\)\);)195 1239 ! y(int)g(com_delete)g(__P\(\(char)g(*\)\);)195 1291 y(int)g(com_help)g ! (__P\(\(char)g(*\)\);)195 1343 y(int)g(com_cd)g(__P\(\(char)g(*\)\);) ! 195 1395 y(int)g(com_quit)g(__P\(\(char)g(*\)\);)195 ! 1499 y(/*)h(A)f(structure)g(which)g(contains)g(information)f(on)i(the)f ! (commands)g(this)g(program)267 1550 y(can)g(understand.)f(*/)195 ! 1654 y(typedef)h(struct)g({)243 1706 y(char)g(*name;)g(/*)h(User)f ! (printable)g(name)g(of)h(the)f(function.)g(*/)243 1758 ! y(rl_icpfunc_t)f(*func;)h(/*)h(Function)e(to)i(call)f(to)h(do)f(the)h ! (job.)f(*/)243 1810 y(char)g(*doc;)g(/*)h(Documentation)e(for)h(this)h ! (function.)46 b(*/)195 1862 y(})24 b(COMMAND;)195 1966 ! y(COMMAND)f(commands[])f(=)i({)243 2017 y({)f("cd",)h(com_cd,)f ! ("Change)f(to)i(directory)f(DIR")g(},)243 2069 y({)g("delete",)g ! (com_delete,)f("Delete)h(FILE")h(},)243 2121 y({)f("help",)g(com_help,) ! g("Display)g(this)g(text")g(},)243 2173 y({)g("?",)h(com_help,)e ! ("Synonym)h(for)h(`help'")f(},)243 2225 y({)g("list",)g(com_list,)g ! ("List)g(files)g(in)h(DIR")f(},)243 2277 y({)g("ls",)h(com_list,)e ! ("Synonym)h(for)g(`list'")g(},)243 2329 y({)g("pwd",)g(com_pwd,)g ! ("Print)g(the)h(current)f(working)g(directory")f(},)243 ! 2381 y({)h("quit",)g(com_quit,)g("Quit)g(using)g(Fileman")g(},)243 ! 2433 y({)g("rename",)g(com_rename,)f("Rename)h(FILE)h(to)f(NEWNAME")g ! (},)243 2484 y({)g("stat",)g(com_stat,)g("Print)g(out)g(statistics)g ! (on)h(FILE")f(},)243 2536 y({)g("view",)g(com_view,)g("View)g(the)h ! (contents)e(of)i(FILE")f(},)243 2588 y({)g(\(char)h(*\)NULL,)f ! (\(rl_icpfunc_t)f(*\)NULL,)h(\(char)g(*\)NULL)g(})195 ! 2640 y(};)p eop ! %%Page: 49 51 ! 49 50 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(49)195 201 y Ft(/*)24 b(Forward)e(declarations.)h(*/) ! 195 253 y(char)g(*stripwhite)g(\(\);)195 305 y(COMMAND)g(*find_command) ! f(\(\);)195 409 y(/*)i(The)f(name)g(of)h(this)f(program,)g(as)h(taken)f ! (from)g(argv[0].)g(*/)195 461 y(char)g(*progname;)195 ! 565 y(/*)h(When)f(non-zero,)g(this)g(means)g(the)g(user)h(is)f(done)h ! (using)f(this)g(program.)g(*/)195 616 y(int)g(done;)195 ! 720 y(char)g(*)195 772 y(dupstr)g(\(s\))314 824 y(int)h(s;)195 ! 876 y({)243 928 y(char)f(*r;)243 1032 y(r)g(=)h(xmalloc)f(\(strlen)g ! (\(s\))g(+)h(1\);)243 1083 y(strcpy)f(\(r,)g(s\);)243 ! 1135 y(return)g(\(r\);)195 1187 y(})195 1291 y(main)g(\(argc,)g(argv\)) ! 314 1343 y(int)h(argc;)314 1395 y(char)g(**argv;)195 ! 1447 y({)243 1499 y(char)f(*line,)g(*s;)243 1602 y(progname)f(=)i ! (argv[0];)243 1706 y(initialize_readline)d(\(\);)i(/*)h(Bind)f(our)h ! (completer.)e(*/)243 1810 y(/*)h(Loop)h(reading)f(and)g(executing)g ! (lines)g(until)g(the)g(user)h(quits.)f(*/)243 1862 y(for)g(\()h(;)g ! (done)f(==)h(0;)f(\))290 1914 y({)338 1966 y(line)g(=)h(readline)f ! (\("FileMan:)f("\);)338 2069 y(if)i(\(!line\))386 2121 ! y(break;)338 2225 y(/*)g(Remove)f(leading)g(and)g(trailing)g ! (whitespace)f(from)i(the)f(line.)410 2277 y(Then,)g(if)h(there)f(is)g ! (anything)g(left,)g(add)h(it)f(to)h(the)f(history)g(list)410 ! 2329 y(and)g(execute)g(it.)h(*/)338 2381 y(s)g(=)g(stripwhite)e ! (\(line\);)338 2484 y(if)i(\(*s\))386 2536 y({)434 2588 ! y(add_history)e(\(s\);)434 2640 y(execute_line)g(\(s\);)p ! eop ! %%Page: 50 52 ! 50 51 bop 75 -58 a Fu(50)1299 b(GNU)15 b(Readline)h(Library)386 ! 149 y Ft(})338 253 y(free)23 b(\(line\);)290 305 y(})243 ! 357 y(exit)g(\(0\);)195 409 y(})195 513 y(/*)h(Execute)e(a)i(command)f ! (line.)g(*/)195 565 y(int)195 616 y(execute_line)f(\(line\))314 ! 668 y(char)i(*line;)195 720 y({)243 772 y(register)e(int)i(i;)243 824 y(COMMAND)f(*command;)243 876 y(char)g(*word;)243 980 y(/*)g(Isolate)g(the)h(command)f(word.)g(*/)243 1032 *************** *** 4102,4120 **** b(Return)23 b(a)h(NULL)f(pointer)g(if)h(NAME)f(isn't)g(a)h(command)f (name.)g(*/)195 2640 y(COMMAND)g(*)p eop ! %%Page: 48 50 ! 48 49 bop 75 -58 a Fu(48)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y Ft(find_command)22 b(\(name\))314 201 y(char)i(*name;)195 ! 253 y({)243 305 y(register)e(int)i(i;)243 409 y(for)f(\(i)h(=)f(0;)h ! (commands[i].name;)e(i++\))290 461 y(if)i(\(strcmp)f(\(name,)g ! (commands[i].name\))f(==)h(0\))338 513 y(return)g(\(&commands[i]\);)243 ! 616 y(return)g(\(\(COMMAND)f(*\)NULL\);)195 668 y(})195 ! 772 y(/*)i(Strip)f(whitespace)f(from)i(the)f(start)g(and)h(end)f(of)h ! (STRING.)46 b(Return)24 b(a)f(pointer)267 824 y(into)g(STRING.)g(*/)195 ! 876 y(char)g(*)195 928 y(stripwhite)f(\(string\))314 ! 980 y(char)i(*string;)195 1032 y({)243 1083 y(register)e(char)i(*s,)f ! (*t;)243 1187 y(for)g(\(s)h(=)f(string;)g(whitespace)g(\(*s\);)g(s++\)) ! 290 1239 y(;)243 1343 y(if)g(\(*s)h(==)f(0\))290 1395 ! y(return)g(\(s\);)243 1499 y(t)g(=)h(s)g(+)g(strlen)f(\(s\))g(-)h(1;) ! 243 1550 y(while)f(\(t)g(>)h(s)g(&&)g(whitespace)e(\(*t\)\))290 1602 y(t--;)243 1654 y(*++t)h(=)h('\\0';)243 1758 y(return)f(s;)195 1810 y(})195 1914 y(/*)h(***********************)o(*******)o(********)o --- 4222,4241 ---- b(Return)23 b(a)h(NULL)f(pointer)g(if)h(NAME)f(isn't)g(a)h(command)f (name.)g(*/)195 2640 y(COMMAND)g(*)p eop ! %%Page: 51 53 ! 51 52 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(51)195 149 y Ft(find_command)22 b(\(name\))314 ! 201 y(char)i(*name;)195 253 y({)243 305 y(register)e(int)i(i;)243 ! 409 y(for)f(\(i)h(=)f(0;)h(commands[i].name;)e(i++\))290 ! 461 y(if)i(\(strcmp)f(\(name,)g(commands[i].name\))f(==)h(0\))338 ! 513 y(return)g(\(&commands[i]\);)243 616 y(return)g(\(\(COMMAND)f ! (*\)NULL\);)195 668 y(})195 772 y(/*)i(Strip)f(whitespace)f(from)i(the) ! f(start)g(and)h(end)f(of)h(STRING.)46 b(Return)24 b(a)f(pointer)267 ! 824 y(into)g(STRING.)g(*/)195 876 y(char)g(*)195 928 ! y(stripwhite)f(\(string\))314 980 y(char)i(*string;)195 ! 1032 y({)243 1083 y(register)e(char)i(*s,)f(*t;)243 1187 ! y(for)g(\(s)h(=)f(string;)g(whitespace)g(\(*s\);)g(s++\))290 ! 1239 y(;)243 1343 y(if)g(\(*s)h(==)f(0\))290 1395 y(return)g(\(s\);)243 ! 1499 y(t)g(=)h(s)g(+)g(strlen)f(\(s\))g(-)h(1;)243 1550 ! y(while)f(\(t)g(>)h(s)g(&&)g(whitespace)e(\(*t\)\))290 1602 y(t--;)243 1654 y(*++t)h(=)h('\\0';)243 1758 y(return)f(s;)195 1810 y(})195 1914 y(/*)h(***********************)o(*******)o(********)o *************** *** 4133,4141 **** 2640 y(/*)i(Allow)g(conditional)g(parsing)g(of)g(the)h(~/.inputrc)e (file.)h(*/)p eop ! %%Page: 49 51 ! 49 50 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(49)243 149 y Ft(rl_readline_name)21 b(=)j("FileMan";) ! 243 253 y(/*)f(Tell)h(the)f(completer)g(that)g(we)h(want)f(a)h(crack)f ! (first.)g(*/)243 305 y(rl_attempted_completion_)o(functio)o(n)e(=)j (fileman_completion;)195 357 y(})195 461 y(/*)g(Attempt)e(to)i (complete)f(on)g(the)h(contents)f(of)g(TEXT.)47 b(START)23 --- 4254,4262 ---- 2640 y(/*)i(Allow)g(conditional)g(parsing)g(of)g(the)h(~/.inputrc)e (file.)h(*/)p eop ! %%Page: 52 54 ! 52 53 bop 75 -58 a Fu(52)1299 b(GNU)15 b(Readline)h(Library)243 ! 149 y Ft(rl_readline_name)21 b(=)j("FileMan";)243 253 ! y(/*)f(Tell)h(the)f(completer)g(that)g(we)h(want)f(a)h(crack)f(first.)g ! (*/)243 305 y(rl_attempted_completion_)o(functio)o(n)e(=)j (fileman_completion;)195 357 y(})195 461 y(/*)g(Attempt)e(to)i (complete)f(on)g(the)h(contents)f(of)g(TEXT.)47 b(START)23 *************** *** 4171,4179 **** 338 2536 y(len)h(=)f(strlen)g(\(text\);)290 2588 y(})p eop ! %%Page: 50 52 ! 50 51 bop 75 -58 a Fu(50)1299 b(GNU)15 b(Readline)h(Library)243 ! 149 y Ft(/*)23 b(Return)g(the)h(next)f(name)g(which)h(partially)e ! (matches)h(from)g(the)314 201 y(command)g(list.)g(*/)243 ! 253 y(while)g(\(name)g(=)h(commands[list_index].name)o(\))290 305 y({)338 357 y(list_index++;)338 461 y(if)g(\(strncmp)f(\(name,)g (text,)g(len\))g(==)h(0\))386 513 y(return)f(\(dupstr\(name\)\);)290 --- 4292,4300 ---- 338 2536 y(len)h(=)f(strlen)g(\(text\);)290 2588 y(})p eop ! %%Page: 53 55 ! 53 54 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(53)243 149 y Ft(/*)23 b(Return)g(the)h(next)f(name)g ! (which)h(partially)e(matches)h(from)g(the)314 201 y(command)g(list.)g ! (*/)243 253 y(while)g(\(name)g(=)h(commands[list_index].name)o(\))290 305 y({)338 357 y(list_index++;)338 461 y(if)g(\(strncmp)f(\(name,)g (text,)g(len\))g(==)h(0\))386 513 y(return)f(\(dupstr\(name\)\);)290 *************** *** 4199,4216 **** 2381 y(})195 2484 y(com_rename)f(\(arg\))314 2536 y(char)i(*arg;)195 2588 y({)243 2640 y(too_dangerous)e(\("rename"\);)p eop ! %%Page: 51 53 ! 51 52 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(51)243 149 y Ft(return)23 b(\(1\);)195 ! 201 y(})195 305 y(com_stat)g(\(arg\))314 357 y(char)h(*arg;)195 ! 409 y({)243 461 y(struct)f(stat)g(finfo;)243 565 y(if)g ! (\(!valid_argument)f(\("stat",)h(arg\)\))290 616 y(return)g(\(1\);)243 ! 720 y(if)g(\(stat)g(\(arg,)h(&finfo\))f(==)g(-1\))290 ! 772 y({)338 824 y(perror)g(\(arg\);)338 876 y(return)g(\(1\);)290 ! 928 y(})243 1032 y(printf)g(\("Statistics)f(for)h(`\045s':\\n",)g ! (arg\);)243 1135 y(printf)g(\("\045s)g(has)h(\045d)f(link\045s,)g(and)g ! (is)h(\045d)g(byte\045s)f(in)g(length.\\n",)g(arg,)434 ! 1187 y(finfo.st_nlink,)434 1239 y(\(finfo.st_nlink)e(==)j(1\))g(?)f("") ! h(:)g("s",)434 1291 y(finfo.st_size,)434 1343 y(\(finfo.st_size)e(==)h ! (1\))h(?)f("")h(:)g("s"\);)243 1395 y(printf)f(\("Inode)g(Last)g (Change)g(at:)g(\045s",)h(ctime)f(\(&finfo.st_ctime\)\);)243 1447 y(printf)g(\(")143 b(Last)23 b(access)g(at:)g(\045s",)h(ctime)f --- 4320,4336 ---- 2381 y(})195 2484 y(com_rename)f(\(arg\))314 2536 y(char)i(*arg;)195 2588 y({)243 2640 y(too_dangerous)e(\("rename"\);)p eop ! %%Page: 54 56 ! 54 55 bop 75 -58 a Fu(54)1299 b(GNU)15 b(Readline)h(Library)243 ! 149 y Ft(return)23 b(\(1\);)195 201 y(})195 305 y(com_stat)g(\(arg\)) ! 314 357 y(char)h(*arg;)195 409 y({)243 461 y(struct)f(stat)g(finfo;)243 ! 565 y(if)g(\(!valid_argument)f(\("stat",)h(arg\)\))290 ! 616 y(return)g(\(1\);)243 720 y(if)g(\(stat)g(\(arg,)h(&finfo\))f(==)g ! (-1\))290 772 y({)338 824 y(perror)g(\(arg\);)338 876 ! y(return)g(\(1\);)290 928 y(})243 1032 y(printf)g(\("Statistics)f(for)h ! (`\045s':\\n",)g(arg\);)243 1135 y(printf)g(\("\045s)g(has)h(\045d)f ! (link\045s,)g(and)g(is)h(\045d)g(byte\045s)f(in)g(length.\\n",)g(arg,) ! 434 1187 y(finfo.st_nlink,)434 1239 y(\(finfo.st_nlink)e(==)j(1\))g(?)f ! ("")h(:)g("s",)434 1291 y(finfo.st_size,)434 1343 y(\(finfo.st_size)e ! (==)h(1\))h(?)f("")h(:)g("s"\);)243 1395 y(printf)f(\("Inode)g(Last)g (Change)g(at:)g(\045s",)h(ctime)f(\(&finfo.st_ctime\)\);)243 1447 y(printf)g(\(")143 b(Last)23 b(access)g(at:)g(\045s",)h(ctime)f *************** *** 4227,4244 **** 2536 y({)338 2588 y(if)i(\(!*arg)f(||)g(\(strcmp)g(\(arg,)g (commands[i].name\))f(==)i(0\)\))386 2640 y({)p eop ! %%Page: 52 54 ! 52 53 bop 75 -58 a Fu(52)1299 b(GNU)15 b(Readline)h(Library)434 ! 149 y Ft(printf)23 b(\("\045s\\t\\t\045s.\\n",)e(commands[i].name,)h ! (commands[i].doc\);)434 201 y(printed++;)386 253 y(})290 ! 305 y(})243 409 y(if)h(\(!printed\))290 461 y({)338 513 ! y(printf)g(\("No)h(commands)e(match)h(`\045s'.)48 b(Possibilties)22 ! b(are:\\n",)h(arg\);)338 616 y(for)h(\(i)f(=)h(0;)g(commands[i].name;)d ! (i++\))386 668 y({)434 720 y(/*)i(Print)g(in)h(six)f(columns.)g(*/)434 ! 772 y(if)g(\(printed)g(==)h(6\))481 824 y({)529 876 y(printed)f(=)h(0;) ! 529 928 y(printf)f(\("\\n"\);)481 980 y(})434 1083 y(printf)g ! (\("\045s\\t",)f(commands[i].name\);)434 1135 y(printed++;)386 ! 1187 y(})338 1291 y(if)i(\(printed\))386 1343 y(printf)f(\("\\n"\);)290 ! 1395 y(})243 1447 y(return)g(\(0\);)195 1499 y(})195 ! 1602 y(/*)h(Change)f(to)g(the)h(directory)e(ARG.)i(*/)195 1654 y(com_cd)f(\(arg\))314 1706 y(char)h(*arg;)195 1758 y({)243 1810 y(if)f(\(chdir)g(\(arg\))h(==)f(-1\))290 --- 4347,4364 ---- 2536 y({)338 2588 y(if)i(\(!*arg)f(||)g(\(strcmp)g(\(arg,)g (commands[i].name\))f(==)i(0\)\))386 2640 y({)p eop ! %%Page: 55 57 ! 55 56 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(55)434 149 y Ft(printf)23 b(\("\045s\\t\\t\045s.\\n",)e ! (commands[i].name,)h(commands[i].doc\);)434 201 y(printed++;)386 ! 253 y(})290 305 y(})243 409 y(if)h(\(!printed\))290 461 ! y({)338 513 y(printf)g(\("No)h(commands)e(match)h(`\045s'.)48 ! b(Possibilties)22 b(are:\\n",)h(arg\);)338 616 y(for)h(\(i)f(=)h(0;)g ! (commands[i].name;)d(i++\))386 668 y({)434 720 y(/*)i(Print)g(in)h(six) ! f(columns.)g(*/)434 772 y(if)g(\(printed)g(==)h(6\))481 ! 824 y({)529 876 y(printed)f(=)h(0;)529 928 y(printf)f(\("\\n"\);)481 ! 980 y(})434 1083 y(printf)g(\("\045s\\t",)f(commands[i].name\);)434 ! 1135 y(printed++;)386 1187 y(})338 1291 y(if)i(\(printed\))386 ! 1343 y(printf)f(\("\\n"\);)290 1395 y(})243 1447 y(return)g(\(0\);)195 ! 1499 y(})195 1602 y(/*)h(Change)f(to)g(the)h(directory)e(ARG.)i(*/)195 1654 y(com_cd)f(\(arg\))314 1706 y(char)h(*arg;)195 1758 y({)243 1810 y(if)f(\(chdir)g(\(arg\))h(==)f(-1\))290 *************** *** 4250,4282 **** 243 2640 y(s)g(=)h(getcwd)f(\(dir,)g(sizeof\(dir\))g(-)g(1\);)p eop ! %%Page: 53 55 ! 53 54 bop 75 -58 a Fu(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (Readline)843 b(53)243 149 y Ft(if)23 b(\(s)h(==)f(0\))290 ! 201 y({)338 253 y(printf)g(\("Error)g(getting)g(pwd:)g(\045s\\n",)g ! (dir\);)338 305 y(return)g(1;)290 357 y(})243 461 y(printf)g ! (\("Current)f(directory)h(is)h(\045s\\n",)f(dir\);)243 ! 513 y(return)g(0;)195 565 y(})195 668 y(/*)h(The)f(user)g(wishes)g(to)h ! (quit)f(using)g(this)h(program.)46 b(Just)24 b(set)f(DONE)267 ! 720 y(non-zero.)f(*/)195 772 y(com_quit)h(\(arg\))314 ! 824 y(char)h(*arg;)195 876 y({)243 928 y(done)f(=)h(1;)243 ! 980 y(return)f(\(0\);)195 1032 y(})195 1135 y(/*)h(Function)e(which)i ! (tells)f(you)g(that)g(you)h(can't)f(do)h(this.)f(*/)195 ! 1187 y(too_dangerous)f(\(caller\))314 1239 y(char)i(*caller;)195 ! 1291 y({)243 1343 y(fprintf)f(\(stderr,)457 1395 y("\045s:)h(Too)f ! (dangerous)g(for)g(me)h(to)g(distribute.)46 b(Write)23 ! b(it)h(yourself.\\n",)p 1987 1405 21 42 v 457 1447 a(caller\);)195 ! 1499 y(})195 1602 y(/*)g(Return)f(non-zero)f(if)i(ARG)f(is)h(a)g(valid) ! f(argument)g(for)g(CALLER,)g(else)g(print)267 1654 y(an)g(error)g ! (message)g(and)h(return)f(zero.)g(*/)195 1706 y(int)195 ! 1758 y(valid_argument)f(\(caller,)h(arg\))314 1810 y(char)h(*caller,)e ! (*arg;)195 1862 y({)243 1914 y(if)h(\(!arg)g(||)h(!*arg\))290 ! 1966 y({)338 2017 y(fprintf)f(\(stderr,)g("\045s:)g(Argument)g ! (required.\\n",)f(caller\);)338 2069 y(return)h(\(0\);)290 ! 2121 y(})243 2225 y(return)g(\(1\);)195 2277 y(})p eop ! %%Page: 54 56 ! 54 55 bop 75 -58 a Fu(54)1299 b(GNU)15 b(Readline)h(Library)p ! eop ! %%Page: 55 57 ! 55 56 bop 75 -58 a Fu(Concept)15 b(Index)1466 b(55)75 149 y Fq(Concept)27 b(Index)75 321 y Fs(C)75 382 y Ff(command)14 b(editing)e Fe(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) --- 4370,4399 ---- 243 2640 y(s)g(=)h(getcwd)f(\(dir,)g(sizeof\(dir\))g(-)g(1\);)p eop ! %%Page: 56 58 ! 56 57 bop 75 -58 a Fu(56)1299 b(GNU)15 b(Readline)h(Library)243 ! 149 y Ft(if)23 b(\(s)h(==)f(0\))290 201 y({)338 253 y(printf)g ! (\("Error)g(getting)g(pwd:)g(\045s\\n",)g(dir\);)338 ! 305 y(return)g(1;)290 357 y(})243 461 y(printf)g(\("Current)f ! (directory)h(is)h(\045s\\n",)f(dir\);)243 513 y(return)g(0;)195 ! 565 y(})195 668 y(/*)h(The)f(user)g(wishes)g(to)h(quit)f(using)g(this)h ! (program.)46 b(Just)24 b(set)f(DONE)267 720 y(non-zero.)f(*/)195 ! 772 y(com_quit)h(\(arg\))314 824 y(char)h(*arg;)195 876 ! y({)243 928 y(done)f(=)h(1;)243 980 y(return)f(\(0\);)195 ! 1032 y(})195 1135 y(/*)h(Function)e(which)i(tells)f(you)g(that)g(you)h ! (can't)f(do)h(this.)f(*/)195 1187 y(too_dangerous)f(\(caller\))314 ! 1239 y(char)i(*caller;)195 1291 y({)243 1343 y(fprintf)f(\(stderr,)457 ! 1395 y("\045s:)h(Too)f(dangerous)g(for)g(me)h(to)g(distribute.\\n")457 ! 1447 y(caller\);)243 1499 y(fprintf)f(\(stderr,)f("Write)h(it)h ! (yourself.\\n"\);)195 1550 y(})195 1654 y(/*)g(Return)f(non-zero)f(if)i ! (ARG)f(is)h(a)g(valid)f(argument)g(for)g(CALLER,)267 ! 1706 y(else)g(print)g(an)h(error)f(message)g(and)g(return)g(zero.)g(*/) ! 195 1758 y(int)195 1810 y(valid_argument)f(\(caller,)h(arg\))314 ! 1862 y(char)h(*caller,)e(*arg;)195 1914 y({)243 1966 ! y(if)h(\(!arg)g(||)h(!*arg\))290 2017 y({)338 2069 y(fprintf)f ! (\(stderr,)g("\045s:)g(Argument)g(required.\\n",)f(caller\);)338 ! 2121 y(return)h(\(0\);)290 2173 y(})243 2277 y(return)g(\(1\);)195 ! 2329 y(})p eop ! %%Page: 57 59 ! 57 58 bop 75 -58 a Fu(Concept)15 b(Index)1466 b(57)75 149 y Fq(Concept)27 b(Index)75 321 y Fs(C)75 382 y Ff(command)14 b(editing)e Fe(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) *************** *** 4301,4305 **** 608 y Ff(readline,)15 b(function)8 b Fe(.)g(.)e(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)21 b Ff(19)1012 757 y Fs(V)1012 826 y Ff(v)n(ariables,)15 b(readline)t Fe(.)9 b(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)17 --- 4418,4422 ---- 608 y Ff(readline,)15 b(function)8 b Fe(.)g(.)e(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)21 b Ff(21)1012 757 y Fs(V)1012 826 y Ff(v)n(ariables,)15 b(readline)t Fe(.)9 b(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)17 *************** *** 4308,4333 **** g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)17 b Ff(2)p eop ! %%Page: 56 58 ! 56 57 bop 75 -58 a Fu(56)1299 b(GNU)15 b(Readline)h(Library)p eop ! %%Page: 57 59 ! 57 58 bop 75 -58 a Fu(F)l(unction)16 b(and)f(V)l(ariable)i(Index)1187 ! b(57)75 149 y Fq(F)-7 b(unction)26 b(and)h(V)-7 b(ariable)26 b(Index)p 79 307 21 3 v 75 369 a Fd(_rl_digit_)o(p)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(34)75 415 y Fd(_rl_digit_)o(va)o(lue)6 b Fe(.)t(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)20 b Ff(34)75 462 y Fd(_rl_lowerc)o(as)o(e_p)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)20 b Ff(34)75 508 y Fd(_rl_to_low)o(er)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)22 b Ff(34)75 554 y Fd(_rl_to_upp)o(er)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(34)75 600 y Fd(_rl_upperc)o(as)o(e_p)6 b Fe(.)t(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)20 b Ff(34)75 733 y Fs(A)75 794 y Fd(abort)11 b(\(C-g\))5 b Fe(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g --- 4425,4450 ---- g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)17 b Ff(2)p eop ! %%Page: 58 60 ! 58 59 bop 75 -58 a Fu(58)1299 b(GNU)15 b(Readline)h(Library)p eop ! %%Page: 59 61 ! 59 60 bop 75 -58 a Fu(F)l(unction)16 b(and)f(V)l(ariable)i(Index)1187 ! b(59)75 149 y Fq(F)-7 b(unction)26 b(and)h(V)-7 b(ariable)26 b(Index)p 79 307 21 3 v 75 369 a Fd(_rl_digit_)o(p)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(36)75 415 y Fd(_rl_digit_)o(va)o(lue)6 b Fe(.)t(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)20 b Ff(37)75 462 y Fd(_rl_lowerc)o(as)o(e_p)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)20 b Ff(36)75 508 y Fd(_rl_to_low)o(er)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)22 b Ff(36)75 554 y Fd(_rl_to_upp)o(er)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(36)75 600 y Fd(_rl_upperc)o(as)o(e_p)6 b Fe(.)t(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)20 b Ff(36)75 733 y Fs(A)75 794 y Fd(abort)11 b(\(C-g\))5 b Fe(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g *************** *** 4360,4367 **** (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Ff(14)75 1644 y Fd(character-)o(se) o(arc)o(h)10 b(\(C-]\))c Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)18 b Ff(17)75 1691 y Fd(character-)o(se)o(arc)o(h-)o(bac)o(kwa)o(rd)9 b(\(M-C-]\))e Fe(.)s(.)g(.)f(.)g(.)g(.)g(.)g(.)g(.)20 ! b Ff(17)75 1737 y Fd(clear-scre)o(en)9 b(\(C-l\))g Fe(.)t(.)d(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)21 b Ff(12)75 1783 y(commen)o(t-b)q(egin)9 --- 4477,4484 ---- (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Ff(14)75 1644 y Fd(character-)o(se) o(arc)o(h)10 b(\(C-]\))c Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)18 b Ff(18)75 1691 y Fd(character-)o(se)o(arc)o(h-)o(bac)o(kwa)o(rd)9 b(\(M-C-]\))e Fe(.)s(.)g(.)f(.)g(.)g(.)g(.)g(.)g(.)20 ! b Ff(18)75 1737 y Fd(clear-scre)o(en)9 b(\(C-l\))g Fe(.)t(.)d(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)21 b Ff(12)75 1783 y(commen)o(t-b)q(egin)9 *************** *** 4381,4385 **** (.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Ff(15)75 2014 y Fd(copy-forwa)o(rd)o (-wo)o(rd)9 b(\(\))e Fe(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Ff(15)75 2060 y Fd(copy-regio)o(n-)o(as-)o(ki)o(ll)9 b(\(\))d Fe(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g --- 4498,4502 ---- (.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Ff(15)75 2014 y Fd(copy-forwa)o(rd)o (-wo)o(rd)9 b(\(\))e Fe(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Ff(16)75 2060 y Fd(copy-regio)o(n-)o(as-)o(ki)o(ll)9 b(\(\))d Fe(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g *************** *** 4389,4397 **** 2301 y Fd(delete-cha)o(r-)o(or-)o(li)o(st)9 b(\(\))d Fe(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)18 b Ff(16)75 2347 y Fd(delete-hor)o(iz)o(ont)o(al)o (-sp)o(ace)9 b(\(\))i Fe(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)25 b Ff(15)75 2393 y Fd(digit-argu)o(me)o(nt)9 b(\()p Fc(M-0)p Fd(,)i Fc(M-1)p Fd(,)h(...)f Fc(M--)p ! Fd(\))c Fe(.)e(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Ff(15)75 2439 y(disable-comple)q(tion)9 b Fe(.)g(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) --- 4506,4514 ---- 2301 y Fd(delete-cha)o(r-)o(or-)o(li)o(st)9 b(\(\))d Fe(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)18 b Ff(17)75 2347 y Fd(delete-hor)o(iz)o(ont)o(al)o (-sp)o(ace)9 b(\(\))i Fe(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)25 b Ff(15)75 2393 y Fd(digit-argu)o(me)o(nt)9 b(\()p Fc(M-0)p Fd(,)i Fc(M-1)p Fd(,)h(...)f Fc(M--)p ! Fd(\))c Fe(.)e(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Ff(16)75 2439 y(disable-comple)q(tion)9 b Fe(.)g(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) *************** *** 4410,4925 **** 307 y Fd(dump-variab)o(le)o(s)10 b(\(\))e Fe(.)e(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)23 b Ff(18)1012 457 y Fs(E)1012 525 y Ff(editing-mo)q(de)12 b Fe(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)22 ! b Ff(5)1012 575 y(enable-k)o(eypad)9 b Fe(.)g(.)d(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(5)1012 624 y Fd(end-kbd-mac)o(ro)9 ! b(\(C-x)i(\)\))e Fe(.)e(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)23 b Ff(16)1012 673 ! y Fd(end-of-hist)o(or)o(y)10 b(\(M->\))d Fe(.)t(.)f(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(13)1012 723 y Fd(end-of-line)9 b(\(C-e\))e Fe(.)f(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)23 b Ff(12)1012 772 y Fd(exchange-po)o(in)o(t-a)o(nd)o(-ma) ! o(rk)9 b(\(C-x)j(C-x\))c Fe(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)24 ! b Ff(17)1012 821 y(expand-tilde)6 b Fe(.)j(.)d(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)19 b Ff(5)1012 970 y ! Fs(F)1012 1038 y Fd(forward-bac)o(kw)o(ard)o(-d)o(ele)o(te)o(-ch)o(ar)9 b(\(\))f Fe(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)22 ! b Ff(14)1012 1088 y Fd(forward-cha)o(r)10 b(\(C-f\))f Fe(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(12)1012 1137 y Fd(forward-sea)o(rc)o(h-h)o(is)o(tor)o(y)10 b(\(C-s\))e Fe(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 ! b Ff(13)1012 1186 y Fd(forward-wor)o(d)10 b(\(M-f\))f Fe(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(12)1012 1328 y ! Fs(H)1012 1397 y Ff(history-preserv)o(e-p)q(oi)q(n)o(t)8 b Fe(.)h(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Ff(5)1012 1446 y Fd(history-sea)o(rc)o(h-b)o(ac)o(kwa)o(rd)9 b(\(\))i Fe(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)25 b Ff(13)1012 1496 y Fd(history-sea)o(rc)o(h-f)o(or)o(war)o(d)10 b(\(\))s Fe(.)c(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)17 b Ff(13)1012 1545 y(horizon)o(tal-scrol)q(l-mo)r(de)6 b Fe(.)j(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 b Ff(6)1012 1687 y ! Fs(I)1012 1755 y Ff(input-meta)8 b Fe(.)g(.)e(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(6)1012 1805 y Fd(insert-comm)o(en)o(t)10 b(\(M-#\))d Fe(.)t(.)f(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(17)1012 1854 y Fd(insert-comp)o(le)o(tio)o(ns)9 b(\(M-*\))t Fe(.)c(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)18 b Ff(16)1012 1903 y(isearc)o(h-terminators)t Fe(.)8 b(.)f(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Ff(6)1012 ! 2046 y Fs(K)1012 2114 y Ff(k)o(eymap)9 b Fe(.)e(.)f(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 ! b Ff(6)1012 2163 y Fd(kill-line)10 b(\(C-k\))f Fe(.)d(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)24 b Ff(14)1012 2213 y Fd(kill-region)9 b(\(\))i Fe(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(15)1012 2262 y Fd(kill-whole-)o(li)o(ne)9 b(\(\))g Fe(.)c(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(15)1012 2311 y Fd(kill-word)10 b(\(M-d\))f Fe(.)d(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! 24 b Ff(15)1012 2454 y Fs(M)1012 2522 y Ff(mark-mo)q(di\014ed-li)q(nes) 8 b Fe(.)h(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(6)1012 ! 2571 y(matc)o(h-hidden-\014l)q(es)14 b Fe(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)24 b Ff(6)1012 2621 y Fd(menu-comple)o(te)9 ! b(\(\))g Fe(.)e(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)23 b Ff(16)1012 ! 2670 y(meta-\015ag)t Fe(.)8 b(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Ff(6)p eop ! %%Page: 58 60 ! 58 59 bop 75 -58 a Fu(58)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fs(N)75 212 y Fd(next-histo)o(ry)9 b(\(C-n\))g Fe(.)t(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)21 b Ff(12)75 258 y Fd(non-increm)o(en)o (tal)o(-f)o(orw)o(ard)o(-s)o(ear)o(ch)o(-hi)o(st)o(ory)9 ! b(\(M-n\))159 304 y Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Ff(13)75 ! 350 y Fd(non-increm)o(en)o(tal)o(-r)o(eve)o(rse)o(-s)o(ear)o(ch)o(-hi)o ! (st)o(ory)9 b(\(M-p\))159 396 y Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 ! b Ff(13)75 521 y Fs(O)75 583 y Ff(output-meta)5 b Fe(.)i(.)f(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Ff(6)75 ! 716 y Fs(P)75 778 y Fd(possible-c)o(om)o(ple)o(ti)o(ons)9 b(\(M-?\))h Fe(.)c(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)25 b Ff(16)75 824 y Fd(prefix-met)o(a)10 b(\()324 ! 822 y Fn(h)p 335 796 70 2 v 335 824 a Fm(ESC)p 335 832 ! V 402 822 a Fn(i)417 824 y Fd(\))g Fe(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 ! b Ff(17)75 870 y Fd(previous-h)o(is)o(tor)o(y)10 b(\(C-p\))c Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)18 b Ff(12)75 1004 y Fs(Q)75 1066 y Fd(quoted-ins)o(er)o (t)10 b(\(C-q)h(or)h(C-v\))c Fe(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)22 b Ff(14)75 1199 y Fs(R)75 ! 1261 y Fd(re-read-in)o(it)o(-fi)o(le)9 b(\(C-x)i(C-r\))5 b Fe(.)h(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)18 ! b Ff(17)75 1307 y Fd(readline)s Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Ff(19)75 ! 1354 y Fd(redraw-cur)o(re)o(nt-)o(li)o(ne)9 b(\(\))d Fe(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)18 b Ff(12)75 1400 y Fd(reverse-se)o(ar)o(ch-)o(hi)o (sto)o(ry)9 b(\(C-r\))g Fe(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)23 b Ff(13)75 1446 y Fd(revert-lin)o(e)10 b(\(M-r\))d Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Ff(17)75 ! 1493 y Fd(rl_add_def)o(un)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)22 b Ff(26)75 1539 y Fd(rl_add_fun)o(ma)o(p_e)o(nt)o(ry) t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(29)75 1585 y Fd(rl_add_und)o(o)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(30)75 1632 y Fd(rl_alphabe)o(ti)o(c)9 b Fe(.)s(.)d(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)22 b Ff(33)75 1678 y Fd(rl_already)o(_p)o(rom)o (pt)o(ed)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(23)75 ! 1724 y Fd(rl_attempt)o(ed)o(_co)o(mp)o(let)o(ion)o(_f)o(unc)o(ti)o(on)t ! Fe(.)s(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Ff(41)75 ! 1771 y Fd(rl_attempt)o(ed)o(_co)o(mp)o(let)o(ion)o(_o)o(ver)6 b Fe(.)s(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 ! b Ff(43)75 1817 y Fd(rl_basic_q)o(uo)o(te_)o(ch)o(ara)o(cte)o(rs)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! 22 b Ff(42)75 1863 y Fd(rl_basic_w)o(or)o(d_b)o(re)o(ak_)o(cha)o(ra)o (cte)o(rs)5 b Fe(.)s(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 ! b Ff(42)75 1910 y Fd(rl_begin_u)o(nd)o(o_g)o(ro)o(up)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(30)75 1956 y Fd(rl_bind_ke)o(y)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(27)75 2002 y Fd(rl_bind_ke)o(y_)o(in_)o(ma)o(p)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Ff(27)75 2049 y Fd(rl_binding)o(_k)o(eym)o(ap)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 ! b Ff(24)75 2095 y Fd(rl_callbac)o(k_)o(han)o(dl)o(er_)o(ins)o(ta)o(ll)7 b Fe(.)s(.)g(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(35)75 2141 y Fd(rl_callbac)o(k_)o(han)o(dl)o(er_)o(rem)o(ov)o(e)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)21 ! b Ff(35)75 2188 y Fd(rl_callbac)o(k_)o(rea)o(d_)o(cha)o(r)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)25 b Ff(35)75 2234 y Fd(rl_catch_s)o(ig)o(nal)o(s)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(37)75 ! 2281 y Fd(rl_catch_s)o(ig)o(win)o(ch)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)19 b Ff(37)75 2327 y Fd(rl_char_is)o(_q)o(uot)o(ed)o(_p)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(41)75 2373 y Fd(rl_cleanup)o(_a)o (fte)o(r_)o(sig)o(nal)7 b Fe(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)23 b Ff(37)75 2420 y Fd(rl_clear_m)o(es)o(sag)o(e)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) ! 19 b Ff(31)75 2466 y Fd(rl_clear_p)o(en)o(din)o(g_)o(inp)o(ut)8 b Fe(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)24 b Ff(32)75 2512 y Fd(rl_clear_s)o(ig)o(nal)o(s)6 ! b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(38)1012 ! 149 y Fd(rl_complete)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! 20 b Ff(39,)13 b(40)1012 196 y Fd(rl_complete)o(_i)o(nte)o(rn)o(al)s Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)17 b Ff(40)1012 242 y Fd(rl_complete)o(r_)o (quo)o(te)o(_ch)o(ar)o(act)o(ers)5 b Fe(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)20 b Ff(42)1012 288 y Fd(rl_complete)o(r_)o(wor)o (d_)o(bre)o(ak)o(_ch)o(ara)o(ct)o(ers)8 b Fe(.)e(.)g(.)g(.)h(.)f(.)g(.) ! 25 b Ff(42)1012 335 y Fd(rl_completi)o(on)o(_ap)o(pe)o(nd_)o(ch)o(ara)o (cte)o(r)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 ! b Ff(42)1012 381 y Fd(rl_completi)o(on)o(_di)o(sp)o(lay)o(_m)o(atc)o (hes)o(_h)o(ook)8 b Fe(.)e(.)g(.)g(.)h(.)f(.)g(.)25 b ! Ff(43)1012 427 y Fd(rl_completi)o(on)o(_en)o(tr)o(y_f)o(un)o(cti)o(on)s ! Fe(.)s(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)17 b Ff(39,)c(41)1012 ! 474 y Fd(rl_completi)o(on)o(_ma)o(tc)o(hes)8 b Fe(.)f(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)25 ! b Ff(40)1012 520 y Fd(rl_completi)o(on)o(_qu)o(er)o(y_i)o(te)o(ms)9 ! b Fe(.)s(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! 23 b Ff(41)1012 566 y Fd(rl_completi)o(on)o(_ty)o(pe)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(43)1012 613 y Fd(rl_copy_key)o(ma)o(p)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)21 b Ff(26)1012 659 y Fd(rl_copy_tex)o(t)6 b Fe(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(32)1012 705 y Fd(rl_crlf)t Fe(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)17 b Ff(31)1012 752 y Fd(rl_delete_t)o(ex)o(t)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)21 b ! Ff(32)1012 798 y Fd(rl_deprep_t)o(er)o(m_f)o(un)o(cti)o(on)7 b Fe(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)24 b Ff(24)1012 844 y Fd(rl_deprep_t)o(er)o(min)o(al)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(33)1012 891 y ! Fd(rl_ding)t Fe(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)17 b Ff(33)1012 937 y Fd(rl_director)o(y_)o (com)o(pl)o(eti)o(on)o(_ho)o(ok)7 b Fe(.)s(.)f(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)g(.)h(.)20 b Ff(43)1012 983 y Fd(rl_discard_)o(ke)o(yma) ! o(p)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Ff(27)1012 ! 1030 y Fd(rl_dispatch)o(in)o(g)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)21 b Ff(22)1012 1076 y Fd(rl_display_)o(ma)o(tch)o(_l)o (ist)8 b Fe(.)f(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)25 b Ff(33)1012 1122 y Fd(rl_do_undo)8 b Fe(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 ! b Ff(30)1012 1169 y Fd(rl_done)t Fe(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)17 b Ff(22)1012 ! 1215 y Fd(rl_editing_)o(mo)o(de)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)21 b Ff(26)1012 1261 y Fd(rl_end)5 b Fe(.)t(.)h(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 ! b Ff(22)1012 1308 y Fd(rl_end_undo)o(_g)o(rou)o(p)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Ff(30)1012 1354 y Fd(rl_erase_em)o(pt)o(y_l)o(in)o(e)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 ! b Ff(22)1012 1400 y Fd(rl_event_ho)o(ok)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)22 b Ff(24)1012 1447 y Fd(rl_execute_)o(ne)o (xt)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Ff(32)1012 1493 y Fd(rl_executin)o(g_)o(key)o(ma)o(p)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Ff(24)1012 1539 y Fd(rl_executin)o(g_) o(mac)o(ro)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(24)1012 ! 1586 y Fd(rl_expand_p)o(ro)o(mpt)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)20 b Ff(31)1012 1632 y Fd(rl_explicit)o(_a)o(rg)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(26)1012 ! 1678 y Fd(rl_extend_l)o(in)o(e_b)o(uf)o(fer)8 b Fe(.)f(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)25 ! b Ff(33)1012 1725 y Fd(rl_filename)o(_c)o(omp)o(le)o(tio)o(n_)o(des)o (ire)o(d)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 ! b Ff(42)1012 1771 y Fd(rl_filename)o(_c)o(omp)o(le)o(tio)o(n_)o(fun)o (cti)o(on)t Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 ! b Ff(40)1012 1817 y Fd(rl_filename)o(_d)o(equ)o(ot)o(ing)o(_f)o(unc)o (tio)o(n)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 ! b Ff(41)1012 1864 y Fd(rl_filename)o(_q)o(uot)o(e_)o(cha)o(ra)o(cte)o (rs)7 b Fe(.)s(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(42)1012 1910 y Fd(rl_filename)o(_q)o(uot)o(in)o(g_d)o(es)o(ire)o (d)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 ! b Ff(43)1012 1956 y Fd(rl_filename)o(_q)o(uot)o(in)o(g_f)o(un)o(cti)o (on)7 b Fe(.)s(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(41)1012 2003 y Fd(rl_forced_u)o(pd)o(ate)o(_d)o(isp)o(la)o(y)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)23 b Ff(30)1012 2049 y Fd(rl_free_lin)o(e_)o(sta)o(te)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(38)1012 2095 y Fd(rl_free_und)o(o_)o(lis)o(t)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! 19 b Ff(30)1012 2142 y Fd(rl_function)o(_d)o(ump)o(er)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(29)1012 2188 y Fd(rl_function)o(_o)o(f_k)o(ey)o(seq)8 b Fe(.)f(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)25 ! b Ff(29)1012 2234 y Fd(rl_funmap_n)o(am)o(es)7 b Fe(.)s(.)f(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)21 b Ff(29)1012 2281 y Fd(rl_generic_)o(bi)o(nd)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(28)1012 ! 2327 y Fd(rl_get_keym)o(ap)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)22 b Ff(27)1012 2373 y Fd(rl_get_keym)o(ap)o(_by)o(_n)o ! (ame)8 b Fe(.)f(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)25 b Ff(27)1012 2420 y Fd(rl_get_keym)o(ap)o ! (_na)o(me)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(27)1012 ! 2466 y Fd(rl_get_scre)o(en)o(_si)o(ze)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g ! (.)19 b Ff(38)1012 2512 y Fd(rl_get_term)o(ca)o(p)8 b ! Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)21 b Ff(35)p ! eop ! %%Page: 59 61 ! 59 60 bop 75 -58 a Fu(F)l(unction)16 b(and)f(V)l(ariable)i(Index)1187 ! b(59)75 149 y Fd(rl_getc)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Ff(32)75 195 ! y Fd(rl_getc_fu)o(nc)o(tio)o(n)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)19 b Ff(24)75 241 y Fd(rl_gnu_rea)o(dl)o(ine)o(_p)5 ! b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 b Ff(23)75 286 ! y Fd(rl_ignore_)o(co)o(mpl)o(et)o(ion)o(_du)o(pl)o(ica)o(te)o(s)5 ! b Fe(.)s(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Ff(42)75 ! 332 y Fd(rl_ignore_)o(so)o(me_)o(co)o(mpl)o(eti)o(on)o(s_f)o(un)o(cti)o ! (on)7 b Fe(.)g(.)f(.)g(.)g(.)g(.)24 b Ff(43)75 378 y ! Fd(rl_inhibit)o(_c)o(omp)o(le)o(tio)o(n)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(43)75 424 y Fd(rl_initial)o(iz)o(e)9 b Fe(.)s(.)d(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)22 b Ff(33)75 469 y Fd(rl_insert_)o(co)o(mpl)o (et)o(ion)o(s)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Ff(40)75 515 y Fd(rl_insert_)o(te) o(xt)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Ff(31)75 561 y Fd(rl_instrea)o(m)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(23)75 606 y Fd(rl_invokin)o(g_)o (key)o(se)o(qs)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(29)75 ! 652 y Fd(rl_invokin)o(g_)o(key)o(se)o(qs_)o(in_)o(ma)o(p)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)21 ! b Ff(29)75 698 y Fd(rl_kill_te)o(xt)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)22 b Ff(32)75 743 y Fd(rl_last_fu)o(nc)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(23)75 789 y Fd(rl_library)o(_v)o(ers)o(io)o(n)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Ff(23)75 835 y Fd(rl_line_bu)o(ff) ! o(er)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Ff(22)75 880 y Fd(rl_list_fu)o(nm)o(ap_)o(na)o(mes)s Fe(.)s(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)16 b Ff(29)75 926 y Fd(rl_macro_b)o(in)o(d)9 b Fe(.)s(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)22 ! b Ff(34)75 972 y Fd(rl_macro_d)o(um)o(per)6 b Fe(.)t(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)20 b Ff(34)75 1017 y Fd(rl_make_ba)o(re)o(_ke)o(ym)o ! (ap)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(26)75 1063 y Fd(rl_make_ke)o(ym)o(ap)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)21 b Ff(27)75 1109 y Fd(rl_mark)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 ! b Ff(22)75 1154 y Fd(rl_message)7 b Fe(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b Ff(31)75 1200 y Fd(rl_modifyi)o(ng)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(30)75 1246 y Fd(rl_named_f)o(un)o(cti)o(on)5 b Fe(.)s(.)i(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)19 b Ff(28)75 1291 y Fd(rl_num_cha)o(rs)o(_to)o(_r)o (ead)s Fe(.)s(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)16 b Ff(22)75 1337 y Fd(rl_numeric)o(_a) o(rg)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Ff(26)75 1383 y Fd(rl_on_new_)o(li)o(ne)8 b Fe(.)s(.)e(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)21 b Ff(30)75 1428 y Fd(rl_on_new_)o(li)o(ne_)o (wi)o(th_)o(pro)o(mp)o(t)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)21 b Ff(30)75 1474 y Fd(rl_outstre)o(am)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(23)75 1520 y Fd(rl_parse_a)o(nd)o(_bi)o(nd)5 b Fe(.)s(.)i(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)19 b Ff(28)75 1565 y Fd(rl_pending)o(_i)o(npu)o(t)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(22)75 ! 1611 y Fd(rl_point)s Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Ff(22)75 1657 y Fd(rl_possibl)o(e_)o (com)o(pl)o(eti)o(ons)7 b Fe(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)23 b Ff(40)75 1702 y Fd(rl_pre_inp)o(ut)o(_ho)o(ok)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 ! b Ff(24)75 1748 y Fd(rl_prep_te)o(rm)o(_fu)o(nc)o(tio)o(n)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)25 b Ff(24)75 1794 y Fd(rl_prep_te)o(rm)o(ina)o(l)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(33)75 ! 1840 y Fd(rl_prompt)8 b Fe(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)24 b Ff(23)75 1885 y Fd(rl_push_ma)o(cr)o(o_i)o(np) o(ut)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(32)75 1931 y Fd(rl_read_in)o(it)o(_fi)o(le)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! 19 b Ff(28)75 1977 y Fd(rl_read_ke)o(y)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(32)75 2022 y Fd(rl_readlin)o(e_)o(nam)o(e)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) ! 19 b Ff(23)75 2068 y Fd(rl_readlin)o(e_)o(sta)o(te)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 b Ff(24)75 2114 y Fd(rl_readlin)o(e_)o(ver)o(si)o(on)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 ! b Ff(23)75 2159 y Fd(rl_redispl)o(ay)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)22 b Ff(30)75 2205 y Fd(rl_redispl)o(ay)o(_fu)o (nc)o(tio)o(n)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Ff(24)75 2251 y ! Fd(rl_reset_a)o(ft)o(er_)o(si)o(gna)o(l)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(38)75 2296 y Fd(rl_reset_l)o(in)o(e_s)o(ta)o(te)t ! Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(31)75 2342 y Fd(rl_reset_t)o(er)o ! (min)o(al)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 b ! Ff(33)75 2388 y Fd(rl_resize_)o(te)o(rmi)o(na)o(l)5 b ! Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Ff(38)75 2433 y Fd(rl_restore)o(_p) ! o(rom)o(pt)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 ! b Ff(31)75 2479 y Fd(rl_save_pr)o(om)o(pt)8 b Fe(.)s(.)e(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)21 b Ff(31)75 2525 y Fd(rl_set_key)7 ! b Fe(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 ! b Ff(28)1012 149 y Fd(rl_set_keyb)o(oa)o(rd_)o(in)o(put)o(_t)o(ime)o (out)5 b Fe(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 ! b Ff(32)1012 195 y Fd(rl_set_keym)o(ap)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)22 b Ff(27)1012 241 y Fd(rl_set_pare)o(n_)o (bli)o(nk)o(_ti)o(me)o(out)7 b Fe(.)t(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)22 b Ff(34)1012 287 y Fd(rl_set_prom)o(pt)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 ! b Ff(31)1012 333 y Fd(rl_set_scre)o(en)o(_si)o(ze)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)19 b Ff(38)1012 379 y Fd(rl_set_sign)o(al)o(s)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)21 b ! Ff(38)1012 426 y Fd(rl_show_cha)o(r)6 b Fe(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(31)1012 472 y Fd(rl_special_)o(pr)o (efi)o(xe)o(s)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Ff(42)1012 ! 518 y Fd(rl_startup_)o(ho)o(ok)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)21 b Ff(23)1012 564 y Fd(rl_stuff_ch)o(ar)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 ! b Ff(32)1012 610 y Fd(rl_terminal)o(_n)o(ame)6 b Fe(.)s(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)20 b Ff(23)1012 656 y Fd(rl_tty_set_)o(de)o(fau)o(lt)o (_bi)o(nd)o(ing)o(s)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)21 b Ff(33)1012 702 y Fd(rl_unbind_c)o(om)o(man)o(d_)o (in_)o(ma)o(p)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)23 b Ff(28)1012 748 y Fd(rl_unbind_f)o(un)o(cti)o (on)o(_in)o(_m)o(ap)9 b Fe(.)s(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)23 b Ff(28)1012 794 y Fd(rl_unbind_k)o(ey)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 ! b Ff(28)1012 840 y Fd(rl_unbind_k)o(ey)o(_in)o(_m)o(ap)s Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)17 b Ff(28)1012 886 y Fd(rl_username)o(_c)o (omp)o(le)o(tio)o(n_)o(fun)o(cti)o(on)t Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)18 b Ff(40)1012 932 y Fd(rl_variable)o(_b)o(ind)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Ff(34)1012 ! 978 y Fd(rl_variable)o(_d)o(ump)o(er)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! 19 b Ff(34)1012 1109 y Fs(S)1012 1170 y Fd(self-insert)9 b(\(a,)j(b,)g(A,)g(1,)g(!,)g(...)o(\))6 b Fe(.)g(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)20 b Ff(14)1012 1216 y Fd(set-mark)10 b(\(C-@\))g Fe(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(17)1012 1262 y(sho)o(w-all-if-am)o(bigu)q(ous)14 b Fe(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)23 b Ff(7)1012 1308 y Fd(start-kbd-m)o(ac)o(ro)9 b(\(C-x)j(\(\))c Fe(.)d(.)i(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)22 ! b Ff(16)1012 1432 y Fs(T)1012 1494 y Fd(tab-insert)9 ! b(\(M-)1281 1492 y Fn(h)p 1292 1466 74 2 v 1292 1494 ! a Fm(T)m(AB)p 1292 1501 V 1364 1492 a Fn(i)1379 1494 y Fd(\))e Fe(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)20 b Ff(14)1012 1540 y Fd(tilde-expan)o(d)10 b(\(M-~\))f Fe(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 ! b Ff(17)1012 1586 y Fd(transpose-c)o(ha)o(rs)9 b(\(C-t\))d Fe(.)f(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)20 b Ff(14)1012 1632 y Fd(transpose-w)o(or)o(ds)9 b(\(M-t\))d Fe(.)f(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Ff(14)1012 1763 y ! Fs(U)1012 1825 y Fd(undo)12 b(\(C-_)f(or)h(C-x)g(C-u\))c Fe(.)t(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)21 b Ff(17)1012 1871 y Fd(universal-a)o(rg)o (ume)o(nt)9 b(\(\))d Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Ff(16)1012 ! 1917 y Fd(unix-line-d)o(is)o(car)o(d)10 b(\(C-u\))5 b Fe(.)t(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)18 b Ff(15)1012 1963 y Fd(unix-word-r)o(ub)o(out)9 b(\(C-w\))d Fe(.)t(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Ff(15)1012 2009 y Fd(upcase-word)9 b(\(M-u\))e Fe(.)f(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Ff(14)1012 ! 2140 y Fs(V)1012 2201 y Ff(visible-stats)14 b Fe(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 ! b Ff(7)1012 2325 y Fs(Y)1012 2387 y Fd(yank)12 b(\(C-y\))5 ! b Fe(.)t(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 ! b Ff(15)1012 2433 y Fd(yank-last-a)o(rg)9 b(\(M-.)i(or)h(M-_\))c ! Fe(.)f(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(13)1012 2479 y Fd(yank-nth-ar)o(g)10 b(\(M-C-y\))d Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)20 b Ff(13)1012 2525 y Fd(yank-pop)10 b(\(M-y\))g Fe(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(15)p eop ! %%Page: 60 62 ! 60 61 bop 75 -58 a Fu(60)1299 b(GNU)15 b(Readline)h(Library)p ! eop ! %%Page: -1 63 ! -1 62 bop 1862 -58 a Fu(i)75 149 y Fq(T)-7 b(able)27 b(of)f(Con)n(ten)n(ts)75 320 y Fs(1)67 b(Command)22 b(Line)i(Editing)d Fa(.)10 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h --- 4527,5062 ---- 307 y Fd(dump-variab)o(le)o(s)10 b(\(\))e Fe(.)e(.)h(.)f(.)g(.)g(.)g(.) g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)23 b Ff(18)1012 449 y Fs(E)1012 514 y Ff(editing-mo)q(de)12 b Fe(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)22 ! b Ff(5)1012 562 y Fd(emacs-editi)o(ng)o(-mo)o(de)9 b(\(C-e\))t ! Fe(.)c(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)18 b Ff(18)1012 610 y(enable-k)o(eypad)9 b Fe(.)g(.)d(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(5)1012 ! 658 y Fd(end-kbd-mac)o(ro)9 b(\(C-x)i(\)\))e Fe(.)e(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)23 ! b Ff(17)1012 706 y Fd(end-of-hist)o(or)o(y)10 b(\(M->\))d ! Fe(.)t(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)20 b Ff(13)1012 754 y Fd(end-of-line)9 ! b(\(C-e\))e Fe(.)f(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Ff(12)1012 ! 802 y Fd(exchange-po)o(in)o(t-a)o(nd)o(-ma)o(rk)9 b(\(C-x)j(C-x\))c ! Fe(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)24 b Ff(18)1012 ! 850 y(expand-tilde)6 b Fe(.)j(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)19 b Ff(5)1012 991 y Fs(F)1012 1056 ! y Fd(forward-bac)o(kw)o(ard)o(-d)o(ele)o(te)o(-ch)o(ar)9 b(\(\))f Fe(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)22 ! b Ff(14)1012 1104 y Fd(forward-cha)o(r)10 b(\(C-f\))f Fe(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(12)1012 1152 y Fd(forward-sea)o(rc)o(h-h)o(is)o(tor)o(y)10 b(\(C-s\))e Fe(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 ! b Ff(13)1012 1200 y Fd(forward-wor)o(d)10 b(\(M-f\))f Fe(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(12)1012 1334 y ! Fs(H)1012 1400 y Ff(history-preserv)o(e-p)q(oi)q(n)o(t)8 b Fe(.)h(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 b Ff(5)1012 1448 y Fd(history-sea)o(rc)o(h-b)o(ac)o(kwa)o(rd)9 b(\(\))i Fe(.)c(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)25 b Ff(13)1012 1496 y Fd(history-sea)o(rc)o(h-f)o(or)o(war)o(d)10 b(\(\))s Fe(.)c(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)17 b Ff(13)1012 1543 y(horizon)o(tal-scrol)q(l-mo)r(de)6 b Fe(.)j(.)d(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 b Ff(6)1012 1678 y ! Fs(I)1012 1743 y Ff(input-meta)8 b Fe(.)g(.)e(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(6)1012 1791 y Fd(insert-comm)o(en)o(t)10 b(\(M-#\))d Fe(.)t(.)f(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(18)1012 1839 y Fd(insert-comp)o(le)o(tio)o(ns)9 b(\(M-*\))t Fe(.)c(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)18 b Ff(16)1012 1887 y(isearc)o(h-terminators)t Fe(.)8 b(.)f(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)16 b Ff(6)1012 ! 2021 y Fs(K)1012 2087 y Ff(k)o(eymap)9 b Fe(.)e(.)f(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 ! b Ff(6)1012 2135 y Fd(kill-line)10 b(\(C-k\))f Fe(.)d(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)24 b Ff(15)1012 2183 y Fd(kill-region)9 b(\(\))i Fe(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(15)1012 2231 y Fd(kill-whole-)o(li)o(ne)9 b(\(\))g Fe(.)c(.)i(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 b Ff(15)1012 2278 y Fd(kill-word)10 b(\(M-d\))f Fe(.)d(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! 24 b Ff(15)1012 2413 y Fs(M)1012 2478 y Ff(mark-mo)q(di\014ed-li)q(nes) 8 b Fe(.)h(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(6)1012 ! 2526 y(mark-symlink)o(ed-di)q(rectori)q(es)14 b Fe(.)6 ! b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)23 b Ff(6)1012 2574 y(matc)o(h-hidden-\014l)q(es)14 ! b Fe(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)24 b Ff(6)1012 ! 2622 y Fd(menu-comple)o(te)9 b(\(\))g Fe(.)e(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)23 b Ff(16)1012 2670 y(meta-\015ag)t Fe(.)8 b(.)e(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 ! b Ff(6)p eop ! %%Page: 60 62 ! 60 61 bop 75 -58 a Fu(60)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fs(N)75 210 y Fd(next-histo)o(ry)9 b(\(C-n\))g Fe(.)t(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)21 b Ff(13)75 256 y Fd(non-increm)o(en)o (tal)o(-f)o(orw)o(ard)o(-s)o(ear)o(ch)o(-hi)o(st)o(ory)9 ! b(\(M-n\))159 302 y Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Ff(13)75 ! 347 y Fd(non-increm)o(en)o(tal)o(-r)o(eve)o(rse)o(-s)o(ear)o(ch)o(-hi)o ! (st)o(ory)9 b(\(M-p\))159 393 y Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 ! b Ff(13)75 515 y Fs(O)75 576 y Ff(output-meta)5 b Fe(.)i(.)f(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 b Ff(6)75 ! 622 y Fd(overwrite-)o(mo)o(de)9 b(\(\))g Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)22 b Ff(15)75 744 y Fs(P)75 805 y Ff(page-completions)14 ! b Fe(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)23 ! b Ff(7)75 851 y Fd(possible-c)o(om)o(ple)o(ti)o(ons)9 b(\(M-?\))h Fe(.)c(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)25 b Ff(16)75 897 y Fd(prefix-met)o(a)10 b(\()324 ! 895 y Fn(h)p 335 868 70 2 v 335 897 a Fm(ESC)p 335 904 ! V 402 895 a Fn(i)417 897 y Fd(\))g Fe(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 ! b Ff(17)75 942 y Fd(previous-h)o(is)o(tor)o(y)10 b(\(C-p\))c Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)18 b Ff(12)75 1072 y Fs(Q)75 1133 y Fd(quoted-ins)o(er)o (t)10 b(\(C-q)h(or)h(C-v\))c Fe(.)e(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)22 b Ff(14)75 1263 y Fs(R)75 ! 1323 y Fd(re-read-in)o(it)o(-fi)o(le)9 b(\(C-x)i(C-r\))5 b Fe(.)h(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)18 ! b Ff(17)75 1369 y Fd(readline)s Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Ff(21)75 ! 1415 y Fd(redraw-cur)o(re)o(nt-)o(li)o(ne)9 b(\(\))d Fe(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)18 b Ff(12)75 1461 y Fd(reverse-se)o(ar)o(ch-)o(hi)o (sto)o(ry)9 b(\(C-r\))g Fe(.)d(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)23 b Ff(13)75 1506 y Fd(revert-lin)o(e)10 b(\(M-r\))d Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 b Ff(17)75 ! 1552 y Fd(rl_add_def)o(un)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)22 b Ff(28)75 1598 y Fd(rl_add_fun)o(ma)o(p_e)o(nt)o(ry) t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(31)75 1643 y Fd(rl_add_und)o(o)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(32)75 1689 y Fd(rl_alphabe)o(ti)o(c)9 b Fe(.)s(.)d(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)22 b Ff(36)75 1735 y Fd(rl_already)o(_p)o(rom)o (pt)o(ed)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(25)75 ! 1781 y Fd(rl_attempt)o(ed)o(_co)o(mp)o(let)o(ion)o(_f)o(unc)o(ti)o(on)t ! Fe(.)s(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 b Ff(43)75 ! 1826 y Fd(rl_attempt)o(ed)o(_co)o(mp)o(let)o(ion)o(_o)o(ver)6 b Fe(.)s(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 ! b Ff(46)75 1872 y Fd(rl_basic_q)o(uo)o(te_)o(ch)o(ara)o(cte)o(rs)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! 22 b Ff(45)75 1918 y Fd(rl_basic_w)o(or)o(d_b)o(re)o(ak_)o(cha)o(ra)o (cte)o(rs)5 b Fe(.)s(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 ! b Ff(45)75 1964 y Fd(rl_begin_u)o(nd)o(o_g)o(ro)o(up)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(32)75 2009 y Fd(rl_bind_ke)o(y)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(30)75 2055 y Fd(rl_bind_ke)o(y_)o(in_)o(ma)o(p)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Ff(30)75 2101 y Fd(rl_binding)o(_k)o(eym)o(ap)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 ! b Ff(27)75 2146 y Fd(rl_callbac)o(k_)o(han)o(dl)o(er_)o(ins)o(ta)o(ll)7 b Fe(.)s(.)g(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(38)75 2192 y Fd(rl_callbac)o(k_)o(han)o(dl)o(er_)o(rem)o(ov)o(e)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)21 ! b Ff(38)75 2238 y Fd(rl_callbac)o(k_)o(rea)o(d_)o(cha)o(r)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)25 b Ff(38)75 2284 y Fd(rl_catch_s)o(ig)o(nal)o(s)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(40)75 ! 2329 y Fd(rl_catch_s)o(ig)o(win)o(ch)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)19 b Ff(40)75 2375 y Fd(rl_char_is)o(_q)o(uot)o(ed)o(_p)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(44)75 2421 y Fd(rl_cleanup)o(_a)o (fte)o(r_)o(sig)o(nal)7 b Fe(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)23 b Ff(40)75 2467 y Fd(rl_clear_m)o(es)o(sag)o(e)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) ! 19 b Ff(33)75 2512 y Fd(rl_clear_p)o(en)o(din)o(g_)o(inp)o(ut)8 b Fe(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)24 b Ff(35)1012 149 y Fd(rl_clear_si)o(gn)o(als)6 ! b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Ff(41)1012 ! 196 y Fd(rl_complete)6 b Fe(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)24 b Ff(42)1012 242 y Fd(rl_complete)o(_i)o(nte)o(rn)o(al)s Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)17 b Ff(42)1012 288 y Fd(rl_complete)o(r_)o (quo)o(te)o(_ch)o(ar)o(act)o(ers)5 b Fe(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)20 b Ff(45)1012 335 y Fd(rl_complete)o(r_)o(wor)o (d_)o(bre)o(ak)o(_ch)o(ara)o(ct)o(ers)8 b Fe(.)e(.)g(.)g(.)h(.)f(.)g(.) ! 25 b Ff(45)1012 381 y Fd(rl_completi)o(on)o(_ap)o(pe)o(nd_)o(ch)o(ara)o (cte)o(r)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 ! b Ff(45)1012 427 y Fd(rl_completi)o(on)o(_di)o(sp)o(lay)o(_m)o(atc)o (hes)o(_h)o(ook)8 b Fe(.)e(.)g(.)g(.)h(.)f(.)g(.)25 b ! Ff(45)1012 474 y Fd(rl_completi)o(on)o(_en)o(tr)o(y_f)o(un)o(cti)o(on)s ! Fe(.)s(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)17 b Ff(42,)c(43)1012 ! 520 y Fd(rl_completi)o(on)o(_ma)o(rk)o(_sy)o(ml)o(ink)o(_di)o(rs)t ! Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Ff(46)1012 ! 566 y Fd(rl_completi)o(on)o(_ma)o(tc)o(hes)8 b Fe(.)f(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)25 ! b Ff(43)1012 613 y Fd(rl_completi)o(on)o(_mo)o(de)t Fe(.)t(.)6 ! b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)19 b Ff(43)1012 659 y Fd(rl_completi)o(on)o(_qu) ! o(er)o(y_i)o(te)o(ms)9 b Fe(.)s(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)23 b Ff(45)1012 705 y Fd(rl_completi)o(on)o(_su) ! o(pp)o(res)o(s_)o(app)o(end)5 b Fe(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)20 b Ff(46)1012 752 y Fd(rl_completi)o(on)o(_ty)o(pe)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(46)1012 798 y Fd(rl_copy_key)o(ma)o(p)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)21 b Ff(29)1012 844 y Fd(rl_copy_tex)o(t)6 b Fe(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(34)1012 891 y Fd(rl_crlf)t Fe(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)17 b Ff(33)1012 937 y Fd(rl_delete_t)o(ex)o(t)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)21 b ! Ff(34)1012 983 y Fd(rl_deprep_t)o(er)o(m_f)o(un)o(cti)o(on)7 b Fe(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)24 b Ff(26)1012 1030 y Fd(rl_deprep_t)o(er)o(min)o(al)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(35)1012 1076 ! y Fd(rl_ding)t Fe(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)17 b Ff(36)1012 1122 y Fd(rl_director)o(y_)o (com)o(pl)o(eti)o(on)o(_ho)o(ok)7 b Fe(.)s(.)f(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)g(.)h(.)20 b Ff(44)1012 1169 y Fd(rl_discard_)o(ke)o ! (yma)o(p)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Ff(29)1012 ! 1215 y Fd(rl_dispatch)o(in)o(g)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)21 b Ff(25)1012 1261 y Fd(rl_display_)o(ma)o(tch)o(_l)o (ist)8 b Fe(.)f(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)25 b Ff(36)1012 1308 y Fd(rl_do_undo)8 b Fe(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 ! b Ff(32)1012 1354 y Fd(rl_done)t Fe(.)t(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)17 b Ff(24)1012 ! 1400 y Fd(rl_editing_)o(mo)o(de)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)21 b Ff(28)1012 1447 y Fd(rl_end)5 b Fe(.)t(.)h(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 ! b Ff(24)1012 1493 y Fd(rl_end_undo)o(_g)o(rou)o(p)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Ff(32)1012 1539 y Fd(rl_erase_em)o(pt)o(y_l)o(in)o(e)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 ! b Ff(25)1012 1586 y Fd(rl_event_ho)o(ok)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)22 b Ff(26)1012 1632 y Fd(rl_execute_)o(ne)o (xt)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Ff(35)1012 1678 y Fd(rl_executin)o(g_)o(key)o(ma)o(p)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Ff(26)1012 1725 y Fd(rl_executin)o(g_) o(mac)o(ro)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(27)1012 ! 1771 y Fd(rl_expand_p)o(ro)o(mpt)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)20 b Ff(34)1012 1817 y Fd(rl_explicit)o(_a)o(rg)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(28)1012 ! 1864 y Fd(rl_extend_l)o(in)o(e_b)o(uf)o(fer)8 b Fe(.)f(.)f(.)g(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)25 ! b Ff(36)1012 1910 y Fd(rl_filename)o(_c)o(omp)o(le)o(tio)o(n_)o(des)o (ire)o(d)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 ! b Ff(46)1012 1956 y Fd(rl_filename)o(_c)o(omp)o(le)o(tio)o(n_)o(fun)o (cti)o(on)t Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 ! b Ff(43)1012 2003 y Fd(rl_filename)o(_d)o(equ)o(ot)o(ing)o(_f)o(unc)o (tio)o(n)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 ! b Ff(44)1012 2049 y Fd(rl_filename)o(_q)o(uot)o(e_)o(cha)o(ra)o(cte)o (rs)7 b Fe(.)s(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(45)1012 2095 y Fd(rl_filename)o(_q)o(uot)o(in)o(g_d)o(es)o(ire)o (d)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)21 ! b Ff(46)1012 2142 y Fd(rl_filename)o(_q)o(uot)o(in)o(g_f)o(un)o(cti)o (on)7 b Fe(.)s(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)20 ! b Ff(44)1012 2188 y Fd(rl_forced_u)o(pd)o(ate)o(_d)o(isp)o(la)o(y)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)23 b Ff(33)1012 2234 y Fd(rl_free_lin)o(e_)o(sta)o(te)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(40)1012 2281 y Fd(rl_free_und)o(o_)o(lis)o(t)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! 19 b Ff(32)1012 2327 y Fd(rl_function)o(_d)o(ump)o(er)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(31)1012 2373 y Fd(rl_function)o(_o)o(f_k)o(ey)o(seq)8 b Fe(.)f(.)f(.)g(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)25 ! b Ff(31)1012 2420 y Fd(rl_funmap_n)o(am)o(es)7 b Fe(.)s(.)f(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)21 b Ff(31)1012 2466 y Fd(rl_generic_)o(bi)o(nd)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 b Ff(30)1012 ! 2512 y Fd(rl_get_keym)o(ap)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)22 b Ff(29)p eop ! %%Page: 61 63 ! 61 62 bop 75 -58 a Fu(F)l(unction)16 b(and)f(V)l(ariable)i(Index)1187 ! b(61)75 149 y Fd(rl_get_key)o(ma)o(p_b)o(y_)o(nam)o(e)9 ! b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)25 b Ff(29)75 196 y Fd(rl_get_key)o(ma)o(p_n)o(am)o(e)5 ! b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Ff(29)75 242 y Fd(rl_get_scr)o(ee) ! o(n_s)o(iz)o(e)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 ! b Ff(41)75 288 y Fd(rl_get_ter)o(mc)o(ap)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)21 b Ff(37)75 335 y Fd(rl_getc)t ! Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)17 b Ff(35)75 381 y Fd(rl_getc_fu)o(nc)o(tio)o(n)6 ! b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(26)75 ! 427 y Fd(rl_gnu_rea)o(dl)o(ine)o(_p)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)19 b Ff(25)75 474 y Fd(rl_ignore_)o(co)o(mpl)o(et)o(ion)o(_du)o(pl) ! o(ica)o(te)o(s)5 b Fe(.)s(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)18 ! b Ff(46)75 520 y Fd(rl_ignore_)o(so)o(me_)o(co)o(mpl)o(eti)o(on)o(s_f)o ! (un)o(cti)o(on)7 b Fe(.)g(.)f(.)g(.)g(.)g(.)24 b Ff(44)75 ! 566 y Fd(rl_inhibit)o(_c)o(omp)o(le)o(tio)o(n)9 b Fe(.)d(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(47)75 613 y Fd(rl_initial)o(iz)o(e)9 b Fe(.)s(.)d(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)22 b Ff(36)75 659 y Fd(rl_insert_)o(co)o(mpl)o (et)o(ion)o(s)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Ff(43)75 705 y Fd(rl_insert_)o(te) o(xt)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Ff(34)75 752 y Fd(rl_instrea)o(m)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(25)75 798 y Fd(rl_invokin)o(g_)o (key)o(se)o(qs)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(31)75 ! 844 y Fd(rl_invokin)o(g_)o(key)o(se)o(qs_)o(in_)o(ma)o(p)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)21 ! b Ff(31)75 891 y Fd(rl_kill_te)o(xt)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)22 b Ff(34)75 937 y Fd(rl_last_fu)o(nc)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(26)75 983 y Fd(rl_library)o(_v)o(ers)o(io)o(n)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)18 b Ff(25)75 1030 y ! Fd(rl_line_bu)o(ff)o(er)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)21 b Ff(24)75 1076 y Fd(rl_list_fu)o(nm)o(ap_)o(na)o(mes)s Fe(.)s(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)16 b Ff(31)75 1122 y Fd(rl_macro_b)o(in)o(d)9 b Fe(.)s(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)22 ! b Ff(37)75 1169 y Fd(rl_macro_d)o(um)o(per)6 b Fe(.)t(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)20 b Ff(37)75 1215 y Fd(rl_make_ba)o(re)o(_ke)o(ym) ! o(ap)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(29)75 1261 y Fd(rl_make_ke)o(ym)o(ap)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)21 b Ff(29)75 1308 y Fd(rl_mark)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)17 ! b Ff(24)75 1354 y Fd(rl_message)7 b Fe(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 b Ff(33)75 1400 y Fd(rl_modifyi)o(ng)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(32)75 1447 y Fd(rl_named_f)o(un)o(cti)o(on)5 b Fe(.)s(.)i(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)19 b Ff(31)75 1493 y Fd(rl_num_cha)o(rs)o(_to)o(_r)o (ead)s Fe(.)s(.)6 b(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)16 b Ff(24)75 1539 y Fd(rl_numeric)o(_a) o(rg)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Ff(28)75 1586 y Fd(rl_on_new_)o(li)o(ne)8 b Fe(.)s(.)e(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)21 b Ff(33)75 1632 y Fd(rl_on_new_)o(li)o(ne_)o (wi)o(th_)o(pro)o(mp)o(t)8 b Fe(.)t(.)e(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)21 b Ff(33)75 1678 y Fd(rl_outstre)o(am)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)22 ! b Ff(26)75 1725 y Fd(rl_parse_a)o(nd)o(_bi)o(nd)5 b Fe(.)s(.)i(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)19 b Ff(31)75 1771 y Fd(rl_pending)o(_i)o(npu)o(t)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(24)75 ! 1817 y Fd(rl_point)s Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)16 b Ff(24)75 1864 y Fd(rl_possibl)o(e_)o (com)o(pl)o(eti)o(ons)7 b Fe(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)23 b Ff(42)75 1910 y Fd(rl_pre_inp)o(ut)o(_ho)o(ok)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 ! b Ff(26)75 1956 y Fd(rl_prep_te)o(rm)o(_fu)o(nc)o(tio)o(n)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)25 b Ff(26)75 2003 y Fd(rl_prep_te)o(rm)o(ina)o(l)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)19 b Ff(35)75 ! 2049 y Fd(rl_prompt)8 b Fe(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)24 b Ff(25)75 2095 y Fd(rl_push_ma)o(cr)o(o_i)o(np) o(ut)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 b Ff(34)75 2142 y Fd(rl_read_in)o(it)o(_fi)o(le)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! 19 b Ff(31)75 2188 y Fd(rl_read_ke)o(y)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(34)75 2234 y Fd(rl_readlin)o(e_)o(nam)o(e)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) ! 19 b Ff(25)75 2281 y Fd(rl_readlin)o(e_)o(sta)o(te)5 b Fe(.)s(.)i(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)19 b Ff(27)75 2327 y Fd(rl_readlin)o(e_)o(ver)o(si)o(on)t Fe(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)17 ! b Ff(25)75 2373 y Fd(rl_redispl)o(ay)6 b Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)h(.)f(.)22 b Ff(33)75 2420 y Fd(rl_redispl)o(ay)o(_fu)o (nc)o(tio)o(n)9 b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 b Ff(26)75 2466 y ! Fd(rl_replace)o(_l)o(ine)6 b Fe(.)t(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! 20 b Ff(36)75 2512 y Fd(rl_reset_a)o(ft)o(er_)o(si)o(gna)o(l)9 ! b Fe(.)d(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)25 b Ff(40)1012 149 y Fd(rl_reset_li)o(ne)o(_st)o(at)o ! (e)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Ff(33)1012 195 ! y Fd(rl_reset_te)o(rm)o(ina)o(l)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! 19 b Ff(35)1012 241 y Fd(rl_resize_t)o(er)o(min)o(al)t ! Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)19 b Ff(41)1012 287 y ! Fd(rl_restore_)o(pr)o(omp)o(t)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)19 ! b Ff(34)1012 333 y Fd(rl_save_pro)o(mp)o(t)8 b Fe(.)s(.)e(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)21 b Ff(33)1012 379 y Fd(rl_set_key)8 ! b Fe(.)e(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)24 ! b Ff(30)1012 424 y Fd(rl_set_keyb)o(oa)o(rd_)o(in)o(put)o(_t)o(ime)o (out)5 b Fe(.)t(.)h(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 ! b Ff(35)1012 470 y Fd(rl_set_keym)o(ap)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)22 b Ff(29)1012 516 y Fd(rl_set_pare)o(n_)o (bli)o(nk)o(_ti)o(me)o(out)7 b Fe(.)t(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)22 b Ff(37)1012 562 y Fd(rl_set_prom)o(pt)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 ! b Ff(34)1012 608 y Fd(rl_set_scre)o(en)o(_si)o(ze)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)19 b Ff(41)1012 654 y Fd(rl_set_sign)o(al)o(s)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.) f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)21 b ! Ff(41)1012 700 y Fd(rl_show_cha)o(r)6 b Fe(.)g(.)h(.)f(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)23 b Ff(33)1012 745 y Fd(rl_special_)o(pr)o (efi)o(xe)o(s)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)18 b Ff(45)1012 ! 791 y Fd(rl_startup_)o(ho)o(ok)7 b Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)21 b Ff(26)1012 837 y Fd(rl_stuff_ch)o(ar)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 ! b Ff(35)1012 883 y Fd(rl_terminal)o(_n)o(ame)6 b Fe(.)s(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)20 b Ff(25)1012 929 y Fd(rl_tty_set_)o(de)o(fau)o(lt)o (_bi)o(nd)o(ing)o(s)8 b Fe(.)s(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)21 b Ff(35)1012 975 y Fd(rl_unbind_c)o(om)o(man)o(d_)o (in_)o(ma)o(p)7 b Fe(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)23 b Ff(30)1012 1020 y Fd(rl_unbind_f)o(un)o(cti)o (on)o(_in)o(_m)o(ap)9 b Fe(.)s(.)d(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)23 b Ff(30)1012 1066 y Fd(rl_unbind_k)o(ey)8 b Fe(.)s(.)e(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)22 ! b Ff(30)1012 1112 y Fd(rl_unbind_k)o(ey)o(_in)o(_m)o(ap)s Fe(.)t(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.) ! g(.)g(.)g(.)h(.)f(.)g(.)17 b Ff(30)1012 1158 y Fd(rl_username)o(_c)o (omp)o(le)o(tio)o(n_)o(fun)o(cti)o(on)t Fe(.)s(.)7 b(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)18 b Ff(43)1012 1204 y Fd(rl_variable)o(_b)o(ind)6 b Fe(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)20 b Ff(37)1012 ! 1250 y Fd(rl_variable)o(_d)o(ump)o(er)t Fe(.)t(.)6 b(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g ! (.)19 b Ff(37)1012 1380 y Fs(S)1012 1441 y Fd(self-insert)9 b(\(a,)j(b,)g(A,)g(1,)g(!,)g(...)o(\))6 b Fe(.)g(.)g(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)20 b Ff(14)1012 1487 y Fd(set-mark)10 b(\(C-@\))g Fe(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(17)1012 1533 y(sho)o(w-all-if-am)o(bigu)q(ous)14 b Fe(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)23 b Ff(7)1012 1579 y Fd(start-kbd-m)o(ac)o(ro)9 b(\(C-x)j(\(\))c Fe(.)d(.)i(.)f(.)g(.)g(.) g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)22 ! b Ff(17)1012 1701 y Fs(T)1012 1763 y Fd(tab-insert)9 ! b(\(M-)1281 1761 y Fn(h)p 1292 1735 74 2 v 1292 1763 ! a Fm(T)m(AB)p 1292 1770 V 1364 1761 a Fn(i)1379 1763 y Fd(\))e Fe(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)20 b Ff(14)1012 1808 y Fd(tilde-expan)o(d)10 b(\(M-~\))f Fe(.)s(.)e(.)f(.)g(.)g(.)g(.)g(.)g (.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)22 ! b Ff(17)1012 1854 y Fd(transpose-c)o(ha)o(rs)9 b(\(C-t\))d Fe(.)f(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)20 b Ff(14)1012 1900 y Fd(transpose-w)o(or)o(ds)9 b(\(M-t\))d Fe(.)f(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Ff(14)1012 2030 y ! Fs(U)1012 2092 y Fd(undo)12 b(\(C-_)f(or)h(C-x)g(C-u\))c Fe(.)t(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)21 b Ff(17)1012 2137 y Fd(universal-a)o(rg)o (ume)o(nt)9 b(\(\))d Fe(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)20 b Ff(16)1012 ! 2183 y Fd(unix-line-d)o(is)o(car)o(d)10 b(\(C-u\))5 b Fe(.)t(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)18 b Ff(15)1012 2229 y Fd(unix-word-r)o(ub)o(out)9 b(\(C-w\))d Fe(.)t(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)19 b Ff(15)1012 2275 y Fd(upcase-word)9 b(\(M-u\))e Fe(.)f(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Ff(14)1012 ! 2405 y Fs(V)1012 2466 y Fd(vi-editing-)o(mo)o(de)9 b(\(M-C-j\))c ! Fe(.)t(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)18 b Ff(18)1012 2512 y(visible-stats)c Fe(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)24 ! b Ff(7)p eop ! %%Page: 62 64 ! 62 63 bop 75 -58 a Fu(62)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fs(Y)75 242 y Fd(yank)11 b(\(C-y\))5 b Fe(.)g(.)h(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)18 b Ff(16)1012 ! 149 y Fd(yank-last-a)o(rg)9 b(\(M-.)i(or)h(M-_\))c Fe(.)f(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)23 ! b Ff(13)1012 196 y Fd(yank-nth-ar)o(g)10 b(\(M-C-y\))d Fe(.)s(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)h(.)20 b Ff(13)1012 242 y Fd(yank-pop)10 b(\(M-y\))g Fe(.)c(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)25 ! b Ff(16)p eop ! %%Page: -1 65 ! -1 64 bop 1862 -58 a Fu(i)75 149 y Fq(T)-7 b(able)27 b(of)f(Con)n(ten)n(ts)75 320 y Fs(1)67 b(Command)22 b(Line)i(Editing)d Fa(.)10 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h *************** *** 4950,4954 **** b Fu(4)374 882 y(1.3.2)44 b(Conditional)16 b(Init)g(Constructs)5 b Fl(.)i(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)g(.)f(.)19 b Fu(8)374 937 y(1.3.3)44 b(Sample)16 b(Init)g(File)11 b Fl(.)e(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) --- 5087,5091 ---- b Fu(4)374 882 y(1.3.2)44 b(Conditional)16 b(Init)g(Constructs)5 b Fl(.)i(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)g(.)f(.)19 b Fu(9)374 937 y(1.3.3)44 b(Sample)16 b(Init)g(File)11 b Fl(.)e(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) *************** *** 4963,4977 **** b(Commands)14 b(F)l(or)h(Changing)h(T)l(ext)e Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 ! b Fu(13)374 1211 y(1.4.4)44 b(Killing)18 b(And)e(Y)l(anking)9 b Fl(.)e(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24 b Fu(14)374 1266 y(1.4.5)44 b(Sp)q(ecifying)17 b(Numeric)f(Argumen)o(ts)c Fl(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)27 ! b Fu(15)374 1320 y(1.4.6)44 b(Letting)15 b(Readline)i(T)o(yp)q(e)e(F)l (or)g(Y)l(ou)10 b Fl(.)d(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)25 b Fu(16)374 1375 y(1.4.7)44 b(Keyb)q(oard)15 b(Macros)6 b Fl(.)h(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)21 ! b Fu(16)374 1430 y(1.4.8)44 b(Some)15 b(Miscellaneous)i(Commands)7 b Fl(.)g(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) 22 b Fu(17)224 1485 y(1.5)45 b(Readline)16 b(vi)g(Mo)q(de)e --- 5100,5114 ---- b(Commands)14 b(F)l(or)h(Changing)h(T)l(ext)e Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 ! b Fu(14)374 1211 y(1.4.4)44 b(Killing)18 b(And)e(Y)l(anking)9 b Fl(.)e(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24 b Fu(15)374 1266 y(1.4.5)44 b(Sp)q(ecifying)17 b(Numeric)f(Argumen)o(ts)c Fl(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)27 ! b Fu(16)374 1320 y(1.4.6)44 b(Letting)15 b(Readline)i(T)o(yp)q(e)e(F)l (or)g(Y)l(ou)10 b Fl(.)d(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)25 b Fu(16)374 1375 y(1.4.7)44 b(Keyb)q(oard)15 b(Macros)6 b Fl(.)h(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)21 ! b Fu(17)374 1430 y(1.4.8)44 b(Some)15 b(Miscellaneous)i(Commands)7 b Fl(.)g(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) 22 b Fu(17)224 1485 y(1.5)45 b(Readline)16 b(vi)g(Mo)q(de)e *************** *** 4980,5061 **** (.)h(.)f(.)h(.)28 b Fu(18)75 1606 y Fs(2)67 b(Programming)23 b(with)g(GNU)f(Readline)12 b Fa(.)f(.)g(.)f(.)g(.)g(.)g(.)h(.)f(.)35 ! b Fs(19)224 1675 y Fu(2.1)45 b(Basic)16 b(Beha)o(vior)8 b Fl(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(19)224 1729 y(2.2)45 b(Custom)14 b(F)l(unctions)7 b Fl(.)i(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)22 b Fu(20)374 1784 y(2.2.1)44 b(Readline)16 b(T)o(yp)q(edefs)9 b Fl(.)g(.)e(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)g(.)f(.)h(.)24 b Fu(20)374 1839 y(2.2.2)44 b(W)l(riting)16 b(a)e(New)i(F)l(unction)6 b Fl(.)i(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! 21 b Fu(21)224 1894 y(2.3)45 b(Readline)16 b(V)l(ariables)g Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g ! (.)f(.)h(.)29 b Fu(22)224 1949 y(2.4)45 b(Readline)16 b(Con)o(v)o(enience)h(F)l(unctions)7 b Fl(.)i(.)e(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! 23 b Fu(26)374 2003 y(2.4.1)44 b(Naming)15 b(a)g(F)l(unction)e Fl(.)7 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)27 b Fu(26)374 2058 y(2.4.2)44 b(Selecting)17 b(a)e(Keymap)6 b Fl(.)h(.)h(.)g(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)21 b Fu(26)374 2113 y(2.4.3)44 b(Binding)17 b(Keys)5 b Fl(.)j(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) ! h(.)f(.)20 b Fu(27)374 2168 y(2.4.4)44 b(Asso)q(ciating)16 b(F)l(unction)g(Names)f(and)g(Bindings)8 b Fl(.)h(.)f(.)f(.)h(.)f(.)h ! (.)23 b Fu(28)374 2222 y(2.4.5)44 b(Allo)o(wing)16 b(Undoing)f Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)29 b ! Fu(29)374 2277 y(2.4.6)44 b(Redispla)o(y)10 b Fl(.)e(.)g(.)g(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 ! b Fu(30)374 2332 y(2.4.7)44 b(Mo)q(difying)16 b(T)l(ext)7 b Fl(.)g(.)g(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)22 ! b Fu(31)374 2387 y(2.4.8)44 b(Character)14 b(Input)c Fl(.)f(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)25 ! b Fu(32)374 2442 y(2.4.9)44 b(T)l(erminal)16 b(Managemen)o(t)11 b Fl(.)c(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(33)374 2496 y(2.4.10)43 b(Utilit)o(y)17 b(F)l(unctions)c Fl(.)7 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)28 b Fu(33)374 2551 y(2.4.11)43 b(Miscellaneous)18 b(F)l(unctions)6 b Fl(.)i(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h ! (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)21 b Fu(34)374 2606 y(2.4.12)43 b(Alternate)16 b(In)o(terface)f Fl(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 b Fu(35)374 2661 y(2.4.13)43 b(A)16 b(Readline)g(Example)9 b Fl(.)f(.)f(.)h(.)f(.)h(.)g (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)24 b Fu(35)p eop ! %%Page: -2 64 ! -2 63 bop 75 -58 a Fu(ii)1321 b(GNU)15 b(Readline)h(Library)224 42 y(2.5)45 b(Readline)16 b(Signal)h(Handling)12 b Fl(.)c(.)g(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(37)224 96 y(2.6)45 b(Custom)14 b(Completers)f Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)28 b Fu(39)374 151 y(2.6.1)44 b(Ho)o(w)14 b(Completing)i(W)l(orks)10 b Fl(.)d(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)f(.)25 b Fu(39)374 206 y(2.6.2)44 b(Completion)16 b(F)l(unctions)6 b Fl(.)i(.)g(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! 21 b Fu(40)374 261 y(2.6.3)44 b(Completion)16 b(V)l(ariables)c Fl(.)c(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(41)374 315 y(2.6.4)44 b(A)15 b(Short)g(Completion)h(Example)5 b Fl(.)j(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h ! (.)f(.)20 b Fu(44)75 437 y Fs(Concept)i(Index)10 b Fa(.)i(.)e(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)33 b Fs(55)75 572 y(F)-6 b(unction)25 b(and)d(V)-6 b(ariable)24 b(Index)9 b Fa(.)i(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)32 b Fs(57)p eop %%Trailer end --- 5117,5198 ---- (.)h(.)f(.)h(.)28 b Fu(18)75 1606 y Fs(2)67 b(Programming)23 b(with)g(GNU)f(Readline)12 b Fa(.)f(.)g(.)f(.)g(.)g(.)g(.)h(.)f(.)35 ! b Fs(21)224 1675 y Fu(2.1)45 b(Basic)16 b(Beha)o(vior)8 b Fl(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)23 b Fu(21)224 1729 y(2.2)45 b(Custom)14 b(F)l(unctions)7 b Fl(.)i(.)f(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)22 b Fu(22)374 1784 y(2.2.1)44 b(Readline)16 b(T)o(yp)q(edefs)9 b Fl(.)g(.)e(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)g(.)f(.)h(.)24 b Fu(23)374 1839 y(2.2.2)44 b(W)l(riting)16 b(a)e(New)i(F)l(unction)6 b Fl(.)i(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! 21 b Fu(23)224 1894 y(2.3)45 b(Readline)16 b(V)l(ariables)g Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g ! (.)f(.)h(.)29 b Fu(24)224 1949 y(2.4)45 b(Readline)16 b(Con)o(v)o(enience)h(F)l(unctions)7 b Fl(.)i(.)e(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! 23 b Fu(28)374 2003 y(2.4.1)44 b(Naming)15 b(a)g(F)l(unction)e Fl(.)7 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)27 b Fu(28)374 2058 y(2.4.2)44 b(Selecting)17 b(a)e(Keymap)6 b Fl(.)h(.)h(.)g(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)21 b Fu(29)374 2113 y(2.4.3)44 b(Binding)17 b(Keys)5 b Fl(.)j(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) ! h(.)f(.)20 b Fu(30)374 2168 y(2.4.4)44 b(Asso)q(ciating)16 b(F)l(unction)g(Names)f(and)g(Bindings)8 b Fl(.)h(.)f(.)f(.)h(.)f(.)h ! (.)23 b Fu(31)374 2222 y(2.4.5)44 b(Allo)o(wing)16 b(Undoing)f Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)29 b ! Fu(32)374 2277 y(2.4.6)44 b(Redispla)o(y)10 b Fl(.)e(.)g(.)g(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 ! b Fu(33)374 2332 y(2.4.7)44 b(Mo)q(difying)16 b(T)l(ext)7 b Fl(.)g(.)g(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)22 ! b Fu(34)374 2387 y(2.4.8)44 b(Character)14 b(Input)c Fl(.)f(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)25 ! b Fu(34)374 2442 y(2.4.9)44 b(T)l(erminal)16 b(Managemen)o(t)11 b Fl(.)c(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(35)374 2496 y(2.4.10)43 b(Utilit)o(y)17 b(F)l(unctions)c Fl(.)7 b(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)28 b Fu(36)374 2551 y(2.4.11)43 b(Miscellaneous)18 b(F)l(unctions)6 b Fl(.)i(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h ! (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)21 b Fu(37)374 2606 y(2.4.12)43 b(Alternate)16 b(In)o(terface)f Fl(.)7 b(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 b Fu(37)374 2661 y(2.4.13)43 b(A)16 b(Readline)g(Example)9 b Fl(.)f(.)f(.)h(.)f(.)h(.)g (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)24 b Fu(38)p eop ! %%Page: -2 66 ! -2 65 bop 75 -58 a Fu(ii)1321 b(GNU)15 b(Readline)h(Library)224 42 y(2.5)45 b(Readline)16 b(Signal)h(Handling)12 b Fl(.)c(.)g(.)f(.)h (.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(39)224 96 y(2.6)45 b(Custom)14 b(Completers)f Fl(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.) f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)28 b Fu(41)374 151 y(2.6.1)44 b(Ho)o(w)14 b(Completing)i(W)l(orks)10 b Fl(.)d(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)f(.)25 b Fu(41)374 206 y(2.6.2)44 b(Completion)16 b(F)l(unctions)6 b Fl(.)i(.)g(.)f(.)h(.)f(.)h(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! 21 b Fu(42)374 261 y(2.6.3)44 b(Completion)16 b(V)l(ariables)c Fl(.)c(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f ! (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)27 b Fu(43)374 315 y(2.6.4)44 b(A)15 b(Short)g(Completion)h(Example)5 b Fl(.)j(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h ! (.)f(.)20 b Fu(47)75 437 y Fs(Concept)i(Index)10 b Fa(.)i(.)e(.)g(.)g (.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)33 b Fs(57)75 572 y(F)-6 b(unction)25 b(and)d(V)-6 b(ariable)24 b(Index)9 b Fa(.)i(.)f(.)g(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)32 b Fs(59)p eop %%Trailer end diff -Nrc2 readline-4.2a/doc/readline_3.ps readline-4.3/doc/readline_3.ps *** readline-4.2a/doc/readline_3.ps Tue Oct 9 15:08:13 2001 --- readline-4.3/doc/readline_3.ps Thu Jun 27 13:54:44 2002 *************** *** 1,10 **** %!PS-Adobe-3.0 ! %%Creator: groff version 1.16.1 ! %%CreationDate: Tue Oct 9 15:08:13 2001 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Courier ! %%DocumentSuppliedResources: procset grops 1.16 1 %%Pages: 14 %%PageOrder: Ascend --- 1,10 ---- %!PS-Adobe-3.0 ! %%Creator: groff version 1.17.2 ! %%CreationDate: Thu Jun 27 13:54:44 2002 %%DocumentNeededResources: font Times-Roman %%+ font Times-Bold %%+ font Times-Italic %%+ font Courier ! %%DocumentSuppliedResources: procset grops 1.17 2 %%Pages: 14 %%PageOrder: Ascend *************** *** 12,16 **** %%EndComments %%BeginProlog ! %%BeginResource: procset grops 1.16 1 /setpacking where{ pop --- 12,16 ---- %%EndComments %%BeginProlog ! %%BeginResource: procset grops 1.17 2 /setpacking where{ pop *************** *** 216,220 **** (\()2.5 E F3(const c)A(har *pr)-.15 E(ompt)-.45 E F0(\);)A F1(COPYRIGHT) 72 194.4 Q F0(Readline is Cop)108 206.4 Q ! (yright \251 1989\2552001 by the Free Softw)-.1 E(are F)-.1 E (oundation, Inc.)-.15 E F1(DESCRIPTION)72 223.2 Q F2 -.18(re)108 235.2 S (adline).18 E F0 .088 --- 216,220 ---- (\()2.5 E F3(const c)A(har *pr)-.15 E(ompt)-.45 E F0(\);)A F1(COPYRIGHT) 72 194.4 Q F0(Readline is Cop)108 206.4 Q ! (yright \251 1989\2552002 by the Free Softw)-.1 E(are F)-.1 E (oundation, Inc.)-.15 E F1(DESCRIPTION)72 223.2 Q F2 -.18(re)108 235.2 S (adline).18 E F0 .088 *************** *** 309,314 **** (xample, placing)-2.65 E(M\255Control\255u: uni)144 686.4 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(or)108 698.4 Q(C\255Meta\255u: uni)144 ! 710.4 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(GNU Readline 4.2a) ! 72 768 Q(2001 October 9)123.745 E(1)197.895 E EP %%Page: 2 2 %%BeginPageSetup --- 309,314 ---- (xample, placing)-2.65 E(M\255Control\255u: uni)144 686.4 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(or)108 698.4 Q(C\255Meta\255u: uni)144 ! 710.4 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(GNU Readline 4.3) ! 72 768 Q(2002 January 22)126.24 E(1)195.95 E EP %%Page: 2 2 %%BeginPageSetup *************** *** 403,408 **** -.15(ve)-.15 G(are e)108 724.8 Q 2.5(xpanded. Backslash)-.15 F (will quote an)2.5 E 2.5(yo)-.15 G(ther character in the macro te)-2.5 E ! (xt, including " and '.)-.15 E(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(2)197.895 E EP %%Page: 3 3 %%BeginPageSetup --- 403,408 ---- -.15(ve)-.15 G(are e)108 724.8 Q 2.5(xpanded. Backslash)-.15 F (will quote an)2.5 E 2.5(yo)-.15 G(ther character in the macro te)-2.5 E ! (xt, including " and '.)-.15 E(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(2)195.95 E EP %%Page: 3 3 %%BeginPageSetup *************** *** 501,506 **** (rdless of what the terminal claims it can support.).05 F .957(The name) 5.956 F F1(meta\255\215ag)3.457 E F0 .957(is a)3.457 F(synon)144 703.2 Q ! (ym for this v)-.15 E(ariable.)-.25 E(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(3)197.895 E EP %%Page: 4 4 %%BeginPageSetup --- 501,506 ---- (rdless of what the terminal claims it can support.).05 F .957(The name) 5.956 F F1(meta\255\215ag)3.457 E F0 .957(is a)3.457 F(synon)144 703.2 Q ! (ym for this v)-.15 E(ariable.)-.25 E(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(3)195.95 E EP %%Page: 4 4 %%BeginPageSetup *************** *** 535,608 **** (istory lines that ha)-2.5 E .3 -.15(ve b)-.2 H (een modi\214ed are displayed with a preceding asterisk \().15 E F1(*)A ! F0(\).)A F1(match\255hidden\255\214les \(On\))108 240 Q F0 .192(This v) ! 144 252 R .192(ariable, when set to)-.25 F F1(On)2.692 E F0 2.692(,c)C ! .192(auses readline to match \214les whose names be)-2.692 F .193 ! (gin with a `.)-.15 F 2.693('\()-.7 G(hidden)-2.693 E 1.024 (\214les\) when performing \214lename completion, unless the leading `.) ! 144 264 R 3.523('i)-.7 G 3.523(ss)-3.523 G 1.023 ! (upplied by the user in the)-3.523 F(\214lename to be completed.)144 276 ! Q F1(output\255meta \(Off\))108 288 Q F0 .506(If set to)144 300 R F1(On) ! 3.006 E F0 3.006(,r)C .507(eadline will display characters with the eig\ ! hth bit set directly rather than as a meta-)-3.006 F(pre\214x)144 312 Q ! (ed escape sequence.)-.15 E F1 ! (print\255completions\255horizontally \(Off\))108 324 Q F0 1.319 ! (If set to)144 336 R F1(On)3.819 E F0 3.819(,r)C 1.318(eadline will dis\ play completions with matches sorted horizontally in alphabetical)-3.819 ! F(order)144 348 Q 2.5(,r)-.4 G(ather than do)-2.5 E(wn the screen.)-.25 ! E F1(sho)108 360 Q(w\255all\255if\255ambiguous \(Off\))-.1 E F0 .477 ! (This alters the def)144 372 R .477(ault beha)-.1 F .477 (vior of the completion functions.)-.2 F .478(If set to)5.478 F F1(on) 2.978 E F0 2.978(,w)C .478(ords which ha)-3.078 F .778 -.15(ve m)-.2 H (ore).15 E 1.264(than one possible completion cause the matches to be l\ ! isted immediately instead of ringing the)144 384 R(bell.)144 396 Q F1 ! (visible\255stats \(Off\))108 408 Q F0 .846(If set to)144 420 R F1(On) 3.346 E F0 3.346(,ac)C .846(haracter denoting a \214le')-3.346 F 3.346 (st)-.55 G .846(ype as reported by)-3.346 F F2(stat)3.346 E F0 .846 (\(2\) is appended to the \214lename)B ! (when listing possible completions.)144 432 Q F1(Conditional Constructs) ! 87 448.8 Q F0 .05(Readline implements a f)108 460.8 R .05(acility simil\ ar in spirit to the conditional compilation features of the C preproces\ ! sor)-.1 F .096(which allo)108 472.8 R .096(ws k)-.25 F .396 -.15(ey b) -.1 H .096(indings and v).15 F .096 (ariable settings to be performed as the result of tests.)-.25 F .097 ! (There are four parser)5.096 F(directi)108 484.8 Q -.15(ve)-.25 G 2.5 ! (su).15 G(sed.)-2.5 E F1($if)108 501.6 Q F0(The)24.89 E F1($if)2.963 E F0 .463(construct allo)2.963 F .462(ws bindings to be made based on the\ editing mode, the terminal being used,)-.25 F .477 ! (or the application using readline.)144 513.6 R .477(The te)5.477 F .477 (xt of the test e)-.15 F .477 (xtends to the end of the line; no characters)-.15 F ! (are required to isolate it.)144 525.6 Q F1(mode)144 542.4 Q F0(The) 12.67 E F1(mode=)3.712 E F0 1.212(form of the)3.712 F F1($if)3.711 E F0 (directi)3.711 E 1.511 -.15(ve i)-.25 H 3.711(su).15 G 1.211 (sed to test whether readline is in emacs or vi)-3.711 F 3.065 ! (mode. This)180 554.4 R .565(may be used in conjunction with the)3.065 F F1 .565(set k)3.065 F(eymap)-.1 E F0 .565(command, for instance, to) ! 3.065 F .03(set bindings in the)180 566.4 R F2(emacs-standar)2.529 E(d) -.37 E F0(and)2.529 E F2(emacs-ctlx)2.529 E F0 -.1(ke)2.529 G .029 ! (ymaps only if readline is starting out)-.05 F(in emacs mode.)180 578.4 ! Q F1(term)144 595.2 Q F0(The)15.46 E F1(term=)3.196 E F0 .696 (form may be used to include terminal-speci\214c k)3.196 F .996 -.15 ! (ey b)-.1 H .697(indings, perhaps to bind).15 F .654(the k)180 607.2 R .954 -.15(ey s)-.1 H .654(equences output by the terminal').15 F 3.154 (sf)-.55 G .654(unction k)-3.154 F -.15(ey)-.1 G 3.154(s. The).15 F -.1 ! (wo)3.154 G .654(rd on the right side of).1 F(the)180 619.2 Q F1(=)3.003 E F0 .503(is tested ag)3.003 F .504(ainst the full name of the terminal\ and the portion of the terminal name)-.05 F(before the \214rst)180 ! 631.2 Q F12.5 E F0 5(.T)C(his allo)-5 E(ws)-.25 E F2(sun)2.5 E F0 (to match both)2.5 E F2(sun)2.5 E F0(and)2.5 E F2(sun\255cmd)2.5 E F0 ! 2.5(,f).77 G(or instance.)-2.5 E F1(application)144 648 Q F0(The)180 660 ! Q F1(application)3.003 E F0 .503 ! (construct is used to include application-speci\214c settings.)3.003 F ! .503(Each program)5.503 F .114(using the readline library sets the)180 ! 672 R F2 .114(application name)2.614 F F0 2.614(,a)C .114 ! (nd an initialization \214le can test for a)-2.614 F .501(particular v) ! 180 684 R 3.001(alue. This)-.25 F .501(could be used to bind k)3.001 F ! .801 -.15(ey s)-.1 H .5(equences to functions useful for a spe-).15 F ! .396(ci\214c program.)180 696 R -.15(Fo)5.396 G 2.896(ri).15 G .396 ! (nstance, the follo)-2.896 F .396(wing command adds a k)-.25 F .696 -.15 ! (ey s)-.1 H .397(equence that quotes the).15 F(current or pre)180 708 Q ! (vious w)-.25 E(ord in Bash:)-.1 E(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(4)197.895 E EP %%Page: 5 5 %%BeginPageSetup --- 535,606 ---- (istory lines that ha)-2.5 E .3 -.15(ve b)-.2 H (een modi\214ed are displayed with a preceding asterisk \().15 E F1(*)A ! F0(\).)A F1(mark\255symlink)108 240 Q(ed\255dir)-.1 E(ectories \(Off\)) ! -.18 E F0 .175(If set to)144 252 R F1(On)2.675 E F0 2.675(,c)C .175 ! (ompleted names which are symbolic links to directories ha)-2.675 F .475 ! -.15(ve a s)-.2 H .175(lash appended \(sub-).15 F(ject to the v)144 264 ! Q(alue of)-.25 E F1(mark\255dir)2.5 E(ectories)-.18 E F0(\).)A F1 ! (match\255hidden\255\214les \(On\))108 276 Q F0 .193(This v)144 288 R ! .193(ariable, when set to)-.25 F F1(On)2.693 E F0 2.693(,c)C .192 ! (auses readline to match \214les whose names be)-2.693 F .192 ! (gin with a `.)-.15 F 2.692('\()-.7 G(hidden)-2.692 E 1.023 (\214les\) when performing \214lename completion, unless the leading `.) ! 144 300 R 3.523('i)-.7 G 3.523(ss)-3.523 G 1.024 ! (upplied by the user in the)-3.523 F(\214lename to be completed.)144 312 ! Q F1(output\255meta \(Off\))108 324 Q F0 .507(If set to)144 336 R F1(On) ! 3.007 E F0 3.007(,r)C .507(eadline will display characters with the eig\ ! hth bit set directly rather than as a meta-)-3.007 F(pre\214x)144 348 Q ! (ed escape sequence.)-.15 E F1(page\255completions \(On\))108 360 Q F0 ! .808(If set to)144 372 R F1(On)3.308 E F0 3.308(,r)C .808 ! (eadline uses an internal)-3.308 F F2(mor)3.308 E(e)-.37 E F0(-lik)A ! 3.308(ep)-.1 G .808(ager to display a screenful of possible comple-) ! -3.308 F(tions at a time.)144 384 Q F1 ! (print\255completions\255horizontally \(Off\))108 396 Q F0 1.319 ! (If set to)144 408 R F1(On)3.819 E F0 3.819(,r)C 1.318(eadline will dis\ play completions with matches sorted horizontally in alphabetical)-3.819 ! F(order)144 420 Q 2.5(,r)-.4 G(ather than do)-2.5 E(wn the screen.)-.25 ! E F1(sho)108 432 Q(w\255all\255if\255ambiguous \(Off\))-.1 E F0 .477 ! (This alters the def)144 444 R .477(ault beha)-.1 F .477 (vior of the completion functions.)-.2 F .478(If set to)5.478 F F1(on) 2.978 E F0 2.978(,w)C .478(ords which ha)-3.078 F .778 -.15(ve m)-.2 H (ore).15 E 1.264(than one possible completion cause the matches to be l\ ! isted immediately instead of ringing the)144 456 R(bell.)144 468 Q F1 ! (visible\255stats \(Off\))108 480 Q F0 .846(If set to)144 492 R F1(On) 3.346 E F0 3.346(,ac)C .846(haracter denoting a \214le')-3.346 F 3.346 (st)-.55 G .846(ype as reported by)-3.346 F F2(stat)3.346 E F0 .846 (\(2\) is appended to the \214lename)B ! (when listing possible completions.)144 504 Q F1(Conditional Constructs) ! 87 520.8 Q F0 .05(Readline implements a f)108 532.8 R .05(acility simil\ ar in spirit to the conditional compilation features of the C preproces\ ! sor)-.1 F .096(which allo)108 544.8 R .096(ws k)-.25 F .396 -.15(ey b) -.1 H .096(indings and v).15 F .096 (ariable settings to be performed as the result of tests.)-.25 F .097 ! (There are four parser)5.096 F(directi)108 556.8 Q -.15(ve)-.25 G 2.5 ! (su).15 G(sed.)-2.5 E F1($if)108 573.6 Q F0(The)24.89 E F1($if)2.963 E F0 .463(construct allo)2.963 F .462(ws bindings to be made based on the\ editing mode, the terminal being used,)-.25 F .477 ! (or the application using readline.)144 585.6 R .477(The te)5.477 F .477 (xt of the test e)-.15 F .477 (xtends to the end of the line; no characters)-.15 F ! (are required to isolate it.)144 597.6 Q F1(mode)144 614.4 Q F0(The) 12.67 E F1(mode=)3.712 E F0 1.212(form of the)3.712 F F1($if)3.711 E F0 (directi)3.711 E 1.511 -.15(ve i)-.25 H 3.711(su).15 G 1.211 (sed to test whether readline is in emacs or vi)-3.711 F 3.065 ! (mode. This)180 626.4 R .565(may be used in conjunction with the)3.065 F F1 .565(set k)3.065 F(eymap)-.1 E F0 .565(command, for instance, to) ! 3.065 F .03(set bindings in the)180 638.4 R F2(emacs-standar)2.529 E(d) -.37 E F0(and)2.529 E F2(emacs-ctlx)2.529 E F0 -.1(ke)2.529 G .029 ! (ymaps only if readline is starting out)-.05 F(in emacs mode.)180 650.4 ! Q F1(term)144 667.2 Q F0(The)15.46 E F1(term=)3.196 E F0 .696 (form may be used to include terminal-speci\214c k)3.196 F .996 -.15 ! (ey b)-.1 H .697(indings, perhaps to bind).15 F .654(the k)180 679.2 R .954 -.15(ey s)-.1 H .654(equences output by the terminal').15 F 3.154 (sf)-.55 G .654(unction k)-3.154 F -.15(ey)-.1 G 3.154(s. The).15 F -.1 ! (wo)3.154 G .654(rd on the right side of).1 F(the)180 691.2 Q F1(=)3.003 E F0 .503(is tested ag)3.003 F .504(ainst the full name of the terminal\ and the portion of the terminal name)-.05 F(before the \214rst)180 ! 703.2 Q F12.5 E F0 5(.T)C(his allo)-5 E(ws)-.25 E F2(sun)2.5 E F0 (to match both)2.5 E F2(sun)2.5 E F0(and)2.5 E F2(sun\255cmd)2.5 E F0 ! 2.5(,f).77 G(or instance.)-2.5 E(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(4)195.95 E EP %%Page: 5 5 %%BeginPageSetup *************** *** 610,703 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF($if)180 84 Q F0(Bash)2.5 E 2.5(#Q)180 96 S (uote the current or pre)-2.5 E(vious w)-.25 E(ord)-.1 E ! ("\\C-xq": "\\eb\\"\\ef\\"")180 108 Q F1($endif)180 120 Q($endif)108 ! 136.8 Q F0(This command, as seen in the pre)9.33 E(vious e)-.25 E (xample, terminates an)-.15 E F1($if)2.5 E F0(command.)2.5 E F1($else) ! 108 153.6 Q F0(Commands in this branch of the)15.45 E F1($if)2.5 E F0 (directi)2.5 E .3 -.15(ve a)-.25 H(re e).15 E -.15(xe)-.15 G ! (cuted if the test f).15 E(ails.)-.1 E F1($include)108 170.4 Q F0 .357 ! (This directi)144 182.4 R .657 -.15(ve t)-.25 H(ak).15 E .357 (es a single \214lename as an ar)-.1 F .356 (gument and reads commands and bindings from that)-.18 F 2.5(\214le. F) ! 144 194.4 R(or e)-.15 E(xample, the follo)-.15 E(wing directi)-.25 E .3 ! -.15(ve w)-.25 H(ould read).05 E/F2 10/Times-Italic@0 SF(/etc/inputr)2.5 ! E(c)-.37 E F0(:)A F1($include)144 218.4 Q F2(/etc/inputr)5.833 E(c)-.37 ! E/F3 10.95/Times-Bold@0 SF(SEARCHING)72 235.2 Q F0 1.003(Readline pro) ! 108 247.2 R 1.003(vides commands for searching through the command hist\ ! ory for lines containing a speci\214ed)-.15 F 2.5(string. There)108 ! 259.2 R(are tw)2.5 E 2.5(os)-.1 G(earch modes:)-2.5 E F2(incr)2.5 E ! (emental)-.37 E F0(and)2.5 E F2(non-incr)2.5 E(emental)-.37 E F0(.).51 E ! .698(Incremental searches be)108 276 R .698 (gin before the user has \214nished typing the search string.)-.15 F .697(As each character of the)5.697 F .112 ! (search string is typed, readline displays the ne)108 288 R .112 (xt entry from the history matching the string typed so f)-.15 F(ar)-.1 E 5.113(.A)-.55 G(n)-5.113 E .545 ! (incremental search requires only as man)108 300 R 3.045(yc)-.15 G .544 (haracters as needed to \214nd the desired history entry)-3.045 F 5.544 ! (.T)-.65 G 3.044(os)-6.344 G(earch)-3.044 E(backw)108 312 Q .18 (ard in the history for a particular string, type)-.1 F F1(C\255r)2.681 E F0 5.181(.T)C(yping)-5.981 E F1(C\255s)2.681 E F0 .181(searches forw) 2.681 F .181(ard through the history)-.1 F(.)-.65 E .354 ! (The characters present in the v)108 324 R .354(alue of the)-.25 F F1 (isear)2.854 E(ch-terminators)-.18 E F0 -.25(va)2.854 G .354 ! (riable are used to terminate an incremen-).25 F .6(tal search.)108 336 R .6(If that v)5.6 F .6(ariable has not been assigned a v)-.25 F .6 (alue the)-.25 F F2(Escape)3.1 E F0(and)3.1 E F1(C\255J)3.1 E F0 .6 ! (characters will terminate an)3.1 F .123(incremental search.)108 348 R F1(C\255G)5.123 E F0 .123 (will abort an incremental search and restore the original line.)2.623 F .122(When the search is)5.122 F(terminated, the history entry containin\ ! g the search string becomes the current line.)108 360 Q 2.406 -.8 ! (To \214)108 376.8 T .806 (nd other matching entries in the history list, type).8 F F1(C\255s) 3.306 E F0(or)3.306 E F1(C\255r)3.306 E F0 .806(as appropriate.)3.306 F ! .807(This will search back-)5.806 F -.1(wa)108 388.8 S 1.309(rd or forw) .1 F 1.309(ard in the history for the ne)-.1 F 1.309 (xt line matching the search string typed so f)-.15 F(ar)-.1 E 6.309(.A) -.55 G 1.609 -.15(ny o)-6.309 H 1.308(ther k).15 F -.15(ey)-.1 G .317 (sequence bound to a readline command will terminate the search and e) ! 108 400.8 R -.15(xe)-.15 G .318(cute that command.).15 F -.15(Fo)5.318 G ! 2.818(ri).15 G(nstance,)-2.818 E 3.481(an)108 412.8 S -.25(ew)-3.481 G .981(line will terminate the search and accept the line, thereby e).25 F -.15(xe)-.15 G .98(cuting the command from the history).15 F 3.061 ! (list. A)108 424.8 R(mo)3.061 E -.15(ve)-.15 G .562 (ment command will terminate the search, mak).15 F 3.062(et)-.1 G .562 (he last line found the current line, and be)-3.062 F(gin)-.15 E ! (editing.)108 436.8 Q .567(Non-incremental searches read the entire sea\ rch string before starting to search for matching history lines.)108 ! 453.6 R(The search string may be typed by the user or be part of the co\ ! ntents of the current line.)108 465.6 Q F3(EDITING COMMANDS)72 482.4 Q ! F0 1.391(The follo)108 494.4 R 1.391 (wing is a list of the names of the commands and the def)-.25 F 1.391 (ault k)-.1 F 1.691 -.15(ey s)-.1 H 1.391(equences to which the).15 F ! 3.892(ya)-.15 G(re)-3.892 E 2.5(bound. Command)108 506.4 R (names without an accompan)2.5 E(ying k)-.15 E .3 -.15(ey s)-.1 H (equence are unbound by def).15 E(ault.)-.1 E .055(In the follo)108 ! 523.2 R .055(wing descriptions,)-.25 F F2(point)2.555 E F0 .055 (refers to the current cursor position, and)2.555 F F2(mark)2.555 E F0 ! .054(refers to a cursor position)2.554 F(sa)108 535.2 Q -.15(ve)-.2 G 2.5(db).15 G 2.5(yt)-2.5 G(he)-2.5 E F1(set\255mark)2.5 E F0 2.5 (command. The)2.5 F(te)2.5 E (xt between the point and mark is referred to as the)-.15 E F2 -.37(re) ! 2.5 G(gion)-.03 E F0(.)A F1(Commands f)87 552 Q(or Mo)-.25 E(ving)-.1 E ! (beginning\255of\255line \(C\255a\))108 564 Q F0(Mo)144 576 Q .3 -.15 (ve t)-.15 H 2.5(ot).15 G(he start of the current line.)-2.5 E F1 ! (end\255of\255line \(C\255e\))108 588 Q F0(Mo)144 600 Q .3 -.15(ve t) ! -.15 H 2.5(ot).15 G(he end of the line.)-2.5 E F1 -.25(fo)108 612 S ! (rward\255char \(C\255f\)).25 E F0(Mo)144 624 Q .3 -.15(ve f)-.15 H(orw) ! .15 E(ard a character)-.1 E(.)-.55 E F1(backward\255char \(C\255b\))108 ! 636 Q F0(Mo)144 648 Q .3 -.15(ve b)-.15 H(ack a character).15 E(.)-.55 E ! F1 -.25(fo)108 660 S(rward\255w).25 E(ord \(M\255f\))-.1 E F0(Mo)144 672 ! Q .822 -.15(ve f)-.15 H(orw).15 E .522(ard to the end of the ne)-.1 F ! .523(xt w)-.15 F 3.023(ord. W)-.1 F .523 ! (ords are composed of alphanumeric characters \(let-)-.8 F ! (ters and digits\).)144 684 Q F1(backward\255w)108 696 Q(ord \(M\255b\)) ! -.1 E F0(Mo)144 708 Q 1.71 -.15(ve b)-.15 H 1.41 ! (ack to the start of the current or pre).15 F 1.41(vious w)-.25 F 3.91 ! (ord. W)-.1 F 1.41(ords are composed of alphanumeric)-.8 F ! (characters \(letters and digits\).)144 720 Q(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(5)197.895 E EP %%Page: 6 6 %%BeginPageSetup --- 608,703 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(application)144 84 Q F0(The)180 96 Q F1(application) ! 3.003 E F0 .503 ! (construct is used to include application-speci\214c settings.)3.003 F ! .503(Each program)5.503 F .114(using the readline library sets the)180 ! 108 R/F2 10/Times-Italic@0 SF .114(application name)2.614 F F0 2.614(,a) ! C .114(nd an initialization \214le can test for a)-2.614 F .501 ! (particular v)180 120 R 3.001(alue. This)-.25 F .501 ! (could be used to bind k)3.001 F .801 -.15(ey s)-.1 H .5 ! (equences to functions useful for a spe-).15 F .396(ci\214c program.)180 ! 132 R -.15(Fo)5.396 G 2.896(ri).15 G .396(nstance, the follo)-2.896 F ! .396(wing command adds a k)-.25 F .696 -.15(ey s)-.1 H .397 ! (equence that quotes the).15 F(current or pre)180 144 Q(vious w)-.25 E ! (ord in Bash:)-.1 E F1($if)180 168 Q F0(Bash)2.5 E 2.5(#Q)180 180 S (uote the current or pre)-2.5 E(vious w)-.25 E(ord)-.1 E ! ("\\C-xq": "\\eb\\"\\ef\\"")180 192 Q F1($endif)180 204 Q($endif)108 ! 220.8 Q F0(This command, as seen in the pre)9.33 E(vious e)-.25 E (xample, terminates an)-.15 E F1($if)2.5 E F0(command.)2.5 E F1($else) ! 108 237.6 Q F0(Commands in this branch of the)15.45 E F1($if)2.5 E F0 (directi)2.5 E .3 -.15(ve a)-.25 H(re e).15 E -.15(xe)-.15 G ! (cuted if the test f).15 E(ails.)-.1 E F1($include)108 254.4 Q F0 .357 ! (This directi)144 266.4 R .657 -.15(ve t)-.25 H(ak).15 E .357 (es a single \214lename as an ar)-.1 F .356 (gument and reads commands and bindings from that)-.18 F 2.5(\214le. F) ! 144 278.4 R(or e)-.15 E(xample, the follo)-.15 E(wing directi)-.25 E .3 ! -.15(ve w)-.25 H(ould read).05 E F2(/etc/inputr)2.5 E(c)-.37 E F0(:)A F1 ! ($include)144 302.4 Q F2(/etc/inputr)5.833 E(c)-.37 E/F3 10.95 ! /Times-Bold@0 SF(SEARCHING)72 319.2 Q F0 1.003(Readline pro)108 331.2 R ! 1.003(vides commands for searching through the command history for line\ ! s containing a speci\214ed)-.15 F 2.5(string. There)108 343.2 R(are tw) ! 2.5 E 2.5(os)-.1 G(earch modes:)-2.5 E F2(incr)2.5 E(emental)-.37 E F0 ! (and)2.5 E F2(non-incr)2.5 E(emental)-.37 E F0(.).51 E .698 ! (Incremental searches be)108 360 R .698 (gin before the user has \214nished typing the search string.)-.15 F .697(As each character of the)5.697 F .112 ! (search string is typed, readline displays the ne)108 372 R .112 (xt entry from the history matching the string typed so f)-.15 F(ar)-.1 E 5.113(.A)-.55 G(n)-5.113 E .545 ! (incremental search requires only as man)108 384 R 3.045(yc)-.15 G .544 (haracters as needed to \214nd the desired history entry)-3.045 F 5.544 ! (.T)-.65 G 3.044(os)-6.344 G(earch)-3.044 E(backw)108 396 Q .18 (ard in the history for a particular string, type)-.1 F F1(C\255r)2.681 E F0 5.181(.T)C(yping)-5.981 E F1(C\255s)2.681 E F0 .181(searches forw) 2.681 F .181(ard through the history)-.1 F(.)-.65 E .354 ! (The characters present in the v)108 408 R .354(alue of the)-.25 F F1 (isear)2.854 E(ch-terminators)-.18 E F0 -.25(va)2.854 G .354 ! (riable are used to terminate an incremen-).25 F .6(tal search.)108 420 R .6(If that v)5.6 F .6(ariable has not been assigned a v)-.25 F .6 (alue the)-.25 F F2(Escape)3.1 E F0(and)3.1 E F1(C\255J)3.1 E F0 .6 ! (characters will terminate an)3.1 F .123(incremental search.)108 432 R F1(C\255G)5.123 E F0 .123 (will abort an incremental search and restore the original line.)2.623 F .122(When the search is)5.122 F(terminated, the history entry containin\ ! g the search string becomes the current line.)108 444 Q 2.406 -.8 ! (To \214)108 460.8 T .806 (nd other matching entries in the history list, type).8 F F1(C\255s) 3.306 E F0(or)3.306 E F1(C\255r)3.306 E F0 .806(as appropriate.)3.306 F ! .807(This will search back-)5.806 F -.1(wa)108 472.8 S 1.309(rd or forw) .1 F 1.309(ard in the history for the ne)-.1 F 1.309 (xt line matching the search string typed so f)-.15 F(ar)-.1 E 6.309(.A) -.55 G 1.609 -.15(ny o)-6.309 H 1.308(ther k).15 F -.15(ey)-.1 G .317 (sequence bound to a readline command will terminate the search and e) ! 108 484.8 R -.15(xe)-.15 G .318(cute that command.).15 F -.15(Fo)5.318 G ! 2.818(ri).15 G(nstance,)-2.818 E 3.481(an)108 496.8 S -.25(ew)-3.481 G .981(line will terminate the search and accept the line, thereby e).25 F -.15(xe)-.15 G .98(cuting the command from the history).15 F 3.061 ! (list. A)108 508.8 R(mo)3.061 E -.15(ve)-.15 G .562 (ment command will terminate the search, mak).15 F 3.062(et)-.1 G .562 (he last line found the current line, and be)-3.062 F(gin)-.15 E ! (editing.)108 520.8 Q .567(Non-incremental searches read the entire sea\ rch string before starting to search for matching history lines.)108 ! 537.6 R(The search string may be typed by the user or be part of the co\ ! ntents of the current line.)108 549.6 Q F3(EDITING COMMANDS)72 566.4 Q ! F0 1.391(The follo)108 578.4 R 1.391 (wing is a list of the names of the commands and the def)-.25 F 1.391 (ault k)-.1 F 1.691 -.15(ey s)-.1 H 1.391(equences to which the).15 F ! 3.892(ya)-.15 G(re)-3.892 E 2.5(bound. Command)108 590.4 R (names without an accompan)2.5 E(ying k)-.15 E .3 -.15(ey s)-.1 H (equence are unbound by def).15 E(ault.)-.1 E .055(In the follo)108 ! 607.2 R .055(wing descriptions,)-.25 F F2(point)2.555 E F0 .055 (refers to the current cursor position, and)2.555 F F2(mark)2.555 E F0 ! .054(refers to a cursor position)2.554 F(sa)108 619.2 Q -.15(ve)-.2 G 2.5(db).15 G 2.5(yt)-2.5 G(he)-2.5 E F1(set\255mark)2.5 E F0 2.5 (command. The)2.5 F(te)2.5 E (xt between the point and mark is referred to as the)-.15 E F2 -.37(re) ! 2.5 G(gion)-.03 E F0(.)A F1(Commands f)87 636 Q(or Mo)-.25 E(ving)-.1 E ! (beginning\255of\255line \(C\255a\))108 648 Q F0(Mo)144 660 Q .3 -.15 (ve t)-.15 H 2.5(ot).15 G(he start of the current line.)-2.5 E F1 ! (end\255of\255line \(C\255e\))108 672 Q F0(Mo)144 684 Q .3 -.15(ve t) ! -.15 H 2.5(ot).15 G(he end of the line.)-2.5 E F1 -.25(fo)108 696 S ! (rward\255char \(C\255f\)).25 E F0(Mo)144 708 Q .3 -.15(ve f)-.15 H(orw) ! .15 E(ard a character)-.1 E(.)-.55 E(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(5)195.95 E EP %%Page: 6 6 %%BeginPageSetup *************** *** 705,794 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(clear\255scr)108 84 Q(een \(C\255l\))-.18 E F0 .993 ! (Clear the screen lea)144 96 R .993 (ving the current line at the top of the screen.)-.2 F -.4(Wi)5.993 G .993(th an ar).4 F .993(gument, refresh the)-.18 F ! (current line without clearing the screen.)144 108 Q F1 -.18(re)108 120 S(draw\255curr).18 E(ent\255line)-.18 E F0(Refresh the current line.)144 ! 132 Q F1(Commands f)87 148.8 Q(or Manipulating the History)-.25 E ! (accept\255line \(Newline, Retur)108 160.8 Q(n\))-.15 E F0 .365 ! (Accept the line re)144 172.8 R -.05(ga)-.15 G .364 (rdless of where the cursor is.).05 F .364(If this line is non-empty) 5.364 F 2.864(,i)-.65 G 2.864(tm)-2.864 G .364(ay be added to the)-2.864 ! F .74(history list for future recall with)144 184.8 R F1 (add_history\(\))3.24 E F0 5.741(.I)C 3.241(ft)-5.741 G .741 (he line is a modi\214ed history line, the history)-3.241 F ! (line is restored to its original state.)144 196.8 Q F1(pr)108 208.8 Q -.15(ev)-.18 G(ious\255history \(C\255p\)).15 E F0(Fetch the pre)144 ! 220.8 Q(vious command from the history list, mo)-.25 E ! (ving back in the list.)-.15 E F1(next\255history \(C\255n\))108 232.8 Q ! F0(Fetch the ne)144 244.8 Q(xt command from the history list, mo)-.15 E (ving forw)-.15 E(ard in the list.)-.1 E F1 ! (beginning\255of\255history \(M\255<\))108 256.8 Q F0(Mo)144 268.8 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he \214rst line in the history)-2.5 E(.) ! -.65 E F1(end\255of\255history \(M\255>\))108 280.8 Q F0(Mo)144 292.8 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he end of the input history)-2.5 E 2.5 (,i)-.65 G(.e., the line currently being entered.)-2.5 E F1 -2.29 -.18 ! (re v)108 304.8 T(erse\255sear).08 E(ch\255history \(C\255r\))-.18 E F0 ! 1.471(Search backw)144 316.8 R 1.471 (ard starting at the current line and mo)-.1 F 1.47 (ving `up' through the history as necessary)-.15 F(.)-.65 E ! (This is an incremental search.)144 328.8 Q F1 -.25(fo)108 340.8 S (rward\255sear).25 E(ch\255history \(C\255s\))-.18 E F0 1.131 ! (Search forw)144 352.8 R 1.131(ard starting at the current line and mo) -.1 F 1.132(ving `do)-.15 F 1.132(wn' through the history as necessary) ! -.25 F(.)-.65 E(This is an incremental search.)144 364.8 Q F1 ! (non\255incr)108 376.8 Q(emental\255r)-.18 E -2.3 -.15(ev e)-.18 H (rse\255sear).15 E(ch\255history \(M\255p\))-.18 E F0 .165(Search backw) ! 144 388.8 R .164(ard through the history starting at the current line u\ ! sing a non-incremental search for)-.1 F 2.5(as)144 400.8 S ! (tring supplied by the user)-2.5 E(.)-.55 E F1(non\255incr)108 412.8 Q (emental\255f)-.18 E(orward\255sear)-.25 E(ch\255history \(M\255n\))-.18 ! E F0 1.353(Search forw)144 424.8 R 1.354(ard through the history using \ a non-incremental search for a string supplied by the)-.1 F(user)144 ! 436.8 Q(.)-.55 E F1(history\255sear)108 448.8 Q(ch\255f)-.18 E(orward) ! -.25 E F0 .249(Search forw)144 460.8 R .249(ard through the history for\ the string of characters between the start of the current line)-.1 F ! (and the current cursor position \(the)144 472.8 Q/F2 10/Times-Italic@0 SF(point)2.5 E F0 2.5(\). This)B(is a non-incremental search.)2.5 E F1 ! (history\255sear)108 484.8 Q(ch\255backward)-.18 E F0 .95(Search backw) ! 144 496.8 R .951(ard through the history for the string of characters b\ ! etween the start of the current)-.1 F(line and the point.)144 508.8 Q ! (This is a non-incremental search.)5 E F1(yank\255nth\255ar)108 520.8 Q 2.5(g\()-.1 G<4dad43ad7929>-2.5 E F0 .622(Insert the \214rst ar)144 ! 532.8 R .622(gument to the pre)-.18 F .622 (vious command \(usually the second w)-.25 F .622(ord on the pre)-.1 F ! .622(vious line\))-.25 F .794(at point.)144 544.8 R -.4(Wi)5.794 G .794 (th an ar).4 F(gument)-.18 E F2(n)3.294 E F0 3.294(,i).24 G .794 (nsert the)-3.294 F F2(n)3.294 E F0 .794(th w)B .794(ord from the pre) -.1 F .794(vious command \(the w)-.25 F .795(ords in the)-.1 F(pre)144 ! 556.8 Q .292(vious command be)-.25 F .292(gin with w)-.15 F .291 (ord 0\).)-.1 F 2.791(An)5.291 G -2.25 -.15(eg a)-2.791 H(ti).15 E .591 -.15(ve a)-.25 H -.18(rg).15 G .291(ument inserts the).18 F F2(n)2.791 E ! F0 .291(th w)B .291(ord from the end of)-.1 F(the pre)144 568.8 Q ! (vious command.)-.25 E F1(yank\255last\255ar)108 580.8 Q 2.5(g\()-.1 G -1.667(M\255. ,)-2.5 F -1.667(M\255_ \))2.5 F F0 1.307 ! (Insert the last ar)144 592.8 R 1.307(gument to the pre)-.18 F 1.307 (vious command \(the last w)-.25 F 1.308(ord of the pre)-.1 F 1.308 ! (vious history entry\).)-.25 F -.4(Wi)144 604.8 S .736(th an ar).4 F .736(gument, beha)-.18 F 1.036 -.15(ve ex)-.2 H .736(actly lik).15 F(e) -.1 E F1(yank\255nth\255ar)3.235 E(g)-.1 E F0 5.735(.S)C(uccessi)-5.735 E 1.035 -.15(ve c)-.25 H .735(alls to).15 F F1(yank\255last\255ar)3.235 E(g)-.1 E F0(mo)3.235 E -.15(ve)-.15 G ! (back through the history list, inserting the last ar)144 616.8 Q ! (gument of each line in turn.)-.18 E F1(Commands f)87 633.6 Q ! (or Changing T)-.25 E(ext)-.92 E(delete\255char \(C\255d\))108 645.6 Q ! F0 .357(Delete the character at point.)144 657.6 R .358 ! (If point is at the be)5.358 F .358 ! (ginning of the line, there are no characters in the)-.15 F ! (line, and the last character typed w)144 669.6 Q(as not bound to)-.1 E ! F1(delete\255char)2.5 E F0 2.5(,t)C(hen return)-2.5 E/F3 9/Times-Bold@0 ! SF(EOF)2.5 E/F4 9/Times-Roman@0 SF(.)A F1 ! (backward\255delete\255char \(Rubout\))108 681.6 Q F0 .553 ! (Delete the character behind the cursor)144 693.6 R 5.553(.W)-.55 G .553 ! (hen gi)-5.553 F -.15(ve)-.25 G 3.053(nan).15 G .553(umeric ar)-3.053 F ! .552(gument, sa)-.18 F .852 -.15(ve t)-.2 H .552(he deleted te).15 F ! .552(xt on)-.15 F(the kill ring.)144 705.6 Q(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(6)197.895 E EP %%Page: 7 7 %%BeginPageSetup --- 705,792 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(backward\255char \(C\255b\))108 84 Q F0(Mo)144 96 Q .3 ! -.15(ve b)-.15 H(ack a character).15 E(.)-.55 E F1 -.25(fo)108 108 S ! (rward\255w).25 E(ord \(M\255f\))-.1 E F0(Mo)144 120 Q .822 -.15(ve f) ! -.15 H(orw).15 E .522(ard to the end of the ne)-.1 F .523(xt w)-.15 F ! 3.023(ord. W)-.1 F .523 ! (ords are composed of alphanumeric characters \(let-)-.8 F ! (ters and digits\).)144 132 Q F1(backward\255w)108 144 Q(ord \(M\255b\)) ! -.1 E F0(Mo)144 156 Q 1.71 -.15(ve b)-.15 H 1.41 ! (ack to the start of the current or pre).15 F 1.41(vious w)-.25 F 3.91 ! (ord. W)-.1 F 1.41(ords are composed of alphanumeric)-.8 F ! (characters \(letters and digits\).)144 168 Q F1(clear\255scr)108 180 Q ! (een \(C\255l\))-.18 E F0 .993(Clear the screen lea)144 192 R .993 (ving the current line at the top of the screen.)-.2 F -.4(Wi)5.993 G .993(th an ar).4 F .993(gument, refresh the)-.18 F ! (current line without clearing the screen.)144 204 Q F1 -.18(re)108 216 S(draw\255curr).18 E(ent\255line)-.18 E F0(Refresh the current line.)144 ! 228 Q F1(Commands f)87 244.8 Q(or Manipulating the History)-.25 E ! (accept\255line \(Newline, Retur)108 256.8 Q(n\))-.15 E F0 .365 ! (Accept the line re)144 268.8 R -.05(ga)-.15 G .364 (rdless of where the cursor is.).05 F .364(If this line is non-empty) 5.364 F 2.864(,i)-.65 G 2.864(tm)-2.864 G .364(ay be added to the)-2.864 ! F .74(history list for future recall with)144 280.8 R F1 (add_history\(\))3.24 E F0 5.741(.I)C 3.241(ft)-5.741 G .741 (he line is a modi\214ed history line, the history)-3.241 F ! (line is restored to its original state.)144 292.8 Q F1(pr)108 304.8 Q -.15(ev)-.18 G(ious\255history \(C\255p\)).15 E F0(Fetch the pre)144 ! 316.8 Q(vious command from the history list, mo)-.25 E ! (ving back in the list.)-.15 E F1(next\255history \(C\255n\))108 328.8 Q ! F0(Fetch the ne)144 340.8 Q(xt command from the history list, mo)-.15 E (ving forw)-.15 E(ard in the list.)-.1 E F1 ! (beginning\255of\255history \(M\255<\))108 352.8 Q F0(Mo)144 364.8 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he \214rst line in the history)-2.5 E(.) ! -.65 E F1(end\255of\255history \(M\255>\))108 376.8 Q F0(Mo)144 388.8 Q .3 -.15(ve t)-.15 H 2.5(ot).15 G(he end of the input history)-2.5 E 2.5 (,i)-.65 G(.e., the line currently being entered.)-2.5 E F1 -2.29 -.18 ! (re v)108 400.8 T(erse\255sear).08 E(ch\255history \(C\255r\))-.18 E F0 ! 1.471(Search backw)144 412.8 R 1.471 (ard starting at the current line and mo)-.1 F 1.47 (ving `up' through the history as necessary)-.15 F(.)-.65 E ! (This is an incremental search.)144 424.8 Q F1 -.25(fo)108 436.8 S (rward\255sear).25 E(ch\255history \(C\255s\))-.18 E F0 1.131 ! (Search forw)144 448.8 R 1.131(ard starting at the current line and mo) -.1 F 1.132(ving `do)-.15 F 1.132(wn' through the history as necessary) ! -.25 F(.)-.65 E(This is an incremental search.)144 460.8 Q F1 ! (non\255incr)108 472.8 Q(emental\255r)-.18 E -2.3 -.15(ev e)-.18 H (rse\255sear).15 E(ch\255history \(M\255p\))-.18 E F0 .165(Search backw) ! 144 484.8 R .164(ard through the history starting at the current line u\ ! sing a non-incremental search for)-.1 F 2.5(as)144 496.8 S ! (tring supplied by the user)-2.5 E(.)-.55 E F1(non\255incr)108 508.8 Q (emental\255f)-.18 E(orward\255sear)-.25 E(ch\255history \(M\255n\))-.18 ! E F0 1.353(Search forw)144 520.8 R 1.354(ard through the history using \ a non-incremental search for a string supplied by the)-.1 F(user)144 ! 532.8 Q(.)-.55 E F1(history\255sear)108 544.8 Q(ch\255f)-.18 E(orward) ! -.25 E F0 .249(Search forw)144 556.8 R .249(ard through the history for\ the string of characters between the start of the current line)-.1 F ! (and the current cursor position \(the)144 568.8 Q/F2 10/Times-Italic@0 SF(point)2.5 E F0 2.5(\). This)B(is a non-incremental search.)2.5 E F1 ! (history\255sear)108 580.8 Q(ch\255backward)-.18 E F0 .95(Search backw) ! 144 592.8 R .951(ard through the history for the string of characters b\ ! etween the start of the current)-.1 F(line and the point.)144 604.8 Q ! (This is a non-incremental search.)5 E F1(yank\255nth\255ar)108 616.8 Q 2.5(g\()-.1 G<4dad43ad7929>-2.5 E F0 .622(Insert the \214rst ar)144 ! 628.8 R .622(gument to the pre)-.18 F .622 (vious command \(usually the second w)-.25 F .622(ord on the pre)-.1 F ! .622(vious line\))-.25 F .794(at point.)144 640.8 R -.4(Wi)5.794 G .794 (th an ar).4 F(gument)-.18 E F2(n)3.294 E F0 3.294(,i).24 G .794 (nsert the)-3.294 F F2(n)3.294 E F0 .794(th w)B .794(ord from the pre) -.1 F .794(vious command \(the w)-.25 F .795(ords in the)-.1 F(pre)144 ! 652.8 Q .292(vious command be)-.25 F .292(gin with w)-.15 F .291 (ord 0\).)-.1 F 2.791(An)5.291 G -2.25 -.15(eg a)-2.791 H(ti).15 E .591 -.15(ve a)-.25 H -.18(rg).15 G .291(ument inserts the).18 F F2(n)2.791 E ! F0 .291(th w)B .291(ord from the end of)-.1 F(the pre)144 664.8 Q ! (vious command.)-.25 E F1(yank\255last\255ar)108 676.8 Q 2.5(g\()-.1 G -1.667(M\255. ,)-2.5 F -1.667(M\255_ \))2.5 F F0 1.307 ! (Insert the last ar)144 688.8 R 1.307(gument to the pre)-.18 F 1.307 (vious command \(the last w)-.25 F 1.308(ord of the pre)-.1 F 1.308 ! (vious history entry\).)-.25 F -.4(Wi)144 700.8 S .736(th an ar).4 F .736(gument, beha)-.18 F 1.036 -.15(ve ex)-.2 H .736(actly lik).15 F(e) -.1 E F1(yank\255nth\255ar)3.235 E(g)-.1 E F0 5.735(.S)C(uccessi)-5.735 E 1.035 -.15(ve c)-.25 H .735(alls to).15 F F1(yank\255last\255ar)3.235 E(g)-.1 E F0(mo)3.235 E -.15(ve)-.15 G ! (back through the history list, inserting the last ar)144 712.8 Q ! (gument of each line in turn.)-.18 E(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(6)195.95 E EP %%Page: 7 7 %%BeginPageSetup *************** *** 796,879 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF -.25(fo)108 84 S(rward\255backward\255delete\255char) ! .25 E F0 .473(Delete the character under the cursor)144 96 R 2.973(,u) ! -.4 G .474 (nless the cursor is at the end of the line, in which case the)-2.973 F ! (character behind the cursor is deleted.)144 108 Q F1 ! (quoted\255insert \(C\255q, C\255v\))108 120 Q F0 1.229(Add the ne)144 ! 132 R 1.228(xt character that you type to the line v)-.15 F 3.728 (erbatim. This)-.15 F 1.228(is ho)3.728 F 3.728(wt)-.25 G 3.728(oi) ! -3.728 G 1.228(nsert characters lik)-3.728 F(e)-.1 E F1(C\255q)144 144 Q ! F0 2.5(,f)C(or e)-2.5 E(xample.)-.15 E F1(tab\255insert \(M-T)108 156 Q ! (AB\))-.9 E F0(Insert a tab character)144 168 Q(.)-.55 E F1 ! (self\255insert \(a, b, A, 1, !, ...\))108 180 Q F0 ! (Insert the character typed.)144 192 Q F1(transpose\255chars \(C\255t\)) ! 108 204 Q F0 .321(Drag the character before point forw)144 216 R .321 (ard o)-.1 F -.15(ve)-.15 G 2.821(rt).15 G .321 (he character at point, mo)-2.821 F .322(ving point forw)-.15 F .322 (ard as well.)-.1 F 1.182 ! (If point is at the end of the line, then this transposes the tw)144 228 R 3.682(oc)-.1 G 1.182(haracters before point.)-3.682 F(Ne)6.182 E -.05 ! (ga)-.15 G(ti).05 E -.15(ve)-.25 G(ar)144 240 Q(guments ha)-.18 E .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G(ect.).25 E F1 ! (transpose\255w)108 252 Q(ords \(M\255t\))-.1 E F0 .023(Drag the w)144 ! 264 R .023(ord before point past the w)-.1 F .023(ord after point, mo) -.1 F .023(ving point o)-.15 F -.15(ve)-.15 G 2.524(rt).15 G .024(hat w) -2.524 F .024(ord as well.)-.1 F .024(If point)5.024 F ! (is at the end of the line, this transposes the last tw)144 276 Q 2.5 ! (ow)-.1 G(ords on the line.)-2.6 E F1(upcase\255w)108 288 Q ! (ord \(M\255u\))-.1 E F0 1.699(Uppercase the current \(or follo)144 300 R 1.698(wing\) w)-.25 F 4.198(ord. W)-.1 F 1.698(ith a ne)-.4 F -.05(ga) -.15 G(ti).05 E 1.998 -.15(ve a)-.25 H -.18(rg).15 G 1.698 ! (ument, uppercase the pre).18 F(vious)-.25 E -.1(wo)144 312 S(rd, b).1 E ! (ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(do)108 324 Q ! (wncase\255w)-.1 E(ord \(M\255l\))-.1 E F0(Lo)144 336 Q 1.647 (wercase the current \(or follo)-.25 F 1.647(wing\) w)-.25 F 4.147 (ord. W)-.1 F 1.648(ith a ne)-.4 F -.05(ga)-.15 G(ti).05 E 1.948 -.15 (ve a)-.25 H -.18(rg).15 G 1.648(ument, lo).18 F 1.648(wercase the pre) ! -.25 F(vious)-.25 E -.1(wo)144 348 S(rd, b).1 E(ut do not mo)-.2 E .3 ! -.15(ve p)-.15 H(oint.).15 E F1(capitalize\255w)108 360 Q ! (ord \(M\255c\))-.1 E F0 1.975(Capitalize the current \(or follo)144 372 R 1.974(wing\) w)-.25 F 4.474(ord. W)-.1 F 1.974(ith a ne)-.4 F -.05(ga) -.15 G(ti).05 E 2.274 -.15(ve a)-.25 H -.18(rg).15 G 1.974 ! (ument, capitalize the pre).18 F(vious)-.25 E -.1(wo)144 384 S(rd, b).1 ! E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(Killing and Y)87 ! 400.8 Q(anking)-.85 E(kill\255line \(C\255k\))108 412.8 Q F0 ! (Kill the te)144 424.8 Q(xt from point to the end of the line.)-.15 E F1 ! (backward\255kill\255line \(C\255x Rubout\))108 436.8 Q F0(Kill backw) ! 144 448.8 Q(ard to the be)-.1 E(ginning of the line.)-.15 E F1 ! (unix\255line\255discard \(C\255u\))108 460.8 Q F0(Kill backw)144 472.8 Q(ard from point to the be)-.1 E(ginning of the line.)-.15 E (The killed te)5 E(xt is sa)-.15 E -.15(ve)-.2 G 2.5(do).15 G 2.5(nt) ! -2.5 G(he kill-ring.)-2.5 E F1(kill\255whole\255line)108 484.8 Q F0 (Kill all characters on the current line, no matter where point is.)144 ! 496.8 Q F1(kill\255w)108 508.8 Q(ord \(M\255d\))-.1 E F0 1.308 ! (Kill from point the end of the current w)144 520.8 R 1.308 ! (ord, or if between w)-.1 F 1.308(ords, to the end of the ne)-.1 F 1.308 ! (xt w)-.15 F(ord.)-.1 E -.8(Wo)144 532.8 S (rd boundaries are the same as those used by).8 E F1 -.25(fo)2.5 G ! (rward\255w).25 E(ord)-.1 E F0(.)A F1(backward\255kill\255w)108 544.8 Q ! (ord \(M\255Rubout\))-.1 E F0(Kill the w)144 556.8 Q(ord behind point.) ! -.1 E -.8(Wo)5 G(rd boundaries are the same as those used by).8 E F1 ! (backward\255w)2.5 E(ord)-.1 E F0(.)A F1(unix\255w)108 568.8 Q ! (ord\255rubout \(C\255w\))-.1 E F0 .365(Kill the w)144 580.8 R .365 ! (ord behind point, using white space as a w)-.1 F .364(ord boundary)-.1 ! F 5.364(.T)-.65 G .364(he killed te)-5.364 F .364(xt is sa)-.15 F -.15 ! (ve)-.2 G 2.864(do).15 G 2.864(nt)-2.864 G(he)-2.864 E(kill-ring.)144 ! 592.8 Q F1(delete\255horizontal\255space \(M\255\\\))108 604.8 Q F0 ! (Delete all spaces and tabs around point.)144 616.8 Q F1(kill\255r)108 ! 628.8 Q(egion)-.18 E F0 1.13(Kill the te)144 640.8 R 1.13 ! (xt between the point and)-.15 F/F2 10/Times-Italic@0 SF(mark)3.63 E F0 ! (\(sa)3.63 E -.15(ve)-.2 G 3.63(dc).15 G 1.13(ursor position\).)-3.63 F ! 1.13(This te)6.13 F 1.13(xt is referred to as the)-.15 F F2 -.37(re)144 ! 652.8 S(gion)-.03 E F0(.)A F1(copy\255r)108 664.8 Q(egion\255as\255kill) ! -.18 E F0(Cop)144 676.8 Q 2.5(yt)-.1 G(he te)-2.5 E(xt in the re)-.15 E ! (gion to the kill b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1 ! (copy\255backward\255w)108 688.8 Q(ord)-.1 E F0(Cop)144 700.8 Q 4.801 ! (yt)-.1 G 2.301(he w)-4.801 F 2.301(ord before point to the kill b)-.1 F ! (uf)-.2 E(fer)-.25 E 7.301(.T)-.55 G 2.301(he w)-7.301 F 2.3 ! (ord boundaries are the same as)-.1 F F1(back-)4.8 E(ward\255w)144 712.8 ! Q(ord)-.1 E F0(.)A(GNU Readline 4.2a)72 768 Q(2001 October 9)123.745 E ! (7)197.895 E EP %%Page: 8 8 %%BeginPageSetup --- 794,885 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(Commands f)87 84 Q(or Changing T)-.25 E(ext)-.92 E ! (delete\255char \(C\255d\))108 96 Q F0 .357 ! (Delete the character at point.)144 108 R .358(If point is at the be) ! 5.358 F .358(ginning of the line, there are no characters in the)-.15 F ! (line, and the last character typed w)144 120 Q(as not bound to)-.1 E F1 ! (delete\255char)2.5 E F0 2.5(,t)C(hen return)-2.5 E/F2 9/Times-Bold@0 SF ! (EOF)2.5 E/F3 9/Times-Roman@0 SF(.)A F1 ! (backward\255delete\255char \(Rubout\))108 132 Q F0 .553 ! (Delete the character behind the cursor)144 144 R 5.553(.W)-.55 G .553 ! (hen gi)-5.553 F -.15(ve)-.25 G 3.053(nan).15 G .553(umeric ar)-3.053 F ! .552(gument, sa)-.18 F .852 -.15(ve t)-.2 H .552(he deleted te).15 F ! .552(xt on)-.15 F(the kill ring.)144 156 Q F1 -.25(fo)108 168 S ! (rward\255backward\255delete\255char).25 E F0 .473 ! (Delete the character under the cursor)144 180 R 2.973(,u)-.4 G .474 (nless the cursor is at the end of the line, in which case the)-2.973 F ! (character behind the cursor is deleted.)144 192 Q F1 ! (quoted\255insert \(C\255q, C\255v\))108 204 Q F0 1.229(Add the ne)144 ! 216 R 1.228(xt character that you type to the line v)-.15 F 3.728 (erbatim. This)-.15 F 1.228(is ho)3.728 F 3.728(wt)-.25 G 3.728(oi) ! -3.728 G 1.228(nsert characters lik)-3.728 F(e)-.1 E F1(C\255q)144 228 Q ! F0 2.5(,f)C(or e)-2.5 E(xample.)-.15 E F1(tab\255insert \(M-T)108 240 Q ! (AB\))-.9 E F0(Insert a tab character)144 252 Q(.)-.55 E F1 ! (self\255insert \(a, b, A, 1, !, ...\))108 264 Q F0 ! (Insert the character typed.)144 276 Q F1(transpose\255chars \(C\255t\)) ! 108 288 Q F0 .321(Drag the character before point forw)144 300 R .321 (ard o)-.1 F -.15(ve)-.15 G 2.821(rt).15 G .321 (he character at point, mo)-2.821 F .322(ving point forw)-.15 F .322 (ard as well.)-.1 F 1.182 ! (If point is at the end of the line, then this transposes the tw)144 312 R 3.682(oc)-.1 G 1.182(haracters before point.)-3.682 F(Ne)6.182 E -.05 ! (ga)-.15 G(ti).05 E -.15(ve)-.25 G(ar)144 324 Q(guments ha)-.18 E .3 -.15(ve n)-.2 H 2.5(oe).15 G -.25(ff)-2.5 G(ect.).25 E F1 ! (transpose\255w)108 336 Q(ords \(M\255t\))-.1 E F0 .023(Drag the w)144 ! 348 R .023(ord before point past the w)-.1 F .023(ord after point, mo) -.1 F .023(ving point o)-.15 F -.15(ve)-.15 G 2.524(rt).15 G .024(hat w) -2.524 F .024(ord as well.)-.1 F .024(If point)5.024 F ! (is at the end of the line, this transposes the last tw)144 360 Q 2.5 ! (ow)-.1 G(ords on the line.)-2.6 E F1(upcase\255w)108 372 Q ! (ord \(M\255u\))-.1 E F0 1.699(Uppercase the current \(or follo)144 384 R 1.698(wing\) w)-.25 F 4.198(ord. W)-.1 F 1.698(ith a ne)-.4 F -.05(ga) -.15 G(ti).05 E 1.998 -.15(ve a)-.25 H -.18(rg).15 G 1.698 ! (ument, uppercase the pre).18 F(vious)-.25 E -.1(wo)144 396 S(rd, b).1 E ! (ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(do)108 408 Q ! (wncase\255w)-.1 E(ord \(M\255l\))-.1 E F0(Lo)144 420 Q 1.647 (wercase the current \(or follo)-.25 F 1.647(wing\) w)-.25 F 4.147 (ord. W)-.1 F 1.648(ith a ne)-.4 F -.05(ga)-.15 G(ti).05 E 1.948 -.15 (ve a)-.25 H -.18(rg).15 G 1.648(ument, lo).18 F 1.648(wercase the pre) ! -.25 F(vious)-.25 E -.1(wo)144 432 S(rd, b).1 E(ut do not mo)-.2 E .3 ! -.15(ve p)-.15 H(oint.).15 E F1(capitalize\255w)108 444 Q ! (ord \(M\255c\))-.1 E F0 1.975(Capitalize the current \(or follo)144 456 R 1.974(wing\) w)-.25 F 4.474(ord. W)-.1 F 1.974(ith a ne)-.4 F -.05(ga) -.15 G(ti).05 E 2.274 -.15(ve a)-.25 H -.18(rg).15 G 1.974 ! (ument, capitalize the pre).18 F(vious)-.25 E -.1(wo)144 468 S(rd, b).1 ! E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1 -.1(ove)108 480 ! S(rwrite\255mode).1 E F0 -.8(To)144 492 S .437(ggle o).8 F -.15(ve)-.15 ! G .437(rwrite mode.).15 F -.4(Wi)5.437 G .437(th an e).4 F .437 ! (xplicit positi)-.15 F .738 -.15(ve n)-.25 H .438(umeric ar).15 F .438 ! (gument, switches to o)-.18 F -.15(ve)-.15 G .438(rwrite mode.).15 F -.4 ! (Wi)144 504 S .781(th an e).4 F .781(xplicit non-positi)-.15 F 1.081 ! -.15(ve n)-.25 H .781(umeric ar).15 F .781 ! (gument, switches to insert mode.)-.18 F .78(This command af)5.781 F ! (fects)-.25 E(only)144 516 Q F1(emacs)4.394 E F0(mode;)4.394 E F1(vi) ! 4.394 E F0 1.894(mode does o)4.394 F -.15(ve)-.15 G 1.894(rwrite dif).15 ! F(ferently)-.25 E 6.894(.E)-.65 G 1.894(ach call to)-6.894 F/F4 10 ! /Times-Italic@0 SF -.37(re)4.395 G(adline\(\)).37 E F0 1.895 ! (starts in insert)4.395 F 3.969(mode. In)144 528 R -.15(ove)3.969 G ! 1.469(rwrite mode, characters bound to).15 F F1(self\255insert)3.969 E ! F0 1.468(replace the te)3.969 F 1.468(xt at point rather than)-.15 F ! .957(pushing the te)144 540 R .957(xt to the right.)-.15 F .958 ! (Characters bound to)5.957 F F1(backward\255delete\255char)3.458 E F0 ! .958(replace the character)3.458 F(before point with a space.)144 552 Q ! (By def)5 E(ault, this command is unbound.)-.1 E F1(Killing and Y)87 ! 568.8 Q(anking)-.85 E(kill\255line \(C\255k\))108 580.8 Q F0 ! (Kill the te)144 592.8 Q(xt from point to the end of the line.)-.15 E F1 ! (backward\255kill\255line \(C\255x Rubout\))108 604.8 Q F0(Kill backw) ! 144 616.8 Q(ard to the be)-.1 E(ginning of the line.)-.15 E F1 ! (unix\255line\255discard \(C\255u\))108 628.8 Q F0(Kill backw)144 640.8 Q(ard from point to the be)-.1 E(ginning of the line.)-.15 E (The killed te)5 E(xt is sa)-.15 E -.15(ve)-.2 G 2.5(do).15 G 2.5(nt) ! -2.5 G(he kill-ring.)-2.5 E F1(kill\255whole\255line)108 652.8 Q F0 (Kill all characters on the current line, no matter where point is.)144 ! 664.8 Q F1(kill\255w)108 676.8 Q(ord \(M\255d\))-.1 E F0 1.308 ! (Kill from point the end of the current w)144 688.8 R 1.308 ! (ord, or if between w)-.1 F 1.308(ords, to the end of the ne)-.1 F 1.307 ! (xt w)-.15 F(ord.)-.1 E -.8(Wo)144 700.8 S (rd boundaries are the same as those used by).8 E F1 -.25(fo)2.5 G ! (rward\255w).25 E(ord)-.1 E F0(.)A(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(7)195.95 E EP %%Page: 8 8 %%BeginPageSetup *************** *** 881,976 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(copy\255f)108 84 Q(orward\255w)-.25 E(ord)-.1 E F0(Cop) ! 144 96 Q 4.507(yt)-.1 G 2.007(he w)-4.507 F 2.007(ord follo)-.1 F 2.007 ! (wing point to the kill b)-.25 F(uf)-.2 E(fer)-.25 E 7.008(.T)-.55 G ! 2.008(he w)-7.008 F 2.008(ord boundaries are the same as)-.1 F F1 -.25 ! (fo)4.508 G -.37(r-).25 G(ward\255w)144 108 Q(ord)-.1 E F0(.)A F1 ! (yank \(C\255y\))108 120 Q F0 -1(Ya)144 132 S (nk the top of the kill ring into the b)1 E(uf)-.2 E(fer at point.)-.25 ! E F1(yank\255pop \(M\255y\))108 144 Q F0 ! (Rotate the kill ring, and yank the ne)144 156 Q 2.5(wt)-.25 G 2.5 (op. Only)-2.5 F -.1(wo)2.5 G(rks follo).1 E(wing)-.25 E F1(yank)2.5 E ! F0(or)2.5 E F1(yank\255pop)2.5 E F0(.)A F1(Numeric Ar)87 172.8 Q ! (guments)-.1 E(digit\255ar)108 184.8 Q ! (gument \(M\2550, M\2551, ..., M\255\255\))-.1 E F0 .642 ! (Add this digit to the ar)144 196.8 R .641 (gument already accumulating, or start a ne)-.18 F 3.141(wa)-.25 G -.18 ! (rg)-3.141 G 3.141(ument. M\255\255).18 F .641(starts a ne)3.141 F(g-) ! -.15 E(ati)144 208.8 Q .3 -.15(ve a)-.25 H -.18(rg).15 G(ument.).18 E F1 ! (uni)108 220.8 Q -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0 .778 ! (This is another w)144 232.8 R .779(ay to specify an ar)-.1 F 3.279 ! (gument. If)-.18 F .779(this command is follo)3.279 F .779 (wed by one or more digits,)-.25 F 1.376 (optionally with a leading minus sign, those digits de\214ne the ar)144 ! 244.8 R 3.876(gument. If)-.18 F 1.376(the command is fol-)3.876 F(lo)144 ! 256.8 Q 1.17(wed by digits, e)-.25 F -.15(xe)-.15 G(cuting).15 E F1(uni) 3.67 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(ag)3.67 E 1.17 (ain ends the numeric ar)-.05 F 1.17(gument, b)-.18 F 1.17(ut is other) ! -.2 F(-)-.2 E .899(wise ignored.)144 268.8 R .898 ! (As a special case, if this command is immediately follo)5.899 F .898 (wed by a character that is)-.25 F .243 ! (neither a digit or minus sign, the ar)144 280.8 R .243 (gument count for the ne)-.18 F .243(xt command is multiplied by four) ! -.15 F 5.243(.T)-.55 G(he)-5.243 E(ar)144 292.8 Q .378 (gument count is initially one, so e)-.18 F -.15(xe)-.15 G .378 (cuting this function the \214rst time mak).15 F .378(es the ar)-.1 F ! .378(gument count)-.18 F(four)144 304.8 Q 2.5(,as)-.4 G(econd time mak) -2.5 E(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E F1 ! (Completing)87 321.6 Q(complete \(T)108 333.6 Q(AB\))-.9 E F0 1.908 ! (Attempt to perform completion on the te)144 345.6 R 1.908 ! (xt before point.)-.15 F 1.909(The actual completion performed is)6.909 ! F(application-speci\214c.)144 357.6 Q F1(Bash)5.518 E F0 3.018(,f)C .518 ! (or instance, attempts completion treating the te)-3.018 F .517 ! (xt as a v)-.15 F .517(ariable \(if the)-.25 F(te)144 369.6 Q .656 ! (xt be)-.15 F .656(gins with)-.15 F F1($)3.156 E F0 .656 (\), username \(if the te)B .656(xt be)-.15 F .656(gins with)-.15 F F1 (~)3.156 E F0 .656(\), hostname \(if the te)B .656(xt be)-.15 F .656 ! (gins with)-.15 F F1(@)3.157 E F0 .657(\), or)B .93 ! (command \(including aliases and functions\) in turn.)144 381.6 R .929 ! (If none of these produces a match, \214lename)5.929 F 1.273 ! (completion is attempted.)144 393.6 R F1(Gdb)6.273 E F0 3.773(,o)C 3.773 (nt)-3.773 G 1.273(he other hand, allo)-3.773 F 1.273 ! (ws completion of program functions and)-.25 F -.25(va)144 405.6 S(riab\ les, and only attempts \214lename completion under certain circumstance\ ! s.).25 E F1(possible\255completions \(M\255?\))108 417.6 Q F0 ! (List the possible completions of the te)144 429.6 Q(xt before point.) ! -.15 E F1(insert\255completions \(M\255*\))108 441.6 Q F0 .783 ! (Insert all completions of the te)144 453.6 R .783 (xt before point that w)-.15 F .783(ould ha)-.1 F 1.083 -.15(ve b)-.2 H ! .783(een generated by).15 F F1(possible\255com-)3.282 E(pletions)144 ! 465.6 Q F0(.)A F1(menu\255complete)108 477.6 Q F0 .928(Similar to)144 ! 489.6 R F1(complete)3.428 E F0 3.428(,b)C .929(ut replaces the w)-3.628 F .929(ord to be completed with a single match from the list of)-.1 F ! 1.194(possible completions.)144 501.6 R 1.194(Repeated e)6.194 F -.15 ! (xe)-.15 G 1.194(cution of).15 F F1(menu\255complete)3.694 E F0 1.193 ! (steps through the list of possible)3.694 F .828 ! (completions, inserting each match in turn.)144 513.6 R .828 ! (At the end of the list of completions, the bell is rung)5.828 F 1.927 ! (\(subject to the setting of Bbell\255style)144 525.6 R F1 4.427(\)a)C ! 1.927(nd the original text is r)-4.427 F(estor)-.18 E 4.426(ed. An)-.18 ! F(ar)4.426 E 1.926(gument of)-.1 F/F2 10/Times-Italic@0 SF(n)4.426 E F1 ! (mo)144 537.6 Q -.1(ve)-.1 G(s).1 E F2(n)3.145 E F1 .645(positions f) ! 3.145 F .645(orward in the list of matches; a negati)-.25 F .845 -.1 ! (ve a)-.1 H -.1(rg).1 G .645(ument may be used to mo).1 F -.1(ve)-.1 G ! .666(backward thr)144 549.6 R .666(ough the list.)-.18 F .665 ! (This command is intended to be bound to T)5.666 F .665(AB, b)-.9 F .665 ! (ut is unbound)-.2 F(by default.)144 561.6 Q ! (delete\255char\255or\255list)108 573.6 Q F0 .373 ! (Deletes the character under the cursor if not at the be)144 585.6 R ! .374(ginning or end of the line \(lik)-.15 F(e)-.1 E F1(delete-char) ! 2.874 E F0(\).)A(If at the end of the line, beha)144 597.6 Q -.15(ve)-.2 ! G 2.5(si).15 G(dentically to)-2.5 E F1(possible-completions)2.5 E F0(.)A ! F1 -.25(Ke)87 614.4 S(yboard Macr).25 E(os)-.18 E(start\255kbd\255macr) ! 108 626.4 Q 2.5(o\()-.18 G(C\255x \()-2.5 E(\)).833 E F0(Be)144 638.4 Q ! (gin sa)-.15 E(ving the characters typed into the current k)-.2 E -.15 ! (ey)-.1 G(board macro.).15 E F1(end\255kbd\255macr)108 650.4 Q 2.5(o\() ! -.18 G(C\255x \))-2.5 E(\)).833 E F0(Stop sa)144 662.4 Q ! (ving the characters typed into the current k)-.2 E -.15(ey)-.1 G ! (board macro and store the de\214nition.).15 E F1 ! (call\255last\255kbd\255macr)108 674.4 Q 2.5(o\()-.18 G(C\255x e\))-2.5 ! E F0(Re-e)144 686.4 Q -.15(xe)-.15 G 1(cute the last k).15 F -.15(ey)-.1 ! G .999(board macro de\214ned, by making the characters in the macro app\ ! ear as if).15 F(typed at the k)144 698.4 Q -.15(ey)-.1 G(board.).15 E ! (GNU Readline 4.2a)72 768 Q(2001 October 9)123.745 E(8)197.895 E EP %%Page: 9 9 %%BeginPageSetup --- 887,987 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(backward\255kill\255w)108 84 Q(ord \(M\255Rubout\))-.1 ! E F0(Kill the w)144 96 Q(ord behind point.)-.1 E -.8(Wo)5 G ! (rd boundaries are the same as those used by).8 E F1(backward\255w)2.5 E ! (ord)-.1 E F0(.)A F1(unix\255w)108 108 Q(ord\255rubout \(C\255w\))-.1 E ! F0 .364(Kill the w)144 120 R .364 ! (ord behind point, using white space as a w)-.1 F .365(ord boundary)-.1 ! F 5.365(.T)-.65 G .365(he killed te)-5.365 F .365(xt is sa)-.15 F -.15 ! (ve)-.2 G 2.865(do).15 G 2.865(nt)-2.865 G(he)-2.865 E(kill-ring.)144 ! 132 Q F1(delete\255horizontal\255space \(M\255\\\))108 144 Q F0 ! (Delete all spaces and tabs around point.)144 156 Q F1(kill\255r)108 168 ! Q(egion)-.18 E F0 1.13(Kill the te)144 180 R 1.13 ! (xt between the point and)-.15 F/F2 10/Times-Italic@0 SF(mark)3.63 E F0 ! (\(sa)3.63 E -.15(ve)-.2 G 3.63(dc).15 G 1.13(ursor position\).)-3.63 F ! 1.13(This te)6.13 F 1.13(xt is referred to as the)-.15 F F2 -.37(re)144 ! 192 S(gion)-.03 E F0(.)A F1(copy\255r)108 204 Q(egion\255as\255kill)-.18 ! E F0(Cop)144 216 Q 2.5(yt)-.1 G(he te)-2.5 E(xt in the re)-.15 E ! (gion to the kill b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E F1 ! (copy\255backward\255w)108 228 Q(ord)-.1 E F0(Cop)144 240 Q 4.8(yt)-.1 G ! 2.3(he w)-4.8 F 2.3(ord before point to the kill b)-.1 F(uf)-.2 E(fer) ! -.25 E 7.301(.T)-.55 G 2.301(he w)-7.301 F 2.301 ! (ord boundaries are the same as)-.1 F F1(back-)4.801 E(ward\255w)144 252 ! Q(ord)-.1 E F0(.)A F1(copy\255f)108 264 Q(orward\255w)-.25 E(ord)-.1 E ! F0(Cop)144 276 Q 4.508(yt)-.1 G 2.008(he w)-4.508 F 2.008(ord follo)-.1 ! F 2.008(wing point to the kill b)-.25 F(uf)-.2 E(fer)-.25 E 7.007(.T) ! -.55 G 2.007(he w)-7.007 F 2.007(ord boundaries are the same as)-.1 F F1 ! -.25(fo)4.507 G -.37(r-).25 G(ward\255w)144 288 Q(ord)-.1 E F0(.)A F1 ! (yank \(C\255y\))108 300 Q F0 -1(Ya)144 312 S (nk the top of the kill ring into the b)1 E(uf)-.2 E(fer at point.)-.25 ! E F1(yank\255pop \(M\255y\))108 324 Q F0 ! (Rotate the kill ring, and yank the ne)144 336 Q 2.5(wt)-.25 G 2.5 (op. Only)-2.5 F -.1(wo)2.5 G(rks follo).1 E(wing)-.25 E F1(yank)2.5 E ! F0(or)2.5 E F1(yank\255pop)2.5 E F0(.)A F1(Numeric Ar)87 352.8 Q ! (guments)-.1 E(digit\255ar)108 364.8 Q ! (gument \(M\2550, M\2551, ..., M\255\255\))-.1 E F0 .641 ! (Add this digit to the ar)144 376.8 R .641 (gument already accumulating, or start a ne)-.18 F 3.141(wa)-.25 G -.18 ! (rg)-3.141 G 3.142(ument. M\255\255).18 F .642(starts a ne)3.142 F(g-) ! -.15 E(ati)144 388.8 Q .3 -.15(ve a)-.25 H -.18(rg).15 G(ument.).18 E F1 ! (uni)108 400.8 Q -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0 .779 ! (This is another w)144 412.8 R .779(ay to specify an ar)-.1 F 3.279 ! (gument. If)-.18 F .779(this command is follo)3.279 F .778 (wed by one or more digits,)-.25 F 1.376 (optionally with a leading minus sign, those digits de\214ne the ar)144 ! 424.8 R 3.876(gument. If)-.18 F 1.376(the command is fol-)3.876 F(lo)144 ! 436.8 Q 1.17(wed by digits, e)-.25 F -.15(xe)-.15 G(cuting).15 E F1(uni) 3.67 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(ag)3.67 E 1.17 (ain ends the numeric ar)-.05 F 1.17(gument, b)-.18 F 1.17(ut is other) ! -.2 F(-)-.2 E .898(wise ignored.)144 448.8 R .898 ! (As a special case, if this command is immediately follo)5.898 F .898 (wed by a character that is)-.25 F .243 ! (neither a digit or minus sign, the ar)144 460.8 R .243 (gument count for the ne)-.18 F .243(xt command is multiplied by four) ! -.15 F 5.242(.T)-.55 G(he)-5.242 E(ar)144 472.8 Q .378 (gument count is initially one, so e)-.18 F -.15(xe)-.15 G .378 (cuting this function the \214rst time mak).15 F .378(es the ar)-.1 F ! .378(gument count)-.18 F(four)144 484.8 Q 2.5(,as)-.4 G(econd time mak) -2.5 E(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E F1 ! (Completing)87 501.6 Q(complete \(T)108 513.6 Q(AB\))-.9 E F0 1.909 ! (Attempt to perform completion on the te)144 525.6 R 1.908 ! (xt before point.)-.15 F 1.908(The actual completion performed is)6.908 ! F(application-speci\214c.)144 537.6 Q F1(Bash)5.517 E F0 3.017(,f)C .518 ! (or instance, attempts completion treating the te)-3.017 F .518 ! (xt as a v)-.15 F .518(ariable \(if the)-.25 F(te)144 549.6 Q .657 ! (xt be)-.15 F .657(gins with)-.15 F F1($)3.156 E F0 .656 (\), username \(if the te)B .656(xt be)-.15 F .656(gins with)-.15 F F1 (~)3.156 E F0 .656(\), hostname \(if the te)B .656(xt be)-.15 F .656 ! (gins with)-.15 F F1(@)3.156 E F0 .656(\), or)B .929 ! (command \(including aliases and functions\) in turn.)144 561.6 R .93 ! (If none of these produces a match, \214lename)5.929 F 1.274 ! (completion is attempted.)144 573.6 R F1(Gdb)6.273 E F0 3.773(,o)C 3.773 (nt)-3.773 G 1.273(he other hand, allo)-3.773 F 1.273 ! (ws completion of program functions and)-.25 F -.25(va)144 585.6 S(riab\ les, and only attempts \214lename completion under certain circumstance\ ! s.).25 E F1(possible\255completions \(M\255?\))108 597.6 Q F0 ! (List the possible completions of the te)144 609.6 Q(xt before point.) ! -.15 E F1(insert\255completions \(M\255*\))108 621.6 Q F0 .783 ! (Insert all completions of the te)144 633.6 R .783 (xt before point that w)-.15 F .783(ould ha)-.1 F 1.083 -.15(ve b)-.2 H ! .783(een generated by).15 F F1(possible\255com-)3.283 E(pletions)144 ! 645.6 Q F0(.)A F1(menu\255complete)108 657.6 Q F0 .929(Similar to)144 ! 669.6 R F1(complete)3.429 E F0 3.429(,b)C .929(ut replaces the w)-3.629 F .929(ord to be completed with a single match from the list of)-.1 F ! 1.193(possible completions.)144 681.6 R 1.193(Repeated e)6.193 F -.15 ! (xe)-.15 G 1.193(cution of).15 F F1(menu\255complete)3.694 E F0 1.194 ! (steps through the list of possible)3.694 F .829 ! (completions, inserting each match in turn.)144 693.6 R .828 ! (At the end of the list of completions, the bell is rung)5.828 F .965 ! (\(subject to the setting of)144 705.6 R F1 .965 ! (0and the original text is r)3.465 F(estor)-.18 E 3.465(ed. An)-.18 F ! (ar)3.465 E .966(gument of)-.1 F F2(n)3.466 E F1(mo)3.466 E -.1(ve)-.1 G ! (s).1 E F2(n)3.466 E F1(posi-)3.466 E 1.249(tions f)144 717.6 R 1.249 ! (orward in the list of matches; a negati)-.25 F 1.449 -.1(ve a)-.1 H -.1 ! (rg).1 G 1.248(ument may be used to mo).1 F 1.448 -.1(ve b)-.1 H ! (ackward).1 E(thr)144 729.6 Q(ough the list.)-.18 E ! (This command is intended to be bound to T)5 E(AB, b)-.9 E ! (ut is unbound by default.)-.2 E F0(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(8)195.95 E EP %%Page: 9 9 %%BeginPageSetup *************** *** 978,1117 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(Miscellaneous)87 84 Q -.18(re)108 96 S.18 E (ead\255init\255\214le \(C\255x C\255r\))-.18 E F0 1.776 ! (Read in the contents of the)144 108 R/F2 10/Times-Italic@0 SF(inputr) 4.276 E(c)-.37 E F0 1.777(\214le, and incorporate an)4.276 F 4.277(yb) -.15 G 1.777(indings or v)-4.277 F 1.777(ariable assignments)-.25 F ! (found there.)144 120 Q F1(abort \(C\255g\))108 132 Q F0 3.249 ! (Abort the current editing command and ring the terminal')144 144 R 5.748(sb)-.55 G 3.248(ell \(subject to the setting of)-5.748 F F1 ! (bell\255style)144 156 Q F0(\).)A F1(do\255upper)108 168 Q(case\255v) ! -.18 E(ersion \(M\255a, M\255b, M\255)-.1 E F2(x)A F1 2.5(,.)C(..\))-2.5 ! E F0 1.755(If the meta\214ed character)144 180 R F2(x)4.255 E F0 1.755 ! (is lo)4.255 F 1.756 (wercase, run the command that is bound to the corresponding)-.25 F ! (uppercase character)144 192 Q(.)-.55 E F1(pr)108 204 Q ! (e\214x\255meta \(ESC\))-.18 E F0(Metafy the ne)144 216 Q (xt character typed.)-.15 E/F3 9/Times-Bold@0 SF(ESC)5 E F1(f)2.25 E F0 (is equi)2.5 E -.25(va)-.25 G(lent to).25 E F1(Meta\255f)2.5 E F0(.)A F1 ! (undo \(C\255_, C\255x C\255u\))108 228 Q F0 ! (Incremental undo, separately remembered for each line.)144 240 Q F1 ! -2.29 -.18(re v)108 252 T(ert\255line \(M\255r\)).08 E F0 1.095 ! (Undo all changes made to this line.)144 264 R 1.095(This is lik)6.095 F ! 3.595(ee)-.1 G -.15(xe)-3.745 G 1.095(cuting the).15 F F1(undo)3.595 E F0 1.095(command enough times to)3.595 F ! (return the line to its initial state.)144 276 Q F1 ! (tilde\255expand \(M\255&\))108 288 Q F0(Perform tilde e)144 300 Q (xpansion on the current w)-.15 E(ord.)-.1 E F1 ! (set\255mark \(C\255@, M\255\))108 312 Q F0 ! (Set the mark to the point.)144 324 Q(If a numeric ar)5 E (gument is supplied, the mark is set to that position.)-.18 E F1 ! (exchange\255point\255and\255mark \(C\255x C\255x\))108 336 Q F0(Sw)144 ! 348 Q .282(ap the point with the mark.)-.1 F .283 (The current cursor position is set to the sa)5.283 F -.15(ve)-.2 G 2.783(dp).15 G .283(osition, and the old)-2.783 F(cursor position is sa) ! 144 360 Q -.15(ve)-.2 G 2.5(da).15 G 2.5(st)-2.5 G(he mark.)-2.5 E F1 ! (character\255sear)108 372 Q(ch \(C\255]\))-.18 E F0 3.036(Ac)144 384 S ! .536(haracter is read and point is mo)-3.036 F -.15(ve)-.15 G 3.035(dt) ! .15 G 3.035(ot)-3.035 G .535(he ne)-3.035 F .535 (xt occurrence of that character)-.15 F 5.535(.A)-.55 G(ne)-2.5 E -.05 (ga)-.15 G(ti).05 E .835 -.15(ve c)-.25 H(ount).15 E(searches for pre) ! 144 396 Q(vious occurrences.)-.25 E F1(character\255sear)108 408 Q ! (ch\255backward \(M\255C\255]\))-.18 E F0 3.543(Ac)144 420 S 1.043 (haracter is read and point is mo)-3.543 F -.15(ve)-.15 G 3.544(dt).15 G 3.544(ot)-3.544 G 1.044(he pre)-3.544 F 1.044 (vious occurrence of that character)-.25 F 6.044(.A)-.55 G(ne)-2.5 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G ! (count searches for subsequent occurrences.)144 432 Q F1 ! (insert\255comment \(M\255#\))108 444 Q F0 .291(The v)144 456 R .291 ! (alue of the readline)-.25 F F1(comment\255begin)2.791 E F0 -.25(va) ! 2.791 G .291(riable is inserted at the be).25 F .29 ! (ginning of the current line,)-.15 F 1.277 ! (and the line is accepted as if a ne)144 468 R 1.277 ! (wline had been typed.)-.25 F 1.277(The def)6.277 F 1.277(ault v)-.1 F ! 1.277(alue of)-.25 F F1(comment\255begin)3.777 E F0(mak)144 480 Q ! (es the current line a shell comment.)-.1 E F1(dump\255functions)108 492 ! Q F0 .627(Print all of the functions and their k)144 504 R .927 -.15 ! (ey b)-.1 H .626(indings to the readline output stream.).15 F .626 (If a numeric ar)5.626 F(gu-)-.18 E ! (ment is supplied, the output is formatted in such a w)144 516 Q (ay that it can be made part of an)-.1 E F2(inputr)2.5 E(c)-.37 E F0 ! (\214le.)2.5 E F1(dump\255v)108 528 Q(ariables)-.1 E F0 .283 ! (Print all of the settable v)144 540 R .283(ariables and their v)-.25 F .283(alues to the readline output stream.)-.25 F .283(If a numeric ar) 5.283 F(gu-)-.18 E ! (ment is supplied, the output is formatted in such a w)144 552 Q ! (ay that it can be made part of an)-.1 E F2(inputr)2.5 E(c)-.37 E F0 ! (\214le.)2.5 E F1(dump\255macr)108 564 Q(os)-.18 E F0 .756 ! (Print all of the readline k)144 576 R 1.056 -.15(ey s)-.1 H .756 (equences bound to macros and the strings the).15 F 3.256(yo)-.15 G ! 3.256(uput. If)-3.256 F 3.255(an)3.255 G(umeric)-3.255 E(ar)144 588 Q .528(gument is supplied, the output is formatted in such a w)-.18 F .528 (ay that it can be made part of an)-.1 F F2(inputr)3.028 E(c)-.37 E F0 ! (\214le.)144 600 Q F1(emacs\255editing\255mode \(C\255e\))108 612 Q F0 ! (When in)144 624 Q F1(vi)2.5 E F0(editing mode, this causes a switch to) 2.5 E F1(emacs)2.5 E F0(editing mode.)2.5 E F1 ! (vi\255editing\255mode \(M\255C\255j\))108 636 Q F0(When in)144 648 Q F1 (emacs)2.5 E F0(editing mode, this causes a switch to)2.5 E F1(vi)2.5 E ! F0(editing mode.)2.5 E/F4 10.95/Times-Bold@0 SF(DEF)72 664.8 Q -.548(AU) -.986 G 2.014 -1.007(LT K).548 H(EY BINDINGS)1.007 E F0 .065(The follo) ! 108 676.8 R .065(wing is a list of the def)-.25 F .065 (ault emacs and vi bindings.)-.1 F .064 (Characters with the eighth bit set are written as)5.064 F .615 ! (M\255, and are referred to as)108 688.8 R F2(meta\214ed) 3.115 E F0 3.115(characters. The)3.115 F .616 (printable ASCII characters not mentioned)3.116 F 1.116 ! (in the list of emacs standard bindings are bound to the)108 700.8 R F1 (self\255insert)3.615 E F0 1.115(function, which just inserts the gi) 3.615 F -.15(ve)-.25 G(n).15 E .945(character into the input line.)108 ! 712.8 R .945(In vi insertion mode, all characters not speci\214cally me\ ! ntioned are bound to)5.945 F F1(self\255insert)108 724.8 Q F0 5.359(.C)C .359(haracters assigned to signal generation by)-5.359 F F2(stty)2.859 E F0 .359(\(1\) or the terminal dri).32 F -.15(ve)-.25 G 1.159 -.4(r, s) ! .15 H .358(uch as C-Z or C-C,).4 F(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(9)197.895 E EP ! %%Page: 10 10 ! %%BeginPageSetup ! BP ! %%EndPageSetup ! /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R .187 ! (retain that function.)108 84 R .187(Upper and lo)5.187 F .188(wer case\ ! meta\214ed characters are bound to the same function in the emacs)-.25 ! F .305(mode meta k)108 96 R -.15(ey)-.1 G 2.805(map. The).15 F .305(rem\ ! aining characters are unbound, which causes readline to ring the bell \ ! \(subject)2.805 F(to the setting of the)108 108 Q/F1 10/Times-Bold@0 SF ! (bell\255style)2.5 E F0 -.25(va)2.5 G(riable\).).25 E F1(Emacs Mode)87 ! 124.8 Q F0(Emacs Standard bindings)151.2 136.8 Q 2.5("C-@" set-mark) ! 151.2 160.8 R 2.5("C-A" be)151.2 172.8 R(ginning-of-line)-.15 E 2.5 ! ("C-B" backw)151.2 184.8 R(ard-char)-.1 E 2.5("C-D" delete-char)151.2 ! 196.8 R 2.5("C-E" end-of-line)151.2 208.8 R 2.5("C-F" forw)151.2 220.8 R ! (ard-char)-.1 E 2.5("C-G" abort)151.2 232.8 R 2.5("C-H" backw)151.2 ! 244.8 R(ard-delete-char)-.1 E 2.5("C-I" complete)151.2 256.8 R 2.5 ! ("C-J" accept-line)151.2 268.8 R 2.5("C-K" kill-line)151.2 280.8 R 2.5 ! ("C-L" clear)151.2 292.8 R(-screen)-.2 E 2.5("C-M" accept-line)151.2 ! 304.8 R 2.5("C-N" ne)151.2 316.8 R(xt-history)-.15 E 2.5("C-P" pre)151.2 ! 328.8 R(vious-history)-.25 E 2.5("C-Q" quoted-insert)151.2 340.8 R 2.5 ! ("C-R" re)151.2 352.8 R -.15(ve)-.25 G(rse-search-history).15 E 2.5 ! ("C-S" forw)151.2 364.8 R(ard-search-history)-.1 E 2.5 ! ("C-T" transpose-chars)151.2 376.8 R 2.5("C-U" unix-line-discard)151.2 ! 388.8 R 2.5("C-V" quoted-insert)151.2 400.8 R 2.5("C-W" unix-w)151.2 ! 412.8 R(ord-rubout)-.1 E 2.5("C-Y" yank)151.2 424.8 R 2.5 ! ("C-]" character)151.2 436.8 R(-search)-.2 E 2.5("C-_" undo)151.2 448.8 ! R 3.333("")151.2 460.8 S(to "/")-.833 E(self-insert)5 E 2.5("0" to)151.2 ! 472.8 R 2.5("9" self-insert)2.5 F 2.5(":" to)151.2 484.8 R 2.5 ! ("~" self-insert)2.5 F 2.5("C-?" backw)151.2 496.8 R(ard-delete-char)-.1 ! E(Emacs Meta bindings)151.2 513.6 Q 2.5("M-C-G" abort)151.2 537.6 R 2.5 ! ("M-C-H" backw)151.2 549.6 R(ard-kill-w)-.1 E(ord)-.1 E 2.5 ! ("M-C-I" tab-insert)151.2 561.6 R 2.5("M-C-J" vi-editing-mode)151.2 ! 573.6 R 2.5("M-C-M" vi-editing-mode)151.2 585.6 R 2.5("M-C-R" re)151.2 ! 597.6 R -.15(ve)-.25 G(rt-line).15 E 2.5("M-C-Y" yank-nth-ar)151.2 609.6 ! R(g)-.18 E 2.5("M-C-[" complete)151.2 621.6 R 2.5("M-C-]" character) ! 151.2 633.6 R(-search-backw)-.2 E(ard)-.1 E 2.5("M-space" set-mark)151.2 ! 645.6 R 2.5("M-#" insert-comment)151.2 657.6 R 2.5("M-&" tilde-e)151.2 ! 669.6 R(xpand)-.15 E 2.5("M-*" insert-completions)151.2 681.6 R 2.5 ! ("M--" digit-ar)151.2 693.6 R(gument)-.18 E 2.5("M-." yank-last-ar)151.2 ! 705.6 R(g)-.18 E 2.5("M-0" digit-ar)151.2 717.6 R(gument)-.18 E 2.5 ! ("M-1" digit-ar)151.2 729.6 R(gument)-.18 E(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(10)192.895 E EP %%Page: 11 11 %%BeginPageSetup --- 989,1144 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(delete\255char\255or\255list)108 84 Q F0 .373 ! (Deletes the character under the cursor if not at the be)144 96 R .374 ! (ginning or end of the line \(lik)-.15 F(e)-.1 E F1(delete-char)2.874 E ! F0(\).)A(If at the end of the line, beha)144 108 Q -.15(ve)-.2 G 2.5(si) ! .15 G(dentically to)-2.5 E F1(possible-completions)2.5 E F0(.)A F1 -.25 ! (Ke)87 124.8 S(yboard Macr).25 E(os)-.18 E(start\255kbd\255macr)108 ! 136.8 Q 2.5(o\()-.18 G(C\255x \()-2.5 E(\)).833 E F0(Be)144 148.8 Q ! (gin sa)-.15 E(ving the characters typed into the current k)-.2 E -.15 ! (ey)-.1 G(board macro.).15 E F1(end\255kbd\255macr)108 160.8 Q 2.5(o\() ! -.18 G(C\255x \))-2.5 E(\)).833 E F0(Stop sa)144 172.8 Q ! (ving the characters typed into the current k)-.2 E -.15(ey)-.1 G ! (board macro and store the de\214nition.).15 E F1 ! (call\255last\255kbd\255macr)108 184.8 Q 2.5(o\()-.18 G(C\255x e\))-2.5 ! E F0(Re-e)144 196.8 Q -.15(xe)-.15 G 1(cute the last k).15 F -.15(ey)-.1 ! G .999(board macro de\214ned, by making the characters in the macro app\ ! ear as if).15 F(typed at the k)144 208.8 Q -.15(ey)-.1 G(board.).15 E F1 ! (Miscellaneous)87 225.6 Q -.18(re)108 237.6 S.18 E (ead\255init\255\214le \(C\255x C\255r\))-.18 E F0 1.776 ! (Read in the contents of the)144 249.6 R/F2 10/Times-Italic@0 SF(inputr) 4.276 E(c)-.37 E F0 1.777(\214le, and incorporate an)4.276 F 4.277(yb) -.15 G 1.777(indings or v)-4.277 F 1.777(ariable assignments)-.25 F ! (found there.)144 261.6 Q F1(abort \(C\255g\))108 273.6 Q F0 3.249 ! (Abort the current editing command and ring the terminal')144 285.6 R 5.748(sb)-.55 G 3.248(ell \(subject to the setting of)-5.748 F F1 ! (bell\255style)144 297.6 Q F0(\).)A F1(do\255upper)108 309.6 Q ! (case\255v)-.18 E(ersion \(M\255a, M\255b, M\255)-.1 E F2(x)A F1 2.5(,.) ! C(..\))-2.5 E F0 1.755(If the meta\214ed character)144 321.6 R F2(x) ! 4.255 E F0 1.755(is lo)4.255 F 1.756 (wercase, run the command that is bound to the corresponding)-.25 F ! (uppercase character)144 333.6 Q(.)-.55 E F1(pr)108 345.6 Q ! (e\214x\255meta \(ESC\))-.18 E F0(Metafy the ne)144 357.6 Q (xt character typed.)-.15 E/F3 9/Times-Bold@0 SF(ESC)5 E F1(f)2.25 E F0 (is equi)2.5 E -.25(va)-.25 G(lent to).25 E F1(Meta\255f)2.5 E F0(.)A F1 ! (undo \(C\255_, C\255x C\255u\))108 369.6 Q F0 ! (Incremental undo, separately remembered for each line.)144 381.6 Q F1 ! -2.29 -.18(re v)108 393.6 T(ert\255line \(M\255r\)).08 E F0 1.095 ! (Undo all changes made to this line.)144 405.6 R 1.095(This is lik)6.095 ! F 3.595(ee)-.1 G -.15(xe)-3.745 G 1.095(cuting the).15 F F1(undo)3.595 E F0 1.095(command enough times to)3.595 F ! (return the line to its initial state.)144 417.6 Q F1 ! (tilde\255expand \(M\255&\))108 429.6 Q F0(Perform tilde e)144 441.6 Q (xpansion on the current w)-.15 E(ord.)-.1 E F1 ! (set\255mark \(C\255@, M\255\))108 453.6 Q F0 ! (Set the mark to the point.)144 465.6 Q(If a numeric ar)5 E (gument is supplied, the mark is set to that position.)-.18 E F1 ! (exchange\255point\255and\255mark \(C\255x C\255x\))108 477.6 Q F0(Sw) ! 144 489.6 Q .282(ap the point with the mark.)-.1 F .283 (The current cursor position is set to the sa)5.283 F -.15(ve)-.2 G 2.783(dp).15 G .283(osition, and the old)-2.783 F(cursor position is sa) ! 144 501.6 Q -.15(ve)-.2 G 2.5(da).15 G 2.5(st)-2.5 G(he mark.)-2.5 E F1 ! (character\255sear)108 513.6 Q(ch \(C\255]\))-.18 E F0 3.036(Ac)144 ! 525.6 S .536(haracter is read and point is mo)-3.036 F -.15(ve)-.15 G ! 3.035(dt).15 G 3.035(ot)-3.035 G .535(he ne)-3.035 F .535 (xt occurrence of that character)-.15 F 5.535(.A)-.55 G(ne)-2.5 E -.05 (ga)-.15 G(ti).05 E .835 -.15(ve c)-.25 H(ount).15 E(searches for pre) ! 144 537.6 Q(vious occurrences.)-.25 E F1(character\255sear)108 549.6 Q ! (ch\255backward \(M\255C\255]\))-.18 E F0 3.543(Ac)144 561.6 S 1.043 (haracter is read and point is mo)-3.543 F -.15(ve)-.15 G 3.544(dt).15 G 3.544(ot)-3.544 G 1.044(he pre)-3.544 F 1.044 (vious occurrence of that character)-.25 F 6.044(.A)-.55 G(ne)-2.5 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G ! (count searches for subsequent occurrences.)144 573.6 Q F1 ! (insert\255comment \(M\255#\))108 585.6 Q F0 -.4(Wi)144 597.6 S .481 ! (thout a numeric ar).4 F .481(gument, the v)-.18 F .481 ! (alue of the readline)-.25 F F1(comment\255begin)2.981 E F0 -.25(va) ! 2.981 G .48(riable is inserted at the).25 F(be)144 609.6 Q .097 ! (ginning of the current line.)-.15 F .098(If a numeric ar)5.097 F .098 ! (gument is supplied, this command acts as a toggle:)-.18 F(if)5.098 E ! .322(the characters at the be)144 621.6 R .321 ! (ginning of the line do not match the v)-.15 F .321(alue of)-.25 F F1 ! (comment\255begin)2.821 E F0 2.821(,t)C .321(he v)-2.821 F .321(alue is) ! -.25 F 1.013(inserted, otherwise the characters in)144 633.6 R F1 ! (comment-begin)3.514 E F0 1.014(are deleted from the be)3.514 F 1.014 ! (ginning of the line.)-.15 F 1.469 ! (In either case, the line is accepted as if a ne)144 645.6 R 1.468 ! (wline had been typed.)-.25 F 1.468(The def)6.468 F 1.468(ault v)-.1 F ! 1.468(alue of)-.25 F F1(com-)3.968 E(ment\255begin)144 657.6 Q F0(mak) ! 2.982 E .483(es the current line a shell comment.)-.1 F .483 ! (If a numeric ar)5.483 F .483(gument causes the comment)-.18 F ! (character to be remo)144 669.6 Q -.15(ve)-.15 G(d, the line will be e) ! .15 E -.15(xe)-.15 G(cuted by the shell.).15 E F1(dump\255functions)108 ! 681.6 Q F0 .627(Print all of the functions and their k)144 693.6 R .927 ! -.15(ey b)-.1 H .626(indings to the readline output stream.).15 F .626 (If a numeric ar)5.626 F(gu-)-.18 E ! (ment is supplied, the output is formatted in such a w)144 705.6 Q (ay that it can be made part of an)-.1 E F2(inputr)2.5 E(c)-.37 E F0 ! (\214le.)2.5 E(GNU Readline 4.3)72 768 Q(2002 January 22)126.24 E(9) ! 195.95 E EP ! %%Page: 10 10 ! %%BeginPageSetup ! BP ! %%EndPageSetup ! /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(dump\255v)108 84 Q(ariables)-.1 E F0 .283 ! (Print all of the settable v)144 96 R .283(ariables and their v)-.25 F .283(alues to the readline output stream.)-.25 F .283(If a numeric ar) 5.283 F(gu-)-.18 E ! (ment is supplied, the output is formatted in such a w)144 108 Q ! (ay that it can be made part of an)-.1 E/F2 10/Times-Italic@0 SF(inputr) ! 2.5 E(c)-.37 E F0(\214le.)2.5 E F1(dump\255macr)108 120 Q(os)-.18 E F0 ! .756(Print all of the readline k)144 132 R 1.056 -.15(ey s)-.1 H .756 (equences bound to macros and the strings the).15 F 3.256(yo)-.15 G ! 3.256(uput. If)-3.256 F 3.255(an)3.255 G(umeric)-3.255 E(ar)144 144 Q .528(gument is supplied, the output is formatted in such a w)-.18 F .528 (ay that it can be made part of an)-.1 F F2(inputr)3.028 E(c)-.37 E F0 ! (\214le.)144 156 Q F1(emacs\255editing\255mode \(C\255e\))108 168 Q F0 ! (When in)144 180 Q F1(vi)2.5 E F0(command mode, this causes a switch to) 2.5 E F1(emacs)2.5 E F0(editing mode.)2.5 E F1 ! (vi\255editing\255mode \(M\255C\255j\))108 192 Q F0(When in)144 204 Q F1 (emacs)2.5 E F0(editing mode, this causes a switch to)2.5 E F1(vi)2.5 E ! F0(editing mode.)2.5 E/F3 10.95/Times-Bold@0 SF(DEF)72 220.8 Q -.548(AU) -.986 G 2.014 -1.007(LT K).548 H(EY BINDINGS)1.007 E F0 .065(The follo) ! 108 232.8 R .065(wing is a list of the def)-.25 F .065 (ault emacs and vi bindings.)-.1 F .064 (Characters with the eighth bit set are written as)5.064 F .615 ! (M\255, and are referred to as)108 244.8 R F2(meta\214ed) 3.115 E F0 3.115(characters. The)3.115 F .616 (printable ASCII characters not mentioned)3.116 F 1.116 ! (in the list of emacs standard bindings are bound to the)108 256.8 R F1 (self\255insert)3.615 E F0 1.115(function, which just inserts the gi) 3.615 F -.15(ve)-.25 G(n).15 E .945(character into the input line.)108 ! 268.8 R .945(In vi insertion mode, all characters not speci\214cally me\ ! ntioned are bound to)5.945 F F1(self\255insert)108 280.8 Q F0 5.359(.C)C .359(haracters assigned to signal generation by)-5.359 F F2(stty)2.859 E F0 .359(\(1\) or the terminal dri).32 F -.15(ve)-.25 G 1.159 -.4(r, s) ! .15 H .358(uch as C-Z or C-C,).4 F .187(retain that function.)108 292.8 ! R .187(Upper and lo)5.187 F .188(wer case meta\214ed characters are bou\ ! nd to the same function in the emacs)-.25 F .305(mode meta k)108 304.8 R ! -.15(ey)-.1 G 2.805(map. The).15 F .305(remaining characters are unboun\ ! d, which causes readline to ring the bell \(subject)2.805 F ! (to the setting of the)108 316.8 Q F1(bell\255style)2.5 E F0 -.25(va)2.5 ! G(riable\).).25 E F1(Emacs Mode)87 333.6 Q F0(Emacs Standard bindings) ! 151.2 345.6 Q 2.5("C-@" set-mark)151.2 369.6 R 2.5("C-A" be)151.2 381.6 ! R(ginning-of-line)-.15 E 2.5("C-B" backw)151.2 393.6 R(ard-char)-.1 E ! 2.5("C-D" delete-char)151.2 405.6 R 2.5("C-E" end-of-line)151.2 417.6 R ! 2.5("C-F" forw)151.2 429.6 R(ard-char)-.1 E 2.5("C-G" abort)151.2 441.6 ! R 2.5("C-H" backw)151.2 453.6 R(ard-delete-char)-.1 E 2.5 ! ("C-I" complete)151.2 465.6 R 2.5("C-J" accept-line)151.2 477.6 R 2.5 ! ("C-K" kill-line)151.2 489.6 R 2.5("C-L" clear)151.2 501.6 R(-screen)-.2 ! E 2.5("C-M" accept-line)151.2 513.6 R 2.5("C-N" ne)151.2 525.6 R ! (xt-history)-.15 E 2.5("C-P" pre)151.2 537.6 R(vious-history)-.25 E 2.5 ! ("C-Q" quoted-insert)151.2 549.6 R 2.5("C-R" re)151.2 561.6 R -.15(ve) ! -.25 G(rse-search-history).15 E 2.5("C-S" forw)151.2 573.6 R ! (ard-search-history)-.1 E 2.5("C-T" transpose-chars)151.2 585.6 R 2.5 ! ("C-U" unix-line-discard)151.2 597.6 R 2.5("C-V" quoted-insert)151.2 ! 609.6 R 2.5("C-W" unix-w)151.2 621.6 R(ord-rubout)-.1 E 2.5("C-Y" yank) ! 151.2 633.6 R 2.5("C-]" character)151.2 645.6 R(-search)-.2 E 2.5 ! ("C-_" undo)151.2 657.6 R 3.333("")151.2 669.6 S(to "/")-.833 E ! (self-insert)5 E 2.5("0" to)151.2 681.6 R 2.5("9" self-insert)2.5 F 2.5 ! (":" to)151.2 693.6 R 2.5("~" self-insert)2.5 F 2.5("C-?" backw)151.2 ! 705.6 R(ard-delete-char)-.1 E(Emacs Meta bindings)151.2 722.4 Q ! (GNU Readline 4.3)72 768 Q(2002 January 22)126.24 E(10)190.95 E EP %%Page: 11 11 %%BeginPageSetup *************** *** 1119,1196 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R 2.5 ! ("M-2" digit-ar)151.2 84 R(gument)-.18 E 2.5("M-3" digit-ar)151.2 96 R ! (gument)-.18 E 2.5("M-4" digit-ar)151.2 108 R(gument)-.18 E 2.5 ! ("M-5" digit-ar)151.2 120 R(gument)-.18 E 2.5("M-6" digit-ar)151.2 132 R ! (gument)-.18 E 2.5("M-7" digit-ar)151.2 144 R(gument)-.18 E 2.5 ! ("M-8" digit-ar)151.2 156 R(gument)-.18 E 2.5("M-9" digit-ar)151.2 168 R ! (gument)-.18 E 2.5("M-<" be)151.2 180 R(ginning-of-history)-.15 E 2.5 ! ("M-=" possible-completions)151.2 192 R 2.5("M->" end-of-history)151.2 ! 204 R 2.5("M-?" possible-completions)151.2 216 R 2.5("M-B" backw)151.2 ! 228 R(ard-w)-.1 E(ord)-.1 E 2.5("M-C" capitalize-w)151.2 240 R(ord)-.1 E ! 2.5("M-D" kill-w)151.2 252 R(ord)-.1 E 2.5("M-F" forw)151.2 264 R(ard-w) ! -.1 E(ord)-.1 E 2.5("M-L" do)151.2 276 R(wncase-w)-.25 E(ord)-.1 E 2.5 ! ("M-N" non-incremental-forw)151.2 288 R(ard-search-history)-.1 E 2.5 ! ("M-P" non-incremental-re)151.2 300 R -.15(ve)-.25 G(rse-search-history) ! .15 E 2.5("M-R" re)151.2 312 R -.15(ve)-.25 G(rt-line).15 E 2.5 ! ("M-T" transpose-w)151.2 324 R(ords)-.1 E 2.5("M-U" upcase-w)151.2 336 R ! (ord)-.1 E 2.5("M-Y" yank-pop)151.2 348 R 2.5 ! ("M-\\" delete-horizontal-space)151.2 360 R 2.5("M-~" tilde-e)151.2 372 ! R(xpand)-.15 E 2.5("M-C-?" backw)151.2 384 R(ard-kill-w)-.1 E(ord)-.1 E ! 2.5("M-_" yank-last-ar)151.2 396 R(g)-.18 E(Emacs Control-X bindings) ! 151.2 412.8 Q 2.5("C-XC-G" abort)151.2 436.8 R 2.5 ! ("C-XC-R" re-read-init-\214le)151.2 448.8 R 2.5("C-XC-U" undo)151.2 ! 460.8 R 2.5("C-XC-X" e)151.2 472.8 R(xchange-point-and-mark)-.15 E 2.5 ! ("C-X\(" start-kbd-macro)151.2 484.8 R 2.5("C-X\)" end-kbd-macro)151.2 ! 496.8 R 2.5("C-XE" call-last-kbd-macro)151.2 508.8 R 2.5("C-XC-?" backw) ! 151.2 520.8 R(ard-kill-line)-.1 E/F1 10/Times-Bold@0 SF ! (VI Mode bindings)87 549.6 Q F0(VI Insert Mode functions)151.2 561.6 Q ! 2.5("C-D" vi-eof-maybe)151.2 585.6 R 2.5("C-H" backw)151.2 597.6 R ! (ard-delete-char)-.1 E 2.5("C-I" complete)151.2 609.6 R 2.5 ! ("C-J" accept-line)151.2 621.6 R 2.5("C-M" accept-line)151.2 633.6 R 2.5 ! ("C-R" re)151.2 645.6 R -.15(ve)-.25 G(rse-search-history).15 E 2.5 ! ("C-S" forw)151.2 657.6 R(ard-search-history)-.1 E 2.5 ! ("C-T" transpose-chars)151.2 669.6 R 2.5("C-U" unix-line-discard)151.2 ! 681.6 R 2.5("C-V" quoted-insert)151.2 693.6 R 2.5("C-W" unix-w)151.2 ! 705.6 R(ord-rubout)-.1 E 2.5("C-Y" yank)151.2 717.6 R 2.5("C-[" vi-mo) ! 151.2 729.6 R -.15(ve)-.15 G(ment-mode).15 E(GNU Readline 4.2a)72 768 Q ! (2001 October 9)123.745 E(11)192.895 E EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup ! /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R 2.5 ! ("C-_" undo)151.2 84 R 3.333("")151.2 96 S(to "~")-.833 E(self-insert)5 ! E 2.5("C-?" backw)151.2 108 R(ard-delete-char)-.1 E ! (VI Command Mode functions)151.2 124.8 Q 2.5("C-D" vi-eof-maybe)151.2 ! 148.8 R 2.5("C-E" emacs-editing-mode)151.2 160.8 R 2.5("C-G" abort)151.2 ! 172.8 R 2.5("C-H" backw)151.2 184.8 R(ard-char)-.1 E 2.5 ! ("C-J" accept-line)151.2 196.8 R 2.5("C-K" kill-line)151.2 208.8 R 2.5 ! ("C-L" clear)151.2 220.8 R(-screen)-.2 E 2.5("C-M" accept-line)151.2 ! 232.8 R 2.5("C-N" ne)151.2 244.8 R(xt-history)-.15 E 2.5("C-P" pre)151.2 ! 256.8 R(vious-history)-.25 E 2.5("C-Q" quoted-insert)151.2 268.8 R 2.5 ! ("C-R" re)151.2 280.8 R -.15(ve)-.25 G(rse-search-history).15 E 2.5 ! ("C-S" forw)151.2 292.8 R(ard-search-history)-.1 E 2.5 ! ("C-T" transpose-chars)151.2 304.8 R 2.5("C-U" unix-line-discard)151.2 ! 316.8 R 2.5("C-V" quoted-insert)151.2 328.8 R 2.5("C-W" unix-w)151.2 ! 340.8 R(ord-rubout)-.1 E 2.5("C-Y" yank)151.2 352.8 R 2.5("C-_" vi-undo) ! 151.2 364.8 R -4.166 3.333("" f)151.2 376.8 T(orw)-3.333 E(ard-char)-.1 ! E 2.5("#" insert-comment)151.2 388.8 R 2.5("$" end-of-line)151.2 400.8 R ! 2.5("%" vi-match)151.2 412.8 R 2.5("&" vi-tilde-e)151.2 424.8 R(xpand) ! -.15 E 2.5("*" vi-complete)151.2 436.8 R 2.5("+" ne)151.2 448.8 R ! (xt-history)-.15 E 2.5("," vi-char)151.2 460.8 R(-search)-.2 E 2.5 ! ("-" pre)151.2 472.8 R(vious-history)-.25 E 2.5("." vi-redo)151.2 484.8 ! R 2.5("/" vi-search)151.2 496.8 R 2.5("0" be)151.2 508.8 R ! (ginning-of-line)-.15 E("1" to "9")151.2 520.8 Q(vi-ar)5 E(g-digit)-.18 ! E 2.5(";" vi-char)151.2 532.8 R(-search)-.2 E 2.5("=" vi-complete)151.2 ! 544.8 R 2.5("?" vi-search)151.2 556.8 R 2.5("A" vi-append-eol)151.2 ! 568.8 R 2.5("B" vi-pre)151.2 580.8 R(v-w)-.25 E(ord)-.1 E 2.5 ! ("C" vi-change-to)151.2 592.8 R 2.5("D" vi-delete-to)151.2 604.8 R 2.5 ! ("E" vi-end-w)151.2 616.8 R(ord)-.1 E 2.5("F" vi-char)151.2 628.8 R ! (-search)-.2 E 2.5("G" vi-fetch-history)151.2 640.8 R 2.5 ! ("I" vi-insert-be)151.2 652.8 R(g)-.15 E 2.5("N" vi-search-ag)151.2 ! 664.8 R(ain)-.05 E 2.5("P" vi-put)151.2 676.8 R 2.5("R" vi-replace)151.2 ! 688.8 R 2.5("S" vi-subst)151.2 700.8 R 2.5("T" vi-char)151.2 712.8 R ! (-search)-.2 E 2.5("U" re)151.2 724.8 R -.15(ve)-.25 G(rt-line).15 E ! (GNU Readline 4.2a)72 768 Q(2001 October 9)123.745 E(12)192.895 E EP %%Page: 13 13 %%BeginPageSetup --- 1146,1224 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R 2.5 ! ("M-C-G" abort)151.2 84 R 2.5("M-C-H" backw)151.2 96 R(ard-kill-w)-.1 E ! (ord)-.1 E 2.5("M-C-I" tab-insert)151.2 108 R 2.5 ! ("M-C-J" vi-editing-mode)151.2 120 R 2.5("M-C-M" vi-editing-mode)151.2 ! 132 R 2.5("M-C-R" re)151.2 144 R -.15(ve)-.25 G(rt-line).15 E 2.5 ! ("M-C-Y" yank-nth-ar)151.2 156 R(g)-.18 E 2.5("M-C-[" complete)151.2 168 ! R 2.5("M-C-]" character)151.2 180 R(-search-backw)-.2 E(ard)-.1 E 2.5 ! ("M-space" set-mark)151.2 192 R 2.5("M-#" insert-comment)151.2 204 R 2.5 ! ("M-&" tilde-e)151.2 216 R(xpand)-.15 E 2.5("M-*" insert-completions) ! 151.2 228 R 2.5("M--" digit-ar)151.2 240 R(gument)-.18 E 2.5 ! ("M-." yank-last-ar)151.2 252 R(g)-.18 E 2.5("M-0" digit-ar)151.2 264 R ! (gument)-.18 E 2.5("M-1" digit-ar)151.2 276 R(gument)-.18 E 2.5 ! ("M-2" digit-ar)151.2 288 R(gument)-.18 E 2.5("M-3" digit-ar)151.2 300 R ! (gument)-.18 E 2.5("M-4" digit-ar)151.2 312 R(gument)-.18 E 2.5 ! ("M-5" digit-ar)151.2 324 R(gument)-.18 E 2.5("M-6" digit-ar)151.2 336 R ! (gument)-.18 E 2.5("M-7" digit-ar)151.2 348 R(gument)-.18 E 2.5 ! ("M-8" digit-ar)151.2 360 R(gument)-.18 E 2.5("M-9" digit-ar)151.2 372 R ! (gument)-.18 E 2.5("M-<" be)151.2 384 R(ginning-of-history)-.15 E 2.5 ! ("M-=" possible-completions)151.2 396 R 2.5("M->" end-of-history)151.2 ! 408 R 2.5("M-?" possible-completions)151.2 420 R 2.5("M-B" backw)151.2 ! 432 R(ard-w)-.1 E(ord)-.1 E 2.5("M-C" capitalize-w)151.2 444 R(ord)-.1 E ! 2.5("M-D" kill-w)151.2 456 R(ord)-.1 E 2.5("M-F" forw)151.2 468 R(ard-w) ! -.1 E(ord)-.1 E 2.5("M-L" do)151.2 480 R(wncase-w)-.25 E(ord)-.1 E 2.5 ! ("M-N" non-incremental-forw)151.2 492 R(ard-search-history)-.1 E 2.5 ! ("M-P" non-incremental-re)151.2 504 R -.15(ve)-.25 G(rse-search-history) ! .15 E 2.5("M-R" re)151.2 516 R -.15(ve)-.25 G(rt-line).15 E 2.5 ! ("M-T" transpose-w)151.2 528 R(ords)-.1 E 2.5("M-U" upcase-w)151.2 540 R ! (ord)-.1 E 2.5("M-Y" yank-pop)151.2 552 R 2.5 ! ("M-\\" delete-horizontal-space)151.2 564 R 2.5("M-~" tilde-e)151.2 576 ! R(xpand)-.15 E 2.5("M-C-?" backw)151.2 588 R(ard-kill-w)-.1 E(ord)-.1 E ! 2.5("M-_" yank-last-ar)151.2 600 R(g)-.18 E(Emacs Control-X bindings) ! 151.2 616.8 Q 2.5("C-XC-G" abort)151.2 640.8 R 2.5 ! ("C-XC-R" re-read-init-\214le)151.2 652.8 R 2.5("C-XC-U" undo)151.2 ! 664.8 R 2.5("C-XC-X" e)151.2 676.8 R(xchange-point-and-mark)-.15 E 2.5 ! ("C-X\(" start-kbd-macro)151.2 688.8 R 2.5("C-X\)" end-kbd-macro)151.2 ! 700.8 R 2.5("C-XE" call-last-kbd-macro)151.2 712.8 R 2.5("C-XC-?" backw) ! 151.2 724.8 R(ard-kill-line)-.1 E(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(11)190.95 E EP %%Page: 12 12 %%BeginPageSetup BP %%EndPageSetup ! /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 10 ! /Times-Bold@0 SF(VI Mode bindings)87 84 Q F0(VI Insert Mode functions) ! 151.2 96 Q 2.5("C-D" vi-eof-maybe)151.2 120 R 2.5("C-H" backw)151.2 132 ! R(ard-delete-char)-.1 E 2.5("C-I" complete)151.2 144 R 2.5 ! ("C-J" accept-line)151.2 156 R 2.5("C-M" accept-line)151.2 168 R 2.5 ! ("C-R" re)151.2 180 R -.15(ve)-.25 G(rse-search-history).15 E 2.5 ! ("C-S" forw)151.2 192 R(ard-search-history)-.1 E 2.5 ! ("C-T" transpose-chars)151.2 204 R 2.5("C-U" unix-line-discard)151.2 216 ! R 2.5("C-V" quoted-insert)151.2 228 R 2.5("C-W" unix-w)151.2 240 R ! (ord-rubout)-.1 E 2.5("C-Y" yank)151.2 252 R 2.5("C-[" vi-mo)151.2 264 R ! -.15(ve)-.15 G(ment-mode).15 E 2.5("C-_" undo)151.2 276 R 3.333("")151.2 ! 288 S(to "~")-.833 E(self-insert)5 E 2.5("C-?" backw)151.2 300 R ! (ard-delete-char)-.1 E(VI Command Mode functions)151.2 316.8 Q 2.5 ! ("C-D" vi-eof-maybe)151.2 340.8 R 2.5("C-E" emacs-editing-mode)151.2 ! 352.8 R 2.5("C-G" abort)151.2 364.8 R 2.5("C-H" backw)151.2 376.8 R ! (ard-char)-.1 E 2.5("C-J" accept-line)151.2 388.8 R 2.5("C-K" kill-line) ! 151.2 400.8 R 2.5("C-L" clear)151.2 412.8 R(-screen)-.2 E 2.5 ! ("C-M" accept-line)151.2 424.8 R 2.5("C-N" ne)151.2 436.8 R(xt-history) ! -.15 E 2.5("C-P" pre)151.2 448.8 R(vious-history)-.25 E 2.5 ! ("C-Q" quoted-insert)151.2 460.8 R 2.5("C-R" re)151.2 472.8 R -.15(ve) ! -.25 G(rse-search-history).15 E 2.5("C-S" forw)151.2 484.8 R ! (ard-search-history)-.1 E 2.5("C-T" transpose-chars)151.2 496.8 R 2.5 ! ("C-U" unix-line-discard)151.2 508.8 R 2.5("C-V" quoted-insert)151.2 ! 520.8 R 2.5("C-W" unix-w)151.2 532.8 R(ord-rubout)-.1 E 2.5("C-Y" yank) ! 151.2 544.8 R 2.5("C-_" vi-undo)151.2 556.8 R -4.166 3.333("" f)151.2 ! 568.8 T(orw)-3.333 E(ard-char)-.1 E 2.5("#" insert-comment)151.2 580.8 R ! 2.5("$" end-of-line)151.2 592.8 R 2.5("%" vi-match)151.2 604.8 R 2.5 ! ("&" vi-tilde-e)151.2 616.8 R(xpand)-.15 E 2.5("*" vi-complete)151.2 ! 628.8 R 2.5("+" ne)151.2 640.8 R(xt-history)-.15 E 2.5("," vi-char)151.2 ! 652.8 R(-search)-.2 E 2.5("-" pre)151.2 664.8 R(vious-history)-.25 E 2.5 ! ("." vi-redo)151.2 676.8 R 2.5("/" vi-search)151.2 688.8 R 2.5("0" be) ! 151.2 700.8 R(ginning-of-line)-.15 E("1" to "9")151.2 712.8 Q(vi-ar)5 E ! (g-digit)-.18 E 2.5(";" vi-char)151.2 724.8 R(-search)-.2 E ! (GNU Readline 4.3)72 768 Q(2002 January 22)126.24 E(12)190.95 E EP %%Page: 13 13 %%BeginPageSetup *************** *** 1198,1248 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R 2.5 ! ("W" vi-ne)151.2 84 R(xt-w)-.15 E(ord)-.1 E 2.5("X" backw)151.2 96 R ! (ard-delete-char)-.1 E 2.5("Y" vi-yank-to)151.2 108 R 2.5 ! ("\\" vi-complete)151.2 120 R 2.5("^" vi-\214rst-print)151.2 132 R 2.5 ! ("_" vi-yank-ar)151.2 144 R(g)-.18 E 2.5("`" vi-goto-mark)151.2 156 R ! 2.5("a" vi-append-mode)151.2 168 R 2.5("b" vi-pre)151.2 180 R(v-w)-.25 E ! (ord)-.1 E 2.5("c" vi-change-to)151.2 192 R 2.5("d" vi-delete-to)151.2 ! 204 R 2.5("e" vi-end-w)151.2 216 R(ord)-.1 E 2.5("f" vi-char)151.2 228 R ! (-search)-.2 E 2.5("h" backw)151.2 240 R(ard-char)-.1 E 2.5 ! ("i" vi-insertion-mode)151.2 252 R 2.5("j" ne)151.2 264 R(xt-history) ! -.15 E 2.5("k" pre)151.2 276 R(v-history)-.25 E 2.5("l" forw)151.2 288 R ! (ard-char)-.1 E 2.5("m" vi-set-mark)151.2 300 R 2.5("n" vi-search-ag) ! 151.2 312 R(ain)-.05 E 2.5("p" vi-put)151.2 324 R 2.5 ! ("r" vi-change-char)151.2 336 R 2.5("s" vi-subst)151.2 348 R 2.5 ! ("t" vi-char)151.2 360 R(-search)-.2 E 2.5("u" vi-undo)151.2 372 R 2.5 ! ("w" vi-ne)151.2 384 R(xt-w)-.15 E(ord)-.1 E 2.5("x" vi-delete)151.2 396 ! R 2.5("y" vi-yank-to)151.2 408 R 2.5("|" vi-column)151.2 420 R 2.5 ! ("~" vi-change-case)151.2 432 R/F1 10.95/Times-Bold@0 SF(SEE ALSO)72 ! 448.8 Q/F2 10/Times-Italic@0 SF(The Gnu Readline Libr)108 460.8 Q(ary) -.15 E F0 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E F2 ! (The Gnu History Libr)108 472.8 Q(ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E ! (ox and Chet Rame)-.15 E(y)-.15 E F2(bash)108 484.8 Q F0(\(1\))A F1 ! (FILES)72 501.6 Q F2(~/.inputr)109.666 513.6 Q(c)-.37 E F0(Indi)144 ! 525.6 Q(vidual)-.25 E/F3 10/Times-Bold@0 SF -.18(re)2.5 G(adline).18 E ! F0(initialization \214le)2.5 E F1 -.548(AU)72 542.4 S(THORS).548 E F0 ! (Brian F)108 554.4 Q(ox, Free Softw)-.15 E(are F)-.1 E(oundation)-.15 E ! (bfox@gnu.or)108 566.4 Q(g)-.18 E(Chet Rame)108 583.2 Q 1.3 -.65(y, C) ! -.15 H(ase W).65 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve) ! -.25 G(rsity).15 E(chet@ins.CWR)108 595.2 Q(U.Edu)-.4 E F1 -.11(BU)72 ! 612 S 2.738(GR).11 G(EPOR)-2.738 E(TS)-.438 E F0 .69(If you \214nd a b) ! 108 624 R .69(ug in)-.2 F F3 -.18(re)3.19 G(adline,).18 E F0 .69 ! (you should report it.)3.19 F .691(But \214rst, you should mak)5.69 F ! 3.191(es)-.1 G .691(ure that it really is a b)-3.191 F(ug,)-.2 E ! (and that it appears in the latest v)108 636 Q(ersion of the)-.15 E F3 ! -.18(re)2.5 G(adline).18 E F0(library that you ha)2.5 E -.15(ve)-.2 G(.) ! .15 E .705(Once you ha)108 652.8 R 1.005 -.15(ve d)-.2 H .705 ! (etermined that a b).15 F .704(ug actually e)-.2 F .704(xists, mail a b) ! -.15 F .704(ug report to)-.2 F F2 -.2(bu)3.204 G(g\255r).2 E(eadline) ! -.37 E F0(@)A F2(gnu.or)A(g)-.37 E F0 5.704(.I)C 3.204(fy)-5.704 G(ou) ! -3.204 E(ha)108 664.8 Q 1.809 -.15(ve a \214)-.2 H 1.509 ! (x, you are welcome to mail that as well!).15 F 1.51 ! (Suggestions and `philosophical' b)6.51 F 1.51(ug reports may be)-.2 F ! (mailed to)108 676.8 Q F2 -.2(bu)2.5 G(g-r).2 E(eadline)-.37 E F0(@)A F2 ! (gnu.or)A(g)-.37 E F0(or posted to the Usenet ne)2.5 E(wsgroup)-.25 E F3 ! (gnu.bash.b)2.5 E(ug)-.2 E F0(.)A(Comments and b)108 693.6 Q ! (ug reports concerning this manual page should be directed to)-.2 E F2 ! -.15(ch)2.5 G(et@ins.CWR).15 E -.25(U.)-.4 G(Edu).25 E F0(.).25 E ! (GNU Readline 4.2a)72 768 Q(2001 October 9)123.745 E(13)192.895 E EP %%Page: 14 14 %%BeginPageSetup --- 1226,1262 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R 2.5 ! ("=" vi-complete)151.2 84 R 2.5("?" vi-search)151.2 96 R 2.5 ! ("A" vi-append-eol)151.2 108 R 2.5("B" vi-pre)151.2 120 R(v-w)-.25 E ! (ord)-.1 E 2.5("C" vi-change-to)151.2 132 R 2.5("D" vi-delete-to)151.2 ! 144 R 2.5("E" vi-end-w)151.2 156 R(ord)-.1 E 2.5("F" vi-char)151.2 168 R ! (-search)-.2 E 2.5("G" vi-fetch-history)151.2 180 R 2.5 ! ("I" vi-insert-be)151.2 192 R(g)-.15 E 2.5("N" vi-search-ag)151.2 204 R ! (ain)-.05 E 2.5("P" vi-put)151.2 216 R 2.5("R" vi-replace)151.2 228 R ! 2.5("S" vi-subst)151.2 240 R 2.5("T" vi-char)151.2 252 R(-search)-.2 E ! 2.5("U" re)151.2 264 R -.15(ve)-.25 G(rt-line).15 E 2.5("W" vi-ne)151.2 ! 276 R(xt-w)-.15 E(ord)-.1 E 2.5("X" backw)151.2 288 R(ard-delete-char) ! -.1 E 2.5("Y" vi-yank-to)151.2 300 R 2.5("\\" vi-complete)151.2 312 R ! 2.5("^" vi-\214rst-print)151.2 324 R 2.5("_" vi-yank-ar)151.2 336 R(g) ! -.18 E 2.5("`" vi-goto-mark)151.2 348 R 2.5("a" vi-append-mode)151.2 360 ! R 2.5("b" vi-pre)151.2 372 R(v-w)-.25 E(ord)-.1 E 2.5("c" vi-change-to) ! 151.2 384 R 2.5("d" vi-delete-to)151.2 396 R 2.5("e" vi-end-w)151.2 408 ! R(ord)-.1 E 2.5("f" vi-char)151.2 420 R(-search)-.2 E 2.5("h" backw) ! 151.2 432 R(ard-char)-.1 E 2.5("i" vi-insertion-mode)151.2 444 R 2.5 ! ("j" ne)151.2 456 R(xt-history)-.15 E 2.5("k" pre)151.2 468 R(v-history) ! -.25 E 2.5("l" forw)151.2 480 R(ard-char)-.1 E 2.5("m" vi-set-mark)151.2 ! 492 R 2.5("n" vi-search-ag)151.2 504 R(ain)-.05 E 2.5("p" vi-put)151.2 ! 516 R 2.5("r" vi-change-char)151.2 528 R 2.5("s" vi-subst)151.2 540 R ! 2.5("t" vi-char)151.2 552 R(-search)-.2 E 2.5("u" vi-undo)151.2 564 R ! 2.5("w" vi-ne)151.2 576 R(xt-w)-.15 E(ord)-.1 E 2.5("x" vi-delete)151.2 ! 588 R 2.5("y" vi-yank-to)151.2 600 R 2.5("|" vi-column)151.2 612 R 2.5 ! ("~" vi-change-case)151.2 624 R/F1 10.95/Times-Bold@0 SF(SEE ALSO)72 ! 640.8 Q/F2 10/Times-Italic@0 SF(The Gnu Readline Libr)108 652.8 Q(ary) -.15 E F0 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E F2 ! (The Gnu History Libr)108 664.8 Q(ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E ! (ox and Chet Rame)-.15 E(y)-.15 E F2(bash)108 676.8 Q F0(\(1\))A F1 ! (FILES)72 693.6 Q F2(~/.inputr)109.666 705.6 Q(c)-.37 E F0(Indi)144 ! 717.6 Q(vidual)-.25 E/F3 10/Times-Bold@0 SF -.18(re)2.5 G(adline).18 E ! F0(initialization \214le)2.5 E(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(13)190.95 E EP %%Page: 14 14 %%BeginPageSetup *************** *** 1250,1256 **** %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 ! 10.95/Times-Bold@0 SF -.11(BU)72 84 S(GS).11 E F0(It')108 96 Q 2.5(st) ! -.55 G(oo big and too slo)-2.5 E -.65(w.)-.25 G(GNU Readline 4.2a)72 768 ! Q(2001 October 9)123.745 E(14)192.895 E EP %%Trailer end --- 1264,1293 ---- %%EndPageSetup /F0 10/Times-Roman@0 SF 342.2(READLINE\(3\) READLINE\(3\))72 48 R/F1 ! 10.95/Times-Bold@0 SF -.548(AU)72 84 S(THORS).548 E F0(Brian F)108 96 Q ! (ox, Free Softw)-.15 E(are F)-.1 E(oundation)-.15 E(bfox@gnu.or)108 108 ! Q(g)-.18 E(Chet Rame)108 124.8 Q 1.3 -.65(y, C)-.15 H(ase W).65 E ! (estern Reserv)-.8 E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E ! (chet@ins.CWR)108 136.8 Q(U.Edu)-.4 E F1 -.11(BU)72 153.6 S 2.738(GR).11 ! G(EPOR)-2.738 E(TS)-.438 E F0 .69(If you \214nd a b)108 165.6 R .69 ! (ug in)-.2 F/F2 10/Times-Bold@0 SF -.18(re)3.19 G(adline,).18 E F0 .69 ! (you should report it.)3.19 F .691(But \214rst, you should mak)5.69 F ! 3.191(es)-.1 G .691(ure that it really is a b)-3.191 F(ug,)-.2 E ! (and that it appears in the latest v)108 177.6 Q(ersion of the)-.15 E F2 ! -.18(re)2.5 G(adline).18 E F0(library that you ha)2.5 E -.15(ve)-.2 G(.) ! .15 E .705(Once you ha)108 194.4 R 1.005 -.15(ve d)-.2 H .705 ! (etermined that a b).15 F .704(ug actually e)-.2 F .704(xists, mail a b) ! -.15 F .704(ug report to)-.2 F/F3 10/Times-Italic@0 SF -.2(bu)3.204 G ! (g\255r).2 E(eadline)-.37 E F0(@)A F3(gnu.or)A(g)-.37 E F0 5.704(.I)C ! 3.204(fy)-5.704 G(ou)-3.204 E(ha)108 206.4 Q 1.809 -.15(ve a \214)-.2 H ! 1.509(x, you are welcome to mail that as well!).15 F 1.51 ! (Suggestions and `philosophical' b)6.51 F 1.51(ug reports may be)-.2 F ! (mailed to)108 218.4 Q F3 -.2(bu)2.5 G(g-r).2 E(eadline)-.37 E F0(@)A F3 ! (gnu.or)A(g)-.37 E F0(or posted to the Usenet ne)2.5 E(wsgroup)-.25 E F2 ! (gnu.bash.b)2.5 E(ug)-.2 E F0(.)A(Comments and b)108 235.2 Q ! (ug reports concerning this manual page should be directed to)-.2 E F3 ! -.15(ch)2.5 G(et@ins.CWR).15 E -.25(U.)-.4 G(Edu).25 E F0(.).25 E F1 ! -.11(BU)72 252 S(GS).11 E F0(It')108 264 Q 2.5(st)-.55 G ! (oo big and too slo)-2.5 E -.65(w.)-.25 G(GNU Readline 4.3)72 768 Q ! (2002 January 22)126.24 E(14)190.95 E EP %%Trailer end diff -Nrc2 readline-4.2a/doc/rlman.texinfo readline-4.3/doc/rlman.texinfo *** readline-4.2a/doc/rlman.texinfo Fri Feb 2 11:49:17 2001 --- readline-4.3/doc/rlman.texinfo Tue Apr 16 17:10:04 2002 *************** *** 19,23 **** to provide a command line interface. ! Copyright (C) 1988-2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 19,23 ---- to provide a command line interface. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 74,78 **** @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-2001 Free Software Foundation, Inc. @end titlepage --- 74,78 ---- @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-2002 Free Software Foundation, Inc. @end titlepage diff -Nrc2 readline-4.2a/doc/rltech.texinfo readline-4.3/doc/rltech.texinfo *** readline-4.2a/doc/rltech.texinfo Tue May 1 12:53:55 2001 --- readline-4.3/doc/rltech.texinfo Tue Apr 16 17:11:49 2002 *************** *** 9,13 **** to provide a command line interface. ! Copyright (C) 1988-2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 9,13 ---- to provide a command line interface. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 112,121 **** static char *line_read = (char *)NULL; ! /* Read a string, and return a pointer to it. Returns NULL on EOF. */ char * rl_gets () @{ ! /* If the buffer has already been allocated, return the memory ! to the free pool. */ if (line_read) @{ --- 112,122 ---- static char *line_read = (char *)NULL; ! /* Read a string, and return a pointer to it. ! Returns NULL on EOF. */ char * rl_gets () @{ ! /* If the buffer has already been allocated, ! return the memory to the free pool. */ if (line_read) @{ *************** *** 127,131 **** line_read = readline (""); ! /* If the line has any text in it, save it on the history. */ if (line_read && *line_read) add_history (line_read); --- 128,133 ---- line_read = readline (""); ! /* If the line has any text in it, ! save it on the history. */ if (line_read && *line_read) add_history (line_read); *************** *** 264,268 **** @example ! @code{foo (int count, int key)} @end example --- 266,270 ---- @example ! @code{int foo (int count, int key)} @end example *************** *** 281,284 **** --- 283,289 ---- negative argument. + A command function should return 0 if its action completes successfully, + and a non-zero value if some error occurs. + @node Readline Variables @section Readline Variables *************** *** 386,393 **** --- 391,400 ---- @deftypevar {FILE *} rl_instream The stdio stream from which Readline reads input. + If @code{NULL}, Readline defaults to @var{stdin}. @end deftypevar @deftypevar {FILE *} rl_outstream The stdio stream to which Readline performs output. + If @code{NULL}, Readline defaults to @var{stdout}. @end deftypevar *************** *** 767,773 **** The types of events that can be undone are: ! @example enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @}; ! @end example Notice that @code{UNDO_DELETE} means to insert some text, and --- 774,780 ---- The types of events that can be undone are: ! @smallexample enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @}; ! @end smallexample Notice that @code{UNDO_DELETE} means to insert some text, and *************** *** 902,909 **** --- 909,918 ---- @deftypefun int rl_insert_text (const char *text) Insert @var{text} into the line at the current cursor position. + Returns the number of characters inserted. @end deftypefun @deftypefun int rl_delete_text (int start, int end) Delete the text between @var{start} and @var{end} in the current line. + Returns the number of characters deleted. @end deftypefun *************** *** 948,952 **** Insert @var{c} into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with ! @code{rl_read_key()}. @end deftypefun --- 957,963 ---- Insert @var{c} into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with ! @code{rl_read_key()}. Up to 512 characters may be pushed back. ! @code{rl_stuff_char} returns 1 if the character was successfully inserted; ! 0 otherwise. @end deftypefun *************** *** 1001,1004 **** --- 1012,1022 ---- @subsection Utility Functions + @deftypefun void rl_replace_line (const char *text, int clear_undo) + Replace the contents of @code{rl_line_buffer} with @var{text}. + The point and mark are preserved, if possible. + If @var{clear_undo} is non-zero, the undo list associated with the + current line is cleared. + @end deftypefun + @deftypefun int rl_extend_line_buffer (int len) Ensure that @code{rl_line_buffer} has enough space to hold @var{len} *************** *** 1124,1131 **** Whenever an application determines that keyboard input is available, it should call @code{rl_callback_read_char()}, which will read the next ! character from the current input source. If that character completes the ! line, @code{rl_callback_read_char} will invoke the @var{lhandler} ! function saved by @code{rl_callback_handler_install} to process the ! line. @code{EOF} is indicated by calling @var{lhandler} with a @code{NULL} line. @end deftypefun --- 1142,1155 ---- Whenever an application determines that keyboard input is available, it should call @code{rl_callback_read_char()}, which will read the next ! character from the current input source. ! If that character completes the line, @code{rl_callback_read_char} will ! invoke the @var{lhandler} function saved by @code{rl_callback_handler_install} ! to process the line. ! Before calling the @var{lhandler} function, the terminal settings are ! reset to the values they had before calling ! @code{rl_callback_handler_install}. ! If the @var{lhandler} function returns, ! the terminal settings are modified for Readline's use again. ! @code{EOF} is indicated by calling @var{lhandler} with a @code{NULL} line. @end deftypefun *************** *** 1134,1137 **** --- 1158,1165 ---- Restore the terminal to its initial state and remove the line handler. This may be called from within a callback as well as independently. + If the @var{lhandler} installed by @code{rl_callback_handler_install} + does not exit the program, either this function or the function referred + to by the value of @code{rl_deprep_term_function} should be called before + the program exits to reset the terminal settings. @end deftypefun *************** *** 1186,1191 **** @} ! /* Tell readline that we are modifying the line, so it will save ! the undo information. */ rl_modifying (start, end); --- 1214,1219 ---- @} ! /* Tell readline that we are modifying the line, ! so it will save the undo information. */ rl_modifying (start, end); *************** *** 1443,1446 **** --- 1471,1482 ---- @end deftypefun + @deftypefun int rl_completion_mode (rl_command_func_t *cfunc) + Returns the apppriate value to pass to @code{rl_complete_internal()} + depending on whether @var{cfunc} was called twice in succession and + the value of the @code{show-all-if-ambiguous} variable. + Application-specific completion functions may use this function to present + the same interface as @code{rl_complete()}. + @end deftypefun + @deftypefun {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 *************** *** 1529,1536 **** @end deftypevar ! @deftypevar 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. @end deftypevar --- 1565,1603 ---- @end deftypevar ! @deftypevar {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 @code{NULL} terminated array of matches. ! The first element (@code{matches[0]}) is the ! maximal substring common to all matches. This function can ! re-arrange the list of matches as required, but each element deleted ! from the array must be freed. ! @end deftypevar ! ! @deftypevar {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. ! If the string is replaced with a new string, the old value should be freed. ! Any modified directory name should have a trailing slash. ! The modified value will be displayed as part of the completion, replacing ! the directory portion of the pathname the user typed. ! It returns an integer that should be non-zero if the function modifies ! its directory argument. ! It could be used to expand symbolic links or shell variables in pathnames. ! @end deftypevar ! ! @deftypevar {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. ! It takes three arguments: ! (@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length}) ! where @var{matches} is the array of matching strings, ! @var{num_matches} is the number of strings in that array, and ! @var{max_length} is the length of the longest string in that array. ! Readline provides a convenience function, @code{rl_display_match_list}, ! that takes care of doing the display to Readline's output stream. That ! function may be called from this hook. @end deftypevar *************** *** 1572,1575 **** --- 1639,1648 ---- @end deftypevar + @deftypevar 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. + @end deftypevar + @deftypevar {int} rl_completion_append_character When a single completion alternative matches at the end of the command *************** *** 1582,1585 **** --- 1655,1676 ---- @end deftypevar + @deftypevar int rl_completion_suppress_append + If non-zero, @var{rl_completion_append_character} is not appended to + matches at the end of the command line, as described above. It is + set to 0 before any application-specific completion function is called. + @end deftypevar + + @deftypevar int rl_completion_mark_symlink_dirs + If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + user-settable @var{mark-directories} variable. + This variable exists so that application completion functions can + override the user's global preference (set via the + @var{mark-symlinked-directories} Readline variable) if appropriate. + This variable is set to the user's preference before any + application completion function is called, so unless that function + modifies the value, the user's preferences are honored. + @end deftypevar + @deftypevar int rl_ignore_completion_duplicates If non-zero, then duplicates in the matches are removed. *************** *** 1626,1666 **** @end deftypevar - @deftypevar {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 @code{NULL} terminated array of matches. - The first element (@code{matches[0]}) is the - maximal substring common to all matches. This function can - re-arrange the list of matches as required, but each element deleted - from the array must be freed. - @end deftypevar - - @deftypevar {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. - If the string is replaced with a new string, the old value should be freed. - Any modified directory name should have a trailing slash. - The modified value will be displayed as part of the completion, replacing - the directory portion of the pathname the user typed. - It returns an integer that should be non-zero if the function modifies - its directory argument. - It could be used to expand symbolic links or shell variables in pathnames. - @end deftypevar - - @deftypevar {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. - It takes three arguments: - (@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length}) - where @var{matches} is the array of matching strings, - @var{num_matches} is the number of strings in that array, and - @var{max_length} is the length of the longest string in that array. - Readline provides a convenience function, @code{rl_display_match_list}, - that takes care of doing the display to Readline's output stream. That - function may be called from this hook. - @end deftypevar - @node A Short Completion Example @subsection A Short Completion Example --- 1717,1720 ---- *************** *** 2090,2099 **** @{ fprintf (stderr, ! "%s: Too dangerous for me to distribute. Write it yourself.\n", caller); @} ! /* Return non-zero if ARG is a valid argument for CALLER, else print ! an error message and return zero. */ int valid_argument (caller, arg) --- 2144,2154 ---- @{ fprintf (stderr, ! "%s: Too dangerous for me to distribute.\n" caller); + fprintf (stderr, "Write it yourself.\n"); @} ! /* Return non-zero if ARG is a valid argument for CALLER, ! else print an error message and return zero. */ int valid_argument (caller, arg) diff -Nrc2 readline-4.2a/doc/rluser.texinfo readline-4.3/doc/rluser.texinfo *** readline-4.2a/doc/rluser.texinfo Tue Oct 9 15:05:53 2001 --- readline-4.3/doc/rluser.texinfo Tue Mar 5 13:20:44 2002 *************** *** 11,15 **** GNU Readline Library. ! Copyright (C) 1988-2001 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. --- 11,15 ---- GNU Readline Library. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. *************** *** 513,516 **** --- 513,523 ---- This variable is @samp{off} by default. + @item mark-symlinked-directories + @vindex mark-symlinked-directories + If set to @samp{on}, completed names which are symbolic links + to directories have a slash appended (subject to the value of + @code{mark-directories}). + The default is @samp{off}. + @item match-hidden-files @vindex match-hidden-files *************** *** 527,530 **** --- 534,543 ---- sequence. The default is @samp{off}. + @item page-completions + @vindex page-completions + If set to @samp{on}, Readline uses an internal @code{more}-like pager + to display a screenful of possible completions at a time. + This variable is @samp{on} by default. + @item print-completions-horizontally If set to @samp{on}, Readline will display completions with matches *************** *** 758,769 **** @page # This file controls the behaviour of line input editing for ! # programs that use the Gnu Readline library. Existing programs ! # include FTP, Bash, and Gdb. # # You can re-read the inputrc file with C-x C-r. # Lines beginning with '#' are comments. # ! # First, include any systemwide bindings and variable assignments from ! # /etc/Inputrc $include /etc/Inputrc --- 771,782 ---- @page # This file controls the behaviour of line input editing for ! # programs that use the GNU Readline library. Existing ! # programs include FTP, Bash, and GDB. # # You can re-read the inputrc file with C-x C-r. # Lines beginning with '#' are comments. # ! # First, include any systemwide bindings and variable ! # assignments from /etc/Inputrc $include /etc/Inputrc *************** *** 817,824 **** # edit the path "\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f" ! # prepare to type a quoted word -- insert open and close double quotes # and move to just after the open quote "\C-x\"": "\"\"\C-b" ! # insert a backslash (testing backslash escapes in sequences and macros) "\C-x\\": "\\" # Quote the current or previous word --- 830,839 ---- # edit the path "\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f" ! # prepare to type a quoted word -- ! # insert open and close double quotes # and move to just after the open quote "\C-x\"": "\"\"\C-b" ! # insert a backslash (testing backslash escapes ! # in sequences and macros) "\C-x\\": "\\" # Quote the current or previous word *************** *** 836,849 **** set input-meta on ! # allow iso-latin1 characters to be inserted rather than converted to ! # prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly rather than ! # as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for a word, ask the ! # user if he wants to see all of them set completion-query-items 150 --- 851,864 ---- set input-meta on ! # allow iso-latin1 characters to be inserted rather ! # than converted to prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly ! # rather than as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for ! # a word, ask the user if he wants to see all of them set completion-query-items 150 *************** *** 1054,1057 **** --- 1069,1086 ---- capitalize the previous word, but do not move the cursor. + @item overwrite-mode () + Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + @code{emacs} mode; @code{vi} mode does overwrite differently. + Each call to @code{readline()} starts in insert mode. + + In overwrite mode, characters bound to @code{self-insert} replace + the text at point rather than pushing the text to the right. + Characters bound to @code{backward-delete-char} replace the character + before point with a space. + + By default, this command is unbound. + @end ftable *************** *** 1313,1322 **** @item insert-comment (M-#) ! The value of the @code{comment-begin} ! variable is inserted at the beginning of the current line, ! and the line is accepted as if a newline had been typed. @ifset BashFeatures The default value of @code{comment-begin} causes this command to make the current line a shell comment. @end ifset --- 1342,1358 ---- @item insert-comment (M-#) ! Without a numeric argument, the value of the @code{comment-begin} ! variable is inserted at the beginning of the current line. ! If a numeric argument is supplied, this command acts as a toggle: if ! the characters at the beginning of the line do not match the value ! of @code{comment-begin}, the value is inserted, otherwise ! the characters in @code{comment-begin} are deleted from the beginning of ! the line. ! In either case, the line is accepted as if a newline had been typed. @ifset BashFeatures The default value of @code{comment-begin} causes this command to make the current line a shell comment. + If a numeric argument causes the comment character to be removed, the line + will be executed by the shell. @end ifset *************** *** 1340,1350 **** --- 1376,1395 ---- @ifset BashFeatures + @item glob-complete-word (M-g) + The word before point is treated as a pattern for pathname expansion, + with an asterisk implicitly appended. This pattern is used to + generate a list of matching file names for possible completions. + @item glob-expand-word (C-x *) The word before point is treated as a pattern for pathname expansion, and the list of matching file names is inserted, replacing the word. + If a numeric argument is supplied, a @samp{*} is appended before + pathname expansion. @item glob-list-expansions (C-x g) The list of expansions that would have been generated by @code{glob-expand-word} is displayed, and the line is redrawn. + If a numeric argument is supplied, a @samp{*} is appended before + pathname expansion. @item display-shell-version (C-x C-v) *************** *** 1377,1387 **** argument is ignored. ! @item emacs-editing-mode (C-e) ! When in @code{vi} editing mode, this causes a switch back to ! @code{emacs} editing mode, as if the command @samp{set -o emacs} had ! been executed. @end ifset @end ftable --- 1422,1445 ---- argument is ignored. ! @item edit-and-execute-command (C-xC-e) ! Invoke an editor on the current command line, and execute the result as shell ! commands. ! Bash attempts to invoke ! @code{$FCEDIT}, @code{$EDITOR}, and @code{emacs} ! as the editor, in that order. @end ifset + @ifclear BashFeatures + @item emacs-editing-mode (C-e) + When in @code{vi} command mode, this causes a switch to @code{emacs} + editing mode. + + @item vi-editing-mode (M-C-j) + When in @code{emacs} editing mode, this causes a switch to @code{vi} + editing mode. + + @end ifclear + @end ftable *************** *** 1519,1522 **** --- 1577,1586 ---- if the compspec generates no matches. + When a compspec indicates that directory name completion is desired, + the programmable completion functions force Readline to append a slash + to completed names which are symbolic links to directories, subject to + the value of the @var{mark-directories} Readline variable, regardless + of the setting of the @var{mark-symlinked-directories} Readline variable. + @node Programmable Completion Builtins @section Programmable Completion Builtins *************** *** 1554,1558 **** @btindex complete @example ! @code{complete [-abcdefgjkvu] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}] [-P @var{prefix}] [-S @var{suffix}] [-X @var{filterpat}] [-F @var{function}] [-C @var{command}] @var{name} [@var{name} @dots{}]} --- 1618,1622 ---- @btindex complete @example ! @code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}] [-P @var{prefix}] [-S @var{suffix}] [-X @var{filterpat}] [-F @var{function}] [-C @var{command}] @var{name} [@var{name} @dots{}]} *************** *** 1587,1591 **** @item default ! Use readline's default completion if the compspec generates no matches. @item dirnames --- 1651,1656 ---- @item default ! Use Readline's default filename completion if the compspec generates ! no matches. @item dirnames *************** *** 1597,1600 **** --- 1662,1669 ---- suppressing trailing spaces). This option is intended to be used with shell functions specified with @option{-F}. + + @item nospace + Tell Readline not to append a space (the default) to words completed at + the end of the line. @end table *************** *** 1655,1658 **** --- 1724,1730 ---- @item running Names of running jobs, if job control is active. + + @item service + Service names. May also be specified as @option{-s}. @item setopt Binary files readline-4.2a/doc/rluserman.dvi and readline-4.3/doc/rluserman.dvi differ diff -Nrc2 readline-4.2a/doc/rluserman.html readline-4.3/doc/rluserman.html *** readline-4.2a/doc/rluserman.html Tue Oct 9 15:08:12 2001 --- readline-4.3/doc/rluserman.html Thu Jun 27 13:54:42 2002 *************** *** 1,5 **** !
!
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.

--- 1162,1213 ----

!
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.

*************** *** 1218,1224 ****

!
accept-line (Newline or Return) !
Accept the line regardless of where the cursor is. If this line is --- 1235,1241 ----
!
accept-line (Newline or Return) !
Accept the line regardless of where the cursor is. If this line is *************** *** 1229,1274 ****

!

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 --- 1246,1291 ----

!

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 *************** *** 1276,1282 ****

!

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 --- 1293,1299 ----

!

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 *************** *** 1284,1290 ****

!

history-search-forward () !
Search forward through the history for the string of characters between the start of the current line and the point. --- 1301,1307 ----

!

history-search-forward () !
Search forward through the history for the string of characters between the start of the current line and the point. *************** *** 1293,1299 ****

!

history-search-backward () !
Search backward through the history for the string of characters between the start of the current line and the point. This --- 1310,1316 ----

!

history-search-backward () !
Search backward through the history for the string of characters between the start of the current line and the point. This *************** *** 1301,1307 ****

!

yank-nth-arg (M-C-y) !
Insert the first argument to the previous command (usually the second word on the previous line) at point. --- 1318,1324 ----

!

yank-nth-arg (M-C-y) !
Insert the first argument to the previous command (usually the second word on the previous line) at point. *************** *** 1312,1318 ****

!

yank-last-arg (M-. or M-_) !
Insert last argument to the previous command (the last word of the previous history entry). With an --- 1329,1335 ----

!

yank-last-arg (M-. or M-_) !
Insert last argument to the previous command (the last word of the previous history entry). With an *************** *** 1344,1350 ****
!
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 --- 1361,1367 ----
!
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 *************** *** 1353,1366 ****

!

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 --- 1370,1383 ----

!

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 *************** *** 1368,1393 ****

!

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 --- 1385,1410 ----

!

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 *************** *** 1398,1404 ****

!

transpose-words (M-t) !
Drag the word before point past the word after point, moving point past that word as well. --- 1415,1421 ----

!

transpose-words (M-t) !
Drag the word before point past the word after point, moving point past that word as well. *************** *** 1407,1431 ****

!

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.

--- 1424,1467 ----

!

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.

+ +

overwrite-mode () +
+ Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + emacs mode; vi mode does overwrite differently. + Each call to readline() starts in insert mode. +

+ + In overwrite mode, characters bound to self-insert replace + the text at point rather than pushing the text to the right. + Characters bound to backward-delete-char replace the character + before point with a space. +

+ + By default, this command is unbound. +

+

*************** *** 1451,1482 ****

!
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. --- 1487,1518 ----
!
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. *************** *** 1484,1524 ****

!

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. --- 1520,1560 ----

!

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. *************** *** 1526,1532 ****

!

copy-forward-word () !
Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. --- 1562,1568 ----

!

copy-forward-word () !
Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. *************** *** 1534,1546 ****

!

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. --- 1570,1582 ----

!

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. *************** *** 1566,1579 ****
!
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 --- 1602,1615 ----
!
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 *************** *** 1610,1616 ****
!
complete (TAB) !
Attempt to perform completion on the text before point. The actual completion performed is application-specific. --- 1646,1652 ----
!
complete (TAB) !
Attempt to perform completion on the text before point. The actual completion performed is application-specific. *************** *** 1618,1637 ****

!

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. --- 1654,1673 ----

!

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. *************** *** 1648,1654 ****

!

delete-char-or-list () !
Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). --- 1684,1690 ----

!

delete-char-or-list () !
Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). *************** *** 1679,1698 ****
!
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. --- 1715,1734 ----
!
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. *************** *** 1720,1733 ****
!
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 --- 1756,1769 ----
!
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 *************** *** 1735,1748 ****

!

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 --- 1771,1784 ----

!

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 *************** *** 1750,1796 ****

!

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 --- 1786,1832 ----

!

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 *************** *** 1798,1812 ****

!

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, --- 1834,1853 ----

!

insert-comment (M-#) !
! Without a numeric argument, the value of the comment-begin ! variable is inserted at the beginning of the current line. ! If a numeric argument is supplied, this command acts as a toggle: if ! the characters at the beginning of the line do not match the value ! of comment-begin, the value is inserted, otherwise ! the characters in comment-begin are deleted from the beginning of ! the line. ! In either case, 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, *************** *** 1815,1821 ****

!

dump-variables () !
Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, --- 1856,1862 ----

!

dump-variables () !
Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, *************** *** 1824,1830 ****

!

dump-macros () !
Print all of the Readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, --- 1865,1871 ----

!

dump-macros () !
Print all of the Readline key sequences bound to macros and the strings they output. If a numeric argument is supplied, *************** *** 1833,1836 **** --- 1874,1891 ----

+ +

emacs-editing-mode (C-e) +
+ When in vi command mode, this causes a switch to emacs + editing mode. +

+ + +

vi-editing-mode (M-C-j) +
+ When in emacs editing mode, this causes a switch to vi + editing mode. +

+

*************** *** 1960,1964 ****

About this document

! This document was generated by Chet Ramey on October, 9 2001 using texi2html --- 2015,2019 ----

About this document

! This document was generated by Chet Ramey on June, 27 2002 using texi2html *************** *** 2122,2126 **** This document was generated ! by Chet Ramey on October, 9 2001 using texi2html --- 2177,2181 ---- This document was generated ! by Chet Ramey on June, 27 2002 using texi2html diff -Nrc2 readline-4.2a/doc/rluserman.info readline-4.3/doc/rluserman.info *** readline-4.2a/doc/rluserman.info Tue Oct 9 15:08:02 2001 --- readline-4.3/doc/rluserman.info Thu Jun 27 13:54:34 2002 *************** *** 1,3 **** ! This is rluserman.info, produced by makeinfo version 4.0 from /usr/homes/chet/src/bash/readline-src/doc/rluserman.texinfo. --- 1,3 ---- ! This is rluserman.info, produced by makeinfo version 4.1 from /usr/homes/chet/src/bash/readline-src/doc/rluserman.texinfo. *************** *** 11,15 **** 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 --- 11,15 ---- across discrete programs that need to provide a command line interface. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this *************** *** 467,470 **** --- 467,475 ---- modified. This variable is `off' by default. + `mark-symlinked-directories' + If set to `on', completed names which are symbolic links to + directories have a slash appended (subject to the value of + `mark-directories'). The default is `off'. + `match-hidden-files' This variable, when set to `on', causes Readline to match *************** *** 479,482 **** --- 484,492 ---- sequence. The default is `off'. + `page-completions' + If set to `on', Readline uses an internal `more'-like pager + to display a screenful of possible completions at a time. + This variable is `on' by default. + `print-completions-horizontally' If set to `on', Readline will display completions with matches *************** *** 681,692 **** # This file controls the behaviour of line input editing for ! # programs that use the Gnu Readline library. Existing programs ! # include FTP, Bash, and Gdb. # # You can re-read the inputrc file with C-x C-r. # Lines beginning with '#' are comments. # ! # First, include any systemwide bindings and variable assignments from ! # /etc/Inputrc $include /etc/Inputrc --- 691,702 ---- # This file controls the behaviour of line input editing for ! # programs that use the GNU Readline library. Existing ! # programs include FTP, Bash, and GDB. # # You can re-read the inputrc file with C-x C-r. # Lines beginning with '#' are comments. # ! # First, include any systemwide bindings and variable ! # assignments from /etc/Inputrc $include /etc/Inputrc *************** *** 740,747 **** # edit the path "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" ! # prepare to type a quoted word -- insert open and close double quotes # and move to just after the open quote "\C-x\"": "\"\"\C-b" ! # insert a backslash (testing backslash escapes in sequences and macros) "\C-x\\": "\\" # Quote the current or previous word --- 750,759 ---- # edit the path "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f" ! # prepare to type a quoted word -- ! # insert open and close double quotes # and move to just after the open quote "\C-x\"": "\"\"\C-b" ! # insert a backslash (testing backslash escapes ! # in sequences and macros) "\C-x\\": "\\" # Quote the current or previous word *************** *** 759,772 **** set input-meta on ! # allow iso-latin1 characters to be inserted rather than converted to ! # prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly rather than ! # as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for a word, ask the ! # user if he wants to see all of them set completion-query-items 150 --- 771,784 ---- set input-meta on ! # allow iso-latin1 characters to be inserted rather ! # than converted to prefix-meta sequences set convert-meta off ! # display characters with the eighth bit set directly ! # rather than as meta-prefixed characters set output-meta on ! # if there are more than 150 possible completions for ! # a word, ask the user if he wants to see all of them set completion-query-items 150 *************** *** 959,962 **** --- 971,988 ---- argument, capitalize the previous word, but do not move the cursor. + `overwrite-mode ()' + Toggle overwrite mode. With an explicit positive numeric argument, + switches to overwrite mode. With an explicit non-positive numeric + argument, switches to insert mode. This command affects only + `emacs' mode; `vi' mode does overwrite differently. Each call to + `readline()' starts in insert mode. + + In overwrite mode, characters bound to `self-insert' replace the + text at point rather than pushing the text to the right. + Characters bound to `backward-delete-char' replace the character + before point with a space. + + By default, this command is unbound. +  File: rluserman.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands *************** *** 1148,1154 **** `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 ()' --- 1174,1185 ---- `insert-comment (M-#)' ! Without a numeric argument, the value of the `comment-begin' ! variable is inserted at the beginning of the current line. If a ! numeric argument is supplied, this command acts as a toggle: if ! the characters at the beginning of the line do not match the value ! of `comment-begin', the value is inserted, otherwise the ! characters in `comment-begin' are deleted from the beginning of ! the line. In either case, the line is accepted as if a newline ! had been typed. `dump-functions ()' *************** *** 1170,1173 **** --- 1201,1212 ---- INPUTRC file. This command is unbound by default. + `emacs-editing-mode (C-e)' + When in `vi' command mode, this causes a switch to `emacs' editing + mode. + + `vi-editing-mode (M-C-j)' + When in `emacs' editing mode, this causes a switch to `vi' editing + mode. +  File: rluserman.info, Node: Readline vi Mode, Prev: Bindable Readline Commands, Up: Command Line Editing *************** *** 1206,1221 **** Node: Readline Init File12856 Node: Readline Init File Syntax13918 ! Node: Conditional Init Constructs24369 ! Node: Sample Init File26895 ! Node: Bindable Readline Commands30066 ! Node: Commands For Moving31117 ! Node: Commands For History31967 ! Node: Commands For Text34826 ! Node: Commands For Killing36918 ! Node: Numeric Arguments38870 ! Node: Commands For Completion39999 ! Node: Keyboard Macros41532 ! Node: Miscellaneous Commands42092 ! Node: Readline vi Mode44886  End Tag Table --- 1245,1260 ---- Node: Readline Init File12856 Node: Readline Init File Syntax13918 ! Node: Conditional Init Constructs24802 ! Node: Sample Init File27328 ! Node: Bindable Readline Commands30513 ! Node: Commands For Moving31564 ! Node: Commands For History32414 ! Node: Commands For Text35273 ! Node: Commands For Killing37988 ! Node: Numeric Arguments39940 ! Node: Commands For Completion41069 ! Node: Keyboard Macros42602 ! Node: Miscellaneous Commands43162 ! Node: Readline vi Mode46512  End Tag Table diff -Nrc2 readline-4.2a/doc/rluserman.ps readline-4.3/doc/rluserman.ps *** readline-4.2a/doc/rluserman.ps Tue Oct 9 15:08:13 2001 --- readline-4.3/doc/rluserman.ps Thu Jun 27 13:54:43 2002 *************** *** 2,6 **** %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: rluserman.dvi ! %%Pages: 22 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 --- 2,6 ---- %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: rluserman.dvi ! %%Pages: 24 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 *************** *** 9,13 **** %DVIPSCommandLine: dvips -D 300 -t letter -o rluserman.ps rluserman.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2001.10.09:1508 %%BeginProcSet: texc.pro %! --- 9,13 ---- %DVIPSCommandLine: dvips -D 300 -t letter -o rluserman.ps rluserman.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2002.06.27:1354 %%BeginProcSet: texc.pro %! *************** *** 770,776 **** %%Page: 1 1 1 0 bop 75 659 a Fn(GNU)33 b(Readline)h(Library)e(User)h(In)m(terface)p ! 75 709 1800 17 v 891 757 a Fm(Edition)16 b(4.2a,)e(for)g ! Fl(Readline)g(Library)h Fm(V)l(ersion)h(4.2a.)1608 811 ! y(Octob)q(er)g(2001)75 2467 y Fk(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 --- 770,776 ---- %%Page: 1 1 1 0 bop 75 659 a Fn(GNU)33 b(Readline)h(Library)e(User)h(In)m(terface)p ! 75 709 1800 17 v 936 757 a Fm(Edition)17 b(4.3,)c(for)i ! Fl(Readline)f(Library)g Fm(V)l(ersion)i(4.3.)1643 811 ! y(Marc)o(h)e(2002)75 2467 y Fk(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 *************** *** 801,805 **** (translation)g(appro)o(v)o(ed)g(b)o(y)g(the)g(F)l(ree)h(Soft)o(w)o(are) d(F)l(oundation.)75 2661 y(Cop)o(yrigh)o(t)301 2660 y(c)289 ! 2661 y Fj(\015)h Fm(1988-2001)f(F)l(ree)i(Soft)o(w)o(are)f(F)l (oundation,)h(Inc.)p eop %%Page: 1 3 --- 801,805 ---- (translation)g(appro)o(v)o(ed)g(b)o(y)g(the)g(F)l(ree)h(Soft)o(w)o(are) d(F)l(oundation.)75 2661 y(Cop)o(yrigh)o(t)301 2660 y(c)289 ! 2661 y Fj(\015)h Fm(1988-2002)f(F)l(ree)i(Soft)o(w)o(are)f(F)l (oundation,)h(Inc.)p eop %%Page: 1 3 *************** *** 1129,1133 **** b(b)q(eginning)h(with)e(a)f(`)p Fl($)p Fm(')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 --- 1129,1133 ---- b(b)q(eginning)h(with)e(a)f(`)p Fl($)p Fm(')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(9\).)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 *************** *** 1256,1464 **** (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 Fl(off)p ! Fm(')e(b)o(y)h(default.)315 1958 y Fl(match-hidden-files)555 ! 2012 y Fm(This)d(v)m(ariable,)h(when)e(set)g(to)g(`)p ! Fl(on)p Fm(',)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 Fl(.)p Fm(')h(\(hidden)h ! (\014les\))g(when)f(p)q(erforming)h(\014lename)555 2122 ! y(completion,)g(unless)f(the)f(leading)h(`)p Fl(.)p Fm(')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 ! Fl(on)p Fm(')e(b)o(y)h(default.)315 2259 y Fl(output-meta)555 ! 2314 y Fm(If)j(set)f(to)g(`)p Fl(on)p Fm(',)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 Fl(off)p Fm('.)315 2506 y Fl(print-completions-horizont)o ! (ally)555 2560 y Fm(If)d(set)g(to)f(`)p Fl(on)p Fm(',)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 ! Fl(off)p Fm('.)p eop %%Page: 7 9 7 8 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(7)315 149 y Fl(show-all-if-ambiguous)555 204 y Fm(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 Fl(on)p ! Fm(',)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 Fl(off)p Fm('.)315 ! 448 y Fl(visible-stats)555 502 y Fm(If)h(set)g(to)f(`)p Fl(on)p Fm(',)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 ! Fl(off)p Fm('.)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 Fc(macro)r Fm(\).)315 1288 y Fc(k)o(eyname)s ! Fm(:)19 b Fc(function-name)g Fm(or)c Fc(macro)555 1342 y(k)o(eyname)i Fm(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 ! Fl(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 Fm(In)c(the)f(ab)q(o)o(v)o(e)g(example,)i Fg(C-u)e Fm(is)h(b)q(ound)g(to)f(the)g(function)h Fl(universal-)555 ! 1632 y(argument)p Fm(,)e Fg(M-DEL)h Fm(is)g(b)q(ound)h(to)e(the)h ! (function)h Fl(backward-kill-word)p Fm(,)555 1687 y(and)g Fg(C-o)f Fm(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 Fl(>)f(output)p Fm(')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 Fc(DEL)p Fm(,)11 b Fc(ESC)p Fm(,)h Fc(ESCAPE)p Fm(,)f Fc(LFD)p ! Fm(,)g Fc(NEW-)555 1918 y(LINE)p Fm(,)16 b Fc(RET)p Fm(,)e Fc(RETURN)p Fm(,)f Fc(R)o(UBOUT)p Fm(,)i Fc(SP)l(A)o(CE)p ! Fm(,)g Fc(SPC)p Fm(,)f(and)i Fc(T)l(AB)p Fm(.)315 1997 y Fl(")p Fc(k)o(eyseq)q Fl(")p Fm(:)k Fc(function-name)e ! Fm(or)d Fc(macro)555 2052 y(k)o(eyseq)i Fm(di\013ers)e(from)g Fc(k)o(eyname)j Fm(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 Fh(gnu)g Fm(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 Fl("\\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 Fm(In)33 ! b(the)f(ab)q(o)o(v)o(e)g(example,)37 b Fg(C-u)32 b Fm(is)h(again)f(b)q ! (ound)h(to)f(the)g(function)555 2560 y Fl(universal-argument)19 ! b Fm(\(just)j(as)f(it)h(w)o(as)f(in)i(the)f(\014rst)f(example\),)j(`)p ! Fg(C-x)555 2615 y(C-r)p Fm(')c(is)h(b)q(ound)g(to)f(the)h(function)g ! Fl(re-read-init-file)p Fm(,)f(and)g(`)1731 2613 y Ff(h)p ! 1743 2587 70 2 v 1743 2615 a Fe(ESC)p 1743 2623 V 1810 ! 2613 a Ff(i)15 b(h)p 1852 2587 10 2 v 1852 2615 a Fe([)p ! 1852 2623 V 1860 2613 a Ff(i)555 2668 y(h)p 567 2642 ! 18 2 v 567 2670 a Fe(1)p 567 2678 V 583 2668 a Ff(i)g(h)p ! 625 2642 V 625 2670 a Fe(1)p 625 2678 V 640 2668 a Ff(i)g(h)p ! 683 2642 24 2 v 683 2670 a Fl(~)p 683 2678 V 704 2668 ! a Ff(i)719 2670 y Fm(')g(is)h(b)q(ound)g(to)e(insert)i(the)f(text)g(`)p ! Fl(Function)f(Key)g(1)p Fm('.)p eop %%Page: 8 10 ! 8 9 bop 75 -58 a Fm(8)1322 b(GNU)15 b(Readline)h(Library)315 ! 149 y(The)f(follo)o(wing)h Fh(gnu)e Fm(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 Fg(\\C-)168 b Fm(con)o(trol)15 ! b(pre\014x)315 370 y Fg(\\M-)168 b Fm(meta)15 b(pre\014x)315 ! 453 y Fg(\\e)192 b Fm(an)15 b(escap)q(e)h(c)o(haracter)315 ! 536 y Fg(\\\\)192 b Fm(bac)o(kslash)315 619 y Fg(\\)p ! Fl(")555 617 y Ff(h)p 567 591 24 2 v 567 619 a Fl(")p ! 567 627 V 589 617 a Ff(i)604 619 y Fm(,)15 b(a)f(double)j(quotation)e ! (mark)315 702 y Fg(\\')555 700 y Ff(h)p 567 674 10 2 ! v 567 702 a Fe(')p 567 710 V 575 700 a Ff(i)590 702 y ! Fm(,)g(a)f(single)j(quote)e(or)g(ap)q(ostrophe)315 785 ! y(In)f(addition)h(to)f(the)f Fh(gnu)h Fm(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 Fl(\\a)192 ! b Fm(alert)15 b(\(b)q(ell\))315 1006 y Fl(\\b)192 b Fm(bac)o(kspace)315 ! 1089 y Fl(\\d)g Fm(delete)315 1172 y Fl(\\f)g Fm(form)14 ! b(feed)315 1255 y Fl(\\n)192 b Fm(newline)315 1338 y ! Fl(\\r)g Fm(carriage)15 b(return)315 1421 y Fl(\\t)192 ! b Fm(horizon)o(tal)16 b(tab)315 1504 y Fl(\\v)192 b Fm(v)o(ertical)16 ! b(tab)315 1587 y Fl(\\)p Fc(nnn)141 b Fm(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 ! Fc(nnn)f Fm(\(one)f(to)555 1642 y(three)e(digits\))315 ! 1725 y Fl(\\x)p Fc(HH)124 b Fm(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 ! Fc(HH)555 1780 y Fm(\(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 Fl(")p Fm(')c(and)h(`)p ! Fl(')p Fm('.)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 Fg(C-x)i Fl(\\)p Fm(')f(insert)g(a)g ! (single)h(`)p Fl(\\)p Fm(')e(in)o(to)h(the)g(line:)435 ! 2148 y Fl("\\C-x\\\\":)23 b("\\\\")75 2267 y Fb(1.3.2)30 ! b(Conditional)20 b(Init)g(Constructs)137 2366 y Fm(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 Fl($if)168 b Fm(The)16 b Fl($if)f Fm(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 Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(9)315 149 y Fl(mode)144 b Fm(The)11 b Fl(mode=)e Fm(form)h(of)g(the)h ! Fl($if)f Fm(directiv)o(e)h(is)g(used)g(to)f(test)g(whether)h(Readline) ! 555 204 y(is)k(in)h Fl(emacs)e Fm(or)g Fl(vi)g Fm(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 Fl(set)f(keymap)p Fm(')f(command,)g(for)h(instance,)g(to)f ! (set)h(bindings)h(in)g(the)f Fl(emacs-)555 314 y(standard)d Fm(and)i Fl(emacs-ctlx)e Fm(k)o(eymaps)h(only)i(if)f(Readline)g(is)g ! (starting)f(out)555 369 y(in)k Fl(emacs)f Fm(mo)q(de.)315 ! 448 y Fl(term)144 b Fm(The)14 b Fl(term=)e Fm(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 Fl(=)p Fm(')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 Fl(-)p Fm('.)24 b(This)17 b(allo)o(ws)g Fl(sun)f Fm(to)g(matc)o(h)h(b)q(oth)f Fl(sun)h Fm(and)555 ! 722 y Fl(sun-cmd)p Fm(,)d(for)g(instance.)315 802 y Fl(application)555 ! 857 y Fm(The)d Fc(application)i Fm(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 Fc(application)555 966 y(name)p Fm(,)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 Fl($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 Fm(This)16 b(command,)e(as)h(seen)h(in)g(the)f ! (previous)h(example,)g(terminates)f(an)g Fl($if)f Fm(command.)75 ! 1510 y Fl($else)120 b Fm(Commands)15 b(in)h(this)f(branc)o(h)h(of)e ! (the)i Fl($if)e Fm(directiv)o(e)j(are)e(executed)h(if)g(the)f(test)g ! (fails.)75 1590 y Fl($include)48 b Fm(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 Fl(/etc/inputrc)p Fm(':)435 1764 ! y Fl($include)k(/etc/inputrc)75 1876 y Fb(1.3.3)30 b(Sample)20 ! b(Init)h(File)137 1972 y Fm(Here)16 b(is)g(an)f(example)h(of)f(an)g Fc(inputrc)k Fm(\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 10 11 bop 75 -58 a Fm(10)1299 b(GNU)15 b(Readline)h(Library)195 201 y Fl(#)24 b(This)f(file)g(controls)g(the)h(behaviour)e(of)i(line)f ! (input)g(editing)g(for)195 253 y(#)h(programs)e(that)i(use)f(the)h(Gnu) ! f(Readline)g(library.)47 b(Existing)22 b(programs)195 ! 305 y(#)i(include)f(FTP,)g(Bash,)g(and)h(Gdb.)195 357 ! y(#)195 409 y(#)g(You)f(can)h(re-read)f(the)g(inputrc)g(file)g(with)h ! (C-x)f(C-r.)195 461 y(#)h(Lines)f(beginning)g(with)g('#')g(are)h ! (comments.)195 513 y(#)195 565 y(#)g(First,)f(include)g(any)g ! (systemwide)g(bindings)f(and)i(variable)f(assignments)f(from)195 ! 616 y(#)i(/etc/Inputrc)195 668 y($include)f(/etc/Inputrc)195 ! 772 y(#)195 824 y(#)h(Set)f(various)g(bindings)g(for)g(emacs)g(mode.) ! 195 928 y(set)g(editing-mode)g(emacs)195 1032 y($if)g(mode=emacs)195 1135 y(Meta-Control-h:)46 b(backward-kill-word)21 b(Text)i(after)h(the) f(function)g(name)g(is)h(ignored)p 1986 1145 21 38 v --- 1256,1477 ---- (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 Fl(off)p ! Fm(')e(b)o(y)h(default.)315 1958 y Fl(mark-symlinked-directories)555 ! 2012 y Fm(If)23 b(set)f(to)f(`)p Fl(on)p Fm(',)i(completed)g(names)g ! (whic)o(h)g(are)f(sym)o(b)q(olic)i(links)f(to)f(di-)555 ! 2067 y(rectories)h(ha)o(v)o(e)g(a)g(slash)g(app)q(ended)i(\(sub)s(ject) ! e(to)f(the)i(v)m(alue)g(of)f Fl(mark-)555 2122 y(directories)p ! Fm(\).)18 b(The)d(default)h(is)g(`)p Fl(off)p Fm('.)315 ! 2204 y Fl(match-hidden-files)555 2259 y Fm(This)c(v)m(ariable,)h(when)e ! (set)g(to)g(`)p Fl(on)p Fm(',)f(causes)h(Readline)i(to)d(matc)o(h)h ! (\014les)h(whose)555 2314 y(names)22 b(b)q(egin)h(with)g(a)e(`)p ! Fl(.)p Fm(')h(\(hidden)h(\014les\))g(when)f(p)q(erforming)h(\014lename) ! 555 2369 y(completion,)g(unless)f(the)f(leading)h(`)p ! Fl(.)p Fm(')e(is)h(supplied)i(b)o(y)e(the)f(user)h(in)h(the)555 ! 2423 y(\014lename)16 b(to)f(b)q(e)h(completed.)21 b(This)15 ! b(v)m(ariable)i(is)f(`)p Fl(on)p Fm(')e(b)o(y)h(default.)315 ! 2506 y Fl(output-meta)555 2560 y Fm(If)j(set)f(to)g(`)p ! Fl(on)p Fm(',)g(Readline)i(will)h(displa)o(y)f(c)o(haracters)d(with)j ! (the)e(eigh)o(th)h(bit)555 2615 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 ! 2670 y(default)16 b(is)f(`)p Fl(off)p Fm('.)p eop %%Page: 7 9 7 8 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(7)315 149 y Fl(page-completions)555 204 y Fm(If)17 ! b(set)g(to)f(`)p Fl(on)p Fm(',)g(Readline)i(uses)g(an)e(in)o(ternal)i ! Fl(more)p Fm(-lik)o(e)g(pager)f(to)f(displa)o(y)555 259 ! y(a)g(screenful)h(of)f(p)q(ossible)i(completions)f(at)f(a)g(time.)23 ! b(This)17 b(v)m(ariable)g(is)g(`)p Fl(on)p Fm(')555 314 ! y(b)o(y)e(default.)315 395 y Fl(print-completions-horizont)o(ally)555 ! 450 y Fm(If)d(set)g(to)f(`)p Fl(on)p Fm(',)h(Readline)h(will)g(displa)o ! (y)h(completions)f(with)f(matc)o(hes)f(sorted)555 505 ! 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 560 y(The)15 b(default)h(is)g(`)p ! Fl(off)p Fm('.)315 641 y Fl(show-all-if-ambiguous)555 ! 696 y Fm(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 751 y(to)e(`)p ! Fl(on)p Fm(',)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 806 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 861 y(The)c(default)h(v)m(alue)h(is)e(`)p Fl(off)p ! Fm('.)315 942 y Fl(visible-stats)555 997 y Fm(If)h(set)g(to)f(`)p Fl(on)p Fm(',)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 1052 y(\014lename)h(when)g ! (listing)h(p)q(ossible)g(completions.)j(The)c(default)g(is)f(`)p ! Fl(off)p Fm('.)75 1133 y(Key)h(Bindings)315 1188 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 ! 1243 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 ! 1298 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 ! 1353 y(and)d(a)g(short)g(description)i(of)d(what)h(the)g(command)g(do)q ! (es.)315 1421 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 ! 1476 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 ! 1530 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 ! 1585 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 1653 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 1708 y(that)c(is)i(inserted)g(when)g(the)f(k)o(ey)g(is)h ! (pressed)g(\(a)e Fc(macro)r Fm(\).)315 1790 y Fc(k)o(eyname)s ! Fm(:)19 b Fc(function-name)g Fm(or)c Fc(macro)555 1845 y(k)o(eyname)i Fm(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 1910 y ! Fl(Control-u:)22 b(universal-argument)675 1962 y(Meta-Rubout:)g ! (backward-kill-word)675 2014 y(Control-o:)g(">)i(output")555 ! 2082 y Fm(In)c(the)f(ab)q(o)o(v)o(e)g(example,)i Fg(C-u)e Fm(is)h(b)q(ound)g(to)f(the)g(function)h Fl(universal-)555 ! 2137 y(argument)p Fm(,)e Fg(M-DEL)h Fm(is)g(b)q(ound)h(to)e(the)h ! (function)h Fl(backward-kill-word)p Fm(,)555 2191 y(and)g Fg(C-o)f Fm(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 2246 y(side)c(\(that)e(is,)i(to)e(insert)i (the)f(text)g(`)p Fl(>)f(output)p Fm(')g(in)o(to)i(the)f(line\).)555 ! 2314 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 2369 y(cessing)13 b(this)f(k)o(ey)g(binding)h(syn)o(tax:)18 b Fc(DEL)p Fm(,)11 b Fc(ESC)p Fm(,)h Fc(ESCAPE)p Fm(,)f Fc(LFD)p ! Fm(,)g Fc(NEW-)555 2424 y(LINE)p Fm(,)16 b Fc(RET)p Fm(,)e Fc(RETURN)p Fm(,)f Fc(R)o(UBOUT)p Fm(,)i Fc(SP)l(A)o(CE)p ! Fm(,)g Fc(SPC)p Fm(,)f(and)i Fc(T)l(AB)p Fm(.)315 2506 y Fl(")p Fc(k)o(eyseq)q Fl(")p Fm(:)k Fc(function-name)e ! Fm(or)d Fc(macro)555 2560 y(k)o(eyseq)i Fm(di\013ers)e(from)g Fc(k)o(eyname)j Fm(ab)q(o)o(v)o(e)d(in)i(that)d(strings)i(denoting)g ! (an)f(en-)555 2615 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 ! 2670 y(double)e(quotes.)j(Some)c Fh(gnu)g Fm(Emacs)f(st)o(yle)h(k)o(ey) ! g(escap)q(es)g(can)g(b)q(e)g(used,)g(as)p eop %%Page: 8 10 ! 8 9 bop 75 -58 a Fm(8)1322 b(GNU)15 b(Readline)h(Library)555 ! 149 y(in)i(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 204 y(recognized.)675 ! 270 y Fl("\\C-u":)23 b(universal-argument)675 322 y("\\C-x\\C-r":)f ! (re-read-init-file)675 373 y("\\e[11~":)h("Function)f(Key)i(1")555 ! 442 y Fm(In)33 b(the)f(ab)q(o)o(v)o(e)g(example,)37 b ! Fg(C-u)32 b Fm(is)h(again)f(b)q(ound)h(to)f(the)g(function)555 ! 497 y Fl(universal-argument)19 b Fm(\(just)j(as)f(it)h(w)o(as)f(in)i ! (the)f(\014rst)f(example\),)j(`)p Fg(C-x)555 551 y(C-r)p ! Fm(')c(is)h(b)q(ound)g(to)f(the)h(function)g Fl(re-read-init-file)p ! Fm(,)f(and)g(`)1731 549 y Ff(h)p 1743 523 70 2 v 1743 ! 551 a Fe(ESC)p 1743 559 V 1810 549 a Ff(i)15 b(h)p 1852 ! 523 10 2 v 1852 551 a Fe([)p 1852 560 V 1860 549 a Ff(i)555 ! 604 y(h)p 567 578 18 2 v 567 606 a Fe(1)p 567 614 V 583 ! 604 a Ff(i)g(h)p 625 578 V 625 606 a Fe(1)p 625 614 V ! 640 604 a Ff(i)g(h)p 683 578 24 2 v 683 606 a Fl(~)p ! 683 614 V 704 604 a Ff(i)719 606 y Fm(')g(is)h(b)q(ound)g(to)e(insert)i ! (the)f(text)g(`)p Fl(Function)f(Key)g(1)p Fm('.)315 688 ! y(The)h(follo)o(wing)h Fh(gnu)e Fm(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 ! 743 y(k)o(ey)g(sequences:)315 825 y Fg(\\C-)168 b Fm(con)o(trol)15 ! b(pre\014x)315 907 y Fg(\\M-)168 b Fm(meta)15 b(pre\014x)315 ! 989 y Fg(\\e)192 b Fm(an)15 b(escap)q(e)h(c)o(haracter)315 ! 1071 y Fg(\\\\)192 b Fm(bac)o(kslash)315 1152 y Fg(\\)p ! Fl(")555 1150 y Ff(h)p 567 1124 V 567 1152 a Fl(")p 567 ! 1160 V 589 1150 a Ff(i)604 1152 y Fm(,)15 b(a)f(double)j(quotation)e ! (mark)315 1234 y Fg(\\')555 1232 y Ff(h)p 567 1206 10 ! 2 v 567 1234 a Fe(')p 567 1242 V 575 1232 a Ff(i)590 ! 1234 y Fm(,)g(a)f(single)j(quote)e(or)g(ap)q(ostrophe)315 ! 1316 y(In)f(addition)h(to)f(the)f Fh(gnu)h Fm(Emacs)g(st)o(yle)f(escap) ! q(e)i(sequences,)g(a)e(second)i(set)e(of)h(bac)o(kslash)315 ! 1371 y(escap)q(es)i(is)g(a)o(v)m(ailable:)315 1453 y ! Fl(\\a)192 b Fm(alert)15 b(\(b)q(ell\))315 1535 y Fl(\\b)192 ! b Fm(bac)o(kspace)315 1617 y Fl(\\d)g Fm(delete)315 1699 ! y Fl(\\f)g Fm(form)14 b(feed)315 1781 y Fl(\\n)192 b ! Fm(newline)315 1862 y Fl(\\r)g Fm(carriage)15 b(return)315 ! 1944 y Fl(\\t)192 b Fm(horizon)o(tal)16 b(tab)315 2026 ! y Fl(\\v)192 b Fm(v)o(ertical)16 b(tab)315 2108 y Fl(\\)p ! Fc(nnn)141 b Fm(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 Fc(nnn)f Fm(\(one)f(to)555 ! 2163 y(three)e(digits\))315 2245 y Fl(\\x)p Fc(HH)124 ! b Fm(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 Fc(HH)555 2300 y Fm(\(one)15 ! b(or)g(t)o(w)o(o)f(hex)h(digits\))315 2382 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 2436 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 2491 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 2546 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 ! Fl(")p Fm(')c(and)h(`)p Fl(')p Fm('.)34 b(F)l(or)315 ! 2601 y(example,)14 b(the)f(follo)o(wing)g(binding)i(will)g(mak)o(e)d(`) ! p Fg(C-x)i Fl(\\)p Fm(')f(insert)g(a)g(single)h(`)p Fl(\\)p ! Fm(')e(in)o(to)h(the)g(line:)435 2666 y Fl("\\C-x\\\\":)23 ! b("\\\\")p eop %%Page: 9 11 9 10 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(9)75 149 y Fb(1.3.2)30 b(Conditional)20 b(Init)g(Constructs)137 ! 246 y Fm(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 ! 301 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 355 y(the)e(result)h(of)f(tests.)k(There)c(are)g(four)g(parser)g ! (directiv)o(es)h(used.)75 435 y Fl($if)168 b Fm(The)16 ! b Fl($if)f Fm(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 490 ! 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 545 ! 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 624 y Fl(mode)144 ! b Fm(The)11 b Fl(mode=)e Fm(form)h(of)g(the)h Fl($if)f ! Fm(directiv)o(e)h(is)g(used)g(to)f(test)g(whether)h(Readline)555 ! 679 y(is)k(in)h Fl(emacs)e Fm(or)g Fl(vi)g Fm(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 ! 734 y(`)p Fl(set)f(keymap)p Fm(')f(command,)g(for)h(instance,)g(to)f ! (set)h(bindings)h(in)g(the)f Fl(emacs-)555 789 y(standard)d Fm(and)i Fl(emacs-ctlx)e Fm(k)o(eymaps)h(only)i(if)f(Readline)g(is)g ! (starting)f(out)555 844 y(in)k Fl(emacs)f Fm(mo)q(de.)315 ! 923 y Fl(term)144 b Fm(The)14 b Fl(term=)e Fm(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 ! 978 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 1033 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 Fl(=)p Fm(')f(is)h(tested)g(against)555 1088 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 1142 y(name)i(b)q(efore)g(the)g (\014rst)f(`)p Fl(-)p Fm('.)24 b(This)17 b(allo)o(ws)g Fl(sun)f Fm(to)g(matc)o(h)h(b)q(oth)f Fl(sun)h Fm(and)555 ! 1197 y Fl(sun-cmd)p Fm(,)d(for)g(instance.)315 1277 y ! Fl(application)555 1332 y Fm(The)d Fc(application)i Fm(construct)e(is)g ! (used)h(to)e(include)j(application-sp)q(eci)q(\014c)h(set-)555 ! 1386 y(tings.)19 b(Eac)o(h)12 b(program)f(using)j(the)e(Readline)i ! (library)f(sets)f(the)g Fc(application)555 1441 y(name)p ! Fm(,)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 1496 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 1551 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 1606 y(the)f(curren)o(t)g(or)g(previous)h(w)o(ord)e(in)j ! (Bash:)675 1670 y Fl($if)23 b(Bash)675 1722 y(#)h(Quote)f(the)g ! (current)g(or)h(previous)f(word)675 1774 y("\\C-xq":)g ! ("\\eb\\"\\ef\\"")675 1826 y($endif)75 1905 y($endif)96 ! b Fm(This)16 b(command,)e(as)h(seen)h(in)g(the)f(previous)h(example,)g ! (terminates)f(an)g Fl($if)f Fm(command.)75 1985 y Fl($else)120 ! b Fm(Commands)15 b(in)h(this)f(branc)o(h)h(of)e(the)i ! Fl($if)e Fm(directiv)o(e)j(are)e(executed)h(if)g(the)f(test)g(fails.)75 ! 2065 y Fl($include)48 b Fm(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 2120 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 2174 y(`)p Fl(/etc/inputrc)p Fm(':)435 2239 ! y Fl($include)k(/etc/inputrc)75 2351 y Fb(1.3.3)30 b(Sample)20 ! b(Init)h(File)137 2447 y Fm(Here)16 b(is)g(an)f(example)h(of)f(an)g Fc(inputrc)k Fm(\014le.)i(This)16 b(illustrates)g(k)o(ey)f(binding,)i ! (v)m(ariable)f(assignmen)o(t,)75 2502 y(and)f(conditional)i(syn)o(tax.) p eop %%Page: 10 12 10 11 bop 75 -58 a Fm(10)1299 b(GNU)15 b(Readline)h(Library)195 201 y Fl(#)24 b(This)f(file)g(controls)g(the)h(behaviour)e(of)i(line)f ! (input)g(editing)g(for)195 253 y(#)h(programs)e(that)i(use)f(the)h(GNU) ! f(Readline)g(library.)47 b(Existing)195 305 y(#)24 b(programs)e ! (include)h(FTP,)h(Bash,)f(and)g(GDB.)195 357 y(#)195 ! 409 y(#)h(You)f(can)h(re-read)f(the)g(inputrc)g(file)g(with)h(C-x)f ! (C-r.)195 461 y(#)h(Lines)f(beginning)g(with)g('#')g(are)h(comments.) ! 195 513 y(#)195 565 y(#)g(First,)f(include)g(any)g(systemwide)g ! (bindings)f(and)i(variable)195 616 y(#)g(assignments)e(from)h ! (/etc/Inputrc)195 668 y($include)g(/etc/Inputrc)195 772 ! y(#)195 824 y(#)h(Set)f(various)g(bindings)g(for)g(emacs)g(mode.)195 ! 928 y(set)g(editing-mode)g(emacs)195 1032 y($if)g(mode=emacs)195 1135 y(Meta-Control-h:)46 b(backward-kill-word)21 b(Text)i(after)h(the) f(function)g(name)g(is)h(ignored)p 1986 1145 21 38 v *************** *** 1488,1891 **** y($if)f(Bash)195 668 y(#)h(edit)f(the)g(path)195 720 y("\\C-xp":)g("PATH=${PATH}\\e\\C-e\\C-a\\)o(ef\\C-f")195 ! 772 y(#)h(prepare)f(to)g(type)h(a)f(quoted)g(word)h(--)f(insert)g(open) ! h(and)f(close)g(double)g(quotes)195 824 y(#)h(and)f(move)g(to)h(just)f ! (after)h(the)f(open)g(quote)195 876 y("\\C-x\\"":)g("\\"\\"\\C-b")195 ! 928 y(#)h(insert)f(a)g(backslash)g(\(testing)g(backslash)g(escapes)f ! (in)i(sequences)f(and)g(macros\))195 980 y("\\C-x\\\\":)g("\\\\")195 ! 1032 y(#)h(Quote)f(the)g(current)g(or)h(previous)f(word)195 ! 1083 y("\\C-xq":)g("\\eb\\"\\ef\\"")195 1135 y(#)h(Add)f(a)h(binding)f ! (to)g(refresh)g(the)h(line,)f(which)g(is)h(unbound)195 ! 1187 y("\\C-xr":)f(redraw-current-line)195 1239 y(#)h(Edit)f(variable)g ! (on)g(current)g(line.)195 1291 y("\\M-\\C-v":)f ! ("\\C-a\\C-k$\\C-y\\M-\\C-e\\C-a\\C-y=)o(")195 1343 y($endif)195 ! 1447 y(#)i(use)f(a)h(visible)f(bell)g(if)h(one)f(is)h(available)195 ! 1499 y(set)f(bell-style)g(visible)195 1602 y(#)h(don't)f(strip)g ! (characters)g(to)g(7)h(bits)f(when)h(reading)195 1654 ! y(set)f(input-meta)g(on)195 1758 y(#)h(allow)f(iso-latin1)f(characters) ! h(to)g(be)h(inserted)f(rather)g(than)g(converted)g(to)195 ! 1810 y(#)h(prefix-meta)e(sequences)195 1862 y(set)h(convert-meta)g(off) ! 195 1966 y(#)h(display)f(characters)f(with)h(the)h(eighth)f(bit)g(set)h ! (directly)f(rather)g(than)195 2017 y(#)h(as)f(meta-prefixed)f ! (characters)195 2069 y(set)h(output-meta)g(on)195 2173 ! y(#)h(if)f(there)g(are)h(more)f(than)h(150)f(possible)g(completions)f ! (for)i(a)f(word,)h(ask)f(the)195 2225 y(#)h(user)f(if)h(he)f(wants)g ! (to)h(see)f(all)h(of)f(them)195 2277 y(set)g(completion-query-items)e ! (150)195 2381 y(#)j(For)f(FTP)195 2433 y($if)g(Ftp)195 ! 2484 y("\\C-xg":)g("get)g(\\M-?")195 2536 y("\\C-xt":)g("put)g(\\M-?") ! 195 2588 y("\\M-.":)g(yank-last-arg)195 2640 y($endif)p ! eop %%Page: 12 14 ! 12 13 bop 75 -58 a Fm(12)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fk(1.4)33 b(Bindable)24 b(Readline)f(Commands)137 ! 247 y Fm(This)17 b(section)f(describ)q(es)h(Readline)g(commands)f(that) e(ma)o(y)h(b)q(e)i(b)q(ound)f(to)f(k)o(ey)h(sequences.)22 ! b(Com-)75 301 y(mand)15 b(names)g(without)h(an)f(accompan)o(ying)g(k)o (ey)g(sequence)i(are)e(un)o(b)q(ound)h(b)o(y)f(default.)137 ! 369 y(In)f(the)f(follo)o(wing)h(descriptions,)h Fc(p)q(oin)o(t)f Fm(refers)f(to)g(the)g(curren)o(t)g(cursor)f(p)q(osition,)j(and)e ! Fc(mark)i Fm(refers)75 424 y(to)k(a)g(cursor)g(p)q(osition)h(sa)o(v)o (ed)f(b)o(y)h(the)f Fl(set-mark)g Fm(command.)32 b(The)20 b(text)f(b)q(et)o(w)o(een)g(the)h(p)q(oin)o(t)g(and)75 ! 479 y(mark)15 b(is)g(referred)h(to)e(as)h(the)g Fc(region)p ! Fm(.)75 593 y Fb(1.4.1)30 b(Commands)21 b(F)-5 b(or)19 ! b(Mo)n(ving)75 716 y Fl(beginning-of-line)13 b(\(C-a\))315 ! 771 y Fm(Mo)o(v)o(e)h(to)h(the)g(start)f(of)h(the)g(curren)o(t)g(line.) ! 75 864 y Fl(end-of-line)f(\(C-e\))315 919 y Fm(Mo)o(v)o(e)g(to)h(the)g ! (end)h(of)f(the)g(line.)75 1012 y Fl(forward-char)f(\(C-f\))315 ! 1067 y Fm(Mo)o(v)o(e)g(forw)o(ard)g(a)h(c)o(haracter.)75 ! 1160 y Fl(backward-char)e(\(C-b\))315 1215 y Fm(Mo)o(v)o(e)h(bac)o(k)h ! (a)g(c)o(haracter.)75 1309 y Fl(forward-word)f(\(M-f\))315 ! 1363 y Fm(Mo)o(v)o(e)g(forw)o(ard)g(to)g(the)i(end)g(of)e(the)h(next)h (w)o(ord.)j(W)l(ords)c(are)f(comp)q(osed)i(of)f(letters)g(and)315 ! 1418 y(digits.)75 1512 y Fl(backward-word)e(\(M-b\))315 ! 1566 y Fm(Mo)o(v)o(e)j(bac)o(k)g(to)h(the)f(start)g(of)g(the)h(curren)o (t)g(or)f(previous)i(w)o(ord.)24 b(W)l(ords)16 b(are)h(comp)q(osed)315 ! 1621 y(of)e(letters)g(and)g(digits.)75 1715 y Fl(clear-screen)f ! (\(C-l\))315 1769 y Fm(Clear)f(the)h(screen)g(and)f(redra)o(w)g(the)g (curren)o(t)g(line,)i(lea)o(ving)g(the)e(curren)o(t)g(line)i(at)e(the)g ! (top)315 1824 y(of)i(the)g(screen.)75 1918 y Fl(redraw-current-line)e ! (\(\))315 1972 y Fm(Refresh)i(the)g(curren)o(t)g(line.)22 ! b(By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 2086 y Fb(1.4.2)30 b(Commands)21 b(F)-5 b(or)19 b(Manipulating)i(The)f ! (History)75 2209 y Fl(accept-line)14 b(\(Newline)g(or)h(Return\))315 ! 2264 y Fm(Accept)j(the)g(line)h(regardless)f(of)f(where)h(the)g(cursor) f(is.)27 b(If)18 b(this)g(line)h(is)g(non-empt)o(y)l(,)f(it)315 ! 2319 y(ma)o(y)d(b)q(e)i(added)f(to)g(the)g(history)g(list)g(for)g (future)g(recall)h(with)f Fl(add_history\(\))p Fm(.)k(If)d(this)315 ! 2374 y(line)g(is)f(a)e(mo)q(di\014ed)j(history)e(line,)i(the)e(history) g(line)i(is)f(restored)e(to)h(its)g(original)i(state.)75 ! 2467 y Fl(previous-history)c(\(C-p\))315 2522 y Fm(Mo)o(v)o(e)h(`bac)o (k')h(through)f(the)i(history)f(list,)g(fetc)o(hing)h(the)f(previous)h ! (command.)75 2615 y Fl(next-history)e(\(C-n\))315 2670 ! y Fm(Mo)o(v)o(e)g(`forw)o(ard')f(through)i(the)h(history)f(list,)g ! (fetc)o(hing)h(the)f(next)h(command.)p eop %%Page: 13 15 13 14 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(13)75 149 y Fl(beginning-of-history)12 b(\(M-<\))315 ! 204 y Fm(Mo)o(v)o(e)i(to)h(the)g(\014rst)g(line)i(in)f(the)f(history)l ! (.)75 307 y Fl(end-of-history)e(\(M->\))315 362 y Fm(Mo)o(v)o(e)h(to)h ! (the)g(end)h(of)f(the)g(input)h(history)l(,)f(i.e.,)g(the)g(line)i ! (curren)o(tly)f(b)q(eing)g(en)o(tered.)75 466 y Fl ! (reverse-search-history)c(\(C-r\))315 520 y Fm(Searc)o(h)k(bac)o(kw)o ! (ard)e(starting)h(at)g(the)h(curren)o(t)f(line)j(and)d(mo)o(ving)h ! (`up')f(through)g(the)h(his-)315 575 y(tory)e(as)h(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 678 ! y Fl(forward-search-history)c(\(C-s\))315 733 y Fm(Searc)o(h)j(forw)o (ard)e(starting)h(at)h(the)f(curren)o(t)h(line)h(and)f(mo)o(ving)g(`do) ! o(wn')f(through)g(the)h(the)315 788 y(history)g(as)g(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 891 y Fl(non-incremental-reverse-se)o(arch-hi)o(story)c(\(M-p\))315 ! 946 y Fm(Searc)o(h)k(bac)o(kw)o(ard)e(starting)h(at)g(the)h(curren)o(t) ! f(line)j(and)d(mo)o(ving)h(`up')f(through)g(the)h(his-)315 ! 1001 y(tory)h(as)h(necessary)g(using)h(a)e(non-incremen)o(tal)j(searc)o ! (h)e(for)f(a)h(string)g(supplied)i(b)o(y)e(the)315 1056 ! y(user.)75 1159 y Fl(non-incremental-forward-se)o(arch-hi)o(story)12 ! b(\(M-n\))315 1214 y Fm(Searc)o(h)j(forw)o(ard)e(starting)h(at)h(the)f (curren)o(t)h(line)h(and)f(mo)o(ving)g(`do)o(wn')f(through)g(the)h(the) ! 315 1268 y(history)e(as)g(necessary)h(using)g(a)f(non-incremen)o(tal)i (searc)o(h)e(for)g(a)g(string)g(supplied)j(b)o(y)d(the)315 ! 1323 y(user.)75 1427 y Fl(history-search-forward)f(\(\))315 ! 1481 y Fm(Searc)o(h)21 b(forw)o(ard)e(through)i(the)f(history)h(for)f (the)h(string)g(of)f(c)o(haracters)g(b)q(et)o(w)o(een)h(the)315 ! 1536 y(start)16 b(of)h(the)h(curren)o(t)g(line)h(and)e(the)h(p)q(oin)o (t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 ! b(By)315 1591 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 1694 y Fl(history-search-backward)c(\(\))315 1749 y Fm(Searc)o(h)18 b(bac)o(kw)o(ard)e(through)h(the)h(history)f(for)g(the)g(string)h(of)f ! (c)o(haracters)f(b)q(et)o(w)o(een)i(the)315 1804 y(start)e(of)h(the)h (curren)o(t)g(line)h(and)e(the)h(p)q(oin)o(t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 b(By)315 ! 1859 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 1962 y Fl(yank-nth-arg)e(\(M-C-y\))315 2017 y Fm(Insert)f(the)g (\014rst)g(argumen)o(t)f(to)g(the)i(previous)f(command)g(\(usually)h ! (the)f(second)h(w)o(ord)e(on)315 2071 y(the)j(previous)h(line\))g(at)e (p)q(oin)o(t.)21 b(With)15 b(an)g(argumen)o(t)f Fc(n)p Fm(,)h(insert)g(the)g Fc(n)p Fm(th)g(w)o(ord)g(from)f(the)315 ! 2126 y(previous)g(command)g(\(the)f(w)o(ords)f(in)j(the)e(previous)i (command)e(b)q(egin)i(with)e(w)o(ord)g(0\).)19 b(A)315 ! 2181 y(negativ)o(e)13 b(argumen)o(t)f(inserts)h(the)g Fc(n)p Fm(th)g(w)o(ord)f(from)g(the)h(end)h(of)e(the)h(previous)g ! (command.)75 2284 y Fl(yank-last-arg)g(\(M-.)i(or)g(M-_\))315 ! 2339 y Fm(Insert)j(last)f(argumen)o(t)g(to)g(the)g(previous)i(command)e ! (\(the)g(last)h(w)o(ord)f(of)g(the)g(previous)315 2394 y(history)e(en)o(try\).)20 b(With)15 b(an)g(argumen)o(t,)g(b)q(eha)o(v) o(e)g(exactly)h(lik)o(e)g Fl(yank-nth-arg)p Fm(.)j(Succes-)315 ! 2449 y(siv)o(e)f(calls)g(to)f Fl(yank-last-arg)e Fm(mo)o(v)o(e)i(bac)o (k)g(through)g(the)g(history)g(list,)i(inserting)f(the)315 ! 2503 y(last)d(argumen)o(t)g(of)f(eac)o(h)i(line)g(in)g(turn.)75 ! 2630 y Fb(1.4.3)30 b(Commands)21 b(F)-5 b(or)19 b(Changing)i(T)-5 ! b(ext)p eop %%Page: 14 16 14 15 bop 75 -58 a Fm(14)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fl(delete-char)e(\(C-d\))315 204 y Fm(Delete)20 ! b(the)g(c)o(haracter)e(at)h(p)q(oin)o(t.)33 b(If)20 b(p)q(oin)o(t)g(is) ! g(at)e(the)i(b)q(eginning)i(of)d(the)g(line,)j(there)315 ! 259 y(are)c(no)h(c)o(haracters)e(in)j(the)e(line,)j(and)e(the)f(last)h ! (c)o(haracter)e(t)o(yp)q(ed)i(w)o(as)f(not)g(b)q(ound)i(to)315 ! 314 y Fl(delete-char)p Fm(,)13 b(then)j(return)f Fh(eof)p ! Fm(.)75 401 y Fl(backward-delete-char)d(\(Rubout\))315 ! 456 y Fm(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 Fl(forward-backward-delete-ch)o(ar)12 b(\(\))315 ! 653 y Fm(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 Fl(quoted-insert)e(\(C-q)i(or)g(C-v\))315 904 y Fm(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 Fg(C-q)p Fm(,)d(for)h(example.)75 ! 1046 y Fl(tab-insert)f(\(M-)401 1044 y Ff(h)p 412 1018 ! 74 2 v 412 1046 a Fe(T)m(AB)p 412 1054 V 484 1044 a Ff(i)499 ! 1046 y Fl(\))315 1101 y Fm(Insert)h(a)g(tab)g(c)o(haracter.)75 ! 1188 y Fl(self-insert)f(\(a,)g(b,)h(A,)g(1,)g(!,)g(...)o(\))315 ! 1243 y Fm(Insert)g(y)o(ourself.)75 1330 y Fl(transpose-chars)e(\(C-t\)) ! 315 1385 y Fm(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 Fl(transpose-words)e(\(M-t\))315 1692 y Fm(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 Fl(upcase-word)f(\(M-u\))315 1943 y Fm(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 Fl(downcase-word)d(\(M-l\))315 2140 y Fm(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 Fl(capitalize-word)e(\(M-c\))315 ! 2337 y Fm(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 Fb(1.4.4)30 b(Killing)20 b(And)h(Y)-5 ! b(anking)75 2615 y Fl(kill-line)14 b(\(C-k\))315 2670 ! y Fm(Kill)j(the)f(text)e(from)h(p)q(oin)o(t)h(to)e(the)h(end)h(of)f ! (the)g(line.)p eop %%Page: 15 17 15 16 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(15)75 149 y Fl(backward-kill-line)13 b(\(C-x)h(Rubout\))315 ! 204 y Fm(Kill)j(bac)o(kw)o(ard)e(to)f(the)i(b)q(eginning)h(of)e(the)g ! (line.)75 295 y Fl(unix-line-discard)e(\(C-u\))315 349 y Fm(Kill)k(bac)o(kw)o(ard)e(from)f(the)i(cursor)e(to)h(the)g(b)q ! (eginning)j(of)c(the)i(curren)o(t)f(line.)75 440 y Fl(kill-whole-line)e ! (\(\))315 495 y Fm(Kill)20 b(all)g(c)o(haracters)d(on)h(the)h(curren)o ! (t)f(line,)i(no)e(matter)g(where)g(p)q(oin)o(t)h(is.)29 ! b(By)19 b(default,)315 549 y(this)d(is)f(un)o(b)q(ound.)75 ! 640 y Fl(kill-word)f(\(M-d\))315 695 y Fm(Kill)j(from)d(p)q(oin)o(t)h (to)f(the)h(end)g(of)f(the)h(curren)o(t)g(w)o(ord,)e(or)i(if)g(b)q(et)o ! (w)o(een)g(w)o(ords,)e(to)i(the)f(end)315 750 y(of)h(the)g(next)g(w)o (ord.)20 b(W)l(ord)14 b(b)q(oundaries)j(are)e(the)g(same)g(as)g ! Fl(forward-word)p Fm(.)75 840 y Fl(backward-kill-word)e(\(M-)592 ! 838 y Ff(h)p 603 812 73 2 v 603 840 a Fe(DEL)p 603 848 ! V 674 838 a Ff(i)689 840 y Fl(\))315 895 y Fm(Kill)k(the)d(w)o(ord)g(b) ! q(ehind)i(p)q(oin)o(t.)21 b(W)l(ord)14 b(b)q(oundaries)h(are)f(the)h ! (same)f(as)g Fl(backward-word)p Fm(.)75 985 y Fl(unix-word-rubout)f ! (\(C-w\))315 1040 y Fm(Kill)18 b(the)e(w)o(ord)f(b)q(ehind)j(p)q(oin)o ! (t,)e(using)h(white)f(space)g(as)g(a)f(w)o(ord)g(b)q(oundary)l(.)23 ! b(The)16 b(killed)315 1095 y(text)f(is)g(sa)o(v)o(ed)g(on)g(the)h ! (kill-ring.)75 1185 y Fl(delete-horizontal-space)c(\(\))315 ! 1240 y Fm(Delete)k(all)g(spaces)f(and)h(tabs)e(around)i(p)q(oin)o(t.)k ! (By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 1330 ! y Fl(kill-region)e(\(\))315 1385 y Fm(Kill)j(the)f(text)e(in)i(the)g ! (curren)o(t)f(region.)20 b(By)15 b(default,)h(this)f(command)g(is)h(un) ! o(b)q(ound.)75 1476 y Fl(copy-region-as-kill)d(\(\))315 ! 1530 y Fm(Cop)o(y)j(the)i(text)e(in)i(the)f(region)g(to)g(the)g(kill)h (bu\013er,)f(so)g(it)g(can)g(b)q(e)h(y)o(ank)o(ed)f(righ)o(t)g(a)o(w)o ! (a)o(y)l(.)315 1585 y(By)e(default,)h(this)f(command)g(is)h(un)o(b)q ! (ound.)75 1676 y Fl(copy-backward-word)d(\(\))315 1730 y Fm(Cop)o(y)19 b(the)g(w)o(ord)g(b)q(efore)g(p)q(oin)o(t)h(to)e(the)i (kill)h(bu\013er.)32 b(The)19 b(w)o(ord)g(b)q(oundaries)h(are)f(the)315 ! 1785 y(same)c(as)g Fl(backward-word)p Fm(.)j(By)d(default,)g(this)h ! (command)f(is)h(un)o(b)q(ound.)75 1876 y Fl(copy-forward-word)d(\(\)) ! 315 1930 y Fm(Cop)o(y)i(the)h(w)o(ord)e(follo)o(wing)j(p)q(oin)o(t)f ! (to)f(the)g(kill)j(bu\013er.)i(The)c(w)o(ord)f(b)q(oundaries)i(are)e ! (the)315 1985 y(same)g(as)g Fl(forward-word)p Fm(.)j(By)d(default,)h ! (this)f(command)g(is)h(un)o(b)q(ound.)75 2076 y Fl(yank)f(\(C-y\))315 ! 2131 y Fm(Y)l(ank)g(the)h(top)f(of)f(the)i(kill)h(ring)e(in)o(to)g(the) ! h(bu\013er)f(at)f(p)q(oin)o(t.)75 2221 y Fl(yank-pop)g(\(M-y\))315 ! 2276 y Fm(Rotate)i(the)h(kill-ring,)j(and)d(y)o(ank)g(the)h(new)f(top.) ! 26 b(Y)l(ou)17 b(can)h(only)g(do)f(this)h(if)f(the)h(prior)315 ! 2331 y(command)d(is)h Fl(yank)e Fm(or)h Fl(yank-pop)p ! Fm(.)75 2441 y Fb(1.4.5)30 b(Sp)r(ecifying)20 b(Numeric)h(Argumen)n(ts) ! 75 2560 y Fl(digit-argument)13 b(\()p Fg(M-0)p Fl(,)i ! Fg(M-1)p Fl(,)f(...)h Fg(M--)p Fl(\))315 2615 y Fm(Add)f(this)g(digit)g ! (to)f(the)h(argumen)o(t)e(already)i(accum)o(ulating,)g(or)f(start)f(a)h ! (new)h(argumen)o(t.)315 2670 y Fg(M--)h Fm(starts)f(a)h(negativ)o(e)g ! (argumen)o(t.)p eop %%Page: 16 18 16 17 bop 75 -58 a Fm(16)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fl(universal-argument)d(\(\))315 204 y Fm(This)g(is)h(another)e (w)o(a)o(y)g(to)g(sp)q(ecify)i(an)f(argumen)o(t.)18 b(If)13 b(this)g(command)g(is)g(follo)o(w)o(ed)g(b)o(y)g(one)315 ! 259 y(or)h(more)h(digits,)g(optionally)h(with)f(a)g(leading)h(min)o(us) ! f(sign,)g(those)g(digits)g(de\014ne)h(the)f(ar-)315 314 ! y(gumen)o(t.)k(If)c(the)g(command)f(is)h(follo)o(w)o(ed)g(b)o(y)g ! (digits,)g(executing)g Fl(universal-argument)315 369 y Fm(again)h(ends)g(the)g(n)o(umeric)h(argumen)o(t,)e(but)h(is)h (otherwise)f(ignored.)22 b(As)16 b(a)g(sp)q(ecial)h(case,)315 ! 423 y(if)g(this)g(command)f(is)h(immediately)h(follo)o(w)o(ed)f(b)o(y)f ! (a)g(c)o(haracter)g(that)g(is)h(neither)g(a)f(digit)315 ! 478 y(or)d(min)o(us)i(sign,)f(the)g(argumen)o(t)g(coun)o(t)f(for)h(the) ! g(next)g(command)g(is)g(m)o(ultiplied)j(b)o(y)d(four.)315 ! 533 y(The)19 b(argumen)o(t)f(coun)o(t)g(is)h(initially)j(one,)d(so)f (executing)i(this)f(function)h(the)e(\014rst)h(time)315 ! 588 y(mak)o(es)c(the)h(argumen)o(t)f(coun)o(t)h(four,)f(a)h(second)g (time)g(mak)o(es)g(the)g(argumen)o(t)f(coun)o(t)g(six-)315 ! 643 y(teen,)g(and)g(so)g(on.)20 b(By)15 b(default,)h(this)f(is)h(not)f ! (b)q(ound)h(to)f(a)g(k)o(ey)l(.)75 762 y Fb(1.4.6)30 b(Letting)20 b(Readline)g(T)n(yp)r(e)h(F)-5 b(or)19 b(Y)-5 ! b(ou)75 892 y Fl(complete)14 b(\()305 890 y Ff(h)p 317 ! 864 74 2 v 317 892 a Fe(T)m(AB)p 317 900 V 389 890 a ! Ff(i)404 892 y Fl(\))315 947 y Fm(A)o(ttempt)c(to)h(p)q(erform)g ! (completion)i(on)e(the)g(text)g(b)q(efore)h(p)q(oin)o(t.)19 ! b(The)11 b(actual)h(completion)315 1002 y(p)q(erformed)j(is)h (application-sp)q(eci\014)q(c.)23 b(The)15 b(default)h(is)g(\014lename) ! g(completion.)75 1099 y Fl(possible-completions)c(\(M-?\))315 ! 1154 y Fm(List)k(the)f(p)q(ossible)i(completions)f(of)f(the)g(text)g(b) ! q(efore)h(p)q(oin)o(t.)75 1251 y Fl(insert-completions)d(\(M-*\))315 ! 1306 y Fm(Insert)j(all)g(completions)g(of)f(the)g(text)g(b)q(efore)h(p) q(oin)o(t)f(that)g(w)o(ould)h(ha)o(v)o(e)f(b)q(een)h(generated)315 ! 1361 y(b)o(y)f Fl(possible-completions)p Fm(.)75 1458 ! y Fl(menu-complete)e(\(\))315 1513 y Fm(Similar)g(to)f Fl(complete)p Fm(,)f(but)h(replaces)h(the)f(w)o(ord)f(to)g(b)q(e)i ! (completed)f(with)h(a)e(single)j(matc)o(h)315 1568 y(from)k(the)h(list) h(of)e(p)q(ossible)j(completions.)32 b(Rep)q(eated)19 ! b(execution)h(of)f Fl(menu-complete)315 1623 y Fm(steps)h(through)g (the)g(list)h(of)f(p)q(ossible)i(completions,)g(inserting)f(eac)o(h)f ! (matc)o(h)f(in)i(turn.)315 1678 y(A)o(t)d(the)g(end)h(of)f(the)h(list)g (of)f(completions,)i(the)e(b)q(ell)j(is)d(rung)h(\(sub)s(ject)f(to)f ! (the)i(setting)315 1732 y(of)f Fl(bell-style)p Fm(\))e(and)i(the)g (original)h(text)f(is)g(restored.)28 b(An)19 b(argumen)o(t)e(of)g ! Fc(n)i Fm(mo)o(v)o(es)e Fc(n)315 1787 y Fm(p)q(ositions)h(forw)o(ard)e (in)j(the)e(list)h(of)f(matc)o(hes;)h(a)f(negativ)o(e)g(argumen)o(t)g ! (ma)o(y)g(b)q(e)h(used)g(to)315 1842 y(mo)o(v)o(e)g(bac)o(kw)o(ard)h (through)g(the)g(list.)32 b(This)20 b(command)f(is)h(in)o(tended)g(to)f ! (b)q(e)h(b)q(ound)g(to)315 1895 y Ff(h)p 327 1869 V 327 ! 1897 a Fe(T)m(AB)p 327 1905 V 399 1895 a Ff(i)414 1897 ! y Fm(,)15 b(but)g(is)h(un)o(b)q(ound)g(b)o(y)f(default.)75 ! 1994 y Fl(delete-char-or-list)e(\(\))315 2049 y Fm(Deletes)h(the)f(c)o ! (haracter)g(under)h(the)g(cursor)f(if)h(not)f(at)g(the)g(b)q(eginning)j ! (or)d(end)h(of)f(the)g(line)315 2104 y(\(lik)o(e)i Fl(delete-char)p ! Fm(\).)j(If)d(at)f(the)h(end)g(of)f(the)g(line,)i(b)q(eha)o(v)o(es)f ! (iden)o(tically)i(to)d Fl(possible-)315 2159 y(completions)p ! Fm(.)k(This)e(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.)75 ! 2278 y Fb(1.4.7)30 b(Keyb)r(oard)20 b(Macros)75 2408 ! y Fl(start-kbd-macro)13 b(\(C-x)i(\(\))315 2463 y Fm(Begin)h(sa)o(ving) ! f(the)h(c)o(haracters)e(t)o(yp)q(ed)i(in)o(to)f(the)g(curren)o(t)g(k)o ! (eyb)q(oard)g(macro.)75 2560 y Fl(end-kbd-macro)e(\(C-x)i(\)\))315 ! 2615 y Fm(Stop)f(sa)o(ving)f(the)h(c)o(haracters)f(t)o(yp)q(ed)h(in)o ! (to)f(the)h(curren)o(t)g(k)o(eyb)q(oard)f(macro)g(and)h(sa)o(v)o(e)f ! (the)315 2670 y(de\014nition.)p eop %%Page: 17 19 17 18 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(17)75 149 y Fl(call-last-kbd-macro)13 b(\(C-x)h(e\))315 ! 204 y Fm(Re-execute)k(the)g(last)f(k)o(eyb)q(oard)h(macro)f(de\014ned,) ! i(b)o(y)e(making)h(the)g(c)o(haracters)e(in)j(the)315 ! 259 y(macro)14 b(app)q(ear)i(as)f(if)g(t)o(yp)q(ed)h(at)e(the)i(k)o ! (eyb)q(oard.)75 368 y Fb(1.4.8)30 b(Some)20 b(Miscellaneous)h(Commands) ! 75 486 y Fl(re-read-init-file)13 b(\(C-x)h(C-r\))315 ! 541 y Fm(Read)d(in)g(the)g(con)o(ten)o(ts)g(of)f(the)h ! Fc(inputrc)k Fm(\014le,)d(and)g(incorp)q(orate)f(an)o(y)f(bindings)j ! (or)e(v)m(ariable)315 596 y(assignmen)o(ts)k(found)h(there.)75 ! 684 y Fl(abort)e(\(C-g\))315 739 y Fm(Ab)q(ort)f(the)g(curren)o(t)h (editing)g(command)f(and)h(ring)f(the)h(terminal's)f(b)q(ell)i(\(sub)s ! (ject)e(to)g(the)315 794 y(setting)i(of)g Fl(bell-style)p ! Fm(\).)75 883 y Fl(do-uppercase-version)d(\(M-a,)j(M-b,)f(M-)p ! Fc(x)p Fl(,)h(...\))315 938 y Fm(If)f(the)g(meta\014ed)g(c)o(haracter)f ! Fc(x)k Fm(is)d(lo)o(w)o(ercase,)g(run)g(the)g(command)f(that)h(is)g(b)q ! (ound)h(to)e(the)315 993 y(corresp)q(onding)j(upp)q(ercase)g(c)o ! (haracter.)75 1082 y Fl(prefix-meta)e(\()377 1080 y Ff(h)p ! 389 1054 70 2 v 389 1082 a Fe(ESC)p 389 1089 V 456 1080 ! a Ff(i)471 1082 y Fl(\))315 1136 y Fm(Metafy)k(the)h(next)g(c)o (haracter)f(t)o(yp)q(ed.)30 b(This)20 b(is)f(for)f(k)o(eyb)q(oards)h ! (without)g(a)f(meta)g(k)o(ey)l(.)315 1191 y(T)o(yping)e(`)485 ! 1189 y Ff(h)p 496 1163 V 496 1191 a Fe(ESC)p 496 1199 ! V 563 1189 a Ff(i)593 1191 y Fl(f)p Fm(')f(is)h(equiv)m(alen)o(t)h(to)d ! (t)o(yping)i Fg(M-f)p Fm(.)75 1280 y Fl(undo)f(\(C-_)f(or)h(C-x)g ! (C-u\))315 1335 y Fm(Incremen)o(tal)h(undo,)f(separately)h(remem)o(b)q ! (ered)g(for)e(eac)o(h)h(line.)75 1424 y Fl(revert-line)f(\(M-r\))315 ! 1479 y Fm(Undo)j(all)g(c)o(hanges)g(made)f(to)g(this)h(line.)26 b(This)17 b(is)g(lik)o(e)h(executing)f(the)g Fl(undo)f ! Fm(command)315 1533 y(enough)g(times)f(to)g(get)f(bac)o(k)h(to)g(the)g ! (b)q(eginning.)75 1622 y Fl(tilde-expand)f(\(M-~\))315 ! 1677 y Fm(P)o(erform)g(tilde)j(expansion)f(on)f(the)g(curren)o(t)g(w)o ! (ord.)75 1766 y Fl(set-mark)f(\(C-@\))315 1821 y Fm(Set)i(the)h(mark)f (to)f(the)i(p)q(oin)o(t.)24 b(If)17 b(a)f(n)o(umeric)h(argumen)o(t)f ! (is)g(supplied,)j(the)e(mark)e(is)i(set)315 1876 y(to)e(that)f(p)q ! (osition.)75 1965 y Fl(exchange-point-and-mark)e(\(C-x)j(C-x\))315 ! 2020 y Fm(Sw)o(ap)g(the)h(p)q(oin)o(t)g(with)g(the)g(mark.)k(The)c ! (curren)o(t)f(cursor)h(p)q(osition)g(is)g(set)g(to)f(the)g(sa)o(v)o(ed) ! 315 2074 y(p)q(osition,)h(and)f(the)h(old)f(cursor)g(p)q(osition)h(is)g ! (sa)o(v)o(ed)f(as)g(the)g(mark.)75 2163 y Fl(character-search)e ! (\(C-]\))315 2218 y Fm(A)f(c)o(haracter)g(is)h(read)g(and)f(p)q(oin)o ! (t)h(is)g(mo)o(v)o(ed)f(to)g(the)g(next)h(o)q(ccurrence)g(of)f(that)g ! (c)o(haracter.)315 2273 y(A)j(negativ)o(e)h(coun)o(t)f(searc)o(hes)g ! (for)f(previous)i(o)q(ccurrences.)75 2362 y Fl ! (character-search-backward)c(\(M-C-]\))315 2417 y Fm(A)22 ! b(c)o(haracter)g(is)h(read)f(and)h(p)q(oin)o(t)g(is)g(mo)o(v)o(ed)f(to) ! g(the)g(previous)h(o)q(ccurrence)h(of)e(that)315 2471 ! y(c)o(haracter.)d(A)c(negativ)o(e)h(coun)o(t)f(searc)o(hes)g(for)f ! (subsequen)o(t)i(o)q(ccurrences.)75 2560 y Fl(insert-comment)d(\(M-#\)) ! 315 2615 y Fm(The)19 b(v)m(alue)i(of)e(the)g Fl(comment-begin)e ! Fm(v)m(ariable)k(is)f(inserted)g(at)e(the)i(b)q(eginning)h(of)e(the)315 ! 2670 y(curren)o(t)c(line,)i(and)e(the)g(line)i(is)f(accepted)g(as)e(if) ! i(a)f(newline)i(had)f(b)q(een)g(t)o(yp)q(ed.)p eop %%Page: 18 20 18 19 bop 75 -58 a Fm(18)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fl(dump-functions)d(\(\))315 204 y Fm(Prin)o(t)g(all)h(of)f(the)g (functions)h(and)g(their)g(k)o(ey)f(bindings)i(to)d(the)i(Readline)g ! (output)f(stream.)315 259 y(If)j(a)g(n)o(umeric)g(argumen)o(t)f(is)i (supplied,)h(the)e(output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o ! (y)f(that)315 314 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fc(inputrc)k Fm(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o ! (y)f(default.)75 406 y Fl(dump-variables)e(\(\))315 461 ! y Fm(Prin)o(t)e(all)g(of)f(the)h(settable)g(v)m(ariables)h(and)f(their) ! g(v)m(alues)h(to)e(the)h(Readline)h(output)e(stream.)315 ! 516 y(If)16 b(a)g(n)o(umeric)g(argumen)o(t)f(is)i(supplied,)h(the)e (output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o(y)f(that)315 ! 570 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fc(inputrc)k Fm(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.) ! 75 663 y Fl(dump-macros)f(\(\))315 717 y Fm(Prin)o(t)j(all)h(of)e(the)h ! (Readline)h(k)o(ey)f(sequences)h(b)q(ound)g(to)e(macros)g(and)h(the)g ! (strings)g(they)315 772 y(output.)26 b(If)18 b(a)f(n)o(umeric)h (argumen)o(t)f(is)h(supplied,)i(the)d(output)g(is)h(formatted)e(in)j ! (suc)o(h)e(a)315 827 y(w)o(a)o(y)d(that)g(it)i(can)f(b)q(e)g(made)g (part)g(of)f(an)h Fc(inputrc)k Fm(\014le.)i(This)15 b(command)g(is)h ! (un)o(b)q(ound)g(b)o(y)315 882 y(default.)75 1010 y Fk(1.5)33 ! b(Readline)23 b(vi)h(Mo)r(de)137 1107 y Fm(While)13 b(the)f(Readline)i ! (library)e(do)q(es)g(not)g(ha)o(v)o(e)f(a)h(full)h(set)f(of)f ! Fl(vi)g Fm(editing)j(functions,)f(it)f(do)q(es)g(con)o(tain)75 ! 1161 y(enough)17 b(to)g(allo)o(w)g(simple)h(editing)h(of)d(the)i(line.) ! 27 b(The)17 b(Readline)h Fl(vi)f Fm(mo)q(de)g(b)q(eha)o(v)o(es)g(as)g ! (sp)q(eci\014ed)i(in)75 1216 y(the)c Fh(posix)g Fm(1003.2)f(standard.) ! 137 1284 y(In)h(order)g(to)f(switc)o(h)g(in)o(teractiv)o(ely)i(b)q(et)o ! (w)o(een)f Fl(emacs)e Fm(and)i Fl(vi)f Fm(editing)i(mo)q(des,)f(use)f ! (the)h(command)75 1338 y Fg(M-C-j)j Fm(\(b)q(ound)i(to)e ! (emacs-editing-mo)q(de)j(when)e(in)h Fl(vi)f Fm(mo)q(de)g(and)g(to)f ! (vi-editing-mo)q(de)k(in)e Fl(emacs)75 1393 y Fm(mo)q(de\).)g(The)15 ! b(Readline)i(default)f(is)f Fl(emacs)g Fm(mo)q(de.)137 ! 1460 y(When)h(y)o(ou)e(en)o(ter)h(a)g(line)i(in)e Fl(vi)g ! Fm(mo)q(de,)g(y)o(ou)g(are)f(already)i(placed)g(in)g(`insertion')f(mo)q ! (de,)g(as)g(if)g(y)o(ou)75 1515 y(had)e(t)o(yp)q(ed)h(an)f(`)p ! Fl(i)p Fm('.)18 b(Pressing)608 1513 y Ff(h)p 620 1487 ! 70 2 v 620 1515 a Fe(ESC)p 620 1523 V 687 1513 a Ff(i)715 ! 1515 y Fm(switc)o(hes)13 b(y)o(ou)g(in)o(to)g(`command')f(mo)q(de,)i ! (where)f(y)o(ou)g(can)g(edit)h(the)75 1570 y(text)i(of)h(the)g(line)h ! (with)g(the)f(standard)f Fl(vi)h Fm(mo)o(v)o(emen)o(t)f(k)o(eys,)g(mo)o ! (v)o(e)g(to)h(previous)g(history)g(lines)i(with)75 1625 ! y(`)p Fl(k)p Fm(')14 b(and)i(subsequen)o(t)f(lines)i(with)f(`)p Fl(j)p Fm(',)e(and)h(so)g(forth.)p eop ! %%Page: -1 21 ! -1 20 bop 1862 -58 a Fm(i)75 149 y Fi(T)-7 b(able)27 b(of)f(Con)n(ten)n(ts)75 320 y Fk(1)67 b(Command)22 b(Line)i(Editing)d Fa(.)10 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h --- 1501,1939 ---- y($if)f(Bash)195 668 y(#)h(edit)f(the)g(path)195 720 y("\\C-xp":)g("PATH=${PATH}\\e\\C-e\\C-a\\)o(ef\\C-f")195 ! 772 y(#)h(prepare)f(to)g(type)h(a)f(quoted)g(word)h(--)195 ! 824 y(#)g(insert)f(open)g(and)h(close)f(double)g(quotes)195 ! 876 y(#)h(and)f(move)g(to)h(just)f(after)h(the)f(open)g(quote)195 ! 928 y("\\C-x\\"":)g("\\"\\"\\C-b")195 980 y(#)h(insert)f(a)g(backslash) ! g(\(testing)g(backslash)g(escapes)195 1032 y(#)h(in)f(sequences)g(and)g ! (macros\))195 1083 y("\\C-x\\\\":)g("\\\\")195 1135 y(#)h(Quote)f(the)g ! (current)g(or)h(previous)f(word)195 1187 y("\\C-xq":)g ! ("\\eb\\"\\ef\\"")195 1239 y(#)h(Add)f(a)h(binding)f(to)g(refresh)g ! (the)h(line,)f(which)g(is)h(unbound)195 1291 y("\\C-xr":)f ! (redraw-current-line)195 1343 y(#)h(Edit)f(variable)g(on)g(current)g ! (line.)195 1395 y("\\M-\\C-v":)f("\\C-a\\C-k$\\C-y\\M-\\C-e\\C-a\\C-y=) ! o(")195 1447 y($endif)195 1550 y(#)i(use)f(a)h(visible)f(bell)g(if)h ! (one)f(is)h(available)195 1602 y(set)f(bell-style)g(visible)195 ! 1706 y(#)h(don't)f(strip)g(characters)g(to)g(7)h(bits)f(when)h(reading) ! 195 1758 y(set)f(input-meta)g(on)195 1862 y(#)h(allow)f(iso-latin1)f ! (characters)h(to)g(be)h(inserted)f(rather)195 1914 y(#)h(than)f ! (converted)g(to)g(prefix-meta)g(sequences)195 1966 y(set)g ! (convert-meta)g(off)195 2069 y(#)h(display)f(characters)f(with)h(the)h ! (eighth)f(bit)g(set)h(directly)195 2121 y(#)g(rather)f(than)g(as)h ! (meta-prefixed)e(characters)195 2173 y(set)h(output-meta)g(on)195 ! 2277 y(#)h(if)f(there)g(are)h(more)f(than)h(150)f(possible)g ! (completions)f(for)195 2329 y(#)i(a)f(word,)h(ask)f(the)h(user)f(if)g ! (he)h(wants)f(to)h(see)f(all)h(of)f(them)195 2381 y(set)g ! (completion-query-items)e(150)195 2484 y(#)j(For)f(FTP)195 ! 2536 y($if)g(Ftp)195 2588 y("\\C-xg":)g("get)g(\\M-?")195 ! 2640 y("\\C-xt":)g("put)g(\\M-?")p eop %%Page: 12 14 ! 12 13 bop 75 -58 a Fm(12)1299 b(GNU)15 b(Readline)h(Library)195 ! 149 y Fl("\\M-.":)23 b(yank-last-arg)195 201 y($endif)75 ! 329 y Fk(1.4)33 b(Bindable)24 b(Readline)f(Commands)137 ! 425 y Fm(This)17 b(section)f(describ)q(es)h(Readline)g(commands)f(that) e(ma)o(y)h(b)q(e)i(b)q(ound)f(to)f(k)o(ey)h(sequences.)22 ! b(Com-)75 480 y(mand)15 b(names)g(without)h(an)f(accompan)o(ying)g(k)o (ey)g(sequence)i(are)e(un)o(b)q(ound)h(b)o(y)f(default.)137 ! 547 y(In)f(the)f(follo)o(wing)h(descriptions,)h Fc(p)q(oin)o(t)f Fm(refers)f(to)g(the)g(curren)o(t)g(cursor)f(p)q(osition,)j(and)e ! Fc(mark)i Fm(refers)75 601 y(to)k(a)g(cursor)g(p)q(osition)h(sa)o(v)o (ed)f(b)o(y)h(the)f Fl(set-mark)g Fm(command.)32 b(The)20 b(text)f(b)q(et)o(w)o(een)g(the)h(p)q(oin)o(t)g(and)75 ! 656 y(mark)15 b(is)g(referred)h(to)e(as)h(the)g Fc(region)p ! Fm(.)75 767 y Fb(1.4.1)30 b(Commands)21 b(F)-5 b(or)19 ! b(Mo)n(ving)75 888 y Fl(beginning-of-line)13 b(\(C-a\))315 ! 942 y Fm(Mo)o(v)o(e)h(to)h(the)g(start)f(of)h(the)g(curren)o(t)g(line.) ! 75 1034 y Fl(end-of-line)f(\(C-e\))315 1088 y Fm(Mo)o(v)o(e)g(to)h(the) ! g(end)h(of)f(the)g(line.)75 1179 y Fl(forward-char)f(\(C-f\))315 ! 1234 y Fm(Mo)o(v)o(e)g(forw)o(ard)g(a)h(c)o(haracter.)75 ! 1325 y Fl(backward-char)e(\(C-b\))315 1380 y Fm(Mo)o(v)o(e)h(bac)o(k)h ! (a)g(c)o(haracter.)75 1471 y Fl(forward-word)f(\(M-f\))315 ! 1526 y Fm(Mo)o(v)o(e)g(forw)o(ard)g(to)g(the)i(end)g(of)e(the)h(next)h (w)o(ord.)j(W)l(ords)c(are)f(comp)q(osed)i(of)f(letters)g(and)315 ! 1581 y(digits.)75 1672 y Fl(backward-word)e(\(M-b\))315 ! 1727 y Fm(Mo)o(v)o(e)j(bac)o(k)g(to)h(the)f(start)g(of)g(the)h(curren)o (t)g(or)f(previous)i(w)o(ord.)24 b(W)l(ords)16 b(are)h(comp)q(osed)315 ! 1782 y(of)e(letters)g(and)g(digits.)75 1873 y Fl(clear-screen)f ! (\(C-l\))315 1928 y Fm(Clear)f(the)h(screen)g(and)f(redra)o(w)g(the)g (curren)o(t)g(line,)i(lea)o(ving)g(the)e(curren)o(t)g(line)i(at)e(the)g ! (top)315 1982 y(of)i(the)g(screen.)75 2074 y Fl(redraw-current-line)e ! (\(\))315 2128 y Fm(Refresh)i(the)g(curren)o(t)g(line.)22 ! b(By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 2239 y Fb(1.4.2)30 b(Commands)21 b(F)-5 b(or)19 b(Manipulating)i(The)f ! (History)75 2360 y Fl(accept-line)14 b(\(Newline)g(or)h(Return\))315 ! 2414 y Fm(Accept)j(the)g(line)h(regardless)f(of)f(where)h(the)g(cursor) f(is.)27 b(If)18 b(this)g(line)h(is)g(non-empt)o(y)l(,)f(it)315 ! 2469 y(ma)o(y)d(b)q(e)i(added)f(to)g(the)g(history)g(list)g(for)g (future)g(recall)h(with)f Fl(add_history\(\))p Fm(.)k(If)d(this)315 ! 2524 y(line)g(is)f(a)e(mo)q(di\014ed)j(history)e(line,)i(the)e(history) g(line)i(is)f(restored)e(to)h(its)g(original)i(state.)75 ! 2615 y Fl(previous-history)c(\(C-p\))315 2670 y Fm(Mo)o(v)o(e)h(`bac)o (k')h(through)f(the)i(history)f(list,)g(fetc)o(hing)h(the)f(previous)h ! (command.)p eop %%Page: 13 15 13 14 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(13)75 149 y Fl(next-history)14 b(\(C-n\))315 204 y ! Fm(Mo)o(v)o(e)g(`forw)o(ard')f(through)i(the)h(history)f(list,)g(fetc)o ! (hing)h(the)f(next)h(command.)75 307 y Fl(beginning-of-history)c ! (\(M-<\))315 362 y Fm(Mo)o(v)o(e)i(to)h(the)g(\014rst)g(line)i(in)f ! (the)f(history)l(.)75 465 y Fl(end-of-history)e(\(M->\))315 ! 520 y Fm(Mo)o(v)o(e)h(to)h(the)g(end)h(of)f(the)g(input)h(history)l(,)f ! (i.e.,)g(the)g(line)i(curren)o(tly)f(b)q(eing)g(en)o(tered.)75 ! 624 y Fl(reverse-search-history)c(\(C-r\))315 678 y Fm(Searc)o(h)k(bac) ! o(kw)o(ard)e(starting)h(at)g(the)h(curren)o(t)f(line)j(and)d(mo)o(ving) ! h(`up')f(through)g(the)h(his-)315 733 y(tory)e(as)h(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 836 ! y Fl(forward-search-history)c(\(C-s\))315 891 y Fm(Searc)o(h)j(forw)o (ard)e(starting)h(at)h(the)f(curren)o(t)h(line)h(and)f(mo)o(ving)g(`do) ! o(wn')f(through)g(the)h(the)315 946 y(history)g(as)g(necessary)l(.)20 ! b(This)c(is)g(an)f(incremen)o(tal)h(searc)o(h.)75 1049 y Fl(non-incremental-reverse-se)o(arch-hi)o(story)c(\(M-p\))315 ! 1104 y Fm(Searc)o(h)k(bac)o(kw)o(ard)e(starting)h(at)g(the)h(curren)o ! (t)f(line)j(and)d(mo)o(ving)h(`up')f(through)g(the)h(his-)315 ! 1159 y(tory)h(as)h(necessary)g(using)h(a)e(non-incremen)o(tal)j(searc)o ! (h)e(for)f(a)h(string)g(supplied)i(b)o(y)e(the)315 1214 ! y(user.)75 1317 y Fl(non-incremental-forward-se)o(arch-hi)o(story)12 ! b(\(M-n\))315 1372 y Fm(Searc)o(h)j(forw)o(ard)e(starting)h(at)h(the)f (curren)o(t)h(line)h(and)f(mo)o(ving)g(`do)o(wn')f(through)g(the)h(the) ! 315 1426 y(history)e(as)g(necessary)h(using)g(a)f(non-incremen)o(tal)i (searc)o(h)e(for)g(a)g(string)g(supplied)j(b)o(y)d(the)315 ! 1481 y(user.)75 1584 y Fl(history-search-forward)f(\(\))315 ! 1639 y Fm(Searc)o(h)21 b(forw)o(ard)e(through)i(the)f(history)h(for)f (the)h(string)g(of)f(c)o(haracters)g(b)q(et)o(w)o(een)h(the)315 ! 1694 y(start)16 b(of)h(the)h(curren)o(t)g(line)h(and)e(the)h(p)q(oin)o (t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 ! b(By)315 1749 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 1852 y Fl(history-search-backward)c(\(\))315 1907 y Fm(Searc)o(h)18 b(bac)o(kw)o(ard)e(through)h(the)h(history)f(for)g(the)g(string)h(of)f ! (c)o(haracters)f(b)q(et)o(w)o(een)i(the)315 1962 y(start)e(of)h(the)h (curren)o(t)g(line)h(and)e(the)h(p)q(oin)o(t.)28 b(This)18 b(is)g(a)f(non-incremen)o(tal)i(searc)o(h.)27 b(By)315 ! 2016 y(default,)15 b(this)h(command)f(is)h(un)o(b)q(ound.)75 ! 2120 y Fl(yank-nth-arg)e(\(M-C-y\))315 2174 y Fm(Insert)f(the)g (\014rst)g(argumen)o(t)f(to)g(the)i(previous)f(command)g(\(usually)h ! (the)f(second)h(w)o(ord)e(on)315 2229 y(the)j(previous)h(line\))g(at)e (p)q(oin)o(t.)21 b(With)15 b(an)g(argumen)o(t)f Fc(n)p Fm(,)h(insert)g(the)g Fc(n)p Fm(th)g(w)o(ord)g(from)f(the)315 ! 2284 y(previous)g(command)g(\(the)f(w)o(ords)f(in)j(the)e(previous)i (command)e(b)q(egin)i(with)e(w)o(ord)g(0\).)19 b(A)315 ! 2339 y(negativ)o(e)13 b(argumen)o(t)f(inserts)h(the)g Fc(n)p Fm(th)g(w)o(ord)f(from)g(the)h(end)h(of)e(the)h(previous)g ! (command.)75 2442 y Fl(yank-last-arg)g(\(M-.)i(or)g(M-_\))315 ! 2497 y Fm(Insert)j(last)f(argumen)o(t)g(to)g(the)g(previous)i(command)e ! (\(the)g(last)h(w)o(ord)f(of)g(the)g(previous)315 2552 y(history)e(en)o(try\).)20 b(With)15 b(an)g(argumen)o(t,)g(b)q(eha)o(v) o(e)g(exactly)h(lik)o(e)g Fl(yank-nth-arg)p Fm(.)j(Succes-)315 ! 2606 y(siv)o(e)f(calls)g(to)f Fl(yank-last-arg)e Fm(mo)o(v)o(e)i(bac)o (k)g(through)g(the)g(history)g(list,)i(inserting)f(the)315 ! 2661 y(last)d(argumen)o(t)g(of)f(eac)o(h)i(line)g(in)g(turn.)p ! eop %%Page: 14 16 14 15 bop 75 -58 a Fm(14)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fb(1.4.3)30 b(Commands)21 b(F)-5 b(or)19 b(Changing)i(T)-5 ! b(ext)75 286 y Fl(delete-char)14 b(\(C-d\))315 341 y ! Fm(Delete)20 b(the)g(c)o(haracter)e(at)h(p)q(oin)o(t.)33 ! b(If)20 b(p)q(oin)o(t)g(is)g(at)e(the)i(b)q(eginning)i(of)d(the)g ! (line,)j(there)315 396 y(are)c(no)h(c)o(haracters)e(in)j(the)e(line,)j ! (and)e(the)f(last)h(c)o(haracter)e(t)o(yp)q(ed)i(w)o(as)f(not)g(b)q ! (ound)i(to)315 450 y Fl(delete-char)p Fm(,)13 b(then)j(return)f ! Fh(eof)p Fm(.)75 552 y Fl(backward-delete-char)d(\(Rubout\))315 ! 607 y Fm(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 ! 661 y(c)o(haracters)d(instead)i(of)f(deleting)i(them.)75 ! 763 y Fl(forward-backward-delete-ch)o(ar)12 b(\(\))315 ! 818 y Fm(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 ! 872 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 ! 927 y(is)f(not)f(b)q(ound)h(to)e(a)h(k)o(ey)l(.)75 1029 ! y Fl(quoted-insert)e(\(C-q)i(or)g(C-v\))315 1083 y Fm(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 1138 y(sequences)f(lik)o(e)h Fg(C-q)p Fm(,)d(for)h(example.)75 ! 1240 y Fl(tab-insert)f(\(M-)401 1238 y Ff(h)p 412 1212 ! 74 2 v 412 1240 a Fe(T)m(AB)p 412 1247 V 484 1238 a Ff(i)499 ! 1240 y Fl(\))315 1294 y Fm(Insert)h(a)g(tab)g(c)o(haracter.)75 ! 1396 y Fl(self-insert)f(\(a,)g(b,)h(A,)g(1,)g(!,)g(...)o(\))315 ! 1451 y Fm(Insert)g(y)o(ourself.)75 1552 y Fl(transpose-chars)e(\(C-t\)) ! 315 1607 y Fm(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 ! 1662 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 1716 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 1771 y(ha)o(v)o(e)k(no)g(e\013ect.)75 ! 1873 y Fl(transpose-words)e(\(M-t\))315 1927 y Fm(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 1982 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 2037 y(last)h(t)o(w)o(o)f(w)o(ords)g(on)i(the)f(line.)75 ! 2138 y Fl(upcase-word)f(\(M-u\))315 2193 y Fm(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 2248 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 2349 y Fl(downcase-word)d(\(M-l\))315 2404 y Fm(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 2459 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 2560 y Fl(capitalize-word)e(\(M-c\))315 ! 2615 y Fm(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 ! 2670 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.)p eop %%Page: 15 17 15 16 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(15)75 149 y Fl(overwrite-mode)13 b(\(\))315 204 y Fm(T)l(oggle)j(o)o ! (v)o(erwrite)g(mo)q(de.)24 b(With)17 b(an)f(explicit)j(p)q(ositiv)o(e)f ! (n)o(umeric)f(argumen)o(t,)f(switc)o(hes)315 259 y(to)10 ! b(o)o(v)o(erwrite)g(mo)q(de.)19 b(With)11 b(an)g(explicit)i(non-p)q ! (ositiv)o(e)f(n)o(umeric)g(argumen)o(t,)e(switc)o(hes)i(to)315 ! 314 y(insert)k(mo)q(de.)k(This)c(command)f(a\013ects)g(only)h ! Fl(emacs)e Fm(mo)q(de;)h Fl(vi)g Fm(mo)q(de)h(do)q(es)g(o)o(v)o ! (erwrite)315 369 y(di\013eren)o(tly)l(.)21 b(Eac)o(h)15 ! b(call)h(to)f Fl(readline\(\))f Fm(starts)f(in)k(insert)e(mo)q(de.)315 ! 436 y(In)g(o)o(v)o(erwrite)f(mo)q(de,)h(c)o(haracters)f(b)q(ound)h(to)f ! Fl(self-insert)f Fm(replace)j(the)e(text)h(at)e(p)q(oin)o(t)315 ! 491 y(rather)20 b(than)h(pushing)h(the)f(text)f(to)g(the)h(righ)o(t.)36 ! b(Characters)20 b(b)q(ound)i(to)e Fl(backward-)315 546 ! y(delete-char)14 b Fm(replace)i(the)f(c)o(haracter)g(b)q(efore)g(p)q ! (oin)o(t)h(with)f(a)g(space.)315 614 y(By)g(default,)h(this)f(command)g ! (is)h(un)o(b)q(ound.)75 729 y Fb(1.4.4)30 b(Killing)20 ! b(And)h(Y)-5 b(anking)75 853 y Fl(kill-line)14 b(\(C-k\))315 ! 908 y Fm(Kill)j(the)f(text)e(from)h(p)q(oin)o(t)h(to)e(the)h(end)h(of)f ! (the)g(line.)75 1002 y Fl(backward-kill-line)e(\(C-x)h(Rubout\))315 ! 1057 y Fm(Kill)j(bac)o(kw)o(ard)e(to)f(the)i(b)q(eginning)h(of)e(the)g ! (line.)75 1151 y Fl(unix-line-discard)e(\(C-u\))315 1205 y Fm(Kill)k(bac)o(kw)o(ard)e(from)f(the)i(cursor)e(to)h(the)g(b)q ! (eginning)j(of)c(the)i(curren)o(t)f(line.)75 1299 y Fl(kill-whole-line) ! e(\(\))315 1354 y Fm(Kill)20 b(all)g(c)o(haracters)d(on)h(the)h(curren) ! o(t)f(line,)i(no)e(matter)g(where)g(p)q(oin)o(t)h(is.)29 ! b(By)19 b(default,)315 1409 y(this)d(is)f(un)o(b)q(ound.)75 ! 1503 y Fl(kill-word)f(\(M-d\))315 1558 y Fm(Kill)j(from)d(p)q(oin)o(t)h (to)f(the)h(end)g(of)f(the)h(curren)o(t)g(w)o(ord,)e(or)i(if)g(b)q(et)o ! (w)o(een)g(w)o(ords,)e(to)i(the)f(end)315 1613 y(of)h(the)g(next)g(w)o (ord.)20 b(W)l(ord)14 b(b)q(oundaries)j(are)e(the)g(same)g(as)g ! Fl(forward-word)p Fm(.)75 1707 y Fl(backward-kill-word)e(\(M-)592 ! 1705 y Ff(h)p 603 1679 73 2 v 603 1707 a Fe(DEL)p 603 ! 1714 V 674 1705 a Ff(i)689 1707 y Fl(\))315 1761 y Fm(Kill)k(the)d(w)o ! (ord)g(b)q(ehind)i(p)q(oin)o(t.)21 b(W)l(ord)14 b(b)q(oundaries)h(are)f ! (the)h(same)f(as)g Fl(backward-word)p Fm(.)75 1855 y ! Fl(unix-word-rubout)f(\(C-w\))315 1910 y Fm(Kill)18 b(the)e(w)o(ord)f ! (b)q(ehind)j(p)q(oin)o(t,)e(using)h(white)f(space)g(as)g(a)f(w)o(ord)g ! (b)q(oundary)l(.)23 b(The)16 b(killed)315 1965 y(text)f(is)g(sa)o(v)o ! (ed)g(on)g(the)h(kill-ring.)75 2059 y Fl(delete-horizontal-space)c ! (\(\))315 2114 y Fm(Delete)k(all)g(spaces)f(and)h(tabs)e(around)i(p)q ! (oin)o(t.)k(By)15 b(default,)h(this)f(is)h(un)o(b)q(ound.)75 ! 2208 y Fl(kill-region)e(\(\))315 2263 y Fm(Kill)j(the)f(text)e(in)i ! (the)g(curren)o(t)f(region.)20 b(By)15 b(default,)h(this)f(command)g ! (is)h(un)o(b)q(ound.)75 2357 y Fl(copy-region-as-kill)d(\(\))315 ! 2412 y Fm(Cop)o(y)j(the)i(text)e(in)i(the)f(region)g(to)g(the)g(kill)h (bu\013er,)f(so)g(it)g(can)g(b)q(e)h(y)o(ank)o(ed)f(righ)o(t)g(a)o(w)o ! (a)o(y)l(.)315 2466 y(By)e(default,)h(this)f(command)g(is)h(un)o(b)q ! (ound.)75 2560 y Fl(copy-backward-word)d(\(\))315 2615 y Fm(Cop)o(y)19 b(the)g(w)o(ord)g(b)q(efore)g(p)q(oin)o(t)h(to)e(the)i (kill)h(bu\013er.)32 b(The)19 b(w)o(ord)g(b)q(oundaries)h(are)f(the)315 ! 2670 y(same)c(as)g Fl(backward-word)p Fm(.)j(By)d(default,)g(this)h ! (command)f(is)h(un)o(b)q(ound.)p eop %%Page: 16 18 16 17 bop 75 -58 a Fm(16)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fl(copy-forward-word)d(\(\))315 204 y Fm(Cop)o(y)i(the)h(w)o(ord) ! e(follo)o(wing)j(p)q(oin)o(t)f(to)f(the)g(kill)j(bu\013er.)i(The)c(w)o ! (ord)f(b)q(oundaries)i(are)e(the)315 259 y(same)g(as)g ! Fl(forward-word)p Fm(.)j(By)d(default,)h(this)f(command)g(is)h(un)o(b)q ! (ound.)75 342 y Fl(yank)f(\(C-y\))315 397 y Fm(Y)l(ank)g(the)h(top)f ! (of)f(the)i(kill)h(ring)e(in)o(to)g(the)h(bu\013er)f(at)f(p)q(oin)o(t.) ! 75 481 y Fl(yank-pop)g(\(M-y\))315 535 y Fm(Rotate)i(the)h(kill-ring,)j ! (and)d(y)o(ank)g(the)h(new)f(top.)26 b(Y)l(ou)17 b(can)h(only)g(do)f ! (this)h(if)f(the)h(prior)315 590 y(command)d(is)h Fl(yank)e ! Fm(or)h Fl(yank-pop)p Fm(.)75 693 y Fb(1.4.5)30 b(Sp)r(ecifying)20 ! b(Numeric)h(Argumen)n(ts)75 806 y Fl(digit-argument)13 ! b(\()p Fg(M-0)p Fl(,)i Fg(M-1)p Fl(,)f(...)h Fg(M--)p ! Fl(\))315 861 y Fm(Add)f(this)g(digit)g(to)f(the)h(argumen)o(t)e ! (already)i(accum)o(ulating,)g(or)f(start)f(a)h(new)h(argumen)o(t.)315 ! 915 y Fg(M--)h Fm(starts)f(a)h(negativ)o(e)g(argumen)o(t.)75 ! 999 y Fl(universal-argument)e(\(\))315 1054 y Fm(This)g(is)h(another)e (w)o(a)o(y)g(to)g(sp)q(ecify)i(an)f(argumen)o(t.)18 b(If)13 b(this)g(command)g(is)g(follo)o(w)o(ed)g(b)o(y)g(one)315 ! 1108 y(or)h(more)h(digits,)g(optionally)h(with)f(a)g(leading)h(min)o ! (us)f(sign,)g(those)g(digits)g(de\014ne)h(the)f(ar-)315 ! 1163 y(gumen)o(t.)k(If)c(the)g(command)f(is)h(follo)o(w)o(ed)g(b)o(y)g ! (digits,)g(executing)g Fl(universal-argument)315 1218 y Fm(again)h(ends)g(the)g(n)o(umeric)h(argumen)o(t,)e(but)h(is)h (otherwise)f(ignored.)22 b(As)16 b(a)g(sp)q(ecial)h(case,)315 ! 1273 y(if)g(this)g(command)f(is)h(immediately)h(follo)o(w)o(ed)f(b)o(y) ! f(a)g(c)o(haracter)g(that)g(is)h(neither)g(a)f(digit)315 ! 1328 y(or)d(min)o(us)i(sign,)f(the)g(argumen)o(t)g(coun)o(t)f(for)h ! (the)g(next)g(command)g(is)g(m)o(ultiplied)j(b)o(y)d(four.)315 ! 1382 y(The)19 b(argumen)o(t)f(coun)o(t)g(is)h(initially)j(one,)d(so)f (executing)i(this)f(function)h(the)e(\014rst)h(time)315 ! 1437 y(mak)o(es)c(the)h(argumen)o(t)f(coun)o(t)h(four,)f(a)h(second)g (time)g(mak)o(es)g(the)g(argumen)o(t)f(coun)o(t)g(six-)315 ! 1492 y(teen,)g(and)g(so)g(on.)20 b(By)15 b(default,)h(this)f(is)h(not)f ! (b)q(ound)h(to)f(a)g(k)o(ey)l(.)75 1595 y Fb(1.4.6)30 b(Letting)20 b(Readline)g(T)n(yp)r(e)h(F)-5 b(or)19 b(Y)-5 ! b(ou)75 1708 y Fl(complete)14 b(\()305 1706 y Ff(h)p ! 317 1680 74 2 v 317 1708 a Fe(T)m(AB)p 317 1715 V 389 ! 1706 a Ff(i)404 1708 y Fl(\))315 1762 y Fm(A)o(ttempt)c(to)h(p)q ! (erform)g(completion)i(on)e(the)g(text)g(b)q(efore)h(p)q(oin)o(t.)19 ! b(The)11 b(actual)h(completion)315 1817 y(p)q(erformed)j(is)h (application-sp)q(eci\014)q(c.)23 b(The)15 b(default)h(is)g(\014lename) ! g(completion.)75 1901 y Fl(possible-completions)c(\(M-?\))315 ! 1955 y Fm(List)k(the)f(p)q(ossible)i(completions)f(of)f(the)g(text)g(b) ! q(efore)h(p)q(oin)o(t.)75 2039 y Fl(insert-completions)d(\(M-*\))315 ! 2093 y Fm(Insert)j(all)g(completions)g(of)f(the)g(text)g(b)q(efore)h(p) q(oin)o(t)f(that)g(w)o(ould)h(ha)o(v)o(e)f(b)q(een)h(generated)315 ! 2148 y(b)o(y)f Fl(possible-completions)p Fm(.)75 2232 ! y Fl(menu-complete)e(\(\))315 2286 y Fm(Similar)g(to)f Fl(complete)p Fm(,)f(but)h(replaces)h(the)f(w)o(ord)f(to)g(b)q(e)i ! (completed)f(with)h(a)e(single)j(matc)o(h)315 2341 y(from)k(the)h(list) h(of)e(p)q(ossible)j(completions.)32 b(Rep)q(eated)19 ! b(execution)h(of)f Fl(menu-complete)315 2396 y Fm(steps)h(through)g (the)g(list)h(of)f(p)q(ossible)i(completions,)g(inserting)f(eac)o(h)f ! (matc)o(h)f(in)i(turn.)315 2451 y(A)o(t)d(the)g(end)h(of)f(the)h(list)g (of)f(completions,)i(the)e(b)q(ell)j(is)d(rung)h(\(sub)s(ject)f(to)f ! (the)i(setting)315 2506 y(of)f Fl(bell-style)p Fm(\))e(and)i(the)g (original)h(text)f(is)g(restored.)28 b(An)19 b(argumen)o(t)e(of)g ! Fc(n)i Fm(mo)o(v)o(es)e Fc(n)315 2560 y Fm(p)q(ositions)h(forw)o(ard)e (in)j(the)e(list)h(of)f(matc)o(hes;)h(a)f(negativ)o(e)g(argumen)o(t)g ! (ma)o(y)g(b)q(e)h(used)g(to)315 2615 y(mo)o(v)o(e)g(bac)o(kw)o(ard)h (through)g(the)g(list.)32 b(This)20 b(command)f(is)h(in)o(tended)g(to)f ! (b)q(e)h(b)q(ound)g(to)315 2668 y Ff(h)p 327 2642 V 327 ! 2670 a Fe(T)m(AB)p 327 2678 V 399 2668 a Ff(i)414 2670 ! y Fm(,)15 b(but)g(is)h(un)o(b)q(ound)g(b)o(y)f(default.)p ! eop %%Page: 17 19 17 18 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(17)75 149 y Fl(delete-char-or-list)13 b(\(\))315 204 ! y Fm(Deletes)h(the)f(c)o(haracter)g(under)h(the)g(cursor)f(if)h(not)f ! (at)g(the)g(b)q(eginning)j(or)d(end)h(of)f(the)g(line)315 ! 259 y(\(lik)o(e)i Fl(delete-char)p Fm(\).)j(If)d(at)f(the)h(end)g(of)f ! (the)g(line,)i(b)q(eha)o(v)o(es)f(iden)o(tically)i(to)d ! Fl(possible-)315 314 y(completions)p Fm(.)k(This)e(command)f(is)h(un)o ! (b)q(ound)g(b)o(y)f(default.)75 428 y Fb(1.4.7)30 b(Keyb)r(oard)20 ! b(Macros)75 551 y Fl(start-kbd-macro)13 b(\(C-x)i(\(\))315 ! 606 y Fm(Begin)h(sa)o(ving)f(the)h(c)o(haracters)e(t)o(yp)q(ed)i(in)o ! (to)f(the)g(curren)o(t)g(k)o(eyb)q(oard)g(macro.)75 699 ! y Fl(end-kbd-macro)e(\(C-x)i(\)\))315 754 y Fm(Stop)f(sa)o(ving)f(the)h ! (c)o(haracters)f(t)o(yp)q(ed)h(in)o(to)f(the)h(curren)o(t)g(k)o(eyb)q ! (oard)f(macro)g(and)h(sa)o(v)o(e)f(the)315 809 y(de\014nition.)75 ! 902 y Fl(call-last-kbd-macro)g(\(C-x)h(e\))315 957 y ! Fm(Re-execute)k(the)g(last)f(k)o(eyb)q(oard)h(macro)f(de\014ned,)i(b)o ! (y)e(making)h(the)g(c)o(haracters)e(in)j(the)315 1012 ! y(macro)14 b(app)q(ear)i(as)f(if)g(t)o(yp)q(ed)h(at)e(the)i(k)o(eyb)q ! (oard.)75 1126 y Fb(1.4.8)30 b(Some)20 b(Miscellaneous)h(Commands)75 ! 1249 y Fl(re-read-init-file)13 b(\(C-x)h(C-r\))315 1304 ! y Fm(Read)d(in)g(the)g(con)o(ten)o(ts)g(of)f(the)h Fc(inputrc)k ! Fm(\014le,)d(and)g(incorp)q(orate)f(an)o(y)f(bindings)j(or)e(v)m ! (ariable)315 1358 y(assignmen)o(ts)k(found)h(there.)75 ! 1452 y Fl(abort)e(\(C-g\))315 1507 y Fm(Ab)q(ort)f(the)g(curren)o(t)h (editing)g(command)f(and)h(ring)f(the)h(terminal's)f(b)q(ell)i(\(sub)s ! (ject)e(to)g(the)315 1561 y(setting)i(of)g Fl(bell-style)p ! Fm(\).)75 1655 y Fl(do-uppercase-version)d(\(M-a,)j(M-b,)f(M-)p ! Fc(x)p Fl(,)h(...\))315 1710 y Fm(If)f(the)g(meta\014ed)g(c)o(haracter) ! f Fc(x)k Fm(is)d(lo)o(w)o(ercase,)g(run)g(the)g(command)f(that)h(is)g ! (b)q(ound)h(to)e(the)315 1764 y(corresp)q(onding)j(upp)q(ercase)g(c)o ! (haracter.)75 1858 y Fl(prefix-meta)e(\()377 1856 y Ff(h)p ! 389 1830 70 2 v 389 1858 a Fe(ESC)p 389 1866 V 456 1856 ! a Ff(i)471 1858 y Fl(\))315 1913 y Fm(Metafy)k(the)h(next)g(c)o (haracter)f(t)o(yp)q(ed.)30 b(This)20 b(is)f(for)f(k)o(eyb)q(oards)h ! (without)g(a)f(meta)g(k)o(ey)l(.)315 1968 y(T)o(yping)e(`)485 ! 1966 y Ff(h)p 496 1939 V 496 1968 a Fe(ESC)p 496 1975 ! V 563 1966 a Ff(i)593 1968 y Fl(f)p Fm(')f(is)h(equiv)m(alen)o(t)h(to)d ! (t)o(yping)i Fg(M-f)p Fm(.)75 2061 y Fl(undo)f(\(C-_)f(or)h(C-x)g ! (C-u\))315 2116 y Fm(Incremen)o(tal)h(undo,)f(separately)h(remem)o(b)q ! (ered)g(for)e(eac)o(h)h(line.)75 2209 y Fl(revert-line)f(\(M-r\))315 ! 2264 y Fm(Undo)j(all)g(c)o(hanges)g(made)f(to)g(this)h(line.)26 b(This)17 b(is)g(lik)o(e)h(executing)f(the)g Fl(undo)f ! Fm(command)315 2319 y(enough)g(times)f(to)g(get)f(bac)o(k)h(to)g(the)g ! (b)q(eginning.)75 2412 y Fl(tilde-expand)f(\(M-~\))315 ! 2467 y Fm(P)o(erform)g(tilde)j(expansion)f(on)f(the)g(curren)o(t)g(w)o ! (ord.)75 2560 y Fl(set-mark)f(\(C-@\))315 2615 y Fm(Set)i(the)h(mark)f (to)f(the)i(p)q(oin)o(t.)24 b(If)17 b(a)f(n)o(umeric)h(argumen)o(t)f ! (is)g(supplied,)j(the)e(mark)e(is)i(set)315 2670 y(to)e(that)f(p)q ! (osition.)p eop %%Page: 18 20 18 19 bop 75 -58 a Fm(18)1299 b(GNU)15 b(Readline)h(Library)75 ! 149 y Fl(exchange-point-and-mark)c(\(C-x)j(C-x\))315 ! 204 y Fm(Sw)o(ap)g(the)h(p)q(oin)o(t)g(with)g(the)g(mark.)k(The)c ! (curren)o(t)f(cursor)h(p)q(osition)g(is)g(set)g(to)f(the)g(sa)o(v)o(ed) ! 315 259 y(p)q(osition,)h(and)f(the)h(old)f(cursor)g(p)q(osition)h(is)g ! (sa)o(v)o(ed)f(as)g(the)g(mark.)75 347 y Fl(character-search)e(\(C-]\)) ! 315 402 y Fm(A)f(c)o(haracter)g(is)h(read)g(and)f(p)q(oin)o(t)h(is)g ! (mo)o(v)o(ed)f(to)g(the)g(next)h(o)q(ccurrence)g(of)f(that)g(c)o ! (haracter.)315 456 y(A)j(negativ)o(e)h(coun)o(t)f(searc)o(hes)g(for)f ! (previous)i(o)q(ccurrences.)75 544 y Fl(character-search-backward)c ! (\(M-C-]\))315 599 y Fm(A)22 b(c)o(haracter)g(is)h(read)f(and)h(p)q ! (oin)o(t)g(is)g(mo)o(v)o(ed)f(to)g(the)g(previous)h(o)q(ccurrence)h(of) ! e(that)315 654 y(c)o(haracter.)d(A)c(negativ)o(e)h(coun)o(t)f(searc)o ! (hes)g(for)f(subsequen)o(t)i(o)q(ccurrences.)75 741 y ! Fl(insert-comment)d(\(M-#\))315 796 y Fm(Without)18 b(a)f(n)o(umeric)i ! (argumen)o(t,)e(the)h(v)m(alue)h(of)f(the)f Fl(comment-begin)f ! Fm(v)m(ariable)k(is)e(in-)315 851 y(serted)e(at)f(the)h(b)q(eginning)i ! (of)d(the)h(curren)o(t)g(line.)23 b(If)16 b(a)g(n)o(umeric)h(argumen)o ! (t)e(is)h(supplied,)315 906 y(this)j(command)f(acts)g(as)f(a)h(toggle:) ! 26 b(if)19 b(the)f(c)o(haracters)g(at)f(the)i(b)q(eginning)h(of)e(the)g ! (line)315 960 y(do)d(not)g(matc)o(h)g(the)g(v)m(alue)i(of)e ! Fl(comment-begin)p Fm(,)e(the)i(v)m(alue)i(is)f(inserted,)f(otherwise)h ! (the)315 1015 y(c)o(haracters)j(in)i Fl(comment-begin)d ! Fm(are)i(deleted)i(from)d(the)h(b)q(eginning)i(of)e(the)g(line.)36 ! b(In)315 1070 y(either)16 b(case,)f(the)g(line)i(is)f(accepted)f(as)g ! (if)h(a)f(newline)i(had)e(b)q(een)i(t)o(yp)q(ed.)75 1158 ! y Fl(dump-functions)c(\(\))315 1213 y Fm(Prin)o(t)g(all)h(of)f(the)g (functions)h(and)g(their)g(k)o(ey)f(bindings)i(to)d(the)i(Readline)g ! (output)f(stream.)315 1267 y(If)j(a)g(n)o(umeric)g(argumen)o(t)f(is)i (supplied,)h(the)e(output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o ! (y)f(that)315 1322 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fc(inputrc)k Fm(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o ! (y)f(default.)75 1410 y Fl(dump-variables)e(\(\))315 ! 1465 y Fm(Prin)o(t)e(all)g(of)f(the)h(settable)g(v)m(ariables)h(and)f ! (their)g(v)m(alues)h(to)e(the)h(Readline)h(output)e(stream.)315 ! 1519 y(If)16 b(a)g(n)o(umeric)g(argumen)o(t)f(is)i(supplied,)h(the)e (output)f(is)i(formatted)d(in)j(suc)o(h)f(a)g(w)o(a)o(y)f(that)315 ! 1574 y(it)g(can)h(b)q(e)g(made)f(part)f(of)h(an)g Fc(inputrc)k Fm(\014le.)i(This)16 b(command)f(is)h(un)o(b)q(ound)g(b)o(y)f(default.) ! 75 1662 y Fl(dump-macros)f(\(\))315 1717 y Fm(Prin)o(t)j(all)h(of)e ! (the)h(Readline)h(k)o(ey)f(sequences)h(b)q(ound)g(to)e(macros)g(and)h ! (the)g(strings)g(they)315 1771 y(output.)26 b(If)18 b(a)f(n)o(umeric)h (argumen)o(t)f(is)h(supplied,)i(the)d(output)g(is)h(formatted)e(in)j ! (suc)o(h)e(a)315 1826 y(w)o(a)o(y)d(that)g(it)i(can)f(b)q(e)g(made)g (part)g(of)f(an)h Fc(inputrc)k Fm(\014le.)i(This)15 b(command)g(is)h ! (un)o(b)q(ound)g(b)o(y)315 1881 y(default.)75 1969 y ! Fl(emacs-editing-mode)d(\(C-e\))315 2024 y Fm(When)j(in)g ! Fl(vi)e Fm(command)i(mo)q(de,)f(this)g(causes)h(a)f(switc)o(h)g(to)g ! Fl(emacs)f Fm(editing)j(mo)q(de.)75 2111 y Fl(vi-editing-mode)c ! (\(M-C-j\))315 2166 y Fm(When)j(in)g Fl(emacs)e Fm(editing)j(mo)q(de,)e ! (this)g(causes)h(a)f(switc)o(h)g(to)g Fl(vi)f Fm(editing)j(mo)q(de.)75 ! 2290 y Fk(1.5)33 b(Readline)23 b(vi)h(Mo)r(de)137 2385 ! y Fm(While)13 b(the)f(Readline)i(library)e(do)q(es)g(not)g(ha)o(v)o(e)f ! (a)h(full)h(set)f(of)f Fl(vi)g Fm(editing)j(functions,)f(it)f(do)q(es)g ! (con)o(tain)75 2440 y(enough)17 b(to)g(allo)o(w)g(simple)h(editing)h ! (of)d(the)i(line.)27 b(The)17 b(Readline)h Fl(vi)f Fm(mo)q(de)g(b)q ! (eha)o(v)o(es)g(as)g(sp)q(eci\014ed)i(in)75 2495 y(the)c ! Fh(posix)g Fm(1003.2)f(standard.)137 2560 y(In)h(order)g(to)f(switc)o ! (h)g(in)o(teractiv)o(ely)i(b)q(et)o(w)o(een)f Fl(emacs)e ! Fm(and)i Fl(vi)f Fm(editing)i(mo)q(des,)f(use)f(the)h(command)75 ! 2615 y Fg(M-C-j)j Fm(\(b)q(ound)i(to)e(emacs-editing-mo)q(de)j(when)e ! (in)h Fl(vi)f Fm(mo)q(de)g(and)g(to)f(vi-editing-mo)q(de)k(in)e ! Fl(emacs)75 2670 y Fm(mo)q(de\).)g(The)15 b(Readline)i(default)f(is)f ! Fl(emacs)g Fm(mo)q(de.)p eop ! %%Page: 19 21 ! 19 20 bop 75 -58 a Fm(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1055 ! b(19)137 149 y(When)16 b(y)o(ou)e(en)o(ter)h(a)g(line)i(in)e ! Fl(vi)g Fm(mo)q(de,)g(y)o(ou)g(are)f(already)i(placed)g(in)g ! (`insertion')f(mo)q(de,)g(as)g(if)g(y)o(ou)75 204 y(had)e(t)o(yp)q(ed)h ! (an)f(`)p Fl(i)p Fm('.)18 b(Pressing)608 202 y Ff(h)p ! 620 176 70 2 v 620 204 a Fe(ESC)p 620 212 V 687 202 a ! Ff(i)715 204 y Fm(switc)o(hes)13 b(y)o(ou)g(in)o(to)g(`command')f(mo)q ! (de,)i(where)f(y)o(ou)g(can)g(edit)h(the)75 259 y(text)i(of)h(the)g ! (line)h(with)g(the)f(standard)f Fl(vi)h Fm(mo)o(v)o(emen)o(t)f(k)o ! (eys,)g(mo)o(v)o(e)g(to)h(previous)g(history)g(lines)i(with)75 ! 314 y(`)p Fl(k)p Fm(')14 b(and)i(subsequen)o(t)f(lines)i(with)f(`)p Fl(j)p Fm(',)e(and)h(so)g(forth.)p eop ! %%Page: 20 22 ! 20 21 bop 75 -58 a Fm(20)1299 b(GNU)15 b(Readline)h(Library)p ! eop ! %%Page: -1 23 ! -1 22 bop 1862 -58 a Fm(i)75 149 y Fi(T)-7 b(able)27 b(of)f(Con)n(ten)n(ts)75 320 y Fk(1)67 b(Command)22 b(Line)i(Editing)d Fa(.)10 b(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)h *************** *** 1916,1920 **** b Fm(4)374 882 y(1.3.2)44 b(Conditional)16 b(Init)g(Constructs)5 b Fd(.)i(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)g(.)f(.)19 b Fm(8)374 937 y(1.3.3)44 b(Sample)16 b(Init)g(File)11 b Fd(.)e(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) --- 1964,1968 ---- b Fm(4)374 882 y(1.3.2)44 b(Conditional)16 b(Init)g(Constructs)5 b Fd(.)i(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)g(.)f(.)19 b Fm(9)374 937 y(1.3.3)44 b(Sample)16 b(Init)g(File)11 b Fd(.)e(.)e(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h (.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) *************** *** 1929,1943 **** b(Commands)14 b(F)l(or)h(Changing)h(T)l(ext)e Fd(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 ! b Fm(13)374 1211 y(1.4.4)44 b(Killing)18 b(And)e(Y)l(anking)9 b Fd(.)e(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24 b Fm(14)374 1266 y(1.4.5)44 b(Sp)q(ecifying)17 b(Numeric)f(Argumen)o(ts)c Fd(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)27 ! b Fm(15)374 1320 y(1.4.6)44 b(Letting)15 b(Readline)i(T)o(yp)q(e)e(F)l (or)g(Y)l(ou)10 b Fd(.)d(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)25 b Fm(16)374 1375 y(1.4.7)44 b(Keyb)q(oard)15 b(Macros)6 b Fd(.)h(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)21 ! b Fm(16)374 1430 y(1.4.8)44 b(Some)15 b(Miscellaneous)i(Commands)7 b Fd(.)g(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) 22 b Fm(17)224 1485 y(1.5)45 b(Readline)16 b(vi)g(Mo)q(de)e --- 1977,1991 ---- b(Commands)14 b(F)l(or)h(Changing)h(T)l(ext)e Fd(.)8 b(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)30 ! b Fm(14)374 1211 y(1.4.4)44 b(Killing)18 b(And)e(Y)l(anking)9 b Fd(.)e(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)24 b Fm(15)374 1266 y(1.4.5)44 b(Sp)q(ecifying)17 b(Numeric)f(Argumen)o(ts)c Fd(.)c(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)27 ! b Fm(16)374 1320 y(1.4.6)44 b(Letting)15 b(Readline)i(T)o(yp)q(e)e(F)l (or)g(Y)l(ou)10 b Fd(.)d(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) h(.)f(.)h(.)f(.)25 b Fm(16)374 1375 y(1.4.7)44 b(Keyb)q(oard)15 b(Macros)6 b Fd(.)h(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)21 ! b Fm(17)374 1430 y(1.4.8)44 b(Some)15 b(Miscellaneous)i(Commands)7 b Fd(.)g(.)g(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) 22 b Fm(17)224 1485 y(1.5)45 b(Readline)16 b(vi)g(Mo)q(de)e *************** *** 1945,1950 **** f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)28 b Fm(18)p eop ! %%Page: -2 22 ! -2 21 bop 75 -58 a Fm(ii)1321 b(GNU)15 b(Readline)h(Library)p eop %%Trailer --- 1993,1998 ---- f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)28 b Fm(18)p eop ! %%Page: -2 24 ! -2 23 bop 75 -58 a Fm(ii)1321 b(GNU)15 b(Readline)h(Library)p eop %%Trailer diff -Nrc2 readline-4.2a/doc/rluserman.texinfo readline-4.3/doc/rluserman.texinfo *** readline-4.2a/doc/rluserman.texinfo Fri Feb 2 11:59:01 2001 --- readline-4.3/doc/rluserman.texinfo Tue Apr 16 17:12:24 2002 *************** *** 18,22 **** 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 --- 18,22 ---- programs that need to provide a command line interface. ! Copyright (C) 1988-2002 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 73,77 **** @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-2001 Free Software Foundation, Inc. @end titlepage --- 73,77 ---- @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-2002 Free Software Foundation, Inc. @end titlepage diff -Nrc2 readline-4.2a/emacs_keymap.c readline-4.3/emacs_keymap.c *** readline-4.2a/emacs_keymap.c Mon Oct 30 12:01:50 2000 --- readline-4.3/emacs_keymap.c Thu Nov 29 12:04:56 2001 *************** *** 36,44 **** { ISFUNC, rl_set_mark }, /* Control-@ */ { ISFUNC, rl_beg_of_line }, /* Control-a */ ! { ISFUNC, rl_backward }, /* Control-b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ { ISFUNC, rl_delete }, /* Control-d */ { ISFUNC, rl_end_of_line }, /* Control-e */ ! { ISFUNC, rl_forward }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ --- 36,44 ---- { ISFUNC, rl_set_mark }, /* Control-@ */ { ISFUNC, rl_beg_of_line }, /* Control-a */ ! { ISFUNC, rl_backward_char }, /* Control-b */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */ { ISFUNC, rl_delete }, /* Control-d */ { ISFUNC, rl_end_of_line }, /* Control-e */ ! { ISFUNC, rl_forward_char }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ { ISFUNC, rl_rubout }, /* Control-h */ diff -Nrc2 readline-4.2a/examples/Inputrc readline-4.3/examples/Inputrc *** readline-4.2a/examples/Inputrc Tue Jul 26 13:00:35 1994 --- readline-4.3/examples/Inputrc Tue Apr 16 16:56:08 2002 *************** *** 5,8 **** --- 5,24 ---- # + # Copyright (C) 1989-2002 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + # In all programs, all terminals, make sure this is bound. "\C-x\C-r": re-read-init-file diff -Nrc2 readline-4.2a/examples/Makefile.in readline-4.3/examples/Makefile.in *** readline-4.2a/examples/Makefile.in Wed May 2 10:15:02 2001 --- readline-4.3/examples/Makefile.in Thu Jan 24 10:16:05 2002 *************** *** 39,43 **** CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) ! LDFLAGS = -g -L.. READLINE_LIB = ../libreadline.a --- 39,43 ---- CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS) ! LDFLAGS = -g -L.. @LDFLAGS@ READLINE_LIB = ../libreadline.a *************** *** 50,54 **** $(CC) $(CCFLAGS) -c $< ! EXECUTABLES = fileman rltest rl rlversion histexamp OBJECTS = fileman.o rltest.o rl.o rlversion.o histexamp.o --- 50,54 ---- $(CC) $(CCFLAGS) -c $< ! EXECUTABLES = fileman rltest rl rlcat rlversion histexamp OBJECTS = fileman.o rltest.o rl.o rlversion.o histexamp.o *************** *** 56,66 **** everything: all rlfe ! rl: rl.o $(CC) $(LDFLAGS) -o $@ rl.o -lreadline $(TERMCAP_LIB) ! fileman: fileman.o $(CC) $(LDFLAGS) -o $@ fileman.o -lreadline $(TERMCAP_LIB) ! rltest: rltest.o $(CC) $(LDFLAGS) -o $@ rltest.o -lreadline $(TERMCAP_LIB) --- 56,69 ---- everything: all rlfe ! rl: rl.o $(READLINE_LIB) $(CC) $(LDFLAGS) -o $@ rl.o -lreadline $(TERMCAP_LIB) ! rlcat: rlcat.o $(READLINE_LIB) ! $(CC) $(LDFLAGS) -o $@ rlcat.o -lreadline $(TERMCAP_LIB) ! ! fileman: fileman.o $(READLINE_LIB) $(CC) $(LDFLAGS) -o $@ fileman.o -lreadline $(TERMCAP_LIB) ! rltest: rltest.o $(READLINE_LIB) $(CC) $(LDFLAGS) -o $@ rltest.o -lreadline $(TERMCAP_LIB) diff -Nrc2 readline-4.2a/examples/fileman.c readline-4.3/examples/fileman.c *** readline-4.2a/examples/fileman.c Wed Aug 22 15:32:23 2001 --- readline-4.3/examples/fileman.c Tue Apr 16 16:50:55 2002 *************** *** 1,2 **** --- 1,22 ---- + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + /* fileman.c -- A tiny application which demonstrates how to use the GNU Readline library. This application interactively allows users diff -Nrc2 readline-4.2a/examples/histexamp.c readline-4.3/examples/histexamp.c *** readline-4.2a/examples/histexamp.c Tue Feb 6 10:35:21 2001 --- readline-4.3/examples/histexamp.c Tue Apr 16 16:52:36 2002 *************** *** 1,2 **** --- 1,22 ---- + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #include diff -Nrc2 readline-4.2a/examples/manexamp.c readline-4.3/examples/manexamp.c *** readline-4.2a/examples/manexamp.c Fri Feb 2 12:14:15 2001 --- readline-4.3/examples/manexamp.c Tue Apr 16 16:53:01 2002 *************** *** 1,4 **** --- 1,24 ---- /* manexamp.c -- The examples which appear in the documentation are here. */ + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #include #include diff -Nrc2 readline-4.2a/examples/rl.c readline-4.3/examples/rl.c *** readline-4.2a/examples/rl.c Wed Nov 1 14:04:30 2000 --- readline-4.3/examples/rl.c Tue Apr 16 16:53:16 2002 *************** *** 6,9 **** --- 6,29 ---- */ + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #if defined (HAVE_CONFIG_H) # include diff -Nrc2 readline-4.2a/examples/rlcat.c readline-4.3/examples/rlcat.c *** readline-4.2a/examples/rlcat.c Wed Dec 31 19:00:00 1969 --- readline-4.3/examples/rlcat.c Tue Apr 16 16:53:30 2002 *************** *** 0 **** --- 1,174 ---- + /* + * rlcat - cat(1) using readline + * + * usage: rlcat + */ + + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + + #if defined (HAVE_CONFIG_H) + # include + #endif + + #ifdef HAVE_UNISTD_H + # include + #endif + + #include + #include "posixstat.h" + + #include + #include + #include + #include + + #ifndef errno + extern int errno; + #endif + + #if defined (READLINE_LIBRARY) + # include "readline.h" + # include "history.h" + #else + # include + # include + #endif + + extern int optind; + extern char *optarg; + + static int stdcat(); + + static char *progname; + static int vflag; + + static void + usage() + { + fprintf (stderr, "%s: usage: %s [-vEVN] [filename]\n", progname, progname); + } + + int + main (argc, argv) + int argc; + char **argv; + { + char *temp; + int opt, Vflag, Nflag; + + progname = strrchr(argv[0], '/'); + if (progname == 0) + progname = argv[0]; + else + progname++; + + vflag = Vflag = Nflag = 0; + while ((opt = getopt(argc, argv, "vEVN")) != EOF) + { + switch (opt) + { + case 'v': + vflag = 1; + break; + case 'V': + Vflag = 1; + break; + case 'E': + Vflag = 0; + break; + case 'N': + Nflag = 1; + break; + default: + usage (); + exit (2); + } + } + + argc -= optind; + argv += optind; + + if (isatty(0) == 0 || argc || Nflag) + return stdcat(argc, argv); + + rl_variable_bind ("editing-mode", Vflag ? "vi" : "emacs"); + while (temp = readline ("")) + { + if (*temp) + add_history (temp); + printf ("%s\n", temp); + } + + return (ferror (stdout)); + } + + static int + fcopy(fp) + FILE *fp; + { + int c; + char *x; + + while ((c = getc(fp)) != EOF) + { + if (vflag && isascii ((unsigned char)c) && isprint((unsigned char)c) == 0) + { + x = rl_untranslate_keyseq (c); + if (fputs (x, stdout) != 0) + return 1; + } + else if (putchar (c) == EOF) + return 1; + } + return (ferror (stdout)); + } + + int + stdcat (argc, argv) + int argc; + char **argv; + { + int i, fd, r; + char *s; + FILE *fp; + + if (argc == 0) + return (fcopy(stdin)); + + for (i = 0, r = 1; i < argc; i++) + { + if (*argv[i] == '-' && argv[i][1] == 0) + fp = stdin; + else + { + fp = fopen (argv[i], "r"); + if (fp == 0) + { + fprintf (stderr, "%s: %s: cannot open: %s\n", progname, argv[i], strerror(errno)); + continue; + } + } + r = fcopy (fp); + if (fp != stdin) + fclose(fp); + } + return r; + } diff -Nrc2 readline-4.2a/examples/rltest.c readline-4.3/examples/rltest.c *** readline-4.2a/examples/rltest.c Thu Sep 2 10:58:41 1999 --- readline-4.3/examples/rltest.c Tue Apr 16 16:53:52 2002 *************** *** 5,8 **** --- 5,28 ---- /* **************************************************************** */ + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #if defined (HAVE_CONFIG_H) #include diff -Nrc2 readline-4.2a/examples/rlversion.c readline-4.3/examples/rlversion.c *** readline-4.2a/examples/rlversion.c Thu Sep 2 10:59:36 1999 --- readline-4.3/examples/rlversion.c Tue Apr 16 16:55:29 2002 *************** *** 3,6 **** --- 3,26 ---- */ + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #if defined (HAVE_CONFIG_H) # include diff -Nrc2 readline-4.2a/funmap.c readline-4.3/funmap.c *** readline-4.2a/funmap.c Wed Aug 22 09:39:01 2001 --- readline-4.3/funmap.c Tue Jan 22 12:18:14 2002 *************** *** 61,65 **** { "accept-line", rl_newline }, { "arrow-key-prefix", rl_arrow_keys }, ! { "backward-char", rl_backward }, { "backward-delete-char", rl_rubout }, { "backward-kill-line", rl_backward_kill_line }, --- 61,66 ---- { "accept-line", rl_newline }, { "arrow-key-prefix", rl_arrow_keys }, ! { "backward-byte", rl_backward_byte }, ! { "backward-char", rl_backward_char }, { "backward-delete-char", rl_rubout }, { "backward-kill-line", rl_backward_kill_line }, *************** *** 92,96 **** { "exchange-point-and-mark", rl_exchange_point_and_mark }, { "forward-backward-delete-char", rl_rubout_or_delete }, ! { "forward-char", rl_forward }, { "forward-search-history", rl_forward_search_history }, { "forward-word", rl_forward_word }, --- 93,98 ---- { "exchange-point-and-mark", rl_exchange_point_and_mark }, { "forward-backward-delete-char", rl_rubout_or_delete }, ! { "forward-byte", rl_forward_byte }, ! { "forward-char", rl_forward_char }, { "forward-search-history", rl_forward_search_history }, { "forward-word", rl_forward_word }, *************** *** 109,112 **** --- 111,115 ---- { "non-incremental-forward-search-history-again", rl_noninc_forward_search_again }, { "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again }, + { "overwrite-mode", rl_overwrite_mode }, #ifdef __CYGWIN__ { "paste-from-clipboard", rl_paste_from_clipboard }, diff -Nrc2 readline-4.2a/histexpand.c readline-4.3/histexpand.c *** readline-4.2a/histexpand.c Wed Aug 22 09:39:07 2001 --- readline-4.3/histexpand.c Tue Apr 16 11:47:59 2002 *************** *** 42,50 **** #endif ! #if defined (HAVE_STRING_H) ! # include ! #else ! # include ! #endif /* !HAVE_STRING_H */ #include "history.h" --- 42,46 ---- #endif ! #include "rlmbutil.h" #include "history.h" *************** *** 59,62 **** --- 55,60 ---- typedef int _hist_search_func_t PARAMS((const char *, int)); + extern int rl_byte_oriented; /* declared in mbutil.c */ + static char error_pointer; *************** *** 205,214 **** /* Only a closing `?' or a newline delimit a substring search string. */ for (local_index = i; c = string[i]; i++) ! if ((!substring_okay && (whitespace (c) || c == ':' || ! (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || ! string[i] == delimiting_quote)) || ! string[i] == '\n' || ! (substring_okay && string[i] == '?')) ! break; which = i - local_index; --- 203,230 ---- /* Only a closing `?' or a newline delimit a substring search string. */ for (local_index = i; c = string[i]; i++) ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! int v; ! mbstate_t ps; ! ! memset (&ps, 0, sizeof (mbstate_t)); ! /* These produce warnings because we're passing a const string to a ! function that takes a non-const string. */ ! _rl_adjust_point (string, i, &ps); ! if ((v = _rl_get_char_len (string + i, &ps)) > 1) ! { ! i += v - 1; ! continue; ! } ! } ! else ! #endif /* HANDLE_MULTIBYTE */ ! if ((!substring_okay && (whitespace (c) || c == ':' || ! (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) || ! string[i] == delimiting_quote)) || ! string[i] == '\n' || ! (substring_okay && string[i] == '?')) ! break; which = i - local_index; *************** *** 406,416 **** { register int si, i, j, k; ! char *s = (char *) NULL; i = *iptr; for (si = i; str[si] && str[si] != delimiter; si++) ! if (str[si] == '\\' && str[si + 1] == delimiter) ! si++; if (si > i || is_rhs) --- 422,452 ---- { register int si, i, j, k; ! char *s; ! #if defined (HANDLE_MULTIBYTE) ! mbstate_t ps; ! #endif + s = (char *)NULL; i = *iptr; + #if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); + _rl_adjust_point (str, i, &ps); + #endif + for (si = i; str[si] && str[si] != delimiter; si++) ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! int v; ! if ((v = _rl_get_char_len (str + si, &ps)) > 1) ! si += v - 1; ! else if (str[si] == '\\' && str[si + 1] == delimiter) ! si++; ! } ! else ! #endif /* HANDLE_MULTIBYTE */ ! if (str[si] == '\\' && str[si + 1] == delimiter) ! si++; if (si > i || is_rhs) *************** *** 485,488 **** --- 521,529 ---- char *event, *temp, *result, *tstr, *t, c, *word_spec; int result_len; + #if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + #endif result = (char *)xmalloc (result_len = 128); *************** *** 515,520 **** quoted string. If we have to search for some text ("!foo"), allow the delimiter to end the search string. */ ! if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) ! quoted_search_delimiter = string[i - 1]; event = get_history_event (string, &i, quoted_search_delimiter); } --- 556,574 ---- quoted string. If we have to search for some text ("!foo"), allow the delimiter to end the search string. */ ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! int c, l; ! l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY); ! c = string[l]; ! /* XXX - original patch had i - 1 ??? If i == 0 it would fail. */ ! if (i && (c == '\'' || c == '"')) ! quoted_search_delimiter = c; ! } ! else ! #endif /* HANDLE_MULTIBYTE */ ! if (i && (string[i - 1] == '\'' || string[i - 1] == '"')) ! quoted_search_delimiter = string[i - 1]; ! event = get_history_event (string, &i, quoted_search_delimiter); } *************** *** 635,639 **** { if (i + 2 < (int)strlen (string)) ! delimiter = string[i + 2]; else break; /* no search delimiter */ --- 689,706 ---- { if (i + 2 < (int)strlen (string)) ! { ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! _rl_adjust_point (string, i + 2, &ps); ! if (_rl_get_char_len (string + i + 2, &ps) > 1) ! delimiter = 0; ! else ! delimiter = string[i + 2]; ! } ! else ! #endif /* HANDLE_MULTIBYTE */ ! delimiter = string[i + 2]; ! } else break; /* no search delimiter */ *************** *** 820,823 **** --- 887,895 ---- char *result; + #if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; + mbstate_t ps; + #endif + /* Used when adding the string. */ char *temp; *************** *** 862,865 **** --- 934,941 ---- else { + #if defined (HANDLE_MULTIBYTE) + memset (&ps, 0, sizeof (mbstate_t)); + #endif + string = hstring; /* If not quick substitution, still maybe have to do expansion. */ *************** *** 869,874 **** for (i = 0; string[i]; i++) { cc = string[i + 1]; ! /* The history_comment_char, if set, appearing that the beginning of a word signifies that the rest of the line should not have history expansion performed on it. --- 945,963 ---- for (i = 0; string[i]; i++) { + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int v; + v = _rl_get_char_len (string + i, &ps); + if (v > 1) + { + i += v - 1; + continue; + } + } + #endif /* HANDLE_MULTIBYTE */ + cc = string[i + 1]; ! /* The history_comment_char, if set, appearing at the beginning of a word signifies that the rest of the line should not have history expansion performed on it. *************** *** 932,935 **** --- 1021,1048 ---- continue; } + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + int k, c; + + c = tchar; + memset (mb, 0, sizeof (mb)); + for (k = 0; k < MB_LEN_MAX; k++) + { + mb[k] = (char)c; + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_get_char_len (mb, &ps) == -2) + c = string[++i]; + else + break; + } + if (strlen (mb) > 1) + { + ADD_STRING (mb); + break; + } + } + #endif /* HANDLE_MULTIBYTE */ if (tchar == history_expansion_char) diff -Nrc2 readline-4.2a/histfile.c readline-4.3/histfile.c *** readline-4.2a/histfile.c Thu Aug 2 13:01:26 2001 --- readline-4.3/histfile.c Tue Mar 26 09:00:26 2002 *************** *** 49,58 **** #endif ! #if defined (HAVE_STRING_H) ! # include ! #else ! # include ! #endif /* !HAVE_STRING_H */ /* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment --- 49,72 ---- #endif ! #if defined (__EMX__) || defined (__CYGWIN__) ! # undef HAVE_MMAP ! #endif + #ifdef HAVE_MMAP + # include + + # ifdef MAP_FILE + # define MAP_RFLAGS (MAP_FILE|MAP_PRIVATE) + # define MAP_WFLAGS (MAP_FILE|MAP_SHARED) + # else + # define MAP_RFLAGS MAP_PRIVATE + # define MAP_WFLAGS MAP_SHARED + # endif + + # ifndef MAP_FAILED + # define MAP_FAILED ((void *)-1) + # endif + + #endif /* HAVE_MMAP */ /* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment *************** *** 138,143 **** int from, to; { ! register int line_start, line_end; ! char *input, *buffer; int file, current_line, chars_read; struct stat finfo; --- 152,157 ---- int from, to; { ! register char *line_start, *line_end; ! char *input, *buffer, *bufend; int file, current_line, chars_read; struct stat finfo; *************** *** 158,178 **** #if defined (EFBIG) errno = EFBIG; #endif goto error_and_exit; } ! buffer = (char *)xmalloc (file_size + 1); chars_read = read (file, buffer, file_size); if (chars_read < 0) { error_and_exit: if (file >= 0) close (file); FREE (input); FREE (buffer); ! return (errno); } --- 172,208 ---- #if defined (EFBIG) errno = EFBIG; + #elif defined (EOVERFLOW) + errno = EOVERFLOW; #endif goto error_and_exit; } ! #ifdef HAVE_MMAP ! /* We map read/write and private so we can change newlines to NULs without ! affecting the underlying object. */ ! buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0); ! if ((void *)buffer == MAP_FAILED) ! goto error_and_exit; ! chars_read = file_size; ! #else ! buffer = (char *)malloc (file_size + 1); ! if (buffer == 0) ! goto error_and_exit; chars_read = read (file, buffer, file_size); + #endif if (chars_read < 0) { error_and_exit: + chars_read = errno; if (file >= 0) close (file); FREE (input); + #ifndef HAVE_MMAP FREE (buffer); + #endif ! return (chars_read); } *************** *** 184,210 **** /* Start at beginning of file, work to end. */ ! line_start = line_end = current_line = 0; /* Skip lines until we are at FROM. */ ! while (line_start < chars_read && current_line < from) ! { ! for (line_end = line_start; line_end < chars_read; line_end++) ! if (buffer[line_end] == '\n') ! { ! current_line++; ! line_start = line_end + 1; ! if (current_line == from) ! break; ! } ! } /* If there are lines left to gobble, then gobble them now. */ ! for (line_end = line_start; line_end < chars_read; line_end++) ! if (buffer[line_end] == '\n') { ! buffer[line_end] = '\0'; ! if (buffer[line_start]) ! add_history (buffer + line_start); current_line++; --- 214,236 ---- /* Start at beginning of file, work to end. */ ! bufend = buffer + chars_read; ! current_line = 0; /* Skip lines until we are at FROM. */ ! for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++) ! if (*line_end == '\n') ! { ! current_line++; ! line_start = line_end + 1; ! } /* If there are lines left to gobble, then gobble them now. */ ! for (line_end = line_start; line_end < bufend; line_end++) ! if (*line_end == '\n') { ! *line_end = '\0'; ! if (*line_start) ! add_history (line_start); current_line++; *************** *** 217,221 **** --- 243,251 ---- FREE (input); + #ifndef HAVE_MMAP FREE (buffer); + #else + munmap (buffer, file_size); + #endif return (0); *************** *** 230,236 **** int lines; { ! register int i; int file, chars_read, rv; - char *buffer, *filename; struct stat finfo; size_t file_size; --- 260,265 ---- int lines; { ! char *buffer, *filename, *bp; int file, chars_read, rv; struct stat finfo; size_t file_size; *************** *** 277,281 **** } ! buffer = (char *)xmalloc (file_size + 1); chars_read = read (file, buffer, file_size); close (file); --- 306,316 ---- } ! buffer = (char *)malloc (file_size + 1); ! if (buffer == 0) ! { ! close (file); ! goto truncate_exit; ! } ! chars_read = read (file, buffer, file_size); close (file); *************** *** 289,295 **** /* Count backwards from the end of buffer until we have passed LINES lines. */ ! for (i = chars_read - 1; lines && i; i--) { ! if (buffer[i] == '\n') lines--; } --- 324,330 ---- /* Count backwards from the end of buffer until we have passed LINES lines. */ ! for (bp = buffer + chars_read - 1; lines && bp > buffer; bp--) { ! if (*bp == '\n') lines--; } *************** *** 300,307 **** the current value of i and 0. Otherwise, write from the start of this line until the end of the buffer. */ ! for ( ; i; i--) ! if (buffer[i] == '\n') { ! i++; break; } --- 335,342 ---- the current value of i and 0. Otherwise, write from the start of this line until the end of the buffer. */ ! for ( ; bp > buffer; bp--) ! if (*bp == '\n') { ! bp++; break; } *************** *** 309,319 **** /* Write only if there are more lines in the file than we want to truncate to. */ ! if (i && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1)) { ! write (file, buffer + i, chars_read - i); #if defined (__BEOS__) /* BeOS ignores O_TRUNC. */ ! ftruncate (file, chars_read - i); #endif --- 344,354 ---- /* Write only if there are more lines in the file than we want to truncate to. */ ! if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1)) { ! write (file, bp, chars_read - (bp - buffer)); #if defined (__BEOS__) /* BeOS ignores O_TRUNC. */ ! ftruncate (file, chars_read - (bp - buffer)); #endif *************** *** 340,345 **** --- 375,385 ---- char *output; int file, mode, rv; + size_t cursize; + #ifdef HAVE_MMAP + mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY; + #else mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY; + #endif output = history_filename (filename); rv = 0; *************** *** 351,354 **** --- 391,398 ---- } + #ifdef HAVE_MMAP + cursize = overwrite ? 0 : lseek (file, 0, SEEK_END); + #endif + if (nelements > history_length) nelements = history_length; *************** *** 368,372 **** /* Allocate the buffer, and fill it. */ ! buffer = (char *)xmalloc (buffer_size); for (j = 0, i = history_length - nelements; i < history_length; i++) --- 412,437 ---- /* Allocate the buffer, and fill it. */ ! #ifdef HAVE_MMAP ! if (ftruncate (file, buffer_size+cursize) == -1) ! goto mmap_error; ! buffer = (char *)mmap (0, buffer_size, PROT_READ|PROT_WRITE, MAP_WFLAGS, file, cursize); ! if ((void *)buffer == MAP_FAILED) ! { ! mmap_error: ! rv = errno; ! FREE (output); ! close (file); ! return rv; ! } ! #else ! buffer = (char *)malloc (buffer_size); ! if (buffer == 0) ! { ! rv = errno; ! FREE (output); ! close (file); ! return rv; ! } ! #endif for (j = 0, i = history_length - nelements; i < history_length; i++) *************** *** 377,383 **** --- 442,453 ---- } + #ifdef HAVE_MMAP + if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0) + rv = errno; + #else if (write (file, buffer, buffer_size) < 0) rv = errno; free (buffer); + #endif } diff -Nrc2 readline-4.2a/histlib.h readline-4.3/histlib.h *** readline-4.2a/histlib.h Mon Oct 30 14:18:45 2000 --- readline-4.3/histlib.h Tue Mar 12 11:26:32 2002 *************** *** 23,26 **** --- 23,32 ---- #define _HISTLIB_H_ + #if defined (HAVE_STRING_H) + # include + #else + # include + #endif /* !HAVE_STRING_H */ + #if !defined (STREQ) #define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0)) *************** *** 30,36 **** #ifndef savestring - # ifndef strcpy - extern char *strcpy (); - # endif #define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x)) #endif --- 36,39 ---- diff -Nrc2 readline-4.2a/history.c readline-4.3/history.c *** readline-4.2a/history.c Wed May 9 09:18:59 2001 --- readline-4.3/history.c Tue Mar 12 11:27:34 2002 *************** *** 45,54 **** #endif - #if defined (HAVE_STRING_H) - # include - #else - # include - #endif /* !HAVE_STRING_H */ - #include "history.h" #include "histlib.h" --- 45,48 ---- *************** *** 350,356 **** } ! /* Stop stifling the history. This returns the previous amount the ! history was stifled by. The value is positive if the history was ! stifled, negative if it wasn't. */ int unstifle_history () --- 344,350 ---- } ! /* Stop stifling the history. This returns the previous maximum ! number of history entries. The value is positive if the history ! was stifled, negative if it wasn't. */ int unstifle_history () *************** *** 359,366 **** { history_stifled = 0; ! return (-history_max_entries); } ! ! return (history_max_entries); } --- 353,360 ---- { history_stifled = 0; ! return (history_max_entries); } ! else ! return (-history_max_entries); } diff -Nrc2 readline-4.2a/histsearch.c readline-4.3/histsearch.c *** readline-4.2a/histsearch.c Wed Aug 22 09:39:12 2001 --- readline-4.3/histsearch.c Tue Mar 12 11:28:12 2002 *************** *** 33,36 **** --- 33,37 ---- # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ + #if defined (HAVE_UNISTD_H) # ifdef _MINIX *************** *** 39,47 **** # include #endif - #if defined (HAVE_STRING_H) - # include - #else - # include - #endif /* !HAVE_STRING_H */ #include "history.h" --- 40,43 ---- diff -Nrc2 readline-4.2a/input.c readline-4.3/input.c *** readline-4.2a/input.c Wed Sep 12 10:55:50 2001 --- readline-4.3/input.c Thu Feb 21 09:50:45 2002 *************** *** 64,67 **** --- 64,68 ---- /* System-specific feature definitions and include files. */ #include "rldefs.h" + #include "rlmbutil.h" /* Some standard library routines. */ *************** *** 87,92 **** static int ibuffer_space PARAMS((void)); static int rl_get_char PARAMS((int *)); ! static int rl_unget_char PARAMS((int)); ! static void rl_gather_tyi PARAMS((void)); /* **************************************************************** */ --- 88,92 ---- static int ibuffer_space PARAMS((void)); static int rl_get_char PARAMS((int *)); ! static int rl_gather_tyi PARAMS((void)); /* **************************************************************** */ *************** *** 140,145 **** Returns non-zero if successful, zero if there is no space left in the buffer. */ ! static int ! rl_unget_char (key) int key; { --- 140,145 ---- Returns non-zero if successful, zero if there is no space left in the buffer. */ ! int ! _rl_unget_char (key) int key; { *************** *** 155,161 **** } ! /* If a character is available to be read, then read it ! and stuff it into IBUFFER. Otherwise, just return. */ ! static void rl_gather_tyi () { --- 155,162 ---- } ! /* If a character is available to be read, then read it and stuff it into ! IBUFFER. Otherwise, just return. Returns number of characters read ! (0 if none available) and -1 on error (EIO). */ ! static int rl_gather_tyi () { *************** *** 178,188 **** timeout.tv_sec = 0; timeout.tv_usec = _keyboard_input_timeout; ! if (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) <= 0) ! return; /* Nothing to read. */ #endif result = -1; #if defined (FIONREAD) result = ioctl (tty, FIONREAD, &chars_avail); #endif --- 179,193 ---- timeout.tv_sec = 0; timeout.tv_usec = _keyboard_input_timeout; ! result = select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout); ! if (result <= 0) ! return 0; /* Nothing to read. */ #endif result = -1; #if defined (FIONREAD) + errno = 0; result = ioctl (tty, FIONREAD, &chars_avail); + if (result == -1 && errno == EIO) + return -1; #endif *************** *** 197,201 **** fcntl (tty, F_SETFL, tem); if (chars_avail == -1 && errno == EAGAIN) ! return; } #endif /* O_NDELAY */ --- 202,206 ---- fcntl (tty, F_SETFL, tem); if (chars_avail == -1 && errno == EAGAIN) ! return 0; } #endif /* O_NDELAY */ *************** *** 204,208 **** something. */ if (chars_avail <= 0) ! return; tem = ibuffer_space (); --- 209,213 ---- something. */ if (chars_avail <= 0) ! return 0; tem = ibuffer_space (); *************** *** 228,231 **** --- 233,238 ---- rl_stuff_char (input); } + + return 1; } *************** *** 243,247 **** /* Is there input available to be read on the readline input file ! descriptor? Only works if the system has select(2) or FIONREAD. */ int _rl_input_available () --- 250,258 ---- /* Is there input available to be read on the readline input file ! descriptor? Only works if the system has select(2) or FIONREAD. ! Uses the value of _keyboard_input_timeout as the timeout; if another ! readline function wants to specify a timeout and not leave it up to ! the user, it should use _rl_input_queued(timeout_value_in_microseconds) ! instead. */ int _rl_input_available () *************** *** 278,281 **** --- 289,304 ---- } + int + _rl_input_queued (t) + int t; + { + int old_timeout, r; + + old_timeout = rl_set_keyboard_input_timeout (t); + r = _rl_input_available (); + rl_set_keyboard_input_timeout (old_timeout); + return r; + } + void _rl_insert_typein (c) *************** *** 295,299 **** if (t) ! rl_unget_char (key); string[i] = '\0'; --- 318,322 ---- if (t) ! _rl_unget_char (key); string[i] = '\0'; *************** *** 376,380 **** if (rl_done) /* XXX - experimental */ return ('\n'); ! rl_gather_tyi (); } } --- 399,407 ---- if (rl_done) /* XXX - experimental */ return ('\n'); ! if (rl_gather_tyi () < 0) /* XXX - EIO */ ! { ! rl_done = 1; ! return ('\n'); ! } } } *************** *** 442,443 **** --- 469,540 ---- } } + + #if defined (HANDLE_MULTIBYTE) + /* read multibyte char */ + int + _rl_read_mbchar (mbchar, size) + char *mbchar; + int size; + { + int mb_len = 0; + size_t mbchar_bytes_length; + wchar_t wc; + mbstate_t ps, ps_back; + + memset(&ps, 0, sizeof (mbstate_t)); + memset(&ps_back, 0, sizeof (mbstate_t)); + + while (mb_len < size) + { + RL_SETSTATE(RL_STATE_MOREINPUT); + mbchar[mb_len++] = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps); + if (mbchar_bytes_length == (size_t)(-1)) + break; /* invalid byte sequence for the current locale */ + else if (mbchar_bytes_length == (size_t)(-2)) + { + /* shorted bytes */ + ps = ps_back; + continue; + } + else if (mbchar_bytes_length > (size_t)(0)) + break; + } + + return mb_len; + } + + /* Read a multibyte-character string whose first character is FIRST into + the buffer MB of length MBLEN. Returns the last character read, which + may be FIRST. Used by the search functions, among others. Very similar + to _rl_read_mbchar. */ + int + _rl_read_mbstring (first, mb, mblen) + int first; + char *mb; + int mblen; + { + int i, c; + mbstate_t ps; + + c = first; + memset (mb, 0, mblen); + for (i = 0; i < mblen; i++) + { + mb[i] = (char)c; + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_get_char_len (mb, &ps) == -2) + { + /* Read more for multibyte character */ + RL_SETSTATE (RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE (RL_STATE_MOREINPUT); + } + else + break; + } + return c; + } + #endif /* HANDLE_MULTIBYTE */ diff -Nrc2 readline-4.2a/isearch.c readline-4.3/isearch.c *** readline-4.2a/isearch.c Mon Oct 15 12:25:17 2001 --- readline-4.3/isearch.c Wed Mar 13 08:22:05 2002 *************** *** 5,9 **** /* **************************************************************** */ ! /* Copyright (C) 1987,1989 Free Software Foundation, Inc. This file contains the Readline Library (the Library), a set of --- 5,9 ---- /* **************************************************************** */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file contains the Readline Library (the Library), a set of *************** *** 46,49 **** --- 46,51 ---- #include "rldefs.h" + #include "rlmbutil.h" + #include "readline.h" #include "history.h" *************** *** 166,171 **** register int i; ! int orig_point, orig_line, last_found_line; int c, found, failed, sline_len; /* The line currently being searched. */ --- 168,177 ---- register int i; ! int orig_point, orig_mark, orig_line, last_found_line; int c, found, failed, sline_len; + int n, wstart, wlen; + #if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; + #endif /* The line currently being searched. */ *************** *** 185,188 **** --- 191,195 ---- RL_SETSTATE(RL_STATE_ISEARCH); orig_point = rl_point; + orig_mark = rl_mark; last_found_line = orig_line = where_history (); reverse = direction < 0; *************** *** 247,250 **** --- 254,263 ---- RL_UNSETSTATE(RL_STATE_MOREINPUT); + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + c = _rl_read_mbstring (c, mb, MB_LEN_MAX); + #endif + + /* Translate the keys we do something with to opcodes. */ if (c >= 0 && _rl_keymap[c].type == ISFUNC) { *************** *** 255,266 **** else if (f == rl_forward_search_history) c = !reverse ? -1 : -2; } - #if 0 - /* Let NEWLINE (^J) terminate the search for people who don't like - using ESC. ^M can still be used to terminate the search and - immediately execute the command. */ - if (c == ESC || c == NEWLINE) - #else /* The characters in isearch_terminators (set from the user-settable variable isearch-terminators) are used to terminate the search but --- 268,281 ---- else if (f == rl_forward_search_history) c = !reverse ? -1 : -2; + else if (f == rl_rubout) + c = -3; + else if (c == CTRL ('G')) + c = -4; + else if (c == CTRL ('W')) /* XXX */ + c = -5; + else if (c == CTRL ('Y')) /* XXX */ + c = -6; } /* The characters in isearch_terminators (set from the user-settable variable isearch-terminators) are used to terminate the search but *************** *** 268,272 **** value is "\033\012" (ESC and C-J). */ if (strchr (isearch_terminators, c)) - #endif { /* ESC still terminates the search, but if there is pending --- 283,286 ---- *************** *** 275,285 **** with rl_execute_next. WATCH OUT FOR THIS! This is intended to allow the arrow keys to be used like ^F and ^B are used ! to terminate the search and execute the movement command. */ ! if (c == ESC && _rl_input_available ()) /* XXX */ rl_execute_next (ESC); break; } ! if (c >= 0 && (CTRL_CHAR (c) || META_CHAR (c) || c == RUBOUT) && c != CTRL ('G')) { /* This sets rl_pending_input to c; it will be picked up the next --- 289,318 ---- with rl_execute_next. WATCH OUT FOR THIS! This is intended to allow the arrow keys to be used like ^F and ^B are used ! to terminate the search and execute the movement command. ! XXX - since _rl_input_available depends on the application- ! settable keyboard timeout value, this could alternatively ! use _rl_input_queued(100000) */ ! if (c == ESC && _rl_input_available ()) rl_execute_next (ESC); break; } ! #define ENDSRCH_CHAR(c) \ ! ((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G'))) ! ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! if (c >= 0 && strlen (mb) == 1 && ENDSRCH_CHAR (c)) ! { ! /* This sets rl_pending_input to c; it will be picked up the next ! time rl_read_key is called. */ ! rl_execute_next (c); ! break; ! } ! } ! else ! #endif ! if (c >= 0 && ENDSRCH_CHAR (c)) { /* This sets rl_pending_input to c; it will be picked up the next *************** *** 319,326 **** break; ! case CTRL ('G'): ! strcpy (rl_line_buffer, lines[orig_line]); rl_point = orig_point; ! rl_end = strlen (rl_line_buffer); rl_restore_prompt(); rl_clear_message (); --- 352,372 ---- break; ! /* delete character from search string. */ ! case -3: /* C-H, DEL */ ! /* This is tricky. To do this right, we need to keep a ! stack of search positions for the current search, with ! sentinels marking the beginning and end. But this will ! do until we have a real isearch-undo. */ ! if (search_string_index == 0) ! rl_ding (); ! else ! search_string[--search_string_index] = '\0'; ! ! break; ! ! case -4: /* C-G */ ! rl_replace_line (lines[orig_line], 0); rl_point = orig_point; ! rl_mark = orig_mark; rl_restore_prompt(); rl_clear_message (); *************** *** 331,348 **** return 0; ! #if 0 ! /* delete character from search string. */ ! case -3: ! if (search_string_index == 0) ! rl_ding (); ! else { ! search_string[--search_string_index] = '\0'; ! /* This is tricky. To do this right, we need to keep a ! stack of search positions for the current search, with ! sentinels marking the beginning and end. */ } break; - #endif default: --- 377,427 ---- return 0; ! case -5: /* C-W */ ! /* skip over portion of line we already matched */ ! wstart = rl_point + search_string_index; ! if (wstart >= rl_end) ! { ! rl_ding (); ! break; ! } ! ! /* if not in a word, move to one. */ ! if (rl_alphabetic(rl_line_buffer[wstart]) == 0) { ! rl_ding (); ! break; } + n = wstart; + while (n < rl_end && rl_alphabetic(rl_line_buffer[n])) + n++; + wlen = n - wstart + 1; + if (search_string_index + wlen + 1 >= search_string_size) + { + search_string_size += wlen + 1; + search_string = (char *)xrealloc (search_string, search_string_size); + } + for (; wstart < n; wstart++) + search_string[search_string_index++] = rl_line_buffer[wstart]; + search_string[search_string_index] = '\0'; + break; + + case -6: /* C-Y */ + /* skip over portion of line we already matched */ + wstart = rl_point + search_string_index; + if (wstart >= rl_end) + { + rl_ding (); + break; + } + n = rl_end - wstart + 1; + if (search_string_index + n + 1 >= search_string_size) + { + search_string_size += n + 1; + search_string = (char *)xrealloc (search_string, search_string_size); + } + for (n = wstart; n < rl_end; n++) + search_string[search_string_index++] = rl_line_buffer[n]; + search_string[search_string_index] = '\0'; break; default: *************** *** 353,357 **** search_string = (char *)xrealloc (search_string, search_string_size); } ! search_string[search_string_index++] = c; search_string[search_string_index] = '\0'; break; --- 432,445 ---- search_string = (char *)xrealloc (search_string, search_string_size); } ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! int j, l; ! for (j = 0, l = strlen (mb); j < l; ) ! search_string[search_string_index++] = mb[j++]; ! } ! else ! #endif ! search_string[search_string_index++] = c; search_string[search_string_index] = '\0'; break; *************** *** 418,432 **** if (found) { - int line_len; - prev_line_found = lines[i]; ! line_len = strlen (lines[i]); ! ! if (line_len >= rl_line_buffer_len) ! rl_extend_line_buffer (line_len); ! ! strcpy (rl_line_buffer, lines[i]); rl_point = line_index; - rl_end = line_len; last_found_line = i; rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i); --- 506,512 ---- if (found) { prev_line_found = lines[i]; ! rl_replace_line (lines[i], 0); rl_point = line_index; last_found_line = i; rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i); *************** *** 444,456 **** rl_restore_prompt (); - #if 1 /* Save the search string for possible later use. */ FREE (last_isearch_string); last_isearch_string = search_string; last_isearch_string_len = search_string_index; - #else - /* Free the search string. */ - free (search_string); - #endif if (last_found_line < orig_line) --- 524,531 ---- *************** *** 459,466 **** rl_get_next_history (last_found_line - orig_line, 0); ! /* If the string was not found, put point at the end of the line. */ if (line_index < 0) ! line_index = strlen (rl_line_buffer); rl_point = line_index; rl_clear_message (); --- 534,553 ---- rl_get_next_history (last_found_line - orig_line, 0); ! /* If the string was not found, put point at the end of the last matching ! line. If last_found_line == orig_line, we didn't find any matching ! history lines at all, so put point back in its original position. */ if (line_index < 0) ! { ! if (last_found_line == orig_line) ! line_index = orig_point; ! else ! line_index = strlen (rl_line_buffer); ! rl_mark = orig_mark; ! } ! rl_point = line_index; + /* Don't worry about where to put the mark here; rl_get_previous_history + and rl_get_next_history take care of it. */ + rl_clear_message (); diff -Nrc2 readline-4.2a/keymaps.h readline-4.3/keymaps.h *** readline-4.2a/keymaps.h Wed Aug 22 09:37:28 2001 --- readline-4.3/keymaps.h Tue Nov 20 12:42:49 2001 *************** *** 50,55 **** /* This must be large enough to hold bindings for all of the characters in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x, ! and so on). */ ! #define KEYMAP_SIZE 256 /* I wanted to make the above structure contain a union of: --- 50,56 ---- /* This must be large enough to hold bindings for all of the characters in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x, ! and so on) plus one for subsequence matching. */ ! #define KEYMAP_SIZE 257 ! #define ANYOTHERKEY KEYMAP_SIZE-1 /* I wanted to make the above structure contain a union of: diff -Nrc2 readline-4.2a/kill.c readline-4.3/kill.c *** readline-4.2a/kill.c Wed Aug 22 09:39:28 2001 --- readline-4.3/kill.c Thu Dec 13 14:10:39 2001 *************** *** 202,206 **** int count, key; { ! int orig_point = rl_point; if (count < 0) --- 202,206 ---- int count, key; { ! int orig_point; if (count < 0) *************** *** 208,211 **** --- 208,212 ---- else { + orig_point = rl_point; rl_forward_word (count, key); *************** *** 214,217 **** --- 215,220 ---- rl_point = orig_point; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; *************** *** 223,227 **** int count, ignore; { ! int orig_point = rl_point; if (count < 0) --- 226,230 ---- int count, ignore; { ! int orig_point; if (count < 0) *************** *** 229,236 **** --- 232,243 ---- else { + orig_point = rl_point; rl_backward_word (count, ignore); if (rl_point != orig_point) rl_kill_text (orig_point, rl_point); + + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; *************** *** 243,247 **** int direction, ignore; { ! int orig_point = rl_point; if (direction < 0) --- 250,254 ---- int direction, ignore; { ! int orig_point; if (direction < 0) *************** *** 249,256 **** --- 256,266 ---- else { + orig_point = rl_point; rl_end_of_line (1, ignore); if (orig_point != rl_point) rl_kill_text (orig_point, rl_point); rl_point = orig_point; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; *************** *** 263,267 **** int direction, ignore; { ! int orig_point = rl_point; if (direction < 0) --- 273,277 ---- int direction, ignore; { ! int orig_point; if (direction < 0) *************** *** 273,278 **** else { rl_beg_of_line (1, ignore); ! rl_kill_text (orig_point, rl_point); } } --- 283,292 ---- else { + orig_point = rl_point; rl_beg_of_line (1, ignore); ! if (rl_point != orig_point) ! rl_kill_text (orig_point, rl_point); ! if (rl_editing_mode == emacs_mode) ! rl_mark = rl_point; } } *************** *** 288,291 **** --- 302,306 ---- rl_point = 0; rl_kill_text (rl_point, rl_end); + rl_mark = 0; rl_end_undo_group (); return 0; *************** *** 322,325 **** --- 337,342 ---- rl_kill_text (orig_point, rl_point); + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; *************** *** 342,345 **** --- 359,364 ---- rl_kill_text (rl_point, 0); rl_point = 0; + if (rl_editing_mode == emacs_mode) + rl_mark = rl_point; } return 0; *************** *** 354,368 **** char *text; ! if (rl_mark == rl_point) { ! _rl_last_command_was_kill++; ! return 0; } - text = rl_copy_text (rl_point, rl_mark); - if (delete) - rl_delete_text (rl_point, rl_mark); - _rl_copy_to_kill_ring (text, rl_point < rl_mark); - _rl_last_command_was_kill++; return 0; --- 373,384 ---- char *text; ! if (rl_mark != rl_point) { ! text = rl_copy_text (rl_point, rl_mark); ! if (delete) ! rl_delete_text (rl_point, rl_mark); ! _rl_copy_to_kill_ring (text, rl_point < rl_mark); } _rl_last_command_was_kill++; return 0; *************** *** 531,534 **** --- 547,552 ---- rl_begin_undo_group (); + _rl_set_mark_at_pos (rl_point); + #if defined (VI_MODE) /* Vi mode always inserts a space before yanking the argument, and it *************** *** 624,627 **** --- 642,646 ---- else ptr = data; + _rl_set_mark_at_pos (rl_point); rl_insert_text (ptr); if (ptr != data) diff -Nrc2 readline-4.2a/macro.c readline-4.3/macro.c *** readline-4.2a/macro.c Thu Aug 2 12:59:16 2001 --- readline-4.3/macro.c Wed Mar 13 16:44:36 2002 *************** *** 50,55 **** #include "xmalloc.h" - #define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) - /* **************************************************************** */ /* */ --- 50,53 ---- *************** *** 62,68 **** char *rl_executing_macro = (char *)NULL; - /* Non-zero means to save keys that we dispatch on in a kbd macro. */ - int _rl_defining_kbd_macro = 0; - /* The offset in the above string to the next character to be read. */ static int executing_macro_index; --- 60,63 ---- *************** *** 187,191 **** executing_macro_index = 0; - _rl_defining_kbd_macro = 0; RL_UNSETSTATE(RL_STATE_MACRODEF); } --- 182,185 ---- *************** *** 201,205 **** int ignore1, ignore2; { ! if (_rl_defining_kbd_macro) { _rl_abort_internal (); --- 195,199 ---- int ignore1, ignore2; { ! if (RL_ISSTATE (RL_STATE_MACRODEF)) { _rl_abort_internal (); *************** *** 215,219 **** current_macro_index = 0; - _rl_defining_kbd_macro = 1; RL_SETSTATE(RL_STATE_MACRODEF); return 0; --- 209,212 ---- *************** *** 227,231 **** int count, ignore; { ! if (_rl_defining_kbd_macro == 0) { _rl_abort_internal (); --- 220,224 ---- int count, ignore; { ! if (RL_ISSTATE (RL_STATE_MACRODEF) == 0) { _rl_abort_internal (); *************** *** 236,240 **** current_macro[current_macro_index] = '\0'; - _rl_defining_kbd_macro = 0; RL_UNSETSTATE(RL_STATE_MACRODEF); --- 229,232 ---- *************** *** 251,255 **** _rl_abort_internal (); ! if (_rl_defining_kbd_macro) { rl_ding (); /* no recursive macros */ --- 243,247 ---- _rl_abort_internal (); ! if (RL_ISSTATE (RL_STATE_MACRODEF)) { rl_ding (); /* no recursive macros */ diff -Nrc2 readline-4.2a/mbutil.c readline-4.3/mbutil.c *** readline-4.2a/mbutil.c Wed Dec 31 19:00:00 1969 --- readline-4.3/mbutil.c Tue Jun 4 11:54:29 2002 *************** *** 0 **** --- 1,337 ---- + /* mbutil.c -- readline multibyte character utility functions */ + + /* Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #define READLINE_LIBRARY + + #if defined (HAVE_CONFIG_H) + # include + #endif + + #include + #include + #include "posixjmp.h" + + #if defined (HAVE_UNISTD_H) + # include /* for _POSIX_VERSION */ + #endif /* HAVE_UNISTD_H */ + + #if defined (HAVE_STDLIB_H) + # include + #else + # include "ansi_stdlib.h" + #endif /* HAVE_STDLIB_H */ + + #include + #include + + /* System-specific feature definitions and include files. */ + #include "rldefs.h" + #include "rlmbutil.h" + + #if defined (TIOCSTAT_IN_SYS_IOCTL) + # include + #endif /* TIOCSTAT_IN_SYS_IOCTL */ + + /* Some standard library routines. */ + #include "readline.h" + + #include "rlprivate.h" + #include "xmalloc.h" + + /* Declared here so it can be shared between the readline and history + libraries. */ + #if defined (HANDLE_MULTIBYTE) + int rl_byte_oriented = 0; + #else + int rl_byte_oriented = 1; + #endif + + /* **************************************************************** */ + /* */ + /* Multibyte Character Utility Functions */ + /* */ + /* **************************************************************** */ + + #if defined(HANDLE_MULTIBYTE) + + static int + _rl_find_next_mbchar_internal (string, seed, count, find_non_zero) + char *string; + int seed, count, find_non_zero; + { + size_t tmp = 0; + mbstate_t ps; + int point = 0; + wchar_t wc; + + memset(&ps, 0, sizeof (mbstate_t)); + if (seed < 0) + seed = 0; + if (count <= 0) + return seed; + + point = seed + _rl_adjust_point(string, seed, &ps); + /* if this is true, means that seed was not pointed character + started byte. So correct the point and consume count */ + if (seed < point) + count --; + + while (count > 0) + { + tmp = mbrtowc (&wc, string+point, strlen(string + point), &ps); + if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) + { + /* invalid bytes. asume a byte represents a character */ + point++; + count--; + /* reset states. */ + memset(&ps, 0, sizeof(mbstate_t)); + } + else if (tmp == (size_t)0) + /* found '\0' char */ + break; + else + { + /* valid bytes */ + point += tmp; + if (find_non_zero) + { + if (wcwidth (wc) == 0) + continue; + else + count--; + } + else + count--; + } + } + + if (find_non_zero) + { + tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); + while (wcwidth (wc) == 0) + { + point += tmp; + tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps); + if (tmp == (size_t)(0) || tmp == (size_t)(-1) || tmp == (size_t)(-2)) + break; + } + } + return point; + } + + static int + _rl_find_prev_mbchar_internal (string, seed, find_non_zero) + char *string; + int seed, find_non_zero; + { + mbstate_t ps; + int prev, non_zero_prev, point, length; + size_t tmp; + wchar_t wc; + + memset(&ps, 0, sizeof(mbstate_t)); + length = strlen(string); + + if (seed < 0) + return 0; + else if (length < seed) + return length; + + prev = non_zero_prev = point = 0; + while (point < seed) + { + tmp = mbrtowc (&wc, string + point, length - point, &ps); + if ((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) + { + /* in this case, bytes are invalid or shorted to compose + multibyte char, so assume that the first byte represents + a single character anyway. */ + tmp = 1; + /* clear the state of the byte sequence, because + in this case effect of mbstate is undefined */ + memset(&ps, 0, sizeof (mbstate_t)); + } + else if (tmp == 0) + break; /* Found '\0' char. Can this happen? */ + else + { + if (find_non_zero) + { + if (wcwidth (wc) != 0) + prev = point; + } + else + prev = point; + } + + point += tmp; + } + + return prev; + } + + /* return the number of bytes parsed from the multibyte sequence starting + at src, if a non-L'\0' wide character was recognized. It returns 0, + if a L'\0' wide character was recognized. It returns (size_t)(-1), + if an invalid multibyte sequence was encountered. It returns (size_t)(-2) + if it couldn't parse a complete multibyte character. */ + int + _rl_get_char_len (src, ps) + char *src; + mbstate_t *ps; + { + size_t tmp; + + tmp = mbrlen((const char *)src, (size_t)strlen (src), ps); + if (tmp == (size_t)(-2)) + { + /* shorted to compose multibyte char */ + memset (ps, 0, sizeof(mbstate_t)); + return -2; + } + else if (tmp == (size_t)(-1)) + { + /* invalid to compose multibyte char */ + /* initialize the conversion state */ + memset (ps, 0, sizeof(mbstate_t)); + return -1; + } + else if (tmp == (size_t)0) + return 0; + else + return (int)tmp; + } + + /* compare the specified two characters. If the characters matched, + return 1. Otherwise return 0. */ + int + _rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2) + char *buf1, *buf2; + mbstate_t *ps1, *ps2; + int pos1, pos2; + { + int i, w1, w2; + + if ((w1 = _rl_get_char_len (&buf1[pos1], ps1)) <= 0 || + (w2 = _rl_get_char_len (&buf2[pos2], ps2)) <= 0 || + (w1 != w2) || + (buf1[pos1] != buf2[pos2])) + return 0; + + for (i = 1; i < w1; i++) + if (buf1[pos1+i] != buf2[pos2+i]) + return 0; + + return 1; + } + + /* adjust pointed byte and find mbstate of the point of string. + adjusted point will be point <= adjusted_point, and returns + differences of the byte(adjusted_point - point). + if point is invalied (point < 0 || more than string length), + it returns -1 */ + int + _rl_adjust_point(string, point, ps) + char *string; + int point; + mbstate_t *ps; + { + size_t tmp = 0; + int length; + int pos = 0; + + length = strlen(string); + if (point < 0) + return -1; + if (length < point) + return -1; + + while (pos < point) + { + tmp = mbrlen (string + pos, length - pos, ps); + if((size_t)(tmp) == (size_t)-1 || (size_t)(tmp) == (size_t)-2) + { + /* in this case, bytes are invalid or shorted to compose + multibyte char, so assume that the first byte represents + a single character anyway. */ + pos++; + /* clear the state of the byte sequence, because + in this case effect of mbstate is undefined */ + memset (ps, 0, sizeof (mbstate_t)); + } + else + pos += tmp; + } + + return (pos - point); + } + + int + _rl_is_mbchar_matched (string, seed, end, mbchar, length) + char *string; + int seed, end; + char *mbchar; + int length; + { + int i; + + if ((end - seed) < length) + return 0; + + for (i = 0; i < length; i++) + if (string[seed + i] != mbchar[i]) + return 0; + return 1; + } + #endif /* HANDLE_MULTIBYTE */ + + /* Find next `count' characters started byte point of the specified seed. + If flags is MB_FIND_NONZERO, we look for non-zero-width multibyte + characters. */ + #undef _rl_find_next_mbchar + int + _rl_find_next_mbchar (string, seed, count, flags) + char *string; + int seed, count, flags; + { + #if defined (HANDLE_MULTIBYTE) + return _rl_find_next_mbchar_internal (string, seed, count, flags); + #else + return (seed + count); + #endif + } + + /* Find previous character started byte point of the specified seed. + Returned point will be point <= seed. If flags is MB_FIND_NONZERO, + we look for non-zero-width multibyte characters. */ + #undef _rl_find_prev_mbchar + int + _rl_find_prev_mbchar (string, seed, flags) + char *string; + int seed, flags; + { + #if defined (HANDLE_MULTIBYTE) + return _rl_find_prev_mbchar_internal (string, seed, flags); + #else + return ((seed == 0) ? seed : seed - 1); + #endif + } diff -Nrc2 readline-4.2a/misc.c readline-4.3/misc.c *** readline-4.2a/misc.c Wed Dec 31 19:00:00 1969 --- readline-4.3/misc.c Tue Feb 5 13:59:32 2002 *************** *** 0 **** --- 1,496 ---- + /* misc.c -- miscellaneous bindable readline functions. */ + + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #define READLINE_LIBRARY + + #if defined (HAVE_CONFIG_H) + # include + #endif + + #if defined (HAVE_UNISTD_H) + # include + #endif /* HAVE_UNISTD_H */ + + #if defined (HAVE_STDLIB_H) + # include + #else + # include "ansi_stdlib.h" + #endif /* HAVE_STDLIB_H */ + + #if defined (HAVE_LOCALE_H) + # include + #endif + + #include + + /* System-specific feature definitions and include files. */ + #include "rldefs.h" + #include "rlmbutil.h" + + /* Some standard library routines. */ + #include "readline.h" + #include "history.h" + + #include "rlprivate.h" + #include "rlshell.h" + #include "xmalloc.h" + + static int rl_digit_loop PARAMS((void)); + static void _rl_history_set_point PARAMS((void)); + + /* Forward declarations used in this file */ + void _rl_free_history_entry PARAMS((HIST_ENTRY *)); + + /* If non-zero, rl_get_previous_history and rl_get_next_history attempt + to preserve the value of rl_point from line to line. */ + int _rl_history_preserve_point = 0; + + /* Saved target point for when _rl_history_preserve_point is set. Special + value of -1 means that point is at the end of the line. */ + int _rl_history_saved_point = -1; + + /* **************************************************************** */ + /* */ + /* Numeric Arguments */ + /* */ + /* **************************************************************** */ + + /* Handle C-u style numeric args, as well as M--, and M-digits. */ + static int + rl_digit_loop () + { + int key, c, sawminus, sawdigits; + + rl_save_prompt (); + + RL_SETSTATE(RL_STATE_NUMERICARG); + sawminus = sawdigits = 0; + while (1) + { + if (rl_numeric_arg > 1000000) + { + sawdigits = rl_explicit_arg = rl_numeric_arg = 0; + rl_ding (); + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return 1; + } + rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); + RL_SETSTATE(RL_STATE_MOREINPUT); + key = c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (c < 0) + { + _rl_abort_internal (); + return -1; + } + + /* If we see a key bound to `universal-argument' after seeing digits, + it ends the argument but is otherwise ignored. */ + if (_rl_keymap[c].type == ISFUNC && + _rl_keymap[c].function == rl_universal_argument) + { + if (sawdigits == 0) + { + rl_numeric_arg *= 4; + continue; + } + else + { + RL_SETSTATE(RL_STATE_MOREINPUT); + key = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return (_rl_dispatch (key, _rl_keymap)); + } + } + + c = UNMETA (c); + + if (_rl_digit_p (c)) + { + rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + c - '0' : c - '0'; + sawdigits = rl_explicit_arg = 1; + } + else if (c == '-' && rl_explicit_arg == 0) + { + rl_numeric_arg = sawminus = 1; + rl_arg_sign = -1; + } + else + { + /* Make M-- command equivalent to M--1 command. */ + if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0) + rl_explicit_arg = 1; + rl_restore_prompt (); + rl_clear_message (); + RL_UNSETSTATE(RL_STATE_NUMERICARG); + return (_rl_dispatch (key, _rl_keymap)); + } + } + + /*NOTREACHED*/ + } + + /* Add the current digit to the argument in progress. */ + int + rl_digit_argument (ignore, key) + int ignore, key; + { + rl_execute_next (key); + return (rl_digit_loop ()); + } + + /* What to do when you abort reading an argument. */ + int + rl_discard_argument () + { + rl_ding (); + rl_clear_message (); + _rl_init_argument (); + return 0; + } + + /* Create a default argument. */ + int + _rl_init_argument () + { + rl_numeric_arg = rl_arg_sign = 1; + rl_explicit_arg = 0; + return 0; + } + + /* C-u, universal argument. Multiply the current argument by 4. + Read a key. If the key has nothing to do with arguments, then + dispatch on it. If the key is the abort character then abort. */ + int + rl_universal_argument (count, key) + int count, key; + { + rl_numeric_arg *= 4; + return (rl_digit_loop ()); + } + + /* **************************************************************** */ + /* */ + /* History Utilities */ + /* */ + /* **************************************************************** */ + + /* We already have a history library, and that is what we use to control + the history features of readline. This is our local interface to + the history mechanism. */ + + /* While we are editing the history, this is the saved + version of the original line. */ + HIST_ENTRY *_rl_saved_line_for_history = (HIST_ENTRY *)NULL; + + /* Set the history pointer back to the last entry in the history. */ + void + _rl_start_using_history () + { + using_history (); + if (_rl_saved_line_for_history) + _rl_free_history_entry (_rl_saved_line_for_history); + + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + } + + /* Free the contents (and containing structure) of a HIST_ENTRY. */ + void + _rl_free_history_entry (entry) + HIST_ENTRY *entry; + { + if (entry == 0) + return; + if (entry->line) + free (entry->line); + free (entry); + } + + /* Perhaps put back the current line if it has changed. */ + int + rl_maybe_replace_line () + { + HIST_ENTRY *temp; + + temp = current_history (); + /* If the current line has changed, save the changes. */ + if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) + { + temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list); + free (temp->line); + free (temp); + } + return 0; + } + + /* Restore the _rl_saved_line_for_history if there is one. */ + int + rl_maybe_unsave_line () + { + if (_rl_saved_line_for_history) + { + rl_replace_line (_rl_saved_line_for_history->line, 0); + rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data; + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + rl_point = rl_end; /* rl_replace_line sets rl_end */ + } + else + rl_ding (); + return 0; + } + + /* Save the current line in _rl_saved_line_for_history. */ + int + rl_maybe_save_line () + { + if (_rl_saved_line_for_history == 0) + { + _rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); + _rl_saved_line_for_history->line = savestring (rl_line_buffer); + _rl_saved_line_for_history->data = (char *)rl_undo_list; + } + return 0; + } + + int + _rl_free_saved_history_line () + { + if (_rl_saved_line_for_history) + { + _rl_free_history_entry (_rl_saved_line_for_history); + _rl_saved_line_for_history = (HIST_ENTRY *)NULL; + } + return 0; + } + + static void + _rl_history_set_point () + { + rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1) + ? _rl_history_saved_point + : rl_end; + if (rl_point > rl_end) + rl_point = rl_end; + + #if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + rl_point = 0; + #endif /* VI_MODE */ + + if (rl_editing_mode == emacs_mode) + rl_mark = (rl_point == rl_end ? 0 : rl_end); + } + + void + rl_replace_from_history (entry, flags) + HIST_ENTRY *entry; + int flags; /* currently unused */ + { + rl_replace_line (entry->line, 0); + rl_undo_list = (UNDO_LIST *)entry->data; + rl_point = rl_end; + rl_mark = 0; + + #if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + { + rl_point = 0; + rl_mark = rl_end; + } + #endif + } + + /* **************************************************************** */ + /* */ + /* History Commands */ + /* */ + /* **************************************************************** */ + + /* Meta-< goes to the start of the history. */ + int + rl_beginning_of_history (count, key) + int count, key; + { + return (rl_get_previous_history (1 + where_history (), key)); + } + + /* Meta-> goes to the end of the history. (The current line). */ + int + rl_end_of_history (count, key) + int count, key; + { + rl_maybe_replace_line (); + using_history (); + rl_maybe_unsave_line (); + return 0; + } + + /* Move down to the next history line. */ + int + rl_get_next_history (count, key) + int count, key; + { + HIST_ENTRY *temp; + + if (count < 0) + return (rl_get_previous_history (-count, key)); + + if (count == 0) + return 0; + + rl_maybe_replace_line (); + + /* either not saved by rl_newline or at end of line, so set appropriately. */ + if (_rl_history_saved_point == -1 && (rl_point || rl_end)) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + temp = (HIST_ENTRY *)NULL; + while (count) + { + temp = next_history (); + if (!temp) + break; + --count; + } + + if (temp == 0) + rl_maybe_unsave_line (); + else + { + rl_replace_from_history (temp, 0); + _rl_history_set_point (); + } + return 0; + } + + /* Get the previous item out of our interactive history, making it the current + line. If there is no previous history, just ding. */ + int + rl_get_previous_history (count, key) + int count, key; + { + HIST_ENTRY *old_temp, *temp; + + if (count < 0) + return (rl_get_next_history (-count, key)); + + if (count == 0) + return 0; + + /* either not saved by rl_newline or at end of line, so set appropriately. */ + if (_rl_history_saved_point == -1 && (rl_point || rl_end)) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + /* If we don't have a line saved, then save this one. */ + rl_maybe_save_line (); + + /* If the current line has changed, save the changes. */ + rl_maybe_replace_line (); + + temp = old_temp = (HIST_ENTRY *)NULL; + while (count) + { + temp = previous_history (); + if (temp == 0) + break; + + old_temp = temp; + --count; + } + + /* If there was a large argument, and we moved back to the start of the + history, that is not an error. So use the last value found. */ + if (!temp && old_temp) + temp = old_temp; + + if (temp == 0) + rl_ding (); + else + { + rl_replace_from_history (temp, 0); + _rl_history_set_point (); + } + return 0; + } + + /* **************************************************************** */ + /* */ + /* Editing Modes */ + /* */ + /* **************************************************************** */ + /* How to toggle back and forth between editing modes. */ + int + rl_vi_editing_mode (count, key) + int count, key; + { + #if defined (VI_MODE) + _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */ + rl_editing_mode = vi_mode; + rl_vi_insertion_mode (1, key); + #endif /* VI_MODE */ + + return 0; + } + + int + rl_emacs_editing_mode (count, key) + int count, key; + { + rl_editing_mode = emacs_mode; + _rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */ + _rl_keymap = emacs_standard_keymap; + return 0; + } + + /* Function for the rest of the library to use to set insert/overwrite mode. */ + void + _rl_set_insert_mode (im, force) + int im, force; + { + #ifdef CURSOR_MODE + _rl_set_cursor (im, force); + #endif + + rl_insert_mode = im; + } + + /* Toggle overwrite mode. A positive explicit argument selects overwrite + mode. A negative or zero explicit argument selects insert mode. */ + int + rl_overwrite_mode (count, key) + int count, key; + { + if (rl_explicit_arg == 0) + _rl_set_insert_mode (rl_insert_mode ^ 1, 0); + else if (count > 0) + _rl_set_insert_mode (RL_IM_OVERWRITE, 0); + else + _rl_set_insert_mode (RL_IM_INSERT, 0); + + return 0; + } diff -Nrc2 readline-4.2a/parens.c readline-4.3/parens.c *** readline-4.2a/parens.c Wed Aug 22 09:39:38 2001 --- readline-4.3/parens.c Tue Feb 5 13:14:31 2002 *************** *** 31,34 **** --- 31,38 ---- #include + #if defined (HAVE_UNISTD_H) + # include + #endif + #if defined (FD_SET) && !defined (HAVE_SELECT) # define HAVE_SELECT *************** *** 104,108 **** { if (rl_explicit_arg || !rl_blink_matching_paren) ! rl_insert (count, invoking_key); else { --- 108,112 ---- { if (rl_explicit_arg || !rl_blink_matching_paren) ! _rl_insert_char (count, invoking_key); else { *************** *** 112,116 **** fd_set readfds; ! rl_insert (1, invoking_key); (*rl_redisplay_function) (); match_point = --- 116,120 ---- fd_set readfds; ! _rl_insert_char (1, invoking_key); (*rl_redisplay_function) (); match_point = *************** *** 132,136 **** rl_point = orig_point; #else /* !HAVE_SELECT */ ! rl_insert (count, invoking_key); #endif /* !HAVE_SELECT */ } --- 136,140 ---- rl_point = orig_point; #else /* !HAVE_SELECT */ ! _rl_insert_char (count, invoking_key); #endif /* !HAVE_SELECT */ } diff -Nrc2 readline-4.2a/posixdir.h readline-4.3/posixdir.h *** readline-4.2a/posixdir.h Thu Aug 5 07:50:18 1999 --- readline-4.3/posixdir.h Tue Jan 8 10:47:15 2002 *************** *** 47,49 **** --- 47,57 ---- #endif + #if defined (_POSIX_SOURCE) && (!defined (STRUCT_DIRENT_HAS_D_INO) || defined (BROKEN_DIRENT_D_INO)) + /* Posix does not require that the d_ino field be present, and some + systems do not provide it. */ + # define REAL_DIR_ENTRY(dp) 1 + #else + # define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) + #endif /* _POSIX_SOURCE */ + #endif /* !_POSIXDIR_H_ */ diff -Nrc2 readline-4.2a/readline.c readline-4.3/readline.c *** readline-4.2a/readline.c Wed Nov 7 17:01:58 2001 --- readline-4.3/readline.c Wed Mar 13 17:10:46 2002 *************** *** 2,6 **** with emacs style editing and completion. */ ! /* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for --- 2,6 ---- with emacs style editing and completion. */ ! /* Copyright (C) 1987-2002 Free Software Foundation, Inc. This file is part of the GNU Readline Library, a library for *************** *** 53,56 **** --- 53,57 ---- /* System-specific feature definitions and include files. */ #include "rldefs.h" + #include "rlmbutil.h" #if defined (__EMX__) *************** *** 68,89 **** #ifndef RL_LIBRARY_VERSION ! # define RL_LIBRARY_VERSION "4.2a" #endif #ifndef RL_READLINE_VERSION ! # define RL_READLINE_VERSION 0x0402 #endif ! /* Evaluates its arguments multiple times. */ ! #define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) /* Forward declarations used in this file. */ - void _rl_free_history_entry PARAMS((HIST_ENTRY *)); - static char *readline_internal PARAMS((void)); static void readline_initialize_everything PARAMS((void)); ! static void start_using_history PARAMS((void)); static void bind_arrow_keys PARAMS((void)); - static int rl_change_case PARAMS((int, int)); static void readline_default_bindings PARAMS((void)); --- 69,87 ---- #ifndef RL_LIBRARY_VERSION ! # define RL_LIBRARY_VERSION "4.3" #endif #ifndef RL_READLINE_VERSION ! # define RL_READLINE_VERSION 0x0403 #endif ! extern void _rl_free_history_entry PARAMS((HIST_ENTRY *)); /* Forward declarations used in this file. */ static char *readline_internal PARAMS((void)); static void readline_initialize_everything PARAMS((void)); ! ! static void bind_arrow_keys_internal PARAMS((Keymap)); static void bind_arrow_keys PARAMS((void)); static void readline_default_bindings PARAMS((void)); *************** *** 109,112 **** --- 107,113 ---- int rl_editing_mode = emacs_mode; + /* The current insert mode: input (the default) or overwrite */ + int rl_insert_mode = RL_IM_DEFAULT; + /* Non-zero if we called this function from _rl_dispatch(). It's present so functions can find out whether they were called from a key binding *************** *** 250,261 **** int _rl_output_meta_chars = 0; - /* If non-zero, rl_get_previous_history and rl_get_next_history attempt - to preserve the value of rl_point from line to line. */ - int _rl_history_preserve_point = 0; - - /* Saved target point for when _rl_history_preserve_point is set. Special - value of -1 means that point is at the end of the line. */ - static int _rl_history_saved_point = -1; - /* **************************************************************** */ /* */ --- 251,254 ---- *************** *** 331,335 **** (*rl_startup_hook) (); ! if (readline_echoing_p == 0) { if (rl_prompt && rl_already_prompted == 0) --- 324,331 ---- (*rl_startup_hook) (); ! /* If we're not echoing, we still want to at least print a prompt, because ! rl_redisplay will not do it for us. If the calling application has a ! custom redisplay function, though, let that function handle it. */ ! if (readline_echoing_p == 0 && rl_redisplay_function == rl_redisplay) { if (rl_prompt && rl_already_prompted == 0) *************** *** 348,356 **** rl_on_new_line (); (*rl_redisplay_function) (); #if defined (VI_MODE) ! if (rl_editing_mode == vi_mode) ! rl_vi_insertion_mode (1, 0); #endif /* VI_MODE */ - } if (rl_pre_input_hook) --- 344,353 ---- rl_on_new_line (); (*rl_redisplay_function) (); + } + #if defined (VI_MODE) ! if (rl_editing_mode == vi_mode) ! rl_vi_insertion_mode (1, 0); #endif /* VI_MODE */ if (rl_pre_input_hook) *************** *** 385,388 **** --- 382,388 ---- rl_free_undo_list (); + /* Restore normal cursor, if available. */ + _rl_set_insert_mode (RL_IM_INSERT, 0); + return (eof ? (char *)NULL : savestring (the_line)); } *************** *** 508,512 **** _rl_init_line_state () { ! rl_point = rl_end = 0; the_line = rl_line_buffer; the_line[0] = 0; --- 508,512 ---- _rl_init_line_state () { ! rl_point = rl_end = rl_mark = 0; the_line = rl_line_buffer; the_line[0] = 0; *************** *** 527,530 **** --- 527,539 ---- Keymap map; { + return _rl_dispatch_subseq (key, map, 0); + } + + int + _rl_dispatch_subseq (key, map, got_subseq) + register int key; + Keymap map; + int got_subseq; + { int r, newkey; char *macro; *************** *** 535,539 **** if (map[ESC].type == ISKMAP) { ! if (_rl_defining_kbd_macro) _rl_add_macro_char (ESC); map = FUNCTION_TO_KEYMAP (map, ESC); --- 544,548 ---- if (map[ESC].type == ISKMAP) { ! if (RL_ISSTATE (RL_STATE_MACRODEF)) _rl_add_macro_char (ESC); map = FUNCTION_TO_KEYMAP (map, ESC); *************** *** 547,551 **** } ! if (_rl_defining_kbd_macro) _rl_add_macro_char (key); --- 556,560 ---- } ! if (RL_ISSTATE (RL_STATE_MACRODEF)) _rl_add_macro_char (key); *************** *** 579,582 **** --- 588,608 ---- rl_last_func = map[key].function; } + else if (map[ANYOTHERKEY].function) + { + /* OK, there's no function bound in this map, but there is a + shadow function that was overridden when the current keymap + was created. Return -2 to note that. */ + _rl_unget_char (key); + return -2; + } + else if (got_subseq) + { + /* Return -1 to note that we're in a subsequence, but we don't + have a matching key, nor was one overridden. This means + we need to back up the recursion chain and find the last + subsequence that is bound to a function. */ + _rl_unget_char (key); + return -1; + } else { *************** *** 589,592 **** --- 615,630 ---- if (map[key].function != 0) { + #if defined (VI_MODE) + /* The only way this test will be true is if a subsequence has been + bound starting with ESC, generally the arrow keys. What we do is + check whether there's input in the queue, which there generally + will be if an arrow key has been pressed, and, if there's not, + just dispatch to (what we assume is) rl_vi_movement_mode right + away. This is essentially an input test with a zero timeout. */ + if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap + && _rl_input_queued (0) == 0) + return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key))); + #endif + rl_key_sequence_length++; *************** *** 605,609 **** } ! r = _rl_dispatch (newkey, FUNCTION_TO_KEYMAP (map, key)); } else --- 643,669 ---- } ! r = _rl_dispatch_subseq (newkey, FUNCTION_TO_KEYMAP (map, key), got_subseq || map[ANYOTHERKEY].function); ! ! if (r == -2) ! /* We didn't match anything, and the keymap we're indexed into ! shadowed a function previously bound to that prefix. Call ! the function. The recursive call to _rl_dispatch_subseq has ! already taken care of pushing any necessary input back onto ! the input queue with _rl_unget_char. */ ! r = _rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)); ! else if (r && map[ANYOTHERKEY].function) ! { ! /* We didn't match (r is probably -1), so return something to ! tell the caller that it should try ANYOTHERKEY for an ! overridden function. */ ! _rl_unget_char (key); ! return -2; ! } ! else if (r && got_subseq) ! { ! /* OK, back up the chain. */ ! _rl_unget_char (key); ! return -1; ! } } else *************** *** 660,664 **** /* Tell the history routines what is going on. */ ! start_using_history (); /* Make the display buffer match the state of the line. */ --- 720,724 ---- /* Tell the history routines what is going on. */ ! _rl_start_using_history (); /* Make the display buffer match the state of the line. */ *************** *** 676,679 **** --- 736,742 ---- #endif + /* Each line starts in insert mode (the default). */ + _rl_set_insert_mode (RL_IM_DEFAULT, 1); + return 0; } *************** *** 788,827 **** } static void ! bind_arrow_keys_internal () { ! rl_command_func_t *f; #if defined (__MSDOS__) ! f = rl_function_of_keyseq ("\033[0A", _rl_keymap, (int *)NULL); ! if (!f || f == rl_do_lowercase_version) ! { ! _rl_bind_if_unbound ("\033[0A", rl_get_previous_history); ! _rl_bind_if_unbound ("\033[0B", rl_backward); ! _rl_bind_if_unbound ("\033[0C", rl_forward); ! _rl_bind_if_unbound ("\033[0D", rl_get_next_history); ! } ! #endif ! ! f = rl_function_of_keyseq ("\033[A", _rl_keymap, (int *)NULL); ! if (!f || f == rl_do_lowercase_version) ! { ! _rl_bind_if_unbound ("\033[A", rl_get_previous_history); ! _rl_bind_if_unbound ("\033[B", rl_get_next_history); ! _rl_bind_if_unbound ("\033[C", rl_forward); ! _rl_bind_if_unbound ("\033[D", rl_backward); ! } ! f = rl_function_of_keyseq ("\033OA", _rl_keymap, (int *)NULL); ! if (!f || f == rl_do_lowercase_version) ! { ! _rl_bind_if_unbound ("\033OA", rl_get_previous_history); ! _rl_bind_if_unbound ("\033OB", rl_get_next_history); ! _rl_bind_if_unbound ("\033OC", rl_forward); ! _rl_bind_if_unbound ("\033OD", rl_backward); ! } } ! /* Try and bind the common arrow key prefix after giving termcap and the inputrc file a chance to bind them and create `real' keymaps for the arrow key prefix. */ --- 851,889 ---- } + /* Bind some common arrow key sequences in MAP. */ static void ! bind_arrow_keys_internal (map) ! Keymap map; { ! Keymap xkeymap; ! ! xkeymap = _rl_keymap; ! _rl_keymap = map; #if defined (__MSDOS__) ! _rl_bind_if_unbound ("\033[0A", rl_get_previous_history); ! _rl_bind_if_unbound ("\033[0B", rl_backward_char); ! _rl_bind_if_unbound ("\033[0C", rl_forward_char); ! _rl_bind_if_unbound ("\033[0D", rl_get_next_history); ! #endif ! ! _rl_bind_if_unbound ("\033[A", rl_get_previous_history); ! _rl_bind_if_unbound ("\033[B", rl_get_next_history); ! _rl_bind_if_unbound ("\033[C", rl_forward_char); ! _rl_bind_if_unbound ("\033[D", rl_backward_char); ! _rl_bind_if_unbound ("\033[H", rl_beg_of_line); ! _rl_bind_if_unbound ("\033[F", rl_end_of_line); ! ! _rl_bind_if_unbound ("\033OA", rl_get_previous_history); ! _rl_bind_if_unbound ("\033OB", rl_get_next_history); ! _rl_bind_if_unbound ("\033OC", rl_forward_char); ! _rl_bind_if_unbound ("\033OD", rl_backward_char); ! _rl_bind_if_unbound ("\033OH", rl_beg_of_line); ! _rl_bind_if_unbound ("\033OF", rl_end_of_line); ! _rl_keymap = xkeymap; } ! /* Try and bind the common arrow key prefixes after giving termcap and the inputrc file a chance to bind them and create `real' keymaps for the arrow key prefix. */ *************** *** 829,2212 **** bind_arrow_keys () { ! Keymap xkeymap; ! ! xkeymap = _rl_keymap; ! ! _rl_keymap = emacs_standard_keymap; ! bind_arrow_keys_internal (); #if defined (VI_MODE) ! _rl_keymap = vi_movement_keymap; ! bind_arrow_keys_internal (); #endif - - _rl_keymap = xkeymap; - } - - - /* **************************************************************** */ - /* */ - /* Numeric Arguments */ - /* */ - /* **************************************************************** */ - - /* Handle C-u style numeric args, as well as M--, and M-digits. */ - static int - rl_digit_loop () - { - int key, c, sawminus, sawdigits; - - rl_save_prompt (); - - RL_SETSTATE(RL_STATE_NUMERICARG); - sawminus = sawdigits = 0; - while (1) - { - if (rl_numeric_arg > 1000000) - { - sawdigits = rl_explicit_arg = rl_numeric_arg = 0; - rl_ding (); - rl_restore_prompt (); - rl_clear_message (); - RL_UNSETSTATE(RL_STATE_NUMERICARG); - return 1; - } - rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg); - RL_SETSTATE(RL_STATE_MOREINPUT); - key = c = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - - if (c < 0) - { - _rl_abort_internal (); - return -1; - } - - /* If we see a key bound to `universal-argument' after seeing digits, - it ends the argument but is otherwise ignored. */ - if (_rl_keymap[c].type == ISFUNC && - _rl_keymap[c].function == rl_universal_argument) - { - if (sawdigits == 0) - { - rl_numeric_arg *= 4; - continue; - } - else - { - RL_SETSTATE(RL_STATE_MOREINPUT); - key = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - rl_restore_prompt (); - rl_clear_message (); - RL_UNSETSTATE(RL_STATE_NUMERICARG); - return (_rl_dispatch (key, _rl_keymap)); - } - } - - c = UNMETA (c); - - if (_rl_digit_p (c)) - { - rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + c - '0' : c - '0'; - sawdigits = rl_explicit_arg = 1; - } - else if (c == '-' && rl_explicit_arg == 0) - { - rl_numeric_arg = sawminus = 1; - rl_arg_sign = -1; - } - else - { - /* Make M-- command equivalent to M--1 command. */ - if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0) - rl_explicit_arg = 1; - rl_restore_prompt (); - rl_clear_message (); - RL_UNSETSTATE(RL_STATE_NUMERICARG); - return (_rl_dispatch (key, _rl_keymap)); - } - } - - /*NOTREACHED*/ - } - - /* Add the current digit to the argument in progress. */ - int - rl_digit_argument (ignore, key) - int ignore, key; - { - rl_execute_next (key); - return (rl_digit_loop ()); - } - - /* What to do when you abort reading an argument. */ - int - rl_discard_argument () - { - rl_ding (); - rl_clear_message (); - _rl_init_argument (); - return 0; - } - - /* Create a default argument. */ - int - _rl_init_argument () - { - rl_numeric_arg = rl_arg_sign = 1; - rl_explicit_arg = 0; - return 0; - } - - /* C-u, universal argument. Multiply the current argument by 4. - Read a key. If the key has nothing to do with arguments, then - dispatch on it. If the key is the abort character then abort. */ - int - rl_universal_argument (count, key) - int count, key; - { - rl_numeric_arg *= 4; - return (rl_digit_loop ()); - } - - /* **************************************************************** */ - /* */ - /* Insert and Delete */ - /* */ - /* **************************************************************** */ - - /* Insert a string of text into the line at point. This is the only - way that you should do insertion. rl_insert () calls this - function. */ - int - rl_insert_text (string) - const char *string; - { - register int i, l = strlen (string); - - if (rl_end + l >= rl_line_buffer_len) - rl_extend_line_buffer (rl_end + l); - - for (i = rl_end; i >= rl_point; i--) - the_line[i + l] = the_line[i]; - strncpy (the_line + rl_point, string, l); - - /* Remember how to undo this if we aren't undoing something. */ - if (!_rl_doing_an_undo) - { - /* If possible and desirable, concatenate the undos. */ - if ((l == 1) && - rl_undo_list && - (rl_undo_list->what == UNDO_INSERT) && - (rl_undo_list->end == rl_point) && - (rl_undo_list->end - rl_undo_list->start < 20)) - rl_undo_list->end++; - else - rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); - } - rl_point += l; - rl_end += l; - the_line[rl_end] = '\0'; - return l; - } - - /* Delete the string between FROM and TO. FROM is - inclusive, TO is not. */ - int - rl_delete_text (from, to) - int from, to; - { - register char *text; - register int diff, i; - - /* Fix it if the caller is confused. */ - if (from > to) - SWAP (from, to); - - /* fix boundaries */ - if (to > rl_end) - { - to = rl_end; - if (from > to) - from = to; - } - - text = rl_copy_text (from, to); - - /* Some versions of strncpy() can't handle overlapping arguments. */ - diff = to - from; - for (i = from; i < rl_end - diff; i++) - the_line[i] = the_line[i + diff]; - - /* Remember how to undo this delete. */ - if (_rl_doing_an_undo == 0) - rl_add_undo (UNDO_DELETE, from, to, text); - else - free (text); - - rl_end -= diff; - the_line[rl_end] = '\0'; - return (diff); } - /* Fix up point so that it is within the line boundaries after killing - text. If FIX_MARK_TOO is non-zero, the mark is forced within line - boundaries also. */ - - #define _RL_FIX_POINT(x) \ - do { \ - if (x > rl_end) \ - x = rl_end; \ - else if (x < 0) \ - x = 0; \ - } while (0) - - void - _rl_fix_point (fix_mark_too) - int fix_mark_too; - { - _RL_FIX_POINT (rl_point); - if (fix_mark_too) - _RL_FIX_POINT (rl_mark); - } - #undef _RL_FIX_POINT - - void - _rl_replace_text (text, start, end) - const char *text; - int start, end; - { - rl_begin_undo_group (); - rl_delete_text (start, end + 1); - rl_point = start; - rl_insert_text (text); - rl_end_undo_group (); - } - - /* **************************************************************** */ - /* */ - /* Readline character functions */ - /* */ - /* **************************************************************** */ - - /* This is not a gap editor, just a stupid line input routine. No hair - is involved in writing any of the functions, and none should be. */ - - /* Note that: - - rl_end is the place in the string that we would place '\0'; - i.e., it is always safe to place '\0' there. - - rl_point is the place in the string where the cursor is. Sometimes - this is the same as rl_end. - - Any command that is called interactively receives two arguments. - The first is a count: the numeric arg pased to this command. - The second is the key which invoked this command. - */ - /* **************************************************************** */ /* */ ! /* Movement Commands */ /* */ /* **************************************************************** */ - /* Note that if you `optimize' the display for these functions, you cannot - use said functions in other functions which do not do optimizing display. - I.e., you will have to update the data base for rl_redisplay, and you - might as well let rl_redisplay do that job. */ - - /* Move forward COUNT characters. */ - int - rl_forward (count, key) - int count, key; - { - if (count < 0) - rl_backward (-count, key); - else if (count > 0) - { - int end = rl_point + count; - #if defined (VI_MODE) - int lend = rl_end > 0 ? rl_end - (rl_editing_mode == vi_mode) : rl_end; - #else - int lend = rl_end; - #endif - - if (end > lend) - { - rl_point = lend; - rl_ding (); - } - else - rl_point = end; - } - - if (rl_end < 0) - rl_end = 0; - - return 0; - } - - /* Move backward COUNT characters. */ - int - rl_backward (count, key) - int count, key; - { - if (count < 0) - rl_forward (-count, key); - else if (count > 0) - { - if (rl_point < count) - { - rl_point = 0; - rl_ding (); - } - else - rl_point -= count; - } - - if (rl_point < 0) - rl_point = 0; - - return 0; - } - - /* Move to the beginning of the line. */ - int - rl_beg_of_line (count, key) - int count, key; - { - rl_point = 0; - return 0; - } - - /* Move to the end of the line. */ - int - rl_end_of_line (count, key) - int count, key; - { - rl_point = rl_end; - return 0; - } - - /* Move forward a word. We do what Emacs does. */ - int - rl_forward_word (count, key) - int count, key; - { - int c; - - if (count < 0) - { - rl_backward_word (-count, key); - return 0; - } - - while (count) - { - if (rl_point == rl_end) - return 0; - - /* If we are not in a word, move forward until we are in one. - Then, move forward until we hit a non-alphabetic character. */ - c = the_line[rl_point]; - if (rl_alphabetic (c) == 0) - { - while (++rl_point < rl_end) - { - c = the_line[rl_point]; - if (rl_alphabetic (c)) - break; - } - } - if (rl_point == rl_end) - return 0; - while (++rl_point < rl_end) - { - c = the_line[rl_point]; - if (rl_alphabetic (c) == 0) - break; - } - --count; - } - return 0; - } - - /* Move backward a word. We do what Emacs does. */ - int - rl_backward_word (count, key) - int count, key; - { - int c; - - if (count < 0) - { - rl_forward_word (-count, key); - return 0; - } - - while (count) - { - if (!rl_point) - return 0; - - /* Like rl_forward_word (), except that we look at the characters - just before point. */ - - c = the_line[rl_point - 1]; - if (rl_alphabetic (c) == 0) - { - while (--rl_point) - { - c = the_line[rl_point - 1]; - if (rl_alphabetic (c)) - break; - } - } - - while (rl_point) - { - c = the_line[rl_point - 1]; - if (rl_alphabetic (c) == 0) - break; - else - --rl_point; - } - --count; - } - return 0; - } - - /* Clear the current line. Numeric argument to C-l does this. */ int ! rl_refresh_line (ignore1, ignore2) ! int ignore1, ignore2; { ! int curr_line; ! ! curr_line = _rl_current_display_line (); ! ! _rl_move_vert (curr_line); ! _rl_move_cursor_relative (0, the_line); /* XXX is this right */ ! ! _rl_clear_to_eol (0); /* arg of 0 means to not use spaces */ ! ! rl_forced_update_display (); ! rl_display_fixed = 1; ! ! return 0; ! } ! /* C-l typed to a line without quoting clears the screen, and then reprints ! the prompt and the current input line. Given a numeric arg, redraw only ! the current line. */ ! int ! rl_clear_screen (count, key) ! int count, key; ! { ! if (rl_explicit_arg) ! { ! rl_refresh_line (count, key); ! return 0; ! } ! _rl_clear_screen (); /* calls termcap function to clear screen */ ! rl_forced_update_display (); ! rl_display_fixed = 1; ! return 0; } int ! rl_arrow_keys (count, c) ! int count, c; { ! int ch; ! ! RL_SETSTATE(RL_STATE_MOREINPUT); ! ch = rl_read_key (); ! RL_UNSETSTATE(RL_STATE_MOREINPUT); ! ! switch (_rl_to_upper (ch)) ! { ! case 'A': ! rl_get_previous_history (count, ch); ! break; ! ! case 'B': ! rl_get_next_history (count, ch); ! break; ! ! case 'C': ! rl_forward (count, ch); ! break; ! case 'D': ! rl_backward (count, ch); ! break; ! default: ! rl_ding (); ! } ! return 0; ! } - - /* **************************************************************** */ - /* */ - /* Text commands */ - /* */ - /* **************************************************************** */ - - /* Insert the character C at the current location, moving point forward. */ - int - rl_insert (count, c) - int count, c; - { - register int i; - char *string; - - if (count <= 0) - return 0; - - /* If we can optimize, then do it. But don't let people crash - readline because of extra large arguments. */ - if (count > 1 && count <= 1024) - { - string = (char *)xmalloc (1 + count); - - for (i = 0; i < count; i++) - string[i] = c; - - string[i] = '\0'; - rl_insert_text (string); - free (string); - - return 0; - } - - if (count > 1024) - { - int decreaser; - char str[1024+1]; - - for (i = 0; i < 1024; i++) - str[i] = c; - - while (count) - { - decreaser = (count > 1024 ? 1024 : count); - str[decreaser] = '\0'; - rl_insert_text (str); - count -= decreaser; - } - - return 0; - } - - /* We are inserting a single character. - If there is pending input, then make a string of all of the - pending characters that are bound to rl_insert, and insert - them all. */ - if (_rl_any_typein ()) - _rl_insert_typein (c); - else - { - /* Inserting a single character. */ - char str[2]; - - str[1] = '\0'; - str[0] = c; - rl_insert_text (str); - } - return 0; - } - - /* Insert the next typed character verbatim. */ - int - rl_quoted_insert (count, key) - int count, key; - { - int c; - - #if defined (HANDLE_SIGNALS) - _rl_disable_tty_signals (); - #endif - - RL_SETSTATE(RL_STATE_MOREINPUT); - c = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - - #if defined (HANDLE_SIGNALS) - _rl_restore_tty_signals (); - #endif - - return (rl_insert (count, c)); - } - - /* Insert a tab character. */ - int - rl_tab_insert (count, key) - int count, key; - { - return (rl_insert (count, '\t')); - } - - /* What to do when a NEWLINE is pressed. We accept the whole line. - KEY is the key that invoked this command. I guess it could have - meaning in the future. */ - int - rl_newline (count, key) - int count, key; - { - rl_done = 1; - - if (_rl_history_preserve_point) - _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; - - RL_SETSTATE(RL_STATE_DONE); - - #if defined (VI_MODE) - if (rl_editing_mode == vi_mode) - { - _rl_vi_done_inserting (); - _rl_vi_reset_last (); - } - #endif /* VI_MODE */ - - /* If we've been asked to erase empty lines, suppress the final update, - since _rl_update_final calls rl_crlf(). */ - if (rl_erase_empty_line && rl_point == 0 && rl_end == 0) - return 0; - - if (readline_echoing_p) - _rl_update_final (); - return 0; - } - - /* What to do for some uppercase characters, like meta characters, - and some characters appearing in emacs_ctlx_keymap. This function - is just a stub, you bind keys to it and the code in _rl_dispatch () - is special cased. */ - int - rl_do_lowercase_version (ignore1, ignore2) - int ignore1, ignore2; - { - return 0; - } - - /* Rubout the character behind point. */ - int - rl_rubout (count, key) - int count, key; - { - if (count < 0) - { - rl_delete (-count, key); - return 0; - } - - if (!rl_point) - { - rl_ding (); - return -1; - } - - if (count > 1 || rl_explicit_arg) - { - int orig_point = rl_point; - rl_backward (count, key); - rl_kill_text (orig_point, rl_point); - } - else - { - unsigned char c = the_line[--rl_point]; - rl_delete_text (rl_point, rl_point + 1); - - if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos) - { - int l; - l = rl_character_len (c, rl_point); - _rl_erase_at_end_of_line (l); - } - } - return 0; - } - - /* Delete the character under the cursor. Given a numeric argument, - kill that many characters instead. */ - int - rl_delete (count, key) - int count, key; - { - if (count < 0) - return (rl_rubout (-count, key)); - - if (rl_point == rl_end) - { - rl_ding (); - return -1; - } - - if (count > 1 || rl_explicit_arg) - { - int orig_point = rl_point; - rl_forward (count, key); - rl_kill_text (orig_point, rl_point); - rl_point = orig_point; - return 0; - } - else - return (rl_delete_text (rl_point, rl_point + 1)); - } - - /* Delete the character under the cursor, unless the insertion - point is at the end of the line, in which case the character - behind the cursor is deleted. COUNT is obeyed and may be used - to delete forward or backward that many characters. */ - int - rl_rubout_or_delete (count, key) - int count, key; - { - if (rl_end != 0 && rl_point == rl_end) - return (rl_rubout (count, key)); - else - return (rl_delete (count, key)); - } - - /* Delete all spaces and tabs around point. */ - int - rl_delete_horizontal_space (count, ignore) - int count, ignore; - { - int start = rl_point; - - while (rl_point && whitespace (the_line[rl_point - 1])) - rl_point--; - - start = rl_point; - - while (rl_point < rl_end && whitespace (the_line[rl_point])) - rl_point++; - - if (start != rl_point) - { - rl_delete_text (start, rl_point); - rl_point = start; - } - return 0; - } - - /* Like the tcsh editing function delete-char-or-list. The eof character - is caught before this is invoked, so this really does the same thing as - delete-char-or-list-or-eof, as long as it's bound to the eof character. */ - int - rl_delete_or_show_completions (count, key) - int count, key; - { - if (rl_end != 0 && rl_point == rl_end) - return (rl_possible_completions (count, key)); - else - return (rl_delete (count, key)); - } - - #ifndef RL_COMMENT_BEGIN_DEFAULT - #define RL_COMMENT_BEGIN_DEFAULT "#" - #endif - - /* Turn the current line into a comment in shell history. - A K*rn shell style function. */ - int - rl_insert_comment (count, key) - int count, key; - { - rl_beg_of_line (1, key); - rl_insert_text (_rl_comment_begin ? _rl_comment_begin - : RL_COMMENT_BEGIN_DEFAULT); - (*rl_redisplay_function) (); - rl_newline (1, '\n'); - return (0); - } - - /* **************************************************************** */ - /* */ - /* Changing Case */ - /* */ - /* **************************************************************** */ - - /* The three kinds of things that we know how to do. */ - #define UpCase 1 - #define DownCase 2 - #define CapCase 3 - - /* Uppercase the word at point. */ - int - rl_upcase_word (count, key) - int count, key; - { - return (rl_change_case (count, UpCase)); - } - - /* Lowercase the word at point. */ - int - rl_downcase_word (count, key) - int count, key; - { - return (rl_change_case (count, DownCase)); - } - - /* Upcase the first letter, downcase the rest. */ - int - rl_capitalize_word (count, key) - int count, key; - { - return (rl_change_case (count, CapCase)); - } - - /* The meaty function. - Change the case of COUNT words, performing OP on them. - OP is one of UpCase, DownCase, or CapCase. - If a negative argument is given, leave point where it started, - otherwise, leave it where it moves to. */ - static int - rl_change_case (count, op) - int count, op; - { - register int start, end; - int inword, c; - - start = rl_point; - rl_forward_word (count, 0); - end = rl_point; - - if (count < 0) - SWAP (start, end); - - /* We are going to modify some text, so let's prepare to undo it. */ - rl_modifying (start, end); - - for (inword = 0; start < end; start++) - { - c = the_line[start]; - switch (op) - { - case UpCase: - the_line[start] = _rl_to_upper (c); - break; - - case DownCase: - the_line[start] = _rl_to_lower (c); - break; - - case CapCase: - the_line[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c); - inword = rl_alphabetic (the_line[start]); - break; - - default: - rl_ding (); - return -1; - } - } - rl_point = end; - return 0; - } - - /* **************************************************************** */ - /* */ - /* Transposition */ - /* */ - /* **************************************************************** */ - - /* Transpose the words at point. If point is at the end of the line, - transpose the two words before point. */ - int - rl_transpose_words (count, key) - int count, key; - { - char *word1, *word2; - int w1_beg, w1_end, w2_beg, w2_end; - int orig_point = rl_point; - - if (!count) - return 0; - - /* Find the two words. */ - rl_forward_word (count, key); - w2_end = rl_point; - rl_backward_word (1, key); - w2_beg = rl_point; - rl_backward_word (count, key); - w1_beg = rl_point; - rl_forward_word (1, key); - w1_end = rl_point; - - /* Do some check to make sure that there really are two words. */ - if ((w1_beg == w2_beg) || (w2_beg < w1_end)) - { - rl_ding (); - rl_point = orig_point; - return -1; - } - - /* Get the text of the words. */ - word1 = rl_copy_text (w1_beg, w1_end); - word2 = rl_copy_text (w2_beg, w2_end); - - /* We are about to do many insertions and deletions. Remember them - as one operation. */ - rl_begin_undo_group (); - - /* Do the stuff at word2 first, so that we don't have to worry - about word1 moving. */ - rl_point = w2_beg; - rl_delete_text (w2_beg, w2_end); - rl_insert_text (word1); - - rl_point = w1_beg; - rl_delete_text (w1_beg, w1_end); - rl_insert_text (word2); - - /* This is exactly correct since the text before this point has not - changed in length. */ - rl_point = w2_end; - - /* I think that does it. */ - rl_end_undo_group (); - free (word1); - free (word2); - - return 0; - } - - /* Transpose the characters at point. If point is at the end of the line, - then transpose the characters before point. */ - int - rl_transpose_chars (count, key) - int count, key; - { - char dummy[2]; - - if (!count) - return 0; - - if (!rl_point || rl_end < 2) - { - rl_ding (); - return -1; - } - - rl_begin_undo_group (); - - if (rl_point == rl_end) - { - --rl_point; - count = 1; - } - rl_point--; - - dummy[0] = the_line[rl_point]; - dummy[1] = '\0'; - - rl_delete_text (rl_point, rl_point + 1); - - rl_point += count; - _rl_fix_point (0); - rl_insert_text (dummy); - - rl_end_undo_group (); - return 0; - } - - /* **************************************************************** */ - /* */ - /* Character Searching */ - /* */ - /* **************************************************************** */ - - int - _rl_char_search_internal (count, dir, schar) - int count, dir, schar; - { - int pos, inc; - - pos = rl_point; - inc = (dir < 0) ? -1 : 1; - while (count) - { - if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end)) - { - rl_ding (); - return -1; - } - - pos += inc; - do - { - if (rl_line_buffer[pos] == schar) - { - count--; - if (dir < 0) - rl_point = (dir == BTO) ? pos + 1 : pos; - else - rl_point = (dir == FTO) ? pos - 1 : pos; - break; - } - } - while ((dir < 0) ? pos-- : ++pos < rl_end); - } return (0); - } - - /* Search COUNT times for a character read from the current input stream. - FDIR is the direction to search if COUNT is non-negative; otherwise - the search goes in BDIR. */ - static int - _rl_char_search (count, fdir, bdir) - int count, fdir, bdir; - { - int c; - - RL_SETSTATE(RL_STATE_MOREINPUT); - c = rl_read_key (); - RL_UNSETSTATE(RL_STATE_MOREINPUT); - - if (count < 0) - return (_rl_char_search_internal (-count, bdir, c)); - else - return (_rl_char_search_internal (count, fdir, c)); - } - - int - rl_char_search (count, key) - int count, key; - { - return (_rl_char_search (count, FFIND, BFIND)); - } - - int - rl_backward_char_search (count, key) - int count, key; - { - return (_rl_char_search (count, BFIND, FFIND)); - } - - /* **************************************************************** */ - /* */ - /* History Utilities */ - /* */ - /* **************************************************************** */ - - /* We already have a history library, and that is what we use to control - the history features of readline. This is our local interface to - the history mechanism. */ - - /* While we are editing the history, this is the saved - version of the original line. */ - HIST_ENTRY *_rl_saved_line_for_history = (HIST_ENTRY *)NULL; - - /* Set the history pointer back to the last entry in the history. */ - static void - start_using_history () - { - using_history (); - if (_rl_saved_line_for_history) - _rl_free_history_entry (_rl_saved_line_for_history); - - _rl_saved_line_for_history = (HIST_ENTRY *)NULL; - } - - /* Free the contents (and containing structure) of a HIST_ENTRY. */ - void - _rl_free_history_entry (entry) - HIST_ENTRY *entry; - { - if (entry == 0) - return; - if (entry->line) - free (entry->line); - free (entry); - } - - /* Perhaps put back the current line if it has changed. */ - int - rl_maybe_replace_line () - { - HIST_ENTRY *temp; - - temp = current_history (); - /* If the current line has changed, save the changes. */ - if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list)) - { - temp = replace_history_entry (where_history (), the_line, (histdata_t)rl_undo_list); - free (temp->line); - free (temp); - } - return 0; - } - - /* Restore the _rl_saved_line_for_history if there is one. */ - int - rl_maybe_unsave_line () - { - int line_len; - - if (_rl_saved_line_for_history) - { - line_len = strlen (_rl_saved_line_for_history->line); - - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - - strcpy (the_line, _rl_saved_line_for_history->line); - rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data; - _rl_free_history_entry (_rl_saved_line_for_history); - _rl_saved_line_for_history = (HIST_ENTRY *)NULL; - rl_end = rl_point = strlen (the_line); - } - else - rl_ding (); - return 0; - } - - /* Save the current line in _rl_saved_line_for_history. */ - int - rl_maybe_save_line () - { - if (_rl_saved_line_for_history == 0) - { - _rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY)); - _rl_saved_line_for_history->line = savestring (the_line); - _rl_saved_line_for_history->data = (char *)rl_undo_list; - } - return 0; - } - - int - _rl_free_saved_history_line () - { - if (_rl_saved_line_for_history) - { - _rl_free_history_entry (_rl_saved_line_for_history); - _rl_saved_line_for_history = (HIST_ENTRY *)NULL; - } - return 0; - } - - /* **************************************************************** */ - /* */ - /* History Commands */ - /* */ - /* **************************************************************** */ - - /* Meta-< goes to the start of the history. */ - int - rl_beginning_of_history (count, key) - int count, key; - { - return (rl_get_previous_history (1 + where_history (), key)); - } - - /* Meta-> goes to the end of the history. (The current line). */ - int - rl_end_of_history (count, key) - int count, key; - { - rl_maybe_replace_line (); - using_history (); - rl_maybe_unsave_line (); - return 0; - } - - /* Move down to the next history line. */ - int - rl_get_next_history (count, key) - int count, key; - { - HIST_ENTRY *temp; - int line_len; - - if (count < 0) - return (rl_get_previous_history (-count, key)); - - if (count == 0) - return 0; - - rl_maybe_replace_line (); - - /* either not saved by rl_newline or at end of line, so set appropriately. */ - if (_rl_history_saved_point == -1 && (rl_point || rl_end)) - _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; - - temp = (HIST_ENTRY *)NULL; - while (count) - { - temp = next_history (); - if (!temp) - break; - --count; - } - - if (temp == 0) - rl_maybe_unsave_line (); - else - { - line_len = strlen (temp->line); - - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - - strcpy (the_line, temp->line); - rl_undo_list = (UNDO_LIST *)temp->data; - rl_end = strlen (the_line); - rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1) - ? _rl_history_saved_point - : rl_end; - if (rl_point > rl_end) - rl_point = rl_end; - #if defined (VI_MODE) - if (rl_editing_mode == vi_mode) - rl_point = 0; - #endif /* VI_MODE */ - } - return 0; - } - - /* Get the previous item out of our interactive history, making it the current - line. If there is no previous history, just ding. */ - int - rl_get_previous_history (count, key) - int count, key; - { - HIST_ENTRY *old_temp, *temp; - int line_len; - - if (count < 0) - return (rl_get_next_history (-count, key)); - - if (count == 0) - return 0; - - /* either not saved by rl_newline or at end of line, so set appropriately. */ - if (_rl_history_saved_point == -1 && (rl_point || rl_end)) - _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; - - /* If we don't have a line saved, then save this one. */ - rl_maybe_save_line (); - - /* If the current line has changed, save the changes. */ - rl_maybe_replace_line (); - - temp = old_temp = (HIST_ENTRY *)NULL; - while (count) - { - temp = previous_history (); - if (temp == 0) - break; - - old_temp = temp; - --count; - } - - /* If there was a large argument, and we moved back to the start of the - history, that is not an error. So use the last value found. */ - if (!temp && old_temp) - temp = old_temp; - - if (temp == 0) - rl_ding (); - else - { - line_len = strlen (temp->line); - - if (line_len >= rl_line_buffer_len) - rl_extend_line_buffer (line_len); - - strcpy (the_line, temp->line); - rl_undo_list = (UNDO_LIST *)temp->data; - rl_end = line_len; - rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1) - ? _rl_history_saved_point - : rl_end; - if (rl_point > rl_end) - rl_point = rl_end; - - #if defined (VI_MODE) - if (rl_editing_mode == vi_mode) - rl_point = 0; - #endif /* VI_MODE */ - } - return 0; - } - - /* **************************************************************** */ - /* */ - /* The Mark and the Region. */ - /* */ - /* **************************************************************** */ - - /* Set the mark at POSITION. */ - int - _rl_set_mark_at_pos (position) - int position; - { - if (position > rl_end) - return -1; - - rl_mark = position; - return 0; - } - - /* A bindable command to set the mark. */ - int - rl_set_mark (count, key) - int count, key; - { - return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point)); - } - - /* Exchange the position of mark and point. */ - int - rl_exchange_point_and_mark (count, key) - int count, key; - { - if (rl_mark > rl_end) - rl_mark = -1; - - if (rl_mark == -1) - { - rl_ding (); - return -1; - } - else - SWAP (rl_point, rl_mark); - - return 0; - } - - /* **************************************************************** */ - /* */ - /* Editing Modes */ - /* */ - /* **************************************************************** */ - /* How to toggle back and forth between editing modes. */ - int - rl_vi_editing_mode (count, key) - int count, key; - { - #if defined (VI_MODE) - rl_editing_mode = vi_mode; - rl_vi_insertion_mode (1, key); - #endif /* VI_MODE */ - return 0; - } - - int - rl_emacs_editing_mode (count, key) - int count, key; - { - rl_editing_mode = emacs_mode; - _rl_keymap = emacs_standard_keymap; - return 0; } --- 891,973 ---- bind_arrow_keys () { ! bind_arrow_keys_internal (emacs_standard_keymap); #if defined (VI_MODE) ! bind_arrow_keys_internal (vi_movement_keymap); ! bind_arrow_keys_internal (vi_insertion_keymap); #endif } /* **************************************************************** */ /* */ ! /* Saving and Restoring Readline's state */ /* */ /* **************************************************************** */ int ! rl_save_state (sp) ! struct readline_state *sp; { ! if (sp == 0) ! return -1; ! sp->point = rl_point; ! sp->end = rl_end; ! sp->mark = rl_mark; ! sp->buffer = rl_line_buffer; ! sp->buflen = rl_line_buffer_len; ! sp->ul = rl_undo_list; ! sp->prompt = rl_prompt; ! ! sp->rlstate = rl_readline_state; ! sp->done = rl_done; ! sp->kmap = _rl_keymap; ! ! sp->lastfunc = rl_last_func; ! sp->insmode = rl_insert_mode; ! sp->edmode = rl_editing_mode; ! sp->kseqlen = rl_key_sequence_length; ! sp->inf = rl_instream; ! sp->outf = rl_outstream; ! sp->pendingin = rl_pending_input; ! sp->macro = rl_executing_macro; ! sp->catchsigs = rl_catch_signals; ! sp->catchsigwinch = rl_catch_sigwinch; ! return (0); } int ! rl_restore_state (sp) ! struct readline_state *sp; { ! if (sp == 0) ! return -1; ! rl_point = sp->point; ! rl_end = sp->end; ! rl_mark = sp->mark; ! the_line = rl_line_buffer = sp->buffer; ! rl_line_buffer_len = sp->buflen; ! rl_undo_list = sp->ul; ! rl_prompt = sp->prompt; ! ! rl_readline_state = sp->rlstate; ! rl_done = sp->done; ! _rl_keymap = sp->kmap; ! ! rl_last_func = sp->lastfunc; ! rl_insert_mode = sp->insmode; ! rl_editing_mode = sp->edmode; ! rl_key_sequence_length = sp->kseqlen; ! rl_instream = sp->inf; ! rl_outstream = sp->outf; ! rl_pending_input = sp->pendingin; ! rl_executing_macro = sp->macro; ! rl_catch_signals = sp->catchsigs; ! rl_catch_sigwinch = sp->catchsigwinch; return (0); } diff -Nrc2 readline-4.2a/readline.h readline-4.3/readline.h *** readline-4.2a/readline.h Wed Sep 12 10:05:55 2001 --- readline-4.3/readline.h Wed Mar 13 17:02:37 2002 *************** *** 30,37 **** --- 30,39 ---- #if defined (READLINE_LIBRARY) # include "rlstdc.h" + # include "rltypedefs.h" # include "keymaps.h" # include "tilde.h" #else # include + # include # include # include *************** *** 39,45 **** /* Hex-encoded Readline version number. */ ! #define RL_READLINE_VERSION 0x0402 /* Readline 4.2 */ #define RL_VERSION_MAJOR 4 ! #define RL_VERSION_MINOR 2 /* Readline data structures. */ --- 41,47 ---- /* Hex-encoded Readline version number. */ ! #define RL_READLINE_VERSION 0x0403 /* Readline 4.3 */ #define RL_VERSION_MAJOR 4 ! #define RL_VERSION_MINOR 3 /* Readline data structures. */ *************** *** 83,87 **** --- 85,93 ---- /* Bindable commands for moving the cursor. */ + extern int rl_forward_byte PARAMS((int, int)); + extern int rl_forward_char PARAMS((int, int)); extern int rl_forward PARAMS((int, int)); + extern int rl_backward_byte PARAMS((int, int)); + extern int rl_backward_char PARAMS((int, int)); extern int rl_backward PARAMS((int, int)); extern int rl_beg_of_line PARAMS((int, int)); *************** *** 133,136 **** --- 139,145 ---- extern int rl_emacs_editing_mode PARAMS((int, int)); + /* Bindable commands to change the insert mode (insert or overwrite) */ + extern int rl_overwrite_mode PARAMS((int, int)); + /* Bindable commands for managing key bindings. */ extern int rl_re_read_init_file PARAMS((int, int)); *************** *** 366,369 **** --- 375,379 ---- /* Modifying text. */ + extern void rl_replace_line PARAMS((const char *, int)); extern int rl_insert_text PARAMS((const char *)); extern int rl_delete_text PARAMS((int, int)); *************** *** 418,421 **** --- 428,433 ---- extern char *rl_filename_completion_function PARAMS((const char *, int)); + extern int rl_completion_mode PARAMS((rl_command_func_t *)); + #if 0 /* Backwards compatibility (compat.c). These will go away sometime. */ *************** *** 454,457 **** --- 466,473 ---- extern int rl_editing_mode; + /* Insert or overwrite mode for emacs mode. 1 means insert mode; 0 means + overwrite mode. Reset to insert mode on each input line. */ + extern int rl_insert_mode; + /* The name of the calling program. You should initialize this to whatever was in argv[0]. It is used when parsing conditionals. */ *************** *** 676,679 **** --- 692,699 ---- extern int rl_completion_append_character; + /* If set to non-zero by an application completion function, + rl_completion_append_character will not be appended. */ + extern int rl_completion_suppress_append; + /* Up to this many items will be displayed in response to a possible-completions call. After that, we ask the user if she *************** *** 681,684 **** --- 701,715 ---- extern int rl_completion_query_items; + /* If non-zero, a slash will be appended to completed filenames that are + symbolic links to directory names, subject to the value of the + mark-directories variable (which is user-settable). This exists so + that application completion functions can override the user's preference + (set via the mark-symlinked-directories variable) if appropriate. + It's set to the value of _rl_complete_mark_symlink_dirs in + rl_complete_internal before any application-specific completion + function is called, so without that function doing anything, the user's + preferences are honored. */ + extern int rl_completion_mark_symlink_dirs; + /* If non-zero, then disallow duplicates in the matches. */ extern int rl_ignore_completion_duplicates; *************** *** 687,691 **** completion character will be inserted as any other. */ extern int rl_inhibit_completion; ! /* Definitions available for use by readline clients. */ #define RL_PROMPT_START_IGNORE '\001' --- 718,722 ---- completion character will be inserted as any other. */ extern int rl_inhibit_completion; ! /* Definitions available for use by readline clients. */ #define RL_PROMPT_START_IGNORE '\001' *************** *** 725,728 **** --- 756,795 ---- #define RL_UNSETSTATE(x) (rl_readline_state &= ~(x)) #define RL_ISSTATE(x) (rl_readline_state & (x)) + + struct readline_state { + /* line state */ + int point; + int end; + int mark; + char *buffer; + int buflen; + UNDO_LIST *ul; + char *prompt; + + /* global state */ + int rlstate; + int done; + Keymap kmap; + + /* input state */ + rl_command_func_t *lastfunc; + int insmode; + int edmode; + int kseqlen; + FILE *inf; + FILE *outf; + int pendingin; + char *macro; + + /* signal state */ + int catchsigs; + int catchsigwinch; + + /* reserved for future expansion, so the struct size doesn't change */ + char reserved[64]; + }; + + extern int rl_save_state PARAMS((struct readline_state *)); + extern int rl_restore_state PARAMS((struct readline_state *)); #ifdef __cplusplus diff -Nrc2 readline-4.2a/rlconf.h readline-4.3/rlconf.h *** readline-4.2a/rlconf.h Thu Aug 5 08:11:14 1999 --- readline-4.3/rlconf.h Tue Jan 22 12:54:23 2002 *************** *** 55,57 **** --- 55,60 ---- #define READLINE_CALLBACKS + /* Define this if you want the cursor to indicate insert or overwrite mode. */ + /* #define CURSOR_MODE */ + #endif /* _RLCONF_H_ */ diff -Nrc2 readline-4.2a/rldefs.h readline-4.3/rldefs.h *** readline-4.2a/rldefs.h Mon Oct 29 10:26:39 2001 --- readline-4.3/rldefs.h Tue May 7 15:40:07 2002 *************** *** 75,79 **** #else extern int _rl_stricmp PARAMS((char *, char *)); ! extern int _rl_strnicmp PARAMS((char *, char *)); #endif --- 75,79 ---- #else extern int _rl_stricmp PARAMS((char *, char *)); ! extern int _rl_strnicmp PARAMS((char *, char *, int)); #endif *************** *** 90,93 **** --- 90,100 ---- #endif + #if !defined (RL_IM_INSERT) + # define RL_IM_INSERT 1 + # define RL_IM_OVERWRITE 0 + # + # define RL_IM_DEFAULT RL_IM_INSERT + #endif + /* If you cast map[key].function to type (Keymap) on a Cray, the compiler takes the value of map[key].function and *************** *** 122,128 **** functions. It says what kind of (shell-like) quoting we found anywhere in the line. */ ! #define RL_QF_SINGLE_QUOTE 0x1 ! #define RL_QF_DOUBLE_QUOTE 0x2 ! #define RL_QF_BACKSLASH 0x4 /* Default readline line buffer length. */ --- 129,136 ---- functions. It says what kind of (shell-like) quoting we found anywhere in the line. */ ! #define RL_QF_SINGLE_QUOTE 0x01 ! #define RL_QF_DOUBLE_QUOTE 0x02 ! #define RL_QF_BACKSLASH 0x04 ! #define RL_QF_OTHER_QUOTE 0x08 /* Default readline line buffer length. */ *************** *** 137,140 **** --- 145,152 ---- #if !defined (FREE) # define FREE(x) if (x) free (x) + #endif + + #if !defined (SWAP) + # define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) #endif diff -Nrc2 readline-4.2a/rlmbutil.h readline-4.3/rlmbutil.h *** readline-4.2a/rlmbutil.h Wed Dec 31 19:00:00 1969 --- readline-4.3/rlmbutil.h Thu Dec 20 09:54:38 2001 *************** *** 0 **** --- 1,108 ---- + /* rlmbutil.h -- utility functions for multibyte characters. */ + + /* Copyright (C) 2001 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + + #if !defined (_RL_MBUTIL_H_) + #define _RL_MBUTIL_H_ + + #include "rlstdc.h" + + /************************************************/ + /* check multibyte capability for I18N code */ + /************************************************/ + + /* For platforms which support the ISO C amendement 1 functionality we + support user defined character classes. */ + /* Solaris 2.5 has a bug: must be included before . */ + #if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) + # include + # include + # if defined (HAVE_MBSRTOWCS) /* system is supposed to support XPG5 */ + # define HANDLE_MULTIBYTE 1 + # endif + #endif + + /* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */ + #if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T) + # define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0) + # define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0) + # define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0) + # define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0) + # define mbrlen(s, n, ps) (mbrlen) (s, n, 0) + # define mbstate_t int + #endif + + /* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to + handle multibyte chars (some systems define MB_LEN_MAX as 1) */ + #ifdef HANDLE_MULTIBYTE + # include + # if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16) + # undef MB_LEN_MAX + # endif + # if !defined (MB_LEN_MAX) + # define MB_LEN_MAX 16 + # endif + #endif + + /************************************************/ + /* end of multibyte capability checks for I18N */ + /************************************************/ + + /* + * Flags for _rl_find_prev_mbchar and _rl_find_next_mbchar: + * + * MB_FIND_ANY find any multibyte character + * MB_FIND_NONZERO find a non-zero-width multibyte character + */ + + #define MB_FIND_ANY 0x00 + #define MB_FIND_NONZERO 0x01 + + extern int _rl_find_prev_mbchar PARAMS((char *, int, int)); + extern int _rl_find_next_mbchar PARAMS((char *, int, int, int)); + + #ifdef HANDLE_MULTIBYTE + + extern int _rl_compare_chars PARAMS((char *, int, mbstate_t *, char *, int, mbstate_t *)); + extern int _rl_get_char_len PARAMS((char *, mbstate_t *)); + extern int _rl_adjust_point PARAMS((char *, int, mbstate_t *)); + + extern int _rl_read_mbchar PARAMS((char *, int)); + extern int _rl_read_mbstring PARAMS((int, char *, int)); + + extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int)); + + #else /* !HANDLE_MULTIBYTE */ + + #undef MB_LEN_MAX + #undef MB_CUR_MAX + + #define MB_LEN_MAX 1 + #define MB_CUR_MAX 1 + + #define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1)) + #define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2)) + + #endif /* !HANDLE_MULTIBYTE */ + + extern int rl_byte_oriented; + + #endif /* _RL_MBUTIL_H_ */ diff -Nrc2 readline-4.2a/rlprivate.h readline-4.3/rlprivate.h *** readline-4.2a/rlprivate.h Mon Oct 29 10:24:34 2001 --- readline-4.3/rlprivate.h Wed Mar 13 16:46:20 2002 *************** *** 53,56 **** --- 53,57 ---- extern int readline_echoing_p; extern int rl_key_sequence_length; + extern int rl_byte_oriented; /* display.c */ *************** *** 66,81 **** *************************************************************************/ - /* bind.c */ - extern char *rl_untranslate_keyseq PARAMS((int)); - /* kill.c */ extern int rl_set_retained_kills PARAMS((int)); - /* readline.c */ - extern int rl_discard_argument PARAMS((void)); - - /* rltty.c */ - extern int rl_stop_output PARAMS((int, int)); - /* terminal.c */ extern void _rl_set_screen_size PARAMS((int, int)); --- 67,73 ---- *************** *** 114,117 **** --- 106,113 ---- extern void _rl_bind_if_unbound PARAMS((const char *, rl_command_func_t *)); + /* complete.c */ + extern char _rl_find_completion_word PARAMS((int *, int *)); + extern void _rl_free_match_list PARAMS((char **)); + /* display.c */ extern char *_rl_strip_prompt PARAMS((char *)); *************** *** 133,137 **** --- 129,135 ---- extern int _rl_any_typein PARAMS((void)); extern int _rl_input_available PARAMS((void)); + extern int _rl_input_queued PARAMS((int)); extern void _rl_insert_typein PARAMS((int)); + extern int _rl_unget_char PARAMS((int)); /* macro.c */ *************** *** 143,146 **** --- 141,150 ---- extern void _rl_kill_kbd_macro PARAMS((void)); + /* misc.c */ + extern int _rl_init_argument PARAMS((void)); + extern void _rl_start_using_history PARAMS((void)); + extern int _rl_free_saved_history_line PARAMS((void)); + extern void _rl_set_insert_mode PARAMS((int, int)); + /* nls.c */ extern int _rl_init_eightbit PARAMS((void)); *************** *** 153,162 **** extern void _rl_set_the_line PARAMS((void)); extern int _rl_dispatch PARAMS((int, Keymap)); ! extern int _rl_init_argument PARAMS((void)); ! extern void _rl_fix_point PARAMS((int)); ! extern void _rl_replace_text PARAMS((const char *, int, int)); ! extern int _rl_char_search_internal PARAMS((int, int, int)); ! extern int _rl_set_mark_at_pos PARAMS((int)); ! extern int _rl_free_saved_history_line PARAMS((void)); /* rltty.c */ --- 157,161 ---- extern void _rl_set_the_line PARAMS((void)); extern int _rl_dispatch PARAMS((int, Keymap)); ! extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); /* rltty.c */ *************** *** 176,182 **** extern void _rl_enable_meta_key PARAMS((void)); extern void _rl_control_keypad PARAMS((int)); /* util.c */ - extern int rl_alphabetic PARAMS((int)); extern int _rl_abort_internal PARAMS((void)); extern char *_rl_strindex PARAMS((const char *, const char *)); --- 175,195 ---- extern void _rl_enable_meta_key PARAMS((void)); extern void _rl_control_keypad PARAMS((int)); + extern void _rl_set_cursor PARAMS((int, int)); + + /* text.c */ + extern void _rl_fix_point PARAMS((int)); + extern int _rl_replace_text PARAMS((const char *, int, int)); + extern int _rl_insert_char PARAMS((int, int)); + extern int _rl_overwrite_char PARAMS((int, int)); + extern int _rl_overwrite_rubout PARAMS((int, int)); + extern int _rl_rubout_char PARAMS((int, int)); + #if defined (HANDLE_MULTIBYTE) + extern int _rl_char_search_internal PARAMS((int, int, char *, int)); + #else + extern int _rl_char_search_internal PARAMS((int, int, int)); + #endif + extern int _rl_set_mark_at_pos PARAMS((int)); /* util.c */ extern int _rl_abort_internal PARAMS((void)); extern char *_rl_strindex PARAMS((const char *, const char *)); *************** *** 208,214 **** --- 221,229 ---- extern int _rl_complete_show_all; extern int _rl_complete_mark_directories; + extern int _rl_complete_mark_symlink_dirs; extern int _rl_print_completions_horizontally; extern int _rl_completion_case_fold; extern int _rl_match_hidden_files; + extern int _rl_page_completions; /* display.c */ *************** *** 222,228 **** /* macro.c */ - extern int _rl_defining_kbd_macro; extern char *_rl_executing_macro; /* readline.c */ extern int _rl_horizontal_scroll_mode; --- 237,246 ---- /* macro.c */ extern char *_rl_executing_macro; + /* misc.c */ + extern int _rl_history_preserve_point; + extern int _rl_history_saved_point; + /* readline.c */ extern int _rl_horizontal_scroll_mode; *************** *** 232,236 **** extern int _rl_convert_meta_chars_to_ascii; extern int _rl_output_meta_chars; - extern int _rl_history_preserve_point; extern char *_rl_comment_begin; extern unsigned char _rl_parsing_conditionalized_out; --- 250,253 ---- diff -Nrc2 readline-4.2a/rltty.c readline-4.3/rltty.c *** readline-4.2a/rltty.c Mon Oct 15 09:26:34 2001 --- readline-4.3/rltty.c Mon Feb 18 12:37:29 2002 *************** *** 648,652 **** { release_sigint (); - fprintf(stderr, "readline: warning: rl_prep_terminal: cannot get terminal settings"); return; } --- 648,651 ---- diff -Nrc2 readline-4.2a/search.c readline-4.3/search.c *** readline-4.2a/search.c Wed Aug 22 09:39:52 2001 --- readline-4.3/search.c Tue Jan 22 16:49:58 2002 *************** *** 41,44 **** --- 41,46 ---- #include "rldefs.h" + #include "rlmbutil.h" + #include "readline.h" #include "history.h" *************** *** 81,93 **** HIST_ENTRY *entry; { ! int line_len; ! ! line_len = strlen (entry->line); ! if (line_len >= rl_line_buffer_len) ! rl_extend_line_buffer (line_len); ! strcpy (rl_line_buffer, entry->line); ! rl_undo_list = (UNDO_LIST *)entry->data; - rl_end = line_len; if (_rl_saved_line_for_history) --- 83,88 ---- HIST_ENTRY *entry; { ! rl_replace_line (entry->line, 0); rl_undo_list = (UNDO_LIST *)entry->data; if (_rl_saved_line_for_history) *************** *** 170,173 **** --- 165,170 ---- rl_point = 0; + rl_mark = rl_end; + rl_clear_message (); } *************** *** 183,191 **** int pchar; { ! int saved_point, c; char *p; rl_maybe_save_line (); saved_point = rl_point; /* Use the line buffer to read the search string. */ --- 180,192 ---- int pchar; { ! int saved_point, saved_mark, c; char *p; + #if defined (HANDLE_MULTIBYTE) + char mb[MB_LEN_MAX]; + #endif rl_maybe_save_line (); saved_point = rl_point; + saved_mark = rl_mark; /* Use the line buffer to read the search string. */ *************** *** 207,210 **** --- 208,216 ---- RL_UNSETSTATE(RL_STATE_MOREINPUT); + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + c = _rl_read_mbstring (c, mb, MB_LEN_MAX); + #endif + if (c == 0) break; *************** *** 219,225 **** rl_clear_message (); rl_point = saved_point; SEARCH_RETURN; } ! rl_rubout (1, c); break; --- 225,232 ---- rl_clear_message (); rl_point = saved_point; + rl_mark = saved_mark; SEARCH_RETURN; } ! _rl_rubout_char (1, c); break; *************** *** 243,251 **** rl_clear_message (); rl_point = saved_point; rl_ding (); SEARCH_RETURN; default: ! rl_insert (1, c); break; } --- 250,264 ---- rl_clear_message (); rl_point = saved_point; + rl_mark = saved_mark; rl_ding (); SEARCH_RETURN; default: ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! rl_insert_text (mb); ! else ! #endif ! _rl_insert_char (1, c); break; } *************** *** 254,257 **** --- 267,272 ---- dosearch: + rl_mark = saved_mark; + /* If rl_point == 0, we want to re-use the previous search string and start from the saved history position. If there's no previous search *************** *** 374,380 **** --- 389,397 ---- rl_point = rl_end = rl_history_search_len; rl_line_buffer[rl_end] = '\0'; + rl_mark = 0; } #else rl_point = rl_history_search_len; /* rl_maybe_unsave_line changes it */ + rl_mark = rl_end; #endif return 1; *************** *** 385,388 **** --- 402,407 ---- rl_point = rl_history_search_len; + rl_mark = rl_end; + return 0; } diff -Nrc2 readline-4.2a/shlib/Makefile.in readline-4.3/shlib/Makefile.in *** readline-4.2a/shlib/Makefile.in Fri Nov 2 11:41:23 2001 --- readline-4.3/shlib/Makefile.in Thu Jan 24 10:15:02 2002 *************** *** 114,131 **** $(topdir)/history.c $(topdir)/histsearch.c $(topdir)/histexpand.c \ $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ ! $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/compat.c \ ! $(topdir)/tilde.c # The header files for this library. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \ ! ansi_stdlib.h tcap.h xmalloc.h rlprivate.h rlshell.h ! SHARED_HISTOBJ = history.so histexpand.so histfile.so histsearch.so shell.so SHARED_TILDEOBJ = tilde.so SHARED_OBJ = readline.so vi_mode.so funmap.so keymaps.so parens.so search.so \ rltty.so complete.so bind.so isearch.so display.so signals.so \ util.so kill.so undo.so macro.so input.so callback.so terminal.so \ ! nls.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) compat.so ########################################################################## --- 114,134 ---- $(topdir)/history.c $(topdir)/histsearch.c $(topdir)/histexpand.c \ $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ ! $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \ ! $(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \ ! $(topdir)/mbutil.c # The header files for this library. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \ ! ansi_stdlib.h tcap.h xmalloc.h rlprivate.h rlshell.h rlmbutil.h ! SHARED_HISTOBJ = history.so histexpand.so histfile.so histsearch.so shell.so \ ! mbutil.so SHARED_TILDEOBJ = tilde.so SHARED_OBJ = readline.so vi_mode.so funmap.so keymaps.so parens.so search.so \ rltty.so complete.so bind.so isearch.so display.so signals.so \ util.so kill.so undo.so macro.so input.so callback.so terminal.so \ ! text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \ ! compat.so ########################################################################## *************** *** 244,247 **** --- 247,257 ---- macro.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h macro.so: $(topdir)/tilde.h $(topdir)/history.h $(topdir)/rltypedefs.h + mbutil.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h + mbutil.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/rltypedefs.h + mbutil.so: $(topdir)/chardefs.h $(topdir)/rlstdc.h + misc.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h + misc.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h + misc.so: $(topdir)/rltypedefs.h + misc.so: $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h nls.so: $(topdir)/ansi_stdlib.h nls.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h *************** *** 253,261 **** parens.so: $(topdir)/rltypedefs.h parens.so: $(topdir)/tilde.h - readline.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h - readline.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h - readline.so: $(topdir)/rltypedefs.h - readline.so: $(topdir)/history.h $(topdir)/tilde.h - readline.so: $(topdir)/posixstat.h $(topdir)/ansi_stdlib.h $(topdir)/posixjmp.h rltty.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h rltty.so: $(topdir)/rltty.h $(topdir)/tilde.h --- 263,266 ---- *************** *** 275,278 **** --- 280,287 ---- terminal.so: $(topdir)/tilde.h $(topdir)/history.h terminal.so: $(topdir)/rltypedefs.h + text.so: $(topdir)/readline.h $(topdir)/keymaps.h $(topdir)/chardefs.h + text.so: $(topdir)/rldefs.h ${BUILD_DIR}/config.h $(topdir)/rlconf.h + text.so: $(topdir)/rltypedefs.h + text.so: $(topdir)/history.h $(topdir)/tilde.h $(topdir)/ansi_stdlib.h tilde.so: $(topdir)/ansi_stdlib.h ${BUILD_DIR}/config.h $(topdir)/tilde.h undo.so: $(topdir)/ansi_stdlib.h *************** *** 308,311 **** --- 317,322 ---- kill.so: $(topdir)/rlprivate.h macro.so: $(topdir)/rlprivate.h + mbutil.so: $(topdir)/rlprivate.h + misc.so: $(topdir)/rlprivate.h nls.so: $(topdir)/rlprivate.h parens.so: $(topdir)/rlprivate.h *************** *** 315,318 **** --- 326,330 ---- signals.so: $(topdir)/rlprivate.h terminal.so: $(topdir)/rlprivate.h + text.so: $(topdir)/rlprivate.h undo.so: $(topdir)/rlprivate.h util.so: $(topdir)/rlprivate.h *************** *** 331,400 **** kill.so: $(topdir)/xmalloc.h macro.so: $(topdir)/xmalloc.h readline.so: $(topdir)/xmalloc.h savestring.so: $(topdir)/xmalloc.h search.so: $(topdir)/xmalloc.h shell.so: $(topdir)/xmalloc.h tilde.so: $(topdir)/xmalloc.h ! tilde.so: $(topdir)/xmalloc.h util.so: $(topdir)/xmalloc.h vi_mode.so: $(topdir)/xmalloc.h ! readline.so: $(topdir)/readline.c ! vi_mode.so: $(topdir)/vi_mode.c ! funmap.so: $(topdir)/funmap.c ! keymaps.so: $(topdir)/keymaps.c ! parens.so: $(topdir)/parens.c ! search.so: $(topdir)/search.c ! rltty.so: $(topdir)/rltty.c compat.so: $(topdir)/compat.c complete.so: $(topdir)/complete.c - bind.so: $(topdir)/bind.c - isearch.so: $(topdir)/isearch.c display.so: $(topdir)/display.c ! signals.so: $(topdir)/signals.c ! util.so: $(topdir)/util.c kill.so: $(topdir)/kill.c - undo.so: $(topdir)/undo.c macro.so: $(topdir)/macro.c ! input.so: $(topdir)/input.c ! callback.so: $(topdir)/callback.c ! terminal.so: $(topdir)/terminal.c nls.so: $(topdir)/nls.c xmalloc.so: $(topdir)/xmalloc.c ! history.so: $(topdir)/history.c histexpand.so: $(topdir)/histexpand.c histfile.so: $(topdir)/histfile.c histsearch.so: $(topdir)/histsearch.c - savestring.so: $(topdir)/savestring.c - shell.so: $(topdir)/shell.c - tilde.so: $(topdir)/tilde.c ! readline.so: readline.c ! vi_mode.so: vi_mode.c ! funmap.so: funmap.c ! keymaps.so: keymaps.c ! parens.so: parens.c ! search.so: search.c ! rltty.so: rltty.c comapt.so: compat.c complete.so: complete.c - bind.so: bind.c - isearch.so: isearch.c display.so: display.c ! signals.so: signals.c ! util.so: util.c kill.so: kill.c - undo.so: undo.c macro.so: macro.c ! input.so: input.c ! callback.so: callback.c ! terminal.so: terminal.c nls.so: nls.c xmalloc.so: xmalloc.c ! history.so: history.c histexpand.so: histexpand.c histfile.so: histfile.c histsearch.so: histsearch.c - savestring.so: savestring.c - shell.so: shell.c - tilde.so: tilde.c --- 343,437 ---- kill.so: $(topdir)/xmalloc.h macro.so: $(topdir)/xmalloc.h + mbutil.so: $(topdir)/xmalloc.h + misc.so: $(topdir)/xmalloc.h readline.so: $(topdir)/xmalloc.h savestring.so: $(topdir)/xmalloc.h search.so: $(topdir)/xmalloc.h shell.so: $(topdir)/xmalloc.h + terminal.so: $(topdir)/xmalloc.h + text.so: $(topdir)/xmalloc.h tilde.so: $(topdir)/xmalloc.h ! undo.so: $(topdir)/xmalloc.h util.so: $(topdir)/xmalloc.h vi_mode.so: $(topdir)/xmalloc.h + xmalloc.so: $(topdir)/xmalloc.h ! complete.o: $(topdir)/rlmbutil.h ! display.o: $(topdir)/rlmbutil.h ! histexpand.o: $(topdir)/rlmbutil.h ! input.o: $(topdir)/rlmbutil.h ! isearch.o: $(topdir)/rlmbutil.h ! mbutil.o: $(topdir)/rlmbutil.h ! misc.o: $(topdir)/rlmbutil.h ! readline.o: $(topdir)/rlmbutil.h ! search.o: $(topdir)/rlmbutil.h ! text.o: $(topdir)/rlmbutil.h ! vi_mode.o: $(topdir)/rlmbutil.h ! ! bind.so: $(topdir)/bind.c ! callback.so: $(topdir)/callback.c compat.so: $(topdir)/compat.c complete.so: $(topdir)/complete.c display.so: $(topdir)/display.c ! funmap.so: $(topdir)/funmap.c ! input.so: $(topdir)/input.c ! isearch.so: $(topdir)/isearch.c ! keymaps.so: $(topdir)/keymaps.c $(topdir)/emacs_keymap.c $(topdir)/vi_keymap.c kill.so: $(topdir)/kill.c macro.so: $(topdir)/macro.c ! mbutil.so: $(topdir)/mbutil.c ! misc.so: $(topdir)/mbutil.c nls.so: $(topdir)/nls.c + parens.so: $(topdir)/parens.c + readline.so: $(topdir)/readline.c + rltty.so: $(topdir)/rltty.c + savestring.so: $(topdir)/savestring.c + search.so: $(topdir)/search.c + shell.so: $(topdir)/shell.c + signals.so: $(topdir)/signals.c + terminal.so: $(topdir)/terminal.c + text.so: $(topdir)/terminal.c + tilde.so: $(topdir)/tilde.c + undo.so: $(topdir)/undo.c + util.so: $(topdir)/util.c + vi_mode.so: $(topdir)/vi_mode.c xmalloc.so: $(topdir)/xmalloc.c ! histexpand.so: $(topdir)/histexpand.c histfile.so: $(topdir)/histfile.c + history.so: $(topdir)/history.c histsearch.so: $(topdir)/histsearch.c ! bind.so: bind.c ! callback.so: callback.c comapt.so: compat.c complete.so: complete.c display.so: display.c ! funmap.so: funmap.c ! input.so: input.c ! isearch.so: isearch.c ! keymaps.so: keymaps.c emacs_keymap.c vi_keymap.c kill.so: kill.c macro.so: macro.c ! mbutil.so: mbutil.c ! misc.so: misc.c nls.so: nls.c + parens.so: parens.c + readline.so: readline.c + rltty.so: rltty.c + savestring.so: savestring.c + search.so: search.c + signals.so: signals.c + shell.so: shell.c + terminal.so: terminal.c + text.so: terminal.c + tilde.so: tilde.c + undo.so: undo.c + util.so: util.c + vi_mode.so: vi_mode.c xmalloc.so: xmalloc.c ! histexpand.so: histexpand.c histfile.so: histfile.c + history.so: history.c histsearch.so: histsearch.c diff -Nrc2 readline-4.2a/signals.c readline-4.3/signals.c *** readline-4.2a/signals.c Wed Aug 22 09:40:04 2001 --- readline-4.3/signals.c Thu Jan 24 11:23:37 2002 *************** *** 75,78 **** --- 75,79 ---- static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); + static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *)); /* Exported variables for use by applications. */ *************** *** 233,237 **** act.sa_handler = handler; ! act.sa_flags = 0; sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); --- 234,238 ---- act.sa_handler = handler; ! act.sa_flags = 0; /* XXX - should we set SA_RESTART for SIGWINCH? */ sigemptyset (&act.sa_mask); sigemptyset (&ohandler->sa_mask); diff -Nrc2 readline-4.2a/support/config.guess readline-4.3/support/config.guess *** readline-4.2a/support/config.guess Mon Aug 20 15:23:13 2001 --- readline-4.3/support/config.guess Wed Apr 3 11:47:14 2002 *************** *** 1,6 **** #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc. ! # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by --- 1,9 ---- #! /bin/sh # Attempt to guess a canonical system name. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! ! timestamp='2002-03-20' ! # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by *************** *** 22,27 **** # the same distribution terms that you use for the rest of that program. ! # Written by Per Bothner . ! # The master version of this file is at the FSF in /home/gd/gnu/lib. # # This script attempts to guess a canonical system name similar to --- 25,31 ---- # the same distribution terms that you use for the rest of that program. ! # Originally written by Per Bothner . ! # Please send patches to . Submit a context ! # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to *************** *** 30,111 **** # # The plan is that this can be called by configure scripts if you ! # don't specify an explicit system type (host/target name). ! # ! # Only a few systems have been added to this list; please add others ! # (but try to keep the structure clean). ! # ! # Use $HOST_CC if defined. $CC may point to a cross-compiler ! if test x"$CC_FOR_BUILD" = x; then ! if test x"$HOST_CC" != x; then ! CC_FOR_BUILD="$HOST_CC" ! else ! if test x"$CC" != x; then ! CC_FOR_BUILD="$CC" ! else ! CC_FOR_BUILD=cc ! fi ! fi fi # This is needed to find uname on a Pyramid OSx when run in the BSD universe. ! # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH ! elif (test -f /usr/5bin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/usr/5bin fi ! UNAME=`(uname) 2>/dev/null` || UNAME=unknown UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown ! UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - RELEASE=`expr "$UNAME_RELEASE" : '[^0-9]*\([0-9]*\)'` # 4 - case "$RELEASE" in - "") RELEASE=0 ;; - *) RELEASE=`expr "$RELEASE" + 0` ;; - esac - REL_LEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.\([0-9]*\)'` # 1 - REL_SUBLEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.[0-9]*.\([0-9]*\)'` # 2 - - dummy=dummy-$$ - trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 - - # Some versions of i386 SVR4.2 make `uname' equivalent to `uname -n', which - # is contrary to all other versions of uname - if [ -n "$UNAME" ] && [ "$UNAME_S" != "$UNAME" ] && [ "$UNAME_S" = UNIX_SV ]; then - UNAME=UNIX_SV - fi - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ! # Begin cases added for Bash ! alpha:NetBSD:*:*) ! echo alpha-dec-netbsd${UNAME_RELEASE} ! exit 0 ;; ! alpha:OpenBSD:*:*) ! echo alpha-dec-openbsd${UNAME_RELEASE} ! exit 0 ;; ! i?86:NetBSD:*:*) ! echo ${UNAME_MACHINE}-pc-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ! exit 0 ;; ! i?86:OpenBSD:*:*) ! echo ${UNAME_MACHINE}-pc-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ! exit 0 ;; ! sparc:NetBSD:*:*) ! echo sparc-unknown-netbsd${UNAME_RELEASE} ! exit 0 ;; ! sparc:OpenBSD:*:*) ! echo sparc-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! vax:NetBSD:*:*) ! echo vax-dec-netbsd${UNAME_RELEASE} ! exit 0 ;; ! vax:OpenBSD:*:*) ! echo vax-dec-openbsd${UNAME_RELEASE} ! exit 0 ;; mac68k:machten:*:*) echo mac68k-apple-machten${UNAME_RELEASE} --- 34,135 ---- # # The plan is that this can be called by configure scripts if you ! # don't specify an explicit build system type. ! me=`echo "$0" | sed -e 's,.*/,,'` ! ! usage="\ ! Usage: $0 [OPTION] ! ! Output the configuration name of the system \`$me' is run on. ! ! Operation modes: ! -h, --help print this help, then exit ! -t, --time-stamp print date of last modification, then exit ! -v, --version print version number, then exit ! ! Report bugs and patches to ." ! ! version="\ ! GNU config.guess ($timestamp) ! ! Originally written by Per Bothner. ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ! Free Software Foundation, Inc. ! ! This is free software; see the source for copying conditions. There is NO ! warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ! ! help=" ! Try \`$me --help' for more information." ! ! # Parse command line ! while test $# -gt 0 ; do ! case $1 in ! --time-stamp | --time* | -t ) ! echo "$timestamp" ; exit 0 ;; ! --version | -v ) ! echo "$version" ; exit 0 ;; ! --help | --h* | -h ) ! echo "$usage"; exit 0 ;; ! -- ) # Stop option processing ! shift; break ;; ! - ) # Use stdin as input. ! break ;; ! -* ) ! echo "$me: invalid option $1$help" >&2 ! exit 1 ;; ! * ) ! break ;; ! esac ! done ! ! if test $# != 0; then ! echo "$me: too many arguments$help" >&2 ! exit 1 fi + + dummy=dummy-$$ + trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + + # CC_FOR_BUILD -- compiler used by this script. + # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still + # use `HOST_CC' if defined, but it is deprecated. + + set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 c99 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac' + # This is needed to find uname on a Pyramid OSx when run in the BSD universe. ! # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH ! elif (test -f /usr/5bin/uname) >/dev/null 2>&1 ; then # bash PATH=$PATH:/usr/5bin fi ! UNAME=`(uname) 2>/dev/null` || UNAME=unknown # bash UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown ! UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in ! # NOTE -- begin cases added for bash (mostly legacy) -- NOTE mac68k:machten:*:*) echo mac68k-apple-machten${UNAME_RELEASE} *************** *** 133,150 **** echo mips-mips-bsd4.4 exit 0 ;; ! MIServer-S:SMP_DC.OSx:*:dcosx) ! echo mips-pyramid-sysv4 exit 0 ;; news*:NEWS*:*:*) echo mips-sony-newsos${UNAME_RELEASE} exit 0 ;; - i?86:NEXTSTEP:*:*) - echo i386-next-nextstep${RELEASE} - exit 0 ;; - *680?0:NEXTSTEP:*:*) - echo m68k-next-nextstep${RELEASE} - exit 0 ;; *370:AIX:*:*) ! echo ibm370-ibm-aix exit 0 ;; ksr1:OSF*1:*:*) --- 157,168 ---- echo mips-mips-bsd4.4 exit 0 ;; ! MIS*:SMP_DC.OSx:*:dcosx) # not the same as below ! echo pyramid-pyramid-sysv4 exit 0 ;; news*:NEWS*:*:*) echo mips-sony-newsos${UNAME_RELEASE} exit 0 ;; *370:AIX:*:*) ! echo ibm370-ibm-aix${UNAME_RELEASE} exit 0 ;; ksr1:OSF*1:*:*) *************** *** 160,183 **** echo we32k-att-sysv3 exit 0 ;; ! *:QNX:*:42*) ! echo i386-qssl-qnx`echo ${UNAME_VERSION}` ! exit 0 ;; ! Alpha*:Windows:NT:*:SP*) echo alpha-pc-opennt exit 0 ;; ! *:Windows:NT:*:SP*) ! echo intel-pc-opennt exit 0 ;; ! *:NonStop-UX:*:*) ! echo mips-compaq-nonstopux exit 0 ;; - # end cases added for Bash alpha:OSF1:*:*) ! # TEST CHANGED FOR BASH to handle `letter version' releases ! UNAME_MAJOR=`echo "$UNAME_RELEASE" | sed -e 's/^.\([0-9]\).*/\1/'` ! if test X"$UNAME_MAJOR" != X"" && test $UNAME_MAJOR = 4 ; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - elif test X"$UNAME_MAJOR" != X"" && test $UNAME_MAJOR -gt 4 ; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` fi # A Vn.n version is a released version. --- 178,280 ---- echo we32k-att-sysv3 exit 0 ;; ! Alpha*:Windows_NT:*:SP*) echo alpha-pc-opennt exit 0 ;; ! *:Windows_NT:*:SP*) ! echo i386-pc-opennt exit 0 ;; ! ! # NOTE -- end legacy cases added for bash -- NOTE ! *:NetBSD:*:*) ! # NetBSD (nbsd) targets should (where applicable) match one or ! # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ! # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently ! # switched to ELF, *-*-netbsd* would select the old ! # object file format. This provides both forward ! # compatibility and a consistent mechanism for selecting the ! # object file format. ! # ! # Note: NetBSD doesn't particularly care about the vendor ! # portion of the name. We always set it to "unknown". ! sysctl="sysctl -n hw.machine_arch" ! UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ ! /usr/sbin/$sysctl 2>/dev/null || echo unknown)` ! case "${UNAME_MACHINE_ARCH}" in ! arm*) machine=arm-unknown ;; ! sh3el) machine=shl-unknown ;; ! sh3eb) machine=sh-unknown ;; ! *) machine=${UNAME_MACHINE_ARCH}-unknown ;; ! esac ! # The Operating System including object format, if it has switched ! # to ELF recently, or will in the future. ! case "${UNAME_MACHINE_ARCH}" in ! arm*|i386|m68k|ns32k|sh3*|sparc|vax) ! eval $set_cc_for_build ! if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ ! | grep __ELF__ >/dev/null ! then ! # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). ! # Return netbsd for either. FIX? ! os=netbsd ! else ! os=netbsdelf ! fi ! ;; ! *) ! os=netbsd ! ;; ! esac ! # The OS release ! release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ! # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: ! # contains redundant information, the shorter form: ! # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. ! echo "${machine}-${os}${release}" ! exit 0 ;; ! amiga:OpenBSD:*:*) ! echo m68k-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! arc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! hp300:OpenBSD:*:*) ! echo m68k-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! mac68k:OpenBSD:*:*) ! echo m68k-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! macppc:OpenBSD:*:*) ! echo powerpc-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! mvme68k:OpenBSD:*:*) ! echo m68k-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! mvme88k:OpenBSD:*:*) ! echo m88k-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! mvmeppc:OpenBSD:*:*) ! echo powerpc-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! pmax:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! sgi:OpenBSD:*:*) ! echo mipseb-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! sun3:OpenBSD:*:*) ! echo m68k-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! vax:OpenBSD:*:*) # bash ! echo vax-dec-openbsd${UNAME_RELEASE} ! exit 0 ;; ! wgrisc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! *:OpenBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) ! if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. *************** *** 186,224 **** # 1.2 uses "1.2" for uname -r. cat <$dummy.s .globl main .ent main main: ! .frame \$30,0,\$26,0 ! .prologue 0 ! .long 0x47e03d80 # implver $0 ! lda \$2,259 ! .long 0x47e20c21 # amask $2,$1 ! srl \$1,8,\$2 ! sll \$2,2,\$2 ! sll \$0,3,\$0 ! addl \$1,\$0,\$0 ! addl \$2,\$0,\$0 ! ret \$31,(\$26),1 .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ! ./$dummy ! case "$?" in ! 7) UNAME_MACHINE="alpha" ;; ! 15) UNAME_MACHINE="alphaev5" ;; ! 14) UNAME_MACHINE="alphaev56" ;; ! 10) UNAME_MACHINE="alphapca56" ;; ! 16) UNAME_MACHINE="alphaev6" ;; esac fi --- 283,335 ---- # 1.2 uses "1.2" for uname -r. cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text .globl main + .align 4 .ent main main: ! .frame \$30,16,\$26,0 ! ldgp \$29,0(\$27) ! .prologue 1 ! .long 0x47e03d80 # implver \$0 ! lda \$2,-1 ! .long 0x47e20c21 # amask \$2,\$1 ! lda \$16,\$Lformat ! mov \$0,\$17 ! not \$1,\$18 ! jsr \$26,printf ! ldgp \$29,0(\$26) ! mov 0,\$16 ! jsr \$26,exit .end main EOF + eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ! case `./$dummy` in ! 0-0) UNAME_MACHINE="alpha" ;; ! 1-0) UNAME_MACHINE="alphaev5" ;; ! 1-1) UNAME_MACHINE="alphaev56" ;; ! 1-101) UNAME_MACHINE="alphapca56" ;; ! 2-303) UNAME_MACHINE="alphaev6" ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; esac fi *************** *** 227,275 **** exit 0 ;; Alpha\ *:Windows_NT*:*) ! # How do we know it's Interix rather than the generic POSIX subsystem? ! # Should we change UNAME_MACHINE based on the output of uname instead ! # of the specific Alpha model? ! echo alpha-pc-interix ! exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) ! echo m68k-cbm-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-cbm-openbsd${UNAME_RELEASE} - exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; ! arc64:OpenBSD:*:*) ! echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; ! arc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! hkmips:OpenBSD:*:*) ! echo mips-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! pmax:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! sgi:OpenBSD:*:*) ! echo mips-unknown-openbsd${UNAME_RELEASE} ! exit 0 ;; ! wgrisc:OpenBSD:*:*) ! echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; ! arm32:NetBSD:*:*) ! echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ! exit 0 ;; ! SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; --- 338,365 ---- exit 0 ;; Alpha\ *:Windows_NT*:*) ! # How do we know it's Interix rather than the generic POSIX subsystem? ! # Should we change UNAME_MACHINE based on the output of uname instead ! # of the specific Alpha model? ! echo alpha-pc-interix ! exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) ! echo m68k-unknown-sysv4 exit 0;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; ! *:[Mm]orph[Oo][Ss]:*:*) ! echo ${UNAME_MACHINE}-unknown-morphos exit 0 ;; ! *:OS/390:*:*) ! echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; ! SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; *************** *** 282,291 **** fi exit 0 ;; ! NILE:*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) ! echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ! exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` --- 372,381 ---- fi exit 0 ;; ! NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) ! echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` ! exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` *************** *** 313,317 **** exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in --- 403,407 ---- exit 0 ;; sun*:*:4.2BSD:*) ! UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in *************** *** 327,339 **** echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not ! # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally --- 417,423 ---- echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not ! # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally *************** *** 342,353 **** # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) ! echo m68k-atari-mint${UNAME_RELEASE} ! exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) ! echo m68k-atari-mint${UNAME_RELEASE} ! exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) ! echo m68k-atari-mint${UNAME_RELEASE} ! exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} --- 426,437 ---- # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) ! echo m68k-atari-mint${UNAME_RELEASE} ! exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) ! echo m68k-atari-mint${UNAME_RELEASE} ! exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) ! echo m68k-atari-mint${UNAME_RELEASE} ! exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} *************** *** 359,389 **** echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - *:"Mac OS":*:*) - echo `uname -p`-apple-macos${UNAME_RELEASE} - exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; - macppc:NetBSD:*:*) - echo powerpc-apple-netbsd${UNAME_RELEASE} - exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 --- 443,449 ---- *************** *** 399,404 **** --- 459,466 ---- exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus + #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else *************** *** 421,428 **** $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix --- 483,493 ---- $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ ! && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix *************** *** 438,452 **** exit 0 ;; AViiON:dgux:*:*) ! # DG/UX returns AViiON for all architectures ! UNAME_PROCESSOR=`/usr/bin/uname -p` ! if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then ! if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ ! -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} ! else echo m88k-dg-dguxbcs${UNAME_RELEASE} ! fi else ! echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; --- 503,519 ---- exit 0 ;; AViiON:dgux:*:*) ! # DG/UX returns AViiON for all architectures ! UNAME_PROCESSOR=`/usr/bin/uname -p` ! if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] ! then ! if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ ! [ ${TARGET_BINARY_INTERFACE}x = x ] ! then echo m88k-dg-dgux${UNAME_RELEASE} ! else echo m88k-dg-dguxbcs${UNAME_RELEASE} ! fi else ! echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; *************** *** 470,478 **** echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ! i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include --- 537,554 ---- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' ! i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include *************** *** 486,490 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 --- 562,566 ---- } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 *************** *** 495,501 **** fi exit 0 ;; ! *:AIX:*:4) ! IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` ! if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else --- 571,577 ---- fi exit 0 ;; ! *:AIX:*:[45]) ! IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` ! if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else *************** *** 504,513 **** if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` - elif grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then - IBM_REV=4.1 - elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then - IBM_REV=4.1.1 else ! IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} --- 580,585 ---- if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else ! IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} *************** *** 519,523 **** echo romp-ibm-bsd4.4 exit 0 ;; ! ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 --- 591,595 ---- echo romp-ibm-bsd4.4 exit 0 ;; ! ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *************** *** 535,543 **** exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in ! 9000/31? ) HP_ARCH=m68000 ;; ! 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) ! sed 's/^ //' << EOF >$dummy.c #include #include --- 607,634 ---- exit 0 ;; 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in ! 9000/31? ) HP_ARCH=m68000 ;; ! 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) ! if [ -x /usr/bin/getconf ]; then ! sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` ! sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` ! case "${sc_cpu_version}" in ! 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 ! 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 ! 532) # CPU_PA_RISC2_0 ! case "${sc_kernel_bits}" in ! 32) HP_ARCH="hppa2.0n" ;; ! 64) HP_ARCH="hppa2.0w" ;; ! '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 ! esac ;; ! esac ! fi ! if [ "${HP_ARCH}" = "" ]; then ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! ! #define _HPUX_SOURCE #include #include *************** *** 570,580 **** } EOF ! ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` ! rm -f $dummy.c $dummy esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include --- 661,677 ---- } EOF ! (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` ! if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi ! rm -f $dummy.c $dummy ! fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) + eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include *************** *** 602,606 **** } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 --- 699,703 ---- } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 *************** *** 612,618 **** echo hppa1.0-hp-bsd exit 0 ;; ! *9??*:MPE/iX:*:*) ! echo hppa1.0-hp-mpeix ! exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf --- 709,715 ---- echo hppa1.0-hp-bsd exit 0 ;; ! *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) ! echo hppa1.0-hp-mpeix ! exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf *************** *** 621,625 **** echo hppa1.0-hp-osf exit 0 ;; ! i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk --- 718,722 ---- echo hppa1.0-hp-osf exit 0 ;; ! i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk *************** *** 631,637 **** echo hppa1.1-hp-lites exit 0 ;; - hppa*:OpenBSD:*:*) - echo hppa-unknown-openbsd - exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd --- 728,731 ---- *************** *** 652,712 **** echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) ! echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ ! -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) ! echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; ! CRAY*T3E:*:*:*) ! echo alpha-cray-unicosmk${UNAME_RELEASE} ! exit 0 ;; ! CRAY-2:*:*:*) ! echo cray2-cray-unicos ! exit 0 ;; ! F300:UNIX_System_V:*:*) ! FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ! FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ! echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; ! F301:UNIX_System_V:*:*) ! echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; ! hp3[0-9][05]:NetBSD:*:*) ! echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; ! hp300:OpenBSD:*:*) ! echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; ! i?86:BSD/386:*:* | i?86:BSD/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) ! echo sparc-unknown-bsdi${UNAME_RELEASE} ! exit 0 ;; ! *:BSD/OS:*:*) ! echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} ! exit 0 ;; ! *:FreeBSD:*:*) ! # if test -x /usr/bin/objformat; then ! # if test "elf" = "`/usr/bin/objformat`"; then ! # echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` ! # exit 0 ! # fi ! # fi ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-=(].*//'` exit 0 ;; ! *:NetBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; ! *:OpenBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) --- 746,787 ---- echo c4-convex-bsd exit 0 ;; CRAY*Y-MP:*:*:*) ! echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ ! -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ ! -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) ! echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! CRAY*T3D:*:*:*) ! echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! CRAY*T3E:*:*:*) ! echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! CRAY*SV1:*:*:*) ! echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; ! F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) ! FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` ! FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` ! FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` ! echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; ! i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) ! echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; ! *:BSD/OS:*:*) ! echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; ! *:FreeBSD:*:*) ! echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; i*:CYGWIN*:*) *************** *** 716,731 **** echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) ! # How do we know it's Interix rather than the generic POSIX subsystem? ! # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we ! # UNAME_MACHINE based on the output of uname instead of i386? ! echo i386-pc-interix ! exit 0 ;; i*:UWIN*:*) ! echo ${UNAME_MACHINE}-pc-uwin ! exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin ! exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` --- 791,812 ---- echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:3*) + echo i386-pc-interix3 + exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) ! # How do we know it's Interix rather than the generic POSIX subsystem? ! # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we ! # UNAME_MACHINE based on the output of uname instead of i386? ! echo i386-pc-interix ! exit 0 ;; i*:UWIN*:*) ! echo ${UNAME_MACHINE}-pc-uwin ! exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin ! exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` *************** *** 734,938 **** echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; ! *:Linux:*:*) ! # uname on the ARM produces all sorts of strangeness, and we need to ! # filter it out. ! case "$UNAME_MACHINE" in ! armv*) UNAME_MACHINE=$UNAME_MACHINE ;; ! arm* | sa110*) UNAME_MACHINE="arm" ;; esac ! # The BFD linker knows what the default object file format is, so ! # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ! ld_help_string=`cd /; ld --help 2>&1` ! ld_supported_emulations=`echo $ld_help_string \ ! | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g ! s/.*supported emulations: *// s/ .*// p'` ! case "$ld_supported_emulations" in ! *ia64) echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 ;; ! i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; ! i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; ! sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; ! armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; ! m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; ! elf32ppc | elf32ppclinux) ! # Determine Lib Version ! cat >$dummy.c < ! #if defined(__GLIBC__) ! extern char __libc_version[]; ! extern char __libc_release[]; ! #endif ! main(argc, argv) ! int argc; ! char *argv[]; ! { ! #if defined(__GLIBC__) ! printf("%s %s\n", __libc_version, __libc_release); ! #else ! printf("unkown\n"); ! #endif ! return 0; ! } ! EOF ! LIBC="" ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ! if test "$?" = 0 ; then ! ./$dummy | grep 1\.99 > /dev/null ! if test "$?" = 0 ; then ! LIBC="libc1" ! fi ! fi ! rm -f $dummy.c $dummy ! echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; ! esac ! ! if test "${UNAME_MACHINE}" = "alpha" ; then ! sed 's/^ //' <$dummy.s ! .globl main ! .ent main ! main: ! .frame \$30,0,\$26,0 ! .prologue 0 ! .long 0x47e03d80 # implver $0 ! lda \$2,259 ! .long 0x47e20c21 # amask $2,$1 ! srl \$1,8,\$2 ! sll \$2,2,\$2 ! sll \$0,3,\$0 ! addl \$1,\$0,\$0 ! addl \$2,\$0,\$0 ! ret \$31,(\$26),1 ! .end main ! EOF ! LIBC="" ! $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null ! if test "$?" = 0 ; then ! ./$dummy ! case "$?" in ! 7) ! UNAME_MACHINE="alpha" ! ;; ! 15) ! UNAME_MACHINE="alphaev5" ! ;; ! 14) ! UNAME_MACHINE="alphaev56" ! ;; ! 10) ! UNAME_MACHINE="alphapca56" ! ;; ! 16) ! UNAME_MACHINE="alphaev6" ! ;; ! esac ! ! objdump --private-headers $dummy | \ ! grep ld.so.1 > /dev/null ! if test "$?" = 0 ; then ! LIBC="libc1" ! fi ! fi ! rm -f $dummy.s $dummy ! echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 ! elif test "${UNAME_MACHINE}" = "mips" ; then ! cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy ! else ! # Either a pre-BFD a.out linker (linux-gnuoldld) ! # or one that does not give us useful --help. ! # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. ! # If ld does not provide *any* "supported emulations:" ! # that means it is gnuoldld. ! echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" ! test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 ! ! case "${UNAME_MACHINE}" in ! i?86) ! VENDOR=pc; ! ;; ! *) ! VENDOR=unknown; ! ;; ! esac ! # Determine whether the default compiler is a.out or elf ! cat >$dummy.c < ! #ifdef __cplusplus ! int main (int argc, char *argv[]) { ! #else ! int main (argc, argv) int argc; char *argv[]; { ! #endif ! #ifdef __ELF__ ! # ifdef __GLIBC__ ! # if __GLIBC__ >= 2 ! printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); ! # else ! printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); ! # endif ! # else ! printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); ! # endif ! #else ! printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); ! #endif ! return 0; ! } EOF ! ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 ! rm -f $dummy.c $dummy ! fi ;; ! # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions ! # are messed up and put the nodename in both sysname and nodename. ! i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; ! # added by chet for bash based on usenet posting from and ! # documentation on SCO's web site -- UnixWare 7 (SVR5) ! # i?86:UnixWare:5*:*) ! # echo ${UNAME_MACHINE}-pc-sysv5uw${UNAME_VERSION} ! # exit 0 ;; ! i?86:UNIX_SV:4.2MP:2.*) ! # Unixware is an offshoot of SVR4, but it has its own version ! # number series starting with 2... ! # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. ! # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; ! i?86:*:4.*:* | i?86:SYSTEM_V:4.*:* | i?86:UNIX_SV:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then ! echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else ! echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; ! i?86:*:5:7*) ! UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` ! (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 ! (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586 ! (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686 ! (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585 ! echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} ! exit 0 ;; ! i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' $dummy.c ! #undef CPU ! #undef mips ! #undef mipsel ! #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) ! CPU=mipsel ! #else ! #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) ! CPU=mips ! #else ! CPU= ! #endif ! #endif ! EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` ! rm -f $dummy.c ! test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0 ! ;; ! ppc:Linux:*:*) ! echo powerpc-unknown-linux-gnu ! exit 0 ;; ! ppc64:Linux:*:*) ! echo powerpc64-unknown-linux-gnu ! exit 0 ;; ! alpha:Linux:*:*) ! case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ! EV5) UNAME_MACHINE=alphaev5 ;; ! EV56) UNAME_MACHINE=alphaev56 ;; ! PCA56) UNAME_MACHINE=alphapca56 ;; ! PCA57) UNAME_MACHINE=alphapca56 ;; ! EV6) UNAME_MACHINE=alphaev6 ;; ! EV67) UNAME_MACHINE=alphaev67 ;; ! EV68*) UNAME_MACHINE=alphaev68 ;; esac ! objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null ! if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ! echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ! exit 0 ;; ! parisc:Linux:*:* | hppa:Linux:*:*) ! # Look for CPU level ! case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in ! PA7*) echo hppa1.1-unknown-linux-gnu ;; ! PA8*) echo hppa2.0-unknown-linux-gnu ;; ! *) echo hppa-unknown-linux-gnu ;; ! esac ! exit 0 ;; ! parisc64:Linux:*:* | hppa64:Linux:*:*) ! echo hppa64-unknown-linux-gnu ! exit 0 ;; ! s390:Linux:*:* | s390x:Linux:*:*) ! echo ${UNAME_MACHINE}-ibm-linux ! exit 0 ;; ! sh*:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu ! exit 0 ;; ! sparc:Linux:*:* | sparc64:Linux:*:*) ! echo ${UNAME_MACHINE}-unknown-linux-gnu ! exit 0 ;; ! x86_64:Linux:*:*) ! echo x86_64-unknown-linux-gnu ! exit 0 ;; ! i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so ! # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ! # Set LC_ALL=C to ensure ld outputs messages in English. ! ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ ! | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g ! s/.*supported targets: *// s/ .*// p'` ! case "$ld_supported_targets" in ! elf32-i386) ! TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ! ;; ! a.out-i386-linux) ! echo "${UNAME_MACHINE}-pc-linux-gnuaout" ! exit 0 ;; ! coff-i386) ! echo "${UNAME_MACHINE}-pc-linux-gnucoff" ! exit 0 ;; ! "") ! # Either a pre-BFD a.out linker (linux-gnuoldld) or ! # one that does not give us useful --help. ! echo "${UNAME_MACHINE}-pc-linux-gnuoldld" ! exit 0 ;; ! esac ! # Determine whether the default compiler is a.out or elf ! eval $set_cc_for_build ! sed 's/^ //' << EOF >$dummy.c ! #include ! #ifdef __ELF__ ! # ifdef __GLIBC__ ! # if __GLIBC__ >= 2 ! LIBC=gnu ! # else ! LIBC=gnulibc1 ! # endif ! # else ! LIBC=gnulibc1 ! # endif ! #else ! #ifdef __INTEL_COMPILER ! LIBC=gnu ! #else ! LIBC=gnuaout ! #endif ! #endif EOF ! eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` ! rm -f $dummy.c ! test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 ! test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ! ;; ! i*86:DYNIX/ptx:4*:*) ! # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. ! # earlier versions are messed up and put the nodename in both ! # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; ! i*86:UNIX_SV:4.2MP:2.*) ! # Unixware is an offshoot of SVR4, but it has its own version ! # number series starting with 2... ! # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. ! # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; ! i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) ! UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then ! echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else ! echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; ! i*86:*:5:[78]*) ! case `/bin/uname -X | grep "^Machine"` in ! *486*) UNAME_MACHINE=i486 ;; ! *Pentium) UNAME_MACHINE=i586 ;; ! *Pent*|*Celeron) UNAME_MACHINE=i686 ;; ! esac ! echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ! exit 0 ;; ! i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null | grep 86 >/dev/null \ ! && echo i486-ncr-sysv4 && exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; ! m68*:LynxOS:2.*:*) ! echo m68k-unknown-lynxos${UNAME_RELEASE} ! exit 0 ;; ! i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) ! echo i386-pc-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; ! rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; ! *:LynxOS:*:*) ! echo ${UNAME_MACHINE}-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; ! RM*:SINIX-*:*:* | RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; --- 1029,1059 ---- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) ! /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ ! && echo i486-ncr-sysv4 && exit 0 ;; ! m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) ! echo m68k-unknown-lynxos${UNAME_RELEASE} ! exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; ! i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ! echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; ! rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; ! PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ! echo powerpc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; ! RM*:ReliantUNIX-*:*:*) ! echo mips-sni-sysv4 ! exit 0 ;; ! RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *************** *** 1019,1026 **** fi exit 0 ;; ! PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ! # says ! echo i586-unisys-sysv4 ! exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . --- 1066,1073 ---- fi exit 0 ;; ! PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort ! # says ! echo i586-unisys-sysv4 ! exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . *************** *** 1031,1055 **** # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 ! exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; ! news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; ! R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then ! echo mips-nec-sysv${UNAME_RELEASE} else ! echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; ! BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. ! echo powerpc-apple-beos ! exit 0 ;; ! BeMac:BeOS:*:*) echo powerpc-apple-beos exit 0 ;; ! BePC:BeOS:*:*) echo i586-pc-beos exit 0 ;; --- 1078,1106 ---- # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 ! exit 0 ;; ! *:VOS:*:*) ! # From Paul.Green@stratus.com. ! echo hppa1.1-stratus-vos ! exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; ! news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit 0 ;; ! R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then ! echo mips-nec-sysv${UNAME_RELEASE} else ! echo mips-unknown-sysv${UNAME_RELEASE} fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos exit 0 ;; ! BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; ! BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; *************** *** 1066,1074 **** echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; - Power*:Darwin:*:*) - echo powerpc-apple-darwin${UNAME_RELEASE} - exit 0 ;; *:Darwin:*:*) ! echo ${UNAME_MACHINE}-apple-darwin${UNAME_RELEASE} exit 0 ;; esac --- 1117,1185 ---- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Darwin:*:*) ! echo `uname -p`-apple-darwin${UNAME_RELEASE} ! exit 0 ;; ! *:procnto*:*:* | *:QNX:[0123456789]*:*) ! UNAME_PROCESSOR=`uname -p` ! if test "$UNAME_PROCESSOR" = "x86"; then ! UNAME_PROCESSOR=i386 ! UNAME_MACHINE=pc ! fi ! echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} ! exit 0 ;; ! *:QNX:*:4*) ! echo i386-pc-qnx ! exit 0 ;; ! NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*) ! echo nsr-tandem-nsk${UNAME_RELEASE} ! exit 0 ;; ! *:NonStop-UX:*:*) ! echo mips-compaq-nonstopux ! exit 0 ;; ! BS2000:POSIX*:*:*) ! echo bs2000-siemens-sysv ! exit 0 ;; ! DS/*:UNIX_System_V:*:*) ! echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} ! exit 0 ;; ! *:Plan9:*:*) ! # "uname -m" is not consistent, so use $cputype instead. 386 ! # is converted to i386 for consistency with other x86 ! # operating systems. ! if test "$cputype" = "386"; then ! UNAME_MACHINE=i386 ! else ! UNAME_MACHINE="$cputype" ! fi ! echo ${UNAME_MACHINE}-unknown-plan9 ! exit 0 ;; ! i*86:OS/2:*:*) ! # If we were able to find `uname', then EMX Unix compatibility ! # is probably installed. ! echo ${UNAME_MACHINE}-pc-os2-emx ! exit 0 ;; ! *:TOPS-10:*:*) ! echo pdp10-unknown-tops10 ! exit 0 ;; ! *:TENEX:*:*) ! echo pdp10-unknown-tenex ! exit 0 ;; ! KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) ! echo pdp10-dec-tops20 ! exit 0 ;; ! XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) ! echo pdp10-xkl-tops20 ! exit 0 ;; ! *:TOPS-20:*:*) ! echo pdp10-unknown-tops20 ! exit 0 ;; ! *:ITS:*:*) ! echo pdp10-unknown-its ! exit 0 ;; ! i*86:XTS-300:*:STOP) ! echo ${UNAME_MACHINE}-unknown-stop ! exit 0 ;; ! i*86:atheos:*:*) ! echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; esac *************** *** 1077,1080 **** --- 1188,1192 ---- #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + eval $set_cc_for_build cat >$dummy.c </dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy --- 1275,1307 ---- #if defined (vax) ! # if !defined (ultrix) ! # include ! # if defined (BSD) ! # if BSD == 43 ! printf ("vax-dec-bsd4.3\n"); exit (0); ! # else ! # if BSD == 199006 ! printf ("vax-dec-bsd4.3reno\n"); exit (0); ! # else ! printf ("vax-dec-bsd\n"); exit (0); ! # endif ! # endif # else ! printf ("vax-dec-bsd\n"); exit (0); # endif + # else + printf ("vax-dec-ultrix\n"); exit (0); + # endif #endif ! #if defined (alliant) && defined (i860) ! printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF ! $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy *************** *** 1322,1341 **** fi ! # Begin cases added for Bash case "$UNAME" in uts) echo uts-amdahl-sysv${UNAME_RELEASE}; exit 0 ;; esac - if [ -d /usr/amiga ]; then - echo m68k-cbm-sysv${UNAME_RELEASE}; exit 0; - fi - if [ -f /bin/fxc.info ]; then echo fxc-alliant-concentrix exit 0 fi ! # end cases added for Bash ! #echo '(Unable to guess system type)' 1>&2 exit 1 --- 1336,1393 ---- fi ! # NOTE -- Begin fallback cases added for bash -- NOTE case "$UNAME" in uts) echo uts-amdahl-sysv${UNAME_RELEASE}; exit 0 ;; esac if [ -f /bin/fxc.info ]; then echo fxc-alliant-concentrix exit 0 fi ! # NOTE -- End fallback cases added for bash -- NOTE ! cat >&2 < in order to provide the needed ! information to handle your system. ! ! config.guess timestamp = $timestamp ! ! 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` ! /bin/uname -X = `(/bin/uname -X) 2>/dev/null` ! ! hostinfo = `(hostinfo) 2>/dev/null` ! /bin/universe = `(/bin/universe) 2>/dev/null` ! /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` ! /bin/arch = `(/bin/arch) 2>/dev/null` ! /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` ! /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` ! ! UNAME_MACHINE = ${UNAME_MACHINE} ! UNAME_RELEASE = ${UNAME_RELEASE} ! UNAME_SYSTEM = ${UNAME_SYSTEM} ! UNAME_VERSION = ${UNAME_VERSION} ! EOF exit 1 + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "timestamp='" + # time-stamp-format: "%:y-%02m-%02d" + # time-stamp-end: "'" + # End: diff -Nrc2 readline-4.2a/support/config.sub readline-4.3/support/config.sub *** readline-4.2a/support/config.sub Mon Feb 12 12:50:05 2001 --- readline-4.3/support/config.sub Wed Apr 3 11:47:14 2002 *************** *** 1,5 **** #! /bin/sh ! # Configuration validation subroutine script, version 1.1. ! # Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software --- 1,9 ---- #! /bin/sh ! # Configuration validation subroutine script. ! # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, ! # 2000, 2001, 2002 Free Software Foundation, Inc. ! ! timestamp='2002-03-07' ! # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software *************** *** 26,29 **** --- 30,36 ---- # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context + # diff and a properly formatted ChangeLog entry. + # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. *************** *** 46,66 **** # It is wrong to echo any other type of specification. ! if [ x$1 = x ] ! then ! echo Configuration name missing. 1>&2 ! echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 ! echo "or $0 ALIAS" 1>&2 ! echo where ALIAS is a recognized configuration type. 1>&2 ! exit 1 ! fi ! # First pass through any local machine types. ! case $1 in ! *local*) ! echo $1 ! exit 0 ! ;; ! *) ! ;; esac --- 53,116 ---- # It is wrong to echo any other type of specification. ! me=`echo "$0" | sed -e 's,.*/,,'` ! usage="\ ! Usage: $0 [OPTION] CPU-MFR-OPSYS ! $0 [OPTION] ALIAS ! ! Canonicalize a configuration name. ! ! Operation modes: ! -h, --help print this help, then exit ! -t, --time-stamp print date of last modification, then exit ! -v, --version print version number, then exit ! ! Report bugs and patches to ." ! ! version="\ ! GNU config.sub ($timestamp) ! ! Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 ! Free Software Foundation, Inc. ! ! This is free software; see the source for copying conditions. There is NO ! warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." ! ! help=" ! Try \`$me --help' for more information." ! ! # Parse command line ! while test $# -gt 0 ; do ! case $1 in ! --time-stamp | --time* | -t ) ! echo "$timestamp" ; exit 0 ;; ! --version | -v ) ! echo "$version" ; exit 0 ;; ! --help | --h* | -h ) ! echo "$usage"; exit 0 ;; ! -- ) # Stop option processing ! shift; break ;; ! - ) # Use stdin as input. ! break ;; ! -* ) ! echo "$me: invalid option $1$help" ! exit 1 ;; ! ! *local*) ! # First pass through any local machine types. ! echo $1 ! exit 0;; ! ! * ) ! break ;; ! esac ! done ! ! case $# in ! 0) echo "$me: missing argument$help" >&2 ! exit 1;; ! 1) ;; ! *) echo "$me: too many arguments$help" >&2 ! exit 1;; esac *************** *** 69,73 **** maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! linux-gnu*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` --- 119,123 ---- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in ! nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` *************** *** 95,99 **** -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ! -apple ) os= basic_machine=$1 --- 145,149 ---- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ ! -apple | -axis) os= basic_machine=$1 *************** *** 106,112 **** ;; -wrs) ! os=vxworks basic_machine=$1 ;; -hiux*) os=-hiuxwe2 --- 156,170 ---- ;; -wrs) ! os=-vxworks ! basic_machine=$1 ! ;; ! -chorusos*) ! os=-chorusos basic_machine=$1 ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 *************** *** 157,160 **** --- 215,222 ---- os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac *************** *** 163,181 **** # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. ! tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ ! | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ ! | 580 | i960 | h8300 \ ! | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ ! | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ ! | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ ! | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ ! | mips64orion | mips64orionel | mipstx39 | mipstx39el \ ! | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ ! | mips64vr5000 | miprs64vr5000el | mcore \ ! | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ ! | thumb | d10v | s390) basic_machine=$basic_machine-unknown ;; ! m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) ;; --- 225,266 ---- # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. ! 1750a | 580 \ ! | a29k \ ! | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ ! | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ ! | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ ! | c4x | clipper \ ! | d10v | d30v | dsp16xx \ ! | fr30 \ ! | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ ! | i370 | i860 | i960 | ia64 \ ! | m32r | m68000 | m68k | m88k | mcore \ ! | mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \ ! | mips64vr4100 | mips64vr4100el | mips64vr4300 \ ! | mips64vr4300el | mips64vr5000 | mips64vr5000el \ ! | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \ ! | mipsisa32 | mipsisa64 \ ! | mn10200 | mn10300 \ ! | ns16k | ns32k \ ! | openrisc | or32 \ ! | pdp10 | pdp11 | pj | pjl \ ! | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ ! | pyramid \ ! | sh | sh[34] | sh[34]eb | shbe | shle | sh64 \ ! | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ ! | strongarm \ ! | tahoe | thumb | tic80 | tron \ ! | v850 | v850e \ ! | we32k \ ! | x86 | xscale | xstormy16 | xtensa \ ! | z8k) ! basic_machine=$basic_machine-unknown ! ;; ! m6811 | m68hc11 | m6812 | m68hc12) ! # Motorola 68HC11/12. basic_machine=$basic_machine-unknown + os=-none ;; ! m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; *************** *** 183,187 **** # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. ! i[34567]86) basic_machine=$basic_machine-pc ;; --- 268,272 ---- # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. ! i*86 | x86_64) basic_machine=$basic_machine-pc ;; *************** *** 192,222 **** ;; # Recognize the basic CPU types with company name. ! # FIXME: clean up the formatting here. ! vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ ! | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ ! | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ ! | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ ! | xmp-* | ymp-* \ ! | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ ! | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ ! | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ ! | clipper-* | orion-* \ ! | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ ! | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ ! | mips64el-* | mips64orion-* | mips64orionel-* \ ! | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ ! | mipstx39-* | mipstx39el-* | mcore-* \ ! | f301-* | armv*-* | t3e-* \ ! | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ ! | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) ! ;; ! # BEGIN cases added for Bash ! butterfly-bbn* | cadmus-* | ews*-nec | ibmrt-ibm* | masscomp-masscomp \ ! | tandem-* | symmetric-* | drs6000-icl | *-*ardent | gould-gould \ ! | concurrent-* | ksr1-* | esa-ibm | fxc-alliant | *370-amdahl \ ! | *-convex | sx[45]*-nec ) ;; ! # END cases added for Bash ! # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. --- 277,328 ---- ;; # Recognize the basic CPU types with company name. ! 580-* \ ! | a29k-* \ ! | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ ! | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ ! | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ ! | arm-* | armbe-* | armle-* | armv*-* \ ! | avr-* \ ! | bs2000-* \ ! | c[123]* | c30-* | [cjt]90-* | c54x-* \ ! | clipper-* | cydra-* \ ! | d10v-* | d30v-* \ ! | elxsi-* \ ! | f30[01]-* | f700-* | fr30-* | fx80-* \ ! | h8300-* | h8500-* \ ! | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ ! | i*86-* | i860-* | i960-* | ia64-* \ ! | m32r-* \ ! | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ ! | m88110-* | m88k-* | mcore-* \ ! | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \ ! | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \ ! | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \ ! | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \ ! | none-* | np1-* | ns16k-* | ns32k-* \ ! | orion-* \ ! | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ ! | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ ! | pyramid-* \ ! | romp-* | rs6000-* \ ! | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* | sh64-* \ ! | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ ! | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ ! | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \ ! | v850-* | v850e-* | vax-* \ ! | we32k-* \ ! | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ ! | xtensa-* \ ! | ymp-* \ ! | z8k-*) ! ;; ! ! # NOTE -- BEGIN cases added for Bash -- NOTE ! butterfly-bbn* | cadmus-* | ews*-nec | masscomp-masscomp \ ! | tandem-* | symmetric-* | drs6000-icl | *-*ardent | concurrent-* \ ! | ksr1-* | esa-ibm | fxc-alliant | *370-amdahl | sx[45]*-nec ) ;; ! # NOTE -- END cases added for Bash -- NOTE ! # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. *************** *** 254,266 **** ;; amiga | amiga-*) - # basic_machine=m68k-cbm basic_machine=m68k-unknown ;; amigaos | amigados) ! basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) ! basic_machine=m68k-cbm os=-sysv4 ;; --- 360,371 ---- ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) ! basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) ! basic_machine=m68k-unknown os=-sysv4 ;; *************** *** 281,284 **** --- 386,393 ---- os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex *************** *** 301,314 **** os=-bsd ;; ! cray | ymp) ! basic_machine=ymp-cray ! os=-unicos ! ;; ! cray2) ! basic_machine=cray2-cray ! os=-unicos ! ;; ! [ctj]90-cray) ! basic_machine=c90-cray os=-unicos ;; --- 410,415 ---- os=-bsd ;; ! cray | j90) ! basic_machine=j90-cray os=-unicos ;; *************** *** 316,319 **** --- 417,423 ---- basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 *************** *** 322,325 **** --- 426,437 ---- basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) *************** *** 338,344 **** os=-sysv3 ;; - hbullx20-bull) - basic_machine=m68k-bull - ;; ebmon29k) basic_machine=a29k-amd --- 450,453 ---- *************** *** 349,353 **** os=-bsd ;; ! encore | umax | mmax | multimax) basic_machine=ns32k-encore ;; --- 458,462 ---- os=-bsd ;; ! encore | umax | mmax | multimax) # bash basic_machine=ns32k-encore ;; *************** *** 366,369 **** --- 475,482 ---- os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi *************** *** 386,389 **** --- 499,505 ---- os=-sysv3 ;; + hbullx20-bull) + basic_machine=m68k-bull # bash + ;; hp300-*) basic_machine=m68k-hp *************** *** 438,464 **** ;; ibm032-*) ! basic_machine=ibmrt-ibm ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? ! i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; ! i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; ! i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; ! i[34567]86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach --- 554,587 ---- ;; ibm032-*) ! basic_machine=ibmrt-ibm # bash ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? ! i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; ! i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; ! i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; ! i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; + i386-go32) + basic_machine=i386-pc # bash + os=-go32 + ;; + i386-mingw32) + basic_machine=i386-pc # bash + os=-mingw32 + ;; i386mach) basic_machine=i386-mach *************** *** 469,480 **** os=-vsta ;; - i386-go32 | go32) - basic_machine=i386-unknown - os=-go32 - ;; - i386-mingw32 | mingw32) - basic_machine=i386-unknown - os=-mingw32 - ;; iris | iris4d) basic_machine=mips-sgi --- 592,595 ---- *************** *** 491,499 **** os=-sysv ;; ! luna88k-omron* | m88k-omron*) basic_machine=m88k-omron ;; magicstation*) ! basic_machine=magicstation-unknown ;; magnum | m3230) --- 606,614 ---- os=-sysv ;; ! luna88k-omron* | m88k-omron*) # bash basic_machine=m88k-omron ;; magicstation*) ! basic_machine=magicstation-unknown # bash ;; magnum | m3230) *************** *** 505,523 **** os=-sysv ;; miniframe) basic_machine=m68000-convergent ;; ! *mint | *MiNT) basic_machine=m68k-atari os=-mint ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` --- 620,634 ---- os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; ! *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` *************** *** 526,537 **** basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) ! basic_machine=i386-unknown os=-msdos ;; ncr3000) basic_machine=i486-ncr --- 637,660 ---- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; monitor) basic_machine=m68k-rom68k os=-coff ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; msdos) ! basic_machine=i386-pc os=-msdos ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr *************** *** 543,547 **** ;; netwinder) ! basic_machine=armv4l-corel os=-linux ;; --- 666,670 ---- ;; netwinder) ! basic_machine=armv4l-rebel os=-linux ;; *************** *** 558,565 **** os=-newsos ;; ! necv70) ! basic_machine=v70-nec ! os=-sysv ! ;; next | m*-next ) basic_machine=m68k-next --- 681,688 ---- os=-newsos ;; ! necv70) ! basic_machine=v70-nec ! os=-sysv ! ;; next | m*-next ) basic_machine=m68k-next *************** *** 587,617 **** os=-nindy ;; ! mon960) ! basic_machine=i960-intel ! os=-mon960 ! ;; np1) basic_machine=np1-gould ;; ! osr5 | sco5) # SCO Open Server ! basic_machine=i386-pc ! os=-sco3.2v5 ;; odt | odt3 | odt4) # SCO Open Desktop ! basic_machine=i386-pc os=-sco3.2v4 ;; ! op50n-* | op60c-*) ! basic_machine=hppa1.1-oki ! os=-proelf ! ;; ! OSE68000 | ose68000) ! basic_machine=m68000-ericsson ! os=-ose ! ;; ! os68k) ! basic_machine=m68k-none ! os=-os68k ! ;; pa-hitachi) basic_machine=hppa1.1-hitachi --- 710,751 ---- os=-nindy ;; ! mon960) ! basic_machine=i960-intel ! os=-mon960 ! ;; ! nonstopux) ! basic_machine=mips-compaq ! os=-nonstopux ! ;; np1) basic_machine=np1-gould ;; ! nsr-tandem) ! basic_machine=nsr-tandem ;; odt | odt3 | odt4) # SCO Open Desktop ! basic_machine=i386-pc # bash os=-sco3.2v4 ;; ! op50n-* | op60c-*) ! basic_machine=hppa1.1-oki ! os=-proelf ! ;; ! or32 | or32-*) ! basic_machine=or32-unknown ! os=-coff ! ;; ! OSE68000 | ose68000) ! basic_machine=m68000-ericsson ! os=-ose ! ;; ! osr5 | sco5) # SCO Open Server ! basic_machine=i386-pc # bash ! os=-sco3.2v5 ! ;; ! os68k) ! basic_machine=m68k-none ! os=-os68k ! ;; pa-hitachi) basic_machine=hppa1.1-hitachi *************** *** 628,674 **** basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; ! pentium | p5 | k5 | k6 | nexen) ! basic_machine=i586-intel ;; - pentiumpro | p6 | 6x86) - basic_machine=i686-pc - ;; pentiumii | pentium2) ! basic_machine=i786-pc ;; ! pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ! pentiumpro-* | p6-* | 6x86*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) ! basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; ! power) basic_machine=rs6000-ibm ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; ! rom68k) ! basic_machine=m68k-rom68k ! os=-coff ! ;; rm[46]00) basic_machine=mips-siemens --- 762,822 ---- basic_machine=m68k-tti ;; ! pc532 | pc532-*) basic_machine=ns32k-pc532 ;; ! pentium | p5 | k5 | k6 | nexgen | viac3) ! basic_machine=i586-pc ! ;; ! pentiumpro | p6 | 6x86 | athlon) ! basic_machine=i686-pc ;; pentiumii | pentium2) ! basic_machine=i686-pc ;; ! pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ! pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) ! basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; ! power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ! ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ! ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; ! pw32) ! basic_machine=i586-unknown ! os=-pw32 ! ;; ! rom68k) ! basic_machine=m68k-rom68k ! os=-coff ! ;; rm[46]00) basic_machine=mips-siemens *************** *** 677,688 **** basic_machine=romp-ibm ;; ! s390-*) basic_machine=s390-ibm - os=-linux ;; ! sa29200) ! basic_machine=a29k-amd ! os=-udi ! ;; sequent) basic_machine=i386-sequent --- 825,838 ---- basic_machine=romp-ibm ;; ! s390 | s390-*) basic_machine=s390-ibm ;; ! s390x | s390x-*) ! basic_machine=s390x-ibm ! ;; ! sa29200) ! basic_machine=a29k-amd ! os=-udi ! ;; sequent) basic_machine=i386-sequent *************** *** 692,699 **** os=-hms ;; ! sparclite-wrs) ! basic_machine=sparclite-wrs ! os=-vxworks ! ;; sps7) basic_machine=m68k-bull --- 842,849 ---- os=-hms ;; ! sparclite-wrs | simso-wrs) ! basic_machine=sparclite-wrs ! os=-vxworks ! ;; sps7) basic_machine=m68k-bull *************** *** 703,713 **** basic_machine=spur-unknown ;; ! st2000) ! basic_machine=m68k-tandem ! ;; ! stratus) ! basic_machine=i860-stratus ! os=-sysv4 ! ;; sun2) basic_machine=m68000-sun --- 853,863 ---- basic_machine=spur-unknown ;; ! st2000) ! basic_machine=m68k-tandem ! ;; ! stratus) ! basic_machine=i860-stratus ! os=-sysv4 ! ;; sun2) basic_machine=m68000-sun *************** *** 750,767 **** basic_machine=i386-sun ;; symmetry) basic_machine=i386-sequent os=-dynix ;; ! t3e) ! basic_machine=t3e-cray ! os=-unicos ! ;; ! tx39) ! basic_machine=mipstx39-unknown ! ;; ! tx39el) ! basic_machine=mipstx39el-unknown ! ;; tower | tower-32) basic_machine=m68k-ncr --- 900,937 ---- basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix ;; ! t3d) ! basic_machine=alpha-cray ! os=-unicos ! ;; ! t3e) ! basic_machine=alphaev5-cray ! os=-unicos ! ;; ! t90) ! basic_machine=t90-cray ! os=-unicos ! ;; ! tic54x | c54x*) ! basic_machine=tic54x-unknown ! os=-coff ! ;; ! tx39) ! basic_machine=mipstx39-unknown ! ;; ! tx39el) ! basic_machine=mipstx39el-unknown ! ;; ! toad1) ! basic_machine=pdp10-xkl ! os=-tops20 ! ;; tower | tower-32) basic_machine=m68k-ncr *************** *** 775,790 **** os=-sym1 ;; ! uw2 | unixware | unixware2) basic_machine=i386-pc os=-sysv4.2uw2.1 ;; ! uw7 | unixware7) basic_machine=i386-pc os=-sysv5uw7 ;; ! v810 | necv810) ! basic_machine=v810-nec ! os=-none ! ;; vaxv) basic_machine=vax-dec --- 945,960 ---- os=-sym1 ;; ! uw2 | unixware | unixware2) # bash basic_machine=i386-pc os=-sysv4.2uw2.1 ;; ! uw7 | unixware7) # bash basic_machine=i386-pc os=-sysv5uw7 ;; ! v810 | necv810) ! basic_machine=v810-nec ! os=-none ! ;; vaxv) basic_machine=vax-dec *************** *** 796,801 **** ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs --- 966,971 ---- ;; vpp*|vx|vx-*) ! basic_machine=f301-fujitsu ! ;; vxworks960) basic_machine=i960-wrs *************** *** 810,832 **** os=-vxworks ;; ! w65*) ! basic_machine=w65-wdc ! os=-none ! ;; ! w89k-*) ! basic_machine=hppa1.1-winbond ! os=-proelf ! ;; ! xmp) ! basic_machine=xmp-cray ! os=-unicos ;; ! xps | xps100) basic_machine=xps100-honeywell ;; ! z8k-*-coff) ! basic_machine=z8k-unknown ! os=-sim ! ;; none) basic_machine=none-none --- 980,1006 ---- os=-vxworks ;; ! w65*) ! basic_machine=w65-wdc ! os=-none ! ;; ! w89k-*) ! basic_machine=hppa1.1-winbond ! os=-proelf ! ;; ! windows32) ! basic_machine=i386-pc ! os=-windows32-msvcrt ;; ! xps | xps100) basic_machine=xps100-honeywell ;; ! ymp) ! basic_machine=ymp-cray ! os=-unicos ! ;; ! z8k-*-coff) ! basic_machine=z8k-unknown ! os=-sim ! ;; none) basic_machine=none-none *************** *** 836,854 **** # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. ! w89k) ! basic_machine=hppa1.1-winbond ! ;; ! op50n) ! basic_machine=hppa1.1-oki ! ;; ! op60c) ! basic_machine=hppa1.1-oki ! ;; ! mips) ! if test "x$os" = "x-linux-gnu" ; then ! basic_machine=mips-unknown ! else ! basic_machine=mips-mips ! fi ;; romp) --- 1010,1021 ---- # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. ! w89k) ! basic_machine=hppa1.1-winbond ! ;; ! op50n) ! basic_machine=hppa1.1-oki ! ;; ! op60c) ! basic_machine=hppa1.1-oki ;; romp) *************** *** 861,864 **** --- 1028,1035 ---- basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec *************** *** 867,874 **** basic_machine=we32k-att ;; ! sparc | sparcv9) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; --- 1038,1051 ---- basic_machine=we32k-att ;; ! sh3 | sh4 | sh3eb | sh4eb) ! basic_machine=sh-unknown ! ;; ! sh64) ! basic_machine=sh64-unknown ! ;; ! sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; ! cydra) basic_machine=cydra-cydrome ;; *************** *** 879,892 **** basic_machine=clipper-highlevel ;; ! mac | mpw | mac-mpw) ! basic_machine=m68k-apple ! ;; ! pmac | pmac-mpw) ! basic_machine=powerpc-apple ! ;; ! c4x*) ! basic_machine=c4x-none ! os=-coff ! ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 --- 1056,1072 ---- basic_machine=clipper-highlevel ;; ! mac | mpw | mac-mpw) ! basic_machine=m68k-apple ! ;; ! pmac | pmac-mpw) ! basic_machine=powerpc-apple ! ;; ! c4x*) ! basic_machine=c4x-none ! os=-coff ! ;; ! *-unknown) ! # Make sure to match an already-canonicalized machine name. ! ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 *************** *** 912,917 **** then case $os in ! # First match some system type aliases ! # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) --- 1092,1097 ---- then case $os in ! # First match some system type aliases ! # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) *************** *** 924,935 **** os=-sysv4 ;; ! -unixware | -uw | -unixware2* | -uw2*) ! os=-sysv4.2uw2.1 ! ;; ! -unixware7* | -uw7*) os=-sysv5uw7 ;; ! -unixware*) ! os=-sysv4.2uw ;; -gnu/linux*) --- 1104,1112 ---- os=-sysv4 ;; ! -unixware7*) # bash os=-sysv5uw7 ;; ! -unixware*) ! os=-sysv4.2uw ;; -gnu/linux*) *************** *** 951,971 **** | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ! | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; ! # BEGIN CASES ADDED FOR Bash ! -qnx* | -powerux* | -superux* | -darwin* | -nonstopux*) ;; - # END CASES ADDED FOR Bash - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ - | -macos* | -mpw* | -magic* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` --- 1128,1164 ---- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ ! | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ ! | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ ! | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ ! | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ ! | -morphos* | -superux* | -rtmk* | -rtmk-nova*) # Remember, each alternative MUST END IN *, to match a version number. ;; ! # NOTE -- BEGIN CASES ADDED FOR Bash -- NOTE ! -powerux* | -superux*) ! ;; ! # NOTE -- END CASES ADDED FOR Bash -- NOTE ! -qnx*) ! case $basic_machine in ! x86-* | i*86-*) ! ;; ! *) ! os=-nto$os ! ;; ! esac ! ;; ! -nto*) ! os=-nto-qnx ! ;; ! -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ ! | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ ! | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ! ;; ! -mac*) ! os=`echo $os | sed -e 's|mac|macos|'` ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` *************** *** 977,980 **** --- 1170,1179 ---- os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose *************** *** 992,1003 **** os=-aos ;; ! -386bsd) ! os=-bsd ! ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) ! os=-nextstep2 ;; # Preserve the version number of sinix5. --- 1191,1211 ---- os=-aos ;; ! -atheos*) ! os=-atheos ! ;; ! -386bsd) ! os=-bsd ! ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) ! os=-nextstep2 ! ;; ! -nsk*) ! os=-nsk ;; # Preserve the version number of sinix5. *************** *** 1023,1044 **** os=-sysv4 ;; ! -sysvr5) os=-sysv5 ;; ! # This must come after -sysvr[45]. -sysv*) ;; ! -ose*) ! os=-ose ! ;; ! -es1800*) ! os=-ose ! ;; -xenix) os=-xenix ;; ! -*mint | -*MiNT) ! os=-mint ! ;; -none) ;; --- 1231,1252 ---- os=-sysv4 ;; ! -sysvr5) # bash os=-sysv5 ;; ! # This must come after -sysvr4. -sysv*) ;; ! -ose*) ! os=-ose ! ;; ! -es1800*) ! os=-ose ! ;; -xenix) os=-xenix ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! os=-mint ! ;; -none) ;; *************** *** 1066,1073 **** os=-riscix1.2 ;; arm*-semi) os=-aout ;; ! pdp11-*) os=-none ;; --- 1274,1288 ---- os=-riscix1.2 ;; + arm*-rebel) + os=-linux + ;; arm*-semi) os=-aout ;; ! # This must come before the *-dec entry. ! pdp10-*) ! os=-tops20 ! ;; ! pdp11-*) os=-none ;; *************** *** 1087,1099 **** # os=-sunos4 ;; ! m68*-cisco) ! os=-aout ! ;; ! mips*-cisco) ! os=-elf ! ;; ! mips*-*) ! os=-elf ! ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 --- 1302,1317 ---- # os=-sunos4 ;; ! m68*-cisco) ! os=-aout ! ;; ! mips*-cisco) ! os=-elf ! ;; ! mips*-*) ! os=-elf ! ;; ! or32-*) ! os=-coff ! ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 *************** *** 1108,1120 **** os=-aix ;; ! *-wec) ! os=-proelf ! ;; ! *-winbond) ! os=-proelf ! ;; ! *-oki) ! os=-proelf ! ;; *-hp) os=-hpux --- 1326,1338 ---- os=-aix ;; ! *-wec) ! os=-proelf ! ;; ! *-winbond) ! os=-proelf ! ;; ! *-oki) ! os=-proelf ! ;; *-hp) os=-hpux *************** *** 1159,1166 **** os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; --- 1377,1384 ---- os=-nextstep3 ;; ! *-gould) os=-sysv ;; ! *-highlevel) os=-bsd ;; *************** *** 1168,1175 **** os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; --- 1386,1393 ---- os=-bsd ;; ! *-sgi) os=-irix ;; ! *-siemens) os=-sysv4 ;; *************** *** 1177,1195 **** os=-rtu ;; ! f301-fujitsu) os=-uxpv ;; ! *-rom68k) ! os=-coff ! ;; ! *-*bug) ! os=-coff ! ;; ! *-apple) ! os=-macos ! ;; ! *-atari*) ! os=-mint ! ;; *) os=-none --- 1395,1413 ---- os=-rtu ;; ! f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; ! *-rom68k) ! os=-coff ! ;; ! *-*bug) ! os=-coff ! ;; ! *-apple) ! os=-macos ! ;; ! *-atari*) ! os=-mint ! ;; *) os=-none *************** *** 1210,1214 **** vendor=sun ;; ! -lynxos*) vendor=lynx ;; --- 1428,1432 ---- vendor=sun ;; ! -lynxos*) # bash vendor=lynx ;; *************** *** 1216,1225 **** vendor=ibm ;; ! -beos*) ! vendor=be ! ;; -hpux*) vendor=hp ;; -hiux*) vendor=hitachi --- 1434,1446 ---- vendor=ibm ;; ! -beos*) ! vendor=be ! ;; -hpux*) vendor=hp ;; + -mpeix*) + vendor=hp + ;; -hiux*) vendor=hitachi *************** *** 1237,1241 **** vendor=ns ;; ! -mvs*) vendor=ibm ;; --- 1458,1462 ---- vendor=ns ;; ! -mvs* | -opened*) vendor=ibm ;; *************** *** 1249,1261 **** vendor=apple ;; ! -hms*) ! vendor=hitachi ! ;; ! -mpw* | -macos*) ! vendor=apple ! ;; ! -*mint | -*MiNT) ! vendor=atari ! ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` --- 1470,1485 ---- vendor=apple ;; ! -hms*) ! vendor=hitachi ! ;; ! -mpw* | -macos*) ! vendor=apple ! ;; ! -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) ! vendor=atari ! ;; ! -vos*) ! vendor=stratus ! ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` *************** *** 1264,1265 **** --- 1488,1497 ---- echo $basic_machine$os + exit 0 + + # Local variables: + # eval: (add-hook 'write-file-hooks 'time-stamp) + # time-stamp-start: "timestamp='" + # time-stamp-format: "%:y-%02m-%02d" + # time-stamp-end: "'" + # End: diff -Nrc2 readline-4.2a/support/install.sh readline-4.3/support/install.sh *** readline-4.2a/support/install.sh Mon Mar 27 15:01:21 1995 --- readline-4.3/support/install.sh Tue Apr 16 16:49:24 2002 *************** *** 6,9 **** --- 6,21 ---- # $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ # + # Copyright 1991 by the Massachusetts Institute of Technology + # + # Permission to use, copy, modify, distribute, and sell this software and its + # documentation for any purpose is hereby granted without fee, provided that + # the above copyright notice appear in all copies and that both that + # copyright notice and this permission notice appear in supporting + # documentation, and that the name of M.I.T. not be used in advertising or + # publicity pertaining to distribution of the software without specific, + # written prior permission. M.I.T. makes no representations about the + # suitability of this software for any purpose. It is provided "as is" + # without express or implied warranty. + # # This script is compatible with the BSD install script, but was written # from scratch. diff -Nrc2 readline-4.2a/support/mkdirs readline-4.3/support/mkdirs *** readline-4.2a/support/mkdirs Mon Oct 7 14:39:38 1996 --- readline-4.3/support/mkdirs Wed Apr 17 13:24:30 2002 *************** *** 6,9 **** --- 6,25 ---- # chet@po.cwru.edu + # Copyright (C) 1996-2002 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + for dir do diff -Nrc2 readline-4.2a/support/mkdist readline-4.3/support/mkdist *** readline-4.2a/support/mkdist Tue Oct 9 11:24:38 2001 --- readline-4.3/support/mkdist Wed Apr 17 13:31:10 2002 *************** *** 8,11 **** --- 8,29 ---- # MANIFEST defaults to $SRCDIR/MANIFEST # + # Chet Ramey + # chet@po.cwru.edu + + # Copyright (C) 1996-2002 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. SRCDIR=src diff -Nrc2 readline-4.2a/support/shobj-conf readline-4.3/support/shobj-conf *** readline-4.2a/support/shobj-conf Thu Aug 23 13:05:02 2001 --- readline-4.3/support/shobj-conf Wed Apr 17 13:27:46 2002 *************** *** 11,14 **** --- 11,30 ---- # chet@po.cwru.edu + # Copyright (C) 1996-2002 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation; either version 2, or (at your option) + # any later version. + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. + # # defaults *************** *** 63,67 **** --- 79,86 ---- SHOBJ_CFLAGS=-fpic SHOBJ_LD='${CC}' + # This line works for the Solaris linker in /usr/ccs/bin/ld SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' + # This line works for the GNU ld + # SHOBJ_LDFLAGS='-shared -Wl,-h,$@' # SHLIB_XLDFLAGS='-R $(libdir)' diff -Nrc2 readline-4.2a/support/wcwidth.c readline-4.3/support/wcwidth.c *** readline-4.2a/support/wcwidth.c Wed Dec 31 19:00:00 1969 --- readline-4.3/support/wcwidth.c Thu Jan 10 08:36:26 2002 *************** *** 0 **** --- 1,236 ---- + /* + * This is an implementation of wcwidth() and wcswidth() as defined in + * "The Single UNIX Specification, Version 2, The Open Group, 1997" + * + * + * Markus Kuhn -- 2001-09-08 -- public domain + */ + + #include + + struct interval { + unsigned short first; + unsigned short last; + }; + + /* auxiliary function for binary search in interval table */ + static int bisearch(wchar_t ucs, const struct interval *table, int max) { + int min = 0; + int mid; + + if (ucs < table[0].first || ucs > table[max].last) + return 0; + while (max >= min) { + mid = (min + max) / 2; + if (ucs > table[mid].last) + min = mid + 1; + else if (ucs < table[mid].first) + max = mid - 1; + else + return 1; + } + + return 0; + } + + + /* The following functions define the column width of an ISO 10646 + * character as follows: + * + * - The null character (U+0000) has a column width of 0. + * + * - Other C0/C1 control characters and DEL will lead to a return + * value of -1. + * + * - Non-spacing and enclosing combining characters (general + * category code Mn or Me in the Unicode database) have a + * column width of 0. + * + * - Other format characters (general category code Cf in the Unicode + * database) and ZERO WIDTH SPACE (U+200B) have a column width of 0. + * + * - Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) + * have a column width of 0. + * + * - Spacing characters in the East Asian Wide (W) or East Asian + * FullWidth (F) category as defined in Unicode Technical + * Report #11 have a column width of 2. + * + * - All remaining characters (including all printable + * ISO 8859-1 and WGL4 characters, Unicode control characters, + * etc.) have a column width of 1. + * + * This implementation assumes that wchar_t characters are encoded + * in ISO 10646. + */ + + int wcwidth(wchar_t ucs) + { + /* sorted list of non-overlapping intervals of non-spacing characters */ + static const struct interval combining[] = { + { 0x0300, 0x034E }, { 0x0360, 0x0362 }, { 0x0483, 0x0486 }, + { 0x0488, 0x0489 }, { 0x0591, 0x05A1 }, { 0x05A3, 0x05B9 }, + { 0x05BB, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, + { 0x05C4, 0x05C4 }, { 0x064B, 0x0655 }, { 0x0670, 0x0670 }, + { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, + { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, + { 0x07A6, 0x07B0 }, { 0x0901, 0x0902 }, { 0x093C, 0x093C }, + { 0x0941, 0x0948 }, { 0x094D, 0x094D }, { 0x0951, 0x0954 }, + { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, { 0x09BC, 0x09BC }, + { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, { 0x09E2, 0x09E3 }, + { 0x0A02, 0x0A02 }, { 0x0A3C, 0x0A3C }, { 0x0A41, 0x0A42 }, + { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, { 0x0A70, 0x0A71 }, + { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, { 0x0AC1, 0x0AC5 }, + { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, { 0x0B01, 0x0B01 }, + { 0x0B3C, 0x0B3C }, { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, + { 0x0B4D, 0x0B4D }, { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, + { 0x0BC0, 0x0BC0 }, { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, + { 0x0C46, 0x0C48 }, { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, + { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, + { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, { 0x0DCA, 0x0DCA }, + { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, { 0x0E31, 0x0E31 }, + { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, { 0x0EB1, 0x0EB1 }, + { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, { 0x0EC8, 0x0ECD }, + { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, { 0x0F37, 0x0F37 }, + { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, { 0x0F80, 0x0F84 }, + { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, { 0x0F99, 0x0FBC }, + { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, { 0x1032, 0x1032 }, + { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, { 0x1058, 0x1059 }, + { 0x1160, 0x11FF }, { 0x17B7, 0x17BD }, { 0x17C6, 0x17C6 }, + { 0x17C9, 0x17D3 }, { 0x180B, 0x180E }, { 0x18A9, 0x18A9 }, + { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x206A, 0x206F }, + { 0x20D0, 0x20E3 }, { 0x302A, 0x302F }, { 0x3099, 0x309A }, + { 0xFB1E, 0xFB1E }, { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, + { 0xFFF9, 0xFFFB } + }; + + /* test for 8-bit control characters */ + if (ucs == 0) + return 0; + if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) + return -1; + + /* binary search in table of non-spacing characters */ + if (bisearch(ucs, combining, + sizeof(combining) / sizeof(struct interval) - 1)) + return 0; + + /* if we arrive here, ucs is not a combining or C0/C1 control character */ + + return 1 + + (ucs >= 0x1100 && + (ucs <= 0x115f || /* Hangul Jamo init. consonants */ + (ucs >= 0x2e80 && ucs <= 0xa4cf && (ucs & ~0x0011) != 0x300a && + ucs != 0x303f) || /* CJK ... Yi */ + (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ + (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ + (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ + (ucs >= 0xff00 && ucs <= 0xff5f) || /* Fullwidth Forms */ + (ucs >= 0xffe0 && ucs <= 0xffe6) || + (ucs >= 0x20000 && ucs <= 0x2ffff))); + } + + + int wcswidth(const wchar_t *pwcs, size_t n) + { + int w, width = 0; + + for (;*pwcs && n-- > 0; pwcs++) + if ((w = wcwidth(*pwcs)) < 0) + return -1; + else + width += w; + + return width; + } + + + /* + * The following function is the same as wcwidth(), except that + * spacing characters in the East Asian Ambiguous (A) category as + * defined in Unicode Technical Report #11 have a column width of 2. + * This experimental variant might be useful for users of CJK legacy + * encodings who want to migrate to UCS. It is not otherwise + * recommended for general use. + */ + static int wcwidth_cjk(wchar_t ucs) + { + /* sorted list of non-overlapping intervals of East Asian Ambiguous + * characters */ + static const struct interval ambiguous[] = { + { 0x00A1, 0x00A1 }, { 0x00A4, 0x00A4 }, { 0x00A7, 0x00A8 }, + { 0x00AA, 0x00AA }, { 0x00AD, 0x00AE }, { 0x00B0, 0x00B4 }, + { 0x00B6, 0x00BA }, { 0x00BC, 0x00BF }, { 0x00C6, 0x00C6 }, + { 0x00D0, 0x00D0 }, { 0x00D7, 0x00D8 }, { 0x00DE, 0x00E1 }, + { 0x00E6, 0x00E6 }, { 0x00E8, 0x00EA }, { 0x00EC, 0x00ED }, + { 0x00F0, 0x00F0 }, { 0x00F2, 0x00F3 }, { 0x00F7, 0x00FA }, + { 0x00FC, 0x00FC }, { 0x00FE, 0x00FE }, { 0x0101, 0x0101 }, + { 0x0111, 0x0111 }, { 0x0113, 0x0113 }, { 0x011B, 0x011B }, + { 0x0126, 0x0127 }, { 0x012B, 0x012B }, { 0x0131, 0x0133 }, + { 0x0138, 0x0138 }, { 0x013F, 0x0142 }, { 0x0144, 0x0144 }, + { 0x0148, 0x014B }, { 0x014D, 0x014D }, { 0x0152, 0x0153 }, + { 0x0166, 0x0167 }, { 0x016B, 0x016B }, { 0x01CE, 0x01CE }, + { 0x01D0, 0x01D0 }, { 0x01D2, 0x01D2 }, { 0x01D4, 0x01D4 }, + { 0x01D6, 0x01D6 }, { 0x01D8, 0x01D8 }, { 0x01DA, 0x01DA }, + { 0x01DC, 0x01DC }, { 0x0251, 0x0251 }, { 0x0261, 0x0261 }, + { 0x02C4, 0x02C4 }, { 0x02C7, 0x02C7 }, { 0x02C9, 0x02CB }, + { 0x02CD, 0x02CD }, { 0x02D0, 0x02D0 }, { 0x02D8, 0x02DB }, + { 0x02DD, 0x02DD }, { 0x02DF, 0x02DF }, { 0x0300, 0x034E }, + { 0x0360, 0x0362 }, { 0x0391, 0x03A1 }, { 0x03A3, 0x03A9 }, + { 0x03B1, 0x03C1 }, { 0x03C3, 0x03C9 }, { 0x0401, 0x0401 }, + { 0x0410, 0x044F }, { 0x0451, 0x0451 }, { 0x2010, 0x2010 }, + { 0x2013, 0x2016 }, { 0x2018, 0x2019 }, { 0x201C, 0x201D }, + { 0x2020, 0x2022 }, { 0x2024, 0x2027 }, { 0x2030, 0x2030 }, + { 0x2032, 0x2033 }, { 0x2035, 0x2035 }, { 0x203B, 0x203B }, + { 0x203E, 0x203E }, { 0x2074, 0x2074 }, { 0x207F, 0x207F }, + { 0x2081, 0x2084 }, { 0x20AC, 0x20AC }, { 0x2103, 0x2103 }, + { 0x2105, 0x2105 }, { 0x2109, 0x2109 }, { 0x2113, 0x2113 }, + { 0x2116, 0x2116 }, { 0x2121, 0x2122 }, { 0x2126, 0x2126 }, + { 0x212B, 0x212B }, { 0x2153, 0x2155 }, { 0x215B, 0x215E }, + { 0x2160, 0x216B }, { 0x2170, 0x2179 }, { 0x2190, 0x2199 }, + { 0x21B8, 0x21B9 }, { 0x21D2, 0x21D2 }, { 0x21D4, 0x21D4 }, + { 0x21E7, 0x21E7 }, { 0x2200, 0x2200 }, { 0x2202, 0x2203 }, + { 0x2207, 0x2208 }, { 0x220B, 0x220B }, { 0x220F, 0x220F }, + { 0x2211, 0x2211 }, { 0x2215, 0x2215 }, { 0x221A, 0x221A }, + { 0x221D, 0x2220 }, { 0x2223, 0x2223 }, { 0x2225, 0x2225 }, + { 0x2227, 0x222C }, { 0x222E, 0x222E }, { 0x2234, 0x2237 }, + { 0x223C, 0x223D }, { 0x2248, 0x2248 }, { 0x224C, 0x224C }, + { 0x2252, 0x2252 }, { 0x2260, 0x2261 }, { 0x2264, 0x2267 }, + { 0x226A, 0x226B }, { 0x226E, 0x226F }, { 0x2282, 0x2283 }, + { 0x2286, 0x2287 }, { 0x2295, 0x2295 }, { 0x2299, 0x2299 }, + { 0x22A5, 0x22A5 }, { 0x22BF, 0x22BF }, { 0x2312, 0x2312 }, + { 0x2329, 0x232A }, { 0x2460, 0x24BF }, { 0x24D0, 0x24E9 }, + { 0x2500, 0x254B }, { 0x2550, 0x2574 }, { 0x2580, 0x258F }, + { 0x2592, 0x2595 }, { 0x25A0, 0x25A1 }, { 0x25A3, 0x25A9 }, + { 0x25B2, 0x25B3 }, { 0x25B6, 0x25B7 }, { 0x25BC, 0x25BD }, + { 0x25C0, 0x25C1 }, { 0x25C6, 0x25C8 }, { 0x25CB, 0x25CB }, + { 0x25CE, 0x25D1 }, { 0x25E2, 0x25E5 }, { 0x25EF, 0x25EF }, + { 0x2605, 0x2606 }, { 0x2609, 0x2609 }, { 0x260E, 0x260F }, + { 0x261C, 0x261C }, { 0x261E, 0x261E }, { 0x2640, 0x2640 }, + { 0x2642, 0x2642 }, { 0x2660, 0x2661 }, { 0x2663, 0x2665 }, + { 0x2667, 0x266A }, { 0x266C, 0x266D }, { 0x266F, 0x266F }, + { 0x273D, 0x273D }, { 0x3008, 0x300B }, { 0x3014, 0x3015 }, + { 0x3018, 0x301B }, { 0xFFFD, 0xFFFD } + }; + + /* binary search in table of non-spacing characters */ + if (bisearch(ucs, ambiguous, + sizeof(ambiguous) / sizeof(struct interval) - 1)) + return 2; + + return wcwidth(ucs); + } + + + int wcswidth_cjk(const wchar_t *pwcs, size_t n) + { + int w, width = 0; + + for (;*pwcs && n-- > 0; pwcs++) + if ((w = wcwidth_cjk(*pwcs)) < 0) + return -1; + else + width += w; + + return width; + } diff -Nrc2 readline-4.2a/terminal.c readline-4.3/terminal.c *** readline-4.2a/terminal.c Thu Sep 20 15:33:30 2001 --- readline-4.3/terminal.c Mon Mar 4 12:23:09 2002 *************** *** 67,70 **** --- 67,73 ---- #include "xmalloc.h" + #define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) + #define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) + /* **************************************************************** */ /* */ *************** *** 141,144 **** --- 144,157 ---- static char *_rl_term_kh; static char *_rl_term_kH; + static char *_rl_term_at7; /* @7 */ + + /* Insert key */ + static char *_rl_term_kI; + + /* Cursor control */ + static char *_rl_term_vs; /* very visible */ + static char *_rl_term_ve; /* normal */ + + static void bind_termcap_arrow_keys PARAMS((Keymap)); /* Variables that hold the screen dimensions, used by the display code. */ *************** *** 275,279 **** { _rl_get_screen_size (fileno (rl_instream), 1); ! _rl_redisplay_after_sigwinch (); } } --- 288,295 ---- { _rl_get_screen_size (fileno (rl_instream), 1); ! if (CUSTOM_REDISPLAY_FUNC ()) ! rl_forced_update_display (); ! else ! _rl_redisplay_after_sigwinch (); } } *************** *** 288,291 **** --- 304,308 ---- static struct _tc_string tc_strings[] = { + { "@7", &_rl_term_at7 }, { "DC", &_rl_term_DC }, { "IC", &_rl_term_IC }, *************** *** 297,308 **** { "ic", &_rl_term_ic }, { "im", &_rl_term_im }, { "kd", &_rl_term_kd }, { "kh", &_rl_term_kh }, /* home */ - { "kH", &_rl_term_kH }, /* end */ { "kl", &_rl_term_kl }, { "kr", &_rl_term_kr }, { "ku", &_rl_term_ku }, - { "ks", &_rl_term_ks }, - { "ke", &_rl_term_ke }, { "le", &_rl_term_backspace }, { "mm", &_rl_term_mm }, --- 314,326 ---- { "ic", &_rl_term_ic }, { "im", &_rl_term_im }, + { "kH", &_rl_term_kH }, /* home down ?? */ + { "kI", &_rl_term_kI }, /* insert */ { "kd", &_rl_term_kd }, + { "ke", &_rl_term_ke }, /* end keypad mode */ { "kh", &_rl_term_kh }, /* home */ { "kl", &_rl_term_kl }, { "kr", &_rl_term_kr }, + { "ks", &_rl_term_ks }, /* start keypad mode */ { "ku", &_rl_term_ku }, { "le", &_rl_term_backspace }, { "mm", &_rl_term_mm }, *************** *** 314,317 **** --- 332,337 ---- { "up", &_rl_term_up }, { "vb", &_rl_visible_bell }, + { "vs", &_rl_term_vs }, + { "ve", &_rl_term_ve }, }; *************** *** 337,343 **** } - #define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay) - #define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc) - int _rl_init_terminal_io (terminal_name) --- 357,360 ---- *************** *** 347,351 **** char *buffer; int tty, tgetent_ret; - Keymap xkeymap; term = terminal_name ? terminal_name : sh_get_env_value ("TERM"); --- 364,367 ---- *************** *** 405,409 **** --- 421,428 ---- _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; + _rl_term_kh = _rl_term_kH = _rl_term_kI = (char *)NULL; + _rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL; _rl_term_mm = _rl_term_mo = (char *)NULL; + _rl_term_ve = _rl_term_vs = (char *)NULL; #if defined (HACK_TERMCAP_MOTION) term_forward_char = (char *)NULL; *************** *** 450,466 **** /* Attempt to find and bind the arrow keys. Do not override already bound keys in an overzealous attempt, however. */ - xkeymap = _rl_keymap; ! _rl_keymap = emacs_standard_keymap; ! _rl_bind_if_unbound (_rl_term_ku, rl_get_previous_history); ! _rl_bind_if_unbound (_rl_term_kd, rl_get_next_history); ! _rl_bind_if_unbound (_rl_term_kr, rl_forward); ! _rl_bind_if_unbound (_rl_term_kl, rl_backward); ! ! _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ ! _rl_bind_if_unbound (_rl_term_kH, rl_end_of_line); /* End */ #if defined (VI_MODE) ! _rl_keymap = vi_movement_keymap; _rl_bind_if_unbound (_rl_term_ku, rl_get_previous_history); _rl_bind_if_unbound (_rl_term_kd, rl_get_next_history); --- 469,493 ---- /* Attempt to find and bind the arrow keys. Do not override already bound keys in an overzealous attempt, however. */ ! bind_termcap_arrow_keys (emacs_standard_keymap); #if defined (VI_MODE) ! bind_termcap_arrow_keys (vi_movement_keymap); ! bind_termcap_arrow_keys (vi_insertion_keymap); ! #endif /* VI_MODE */ ! ! return 0; ! } ! ! /* Bind the arrow key sequences from the termcap description in MAP. */ ! static void ! bind_termcap_arrow_keys (map) ! Keymap map; ! { ! Keymap xkeymap; ! ! xkeymap = _rl_keymap; ! _rl_keymap = map; ! _rl_bind_if_unbound (_rl_term_ku, rl_get_previous_history); _rl_bind_if_unbound (_rl_term_kd, rl_get_next_history); *************** *** 469,478 **** _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ ! _rl_bind_if_unbound (_rl_term_kH, rl_end_of_line); /* End */ ! #endif /* VI_MODE */ _rl_keymap = xkeymap; - - return 0; } --- 496,502 ---- _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */ ! _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line); /* End */ _rl_keymap = xkeymap; } *************** *** 610,612 **** --- 634,662 ---- tputs (_rl_term_ke, 1, _rl_output_character_function); #endif + } + + /* **************************************************************** */ + /* */ + /* Controlling the Cursor */ + /* */ + /* **************************************************************** */ + + /* Set the cursor appropriately depending on IM, which is one of the + insert modes (insert or overwrite). Insert mode gets the normal + cursor. Overwrite mode gets a very visible cursor. Only does + anything if we have both capabilities. */ + void + _rl_set_cursor (im, force) + int im, force; + { + if (_rl_term_ve && _rl_term_vs) + { + if (force || im != rl_insert_mode) + { + if (im == RL_IM_OVERWRITE) + tputs (_rl_term_vs, 1, _rl_output_character_function); + else + tputs (_rl_term_ve, 1, _rl_output_character_function); + } + } } diff -Nrc2 readline-4.2a/text.c readline-4.3/text.c *** readline-4.2a/text.c Wed Dec 31 19:00:00 1969 --- readline-4.3/text.c Thu May 30 13:46:13 2002 *************** *** 0 **** --- 1,1540 ---- + /* text.c -- text handling commands for readline. */ + + /* Copyright (C) 1987-2002 Free Software Foundation, Inc. + + This file is part of the GNU Readline Library, a library for + reading lines of text with interactive input and history editing. + + The GNU Readline Library is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + The GNU Readline Library is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + The GNU General Public License is often shipped with GNU software, and + is generally kept in a file called COPYING or LICENSE. If you do not + have a copy of the license, write to the Free Software Foundation, + 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ + #define READLINE_LIBRARY + + #if defined (HAVE_CONFIG_H) + # include + #endif + + #if defined (HAVE_UNISTD_H) + # include + #endif /* HAVE_UNISTD_H */ + + #if defined (HAVE_STDLIB_H) + # include + #else + # include "ansi_stdlib.h" + #endif /* HAVE_STDLIB_H */ + + #if defined (HAVE_LOCALE_H) + # include + #endif + + #include + + /* System-specific feature definitions and include files. */ + #include "rldefs.h" + #include "rlmbutil.h" + + #if defined (__EMX__) + # define INCL_DOSPROCESS + # include + #endif /* __EMX__ */ + + /* Some standard library routines. */ + #include "readline.h" + #include "history.h" + + #include "rlprivate.h" + #include "rlshell.h" + #include "xmalloc.h" + + /* Forward declarations. */ + static int rl_change_case PARAMS((int, int)); + static int _rl_char_search PARAMS((int, int, int)); + + /* **************************************************************** */ + /* */ + /* Insert and Delete */ + /* */ + /* **************************************************************** */ + + /* Insert a string of text into the line at point. This is the only + way that you should do insertion. _rl_insert_char () calls this + function. Returns the number of characters inserted. */ + int + rl_insert_text (string) + const char *string; + { + register int i, l; + + l = (string && *string) ? strlen (string) : 0; + if (l == 0) + return 0; + + if (rl_end + l >= rl_line_buffer_len) + rl_extend_line_buffer (rl_end + l); + + for (i = rl_end; i >= rl_point; i--) + rl_line_buffer[i + l] = rl_line_buffer[i]; + strncpy (rl_line_buffer + rl_point, string, l); + + /* Remember how to undo this if we aren't undoing something. */ + if (_rl_doing_an_undo == 0) + { + /* If possible and desirable, concatenate the undos. */ + if ((l == 1) && + rl_undo_list && + (rl_undo_list->what == UNDO_INSERT) && + (rl_undo_list->end == rl_point) && + (rl_undo_list->end - rl_undo_list->start < 20)) + rl_undo_list->end++; + else + rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL); + } + rl_point += l; + rl_end += l; + rl_line_buffer[rl_end] = '\0'; + return l; + } + + /* Delete the string between FROM and TO. FROM is inclusive, TO is not. + Returns the number of characters deleted. */ + int + rl_delete_text (from, to) + int from, to; + { + register char *text; + register int diff, i; + + /* Fix it if the caller is confused. */ + if (from > to) + SWAP (from, to); + + /* fix boundaries */ + if (to > rl_end) + { + to = rl_end; + if (from > to) + from = to; + } + if (from < 0) + from = 0; + + text = rl_copy_text (from, to); + + /* Some versions of strncpy() can't handle overlapping arguments. */ + diff = to - from; + for (i = from; i < rl_end - diff; i++) + rl_line_buffer[i] = rl_line_buffer[i + diff]; + + /* Remember how to undo this delete. */ + if (_rl_doing_an_undo == 0) + rl_add_undo (UNDO_DELETE, from, to, text); + else + free (text); + + rl_end -= diff; + rl_line_buffer[rl_end] = '\0'; + return (diff); + } + + /* Fix up point so that it is within the line boundaries after killing + text. If FIX_MARK_TOO is non-zero, the mark is forced within line + boundaries also. */ + + #define _RL_FIX_POINT(x) \ + do { \ + if (x > rl_end) \ + x = rl_end; \ + else if (x < 0) \ + x = 0; \ + } while (0) + + void + _rl_fix_point (fix_mark_too) + int fix_mark_too; + { + _RL_FIX_POINT (rl_point); + if (fix_mark_too) + _RL_FIX_POINT (rl_mark); + } + #undef _RL_FIX_POINT + + int + _rl_replace_text (text, start, end) + const char *text; + int start, end; + { + int n; + + rl_begin_undo_group (); + rl_delete_text (start, end + 1); + rl_point = start; + n = rl_insert_text (text); + rl_end_undo_group (); + + return n; + } + + /* Replace the current line buffer contents with TEXT. If CLEAR_UNDO is + non-zero, we free the current undo list. */ + void + rl_replace_line (text, clear_undo) + const char *text; + int clear_undo; + { + int len; + + len = strlen (text); + if (len >= rl_line_buffer_len) + rl_extend_line_buffer (len); + strcpy (rl_line_buffer, text); + rl_end = len; + + if (clear_undo) + rl_free_undo_list (); + + _rl_fix_point (1); + } + + /* **************************************************************** */ + /* */ + /* Readline character functions */ + /* */ + /* **************************************************************** */ + + /* This is not a gap editor, just a stupid line input routine. No hair + is involved in writing any of the functions, and none should be. */ + + /* Note that: + + rl_end is the place in the string that we would place '\0'; + i.e., it is always safe to place '\0' there. + + rl_point is the place in the string where the cursor is. Sometimes + this is the same as rl_end. + + Any command that is called interactively receives two arguments. + The first is a count: the numeric arg pased to this command. + The second is the key which invoked this command. + */ + + /* **************************************************************** */ + /* */ + /* Movement Commands */ + /* */ + /* **************************************************************** */ + + /* Note that if you `optimize' the display for these functions, you cannot + use said functions in other functions which do not do optimizing display. + I.e., you will have to update the data base for rl_redisplay, and you + might as well let rl_redisplay do that job. */ + + /* Move forward COUNT bytes. */ + int + rl_forward_byte (count, key) + int count, key; + { + if (count < 0) + return (rl_backward_byte (-count, key)); + + if (count > 0) + { + int end = rl_point + count; + #if defined (VI_MODE) + int lend = rl_end > 0 ? rl_end - (rl_editing_mode == vi_mode) : rl_end; + #else + int lend = rl_end; + #endif + + if (end > lend) + { + rl_point = lend; + rl_ding (); + } + else + rl_point = end; + } + + if (rl_end < 0) + rl_end = 0; + + return 0; + } + + #if defined (HANDLE_MULTIBYTE) + /* Move forward COUNT characters. */ + int + rl_forward_char (count, key) + int count, key; + { + int point; + + if (MB_CUR_MAX == 1 || rl_byte_oriented) + return (rl_forward_byte (count, key)); + + if (count < 0) + return (rl_backward_char (-count, key)); + + if (count > 0) + { + point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + + #if defined (VI_MODE) + if (rl_end <= point && rl_editing_mode == vi_mode) + point = _rl_find_prev_mbchar (rl_line_buffer, rl_end, MB_FIND_NONZERO); + #endif + + if (rl_point == point) + rl_ding (); + + rl_point = point; + + if (rl_end < 0) + rl_end = 0; + } + + return 0; + } + #else /* !HANDLE_MULTIBYTE */ + int + rl_forward_char (count, key) + int count, key; + { + return (rl_forward_byte (count, key)); + } + #endif /* !HANDLE_MULTIBYTE */ + + /* Backwards compatibility. */ + int + rl_forward (count, key) + int count, key; + { + return (rl_forward_char (count, key)); + } + + /* Move backward COUNT bytes. */ + int + rl_backward_byte (count, key) + int count, key; + { + if (count < 0) + return (rl_forward_byte (-count, key)); + + if (count > 0) + { + if (rl_point < count) + { + rl_point = 0; + rl_ding (); + } + else + rl_point -= count; + } + + if (rl_point < 0) + rl_point = 0; + + return 0; + } + + #if defined (HANDLE_MULTIBYTE) + /* Move backward COUNT characters. */ + int + rl_backward_char (count, key) + int count, key; + { + int point; + + if (MB_CUR_MAX == 1 || rl_byte_oriented) + return (rl_backward_byte (count, key)); + + if (count < 0) + return (rl_forward_char (-count, key)); + + if (count > 0) + { + point = rl_point; + + while (count > 0 && point > 0) + { + point = _rl_find_prev_mbchar (rl_line_buffer, point, MB_FIND_NONZERO); + count--; + } + if (count > 0) + { + rl_point = 0; + rl_ding (); + } + else + rl_point = point; + } + + return 0; + } + #else + int + rl_backward_char (count, key) + int count, key; + { + return (rl_backward_byte (count, key)); + } + #endif + + /* Backwards compatibility. */ + int + rl_backward (count, key) + int count, key; + { + return (rl_backward_char (count, key)); + } + + /* Move to the beginning of the line. */ + int + rl_beg_of_line (count, key) + int count, key; + { + rl_point = 0; + return 0; + } + + /* Move to the end of the line. */ + int + rl_end_of_line (count, key) + int count, key; + { + rl_point = rl_end; + return 0; + } + + /* XXX - these might need changes for multibyte characters */ + /* Move forward a word. We do what Emacs does. */ + int + rl_forward_word (count, key) + int count, key; + { + int c; + + if (count < 0) + return (rl_backward_word (-count, key)); + + while (count) + { + if (rl_point == rl_end) + return 0; + + /* If we are not in a word, move forward until we are in one. + Then, move forward until we hit a non-alphabetic character. */ + c = rl_line_buffer[rl_point]; + if (rl_alphabetic (c) == 0) + { + while (++rl_point < rl_end) + { + c = rl_line_buffer[rl_point]; + if (rl_alphabetic (c)) + break; + } + } + + if (rl_point == rl_end) + return 0; + + while (++rl_point < rl_end) + { + c = rl_line_buffer[rl_point]; + if (rl_alphabetic (c) == 0) + break; + } + --count; + } + + return 0; + } + + /* Move backward a word. We do what Emacs does. */ + int + rl_backward_word (count, key) + int count, key; + { + int c; + + if (count < 0) + return (rl_forward_word (-count, key)); + + while (count) + { + if (!rl_point) + return 0; + + /* Like rl_forward_word (), except that we look at the characters + just before point. */ + + c = rl_line_buffer[rl_point - 1]; + if (rl_alphabetic (c) == 0) + { + while (--rl_point) + { + c = rl_line_buffer[rl_point - 1]; + if (rl_alphabetic (c)) + break; + } + } + + while (rl_point) + { + c = rl_line_buffer[rl_point - 1]; + if (rl_alphabetic (c) == 0) + break; + else + --rl_point; + } + + --count; + } + + return 0; + } + + /* Clear the current line. Numeric argument to C-l does this. */ + int + rl_refresh_line (ignore1, ignore2) + int ignore1, ignore2; + { + int curr_line; + + curr_line = _rl_current_display_line (); + + _rl_move_vert (curr_line); + _rl_move_cursor_relative (0, rl_line_buffer); /* XXX is this right */ + + _rl_clear_to_eol (0); /* arg of 0 means to not use spaces */ + + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; + } + + /* C-l typed to a line without quoting clears the screen, and then reprints + the prompt and the current input line. Given a numeric arg, redraw only + the current line. */ + int + rl_clear_screen (count, key) + int count, key; + { + if (rl_explicit_arg) + { + rl_refresh_line (count, key); + return 0; + } + + _rl_clear_screen (); /* calls termcap function to clear screen */ + rl_forced_update_display (); + rl_display_fixed = 1; + + return 0; + } + + int + rl_arrow_keys (count, c) + int count, c; + { + int ch; + + RL_SETSTATE(RL_STATE_MOREINPUT); + ch = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + switch (_rl_to_upper (ch)) + { + case 'A': + rl_get_previous_history (count, ch); + break; + + case 'B': + rl_get_next_history (count, ch); + break; + + case 'C': + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_forward_char (count, ch); + else + rl_forward_byte (count, ch); + break; + + case 'D': + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_backward_char (count, ch); + else + rl_backward_byte (count, ch); + break; + + default: + rl_ding (); + } + + return 0; + } + + /* **************************************************************** */ + /* */ + /* Text commands */ + /* */ + /* **************************************************************** */ + + #ifdef HANDLE_MULTIBYTE + static char pending_bytes[MB_LEN_MAX]; + static int pending_bytes_length = 0; + static mbstate_t ps = {0}; + #endif + + /* Insert the character C at the current location, moving point forward. + If C introduces a multibyte sequence, we read the whole sequence and + then insert the multibyte char into the line buffer. */ + int + _rl_insert_char (count, c) + int count, c; + { + register int i; + char *string; + #ifdef HANDLE_MULTIBYTE + int string_size; + char incoming[MB_LEN_MAX + 1]; + int incoming_length = 0; + mbstate_t ps_back; + static int stored_count = 0; + #endif + + if (count <= 0) + return 0; + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + incoming[0] = c; + incoming[1] = '\0'; + incoming_length = 1; + } + else + { + wchar_t wc; + size_t ret; + + if (stored_count <= 0) + stored_count = count; + else + count = stored_count; + + ps_back = ps; + pending_bytes[pending_bytes_length++] = c; + ret = mbrtowc (&wc, pending_bytes, pending_bytes_length, &ps); + + if (ret == (size_t)-2) + { + /* Bytes too short to compose character, try to wait for next byte. + Restore the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + ps = ps_back; + return 1; + } + else if (ret == (size_t)-1) + { + /* Invalid byte sequence for the current locale. Treat first byte + as a single character. */ + incoming[0] = pending_bytes[0]; + incoming[1] = '\0'; + incoming_length = 1; + pending_bytes_length--; + memmove (pending_bytes, pending_bytes + 1, pending_bytes_length); + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else if (ret == (size_t)0) + { + incoming[0] = '\0'; + incoming_length = 0; + pending_bytes_length--; + /* Clear the state of the byte sequence, because in this case the + effect of mbstate is undefined. */ + memset (&ps, 0, sizeof (mbstate_t)); + } + else + { + /* We successfully read a single multibyte character. */ + memcpy (incoming, pending_bytes, pending_bytes_length); + incoming[pending_bytes_length] = '\0'; + incoming_length = pending_bytes_length; + pending_bytes_length = 0; + } + } + #endif /* HANDLE_MULTIBYTE */ + + /* If we can optimize, then do it. But don't let people crash + readline because of extra large arguments. */ + if (count > 1 && count <= 1024) + { + #if defined (HANDLE_MULTIBYTE) + string_size = count * incoming_length; + string = (char *)xmalloc (1 + string_size); + + i = 0; + while (i < string_size) + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } + incoming_length = 0; + stored_count = 0; + #else /* !HANDLE_MULTIBYTE */ + string = (char *)xmalloc (1 + count); + + for (i = 0; i < count; i++) + string[i] = c; + #endif /* !HANDLE_MULTIBYTE */ + + string[i] = '\0'; + rl_insert_text (string); + free (string); + + return 0; + } + + if (count > 1024) + { + int decreaser; + #if defined (HANDLE_MULTIBYTE) + string_size = incoming_length * 1024; + string = (char *)xmalloc (1 + string_size); + + i = 0; + while (i < string_size) + { + strncpy (string + i, incoming, incoming_length); + i += incoming_length; + } + + while (count) + { + decreaser = (count > 1024) ? 1024 : count; + string[decreaser*incoming_length] = '\0'; + rl_insert_text (string); + count -= decreaser; + } + + free (string); + incoming_length = 0; + stored_count = 0; + #else /* !HANDLE_MULTIBYTE */ + char str[1024+1]; + + for (i = 0; i < 1024; i++) + str[i] = c; + + while (count) + { + decreaser = (count > 1024 ? 1024 : count); + str[decreaser] = '\0'; + rl_insert_text (str); + count -= decreaser; + } + #endif /* !HANDLE_MULTIBYTE */ + + return 0; + } + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + #endif + /* We are inserting a single character. + If there is pending input, then make a string of all of the + pending characters that are bound to rl_insert, and insert + them all. */ + if (_rl_any_typein ()) + _rl_insert_typein (c); + else + { + /* Inserting a single character. */ + char str[2]; + + str[1] = '\0'; + str[0] = c; + rl_insert_text (str); + } + #if defined (HANDLE_MULTIBYTE) + } + else + { + rl_insert_text (incoming); + stored_count = 0; + } + #endif + + return 0; + } + + /* Overwrite the character at point (or next COUNT characters) with C. + If C introduces a multibyte character sequence, read the entire sequence + before starting the overwrite loop. */ + int + _rl_overwrite_char (count, c) + int count, c; + { + int i; + #if defined (HANDLE_MULTIBYTE) + char mbkey[MB_LEN_MAX]; + int k; + + /* Read an entire multibyte character sequence to insert COUNT times. */ + if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0) + k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX); + #endif + + for (i = 0; i < count; i++) + { + rl_begin_undo_group (); + + if (rl_point < rl_end) + rl_delete (1, c); + + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_insert_text (mbkey); + else + #endif + _rl_insert_char (1, c); + + rl_end_undo_group (); + } + + return 0; + } + + int + rl_insert (count, c) + int count, c; + { + return (rl_insert_mode == RL_IM_INSERT ? _rl_insert_char (count, c) + : _rl_overwrite_char (count, c)); + } + + /* Insert the next typed character verbatim. */ + int + rl_quoted_insert (count, key) + int count, key; + { + int c; + + #if defined (HANDLE_SIGNALS) + _rl_disable_tty_signals (); + #endif + + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + #if defined (HANDLE_SIGNALS) + _rl_restore_tty_signals (); + #endif + + return (_rl_insert_char (count, c)); + } + + /* Insert a tab character. */ + int + rl_tab_insert (count, key) + int count, key; + { + return (_rl_insert_char (count, '\t')); + } + + /* What to do when a NEWLINE is pressed. We accept the whole line. + KEY is the key that invoked this command. I guess it could have + meaning in the future. */ + int + rl_newline (count, key) + int count, key; + { + rl_done = 1; + + if (_rl_history_preserve_point) + _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point; + + RL_SETSTATE(RL_STATE_DONE); + + #if defined (VI_MODE) + if (rl_editing_mode == vi_mode) + { + _rl_vi_done_inserting (); + _rl_vi_reset_last (); + } + #endif /* VI_MODE */ + + /* If we've been asked to erase empty lines, suppress the final update, + since _rl_update_final calls rl_crlf(). */ + if (rl_erase_empty_line && rl_point == 0 && rl_end == 0) + return 0; + + if (readline_echoing_p) + _rl_update_final (); + return 0; + } + + /* What to do for some uppercase characters, like meta characters, + and some characters appearing in emacs_ctlx_keymap. This function + is just a stub, you bind keys to it and the code in _rl_dispatch () + is special cased. */ + int + rl_do_lowercase_version (ignore1, ignore2) + int ignore1, ignore2; + { + return 0; + } + + /* This is different from what vi does, so the code's not shared. Emacs + rubout in overwrite mode has one oddity: it replaces a control + character that's displayed as two characters (^X) with two spaces. */ + int + _rl_overwrite_rubout (count, key) + int count, key; + { + int opoint; + int i, l; + + if (rl_point == 0) + { + rl_ding (); + return 1; + } + + opoint = rl_point; + + /* L == number of spaces to insert */ + for (i = l = 0; i < count; i++) + { + rl_backward_char (1, key); + l += rl_character_len (rl_line_buffer[rl_point], rl_point); /* not exactly right */ + } + + rl_begin_undo_group (); + + if (count > 1 || rl_explicit_arg) + rl_kill_text (opoint, rl_point); + else + rl_delete_text (opoint, rl_point); + + /* Emacs puts point at the beginning of the sequence of spaces. */ + opoint = rl_point; + _rl_insert_char (l, ' '); + rl_point = opoint; + + rl_end_undo_group (); + + return 0; + } + + /* Rubout the character behind point. */ + int + rl_rubout (count, key) + int count, key; + { + if (count < 0) + return (rl_delete (-count, key)); + + if (!rl_point) + { + rl_ding (); + return -1; + } + + if (rl_insert_mode == RL_IM_OVERWRITE) + return (_rl_overwrite_rubout (count, key)); + + return (_rl_rubout_char (count, key)); + } + + int + _rl_rubout_char (count, key) + int count, key; + { + int orig_point; + unsigned char c; + + /* Duplicated code because this is called from other parts of the library. */ + if (count < 0) + return (rl_delete (-count, key)); + + if (rl_point == 0) + { + rl_ding (); + return -1; + } + + if (count > 1 || rl_explicit_arg) + { + orig_point = rl_point; + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_backward_char (count, key); + else + #endif + rl_backward_byte (count, key); + rl_kill_text (orig_point, rl_point); + } + else + { + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + { + #endif + c = rl_line_buffer[--rl_point]; + rl_delete_text (rl_point, rl_point + 1); + #if defined (HANDLE_MULTIBYTE) + } + else + { + int orig_point; + + orig_point = rl_point; + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + c = rl_line_buffer[rl_point]; + rl_delete_text (rl_point, orig_point); + } + #endif /* HANDLE_MULTIBYTE */ + + /* I don't think that the hack for end of line is needed for + multibyte chars. */ + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX == 1 || rl_byte_oriented) + #endif + if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos) + { + int l; + l = rl_character_len (c, rl_point); + _rl_erase_at_end_of_line (l); + } + } + + return 0; + } + + /* Delete the character under the cursor. Given a numeric argument, + kill that many characters instead. */ + int + rl_delete (count, key) + int count, key; + { + int r; + + if (count < 0) + return (_rl_rubout_char (-count, key)); + + if (rl_point == rl_end) + { + rl_ding (); + return -1; + } + + if (count > 1 || rl_explicit_arg) + { + int orig_point = rl_point; + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_forward_char (count, key); + else + #endif + rl_forward_byte (count, key); + + r = rl_kill_text (orig_point, rl_point); + rl_point = orig_point; + return r; + } + else + { + int new_point; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + new_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); + else + new_point = rl_point + 1; + + return (rl_delete_text (rl_point, new_point)); + } + } + + /* Delete the character under the cursor, unless the insertion + point is at the end of the line, in which case the character + behind the cursor is deleted. COUNT is obeyed and may be used + to delete forward or backward that many characters. */ + int + rl_rubout_or_delete (count, key) + int count, key; + { + if (rl_end != 0 && rl_point == rl_end) + return (_rl_rubout_char (count, key)); + else + return (rl_delete (count, key)); + } + + /* Delete all spaces and tabs around point. */ + int + rl_delete_horizontal_space (count, ignore) + int count, ignore; + { + int start = rl_point; + + while (rl_point && whitespace (rl_line_buffer[rl_point - 1])) + rl_point--; + + start = rl_point; + + while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point])) + rl_point++; + + if (start != rl_point) + { + rl_delete_text (start, rl_point); + rl_point = start; + } + return 0; + } + + /* Like the tcsh editing function delete-char-or-list. The eof character + is caught before this is invoked, so this really does the same thing as + delete-char-or-list-or-eof, as long as it's bound to the eof character. */ + int + rl_delete_or_show_completions (count, key) + int count, key; + { + if (rl_end != 0 && rl_point == rl_end) + return (rl_possible_completions (count, key)); + else + return (rl_delete (count, key)); + } + + #ifndef RL_COMMENT_BEGIN_DEFAULT + #define RL_COMMENT_BEGIN_DEFAULT "#" + #endif + + /* Turn the current line into a comment in shell history. + A K*rn shell style function. */ + int + rl_insert_comment (count, key) + int count, key; + { + char *rl_comment_text; + int rl_comment_len; + + rl_beg_of_line (1, key); + rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT; + + if (rl_explicit_arg == 0) + rl_insert_text (rl_comment_text); + else + { + rl_comment_len = strlen (rl_comment_text); + if (STREQN (rl_comment_text, rl_line_buffer, rl_comment_len)) + rl_delete_text (rl_point, rl_point + rl_comment_len); + else + rl_insert_text (rl_comment_text); + } + + (*rl_redisplay_function) (); + rl_newline (1, '\n'); + + return (0); + } + + /* **************************************************************** */ + /* */ + /* Changing Case */ + /* */ + /* **************************************************************** */ + + /* The three kinds of things that we know how to do. */ + #define UpCase 1 + #define DownCase 2 + #define CapCase 3 + + /* Uppercase the word at point. */ + int + rl_upcase_word (count, key) + int count, key; + { + return (rl_change_case (count, UpCase)); + } + + /* Lowercase the word at point. */ + int + rl_downcase_word (count, key) + int count, key; + { + return (rl_change_case (count, DownCase)); + } + + /* Upcase the first letter, downcase the rest. */ + int + rl_capitalize_word (count, key) + int count, key; + { + return (rl_change_case (count, CapCase)); + } + + /* The meaty function. + Change the case of COUNT words, performing OP on them. + OP is one of UpCase, DownCase, or CapCase. + If a negative argument is given, leave point where it started, + otherwise, leave it where it moves to. */ + static int + rl_change_case (count, op) + int count, op; + { + register int start, end; + int inword, c; + + start = rl_point; + rl_forward_word (count, 0); + end = rl_point; + + if (count < 0) + SWAP (start, end); + + /* We are going to modify some text, so let's prepare to undo it. */ + rl_modifying (start, end); + + for (inword = 0; start < end; start++) + { + c = rl_line_buffer[start]; + switch (op) + { + case UpCase: + rl_line_buffer[start] = _rl_to_upper (c); + break; + + case DownCase: + rl_line_buffer[start] = _rl_to_lower (c); + break; + + case CapCase: + rl_line_buffer[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c); + inword = rl_alphabetic (rl_line_buffer[start]); + break; + + default: + rl_ding (); + return -1; + } + } + rl_point = end; + return 0; + } + + /* **************************************************************** */ + /* */ + /* Transposition */ + /* */ + /* **************************************************************** */ + + /* Transpose the words at point. If point is at the end of the line, + transpose the two words before point. */ + int + rl_transpose_words (count, key) + int count, key; + { + char *word1, *word2; + int w1_beg, w1_end, w2_beg, w2_end; + int orig_point = rl_point; + + if (!count) + return 0; + + /* Find the two words. */ + rl_forward_word (count, key); + w2_end = rl_point; + rl_backward_word (1, key); + w2_beg = rl_point; + rl_backward_word (count, key); + w1_beg = rl_point; + rl_forward_word (1, key); + w1_end = rl_point; + + /* Do some check to make sure that there really are two words. */ + if ((w1_beg == w2_beg) || (w2_beg < w1_end)) + { + rl_ding (); + rl_point = orig_point; + return -1; + } + + /* Get the text of the words. */ + word1 = rl_copy_text (w1_beg, w1_end); + word2 = rl_copy_text (w2_beg, w2_end); + + /* We are about to do many insertions and deletions. Remember them + as one operation. */ + rl_begin_undo_group (); + + /* Do the stuff at word2 first, so that we don't have to worry + about word1 moving. */ + rl_point = w2_beg; + rl_delete_text (w2_beg, w2_end); + rl_insert_text (word1); + + rl_point = w1_beg; + rl_delete_text (w1_beg, w1_end); + rl_insert_text (word2); + + /* This is exactly correct since the text before this point has not + changed in length. */ + rl_point = w2_end; + + /* I think that does it. */ + rl_end_undo_group (); + free (word1); + free (word2); + + return 0; + } + + /* Transpose the characters at point. If point is at the end of the line, + then transpose the characters before point. */ + int + rl_transpose_chars (count, key) + int count, key; + { + #if defined (HANDLE_MULTIBYTE) + char *dummy; + int i, prev_point; + #else + char dummy[2]; + #endif + int char_length; + + if (count == 0) + return 0; + + if (!rl_point || rl_end < 2) + { + rl_ding (); + return -1; + } + + rl_begin_undo_group (); + + if (rl_point == rl_end) + { + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else + --rl_point; + count = 1; + } + + #if defined (HANDLE_MULTIBYTE) + prev_point = rl_point; + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); + else + #endif + rl_point--; + + #if defined (HANDLE_MULTIBYTE) + char_length = prev_point - rl_point; + dummy = (char *)xmalloc (char_length + 1); + for (i = 0; i < char_length; i++) + dummy[i] = rl_line_buffer[rl_point + i]; + dummy[i] = '\0'; + #else + dummy[0] = rl_line_buffer[rl_point]; + dummy[char_length = 1] = '\0'; + #endif + + rl_delete_text (rl_point, rl_point + char_length); + + rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); + + _rl_fix_point (0); + rl_insert_text (dummy); + rl_end_undo_group (); + + #if defined (HANDLE_MULTIBYTE) + free (dummy); + #endif + + return 0; + } + + /* **************************************************************** */ + /* */ + /* Character Searching */ + /* */ + /* **************************************************************** */ + + int + #if defined (HANDLE_MULTIBYTE) + _rl_char_search_internal (count, dir, smbchar, len) + int count, dir; + char *smbchar; + int len; + #else + _rl_char_search_internal (count, dir, schar) + int count, dir, schar; + #endif + { + int pos, inc; + #if defined (HANDLE_MULTIBYTE) + int prepos; + #endif + + pos = rl_point; + inc = (dir < 0) ? -1 : 1; + while (count) + { + if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end)) + { + rl_ding (); + return -1; + } + + #if defined (HANDLE_MULTIBYTE) + pos = (inc > 0) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) + : _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); + #else + pos += inc; + #endif + do + { + #if defined (HANDLE_MULTIBYTE) + if (_rl_is_mbchar_matched (rl_line_buffer, pos, rl_end, smbchar, len)) + #else + if (rl_line_buffer[pos] == schar) + #endif + { + count--; + if (dir < 0) + rl_point = (dir == BTO) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY) + : pos; + else + rl_point = (dir == FTO) ? _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY) + : pos; + break; + } + #if defined (HANDLE_MULTIBYTE) + prepos = pos; + #endif + } + #if defined (HANDLE_MULTIBYTE) + while ((dir < 0) ? (pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY)) != prepos + : (pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY)) != prepos); + #else + while ((dir < 0) ? pos-- : ++pos < rl_end); + #endif + } + return (0); + } + + /* Search COUNT times for a character read from the current input stream. + FDIR is the direction to search if COUNT is non-negative; otherwise + the search goes in BDIR. So much is dependent on HANDLE_MULTIBYTE + that there are two separate versions of this function. */ + #if defined (HANDLE_MULTIBYTE) + static int + _rl_char_search (count, fdir, bdir) + int count, fdir, bdir; + { + char mbchar[MB_LEN_MAX]; + int mb_len; + + mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX); + + if (count < 0) + return (_rl_char_search_internal (-count, bdir, mbchar, mb_len)); + else + return (_rl_char_search_internal (count, fdir, mbchar, mb_len)); + } + #else /* !HANDLE_MULTIBYTE */ + static int + _rl_char_search (count, fdir, bdir) + int count, fdir, bdir; + { + int c; + + RL_SETSTATE(RL_STATE_MOREINPUT); + c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + + if (count < 0) + return (_rl_char_search_internal (-count, bdir, c)); + else + return (_rl_char_search_internal (count, fdir, c)); + } + #endif /* !HANDLE_MULTIBYTE */ + + int + rl_char_search (count, key) + int count, key; + { + return (_rl_char_search (count, FFIND, BFIND)); + } + + int + rl_backward_char_search (count, key) + int count, key; + { + return (_rl_char_search (count, BFIND, FFIND)); + } + + /* **************************************************************** */ + /* */ + /* The Mark and the Region. */ + /* */ + /* **************************************************************** */ + + /* Set the mark at POSITION. */ + int + _rl_set_mark_at_pos (position) + int position; + { + if (position > rl_end) + return -1; + + rl_mark = position; + return 0; + } + + /* A bindable command to set the mark. */ + int + rl_set_mark (count, key) + int count, key; + { + return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point)); + } + + /* Exchange the position of mark and point. */ + int + rl_exchange_point_and_mark (count, key) + int count, key; + { + if (rl_mark > rl_end) + rl_mark = -1; + + if (rl_mark == -1) + { + rl_ding (); + return -1; + } + else + SWAP (rl_point, rl_mark); + + return 0; + } diff -Nrc2 readline-4.2a/tilde.c readline-4.3/tilde.c *** readline-4.2a/tilde.c Wed Aug 22 09:35:59 2001 --- readline-4.3/tilde.c Tue Mar 12 11:29:36 2002 *************** *** 60,66 **** #if !defined (savestring) - # ifndef strcpy - extern char *strcpy (); - # endif #define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x)) #endif /* !savestring */ --- 60,63 ---- diff -Nrc2 readline-4.2a/tilde.h readline-4.3/tilde.h *** readline-4.2a/tilde.h Wed Aug 22 09:36:06 2001 --- readline-4.3/tilde.h Thu Dec 20 14:15:22 2001 *************** *** 25,32 **** # define _TILDE_H_ - #if defined (HAVE_CONFIG_H) - # include - #endif - #ifdef __cplusplus extern "C" { --- 25,28 ---- diff -Nrc2 readline-4.2a/undo.c readline-4.3/undo.c *** readline-4.2a/undo.c Tue Aug 28 08:53:32 2001 --- readline-4.3/undo.c Tue Nov 27 12:30:40 2001 *************** *** 51,56 **** #include "xmalloc.h" - #define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) - /* Non-zero tells rl_delete_text and rl_insert_text to not add to the undo list. */ --- 51,54 ---- diff -Nrc2 readline-4.2a/util.c readline-4.3/util.c *** readline-4.2a/util.c Mon Oct 29 10:23:36 2001 --- readline-4.3/util.c Wed Mar 13 16:45:43 2002 *************** *** 56,61 **** #include "xmalloc.h" - #define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0) - /* **************************************************************** */ /* */ --- 56,59 ---- *************** *** 90,94 **** rl_clear_pending_input (); ! _rl_defining_kbd_macro = 0; while (rl_executing_macro) _rl_pop_executing_macro (); --- 88,92 ---- rl_clear_pending_input (); ! RL_UNSETSTATE (RL_STATE_MACRODEF); while (rl_executing_macro) _rl_pop_executing_macro (); *************** *** 234,237 **** --- 232,241 ---- { register const char *scan; + #if defined (HANDLE_MULTIBYTE) + mbstate_t ps; + register int i, v; + + memset (&ps, 0, sizeof (mbstate_t)); + #endif for (; *string1; string1++) *************** *** 242,245 **** --- 246,257 ---- return ((char *)string1); } + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + { + v = _rl_get_char_len (string1, &ps); + if (v > 1) + string += v - 1; /* -1 to account for auto-increment in loop */ + } + #endif } return ((char *)NULL); diff -Nrc2 readline-4.2a/vi_keymap.c readline-4.3/vi_keymap.c *** readline-4.2a/vi_keymap.c Mon Oct 30 11:55:52 2000 --- readline-4.3/vi_keymap.c Thu Nov 29 12:05:36 2001 *************** *** 42,46 **** { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ ! { ISFUNC, rl_backward }, /* Control-h */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ --- 42,46 ---- { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */ { ISFUNC, rl_abort }, /* Control-g */ ! { ISFUNC, rl_backward_char }, /* Control-h */ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */ { ISFUNC, rl_newline }, /* Control-j */ *************** *** 69,73 **** /* The start of printing characters. */ ! { ISFUNC, rl_forward }, /* SPACE */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ --- 69,73 ---- /* The start of printing characters. */ ! { ISFUNC, rl_forward_char }, /* SPACE */ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */ *************** *** 151,159 **** { ISFUNC, rl_vi_char_search }, /* f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ ! { ISFUNC, rl_backward }, /* h */ { ISFUNC, rl_vi_insertion_mode }, /* i */ { ISFUNC, rl_get_next_history }, /* j */ { ISFUNC, rl_get_previous_history }, /* k */ ! { ISFUNC, rl_forward }, /* l */ { ISFUNC, rl_vi_set_mark }, /* m */ { ISFUNC, rl_vi_search_again }, /* n */ --- 151,159 ---- { ISFUNC, rl_vi_char_search }, /* f */ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */ ! { ISFUNC, rl_backward_char }, /* h */ { ISFUNC, rl_vi_insertion_mode }, /* i */ { ISFUNC, rl_get_next_history }, /* j */ { ISFUNC, rl_get_previous_history }, /* k */ ! { ISFUNC, rl_forward_char }, /* l */ { ISFUNC, rl_vi_set_mark }, /* m */ { ISFUNC, rl_vi_search_again }, /* n */ diff -Nrc2 readline-4.2a/vi_mode.c readline-4.3/vi_mode.c *** readline-4.2a/vi_mode.c Wed Nov 7 08:43:05 2001 --- readline-4.3/vi_mode.c Thu May 23 13:27:58 2002 *************** *** 52,55 **** --- 52,57 ---- /* Some standard library routines. */ #include "rldefs.h" + #include "rlmbutil.h" + #include "readline.h" #include "history.h" *************** *** 62,69 **** #endif - #ifndef exchange - #define exchange(x, y) do {int temp = x; x = y; y = temp;} while (0) - #endif - /* Non-zero means enter insertion mode. */ static int _rl_vi_doing_insert; --- 64,67 ---- *************** *** 90,94 **** --- 88,96 ---- static int _rl_vi_last_arg_sign = 1; static int _rl_vi_last_motion; + #if defined (HANDLE_MULTIBYTE) + static char _rl_vi_last_search_mbchar[MB_LEN_MAX]; + #else static int _rl_vi_last_search_char; + #endif static int _rl_vi_last_replacement; *************** *** 159,162 **** --- 161,166 ---- int count, c; { + int r; + if (!rl_explicit_arg) { *************** *** 165,168 **** --- 169,173 ---- } + r = 0; vi_redoing = 1; /* If we're redoing an insert with `i', stuff in the inserted text *************** *** 176,183 **** } else ! _rl_dispatch (_rl_vi_last_command, _rl_keymap); vi_redoing = 0; ! return (0); } --- 181,188 ---- } else ! r = _rl_dispatch (_rl_vi_last_command, _rl_keymap); vi_redoing = 0; ! return (r); } *************** *** 548,552 **** { if (rl_point < rl_end) ! rl_point++; rl_vi_insertion_mode (1, key); return (0); --- 553,567 ---- { if (rl_point < rl_end) ! { ! if (MB_CUR_MAX == 1 || rl_byte_oriented) ! rl_point++; ! else ! { ! int point = rl_point; ! rl_forward_char (1, key); ! if (point == rl_point) ! rl_point = rl_end; ! } ! } rl_vi_insertion_mode (1, key); return (0); *************** *** 613,616 **** --- 628,632 ---- if (_rl_vi_doing_insert) { + /* The `C', `s', and `S' commands set this. */ rl_end_undo_group (); /* Now, the text between rl_undo_list->next->start and *************** *** 641,645 **** { if (rl_point > 0) ! rl_backward (1, key); _rl_keymap = vi_movement_keymap; --- 657,661 ---- { if (rl_point > 0) ! rl_backward_char (1, key); _rl_keymap = vi_movement_keymap; *************** *** 658,661 **** --- 674,722 ---- } + /* Change the case of the next COUNT characters. */ + #if defined (HANDLE_MULTIBYTE) + static int + _rl_vi_change_mbchar_case (count) + int count; + { + wchar_t wc; + char mb[MB_LEN_MAX]; + mbstate_t ps; + + memset (&ps, 0, sizeof (mbstate_t)); + if (_rl_adjust_point (rl_line_buffer, rl_point, &ps) > 0) + count--; + while (count-- && rl_point < rl_end) + { + mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps); + if (iswupper (wc)) + wc = towlower (wc); + else if (iswlower (wc)) + wc = towupper (wc); + else + { + /* Just skip over chars neither upper nor lower case */ + rl_forward_char (1, 0); + continue; + } + + /* Vi is kind of strange here. */ + if (wc) + { + wctomb (mb, wc); + rl_begin_undo_group (); + rl_delete (1, 0); + rl_insert_text (mb); + rl_end_undo_group (); + rl_vi_check (); + } + else + rl_forward_char (1, 0); + } + + return 0; + } + #endif + int rl_vi_change_case (count, ignore) *************** *** 668,671 **** --- 729,737 ---- return (0); + #if defined (HANDLE_MULTIBYTE) + if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) + return (_rl_vi_change_mbchar_case (count)); + #endif + while (count-- && rl_point < rl_end) { *************** *** 677,681 **** { /* Just skip over characters neither upper nor lower case. */ ! rl_forward (1, c); continue; } --- 743,747 ---- { /* Just skip over characters neither upper nor lower case. */ ! rl_forward_char (1, c); continue; } *************** *** 686,695 **** rl_begin_undo_group (); rl_delete (1, c); ! rl_insert (1, c); rl_end_undo_group (); rl_vi_check (); } else ! rl_forward (1, c); } return (0); --- 752,761 ---- rl_begin_undo_group (); rl_delete (1, c); ! _rl_insert_char (1, c); rl_end_undo_group (); rl_vi_check (); } else ! rl_forward_char (1, c); } return (0); *************** *** 701,708 **** { if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end)) ! rl_point++; rl_yank (1, key); ! rl_backward (1, key); return (0); } --- 767,774 ---- { if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end)) ! rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO); rl_yank (1, key); ! rl_backward_char (1, key); return (0); } *************** *** 712,716 **** { if (rl_point && rl_point == rl_end) ! rl_point--; return (0); } --- 778,787 ---- { if (rl_point && rl_point == rl_end) ! { ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO); ! else ! rl_point--; ! } return (0); } *************** *** 814,818 **** if (rl_mark < rl_point) ! exchange (rl_point, rl_mark); return (0); --- 885,889 ---- if (rl_mark < rl_point) ! SWAP (rl_point, rl_mark); return (0); *************** *** 992,996 **** } ! end = rl_point + count; if (end >= rl_end) --- 1063,1070 ---- } ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! end = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO); ! else ! end = rl_point + count; if (end >= rl_end) *************** *** 1000,1004 **** if (rl_point > 0 && rl_point == rl_end) ! rl_backward (1, key); return (0); } --- 1074,1078 ---- if (rl_point > 0 && rl_point == rl_end) ! rl_backward_char (1, key); return (0); } *************** *** 1025,1029 **** --- 1099,1108 ---- int count, key; { + #if defined (HANDLE_MULTIBYTE) + static char *target; + static int mb_len; + #else static char target; + #endif static int orig_dir, dir; *************** *** 1033,1042 **** --- 1112,1130 ---- { if (vi_redoing) + #if defined (HANDLE_MULTIBYTE) + target = _rl_vi_last_search_mbchar; + #else target = _rl_vi_last_search_char; + #endif else { + #if defined (HANDLE_MULTIBYTE) + mb_len = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX); + target = _rl_vi_last_search_mbchar; + #else RL_SETSTATE(RL_STATE_MOREINPUT); _rl_vi_last_search_char = target = rl_read_key (); RL_UNSETSTATE(RL_STATE_MOREINPUT); + #endif } *************** *** 1061,1065 **** --- 1149,1157 ---- } + #if defined (HANDLE_MULTIBYTE) + return (_rl_char_search_internal (count, dir, target, mb_len)); + #else return (_rl_char_search_internal (count, dir, target)); + #endif } *************** *** 1069,1080 **** int ignore, key; { ! int count = 1, brack, pos; pos = rl_point; if ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) { ! while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 && ! rl_point < rl_end - 1) ! rl_forward (1, key); if (brack <= 0) --- 1161,1183 ---- int ignore, key; { ! int count = 1, brack, pos, tmp, pre; pos = rl_point; if ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) { ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! { ! while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0) ! { ! pre = rl_point; ! rl_forward_char (1, key); ! if (pre == rl_point) ! break; ! } ! } ! else ! while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 && ! rl_point < rl_end - 1) ! rl_forward_char (1, key); if (brack <= 0) *************** *** 1092,1096 **** while (count) { ! if (--pos >= 0) { int b = rl_vi_bracktype (rl_line_buffer[pos]); --- 1195,1208 ---- while (count) { ! tmp = pos; ! if (MB_CUR_MAX == 1 || rl_byte_oriented) ! pos--; ! else ! { ! pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY); ! if (tmp == pos) ! pos--; ! } ! if (pos >= 0) { int b = rl_vi_bracktype (rl_line_buffer[pos]); *************** *** 1111,1115 **** while (count) { ! if (++pos < rl_end) { int b = rl_vi_bracktype (rl_line_buffer[pos]); --- 1223,1232 ---- while (count) { ! if (MB_CUR_MAX == 1 || rl_byte_oriented) ! pos++; ! else ! pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY); ! ! if (pos < rl_end) { int b = rl_vi_bracktype (rl_line_buffer[pos]); *************** *** 1146,1149 **** --- 1263,1271 ---- } + /* XXX - think about reading an entire mbchar with _rl_read_mbchar and + inserting it in one bunch instead of the loop below (like in + rl_vi_char_search or _rl_vi_change_mbchar_case. Set c to mbchar[0] + for test against 033 or ^C. Make sure that _rl_read_mbchar does + this right. */ int rl_vi_change_char (count, key) *************** *** 1169,1175 **** rl_delete (1, c); ! rl_insert (1, c); if (count == 0) ! rl_backward (1, c); rl_end_undo_group (); --- 1291,1307 ---- rl_delete (1, c); ! #if defined (HANDLE_MULTIBYTE) ! if (MB_CUR_MAX > 1 && rl_byte_oriented == 0) ! while (_rl_insert_char (1, c)) ! { ! RL_SETSTATE (RL_STATE_MOREINPUT); ! c = rl_read_key (); ! RL_UNSETSTATE (RL_STATE_MOREINPUT); ! } ! else ! #endif ! _rl_insert_char (1, c); if (count == 0) ! rl_backward_char (1, c); rl_end_undo_group (); *************** *** 1182,1216 **** int count, key; { ! rl_begin_undo_group (); ! ! if (_rl_uppercase_p (key)) ! { ! rl_beg_of_line (1, key); ! rl_kill_line (1, key); ! } ! else ! rl_delete_text (rl_point, rl_point+count); ! ! rl_end_undo_group (); ! ! _rl_vi_set_last (key, count, rl_arg_sign); ! ! if (vi_redoing) ! { ! int o = _rl_doing_an_undo; ! ! _rl_doing_an_undo = 1; ! if (vi_insert_buffer && *vi_insert_buffer) ! rl_insert_text (vi_insert_buffer); ! _rl_doing_an_undo = o; ! } ! else ! { ! rl_begin_undo_group (); ! _rl_vi_doing_insert = 1; ! rl_vi_insertion_mode (1, key); ! } ! return (0); } --- 1314,1322 ---- int count, key; { ! /* If we are redoing, rl_vi_change_to will stuff the last motion char */ ! if (vi_redoing == 0) ! rl_stuff_char ((key == 'S') ? 'c' : ' '); /* `S' == `cc', `s' == `c ' */ ! return (rl_vi_change_to (count, 'c')); } *************** *** 1219,1224 **** int count, key; { - int i; - if (_rl_vi_doing_insert == 0) { --- 1325,1328 ---- *************** *** 1227,1245 **** } ! for (i = 0; i < count; i++) { ! vi_replace_count++; ! rl_begin_undo_group (); ! ! if (rl_point < rl_end) ! { ! rl_delete (1, key); ! rl_insert (1, key); ! } ! else ! rl_insert (1, key); ! ! rl_end_undo_group (); } return (0); } --- 1331,1340 ---- } ! if (count > 0) { ! _rl_overwrite_char (count, key); ! vi_replace_count += count; } + return (0); } *************** *** 1264,1268 **** if (rl_point == s) ! rl_backward (1, key); } --- 1359,1363 ---- if (rl_point == s) ! rl_backward_char (1, key); }