diff -Nrc2 readline-4.1/CHANGELOG readline-4.2/CHANGELOG *** readline-4.1/CHANGELOG Fri Feb 4 12:30:39 2000 --- readline-4.2/CHANGELOG Fri Apr 6 15:15:12 2001 *************** *** 338,339 **** --- 338,465 ---- configure.in - changed LIBVERSION to 4.1-beta5 + + 3/17/2000 + --------- + [readline-4.1 released] + + 3/23 + ---- + Makefile.in + - remove the `-t' argument to ranlib in the install recipe; some + ranlibs don't have it and attempt to create a file named `-t' + + 3/27 + ---- + support/shlib-install + - install shared libraries unwritable by anyone on HP-UX + - changed symlinks to relative pathnames on all platforms + + shlib/Makefile.in + - added missing `includedir' assignment, substituted by configure + + Makefile.in + - added missing @SET_MAKE@ so configure can set $MAKE appropriately + + configure.in + - add call to AC_PROG_MAKE_SET + + 8/30 + ---- + shlib/Makefile.in + - change the soname bound into the shared libraries, so it includes + only the major version number. If it includes the minor version, + programs depending on it must be rebuilt (which may or may not be + a bad thing) + + 9/6 + --- + examples/rlfe.c + - add -l option to log input and output (-a option appends to logfile) + - add -n option to set readline application name + - add -v, -h options for version and help information + - change a few things because getopt() is now used to parse arguments + + 9/12 + ---- + support/shlib-install + - fix up the libname on HPUX 11 + + 10/18 + ----- + configure.in + - changed library version to 4.2-alpha + + 10/30 + ----- + configure.in + - add -fsigned-char to LOCAL_CFLAGS for Linux running on the IBM + S/390 + + Makefile.in + - added new file, rltypedefs.h, installed by default with `make install' + + 11/2 + ---- + compat.c + - new file, with backwards-compatibility function definitions + + Makefile.in,shlib/Makefile.in + - make sure that compat.o/compat.so are built and linked apppropriately + + support/shobj-conf + - picked up bash version, which means that shared libs built on + linux and BSD/OS 4.x will have an soname that does not include + the minor version number + + 11/13 + ----- + examples/rlfe.c + - rlfe can perform filename completion for relative pathnames in the + inferior process's context if the OS supports /proc/PID/cwd (linux + does it OK, Solaris is slightly warped, none of the BSDs have it) + + 11/17/2000 + ---------- + [readline-4.2-alpha released] + + 11/27 + ----- + Makefile.in,shlib/Makefile.in + - added dependencies for rltypedefs.h + + shlib/Makefile.in + - changed dependencies on histlib.h to $(topdir)/histlib.h + + 1/22 + ---- + configure.in + - changed release version to 4.2-beta + + 2/2 + --- + examples/Makefile.in + - build histexamp as part of the examples + + 2/5 + --- + doc/Makefile.in + - don't remove the dvi, postscript, html, info, and text `objects' + on a `make distclean', only on a `make maintainer-clean' + + 3/6 + --- + doc/history.{0,3}, doc/history_3.ps + - new manual page for history library + + doc/Makefile.in + - rules to install and uninstall history.3 in ${man3dir} + - rules to build history.0 and history_3.ps + + 4/2 + --- + configure.in + - changed LIBVERSION to `4.2' + + 4/5 + --- + [readline-4.2 frozen] diff -Nrc2 readline-4.1/CHANGES readline-4.2/CHANGES *** readline-4.1/CHANGES Wed Sep 22 12:07:50 1999 --- readline-4.2/CHANGES Tue Apr 3 10:34:07 2001 *************** *** 1,2 **** --- 1,155 ---- + This document details the changes between this version, readline-4.2, + and the previous version, readline-4.1. + + 1. Changes to Readline + + a. When setting the terminal attributes on systems using `struct termio', + readline waits for output to drain before changing the attributes. + + b. A fix was made to the history word tokenization code to avoid attempts to + dereference a null pointer. + + c. Readline now defaults rl_terminal_name to $TERM if the calling application + has left it unset, and tries to initialize with the resultant value. + + d. Instead of calling (*rl_getc_function)() directly to get input in certain + places, readline now calls rl_read_key() consistently. + + e. Fixed a bug in the completion code that allowed a backslash to quote a + single quote inside a single-quoted string. + + f. rl_prompt is no longer assigned directly from the argument to readline(), + but uses memory allocated by readline. This allows constant strings to + be passed to readline without problems arising when the prompt processing + code wants to modify the string. + + g. Fixed a bug that caused non-interactive history searches to return the + wrong line when performing multiple searches backward for the same string. + + h. Many variables, function arguments, and function return values are now + declared `const' where appropriate, to improve behavior when linking with + C++ code. + + i. The control character detection code now works better on systems where + `char' is unsigned by default. + + j. The vi-mode numeric argument is now capped at 999999, just like emacs mode. + + k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been + replaced with a set of specific prototyped typedefs, though they are + still in the readline header files for backwards compatibility. + + m. Nearly all of the (undocumented) internal global variables in the library + now have an _rl_ prefix -- there were a number that did not, like + screenheight, screenwidth, alphabetic, etc. + + n. The ding() convenience function has been renamed to rl_ding(), though the + old function is still defined for backwards compatibility. + + o. The completion convenience functions filename_completion_function, + username_completion_function, and completion_matches now have an rl_ + prefix, though the old names are still defined for backwards compatibility. + + p. The functions shared by readline and bash (linkage is satisfied from bash + when compiling with bash, and internally otherwise) now have an sh_ prefix. + + q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so + that the `soname' contains only the major version number rather than the + major and minor numbers. + + r. Fixed a redisplay bug that occurred when the prompt spanned more than one + physical line and contained invisible characters. + + s. Added a missing `includedir' variable to the Makefile. + + t. When installing the shared libraries, make sure symbolic links are relative. + + u. Added configure test so that it can set `${MAKE}' appropriately. + + v. Fixed a bug in rl_forward that could cause the point to be set to before + the beginning of the line in vi mode. + + w. Fixed a bug in the callback read-char interface to make it work when a + readline function pushes some input onto the input stream with + rl_execute_next (like the incremental search functions). + + x. Fixed a file descriptor leak in the history file manipulation code that + was tripped when attempting to truncate a non-regular file (like + /dev/null). + + y. Changes to make all of the exported readline functions declared in + readline.h have an rl_ prefix (rltty_set_default_bindings is now + rl_tty_set_default_bindings, crlf is now rl_crlf, etc.) + + z. The formatted documentation included in the base readline distribution + is no longer removed on a `make distclean'. + + aa. Some changes were made to avoid gcc warnings with -Wall. + + bb. rl_get_keymap_by_name now finds keymaps case-insensitively, so + `set keymap EMACS' works. + + cc. The history file writing and truncation functions now return a useful + status on error. + + dd. Fixed a bug that could cause applications to dereference a NULL pointer + if a NULL second argument was passed to history_expand(). + + ee. If a hook function assigned to rl_event_hook sets rl_done to a non-zero + value, rl_read_key() now immediately returns '\n' (which is assumed to + be bound to accept-line). + + 2. New Features in Readline + + a. The blink timeout for paren matching is now settable by applications, + via the rl_set_paren_blink_timeout() function. + + b. _rl_executing_macro has been renamed to rl_executing_macro, which means + it's now part of the public interface. + + c. Readline has a new variable, rl_readline_state, which is a bitmap that + encapsulates the current state of the library; intended for use by + callbacks and hook functions. + + d. rlfe has a new -l option to log input and output (-a appends to logfile), + a new -n option to set the readline application name, and -v and -h + options for version and help information. + + e. rlfe can now perform filename completion for the inferior process if the + OS has a /proc//cwd that can be read with readlink(2) to get the + inferior's current working directory. + + f. A new file, rltypedefs.h, contains the new typedefs for function pointers + and is installed by `make install'. + + g. New application-callable function rl_set_prompt(const char *prompt): + expands its prompt string argument and sets rl_prompt to the result. + + h. New application-callable function rl_set_screen_size(int rows, int cols): + public method for applications to set readline's idea of the screen + dimensions. + + i. The history example program (examples/histexamp.c) is now built as one + of the examples. + + j. The documentation has been updated to cover nearly all of the public + functions and variables declared in readline.h. + + k. New function, rl_get_screen_size (int *rows, int *columns), returns + readline's idea of the screen dimensions. + + l. The timeout in rl_gather_tyi (readline keyboard input polling function) + is now settable via a function (rl_set_keyboard_input_timeout()). + + m. Renamed the max_input_history variable to history_max_entries; the old + variable is maintained for backwards compatibility. + + n. The list of characters that separate words for the history tokenizer is + now settable with a variable: history_word_delimiters. The default + value is as before. + + o. There is a new history.3 manual page documenting the history library. + + ------------------------------------------------------------------------------- This document details the changes between this version, readline-4.1, and the previous version, readline-4.0. diff -Nrc2 readline-4.1/MANIFEST readline-4.2/MANIFEST *** readline-4.1/MANIFEST Mon Sep 13 14:09:41 1999 --- readline-4.2/MANIFEST Mon Mar 5 14:34:36 2001 *************** *** 33,36 **** --- 33,37 ---- rlstdc.h f rltty.h f + rltypedefs.h f rlwinsize.h f tcap.h f *************** *** 38,41 **** --- 39,43 ---- xmalloc.h f bind.c f + compat.c f complete.c f display.c f *************** *** 86,89 **** --- 88,92 ---- doc/hsuser.texinfo f doc/readline.3 f + doc/history.3 f doc/texi2dvi f doc/texi2html f *************** *** 112,113 **** --- 115,119 ---- doc/rluserman.html f doc/readline.0 f + doc/history.0 f + doc/readline_3.ps f + doc/history_3.ps f diff -Nrc2 readline-4.1/Makefile.in readline-4.2/Makefile.in *** readline-4.1/Makefile.in Wed Dec 29 17:02:40 1999 --- readline-4.2/Makefile.in Mon Nov 27 11:57:09 2000 *************** *** 36,39 **** --- 36,40 ---- MV = mv + @SET_MAKE@ SHELL = @MAKE_SHELL@ *************** *** 66,70 **** INCLUDES = -I. -I$(srcdir) -I$(includedir) ! CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS) .c.o: --- 67,78 ---- INCLUDES = -I. -I$(srcdir) -I$(includedir) ! XCCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) ! CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS) ! ! # could add -Werror here ! GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \ ! -Wwrite-strings -Wstrict-prototypes \ ! -Wmissing-prototypes -Wno-implicit ! GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@ .c.o: *************** *** 86,95 **** $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \ $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ ! $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/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 rlstdc.h xmalloc.h rlprivate.h rlshell.h HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o --- 94,105 ---- $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \ $(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. 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 rlstdc.h xmalloc.h rlprivate.h rlshell.h \ ! rltypedefs.h HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o *************** *** 98,102 **** 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 xmalloc.o $(HISTOBJ) $(TILDEOBJ) # The texinfo files which document this library. --- 108,112 ---- 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. *************** *** 112,116 **** INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \ ! rlstdc.h rlconf.h ########################################################################## --- 122,126 ---- INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \ ! rlstdc.h rlconf.h rltypedefs.h ########################################################################## *************** *** 135,138 **** --- 145,151 ---- $(CC) $(CCFLAGS) -o $@ ./examples/rl.c ./libreadline.a ${TERMCAP_LIB} + lint: force + $(MAKE) $(MFLAGS) CCFLAGS='$(GCC_LINT_CFLAGS)' static + Makefile makefile: config.status $(srcdir)/Makefile.in CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status *************** *** 184,191 **** -$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a ! -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libreadline.a -$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a ! -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/libhistory.a -( if test -d doc ; then \ cd doc && \ --- 197,204 ---- -$(MV) $(libdir)/libreadline.a $(libdir)/libreadline.old $(INSTALL_DATA) libreadline.a $(libdir)/libreadline.a ! -test -n "$(RANLIB)" && $(RANLIB) $(libdir)/libreadline.a -$(MV) $(libdir)/libhistory.a $(libdir)/libhistory.old $(INSTALL_DATA) libhistory.a $(libdir)/libhistory.a ! -test -n "$(RANLIB)" && $(RANLIB) $(libdir)/libhistory.a -( if test -d doc ; then \ cd doc && \ *************** *** 254,311 **** bind.o: ansi_stdlib.h posixstat.h bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! bind.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h bind.o: history.h callback.o: rlconf.h callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! callback.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h complete.o: ansi_stdlib.h posixdir.h posixstat.h complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! complete.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h display.o: ansi_stdlib.h posixstat.h display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h display.o: tcap.h ! display.o: readline.h keymaps.h chardefs.h tilde.h display.o: history.h rlstdc.h ! funmap.o: readline.h keymaps.h chardefs.h tilde.h funmap.o: rlconf.h ansi_stdlib.h rlstdc.h funmap.o: ${BUILD_DIR}/config.h histexpand.o: ansi_stdlib.h ! histexpand.o: history.h histlib.h rlstdc.h histexpand.o: ${BUILD_DIR}/config.h histfile.o: ansi_stdlib.h ! histfile.o: history.h histlib.h rlstdc.h histfile.o: ${BUILD_DIR}/config.h history.o: ansi_stdlib.h ! history.o: history.h histlib.h rlstdc.h history.o: ${BUILD_DIR}/config.h histsearch.o: ansi_stdlib.h ! histsearch.o: history.h histlib.h rlstdc.h histsearch.o: ${BUILD_DIR}/config.h input.o: ansi_stdlib.h input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! input.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! isearch.o: readline.h keymaps.h chardefs.h tilde.h isearch.o: ansi_stdlib.h history.h rlstdc.h keymaps.o: emacs_keymap.c vi_keymap.c ! keymaps.o: keymaps.h chardefs.h rlconf.h ansi_stdlib.h ! keymaps.o: readline.h keymaps.h chardefs.h tilde.h keymaps.o: ${BUILD_DIR}/config.h rlstdc.h kill.o: ansi_stdlib.h kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! kill.o: readline.h keymaps.h chardefs.h tilde.h kill.o: history.h rlstdc.h macro.o: ansi_stdlib.h macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! macro.o: readline.h keymaps.h chardefs.h tilde.h macro.o: history.h rlstdc.h nls.o: ansi_stdlib.h nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! nls.o: readline.h keymaps.h chardefs.h tilde.h nls.o: history.h rlstdc.h parens.o: rlconf.h parens.o: ${BUILD_DIR}/config.h ! parens.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h ! readline.o: readline.h keymaps.h chardefs.h tilde.h readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h readline.o: history.h rlstdc.h --- 267,325 ---- bind.o: ansi_stdlib.h posixstat.h bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h bind.o: history.h callback.o: rlconf.h callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h ! compat.o: rlstdc.h complete.o: ansi_stdlib.h posixdir.h posixstat.h complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h display.o: ansi_stdlib.h posixstat.h display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h display.o: tcap.h ! display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h display.o: history.h rlstdc.h ! funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h funmap.o: rlconf.h ansi_stdlib.h rlstdc.h funmap.o: ${BUILD_DIR}/config.h histexpand.o: ansi_stdlib.h ! histexpand.o: history.h histlib.h rlstdc.h rltypedefs.h histexpand.o: ${BUILD_DIR}/config.h histfile.o: ansi_stdlib.h ! histfile.o: history.h histlib.h rlstdc.h rltypedefs.h histfile.o: ${BUILD_DIR}/config.h history.o: ansi_stdlib.h ! history.o: history.h histlib.h rlstdc.h rltypedefs.h history.o: ${BUILD_DIR}/config.h histsearch.o: ansi_stdlib.h ! histsearch.o: history.h histlib.h rlstdc.h rltypedefs.h histsearch.o: ${BUILD_DIR}/config.h input.o: ansi_stdlib.h input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h isearch.o: ansi_stdlib.h history.h rlstdc.h keymaps.o: emacs_keymap.c vi_keymap.c ! keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h ! keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h keymaps.o: ${BUILD_DIR}/config.h rlstdc.h kill.o: ansi_stdlib.h kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h kill.o: history.h rlstdc.h macro.o: ansi_stdlib.h macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h macro.o: history.h rlstdc.h nls.o: ansi_stdlib.h nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h nls.o: history.h rlstdc.h parens.o: rlconf.h parens.o: ${BUILD_DIR}/config.h ! parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h ! readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h readline.o: history.h rlstdc.h *************** *** 313,328 **** rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rltty.o: rltty.h ! rltty.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! search.o: readline.h keymaps.h chardefs.h tilde.h search.o: ansi_stdlib.h history.h rlstdc.h shell.o: ${BUILD_DIR}/config.h shell.o: ansi_stdlib.h signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! signals.o: readline.h keymaps.h chardefs.h tilde.h signals.o: history.h rlstdc.h terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h terminal.o: tcap.h ! terminal.o: readline.h keymaps.h chardefs.h tilde.h terminal.o: history.h rlstdc.h tilde.o: ansi_stdlib.h --- 327,342 ---- rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rltty.o: rltty.h ! rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h search.o: ansi_stdlib.h history.h rlstdc.h shell.o: ${BUILD_DIR}/config.h shell.o: ansi_stdlib.h signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h signals.o: history.h rlstdc.h terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h terminal.o: tcap.h ! terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h terminal.o: history.h rlstdc.h tilde.o: ansi_stdlib.h *************** *** 331,341 **** undo.o: ansi_stdlib.h undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! undo.o: readline.h keymaps.h chardefs.h tilde.h undo.o: history.h rlstdc.h util.o: posixjmp.h ansi_stdlib.h util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! util.o: readline.h keymaps.h chardefs.h tilde.h rlstdc.h vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! vi_mode.o: readline.h keymaps.h chardefs.h tilde.h vi_mode.o: history.h ansi_stdlib.h rlstdc.h xmalloc.o: ${BUILD_DIR}/config.h --- 345,355 ---- undo.o: ansi_stdlib.h undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h undo.o: history.h rlstdc.h util.o: posixjmp.h ansi_stdlib.h util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h ! vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h vi_mode.o: history.h ansi_stdlib.h rlstdc.h xmalloc.o: ${BUILD_DIR}/config.h *************** *** 397,400 **** --- 411,415 ---- 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 *************** *** 426,429 **** --- 441,445 ---- search.o: search.c rltty.o: rltty.c + compat.o: compat.c complete.o: complete.c bind.o: bind.c diff -Nrc2 readline-4.1/README readline-4.2/README *** readline-4.1/README Fri Mar 17 16:53:06 2000 --- readline-4.2/README Wed Apr 4 14:32:26 2001 *************** *** 2,6 **** ============ ! This is the Gnu Readline library, version 4.1. The Readline library provides a set of functions for use by applications --- 2,6 ---- ============ ! This is the Gnu Readline library, version 4.2. The Readline library provides a set of functions for use by applications *************** *** 38,41 **** --- 38,44 ---- certain Readline features. + The special make target `everything' will build the static and shared + libraries (if the target platform supports them) and the examples. + Examples ======== *************** *** 65,70 **** a `stanza' for your operating system and compiler. The script uses the value of host_os and ${CC} as determined by configure. For ! instance, FreeBSD 2.2.5 with any version of gcc is identified as ! `freebsd2.2.5-gcc*'. In the stanza for your operating system-compiler pair, you will need to --- 68,73 ---- a `stanza' for your operating system and compiler. The script uses the value of host_os and ${CC} as determined by configure. For ! instance, FreeBSD 4.2 using the ELF object file format with any ! version of gcc is identified as `freebsdelf4.2-gcc*'. In the stanza for your operating system-compiler pair, you will need to *************** *** 145,149 **** When reporting a bug, please include the following information: ! * the version number and release status of Readline (e.g., 4.0-release) * the machine and OS that it is running on * a list of the compilation flags or the contents of `config.h', if --- 148,152 ---- When reporting a bug, please include the following information: ! * the version number and release status of Readline (e.g., 4.2-release) * the machine and OS that it is running on * a list of the compilation flags or the contents of `config.h', if diff -Nrc2 readline-4.1/aclocal.m4 readline-4.2/aclocal.m4 *** readline-4.1/aclocal.m4 Tue Feb 22 11:41:01 2000 --- readline-4.2/aclocal.m4 Tue Nov 21 10:42:10 2000 *************** *** 1066,1080 **** AC_DEFUN(BASH_CHECK_GETPW_FUNCS, ! [AC_MSG_CHECKING(whether programs are able to redeclare getpw functions) ! AC_CACHE_VAL(bash_cv_can_redecl_getpw, ! [AC_TRY_COMPILE([#include #include ! extern struct passwd *getpwent(); ! extern struct passwd *getpwuid(); ! extern struct passwd *getpwnam();], ! [struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root");], ! bash_cv_can_redecl_getpw=yes,bash_cv_can_redecl_getpw=no)]) ! AC_MSG_RESULT($bash_cv_can_redecl_getpw) ! if test $bash_cv_can_redecl_getpw = no; then AC_DEFINE(HAVE_GETPW_DECLS) fi --- 1066,1082 ---- AC_DEFUN(BASH_CHECK_GETPW_FUNCS, ! [AC_MSG_CHECKING(whether getpw functions are declared in pwd.h) ! AC_CACHE_VAL(bash_cv_getpw_declared, ! [AC_EGREP_CPP(getpwuid, ! [ ! #include ! #ifdef HAVE_UNISTD_H ! # include ! #endif #include ! ], ! bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)]) ! AC_MSG_RESULT($bash_cv_getpw_declared) ! if test $bash_cv_getpw_declared = yes; then AC_DEFINE(HAVE_GETPW_DECLS) fi *************** *** 1351,1355 **** AC_DEFUN(BASH_SYS_RESTARTABLE_SYSCALLS, [AC_REQUIRE([BASH_SIGNAL_CHECK]) ! AC_CACHE_CHECK(for restartable system calls with posix sigaction, bash_cv_sys_restartable_syscalls, [AC_TRY_RUN( --- 1353,1357 ---- AC_DEFUN(BASH_SYS_RESTARTABLE_SYSCALLS, [AC_REQUIRE([BASH_SIGNAL_CHECK]) ! AC_CACHE_CHECK(whether posix sigaction restarts system calls by default, bash_cv_sys_restartable_syscalls, [AC_TRY_RUN( *************** *** 1357,1360 **** --- 1359,1365 ---- i.e. the pid of the child, which means that wait was restarted after getting the signal. */ + #ifdef HAVE_UNISTD_H + # include + #endif #include #include *************** *** 1424,1427 **** --- 1429,1463 ---- if test $bash_cv_struct_timeval = yes; then AC_DEFINE(HAVE_TIMEVAL) + fi + ]) + + AC_DEFUN(BASH_CHECK_RTSIGS, + [AC_MSG_CHECKING(for unusable real-time signals due to large values) + AC_CACHE_VAL(bash_cv_unusable_rtsigs, + [AC_TRY_RUN([ + #include + #include + + #ifndef NSIG + # define NSIG 64 + #endif + + main () + { + int n_sigs = 2 * NSIG; + #ifdef SIGRTMIN + int rtmin = SIGRTMIN; + #else + int rtmin = 0; + #endif + + exit(rtmin < n_sigs); + }], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no, + [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes) + bash_cv_unusable_rtsigs=yes] + )]) + AC_MSG_RESULT($bash_cv_unusable_rtsigs) + if test $bash_cv_unusable_rtsigs = yes; then + AC_DEFINE(UNUSABLE_RT_SIGNALS) fi ]) diff -Nrc2 readline-4.1/ansi_stdlib.h readline-4.2/ansi_stdlib.h *** readline-4.1/ansi_stdlib.h Thu Aug 5 07:49:32 1999 --- readline-4.2/ansi_stdlib.h Thu Sep 7 12:07:49 2000 *************** *** 28,31 **** --- 28,34 ---- extern long int atol (); + extern double atof (); + extern double strtod (); + /* Memory allocation functions. */ extern char *malloc (); diff -Nrc2 readline-4.1/bind.c readline-4.2/bind.c *** readline-4.1/bind.c Tue Aug 24 14:19:22 1999 --- readline-4.2/bind.c Mon Mar 5 10:10:07 2001 *************** *** 69,75 **** Keymap rl_binding_keymap; ! static int _rl_read_init_file __P((char *, int)); static int glean_key_from_name __P((char *)); ! static int substring_member_of_array __P((char *, char **)); static int currently_reading_init_file; --- 69,75 ---- Keymap rl_binding_keymap; ! static int _rl_read_init_file __P((const char *, int)); static int glean_key_from_name __P((char *)); ! static int substring_member_of_array __P((char *, const char **)); static int currently_reading_init_file; *************** *** 84,94 **** /* **************************************************************** */ ! /* rl_add_defun (char *name, Function *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ int rl_add_defun (name, function, key) ! char *name; ! Function *function; int key; { --- 84,94 ---- /* **************************************************************** */ ! /* rl_add_defun (char *name, rl_command_func_t *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it. */ int rl_add_defun (name, function, key) ! const char *name; ! rl_command_func_t *function; int key; { *************** *** 103,107 **** rl_bind_key (key, function) int key; ! Function *function; { if (key < 0) --- 103,107 ---- rl_bind_key (key, function) int key; ! rl_command_func_t *function; { if (key < 0) *************** *** 134,138 **** rl_bind_key_in_map (key, function, map) int key; ! Function *function; Keymap map; { --- 134,138 ---- rl_bind_key_in_map (key, function, map) int key; ! rl_command_func_t *function; Keymap map; { *************** *** 153,157 **** int key; { ! return (rl_bind_key (key, (Function *)NULL)); } --- 153,157 ---- int key; { ! return (rl_bind_key (key, (rl_command_func_t *)NULL)); } *************** *** 163,167 **** Keymap map; { ! return (rl_bind_key_in_map (key, (Function *)NULL, map)); } --- 163,167 ---- Keymap map; { ! return (rl_bind_key_in_map (key, (rl_command_func_t *)NULL, map)); } *************** *** 169,173 **** int rl_unbind_function_in_map (func, map) ! Function *func; Keymap map; { --- 169,173 ---- int rl_unbind_function_in_map (func, map) ! rl_command_func_t *func; Keymap map; { *************** *** 178,182 **** if (map[i].type == ISFUNC && map[i].function == func) { ! map[i].function = (Function *)NULL; rval = 1; } --- 178,182 ---- if (map[i].type == ISFUNC && map[i].function == func) { ! map[i].function = (rl_command_func_t *)NULL; rval = 1; } *************** *** 187,194 **** int rl_unbind_command_in_map (command, map) ! char *command; Keymap map; { ! Function *func; func = rl_named_function (command); --- 187,194 ---- int rl_unbind_command_in_map (command, map) ! const char *command; Keymap map; { ! rl_command_func_t *func; func = rl_named_function (command); *************** *** 203,208 **** int rl_set_key (keyseq, function, map) ! char *keyseq; ! Function *function; Keymap map; { --- 203,208 ---- int rl_set_key (keyseq, function, map) ! const char *keyseq; ! rl_command_func_t *function; Keymap map; { *************** *** 215,219 **** int rl_macro_bind (keyseq, macro, map) ! char *keyseq, *macro; Keymap map; { --- 215,219 ---- int rl_macro_bind (keyseq, macro, map) ! const char *keyseq, *macro; Keymap map; { *************** *** 240,244 **** rl_generic_bind (type, keyseq, data, map) int type; ! char *keyseq, *data; Keymap map; { --- 240,245 ---- rl_generic_bind (type, keyseq, data, map) int type; ! const char *keyseq; ! char *data; Keymap map; { *************** *** 310,314 **** int rl_translate_keyseq (seq, array, len) ! char *seq, *array; int *len; { --- 311,316 ---- int rl_translate_keyseq (seq, array, len) ! const char *seq; ! char *array; int *len; { *************** *** 514,520 **** If STRING doesn't have a matching function, then a NULL pointer is returned. */ ! Function * rl_named_function (string) ! char *string; { register int i; --- 516,522 ---- If STRING doesn't have a matching function, then a NULL pointer is returned. */ ! rl_command_func_t * rl_named_function (string) ! const char *string; { register int i; *************** *** 525,529 **** if (_rl_stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); ! return ((Function *)NULL); } --- 527,531 ---- if (_rl_stricmp (funmap[i]->name, string) == 0) return (funmap[i]->function); ! return ((rl_command_func_t *)NULL); } *************** *** 533,539 **** type of the object pointed to. One of ISFUNC (function), ISKMAP (keymap), or ISMACR (macro). */ ! Function * rl_function_of_keyseq (keyseq, map, type) ! char *keyseq; Keymap map; int *type; --- 535,541 ---- type of the object pointed to. One of ISFUNC (function), ISKMAP (keymap), or ISMACR (macro). */ ! rl_command_func_t * rl_function_of_keyseq (keyseq, map, type) ! const char *keyseq; Keymap map; int *type; *************** *** 586,590 **** } } ! return ((Function *) NULL); } --- 588,592 ---- } } ! return ((rl_command_func_t *) NULL); } *************** *** 593,597 **** /* The file we're currently reading key bindings from. */ ! static char *current_readline_init_file; static int current_readline_init_include_level; static int current_readline_init_lineno; --- 595,599 ---- /* The file we're currently reading key bindings from. */ ! static const char *current_readline_init_file; static int current_readline_init_include_level; static int current_readline_init_lineno; *************** *** 660,664 **** { int r; ! r = rl_read_init_file ((char *)NULL); rl_set_keymap_from_edit_mode (); return r; --- 662,666 ---- { int r; ! r = rl_read_init_file ((const char *)NULL); rl_set_keymap_from_edit_mode (); return r; *************** *** 674,678 **** int rl_read_init_file (filename) ! char *filename; { /* Default the filename. */ --- 676,680 ---- int rl_read_init_file (filename) ! const char *filename; { /* Default the filename. */ *************** *** 681,685 **** filename = last_readline_init_file; if (filename == 0) ! filename = get_env_value ("INPUTRC"); if (filename == 0) filename = DEFAULT_INPUTRC; --- 683,687 ---- filename = last_readline_init_file; if (filename == 0) ! filename = sh_get_env_value ("INPUTRC"); if (filename == 0) filename = DEFAULT_INPUTRC; *************** *** 699,703 **** static int _rl_read_init_file (filename, include_level) ! char *filename; int include_level; { --- 701,705 ---- static int _rl_read_init_file (filename, include_level) ! const char *filename; int include_level; { *************** *** 734,738 **** for (i = 0; line + i != end && line[i] != '\n'; i++); ! #if defined (__CYGWIN32__) /* ``Be liberal in what you accept.'' */ if (line[i] == '\n' && line[i-1] == '\r') --- 736,740 ---- for (i = 0; line + i != end && line[i] != '\n'; i++); ! #if defined (__CYGWIN__) /* ``Be liberal in what you accept.'' */ if (line[i] == '\n' && line[i-1] == '\r') *************** *** 781,788 **** /* **************************************************************** */ /* Conditionals. */ /* Calling programs set this to have their argv[0]. */ ! char *rl_readline_name = "other"; /* Stack of previous values of parsing_conditionalized_out. */ --- 783,801 ---- /* **************************************************************** */ + typedef int _rl_parser_func_t __P((char *)); + + /* Things that mean `Control'. */ + const char *_rl_possible_control_prefixes[] = { + "Control-", "C-", "CTRL-", (const char *)NULL + }; + + const char *_rl_possible_meta_prefixes[] = { + "Meta", "M-", (const char *)NULL + }; + /* Conditionals. */ /* Calling programs set this to have their argv[0]. */ ! const char *rl_readline_name = "other"; /* Stack of previous values of parsing_conditionalized_out. */ *************** *** 906,910 **** char *args; { ! char *old_init_file, *e; int old_line_number, old_include_level, r; --- 919,924 ---- char *args; { ! const char *old_init_file; ! char *e; int old_line_number, old_include_level, r; *************** *** 919,923 **** if (e) *e = '\0'; ! r = _rl_read_init_file (args, old_include_level + 1); current_readline_init_file = old_init_file; --- 933,937 ---- if (e) *e = '\0'; ! r = _rl_read_init_file ((const char *)args, old_include_level + 1); current_readline_init_file = old_init_file; *************** *** 930,935 **** /* Associate textual names with actual functions. */ static struct { ! char *name; ! Function *function; } parser_directives [] = { { "if", parser_if }, --- 944,949 ---- /* Associate textual names with actual functions. */ static struct { ! const char *name; ! _rl_parser_func_t *function; } parser_directives [] = { { "if", parser_if }, *************** *** 937,941 **** { "else", parser_else }, { "include", parser_include }, ! { (char *)0x0, (Function *)0x0 } }; --- 951,955 ---- { "else", parser_else }, { "include", parser_include }, ! { (char *)0x0, (_rl_parser_func_t *)0x0 } }; *************** *** 1181,1188 **** /* Add in control and meta bits. */ ! if (substring_member_of_array (string, possible_control_prefixes)) key = CTRL (_rl_to_upper (key)); ! if (substring_member_of_array (string, possible_meta_prefixes)) key = META (key); --- 1195,1202 ---- /* Add in control and meta bits. */ ! if (substring_member_of_array (string, _rl_possible_control_prefixes)) key = CTRL (_rl_to_upper (key)); ! if (substring_member_of_array (string, _rl_possible_meta_prefixes)) key = META (key); *************** *** 1222,1226 **** static struct { ! char *name; int *value; int flags; --- 1236,1240 ---- static struct { ! const char *name; int *value; int flags; *************** *** 1266,1270 **** int i; { ! char *name; name = boolean_varlist[i].name; --- 1280,1284 ---- int i; { ! const char *name; name = boolean_varlist[i].name; *************** *** 1281,1284 **** --- 1295,1300 ---- } + typedef int _rl_sv_func_t __P((const char *)); + /* These *must* correspond to the array indices for the appropriate string variable. (Though they're not used right now.) */ *************** *** 1293,1307 **** /* Forward declarations */ ! static int sv_bell_style __P((char *)); ! static int sv_combegin __P((char *)); ! static int sv_compquery __P((char *)); ! static int sv_editmode __P((char *)); ! static int sv_isrchterm __P((char *)); ! static int sv_keymap __P((char *)); static struct { ! char *name; int flags; ! Function *set_func; } string_varlist[] = { { "bell-style", V_STRING, sv_bell_style }, --- 1309,1323 ---- /* Forward declarations */ ! static int sv_bell_style __P((const char *)); ! static int sv_combegin __P((const char *)); ! static int sv_compquery __P((const char *)); ! static int sv_editmode __P((const char *)); ! static int sv_isrchterm __P((const char *)); ! static int sv_keymap __P((const char *)); static struct { ! const char *name; int flags; ! _rl_sv_func_t *set_func; } string_varlist[] = { { "bell-style", V_STRING, sv_bell_style }, *************** *** 1340,1344 **** int rl_variable_bind (name, value) ! char *name, *value; { register int i; --- 1356,1360 ---- int rl_variable_bind (name, value) ! const char *name, *value; { register int i; *************** *** 1368,1372 **** static int sv_editmode (value) ! char *value; { if (_rl_strnicmp (value, "vi", 2) == 0) --- 1384,1388 ---- static int sv_editmode (value) ! const char *value; { if (_rl_strnicmp (value, "vi", 2) == 0) *************** *** 1389,1393 **** static int sv_combegin (value) ! char *value; { if (value && *value) --- 1405,1409 ---- static int sv_combegin (value) ! const char *value; { if (value && *value) *************** *** 1402,1406 **** static int sv_compquery (value) ! char *value; { int nval = 100; --- 1418,1422 ---- static int sv_compquery (value) ! const char *value; { int nval = 100; *************** *** 1418,1422 **** static int sv_keymap (value) ! char *value; { Keymap kmap; --- 1434,1438 ---- static int sv_keymap (value) ! const char *value; { Keymap kmap; *************** *** 1435,1439 **** static int sv_bell_style (value) ! char *value; { if (value == 0 || *value == '\0') --- 1451,1455 ---- static int sv_bell_style (value) ! const char *value; { if (value == 0 || *value == '\0') *************** *** 1452,1456 **** static int sv_isrchterm (value) ! char *value; { int beg, end, delim; --- 1468,1472 ---- static int sv_isrchterm (value) ! const char *value; { int beg, end, delim; *************** *** 1490,1494 **** typedef struct { ! char *name; int value; } assoc_list; --- 1506,1510 ---- typedef struct { ! const char *name; int value; } assoc_list; *************** *** 1524,1528 **** /* Auxiliary functions to manage keymaps. */ static struct { ! char *name; Keymap map; } keymap_names[] = { --- 1540,1544 ---- /* Auxiliary functions to manage keymaps. */ static struct { ! const char *name; Keymap map; } keymap_names[] = { *************** *** 1542,1551 **** Keymap rl_get_keymap_by_name (name) ! char *name; { register int i; for (i = 0; keymap_names[i].name; i++) ! if (strcmp (name, keymap_names[i].name) == 0) return (keymap_names[i].map); return ((Keymap) NULL); --- 1558,1567 ---- Keymap rl_get_keymap_by_name (name) ! const char *name; { register int i; for (i = 0; keymap_names[i].name; i++) ! if (_rl_stricmp (name, keymap_names[i].name) == 0) return (keymap_names[i].map); return ((Keymap) NULL); *************** *** 1559,1563 **** for (i = 0; keymap_names[i].name; i++) if (map == keymap_names[i].map) ! return (keymap_names[i].name); return ((char *)NULL); } --- 1575,1579 ---- for (i = 0; keymap_names[i].name; i++) if (map == keymap_names[i].map) ! return ((char *)keymap_names[i].name); return ((char *)NULL); } *************** *** 1617,1621 **** { register int i; ! char **funmap_names; funmap_names = rl_funmap_names (); --- 1633,1637 ---- { register int i; ! const char **funmap_names; funmap_names = rl_funmap_names (); *************** *** 1707,1711 **** char ** rl_invoking_keyseqs_in_map (function, map) ! Function *function; Keymap map; { --- 1723,1727 ---- char ** rl_invoking_keyseqs_in_map (function, map) ! rl_command_func_t *function; Keymap map; { *************** *** 1807,1811 **** char ** rl_invoking_keyseqs (function) ! Function *function; { return (rl_invoking_keyseqs_in_map (function, _rl_keymap)); --- 1823,1827 ---- char ** rl_invoking_keyseqs (function) ! rl_command_func_t *function; { return (rl_invoking_keyseqs_in_map (function, _rl_keymap)); *************** *** 1820,1825 **** { register int i; ! char **names; ! char *name; names = rl_funmap_names (); --- 1836,1841 ---- { register int i; ! const char **names; ! const char *name; names = rl_funmap_names (); *************** *** 1829,1833 **** for (i = 0; name = names[i]; i++) { ! Function *function; char **invokers; --- 1845,1849 ---- for (i = 0; name = names[i]; i++) { ! rl_command_func_t *function; char **invokers; *************** *** 1986,1990 **** { int i; ! char *kname; for (i = 0; boolean_varlist[i].name; i++) --- 2002,2006 ---- { int i; ! const char *kname; for (i = 0; boolean_varlist[i].name; i++) *************** *** 2074,2081 **** void _rl_bind_if_unbound (keyseq, default_func) ! char *keyseq; ! Function *default_func; { ! Function *func; if (keyseq) --- 2090,2097 ---- void _rl_bind_if_unbound (keyseq, default_func) ! const char *keyseq; ! rl_command_func_t *default_func; { ! rl_command_func_t *func; if (keyseq) *************** *** 2090,2094 **** static int substring_member_of_array (string, array) ! char *string, **array; { while (*array) --- 2106,2111 ---- static int substring_member_of_array (string, array) ! char *string; ! const char **array; { while (*array) diff -Nrc2 readline-4.1/callback.c readline-4.2/callback.c *** readline-4.1/callback.c Thu Aug 5 08:17:29 1999 --- readline-4.2/callback.c Tue Dec 12 14:48:21 2000 *************** *** 53,57 **** signals handled all the time, except during calls to the user's function. */ ! VFunction *rl_linefunc; /* user callback function */ static int in_handler; /* terminal_prepped and signals set? */ --- 53,57 ---- signals handled all the time, except during calls to the user's function. */ ! rl_vcpfunc_t *rl_linefunc; /* user callback function */ static int in_handler; /* terminal_prepped and signals set? */ *************** *** 79,87 **** void rl_callback_handler_install (prompt, linefunc) ! char *prompt; ! VFunction *linefunc; { ! rl_prompt = prompt; ! rl_visible_prompt_length = rl_prompt ? rl_expand_prompt (rl_prompt) : 0; rl_linefunc = linefunc; _rl_callback_newline (); --- 79,86 ---- void rl_callback_handler_install (prompt, linefunc) ! const char *prompt; ! rl_vcpfunc_t *linefunc; { ! rl_set_prompt (prompt); rl_linefunc = linefunc; _rl_callback_newline (); *************** *** 103,124 **** eof = readline_internal_char (); ! if (rl_done) { ! line = readline_internal_teardown (eof); ! (*rl_deprep_term_function) (); #if defined (HANDLE_SIGNALS) ! rl_clear_signals (); #endif ! in_handler = 0; ! (*rl_linefunc) (line); ! /* If the user did not clear out the line, do it for him. */ ! if (rl_line_buffer[0]) ! _rl_init_line_state (); ! ! /* Redisplay the prompt if readline_handler_{install,remove} not called. */ ! if (in_handler == 0 && rl_linefunc) ! _rl_callback_newline (); } } --- 102,132 ---- eof = readline_internal_char (); ! /* We loop in case some function has pushed input back with rl_execute_next. */ ! for (;;) { ! if (rl_done) ! { ! line = readline_internal_teardown (eof); ! (*rl_deprep_term_function) (); #if defined (HANDLE_SIGNALS) ! rl_clear_signals (); #endif ! in_handler = 0; ! (*rl_linefunc) (line); ! /* If the user did not clear out the line, do it for him. */ ! if (rl_line_buffer[0]) ! _rl_init_line_state (); ! ! /* Redisplay the prompt if readline_handler_{install,remove} ! not called. */ ! if (in_handler == 0 && rl_linefunc) ! _rl_callback_newline (); ! } ! if (rl_pending_input) ! eof = readline_internal_char (); ! else ! break; } } diff -Nrc2 readline-4.1/chardefs.h readline-4.2/chardefs.h *** readline-4.1/chardefs.h Thu Aug 5 08:17:37 1999 --- readline-4.2/chardefs.h Wed Sep 13 17:20:15 2000 *************** *** 52,56 **** #define largest_char 255 /* Largest character value. */ ! #define CTRL_CHAR(c) ((c) < control_character_threshold && (c) >= 0) #define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char) --- 52,56 ---- #define largest_char 255 /* Largest character value. */ ! #define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0)) #define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char) diff -Nrc2 readline-4.1/compat.c readline-4.2/compat.c *** readline-4.1/compat.c Wed Dec 31 19:00:00 1969 --- readline-4.2/compat.c Tue Feb 6 14:15:13 2001 *************** *** 0 **** --- 1,113 ---- + /* compat.c -- backwards compatibility functions. */ + + /* Copyright (C) 2000 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 "rlstdc.h" + #include "rltypedefs.h" + + extern void rl_free_undo_list __P((void)); + extern int rl_maybe_save_line __P((void)); + extern int rl_maybe_unsave_line __P((void)); + extern int rl_maybe_replace_line __P((void)); + + extern int rl_crlf __P((void)); + extern int rl_ding __P((void)); + extern int rl_alphabetic __P((int)); + + extern char **rl_completion_matches __P((const char *, rl_compentry_func_t *)); + extern char *rl_username_completion_function __P((const char *, int)); + extern char *rl_filename_completion_function __P((const char *, int)); + + /* Provide backwards-compatible entry points for old function names. */ + + void + free_undo_list () + { + rl_free_undo_list (); + } + + int + maybe_replace_line () + { + return rl_maybe_replace_line (); + } + + int + maybe_save_line () + { + return rl_maybe_save_line (); + } + + int + maybe_unsave_line () + { + return rl_maybe_unsave_line (); + } + + int + ding () + { + return rl_ding (); + } + + int + crlf () + { + return rl_crlf (); + } + + int + alphabetic (c) + int c; + { + return rl_alphabetic (c); + } + + char ** + completion_matches (s, f) + const char *s; + rl_compentry_func_t *f; + { + return rl_completion_matches (s, f); + } + + char * + username_completion_function (s, i) + const char *s; + int i; + { + return rl_username_completion_function (s, i); + } + + char * + filename_completion_function (s, i) + const char *s; + int i; + { + return rl_filename_completion_function (s, i); + } diff -Nrc2 readline-4.1/complete.c readline-4.2/complete.c *** readline-4.1/complete.c Tue Feb 22 13:50:05 2000 --- readline-4.2/complete.c Wed Feb 14 07:47:18 2001 *************** *** 50,65 **** #include - #if !defined (HAVE_GETPW_DECLS) - extern struct passwd *getpwent (); - #endif /* USG && !HAVE_GETPW_DECLS */ - - /* ISC systems don't define getpwent() if _POSIX_SOURCE is defined. */ - #if defined (isc386) && defined (_POSIX_SOURCE) - # if defined (__STDC__) - extern struct passwd *getpwent (void); - # else - extern struct passwd *getpwent (); - # endif /* !__STDC__ */ - #endif /* isc386 && _POSIX_SOURCE */ #include "posixdir.h" --- 50,53 ---- *************** *** 80,83 **** --- 68,77 ---- #endif + /* Most systems don't declare getpwent in if _POSIX_SOURCE is + defined. */ + #if !defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE) + extern struct passwd *getpwent __P((void)); + #endif /* !HAVE_GETPW_DECLS || _POSIX_SOURCE */ + /* 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. *************** *** 87,95 **** number of strings in that array, and MAX_LENGTH is the length of the longest string in that array. */ ! VFunction *rl_completion_display_matches_hook = (VFunction *)NULL; ! ! /* Forward declarations for functions defined and used in this file. */ ! char *filename_completion_function __P((char *, int)); ! char **completion_matches __P((char *, CPFunction *)); #if defined (VISIBLE_STATS) --- 81,85 ---- number of strings in that array, and MAX_LENGTH is the length of the longest string in that array. */ ! rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)NULL; #if defined (VISIBLE_STATS) *************** *** 101,105 **** static char *rl_quote_filename __P((char *, int, char *)); - static char *rl_strpbrk __P((char *, char *)); static char **remove_duplicate_matches __P((char **)); --- 91,94 ---- *************** *** 108,112 **** static void insert_all_matches __P((char **, int, char *)); static void display_matches __P((char **)); ! static int compute_lcd_of_matches __P((char **, int, char *)); /* **************************************************************** */ --- 97,101 ---- static void insert_all_matches __P((char **, int, char *)); static void display_matches __P((char **)); ! static int compute_lcd_of_matches __P((char **, int, const char *)); /* **************************************************************** */ *************** *** 147,151 **** completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ ! Function *rl_directory_completion_hook = (Function *)NULL; /* Non-zero means readline completion functions perform tilde expansion. */ --- 136,142 ---- completing on a directory name. The function is called with the address of a string (the current directory name) as an arg. */ ! rl_icppfunc_t *rl_directory_completion_hook = (rl_icppfunc_t *)NULL; ! ! rl_icppfunc_t *rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL; /* Non-zero means readline completion functions perform tilde expansion. */ *************** *** 153,159 **** /* Pointer to the generator function for completion_matches (). ! NULL means to use filename_completion_function (), the default filename completer. */ ! Function *rl_completion_entry_function = (Function *)NULL; /* Pointer to alternative function to create matches. --- 144,150 ---- /* Pointer to the generator function for completion_matches (). ! NULL means to use rl_filename_completion_function (), the default filename completer. */ ! rl_compentry_func_t *rl_completion_entry_function = (rl_compentry_func_t *)NULL; /* Pointer to alternative function to create matches. *************** *** 164,168 **** rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ ! CPPFunction *rl_attempted_completion_function = (CPPFunction *)NULL; /* Non-zero means to suppress normal filename completion after the --- 155,159 ---- rl_completion_entry_function to try to match, otherwise use the array of strings returned. */ ! rl_completion_func_t *rl_attempted_completion_function = (rl_completion_func_t *)NULL; /* Non-zero means to suppress normal filename completion after the *************** *** 183,195 **** completer routine. The contents of this variable is what breaks words in the shell, i.e. " \t\n\"\\'`@$><=" */ ! char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* List of basic quoting characters. */ ! char *rl_basic_quote_characters = "\"'"; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ ! char *rl_completer_word_break_characters = (char *)NULL; /* List of characters which can be used to quote a substring of the line. --- 174,186 ---- 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. */ ! const char *rl_basic_quote_characters = "\"'"; /* The list of characters that signal a break between words for rl_complete_internal. The default list is the contents of rl_basic_word_break_characters. */ ! const char *rl_completer_word_break_characters = (const char *)NULL; /* List of characters which can be used to quote a substring of the line. *************** *** 197,209 **** rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ ! char *rl_completer_quote_characters = (char *)NULL; /* List of characters that should be quoted in filenames by the completer. */ ! char *rl_filename_quote_characters = (char *)NULL; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ ! char *rl_special_prefixes = (char *)NULL; /* If non-zero, then disallow duplicates in the matches. */ --- 188,200 ---- rl_completer_word_break_characters are treated as any other character, unless they also appear within this list. */ ! const char *rl_completer_quote_characters = (const char *)NULL; /* List of characters that should be quoted in filenames by the completer. */ ! const char *rl_filename_quote_characters = (const char *)NULL; /* List of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. The shell uses this to help determine what kind of completing to do. */ ! const char *rl_special_prefixes = (const char *)NULL; /* If non-zero, then disallow duplicates in the matches. */ *************** *** 231,235 **** free()'d if they are deleted. The main intent of this function is to implement FIGNORE a la SunOS csh. */ ! Function *rl_ignore_some_completions_function = (Function *)NULL; /* Set to a function to quote a filename in an application-specific fashion. --- 222,226 ---- free()'d if they are deleted. The main intent of this function is to implement FIGNORE a la SunOS csh. */ ! rl_compignore_func_t *rl_ignore_some_completions_function = (rl_compignore_func_t *)NULL; /* Set to a function to quote a filename in an application-specific fashion. *************** *** 237,241 **** and a pointer to the quoting character to be used, which the function can reset if desired. */ ! CPFunction *rl_filename_quoting_function = rl_quote_filename; /* Function to call to remove quoting characters from a filename. Called --- 228,232 ---- and a pointer to the quoting character to be used, which the function can reset if desired. */ ! rl_quote_func_t *rl_filename_quoting_function = rl_quote_filename; /* Function to call to remove quoting characters from a filename. Called *************** *** 243,252 **** with matching names in the file system. Readline doesn't do anything with this; it's set only by applications. */ ! CPFunction *rl_filename_dequoting_function = (CPFunction *)NULL; /* Function to call to decide whether or not a word break character is quoted. If a character is quoted, it does not break words for the completer. */ ! Function *rl_char_is_quoted_p = (Function *)NULL; /* Character appended to completed words when at the end of the line. The --- 234,243 ---- with matching names in the file system. Readline doesn't do anything with this; it's set only by applications. */ ! rl_dequote_func_t *rl_filename_dequoting_function = (rl_dequote_func_t *)NULL; /* Function to call to decide whether or not a word break character is quoted. If a character is quoted, it does not break words for the completer. */ ! rl_linebuf_func_t *rl_char_is_quoted_p = (rl_linebuf_func_t *)NULL; /* Character appended to completed words when at the end of the line. The *************** *** 270,274 **** /* Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see ! completion_matches ()). The default is to do filename completion. */ int rl_complete (ignore, invoking_key) --- 261,265 ---- /* Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see ! rl_completion_matches ()). The default is to do filename completion. */ int rl_complete (ignore, invoking_key) *************** *** 306,330 **** /************************************/ - /* Find the first occurrence in STRING1 of any character from STRING2. - Return a pointer to the character in STRING1. */ - static char * - rl_strpbrk (string1, string2) - char *string1, *string2; - { - register char *scan; - - for (; *string1; string1++) - { - for (scan = string2; *scan; scan++) - { - if (*string1 == *scan) - { - return (string1); - } - } - } - return ((char *)NULL); - } - /* The user must press "y" or "n". Non-zero return means "y" pressed. */ static int --- 297,300 ---- *************** *** 335,339 **** --- 305,312 ---- for (;;) { + RL_SETSTATE(RL_STATE_MOREINPUT); c = rl_read_key (); + RL_UNSETSTATE(RL_STATE_MOREINPUT); + if (c == 'y' || c == 'Y' || c == ' ') return (1); *************** *** 342,346 **** if (c == ABORT_CHAR) _rl_abort_internal (); ! ding (); } } --- 315,319 ---- if (c == ABORT_CHAR) _rl_abort_internal (); ! rl_ding (); } } *************** *** 572,576 **** } ! if (rl_line_buffer[scan] == '\\') { pass_next = 1; --- 545,553 ---- } ! /* Shell-like semantics for single quotes -- don't allow backslash ! to quote anything in single quotes, especially not the closing ! quote. If you don't like this, take out the check on the value ! of quote_char. */ ! if (quote_char != '\'' && rl_line_buffer[scan] == '\\') { pass_next = 1; *************** *** 672,676 **** char *text; int start, end; ! Function *our_func; int found_quote, quote_char; { --- 649,653 ---- char *text; int start, end; ! rl_compentry_func_t *our_func; int found_quote, quote_char; { *************** *** 696,700 **** temp = (char *)NULL; ! if (found_quote && our_func == (Function *)filename_completion_function && rl_filename_dequoting_function) { --- 673,677 ---- temp = (char *)NULL; ! if (found_quote && our_func == rl_filename_completion_function && rl_filename_dequoting_function) { *************** *** 704,708 **** } ! matches = completion_matches (text, (CPFunction *)our_func); FREE (temp); return matches; --- 681,685 ---- } ! matches = rl_completion_matches (text, our_func); FREE (temp); return matches; *************** *** 776,780 **** char **match_list; int matches; ! char *text; { register int i, c1, c2, si; --- 753,757 ---- char **match_list; int matches; ! const char *text; { register int i, c1, c2, si; *************** *** 902,910 **** /* How many items of MAX length can we fit in the screen window? */ max += 2; ! limit = screenwidth / max; ! if (limit != 1 && (limit * max == screenwidth)) limit--; ! /* Avoid a possible floating exception. If max > screenwidth, limit will be 0 and a divide-by-zero fault will result. */ if (limit == 0) --- 879,887 ---- /* How many items of MAX length can we fit in the screen window? */ max += 2; ! limit = _rl_screenwidth / max; ! if (limit != 1 && (limit * max == _rl_screenwidth)) limit--; ! /* Avoid a possible floating exception. If max > _rl_screenwidth, limit will be 0 and a divide-by-zero fault will result. */ if (limit == 0) *************** *** 922,926 **** qsort (matches + 1, len, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); ! crlf (); if (_rl_print_completions_horizontally == 0) --- 899,903 ---- qsort (matches + 1, len, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare); ! rl_crlf (); if (_rl_print_completions_horizontally == 0) *************** *** 944,948 **** l += count; } ! crlf (); } } --- 921,925 ---- l += count; } ! rl_crlf (); } } *************** *** 958,962 **** { if (i && (limit > 1) && (i % limit) == 0) ! crlf (); else for (k = 0; k < max - printed_len; k++) --- 935,939 ---- { if (i && (limit > 1) && (i % limit) == 0) ! rl_crlf (); else for (k = 0; k < max - printed_len; k++) *************** *** 964,968 **** } } ! crlf (); } } --- 941,945 ---- } } ! rl_crlf (); } } *************** *** 993,999 **** { temp = printable_part (matches[0]); ! crlf (); print_filename (temp, matches[0]); ! crlf (); rl_forced_update_display (); --- 970,976 ---- { temp = printable_part (matches[0]); ! rl_crlf (); print_filename (temp, matches[0]); ! rl_crlf (); rl_forced_update_display (); *************** *** 1027,1036 **** if (len >= rl_completion_query_items) { ! crlf (); fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len); fflush (rl_outstream); if (get_y_or_n () == 0) { ! crlf (); rl_forced_update_display (); --- 1004,1013 ---- if (len >= rl_completion_query_items) { ! rl_crlf (); fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len); fflush (rl_outstream); if (get_y_or_n () == 0) { ! rl_crlf (); rl_forced_update_display (); *************** *** 1080,1084 **** matches needs to be quoted. */ should_quote = rl_filename_quote_characters ! ? (rl_strpbrk (match, rl_filename_quote_characters) != 0) : 0; --- 1057,1061 ---- matches needs to be quoted. */ should_quote = rl_filename_quote_characters ! ? (_rl_strpbrk (match, rl_filename_quote_characters) != 0) : 0; *************** *** 1233,1241 **** { char **matches; ! Function *our_func; int start, end, delimiter, found_quote, i; char *text, *saved_line_buffer; char quote_char; /* Only the completion entry function can change these. */ rl_filename_completion_desired = 0; --- 1210,1219 ---- { char **matches; ! rl_compentry_func_t *our_func; int start, end, delimiter, found_quote, i; char *text, *saved_line_buffer; char quote_char; + RL_SETSTATE(RL_STATE_COMPLETING); /* Only the completion entry function can change these. */ rl_filename_completion_desired = 0; *************** *** 1246,1250 **** our_func = rl_completion_entry_function ? rl_completion_entry_function ! : (Function *)filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ --- 1224,1228 ---- our_func = rl_completion_entry_function ? rl_completion_entry_function ! : rl_filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ *************** *** 1267,1291 **** if (matches == 0) { ! ding (); FREE (saved_line_buffer); return (0); } - #if 0 - /* If we are matching filenames, our_func will have been set to - filename_completion_function */ - i = our_func == (Function *)filename_completion_function; - #else /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic ! filename_completion_function does this. */ i = rl_filename_completion_desired; - #endif if (postprocess_matches (&matches, i) == 0) { ! ding (); FREE (saved_line_buffer); completion_changed_buffer = 0; return (0); } --- 1245,1265 ---- if (matches == 0) { ! rl_ding (); FREE (saved_line_buffer); + RL_UNSETSTATE(RL_STATE_COMPLETING); return (0); } /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic ! rl_filename_completion_function does this. */ i = rl_filename_completion_desired; if (postprocess_matches (&matches, i) == 0) { ! rl_ding (); FREE (saved_line_buffer); completion_changed_buffer = 0; + RL_UNSETSTATE(RL_STATE_COMPLETING); return (0); } *************** *** 1315,1319 **** } else if (rl_editing_mode != vi_mode) ! ding (); /* There are other matches remaining. */ } else --- 1289,1293 ---- } else if (rl_editing_mode != vi_mode) ! rl_ding (); /* There are other matches remaining. */ } else *************** *** 1332,1337 **** default: fprintf (stderr, "\r\nreadline: bad value %d for what_to_do in rl_complete\n", what_to_do); ! ding (); FREE (saved_line_buffer); return 1; } --- 1306,1312 ---- default: fprintf (stderr, "\r\nreadline: bad value %d for what_to_do in rl_complete\n", what_to_do); ! rl_ding (); FREE (saved_line_buffer); + RL_UNSETSTATE(RL_STATE_COMPLETING); return 1; } *************** *** 1346,1349 **** --- 1321,1325 ---- } + RL_UNSETSTATE(RL_STATE_COMPLETING); return 0; } *************** *** 1368,1374 **** */ char ** ! completion_matches (text, entry_function) ! char *text; ! CPFunction *entry_function; { /* Number of slots in match_list. */ --- 1344,1350 ---- */ char ** ! rl_completion_matches (text, entry_function) ! const char *text; ! rl_compentry_func_t *entry_function; { /* Number of slots in match_list. */ *************** *** 1415,1420 **** character (usually `~'). */ char * ! username_completion_function (text, state) ! char *text; int state; { --- 1391,1396 ---- character (usually `~'). */ char * ! rl_username_completion_function (text, state) ! const char *text; int state; { *************** *** 1472,1477 **** completion for a command. */ char * ! filename_completion_function (text, state) ! char *text; int state; { --- 1448,1453 ---- completion for a command. */ char * ! rl_filename_completion_function (text, state) ! const char *text; int state; { *************** *** 1543,1546 **** --- 1519,1525 ---- } + if (rl_directory_rewrite_hook) + (*rl_directory_rewrite_hook) (&dirname); + if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname)) { *************** *** 1642,1647 **** { dirlen = strlen (users_dirname); ! temp = xmalloc (1 + dirlen + D_NAMLEN (entry)); strcpy (temp, users_dirname); } --- 1621,1629 ---- { dirlen = strlen (users_dirname); ! temp = xmalloc (2 + dirlen + D_NAMLEN (entry)); strcpy (temp, users_dirname); + /* Make sure that temp has a trailing slash here. */ + if (users_dirname[dirlen - 1] != '/') + temp[dirlen++] = '/'; } *************** *** 1668,1672 **** int count, ignore; { ! Function *our_func; int matching_filenames, found_quote; --- 1650,1654 ---- int count, ignore; { ! rl_compentry_func_t *our_func; int matching_filenames, found_quote; *************** *** 1698,1702 **** our_func = rl_completion_entry_function ? rl_completion_entry_function ! : (Function *)filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ --- 1680,1684 ---- our_func = rl_completion_entry_function ? rl_completion_entry_function ! : rl_filename_completion_function; /* We now look backwards for the start of a filename/variable word. */ *************** *** 1717,1733 **** our_func, found_quote, quote_char); - #if 0 - /* If we are matching filenames, our_func will have been set to - filename_completion_function */ - matching_filenames = our_func == (Function *)filename_completion_function; - #else /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic ! filename_completion_function does this. */ matching_filenames = rl_filename_completion_desired; ! #endif if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) { ! ding (); FREE (matches); matches = (char **)0; --- 1699,1710 ---- our_func, found_quote, quote_char); /* If we are matching filenames, the attempted completion function will have set rl_filename_completion_desired to a non-zero value. The basic ! rl_filename_completion_function does this. */ matching_filenames = rl_filename_completion_desired; ! if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0) { ! rl_ding (); FREE (matches); matches = (char **)0; *************** *** 1750,1754 **** if (matches == 0 || match_list_size == 0) { ! ding (); FREE (matches); matches = (char **)0; --- 1727,1731 ---- if (matches == 0 || match_list_size == 0) { ! rl_ding (); FREE (matches); matches = (char **)0; *************** *** 1763,1767 **** if (match_list_index == 0 && match_list_size > 1) { ! ding (); insert_match (orig_text, orig_start, MULT_MATCH, "e_char); } --- 1740,1744 ---- if (match_list_index == 0 && match_list_size > 1) { ! rl_ding (); insert_match (orig_text, orig_start, MULT_MATCH, "e_char); } diff -Nrc2 readline-4.1/config.h.in readline-4.2/config.h.in *** readline-4.1/config.h.in Fri Sep 3 11:54:26 1999 --- readline-4.2/config.h.in Wed Feb 7 13:31:08 2001 *************** *** 1,3 **** ! /* config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if on MINIX. */ --- 1,3 ---- ! /* config.h.in. Maintained by hand. */ /* Define if on MINIX. */ *************** *** 125,129 **** #undef HAVE_POSIX_SIGSETJMP - /* config.h.bot */ /* modify settings or make new ones based on what autoconf tells us. */ --- 125,128 ---- diff -Nrc2 readline-4.1/configure readline-4.2/configure *** readline-4.1/configure Wed Mar 1 14:52:41 2000 --- readline-4.2/configure Mon Apr 2 15:56:02 2001 *************** *** 1,6 **** #! /bin/sh ! # From configure.in for Readline 4.1, version 2.22, from autoconf version 2.13 ! LIBVERSION=4.1 --- 1,8 ---- #! /bin/sh ! # From configure.in for Readline 4.2, version 2.26, from autoconf version 2.13 ! LIBVERSION=4.2 ! ! *************** *** 658,662 **** echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:661: checking host system type" >&5 host_alias=$host --- 660,664 ---- echo $ac_n "checking host system type""... $ac_c" 1>&6 ! echo "configure:663: checking host system type" >&5 host_alias=$host *************** *** 696,703 **** test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:702: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 698,732 ---- test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 + echo "configure:702: checking whether ${MAKE-make} sets \${MAKE}" >&5 + set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` + if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 + else + cat > conftestmake <<\EOF + all: + @echo 'ac_maketemp="${MAKE}"' + EOF + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` + if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes + else + eval ac_cv_prog_make_${ac_make}_set=no + fi + rm -f conftestmake + fi + if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= + else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" + fi + # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:731: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 729,733 **** set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:732: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 758,762 ---- set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:761: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 780,784 **** set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:783: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 809,813 ---- set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:812: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 812,816 **** echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:815: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c --- 841,845 ---- echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 ! echo "configure:844: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c *************** *** 823,832 **** cat > conftest.$ac_ext << EOF ! #line 826 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. --- 852,861 ---- cat > conftest.$ac_ext << EOF ! #line 855 "configure" #include "confdefs.h" main(){return(0);} EOF ! if { (eval echo configure:860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. *************** *** 854,863 **** fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:862: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 883,892 ---- fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 ! echo "configure:886: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 ! echo "configure:891: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 868,872 **** #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else --- 897,901 ---- #endif EOF ! if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else *************** *** 887,891 **** CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:890: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 916,920 ---- CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 ! echo "configure:919: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 919,923 **** echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:922: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then --- 948,952 ---- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 ! echo "configure:951: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then *************** *** 934,938 **** # not just through cpp. cat > conftest.$ac_ext < --- 963,967 ---- # not just through cpp. cat > conftest.$ac_ext < *************** *** 940,944 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 969,973 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 951,955 **** CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < --- 980,984 ---- CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < *************** *** 957,961 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 986,990 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 968,972 **** CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < --- 997,1001 ---- CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < *************** *** 974,978 **** EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1003,1007 ---- EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1000,1014 **** ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 ! echo "configure:1003: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1013: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1029,1043 ---- ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6 ! echo "configure:1032: checking for minix/config.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1053,1057 **** if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 ! echo "configure:1056: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1082,1086 ---- if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 ! echo "configure:1085: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1059,1063 **** ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < --- 1088,1092 ---- ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < *************** *** 1077,1081 **** if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < --- 1106,1110 ---- if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < *************** *** 1110,1114 **** # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1113: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then --- 1139,1143 ---- # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 ! echo "configure:1142: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then *************** *** 1165,1169 **** set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1168: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1194,1198 ---- set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1197: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1195,1199 **** set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1198: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1224,1228 ---- set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 ! echo "configure:1227: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1227,1236 **** echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:1230: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 1256,1265 ---- echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 ! echo "configure:1259: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 1249,1253 **** ; return 0; } EOF ! if { (eval echo configure:1252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void --- 1278,1282 ---- ; return 0; } EOF ! if { (eval echo configure:1281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void *************** *** 1269,1278 **** echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 ! echo "configure:1272: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 1298,1307 ---- echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 ! echo "configure:1301: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 1329,1338 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:1332: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 1358,1367 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 ! echo "configure:1361: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 1342,1346 **** ; return 0; } EOF ! if { (eval echo configure:1345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" --- 1371,1375 ---- ; return 0; } EOF ! if { (eval echo configure:1374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" *************** *** 1367,1371 **** if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1370: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 1396,1400 ---- if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 ! echo "configure:1399: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 1375,1379 **** LIBS="-ldir $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 1415,1419 ---- ; return 0; } EOF ! if { (eval echo configure:1418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 1408,1412 **** else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1411: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 1437,1441 ---- else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 ! echo "configure:1440: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 1416,1420 **** LIBS="-lx $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 1456,1460 ---- ; return 0; } EOF ! if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 1454,1463 **** do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 ! echo "configure:1457: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1486: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" --- 1511,1515 ---- ; return 0; } EOF ! if { (eval echo configure:1514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" *************** *** 1508,1512 **** echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 ! echo "configure:1511: checking for working strcoll" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1537,1541 ---- echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 ! echo "configure:1540: checking for working strcoll" >&5 if eval "test \"`echo '$''{'ac_cv_func_strcoll_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1516,1520 **** else cat > conftest.$ac_ext < --- 1545,1549 ---- else cat > conftest.$ac_ext < *************** *** 1526,1530 **** } EOF ! if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strcoll_works=yes --- 1555,1559 ---- } EOF ! if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_strcoll_works=yes *************** *** 1555,1569 **** ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1558: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then --- 1584,1598 ---- ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 ! echo "configure:1587: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ! { (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then *************** *** 1594,1598 **** echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6 ! echo "configure:1597: checking for type of signal functions" >&5 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1623,1627 ---- echo $ac_n "checking for type of signal functions""... $ac_c" 1>&6 ! echo "configure:1626: checking for type of signal functions" >&5 if eval "test \"`echo '$''{'bash_cv_signal_vintage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1600,1604 **** cat > conftest.$ac_ext < --- 1629,1633 ---- cat > conftest.$ac_ext < *************** *** 1613,1617 **** ; return 0; } EOF ! if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=posix --- 1642,1646 ---- ; return 0; } EOF ! if { (eval echo configure:1645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=posix *************** *** 1622,1626 **** cat > conftest.$ac_ext < --- 1651,1655 ---- cat > conftest.$ac_ext < *************** *** 1632,1636 **** ; return 0; } EOF ! if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=4.2bsd --- 1661,1665 ---- ; return 0; } EOF ! if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=4.2bsd *************** *** 1641,1645 **** cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=svr3 --- 1683,1687 ---- ; return 0; } EOF ! if { (eval echo configure:1686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_signal_vintage=svr3 *************** *** 1695,1699 **** echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6 ! echo "configure:1698: checking if signal handlers must be reinstalled when invoked" >&5 if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1724,1728 ---- echo $ac_n "checking if signal handlers must be reinstalled when invoked""... $ac_c" 1>&6 ! echo "configure:1727: checking if signal handlers must be reinstalled when invoked" >&5 if eval "test \"`echo '$''{'bash_cv_must_reinstall_sighandlers'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1705,1709 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then bash_cv_must_reinstall_sighandlers=no --- 1781,1785 ---- EOF ! if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then bash_cv_must_reinstall_sighandlers=no *************** *** 1777,1781 **** echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6 ! echo "configure:1780: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1806,1810 ---- echo $ac_n "checking for presence of POSIX-style sigsetjmp/siglongjmp""... $ac_c" 1>&6 ! echo "configure:1809: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 if eval "test \"`echo '$''{'bash_cv_func_sigsetjmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1787,1791 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then bash_cv_func_sigsetjmp=present --- 1857,1861 ---- } EOF ! if { (eval echo configure:1860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then bash_cv_func_sigsetjmp=present *************** *** 1851,1860 **** echo $ac_n "checking for lstat""... $ac_c" 1>&6 ! echo "configure:1854: checking for lstat" >&5 if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:1883: checking for lstat" >&5 if eval "test \"`echo '$''{'bash_cv_func_lstat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_func_lstat=yes --- 1895,1899 ---- ; return 0; } EOF ! if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* bash_cv_func_lstat=yes *************** *** 1886,1920 **** fi ! echo $ac_n "checking whether programs are able to redeclare getpw functions""... $ac_c" 1>&6 ! echo "configure:1890: checking whether programs are able to redeclare getpw functions" >&5 ! if eval "test \"`echo '$''{'bash_cv_can_redecl_getpw'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include ! extern struct passwd *getpwent(); ! extern struct passwd *getpwuid(); ! extern struct passwd *getpwnam(); ! int main() { ! struct passwd *z; z = getpwent(); z = getpwuid(0); z = getpwnam("root"); ! ; return 0; } EOF ! if { (eval echo configure:1906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ! bash_cv_can_redecl_getpw=yes else - echo "configure: failed program was:" >&5 - cat conftest.$ac_ext >&5 rm -rf conftest* ! bash_cv_can_redecl_getpw=no fi rm -f conftest* fi ! echo "$ac_t""$bash_cv_can_redecl_getpw" 1>&6 ! if test $bash_cv_can_redecl_getpw = no; then cat >> confdefs.h <<\EOF #define HAVE_GETPW_DECLS 1 --- 1915,1948 ---- fi ! echo $ac_n "checking whether getpw functions are declared in pwd.h""... $ac_c" 1>&6 ! echo "configure:1919: checking whether getpw functions are declared in pwd.h" >&5 ! if eval "test \"`echo '$''{'bash_cv_getpw_declared'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < + #ifdef HAVE_UNISTD_H + # include + #endif #include ! EOF ! if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | ! egrep "getpwuid" >/dev/null 2>&1; then rm -rf conftest* ! bash_cv_getpw_declared=yes else rm -rf conftest* ! bash_cv_getpw_declared=no fi rm -f conftest* + fi ! echo "$ac_t""$bash_cv_getpw_declared" 1>&6 ! if test $bash_cv_getpw_declared = yes; then cat >> confdefs.h <<\EOF #define HAVE_GETPW_DECLS 1 *************** *** 1925,1929 **** echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6 ! echo "configure:1928: checking whether or not strcoll and strcmp differ" >&5 if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 --- 1953,1957 ---- echo $ac_n "checking whether or not strcoll and strcmp differ""... $ac_c" 1>&6 ! echo "configure:1956: checking whether or not strcoll and strcmp differ" >&5 if eval "test \"`echo '$''{'bash_cv_func_strcoll_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 *************** *** 1935,1939 **** else cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then bash_cv_func_strcoll_broken=yes --- 2002,2006 ---- EOF ! if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then bash_cv_func_strcoll_broken=yes *************** *** 1998,2007 **** echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6 ! echo "configure:2001: checking whether signal handlers are of type void" >&5 if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2026,2035 ---- echo $ac_n "checking whether signal handlers are of type void""... $ac_c" 1>&6 ! echo "configure:2029: checking whether signal handlers are of type void" >&5 if eval "test \"`echo '$''{'bash_cv_void_sighandler'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2018,2022 **** ; return 0; } EOF ! if { (eval echo configure:2021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_void_sighandler=yes --- 2046,2050 ---- ; return 0; } EOF ! if { (eval echo configure:2049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_void_sighandler=yes *************** *** 2038,2047 **** echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2041: checking for TIOCGWINSZ in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2066,2075 ---- echo $ac_n "checking for TIOCGWINSZ in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2069: checking for TIOCGWINSZ in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_tiocgwinsz_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2051,2055 **** ; return 0; } EOF ! if { (eval echo configure:2054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_tiocgwinsz_in_ioctl=yes --- 2079,2083 ---- ; return 0; } EOF ! if { (eval echo configure:2082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_tiocgwinsz_in_ioctl=yes *************** *** 2072,2081 **** echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2075: checking for TIOCSTAT in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2100,2109 ---- echo $ac_n "checking for TIOCSTAT in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2103: checking for TIOCSTAT in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_tiocstat_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2085,2089 **** ; return 0; } EOF ! if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_tiocstat_in_ioctl=yes --- 2113,2117 ---- ; return 0; } EOF ! if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_tiocstat_in_ioctl=yes *************** *** 2106,2115 **** echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2109: checking for FIONREAD in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2134,2143 ---- echo $ac_n "checking for FIONREAD in sys/ioctl.h""... $ac_c" 1>&6 ! echo "configure:2137: checking for FIONREAD in sys/ioctl.h" >&5 if eval "test \"`echo '$''{'bash_cv_fionread_in_ioctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2119,2123 **** ; return 0; } EOF ! if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_fionread_in_ioctl=yes --- 2147,2151 ---- ; return 0; } EOF ! if { (eval echo configure:2150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_fionread_in_ioctl=yes *************** *** 2140,2149 **** echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:2143: checking for speed_t in sys/types.h" >&5 if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2168,2177 ---- echo $ac_n "checking for speed_t in sys/types.h""... $ac_c" 1>&6 ! echo "configure:2171: checking for speed_t in sys/types.h" >&5 if eval "test \"`echo '$''{'bash_cv_speed_t_in_sys_types'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2152,2156 **** ; return 0; } EOF ! if { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_speed_t_in_sys_types=yes --- 2180,2184 ---- ; return 0; } EOF ! if { (eval echo configure:2183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_speed_t_in_sys_types=yes *************** *** 2173,2182 **** echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6 ! echo "configure:2176: checking for struct winsize in sys/ioctl.h and termios.h" >&5 if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < --- 2201,2210 ---- echo $ac_n "checking for struct winsize in sys/ioctl.h and termios.h""... $ac_c" 1>&6 ! echo "configure:2204: checking for struct winsize in sys/ioctl.h and termios.h" >&5 if eval "test \"`echo '$''{'bash_cv_struct_winsize_header'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < *************** *** 2186,2190 **** ; return 0; } EOF ! if { (eval echo configure:2189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_struct_winsize_header=ioctl_h --- 2214,2218 ---- ; return 0; } EOF ! if { (eval echo configure:2217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_struct_winsize_header=ioctl_h *************** *** 2194,2198 **** rm -rf conftest* cat > conftest.$ac_ext < --- 2222,2226 ---- rm -rf conftest* cat > conftest.$ac_ext < *************** *** 2202,2206 **** ; return 0; } EOF ! if { (eval echo configure:2205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_struct_winsize_header=termios_h --- 2230,2234 ---- ; return 0; } EOF ! if { (eval echo configure:2233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_struct_winsize_header=termios_h *************** *** 2235,2244 **** echo $ac_n "checking if struct dirent has a d_ino member""... $ac_c" 1>&6 ! echo "configure:2238: checking if struct dirent has a d_ino member" >&5 if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2266: checking if struct dirent has a d_ino member" >&5 if eval "test \"`echo '$''{'bash_cv_dirent_has_dino'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_dirent_has_dino=yes --- 2297,2301 ---- ; return 0; } EOF ! if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_dirent_has_dino=yes *************** *** 2291,2300 **** echo $ac_n "checking if struct dirent has a d_fileno member""... $ac_c" 1>&6 ! echo "configure:2294: checking if struct dirent has a d_fileno member" >&5 if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 ! echo "configure:2322: checking if struct dirent has a d_fileno member" >&5 if eval "test \"`echo '$''{'bash_cv_dirent_has_d_fileno'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_dirent_has_d_fileno=yes --- 2353,2357 ---- ; return 0; } EOF ! if { (eval echo configure:2356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bash_cv_dirent_has_d_fileno=yes *************** *** 2354,2358 **** else echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 ! echo "configure:2357: checking which library has the termcap functions" >&5 _bash_needmsg= fi --- 2382,2386 ---- else echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 ! echo "configure:2385: checking which library has the termcap functions" >&5 _bash_needmsg= fi *************** *** 2361,2365 **** else echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 ! echo "configure:2364: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 2389,2393 ---- else echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 ! echo "configure:2392: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 2369,2373 **** LIBS="-ltermcap $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 2408,2412 ---- ; return 0; } EOF ! if { (eval echo configure:2411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 2399,2403 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 ! echo "configure:2402: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 2427,2431 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 ! echo "configure:2430: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 2407,2411 **** LIBS="-lcurses $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 2446,2450 ---- ; return 0; } EOF ! if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 2437,2441 **** echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 ! echo "configure:2440: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then --- 2465,2469 ---- echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 ! echo "configure:2468: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then *************** *** 2445,2449 **** LIBS="-lncurses $LIBS" cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" --- 2484,2488 ---- ; return 0; } EOF ! if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" *************** *** 2485,2489 **** if test "X$_bash_needmsg" = "Xyes"; then echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 ! echo "configure:2488: checking which library has the termcap functions" >&5 fi echo "$ac_t""using $bash_cv_termcap_lib" 1>&6 --- 2513,2517 ---- if test "X$_bash_needmsg" = "Xyes"; then echo $ac_n "checking which library has the termcap functions""... $ac_c" 1>&6 ! echo "configure:2516: checking which library has the termcap functions" >&5 fi echo "$ac_t""using $bash_cv_termcap_lib" 1>&6 *************** *** 2509,2512 **** --- 2537,2541 ---- case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; + *s390*) LOCAL_CFLAGS=-fsigned-char ;; esac *************** *** 2522,2526 **** if test -f ${srcdir}/support/shobj-conf; then echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6 ! echo "configure:2525: checking configuration for building shared libraries" >&5 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` --- 2551,2555 ---- if test -f ${srcdir}/support/shobj-conf; then echo $ac_n "checking configuration for building shared libraries""... $ac_c" 1>&6 ! echo "configure:2554: checking configuration for building shared libraries" >&5 eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}` *************** *** 2706,2709 **** --- 2735,2739 ---- s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g + s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@CPP@%$CPP%g diff -Nrc2 readline-4.1/configure.in readline-4.2/configure.in *** readline-4.1/configure.in Wed Mar 1 14:52:34 2000 --- readline-4.2/configure.in Mon Apr 2 15:55:12 2001 *************** *** 5,10 **** dnl dnl Process this file with autoconf to produce a configure script. ! AC_REVISION([for Readline 4.1, version 2.22, from autoconf version] AC_ACVERSION) ! LIBVERSION=4.1 AC_INIT(readline.h) --- 5,10 ---- dnl dnl Process this file with autoconf to produce a configure script. ! AC_REVISION([for Readline 4.2, version 2.26, from autoconf version] AC_ACVERSION) ! LIBVERSION=4.2 AC_INIT(readline.h) *************** *** 32,35 **** --- 32,36 ---- test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1 + AC_PROG_MAKE_SET AC_PROG_CC dnl AC_AIX *************** *** 92,95 **** --- 93,97 ---- case "$host_cpu" in *cray*) LOCAL_CFLAGS=-DCRAY ;; + *s390*) LOCAL_CFLAGS=-fsigned-char ;; esac diff -Nrc2 readline-4.1/display.c readline-4.2/display.c *** readline-4.1/display.c Thu Sep 16 11:19:40 1999 --- readline-4.2/display.c Fri Feb 2 13:25:10 2001 *************** *** 60,64 **** #if defined (HACK_TERMCAP_MOTION) ! extern char *term_forward_char; #endif --- 60,64 ---- #if defined (HACK_TERMCAP_MOTION) ! extern char *_rl_term_forward_char; #endif *************** *** 104,108 **** /* Application-specific redisplay function. */ ! VFunction *rl_redisplay_function = rl_redisplay; /* Global variables declared here. */ --- 104,108 ---- /* Application-specific redisplay function. */ ! rl_voidfunc_t *rl_redisplay_function = rl_redisplay; /* Global variables declared here. */ *************** *** 143,148 **** static int line_size = 1024; static char *local_prompt, *local_prompt_prefix; ! static int visible_length, prefix_length; /* The number of invisible characters in the line currently being --- 143,151 ---- static int line_size = 1024; + /* Variables to keep track of the expanded prompt string, which may + include invisible characters. */ + static char *local_prompt, *local_prompt_prefix; ! static int prompt_visible_length, prompt_prefix_length; /* The number of invisible characters in the line currently being *************** *** 150,158 **** static int visible_wrap_offset; ! /* static so it can be shared between rl_redisplay and update_line */ static int wrap_offset; ! /* The index of the last invisible_character in the prompt string. */ ! static int last_invisible; /* The length (buffer offset) of the first line of the last (possibly --- 153,162 ---- static int visible_wrap_offset; ! /* The number of invisible characters in the prompt string. Static so it ! can be shared between rl_redisplay and update_line */ static int wrap_offset; ! /* The index of the last invisible character in the prompt string. */ ! static int prompt_last_invisible; /* The length (buffer offset) of the first line of the last (possibly *************** *** 160,167 **** static int visible_first_line_len; /* Expand the prompt string S and return the number of visible characters in *LP, if LP is not null. This is currently more-or-less a placeholder for expansion. LIP, if non-null is a place to store the ! index of the last invisible character in the returned string. */ /* Current implementation: --- 164,180 ---- static int visible_first_line_len; + /* Number of invisible characters on the first physical line of the prompt. + Only valid when the number of physical characters in the prompt exceeds + (or is equal to) _rl_screenwidth. */ + static int prompt_invis_chars_first_line; + + static int prompt_last_screen_line; + /* Expand the prompt string S and return the number of visible characters in *LP, if LP is not null. This is currently more-or-less a placeholder for expansion. LIP, if non-null is a place to store the ! index of the last invisible character in the returned string. NIFLP, ! if non-zero, is a place to store the number of invisible characters in ! the first prompt line. */ /* Current implementation: *************** *** 173,182 **** static char * ! expand_prompt (pmt, lp, lip) char *pmt; ! int *lp, *lip; { char *r, *ret, *p; ! int l, rl, last, ignoring; /* Short-circuit if we can. */ --- 186,195 ---- static char * ! expand_prompt (pmt, lp, lip, niflp) char *pmt; ! int *lp, *lip, *niflp; { char *r, *ret, *p; ! int l, rl, last, ignoring, ninvis, invfl; /* Short-circuit if we can. */ *************** *** 191,196 **** l = strlen (pmt); r = ret = xmalloc (l + 1); ! ! for (rl = ignoring = last = 0, p = pmt; p && *p; p++) { /* This code strips the invisible character string markers --- 204,211 ---- l = strlen (pmt); r = ret = xmalloc (l + 1); ! ! invfl = 0; /* invisible chars in first line of prompt */ ! ! for (rl = ignoring = last = ninvis = 0, p = pmt; p && *p; p++) { /* This code strips the invisible character string markers *************** *** 212,218 **** --- 227,240 ---- if (!ignoring) rl++; + else + ninvis++; + if (rl == _rl_screenwidth) + invfl = ninvis; } } + if (rl < _rl_screenwidth) + invfl = ninvis; + *r = '\0'; if (lp) *************** *** 220,223 **** --- 242,247 ---- if (lip) *lip = last; + if (niflp) + *niflp = invfl; return ret; } *************** *** 231,235 **** char *ret; ! ret = expand_prompt (pmt, (int *)NULL, (int *)NULL); return ret; } --- 255,259 ---- char *ret; ! ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL); return ret; } *************** *** 243,248 **** * local_prompt_prefix = portion before last newline of rl_display_prompt, * expanded via expand_prompt ! * visible_length = number of visible characters in local_prompt ! * prefix_length = number of visible characters in local_prompt_prefix * * This function is called once per call to readline(). It may also be --- 267,272 ---- * local_prompt_prefix = portion before last newline of rl_display_prompt, * expanded via expand_prompt ! * prompt_visible_length = number of visible characters in local_prompt ! * prompt_prefix_length = number of visible characters in local_prompt_prefix * * This function is called once per call to readline(). It may also be *************** *** 260,269 **** /* Clear out any saved values. */ ! if (local_prompt) ! free (local_prompt); ! if (local_prompt_prefix) ! free (local_prompt_prefix); local_prompt = local_prompt_prefix = (char *)0; ! last_invisible = visible_length = 0; if (prompt == 0 || *prompt == 0) --- 284,292 ---- /* Clear out any saved values. */ ! FREE (local_prompt); ! FREE (local_prompt_prefix); ! local_prompt = local_prompt_prefix = (char *)0; ! prompt_last_invisible = prompt_visible_length = 0; if (prompt == 0 || *prompt == 0) *************** *** 273,280 **** if (!p) { ! /* The prompt is only one line. */ ! local_prompt = expand_prompt (prompt, &visible_length, &last_invisible); local_prompt_prefix = (char *)0; ! return (visible_length); } else --- 296,305 ---- if (!p) { ! /* The prompt is only one logical line, though it might wrap. */ ! local_prompt = expand_prompt (prompt, &prompt_visible_length, ! &prompt_last_invisible, ! &prompt_invis_chars_first_line); local_prompt_prefix = (char *)0; ! return (prompt_visible_length); } else *************** *** 282,292 **** /* The prompt spans multiple lines. */ t = ++p; ! local_prompt = expand_prompt (p, &visible_length, &last_invisible); c = *t; *t = '\0'; /* The portion of the prompt string up to and including the final newline is now null-terminated. */ ! local_prompt_prefix = expand_prompt (prompt, &prefix_length, (int *)NULL); *t = c; ! return (prefix_length); } } --- 307,321 ---- /* The prompt spans multiple lines. */ t = ++p; ! local_prompt = expand_prompt (p, &prompt_visible_length, ! &prompt_last_invisible, ! &prompt_invis_chars_first_line); c = *t; *t = '\0'; /* The portion of the prompt string up to and including the final newline is now null-terminated. */ ! local_prompt_prefix = expand_prompt (prompt, &prompt_prefix_length, ! (int *)NULL, ! &prompt_invis_chars_first_line); *t = c; ! return (prompt_prefix_length); } } *************** *** 400,404 **** } line[out] = '\0'; ! wrap_offset = local_len - visible_length; } else --- 429,433 ---- } line[out] = '\0'; ! wrap_offset = local_len - prompt_visible_length; } else *************** *** 433,437 **** out += pmtlen; line[out] = '\0'; ! wrap_offset = 0; } --- 462,466 ---- out += pmtlen; line[out] = '\0'; ! wrap_offset = prompt_invis_chars_first_line = 0; } *************** *** 448,452 **** do { \ lpos++; \ ! if (lpos >= screenwidth) \ { \ if (newlines >= (inv_lbsize - 2)) \ --- 477,481 ---- do { \ lpos++; \ ! if (lpos >= _rl_screenwidth) \ { \ if (newlines >= (inv_lbsize - 2)) \ *************** *** 464,482 **** lpos = out - wrap_offset; ! /* XXX - what if lpos is already >= screenwidth before we start drawing the contents of the command line? */ ! while (lpos >= screenwidth) { ! /* XXX - possible fix from Darin Johnson for prompt ! string with invisible characters that is longer than the screen ! width. XXX - this doesn't work right if invisible characters have ! to be put on the second screen line -- it adds too much (the number ! of invisible chars after the screenwidth). */ ! temp = ((newlines + 1) * screenwidth) + ((newlines == 0) ? wrap_offset : 0); inv_lbreaks[++newlines] = temp; ! lpos -= screenwidth; } lb_linenum = 0; for (in = 0; in < rl_end; in++) --- 493,526 ---- lpos = out - wrap_offset; ! /* prompt_invis_chars_first_line is the number of invisible characters in ! the first physical line of the prompt. ! wrap_offset - prompt_invis_chars_first_line is the number of invis ! chars on the second line. */ ! ! /* what if lpos is already >= _rl_screenwidth before we start drawing the contents of the command line? */ ! while (lpos >= _rl_screenwidth) { ! /* fix from Darin Johnson for prompt string with ! invisible characters that is longer than the screen width. The ! prompt_invis_chars_first_line variable could be made into an array ! saying how many invisible characters there are per line, but that's ! probably too much work for the benefit gained. How many people have ! prompts that exceed two physical lines? */ ! temp = ((newlines + 1) * _rl_screenwidth) + ! ((newlines == 0) ? prompt_invis_chars_first_line : 0) + ! ((newlines == 1) ? wrap_offset : 0); inv_lbreaks[++newlines] = temp; ! lpos -= _rl_screenwidth; } + prompt_last_screen_line = newlines; + + /* Draw the rest of the line (after the prompt) into invisible_line, keeping + track of where the cursor is (c_pos), the number of the line containing + the cursor (lb_linenum), the last line number (lb_botlin and inv_botlin). + It maintains an array of line breaks for display (inv_lbreaks). + This handles expanding tabs for display and displaying meta characters. */ lb_linenum = 0; for (in = 0; in < rl_end; in++) *************** *** 504,510 **** sprintf (line + out, "\\%o", c); ! if (lpos + 4 >= screenwidth) { ! temp = screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp; --- 548,554 ---- sprintf (line + out, "\\%o", c); ! if (lpos + 4 >= _rl_screenwidth) { ! temp = _rl_screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp; *************** *** 525,529 **** else if (c == '\t') { ! register int temp, newout; #if 0 --- 569,573 ---- else if (c == '\t') { ! register int newout; #if 0 *************** *** 533,540 **** #endif temp = newout - out; ! if (lpos + temp >= screenwidth) { register int temp2; ! temp2 = screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp2; --- 577,584 ---- #endif temp = newout - out; ! if (lpos + temp >= _rl_screenwidth) { register int temp2; ! temp2 = _rl_screenwidth - lpos; CHECK_INV_LBREAKS (); inv_lbreaks[++newlines] = out + temp2; *************** *** 551,555 **** } #endif ! else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && term_up && *term_up) { line[out++] = '\0'; /* XXX - sentinel */ --- 595,599 ---- } #endif ! else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { line[out++] = '\0'; /* XXX - sentinel */ *************** *** 583,587 **** cursor_linenum = lb_linenum; ! /* C_POS == position in buffer where cursor should be placed. */ /* PWP: now is when things get a bit hairy. The visible and invisible --- 627,632 ---- cursor_linenum = lb_linenum; ! /* C_POS == position in buffer where cursor should be placed. ! CURSOR_LINENUM == line number where the cursor should be placed. */ /* PWP: now is when things get a bit hairy. The visible and invisible *************** *** 594,598 **** horizontally scroll it. */ ! if (_rl_horizontal_scroll_mode == 0 && term_up && *term_up) { int nleft, pos, changed_screen_line; --- 639,643 ---- horizontally scroll it. */ ! if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up) { int nleft, pos, changed_screen_line; *************** *** 605,610 **** only display a screenful. We should display the last screen, not the first. */ ! if (out >= screenchars) ! out = screenchars - 1; /* The first line is at character position 0 in the buffer. The --- 650,655 ---- only display a screenful. We should display the last screen, not the first. */ ! if (out >= _rl_screenchars) ! out = _rl_screenchars - 1; /* The first line is at character position 0 in the buffer. The *************** *** 636,640 **** (_rl_last_c_pos < visible_first_line_len)) { ! nleft = screenwidth + wrap_offset - _rl_last_c_pos; if (nleft) _rl_clear_to_eol (nleft); --- 681,685 ---- (_rl_last_c_pos < visible_first_line_len)) { ! nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos; if (nleft) _rl_clear_to_eol (nleft); *************** *** 657,661 **** _rl_move_cursor_relative (0, tt); _rl_clear_to_eol ! ((linenum == _rl_vis_botlin) ? strlen (tt) : screenwidth); } } --- 702,706 ---- _rl_move_cursor_relative (0, tt); _rl_clear_to_eol ! ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth); } } *************** *** 668,672 **** { _rl_move_vert (cursor_linenum); ! /* If we moved up to the line with the prompt using term_up, the physical cursor position on the screen stays the same, but the buffer position needs to be adjusted to account --- 713,717 ---- { _rl_move_vert (cursor_linenum); ! /* If we moved up to the line with the prompt using _rl_term_up, the physical cursor position on the screen stays the same, but the buffer position needs to be adjusted to account *************** *** 681,693 **** only need to reprint it if the cursor is before the last invisible character in the prompt string. */ ! nleft = visible_length + wrap_offset; if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 && ! _rl_last_c_pos <= last_invisible && local_prompt) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! if (term_cr) ! tputs (term_cr, 1, _rl_output_character_function); #endif _rl_output_some_chars (local_prompt, nleft); --- 726,738 ---- only need to reprint it if the cursor is before the last invisible character in the prompt string. */ ! nleft = prompt_visible_length + wrap_offset; if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 && ! _rl_last_c_pos <= prompt_last_invisible && local_prompt) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! if (_rl_term_cr) ! tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_output_some_chars (local_prompt, nleft); *************** *** 728,736 **** /* The number of characters that will be displayed before the cursor. */ ndisp = c_pos - wrap_offset; ! nleft = visible_length + wrap_offset; /* Where the new cursor position will be on the screen. This can be longer than SCREENWIDTH; if it is, lmargin will be adjusted. */ phys_c_pos = c_pos - (last_lmargin ? last_lmargin : wrap_offset); ! t = screenwidth / 3; /* If the number of characters had already exceeded the screenwidth, --- 773,781 ---- /* The number of characters that will be displayed before the cursor. */ ndisp = c_pos - wrap_offset; ! nleft = prompt_visible_length + wrap_offset; /* Where the new cursor position will be on the screen. This can be longer than SCREENWIDTH; if it is, lmargin will be adjusted. */ phys_c_pos = c_pos - (last_lmargin ? last_lmargin : wrap_offset); ! t = _rl_screenwidth / 3; /* If the number of characters had already exceeded the screenwidth, *************** *** 740,744 **** width, compute the starting offset so that the cursor is about two-thirds of the way across the screen. */ ! if (phys_c_pos > screenwidth - 2) { lmargin = c_pos - (2 * t); --- 785,789 ---- width, compute the starting offset so that the cursor is about two-thirds of the way across the screen. */ ! if (phys_c_pos > _rl_screenwidth - 2) { lmargin = c_pos - (2 * t); *************** *** 750,754 **** lmargin = nleft; } ! else if (ndisp < screenwidth - 2) /* XXX - was -1 */ lmargin = 0; else if (phys_c_pos < 1) --- 795,799 ---- lmargin = nleft; } ! else if (ndisp < _rl_screenwidth - 2) /* XXX - was -1 */ lmargin = 0; else if (phys_c_pos < 1) *************** *** 772,776 **** right edge of the screen. If LMARGIN is 0, we need to take the wrap offset into account. */ ! t = lmargin + M_OFFSET (lmargin, wrap_offset) + screenwidth; if (t < out) line[t - 1] = '>'; --- 817,821 ---- right edge of the screen. If LMARGIN is 0, we need to take the wrap offset into account. */ ! t = lmargin + M_OFFSET (lmargin, wrap_offset) + _rl_screenwidth; if (t < out) line[t - 1] = '>'; *************** *** 782,787 **** &invisible_line[lmargin], 0, ! screenwidth + visible_wrap_offset, ! screenwidth + (lmargin ? 0 : wrap_offset), 0); --- 827,832 ---- &invisible_line[lmargin], 0, ! _rl_screenwidth + visible_wrap_offset, ! _rl_screenwidth + (lmargin ? 0 : wrap_offset), 0); *************** *** 794,803 **** t < visible_first_line_len) { ! nleft = screenwidth - t; _rl_clear_to_eol (nleft); } visible_first_line_len = out - lmargin - M_OFFSET (lmargin, wrap_offset); ! if (visible_first_line_len > screenwidth) ! visible_first_line_len = screenwidth; _rl_move_cursor_relative (c_pos - lmargin, &invisible_line[lmargin]); --- 839,848 ---- t < visible_first_line_len) { ! nleft = _rl_screenwidth - t; _rl_clear_to_eol (nleft); } visible_first_line_len = out - lmargin - M_OFFSET (lmargin, wrap_offset); ! if (visible_first_line_len > _rl_screenwidth) ! visible_first_line_len = _rl_screenwidth; _rl_move_cursor_relative (c_pos - lmargin, &invisible_line[lmargin]); *************** *** 809,817 **** /* Swap visible and non-visible lines. */ { ! char *temp = visible_line; int *itemp = vis_lbreaks, ntemp = vis_lbsize; visible_line = invisible_line; ! invisible_line = temp; vis_lbreaks = inv_lbreaks; --- 854,862 ---- /* Swap visible and non-visible lines. */ { ! char *vtemp = visible_line; int *itemp = vis_lbreaks, ntemp = vis_lbsize; visible_line = invisible_line; ! invisible_line = vtemp; vis_lbreaks = inv_lbreaks; *************** *** 863,867 **** position of the cursor. */ temp = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); ! if (temp == screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode && _rl_last_v_pos == current_line - 1) { --- 908,912 ---- position of the cursor. */ 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) { *************** *** 940,950 **** od = ofd - old; /* index of first difference in visible line */ if (current_line == 0 && !_rl_horizontal_scroll_mode && ! term_cr && lendiff > visible_length && _rl_last_c_pos > 0 && ! od > lendiff && _rl_last_c_pos < last_invisible) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (term_cr, 1, _rl_output_character_function); #endif _rl_output_some_chars (local_prompt, lendiff); --- 985,995 ---- od = ofd - old; /* index of first difference in visible line */ if (current_line == 0 && !_rl_horizontal_scroll_mode && ! _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 && ! od >= lendiff && _rl_last_c_pos <= prompt_last_invisible) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_output_some_chars (local_prompt, lendiff); *************** *** 974,985 **** of lines, make sure we actually cause the new line to wrap around on auto-wrapping terminals. */ ! if (terminal_can_insert && ((2 * temp) >= lendiff || term_IC) && (!_rl_term_autowrap || !gl)) { ! /* If lendiff > visible_length and _rl_last_c_pos == 0 and _rl_horizontal_scroll_mode == 1, inserting the characters with ! term_IC or term_ic will screw up the screen because of the invisible characters. We need to just draw them. */ if (*ols && (!_rl_horizontal_scroll_mode || _rl_last_c_pos > 0 || ! lendiff <= visible_length || !current_invis_chars)) { insert_some_chars (nfd, lendiff); --- 1019,1030 ---- 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 _rl_horizontal_scroll_mode == 1, inserting the characters with ! _rl_term_IC or _rl_term_ic will screw up the screen because of the invisible characters. We need to just draw them. */ if (*ols && (!_rl_horizontal_scroll_mode || _rl_last_c_pos > 0 || ! lendiff <= prompt_visible_length || !current_invis_chars)) { insert_some_chars (nfd, lendiff); *************** *** 1022,1026 **** { /* If possible and inexpensive to use terminal deletion, then do so. */ ! if (term_dc && (2 * temp) >= -lendiff) { /* If all we're doing is erasing the invisible characters in the --- 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 *************** *** 1107,1111 **** to use the real screenwidth. Readline's notion of screenwidth might be one less, see terminal.c. */ ! real_screenwidth = screenwidth + (_rl_term_autowrap ? 0 : 1); _rl_last_v_pos = l / real_screenwidth; /* If the prompt length is a multiple of real_screenwidth, we don't know --- 1152,1156 ---- to use the real screenwidth. Readline's notion of screenwidth might be one less, see terminal.c. */ ! real_screenwidth = _rl_screenwidth + (_rl_term_autowrap ? 0 : 1); _rl_last_v_pos = l / real_screenwidth; /* If the prompt length is a multiple of real_screenwidth, we don't know *************** *** 1152,1156 **** _rl_move_cursor_relative (new, data) int new; ! char *data; { register int i; --- 1197,1201 ---- _rl_move_cursor_relative (new, data) int new; ! const char *data; { register int i; *************** *** 1164,1173 **** i = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); if (new == 0 || CR_FASTER (new, _rl_last_c_pos) || ! (_rl_term_autowrap && i == screenwidth)) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (term_cr, 1, _rl_output_character_function); #endif /* !__MSDOS__ */ _rl_last_c_pos = 0; --- 1209,1218 ---- i = _rl_last_c_pos - W_OFFSET(_rl_last_v_pos, visible_wrap_offset); if (new == 0 || CR_FASTER (new, _rl_last_c_pos) || ! (_rl_term_autowrap && i == _rl_screenwidth)) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (_rl_term_cr, 1, _rl_output_character_function); #endif /* !__MSDOS__ */ _rl_last_c_pos = 0; *************** *** 1186,1192 **** data is underneath the cursor. */ #if defined (HACK_TERMCAP_MOTION) ! if (term_forward_char) for (i = _rl_last_c_pos; i < new; i++) ! tputs (term_forward_char, 1, _rl_output_character_function); else for (i = _rl_last_c_pos; i < new; i++) --- 1231,1237 ---- data is underneath the cursor. */ #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++) *************** *** 1209,1213 **** register int delta, i; ! if (_rl_last_v_pos == to || to > screenheight) return; --- 1254,1258 ---- register int delta, i; ! if (_rl_last_v_pos == to || to > _rl_screenheight) return; *************** *** 1219,1223 **** putc ('\r', rl_outstream); #else ! tputs (term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; --- 1264,1268 ---- putc ('\r', rl_outstream); #else ! tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; *************** *** 1225,1231 **** else { /* delta < 0 */ ! if (term_up && *term_up) for (i = 0; i < -delta; i++) ! tputs (term_up, 1, _rl_output_character_function); } --- 1270,1276 ---- else { /* delta < 0 */ ! if (_rl_term_up && *_rl_term_up) for (i = 0; i < -delta; i++) ! tputs (_rl_term_up, 1, _rl_output_character_function); } *************** *** 1361,1369 **** saved_local_prompt = local_prompt; saved_local_prefix = local_prompt_prefix; ! saved_last_invisible = last_invisible; ! saved_visible_length = visible_length; local_prompt = local_prompt_prefix = (char *)0; ! last_invisible = visible_length = 0; } --- 1406,1414 ---- saved_local_prompt = local_prompt; saved_local_prefix = local_prompt_prefix; ! saved_last_invisible = prompt_last_invisible; ! saved_visible_length = prompt_visible_length; local_prompt = local_prompt_prefix = (char *)0; ! prompt_last_invisible = prompt_visible_length = 0; } *************** *** 1371,1383 **** rl_restore_prompt () { ! if (local_prompt) ! free (local_prompt); ! if (local_prompt_prefix) ! free (local_prompt_prefix); local_prompt = saved_local_prompt; local_prompt_prefix = saved_local_prefix; ! last_invisible = saved_last_invisible; ! visible_length = saved_visible_length; } --- 1416,1426 ---- rl_restore_prompt () { ! FREE (local_prompt); ! FREE (local_prompt_prefix); local_prompt = saved_local_prompt; local_prompt_prefix = saved_local_prefix; ! prompt_last_invisible = saved_last_invisible; ! prompt_visible_length = saved_visible_length; } *************** *** 1409,1414 **** pmt[len+1] = '\0'; local_prompt = savestring (pmt); ! last_invisible = saved_last_invisible; ! visible_length = saved_visible_length + 1; } return pmt; --- 1452,1457 ---- pmt[len+1] = '\0'; local_prompt = savestring (pmt); ! prompt_last_invisible = saved_last_invisible; ! prompt_visible_length = saved_visible_length + 1; } return pmt; *************** *** 1437,1442 **** int count; { ! if (term_clreol) ! tputs (term_clreol, 1, _rl_output_character_function); else if (count) space_to_eol (count); --- 1480,1485 ---- int count; { ! if (_rl_term_clreol) ! tputs (_rl_term_clreol, 1, _rl_output_character_function); else if (count) space_to_eol (count); *************** *** 1460,1467 **** _rl_clear_screen () { ! if (term_clrpag) ! tputs (term_clrpag, 1, _rl_output_character_function); else ! crlf (); } --- 1503,1510 ---- _rl_clear_screen () { ! if (_rl_term_clrpag) ! tputs (_rl_term_clrpag, 1, _rl_output_character_function); else ! rl_crlf (); } *************** *** 1473,1480 **** { /* If IC is defined, then we do not have to "enter" insert mode. */ ! if (term_IC) { char *buffer; ! buffer = tgoto (term_IC, 0, count); tputs (buffer, 1, _rl_output_character_function); _rl_output_some_chars (string, count); --- 1516,1523 ---- { /* 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); *************** *** 1485,1497 **** /* If we have to turn on insert-mode, then do so. */ ! if (term_im && *term_im) ! tputs (term_im, 1, _rl_output_character_function); /* If there is a special command for inserting characters, then use that first to open up the space. */ ! if (term_ic && *term_ic) { for (i = count; i--; ) ! tputs (term_ic, 1, _rl_output_character_function); } --- 1528,1540 ---- /* If we have to turn on insert-mode, then do so. */ ! if (_rl_term_im && *_rl_term_im) ! tputs (_rl_term_im, 1, _rl_output_character_function); /* If there is a special command for inserting characters, then use that first to open up the space. */ ! if (_rl_term_ic && *_rl_term_ic) { for (i = count; i--; ) ! tputs (_rl_term_ic, 1, _rl_output_character_function); } *************** *** 1501,1506 **** /* If there is a string to turn off insert mode, we had best use it now. */ ! if (term_ei && *term_ei) ! tputs (term_ei, 1, _rl_output_character_function); } } --- 1544,1549 ---- /* If there is a string to turn off insert mode, we had best use it now. */ ! if (_rl_term_ei && *_rl_term_ei) ! tputs (_rl_term_ei, 1, _rl_output_character_function); } } *************** *** 1511,1528 **** int count; { ! if (count > screenwidth) /* XXX */ return; ! if (term_DC && *term_DC) { char *buffer; ! buffer = tgoto (term_DC, count, count); tputs (buffer, count, _rl_output_character_function); } else { ! if (term_dc && *term_dc) while (count--) ! tputs (term_dc, 1, _rl_output_character_function); } } --- 1554,1571 ---- int count; { ! if (count > _rl_screenwidth) /* XXX */ return; ! if (_rl_term_DC && *_rl_term_DC) { char *buffer; ! buffer = tgoto (_rl_term_DC, count, count); tputs (buffer, count, _rl_output_character_function); } else { ! if (_rl_term_dc && *_rl_term_dc) while (count--) ! tputs (_rl_term_dc, 1, _rl_output_character_function); } } *************** *** 1544,1548 **** _rl_move_vert (_rl_vis_botlin); /* If we've wrapped lines, remove the final xterm line-wrap flag. */ ! if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == screenwidth)) { char *last_line; --- 1587,1591 ---- _rl_move_vert (_rl_vis_botlin); /* If we've wrapped lines, remove the final xterm line-wrap flag. */ ! if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == _rl_screenwidth)) { char *last_line; *************** *** 1552,1561 **** last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; #endif ! _rl_move_cursor_relative (screenwidth - 1, last_line); _rl_clear_to_eol (0); ! putc (last_line[screenwidth - 1], rl_outstream); } _rl_vis_botlin = 0; ! crlf (); fflush (rl_outstream); rl_display_fixed++; --- 1595,1604 ---- last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]]; #endif ! _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); _rl_clear_to_eol (0); ! putc (last_line[_rl_screenwidth - 1], rl_outstream); } _rl_vis_botlin = 0; ! rl_crlf (); fflush (rl_outstream); rl_display_fixed++; *************** *** 1566,1575 **** cr () { ! if (term_cr) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; --- 1609,1618 ---- cr () { ! if (_rl_term_cr) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; *************** *** 1585,1589 **** { char *oldp, *oldl, *oldlprefix; ! int oldlen, oldlast, oldplen; /* Geez, I should make this a struct. */ --- 1628,1632 ---- { char *oldp, *oldl, *oldlprefix; ! int oldlen, oldlast, oldplen, oldninvis; /* Geez, I should make this a struct. */ *************** *** 1591,1600 **** oldl = local_prompt; oldlprefix = local_prompt_prefix; ! oldlen = visible_length; ! oldplen = prefix_length; ! oldlast = last_invisible; rl_display_prompt = t; ! local_prompt = expand_prompt (t, &visible_length, &last_invisible); local_prompt_prefix = (char *)NULL; rl_forced_update_display (); --- 1634,1646 ---- oldl = local_prompt; oldlprefix = local_prompt_prefix; ! oldlen = prompt_visible_length; ! oldplen = prompt_prefix_length; ! oldlast = prompt_last_invisible; ! oldninvis = prompt_invis_chars_first_line; rl_display_prompt = t; ! local_prompt = expand_prompt (t, &prompt_visible_length, ! &prompt_last_invisible, ! &prompt_invis_chars_first_line); local_prompt_prefix = (char *)NULL; rl_forced_update_display (); *************** *** 1603,1609 **** local_prompt = oldl; local_prompt_prefix = oldlprefix; ! visible_length = oldlen; ! prefix_length = oldplen; ! last_invisible = oldlast; } --- 1649,1656 ---- local_prompt = oldl; local_prompt_prefix = oldlprefix; ! prompt_visible_length = oldlen; ! prompt_prefix_length = oldplen; ! prompt_last_invisible = oldlast; ! prompt_invis_chars_first_line = oldninvis; } *************** *** 1616,1637 **** /* Clear the current line and put the cursor at column 0. Make sure the right thing happens if we have wrapped to a new screen line. */ ! if (term_cr) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; #if defined (__MSDOS__) ! space_to_eol (screenwidth); putc ('\r', rl_outstream); #else ! if (term_clreol) ! tputs (term_clreol, 1, _rl_output_character_function); else { ! space_to_eol (screenwidth); ! tputs (term_cr, 1, _rl_output_character_function); } #endif --- 1663,1684 ---- /* Clear the current line and put the cursor at column 0. Make sure the right thing happens if we have wrapped to a new screen line. */ ! if (_rl_term_cr) { #if defined (__MSDOS__) putc ('\r', rl_outstream); #else ! tputs (_rl_term_cr, 1, _rl_output_character_function); #endif _rl_last_c_pos = 0; #if defined (__MSDOS__) ! space_to_eol (_rl_screenwidth); putc ('\r', rl_outstream); #else ! if (_rl_term_clreol) ! tputs (_rl_term_clreol, 1, _rl_output_character_function); else { ! space_to_eol (_rl_screenwidth); ! tputs (_rl_term_cr, 1, _rl_output_character_function); } #endif *************** *** 1640,1644 **** } else ! crlf (); /* Redraw only the last line of a multi-line prompt. */ --- 1687,1691 ---- } else ! rl_crlf (); /* Redraw only the last line of a multi-line prompt. */ *************** *** 1681,1690 **** editing buffer. */ if (rl_display_prompt == rl_prompt) ! nleft = _rl_last_c_pos - screenwidth - rl_visible_prompt_length; else ! nleft = _rl_last_c_pos - screenwidth; if (nleft > 0) ! ret = 1 + nleft / screenwidth; else ret = 0; --- 1728,1737 ---- editing buffer. */ if (rl_display_prompt == rl_prompt) ! nleft = _rl_last_c_pos - _rl_screenwidth - rl_visible_prompt_length; else ! nleft = _rl_last_c_pos - _rl_screenwidth; if (nleft > 0) ! ret = 1 + nleft / _rl_screenwidth; else ret = 0; diff -Nrc2 readline-4.1/doc/Makefile.in readline-4.2/doc/Makefile.in *** readline-4.1/doc/Makefile.in Mon Jan 24 10:28:02 2000 --- readline-4.2/doc/Makefile.in Tue Mar 6 09:05:46 2001 *************** *** 64,74 **** DVIOBJ = readline.dvi history.dvi rluserman.dvi INFOOBJ = readline.info history.info rluserman.info ! PSOBJ = readline.ps history.ps rluserman.ps HTMLOBJ = readline.html history.html rluserman.html ! TEXTOBJ = readline.0 INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi ! CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ) $(TEXTOBJ) .SUFFIXES: .0 .3 .ps .txt .dvi --- 64,74 ---- DVIOBJ = readline.dvi history.dvi rluserman.dvi INFOOBJ = readline.info history.info rluserman.info ! PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps HTMLOBJ = readline.html history.html rluserman.html ! TEXTOBJ = readline.0 history.0 INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi ! DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ) .SUFFIXES: .0 .3 .ps .txt .dvi *************** *** 134,137 **** --- 134,147 ---- readline.0: readline.3 + readline_3.ps: readline.3 + ${RM} $@ + ${GROFF} -man < $(srcdir)/readline.3 > $@ + + history.0: history.3 + + history_3.ps: history.3 + ${RM} $@ + ${GROFF} -man < $(srcdir)/history.3 > $@ + clean: $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ *************** *** 139,143 **** distclean: clean - $(RM) $(CREATED_DOCS) $(RM) $(INTERMEDIATE_OBJ) $(RM) Makefile --- 149,152 ---- *************** *** 146,150 **** maintainer-clean: clean ! $(RM) $(CREATED_DOCS) $(RM) $(INTERMEDIATE_OBJ) $(RM) Makefile --- 155,159 ---- maintainer-clean: clean ! $(RM) $(DIST_DOCS) $(RM) $(INTERMEDIATE_OBJ) $(RM) Makefile *************** *** 174,177 **** --- 183,187 ---- else true; fi -${INSTALL_DATA} $(srcdir)/readline.3 $(man3dir)/readline.3 + -${INSTALL_DATA} $(srcdir)/history.3 $(man3dir)/history.3 uninstall: *************** *** 180,181 **** --- 190,192 ---- $(RM) $(infodir)/history.info $(RM) $(man3dir)/readline.3 + $(RM) $(man3dir)/history.3 diff -Nrc2 readline-4.1/doc/hist.texinfo readline-4.2/doc/hist.texinfo *** readline-4.1/doc/hist.texinfo Thu Aug 5 08:25:11 1999 --- readline-4.2/doc/hist.texinfo Fri Feb 2 11:37:12 2001 *************** *** 19,23 **** typed input. ! Copyright (C) 1988-1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of --- 19,23 ---- typed input. ! Copyright (C) 1988-2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of *************** *** 74,78 **** @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-1999 Free Software Foundation, Inc. @end titlepage --- 74,78 ---- @vskip 0pt plus 1filll ! Copyright @copyright{} 1988-2001 Free Software Foundation, Inc. @end titlepage diff -Nrc2 readline-4.1/doc/history.0 readline-4.2/doc/history.0 *** readline-4.1/doc/history.0 Wed Dec 31 19:00:00 1969 --- readline-4.2/doc/history.0 Mon Apr 16 10:53:07 2001 *************** *** 0 **** --- 1,660 ---- + + + + HISTORY(3) HISTORY(3) + + + NNAAMMEE + history - GNU History Library + + CCOOPPYYRRIIGGHHTT + The GNU History Library is Copyright (C) 1989-2001 by the + Free Software Foundation, Inc. + + DDEESSCCRRIIPPTTIIOONN + Many programs read input from the user a line at a time. + The GNU History library is able to keep track of those + lines, associate arbitrary data with each line, and uti- + lize information from previous lines in composing new + ones. + + + HHIISSTTOORRYY EEXXPPAANNSSIIOONN + The history library supports a history expansion feature + that is identical to the history expansion in bbaasshh.. This + section describes what syntax features are available. + + History expansions introduce words from the history list + into the input stream, making it easy to repeat commands, + insert the arguments to a previous command into the cur- + rent input line, or fix errors in previous commands + quickly. + + History expansion is usually performed immediately after a + complete line is read. It takes place in two parts. The + first is to determine which line from the history list to + use during substitution. The second is to select portions + of that line for inclusion into the current one. The line + selected from the history is the _e_v_e_n_t, and the portions + of that line that are acted upon are _w_o_r_d_s. Various _m_o_d_i_- + _f_i_e_r_s are available to manipulate the selected words. The + line is broken into words in the same fashion as bbaasshh does + when reading input, so that several words that would oth- + erwise be separated are considered one word when sur- + rounded by quotes (see the description of hhiissttoorryy__ttookk-- + eenniizzee(()) below). History expansions are introduced by the + appearance of the history expansion character, which is !! + by default. Only backslash (\\) and single quotes can + quote the history expansion character. + + EEvveenntt DDeessiiggnnaattoorrss + An event designator is a reference to a command line entry + in the history list. + + !! Start a history substitution, except when followed + by a bbllaannkk, newline, = or (. + !!_n Refer to command line _n. + !!--_n Refer to the current command line minus _n. + !!!! Refer to the previous command. This is a synonym + for `!-1'. + + + + + GNU History 4.2 2001 Mar 6 1 + + + + + + HISTORY(3) HISTORY(3) + + + !!_s_t_r_i_n_g + Refer to the most recent command starting with + _s_t_r_i_n_g. + !!??_s_t_r_i_n_g[[??]] + Refer to the most recent command containing _s_t_r_i_n_g. + The trailing ?? may be omitted if _s_t_r_i_n_g is followed + immediately by a newline. + ^^_s_t_r_i_n_g_1^^_s_t_r_i_n_g_2^^ + Quick substitution. Repeat the last command, + replacing _s_t_r_i_n_g_1 with _s_t_r_i_n_g_2. Equivalent to + ``!!:s/_s_t_r_i_n_g_1/_s_t_r_i_n_g_2/'' (see MMooddiiffiieerrss below). + !!## The entire command line typed so far. + + WWoorrdd DDeessiiggnnaattoorrss + Word designators are used to select desired words from the + event. A :: separates the event specification from the + word designator. It may be omitted if the word designator + begins with a ^^, $$, **, --, or %%. Words are numbered from + the beginning of the line, with the first word being + denoted by 0 (zero). Words are inserted into the current + line separated by single spaces. + + 00 ((zzeerroo)) + The zeroth word. For the shell, this is the com- + mand word. + _n The _nth word. + ^^ The first argument. That is, word 1. + $$ The last argument. + %% The word matched by the most recent `?_s_t_r_i_n_g?' + search. + _x--_y A range of words; `-_y' abbreviates `0-_y'. + ** All of the words but the zeroth. This is a synonym + for `_1_-_$'. It is not an error to use ** if there is + just one word in the event; the empty string is + returned in that case. + xx** Abbreviates _x_-_$. + xx-- Abbreviates _x_-_$ like xx**, but omits the last word. + + If a word designator is supplied without an event specifi- + cation, the previous command is used as the event. + + MMooddiiffiieerrss + After the optional word designator, there may appear a + sequence of one or more of the following modifiers, each + preceded by a `:'. + + hh Remove a trailing file name component, leaving only + the head. + tt Remove all leading file name components, leaving + the tail. + rr Remove a trailing suffix of the form _._x_x_x, leaving + the basename. + ee Remove all but the trailing suffix. + pp Print the new command but do not execute it. + + + + GNU History 4.2 2001 Mar 6 2 + + + + + + HISTORY(3) HISTORY(3) + + + qq Quote the substituted words, escaping further sub- + stitutions. + xx Quote the substituted words as with qq, but break + into words at bbllaannkkss and newlines. + ss//_o_l_d//_n_e_w// + Substitute _n_e_w for the first occurrence of _o_l_d in + the event line. Any delimiter can be used in place + of /. The final delimiter is optional if it is the + last character of the event line. The delimiter + may be quoted in _o_l_d and _n_e_w with a single back- + slash. If & appears in _n_e_w, it is replaced by _o_l_d. + A single backslash will quote the &. If _o_l_d is + null, it is set to the last _o_l_d substituted, or, if + no previous history substitutions took place, the + last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search. + && Repeat the previous substitution. + gg Cause changes to be applied over the entire event + line. This is used in conjunction with `::ss' (e.g., + `::ggss//_o_l_d//_n_e_w//') or `::&&'. If used with `::ss', any + delimiter can be used in place of /, and the final + delimiter is optional if it is the last character + of the event line. + + PPRROOGGRRAAMMMMIINNGG WWIITTHH HHIISSTTOORRYY FFUUNNCCTTIIOONNSS + This section describes how to use the History library in + other programs. + + IInnttrroodduuccttiioonn ttoo HHiissttoorryy + The programmer using the History library has available + functions for remembering lines on a history list, associ- + ating arbitrary data with a line, removing lines from the + list, searching through the list for a line containing an + arbitrary text string, and referencing any line in the + list directly. In addition, a history _e_x_p_a_n_s_i_o_n function + is available which provides for a consistent user inter- + face across different programs. + + The user using programs written with the History library + has the benefit of a consistent user interface with a set + of well-known commands for manipulating the text of previ- + ous lines and using that text in new commands. The basic + history manipulation commands are identical to the history + substitution provided by bbaasshh. + + If the programmer desires, he can use the Readline + library, which includes some history manipulation by + default, and has the added advantage of command line edit- + ing. + + Before declaring any functions using any functionality the + History library provides in other code, an application + writer should include the file _<_r_e_a_d_l_i_n_e_/_h_i_s_t_o_r_y_._h_> in any + file that uses the History library's features. It sup- + plies extern declarations for all of the library's public + + + + GNU History 4.2 2001 Mar 6 3 + + + + + + HISTORY(3) HISTORY(3) + + + functions and variables, and declares all of the public + data structures. + + + HHiissttoorryy SSttoorraaggee + The history list is an array of history entries. A his- + tory entry is declared as follows: + + _t_y_p_e_d_e_f _v_o_i_d _* hhiissttddaattaa__tt;; + + typedef struct _hist_entry { + char *line; + histdata_t data; + } HIST_ENTRY; + + The history list itself might therefore be declared as + + _H_I_S_T___E_N_T_R_Y _*_* tthhee__hhiissttoorryy__lliisstt;; + + The state of the History library is encapsulated into a + single structure: + + /* + * A structure used to pass around the current state of the history. + */ + typedef struct _hist_state { + HIST_ENTRY **entries; /* Pointer to the entries themselves. */ + int offset; /* The location pointer within this array. */ + int length; /* Number of elements within this array. */ + int size; /* Number of slots allocated to this array. */ + int flags; + } HISTORY_STATE; + + If the flags member includes HHSS__SSTTIIFFLLEEDD, the history has + been stifled. + + HHiissttoorryy FFuunnccttiioonnss + This section describes the calling sequence for the vari- + ous functions exported by the GNU History library. + + IInniittiiaalliizziinngg HHiissttoorryy aanndd SSttaattee MMaannaaggeemmeenntt + This section describes functions used to initialize and + manage the state of the History library when you want to + use the history functions in your program. + + _v_o_i_d uussiinngg__hhiissttoorryy (_v_o_i_d) + Begin a session in which the history functions might be + used. This initializes the interactive variables. + + _H_I_S_T_O_R_Y___S_T_A_T_E _* hhiissttoorryy__ggeett__hhiissttoorryy__ssttaattee (_v_o_i_d) + Return a structure describing the current state of the + input history. + + _v_o_i_d hhiissttoorryy__sseett__hhiissttoorryy__ssttaattee (_H_I_S_T_O_R_Y___S_T_A_T_E _*_s_t_a_t_e) + + + + GNU History 4.2 2001 Mar 6 4 + + + + + + HISTORY(3) HISTORY(3) + + + Set the state of the history list according to _s_t_a_t_e. + + + HHiissttoorryy LLiisstt MMaannaaggeemmeenntt + These functions manage individual entries on the history + list, or set parameters managing the list itself. + + _v_o_i_d aadddd__hhiissttoorryy (_c_o_n_s_t _c_h_a_r _*_s_t_r_i_n_g) + Place _s_t_r_i_n_g at the end of the history list. The associ- + ated data field (if any) is set to NNUULLLL. + + _H_I_S_T___E_N_T_R_Y _* rreemmoovvee__hhiissttoorryy (_i_n_t _w_h_i_c_h) + Remove history entry at offset _w_h_i_c_h from the history. + The removed element is returned so you can free the line, + data, and containing structure. + + _H_I_S_T___E_N_T_R_Y _* rreeppllaaccee__hhiissttoorryy__eennttrryy (_i_n_t _w_h_i_c_h_, _c_o_n_s_t _c_h_a_r + _*_l_i_n_e_, _h_i_s_t_d_a_t_a___t _d_a_t_a) + Make the history entry at offset _w_h_i_c_h have _l_i_n_e and _d_a_t_a. + This returns the old entry so you can dispose of the data. + In the case of an invalid _w_h_i_c_h, a NNUULLLL pointer is + returned. + + _v_o_i_d cclleeaarr__hhiissttoorryy (_v_o_i_d) + Clear the history list by deleting all the entries. + + _v_o_i_d ssttiiffllee__hhiissttoorryy (_i_n_t _m_a_x) + Stifle the history list, remembering only the last _m_a_x + entries. + + _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. + + _i_n_t wwhheerree__hhiissttoorryy (_v_o_i_d) + Returns the offset of the current history element. + + _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 + + + + + + HISTORY(3) HISTORY(3) + + + determined by wwhheerree__hhiissttoorryy(()). If there is no entry + there, return a NNUULLLL pointer. + + _H_I_S_T___E_N_T_R_Y _* hhiissttoorryy__ggeett (_i_n_t _o_f_f_s_e_t) + Return the history entry at position _o_f_f_s_e_t, starting from + hhiissttoorryy__bbaassee. If there is no entry there, or if _o_f_f_s_e_t is + greater than the history length, return a NNUULLLL pointer. + + _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. + + _H_I_S_T___E_N_T_R_Y _* pprreevviioouuss__hhiissttoorryy (_v_o_i_d) + Back up the current history offset to the previous history + entry, and return a pointer to that entry. If there is no + previous entry, return a NNUULLLL pointer. + + _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 + + + + + + HISTORY(3) HISTORY(3) + + + 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. + + _i_n_t hhiissttoorryy__sseeaarrcchh__ppooss (_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_, + _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. + + + 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. + + + _i_n_t aappppeenndd__hhiissttoorryy (_i_n_t _n_e_l_e_m_e_n_t_s_, _c_o_n_s_t _c_h_a_r _*_f_i_l_e_n_a_m_e) + Append the last _n_e_l_e_m_e_n_t_s of the history list to _f_i_l_e_n_a_m_e. + If _f_i_l_e_n_a_m_e is NNUULLLL, then append to _~_/_._h_i_s_t_o_r_y. Returns 0 + 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 + + + + + + HISTORY(3) HISTORY(3) + + + 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. + + _i_n_t hhiissttoorryy__bbaassee + The logical offset of the first entry in the history list. + + _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 + + + + + + HISTORY(3) HISTORY(3) + + + _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. + + _c_h_a_r _* hhiissttoorryy__wwoorrdd__ddeelliimmiitteerrss + The characters that separate tokens for hhiissttoorryy__ttookk-- + eenniizzee(()). The default value is "" \\tt\\nn(())<<>>;;&&||"". + + _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. + + FFIILLEESS + _~_/_._h_i_s_t_o_r_y + Default filename for reading and writing saved his- + 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 + + + + + + HISTORY(3) HISTORY(3) + + + _r_e_a_d_l_i_n_e(3) + + AAUUTTHHOORRSS + Brian Fox, Free Software Foundation + bfox@gnu.org + + Chet Ramey, Case Western Reserve University + chet@ins.CWRU.Edu + + 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. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GNU History 4.2 2001 Mar 6 10 + + diff -Nrc2 readline-4.1/doc/history.3 readline-4.2/doc/history.3 *** readline-4.1/doc/history.3 Wed Dec 31 19:00:00 1969 --- readline-4.2/doc/history.3 Mon Mar 12 05:38:09 2001 *************** *** 0 **** --- 1,639 ---- + .\" + .\" MAN PAGE COMMENTS to + .\" + .\" Chet Ramey + .\" Information Network Services + .\" Case Western Reserve University + .\" 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, + .\" but Sun doesn't seem to like that very much. + .\" + .de FN + \fI\|\\$1\|\fP + .. + .ds lp \fR\|(\fP + .ds rp \fR\|)\fP + .\" FnN return-value fun-name N arguments + .de Fn1 + \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3\fP\\*(rp + .br + .. + .de Fn2 + .if t \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3,\|\\$4\fP\\*(rp + .if n \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3, \\$4\fP\\*(rp + .br + .. + .de Fn3 + .if t \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3,\|\\$4,\|\\$5\fP\|\\*(rp + .if n \fI\\$1\fP \fB\\$2\fP \\*(lp\fI\\$3, \\$4, \\$5\fP\\*(rp + .br + .. + .de Vb + \fI\\$1\fP \fB\\$2\fP + .br + .. + .SH NAME + 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 + History library is able to keep track of those lines, associate arbitrary + data with each line, and utilize information from previous lines in + composing new ones. + .PP + .SH "HISTORY EXPANSION" + .PP + The history library supports a history expansion feature that + is identical to the history expansion in + .BR bash. + This section describes what syntax features are available. + .PP + History expansions introduce words from the history list into + the input stream, making it easy to repeat commands, insert the + arguments to a previous command into the current input line, or + fix errors in previous commands quickly. + .PP + History expansion is usually performed immediately after a complete line + is read. + It takes place in two parts. + The first is to determine which line from the history list + to use during substitution. + The second is to select portions of that line for inclusion into + the current one. + The line selected from the history is the \fIevent\fP, + and the portions of that line that are acted upon are \fIwords\fP. + Various \fImodifiers\fP are available to manipulate the selected words. + The line is broken into words in the same fashion as \fBbash\fP + does when reading input, + so that several words that would otherwise be separated + are considered one word when surrounded by quotes (see the + description of \fBhistory_tokenize()\fP below). + History expansions are introduced by the appearance of the + history expansion character, which is \^\fB!\fP\^ by default. + Only backslash (\^\fB\e\fP\^) and single quotes can quote + the history expansion character. + .SS Event Designators + .PP + An event designator is a reference to a command line entry in the + history list. + .PP + .PD 0 + .TP + .B ! + Start a history substitution, except when followed by a + .BR blank , + newline, = or (. + .TP + .B !\fIn\fR + Refer to command line + .IR n . + .TP + .B !\-\fIn\fR + Refer to the current command line minus + .IR n . + .TP + .B !! + Refer to the previous command. This is a synonym for `!\-1'. + .TP + .B !\fIstring\fR + Refer to the most recent command starting with + .IR string . + .TP + .B !?\fIstring\fR\fB[?]\fR + Refer to the most recent command containing + .IR string . + The trailing \fB?\fP may be omitted if + .I string + is followed immediately by a newline. + .TP + .B \d\s+2^\s-2\u\fIstring1\fP\d\s+2^\s-2\u\fIstring2\fP\d\s+2^\s-2\u + Quick substitution. Repeat the last command, replacing + .I string1 + with + .IR string2 . + Equivalent to + ``!!:s/\fIstring1\fP/\fIstring2\fP/'' + (see \fBModifiers\fP below). + .TP + .B !# + The entire command line typed so far. + .PD + .SS Word Designators + .PP + Word designators are used to select desired words from the event. + A + .B : + separates the event specification from the word designator. + It may be omitted if the word designator begins with a + .BR ^ , + .BR $ , + .BR * , + .BR \- , + or + .BR % . + Words are numbered from the beginning of the line, + with the first word being denoted by 0 (zero). + Words are inserted into the current line separated by single spaces. + .PP + .PD 0 + .TP + .B 0 (zero) + The zeroth word. For the shell, this is the command + word. + .TP + .I n + The \fIn\fRth word. + .TP + .B ^ + The first argument. That is, word 1. + .TP + .B $ + The last argument. + .TP + .B % + The word matched by the most recent `?\fIstring\fR?' search. + .TP + .I x\fB\-\fPy + A range of words; `\-\fIy\fR' abbreviates `0\-\fIy\fR'. + .TP + .B * + All of the words but the zeroth. This is a synonym + for `\fI1\-$\fP'. It is not an error to use + .B * + if there is just one + word in the event; the empty string is returned in that case. + .TP + .B x* + Abbreviates \fIx\-$\fP. + .TP + .B x\- + Abbreviates \fIx\-$\fP like \fBx*\fP, but omits the last word. + .PD + .PP + If a word designator is supplied without an event specification, the + previous command is used as the event. + .SS Modifiers + .PP + After the optional word designator, there may appear a sequence of + one or more of the following modifiers, each preceded by a `:'. + .PP + .PD 0 + .PP + .TP + .B h + Remove a trailing file name component, leaving only the head. + .TP + .B t + Remove all leading file name components, leaving the tail. + .TP + .B r + Remove a trailing suffix of the form \fI.xxx\fP, leaving the + basename. + .TP + .B e + Remove all but the trailing suffix. + .TP + .B p + Print the new command but do not execute it. + .TP + .B q + Quote the substituted words, escaping further substitutions. + .TP + .B x + Quote the substituted words as with + .BR q , + but break into words at + .B blanks + and newlines. + .TP + .B s/\fIold\fP/\fInew\fP/ + Substitute + .I new + for the first occurrence of + .I old + in the event line. Any delimiter can be used in place of /. The + final delimiter is optional if it is the last character of the + event line. The delimiter may be quoted in + .I old + and + .I new + with a single backslash. If & appears in + .IR new , + it is replaced by + .IR old . + A single backslash will quote the &. If + .I old + is null, it is set to the last + .I old + substituted, or, if no previous history substitutions took place, + the last + .I string + in a + .B !?\fIstring\fR\fB[?]\fR + search. + .TP + .B & + Repeat the previous substitution. + .TP + .B g + Cause changes to be applied over the entire event line. This is + used in conjunction with `\fB:s\fP' (e.g., `\fB:gs/\fIold\fP/\fInew\fP/\fR') + or `\fB:&\fP'. If used with + `\fB:s\fP', any delimiter can be used + in place of /, and the final delimiter is optional + if it is the last character of the event line. + .PD + .SH "PROGRAMMING WITH HISTORY FUNCTIONS" + This section describes how to use the History library in other programs. + .SS Introduction to History + .PP + The programmer using the History library has available functions + for remembering lines on a history list, associating arbitrary data + with a line, removing lines from the list, searching through the list + for a line containing an arbitrary text string, and referencing any line + in the list directly. In addition, a history \fIexpansion\fP function + is available which provides for a consistent user interface across + different programs. + .PP + The user using programs written with the History library has the + benefit of a consistent user interface with a set of well-known + commands for manipulating the text of previous lines and using that text + in new commands. The basic history manipulation commands are + identical to + the history substitution provided by \fBbash\fP. + .PP + If the programmer desires, he can use the Readline library, which + includes some history manipulation by default, and has the added + advantage of command line editing. + .PP + Before declaring any functions using any functionality the History + library provides in other code, an application writer should include + the file + .FN + in any file that uses the + History library's features. It supplies extern declarations for all + of the library's public functions and variables, and declares all of + the public data structures. + + .SS History Storage + .PP + The history list is an array of history entries. A history entry is + declared as follows: + .PP + .Vb "typedef void *" histdata_t; + .PP + .nf + typedef struct _hist_entry { + char *line; + histdata_t data; + } HIST_ENTRY; + .fi + .PP + The history list itself might therefore be declared as + .PP + .Vb "HIST_ENTRY **" the_history_list; + .PP + The state of the History library is encapsulated into a single structure: + .PP + .nf + /* + * A structure used to pass around the current state of the history. + */ + typedef struct _hist_state { + HIST_ENTRY **entries; /* Pointer to the entries themselves. */ + int offset; /* The location pointer within this array. */ + int length; /* Number of elements within this array. */ + int size; /* Number of slots allocated to this array. */ + int flags; + } HISTORY_STATE; + .fi + .PP + If the flags member includes \fBHS_STIFLED\fP, the history has been + stifled. + .SH "History Functions" + .PP + This section describes the calling sequence for the various functions + exported by the GNU History library. + .SS Initializing History and State Management + This section describes functions used to initialize and manage + the state of the History library when you want to use the history + functions in your program. + + .Fn1 void using_history void + Begin a session in which the history functions might be used. This + initializes the interactive variables. + + .Fn1 "HISTORY_STATE *" history_get_history_state void + Return a structure describing the current state of the input history. + + .Fn1 void history_set_history_state "HISTORY_STATE *state" + Set the state of the history list according to \fIstate\fP. + + .SS History List Management + + These functions manage individual entries on the history list, or set + parameters managing the list itself. + + .Fn1 void add_history "const char *string" + Place \fIstring\fP at the end of the history list. The associated data + field (if any) is set to \fBNULL\fP. + + .Fn1 "HIST_ENTRY *" remove_history "int which" + Remove history entry at offset \fIwhich\fP from the history. The + removed element is returned so you can free the line, data, + and containing structure. + + .Fn3 "HIST_ENTRY *" replace_history_entry "int which" "const char *line" "histdata_t data" + Make the history entry at offset \fIwhich\fP have \fIline\fP and \fIdata\fP. + This returns the old entry so you can dispose of the data. In the case + of an invalid \fIwhich\fP, a \fBNULL\fP pointer is returned. + + .Fn1 void clear_history "void" + Clear the history list by deleting all the entries. + + .Fn1 void stifle_history "int max" + Stifle the history list, remembering only the last \fImax\fP entries. + + .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. + + .Fn1 int history_is_stifled "void" + Returns non-zero if the history is stifled, zero if it is not. + + .SS Information About the History List + + These functions return information about the entire history list or + individual list entries. + + .Fn1 "HIST_ENTRY **" history_list "void" + Return a \fBNULL\fP terminated array of \fIHIST_ENTRY *\fP which is the + current input history. Element 0 of this list is the beginning of time. + If there is no history, return \fBNULL\fP. + + .Fn1 int where_history "void" + Returns the offset of the current history element. + + .Fn1 "HIST_ENTRY *" current_history "void" + Return the history entry at the current position, as determined by + \fBwhere_history()\fP. If there is no entry there, return a \fBNULL\fP + pointer. + + .Fn1 "HIST_ENTRY *" history_get "int offset" + Return the history entry at position \fIoffset\fP, starting from + \fBhistory_base\fP. + If there is no entry there, or if \fIoffset\fP + is greater than the history length, return a \fBNULL\fP pointer. + + .Fn1 int history_total_bytes "void" + Return the number of bytes that the primary history entries are using. + This function returns the sum of the lengths of all the lines in the + history. + + .SS Moving Around the History List + + These functions allow the current index into the history list to be + set or changed. + + .Fn1 int history_set_pos "int pos" + Set the current history offset to \fIpos\fP, an absolute index + into the list. + Returns 1 on success, 0 if \fIpos\fP is less than zero or greater + than the number of history entries. + + .Fn1 "HIST_ENTRY *" previous_history "void" + Back up the current history offset to the previous history entry, and + return a pointer to that entry. If there is no previous entry, return + a \fBNULL\fP pointer. + + .Fn1 "HIST_ENTRY *" next_history "void" + Move the current history offset forward to the next history entry, and + return the a pointer to that entry. If there is no next entry, return + a \fBNULL\fP pointer. + + .SS Searching the History List + + These functions allow searching of the history list for entries containing + a specific string. Searching may be performed both forward and backward + from the current history position. The search may be \fIanchored\fP, + meaning that the string must match at the beginning of the history entry. + + .Fn2 int history_search "const char *string" "int direction" + Search the history for \fIstring\fP, starting at the current history offset. + If \fIdirection\fP is less than 0, then the search is through + previous entries, otherwise through subsequent entries. + If \fIstring\fP 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 + \fIstring\fP was found. Otherwise, nothing is changed, and a -1 is + returned. + + .Fn2 int history_search_prefix "const char *string" "int direction" + Search the history for \fIstring\fP, starting at the current history + offset. The search is anchored: matching lines must begin with + \fIstring\fP. If \fIdirection\fP is less than 0, then the search is + through previous entries, otherwise through subsequent entries. + If \fIstring\fP 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. + + .Fn3 int history_search_pos "const char *string" "int direction" "int pos" + Search for \fIstring\fP in the history list, starting at \fIpos\fP, an + absolute index into the list. If \fIdirection\fP is negative, the search + proceeds backward from \fIpos\fP, otherwise forward. Returns the absolute + index of the history element where \fIstring\fP was found, or -1 otherwise. + + .SS Managing the History File + The History library can read the history from and write it to a file. + This section documents the functions for managing a history file. + + .Fn1 int read_history "const char *filename" + Add the contents of \fIfilename\fP to the history list, a line at a time. + If \fIfilename\fP is \fBNULL\fP, then read from \fI~/.history\fP. + Returns 0 if successful, or \fBerrno\fP if not. + + .Fn3 int read_history_range "const char *filename" "int from" "int to" + Read a range of lines from \fIfilename\fP, adding them to the history list. + Start reading at line \fIfrom\fP and end at \fIto\fP. + If \fIfrom\fP is zero, start at the beginning. If \fIto\fP is less than + \fIfrom\fP, then read until the end of the file. If \fIfilename\fP is + \fBNULL\fP, then read from \fI~/.history\fP. Returns 0 if successful, + or \fBerrno\fP if not. + + .Fn1 int write_history "const char *filename" + Write the current history to \fIfilename\fP, overwriting \fIfilename\fP + if necessary. + If \fIfilename\fP is \fBNULL\fP, then write the history list to \fI~/.history\fP. + Returns 0 on success, or \fBerrno\fP on a read or write error. + + + .Fn2 int append_history "int nelements" "const char *filename" + Append the last \fInelements\fP of the history list to \fIfilename\fP. + If \fIfilename\fP is \fBNULL\fP, then append to \fI~/.history\fP. + Returns 0 on success, or \fBerrno\fP on a read or write error. + + .Fn2 int history_truncate_file "const char *filename" "int nlines" + Truncate the history file \fIfilename\fP, leaving only the last + \fInlines\fP lines. + If \fIfilename\fP is \fBNULL\fP, then \fI~/.history\fP is truncated. + Returns 0 on success, or \fBerrno\fP on failure. + + .SS History Expansion + + These functions implement history expansion. + + .Fn2 int history_expand "char *string" "char **output" + Expand \fIstring\fP, placing the result into \fIoutput\fP, a pointer + to a string. Returns: + .RS + .PD 0 + .TP + 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); + .TP + 1 + if expansions did take place; + .TP + -1 + if there was an error in expansion; + .TP + 2 + if the returned line should be displayed, but not executed, + as with the \fB:p\fP modifier. + .PD + .RE + If an error ocurred in expansion, then \fIoutput\fP contains a descriptive + error message. + + .Fn3 "char *" get_history_event "const char *string" "int *cindex" "int qchar" + Returns the text of the history event beginning at \fIstring\fP + + \fI*cindex\fP. \fI*cindex\fP is modified to point to after the event + specifier. At function entry, \fIcindex\fP points to the index into + \fIstring\fP where the history event specification begins. \fIqchar\fP + is a character that is allowed to end the event specification in addition + to the ``normal'' terminating characters. + + .Fn1 "char **" history_tokenize "const char *string" + Return an array of tokens parsed out of \fIstring\fP, much as the + shell might. + The tokens are split on the characters in the + \fBhistory_word_delimiters\fP variable, + and shell quoting conventions are obeyed. + + .Fn3 "char *" history_arg_extract "int first" "int last" "const char *string" + Extract a string segment consisting of the \fIfirst\fP through \fIlast\fP + arguments present in \fIstring\fP. Arguments are split using + \fBhistory_tokenize()\fP. + + .SS History Variables + + This section describes the externally-visible variables exported by + the GNU History Library. + + .Vb int history_base + The logical offset of the first entry in the history list. + + .Vb int history_length + The number of entries currently stored in the history list. + + .Vb int history_max_entries + The maximum number of history entries. This must be changed using + \fBstifle_history()\fP. + + .Vb char history_expansion_char + The character that introduces a history event. The default is \fB!\fP. + Setting this to 0 inhibits history expansion. + + .Vb char history_subst_char + The character that invokes word substitution if found at the start of + a line. The default is \fB^\fP. + + .Vb char history_comment_char + During tokenization, if this character is seen as the first character + of a word, then it and all subsequent characters up to a newline are + ignored, suppressing history expansion for the remainder of the line. + This is disabled by default. + + .Vb "char *" history_word_delimiters + The characters that separate tokens for \fBhistory_tokenize()\fP. + The default value is \fB"\ \et\en()<>;&|"\fP. + + .Vb "char *" history_no_expand_chars + The list of characters which inhibit history expansion if found immediately + following \fBhistory_expansion_char\fP. The default is space, tab, newline, + \fB\er\fP, and \fB=\fP. + + .Vb "char *" history_search_delimiter_chars + The list of additional characters which can delimit a history search + string, in addition to space, tab, \fI:\fP and \fI?\fP in the case of + a substring search. The default is empty. + + .Vb int history_quotes_inhibit_expansion + If non-zero, single-quoted words are not scanned for the history expansion + character. The default value is 0. + + .Vb "rl_linebuf_func_t *" history_inhibit_expansion_function + This should be set to the address of a function that takes two arguments: + a \fBchar *\fP (\fIstring\fP) + and an \fBint\fP index into that string (\fIi\fP). + It should return a non-zero value if the history expansion starting at + \fIstring[i]\fP should not be performed; zero if the expansion should + be done. + It is intended for use by applications like \fBbash\fP that use the history + expansion character for additional purposes. + By default, this variable is set to \fBNULL\fP. + .SH FILES + .PD 0 + .TP + .FN ~/.history + Default filename for reading and writing saved history + .PD + .SH "SEE ALSO" + .PD 0 + .TP + \fIThe Gnu Readline Library\fP, Brian Fox and Chet Ramey + .TP + \fIThe Gnu History Library\fP, Brian Fox and Chet Ramey + .TP + \fIbash\fP(1) + .TP + \fIreadline\fP(3) + .PD + .SH AUTHORS + Brian Fox, Free Software Foundation + .br + bfox@gnu.org + .PP + Chet Ramey, Case Western Reserve University + .br + chet@ins.CWRU.Edu + .SH BUG REPORTS + If you find a bug in the + .B history + 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 + .B history + library that you have. + .PP + Once you have determined that a bug actually exists, mail a + bug report to \fIbug\-readline\fP@\fIgnu.org\fP. + If you have a fix, you are welcome to mail that + as well! Suggestions and `philosophical' bug reports may be mailed + to \fPbug-readline\fP@\fIgnu.org\fP or posted to the Usenet + newsgroup + .BR gnu.bash.bug . + .PP + Comments and bug reports concerning + this manual page should be directed to + .IR chet@ins.CWRU.Edu . Binary files readline-4.1/doc/history.dvi and readline-4.2/doc/history.dvi differ diff -Nrc2 readline-4.1/doc/history.html readline-4.2/doc/history.html *** readline-4.1/doc/history.html Wed Jan 19 12:18:01 2000 --- readline-4.2/doc/history.html Mon Apr 16 11:05:46 2001 *************** *** 2,6 **** GNU History Library --- 2,6 ---- GNU History Library *************** *** 8,13 ****

GNU History Library

!

Edition 4.1, for History Library Version 4.1.

!

January 2000

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

GNU History Library

!

Edition 4.2, for History Library Version 4.2.

!

Apr 2001

Brian Fox, Free Software Foundation
Chet Ramey, Case Western Reserve University
*************** *** 80,84 ****

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

--- 80,84 ----

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

*************** *** 360,367 ****

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

--- 360,367 ----

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

*************** *** 410,416 ****
  typedef struct _hist_entry {
    char *line;
!   char *data;
  } HIST_ENTRY;
  
--- 410,418 ----
+ typedef void *histdata_t;
+ 
  typedef struct _hist_entry {
    char *line;
!   histdata_t data;
  } HIST_ENTRY;
  
*************** *** 431,440 ****
! /* A structure used to pass the current state of the history stuff around. */
  typedef struct _hist_state {
!   HIST_ENTRY **entries;         /* Pointer to the entries themselves. */
!   int offset;                   /* The location pointer within this array. */
!   int length;                   /* Number of elements within this array. */
!   int size;                     /* Number of slots allocated to this array. */
    int flags;
  } HISTORY_STATE;
--- 433,444 ----
  
  
! /*
!  * A structure used to pass around the current state of the history.
!  */
  typedef struct _hist_state {
!   HIST_ENTRY **entries; /* Pointer to the entries themselves. */
!   int offset;           /* The location pointer within this array. */
!   int length;           /* Number of elements within this array. */
!   int size;             /* Number of slots allocated to this array. */
    int flags;
  } HISTORY_STATE;
***************
*** 452,456 ****
  

This section describes the calling sequence for the various functions ! present in GNU History.

--- 456,460 ----

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

*************** *** 486,490 ****

!
Function: void using_history ()
Begin a session in which the history functions might be used. This --- 490,494 ----

!
Function: void using_history (void)
Begin a session in which the history functions might be used. This *************** *** 495,499 ****

!
Function: HISTORY_STATE * history_get_history_state ()
Return a structure describing the current state of the input history. --- 499,503 ----

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

!
Function: void add_history (char *string)
Place string at the end of the history list. The associated data --- 524,528 ----

!
Function: void add_history (const char *string)
Place string at the end of the history list. The associated data *************** *** 539,543 ****

!
Function: HIST_ENTRY * replace_history_entry (int which, char *line, char *data)
Make the history entry at offset which have line and data. --- 543,547 ----

!
Function: HIST_ENTRY * replace_history_entry (int which, const char *line, histdata_t data)
Make the history entry at offset which have line and data. *************** *** 549,553 ****

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

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

!
Function: int unstifle_history ()
Stop stifling the history. This returns the previous amount the --- 569,573 ----

!
Function: int unstifle_history (void)
Stop stifling the history. This returns the previous amount the *************** *** 575,579 ****

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

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

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

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

!
Function: int where_history ()
Returns the offset of the current history element. --- 606,610 ----

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

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

!
Function: HIST_ENTRY * current_history (void)
Return the history entry at the current position, as determined by ! where_history(). If there is no entry there, return a NULL pointer.
*************** *** 623,627 ****
Return the history entry at position offset, starting from ! history_base. If there is no entry there, or if offset is greater than the history length, return a NULL pointer.
--- 627,632 ----
Return the history entry at position offset, starting from ! history_base (see section History Variables). ! If there is no entry there, or if offset is greater than the history length, return a NULL pointer.
*************** *** 630,634 ****

!
Function: int history_total_bytes ()
Return the number of bytes that the primary history entries are using. --- 635,639 ----

!
Function: int history_total_bytes (void)
Return the number of bytes that the primary history entries are using. *************** *** 651,656 ****
Function: int history_set_pos (int pos)
! Set the position in the history list to pos, an absolute index into the list.
--- 656,663 ----
Function: int history_set_pos (int pos)
! Set the current history offset to pos, an absolute index into the list. + Returns 1 on success, 0 if pos is less than zero or greater + than the number of history entries.
*************** *** 658,662 ****

!
Function: HIST_ENTRY * previous_history ()
Back up the current history offset to the previous history entry, and --- 665,669 ----

!
Function: HIST_ENTRY * previous_history (void)
Back up the current history offset to the previous history entry, and *************** *** 668,672 ****

!
Function: HIST_ENTRY * next_history ()
Move the current history offset forward to the next history entry, and --- 675,679 ----

!
Function: HIST_ENTRY * next_history (void)
Move the current history offset forward to the next history entry, and *************** *** 693,701 ****

!
Function: int history_search (char *string, int direction)
! Search the history for string, starting at the current history ! offset. If direction < 0, then the search is through previous entries, ! else through subsequent. If string 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 --- 700,709 ----

!
Function: int history_search (const char *string, int direction)
! Search the history for string, starting at the current history offset. ! If direction is less than 0, then the search is through ! previous entries, otherwise through subsequent entries. ! If string 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 *************** *** 707,716 ****

!
Function: int history_search_prefix (char *string, int direction)
Search the history for string, starting at the current history offset. The search is anchored: matching lines must begin with ! string. If direction < 0, then the search is through previous ! entries, else through subsequent. If string 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. --- 715,725 ----

!
Function: int history_search_prefix (const char *string, int direction)
Search the history for string, starting at the current history offset. The search is anchored: matching lines must begin with ! string. If direction is less than 0, then the search is ! through previous entries, otherwise through subsequent entries. ! If string 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. *************** *** 720,724 ****

!
Function: int history_search_pos (char *string, int direction, int pos)
Search for string in the history list, starting at pos, an --- 729,733 ----

!
Function: int history_search_pos (const char *string, int direction, int pos)
Search for string in the history list, starting at pos, an *************** *** 740,748 ****

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

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

!
Function: int read_history_range (char *filename, int from, int to)
Read a range of lines from filename, adding them to the history list. ! Start reading at line from and end at to. If ! from is zero, start at the beginning. If to is less than from, then read until the end of the file. If filename is NULL, then read from `~/.history'. Returns 0 if successful, --- 759,767 ----

!
Function: int read_history_range (const char *filename, int from, int to)
Read a range of lines from filename, adding them to the history list. ! Start reading at line from and end at to. ! If from is zero, start at the beginning. If to is less than from, then read until the end of the file. If filename is NULL, then read from `~/.history'. Returns 0 if successful, *************** *** 763,772 ****

!
Function: int write_history (char *filename)
Write the current history to filename, overwriting filename ! if necessary. If filename is ! NULL, then write the history list to `~/.history'. Values ! returned are as in read_history ().
--- 772,782 ----

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

!
Function: int append_history (int nelements, char *filename)
Append the last nelements of the history list to filename.
--- 784,792 ----

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

!
Function: int history_truncate_file (char *filename, int nlines)
Truncate the history file filename, leaving only the last nlines lines.
--- 794,803 ----

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

! These functions implement csh-like history expansion.

--- 808,812 ----

! These functions implement history expansion.

*************** *** 808,812 ****
If no expansions took place (or, if the only change in ! the text was the de-slashifying of the history expansion character);
1 --- 822,826 ----
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 *************** *** 830,844 ****

!
Function: char * history_arg_extract (int first, int last, char *string)
- Extract a string segment consisting of the first through last - arguments present in string. Arguments are broken up as in Bash. -
- -

-

-

-
Function: char * get_history_event (char *string, int *cindex, int qchar) -
Returns the text of the history event beginning at string + *cindex. *cindex is modified to point to after the event --- 844,849 ----

!
Function: char * get_history_event (const char *string, int *cindex, int qchar)
Returns the text of the history event beginning at string + *cindex. *cindex is modified to point to after the event *************** *** 852,861 ****

!
Function: char ** history_tokenize (char *string) !
Return an array of tokens parsed out of string, much as the ! shell might. The tokens are split on white space and on the ! characters ()<>;&|$, and shell quoting conventions are ! obeyed.
--- 857,876 ----

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

!

!

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

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

! This section describes the externally-visible variables exported by the GNU History Library. *************** *** 888,895 ****

!
Variable: int max_input_history
The maximum number of history entries. This must be changed using ! stifle_history ().
--- 903,910 ----

!
Variable: int history_max_entries
The maximum number of history entries. This must be changed using ! stifle_history().
*************** *** 899,903 ****
Variable: char history_expansion_char
! The character that starts a history event. The default is `!'.
--- 914,919 ----
Variable: char history_expansion_char
! The character that introduces a history event. The default is `!'. ! Setting this to 0 inhibits history expansion.
*************** *** 925,933 ****

!
Variable: char * history_no_expand_chars
The list of characters which inhibit history expansion if found immediately ! following history_expansion_char. The default is whitespace and ! `='.
--- 941,958 ----

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

+

+

+
Variable: char * history_no_expand_chars +
The list of characters which inhibit history expansion if found immediately ! following history_expansion_char. The default is space, tab, newline, ! carriage return, and `='.
*************** *** 936,942 ****
Variable: char * history_search_delimiter_chars !
The list of additional characters which can delimit a history search ! string, in addition to whitespace, `:' and `?' in the case of a substring search. The default is empty.
--- 961,967 ----
Variable: char * history_search_delimiter_chars !
The list of additional characters which can delimit a history search ! string, in addition to space, TAB, `:' and `?' in the case of a substring search. The default is empty.
*************** *** 946,950 ****
Variable: int history_quotes_inhibit_expansion !
If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0. --- 971,975 ----
Variable: int history_quotes_inhibit_expansion !
If non-zero, single-quoted words are not scanned for the history expansion character. The default value is 0. *************** *** 954,961 ****

!
Variable: Function * history_inhibit_expansion_function !
This should be set to the address of a function that takes two arguments: ! a char * (string) and an integer index into that string (i). It should return a non-zero value if the history expansion starting at string[i] should not be performed; zero if the expansion should --- 979,987 ----

!
Variable: rl_linebuf_func_t * history_inhibit_expansion_function !
This should be set to the address of a function that takes two arguments: ! a char * (string) ! and an int index into that string (i). It should return a non-zero value if the history expansion starting at string[i] should not be performed; zero if the expansion should *************** *** 963,967 **** It is intended for use by applications like Bash that use the history expansion character for additional purposes. ! By default, this variable is set to NULL.
--- 989,993 ---- It is intended for use by applications like Bash that use the history expansion character for additional purposes. ! By default, this variable is set to NULL.
*************** *** 977,981 ****
! main ()
  {
    char line[1024], *t;
--- 1003,1012 ----
  
  
! #include <stdio.h>
! #include <readline/history.h>
! 
! main (argc, argv)
!      int argc;
!      char **argv;
  {
    char line[1024], *t;
***************
*** 1099,1104 ****
  h
  -
- m
- -
  n
  -
--- 1130,1133 ----
***************
*** 1125,1133 ****
  

g

!
  • get_history_event
  • h

    !
  • history_arg_extract
  • history_base
  • history_comment_char --- 1154,1162 ----

    g

    !
  • get_history_event
  • h

    !
  • history_arg_extract
  • history_base
  • history_comment_char *************** *** 1136,1147 ****
  • history_get
  • history_get_history_state !
  • history_inhibit_expansion_function
  • history_is_stifled
  • history_length
  • history_list !
  • history_no_expand_chars !
  • history_quotes_inhibit_expansion
  • history_search !
  • history_search_delimiter_chars
  • history_search_pos
  • history_search_prefix --- 1165,1177 ----
  • history_get
  • history_get_history_state !
  • history_inhibit_expansion_function
  • history_is_stifled
  • history_length
  • history_list !
  • history_max_entries !
  • history_no_expand_chars !
  • history_quotes_inhibit_expansion
  • history_search !
  • history_search_delimiter_chars
  • history_search_pos
  • history_search_prefix *************** *** 1149,1159 ****
  • history_set_pos
  • history_subst_char !
  • history_tokenize
  • history_total_bytes
  • history_truncate_file !
  • !

    m

    ! !
  • max_input_history
  • n

    --- 1179,1186 ----
  • history_set_pos
  • history_subst_char !
  • history_tokenize
  • history_total_bytes
  • history_truncate_file !
  • history_word_delimiters
  • n

    *************** *** 1189,1193 ****


    ! This document was generated on 19 January 2000 using the texi2html translator version 1.52.

    --- 1216,1220 ----


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

    diff -Nrc2 readline-4.1/doc/history.info readline-4.2/doc/history.info *** readline-4.1/doc/history.info Wed Jan 19 12:17:44 2000 --- readline-4.2/doc/history.info Mon Apr 16 11:05:39 2001 *************** *** 1,4 **** ! This is Info file history.info, produced by Makeinfo version 1.68 from ! the input file /usr/homes/chet/src/bash/readline-src/doc/hist.texinfo. INFO-DIR-SECTION Libraries --- 1,4 ---- ! This is history.info, produced by makeinfo version 4.0 from ! /usr/homes/chet/src/bash/readline-src/doc/hist.texinfo. INFO-DIR-SECTION Libraries *************** *** 11,15 **** previously typed input. ! Copyright (C) 1988-1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this --- 11,15 ---- previously typed input. ! Copyright (C) 1988-2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this *************** *** 54,58 **** interactively, from a user's standpoint. It should be considered a user's guide. For information on using the GNU History Library in your ! own programs, *note Programming with GNU History::.. * Menu: --- 54,58 ---- interactively, from a user's standpoint. It should be considered a user's guide. For information on using the GNU History Library in your ! own programs, *note Programming with GNU History::. * Menu: *************** *** 239,243 **** the GNU History Library. It should be considered a technical guide. For information on the interactive use of GNU History, *note Using ! History Interactively::.. * Menu: --- 239,243 ---- the GNU History Library. It should be considered a technical guide. For information on the interactive use of GNU History, *note Using ! History Interactively::. * Menu: *************** *** 294,300 **** declared as follows: typedef struct _hist_entry { char *line; ! char *data; } HIST_ENTRY; --- 294,302 ---- declared as follows: + typedef void *histdata_t; + typedef struct _hist_entry { char *line; ! histdata_t data; } HIST_ENTRY; *************** *** 306,315 **** structure: ! /* A structure used to pass the current state of the history stuff around. */ typedef struct _hist_state { ! HIST_ENTRY **entries; /* Pointer to the entries themselves. */ ! int offset; /* The location pointer within this array. */ ! int length; /* Number of elements within this array. */ ! int size; /* Number of slots allocated to this array. */ int flags; } HISTORY_STATE; --- 308,319 ---- structure: ! /* ! * A structure used to pass around the current state of the history. ! */ typedef struct _hist_state { ! HIST_ENTRY **entries; /* Pointer to the entries themselves. */ ! int offset; /* The location pointer within this array. */ ! int length; /* Number of elements within this array. */ ! int size; /* Number of slots allocated to this array. */ int flags; } HISTORY_STATE; *************** *** 325,329 **** This section describes the calling sequence for the various functions ! present in GNU History. * Menu: --- 329,333 ---- This section describes the calling sequence for the various functions ! exported by the GNU History library. * Menu: *************** *** 355,363 **** in your program. ! - Function: void using_history () Begin a session in which the history functions might be used. This initializes the interactive variables. ! - Function: HISTORY_STATE * history_get_history_state () Return a structure describing the current state of the input history. --- 359,367 ---- in your program. ! - Function: void using_history (void) Begin a session in which the history functions might be used. This initializes the interactive variables. ! - Function: HISTORY_STATE * history_get_history_state (void) Return a structure describing the current state of the input history. *************** *** 375,379 **** parameters managing the list itself. ! - Function: void add_history (char *string) Place STRING at the end of the history list. The associated data field (if any) is set to `NULL'. --- 379,383 ---- parameters managing the list itself. ! - Function: void add_history (const char *string) Place STRING at the end of the history list. The associated data field (if any) is set to `NULL'. *************** *** 384,394 **** containing structure. ! - Function: HIST_ENTRY * replace_history_entry (int which, char *line, ! char *data) Make the history entry at offset WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a `NULL' pointer is returned. ! - Function: void clear_history () Clear the history list by deleting all the entries. --- 388,398 ---- containing structure. ! - Function: HIST_ENTRY * replace_history_entry (int which, const char ! *line, histdata_t data) Make the history entry at offset WHICH have LINE and DATA. This returns the old entry so you can dispose of the data. In the case of an invalid WHICH, a `NULL' pointer is returned. ! - Function: void clear_history (void) Clear the history list by deleting all the entries. *************** *** 396,405 **** Stifle the history list, remembering only the last MAX entries. ! - Function: int unstifle_history () Stop stifling the history. This returns the previous amount the history was stifled. The value is positive if the history was stifled, negative if it wasn't. ! - Function: int history_is_stifled () Returns non-zero if the history is stifled, zero if it is not. --- 400,409 ---- Stifle the history list, remembering only the last MAX entries. ! - Function: int unstifle_history (void) Stop stifling the history. This returns the previous amount the history was stifled. The value is positive if the history was stifled, negative if it wasn't. ! - Function: int history_is_stifled (void) Returns non-zero if the history is stifled, zero if it is not. *************** *** 413,435 **** individual list entries. ! - Function: HIST_ENTRY ** history_list () ! Return a `NULL' terminated array of `HIST_ENTRY' which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return `NULL'. ! - Function: int where_history () Returns the offset of the current history element. ! - Function: HIST_ENTRY * current_history () Return the history entry at the current position, as determined by ! `where_history ()'. If there is no entry there, return a `NULL' pointer. - Function: HIST_ENTRY * history_get (int offset) Return the history entry at position OFFSET, starting from ! `history_base'. If there is no entry there, or if OFFSET is ! greater than the history length, return a `NULL' pointer. ! - Function: int history_total_bytes () Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the --- 417,440 ---- individual list entries. ! - Function: HIST_ENTRY ** history_list (void) ! Return a `NULL' terminated array of `HIST_ENTRY *' which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return `NULL'. ! - Function: int where_history (void) Returns the offset of the current history element. ! - Function: HIST_ENTRY * current_history (void) Return the history entry at the current position, as determined by ! `where_history()'. If there is no entry there, return a `NULL' pointer. - Function: HIST_ENTRY * history_get (int offset) Return the history entry at position OFFSET, starting from ! `history_base' (*note History Variables::). If there is no entry ! there, or if OFFSET is greater than the history length, return a ! `NULL' pointer. ! - Function: int history_total_bytes (void) Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the *************** *** 446,458 **** - Function: int history_set_pos (int pos) ! Set the position in the history list to POS, an absolute index ! into the list. ! - Function: HIST_ENTRY * previous_history () Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a `NULL' pointer. ! - Function: HIST_ENTRY * next_history () Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next --- 451,464 ---- - Function: int history_set_pos (int pos) ! Set the current history offset to POS, an absolute index into the ! list. Returns 1 on success, 0 if POS is less than zero or greater ! than the number of history entries. ! - Function: HIST_ENTRY * previous_history (void) Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return a `NULL' pointer. ! - Function: HIST_ENTRY * next_history (void) Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next *************** *** 471,492 **** history entry. ! - Function: int history_search (char *string, int direction) Search the history for STRING, starting at the current history ! offset. If DIRECTION < 0, then the search is through previous ! entries, else through subsequent. If STRING 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 STRING was ! found. Otherwise, nothing is changed, and a -1 is returned. ! - Function: int history_search_prefix (char *string, int direction) Search the history for STRING, starting at the current history offset. The search is anchored: matching lines must begin with ! STRING. If DIRECTION < 0, then the search is through previous ! entries, else through subsequent. If STRING 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. ! - Function: int history_search_pos (char *string, int direction, int ! pos) Search for STRING in the history list, starting at POS, an absolute index into the list. If DIRECTION is negative, the search --- 477,501 ---- history entry. ! - Function: int history_search (const char *string, int direction) Search the history for STRING, starting at the current history ! offset. If DIRECTION is less than 0, then the search is through ! previous entries, otherwise through subsequent entries. If STRING ! 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 STRING was found. Otherwise, nothing is changed, and ! a -1 is returned. ! - Function: int history_search_prefix (const char *string, int ! direction) Search the history for STRING, starting at the current history offset. The search is anchored: matching lines must begin with ! STRING. If DIRECTION is less than 0, then the search is through ! previous entries, otherwise through subsequent entries. If STRING ! 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. ! - Function: int history_search_pos (const char *string, int direction, ! int pos) Search for STRING in the history list, starting at POS, an absolute index into the list. If DIRECTION is negative, the search *************** *** 504,513 **** This section documents the functions for managing a history file. ! - Function: int read_history (char *filename) ! Add the contents of FILENAME to the history list, a line at a ! time. If FILENAME is `NULL', then read from `~/.history'. ! Returns 0 if successful, or errno if not. ! - Function: int read_history_range (char *filename, int from, int to) Read a range of lines from FILENAME, adding them to the history list. Start reading at line FROM and end at TO. If FROM is zero, --- 513,523 ---- This section documents the functions for managing a history file. ! - Function: int read_history (const char *filename) ! Add the contents of FILENAME to the history list, a line at a time. ! If FILENAME is `NULL', then read from `~/.history'. Returns 0 if ! successful, or `errno' if not. ! - Function: int read_history_range (const char *filename, int from, ! int to) Read a range of lines from FILENAME, adding them to the history list. Start reading at line FROM and end at TO. If FROM is zero, *************** *** 516,530 **** `~/.history'. Returns 0 if successful, or `errno' if not. ! - Function: int write_history (char *filename) Write the current history to FILENAME, overwriting FILENAME if necessary. If FILENAME is `NULL', then write the history list to ! `~/.history'. Values returned are as in `read_history ()'. ! - Function: int append_history (int nelements, char *filename) ! Append the last NELEMENTS of the history list to FILENAME. ! - Function: int history_truncate_file (char *filename, int nlines) Truncate the history file FILENAME, leaving only the last NLINES ! lines.  --- 526,545 ---- `~/.history'. Returns 0 if successful, or `errno' if not. ! - Function: int write_history (const char *filename) Write the current history to FILENAME, overwriting FILENAME if necessary. If FILENAME is `NULL', then write the history list to ! `~/.history'. Returns 0 on success, or `errno' on a read or write ! error. ! - Function: int append_history (int nelements, const char *filename) ! Append the last NELEMENTS of the history list to FILENAME. If ! FILENAME is `NULL', then append to `~/.history'. Returns 0 on ! success, or `errno' on a read or write error. ! - Function: int history_truncate_file (const char *filename, int ! nlines) Truncate the history file FILENAME, leaving only the last NLINES ! lines. If FILENAME is `NULL', then `~/.history' is truncated. ! Returns 0 on success, or `errno' on failure.  *************** *** 534,546 **** ----------------- ! These functions implement `csh'-like history expansion. - Function: int history_expand (char *string, char **output) Expand STRING, placing the result into OUTPUT, a pointer to a ! string (*note History Interaction::.). Returns: `0' If no expansions took place (or, if the only change in the ! text was the de-slashifying of the history expansion ! character); `1' --- 549,561 ---- ----------------- ! These functions implement history expansion. - Function: int history_expand (char *string, char **output) Expand STRING, placing the result into OUTPUT, a pointer to a ! string (*note History Interaction::). 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' *************** *** 552,567 **** `2' if the returned line should be displayed, but not executed, ! as with the `:p' modifier (*note Modifiers::.). If an error ocurred in expansion, then OUTPUT contains a descriptive error message. ! - Function: char * history_arg_extract (int first, int last, char ! *string) ! Extract a string segment consisting of the FIRST through LAST ! arguments present in STRING. Arguments are broken up as in Bash. ! ! - Function: char * get_history_event (char *string, int *cindex, int ! qchar) Returns the text of the history event beginning at STRING + *CINDEX. *CINDEX is modified to point to after the event --- 567,577 ---- `2' if the returned line should be displayed, but not executed, ! as with the `:p' modifier (*note Modifiers::). If an error ocurred in expansion, then OUTPUT contains a descriptive error message. ! - Function: char * get_history_event (const char *string, int *cindex, ! int qchar) Returns the text of the history event beginning at STRING + *CINDEX. *CINDEX is modified to point to after the event *************** *** 571,578 **** addition to the "normal" terminating characters. ! - Function: char ** history_tokenize (char *string) Return an array of tokens parsed out of STRING, much as the shell ! might. The tokens are split on white space and on the characters ! `()<>;&|$', and shell quoting conventions are obeyed.  --- 581,595 ---- addition to the "normal" terminating characters. ! - Function: char ** history_tokenize (const char *string) Return an array of tokens parsed out of STRING, much as the shell ! might. The tokens are split on the characters in the ! HISTORY_WORD_DELIMITERS variable, and shell quoting conventions ! are obeyed. ! ! - Function: char * history_arg_extract (int first, int last, const ! char *string) ! Extract a string segment consisting of the FIRST through LAST ! arguments present in STRING. Arguments are split using ! `history_tokenize'.  *************** *** 582,586 **** ================= ! This section describes the externally visible variables exported by the GNU History Library. --- 599,603 ---- ================= ! This section describes the externally-visible variables exported by the GNU History Library. *************** *** 591,600 **** The number of entries currently stored in the history list. ! - Variable: int max_input_history The maximum number of history entries. This must be changed using ! `stifle_history ()'. - Variable: char history_expansion_char ! The character that starts a history event. The default is `!'. - Variable: char history_subst_char --- 608,618 ---- The number of entries currently stored in the history list. ! - Variable: int history_max_entries The maximum number of history entries. This must be changed using ! `stifle_history()'. - Variable: char history_expansion_char ! The character that introduces a history event. The default is `!'. ! Setting this to 0 inhibits history expansion. - Variable: char history_subst_char *************** *** 608,619 **** remainder of the line. This is disabled by default. - Variable: char * history_no_expand_chars The list of characters which inhibit history expansion if found immediately following HISTORY_EXPANSION_CHAR. The default is ! whitespace and `='. - Variable: char * history_search_delimiter_chars The list of additional characters which can delimit a history ! search string, in addition to whitespace, `:' and `?' in the case of a substring search. The default is empty. --- 626,641 ---- remainder of the line. This is disabled by default. + - Variable: char * history_word_delimiters + The characters that separate tokens for \fBhistory_tokenize()\fP. + The default value is `" \t\n()<>;&|"'. + - Variable: char * history_no_expand_chars The list of characters which inhibit history expansion if found immediately following HISTORY_EXPANSION_CHAR. The default is ! space, tab, newline, carriage return, and `='. - Variable: char * history_search_delimiter_chars The list of additional characters which can delimit a history ! search string, in addition to space, TAB, `:' and `?' in the case of a substring search. The default is empty. *************** *** 622,633 **** expansion character. The default value is 0. ! - Variable: Function * history_inhibit_expansion_function This should be set to the address of a function that takes two ! arguments: a `char *' (STRING) and an integer index into that ! string (I). It should return a non-zero value if the history ! expansion starting at STRING[I] should not be performed; zero if ! the expansion should be done. It is intended for use by ! applications like Bash that use the history expansion character ! for additional purposes. By default, this variable is set to NULL.  --- 644,655 ---- expansion character. The default value is 0. ! - Variable: rl_linebuf_func_t * history_inhibit_expansion_function This should be set to the address of a function that takes two ! arguments: a `char *' (STRING) and an `int' index into that string ! (I). It should return a non-zero value if the history expansion ! starting at STRING[I] should not be performed; zero if the ! expansion should be done. It is intended for use by applications ! like Bash that use the history expansion character for additional ! purposes. By default, this variable is set to `NULL'.  *************** *** 640,644 **** Library. ! main () { char line[1024], *t; --- 662,671 ---- Library. ! #include ! #include ! ! main (argc, argv) ! int argc; ! char **argv; { char line[1024], *t; *************** *** 759,762 **** --- 786,790 ---- * history_length: History Variables. * history_list: Information About the History List. + * history_max_entries: History Variables. * history_no_expand_chars: History Variables. * history_quotes_inhibit_expansion: History Variables. *************** *** 771,775 **** * history_total_bytes: Information About the History List. * history_truncate_file: Managing the History File. ! * max_input_history: History Variables. * next_history: Moving Around the History List. * previous_history: Moving Around the History List. --- 799,803 ---- * history_total_bytes: Information About the History List. * history_truncate_file: Managing the History File. ! * history_word_delimiters: History Variables. * next_history: Moving Around the History List. * previous_history: Moving Around the History List. *************** *** 787,811 ****  Tag Table: ! Node: Top1162 ! Node: Using History Interactively1742 ! Node: History Interaction2250 ! Node: Event Designators3669 ! Node: Word Designators4596 ! Node: Modifiers6225 ! Node: Programming with GNU History7363 ! Node: Introduction to History8089 ! Node: History Storage9774 ! Node: History Functions10867 ! Node: Initializing History and State Management11838 ! Node: History List Management12630 ! Node: Information About the History List14151 ! Node: Moving Around the History List15457 ! Node: Searching the History List16342 ! Node: Managing the History File18174 ! Node: History Expansion19680 ! Node: History Variables21519 ! Node: History Programming Example23837 ! Node: Concept Index26441 ! Node: Function and Variable Index26927  End Tag Table --- 815,839 ----  Tag Table: ! Node: Top1136 ! Node: Using History Interactively1716 ! Node: History Interaction2223 ! Node: Event Designators3642 ! Node: Word Designators4569 ! Node: Modifiers6198 ! Node: Programming with GNU History7336 ! Node: Introduction to History8061 ! Node: History Storage9746 ! Node: History Functions10857 ! Node: Initializing History and State Management11841 ! Node: History List Management12641 ! Node: Information About the History List14191 ! Node: Moving Around the History List15547 ! Node: Searching the History List16536 ! Node: Managing the History File18454 ! Node: History Expansion20260 ! Node: History Variables22155 ! Node: History Programming Example24725 ! Node: Concept Index27447 ! Node: Function and Variable Index27933  End Tag Table diff -Nrc2 readline-4.1/doc/history.ps readline-4.2/doc/history.ps *** readline-4.1/doc/history.ps Wed Jan 19 12:18:06 2000 --- readline-4.2/doc/history.ps Mon Apr 16 11:05:46 2001 *************** *** 1,4 **** %!PS-Adobe-2.0 ! %%Creator: dvips(k) 5.82 Copyright 1998 Radical Eye Software %%Title: history.dvi %%Pages: 20 --- 1,4 ---- %!PS-Adobe-2.0 ! %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: history.dvi %%Pages: 20 *************** *** 9,13 **** %DVIPSCommandLine: dvips -D 300 -t letter -o history.ps history.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2000.01.19:1217 %%BeginProcSet: texc.pro %! --- 9,13 ---- %DVIPSCommandLine: dvips -D 300 -t letter -o history.ps history.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2001.04.16:1105 %%BeginProcSet: texc.pro %! *************** *** 21,27 **** exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] ! N/FBB[0 0 0 0]N/nn 0 N/IE 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array ! /BitMaps X/BuildChar{CharBuilder}N/Encoding IE N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A --- 21,27 ---- exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] ! N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array ! /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A *************** *** 51,55 **** SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X ! 1000 div/DVImag X/IE 256 array N 2 string 0 1 255{IE S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ --- 51,55 ---- SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X ! 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ *************** *** 108,113 **** 70B5FCA210107F8F14>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fd cmsl9 9 1 ! /Fd 1 47 df<1270A212F0126004047D830B>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmr9 9 24 --- 108,113 ---- 70B5FCA210107F8F14>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fd cmti9 9 1 ! /Fd 1 47 df<1230127812F0126005047C830C>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fe cmr9 9 24 *************** *** 195,208 **** 00E0EA7E03B5FCA214167E9519>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fh cmtt10 12 24 ! /Fh 24 119 df<13E0A538F0E1E0EAFCE7387EEFC0381FFF00EA07FCEA01F0EA07FCEA1F FF387EEFC038FCE7E0EAF0E13800E000A513157D991A>42 D<1338137CA2136C13EEA313 C6A2EA01C7A438038380A4380701C0A213FFA24813E0EA0E00A4481370387F01FC38FF83 FE387F01FC171E7F9D1A>65 D69 D<387FFFFCB5FC7E380E001CA51400A2EB03 ! 80A3EA0FFFA3EA0E03A390C7FCA8EA7FE012FF127F161E7F9D1A>I<38FF83FEA3381C00 ! 70AA381FFFF0A3381C0070AB38FF83FEA3171E7F9D1A>72 DI<38FE03FE12FFA2381D8070A213C0121CA213E0A213601370A213 ! 301338A21318131CA2130C130EA21306A213071303A238FF81F0A21380171E7F9D1A>78 DII E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fh cmtt10 12 27 ! /Fh 27 119 df<13E0A538F0E1E0EAFCE7387EEFC0381FFF00EA07FCEA01F0EA07FCEA1F FF387EEFC038FCE7E0EAF0E13800E000A513157D991A>42 D<1338137CA2136C13EEA313 C6A2EA01C7A438038380A4380701C0A213FFA24813E0EA0E00A4481370387F01FC38FF83 FE387F01FC171E7F9D1A>65 D69 D<38FF83FEA3381C0070AA381FFFF0A3381C ! 0070AB38FF83FEA3171E7F9D1A>72 D ! I<38FE03FE12FFA2381D8070A213C0121CA213E0A213601370A213301338A21318131CA2 ! 130C130EA21306A213071303A238FF81F0A21380171E7F9D1A>78 DI95 D97 D99 ! DI<12FEA3120EA6133EEBFF80000F ! 13C013C1EB80E01300120EAC38FFE3FE13E713E3171E7F9D1A>104 ! DI< ! EAFE3EEBFF80B512C0EA0FC1EB80E01300120EAC38FFE3FE13E713E317157F941A>110 ! DI<387F81F838FF8FFC38 ! 7F9FFE3803FE1EEBF80CEBE000A25B5BAAEA7FFFB5FC7E17157F941A>114 D<487E1203A6387FFFE0B5FCA238038000AA1470A43801C1E013FF6C1380EB3F00141C7F 9B1A>116 D<38FE0FE0A3EA0E00AD1301EA0F033807FFFE7EEA00FC17157F941A>I<387F --- 214,232 ---- D<387FFFC0B512E0A26C13C013047D7E1A>95 D97 D<12FEA3120EA6133EEBFF80000F13E0EBC1F0EB8070EB0038120E14 ! 1CA7000F13381478EB80F0EBC1E0EBFFC0000E138038063E00161E7F9D1A>IIIII<12FEA3120EA6133EEBFF80000F13C013C1EB80E01300120EAC38FFE3 ! FE13E713E3171E7F9D1A>104 DI108 ! D ! 110 DI<387F81F838FF8F ! FC387F9FFE3803FE1EEBF80CEBE000A25B5BAAEA7FFFB5FC7E17157F941A>114 D<487E1203A6387FFFE0B5FCA238038000AA1470A43801C1E013FF6C1380EB3F00141C7F 9B1A>116 D<38FE0FE0A3EA0E00AD1301EA0F033807FFFE7EEA00FC17157F941A>I<387F *************** *** 326,330 **** D<1438EB01F8EB00781438A21470A614E013FCEA0382EA0601121CEA3C00383801C01278 12F0A438E00380A412F0EA700738380F00381C37803807C7E015207D9F19>I<13F8EA07 ! 0EEA0E07121C383803801278127012F0A2B5FC00F0C7FC5AA46C5AEA7002EA3004EA1C18 EA07E011147D9314>II<140EEB3E11EBE1A33801C1C238 --- 330,334 ---- D<1438EB01F8EB00781438A21470A614E013FCEA0382EA0601121CEA3C00383801C01278 12F0A438E00380A412F0EA700738380F00381C37803807C7E015207D9F19>I<13F8EA07 ! 0EEA0E07381C038012381278127012F0B5FC00F0C7FCA25AA46C5AEA7002EA3004EA1C18 EA07E011147D9314>II<140EEB3E11EBE1A33801C1C238 *************** *** 357,362 **** 191D809318>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fk cmbx12 17.28 36 ! /Fk 36 122 df49 DI E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fk cmcsc10 10.95 3 ! /Fk 3 118 df103 ! D<38FC01FC381E007014201217EA1380A2EA11C0EA10E0A213701338A2131C130E1307A2 ! EB03A0EB01E0A213001460123800FE132016177E961C>110 D<38FF81FC381C00701420 ! B0000C1340120E6C138038018300EA007C16177E961C>117 D E ! %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fl cmbx12 17.28 36 ! /Fl 36 122 df49 DI E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fl cmsy10 10.95 1 ! /Fl 1 14 df<14FF010713E090381F00F80178131E01E01307D80180EB018048C812C000 ! 061560481530A248151848150CA2481506A4481503A900601506A46C150CA26C15186C15 ! 30A26C15606C15C06C6CEB0180D800E0EB07000178131E011F13F8903807FFE0010090C7 ! FC282B7EA02D>13 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fm cmbx12 14.4 45 ! /Fm 45 122 df<123C127FEAFF80A213C0A3127F123E1200A2EA0180A3EA0300A2120612 0E5A5A12100A157B8813>44 D<121C127FA2EAFF80A3EA7F00A2121C09097B8813>46 D<130E131E137EEA07FE12FFA212F81200B3ABB512FEA317277BA622>49 --- 456,467 ---- 1EEA787CEA3FF0EA0FC0262E7E9F2B>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fm cmsy10 10.95 1 ! /Fm 1 14 df<14FE903807FFC090381F01F0903878003C01E0130ED80180130348C7EA01 ! 800006EC00C0481560A2481530481518A248150CA4481506A90060150CA46C1518A26C15 ! 306C1560A26C15C06CEC01806C6CEB0300D800E0130E0178133C90381F01F0903807FFC0 ! D900FEC7FC272B7DA02E>13 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fn cmbx12 14.4 44 ! /Fn 44 122 df<123C127FEAFF80A213C0A3127F123E1200A2EA0180A3EA0300A2120612 0E5A5A12100A157B8813>44 D<121C127FA2EAFF80A3EA7F00A2121C09097B8813>46 D<130E131E137EEA07FE12FFA212F81200B3ABB512FEA317277BA622>49 *************** *** 482,554 **** B45B90387FF007011FB5129F0107EBFE0F9039007FF0032D297CA835>III77 ! DI80 ! D82 D<9038FF80600003EBF0E0000F13F8381F80FD383F ! 001F003E1307481303A200FC1301A214007EA26C140013C0EA7FFCEBFFE06C13F86C13FE ! 80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E01303A46C14E0A26C1307 ! 6C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA825>I85 DII<3803FF80000F13F0381F01FC383F80 ! FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA0FE0EA1F80EA3F00127E5AA4145F007E ! 13DF393F839FFC381FFE0F3803FC031E1B7E9A21>97 DIIII< ! EB07F8EB3FFCEB7E3E3801FC7FEA03F813F01207143E1400A7B512C0A33807F000B3A338 ! 7FFF80A3182A7EA915>I<9038FF80F00003EBE3F8390FC1FE1C391F007C7C48137E003E ! EB3E10007EEB3F00A6003E133E003F137E6C137C380FC1F8380BFFE00018138090C8FC12 ! 38A2123C383FFFF814FF6C14C06C14E06C14F0121F383C0007007CEB01F8481300A4007C ! EB01F0A2003FEB07E0390FC01F806CB5120038007FF01E287E9A22>II<1207EA0F80EA1FC0EA3FE0A3EA1FC0EA0F80EA0700C7FCA7EAFFE0A3120F ! B3A3EAFFFEA30F2B7EAA12>I108 ! D<26FFC07FEB1FC0903AC1FFC07FF0903AC307E0C1F8D80FC49038F101FC9039C803F200 ! 01D801FE7F01D05BA201E05BB03CFFFE3FFF8FFFE0A3331B7D9A38>I<38FFC07E9038C1 ! FF809038C30FC0D80FC413E0EBC80701D813F013D0A213E0B039FFFE3FFFA3201B7D9A25 ! >II<38FFE1FE9038EFFF809038FE0FE0390FF803F09038F001F801E013FC ! 140015FEA2157FA8157E15FEA215FC140101F013F89038F807F09038FC0FE09038EFFF80 ! 9038E1FC0001E0C7FCA9EAFFFEA320277E9A25>I<38FFC1F0EBC7FCEBC63E380FCC7F13 ! D813D0A2EBF03EEBE000B0B5FCA3181B7F9A1B>114 D<3803FE30380FFFF0EA3E03EA78 ! 00127000F01370A27E00FE1300EAFFE06CB4FC14C06C13E06C13F0000713F8C6FCEB07FC ! 130000E0137C143C7E14387E6C137038FF01E038E7FFC000C11300161B7E9A1B>I<13E0 ! A41201A31203A21207120F381FFFE0B5FCA2380FE000AD1470A73807F0E0000313C03801 ! FF8038007F0014267FA51A>I<39FFE07FF0A3000F1307B2140FA2000713173903F067FF ! 3801FFC738007F87201B7D9A25>I<39FFFC03FFA3390FF000F0000714E07F0003EB01C0 ! A2EBFC0300011480EBFE070000140013FFEB7F0EA2149EEB3F9C14FC6D5AA26D5AA36D5A ! A26D5AA2201B7F9A23>I<3BFFFC7FFC1FFCA33B0FE00FE001C02607F007EB0380A201F8 ! EBF00700031600EC0FF801FC5C0001150EEC1FFC2600FE1C5B15FE9039FF387E3C017F14 ! 38EC787F6D486C5A16F0ECE01F011F5CA26D486C5AA2EC800701075CA22E1B7F9A31>I< ! 39FFFC1FFEA33907F003803803F8079038FC0F003801FE1E00005BEB7F3814F86D5A6D5A ! 130F806D7E130F497EEB3CFEEB38FFEB787F9038F03F803901E01FC0D803C013E0EB800F ! 39FFF03FFFA3201B7F9A23>I<39FFFC03FFA3390FF000F0000714E07F0003EB01C0A2EB ! FC0300011480EBFE070000140013FFEB7F0EA2149EEB3F9C14FC6D5AA26D5AA36D5AA26D ! 5AA25CA21307003890C7FCEA7C0FEAFE0E131E131C5BEA74F0EA3FE0EA0F8020277F9A23 ! >I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fn cmtt10 10.95 75 ! /Fn 75 127 df<127012F8B012701200A5127012F8A31270051C779B18>33 DI --- 493,561 ---- B45B90387FF007011FB5129F0107EBFE0F9039007FF0032D297CA835>III78 D80 D82 D<9038FF80600003EBF0E0 ! 000F13F8381F80FD383F001F003E1307481303A200FC1301A214007EA26C140013C0EA7F ! FCEBFFE06C13F86C13FE80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E0 ! 1303A46C14E0A26C13076C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA8 ! 25>I85 ! DII<3803FF80000F13F0381F01FC383F80FE147F801580EA1F00C7FCA4EB3FFF3801 ! FC3FEA0FE0EA1F80EA3F00127E5AA4145F007E13DF393F839FFC381FFE0F3803FC031E1B ! 7E9A21>97 DIIIII<9038FF80F000 ! 03EBE3F8390FC1FE1C391F007C7C48137E003EEB3E10007EEB3F00A6003E133E003F137E ! 6C137C380FC1F8380BFFE00018138090C8FC1238A2123C383FFFF814FF6C14C06C14E06C ! 14F0121F383C0007007CEB01F8481300A4007CEB01F0A2003FEB07E0390FC01F806CB512 ! 0038007FF01E287E9A22>II<1207EA0F80EA1FC0EA3FE0 ! A3EA1FC0EA0F80EA0700C7FCA7EAFFE0A3120FB3A3EAFFFEA30F2B7EAA12>I108 D<26FFC07FEB1FC0903AC1FFC07FF0903AC307E0 ! C1F8D80FC49038F101FC9039C803F20001D801FE7F01D05BA201E05BB03CFFFE3FFF8FFF ! E0A3331B7D9A38>I<38FFC07E9038C1FF809038C30FC0D80FC413E0EBC80701D813F013 ! D0A213E0B039FFFE3FFFA3201B7D9A25>II<38FFE1FE9038EFFF809038FE ! 0FE0390FF803F09038F001F801E013FC140015FEA2157FA8157E15FEA215FC140101F013 ! F89038F807F09038FC0FE09038EFFF809038E1FC0001E0C7FCA9EAFFFEA320277E9A25> ! I<38FFC1F0EBC7FCEBC63E380FCC7F13D813D0A2EBF03EEBE000B0B5FCA3181B7F9A1B> ! 114 D<3803FE30380FFFF0EA3E03EA7800127000F01370A27E00FE1300EAFFE06CB4FC14 ! C06C13E06C13F0000713F8C6FCEB07FC130000E0137C143C7E14387E6C137038FF01E038 ! E7FFC000C11300161B7E9A1B>I<13E0A41201A31203A21207120F381FFFE0B5FCA2380F ! E000AD1470A73807F0E0000313C03801FF8038007F0014267FA51A>I<39FFE07FF0A300 ! 0F1307B2140FA2000713173903F067FF3801FFC738007F87201B7D9A25>I<39FFFC03FF ! A3390FF000F0000714E07F0003EB01C0A2EBFC0300011480EBFE070000140013FFEB7F0E ! A2149EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA2201B7F9A23>I<3BFFFC7FFC1FFCA33B ! 0FE00FE001C02607F007EB0380A201F8EBF00700031600EC0FF801FC5C0001150EEC1FFC ! 2600FE1C5B15FE9039FF387E3C017F1438EC787F6D486C5A16F0ECE01F011F5CA26D486C ! 5AA2EC800701075CA22E1B7F9A31>I<39FFFC1FFEA33907F003803803F8079038FC0F00 ! 3801FE1E00005BEB7F3814F86D5A6D5A130F806D7E130F497EEB3CFEEB38FFEB787F9038 ! F03F803901E01FC0D803C013E0EB800F39FFF03FFFA3201B7F9A23>I<39FFFC03FFA339 ! 0FF000F0000714E07F0003EB01C0A2EBFC0300011480EBFE070000140013FFEB7F0EA214 ! 9EEB3F9C14FC6D5AA26D5AA36D5AA26D5AA25CA21307003890C7FCEA7C0FEAFE0E131E13 ! 1C5BEA74F0EA3FE0EA0F8020277F9A23>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fo cmtt10 10.95 76 ! /Fo 76 127 df<127012F8B012701200A5127012F8A31270051C779B18>33 DI *************** *** 590,595 **** D68 DII<387F07F038FF 8FF8387F07F0381C01C0A9EA1FFFA3EA1C01AA387F07F038FF8FF8387F07F0151C7F9B18 >72 DI68 DII<387F07F038FF 8FF8387F07F0381C01C0A9EA1FFFA3EA1C01AA387F07F038FF8FF8387F07F0151C7F9B18 >72 DIII108 D<38F9C1C038FFF7F013FF383E3E ! 38EA3C3CA2EA3838AB38FE3E3EEB7E7EEB3E3E1714809318>IIII<3801F380EA07FBEA1FFFEA3E1FEA380FEA7007A2EAE003A6EA7007A2 ! EA380FEA3C1FEA1FFFEA0FFBEA03E3EA0003A7EB1FF0EB3FF8EB1FF0151E7E9318>I<38 ! FF0FC0EB3FE0EB7FF0EA07F0EBE060EBC0005BA290C7FCA9EAFFFC7F5B14147E9318>I< ! EA07F7EA3FFF5AEA780FEAE007A3007CC7FCEA7FE0EA1FFCEA03FEEA001F38600780EAE0 ! 03A212F038F80F00B5FC13FCEAE7F011147D9318>I<487E1203A4387FFFC0B5FCA23803 ! 8000A9144014E0A33801C1C013FF6C1380EB3E0013197F9818>I<387E07E0EAFE0FEA7E ! 07EA0E00AC1301EA0F033807FFFC6C13FE3801FCFC1714809318>I<387F8FF000FF13F8 ! 007F13F0381C01C0380E0380A338070700A3138FEA038EA3EA01DCA3EA00F8A213701514 ! 7F9318>I<38FF07F8138F1307383800E0A4381C01C0137113F9A213D9EA1DDD000D1380 ! A3138DEA0F8FA23807070015147F9318>I<387F8FF0139F138F380F0700EA078EEA039E ! EA01DC13F81200137013F07FEA01DCEA039E138EEA0707000E1380387F8FF000FF13F800 ! 7F13F015147F9318>I<387F8FF000FF13F8007F13F0380E01C0EB0380A21207EB0700A2 ! EA0387A2138EEA01CEA213CC120013DC1378A31370A313F05B1279EA7BC0EA7F806CC7FC ! 121E151E7F9318>I<383FFFF05AA2387001E0EB03C0EB078038000F00131E5B13F8485A ! EA03C0485A380F0070121E5A5AB512F0A314147F9318>II<126012 ! F0B3B012600424769F18>I<127CB4FC13C01203C67EAB7FEB7FC0EB3FE0A2EB7FC0EBF0 ! 005BABEA03C012FF90C7FC127C13247E9F18>II E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fo cmr10 10.95 75 ! /Fo 75 123 df<90381F83E09038F06E303901C07878380380F8903800F03048EB7000A7 B612803907007000B2383FE3FF1D20809F1B>11 D<133FEBE0C0EA01C0380381E0EA0701 A290C7FCA6B512E0EA0700B2383FC3FC1620809F19>III<127E12FE127E120EA5EB3FF0A3EB0780EB0F00131E5B5B5BEA0FF87F139C130EEA ! 0E0F7FEB038014C0387FC7F812FF127F151C7F9B18>107 DI<38F9C1C038FFF7F013FF383E3E38EA3C3CA2EA3838AB38FE3E3EEB7E ! 7EEB3E3E1714809318>IIII<3801F380EA07FB ! EA1FFFEA3E1FEA380FEA7007A2EAE003A6EA7007A2EA380FEA3C1FEA1FFFEA0FFBEA03E3 ! EA0003A7EB1FF0EB3FF8EB1FF0151E7E9318>I<38FF0FC0EB3FE0EB7FF0EA07F0EBE060 ! EBC0005BA290C7FCA9EAFFFC7F5B14147E9318>II<487E1203A4387FFFC0B5FCA238038000A9144014E0A33801C1C013FF6C ! 1380EB3E0013197F9818>I<387E07E0EAFE0FEA7E07EA0E00AC1301EA0F033807FFFC6C ! 13FE3801FCFC1714809318>I<387F8FF000FF13F8007F13F0381C01C0380E0380A33807 ! 0700A3138FEA038EA3EA01DCA3EA00F8A2137015147F9318>I<38FF07F8138F13073838 ! 00E0A4381C01C0137113F9A213D9EA1DDD000D1380A3138DEA0F8FA23807070015147F93 ! 18>I<387F8FF0139F138F380F0700EA078EEA039EEA01DC13F81200137013F07FEA01DC ! EA039E138EEA0707000E1380387F8FF000FF13F8007F13F015147F9318>I<387F8FF000 ! FF13F8007F13F0380E01C0EB0380A21207EB0700A2EA0387A2138EEA01CEA213CC120013 ! DC1378A31370A313F05B1279EA7BC0EA7F806CC7FC121E151E7F9318>I<383FFFF05AA2 ! 387001E0EB03C0EB078038000F00131E5B13F8485AEA03C0485A380F0070121E5A5AB512 ! F0A314147F9318>II<126012F0B3B012600424769F18>I<127CB4FC ! 13C01203C67EAB7FEB7FC0EB3FE0A2EB7FC0EBF0005BABEA03C012FF90C7FC127C13247E ! 9F18>II ! E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fp cmr10 10.95 74 ! /Fp 74 123 df<90381F83E09038F06E303901C07878380380F8903800F03048EB7000A7 B612803907007000B2383FE3FF1D20809F1B>11 D<133FEBE0C0EA01C0380381E0EA0701 A290C7FCA6B512E0EA0700B2383FC3FC1620809F19>II<127012F8A3127005057C840D>I48 D<13801203120F12F31203B3A6EA07C0EAFFFE0F1E7C9D17>III<127012F8A3127005057C840D>I48 D<13801203120F12F31203B3A6EA07C0EA7FFE0F1E7C9D17>IIII<90380FE01090 ! 38381C309038E002703803C00139078000F048C71270121E15305A1510127C127800F814 ! 00A7EC3FFEEC01F000781300127C123CA27EA27E6C7E3903C001703900E002309038380C ! 1090380FF0001F217E9F24>I<39FFF07FF8390F000780AD90B5FCEB0007AF39FFF07FF8 ! 1D1F7E9E22>II<3807FFC038003E00131EB3A3 ! 122012F8A3EAF01CEA403CEA6038EA1070EA0FC012207F9E17>I76 DIIIIII<3803F040 ! 380C0CC0EA1803EA3001EA6000A212E01440A36C13007E127CEA7F80EA3FF86CB4FC0007 ! 1380C613C0EB1FE013031301EB00F014707EA46C136014E06C13C038F8018038C60300EA ! 81FC14217E9F19>I<007FB512E038780F010060EB006000401420A200C0143000801410 ! A400001400B3497E3803FFFC1C1F7E9E21>I<39FFF00FF8390F0003E0EC0080B3A46CEB ! 01001380120314026C6C5A6C6C5AEB3830EB0FC01D207E9E22>I<39FFF003FE391F8000 ! F86CC7126015206C6C1340A36C6C1380A2EBE00100011400A23800F002A213F8EB7804A2 ! 6D5AA36D5AA2131F6D5AA2EB07C0A36D5AA36DC7FC1F207F9E22>I<3BFFF07FF81FF03B ! 1F000FC007C06C903907800180170015C001805C00071502EC09E013C000035DEC19F014 ! 10D801E05CA2EC2078D800F05CA2EC403C01785CA2EC801E017C1460013C144090383D00 ! 0F133F6D5CA2011E1307010E91C7FCA2010C7F010413022C207F9E2F>I<12FFA212C0B3 ! B3A512FFA2082D7CA10D>91 DI<12FFA21203B3B3A512FFA2082D80A10D>I<12081210 ! 1220A21240A21280A312B812FCA2127C1238060E7D9F0D>96 DI<121C12FC121CAA137CEA1D87381E0180EB00C0001C13E01470A21478A6 ! 147014F014E0001E13C0381A018038198700EA107C15207E9F19>IIII<13 ! 7CEA01C6EA030F1207EA0E061300A7EAFFF0EA0E00B2EA7FE01020809F0E>I<14E03803 ! E330EA0E3CEA1C1C38380E00EA780FA5EA380E6C5AEA1E38EA33E00020C7FCA21230A2EA ! 3FFE381FFF8014C0383001E038600070481330A4006013606C13C0381C03803803FC0014 ! 1F7F9417>I<121C12FC121CAA137C1386EA1D03001E1380A2121CAE38FF8FF014207E9F ! 19>I<1238127CA31238C7FCA6121C12FC121CB1EAFF80091F7F9E0C>I<13E0EA01F0A3EA ! 00E01300A61370EA07F012001370B3A31260EAF06013C0EA6180EA3F000C28829E0E>I< ! 121C12FC121CAAEB1FE0EB0780EB060013045B5B5B136013E0EA1DF0EA1E70EA1C38133C ! 131C7F130F7F148014C038FF9FF014207E9F18>I<121C12FC121CB3ABEAFF8009207F9F ! 0C>I<391C3E03E039FCC30C30391D039038391E01E01CA2001C13C0AE3AFF8FF8FF8021 ! 147E9326>IIII<3801 ! F04038070CC0EA0E02EA1C03EA38011278127012F0A6127012781238EA1C03EA0C05EA07 ! 09EA01F1EA0001A8EB0FF8151D7F9318>III<1202A31206A2120E ! A2123EEAFFF8EA0E00AB1304A5EA07081203EA01F00E1C7F9B12>I<381C0380EAFC1FEA ! 1C03AE1307120CEA061B3803E3F014147E9319>I<38FF83F8383E00E0001C13C06C1380 ! A338070100A21383EA0382A2EA01C4A213E4EA00E8A21370A3132015147F9318>I<39FF ! 9FE1FC393C078070391C030060EC8020000E1440A214C0D80704138014E0A23903886100 ! 1471A23801D032143A143E3800E01CA2EB6018EB40081E147F9321>I<38FF87F8381E03 ! C0380E0180EB0300EA0702EA0384EA01C813D8EA00F01370137813F8139CEA010E1202EA ! 060738040380000C13C0003C13E038FE07FC16147F9318>I<38FF83F8383E00E0001C13 ! C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8A21370A31320A25BA3EAF0 ! 80A200F1C7FC1262123C151D7F9318>I ! I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fp cmbx12 20.736 13 ! /Fp 13 122 dfII<90380FE02090 ! 387818609038E004E03803800238070001481300001E1460A25A1520127C127800F81400 ! A7EC7FFCEC03E000781301127C123CA27EA27E7E380380023900E0046090387818209038 ! 0FE0001E217D9F24>I<39FFF07FF8390F000780AD90B5FCEB0007AF39FFF07FF81D1F7E ! 9E22>II76 DIIIIII<38 ! 03F040380C0CC0EA1803EA3001EA6000A212E01440A36C13007E127CEA7F80EA3FF86CB4 ! FC00071380C613C0EB1FE013031301EB00F014707EA46C136014E06C13C038F8018038C6 ! 0300EA81FC14217E9F19>I<007FB512E038780F010060EB006000401420A200C0143000 ! 801410A400001400B3497E3803FFFC1C1F7E9E21>I<39FFF00FF8390F0003E0EC0080B3 ! A46CEB01001380120314026C6C5A6C6C5AEB3830EB0FC01D207E9E22>I<39FFF003FE39 ! 1F8000F86CC7126015206C6C1340A36C6C1380A2EBE00100011400A23800F002A213F8EB ! 7804A26D5AA36D5AA2131F6D5AA2EB07C0A36D5AA36DC7FC1F207F9E22>I<3BFFF07FF8 ! 1FF03B1F000FC007C06C903907800180170015C001805C00071502EC09E013C000035DEC ! 19F01410D801E05CA2EC2078D800F05CA2EC403C01785CA2EC801E017C1460013C144090 ! 383D000F133F6D5CA2011E1307010E91C7FCA2010C7F010413022C207F9E2F>I<12FFA2 ! 12C0B3B3A512FFA2082D7CA10D>91 DI<12FFA21203B3B3A512FFA2082D80A10D>I<12 ! 0812101220A21240A21280A312B812FCA2127C1238060E7D9F0D>96 ! DI<121C12FC121CAA137CEA1D87381E0180EB00 ! C0001C13E01470A21478A6147014F014E0001E13C0381A018038198700EA107C15207E9F ! 19>IIII<137CEA01C6EA030F1207EA0E061300A7EAFFF0EA0E00B2EA7FE010 ! 20809F0E>I<14E03803E330EA0E3CEA1C1C38380E00EA780FA5EA380E6C5AEA1E38EA33 ! E00020C7FCA21230A2EA3FFE381FFF8014C0383001E038600070481330A4006013606C13 ! C0381C03803803FC00141F7F9417>I<121C12FC121CAA137C1386EA1D03001E1380A212 ! 1CAE38FF8FF014207E9F19>I<1238127CA31238C7FCA6121C12FC121CB1EAFF80091F7F ! 9E0C>I<13E0EA01F0A3EA00E01300A61370EA07F012001370B3A31260EAF06013C0EA61 ! 80EA3F000C28829E0E>I<121C12FC121CAAEB1FE0EB0780EB060013045B5B5B136013E0 ! EA1DF0EA1E70EA1C38133C131C7F130F7F148014C038FF9FF014207E9F18>I<121C12FC ! 121CB3ABEAFF8009207F9F0C>I<391C3E03E039FCC30C30391D019018001EEBE01CA200 ! 1C13C0AE3AFF8FF8FF8021147E9326>IIII<3801F04038070CC0EA0E02EA1C03EA38011278127012F0A61270 ! 12781238EA1C03EA0C05EA0709EA01F1EA0001A8EB0FF8151D7F9318>III<1202A31206A2120EA2123EEAFFF8EA0E00AB1304A5EA07081203EA01F00E1C7F ! 9B12>I<381C0380EAFC1FEA1C03AE1307120CEA061B3803E3F014147E9319>I<38FF83F8 ! 383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8A21370A3 ! 132015147F9318>I<39FF9FE1FC393C078070391C030060EC8020000E1440A214C0D807 ! 04138014E0A239038861001471A23801D032143A143E3800E01CA2EB6018EB40081E147F ! 9321>I<38FF87F8381E03C0380E0180EB0300EA0702EA0384EA01C813D8EA00F0137013 ! 7813F8139CEA010E1202EA060738040380000C13C0003C13E038FE07FC16147F9318>I< ! 38FF83F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8 ! A21370A31320A25BA3EAF080A200F1C7FC1262123C151D7F9318>II E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fq cmbx12 20.736 13 ! /Fq 13 122 df)d ! Fo(in)j(an)o(y)f(\014le)75 1513 y(that)d(uses)h(the)h(History)e (library's)i(features.)18 b(It)12 b(supplies)i(extern)e(declarations)h ! (for)e(all)i(of)f(the)g(library's)75 1568 y(public)17 b(functions)f(and)g(v)m(ariables,)g(and)f(declares)h(all)g(of)f(the)h ! (public)h(data)d(structures.)75 1686 y Fm(2.2)33 b(History)22 ! b(Storage)137 1778 y Fo(The)16 b(history)f(list)h(is)g(an)f(arra)o(y)f (of)g(history)i(en)o(tries.)k(A)15 b(history)g(en)o(try)g(is)h ! (declared)g(as)f(follo)o(ws:)195 1839 y Fn(typedef)23 ! b(struct)g(_hist_entry)f({)243 1891 y(char)h(*line;)243 ! 1943 y(char)g(*data;)195 1995 y(})h(HIST_ENTRY;)137 2058 ! y Fo(The)16 b(history)f(list)h(itself)g(migh)o(t)f(therefore)g(b)q(e)h ! (declared)g(as)195 2119 y Fn(HIST_ENTRY)22 b(**the_history_list;)137 ! 2183 y Fo(The)16 b(state)e(of)h(the)g(History)g(library)h(is)g ! (encapsulated)g(in)o(to)f(a)g(single)i(structure:)195 ! 2243 y Fn(/*)24 b(A)f(structure)g(used)g(to)h(pass)f(the)h(current)f ! (state)g(of)g(the)h(history)f(stuff)g(around.)g(*/)p ! 2033 2253 21 42 v 195 2295 a(typedef)g(struct)g(_hist_state)f({)243 ! 2347 y(HIST_ENTRY)g(**entries;)214 b(/*)23 b(Pointer)g(to)h(the)f ! (entries)g(themselves.)f(*/)243 2399 y(int)h(offset;)453 ! b(/*)23 b(The)h(location)e(pointer)h(within)g(this)h(array.)f(*/)p ! 2033 2409 V 243 2451 a(int)g(length;)453 b(/*)23 b(Number)g(of)h ! (elements)f(within)g(this)g(array.)g(*/)p 1985 2461 V ! 243 2503 a(int)g(size;)501 b(/*)23 b(Number)g(of)h(slots)f(allocated)g ! (to)g(this)h(array.)f(*/)p 2057 2513 V 243 2555 a(int)g(flags;)195 ! 2606 y(})h(HISTORY_STATE;)137 2670 y Fo(If)16 b(the)f(\015ags)g(mem)o ! (b)q(er)g(includes)j Fn(HS_STIFLED)p Fo(,)13 b(the)i(history)h(has)f(b) ! q(een)h(sti\015ed.)p eop %%Page: 6 8 ! 6 7 bop 75 -58 a Fo(6)1347 b(GNU)15 b(History)g(Library)75 ! 183 y Fm(2.3)33 b(History)22 b(F)-6 b(unctions)137 278 ! y Fo(This)21 b(section)g(describ)q(es)h(the)f(calling)h(sequence)g(for) ! e(the)g(v)m(arious)h(functions)g(presen)o(t)g(in)g(GNU)75 ! 333 y(History)l(.)75 441 y Fi(2.3.1)30 b(Initializing)20 ! b(History)h(and)f(State)g(Managemen)n(t)137 536 y Fo(This)e(section)g ! (describ)q(es)h(functions)f(used)g(to)e(initialize)21 ! b(and)c(manage)g(the)g(state)g(of)g(the)g(History)75 ! 591 y(library)f(when)g(y)o(ou)f(w)o(an)o(t)f(to)g(use)i(the)f(history)g ! (functions)h(in)g(y)o(our)f(program.)1650 679 y(F)l(unction)-1749 ! b Fh(void)20 b Fg(using)p 333 679 18 3 v 20 w(history)j ! Ff(\(\))195 734 y Fo(Begin)18 b(a)f(session)h(in)g(whic)o(h)g(the)g ! (history)f(functions)h(migh)o(t)f(b)q(e)h(used.)27 b(This)18 ! b(initializes)195 788 y(the)d(in)o(teractiv)o(e)h(v)m(ariables.)1650 ! 877 y(F)l(unction)-1749 b Fh(HISTORY_STATE)21 b(*)e Fg(history)p ! 657 877 V 21 w(get)p 755 877 V 21 w(history)p 951 877 ! V 21 w(state)j Ff(\(\))195 931 y Fo(Return)16 b(a)f(structure)g ! (describing)i(the)e(curren)o(t)g(state)f(of)h(the)g(input)i(history)l ! (.)1650 1019 y(F)l(unction)-1749 b Fh(void)20 b Fg(history)p ! 377 1019 V 20 w(set)p 468 1019 V 21 w(history)p 664 1019 ! V 21 w(state)j Ff(\()p Fn(HISTORY_STATE)13 b(*state)p ! Ff(\))195 1074 y Fo(Set)i(the)h(state)e(of)h(the)g(history)g(list)h ! (according)g(to)e Fj(state)p Fo(.)75 1182 y Fi(2.3.2)30 ! b(History)20 b(List)h(Managemen)n(t)137 1277 y Fo(These)11 b(functions)h(manage)e(individual)k(en)o(tries)d(on)g(the)g(history)f ! (list,)i(or)f(set)f(parameters)g(managing)75 1332 y(the)15 ! b(list)h(itself.)1650 1420 y(F)l(unction)-1749 b Fh(void)20 ! b Fg(add)p 294 1420 V 20 w(history)j Ff(\()p Fn(char)14 ! b(*string)p Ff(\))195 1475 y Fo(Place)i Fj(string)j Fo(at)c(the)g(end)i ! (of)d(the)i(history)f(list.)22 b(The)15 b(asso)q(ciated)h(data)f ! (\014eld)h(\(if)g(an)o(y\))e(is)195 1530 y(set)h(to)g ! Fn(NULL)p Fo(.)1650 1618 y(F)l(unction)-1749 b Fh(HIST_ENTRY)21 ! b(*)e Fg(remo)n(v)n(e)p 584 1618 V 20 w(history)k Ff(\()p ! Fn(int)14 b(which)p Ff(\))195 1673 y Fo(Remo)o(v)o(e)g(history)g(en)o ! (try)f(at)h(o\013set)f Fj(whic)o(h)h Fo(from)g(the)g(history)l(.)19 ! b(The)14 b(remo)o(v)o(ed)g(elemen)o(t)g(is)195 1727 y(returned)i(so)e ! (y)o(ou)h(can)h(free)f(the)g(line,)i(data,)d(and)h(con)o(taining)h ! (structure.)1650 1816 y(F)l(unction)-1749 b Fh(HIST_ENTRY)21 ! b(*)e Fg(replace)p 580 1816 V 22 w(history)p 777 1816 ! V 20 w(en)n(try)24 b Ff(\()p Fn(int)14 b(which,)g(char)283 ! 1870 y(*line,)g(char)g(*data)p Ff(\))195 1925 y Fo(Mak)o(e)f(the)h ! (history)f(en)o(try)g(at)g(o\013set)g Fj(whic)o(h)h Fo(ha)o(v)o(e)g ! Fj(line)k Fo(and)13 b Fj(data)p Fo(.)19 b(This)14 b(returns)g(the)f ! (old)195 1980 y(en)o(try)k(so)g(y)o(ou)g(can)g(disp)q(ose)i(of)d(the)i ! (data.)25 b(In)18 b(the)f(case)h(of)f(an)g(in)o(v)m(alid)i ! Fj(whic)o(h)p Fo(,)g(a)e Fn(NULL)195 2035 y Fo(p)q(oin)o(ter)f(is)f ! (returned.)1650 2123 y(F)l(unction)-1749 b Fh(void)20 ! b Fg(clear)p 320 2123 V 21 w(history)j Ff(\(\))195 2178 ! y Fo(Clear)15 b(the)h(history)f(list)h(b)o(y)f(deleting)i(all)f(the)f ! (en)o(tries.)1650 2266 y(F)l(unction)-1749 b Fh(void)20 ! b Fg(sti\015e)p 320 2266 V 21 w(history)j Ff(\()p Fn(int)14 ! b(max)p Ff(\))195 2321 y Fo(Sti\015e)i(the)f(history)h(list,)f(remem)o ! (b)q(ering)h(only)g(the)f(last)g Fj(max)j Fo(en)o(tries.)1650 ! 2409 y(F)l(unction)-1749 b Fh(int)20 b Fg(unsti\015e)p ! 358 2409 V 21 w(history)i Ff(\(\))195 2463 y Fo(Stop)e(sti\015ing)i ! (the)f(history)l(.)36 b(This)21 b(returns)g(the)f(previous)i(amoun)o(t) ! e(the)g(history)h(w)o(as)195 2518 y(sti\015ed.)g(The)15 ! b(v)m(alue)i(is)e(p)q(ositiv)o(e)i(if)e(the)g(history)h(w)o(as)e ! (sti\015ed,)i(negativ)o(e)f(if)h(it)f(w)o(asn't.)1650 ! 2606 y(F)l(unction)-1749 b Fh(int)20 b Fg(history)p 351 ! 2606 V 20 w(is)p 409 2606 V 21 w(sti\015ed)k Ff(\(\))195 ! 2661 y Fo(Returns)16 b(non-zero)f(if)h(the)f(history)g(is)h(sti\015ed,) ! g(zero)f(if)g(it)h(is)g(not.)p eop %%Page: 7 9 ! 7 8 bop 75 -58 a Fo(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (History)889 b(7)75 183 y Fi(2.3.3)30 b(Information)19 ! b(Ab)r(out)i(the)f(History)h(List)137 279 y Fo(These)13 ! b(functions)h(return)f(information)g(ab)q(out)f(the)h(en)o(tire)h ! (history)e(list)i(or)e(individual)k(list)e(en)o(tries.)1650 ! 371 y(F)l(unction)-1749 b Fh(HIST_ENTRY)21 b(**)e Fg(history)p ! 605 371 18 3 v 21 w(list)24 b Ff(\(\))195 426 y Fo(Return)f(a)g ! Fn(NULL)f Fo(terminated)g(arra)o(y)g(of)g Fn(HIST_ENTRY)f ! Fo(whic)o(h)j(is)f(the)f(curren)o(t)h(input)195 481 y(history)l(.)j ! (Elemen)o(t)18 b(0)e(of)h(this)h(list)g(is)f(the)h(b)q(eginning)h(of)e ! (time.)26 b(If)17 b(there)g(is)h(no)f(history)l(,)195 ! 535 y(return)e Fn(NULL)p Fo(.)1650 627 y(F)l(unction)-1749 ! b Fh(int)20 b Fg(where)p 325 627 V 20 w(history)j Ff(\(\))195 ! 682 y Fo(Returns)16 b(the)f(o\013set)f(of)h(the)g(curren)o(t)g(history) ! g(elemen)o(t.)1650 773 y(F)l(unction)-1749 b Fh(HIST_ENTRY)21 ! b(*)e Fg(curren)n(t)p 587 773 V 21 w(history)k Ff(\(\))195 ! 828 y Fo(Return)g(the)f(history)g(en)o(try)g(at)f(the)h(curren)o(t)g(p) ! q(osition,)j(as)c(determined)j(b)o(y)e Fn(where_)195 ! 883 y(history)14 b(\(\))p Fo(.)20 b(If)15 b(there)g(is)h(no)f(en)o(try) ! g(there,)g(return)g(a)g Fn(NULL)g Fo(p)q(oin)o(ter.)1650 ! 975 y(F)l(unction)-1749 b Fh(HIST_ENTRY)21 b(*)e Fg(history)p ! 579 975 V 21 w(get)j Ff(\()p Fn(int)15 b(offset)p Ff(\))195 ! 1029 y Fo(Return)21 b(the)g(history)g(en)o(try)f(at)g(p)q(osition)i ! Fj(o\013set)p Fo(,)e(starting)g(from)g Fn(history_base)p ! Fo(.)35 b(If)195 1084 y(there)16 b(is)h(no)g(en)o(try)f(there,)g(or)g ! (if)g Fj(o\013set)h Fo(is)g(greater)e(than)h(the)h(history)f(length,)h ! (return)f(a)195 1139 y Fn(NULL)f Fo(p)q(oin)o(ter.)1650 ! 1231 y(F)l(unction)-1749 b Fh(int)20 b Fg(history)p 351 ! 1231 V 20 w(total)p 487 1231 V 22 w(b)n(ytes)j Ff(\(\))195 ! 1285 y Fo(Return)c(the)f(n)o(um)o(b)q(er)g(of)g(b)o(ytes)g(that)f(the)h ! (primary)h(history)f(en)o(tries)g(are)g(using.)29 b(This)195 ! 1340 y(function)16 b(returns)f(the)g(sum)h(of)e(the)i(lengths)f(of)g ! (all)h(the)g(lines)g(in)g(the)g(history)l(.)75 1452 y Fi(2.3.4)30 b(Mo)n(ving)21 b(Around)f(the)h(History)g(List)137 ! 1548 y Fo(These)16 b(functions)g(allo)o(w)f(the)g(curren)o(t)h(index)g (in)o(to)f(the)h(history)f(list)h(to)e(b)q(e)i(set)f(or)g(c)o(hanged.) ! 1650 1640 y(F)l(unction)-1749 b Fh(int)20 b Fg(history)p ! 351 1640 V 20 w(set)p 442 1640 V 21 w(p)r(os)h Ff(\()p ! Fn(int)15 b(pos)p Ff(\))195 1694 y Fo(Set)g(the)h(p)q(osition)g(in)g ! (the)f(history)g(list)h(to)f Fj(p)q(os)p Fo(,)g(an)g(absolute)g(index)i ! (in)o(to)e(the)g(list.)1650 1786 y(F)l(unction)-1749 ! b Fh(HIST_ENTRY)21 b(*)e Fg(previous)p 615 1786 V 20 ! w(history)k Ff(\(\))195 1841 y Fo(Bac)o(k)17 b(up)h(the)f(curren)o(t)g ! (history)g(o\013set)f(to)h(the)g(previous)h(history)f(en)o(try)l(,)g ! (and)g(return)g(a)195 1896 y(p)q(oin)o(ter)f(to)e(that)h(en)o(try)l(.)k ! (If)d(there)f(is)h(no)f(previous)h(en)o(try)l(,)f(return)g(a)g ! Fn(NULL)f Fo(p)q(oin)o(ter.)1650 1987 y(F)l(unction)-1749 ! b Fh(HIST_ENTRY)21 b(*)e Fg(next)p 514 1987 V 21 w(history)k ! Ff(\(\))195 2042 y Fo(Mo)o(v)o(e)17 b(the)h(curren)o(t)g(history)f ! (o\013set)g(forw)o(ard)g(to)g(the)h(next)g(history)g(en)o(try)l(,)g ! (and)g(return)195 2097 y(the)d(a)g(p)q(oin)o(ter)h(to)e(that)h(en)o ! (try)l(.)20 b(If)15 b(there)g(is)h(no)f(next)g(en)o(try)l(,)g(return)g ! (a)g Fn(NULL)g Fo(p)q(oin)o(ter.)75 2208 y Fi(2.3.5)30 ! b(Searc)n(hing)21 b(the)f(History)h(List)137 2304 y Fo(These)14 ! b(functions)g(allo)o(w)g(searc)o(hing)g(of)e(the)i(history)f(list)h ! (for)f(en)o(tries)h(con)o(taining)g(a)f(sp)q(eci\014c)i(string.)75 ! 2359 y(Searc)o(hing)f(ma)o(y)g(b)q(e)g(p)q(erformed)g(b)q(oth)g(forw)o ! (ard)e(and)i(bac)o(kw)o(ard)f(from)g(the)h(curren)o(t)g(history)f(p)q ! (osition.)75 2414 y(The)j(searc)o(h)f(ma)o(y)g(b)q(e)i ! Fj(anc)o(hored)p Fo(,)e(meaning)h(that)f(the)h(string)g(m)o(ust)f(matc) ! o(h)g(at)g(the)h(b)q(eginning)i(of)d(the)75 2469 y(history)g(en)o(try)l ! (.)1650 2560 y(F)l(unction)-1749 b Fh(int)20 b Fg(history)p ! 351 2560 V 20 w(searc)n(h)j Ff(\()p Fn(char)14 b(*string,)g(int)h ! (direction)p Ff(\))195 2615 y Fo(Searc)o(h)g(the)h(history)f(for)f ! Fj(string)p Fo(,)h(starting)f(at)h(the)g(curren)o(t)g(history)g ! (o\013set.)k(If)d Fj(direction)195 2670 y Fn(<)j Fo(0,)g(then)g(the)h ! (searc)o(h)e(is)i(through)e(previous)i(en)o(tries,)g(else)g(through)f ! (subsequen)o(t.)32 b(If)p eop %%Page: 8 10 ! 8 9 bop 75 -58 a Fo(8)1347 b(GNU)15 b(History)g(Library)195 ! 183 y Fj(string)k Fo(is)d(found,)f(then)h(the)f(curren)o(t)g(history)g ! (index)i(is)f(set)f(to)f(that)h(history)g(en)o(try)l(,)g(and)195 ! 238 y(the)g(v)m(alue)h(returned)f(is)g(the)g(o\013set)f(in)h(the)g ! (line)h(of)e(the)h(en)o(try)g(where)g Fj(string)j Fo(w)o(as)c(found.) ! 195 293 y(Otherwise,)i(nothing)f(is)h(c)o(hanged,)f(and)h(a)e(-1)h(is)h ! (returned.)1650 396 y(F)l(unction)-1749 b Fh(int)20 b ! Fg(history)p 351 396 18 3 v 20 w(searc)n(h)p 527 396 ! V 21 w(pre\014x)i Ff(\()p Fn(char)15 b(*string,)f(int)g(direction)p ! Ff(\))195 451 y Fo(Searc)o(h)i(the)f(history)g(for)g ! Fj(string)p Fo(,)g(starting)g(at)g(the)g(curren)o(t)h(history)f ! (o\013set.)k(The)d(searc)o(h)195 506 y(is)h(anc)o(hored:)23 ! b(matc)o(hing)17 b(lines)h(m)o(ust)e(b)q(egin)i(with)f ! Fj(string)p Fo(.)25 b(If)17 b Fj(direction)h Fn(<)e Fo(0,)h(then)g(the) ! 195 560 y(searc)o(h)f(is)g(through)f(previous)i(en)o(tries,)f(else)g ! (through)g(subsequen)o(t.)22 b(If)16 b Fj(string)k Fo(is)c(found,)195 ! 615 y(then)i(the)g(curren)o(t)g(history)g(index)h(is)g(set)e(to)h(that) ! f(en)o(try)l(,)h(and)g(the)g(return)g(v)m(alue)h(is)g(0.)195 ! 670 y(Otherwise,)d(nothing)f(is)h(c)o(hanged,)f(and)h(a)e(-1)h(is)h ! (returned.)1650 773 y(F)l(unction)-1749 b Fh(int)20 b ! Fg(history)p 351 773 V 20 w(searc)n(h)p 527 773 V 21 ! w(p)r(os)h Ff(\()p Fn(char)15 b(*string,)f(int)g(direction,)g(int)283 ! 828 y(pos)p Ff(\))195 883 y Fo(Searc)o(h)h(for)g Fj(string)k ! Fo(in)d(the)f(history)g(list,)g(starting)g(at)f Fj(p)q(os)p ! Fo(,)h(an)g(absolute)g(index)i(in)o(to)e(the)195 937 ! y(list.)21 b(If)15 b Fj(direction)h Fo(is)g(negativ)o(e,)f(the)g(searc) ! o(h)g(pro)q(ceeds)g(bac)o(kw)o(ard)g(from)f Fj(p)q(os)p ! Fo(,)h(otherwise)195 992 y(forw)o(ard.)27 b(Returns)18 ! b(the)g(absolute)g(index)h(of)f(the)g(history)f(elemen)o(t)i(where)f ! Fj(string)k Fo(w)o(as)195 1047 y(found,)15 b(or)g(-1)g(otherwise.)75 ! 1170 y Fi(2.3.6)30 b(Managing)20 b(the)g(History)h(File)137 ! 1272 y Fo(The)16 b(History)g(library)h(can)e(read)h(the)g(history)g ! (from)f(and)h(write)g(it)g(to)f(a)h(\014le.)22 b(This)17 ! b(section)f(do)q(cu-)75 1327 y(men)o(ts)f(the)g(functions)h(for)f ! (managing)g(a)g(history)g(\014le.)1650 1430 y(F)l(unction)-1749 ! b Fh(int)20 b Fg(read)p 286 1430 V 20 w(history)i Ff(\()p ! Fn(char)15 b(*filename)p Ff(\))195 1485 y Fo(Add)h(the)f(con)o(ten)o ! (ts)f(of)h Fj(\014lename)j Fo(to)d(the)g(history)g(list,)g(a)g(line)h ! (at)f(a)f(time.)21 b(If)15 b Fj(\014lename)j Fo(is)195 ! 1539 y Fn(NULL)p Fo(,)c(then)i(read)f(from)f(`)p Fn(~/.history)p ! Fo('.)k(Returns)e(0)f(if)g(successful,)i(or)d(errno)h(if)h(not.)1650 ! 1643 y(F)l(unction)-1749 b Fh(int)20 b Fg(read)p 286 ! 1643 V 20 w(history)p 481 1643 V 20 w(range)i Ff(\()p ! Fn(char)15 b(*filename,)e(int)i(from,)g(int)f(to)p Ff(\))195 ! 1697 y Fo(Read)21 b(a)f(range)g(of)g(lines)i(from)e Fj(\014lename)p ! Fo(,)i(adding)f(them)g(to)f(the)g(history)h(list.)36 ! b(Start)195 1752 y(reading)15 b(at)e(line)j Fj(from)e ! Fo(and)g(end)h(at)e Fj(to)p Fo(.)19 b(If)c Fj(from)e ! Fo(is)i(zero,)f(start)f(at)g(the)h(b)q(eginning.)22 b(If)15 ! b Fj(to)195 1807 y Fo(is)i(less)g(than)f Fj(from)p Fo(,)g(then)h(read)f ! (un)o(til)i(the)e(end)h(of)f(the)h(\014le.)24 b(If)17 ! b Fj(\014lename)j Fo(is)d Fn(NULL)p Fo(,)f(then)195 1862 ! y(read)f(from)g(`)p Fn(~/.history)p Fo('.)i(Returns)f(0)f(if)h ! (successful,)g(or)e Fn(errno)h Fo(if)h(not.)1650 1965 ! y(F)l(unction)-1749 b Fh(int)20 b Fg(write)p 304 1965 ! V 22 w(history)i Ff(\()p Fn(char)15 b(*filename)p Ff(\))195 ! 2020 y Fo(W)l(rite)23 b(the)f(curren)o(t)g(history)h(to)f ! Fj(\014lename)p Fo(,)j(o)o(v)o(erwriting)d Fj(\014lename)k ! Fo(if)d(necessary)l(.)42 b(If)195 2074 y Fj(\014lename)20 ! b Fo(is)d Fn(NULL)p Fo(,)f(then)g(write)h(the)f(history)h(list)g(to)f ! (`)p Fn(~/.history)p Fo('.)21 b(V)l(alues)d(returned)195 ! 2129 y(are)d(as)g(in)h Fn(read_history)d(\(\))p Fo(.)1650 ! 2232 y(F)l(unction)-1749 b Fh(int)20 b Fg(app)r(end)p ! 360 2232 V 19 w(history)j Ff(\()p Fn(int)14 b(nelements,)g(char)h ! (*filename)p Ff(\))195 2287 y Fo(App)q(end)i(the)e(last)g ! Fj(nelemen)o(ts)j Fo(of)d(the)g(history)g(list)h(to)f ! Fj(\014lename)p Fo(.)1650 2390 y(F)l(unction)-1749 b ! Fh(int)20 b Fg(history)p 351 2390 V 20 w(truncate)p 582 ! 2390 V 21 w(\014le)k Ff(\()p Fn(char)14 b(*filename,)g(int)h(nlines)p ! Ff(\))195 2445 y Fo(T)l(runcate)g(the)h(history)f(\014le)h ! Fj(\014lename)p Fo(,)g(lea)o(ving)g(only)g(the)f(last)g ! Fj(nlines)k Fo(lines.)75 2568 y Fi(2.3.7)30 b(History)20 ! b(Expansion)137 2670 y Fo(These)c(functions)g(implemen)o(t)g ! Fn(csh)p Fo(-lik)o(e)g(history)g(expansion.)p eop %%Page: 9 11 ! 9 10 bop 75 -58 a Fo(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (History)889 b(9)1650 183 y(F)l(unction)-1749 b Fh(int)20 ! b Fg(history)p 351 183 18 3 v 20 w(expand)j Ff(\()p Fn(char)14 ! b(*string,)g(char)h(**output)p Ff(\))195 238 y Fo(Expand)k ! Fj(string)p Fo(,)g(placing)h(the)e(result)h(in)o(to)g ! Fj(output)p Fo(,)g(a)f(p)q(oin)o(ter)h(to)f(a)g(string)h(\(see)f(Sec-) ! 195 293 y(tion)d(1.1)g([History)f(In)o(teraction],)h(page)g(1\).)k ! (Returns:)195 370 y Fn(0)216 b Fo(If)16 b(no)g(expansions)h(to)q(ok)e ! (place)i(\(or,)d(if)j(the)f(only)g(c)o(hange)g(in)h(the)e(text)h(w)o ! (as)435 425 y(the)f(de-slashifying)j(of)c(the)i(history)f(expansion)h ! (c)o(haracter\);)195 502 y Fn(1)216 b Fo(if)16 b(expansions)g(did)g ! (tak)o(e)e(place;)195 580 y Fn(-1)192 b Fo(if)16 b(there)f(w)o(as)f(an) ! h(error)g(in)h(expansion;)195 657 y Fn(2)216 b Fo(if)16 ! b(the)g(returned)f(line)j(should)e(b)q(e)g(displa)o(y)o(ed,)h(but)e ! (not)g(executed,)i(as)e(with)435 712 y(the)g Fn(:p)g ! Fo(mo)q(di\014er)h(\(see)f(Section)i(1.1.3)c([Mo)q(di\014ers],)i(page)g ! (2\).)195 789 y(If)g(an)g(error)f(o)q(curred)i(in)g(expansion,)f(then)h ! Fj(output)f Fo(con)o(tains)g(a)g(descriptiv)o(e)i(error)d(mes-)195 ! 844 y(sage.)1650 932 y(F)l(unction)-1749 b Fh(char)20 ! b(*)f Fg(history)p 422 932 V 21 w(arg)p 524 932 V 19 ! w(extract)24 b Ff(\()p Fn(int)14 b(first,)h(int)g(last,)f(char)283 ! 987 y(*string)p Ff(\))195 1042 y Fo(Extract)g(a)g(string)g(segmen)o(t)g ! (consisting)i(of)e(the)g Fj(\014rst)i Fo(through)e Fj(last)h ! Fo(argumen)o(ts)f(presen)o(t)195 1097 y(in)i Fj(string)p ! Fo(.)k(Argumen)o(ts)15 b(are)f(brok)o(en)i(up)f(as)g(in)h(Bash.)1650 ! 1185 y(F)l(unction)-1749 b Fh(char)20 b(*)f Fg(get)p ! 324 1185 V 21 w(history)p 520 1185 V 20 w(ev)n(en)n(t)25 ! b Ff(\()p Fn(char)14 b(*string,)g(int)h(*cindex,)f(int)283 ! 1240 y(qchar)p Ff(\))195 1295 y Fo(Returns)h(the)g(text)f(of)g(the)h ! (history)g(ev)o(en)o(t)f(b)q(eginning)j(at)d Fj(string)k ! Fn(+)d Fj(*cindex)p Fo(.)20 b Fj(*cindex)f Fo(is)195 ! 1350 y(mo)q(di\014ed)e(to)e(p)q(oin)o(t)h(to)f(after)g(the)h(ev)o(en)o ! (t)f(sp)q(eci\014er.)23 b(A)o(t)16 b(function)g(en)o(try)l(,)f ! Fj(cindex)21 b Fo(p)q(oin)o(ts)195 1404 y(to)16 b(the)h(index)h(in)o ! (to)e Fj(string)21 b Fo(where)c(the)g(history)f(ev)o(en)o(t)h(sp)q ! (eci\014cation)h(b)q(egins.)26 b Fj(qc)o(har)19 b Fo(is)195 ! 1459 y(a)h(c)o(haracter)g(that)g(is)h(allo)o(w)o(ed)f(to)g(end)h(the)g ! (ev)o(en)o(t)f(sp)q(eci\014cation)i(in)g(addition)f(to)f(the)195 ! 1514 y(\\normal")15 b(terminating)g(c)o(haracters.)1650 ! 1602 y(F)l(unction)-1749 b Fh(char)20 b(**)f Fg(history)p ! 448 1602 V 21 w(tok)n(enize)25 b Ff(\()p Fn(char)14 b(*string)p ! Ff(\))195 1657 y Fo(Return)j(an)g(arra)o(y)f(of)g(tok)o(ens)g(parsed)h ! (out)g(of)f Fj(string)p Fo(,)h(m)o(uc)o(h)g(as)f(the)h(shell)h(migh)o ! (t.)25 b(The)195 1712 y(tok)o(ens)d(are)g(split)i(on)f(white)g(space)g ! (and)f(on)h(the)g(c)o(haracters)f Fn(\(\)<>;&|$)p Fo(,)h(and)f(shell) ! 195 1767 y(quoting)15 b(con)o(v)o(en)o(tions)h(are)e(ob)q(ey)o(ed.)75 ! 1892 y Fm(2.4)33 b(History)22 b(V)-6 b(ariables)137 1987 ! y Fo(This)23 b(section)f(describ)q(es)h(the)f(externally)h(visible)h(v) ! m(ariables)f(exp)q(orted)f(b)o(y)g(the)g(GNU)f(History)75 ! 2042 y(Library)l(.)1661 2130 y(V)l(ariable)-1749 b Fh(int)20 ! b Fg(history)p 351 2130 V 20 w(base)195 2185 y Fo(The)15 b(logical)i(o\013set)d(of)h(the)g(\014rst)g(en)o(try)g(in)h(the)f ! (history)g(list.)1661 2274 y(V)l(ariable)-1749 b Fh(int)20 ! b Fg(history)p 351 2274 V 20 w(length)195 2329 y Fo(The)15 b(n)o(um)o(b)q(er)h(of)f(en)o(tries)g(curren)o(tly)h(stored)f(in)h(the) ! f(history)g(list.)1661 2417 y(V)l(ariable)-1749 b Fh(int)20 ! b Fg(max)p 283 2417 V 19 w(input)p 435 2417 V 21 w(history)195 ! 2472 y Fo(The)14 b(maxim)o(um)f(n)o(um)o(b)q(er)h(of)e(history)i(en)o ! (tries.)19 b(This)14 b(m)o(ust)f(b)q(e)h(c)o(hanged)g(using)g ! Fn(stifle_)195 2527 y(history)g(\(\))p Fo(.)1661 2615 ! y(V)l(ariable)-1749 b Fh(char)20 b Fg(history)p 377 2615 ! V 20 w(expansion)p 644 2615 V 21 w(c)n(har)195 2670 y ! Fo(The)15 b(c)o(haracter)g(that)f(starts)g(a)h(history)g(ev)o(en)o(t.) ! 20 b(The)15 b(default)h(is)g(`)p Fn(!)p Fo('.)p eop ! %%Page: 10 12 ! 10 11 bop 75 -58 a Fo(10)1324 b(GNU)15 b(History)g(Library)1661 ! 183 y(V)l(ariable)-1749 b Fh(char)20 b Fg(history)p 377 ! 183 18 3 v 20 w(subst)p 529 183 V 20 w(c)n(har)195 238 ! y Fo(The)13 b(c)o(haracter)e(that)h(in)o(v)o(ok)o(es)g(w)o(ord)g ! (substitution)h(if)g(found)g(at)e(the)i(start)e(of)h(a)g(line.)21 ! b(The)195 293 y(default)16 b(is)f(`)p Fn(^)p Fo('.)1661 ! 388 y(V)l(ariable)-1749 b Fh(char)20 b Fg(history)p 377 ! 388 V 20 w(commen)n(t)p 627 388 V 19 w(c)n(har)195 443 ! y Fo(During)e(tok)o(enization,)h(if)f(this)h(c)o(haracter)e(is)i(seen)f ! (as)g(the)g(\014rst)g(c)o(haracter)f(of)g(a)h(w)o(ord,)195 ! 498 y(then)e(it)g(and)g(all)h(subsequen)o(t)g(c)o(haracters)e(up)h(to)g ! (a)f(newline)j(are)e(ignored,)g(suppressing)195 553 y(history)f ! (expansion)h(for)f(the)g(remainder)h(of)f(the)g(line.)22 ! b(This)15 b(is)h(disabled)h(b)o(y)e(default.)1661 648 ! y(V)l(ariable)-1749 b Fh(char)20 b(*)f Fg(history)p 422 ! 648 V 21 w(no)p 504 648 V 20 w(expand)p 704 648 V 20 ! w(c)n(hars)195 703 y Fo(The)j(list)h(of)f(c)o(haracters)f(whic)o(h)i ! (inhibit)h(history)e(expansion)h(if)g(found)f(immediately)195 ! 758 y(follo)o(wing)16 b Fj(history)p 528 758 14 2 v 16 ! w(expansion)p 739 758 V 18 w(c)o(har)p Fo(.)j(The)d(default)f(is)h ! (whitespace)g(and)g(`)p Fn(=)p Fo('.)1661 853 y(V)l(ariable)-1749 ! b Fh(char)20 b(*)f Fg(history)p 422 853 18 3 v 21 w(searc)n(h)p ! 599 853 V 20 w(delimiter)p 843 853 V 23 w(c)n(hars)195 ! 908 y Fo(The)f(list)h(of)e(additional)i(c)o(haracters)e(whic)o(h)i(can) ! f(delimit)h(a)f(history)g(searc)o(h)f(string,)h(in)195 ! 963 y(addition)c(to)d(whitespace,)j(`)p Fn(:)p Fo(')d(and)i(`)p ! Fn(?)p Fo(')f(in)h(the)f(case)h(of)f(a)g(substring)h(searc)o(h.)19 ! b(The)12 b(default)195 1018 y(is)k(empt)o(y)l(.)1661 ! 1113 y(V)l(ariable)-1749 b Fh(int)20 b Fg(history)p 351 ! 1113 V 20 w(quotes)p 533 1113 V 21 w(inhibit)p 717 1113 ! V 23 w(expansion)195 1168 y Fo(If)13 b(non-zero,)f(single-quoted)i(w)o ! (ords)e(are)g(not)g(scanned)h(for)f(the)g(history)h(expansion)g(c)o ! (har-)195 1223 y(acter.)19 b(The)d(default)g(v)m(alue)g(is)g(0.)1661 ! 1318 y(V)l(ariable)-1749 b Fh(Function)20 b(*)g Fg(history)p ! 527 1318 V 20 w(inhibit)p 710 1318 V 23 w(expansion)p ! 980 1318 V 21 w(function)195 1373 y Fo(This)12 b(should)g(b)q(e)g(set)f ! (to)f(the)i(address)f(of)g(a)g(function)h(that)e(tak)o(es)h(t)o(w)o(o)f ! (argumen)o(ts:)17 b(a)11 b Fn(char)195 1428 y(*)j Fo(\()p ! Fj(string)t Fo(\))f(and)i(an)f(in)o(teger)g(index)h(in)o(to)f(that)g ! (string)g(\()p Fj(i)r Fo(\).)20 b(It)14 b(should)h(return)f(a)g ! (non-zero)195 1482 y(v)m(alue)g(if)e(the)h(history)f(expansion)h ! (starting)f(at)g Fj(string[i])i Fo(should)f(not)f(b)q(e)h(p)q ! (erformed;)g(zero)195 1537 y(if)g(the)h(expansion)f(should)h(b)q(e)g ! (done.)20 b(It)13 b(is)g(in)o(tended)i(for)d(use)h(b)o(y)g ! (applications)i(lik)o(e)f(Bash)195 1592 y(that)j(use)h(the)g(history)f ! (expansion)i(c)o(haracter)e(for)g(additional)i(purp)q(oses.)28 ! b(By)18 b(default,)195 1647 y(this)e(v)m(ariable)g(is)g(set)f(to)f ! (NULL.)75 1780 y Fm(2.5)33 b(History)22 b(Programming)h(Example)137 ! 1878 y Fo(The)16 b(follo)o(wing)g(program)e(demonstrates)g(simple)j ! (use)e(of)g(the)g(GNU)g(History)g(Library)l(.)195 1944 ! y Fn(main)23 b(\(\))195 1995 y({)243 2047 y(char)g(line[1024],)f(*t;) ! 243 2099 y(int)h(len,)g(done)h(=)g(0;)243 2203 y(line[0])f(=)g(0;)243 ! 2307 y(using_history)f(\(\);)243 2359 y(while)h(\(!done\))290 ! 2411 y({)338 2462 y(printf)g(\("history$)g("\);)338 2514 ! y(fflush)g(\(stdout\);)338 2566 y(t)h(=)g(fgets)f(\(line,)g(sizeof)g ! (\(line\))g(-)h(1,)f(stdin\);)338 2618 y(if)h(\(t)f(&&)h(*t\))386 ! 2670 y({)p eop %%Page: 11 13 ! 11 12 bop 75 -58 a Fo(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (History)867 b(11)434 183 y Fn(len)23 b(=)h(strlen)f(\(t\);)434 ! 235 y(if)g(\(t[len)g(-)h(1])g(==)f('\\n'\))481 287 y(t[len)h(-)f(1])h ! (=)g('\\0';)386 339 y(})338 443 y(if)g(\(!t\))386 495 ! y(strcpy)f(\(line,)g("quit"\);)338 598 y(if)h(\(line[0]\))386 ! 650 y({)434 702 y(char)f(*expansion;)434 754 y(int)g(result;)434 ! 858 y(result)g(=)g(history_expand)f(\(line,)h(&expansion\);)434 ! 910 y(if)g(\(result\))481 962 y(fprintf)g(\(stderr,)g("\045s\\n",)g ! (expansion\);)434 1065 y(if)g(\(result)g(<)h(0)g(||)f(result)g(==)h ! (2\))481 1117 y({)529 1169 y(free)f(\(expansion\);)529 ! 1221 y(continue;)481 1273 y(})434 1377 y(add_history)f(\(expansion\);) ! 434 1429 y(strncpy)h(\(line,)g(expansion,)f(sizeof)h(\(line\))g(-)h ! (1\);)434 1480 y(free)f(\(expansion\);)386 1532 y(})338 ! 1636 y(if)h(\(strcmp)f(\(line,)g("quit"\))g(==)g(0\))386 ! 1688 y(done)g(=)h(1;)338 1740 y(else)f(if)h(\(strcmp)f(\(line,)g ! ("save"\))g(==)h(0\))386 1792 y(write_history)e(\("history_file"\);)338 ! 1844 y(else)h(if)h(\(strcmp)f(\(line,)g("read"\))g(==)h(0\))386 ! 1896 y(read_history)e(\("history_file"\);)338 1947 y(else)h(if)h ! (\(strcmp)f(\(line,)g("list"\))g(==)h(0\))386 1999 y({)434 ! 2051 y(register)e(HIST_ENTRY)h(**the_list;)434 2103 y(register)f(int)i ! (i;)434 2207 y(the_list)e(=)i(history_list)e(\(\);)434 ! 2259 y(if)h(\(the_list\))481 2311 y(for)h(\(i)f(=)h(0;)g(the_list[i];)e ! (i++\))529 2363 y(printf)h(\("\045d:)g(\045s\\n",)g(i)h(+)g ! (history_base,)e(the_list[i]->line\);)386 2414 y(})338 ! 2466 y(else)h(if)h(\(strncmp)f(\(line,)g("delete",)g(6\))g(==)h(0\))386 ! 2518 y({)434 2570 y(int)f(which;)434 2622 y(if)g(\(\(sscanf)g(\(line)g ! (+)h(6,)f("\045d",)h(&which\)\))e(==)i(1\))p eop %%Page: 12 14 ! 12 13 bop 75 -58 a Fo(12)1324 b(GNU)15 b(History)g(Library)481 ! 183 y Fn({)529 235 y(HIST_ENTRY)23 b(*entry)g(=)g(remove_history)f ! (\(which\);)529 287 y(if)i(\(!entry\))577 339 y(fprintf)f(\(stderr,)f ! ("No)i(such)f(entry)g(\045d\\n",)g(which\);)529 391 y(else)577 ! 443 y({)625 495 y(free)g(\(entry->line\);)625 546 y(free)g(\(entry\);) ! 577 598 y(})481 650 y(})434 702 y(else)481 754 y({)529 ! 806 y(fprintf)g(\(stderr,)g("non-numeric)f(arg)h(given)h(to)f ! (`delete'\\n"\);)481 858 y(})386 910 y(})290 962 y(})195 ! 1013 y(})p eop %%Page: 13 15 ! 13 14 bop 75 -58 a Fo(App)q(endix)17 b(A:)e(Concept)g(Index)1196 ! b(13)75 183 y Fk(App)r(endix)25 b(A)41 b(Concept)27 b(Index)75 ! 359 y Fm(A)75 417 y Fe(anc)o(hored)14 b(searc)o(h)s Fd(.)7 ! b(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)16 ! b Fe(7)75 517 y Fm(E)75 575 y Fe(ev)o(en)o(t)d(designators)c ! Fd(.)g(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)21 ! b Fe(1)1012 359 y Fm(H)1012 417 y Fe(history)15 b(ev)o(en)o(ts)s ! Fd(.)7 b(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)16 b Fe(1)1012 467 y(history)f(expansion)6 b Fd(.)j(.)d(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)19 b Fe(1)1012 517 y(History)14 ! b(Searc)o(hing)5 b Fd(.)j(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)18 b Fe(7)p eop %%Page: 14 16 ! 14 15 bop 75 -58 a Fo(14)1324 b(GNU)15 b(History)g(Library)p eop %%Page: 15 17 ! 15 16 bop 75 -58 a Fo(App)q(endix)17 b(B:)e(F)l(unction)h(and)g(V)l ! (ariable)g(Index)919 b(15)75 183 y Fk(App)r(endix)25 b(B)41 b(F)-7 b(unction)26 b(and)h(V)-7 b(ariable)26 ! b(Index)75 359 y Fm(A)75 417 y Fc(add)p 137 417 12 2 ! v 13 w(history)6 b Fd(.)s(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)h(.)18 b Fe(6)75 467 y Fc(append)p ! 197 467 V 12 w(history)8 b Fd(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)23 b Fe(8)75 567 y Fm(C)75 625 y Fc(clear)p ! 177 625 V 12 w(history)s Fd(.)t(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)16 b Fe(6)75 675 y Fc(current)p ! 217 675 V 11 w(history)7 b Fd(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)22 b Fe(7)75 774 y Fm(G)75 832 y Fc(get)p ! 137 832 V 13 w(history)p 290 832 V 11 w(event)8 b Fd(.)e(.)g(.)g(.)g(.) ! g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)22 b Fe(9)75 932 y Fm(H)75 ! 990 y Fc(history)p 217 990 V 11 w(arg)p 288 990 V 13 ! w(extract)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)20 ! b Fe(9)75 1040 y Fc(history)p 217 1040 V 11 w(base)f ! Fd(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)19 ! b Fe(9)75 1090 y Fc(history_co)o(mm)o(ent)o(_c)o(har)g ! Fd(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)23 b Fe(10)75 1139 y Fc(history)p ! 217 1139 V 11 w(expand)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)g(.)g(.)g(.)23 b Fe(9)75 1189 y Fc(history)p 217 ! 1189 V 11 w(expansion)p 408 1189 V 11 w(char)17 b Fd(.)6 ! b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)18 b Fe(9)75 1239 y Fc(history)p 217 ! 1239 V 11 w(get)6 b Fd(.)f(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)h(.)18 b Fe(7)75 1289 y Fc(history)p ! 217 1289 V 11 w(get)p 288 1289 V 13 w(history)p 441 1289 ! V 12 w(state)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fe(6)75 1339 y Fc(history_in)o(hi)o ! (bit)o(_e)o(xpa)o(nsi)o(on)o(_fu)o(nc)o(tio)o(n)c Fd(.)6 ! b(.)g(.)g(.)g(.)g(.)g(.)22 b Fe(10)75 1389 y Fc(history)p ! 217 1389 V 11 w(is)p 268 1389 V 14 w(stifled)8 b Fd(.)s(.)f(.)f(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)21 b Fe(6)75 1438 y Fc(history)p ! 217 1438 V 11 w(length)15 b Fd(.)6 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)17 b Fe(9)75 1488 y Fc(history)p 217 ! 1488 V 11 w(list)5 b Fd(.)g(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)17 b Fe(7)75 1538 y Fc(history_no)o(_e)o(xpa)o(nd)o ! (_ch)o(ars)e Fd(.)6 b(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)19 b Fe(10)75 1588 y Fc(history_qu)o(ot)o ! (es_)o(in)o(hib)o(it_)o(ex)o(pan)o(si)o(on)13 b Fd(.)6 ! b(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)16 b Fe(10)75 1638 ! y Fc(history)p 217 1638 V 11 w(search)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)23 b Fe(7)75 1687 y Fc(history_se)o(ar)o ! (ch_)o(de)o(lim)o(ite)o(r_)o(cha)o(rs)15 b Fd(.)6 b(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)18 b Fe(10)75 1737 y Fc(history)p ! 217 1737 V 11 w(search)p 348 1737 V 12 w(pos)8 b Fd(.)d(.)i(.)f(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)21 b Fe(8)75 1787 y Fc(history)p ! 217 1787 V 11 w(search)p 348 1787 V 12 w(prefix)5 b Fd(.)t(.)h(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)g(.)g(.)17 b Fe(8)75 1837 y Fc(history)p 217 1837 ! V 11 w(set)p 288 1837 V 13 w(history)p 441 1837 V 12 ! w(state)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)23 b Fe(6)75 1887 y Fc(history)p ! 217 1887 V 11 w(set)p 288 1887 V 13 w(pos)t Fd(.)5 b(.)h(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g ! (.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)16 b Fe(7)1012 359 ! y Fc(history_sub)o(st)o(_ch)o(ar)d Fd(.)6 b(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! 17 b Fe(10)1012 409 y Fc(history)p 1154 409 V 12 w(tokenize)8 ! b Fd(.)s(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Fe(9)1012 459 y Fc(history)p 1154 459 V 12 w(total)p ! 1266 459 V 12 w(bytes)7 b Fd(.)t(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)20 ! b Fe(7)1012 509 y Fc(history)p 1154 509 V 12 w(truncate)p ! 1326 509 V 11 w(file)5 b Fd(.)t(.)h(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)18 ! b Fe(8)1012 612 y Fm(M)1012 670 y Fc(max)p 1074 670 V ! 13 w(input)p 1187 670 V 13 w(history)13 b Fd(.)6 b(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)16 b Fe(9)1012 773 y Fm(N)1012 831 ! y Fc(next)p 1094 831 V 13 w(history)5 b Fd(.)s(.)h(.)g(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.) ! f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)18 b Fe(7)1012 ! 934 y Fm(P)1012 992 y Fc(previous)p 1174 992 V 11 w(history)8 ! b Fd(.)t(.)e(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)21 ! b Fe(7)1012 1096 y Fm(R)1012 1154 y Fc(read)p 1094 1154 ! V 13 w(history)5 b Fd(.)s(.)h(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)18 b Fe(8)1012 1204 y Fc(read)p 1094 ! 1204 V 13 w(history)p 1247 1204 V 11 w(range)8 b Fd(.)d(.)h(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)h(.)f(.)21 b Fe(8)1012 1253 y Fc(remove)p ! 1134 1253 V 12 w(history)8 b Fd(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)24 b Fe(6)1012 1303 y Fc(replace)p 1154 ! 1303 V 12 w(history)p 1306 1303 V 11 w(entry)5 b Fd(.)t(.)h(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)18 b Fe(6)1012 1406 y Fm(S)1012 1464 y Fc(stifle)p ! 1134 1464 V 12 w(history)8 b Fd(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)24 b Fe(6)1012 1568 y Fm(U)1012 1626 ! y Fc(unstifle)p 1174 1626 V 11 w(history)8 b Fd(.)t(.)e(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)21 b Fe(6)1012 1676 y Fc(using)p ! 1114 1676 V 13 w(history)s Fd(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)g(.)g(.)g(.)g(.)g(.)17 b Fe(6)1012 1779 y Fm(W)1012 ! 1837 y Fc(where)p 1114 1837 V 13 w(history)s Fd(.)s(.)6 ! b(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)h(.)f ! (.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)17 ! b Fe(7)1012 1887 y Fc(write)p 1114 1887 V 13 w(history)s ! Fd(.)s(.)6 b(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)g(.)17 b Fe(8)p eop %%Page: 16 18 ! 16 17 bop 75 -58 a Fo(16)1324 b(GNU)15 b(History)g(Library)p eop %%Page: -1 19 ! -1 18 bop 1862 -58 a Fo(i)75 183 y Fk(T)-7 b(able)27 ! b(of)f(Con)n(ten)n(ts)75 354 y Fm(1)67 b(Using)22 b(History)h(In)n (teractiv)n(ely)9 b Fb(.)k(.)d(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)h(.)31 b Fm(1)224 423 y Fo(1.1)45 b(History)15 b(Expansion)5 b Fa(.)j(.)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(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)19 b Fo(1)374 478 y(1.1.1)44 b(Ev)o(en)o(t)14 b(Designators)e Fa(.)7 b(.)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(.)26 b Fo(1)374 532 y(1.1.2)44 b(W)l(ord)15 b(Designators)5 b Fa(.)h(.)i(.)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 ! (.)19 b Fo(2)374 587 y(1.1.3)44 b(Mo)q(di\014ers)t Fa(.)8 b(.)g(.)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(.)h(.) ! f(.)h(.)f(.)19 b Fo(2)75 708 y Fm(2)67 b(Programming)23 b(with)g(GNU)f(History)16 b Fb(.)10 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f ! (.)g(.)38 b Fm(5)224 777 y Fo(2.1)45 b(In)o(tro)q(duction)16 b(to)f(History)10 b Fa(.)d(.)g(.)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(.)24 b Fo(5)224 832 y(2.2)45 b(History)15 b(Storage)c Fa(.)d(.)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(.)f(.)h(.)f(.)h(.)26 b Fo(5)224 886 y(2.3)45 b(History)15 b(F)l(unctions)d Fa(.)c(.)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(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)26 ! b Fo(6)374 941 y(2.3.1)44 b(Initializing)18 b(History)d(and)h(State)e (Managemen)o(t)g Fa(.)7 b(.)h(.)g(.)f(.)h(.)f(.)29 b ! Fo(6)374 996 y(2.3.2)44 b(History)15 b(List)h(Managemen)o(t)d Fa(.)7 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)29 b Fo(6)374 1051 y(2.3.3)44 b(Information)15 b(Ab)q(out)g(the)h(History)f(List)c Fa(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 ! b Fo(7)374 1106 y(2.3.4)44 b(Mo)o(ving)15 b(Around)g(the)g(History)g (List)c Fa(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f ! (.)h(.)25 b Fo(7)374 1160 y(2.3.5)44 b(Searc)o(hing)16 b(the)f(History)g(List)7 b Fa(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)22 ! b Fo(7)374 1215 y(2.3.6)44 b(Managing)15 b(the)g(History)g(File)6 b Fa(.)i(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)20 b Fo(8)374 1270 y(2.3.7)44 b(History)15 b(Expansion)9 b Fa(.)f(.)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(.)24 b Fo(8)224 1325 y(2.4)45 b(History)15 b(V)l(ariables)6 ! b Fa(.)j(.)e(.)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(.)h(.)f(.)h(.)f(.)h ! (.)f(.)h(.)f(.)h(.)f(.)21 b Fo(9)224 1380 y(2.5)45 b(History)15 b(Programming)f(Example)7 b Fa(.)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(.)22 ! b Fo(10)75 1501 y Fm(App)r(endix)i(A)67 b(Concept)22 b(Index)17 b Fb(.)10 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)h(.)f(.)g(.)38 b Fm(13)75 1636 y(App)r(endix)24 b(B)67 b(F)-6 b(unction)25 b(and)e(V)-6 b(ariable)24 b(Index)16 ! b Fb(.)10 b(.)g(.)g(.)38 b Fm(15)p eop %%Page: -2 20 ! -2 19 bop 75 -58 a Fo(ii)1346 b(GNU)15 b(History)g(Library)p eop %%Trailer --- 820,1655 ---- %%EndSetup %%Page: 1 1 ! 1 0 bop 75 659 a Fq(GNU)33 b(History)f(Library)p 75 709 ! 1800 17 v 960 757 a Fp(Edition)16 b(4.2,)e(for)h Fo(History)f(Library)g ! Fp(V)l(ersion)i(4.2.)1692 811 y(Apr)f(2001)75 2467 y ! Fn(Brian)23 b(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 b(Soft)n(w)n(are)f(F)-6 ! b(oundation)75 2534 y(Chet)22 b(Ramey)-6 b(,)23 b(Case)e(W)-6 ! b(estern)23 b(Reserv)n(e)f(Univ)n(ersit)n(y)p 75 2570 ! 1800 9 v eop %%Page: 2 2 ! 2 1 bop 75 217 a Fp(This)21 b(do)q(cumen)o(t)g(describ)q(es)h(the)f (GNU)f(History)g(library)l(,)j(a)d(programming)g(to)q(ol)g(that)g(pro)o ! (vides)h(a)75 271 y(consisten)o(t)15 b(user)h(in)o(terface)f(for)g (recalling)i(lines)f(of)f(previously)i(t)o(yp)q(ed)e(input.)75 ! 339 y(Published)i(b)o(y)f(the)f(F)l(ree)g(Soft)o(w)o(are)f(F)l ! (oundation)75 394 y(59)h(T)l(emple)h(Place,)f(Suite)i(330,)75 ! 448 y(Boston,)d(MA)h(02111)f(USA)75 516 y(P)o(ermission)j(is)f(gran)o (ted)g(to)f(mak)o(e)h(and)g(distribute)i(v)o(erbatim)d(copies)i(of)f ! (this)h(man)o(ual)f(pro)o(vided)h(the)75 570 y(cop)o(yrigh)o(t)e (notice)h(and)f(this)h(p)q(ermission)g(notice)g(are)f(preserv)o(ed)h ! (on)f(all)h(copies.)75 638 y(P)o(ermission)c(is)h(gran)o(ted)e(to)g (cop)o(y)h(and)g(distribute)h(mo)q(di\014ed)g(v)o(ersions)f(of)f(this)h ! (man)o(ual)g(under)h(the)f(con-)75 692 y(ditions)k(for)e(v)o(erbatim)h (cop)o(ying,)g(pro)o(vided)h(that)e(the)h(en)o(tire)h(resulting)g ! (deriv)o(ed)g(w)o(ork)e(is)h(distributed)75 747 y(under)h(the)f(terms)g (of)g(a)f(p)q(ermission)j(notice)f(iden)o(tical)h(to)e(this)g(one.)75 ! 814 y(P)o(ermission)i(is)g(gran)o(ted)f(to)g(cop)o(y)h(and)f (distribute)i(translations)f(of)f(this)h(man)o(ual)g(in)o(to)f(another) ! g(lan-)75 869 y(guage,)e(under)h(the)f(ab)q(o)o(v)o(e)g(conditions)i (for)d(mo)q(di\014ed)j(v)o(ersions,)e(except)h(that)f(this)h(p)q ! (ermission)g(notice)75 924 y(ma)o(y)f(b)q(e)i(stated)f(in)h(a)f (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 Fm(\015)h Fp(1988-2001)f(F)l(ree)i(Soft)o(w)o(are)f(F)l (oundation,)h(Inc.)p eop %%Page: 1 3 ! 1 2 bop 75 -58 a Fp(Chapter)15 b(1:)k(Using)d(History)f(In)o(teractiv)o ! (ely)1007 b(1)75 149 y Fl(1)41 b(Using)26 b(History)h(In)n(teractiv)n ! (ely)137 289 y Fp(This)17 b(c)o(hapter)g(describ)q(es)h(ho)o(w)e(to)g ! (use)h(the)g Fk(gnu)f Fp(History)g(Library)h(in)o(teractiv)o(ely)l(,)h ! (from)e(a)g(user's)75 344 y(standp)q(oin)o(t.)38 b(It)21 ! b(should)h(b)q(e)g(considered)g(a)f(user's)g(guide.)38 ! b(F)l(or)21 b(information)g(on)g(using)h(the)f Fk(gnu)75 ! 398 y Fp(History)c(Library)h(in)h(y)o(our)e(o)o(wn)g(programs,)f(see)i ! (Chapter)f(2)h([Programming)e(with)i(GNU)f(History],)75 ! 453 y(page)e(5.)75 600 y Fn(1.1)33 b(History)22 b(Expansion)137 ! 704 y Fp(The)c(History)g(library)h(pro)o(vides)f(a)f(history)h (expansion)h(feature)e(that)h(is)g(similar)h(to)e(the)h(history)75 ! 759 y(expansion)12 b(pro)o(vided)g(b)o(y)f Fo(csh)p Fp(.)18 b(This)11 b(section)h(describ)q(es)g(the)g(syn)o(tax)e(used)h(to)g ! (manipulate)h(the)f(history)75 814 y(information.)137 ! 888 y(History)k(expansions)h(in)o(tro)q(duce)h(w)o(ords)d(from)g(the)i (history)f(list)h(in)o(to)f(the)h(input)g(stream,)e(making)75 ! 943 y(it)h(easy)g(to)g(rep)q(eat)g(commands,)g(insert)h(the)f(argumen)o (ts)f(to)h(a)g(previous)h(command)f(in)o(to)g(the)g(curren)o(t)75 ! 998 y(input)h(line,)h(or)d(\014x)i(errors)e(in)i(previous)g(commands)f ! (quic)o(kly)l(.)137 1072 y(History)j(expansion)i(tak)o(es)d(place)i(in) h(t)o(w)o(o)d(parts.)28 b(The)19 b(\014rst)f(is)g(to)g(determine)i ! (whic)o(h)f(line)h(from)75 1127 y(the)h(history)f(list)i(should)g(b)q (e)f(used)g(during)h(substitution.)37 b(The)21 b(second)g(is)g(to)f ! (select)i(p)q(ortions)e(of)75 1182 y(that)15 b(line)i(for)d(inclusion)k (in)o(to)d(the)h(curren)o(t)f(one.)20 b(The)c(line)g(selected)h(from)e ! (the)g(history)g(is)h(called)h(the)75 1237 y Fj(ev)o(en)o(t)p ! Fp(,)c(and)h(the)g(p)q(ortions)g(of)f(that)g(line)i(that)e(are)g(acted) ! h(up)q(on)g(are)f(called)j Fj(w)o(ords)p Fp(.)i(V)l(arious)c ! Fj(mo)q(di\014ers)75 1292 y Fp(are)i(a)o(v)m(ailable)i(to)e(manipulate) i(the)e(selected)i(w)o(ords.)23 b(The)17 b(line)h(is)f(brok)o(en)f(in)o ! (to)h(w)o(ords)e(in)j(the)e(same)75 1346 y(fashion)c(that)e(Bash)i(do)q (es,)g(so)f(that)g(sev)o(eral)g(w)o(ords)g(surrounded)h(b)o(y)f(quotes) ! h(are)f(considered)h(one)g(w)o(ord.)75 1401 y(History)18 b(expansions)h(are)g(in)o(tro)q(duced)g(b)o(y)f(the)h(app)q(earance)g ! (of)f(the)g(history)h(expansion)g(c)o(haracter,)75 1456 ! y(whic)o(h)d(is)g(`)p Fo(!)p Fp(')e(b)o(y)h(default.)75 ! 1583 y Fi(1.1.1)30 b(Ev)n(en)n(t)21 b(Designators)137 ! 1687 y Fp(An)16 b(ev)o(en)o(t)f(designator)g(is)g(a)g(reference)h(to)f (a)g(command)g(line)i(en)o(try)d(in)i(the)g(history)f(list.)75 ! 1777 y Fo(!)216 b Fp(Start)16 b(a)g(history)h(substitution,)g(except)h (when)f(follo)o(w)o(ed)g(b)o(y)f(a)h(space,)g(tab,)f(the)h(end)g(of)315 ! 1832 y(the)e(line,)i(`)p Fo(=)p Fp(')d(or)h(`)p Fo(\()p ! Fp('.)75 1919 y Fo(!)p Fj(n)191 b Fp(Refer)15 b(to)f(command)h(line)i ! Fj(n)p Fp(.)75 2006 y Fo(!-)p Fj(n)167 b Fp(Refer)15 ! b(to)f(the)i(command)f Fj(n)g Fp(lines)i(bac)o(k.)75 ! 2094 y Fo(!!)192 b Fp(Refer)15 b(to)f(the)i(previous)f(command.)20 ! b(This)c(is)g(a)f(synon)o(ym)g(for)f(`)p Fo(!-1)p Fp('.)75 ! 2181 y Fo(!)p Fj(string)102 b Fp(Refer)15 b(to)f(the)i(most)e(recen)o ! (t)h(command)g(starting)g(with)g Fj(string)p Fp(.)75 ! 2268 y Fo(!?)p Fj(string)t Fo([?])315 2323 y Fp(Refer)h(to)g(the)h (most)f(recen)o(t)h(command)g(con)o(taining)g Fj(string)p ! Fp(.)25 b(The)17 b(trailing)g(`)p Fo(?)p Fp(')f(ma)o(y)g(b)q(e)315 ! 2377 y(omitted)f(if)h(the)f Fj(string)k Fp(is)d(follo)o(w)o(ed)f ! (immediately)i(b)o(y)e(a)g(newline.)75 2464 y Fo(^)p ! Fj(string1)t Fo(^)p Fj(string2)t Fo(^)315 2519 y Fp(Quic)o(k)i ! (Substitution.)23 b(Rep)q(eat)16 b(the)g(last)f(command,)h(replacing)h ! Fj(string1)i Fp(with)e Fj(string2)p Fp(.)315 2574 y(Equiv)m(alen)o(t)g ! (to)d Fo(!!:s/)p Fj(string1)t Fo(/)p Fj(string2)t Fo(/)p ! Fp(.)75 2661 y Fo(!#)192 b Fp(The)15 b(en)o(tire)h(command)f(line)i(t)o (yp)q(ed)f(so)e(far.)p eop %%Page: 2 4 ! 2 3 bop 75 -58 a Fp(2)1347 b(GNU)15 b(History)g(Library)75 ! 149 y Fi(1.1.2)30 b(W)-5 b(ord)20 b(Designators)137 247 ! y Fp(W)l(ord)d(designators)g(are)g(used)h(to)f(select)h(desired)h(w)o ! (ords)d(from)h(the)g(ev)o(en)o(t.)26 b(A)18 b(`)p Fo(:)p ! Fp(')e(separates)h(the)75 302 y(ev)o(en)o(t)j(sp)q(eci\014cation)h (from)e(the)h(w)o(ord)f(designator.)34 b(It)20 b(ma)o(y)f(b)q(e)h ! (omitted)g(if)g(the)g(w)o(ord)f(designator)75 357 y(b)q(egins)f(with)g ! (a)e(`)p Fo(^)p Fp(',)h(`)p Fo($)p Fp(',)f(`)p Fo(*)p ! Fp(',)g(`)p Fo(-)p Fp(',)g(or)h(`)p Fo(\045)p Fp('.)24 b(W)l(ords)17 b(are)g(n)o(um)o(b)q(ered)g(from)g(the)g(b)q(eginning)i ! (of)e(the)g(line,)75 411 y(with)j(the)g(\014rst)f(w)o(ord)h(b)q(eing)h (denoted)f(b)o(y)g(0)f(\(zero\).)33 b(W)l(ords)20 b(are)f(inserted)i ! (in)o(to)f(the)g(curren)o(t)f(line)75 466 y(separated)c(b)o(y)g(single) ! i(spaces.)137 535 y(F)l(or)e(example,)75 616 y Fo(!!)192 ! b Fp(designates)18 b(the)g(preceding)i(command.)28 b(When)18 b(y)o(ou)g(t)o(yp)q(e)g(this,)h(the)f(preceding)h(com-)315 ! 671 y(mand)c(is)h(rep)q(eated)g(in)g(toto.)75 752 y Fo(!!:$)144 ! b Fp(designates)12 b(the)f(last)g(argumen)o(t)f(of)h(the)g(preceding)i (command.)19 b(This)11 b(ma)o(y)g(b)q(e)h(shortened)315 ! 807 y(to)j Fo(!$)p Fp(.)75 887 y Fo(!fi:2)120 b Fp(designates)15 b(the)g(second)g(argumen)o(t)f(of)g(the)h(most)f(recen)o(t)g(command)h ! (starting)f(with)h(the)315 942 y(letters)g Fo(fi)p Fp(.)137 ! 1024 y(Here)h(are)f(the)g(w)o(ord)f(designators:)75 1105 ! y Fo(0)h(\(zero\))57 b Fp(The)15 b Fo(0)p Fp(th)g(w)o(ord.)20 b(F)l(or)14 b(man)o(y)h(applications,)h(this)g(is)g(the)f(command)g(w)o ! (ord.)75 1186 y Fj(n)215 b Fp(The)15 b Fj(n)p Fp(th)h(w)o(ord.)75 ! 1267 y Fo(^)216 b Fp(The)15 b(\014rst)g(argumen)o(t;)f(that)h(is,)g(w)o ! (ord)g(1.)75 1348 y Fo($)216 b Fp(The)15 b(last)h(argumen)o(t.)75 ! 1429 y Fo(\045)216 b Fp(The)15 b(w)o(ord)g(matc)o(hed)g(b)o(y)g(the)g ! (most)g(recen)o(t)g(`)p Fo(?)p Fj(string)t Fo(?)p Fp(')f(searc)o(h.)75 ! 1510 y Fj(x)p Fo(-)p Fj(y)168 b Fp(A)15 b(range)g(of)g(w)o(ords;)f(`)p ! Fo(-)p Fj(y)t Fp(')g(abbreviates)i(`)p Fo(0-)p Fj(y)t ! Fp('.)75 1591 y Fo(*)216 b Fp(All)15 b(of)f(the)f(w)o(ords,)g(except)i ! (the)f Fo(0)p Fp(th.)19 b(This)14 b(is)h(a)e(synon)o(ym)h(for)f(`)p ! Fo(1-$)p Fp('.)18 b(It)c(is)g(not)g(an)g(error)315 1645 ! y(to)g(use)h(`)p Fo(*)p Fp(')f(if)i(there)e(is)i(just)e(one)h(w)o(ord)f (in)i(the)f(ev)o(en)o(t;)f(the)h(empt)o(y)g(string)g(is)g(returned)g ! (in)315 1700 y(that)f(case.)75 1781 y Fj(x)s Fo(*)189 ! b Fp(Abbreviates)16 b(`)p Fj(x)p Fo(-$)p Fp(')75 1862 ! y Fj(x)p Fo(-)192 b Fp(Abbreviates)16 b(`)p Fj(x)p Fo(-$)p ! Fp(')e(lik)o(e)i(`)p Fj(x)s Fo(*)p Fp(',)e(but)i(omits)f(the)g(last)g ! (w)o(ord.)137 1943 y(If)i(a)g(w)o(ord)f(designator)h(is)h(supplied)h (without)e(an)g(ev)o(en)o(t)f(sp)q(eci\014cation,)j(the)e(previous)h ! (command)75 1998 y(is)e(used)f(as)g(the)h(ev)o(en)o(t.)75 ! 2113 y Fi(1.1.3)30 b(Mo)r(di\014ers)137 2210 y Fp(After)10 b(the)h(optional)g(w)o(ord)e(designator,)i(y)o(ou)f(can)h(add)f(a)g (sequence)i(of)e(one)g(or)g(more)g(of)g(the)g(follo)o(wing)75 ! 2265 y(mo)q(di\014ers,)16 b(eac)o(h)f(preceded)i(b)o(y)e(a)g(`)p ! Fo(:)p Fp('.)75 2346 y Fo(h)216 b Fp(Remo)o(v)o(e)14 ! b(a)h(trailing)h(pathname)f(comp)q(onen)o(t,)g(lea)o(ving)h(only)g(the) ! f(head.)75 2427 y Fo(t)216 b Fp(Remo)o(v)o(e)14 b(all)i(leading)h (pathname)e(comp)q(onen)o(ts,)g(lea)o(ving)h(the)f(tail.)75 ! 2508 y Fo(r)216 b Fp(Remo)o(v)o(e)14 b(a)h(trailing)h(su\016x)f(of)g ! (the)g(form)g(`)p Fo(.)p Fj(su\016x)s Fp(',)f(lea)o(ving)i(the)f ! (basename.)75 2589 y Fo(e)216 b Fp(Remo)o(v)o(e)14 b(all)i(but)g(the)f ! (trailing)h(su\016x.)75 2670 y Fo(p)216 b Fp(Prin)o(t)15 b(the)g(new)h(command)f(but)g(do)g(not)g(execute)h(it.)p eop %%Page: 3 5 ! 3 4 bop 75 -58 a Fp(Chapter)15 b(1:)k(Using)d(History)f(In)o(teractiv)o ! (ely)1007 b(3)75 149 y Fo(s/)p Fj(old)r Fo(/)p Fj(new)t ! Fo(/)315 204 y Fp(Substitute)17 b Fj(new)j Fp(for)c(the)h(\014rst)e(o)q ! (ccurrence)j(of)e Fj(old)i Fp(in)f(the)g(ev)o(en)o(t)f(line.)25 ! b(An)o(y)16 b(delimiter)315 259 y(ma)o(y)c(b)q(e)h(used)g(in)g(place)g ! (of)f(`)p Fo(/)p Fp('.)18 b(The)13 b(delimiter)h(ma)o(y)e(b)q(e)h ! (quoted)f(in)i Fj(old)g Fp(and)f Fj(new)k Fp(with)12 ! b(a)315 314 y(single)j(bac)o(kslash.)20 b(If)15 b(`)p ! Fo(&)p Fp(')e(app)q(ears)h(in)h Fj(new)p Fp(,)f(it)g(is)h(replaced)g(b) ! o(y)f Fj(old)p Fp(.)20 b(A)14 b(single)i(bac)o(kslash)315 ! 369 y(will)j(quote)e(the)h(`)p Fo(&)p Fp('.)25 b(The)17 b(\014nal)i(delimiter)g(is)f(optional)g(if)f(it)h(is)g(the)f(last)g(c)o ! (haracter)g(on)315 423 y(the)e(input)h(line.)75 503 y ! Fo(&)216 b Fp(Rep)q(eat)15 b(the)g(previous)h(substitution.)75 ! 583 y Fo(g)216 b Fp(Cause)19 b(c)o(hanges)h(to)e(b)q(e)i(applied)h(o)o (v)o(er)e(the)g(en)o(tire)h(ev)o(en)o(t)f(line.)34 b(Used)20 ! b(in)g(conjunction)315 638 y(with)c(`)p Fo(s)p Fp(',)d(as)i(in)h ! Fo(gs/)p Fj(old)r Fo(/)p Fj(new)t Fo(/)p Fp(,)f(or)g(with)g(`)p ! Fo(&)p Fp('.)p eop %%Page: 4 6 ! 4 5 bop 75 -58 a Fp(4)1347 b(GNU)15 b(History)g(Library)p eop %%Page: 5 7 ! 5 6 bop 75 -58 a Fp(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (History)889 b(5)75 149 y Fl(2)41 b(Programming)28 b(with)e(GNU)i ! (History)137 269 y Fp(This)17 b(c)o(hapter)f(describ)q(es)i(ho)o(w)e ! (to)f(in)o(terface)i(programs)e(that)g(y)o(ou)h(write)g(with)h(the)f ! Fk(gnu)g Fp(History)75 324 y(Library)l(.)24 b(It)17 b(should)g(b)q(e)g (considered)h(a)e(tec)o(hnical)i(guide.)25 b(F)l(or)15 b(information)i(on)f(the)h(in)o(teractiv)o(e)g(use)75 ! 379 y(of)e Fk(gnu)g Fp(History)l(,)g(see)g(Chapter)g(1)g([Using)g ! (History)g(In)o(teractiv)o(ely],)h(page)f(1.)75 509 y ! Fn(2.1)33 b(In)n(tro)r(duction)24 b(to)e(History)137 ! 607 y Fp(Man)o(y)11 b(programs)f(read)h(input)i(from)d(the)i(user)f(a)g ! (line)i(at)e(a)g(time.)19 b(The)12 b Fk(gnu)f Fp(History)g(library)h ! (is)g(able)75 661 y(to)i(k)o(eep)g(trac)o(k)g(of)g(those)g(lines,)i ! (asso)q(ciate)e(arbitrary)g(data)g(with)g(eac)o(h)h(line,)h(and)e ! (utilize)j(information)75 716 y(from)d(previous)i(lines)h(in)f(comp)q ! (osing)g(new)f(ones.)137 784 y(The)f(programmer)f(using)h(the)g ! (History)g(library)g(has)g(a)o(v)m(ailable)h(functions)g(for)e(remem)o ! (b)q(ering)h(lines)75 839 y(on)c(a)g(history)h(list,)g(asso)q(ciating)g ! (arbitrary)f(data)f(with)i(a)f(line,)j(remo)o(ving)d(lines)i(from)d ! (the)i(list,)h(searc)o(hing)75 894 y(through)17 b(the)h(list)g(for)f(a) ! h(line)h(con)o(taining)f(an)g(arbitrary)f(text)g(string,)h(and)g ! (referencing)h(an)o(y)e(line)i(in)75 949 y(the)c(list)i(directly)l(.)22 ! b(In)16 b(addition,)g(a)f(history)g Fj(expansion)h Fp(function)h(is)e (a)o(v)m(ailable)i(whic)o(h)g(pro)o(vides)f(for)e(a)75 ! 1003 y(consisten)o(t)h(user)h(in)o(terface)f(across)g(di\013eren)o(t)g ! (programs.)137 1072 y(The)f(user)h(using)f(programs)f(written)h(with)g (the)g(History)g(library)h(has)f(the)g(b)q(ene\014t)h(of)e(a)h ! (consisten)o(t)75 1126 y(user)20 b(in)o(terface)f(with)h(a)f(set)h(of)f (w)o(ell-kno)o(wn)h(commands)g(for)e(manipulating)k(the)d(text)g(of)g ! (previous)75 1181 y(lines)c(and)f(using)h(that)e(text)g(in)i(new)f (commands.)19 b(The)14 b(basic)h(history)e(manipulation)j(commands)d ! (are)75 1236 y(similar)j(to)f(the)g(history)g(substitution)h(pro)o ! (vided)g(b)o(y)g Fo(csh)p Fp(.)137 1304 y(If)f(the)g(programmer)f ! (desires,)h(he)g(can)g(use)g(the)g(Readline)h(library)l(,)g(whic)o(h)f ! (includes)j(some)c(history)75 1359 y(manipulation)j(b)o(y)e(default,)g (and)h(has)f(the)g(added)h(adv)m(an)o(tage)f(of)f(command)h(line)i ! (editing.)137 1427 y(Before)i(declaring)i(an)o(y)d(functions)i(using)g (an)o(y)f(functionalit)o(y)h(the)f(History)g(library)h(pro)o(vides)f ! (in)75 1482 y(other)14 b(co)q(de,)h(an)f(application)i(writer)e(should) ! i(include)g(the)f(\014le)g Fo()d ! Fp(in)j(an)o(y)f(\014le)75 1537 y(that)d(uses)h(the)h(History)e (library's)i(features.)18 b(It)12 b(supplies)i(extern)e(declarations)h ! (for)e(all)i(of)f(the)g(library's)75 1591 y(public)17 b(functions)f(and)g(v)m(ariables,)g(and)f(declares)h(all)g(of)f(the)h ! (public)h(data)d(structures.)75 1722 y Fn(2.2)33 b(History)22 ! b(Storage)137 1819 y Fp(The)16 b(history)f(list)h(is)g(an)f(arra)o(y)f (of)g(history)i(en)o(tries.)k(A)15 b(history)g(en)o(try)g(is)h ! (declared)g(as)f(follo)o(ws:)195 1885 y Fo(typedef)23 ! b(void)g(*histdata_t;)195 1988 y(typedef)g(struct)g(_hist_entry)f({)243 ! 2040 y(char)h(*line;)243 2092 y(histdata_t)f(data;)195 ! 2144 y(})i(HIST_ENTRY;)137 2212 y Fp(The)16 b(history)f(list)h(itself)g ! (migh)o(t)f(therefore)g(b)q(e)h(declared)g(as)195 2277 ! y Fo(HIST_ENTRY)22 b(**the_history_list;)137 2345 y Fp(The)16 ! b(state)e(of)h(the)g(History)g(library)h(is)g(encapsulated)g(in)o(to)f ! (a)g(single)i(structure:)195 2411 y Fo(/*)219 2462 y(*)24 ! b(A)f(structure)g(used)g(to)h(pass)f(around)g(the)h(current)f(state)g ! (of)g(the)h(history.)219 2514 y(*/)195 2566 y(typedef)f(struct)g ! (_hist_state)f({)243 2618 y(HIST_ENTRY)g(**entries;)h(/*)g(Pointer)g ! (to)h(the)f(entries)g(themselves.)g(*/)243 2670 y(int)g(offset;)262 ! b(/*)23 b(The)h(location)f(pointer)f(within)h(this)h(array.)f(*/)p ! eop %%Page: 6 8 ! 6 7 bop 75 -58 a Fp(6)1347 b(GNU)15 b(History)g(Library)243 ! 149 y Fo(int)23 b(length;)262 b(/*)23 b(Number)g(of)h(elements)f ! (within)g(this)g(array.)g(*/)243 201 y(int)g(size;)310 ! b(/*)23 b(Number)g(of)h(slots)f(allocated)g(to)g(this)h(array.)f(*/)243 ! 253 y(int)g(flags;)195 305 y(})h(HISTORY_STATE;)137 372 ! y Fp(If)16 b(the)f(\015ags)g(mem)o(b)q(er)g(includes)j ! Fo(HS_STIFLED)p Fp(,)13 b(the)i(history)h(has)f(b)q(een)h(sti\015ed.)75 ! 498 y Fn(2.3)33 b(History)22 b(F)-6 b(unctions)137 593 ! y Fp(This)13 b(section)g(describ)q(es)h(the)e(calling)i(sequence)g(for) ! e(the)g(v)m(arious)h(functions)g(exp)q(orted)f(b)o(y)h(the)f ! Fk(gnu)75 648 y Fp(History)j(library)l(.)75 758 y Fi(2.3.1)30 ! b(Initializing)20 b(History)h(and)f(State)g(Managemen)n(t)137 ! 853 y Fp(This)e(section)g(describ)q(es)h(functions)f(used)g(to)e ! (initialize)21 b(and)c(manage)g(the)g(state)g(of)g(the)g(History)75 ! 908 y(library)f(when)g(y)o(ou)f(w)o(an)o(t)f(to)g(use)i(the)f(history)g ! (functions)h(in)g(y)o(our)f(program.)1762 1021 y(F)l(unction)-1861 ! b Fh(void)20 b Fg(using)p 333 1021 18 3 v 20 w(history)j ! Ff(\()p Fo(void)p Ff(\))195 1075 y Fp(Begin)e(a)f(session)g(in)h(whic)o ! (h)g(the)f(history)g(functions)g(migh)o(t)g(b)q(e)h(used.)34 ! b(This)21 b(initializes)i(the)195 1130 y(in)o(teractiv)o(e)16 ! b(v)m(ariables.)1762 1243 y(F)l(unction)-1861 b Fh(HISTORY_STATE)21 ! b(*)e Fg(history)p 657 1243 V 21 w(get)p 755 1243 V 21 ! w(history)p 951 1243 V 21 w(state)j Ff(\()p Fo(void)p ! Ff(\))195 1298 y Fp(Return)15 b(a)g(structure)g(describing)i(the)e ! (curren)o(t)g(state)f(of)h(the)g(input)i(history)l(.)1762 ! 1411 y(F)l(unction)-1861 b Fh(void)20 b Fg(history)p ! 377 1411 V 20 w(set)p 468 1411 V 21 w(history)p 664 1411 ! V 21 w(state)j Ff(\()p Fo(HISTORY_STATE)13 b(*state)p ! Ff(\))195 1466 y Fp(Set)i(the)h(state)e(of)h(the)g(history)g(list)h ! (according)g(to)e Fj(state)p Fp(.)75 1575 y Fi(2.3.2)30 ! b(History)20 b(List)h(Managemen)n(t)137 1671 y Fp(These)11 b(functions)h(manage)e(individual)k(en)o(tries)d(on)g(the)g(history)f ! (list,)i(or)f(set)f(parameters)g(managing)75 1725 y(the)15 ! b(list)h(itself.)1762 1838 y(F)l(unction)-1861 b Fh(void)20 ! b Fg(add)p 294 1838 V 20 w(history)j Ff(\()p Fo(const)14 ! b(char)g(*string)p Ff(\))195 1893 y Fp(Place)i Fj(string)i ! Fp(at)d(the)g(end)h(of)e(the)h(history)g(list.)21 b(The)15 ! b(asso)q(ciated)g(data)g(\014eld)h(\(if)f(an)o(y\))f(is)i(set)f(to)195 ! 1948 y Fo(NULL)p Fp(.)1762 2061 y(F)l(unction)-1861 b ! Fh(HIST_ENTRY)21 b(*)e Fg(remo)n(v)n(e)p 584 2061 V 20 ! w(history)k Ff(\()p Fo(int)14 b(which)p Ff(\))195 2115 ! y Fp(Remo)o(v)o(e)22 b(history)g(en)o(try)h(at)f(o\013set)g ! Fj(whic)o(h)h Fp(from)f(the)h(history)l(.)43 b(The)23 ! b(remo)o(v)o(ed)f(elemen)o(t)h(is)195 2170 y(returned)16 ! b(so)e(y)o(ou)h(can)h(free)f(the)g(line,)i(data,)d(and)h(con)o(taining) ! h(structure.)1762 2283 y(F)l(unction)-1861 b Fh(HIST_ENTRY)21 ! b(*)e Fg(replace)p 580 2283 V 22 w(history)p 777 2283 ! V 20 w(en)n(try)24 b Ff(\()p Fo(int)14 b(which,)g(const)h(char)283 ! 2338 y(*line,)f(histdata_t)g(data)p Ff(\))195 2393 y ! Fp(Mak)o(e)f(the)h(history)g(en)o(try)f(at)g(o\013set)g ! Fj(whic)o(h)i Fp(ha)o(v)o(e)e Fj(line)18 b Fp(and)c Fj(data)p ! Fp(.)19 b(This)14 b(returns)g(the)g(old)g(en)o(try)195 ! 2448 y(so)19 b(y)o(ou)f(can)i(disp)q(ose)g(of)e(the)i(data.)30 ! b(In)20 b(the)f(case)g(of)g(an)g(in)o(v)m(alid)i Fj(whic)o(h)p ! Fp(,)g(a)d Fo(NULL)h Fp(p)q(oin)o(ter)g(is)195 2502 y(returned.)1762 ! 2615 y(F)l(unction)-1861 b Fh(void)20 b Fg(clear)p 320 ! 2615 V 21 w(history)j Ff(\()p Fo(void)p Ff(\))195 2670 ! y Fp(Clear)15 b(the)h(history)f(list)h(b)o(y)f(deleting)i(all)f(the)f ! (en)o(tries.)p eop %%Page: 7 9 ! 7 8 bop 75 -58 a Fp(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (History)889 b(7)1762 149 y(F)l(unction)-1861 b Fh(void)20 ! b Fg(sti\015e)p 320 149 18 3 v 21 w(history)j Ff(\()p ! Fo(int)14 b(max)p Ff(\))195 204 y Fp(Sti\015e)i(the)f(history)h(list,)f ! (remem)o(b)q(ering)h(only)g(the)f(last)g Fj(max)j Fp(en)o(tries.)1762 ! 307 y(F)l(unction)-1861 b Fh(int)20 b Fg(unsti\015e)p ! 358 307 V 21 w(history)i Ff(\()p Fo(void)p Ff(\))195 ! 361 y Fp(Stop)c(sti\015ing)i(the)e(history)l(.)29 b(This)19 ! b(returns)f(the)h(previous)g(amoun)o(t)e(the)i(history)f(w)o(as)f ! (sti\015ed.)195 416 y(The)e(v)m(alue)i(is)f(p)q(ositiv)o(e)g(if)f(the)h ! (history)f(w)o(as)f(sti\015ed,)i(negativ)o(e)f(if)h(it)f(w)o(asn't.) ! 1762 518 y(F)l(unction)-1861 b Fh(int)20 b Fg(history)p ! 351 518 V 20 w(is)p 409 518 V 21 w(sti\015ed)k Ff(\()p ! Fo(void)p Ff(\))195 573 y Fp(Returns)15 b(non-zero)g(if)h(the)f ! (history)g(is)h(sti\015ed,)g(zero)f(if)g(it)h(is)g(not.)75 ! 676 y Fi(2.3.3)30 b(Information)19 b(Ab)r(out)i(the)f(History)h(List) ! 137 770 y Fp(These)13 b(functions)h(return)f(information)g(ab)q(out)f ! (the)h(en)o(tire)h(history)e(list)i(or)e(individual)k(list)e(en)o ! (tries.)1762 872 y(F)l(unction)-1861 b Fh(HIST_ENTRY)21 ! b(**)e Fg(history)p 605 872 V 21 w(list)24 b Ff(\()p ! Fo(void)p Ff(\))195 927 y Fp(Return)15 b(a)g Fo(NULL)f ! Fp(terminated)i(arra)o(y)e(of)h Fo(HIST_ENTRY)f(*)h Fp(whic)o(h)h(is)f ! (the)h(curren)o(t)f(input)h(history)l(.)195 982 y(Elemen)o(t)g(0)f(of)f ! (this)i(list)g(is)g(the)f(b)q(eginning)i(of)e(time.)20 ! b(If)c(there)f(is)h(no)f(history)l(,)g(return)g Fo(NULL)p ! Fp(.)1762 1084 y(F)l(unction)-1861 b Fh(int)20 b Fg(where)p ! 325 1084 V 20 w(history)j Ff(\()p Fo(void)p Ff(\))195 ! 1139 y Fp(Returns)15 b(the)g(o\013set)f(of)h(the)g(curren)o(t)g ! (history)g(elemen)o(t.)1762 1241 y(F)l(unction)-1861 ! b Fh(HIST_ENTRY)21 b(*)e Fg(curren)n(t)p 587 1241 V 21 ! w(history)k Ff(\()p Fo(void)p Ff(\))195 1296 y Fp(Return)12 ! b(the)h(history)f(en)o(try)g(at)g(the)g(curren)o(t)h(p)q(osition,)g(as) ! f(determined)i(b)o(y)e Fo(where_history\(\))p Fp(.)195 ! 1350 y(If)j(there)h(is)f(no)h(en)o(try)e(there,)h(return)g(a)g ! Fo(NULL)g Fp(p)q(oin)o(ter.)1762 1453 y(F)l(unction)-1861 ! b Fh(HIST_ENTRY)21 b(*)e Fg(history)p 579 1453 V 21 w(get)j ! Ff(\()p Fo(int)15 b(offset)p Ff(\))195 1508 y Fp(Return)20 ! b(the)h(history)g(en)o(try)f(at)h(p)q(osition)g Fj(o\013set)p ! Fp(,)g(starting)f(from)g Fo(history_base)f Fp(\(see)i(Sec-)195 ! 1562 y(tion)15 b(2.4)f([History)g(V)l(ariables],)h(page)g(10\).)j(If)d ! (there)g(is)g(no)g(en)o(try)f(there,)h(or)f(if)h Fj(o\013set)g ! Fp(is)g(greater)195 1617 y(than)g(the)g(history)g(length,)h(return)f(a) ! g Fo(NULL)g Fp(p)q(oin)o(ter.)1762 1719 y(F)l(unction)-1861 ! b Fh(int)20 b Fg(history)p 351 1719 V 20 w(total)p 487 ! 1719 V 22 w(b)n(ytes)j Ff(\()p Fo(void)p Ff(\))195 1774 ! y Fp(Return)13 b(the)h(n)o(um)o(b)q(er)g(of)g(b)o(ytes)f(that)g(the)h ! (primary)g(history)g(en)o(tries)g(are)g(using.)20 b(This)14 ! b(function)195 1829 y(returns)h(the)g(sum)h(of)e(the)i(lengths)f(of)g ! (all)h(the)g(lines)g(in)g(the)g(history)l(.)75 1932 y Fi(2.3.4)30 b(Mo)n(ving)21 b(Around)f(the)h(History)g(List)137 ! 2026 y Fp(These)16 b(functions)g(allo)o(w)f(the)g(curren)o(t)h(index)g (in)o(to)f(the)h(history)f(list)h(to)e(b)q(e)i(set)f(or)g(c)o(hanged.) ! 1762 2128 y(F)l(unction)-1861 b Fh(int)20 b Fg(history)p ! 351 2128 V 20 w(set)p 442 2128 V 21 w(p)r(os)h Ff(\()p ! Fo(int)15 b(pos)p Ff(\))195 2183 y Fp(Set)j(the)h(curren)o(t)f(history) ! g(o\013set)g(to)f Fj(p)q(os)p Fp(,)i(an)f(absolute)h(index)h(in)o(to)e ! (the)g(list.)30 b(Returns)18 b(1)g(on)195 2237 y(success,)d(0)g(if)h ! Fj(p)q(os)h Fp(is)f(less)g(than)f(zero)g(or)g(greater)f(than)h(the)g(n) ! o(um)o(b)q(er)h(of)e(history)i(en)o(tries.)1762 2340 ! y(F)l(unction)-1861 b Fh(HIST_ENTRY)21 b(*)e Fg(previous)p ! 615 2340 V 20 w(history)k Ff(\()p Fo(void)p Ff(\))195 ! 2394 y Fp(Bac)o(k)14 b(up)h(the)g(curren)o(t)f(history)g(o\013set)g(to) ! f(the)i(previous)g(history)f(en)o(try)l(,)g(and)h(return)f(a)g(p)q(oin) ! o(ter)195 2449 y(to)h(that)f(en)o(try)l(.)20 b(If)15 ! b(there)g(is)h(no)f(previous)h(en)o(try)l(,)f(return)g(a)g ! Fo(NULL)g Fp(p)q(oin)o(ter.)1762 2552 y(F)l(unction)-1861 ! b Fh(HIST_ENTRY)21 b(*)e Fg(next)p 514 2552 V 21 w(history)k ! Ff(\()p Fo(void)p Ff(\))195 2606 y Fp(Mo)o(v)o(e)17 b(the)h(curren)o(t) ! f(history)h(o\013set)f(forw)o(ard)f(to)h(the)h(next)g(history)g(en)o ! (try)l(,)g(and)g(return)f(the)h(a)195 2661 y(p)q(oin)o(ter)e(to)e(that) ! h(en)o(try)l(.)k(If)d(there)f(is)h(no)f(next)g(en)o(try)l(,)g(return)g ! (a)g Fo(NULL)g Fp(p)q(oin)o(ter.)p eop %%Page: 8 10 ! 8 9 bop 75 -58 a Fp(8)1347 b(GNU)15 b(History)g(Library)75 ! 149 y Fi(2.3.5)30 b(Searc)n(hing)21 b(the)f(History)h(List)137 ! 245 y Fp(These)14 b(functions)g(allo)o(w)g(searc)o(hing)g(of)e(the)i ! (history)f(list)h(for)f(en)o(tries)h(con)o(taining)g(a)f(sp)q(eci\014c) ! i(string.)75 300 y(Searc)o(hing)f(ma)o(y)g(b)q(e)g(p)q(erformed)g(b)q ! (oth)g(forw)o(ard)e(and)i(bac)o(kw)o(ard)f(from)g(the)h(curren)o(t)g ! (history)f(p)q(osition.)75 355 y(The)j(searc)o(h)f(ma)o(y)g(b)q(e)i ! Fj(anc)o(hored)p Fp(,)e(meaning)h(that)f(the)h(string)g(m)o(ust)f(matc) ! o(h)g(at)g(the)h(b)q(eginning)i(of)d(the)75 410 y(history)g(en)o(try)l ! (.)1762 524 y(F)l(unction)-1861 b Fh(int)20 b Fg(history)p ! 351 524 18 3 v 20 w(searc)n(h)j Ff(\()p Fo(const)14 b(char)h(*string,)f ! (int)h(direction)p Ff(\))195 578 y Fp(Searc)o(h)g(the)f(history)g(for)g ! Fj(string)p Fp(,)g(starting)g(at)g(the)h(curren)o(t)f(history)g ! (o\013set.)19 b(If)c Fj(direction)g Fp(is)g(less)195 ! 633 y(than)20 b(0,)g(then)h(the)f(searc)o(h)f(is)i(through)f(previous)g ! (en)o(tries,)i(otherwise)e(through)f(subsequen)o(t)195 ! 688 y(en)o(tries.)h(If)c Fj(string)j Fp(is)d(found,)f(then)g(the)h ! (curren)o(t)f(history)g(index)h(is)g(set)f(to)g(that)f(history)h(en)o ! (try)l(,)195 743 y(and)i(the)g(v)m(alue)h(returned)f(is)g(the)g ! (o\013set)e(in)j(the)f(line)h(of)e(the)h(en)o(try)g(where)g ! Fj(string)j Fp(w)o(as)c(found.)195 798 y(Otherwise,)g(nothing)f(is)h(c) ! o(hanged,)f(and)h(a)e(-1)h(is)h(returned.)1762 912 y(F)l(unction)-1861 ! b Fh(int)20 b Fg(history)p 351 912 V 20 w(searc)n(h)p ! 527 912 V 21 w(pre\014x)i Ff(\()p Fo(const)14 b(char)h(*string,)f(int)h ! (direction)p Ff(\))195 966 y Fp(Searc)o(h)20 b(the)h(history)f(for)g ! Fj(string)p Fp(,)h(starting)e(at)h(the)g(curren)o(t)h(history)f ! (o\013set.)34 b(The)20 b(searc)o(h)g(is)195 1021 y(anc)o(hored:)g(matc) ! o(hing)14 b(lines)j(m)o(ust)d(b)q(egin)i(with)f Fj(string)p ! Fp(.)20 b(If)15 b Fj(direction)h Fp(is)f(less)g(than)g(0,)f(then)h(the) ! 195 1076 y(searc)o(h)g(is)i(through)e(previous)h(en)o(tries,)g ! (otherwise)g(through)f(subsequen)o(t)h(en)o(tries.)22 ! b(If)16 b Fj(string)j Fp(is)195 1131 y(found,)e(then)g(the)f(curren)o ! (t)h(history)f(index)i(is)f(set)f(to)g(that)g(en)o(try)l(,)g(and)h(the) ! f(return)h(v)m(alue)h(is)f(0.)195 1186 y(Otherwise,)f(nothing)f(is)h(c) ! o(hanged,)f(and)h(a)e(-1)h(is)h(returned.)1762 1300 y(F)l(unction)-1861 ! b Fh(int)20 b Fg(history)p 351 1300 V 20 w(searc)n(h)p ! 527 1300 V 21 w(p)r(os)h Ff(\()p Fo(const)14 b(char)h(*string,)f(int)h ! (direction,)f(int)283 1355 y(pos)p Ff(\))195 1409 y Fp(Searc)o(h)j(for) ! g Fj(string)k Fp(in)d(the)f(history)g(list,)h(starting)e(at)h ! Fj(p)q(os)p Fp(,)g(an)g(absolute)h(index)g(in)o(to)f(the)h(list.)195 ! 1464 y(If)g Fj(direction)i Fp(is)e(negativ)o(e,)h(the)f(searc)o(h)g ! (pro)q(ceeds)g(bac)o(kw)o(ard)g(from)f Fj(p)q(os)p Fp(,)h(otherwise)h ! (forw)o(ard.)195 1519 y(Returns)j(the)g(absolute)g(index)h(of)f(the)g ! (history)g(elemen)o(t)h(where)f Fj(string)k Fp(w)o(as)21 ! b(found,)j(or)d(-1)195 1574 y(otherwise.)75 1684 y Fi(2.3.6)30 ! b(Managing)20 b(the)g(History)h(File)137 1780 y Fp(The)16 ! b(History)g(library)h(can)e(read)h(the)g(history)g(from)f(and)h(write)g ! (it)g(to)f(a)h(\014le.)22 b(This)17 b(section)f(do)q(cu-)75 ! 1835 y(men)o(ts)f(the)g(functions)h(for)f(managing)g(a)g(history)g ! (\014le.)1762 1949 y(F)l(unction)-1861 b Fh(int)20 b ! Fg(read)p 286 1949 V 20 w(history)i Ff(\()p Fo(const)15 ! b(char)f(*filename)p Ff(\))195 2003 y Fp(Add)h(the)g(con)o(ten)o(ts)f ! (of)h Fj(\014lename)j Fp(to)c(the)h(history)g(list,)g(a)g(line)h(at)f ! (a)f(time.)20 b(If)15 b Fj(\014lename)k Fp(is)c Fo(NULL)p ! Fp(,)195 2058 y(then)h(read)f(from)f(`)p Fo(~/.history)p ! Fp('.)k(Returns)d(0)f(if)i(successful,)g(or)f Fo(errno)f ! Fp(if)i(not.)1762 2172 y(F)l(unction)-1861 b Fh(int)20 ! b Fg(read)p 286 2172 V 20 w(history)p 481 2172 V 20 w(range)i ! Ff(\()p Fo(const)14 b(char)h(*filename,)f(int)h(from,)f(int)h(to)p ! Ff(\))195 2227 y Fp(Read)f(a)f(range)h(of)f(lines)j(from)d ! Fj(\014lename)p Fp(,)i(adding)g(them)f(to)f(the)h(history)g(list.)20 ! b(Start)13 b(reading)i(at)195 2282 y(line)g Fj(from)d ! Fp(and)h(end)h(at)f Fj(to)p Fp(.)18 b(If)c Fj(from)e ! Fp(is)i(zero,)f(start)f(at)g(the)h(b)q(eginning.)22 b(If)13 ! b Fj(to)i Fp(is)e(less)h(than)f Fj(from)p Fp(,)195 2337 ! y(then)i(read)g(un)o(til)i(the)e(end)g(of)g(the)g(\014le.)21 ! b(If)15 b Fj(\014lename)k Fp(is)d Fo(NULL)p Fp(,)e(then)h(read)g(from)f ! (`)p Fo(~/.history)p Fp('.)195 2392 y(Returns)h(0)g(if)g(successful,)h ! (or)f Fo(errno)g Fp(if)g(not.)1762 2506 y(F)l(unction)-1861 ! b Fh(int)20 b Fg(write)p 304 2506 V 22 w(history)i Ff(\()p ! Fo(const)15 b(char)f(*filename)p Ff(\))195 2560 y Fp(W)l(rite)k(the)f ! (curren)o(t)g(history)h(to)f Fj(\014lename)p Fp(,)h(o)o(v)o(erwriting)f ! Fj(\014lename)k Fp(if)d(necessary)l(.)27 b(If)18 b Fj(\014lename)195 ! 2615 y Fp(is)f Fo(NULL)p Fp(,)e(then)h(write)h(the)f(history)g(list)h ! (to)e(`)p Fo(~/.history)p Fp('.)21 b(Returns)16 b(0)f(on)h(success,)h ! (or)f Fo(errno)195 2670 y Fp(on)f(a)g(read)g(or)g(write)g(error.)p ! eop %%Page: 9 11 ! 9 10 bop 75 -58 a Fp(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (History)889 b(9)1762 149 y(F)l(unction)-1861 b Fh(int)20 ! b Fg(app)r(end)p 360 149 18 3 v 19 w(history)j Ff(\()p ! Fo(int)14 b(nelements,)g(const)h(char)f(*filename)p Ff(\))195 ! 204 y Fp(App)q(end)19 b(the)e(last)g Fj(nelemen)o(ts)k ! Fp(of)16 b(the)i(history)f(list)h(to)f Fj(\014lename)p ! Fp(.)27 b(If)18 b Fj(\014lename)j Fp(is)d Fo(NULL)p Fp(,)f(then)195 ! 259 y(app)q(end)f(to)f(`)p Fo(~/.history)p Fp('.)j(Returns)c(0)h(on)g ! (success,)h(or)e Fo(errno)h Fp(on)g(a)g(read)g(or)g(write)g(error.)1762 ! 404 y(F)l(unction)-1861 b Fh(int)20 b Fg(history)p 351 ! 404 V 20 w(truncate)p 582 404 V 21 w(\014le)k Ff(\()p ! Fo(const)14 b(char)h(*filename,)e(int)i(nlines)p Ff(\))195 ! 459 y Fp(T)l(runcate)k(the)h(history)f(\014le)h Fj(\014lename)p ! Fp(,)h(lea)o(ving)f(only)g(the)f(last)g Fj(nlines)k Fp(lines.)34 ! b(If)20 b Fj(\014lename)i Fp(is)195 513 y Fo(NULL)p Fp(,)14 ! b(then)i(`)p Fo(~/.history)p Fp(')d(is)j(truncated.)j(Returns)c(0)g(on) ! g(success,)h(or)e Fo(errno)h Fp(on)g(failure.)75 644 ! y Fi(2.3.7)30 b(History)20 b(Expansion)137 750 y Fp(These)c(functions)g ! (implemen)o(t)g(history)f(expansion.)1762 895 y(F)l(unction)-1861 ! b Fh(int)20 b Fg(history)p 351 895 V 20 w(expand)j Ff(\()p ! Fo(char)14 b(*string,)g(char)h(**output)p Ff(\))195 949 ! y Fp(Expand)j Fj(string)p Fp(,)f(placing)h(the)g(result)f(in)o(to)g ! Fj(output)p Fp(,)h(a)e(p)q(oin)o(ter)i(to)f(a)g(string)g(\(see)g ! (Section)h(1.1)195 1004 y([History)d(In)o(teraction],)f(page)h(1\).)20 ! b(Returns:)195 1098 y Fo(0)216 b Fp(If)19 b(no)g(expansions)g(to)q(ok)f ! (place)i(\(or,)e(if)i(the)e(only)i(c)o(hange)e(in)i(the)f(text)f(w)o ! (as)g(the)435 1152 y(remo)o(v)m(al)d(of)g(escap)q(e)h(c)o(haracters)e ! (preceding)i(the)f(history)g(expansion)h(c)o(haracter\);)195 ! 1241 y Fo(1)216 b Fp(if)16 b(expansions)g(did)g(tak)o(e)e(place;)195 ! 1330 y Fo(-1)192 b Fp(if)16 b(there)f(w)o(as)f(an)h(error)g(in)h ! (expansion;)195 1419 y Fo(2)216 b Fp(if)14 b(the)g(returned)g(line)i ! (should)f(b)q(e)f(displa)o(y)o(ed,)h(but)f(not)f(executed,)i(as)e(with) ! h(the)g Fo(:p)435 1474 y Fp(mo)q(di\014er)i(\(see)f(Section)h(1.1.3)e ! ([Mo)q(di\014ers],)h(page)g(2\).)195 1568 y(If)g(an)h(error)e(o)q ! (curred)i(in)g(expansion,)f(then)h Fj(output)g Fp(con)o(tains)f(a)g ! (descriptiv)o(e)i(error)d(message.)1762 1713 y(F)l(unction)-1861 ! b Fh(char)20 b(*)f Fg(get)p 324 1713 V 21 w(history)p ! 520 1713 V 20 w(ev)n(en)n(t)25 b Ff(\()p Fo(const)14 ! b(char)h(*string,)f(int)g(*cindex,)g(int)283 1767 y(qchar)p ! Ff(\))195 1822 y Fp(Returns)22 b(the)h(text)f(of)h(the)f(history)h(ev)o ! (en)o(t)g(b)q(eginning)h(at)f Fj(string)j Fo(+)d Fj(*cindex)p ! Fp(.)43 b Fj(*cindex)27 b Fp(is)195 1877 y(mo)q(di\014ed)16 ! b(to)e(p)q(oin)o(t)h(to)f(after)g(the)h(ev)o(en)o(t)f(sp)q(eci\014er.) ! 22 b(A)o(t)14 b(function)h(en)o(try)l(,)g Fj(cindex)k ! Fp(p)q(oin)o(ts)c(to)f(the)195 1932 y(index)19 b(in)o(to)f ! Fj(string)k Fp(where)c(the)g(history)g(ev)o(en)o(t)g(sp)q ! (eci\014cation)h(b)q(egins.)30 b Fj(qc)o(har)21 b Fp(is)d(a)g(c)o ! (haracter)195 1987 y(that)13 b(is)h(allo)o(w)o(ed)g(to)e(end)i(the)g ! (ev)o(en)o(t)f(sp)q(eci\014cation)j(in)e(addition)g(to)f(the)h ! (\\normal")f(terminating)195 2041 y(c)o(haracters.)1762 ! 2186 y(F)l(unction)-1861 b Fh(char)20 b(**)f Fg(history)p ! 448 2186 V 21 w(tok)n(enize)25 b Ff(\()p Fo(const)14 ! b(char)h(*string)p Ff(\))195 2241 y Fp(Return)g(an)g(arra)o(y)g(of)g ! (tok)o(ens)g(parsed)g(out)g(of)g Fj(string)p Fp(,)g(m)o(uc)o(h)h(as)f ! (the)g(shell)i(migh)o(t.)k(The)15 b(tok)o(ens)195 2296 ! y(are)h(split)h(on)e(the)h(c)o(haracters)g(in)g(the)g ! Fj(history)p 1007 2296 14 2 v 17 w(w)o(ord)p 1122 2296 ! V 15 w(delimiters)k Fp(v)m(ariable,)d(and)f(shell)i(quoting)195 ! 2351 y(con)o(v)o(en)o(tions)d(are)g(ob)q(ey)o(ed.)1762 ! 2496 y(F)l(unction)-1861 b Fh(char)20 b(*)f Fg(history)p ! 422 2496 18 3 v 21 w(arg)p 524 2496 V 19 w(extract)24 ! b Ff(\()p Fo(int)14 b(first,)h(int)g(last,)f(const)g(char)283 ! 2550 y(*string)p Ff(\))195 2605 y Fp(Extract)19 b(a)h(string)g(segmen)o ! (t)g(consisting)h(of)f(the)g Fj(\014rst)h Fp(through)f ! Fj(last)h Fp(argumen)o(ts)e(presen)o(t)h(in)195 2660 ! y Fj(string)p Fp(.)g(Argumen)o(ts)15 b(are)f(split)j(using)f ! Fo(history_tokenize)p Fp(.)p eop ! %%Page: 10 12 ! 10 11 bop 75 -58 a Fp(10)1324 b(GNU)15 b(History)g(Library)75 ! 149 y Fn(2.4)33 b(History)22 b(V)-6 b(ariables)137 251 ! y Fp(This)18 b(section)f(describ)q(es)i(the)e(externally-visible)k(v)m ! (ariables)d(exp)q(orted)f(b)o(y)g(the)g Fk(gnu)g Fp(History)g(Li-)75 ! 306 y(brary)l(.)1773 438 y(V)l(ariable)-1861 b Fh(int)20 ! b Fg(history)p 351 438 18 3 v 20 w(base)195 493 y Fp(The)15 b(logical)i(o\013set)d(of)h(the)g(\014rst)g(en)o(try)g(in)h(the)f ! (history)g(list.)1773 625 y(V)l(ariable)-1861 b Fh(int)20 ! b Fg(history)p 351 625 V 20 w(length)195 680 y Fp(The)15 b(n)o(um)o(b)q(er)h(of)f(en)o(tries)g(curren)o(tly)h(stored)f(in)h(the) ! f(history)g(list.)1773 812 y(V)l(ariable)-1861 b Fh(int)20 ! b Fg(history)p 351 812 V 20 w(max)p 478 812 V 20 w(en)n(tries)195 ! 867 y Fp(The)j(maxim)o(um)g(n)o(um)o(b)q(er)g(of)g(history)g(en)o ! (tries.)43 b(This)24 b(m)o(ust)e(b)q(e)i(c)o(hanged)f(using)h ! Fo(stifle_)195 922 y(history\(\))p Fp(.)1773 1054 y(V)l(ariable)-1861 ! b Fh(char)20 b Fg(history)p 377 1054 V 20 w(expansion)p ! 644 1054 V 21 w(c)n(har)195 1109 y Fp(The)e(c)o(haracter)f(that)g(in)o ! (tro)q(duces)h(a)f(history)h(ev)o(en)o(t.)27 b(The)18 ! b(default)g(is)g(`)p Fo(!)p Fp('.)26 b(Setting)18 b(this)g(to)f(0)195 ! 1164 y(inhibits)g(history)f(expansion.)1773 1296 y(V)l(ariable)-1861 ! b Fh(char)20 b Fg(history)p 377 1296 V 20 w(subst)p 529 ! 1296 V 20 w(c)n(har)195 1351 y Fp(The)h(c)o(haracter)e(that)h(in)o(v)o ! (ok)o(es)g(w)o(ord)g(substitution)h(if)g(found)f(at)g(the)h(start)e(of) ! h(a)g(line.)37 b(The)195 1406 y(default)16 b(is)f(`)p ! Fo(^)p Fp('.)1773 1538 y(V)l(ariable)-1861 b Fh(char)20 ! b Fg(history)p 377 1538 V 20 w(commen)n(t)p 627 1538 ! V 19 w(c)n(har)195 1593 y Fp(During)f(tok)o(enization,)h(if)f(this)h(c) ! o(haracter)e(is)h(seen)h(as)e(the)h(\014rst)g(c)o(haracter)f(of)g(a)h ! (w)o(ord,)g(then)195 1648 y(it)j(and)g(all)g(subsequen)o(t)h(c)o ! (haracters)d(up)j(to)e(a)g(newline)i(are)f(ignored,)h(suppressing)g ! (history)195 1702 y(expansion)16 b(for)f(the)g(remainder)h(of)f(the)g ! (line.)21 b(This)16 b(is)g(disabled)h(b)o(y)e(default.)1773 ! 1835 y(V)l(ariable)-1861 b Fh(char)20 b(*)f Fg(history)p ! 422 1835 V 21 w(w)n(ord)p 567 1835 V 20 w(delimiters)195 ! 1889 y Fp(The)e(c)o(haracters)g(that)f(separate)h(tok)o(ens)g(for)f ! Fo(\\)p Fp(fBhistory)p 1217 1889 14 2 v 17 w(tok)o(enize\(\))p ! Fo(\\)p Fp(fP)l(.)g(The)i(default)g(v)m(alue)195 1944 ! y(is)e Fo(")f(\\t\\n\(\)<>;&|")p Fp(.)1773 2077 y(V)l(ariable)-1861 ! b Fh(char)20 b(*)f Fg(history)p 422 2077 18 3 v 21 w(no)p ! 504 2077 V 20 w(expand)p 704 2077 V 20 w(c)n(hars)195 ! 2131 y Fp(The)c(list)h(of)e(c)o(haracters)g(whic)o(h)i(inhibit)h ! (history)e(expansion)h(if)f(found)h(immediately)g(follo)o(wing)195 ! 2186 y Fj(history)p 336 2186 14 2 v 16 w(expansion)p ! 547 2186 V 18 w(c)o(har)p Fp(.)j(The)d(default)f(is)h(space,)f(tab,)g ! (newline,)h(carriage)f(return,)g(and)h(`)p Fo(=)p Fp('.)1773 ! 2318 y(V)l(ariable)-1861 b Fh(char)20 b(*)f Fg(history)p ! 422 2318 18 3 v 21 w(searc)n(h)p 599 2318 V 20 w(delimiter)p ! 843 2318 V 23 w(c)n(hars)195 2373 y Fp(The)13 b(list)h(of)f(additional) ! h(c)o(haracters)e(whic)o(h)i(can)g(delimit)g(a)f(history)g(searc)o(h)g ! (string,)g(in)h(addition)195 2428 y(to)h(space,)g(T)l(AB,)g(`)p ! Fo(:)p Fp(')f(and)h(`)p Fo(?)p Fp(')g(in)h(the)f(case)g(of)g(a)g ! (substring)g(searc)o(h.)20 b(The)c(default)f(is)h(empt)o(y)l(.)1773 ! 2560 y(V)l(ariable)-1861 b Fh(int)20 b Fg(history)p 351 ! 2560 V 20 w(quotes)p 533 2560 V 21 w(inhibit)p 717 2560 ! V 23 w(expansion)195 2615 y Fp(If)15 b(non-zero,)f(single-quoted)j(w)o ! (ords)c(are)i(not)f(scanned)h(for)f(the)h(history)g(expansion)g(c)o ! (haracter.)195 2670 y(The)g(default)h(v)m(alue)h(is)e(0.)p ! eop %%Page: 11 13 ! 11 12 bop 75 -58 a Fp(Chapter)15 b(2:)k(Programming)c(with)g(GNU)g ! (History)867 b(11)1773 149 y(V)l(ariable)-1861 b Fh(rl_linebuf_func_t) ! 22 b(*)d Fg(history)p 762 149 18 3 v 21 w(inhibit)p 946 ! 149 V 23 w(expansion)p 1216 149 V 20 w(function)195 204 ! y Fp(This)e(should)h(b)q(e)f(set)g(to)f(the)g(address)h(of)f(a)h ! (function)g(that)f(tak)o(es)g(t)o(w)o(o)f(argumen)o(ts:)22 ! b(a)17 b Fo(char)d(*)195 259 y Fp(\()p Fj(string)t Fp(\))e(and)i(an)f ! Fo(int)g Fp(index)i(in)o(to)e(that)f(string)i(\()p Fj(i)r ! Fp(\).)19 b(It)14 b(should)g(return)f(a)g(non-zero)h(v)m(alue)g(if)g ! (the)195 314 y(history)h(expansion)g(starting)f(at)g ! Fj(string[i])i Fp(should)g(not)e(b)q(e)h(p)q(erformed;)g(zero)f(if)h ! (the)g(expansion)195 369 y(should)i(b)q(e)g(done.)22 ! b(It)16 b(is)h(in)o(tended)g(for)e(use)i(b)o(y)f(applications)h(lik)o ! (e)g(Bash)f(that)g(use)g(the)g(history)195 423 y(expansion)g(c)o ! (haracter)f(for)f(additional)j(purp)q(oses.)j(By)c(default,)f(this)h(v) ! m(ariable)g(is)g(set)f(to)f Fo(NULL)p Fp(.)75 543 y Fn(2.5)33 ! b(History)22 b(Programming)h(Example)137 637 y Fp(The)16 ! b(follo)o(wing)g(program)e(demonstrates)g(simple)j(use)e(of)g(the)g ! Fk(gnu)g Fp(History)g(Library)l(.)195 698 y Fo(#include)23 ! b()195 750 y(#include)g()195 ! 854 y(main)g(\(argc,)g(argv\))314 906 y(int)h(argc;)314 ! 958 y(char)g(**argv;)195 1010 y({)243 1061 y(char)f(line[1024],)f(*t;) ! 243 1113 y(int)h(len,)g(done)h(=)g(0;)243 1217 y(line[0])f(=)g(0;)243 ! 1321 y(using_history)f(\(\);)243 1373 y(while)h(\(!done\))290 ! 1425 y({)338 1477 y(printf)g(\("history$)g("\);)338 1528 ! y(fflush)g(\(stdout\);)338 1580 y(t)h(=)g(fgets)f(\(line,)g(sizeof)g ! (\(line\))g(-)h(1,)f(stdin\);)338 1632 y(if)h(\(t)f(&&)h(*t\))386 ! 1684 y({)434 1736 y(len)f(=)h(strlen)f(\(t\);)434 1788 ! y(if)g(\(t[len)g(-)h(1])g(==)f('\\n'\))481 1840 y(t[len)h(-)f(1])h(=)g ! ('\\0';)386 1892 y(})338 1995 y(if)g(\(!t\))386 2047 ! y(strcpy)f(\(line,)g("quit"\);)338 2151 y(if)h(\(line[0]\))386 ! 2203 y({)434 2255 y(char)f(*expansion;)434 2307 y(int)g(result;)434 ! 2411 y(result)g(=)g(history_expand)f(\(line,)h(&expansion\);)434 ! 2462 y(if)g(\(result\))481 2514 y(fprintf)g(\(stderr,)g("\045s\\n",)g ! (expansion\);)434 2618 y(if)g(\(result)g(<)h(0)g(||)f(result)g(==)h ! (2\))481 2670 y({)p eop %%Page: 12 14 ! 12 13 bop 75 -58 a Fp(12)1324 b(GNU)15 b(History)g(Library)529 ! 149 y Fo(free)23 b(\(expansion\);)529 201 y(continue;)481 ! 253 y(})434 357 y(add_history)f(\(expansion\);)434 409 ! y(strncpy)h(\(line,)g(expansion,)f(sizeof)h(\(line\))g(-)h(1\);)434 ! 461 y(free)f(\(expansion\);)386 513 y(})338 616 y(if)h(\(strcmp)f ! (\(line,)g("quit"\))g(==)g(0\))386 668 y(done)g(=)h(1;)338 ! 720 y(else)f(if)h(\(strcmp)f(\(line,)g("save"\))g(==)h(0\))386 ! 772 y(write_history)e(\("history_file"\);)338 824 y(else)h(if)h ! (\(strcmp)f(\(line,)g("read"\))g(==)h(0\))386 876 y(read_history)e ! (\("history_file"\);)338 928 y(else)h(if)h(\(strcmp)f(\(line,)g ! ("list"\))g(==)h(0\))386 980 y({)434 1032 y(register)e(HIST_ENTRY)h ! (**the_list;)434 1083 y(register)f(int)i(i;)434 1187 ! y(the_list)e(=)i(history_list)e(\(\);)434 1239 y(if)h(\(the_list\))481 ! 1291 y(for)h(\(i)f(=)h(0;)g(the_list[i];)e(i++\))529 ! 1343 y(printf)h(\("\045d:)g(\045s\\n",)g(i)h(+)g(history_base,)e ! (the_list[i]->line\);)386 1395 y(})338 1447 y(else)h(if)h(\(strncmp)f ! (\(line,)g("delete",)g(6\))g(==)h(0\))386 1499 y({)434 ! 1550 y(int)f(which;)434 1602 y(if)g(\(\(sscanf)g(\(line)g(+)h(6,)f ! ("\045d",)h(&which\)\))e(==)i(1\))481 1654 y({)529 1706 ! y(HIST_ENTRY)f(*entry)g(=)g(remove_history)f(\(which\);)529 ! 1758 y(if)i(\(!entry\))577 1810 y(fprintf)f(\(stderr,)f("No)i(such)f ! (entry)g(\045d\\n",)g(which\);)529 1862 y(else)577 1914 ! y({)625 1966 y(free)g(\(entry->line\);)625 2017 y(free)g(\(entry\);)577 ! 2069 y(})481 2121 y(})434 2173 y(else)481 2225 y({)529 ! 2277 y(fprintf)g(\(stderr,)g("non-numeric)f(arg)h(given)h(to)f ! (`delete'\\n"\);)481 2329 y(})386 2381 y(})290 2433 y(})195 ! 2484 y(})p eop %%Page: 13 15 ! 13 14 bop 75 -58 a Fp(App)q(endix)17 b(A:)e(Concept)g(Index)1196 ! b(13)75 149 y Fl(App)r(endix)25 b(A)41 b(Concept)27 b(Index)75 ! 321 y Fn(A)75 383 y Fe(anc)o(hored)14 b(searc)o(h)s Fd(.)8 ! b(.)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(.)16 ! b Fe(8)75 507 y Fn(E)75 568 y Fe(ev)o(en)o(t)d(designators)g ! Fd(.)6 b(.)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(.)23 b ! Fe(1)1012 321 y Fn(H)1012 431 y Fe(history)15 b(ev)o(en)o(ts)d ! Fd(.)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(.)g(.)g(.)h(.)24 ! b Fe(1)1012 500 y(history)15 b(expansion)8 b Fd(.)g(.)e(.)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(.)21 b Fe(1)1012 568 y(History)14 b(Searc)o(hing)6 ! b Fd(.)j(.)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(.)19 b ! Fe(8)p eop %%Page: 14 16 ! 14 15 bop 75 -58 a Fp(14)1324 b(GNU)15 b(History)g(Library)p eop %%Page: 15 17 ! 15 16 bop 75 -58 a Fp(App)q(endix)17 b(B:)e(F)l(unction)h(and)g(V)l ! (ariable)g(Index)919 b(15)75 149 y Fl(App)r(endix)25 b(B)41 b(F)-7 b(unction)26 b(and)h(V)-7 b(ariable)26 ! b(Index)75 321 y Fn(A)75 382 y Fc(add_histor)o(y)8 b ! Fd(.)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(.)h(.)f(.)23 ! b Fe(6)75 428 y Fc(append_his)o(to)o(ry)8 b Fd(.)s(.)f(.)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(.)21 b Fe(9)75 557 y Fn(C)75 618 ! y Fc(clear_hist)o(or)o(y)6 b Fd(.)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 Fe(6)75 664 y Fc(current_hi)o(st)o(ory)7 ! b Fd(.)s(.)f(.)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(.)20 b ! Fe(7)75 793 y Fn(G)75 854 y Fc(get_histor)o(y_)o(eve)o(nt)5 ! b Fd(.)t(.)h(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)19 b Fe(9)75 ! 984 y Fn(H)75 1044 y Fc(history_ar)o(g_)o(ext)o(ra)o(ct)5 ! b Fd(.)s(.)h(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)18 b Fe(9)75 1090 y Fc(history_ba)o(se) ! 6 b Fd(.)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 Fe(10)75 1136 y Fc(history_co)o(mm)o(ent)o(_c)o(har)s ! Fd(.)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 Fe(10)75 1182 y Fc(history_ex)o(pa)o(nd)8 ! b Fd(.)s(.)f(.)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(.)21 ! b Fe(9)75 1227 y Fc(history_ex)o(pa)o(nsi)o(on)o(_ch)o(ar)8 ! b Fd(.)e(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)24 b Fe(10)75 1273 y Fc(history_ge)o(t)8 ! b Fd(.)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(.)h(.)f(.)23 ! b Fe(7)75 1319 y Fc(history_ge)o(t_)o(his)o(to)o(ry_)o(sta)o(te)6 ! b Fd(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.) ! f(.)22 b Fe(6)75 1364 y Fc(history_in)o(hi)o(bit)o(_e)o(xpa)o(nsi)o(on) ! o(_fu)o(nc)o(tio)o(n)9 b Fd(.)d(.)g(.)g(.)g(.)g(.)h(.)24 ! b Fe(11)75 1410 y Fc(history_is)o(_s)o(tif)o(le)o(d)6 ! b Fd(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(7)75 1456 ! y Fc(history_le)o(ng)o(th)8 b Fd(.)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 Fe(10)75 1501 y Fc(history_li)o(st)6 b Fd(.)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(.)23 b Fe(7)75 ! 1547 y Fc(history_ma)o(x_)o(ent)o(ri)o(es)t Fd(.)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 Fe(10)75 1593 y Fc(history_no)o(_e)o(xpa)o(nd)o ! (_ch)o(ars)7 b Fd(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)g(.)h(.)23 b Fe(10)75 1638 y Fc(history_qu)o(ot)o(es_)o ! (in)o(hib)o(it_)o(ex)o(pan)o(si)o(on)t Fd(.)s(.)6 b(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)17 b Fe(10)75 1684 y Fc(history_se)o(ar)o(ch)8 ! b Fd(.)s(.)f(.)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(.)21 ! b Fe(8)75 1730 y Fc(history_se)o(ar)o(ch_)o(de)o(lim)o(ite)o(r_)o(cha)o ! (rs)5 b Fd(.)s(.)h(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 ! b Fe(10)75 1776 y Fc(history_se)o(ar)o(ch_)o(po)o(s)6 ! b Fd(.)s(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)18 b Fe(8)75 1821 ! y Fc(history_se)o(ar)o(ch_)o(pr)o(efi)o(x)s Fd(.)t(.)6 ! b(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g ! (.)h(.)f(.)g(.)16 b Fe(8)75 1867 y Fc(history_se)o(t_)o(his)o(to)o(ry_) ! o(sta)o(te)6 b Fd(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)22 b Fe(6)75 1913 y Fc(history_se)o(t_)o(pos)7 ! b Fd(.)s(.)f(.)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(.)20 b ! Fe(7)1012 321 y Fc(history_sub)o(st)o(_ch)o(ar)t Fd(.)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 Fe(10)1012 368 y Fc(history_tok)o(en)o(ize) ! 6 b Fd(.)t(.)g(.)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(.)20 b Fe(9)1012 ! 414 y Fc(history_tot)o(al)o(_by)o(te)o(s)5 b Fd(.)s(.)h(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.) ! g(.)18 b Fe(7)1012 460 y Fc(history_tru)o(nc)o(ate)o(_f)o(ile)s ! Fd(.)s(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)17 b Fe(9)1012 507 y Fc(history_wor)o(d_)o(del) ! o(im)o(ite)o(rs)7 b Fd(.)f(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)g(.)g(.)h(.)f(.)g(.)g(.)24 b Fe(10)1012 640 y Fn(N)1012 ! 702 y Fc(next_histor)o(y)7 b Fd(.)f(.)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(.)23 b Fe(7)1012 836 y Fn(P)1012 898 y ! Fc(previous_hi)o(st)o(ory)6 b Fd(.)t(.)g(.)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 ! (.)20 b Fe(7)1012 1031 y Fn(R)1012 1094 y Fc(read_histor)o(y)7 ! b Fd(.)f(.)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(.)23 ! b Fe(8)1012 1140 y Fc(read_histor)o(y_)o(ran)o(ge)5 b ! Fd(.)s(.)h(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g ! (.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)19 b Fe(8)1012 1186 ! y Fc(remove_hist)o(or)o(y)9 b Fd(.)s(.)d(.)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(.)22 b Fe(6)1012 1233 y Fc(replace_his)o(to)o(ry_)o(en)o(try)s ! Fd(.)s(.)6 b(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)g(.) ! h(.)f(.)g(.)g(.)g(.)g(.)17 b Fe(6)1012 1366 y Fn(S)1012 ! 1429 y Fc(stifle_hist)o(or)o(y)9 b Fd(.)s(.)d(.)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(.)22 b Fe(7)1012 1562 y Fn(U)1012 1624 ! y Fc(unstifle_hi)o(st)o(ory)6 b Fd(.)t(.)g(.)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(.)20 b Fe(7)1012 1671 y Fc(using_histo)o(ry)6 b Fd(.)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(.)22 b Fe(6)1012 1804 ! y Fn(W)1012 1866 y Fc(where_histo)o(ry)6 b Fd(.)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(.)22 b Fe(7)1012 1913 y Fc(write_histo)o(ry)6 ! b Fd(.)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(.)22 b Fe(8)p eop %%Page: 16 18 ! 16 17 bop 75 -58 a Fp(16)1324 b(GNU)15 b(History)g(Library)p eop %%Page: -1 19 ! -1 18 bop 1862 -58 a Fp(i)75 149 y Fl(T)-7 b(able)27 ! b(of)f(Con)n(ten)n(ts)75 320 y Fn(1)67 b(Using)22 b(History)h(In)n (teractiv)n(ely)9 b Fb(.)k(.)d(.)h(.)f(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h ! (.)f(.)g(.)g(.)h(.)31 b Fn(1)224 389 y Fp(1.1)45 b(History)15 b(Expansion)5 b Fa(.)j(.)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(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)19 b Fp(1)374 444 y(1.1.1)44 b(Ev)o(en)o(t)14 b(Designators)e Fa(.)7 b(.)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(.)26 b Fp(1)374 499 y(1.1.2)44 b(W)l(ord)15 b(Designators)5 b Fa(.)h(.)i(.)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 ! (.)19 b Fp(2)374 553 y(1.1.3)44 b(Mo)q(di\014ers)t Fa(.)8 b(.)g(.)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(.)h(.) ! f(.)h(.)f(.)19 b Fp(2)75 675 y Fn(2)67 b(Programming)23 b(with)g(GNU)f(History)16 b Fb(.)10 b(.)g(.)g(.)h(.)f(.)g(.)g(.)h(.)f ! (.)g(.)38 b Fn(5)224 743 y Fp(2.1)45 b(In)o(tro)q(duction)16 b(to)f(History)10 b Fa(.)d(.)g(.)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(.)24 b Fp(5)224 798 y(2.2)45 b(History)15 b(Storage)c Fa(.)d(.)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(.)f(.)h(.)f(.)h(.)26 b Fp(5)224 853 y(2.3)45 b(History)15 b(F)l(unctions)d Fa(.)c(.)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(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)26 ! b Fp(6)374 907 y(2.3.1)44 b(Initializing)18 b(History)d(and)h(State)e (Managemen)o(t)g Fa(.)7 b(.)h(.)g(.)f(.)h(.)f(.)29 b ! Fp(6)374 962 y(2.3.2)44 b(History)15 b(List)h(Managemen)o(t)d Fa(.)7 b(.)h(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.) ! h(.)f(.)h(.)f(.)h(.)f(.)29 b Fp(6)374 1017 y(2.3.3)44 b(Information)15 b(Ab)q(out)g(the)h(History)f(List)c Fa(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)26 ! b Fp(7)374 1072 y(2.3.4)44 b(Mo)o(ving)15 b(Around)g(the)g(History)g (List)c Fa(.)d(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f ! (.)h(.)25 b Fp(7)374 1127 y(2.3.5)44 b(Searc)o(hing)16 b(the)f(History)g(List)7 b Fa(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)f(.)h(.)f (.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)22 ! b Fp(8)374 1181 y(2.3.6)44 b(Managing)15 b(the)g(History)g(File)6 b Fa(.)i(.)g(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.)f(.)h(.) ! f(.)h(.)f(.)h(.)f(.)h(.)20 b Fp(8)374 1236 y(2.3.7)44 b(History)15 b(Expansion)9 b Fa(.)f(.)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(.)24 b Fp(9)224 1291 y(2.4)45 b(History)15 b(V)l(ariables)6 ! b Fa(.)i(.)g(.)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(.)h(.)f(.)21 b Fp(10)224 1346 y(2.5)45 b(History)15 b(Programming)f(Example)7 b Fa(.)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(.)22 ! b Fp(11)75 1467 y Fn(App)r(endix)i(A)67 b(Concept)22 b(Index)17 b Fb(.)10 b(.)g(.)g(.)g(.)h(.)f(.)g(.)g(.)g(.)h(.)f(.)g(.)g ! (.)h(.)f(.)g(.)38 b Fn(13)75 1602 y(App)r(endix)24 b(B)67 b(F)-6 b(unction)25 b(and)e(V)-6 b(ariable)24 b(Index)16 ! b Fb(.)10 b(.)g(.)g(.)38 b Fn(15)p eop %%Page: -2 20 ! -2 19 bop 75 -58 a Fp(ii)1346 b(GNU)15 b(History)g(Library)p eop %%Trailer diff -Nrc2 readline-4.1/doc/history_3.ps readline-4.2/doc/history_3.ps *** readline-4.1/doc/history_3.ps Wed Dec 31 19:00:00 1969 --- readline-4.2/doc/history_3.ps Mon Apr 16 10:53:07 2001 *************** *** 0 **** --- 1,798 ---- + %!PS-Adobe-3.0 + %%Creator: groff version 1.16.1 + %%CreationDate: Mon Apr 16 10:53:07 2001 + %%DocumentNeededResources: font Times-Roman + %%+ font Times-Bold + %%+ font Times-Italic + %%DocumentSuppliedResources: procset grops 1.16 1 + %%Pages: 7 + %%PageOrder: Ascend + %%Orientation: Portrait + %%EndComments + %%BeginProlog + %%BeginResource: procset grops 1.16 1 + /setpacking where{ + pop + currentpacking + true setpacking + }if + /grops 120 dict dup begin + /SC 32 def + /A/show load def + /B{0 SC 3 -1 roll widthshow}bind def + /C{0 exch ashow}bind def + /D{0 exch 0 SC 5 2 roll awidthshow}bind def + /E{0 rmoveto show}bind def + /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def + /G{0 rmoveto 0 exch ashow}bind def + /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def + /I{0 exch rmoveto show}bind def + /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def + /K{0 exch rmoveto 0 exch ashow}bind def + /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def + /M{rmoveto show}bind def + /N{rmoveto 0 SC 3 -1 roll widthshow}bind def + /O{rmoveto 0 exch ashow}bind def + /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def + /Q{moveto show}bind def + /R{moveto 0 SC 3 -1 roll widthshow}bind def + /S{moveto 0 exch ashow}bind def + /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def + /SF{ + findfont exch + [exch dup 0 exch 0 exch neg 0 0]makefont + dup setfont + [exch/setfont cvx]cvx bind def + }bind def + /MF{ + findfont + [5 2 roll + 0 3 1 roll + neg 0 0]makefont + dup setfont + [exch/setfont cvx]cvx bind def + }bind def + /level0 0 def + /RES 0 def + /PL 0 def + /LS 0 def + /MANUAL{ + statusdict begin/manualfeed true store end + }bind def + /PLG{ + gsave newpath clippath pathbbox grestore + exch pop add exch pop + }bind def + /BP{ + /level0 save def + 1 setlinecap + 1 setlinejoin + 72 RES div dup scale + LS{ + 90 rotate + }{ + 0 PL translate + }ifelse + 1 -1 scale + }bind def + /EP{ + level0 restore + showpage + }bind def + /DA{ + newpath arcn stroke + }bind def + /SN{ + transform + .25 sub exch .25 sub exch + round .25 add exch round .25 add exch + itransform + }bind def + /DL{ + SN + moveto + SN + lineto stroke + }bind def + /DC{ + newpath 0 360 arc closepath + }bind def + /TM matrix def + /DE{ + TM currentmatrix pop + translate scale newpath 0 0 .5 0 360 arc closepath + TM setmatrix + }bind def + /RC/rcurveto load def + /RL/rlineto load def + /ST/stroke load def + /MT/moveto load def + /CL/closepath load def + /FL{ + currentgray exch setgray fill setgray + }bind def + /BL/fill load def + /LW/setlinewidth load def + /RE{ + findfont + dup maxlength 1 index/FontName known not{1 add}if dict begin + { + 1 index/FID ne{def}{pop pop}ifelse + }forall + /Encoding exch def + dup/FontName exch def + currentdict end definefont pop + }bind def + /DEFS 0 def + /EBEGIN{ + moveto + DEFS begin + }bind def + /EEND/end load def + /CNT 0 def + /level1 0 def + /PBEGIN{ + /level1 save def + translate + div 3 1 roll div exch scale + neg exch neg exch translate + 0 setgray + 0 setlinecap + 1 setlinewidth + 0 setlinejoin + 10 setmiterlimit + []0 setdash + /setstrokeadjust where{ + pop + false setstrokeadjust + }if + /setoverprint where{ + pop + false setoverprint + }if + newpath + /CNT countdictstack def + userdict begin + /showpage{}def + }bind def + /PEND{ + clear + countdictstack CNT sub{end}repeat + level1 restore + }bind def + end def + /setpacking where{ + pop + setpacking + }if + %%EndResource + %%IncludeResource: font Times-Roman + %%IncludeResource: font Times-Bold + %%IncludeResource: font Times-Italic + grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 + def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron + /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef + /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent + /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen + /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon + /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O + /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex + /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y + /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft + /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl + /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut + /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash + /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen + /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft + /logicalnot/minus/registered/macron/degree/plusminus/twosuperior + /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior + /ordmasculine/guilsinglright/onequarter/onehalf/threequarters + /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE + /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex + /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis + /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn + /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla + /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis + /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash + /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def + /Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE + /Times-Roman@0 ENC0/Times-Roman RE + %%EndProlog + %%Page: 1 1 + %%BeginPageSetup + BP + %%EndPageSetup + /F0 10/Times-Roman@0 SF(HIST)72 48 Q(OR)-.18 E 357.18(Y\(3\) HIST)-.65 F + (OR)-.18 E(Y\(3\))-.65 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME) + .219 E F0(history \255 GNU History Library)108 96 Q F1(COPYRIGHT)72 + 112.8 Q F0(The GNU History Library is Cop)108 124.8 Q + (yright \251 1989-2001 by the Free Softw)-.1 E(are F)-.1 E + (oundation, Inc.)-.15 E F1(DESCRIPTION)72 141.6 Q F0(Man)108 153.6 Q + 2.81(yp)-.15 G .31(rograms read input from the user a line at a time.) + -2.81 F .309(The GNU History library is able to k)5.309 F .309 + (eep track of)-.1 F .024(those lines, associate arbitrary data with eac\ + h line, and utilize information from pre)108 165.6 R .024 + (vious lines in composing)-.25 F(ne)108 177.6 Q 2.5(wo)-.25 G(nes.)-2.5 + E F1(HIST)72 199.2 Q(OR)-.197 E 2.738(YE)-.383 G(XP)-2.738 E(ANSION)-.81 + E F0 .823(The history library supports a history e)108 211.2 R .822 + (xpansion feature that is identical to the history e)-.15 F .822 + (xpansion in)-.15 F/F2 10/Times-Bold@0 SF(bash.)3.322 E F0 + (This section describes what syntax features are a)108 223.2 Q -.25(va) + -.2 G(ilable.).25 E 1.305(History e)108 240 R 1.305 + (xpansions introduce w)-.15 F 1.306(ords from the history list into the\ + input stream, making it easy to repeat)-.1 F .21 + (commands, insert the ar)108 252 R .21(guments to a pre)-.18 F .209 + (vious command into the current input line, or \214x errors in pre)-.25 + F(vious)-.25 E(commands quickly)108 264 Q(.)-.65 E 1.296(History e)108 + 280.8 R 1.297(xpansion is usually performed immediately after a complet\ + e line is read.)-.15 F 1.297(It tak)6.297 F 1.297(es place in tw)-.1 F + (o)-.1 E 2.855(parts. The)108 292.8 R .354(\214rst is to determine whic\ + h line from the history list to use during substitution.)2.855 F .354 + (The second is to)5.354 F .116 + (select portions of that line for inclusion into the current one.)108 + 304.8 R .117(The line selected from the history is the)5.116 F/F3 10 + /Times-Italic@0 SF -.15(ev)2.617 G(ent).15 E F0(,)A .846 + (and the portions of that line that are acted upon are)108 316.8 R F3 + (wor)3.346 E(ds)-.37 E F0 5.846(.V)C(arious)-6.956 E F3(modi\214er)3.346 + E(s)-.1 E F0 .846(are a)3.346 F -.25(va)-.2 G .845(ilable to manipulate) + .25 F .304(the selected w)108 328.8 R 2.804(ords. The)-.1 F .304 + (line is brok)2.804 F .304(en into w)-.1 F .304(ords in the same f)-.1 F + .304(ashion as)-.1 F F2(bash)2.804 E F0 .305 + (does when reading input, so)2.804 F .539(that se)108 340.8 R -.15(ve) + -.25 G .539(ral w).15 F .539(ords that w)-.1 F .539 + (ould otherwise be separated are considered one w)-.1 F .538 + (ord when surrounded by quotes)-.1 F .307(\(see the description of)108 + 352.8 R F2(history_tok)2.807 E(enize\(\))-.1 E F0(belo)2.807 E 2.807 + (w\). History)-.25 F -.15(ex)2.807 G .307 + (pansions are introduced by the appearance of).15 F .52(the history e) + 108 364.8 R .52(xpansion character)-.15 F 3.02(,w)-.4 G .52(hich is) + -3.02 F F2(!)3.853 E F0 .52(by def)3.853 F 3.02(ault. Only)-.1 F .52 + (backslash \()3.02 F F2(\\).833 E F0 3.02(\)a).833 G .52 + (nd single quotes can quote the)-3.02 F(history e)108 376.8 Q + (xpansion character)-.15 E(.)-.55 E F2(Ev)87 393.6 Q(ent Designators)-.1 + E F0(An e)108 405.6 Q -.15(ve)-.25 G(nt designator is a reference to a \ + command line entry in the history list.).15 E F2(!)108 422.4 Q F0 + (Start a history substitution, e)32.67 E(xcept when follo)-.15 E + (wed by a)-.25 E F2(blank)2.5 E F0 2.5(,n)C -.25(ew)-2.5 G + (line, = or \(.).25 E F2(!)108 434.4 Q F3(n)A F0(Refer to command line) + 27.67 E F3(n)2.5 E F0(.).24 E F2<21ad>108 446.4 Q F3(n)A F0 + (Refer to the current command line minus)21.97 E F3(n)2.5 E F0(.).24 E + F2(!!)108 458.4 Q F0(Refer to the pre)29.34 E(vious command.)-.25 E + (This is a synon)5 E(ym for `!\2551'.)-.15 E F2(!)108 470.4 Q F3(string) + A F0(Refer to the most recent command starting with)9.33 E F3(string)2.5 + E F0(.).22 E F2(!?)108 482.4 Q F3(string)A F2([?])A F0 1.057 + (Refer to the most recent command containing)144 494.4 R F3(string)3.557 + E F0 6.057(.T).22 G 1.057(he trailing)-6.057 F F2(?)3.557 E F0 1.057 + (may be omitted if)3.557 F F3(string)3.557 E F0(is)3.557 E(follo)144 + 506.4 Q(wed immediately by a ne)-.25 E(wline.)-.25 E/F4 12/Times-Bold@0 + SF(^)108 523.4 Q F3(string1)-5 I F4(^)5 I F3(string2)-5 I F4(^)5 I F0 + 2.66(Quick substitution.)144 530.4 R 2.66 + (Repeat the last command, replacing)7.66 F F3(string1)5.16 E F0(with) + 5.16 E F3(string2)5.16 E F0 7.66(.E).02 G(qui)-7.66 E -.25(va)-.25 G + 2.66(lent to).25 F -.74(``)144 542.4 S(!!:s/).74 E F3(string1)A F0(/)A + F3(string2)A F0(/')A 2.5('\()-.74 G(see)-2.5 E F2(Modi\214ers)2.5 E F0 + (belo)2.5 E(w\).)-.25 E F2(!#)108 554.4 Q F0 + (The entire command line typed so f)27.67 E(ar)-.1 E(.)-.55 E F2 -.75 + (Wo)87 571.2 S(rd Designators).75 E F0 -.8(Wo)108 583.2 S 1.313 + (rd designators are used to select desired w).8 F 1.314(ords from the e) + -.1 F -.15(ve)-.25 G 3.814(nt. A).15 F F2(:)3.814 E F0 1.314 + (separates the e)3.814 F -.15(ve)-.25 G 1.314(nt speci\214cation).15 F + .53(from the w)108 595.2 R .529(ord designator)-.1 F 5.529(.I)-.55 G + 3.029(tm)-5.529 G .529(ay be omitted if the w)-3.029 F .529 + (ord designator be)-.1 F .529(gins with a)-.15 F F2(^)3.029 E F0(,)A F2 + ($)3.029 E F0(,)A F2(*)3.029 E F0(,)A F23.029 E F0 3.029(,o)C(r) + -3.029 E F2(%)3.029 E F0 5.529(.W)C(ords)-6.329 E 1.3 + (are numbered from the be)108 607.2 R 1.3 + (ginning of the line, with the \214rst w)-.15 F 1.301 + (ord being denoted by 0 \(zero\).)-.1 F -.8(Wo)6.301 G 1.301(rds are).8 + F(inserted into the current line separated by single spaces.)108 619.2 Q + F2 2.5(0\()108 636 S(zer)-2.5 E(o\))-.18 E F0(The zeroth w)144 648 Q 2.5 + (ord. F)-.1 F(or the shell, this is the command w)-.15 E(ord.)-.1 E F3 + (n)108 660 Q F0(The)31 E F3(n)2.5 E F0(th w)A(ord.)-.1 E F2(^)108 672 Q + F0(The \214rst ar)32.67 E 2.5(gument. That)-.18 F(is, w)2.5 E(ord 1.)-.1 + E F2($)108 684 Q F0(The last ar)31 E(gument.)-.18 E F2(%)108 696 Q F0 + (The w)26 E(ord matched by the most recent `?)-.1 E F3(string)A F0 + (?' search.)A F3(x)108 708 Q F2A F3(y)A F0 2.5(Ar)21.42 G(ange of w) + -2.5 E(ords; `\255)-.1 E F3(y)A F0 2.5('a)C(bbre)-2.5 E(viates `0\255) + -.25 E F3(y)A F0('.)A(GNU History 4.2)72 768 Q(2001 Mar 6)141.51 E(1) + 205.67 E EP + %%Page: 2 2 + %%BeginPageSetup + BP + %%EndPageSetup + /F0 10/Times-Roman@0 SF(HIST)72 48 Q(OR)-.18 E 357.18(Y\(3\) HIST)-.65 F + (OR)-.18 E(Y\(3\))-.65 E/F1 10/Times-Bold@0 SF(*)108 84 Q F0 .316 + (All of the w)31 F .316(ords b)-.1 F .316(ut the zeroth.)-.2 F .315 + (This is a synon)5.315 F .315(ym for `)-.15 F/F2 10/Times-Italic@0 SF + (1\255$)A F0 2.815('. It)B .315(is not an error to use)2.815 F F1(*) + 2.815 E F0 .315(if there is)2.815 F(just one w)144 96 Q(ord in the e)-.1 + E -.15(ve)-.25 G(nt; the empty string is returned in that case.).15 E F1 + (x*)108 108 Q F0(Abbre)26 E(viates)-.25 E F2(x\255$)2.5 E F0(.)A F1 + <78ad>108 120 Q F0(Abbre)25.3 E(viates)-.25 E F2(x\255$)2.5 E F0(lik)2.5 + E(e)-.1 E F1(x*)2.5 E F0 2.5(,b)C(ut omits the last w)-2.7 E(ord.)-.1 E + (If a w)108 136.8 Q(ord designator is supplied without an e)-.1 E -.15 + (ve)-.25 G(nt speci\214cation, the pre).15 E + (vious command is used as the e)-.25 E -.15(ve)-.25 G(nt.).15 E F1 + (Modi\214ers)87 153.6 Q F0 .183(After the optional w)108 165.6 R .183 + (ord designator)-.1 F 2.683(,t)-.4 G .184 + (here may appear a sequence of one or more of the follo)-2.683 F .184 + (wing modi\214ers,)-.25 F(each preceded by a `:'.)108 177.6 Q F1(h)108 + 194.4 Q F0(Remo)30.44 E .3 -.15(ve a t)-.15 H + (railing \214le name component, lea).15 E(ving only the head.)-.2 E F1 + (t)108 206.4 Q F0(Remo)32.67 E .3 -.15(ve a)-.15 H + (ll leading \214le name components, lea).15 E(ving the tail.)-.2 E F1(r) + 108 218.4 Q F0(Remo)31.56 E .3 -.15(ve a t)-.15 H(railing suf).15 E + (\214x of the form)-.25 E F2(.xxx)2.5 E F0 2.5(,l)C(ea)-2.5 E + (ving the basename.)-.2 E F1(e)108 230.4 Q F0(Remo)31.56 E .3 -.15(ve a) + -.15 H(ll b).15 E(ut the trailing suf)-.2 E(\214x.)-.25 E F1(p)108 242.4 + Q F0(Print the ne)30.44 E 2.5(wc)-.25 G(ommand b)-2.5 E(ut do not e)-.2 + E -.15(xe)-.15 G(cute it.).15 E F1(q)108 254.4 Q F0 + (Quote the substituted w)30.44 E(ords, escaping further substitutions.) + -.1 E F1(x)108 266.4 Q F0(Quote the substituted w)31 E(ords as with)-.1 + E F1(q)2.5 E F0 2.5(,b)C(ut break into w)-2.7 E(ords at)-.1 E F1(blanks) + 2.5 E F0(and ne)2.5 E(wlines.)-.25 E F1(s/)108 278.4 Q F2(old)A F1(/)A + F2(ne)A(w)-.15 E F1(/)A F0(Substitute)144 290.4 Q F2(ne)2.814 E(w)-.15 E + F0 .314(for the \214rst occurrence of)2.814 F F2(old)2.814 E F0 .314 + (in the e)2.814 F -.15(ve)-.25 G .314(nt line.).15 F(An)5.314 E 2.814 + (yd)-.15 G .314(elimiter can be used in place)-2.814 F .616(of /.)144 + 302.4 R .617 + (The \214nal delimiter is optional if it is the last character of the e) + 5.616 F -.15(ve)-.25 G .617(nt line.).15 F .617(The delimiter may)5.617 + F .75(be quoted in)144 314.4 R F2(old)3.25 E F0(and)3.25 E F2(ne)3.25 E + (w)-.15 E F0 .75(with a single backslash.)3.25 F .749(If & appears in) + 5.75 F F2(ne)3.249 E(w)-.15 E F0 3.249(,i).31 G 3.249(ti)-3.249 G 3.249 + (sr)-3.249 G .749(eplaced by)-3.249 F F2(old)3.249 E F0 5.749(.A).77 G + .369(single backslash will quote the &.)144 326.4 R(If)5.369 E F2(old) + 2.869 E F0 .37(is null, it is set to the last)2.869 F F2(old)2.87 E F0 + .37(substituted, or)2.87 F 2.87(,i)-.4 G 2.87(fn)-2.87 G 2.87(op)-2.87 G + (re)-2.87 E(vi-)-.25 E(ous history substitutions took place, the last) + 144 338.4 Q F2(string)2.5 E F0(in a)2.5 E F1(!?)2.5 E F2(string)A F1 + ([?])A F0(search.)5 E F1(&)108 350.4 Q F0(Repeat the pre)27.67 E + (vious substitution.)-.25 E F1(g)108 362.4 Q F0 .398 + (Cause changes to be applied o)31 F -.15(ve)-.15 G 2.898(rt).15 G .398 + (he entire e)-2.898 F -.15(ve)-.25 G .398(nt line.).15 F .397 + (This is used in conjunction with `)5.398 F F1(:s)A F0 2.897('\()C + (e.g.,)-2.897 E(`)144 374.4 Q F1(:gs/)A F2(old)A F1(/)A F2(ne)A(w)-.15 E + F1(/)A F0 1.218('\) or `)B F1(:&)A F0 3.718('. If)B 1.218(used with `) + 3.718 F F1(:s)A F0 1.218(', an)B 3.718(yd)-.15 G 1.219 + (elimiter can be used in place of /, and the \214nal)-3.718 F + (delimiter is optional if it is the last character of the e)144 386.4 Q + -.15(ve)-.25 G(nt line.).15 E/F3 10.95/Times-Bold@0 SF(PR)72 403.2 Q + (OGRAMMING WITH HIST)-.329 E(OR)-.197 E 2.738(YF)-.383 G(UNCTIONS)-2.738 + E F0(This section describes ho)108 415.2 Q 2.5(wt)-.25 G 2.5(ou)-2.5 G + (se the History library in other programs.)-2.5 E F1(Intr)87 432 Q + (oduction to History)-.18 E F0 .797 + (The programmer using the History library has a)108 444 R -.25(va)-.2 G + .796(ilable functions for remembering lines on a history list,).25 F + .307(associating arbitrary data with a line, remo)108 456 R .308 + (ving lines from the list, searching through the list for a line con-) + -.15 F .303(taining an arbitrary te)108 468 R .303 + (xt string, and referencing an)-.15 F 2.803(yl)-.15 G .303 + (ine in the list directly)-2.803 F 5.303(.I)-.65 G 2.803(na)-5.303 G + .303(ddition, a history)-2.803 F F2 -.2(ex)2.802 G(pansion).2 E F0 + (function is a)108 480 Q -.25(va)-.2 G(ilable which pro).25 E + (vides for a consistent user interf)-.15 E(ace across dif)-.1 E + (ferent programs.)-.25 E .059(The user using programs written with the \ + History library has the bene\214t of a consistent user interf)108 496.8 + R .059(ace with a)-.1 F .918(set of well-kno)108 508.8 R .917 + (wn commands for manipulating the te)-.25 F .917(xt of pre)-.15 F .917 + (vious lines and using that te)-.25 F .917(xt in ne)-.15 F 3.417(wc)-.25 + G(om-)-3.417 E 4.183(mands. The)108 520.8 R 1.684(basic history manipul\ + ation commands are identical to the history substitution pro)4.183 F + 1.684(vided by)-.15 F F1(bash)108 532.8 Q F0(.)A .904 + (If the programmer desires, he can use the Readline library)108 549.6 R + 3.403(,w)-.65 G .903(hich includes some history manipulation by)-3.403 F + (def)108 561.6 Q(ault, and has the added adv)-.1 E + (antage of command line editing.)-.25 E .39(Before declaring an)108 + 578.4 R 2.89(yf)-.15 G .39(unctions using an)-2.89 F 2.89(yf)-.15 G .39 + (unctionality the History library pro)-2.89 F .39 + (vides in other code, an appli-)-.15 F .067 + (cation writer should include the \214le)108 590.4 R F2()-.55 E F0 .067(in an)4.233 F 2.566<798c>-.15 + G .066(le that uses the History library')-2.566 F 2.566(sf)-.55 G + (eatures.)-2.566 E .538(It supplies e)108 602.4 R .538 + (xtern declarations for all of the library')-.15 F 3.038(sp)-.55 G .538 + (ublic functions and v)-3.038 F .539(ariables, and declares all of the) + -.25 F(public data structures.)108 614.4 Q F1(History Storage)87 643.2 Q + F0(The history list is an array of history entries.)108 655.2 Q 2.5(Ah)5 + G(istory entry is declared as follo)-2.5 E(ws:)-.25 E F2(typedef void *) + 108 672 Q F1(histdata_t;)2.5 E F0(typedef struct _hist_entry {)108 688.8 + Q(char *line;)113 700.8 Q(histdata_t data;)113 712.8 Q 2.5(}H)108 724.8 + S(IST_ENTR)-2.5 E -.92(Y;)-.65 G(GNU History 4.2)72 768 Q(2001 Mar 6) + 141.51 E(2)205.67 E EP + %%Page: 3 3 + %%BeginPageSetup + BP + %%EndPageSetup + /F0 10/Times-Roman@0 SF(HIST)72 48 Q(OR)-.18 E 357.18(Y\(3\) HIST)-.65 F + (OR)-.18 E(Y\(3\))-.65 E + (The history list itself might therefore be declared as)108 84 Q/F1 10 + /Times-Italic@0 SF(HIST_ENTR)108 100.8 Q 2.5(Y*)-.18 G(*)-2.5 E/F2 10 + /Times-Bold@0 SF(the_history_list;)2.5 E F0(The state of the History li\ + brary is encapsulated into a single structure:)108 117.6 Q(/*)108 134.4 + Q 2.5(*As)110.5 146.4 S + (tructure used to pass around the current state of the history)-2.5 E(.) + -.65 E(*/)110.5 158.4 Q(typedef struct _hist_state {)108 170.4 Q + (HIST_ENTR)113 182.4 Q 2.5(Y*)-.65 G + (*entries; /* Pointer to the entries themselv)-2.5 E(es. */)-.15 E + (int of)113 194.4 Q 25(fset; /*)-.25 F + (The location pointer within this array)2.5 E 2.5(.*)-.65 G(/)-2.5 E + (int length;)113 206.4 Q(/* Number of elements within this array)27.5 E + 2.5(.*)-.65 G(/)-2.5 E(int size;)113 218.4 Q + (/* Number of slots allocated to this array)32.5 E 2.5(.*)-.65 G(/)-2.5 + E(int \215ags;)113 230.4 Q 2.5(}H)108 242.4 S(IST)-2.5 E(OR)-.18 E(Y_ST) + -.65 E -1.11(AT)-.93 G(E;)1.11 E(If the \215ags member includes)108 + 259.2 Q F2(HS_STIFLED)2.5 E F0 2.5(,t)C(he history has been sti\215ed.) + -2.5 E/F3 10.95/Times-Bold@0 SF(History Functions)72 276 Q F0 + (This section describes the calling sequence for the v)108 288 Q + (arious functions e)-.25 E(xported by the GNU History library)-.15 E(.) + -.65 E F2(Initializing History and State Management)87 304.8 Q F0 1.274 + (This section describes functions used to initialize and manage the sta\ + te of the History library when you)108 316.8 R -.1(wa)108 328.8 S + (nt to use the history functions in your program.).1 E F1(void)108 352.8 + Q F2(using_history)2.5 E F0(\()4.166 E F1(void)A F0(\))1.666 E(Be)108 + 364.8 Q(gin a session in which the history functions might be used.)-.15 + E(This initializes the interacti)5 E .3 -.15(ve v)-.25 H(ariables.)-.1 E + F1(HIST)108 388.8 Q(OR)-.18 E(Y_ST)-.18 E -.37(AT)-.5 G 2.5(E*).37 G F2 + (history_get_history_state)A F0(\()4.166 E F1(void)A F0(\))1.666 E + (Return a structure describing the current state of the input history) + 108 400.8 Q(.)-.65 E F1(void)108 424.8 Q F2(history_set_history_state) + 2.5 E F0(\()4.166 E F1(HIST)A(OR)-.18 E(Y_ST)-.18 E -.37(AT)-.5 G 2.5 + (E*).37 G(state)-2.5 E F0(\))1.666 E + (Set the state of the history list according to)108 436.8 Q F1(state)2.5 + E F0(.)A F2(History List Management)87 465.6 Q F0 + (These functions manage indi)108 477.6 Q(vidual entries on the history \ + list, or set parameters managing the list itself.)-.25 E F1(void)108 + 501.6 Q F2(add_history)2.5 E F0(\()4.166 E F1(const c)A(har *string)-.15 + E F0(\))1.666 E(Place)108 513.6 Q F1(string)2.5 E F0 + (at the end of the history list.)2.5 E + (The associated data \214eld \(if an)5 E(y\) is set to)-.15 E F2(NULL) + 2.5 E F0(.)A F1(HIST_ENTR)108 537.6 Q 2.5(Y*)-.18 G F2 -.18(re)C(mo).18 + E -.1(ve)-.1 G(_history).1 E F0(\()4.166 E F1(int whic)A(h)-.15 E F0(\)) + 1.666 E(Remo)108 549.6 Q .352 -.15(ve h)-.15 H .052(istory entry at of) + .15 F(fset)-.25 E F1(whic)2.553 E(h)-.15 E F0 .053(from the history) + 2.553 F 5.053(.T)-.65 G .053(he remo)-5.053 F -.15(ve)-.15 G 2.553(de) + .15 G .053(lement is returned so you can free the)-2.553 F + (line, data, and containing structure.)108 561.6 Q F1(HIST_ENTR)108 + 585.6 Q 2.5(Y*)-.18 G F2 -.18(re)C(place_history_entry).18 E F0(\()4.166 + E F1(int whic)A -.834(h, const)-.15 F -.15(ch)2.5 G(ar *line).15 E 1.666 + (,h)-.1 G(istdata_t data)-1.666 E F0(\))3.332 E(Mak)108 597.6 Q 2.868 + (et)-.1 G .368(he history entry at of)-2.868 F(fset)-.25 E F1(whic)2.868 + E(h)-.15 E F0(ha)2.868 E -.15(ve)-.2 G F1(line)3.018 E F0(and)2.868 E F1 + (data)2.868 E F0 5.367(.T)C .367 + (his returns the old entry so you can dispose of)-5.367 F(the data.)108 + 609.6 Q(In the case of an in)5 E -.25(va)-.4 G(lid).25 E F1(whic)2.5 E + (h)-.15 E F0 2.5(,a)C F2(NULL)A F0(pointer is returned.)2.5 E F1(void) + 108 633.6 Q F2(clear_history)2.5 E F0(\()4.166 E F1(void)A F0(\))1.666 E + (Clear the history list by deleting all the entries.)108 645.6 Q F1 + (void)108 669.6 Q F2(sti\215e_history)2.5 E F0(\()4.166 E F1(int max)A + F0(\))1.666 E(Sti\215e the history list, remembering only the last)108 + 681.6 Q F1(max)2.5 E F0(entries.)2.5 E F1(int)108 705.6 Q F2 + (unsti\215e_history)2.5 E F0(\()4.166 E F1(void)A F0(\))1.666 E .655 + (Stop sti\215ing the history)108 717.6 R 5.656(.T)-.65 G .656 + (his returns the pre)-5.656 F .656(vious amount the history w)-.25 F + .656(as sti\215ed.)-.1 F .656(The v)5.656 F .656(alue is positi)-.25 F + .956 -.15(ve i)-.25 H(f).15 E(the history w)108 729.6 Q + (as sti\215ed, ne)-.1 E -.05(ga)-.15 G(ti).05 E .3 -.15(ve i)-.25 H 2.5 + (fi).15 G 2.5(tw)-2.5 G(asn')-2.6 E(t.)-.18 E(GNU History 4.2)72 768 Q + (2001 Mar 6)141.51 E(3)205.67 E EP + %%Page: 4 4 + %%BeginPageSetup + BP + %%EndPageSetup + /F0 10/Times-Roman@0 SF(HIST)72 48 Q(OR)-.18 E 357.18(Y\(3\) HIST)-.65 F + (OR)-.18 E(Y\(3\))-.65 E/F1 10/Times-Italic@0 SF(int)108 84 Q/F2 10 + /Times-Bold@0 SF(history_is_sti\215ed)2.5 E F0(\()4.166 E F1(void)A F0 + (\))1.666 E + (Returns non-zero if the history is sti\215ed, zero if it is not.)108 96 + Q F2(Inf)87 124.8 Q(ormation About the History List)-.25 E F0(These fun\ + ctions return information about the entire history list or indi)108 + 136.8 Q(vidual list entries.)-.25 E F1(HIST_ENTR)108 160.8 Q 2.5(Y*)-.18 + G(*)-2.5 E F2(history_list)2.5 E F0(\()4.166 E F1(void)A F0(\))1.666 E + .708(Return a)108 172.8 R F2(NULL)3.208 E F0 .708(terminated array of) + 3.208 F F1(HIST_ENTR)3.208 E 3.208(Y*)-.18 G F0 .708 + (which is the current input history)B 5.707(.E)-.65 G .707 + (lement 0 of this)-5.707 F(list is the be)108 184.8 Q(ginning of time.) + -.15 E(If there is no history)5 E 2.5(,r)-.65 G(eturn)-2.5 E F2(NULL)2.5 + E F0(.)A F1(int)108 208.8 Q F2(wher)2.5 E(e_history)-.18 E F0(\()4.166 E + F1(void)A F0(\))1.666 E(Returns the of)108 220.8 Q + (fset of the current history element.)-.25 E F1(HIST_ENTR)108 244.8 Q + 2.5(Y*)-.18 G F2(curr)A(ent_history)-.18 E F0(\()4.166 E F1(void)A F0 + (\))1.666 E 1.373 + (Return the history entry at the current position, as determined by)108 + 256.8 R F2(wher)3.873 E(e_history\(\))-.18 E F0 6.373(.I)C 3.873(ft) + -6.373 G 1.374(here is no entry)-3.873 F(there, return a)108 268.8 Q F2 + (NULL)2.5 E F0(pointer)2.5 E(.)-.55 E F1(HIST_ENTR)108 292.8 Q 2.5(Y*) + -.18 G F2(history_get)A F0(\()4.166 E F1(int of)A(fset)-.18 E F0(\)) + 1.666 E .288(Return the history entry at position)108 304.8 R F1(of) + 2.787 E(fset)-.18 E F0 2.787(,s)C .287(tarting from)-2.787 F F2 + (history_base)2.787 E F0 5.287(.I)C 2.787(ft)-5.287 G .287 + (here is no entry there, or if)-2.787 F F1(of)2.787 E(fset)-.18 E F0 + (is greater than the history length, return a)108 316.8 Q F2(NULL)2.5 E + F0(pointer)2.5 E(.)-.55 E F1(int)108 340.8 Q F2(history_total_bytes)2.5 + E F0(\()4.166 E F1(void)A F0(\))1.666 E .391 + (Return the number of bytes that the primary history entries are using.) + 108 352.8 R .392(This function returns the sum of the)5.392 F + (lengths of all the lines in the history)108 364.8 Q(.)-.65 E F2(Mo)87 + 393.6 Q(ving Ar)-.1 E(ound the History List)-.18 E F0 + (These functions allo)108 405.6 Q 2.5(wt)-.25 G(he current inde)-2.5 E + 2.5(xi)-.15 G(nto the history list to be set or changed.)-2.5 E F1(int) + 108 429.6 Q F2(history_set_pos)2.5 E F0(\()4.166 E F1(int pos)A F0(\)) + 1.666 E .79(Set the current history of)108 441.6 R .79(fset to)-.25 F F1 + (pos)3.29 E F0 3.29(,a)C 3.29(na)-3.29 G .79(bsolute inde)-3.29 F 3.29 + (xi)-.15 G .79(nto the list.)-3.29 F .79(Returns 1 on success, 0 if)5.79 + F F1(pos)3.29 E F0 .79(is less)3.29 F + (than zero or greater than the number of history entries.)108 453.6 Q F1 + (HIST_ENTR)108 477.6 Q 2.5(Y*)-.18 G F2(pr)A -.15(ev)-.18 G + (ious_history).15 E F0(\()4.166 E F1(void)A F0(\))1.666 E .207 + (Back up the current history of)108 489.6 R .207(fset to the pre)-.25 F + .207(vious history entry)-.25 F 2.708(,a)-.65 G .208 + (nd return a pointer to that entry)-2.708 F 5.208(.I)-.65 G 2.708(ft) + -5.208 G .208(here is)-2.708 F(no pre)108 501.6 Q(vious entry)-.25 E 2.5 + (,r)-.65 G(eturn a)-2.5 E F2(NULL)2.5 E F0(pointer)2.5 E(.)-.55 E F1 + (HIST_ENTR)108 525.6 Q 2.5(Y*)-.18 G F2(next_history)A F0(\()4.166 E F1 + (void)A F0(\))1.666 E(Mo)108 537.6 Q 1.047 -.15(ve t)-.15 H .747 + (he current history of).15 F .747(fset forw)-.25 F .746(ard to the ne) + -.1 F .746(xt history entry)-.15 F 3.246(,a)-.65 G .746 + (nd return the a pointer to that entry)-3.246 F 5.746(.I)-.65 G(f)-5.746 + E(there is no ne)108 549.6 Q(xt entry)-.15 E 2.5(,r)-.65 G(eturn a)-2.5 + E F2(NULL)2.5 E F0(pointer)2.5 E(.)-.55 E F2(Sear)87 578.4 Q + (ching the History List)-.18 E F0 .005(These functions allo)108 590.4 R + 2.505(ws)-.25 G .006(earching of the history list for entries containin\ + g a speci\214c string.)-2.505 F .006(Searching may be)5.006 F 1.452 + (performed both forw)108 602.4 R 1.452(ard and backw)-.1 F 1.451 + (ard from the current history position.)-.1 F 1.451(The search may be) + 6.451 F F1(anc)3.951 E(hor)-.15 E(ed)-.37 E F0(,)A + (meaning that the string must match at the be)108 614.4 Q + (ginning of the history entry)-.15 E(.)-.65 E F1(int)108 638.4 Q F2 + (history_sear)2.5 E(ch)-.18 E F0(\()4.166 E F1(const c)A(har *string) + -.15 E 1.666(,i)-.1 G(nt dir)-1.666 E(ection)-.37 E F0(\))1.666 E .155 + (Search the history for)108 650.4 R F1(string)2.655 E F0 2.656(,s)C .156 + (tarting at the current history of)-2.656 F 2.656(fset. If)-.25 F F1 + (dir)2.656 E(ection)-.37 E F0 .156(is less than 0, then the search)2.656 + F .802(is through pre)108 662.4 R .802 + (vious entries, otherwise through subsequent entries.)-.25 F(If)5.801 E + F1(string)3.301 E F0 .801(is found, then the current his-)3.301 F .064 + (tory inde)108 674.4 R 2.564(xi)-.15 G 2.564(ss)-2.564 G .064 + (et to that history entry)-2.564 F 2.564(,a)-.65 G .064(nd the v)-2.564 + F .064(alue returned is the of)-.25 F .064 + (fset in the line of the entry where)-.25 F F1(string)2.565 E F0 -.1(wa) + 108 686.4 S 2.5(sf).1 G 2.5(ound. Otherwise,)-2.5 F + (nothing is changed, and a -1 is returned.)2.5 E F1(int)108 710.4 Q F2 + (history_sear)2.5 E(ch_pr)-.18 E(e\214x)-.18 E F0(\()4.166 E F1(const c) + A(har *string)-.15 E 1.666(,i)-.1 G(nt dir)-1.666 E(ection)-.37 E F0(\)) + 1.666 E .684(Search the history for)108 722.4 R F1(string)3.183 E F0 + 3.183(,s)C .683(tarting at the current history of)-3.183 F 3.183 + (fset. The)-.25 F .683(search is anchored: matching lines)3.183 F + (GNU History 4.2)72 768 Q(2001 Mar 6)141.51 E(4)205.67 E EP + %%Page: 5 5 + %%BeginPageSetup + BP + %%EndPageSetup + /F0 10/Times-Roman@0 SF(HIST)72 48 Q(OR)-.18 E 357.18(Y\(3\) HIST)-.65 F + (OR)-.18 E(Y\(3\))-.65 E 1.063(must be)108 84 R 1.063(gin with)-.15 F/F1 + 10/Times-Italic@0 SF(string)3.563 E F0 6.063(.I)C(f)-6.063 E F1(dir) + 3.563 E(ection)-.37 E F0 1.064 + (is less than 0, then the search is through pre)3.563 F 1.064 + (vious entries, otherwise)-.25 F 1.115(through subsequent entries.)108 + 96 R(If)6.115 E F1(string)3.615 E F0 1.115 + (is found, then the current history inde)3.615 F 3.614(xi)-.15 G 3.614 + (ss)-3.614 G 1.114(et to that entry)-3.614 F 3.614(,a)-.65 G 1.114 + (nd the)-3.614 F(return v)108 108 Q(alue is 0.)-.25 E + (Otherwise, nothing is changed, and a -1 is returned.)5 E F1(int)108 132 + Q/F2 10/Times-Bold@0 SF(history_sear)2.5 E(ch_pos)-.18 E F0(\()4.166 E + F1(const c)A(har *string)-.15 E 1.666(,i)-.1 G(nt dir)-1.666 E -.834 + (ection, int)-.37 F(pos)2.5 E F0(\))3.332 E .603(Search for)108 144 R F1 + (string)3.103 E F0 .603(in the history list, starting at)3.103 F F1(pos) + 3.104 E F0 3.104(,a)C 3.104(na)-3.104 G .604(bsolute inde)-3.104 F 3.104 + (xi)-.15 G .604(nto the list.)-3.104 F(If)5.604 E F1(dir)3.104 E(ection) + -.37 E F0 .604(is ne)3.104 F -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G(,) + .15 E .608(the search proceeds backw)108 156 R .608(ard from)-.1 F F1 + (pos)3.108 E F0 3.108(,o)C .608(therwise forw)-3.108 F 3.108 + (ard. Returns)-.1 F .608(the absolute inde)3.108 F 3.108(xo)-.15 G 3.108 + (ft)-3.108 G .608(he history ele-)-3.108 F(ment where)108 168 Q F1 + (string)2.5 E F0 -.1(wa)2.5 G 2.5(sf).1 G(ound, or -1 otherwise.)-2.5 E + F2(Managing the History File)87 196.8 Q F0 .035(The History library can\ + read the history from and write it to a \214le.)108 208.8 R .036 + (This section documents the functions for)5.035 F + (managing a history \214le.)108 220.8 Q F1(int)108 244.8 Q F2 -.18(re) + 2.5 G(ad_history).18 E F0(\()4.166 E F1(const c)A(har *\214lename)-.15 E + F0(\))1.666 E .151(Add the contents of)108 256.8 R F1(\214lename)2.651 E + F0 .151(to the history list, a line at a time.)2.651 F(If)5.15 E F1 + (\214lename)2.65 E F0(is)2.65 E F2(NULL)2.65 E F0 2.65(,t)C .15 + (hen read from)-2.65 F F1(~/.his-)2.65 E(tory)108 268.8 Q F0 5(.R)C + (eturns 0 if successful, or)-5 E F2(err)2.5 E(no)-.15 E F0(if not.)2.5 E + F1(int)108 292.8 Q F2 -.18(re)2.5 G(ad_history_range).18 E F0(\()4.166 E + F1(const c)A(har *\214lename)-.15 E 1.666(,i)-.1 G(nt fr)-1.666 E -.834 + (om, int)-.45 F(to)2.5 E F0(\))3.332 E .052(Read a range of lines from) + 108 304.8 R F1(\214lename)2.553 E F0 2.553(,a)C .053 + (dding them to the history list.)-2.553 F .053(Start reading at line) + 5.053 F F1(fr)2.553 E(om)-.45 E F0 .053(and end at)2.553 F F1(to)2.553 E + F0(.)A(If)108 316.8 Q F1(fr)2.889 E(om)-.45 E F0 .389 + (is zero, start at the be)2.889 F 2.889(ginning. If)-.15 F F1(to)2.889 E + F0 .389(is less than)2.889 F F1(fr)2.889 E(om)-.45 E F0 2.889(,t)C .388 + (hen read until the end of the \214le.)-2.889 F(If)5.388 E F1 + (\214lename)2.888 E F0(is)108 328.8 Q F2(NULL)2.5 E F0 2.5(,t)C + (hen read from)-2.5 E F1(~/.history)2.5 E F0 5(.R)C + (eturns 0 if successful, or)-5 E F2(err)2.5 E(no)-.15 E F0(if not.)2.5 E + F1(int)108 352.8 Q F2(write_history)2.5 E F0(\()4.166 E F1(const c)A + (har *\214lename)-.15 E F0(\))1.666 E .961(Write the current history to) + 108 364.8 R F1(\214lename)3.461 E F0 3.461(,o)C -.15(ve)-3.611 G + (rwriting).15 E F1(\214lename)3.461 E F0 .961(if necessary)3.461 F 5.961 + (.I)-.65 G(f)-5.961 E F1(\214lename)3.462 E F0(is)3.462 E F2(NULL)3.462 + E F0 3.462(,t)C .962(hen write)-3.462 F(the history list to)108 376.8 Q + F1(~/.history)2.5 E F0 5(.R)C(eturns 0 on success, or)-5 E F2(err)2.5 E + (no)-.15 E F0(on a read or write error)2.5 E(.)-.55 E F1(int)108 412.8 Q + F2(append_history)2.5 E F0(\()4.166 E F1(int nelements,)A(const c)1.666 + E(har *\214lename)-.15 E F0(\))1.666 E .839(Append the last)108 424.8 R + F1(nelements)3.339 E F0 .839(of the history list to)3.339 F F1 + (\214lename)3.339 E F0 5.839(.I)C(f)-5.839 E F1(\214lename)3.339 E F0 + (is)3.339 E F2(NULL)3.339 E F0 3.339(,t)C .838(hen append to)-3.339 F F1 + (~/.history)3.338 E F0(.)A(Returns 0 on success, or)108 436.8 Q F2(err) + 2.5 E(no)-.15 E F0(on a read or write error)2.5 E(.)-.55 E F1(int)108 + 460.8 Q F2(history_truncate_\214le)2.5 E F0(\()4.166 E F1(const c)A + (har *\214lename)-.15 E 1.666(,i)-.1 G(nt nlines)-1.666 E F0(\))1.666 E + -.35(Tr)108 472.8 S .38(uncate the history \214le).35 F F1(\214lename) + 2.88 E F0 2.88(,l)C(ea)-2.88 E .38(ving only the last)-.2 F F1(nlines) + 2.881 E F0 2.881(lines. If)2.881 F F1(\214lename)2.881 E F0(is)2.881 E + F2(NULL)2.881 E F0 2.881(,t)C(hen)-2.881 E F1(~/.history)2.881 E F0(is) + 2.881 E 2.5(truncated. Returns)108 484.8 R 2.5(0o)2.5 G 2.5(ns)-2.5 G + (uccess, or)-2.5 E F2(err)2.5 E(no)-.15 E F0(on f)2.5 E(ailure.)-.1 E F2 + (History Expansion)87 513.6 Q F0(These functions implement history e)108 + 525.6 Q(xpansion.)-.15 E F1(int)108 549.6 Q F2(history_expand)2.5 E F0 + (\()4.166 E F1 -.15(ch)C(ar *string).15 E 1.666(,c)-.1 G(har **output) + -1.816 E F0(\))1.666 E(Expand)108 561.6 Q F1(string)2.5 E F0 2.5(,p)C + (lacing the result into)-2.5 E F1(output)2.5 E F0 2.5(,ap)C + (ointer to a string.)-2.5 E(Returns:)5 E 31(0I)144 573.6 S 3.066(fn)-31 + G 3.066(oe)-3.066 G .566(xpansions took place \(or)-3.216 F 3.065(,i)-.4 + G 3.065(ft)-3.065 G .565(he only change in the te)-3.065 F .565(xt w) + -.15 F .565(as the remo)-.1 F -.25(va)-.15 G 3.065(lo).25 G 3.065(fe) + -3.065 G(scape)-3.065 E(characters preceding the history e)180 585.6 Q + (xpansion character\);)-.15 E 31(1i)144 597.6 S 2.5(fe)-31 G + (xpansions did tak)-2.65 E 2.5(ep)-.1 G(lace;)-2.5 E 25.17(-1 if)144 + 609.6 R(there w)2.5 E(as an error in e)-.1 E(xpansion;)-.15 E 31(2i)144 + 621.6 S 2.5(ft)-31 G(he returned line should be displayed, b)-2.5 E + (ut not e)-.2 E -.15(xe)-.15 G(cuted, as with the).15 E F2(:p)2.5 E F0 + (modi\214er)2.5 E(.)-.55 E(If an error ocurred in e)108 633.6 Q + (xpansion, then)-.15 E F1(output)2.5 E F0(contains a descripti)2.5 E .3 + -.15(ve e)-.25 H(rror message.).15 E F1 -.15(ch)108 657.6 S(ar *).15 E + F2(get_history_e)2.5 E -.1(ve)-.15 G(nt).1 E F0(\()4.166 E F1(const c)A + (har *string)-.15 E 1.666(,i)-.1 G(nt *cinde)-1.666 E -.834(x, int)-.2 F + (qc)2.5 E(har)-.15 E F0(\))3.332 E .262(Returns the te)108 669.6 R .262 + (xt of the history e)-.15 F -.15(ve)-.25 G .262(nt be).15 F .263 + (ginning at)-.15 F F1(string)2.763 E F0(+)2.763 E F1(*cinde)2.763 E(x) + -.2 E F0(.)A F1(*cinde)5.263 E(x)-.2 E F0 .263 + (is modi\214ed to point to after the)2.763 F -2.15 -.25(ev e)108 681.6 T + .71(nt speci\214er).25 F 5.71(.A)-.55 G 3.21(tf)-5.71 G .71 + (unction entry)-3.21 F(,)-.65 E F1(cinde)3.21 E(x)-.2 E F0 .709 + (points to the inde)3.21 F 3.209(xi)-.15 G(nto)-3.209 E F1(string)3.209 + E F0 .709(where the history e)3.209 F -.15(ve)-.25 G .709 + (nt speci\214ca-).15 F .527(tion be)108 693.6 R(gins.)-.15 E F1(qc)5.527 + E(har)-.15 E F0 .527(is a character that is allo)3.027 F .527 + (wed to end the e)-.25 F -.15(ve)-.25 G .528 + (nt speci\214cation in addition to the `).15 F(`normal')-.74 E(')-.74 E + (terminating characters.)108 705.6 Q F1 -.15(ch)108 729.6 S(ar **).15 E + F2(history_tok)2.5 E(enize)-.1 E F0(\()4.166 E F1(const c)A(har *string) + -.15 E F0(\))1.666 E(GNU History 4.2)72 768 Q(2001 Mar 6)141.51 E(5) + 205.67 E EP + %%Page: 6 6 + %%BeginPageSetup + BP + %%EndPageSetup + /F0 10/Times-Roman@0 SF(HIST)72 48 Q(OR)-.18 E 357.18(Y\(3\) HIST)-.65 F + (OR)-.18 E(Y\(3\))-.65 E .239(Return an array of tok)108 84 R .239 + (ens parsed out of)-.1 F/F1 10/Times-Italic@0 SF(string)2.739 E F0 2.739 + (,m)C .238(uch as the shell might.)-2.739 F .238(The tok)5.238 F .238 + (ens are split on the charac-)-.1 F(ters in the)108 96 Q/F2 10 + /Times-Bold@0 SF(history_w)2.5 E(ord_delimiters)-.1 E F0 -.25(va)2.5 G + (riable, and shell quoting con).25 E -.15(ve)-.4 G(ntions are obe).15 E + (yed.)-.15 E F1 -.15(ch)108 120 S(ar *).15 E F2(history_ar)2.5 E + (g_extract)-.1 E F0(\()4.166 E F1(int \214r)A -.834(st, int)-.1 F -.834 + (last, const)2.5 F -.15(ch)2.5 G(ar *string).15 E F0(\))3.332 E .025 + (Extract a string se)108 132 R .025(gment consisting of the)-.15 F F1 + <8c72>2.526 E(st)-.1 E F0(through)2.526 E F1(last)2.526 E F0(ar)2.526 E + .026(guments present in)-.18 F F1(string)2.526 E F0 5.026(.A)C -.18(rg) + -5.026 G .026(uments are split).18 F(using)108 144 Q F2(history_tok)2.5 + E(enize\(\))-.1 E F0(.)A F2(History V)87 172.8 Q(ariables)-.92 E F0 + (This section describes the e)108 184.8 Q(xternally-visible v)-.15 E + (ariables e)-.25 E(xported by the GNU History Library)-.15 E(.)-.65 E F1 + (int)108 208.8 Q F2(history_base)2.5 E F0(The logical of)108 220.8 Q + (fset of the \214rst entry in the history list.)-.25 E F1(int)108 244.8 + Q F2(history_length)2.5 E F0 + (The number of entries currently stored in the history list.)108 256.8 Q + F1(int)108 280.8 Q F2(history_max_entries)2.5 E F0 + (The maximum number of history entries.)108 292.8 Q + (This must be changed using)5 E F2(sti\215e_history\(\))2.5 E F0(.)A F1 + -.15(ch)108 316.8 S(ar).15 E F2(history_expansion_char)2.5 E F0 + (The character that introduces a history e)108 328.8 Q -.15(ve)-.25 G + 2.5(nt. The).15 F(def)2.5 E(ault is)-.1 E F2(!)2.5 E F0 5(.S)C + (etting this to 0 inhibits history e)-5 E(xpansion.)-.15 E F1 -.15(ch) + 108 352.8 S(ar).15 E F2(history_subst_char)2.5 E F0 + (The character that in)108 364.8 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(sw).1 G + (ord substitution if found at the start of a line.)-2.6 E(The def)5 E + (ault is)-.1 E F2(^)2.5 E F0(.)A F1 -.15(ch)108 388.8 S(ar).15 E F2 + (history_comment_char)2.5 E F0 .117(During tok)108 400.8 R .117 + (enization, if this character is seen as the \214rst character of a w) + -.1 F .117(ord, then it and all subsequent char)-.1 F(-)-.2 E .276 + (acters up to a ne)108 412.8 R .276 + (wline are ignored, suppressing history e)-.25 F .276 + (xpansion for the remainder of the line.)-.15 F .277(This is dis-)5.276 + F(abled by def)108 424.8 Q(ault.)-.1 E F1 -.15(ch)108 448.8 S(ar *).15 E + F2(history_w)2.5 E(ord_delimiters)-.1 E F0 + (The characters that separate tok)108 460.8 Q(ens for)-.1 E F2 + (history_tok)2.5 E(enize\(\))-.1 E F0 5(.T)C(he def)-5 E(ault v)-.1 E + (alue is)-.25 E F2 2.5("\\)2.5 G(t\\n\(\)<>;&|")-2.5 E F0(.)A F1 -.15 + (ch)108 484.8 S(ar *).15 E F2(history_no_expand_chars)2.5 E F0 2.054 + (The list of characters which inhibit history e)108 496.8 R 2.054 + (xpansion if found immediately follo)-.15 F(wing)-.25 E F2 + (history_expan-)4.554 E(sion_char)108 508.8 Q F0 5(.T)C(he def)-5 E + (ault is space, tab, ne)-.1 E(wline,)-.25 E F2(\\r)2.5 E F0 2.5(,a)C(nd) + -2.5 E F2(=)2.5 E F0(.)A F1 -.15(ch)108 532.8 S(ar *).15 E F2 + (history_sear)2.5 E(ch_delimiter_chars)-.18 E F0 .401(The list of addit\ + ional characters which can delimit a history search string, in addition\ + to space, tab,)108 544.8 R F1(:)2.901 E F0(and)2.901 E F1(?)2.902 E F0 + (in the case of a substring search.)108 556.8 Q(The def)5 E + (ault is empty)-.1 E(.)-.65 E F1(int)108 580.8 Q F2 + (history_quotes_inhibit_expansion)2.5 E F0 .625 + (If non-zero, single-quoted w)108 592.8 R .625 + (ords are not scanned for the history e)-.1 F .624(xpansion character) + -.15 F 5.624(.T)-.55 G .624(he def)-5.624 F .624(ault v)-.1 F .624 + (alue is)-.25 F(0.)108 604.8 Q F1(rl_lineb)108 628.8 Q(uf_func_t *)-.2 E + F2(history_inhibit_expansion_function)2.5 E F0 .347 + (This should be set to the address of a function that tak)108 640.8 R + .348(es tw)-.1 F 2.848(oa)-.1 G -.18(rg)-2.848 G .348(uments: a).18 F F2 + .348(char *)2.848 F F0(\()2.848 E F1(string)A F0 2.848(\)a)C .348(nd an) + -2.848 F F2(int)2.848 E F0(inde)2.848 E(x)-.15 E .228 + (into that string \()108 652.8 R F1(i)A F0 2.728(\). It)B .227 + (should return a non-zero v)2.727 F .227(alue if the history e)-.25 F + .227(xpansion starting at)-.15 F F1(string[i])2.727 E F0 .227 + (should not)2.727 F .019(be performed; zero if the e)108 664.8 R .019 + (xpansion should be done.)-.15 F .019 + (It is intended for use by applications lik)5.019 F(e)-.1 E F2(bash) + 2.519 E F0 .019(that use)2.519 F(the history e)108 676.8 Q + (xpansion character for additional purposes.)-.15 E(By def)5 E + (ault, this v)-.1 E(ariable is set to)-.25 E F2(NULL)2.5 E F0(.)A/F3 + 10.95/Times-Bold@0 SF(FILES)72 693.6 Q F1(~/.history)109.666 705.6 Q F0 + (Def)144 717.6 Q(ault \214lename for reading and writing sa)-.1 E -.15 + (ve)-.2 G 2.5(dh).15 G(istory)-2.5 E(GNU History 4.2)72 768 Q + (2001 Mar 6)141.51 E(6)205.67 E EP + %%Page: 7 7 + %%BeginPageSetup + BP + %%EndPageSetup + /F0 10/Times-Roman@0 SF(HIST)72 48 Q(OR)-.18 E 357.18(Y\(3\) HIST)-.65 F + (OR)-.18 E(Y\(3\))-.65 E/F1 10.95/Times-Bold@0 SF(SEE ALSO)72 84 Q/F2 10 + /Times-Italic@0 SF(The Gnu Readline Libr)108 96 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 108 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 120 Q F0(\(1\))A F2 -.37(re)108 132 S(adline).37 E + F0(\(3\))A F1 -.548(AU)72 148.8 S(THORS).548 E F0(Brian F)108 160.8 Q + (ox, Free Softw)-.15 E(are F)-.1 E(oundation)-.15 E(bfox@gnu.or)108 + 172.8 Q(g)-.18 E(Chet Rame)108 189.6 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 201.6 Q(U.Edu)-.4 E F1 -.11(BU)72 218.4 S 2.738(GR).11 + G(EPOR)-2.738 E(TS)-.438 E F0 .16(If you \214nd a b)108 230.4 R .16 + (ug in the)-.2 F/F3 10/Times-Bold@0 SF(history)2.66 E F0(library)2.66 E + 2.66(,y)-.65 G .16(ou should report it.)-2.66 F .16 + (But \214rst, you should mak)5.16 F 2.66(es)-.1 G .16 + (ure that it really is)-2.66 F 2.5(ab)108 242.4 S + (ug, and that it appears in the latest v)-2.7 E(ersion of the)-.15 E F3 + (history)2.5 E F0(library that you ha)2.5 E -.15(ve)-.2 G(.).15 E .704 + (Once you ha)108 259.2 R 1.004 -.15(ve d)-.2 H .704(etermined that a b) + .15 F .704(ug actually e)-.2 F .704(xists, mail a b)-.15 F .705 + (ug report to)-.2 F F2 -.2(bu)3.205 G(g\255r).2 E(eadline)-.37 E F0(@)A + F2(gnu.or)A(g)-.37 E F0 5.705(.I)C 3.205(fy)-5.705 G(ou)-3.205 E(ha)108 + 271.2 Q 1.81 -.15(ve a \214)-.2 H 1.51 + (x, you are welcome to mail that as well!).15 F 1.509 + (Suggestions and `philosophical' b)6.509 F 1.509(ug reports may be)-.2 F + (mailed to)108 283.2 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 300 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 History 4.2)72 768 Q(2001 Mar 6)141.51 E(7)205.67 E EP + %%Trailer + end + %%EOF diff -Nrc2 readline-4.1/doc/hstech.texinfo readline-4.2/doc/hstech.texinfo *** readline-4.1/doc/hstech.texinfo Tue Sep 21 10:43:27 1999 --- readline-4.2/doc/hstech.texinfo Mon Mar 12 05:37:38 2001 *************** *** 2,6 **** This file documents the user interface to the GNU History library. ! Copyright (C) 1988, 1991, 1994, 1996 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. --- 2,6 ---- This file documents the user interface to the GNU History library. ! Copyright (C) 1988-2001 Free Software Foundation, Inc. Authored by Brian Fox and Chet Ramey. *************** *** 28,34 **** This chapter describes how to interface programs that you write ! with the GNU History Library. It should be considered a technical guide. ! For information on the interactive use of GNU History, @pxref{Using History Interactively}. --- 28,34 ---- This chapter describes how to interface programs that you write ! with the @sc{gnu} History Library. It should be considered a technical guide. ! For information on the interactive use of @sc{gnu} History, @pxref{Using History Interactively}. *************** *** 44,51 **** @section Introduction to History ! Many programs read input from the user a line at a time. The GNU History ! library is able to keep track of those lines, associate arbitrary data with ! each line, and utilize information from previous lines in composing new ! ones. The programmer using the History library has available functions --- 44,51 ---- @section Introduction to History ! Many programs read input from the user a line at a time. The @sc{gnu} ! History library is able to keep track of those lines, associate arbitrary ! data with each line, and utilize information from previous lines in ! composing new ones. The programmer using the History library has available functions *************** *** 81,87 **** @example typedef struct _hist_entry @{ char *line; ! char *data; @} HIST_ENTRY; @end example --- 81,89 ---- @example + typedef void *histdata_t; + typedef struct _hist_entry @{ char *line; ! histdata_t data; @} HIST_ENTRY; @end example *************** *** 96,105 **** @example ! /* A structure used to pass the current state of the history stuff around. */ typedef struct _hist_state @{ ! HIST_ENTRY **entries; /* Pointer to the entries themselves. */ ! int offset; /* The location pointer within this array. */ ! int length; /* Number of elements within this array. */ ! int size; /* Number of slots allocated to this array. */ int flags; @} HISTORY_STATE; --- 98,109 ---- @example ! /* ! * A structure used to pass around the current state of the history. ! */ typedef struct _hist_state @{ ! HIST_ENTRY **entries; /* Pointer to the entries themselves. */ ! int offset; /* The location pointer within this array. */ ! int length; /* Number of elements within this array. */ ! int size; /* Number of slots allocated to this array. */ int flags; @} HISTORY_STATE; *************** *** 113,117 **** This section describes the calling sequence for the various functions ! present in GNU History. @menu --- 117,121 ---- This section describes the calling sequence for the various functions ! exported by the @sc{gnu} History library. @menu *************** *** 140,149 **** functions in your program. ! @deftypefun void using_history () Begin a session in which the history functions might be used. This initializes the interactive variables. @end deftypefun ! @deftypefun {HISTORY_STATE *} history_get_history_state () Return a structure describing the current state of the input history. @end deftypefun --- 144,153 ---- functions in your program. ! @deftypefun void using_history (void) Begin a session in which the history functions might be used. This initializes the interactive variables. @end deftypefun ! @deftypefun {HISTORY_STATE *} history_get_history_state (void) Return a structure describing the current state of the input history. @end deftypefun *************** *** 159,163 **** parameters managing the list itself. ! @deftypefun void add_history (char *string) Place @var{string} at the end of the history list. The associated data field (if any) is set to @code{NULL}. --- 163,167 ---- parameters managing the list itself. ! @deftypefun void add_history (const char *string) Place @var{string} at the end of the history list. The associated data field (if any) is set to @code{NULL}. *************** *** 170,174 **** @end deftypefun ! @deftypefun {HIST_ENTRY *} replace_history_entry (int which, char *line, char *data) Make the history entry at offset @var{which} have @var{line} and @var{data}. This returns the old entry so you can dispose of the data. In the case --- 174,178 ---- @end deftypefun ! @deftypefun {HIST_ENTRY *} replace_history_entry (int which, const char *line, histdata_t data) Make the history entry at offset @var{which} have @var{line} and @var{data}. This returns the old entry so you can dispose of the data. In the case *************** *** 176,180 **** @end deftypefun ! @deftypefun void clear_history () Clear the history list by deleting all the entries. @end deftypefun --- 180,184 ---- @end deftypefun ! @deftypefun void clear_history (void) Clear the history list by deleting all the entries. @end deftypefun *************** *** 184,188 **** @end deftypefun ! @deftypefun int unstifle_history () Stop stifling the history. This returns the previous amount the history was stifled. The value is positive if the history was --- 188,192 ---- @end deftypefun ! @deftypefun 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 *************** *** 190,194 **** @end deftypefun ! @deftypefun int history_is_stifled () Returns non-zero if the history is stifled, zero if it is not. @end deftypefun --- 194,198 ---- @end deftypefun ! @deftypefun int history_is_stifled (void) Returns non-zero if the history is stifled, zero if it is not. @end deftypefun *************** *** 200,216 **** individual list entries. ! @deftypefun {HIST_ENTRY **} history_list () ! Return a @code{NULL} terminated array of @code{HIST_ENTRY} which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return @code{NULL}. @end deftypefun ! @deftypefun int where_history () Returns the offset of the current history element. @end deftypefun ! @deftypefun {HIST_ENTRY *} current_history () Return the history entry at the current position, as determined by ! @code{where_history ()}. If there is no entry there, return a @code{NULL} pointer. @end deftypefun --- 204,220 ---- individual list entries. ! @deftypefun {HIST_ENTRY **} history_list (void) ! Return a @code{NULL} terminated array of @code{HIST_ENTRY *} which is the current input history. Element 0 of this list is the beginning of time. If there is no history, return @code{NULL}. @end deftypefun ! @deftypefun int where_history (void) Returns the offset of the current history element. @end deftypefun ! @deftypefun {HIST_ENTRY *} current_history (void) Return the history entry at the current position, as determined by ! @code{where_history()}. If there is no entry there, return a @code{NULL} pointer. @end deftypefun *************** *** 218,226 **** @deftypefun {HIST_ENTRY *} history_get (int offset) Return the history entry at position @var{offset}, starting from ! @code{history_base}. If there is no entry there, or if @var{offset} is greater than the history length, return a @code{NULL} pointer. @end deftypefun ! @deftypefun int history_total_bytes () 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 --- 222,231 ---- @deftypefun {HIST_ENTRY *} history_get (int offset) Return the history entry at position @var{offset}, starting from ! @code{history_base} (@pxref{History Variables}). ! If there is no entry there, or if @var{offset} is greater than the history length, return a @code{NULL} pointer. @end deftypefun ! @deftypefun int history_total_bytes (void) Return the number of bytes that the primary history entries are using. This function returns the sum of the lengths of all the lines in the *************** *** 235,243 **** @deftypefun int history_set_pos (int pos) ! Set the position in the history list to @var{pos}, an absolute index into the list. @end deftypefun ! @deftypefun {HIST_ENTRY *} previous_history () Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return --- 240,250 ---- @deftypefun int history_set_pos (int pos) ! Set the current history offset to @var{pos}, an absolute index into the list. + Returns 1 on success, 0 if @var{pos} is less than zero or greater + than the number of history entries. @end deftypefun ! @deftypefun {HIST_ENTRY *} previous_history (void) Back up the current history offset to the previous history entry, and return a pointer to that entry. If there is no previous entry, return *************** *** 245,249 **** @end deftypefun ! @deftypefun {HIST_ENTRY *} next_history () Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next entry, return --- 252,256 ---- @end deftypefun ! @deftypefun {HIST_ENTRY *} next_history (void) Move the current history offset forward to the next history entry, and return the a pointer to that entry. If there is no next entry, return *************** *** 261,268 **** @cindex anchored search ! @deftypefun int history_search (char *string, int direction) ! Search the history for @var{string}, starting at the current history ! offset. If @var{direction} < 0, then the search is through previous entries, ! else through subsequent. If @var{string} 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 --- 268,276 ---- @cindex anchored search ! @deftypefun int history_search (const char *string, int direction) ! Search the history for @var{string}, starting at the current history offset. ! If @var{direction} is less than 0, then the search is through ! previous entries, otherwise through subsequent entries. ! If @var{string} 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 *************** *** 271,284 **** @end deftypefun ! @deftypefun int history_search_prefix (char *string, int direction) Search the history for @var{string}, starting at the current history offset. The search is anchored: matching lines must begin with ! @var{string}. If @var{direction} < 0, then the search is through previous ! entries, else through subsequent. If @var{string} 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. @end deftypefun ! @deftypefun int history_search_pos (char *string, int direction, int pos) Search for @var{string} in the history list, starting at @var{pos}, an absolute index into the list. If @var{direction} is negative, the search --- 279,293 ---- @end deftypefun ! @deftypefun int history_search_prefix (const char *string, int direction) Search the history for @var{string}, starting at the current history offset. The search is anchored: matching lines must begin with ! @var{string}. If @var{direction} is less than 0, then the search is ! through previous entries, otherwise through subsequent entries. ! If @var{string} 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. @end deftypefun ! @deftypefun int history_search_pos (const char *string, int direction, int pos) Search for @var{string} in the history list, starting at @var{pos}, an absolute index into the list. If @var{direction} is negative, the search *************** *** 293,306 **** This section documents the functions for managing a history file. ! @deftypefun int read_history (char *filename) ! Add the contents of @var{filename} to the history list, a line at a ! time. If @var{filename} is @code{NULL}, then read from ! @file{~/.history}. Returns 0 if successful, or errno if not. @end deftypefun ! @deftypefun int read_history_range (char *filename, int from, int to) Read a range of lines from @var{filename}, adding them to the history list. ! Start reading at line @var{from} and end at @var{to}. If ! @var{from} is zero, start at the beginning. If @var{to} is less than @var{from}, then read until the end of the file. If @var{filename} is @code{NULL}, then read from @file{~/.history}. Returns 0 if successful, --- 302,315 ---- This section documents the functions for managing a history file. ! @deftypefun int read_history (const char *filename) ! Add the contents of @var{filename} to the history list, a line at a time. ! If @var{filename} is @code{NULL}, then read from @file{~/.history}. ! Returns 0 if successful, or @code{errno} if not. @end deftypefun ! @deftypefun int read_history_range (const char *filename, int from, int to) Read a range of lines from @var{filename}, adding them to the history list. ! Start reading at line @var{from} and end at @var{to}. ! If @var{from} is zero, start at the beginning. If @var{to} is less than @var{from}, then read until the end of the file. If @var{filename} is @code{NULL}, then read from @file{~/.history}. Returns 0 if successful, *************** *** 308,325 **** @end deftypefun ! @deftypefun int write_history (char *filename) Write the current history to @var{filename}, overwriting @var{filename} ! if necessary. If @var{filename} is ! @code{NULL}, then write the history list to @file{~/.history}. Values ! returned are as in @code{read_history ()}. @end deftypefun ! @deftypefun int append_history (int nelements, char *filename) Append the last @var{nelements} of the history list to @var{filename}. @end deftypefun ! @deftypefun int history_truncate_file (char *filename, int nlines) Truncate the history file @var{filename}, leaving only the last @var{nlines} lines. @end deftypefun --- 317,339 ---- @end deftypefun ! @deftypefun int write_history (const char *filename) Write the current history to @var{filename}, overwriting @var{filename} ! if necessary. ! If @var{filename} is @code{NULL}, then write the history list to ! @file{~/.history}. ! Returns 0 on success, or @code{errno} on a read or write error. @end deftypefun ! @deftypefun int append_history (int nelements, const char *filename) Append the last @var{nelements} of the history list to @var{filename}. + If @var{filename} is @code{NULL}, then append to @file{~/.history}. + Returns 0 on success, or @code{errno} on a read or write error. @end deftypefun ! @deftypefun int history_truncate_file (const char *filename, int nlines) Truncate the history file @var{filename}, leaving only the last @var{nlines} lines. + If @var{filename} is @code{NULL}, then @file{~/.history} is truncated. + Returns 0 on success, or @code{errno} on failure. @end deftypefun *************** *** 327,331 **** @subsection History Expansion ! These functions implement @code{csh}-like history expansion. @deftypefun int history_expand (char *string, char **output) --- 341,345 ---- @subsection History Expansion ! These functions implement history expansion. @deftypefun int history_expand (char *string, char **output) *************** *** 335,339 **** @item 0 If no expansions took place (or, if the only change in ! the text was the de-slashifying of the history expansion character); @item 1 --- 349,353 ---- @item 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); @item 1 *************** *** 350,359 **** @end deftypefun ! @deftypefun {char *} history_arg_extract (int first, int last, char *string) ! Extract a string segment consisting of the @var{first} through @var{last} ! arguments present in @var{string}. Arguments are broken up as in Bash. ! @end deftypefun ! ! @deftypefun {char *} get_history_event (char *string, int *cindex, int qchar) Returns the text of the history event beginning at @var{string} + @var{*cindex}. @var{*cindex} is modified to point to after the event --- 364,368 ---- @end deftypefun ! @deftypefun {char *} get_history_event (const char *string, int *cindex, int qchar) Returns the text of the history event beginning at @var{string} + @var{*cindex}. @var{*cindex} is modified to point to after the event *************** *** 364,372 **** @end deftypefun ! @deftypefun {char **} history_tokenize (char *string) Return an array of tokens parsed out of @var{string}, much as the ! shell might. The tokens are split on white space and on the ! characters @code{()<>;&|$}, and shell quoting conventions are ! obeyed. @end deftypefun --- 373,387 ---- @end deftypefun ! @deftypefun {char **} history_tokenize (const char *string) Return an array of tokens parsed out of @var{string}, much as the ! shell might. The tokens are split on the characters in the ! @var{history_word_delimiters} variable, ! and shell quoting conventions are obeyed. ! @end deftypefun ! ! @deftypefun {char *} history_arg_extract (int first, int last, const char *string) ! Extract a string segment consisting of the @var{first} through @var{last} ! arguments present in @var{string}. Arguments are split using ! @code{history_tokenize}. @end deftypefun *************** *** 374,379 **** @section History Variables ! This section describes the externally visible variables exported by ! the GNU History Library. @deftypevar int history_base --- 389,394 ---- @section History Variables ! This section describes the externally-visible variables exported by ! the @sc{gnu} History Library. @deftypevar int history_base *************** *** 385,395 **** @end deftypevar ! @deftypevar int max_input_history The maximum number of history entries. This must be changed using ! @code{stifle_history ()}. @end deftypevar @deftypevar char history_expansion_char ! The character that starts a history event. The default is @samp{!}. @end deftypevar --- 400,411 ---- @end deftypevar ! @deftypevar int history_max_entries The maximum number of history entries. This must be changed using ! @code{stifle_history()}. @end deftypevar @deftypevar char history_expansion_char ! The character that introduces a history event. The default is @samp{!}. ! Setting this to 0 inhibits history expansion. @end deftypevar *************** *** 406,418 **** @end deftypevar @deftypevar {char *} history_no_expand_chars The list of characters which inhibit history expansion if found immediately ! following @var{history_expansion_char}. The default is whitespace and ! @samp{=}. @end deftypevar @deftypevar {char *} history_search_delimiter_chars The list of additional characters which can delimit a history search ! string, in addition to whitespace, @samp{:} and @samp{?} in the case of a substring search. The default is empty. @end deftypevar --- 422,439 ---- @end deftypevar + @deftypevar {char *} history_word_delimiters + The characters that separate tokens for \fBhistory_tokenize()\fP. + The default value is @code{" \t\n()<>;&|"}. + @end deftypevar + @deftypevar {char *} history_no_expand_chars The list of characters which inhibit history expansion if found immediately ! following @var{history_expansion_char}. The default is space, tab, newline, ! carriage return, and @samp{=}. @end deftypevar @deftypevar {char *} history_search_delimiter_chars The list of additional characters which can delimit a history search ! string, in addition to space, TAB, @samp{:} and @samp{?} in the case of a substring search. The default is empty. @end deftypevar *************** *** 423,429 **** @end deftypevar ! @deftypevar {Function *} history_inhibit_expansion_function This should be set to the address of a function that takes two arguments: ! a @code{char *} (@var{string}) and an integer index into that string (@var{i}). It should return a non-zero value if the history expansion starting at @var{string[i]} should not be performed; zero if the expansion should --- 444,451 ---- @end deftypevar ! @deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function This should be set to the address of a function that takes two arguments: ! a @code{char *} (@var{string}) ! and an @code{int} index into that string (@var{i}). It should return a non-zero value if the history expansion starting at @var{string[i]} should not be performed; zero if the expansion should *************** *** 431,435 **** It is intended for use by applications like Bash that use the history expansion character for additional purposes. ! By default, this variable is set to NULL. @end deftypevar --- 453,457 ---- It is intended for use by applications like Bash that use the history expansion character for additional purposes. ! By default, this variable is set to @code{NULL}. @end deftypevar *************** *** 437,444 **** @section History Programming Example ! The following program demonstrates simple use of the GNU History Library. @smallexample ! main () @{ char line[1024], *t; --- 459,471 ---- @section History Programming Example ! The following program demonstrates simple use of the @sc{gnu} History Library. @smallexample ! #include ! #include ! ! main (argc, argv) ! int argc; ! char **argv; @{ char line[1024], *t; diff -Nrc2 readline-4.1/doc/hsuser.texinfo readline-4.2/doc/hsuser.texinfo *** readline-4.1/doc/hsuser.texinfo Fri Dec 17 07:01:17 1999 --- readline-4.2/doc/hsuser.texinfo Wed Nov 22 12:42:50 2000 *************** *** 39,45 **** @end ifset @ifclear BashFeatures ! This chapter describes how to use the GNU History Library interactively, from a user's standpoint. It should be considered a user's guide. For ! information on using the GNU History Library in your own programs, @pxref{Programming with GNU History}. @end ifclear --- 39,45 ---- @end ifset @ifclear BashFeatures ! This chapter describes how to use the @sc{gnu} History Library interactively, from a user's standpoint. It should be considered a user's guide. For ! information on using the @sc{gnu} History Library in your own programs, @pxref{Programming with GNU History}. @end ifclear *************** *** 66,76 **** @cindex history list ! When the @samp{-o history} option to the @code{set} builtin is enabled (@pxref{The Set Builtin}), ! the shell provides access to the @var{command history}, the list of commands previously typed. ! The value of the @code{HISTSIZE} shell variable is used as the number of commands to save in a history list. ! The text of the last @code{$HISTSIZE} commands (default 500) is saved. The shell stores each command in the history list prior to --- 66,76 ---- @cindex history list ! When the @option{-o history} option to the @code{set} builtin is enabled (@pxref{The Set Builtin}), ! the shell provides access to the @dfn{command history}, the list of commands previously typed. ! The value of the @env{HISTSIZE} shell variable is used as the number of commands to save in a history list. ! The text of the last @env{$HISTSIZE} commands (default 500) is saved. The shell stores each command in the history list prior to *************** *** 78,99 **** but after history expansion is performed, subject to the values of the shell variables ! @code{HISTIGNORE} and @code{HISTCONTROL}. When the shell starts up, the history is initialized from the ! file named by the @code{HISTFILE} variable (default @file{~/.bash_history}). ! The file named by the value of @code{HISTFILE} is truncated, if necessary, to contain no more than the number of lines specified by ! the value of the @code{HISTFILESIZE} variable. When an interactive shell exits, the last ! @code{$HISTSIZE} lines are copied from the history list to the file ! named by @code{$HISTFILE}. If the @code{histappend} shell option is set (@pxref{Bash Builtins}), the lines are appended to the history file, otherwise the history file is overwritten. ! If @code{HISTFILE} is unset, or if the history file is unwritable, the history is not saved. After saving the history, the history file is truncated ! to contain no more than @code{$HISTFILESIZE} ! lines. If @code{HISTFILESIZE} is not set, no truncation is performed. The builtin command @code{fc} may be used to list or edit and re-execute --- 78,99 ---- but after history expansion is performed, subject to the values of the shell variables ! @env{HISTIGNORE} and @env{HISTCONTROL}. When the shell starts up, the history is initialized from the ! file named by the @env{HISTFILE} variable (default @file{~/.bash_history}). ! The file named by the value of @env{HISTFILE} is truncated, if necessary, to contain no more than the number of lines specified by ! the value of the @env{HISTFILESIZE} variable. When an interactive shell exits, the last ! @env{$HISTSIZE} lines are copied from the history list to the file ! named by @env{$HISTFILE}. If the @code{histappend} shell option is set (@pxref{Bash Builtins}), the lines are appended to the history file, otherwise the history file is overwritten. ! If @env{HISTFILE} is unset, or if the history file is unwritable, the history is not saved. After saving the history, the history file is truncated ! to contain no more than @env{$HISTFILESIZE} ! lines. If @env{HISTFILESIZE} is not set, no truncation is performed. The builtin command @code{fc} may be used to list or edit and re-execute *************** *** 106,110 **** The shell allows control over which commands are saved on the history ! list. The @code{HISTCONTROL} and @code{HISTIGNORE} variables may be set to cause the shell to save only a subset of the commands entered. --- 106,110 ---- The shell allows control over which commands are saved on the history ! list. The @env{HISTCONTROL} and @env{HISTIGNORE} variables may be set to cause the shell to save only a subset of the commands entered. *************** *** 142,154 **** current command number). If @var{last} is not specified it is set to @var{first}. If @var{first} is not specified it is set to the previous ! command for editing and @minus{}16 for listing. If the @samp{-l} flag is ! given, the commands are listed on standard output. The @samp{-n} flag ! suppresses the command numbers when listing. The @samp{-r} flag reverses the order of the listing. Otherwise, the editor given by @var{ename} is invoked on a file containing those commands. If @var{ename} is not given, the value of the following variable expansion is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the ! value of the @code{FCEDIT} variable if set, or the value of the ! @code{EDITOR} variable if that is set, or @code{vi} if neither is set. When editing is complete, the edited commands are echoed and executed. --- 142,154 ---- current command number). If @var{last} is not specified it is set to @var{first}. If @var{first} is not specified it is set to the previous ! command for editing and @minus{}16 for listing. If the @option{-l} flag is ! given, the commands are listed on standard output. The @option{-n} flag ! suppresses the command numbers when listing. The @option{-r} flag reverses the order of the listing. Otherwise, the editor given by @var{ename} is invoked on a file containing those commands. If @var{ename} is not given, the value of the following variable expansion is used: @code{$@{FCEDIT:-$@{EDITOR:-vi@}@}}. This says to use the ! value of the @env{FCEDIT} variable if set, or the value of the ! @env{EDITOR} variable if that is set, or @code{vi} if neither is set. When editing is complete, the edited commands are echoed and executed. *************** *** 171,175 **** With no options, display the history list with line numbers. ! Lines prefixed with with a @samp{*} have been modified. An argument of @var{n} lists only the last @var{n} lines. Options, if supplied, have the following meanings: --- 171,175 ---- With no options, display the history list with line numbers. ! Lines prefixed with a @samp{*} have been modified. An argument of @var{n} lists only the last @var{n} lines. Options, if supplied, have the following meanings: *************** *** 212,219 **** @end table ! When any of the @samp{-w}, @samp{-r}, @samp{-a}, or @samp{-n} options is used, if @var{filename} is given, then it is used as the history file. If not, then ! the value of the @code{HISTFILE} variable is used. @end table --- 212,219 ---- @end table ! When any of the @option{-w}, @option{-r}, @option{-a}, or @option{-n} options is used, if @var{filename} is given, then it is used as the history file. If not, then ! the value of the @env{HISTFILE} variable is used. @end table *************** *** 261,267 **** shell option is enabled, a failed history expansion will be reloaded into the Readline editing buffer for correction. ! The @samp{-p} option to the @code{history} builtin command may be used to see what a history expansion will do before using it. ! The @samp{-s} option to the @code{history} builtin may be used to add commands to the end of the history list without actually executing them, so that they are available for subsequent recall. --- 261,267 ---- shell option is enabled, a failed history expansion will be reloaded into the Readline editing buffer for correction. ! The @option{-p} option to the @code{history} builtin command may be used to see what a history expansion will do before using it. ! The @option{-s} option to the @code{history} builtin may be used to add commands to the end of the history list without actually executing them, so that they are available for subsequent recall. diff -Nrc2 readline-4.1/doc/manvers.texinfo readline-4.2/doc/manvers.texinfo *** readline-4.1/doc/manvers.texinfo Wed Jan 19 12:16:33 2000 --- readline-4.2/doc/manvers.texinfo Mon Apr 16 10:54:00 2001 *************** *** 1,6 **** ! @set EDITION 4.1 ! @set VERSION 4.1 ! @set UPDATED 2000 January 19 ! @set UPDATE-MONTH January 2000 ! @set LASTCHANGE Wed Jan 19 12:16:30 EST 2000 --- 1,6 ---- ! @set EDITION 4.2 ! @set VERSION 4.2 ! @set UPDATED 2001 Apr 16 ! @set UPDATE-MONTH Apr 2001 ! @set LASTCHANGE Mon Apr 16 10:53:58 EDT 2001 diff -Nrc2 readline-4.1/doc/readline.0 readline-4.2/doc/readline.0 *** readline-4.1/doc/readline.0 Fri Aug 6 16:00:41 1999 --- readline-4.2/doc/readline.0 Mon Mar 5 11:20:23 2001 *************** *** 10,30 **** SSYYNNOOPPSSIISS ##iinncclluuddee <> ! ##iinncclluuddee <> ! ##iinncclluuddee <> ! cchhaarr **rreeaaddlliinnee ((pprroommpptt)) ! cchhaarr **pprroommpptt;; CCOOPPYYRRIIGGHHTT ! Readline is Copyright (C) 1989, 1991, 1993, 1995, 1996 by ! the Free Software Foundation, Inc. DDEESSCCRRIIPPTTIIOONN rreeaaddlliinnee will read a line from the terminal and return it, ! using pprroommpptt as a prompt. If pprroommpptt is null, no prompt is ! issued. The line returned is allocated with _m_a_l_l_o_c(3), so ! the caller must free it when finished. The line returned ! has the final newline removed, so only the text of the ! line remains. rreeaaddlliinnee offers editing capabilities while the user is --- 10,30 ---- SSYYNNOOPPSSIISS ##iinncclluuddee <> ! ##iinncclluuddee <> ! ##iinncclluuddee <> ! _c_h_a_r _* ! rreeaaddlliinnee (_c_o_n_s_t _c_h_a_r _*_p_r_o_m_p_t); CCOOPPYYRRIIGGHHTT ! Readline is Copyright (C) 1989-2001 by the Free Software ! Foundation, Inc. DDEESSCCRRIIPPTTIIOONN rreeaaddlliinnee will read a line from the terminal and return it, ! using pprroommpptt as a prompt. If pprroommpptt is NNUULLLL or the empty ! string, no prompt is issued. The line returned is allo- ! cated with _m_a_l_l_o_c(3); the caller must free it when fin- ! ished. The line returned has the final newline removed, ! so only the text of the line remains. rreeaaddlliinnee offers editing capabilities while the user is *************** *** 33,66 **** interface is also available. RREETTUURRNN VVAALLUUEE ! rreeaaddlliinnee returns the text of the line read. A blank line ! returns the empty string. If EEOOFF is encountered while ! reading a line, and the line is empty, NNUULLLL is returned. ! If an EEOOFF is read with a non-empty line, it is treated as a newline. NNOOTTAATTIIOONN ! An emacs-style notation is used to denote keystrokes. ! Control keys are denoted by C-_k_e_y, e.g., C-n means Con- trol-N. Similarly, _m_e_t_a keys are denoted by M-_k_e_y, so M-x means Meta-X. (On keyboards without a _m_e_t_a key, M-_x means ! ESC _x, i.e., press the Escape key then the _x key. This ! makes ESC the _m_e_t_a _p_r_e_f_i_x. The combination M-C-_x means ! ESC-Control-_x, or press the Escape key then hold the Con- trol key while pressing the _x key.) ! Readline commands may be given numeric _a_r_g_u_m_e_n_t_s, which normally act as a repeat count. Sometimes, however, it is ! the sign of the argument that is significant. Passing a ! negative argument to a command that acts in the forward ! direction (e.g., kkiillll--lliinnee) causes that command to act in ! a backward direction. Commands whose behavior with argu- ! ments deviates from this are noted. ! ! When a command is described as _k_i_l_l_i_n_g text, the text ! GNU 1999 Jun 1 1 --- 33,66 ---- interface is also available. + This manual page describes only the most basic use of + rreeaaddlliinnee. Much more functionality is available; see _T_h_e + _G_N_U _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y and _T_h_e _G_N_U _H_i_s_t_o_r_y _L_i_b_r_a_r_y for addi- + tional information. + RREETTUURRNN VVAALLUUEE ! rreeaaddlliinnee returns the text of the line read. A blank line ! returns the empty string. If EEOOFF is encountered while ! reading a line, and the line is empty, NNUULLLL is returned. ! If an EEOOFF is read with a non-empty line, it is treated as a newline. NNOOTTAATTIIOONN ! An emacs-style notation is used to denote keystrokes. ! Control keys are denoted by C-_k_e_y, e.g., C-n means Con- trol-N. Similarly, _m_e_t_a keys are denoted by M-_k_e_y, so M-x means Meta-X. (On keyboards without a _m_e_t_a key, M-_x means ! ESC _x, i.e., press the Escape key then the _x key. This ! makes ESC the _m_e_t_a _p_r_e_f_i_x. The combination M-C-_x means ! ESC-Control-_x, or press the Escape key then hold the Con- trol key while pressing the _x key.) ! Readline commands may be given numeric _a_r_g_u_m_e_n_t_s, which normally act as a repeat count. Sometimes, however, it is ! the sign of the argument that is significant. Passing a ! negative argument to a command that acts in the forward ! GNU Readline 4.2 2001 Mar 5 1 *************** *** 71,92 **** ! deleted is saved for possible future retrieval (_y_a_n_k_i_n_g). ! The killed text is saved in a _k_i_l_l _r_i_n_g. Consecutive ! kills cause the text to be accumulated into one unit, ! which can be yanked all at once. Commands which do not kill text separate the chunks of text on the kill ring. IINNIITTIIAALLIIZZAATTIIOONN FFIILLEE ! Readline is customized by putting commands in an initial- ization file (the _i_n_p_u_t_r_c file). The name of this file is ! taken from the value of the IINNPPUUTTRRCC environment variable. ! If that variable is unset, the default is _~_/_._i_n_p_u_t_r_c. ! When a program which uses the readline library starts up, ! the init file is read, and the key bindings and variables are set. There are only a few basic constructs allowed in ! the readline init file. Blank lines are ignored. Lines beginning with a ## are comments. Lines beginning with a $$ ! indicate conditional constructs. Other lines denote key ! bindings and variable settings. Each program using this library may add its own commands and bindings. --- 71,97 ---- ! direction (e.g., kkiillll--lliinnee) causes that command to act in ! a backward direction. Commands whose behavior with argu- ! ments deviates from this are noted. ! ! When a command is described as _k_i_l_l_i_n_g text, the text ! deleted is saved for possible future retrieval (_y_a_n_k_i_n_g). ! The killed text is saved in a _k_i_l_l _r_i_n_g. Consecutive ! kills cause the text to be accumulated into one unit, ! which can be yanked all at once. Commands which do not kill text separate the chunks of text on the kill ring. IINNIITTIIAALLIIZZAATTIIOONN FFIILLEE ! Readline is customized by putting commands in an initial- ization file (the _i_n_p_u_t_r_c file). The name of this file is ! taken from the value of the IINNPPUUTTRRCC environment variable. ! If that variable is unset, the default is _~_/_._i_n_p_u_t_r_c. ! When a program which uses the readline library starts up, ! the init file is read, and the key bindings and variables are set. There are only a few basic constructs allowed in ! the readline init file. Blank lines are ignored. Lines beginning with a ## are comments. Lines beginning with a $$ ! indicate conditional constructs. Other lines denote key ! bindings and variable settings. Each program using this library may add its own commands and bindings. *************** *** 96,107 **** or C-Meta-u: universal-argument ! into the _i_n_p_u_t_r_c would make M-C-u execute the readline command _u_n_i_v_e_r_s_a_l_-_a_r_g_u_m_e_n_t. ! The following symbolic character names are recognized ! while processing key bindings: _R_U_B_O_U_T, _D_E_L, _E_S_C, _L_F_D, _N_E_W_- ! _L_I_N_E, _R_E_T, _R_E_T_U_R_N, _S_P_C, _S_P_A_C_E, and _T_A_B. ! In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a _m_a_c_r_o). --- 101,113 ---- or C-Meta-u: universal-argument ! ! into the _i_n_p_u_t_r_c would make M-C-u execute the readline command _u_n_i_v_e_r_s_a_l_-_a_r_g_u_m_e_n_t. ! The following symbolic character names are recognized ! while processing key bindings: _D_E_L, _E_S_C, _E_S_C_A_P_E, _L_F_D, _N_E_W_- ! _L_I_N_E, _R_E_T, _R_E_T_U_R_N, _R_U_B_O_U_T, _S_P_A_C_E, _S_P_C, and _T_A_B. ! In addition to command names, readline allows keys to be bound to a string that is inserted when the key is pressed (a _m_a_c_r_o). *************** *** 109,132 **** KKeeyy BBiinnddiinnggss ! The syntax for controlling key bindings in the _i_n_p_u_t_r_c ! file is simple. All that is required is the name of the command or the text of a macro and a key sequence to which ! it should be bound. The name may be specified in one of ! two ways: as a symbolic key name, possibly with _M_e_t_a_- or ! _C_o_n_t_r_o_l_- prefixes, or as a key sequence. When using the ! form kkeeyynnaammee:_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, _k_e_y_n_a_m_e is the name ! of a key spelled out in English. For example: ! Control-u: universal-argument ! Meta-Rubout: backward-kill-word ! Control-o: ">&output" - In the above example, _C_-_u is bound to the function uunniivveerr-- - ssaall--aarrgguummeenntt, _M_-_D_E_L is bound to the function bbaacckk-- - wwaarrdd--kkiillll--wwoorrdd, and _C_-_o is bound to run the macro ! ! GNU 1999 Jun 1 2 --- 115,132 ---- KKeeyy BBiinnddiinnggss ! The syntax for controlling key bindings in the _i_n_p_u_t_r_c ! file is simple. All that is required is the name of the command or the text of a macro and a key sequence to which ! it should be bound. The name may be specified in one of ! two ways: as a symbolic key name, possibly with _M_e_t_a_- or ! _C_o_n_t_r_o_l_- prefixes, or as a key sequence. ! When using the form kkeeyynnaammee:_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, _k_e_y_- ! _n_a_m_e is the name of a key spelled out in English. For ! example: ! GNU Readline 4.2 2001 Mar 5 2 *************** *** 137,148 **** ! expressed on the right hand side (that is, to insert the ! text _>_&_o_u_t_p_u_t into the line). ! In the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, kkeeyy-- sseeqq differs from kkeeyynnaammee above in that strings denoting an ! entire key sequence may be specified by placing the ! sequence within double quotes. Some GNU Emacs style key ! escapes can be used, as in the following example. "\C-u": universal-argument --- 137,156 ---- ! Control-u: universal-argument ! Meta-Rubout: backward-kill-word ! Control-o: "> output" ! ! In the above example, _C_-_u is bound to the function uunniivveerr-- ! ssaall--aarrgguummeenntt, _M_-_D_E_L is bound to the function bbaacckk-- ! wwaarrdd--kkiillll--wwoorrdd, and _C_-_o is bound to run the macro ! expressed on the right hand side (that is, to insert the ! text ``> output'' into the line). ! In the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, kkeeyy-- sseeqq differs from kkeeyynnaammee above in that strings denoting an ! entire key sequence may be specified by placing the ! sequence within double quotes. Some GNU Emacs style key ! escapes can be used, as in the following example, but the ! symbolic character names are not recognized. "\C-u": universal-argument *************** *** 153,164 **** vveerrssaall--aarrgguummeenntt. _C_-_x _C_-_r is bound to the function rree--rreeaadd--iinniitt--ffiillee, and _E_S_C _[ _1 _1 _~ is bound to insert the ! text FFuunnccttiioonn KKeeyy 11. The full set of GNU Emacs style ! escape sequences is \\CC-- control prefix \\MM-- meta prefix \\ee an escape character \\\\ backslash ! \\"" literal " ! \\'' literal ' In addition to the GNU Emacs style escape sequences, a --- 161,174 ---- vveerrssaall--aarrgguummeenntt. _C_-_x _C_-_r is bound to the function rree--rreeaadd--iinniitt--ffiillee, and _E_S_C _[ _1 _1 _~ is bound to insert the ! text ``Function Key 1''. ! ! The full set of GNU Emacs style escape sequences available ! when specifying key sequences is \\CC-- control prefix \\MM-- meta prefix \\ee an escape character \\\\ backslash ! \\"" literal ", a double quote ! \\'' literal ', a single quote In addition to the GNU Emacs style escape sequences, a *************** *** 180,198 **** should be used to indicate a macro definition. Unquoted text is assumed to be a function name. In the macro body, ! the backslash escapes described above are expanded. Back- ! slash will quote any other character in the macro text, ! including " and '. - BBaasshh allows the current readline key bindings to be dis- - played or modified with the bbiinndd builtin command. The - editing mode may be switched during interactive use by - using the --oo option to the sseett builtin command. Other - programs using this library provide similar mechanisms. - The _i_n_p_u_t_r_c file may be edited and re-read if a program - does not provide any other means to incorporate new ! ! GNU 1999 Jun 1 3 --- 190,198 ---- should be used to indicate a macro definition. Unquoted text is assumed to be a function name. In the macro body, ! the backslash escapes described above are expanded. ! GNU Readline 4.2 2001 Mar 5 3 *************** *** 203,207 **** ! bindings. VVaarriiaabblleess --- 203,217 ---- ! Backslash will quote any other character in the macro ! text, including " and '. ! ! BBaasshh allows the current readline key bindings to be dis- ! played or modified with the bbiinndd builtin command. The ! editing mode may be switched during interactive use by ! using the --oo option to the sseett builtin command. Other ! programs using this library provide similar mechanisms. ! The _i_n_p_u_t_r_c file may be edited and re-read if a program ! does not provide any other means to incorporate new bind- ! ings. VVaarriiaabblleess *************** *** 213,264 **** Except where noted, readline variables can take the values ! OOnn or OOffff. The variables and their default values are: bbeellll--ssttyyllee ((aauuddiibbllee)) ! Controls what happens when readline wants to ring ! the terminal bell. If set to nnoonnee, readline never rings the bell. If set to vviissiibbllee, readline uses a ! visible bell if one is available. If set to aauuddii-- bbllee, readline attempts to ring the terminal's bell. ccoommmmeenntt--bbeeggiinn ((````##'''')) ! The string that is inserted in vvii mode when the ! iinnsseerrtt--ccoommmmeenntt command is executed. This command ! is bound to MM--## in emacs mode and to ## in vi com- mand mode. ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff)) ! If set to OOnn, readline performs filename matching and completion in a case-insensitive fashion. ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000)) ! This determines when the user is queried about ! viewing the number of possible completions gener- ! ated by the ppoossssiibbllee--ccoommpplleettiioonnss command. It may ! be set to any integer value greater than or equal ! to zero. If the number of possible completions is ! greater than or equal to the value of this vari- able, the user is asked whether or not he wishes to ! view them; otherwise they are simply listed on the terminal. ccoonnvveerrtt--mmeettaa ((OOnn)) If set to OOnn, readline will convert characters with ! the eighth bit set to an ASCII key sequence by ! stripping the eighth bit and prepending an escape ! character (in effect, using escape as the _m_e_t_a _p_r_e_- ! _f_i_x). ! ddiissaabbllee--ccoommpplleettiioonn ((OOffff)) ! If set to OOnn, readline will inhibit word comple- ! tion. Completion characters will be inserted into ! the line as if they had been mapped to sseellff--iinnsseerrtt. ! eeddiittiinngg--mmooddee ((eemmaaccss)) ! Controls whether readline begins with a set of key ! bindings similar to _e_m_a_c_s or _v_i. eeddiittiinngg--mmooddee can ! be set to either eemmaaccss or vvii. ! eennaabbllee--kkeeyyppaadd ((OOffff)) ! When set to OOnn, readline will try to enable the ! application keypad when it is called. Some systems ! need this to enable the arrow keys. ! GNU 1999 Jun 1 4 --- 223,264 ---- Except where noted, readline variables can take the values ! OOnn or OOffff (without regard to case). The variables and ! their default values are: bbeellll--ssttyyllee ((aauuddiibbllee)) ! Controls what happens when readline wants to ring ! the terminal bell. If set to nnoonnee, readline never rings the bell. If set to vviissiibbllee, readline uses a ! visible bell if one is available. If set to aauuddii-- bbllee, readline attempts to ring the terminal's bell. ccoommmmeenntt--bbeeggiinn ((````##'''')) ! The string that is inserted in vvii mode when the ! iinnsseerrtt--ccoommmmeenntt command is executed. This command ! is bound to MM--## in emacs mode and to ## in vi com- mand mode. ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff)) ! If set to OOnn, readline performs filename matching and completion in a case-insensitive fashion. ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000)) ! This determines when the user is queried about ! viewing the number of possible completions gener- ! ated by the ppoossssiibbllee--ccoommpplleettiioonnss command. It may ! be set to any integer value greater than or equal ! to zero. If the number of possible completions is ! greater than or equal to the value of this vari- able, the user is asked whether or not he wishes to ! view them; otherwise they are simply listed on the terminal. ccoonnvveerrtt--mmeettaa ((OOnn)) If set to OOnn, readline will convert characters with ! the eighth bit set to an ASCII key sequence by ! stripping the eighth bit and prefixing it with an ! escape character (in effect, using escape as the ! _m_e_t_a _p_r_e_f_i_x). ! ! GNU Readline 4.2 2001 Mar 5 4 *************** *** 269,302 **** eexxppaanndd--ttiillddee ((OOffff)) ! If set to oonn, tilde expansion is performed when readline attempts word completion. hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff)) ! When set to OOnn, makes readline use a single line ! for display, scrolling the input horizontally on a ! single screen line when it becomes longer than the screen width rather than wrapping to a new line. iinnppuutt--mmeettaa ((OOffff)) ! If set to OOnn, readline will enable eight-bit input ! (that is, it will not strip the high bit from the characters it reads), regardless of what the termi- nal claims it can support. The name mmeettaa--ffllaagg is a synonym for this variable. ! iisseeaarrcchh--tteerrmmiinnaattoorrss ((````CC--[[CC--JJ'''')) ! The string of characters that should terminate an ! incremental search without subsequently executing ! the character as a command. If this variable has ! not been given a value, the characters _E_S_C and _C_-_J will terminate an incremental search. kkeeyymmaapp ((eemmaaccss)) ! Set the current readline keymap. The set of legal ! keymap names is _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d, and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is equivalent ! to _e_m_a_c_s_-_s_t_a_n_d_a_r_d. The default value is _e_m_a_c_s; the ! value of eeddiittiinngg--mmooddee also affects the default keymap. mmaarrkk--ddiirreeccttoorriieess ((OOnn)) ! If set to OOnn, complete>)) ! Set the mark to the current point. If a numeric ! argument is supplied, the mark is set to that posi- ! tion. ! eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx)) ! Swap the point with the mark. The current cursor ! position is set to the saved position, and the old ! GNU 1999 Jun 1 12 --- 780,792 ---- bbeellll--ssttyyllee). ddoo--uuppppeerrccaassee--vveerrssiioonn ((MM--aa,, MM--bb,, MM--_x,, ......)) ! If the metafied character _x is lowercase, run the ! command that is bound to the corresponding upper- case character. pprreeffiixx--mmeettaa ((EESSCC)) ! Metafy the next character typed. EESSCC ff is ! GNU Readline 4.2 2001 Mar 5 12 *************** *** 797,800 **** --- 797,816 ---- + equivalent to MMeettaa--ff. + uunnddoo ((CC--__,, CC--xx CC--uu)) + Incremental undo, separately remembered for each + line. + rreevveerrtt--lliinnee ((MM--rr)) + Undo all changes made to this line. This is like + executing the uunnddoo command enough times to return + the line to its initial state. + ttiillddee--eexxppaanndd ((MM--&&)) + Perform tilde expansion on the current word. + sseett--mmaarrkk ((CC--@@,, MM--<>)) + Set the mark to the point. If a numeric argument + is supplied, the mark is set to that position. + eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx)) + Swap the point with the mark. The current cursor + position is set to the saved position, and the old cursor position is saved as the mark. cchhaarraacctteerr--sseeaarrcchh ((CC--]])) *************** *** 810,815 **** inserted at the beginning of the current line, and the line is accepted as if a newline had been ! typed. This makes the current line a shell com- ! ment. dduummpp--ffuunnccttiioonnss Print all of the functions and their key bindings --- 826,831 ---- inserted at the beginning of the current line, and the line is accepted as if a newline had been ! typed. The default value of ccoommmmeenntt--bbeeggiinn makes ! the current line a shell comment. dduummpp--ffuunnccttiioonnss Print all of the functions and their key bindings *************** *** 836,858 **** vvii editing mode. - DDEEFFAAUULLTT KKEEYY BBIINNDDIINNGGSS - The following is a list of the default emacs and vi bind- - ings. Characters with the 8th bit set are written as - M-, and are referred to as _m_e_t_a_f_i_e_d characters. - The printable ASCII characters not mentioned in the list - of emacs standard bindings are bound to the _s_e_l_f_-_i_n_s_e_r_t - function, which just inserts the given character into the - input line. In vi insertion mode, all characters not - specifically mentioned are bound to _s_e_l_f_-_i_n_s_e_r_t. Charac- - ters assigned to signal generation by _s_t_t_y(1) or the ter- - minal driver, such as C-Z or C-C, retain that function. - Upper and lower case _m_e_t_a_f_i_e_d characters are bound to the - same function in the emacs mode meta keymap. The remain- - ing characters are unbound, which causes readline to ring - the bell (subject to the setting of the bbeellll--ssttyyllee - ! GNU 1999 Jun 1 13 --- 852,858 ---- vvii editing mode. ! GNU Readline 4.2 2001 Mar 5 13 *************** *** 863,867 **** ! variable). EEmmaaccss MMooddee --- 863,882 ---- ! DDEEFFAAUULLTT KKEEYY BBIINNDDIINNGGSS ! The following is a list of the default emacs and vi bind- ! ings. Characters with the eighth bit set are written as ! M-, and are referred to as _m_e_t_a_f_i_e_d characters. ! The printable ASCII characters not mentioned in the list ! of emacs standard bindings are bound to the sseellff--iinnsseerrtt ! function, which just inserts the given character into the ! input line. In vi insertion mode, all characters not ! specifically mentioned are bound to sseellff--iinnsseerrtt. Charac- ! ters assigned to signal generation by _s_t_t_y(1) or the ter- ! minal driver, such as C-Z or C-C, retain that function. ! Upper and lower case metafied characters are bound to the ! same function in the emacs mode meta keymap. The remain- ! ing characters are unbound, which causes readline to ring ! the bell (subject to the setting of the bbeellll--ssttyyllee vari- ! able). EEmmaaccss MMooddee *************** *** 902,905 **** --- 917,932 ---- "M-C-G" abort "M-C-H" backward-kill-word + + + + GNU Readline 4.2 2001 Mar 5 14 + + + + + + READLINE(3) READLINE(3) + + "M-C-I" tab-insert "M-C-J" vi-editing-mode *************** *** 917,932 **** "M-0" digit-argument "M-1" digit-argument - - - - GNU 1999 Jun 1 14 - - - - - - READLINE(3) READLINE(3) - - "M-2" digit-argument "M-3" digit-argument --- 944,947 ---- *************** *** 954,958 **** "M-\" delete-horizontal-space "M-~" tilde-expand ! "M-C-?" backward-delete-word "M-_" yank-last-arg --- 969,973 ---- "M-\" delete-horizontal-space "M-~" tilde-expand ! "M-C-?" backward-kill-word "M-_" yank-last-arg *************** *** 969,972 **** --- 984,998 ---- + + + GNU Readline 4.2 2001 Mar 5 15 + + + + + + READLINE(3) READLINE(3) + + VVII MMooddee bbiinnddiinnggss VI Insert Mode functions *************** *** 983,998 **** "C-V" quoted-insert "C-W" unix-word-rubout - - - - GNU 1999 Jun 1 15 - - - - - - READLINE(3) READLINE(3) - - "C-Y" yank "C-[" vi-movement-mode --- 1009,1012 ---- *************** *** 1021,1024 **** --- 1035,1039 ---- "C-W" unix-word-rubout "C-Y" yank + "C-_" vi-undo " " forward-char "#" insert-comment *************** *** 1034,1037 **** --- 1049,1064 ---- "0" beginning-of-line "1" to "9" vi-arg-digit + + + + GNU Readline 4.2 2001 Mar 5 16 + + + + + + READLINE(3) READLINE(3) + + ";" vi-char-search "=" vi-complete *************** *** 1049,1064 **** "R" vi-replace "S" vi-subst - - - - GNU 1999 Jun 1 16 - - - - - - READLINE(3) READLINE(3) - - "T" vi-char-search "U" revert-line --- 1076,1079 ---- *************** *** 1087,1091 **** "s" vi-subst "t" vi-char-search ! "u" undo "w" vi-next-word "x" vi-delete --- 1102,1106 ---- "s" vi-subst "t" vi-char-search ! "u" vi-undo "w" vi-next-word "x" vi-delete *************** *** 1099,1102 **** --- 1114,1130 ---- _b_a_s_h(1) + + + + + GNU Readline 4.2 2001 Mar 5 17 + + + + + + READLINE(3) READLINE(3) + + FFIILLEESS _~_/_._i_n_p_u_t_r_c *************** *** 1116,1130 **** library that you have. - - - GNU 1999 Jun 1 17 - - - - - - READLINE(3) READLINE(3) - - 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, --- 1144,1147 ---- *************** *** 1167,1188 **** ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! GNU 1999 Jun 1 18 --- 1184,1188 ---- ! GNU Readline 4.2 2001 Mar 5 18 diff -Nrc2 readline-4.1/doc/readline.3 readline-4.2/doc/readline.3 *** readline-4.1/doc/readline.3 Fri Aug 6 15:43:04 1999 --- readline-4.2/doc/readline.3 Mon Mar 5 11:11:38 2001 *************** *** 7,13 **** .\" chet@ins.CWRU.Edu .\" ! .\" Last Change: Tue Jun 1 13:28:03 EDT 1999 .\" ! .TH READLINE 3 "1999 Jun 1" GNU .\" .\" File Name macro. This used to be `.PN', for Path Name, --- 7,13 ---- .\" chet@ins.CWRU.Edu .\" ! .\" Last Change: Mon Mar 5 09:58:38 EST 2001 .\" ! .TH READLINE 3 "2001 Mar 5" "GNU Readline 4.2" .\" .\" File Name macro. This used to be `.PN', for Path Name, *************** *** 24,41 **** .ft B #include ! #include ! #include .ft .fi .LP .nf ! .ft B ! char *readline (prompt) ! char *prompt; ! .ft .fi .SH COPYRIGHT ! .if n Readline is Copyright (C) 1989, 1991, 1993, 1995, 1996 by the Free Software Foundation, Inc. ! .if t Readline is Copyright \(co 1989, 1991, 1993, 1995, 1996 by the Free Software Foundation, Inc. .SH DESCRIPTION .LP --- 24,40 ---- .ft B #include ! #include ! #include .ft .fi .LP .nf ! \fIchar *\fP ! .br ! \fBreadline\fP (\fIconst char *prompt\fP); .fi .SH COPYRIGHT ! .if n Readline is Copyright (C) 1989\-2001 by the Free Software Foundation, Inc. ! .if t Readline is Copyright \(co 1989\-2001 by the Free Software Foundation, Inc. .SH DESCRIPTION .LP *************** *** 46,52 **** as a prompt. If .B prompt ! is null, no prompt is issued. The line returned is allocated with ! .IR malloc (3), ! so the caller must free it when finished. The line returned has the final newline removed, so only the text of the line remains. --- 45,52 ---- as a prompt. If .B prompt ! is \fBNULL\fP or the empty string, no prompt is issued. ! The line returned is allocated with ! .IR malloc (3); ! the caller must free it when finished. The line returned has the final newline removed, so only the text of the line remains. *************** *** 58,61 **** --- 58,66 ---- are similar to those of emacs. A vi\-style line editing interface is also available. + .LP + This manual page describes only the most basic use of \fBreadline\fP. + Much more functionality is available; see + \fIThe GNU Readline Library\fP and \fIThe GNU History Library\fP + for additional information. .SH RETURN VALUE .LP *************** *** 131,134 **** --- 136,140 ---- C\-Meta\-u: universal\-argument .RE + .sp into the .I inputrc *************** *** 138,150 **** The following symbolic character names are recognized while processing key bindings: - .IR RUBOUT , .IR DEL , .IR ESC , .IR LFD , .IR NEWLINE , .IR RET , .IR RETURN , ! .IR SPC , .IR SPACE , and .IR TAB . --- 144,157 ---- The following symbolic character names are recognized while processing key bindings: .IR DEL , .IR ESC , + .IR ESCAPE , .IR LFD , .IR NEWLINE , .IR RET , .IR RETURN , ! .IR RUBOUT , .IR SPACE , + .IR SPC , and .IR TAB . *************** *** 162,165 **** --- 169,173 ---- as a symbolic key name, possibly with \fIMeta\-\fP or \fIControl\-\fP prefixes, or as a key sequence. + .PP When using the form \fBkeyname\fP:\^\fIfunction-name\fP or \fImacro\fP, .I keyname *************** *** 171,175 **** Meta\-Rubout: backward\-kill\-word .br ! Control\-o: ">&output" .RE .LP --- 179,183 ---- Meta\-Rubout: backward\-kill\-word .br ! Control\-o: "> output" .RE .LP *************** *** 185,189 **** is bound to run the macro expressed on the right hand side (that is, to insert the text ! .I >&output into the line). .PP --- 193,198 ---- is bound to run the macro expressed on the right hand side (that is, to insert the text ! .if t \f(CW> output\fP ! .if n ``> output'' into the line). .PP *************** *** 195,199 **** an entire key sequence may be specified by placing the sequence within double quotes. Some GNU Emacs style key escapes can be ! used, as in the following example. .sp .RS --- 204,209 ---- an entire key sequence may be specified by placing the sequence within double quotes. Some GNU Emacs style key escapes can be ! used, as in the following example, but the symbolic character names ! are not recognized. .sp .RS *************** *** 215,220 **** .I "ESC [ 1 1 ~" is bound to insert the text ! .BR "Function Key 1" . ! The full set of GNU Emacs style escape sequences is .RS .PD 0 --- 225,233 ---- .I "ESC [ 1 1 ~" is bound to insert the text ! .if t \f(CWFunction Key 1\fP. ! .if n ``Function Key 1''. ! .PP ! The full set of GNU Emacs style escape sequences available when specifying ! key sequences is .RS .PD 0 *************** *** 233,240 **** .TP .B \e" ! literal " .TP .B \e' ! literal ' .RE .PD --- 246,253 ---- .TP .B \e" ! literal ", a double quote .TP .B \e' ! literal ', a single quote .RE .PD *************** *** 314,318 **** .B On or ! .BR Off . The variables and their default values are: .PP --- 327,332 ---- .B On or ! .B Off ! (without regard to case). The variables and their default values are: .PP *************** *** 352,356 **** If set to \fBOn\fP, readline will convert characters with the eighth bit set to an ASCII key sequence ! by stripping the eighth bit and prepending an escape character (in effect, using escape as the \fImeta prefix\fP). .TP --- 366,370 ---- If set to \fBOn\fP, readline will convert characters with the eighth bit set to an ASCII key sequence ! by stripping the eighth bit and prefixing it with an escape character (in effect, using escape as the \fImeta prefix\fP). .TP *************** *** 362,366 **** .B editing\-mode (emacs) Controls whether readline begins with a set of key bindings similar ! to \fIemacs\fP or \fIvi\fP. .B editing\-mode can be set to either --- 376,380 ---- .B editing\-mode (emacs) Controls whether readline begins with a set of key bindings similar ! to emacs or vi. .B editing\-mode can be set to either *************** *** 385,394 **** .B input\-meta (Off) If set to \fBOn\fP, readline will enable eight-bit input (that is, ! it will not strip the high bit from the characters it reads), regardless of what the terminal claims it can support. The name .B meta\-flag is a synonym for this variable. .TP ! .B isearch\-terminators (``C\-[C\-J'') The string of characters that should terminate an incremental search without subsequently executing the character as a command. --- 399,408 ---- .B input\-meta (Off) If set to \fBOn\fP, readline will enable eight-bit input (that is, ! it will not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. The name .B meta\-flag is a synonym for this variable. .TP ! .B isearch\-terminators (``C\-[ C\-J'') The string of characters that should terminate an incremental search without subsequently executing the character as a command. *************** *** 403,413 **** \fIvi\fP is equivalent to \fIvi-command\fP; \fIemacs\fP is equivalent to \fIemacs-standard\fP. The default value is ! .IR emacs ; ! the value of .B editing\-mode also affects the default keymap. .TP .B mark\-directories (On) ! If set to \fBOn\fP, complete) ! Set the mark to the current point. If a numeric argument is supplied, the mark is set to that position. .TP --- 901,906 ---- Perform tilde expansion on the current word. .TP ! .B set\-mark (C\-@, M\-) ! Set the mark to the point. If a numeric argument is supplied, the mark is set to that position. .TP *************** *** 895,900 **** .B comment\-begin variable is inserted at the beginning of the current line, and the line ! is accepted as if a newline had been typed. This makes the current line ! a shell comment. .TP .B dump\-functions --- 921,927 ---- .B comment\-begin variable is inserted at the beginning of the current line, and the line ! is accepted as if a newline had been typed. The default value of ! .B comment\-begin ! makes the current line a shell comment. .TP .B dump\-functions *************** *** 933,937 **** .LP The following is a list of the default emacs and vi bindings. ! Characters with the 8th bit set are written as M\-, and are referred to as .I metafied --- 960,964 ---- .LP The following is a list of the default emacs and vi bindings. ! Characters with the eighth bit set are written as M\-, and are referred to as .I metafied *************** *** 939,955 **** The printable ASCII characters not mentioned in the list of emacs standard bindings are bound to the ! .I self\-insert function, which just inserts the given character into the input line. In vi insertion mode, all characters not specifically mentioned are bound to ! .IR self\-insert . Characters assigned to signal generation by .IR stty (1) or the terminal driver, such as C-Z or C-C, retain that function. ! Upper and lower case ! .I metafied ! characters are bound to the same function in the emacs mode ! meta keymap. The remaining characters are unbound, which causes readline to ring the bell (subject to the setting of the --- 966,980 ---- The printable ASCII characters not mentioned in the list of emacs standard bindings are bound to the ! .B self\-insert function, which just inserts the given character into the input line. In vi insertion mode, all characters not specifically mentioned are bound to ! .BR self\-insert . Characters assigned to signal generation by .IR stty (1) or the terminal driver, such as C-Z or C-C, retain that function. ! Upper and lower case metafied characters are bound to the same function in ! the emacs mode meta keymap. The remaining characters are unbound, which causes readline to ring the bell (subject to the setting of the *************** *** 1037,1041 **** "M-\e" delete-horizontal-space "M-~" tilde-expand ! "M-C-?" backward-delete-word "M-_" yank-last-arg .PP --- 1062,1066 ---- "M-\e" delete-horizontal-space "M-~" tilde-expand ! "M-C-?" backward-kill-word "M-_" yank-last-arg .PP *************** *** 1097,1100 **** --- 1122,1126 ---- "C-W" unix-word-rubout "C-Y" yank + "C-_" vi-undo "\^ " forward-char "#" insert-comment *************** *** 1151,1155 **** "s" vi-subst "t" vi-char-search ! "u" undo "w" vi-next-word "x" vi-delete --- 1177,1181 ---- "s" vi-subst "t" vi-char-search ! "u" vi-undo "w" vi-next-word "x" vi-delete Binary files readline-4.1/doc/readline.dvi and readline-4.2/doc/readline.dvi differ diff -Nrc2 readline-4.1/doc/readline.html readline-4.2/doc/readline.html *** readline-4.1/doc/readline.html Wed Mar 1 14:53:12 2000 --- readline-4.2/doc/readline.html Mon Apr 16 11:05:45 2001 *************** *** 2,6 **** GNU Readline Library --- 2,6 ---- GNU Readline Library *************** *** 8,13 ****

    GNU Readline Library

    !

    Edition 4.1, for Readline Library Version 4.1.

    !

    January 2000

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

    GNU Readline Library

    !

    Edition 4.2, for Readline Library Version 4.2.

    !

    Apr 2001

    Brian Fox, Free Software Foundation
    Chet Ramey, Case Western Reserve University
    *************** *** 51,55 ****
  • Custom Functions --- 51,55 ----
  • Custom Functions *************** *** 64,82 ****
  • Redisplay
  • Modifying Text !
  • Utility Functions !
  • Alternate Interface !
  • An Example !
  • Readline Signal Handling !
  • Custom Completers !
  • Concept Index !
  • Function and Variable Index


    --- 64,85 ----

  • Redisplay
  • Modifying Text !
  • Character Input !
  • Terminal Management !
  • Utility Functions !
  • Miscellaneous Functions !
  • Alternate Interface !
  • A Readline Example !
  • Readline Signal Handling !
  • Custom Completers !
  • Concept Index !
  • Function and Variable Index


    *************** *** 115,119 ****

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

    --- 118,122 ----

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

    *************** *** 170,174 **** If you do not have a Meta or ALT key, or another key working as a Meta key, the identical keystroke can be generated by typing ESC ! first, and then typing k. Either process is known as metafying the k key. --- 173,177 ---- If you do not have a Meta or ALT key, or another key working as a Meta key, the identical keystroke can be generated by typing ESC ! first, and then typing k. Either process is known as metafying the k key. *************** *** 205,210 **** you move the cursor to the place that needs correction, and delete or insert the text of the corrections. Then, when you are satisfied with ! the line, you simply press RETURN. You do not have to be at the ! end of the line to press RETURN; the entire line is accepted regardless of the location of the cursor within the line. --- 208,213 ---- you move the cursor to the place that needs correction, and delete or insert the text of the corrections. Then, when you are satisfied with ! the line, you simply press RET. You do not have to be at the ! end of the line to press RET; the entire line is accepted regardless of the location of the cursor within the line. *************** *** 367,371 **** Word boundaries are the same as those used by M-f. !
    M-DEL
    Kill from the cursor the start of the previous word, or, if between --- 370,374 ---- Word boundaries are the same as those used by M-f. !
    M-DEL
    Kill from the cursor the start of the previous word, or, if between *************** *** 376,380 ****
    Kill from the cursor to the previous whitespace. This is different than ! M-DEL because the word boundaries differ.
  • --- 379,383 ----
    Kill from the cursor to the previous whitespace. This is different than ! M-DEL because the word boundaries differ.
    *************** *** 416,420 **** you have typed one meta digit to get the argument started, you can type the remainder of the digits, and then the command. For example, to give ! the C-d command an argument of 10, you could type `M-1 0 C-d'.

    --- 419,424 ---- you have typed one meta digit to get the argument started, you can type the remainder of the digits, and then the command. For example, to give ! the C-d command an argument of 10, you could type `M-1 0 C-d', ! which will delete the next ten characters on the input line.

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

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

    *************** *** 456,459 **** --- 460,465 ---- For instance, a RET will terminate the search and accept the line, thereby executing the command from the history list. + A movement command will terminate the search, make the last line found + the current line, and begin editing.

    *************** *** 478,482 **** commands in an inputrc file, conventionally in his home directory. The name of this ! file is taken from the value of the environment variable INPUTRC. If that variable is unset, the default is `~/.inputrc'. --- 484,488 ---- commands in an inputrc file, conventionally in his home directory. The name of this ! file is taken from the value of the environment variable @env{INPUTRC}. If that variable is unset, the default is `~/.inputrc'. *************** *** 520,524 **** You can modify the run-time behavior of Readline by altering the values of variables in Readline ! using the set command within the init file. Here is how to change from the default Emacs-like key binding to use vi line editing commands: --- 526,538 ---- You can modify the run-time behavior of Readline by altering the values of variables in Readline ! using the set command within the init file. ! The syntax is simple: ! ! !
    ! set variable value
    ! 
    ! ! Here, for example, is how to change from the default Emacs-like key binding to use vi line editing commands: *************** *** 529,540 ****
    A great deal of run-time behavior is changeable with the following variables.
    bell-style
    ! Controls what happens when Readline wants to ring the terminal bell. If set to `none', Readline never rings the bell. If set to --- 543,558 ----
    + Variable names and values, where appropriate, are recognized without regard + to case. + A great deal of run-time behavior is changeable with the following variables. +
    bell-style
    ! Controls what happens when Readline wants to ring the terminal bell. If set to `none', Readline never rings the bell. If set to *************** *** 545,549 ****
    comment-begin
    ! The string to insert at the beginning of the line when the insert-comment command is executed. The default value --- 563,567 ----
    comment-begin
    ! The string to insert at the beginning of the line when the insert-comment command is executed. The default value *************** *** 558,572 ****
    completion-query-items
    ! The number of possible completions that determines when the user is asked whether he wants to see the list of possibilities. If the number of possible completions is greater than this value, Readline will ask the user whether or not he wishes to view ! them; otherwise, they are simply listed. The default limit is ! 100.
    convert-meta
    ! If set to `on', Readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth --- 576,591 ----
    completion-query-items
    ! The number of possible completions that determines when the user is asked whether he wants to see the list of possibilities. If the number of possible completions is greater than this value, Readline will ask the user whether or not he wishes to view ! them; otherwise, they are simply listed. ! This variable must be set to an integer value greater than or equal to 0. ! The default limit is 100.
    convert-meta
    ! If set to `on', Readline will convert characters with the eighth bit set to an ASCII key sequence by stripping the eighth *************** *** 576,580 ****
    disable-completion
    ! If set to `On', Readline will inhibit word completion. Completion characters will be inserted into the line as if they had --- 595,599 ----
    disable-completion
    ! If set to `On', Readline will inhibit word completion. Completion characters will be inserted into the line as if they had *************** *** 583,587 ****
    editing-mode
    ! The editing-mode variable controls which default set of key bindings is used. By default, Readline starts up in Emacs editing --- 602,606 ----
    editing-mode
    ! The editing-mode variable controls which default set of key bindings is used. By default, Readline starts up in Emacs editing *************** *** 591,595 ****
    enable-keypad
    ! When set to `on', Readline will try to enable the application keypad when it is called. Some systems need this to enable the --- 610,614 ----
    enable-keypad
    ! When set to `on', Readline will try to enable the application keypad when it is called. Some systems need this to enable the *************** *** 598,602 ****
    expand-tilde
    ! If set to `on', tilde expansion is performed when Readline attempts word completion. The default is `off'. --- 617,621 ----
    expand-tilde
    ! If set to `on', tilde expansion is performed when Readline attempts word completion. The default is `off'. *************** *** 604,608 ****
    horizontal-scroll-mode
    ! This variable can be set to either `on' or `off'. Setting it to `on' means that the text of the lines being edited will scroll --- 623,627 ----
    horizontal-scroll-mode
    ! This variable can be set to either `on' or `off'. Setting it to `on' means that the text of the lines being edited will scroll *************** *** 613,620 ****
    input-meta
    - If set to `on', Readline will enable eight-bit input (it ! will not strip the eighth bit from the characters it reads), regardless of what the terminal claims it can support. The default value is `off'. The name meta-flag is a --- 632,639 ----
    input-meta
    + If set to `on', Readline will enable eight-bit input (it ! will not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. The default value is `off'. The name meta-flag is a *************** *** 623,627 ****
    isearch-terminators
    ! The string of characters that should terminate an incremental search without subsequently executing the character as a command (see section Searching for Commands in the History). --- 642,646 ----
    isearch-terminators
    ! The string of characters that should terminate an incremental search without subsequently executing the character as a command (see section Searching for Commands in the History). *************** *** 631,635 ****
    keymap
    ! Sets Readline's idea of the current keymap for key binding commands. Acceptable keymap names are --- 650,654 ----
    keymap
    ! Sets Readline's idea of the current keymap for key binding commands. Acceptable keymap names are *************** *** 639,642 **** --- 658,662 ---- emacs-ctlx, vi, + vi-move, vi-command, and vi-insert. *************** *** 653,657 ****
    mark-modified-lines
    ! This variable, when set to `on', causes Readline to display an asterisk (`*') at the start of history lines which have been modified. --- 673,677 ----
    mark-modified-lines
    ! This variable, when set to `on', causes Readline to display an asterisk (`*') at the start of history lines which have been modified. *************** *** 660,664 ****
    output-meta
    ! If set to `on', Readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape --- 680,684 ----
    output-meta
    ! If set to `on', Readline will display characters with the eighth bit set directly rather than as a meta-prefixed escape *************** *** 673,677 ****
    show-all-if-ambiguous
    ! This alters the default behavior of the completion functions. If set to `on', --- 693,697 ----
    show-all-if-ambiguous
    ! This alters the default behavior of the completion functions. If set to `on', *************** *** 682,686 ****
    visible-stats
    ! If set to `on', a character denoting a file's type is appended to the filename when listing possible --- 702,706 ----
    visible-stats
    ! If set to `on', a character denoting a file's type is appended to the filename when listing possible *************** *** 697,705 **** the command does. ! Once you know the name of the command, simply place the name of the key you wish to bind the command to, a colon, and then the name of the ! command on a line in the init file. The name of the key ! can be expressed in different ways, depending on which is most ! comfortable for you.
    --- 717,729 ---- the command does. ! Once you know the name of the command, simply place on a line ! in the init file the name of the key you wish to bind the command to, a colon, and then the name of the ! command. The name of the key ! can be expressed in different ways, depending on what you find most ! comfortable. ! ! In addition to command names, readline allows keys to be bound ! to a string that is inserted when the key is pressed (a macro).
    *************** *** 716,723 **** In the above example, C-u is bound to the function ! universal-argument, and C-o is bound to run the macro expressed on the right hand side (that is, to insert the text `> output' into the line).
    "keyseq": function-name or macro
    --- 740,764 ---- In the above example, C-u is bound to the function ! universal-argument, ! M-DEL is bound to the function backward-kill-word, and ! C-o is bound to run the macro expressed on the right hand side (that is, to insert the text `> output' into the line). + A number of symbolic character names are recognized while + processing this key binding syntax: + DEL, + ESC, + ESCAPE, + LFD, + NEWLINE, + RET, + RETURN, + RUBOUT, + SPACE, + SPC, + and + TAB. +
    "keyseq": function-name or macro
    *************** *** 735,739 **** ! In the above example, C-u is bound to the function universal-argument (just as it was in the first example), `C-x C-r' is bound to the function re-read-init-file, --- 776,780 ---- ! In the above example, C-u is again bound to the function universal-argument (just as it was in the first example), `C-x C-r' is bound to the function re-read-init-file, *************** *** 799,807 ****
    \nnn
    ! the character whose ASCII code is the octal value nnn (one to three digits)
    \xnnn
    ! the character whose ASCII code is the hexadecimal value nnn (one to three digits)
    --- 840,848 ----
    \nnn
    ! the character whose ASCII code is the octal value nnn (one to three digits)
    \xnnn
    ! the character whose ASCII code is the hexadecimal value nnn (one to three digits)
    *************** *** 813,817 **** Backslash will quote any other character in the macro text, including `"' and `''. ! For example, the following binding will make `C-x \' insert a single `\' into the line: --- 854,858 ---- Backslash will quote any other character in the macro text, including `"' and `''. ! For example, the following binding will make `C-x \' insert a single `\' into the line: *************** *** 867,871 **** The application construct is used to include application-specific settings. Each program using the Readline ! library sets the application name, and you can test for it. This could be used to bind key sequences to functions useful for a specific program. For instance, the following command adds a --- 908,913 ---- The application construct is used to include application-specific settings. Each program using the Readline ! library sets the application name, and you can test for ! a particular value. This could be used to bind key sequences to functions useful for a specific program. For instance, the following command adds a *************** *** 895,898 **** --- 937,941 ---- This directive takes a single filename as an argument and reads commands and bindings from that file. + For example, the following directive reads from `/etc/inputrc':
    ***************
    *** 907,911 ****
      
      

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

    ! Here is an example of an inputrc file. This illustrates key binding, variable assignment, and conditional syntax. *************** *** 1031,1042 **** This section describes Readline commands that may be bound to key sequences.

    ! Command names without an accompanying key sequence are unbound by default. ! In the following descriptions, point refers to the current cursor ! position, and mark refers to a cursor position saved by the set-mark command. ! The text between the point and mark is referred to as the region.

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

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

    *************** *** 1048,1072 ****
    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. --- 1091,1115 ----
    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. *************** *** 1074,1078 ****
    backward-word (M-b)
    ! Move back to the start of the current or previous word. Words are composed of letters and digits. --- 1117,1121 ----
    backward-word (M-b)
    ! Move back to the start of the current or previous word. Words are composed of letters and digits. *************** *** 1080,1084 ****
    clear-screen (C-l)
    ! Clear the screen and redraw the current line, leaving the current line at the top of the screen. --- 1123,1127 ----
    clear-screen (C-l)
    ! Clear the screen and redraw the current line, leaving the current line at the top of the screen. *************** *** 1086,1090 ****
    redraw-current-line ()
    ! Refresh the current line. By default, this is unbound. --- 1129,1133 ----
    redraw-current-line ()
    ! Refresh the current line. By default, this is unbound. *************** *** 1097,1125 ****
    !
    accept-line (Newline, Return)
    ! ! Accept the line regardless of where the cursor is. If this line is ! non-empty, add it to the history list. If this line was a history ! line, then restore the history line to its original state.
    previous-history (C-p)
    ! ! Move `up' through the history list.
    next-history (C-n)
    ! ! Move `down' through the history list.
    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. --- 1140,1171 ----
    !
    accept-line (Newline or Return)
    ! ! Accept the line regardless of where the cursor is. ! If this line is ! non-empty, it may be added to the history list for future recall with ! add_history(). ! If this line is a modified history line, the history line is restored ! to its original state.
    previous-history (C-p)
    ! ! Move `back' through the history list, fetching the previous command.
    next-history (C-n)
    ! ! Move `forward' through the history list, fetching the next command.
    beginning-of-history (M-<)
    ! Move to the first line in the history.
    end-of-history (M->)
    ! Move to the end of the input history, i.e., the line currently being entered. *************** *** 1127,1131 ****
    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. --- 1173,1177 ----
    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. *************** *** 1133,1137 ****
    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. --- 1179,1183 ----
    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. *************** *** 1139,1143 ****
    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 --- 1185,1189 ----
    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 *************** *** 1146,1150 ****
    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 --- 1192,1196 ----
    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 *************** *** 1153,1157 ****
    history-search-forward ()
    ! Search forward through the history for the string of characters between the start of the current line and the point. --- 1199,1203 ----
    history-search-forward ()
    ! Search forward through the history for the string of characters between the start of the current line and the point. *************** *** 1161,1165 ****
    history-search-backward ()
    ! Search backward through the history for the string of characters between the start of the current line and the point. This --- 1207,1211 ----
    history-search-backward ()
    ! Search backward through the history for the string of characters between the start of the current line and the point. This *************** *** 1168,1181 ****
    yank-nth-arg (M-C-y)
    ! Insert the first argument to the previous command (usually ! the second word on the previous line). With an argument n, insert the nth word from the previous command (the words in the previous command begin with word 0). A negative argument inserts the nth word from the end of the previous command. !
    yank-last-arg (M-., M-_)
    ! Insert last argument to the previous command (the last word of the previous history entry). With an --- 1214,1228 ----
    yank-nth-arg (M-C-y)
    ! Insert the first argument to the previous command (usually ! the second word on the previous line) at point. ! With an argument n, insert the nth word from the previous command (the words in the previous command begin with word 0). A negative argument inserts the nth word from the end of the previous command. !
    yank-last-arg (M-. or M-_)
    ! Insert last argument to the previous command (the last word of the previous history entry). With an *************** *** 1194,1206 ****
    delete-char (C-d)
    ! ! Delete the character under the cursor. If the cursor is at the beginning of the line, there are no characters in the line, and the last character typed was not bound to delete-char, then ! return EOF.
    backward-delete-char (Rubout)
    ! Delete the character behind the cursor. A numeric argument means to kill the characters instead of deleting them. --- 1241,1253 ----
    delete-char (C-d)
    ! ! Delete the character at point. If point is at the beginning of the line, there are no characters in the line, and the last character typed was not bound to delete-char, then ! return EOF.
    backward-delete-char (Rubout)
    ! Delete the character behind the cursor. A numeric argument means to kill the characters instead of deleting them. *************** *** 1208,1235 ****
    forward-backward-delete-char ()
    ! Delete the character under the cursor, unless the cursor is at the end of the line, in which case the character behind the cursor is deleted. By default, this is not bound to a key. !
    quoted-insert (C-q, 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 --- 1255,1282 ----
    forward-backward-delete-char ()
    ! Delete the character under the cursor, unless the cursor is at the end of the line, in which case the character behind the cursor is deleted. By default, this is not bound to a key. !
    quoted-insert (C-q or C-v)
    ! Add the next character typed to the line verbatim. This is how to insert key sequences like C-q, for example. !
    tab-insert (M-TAB)
    ! Insert a tab character.
    self-insert (a, b, A, 1, !, ...)
    ! Insert yourself.
    transpose-chars (C-t)
    ! Drag the character before the cursor forward over the character at the cursor, moving the *************** *** 1241,1245 ****
    transpose-words (M-t)
    ! Drag the word before point past the word after point, moving point past that word as well. --- 1288,1292 ----
    transpose-words (M-t)
    ! Drag the word before point past the word after point, moving point past that word as well. *************** *** 1247,1251 ****
    upcase-word (M-u)
    ! Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move the cursor. --- 1294,1298 ----
    upcase-word (M-u)
    ! Uppercase the current (or following) word. With a negative argument, uppercase the previous word, but do not move the cursor. *************** *** 1253,1257 ****
    downcase-word (M-l)
    ! Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move the cursor. --- 1300,1304 ----
    downcase-word (M-l)
    ! Lowercase the current (or following) word. With a negative argument, lowercase the previous word, but do not move the cursor. *************** *** 1259,1263 ****
    capitalize-word (M-c)
    ! Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move the cursor. --- 1306,1310 ----
    capitalize-word (M-c)
    ! Capitalize the current (or following) word. With a negative argument, capitalize the previous word, but do not move the cursor. *************** *** 1273,1305 ****
    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 point is. By default, this is unbound.
    kill-word (M-d)
    ! Kill from point to the end of the current word, or if between words, to the end of the next word. Word boundaries are the same as forward-word. !
    backward-kill-word (M-DEL)
    ! Kill the word behind point. Word boundaries are the same as backward-word. --- 1320,1352 ----
    kill-line (C-k)
    ! Kill the text from point to the end of the line.
    backward-kill-line (C-x Rubout)
    ! Kill backward to the beginning of the line.
    unix-line-discard (C-u)
    ! Kill backward from the cursor to the beginning of the current line.
    kill-whole-line ()
    ! ! Kill all characters on the current line, no matter where point is. By default, this is unbound.
    kill-word (M-d)
    ! Kill from point to the end of the current word, or if between words, to the end of the next word. Word boundaries are the same as forward-word. !
    backward-kill-word (M-DEL)
    ! Kill the word behind point. Word boundaries are the same as backward-word. *************** *** 1307,1311 ****
    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. --- 1354,1358 ----
    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. *************** *** 1313,1322 ****
    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. --- 1360,1369 ----
    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. *************** *** 1324,1328 ****
    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. --- 1371,1375 ----
    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. *************** *** 1330,1334 ****
    copy-backward-word ()
    ! Copy the word before point to the kill buffer. The word boundaries are the same as backward-word. --- 1377,1381 ----
    copy-backward-word ()
    ! Copy the word before point to the kill buffer. The word boundaries are the same as backward-word. *************** *** 1337,1341 ****
    copy-forward-word ()
    ! Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. --- 1384,1388 ----
    copy-forward-word ()
    ! Copy the word following point to the kill buffer. The word boundaries are the same as forward-word. *************** *** 1344,1356 ****
    yank (C-y)
    ! ! Yank the top of the kill ring into the buffer at the current ! cursor position.
    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.
    --- 1391,1402 ----
    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.
    *************** *** 1360,1366 ****
    !
    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. --- 1406,1412 ----
    !
    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. *************** *** 1368,1372 ****
    universal-argument ()
    ! This is another way to specify an argument. If this command is followed by one or more digits, optionally with a --- 1414,1418 ----
    universal-argument ()
    ! This is another way to specify an argument. If this command is followed by one or more digits, optionally with a *************** *** 1389,1410 ****
    !
    complete (TAB)
    ! ! Attempt to do completion on the text before the cursor. This is ! application-specific. Generally, if you are typing a filename ! argument, you can do filename completion; if you are typing a command, ! you can do command completion; if you are typing in a symbol to GDB, you ! can do symbol name completion; if you are typing in a variable to Bash, ! you can do variable name completion, and so on.
    possible-completions (M-?)
    ! ! List the possible completions of the text before the cursor.
    insert-completions (M-*)
    ! Insert all completions of the text before point that would have been generated by possible-completions. --- 1435,1453 ----
    !
    complete (TAB)
    ! ! Attempt to perform completion on the text before point. ! The actual completion performed is application-specific. ! The default is filename completion.
    possible-completions (M-?)
    ! ! List the possible completions of the text before point.
    insert-completions (M-*)
    ! Insert all completions of the text before point that would have been generated by possible-completions. *************** *** 1412,1431 ****
    menu-complete ()
    ! Similar to complete, but replaces the word to be completed with a single match from the list of possible completions. Repeated execution of menu-complete steps through the list of possible completions, inserting each match in turn. ! At the end of the list of completions, the bell is rung and the ! original text is restored. An argument of n moves n positions forward in the list of matches; a negative argument may be used to move backward through the list. ! This command is intended to be bound to TAB, but is unbound by default.
    delete-char-or-list ()
    ! Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). --- 1455,1475 ----
    menu-complete ()
    ! Similar to complete, but replaces the word to be completed with a single match from the list of possible completions. Repeated execution of menu-complete steps through the list of possible completions, inserting each match in turn. ! At the end of the list of completions, the bell is rung ! (subject to the setting of bell-style) ! and the original text is restored. An argument of n moves n positions forward in the list of matches; a negative argument may be used to move backward through the list. ! This command is intended to be bound to TAB, but is unbound by default.
    delete-char-or-list ()
    ! Deletes the character under the cursor if not at the beginning or end of the line (like delete-char). *************** *** 1443,1452 ****
    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. --- 1487,1496 ----
    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. *************** *** 1454,1458 ****
    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. --- 1498,1502 ----
    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. *************** *** 1467,1471 ****
    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. --- 1511,1515 ----
    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. *************** *** 1473,1477 ****
    abort (C-g)
    ! Abort the current editing command and ring the terminal's bell (subject to the setting of --- 1517,1521 ----
    abort (C-g)
    ! Abort the current editing command and ring the terminal's bell (subject to the setting of *************** *** 1480,1502 ****
    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)
    ! ! Make the next character typed be metafied. This is for keyboards ! without a meta key. Typing `ESC f' is equivalent to typing ! `M-f'. !
    undo (C-_, 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. --- 1524,1546 ----
    do-uppercase-version (M-a, M-b, M-x, ...)
    ! If the metafied character x is lowercase, run the command that is bound to the corresponding uppercase character. !
    prefix-meta (ESC)
    ! ! Metafy the next character typed. This is for keyboards ! without a meta key. Typing `ESC f' is equivalent to typing ! M-f. !
    undo (C-_ or C-x C-u)
    ! Incremental undo, separately remembered for each line.
    revert-line (M-r)
    ! Undo all changes made to this line. This is like executing the undo command enough times to get back to the beginning. *************** *** 1504,1519 ****
    tilde-expand (M-~)
    ! Perform tilde expansion on the current word.
    set-mark (C-@)
    ! ! Set the mark to the current 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. --- 1548,1563 ----
    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. *************** *** 1521,1525 ****
    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. --- 1565,1569 ----
    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. *************** *** 1527,1531 ****
    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 --- 1571,1575 ----
    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 *************** *** 1534,1538 ****
    insert-comment (M-#)
    ! The value of the comment-begin variable is inserted at the beginning of the current line, --- 1578,1582 ----
    insert-comment (M-#)
    ! The value of the comment-begin variable is inserted at the beginning of the current line, *************** *** 1541,1545 ****
    dump-functions ()
    ! Print all of the functions and their key bindings to the Readline output stream. If a numeric argument is supplied, --- 1585,1589 ----
    dump-functions ()
    ! Print all of the functions and their key bindings to the Readline output stream. If a numeric argument is supplied, *************** *** 1549,1553 ****
    dump-variables ()
    ! Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, --- 1593,1597 ----
    dump-variables ()
    ! Print all of the settable variables and their values to the Readline output stream. If a numeric argument is supplied, *************** *** 1557,1563 ****
    dump-macros ()
    ! Print all of the Readline key sequences bound to macros and the ! strings they ouput. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default. --- 1601,1607 ----
    dump-macros ()
    ! Print all of the Readline key sequences bound to macros and the ! strings they output. If a numeric argument is supplied, the output is formatted in such a way that it can be made part of an inputrc file. This command is unbound by default. *************** *** 1578,1582 ****

    In order to switch interactively between emacs and vi ! editing modes, use the command M-C-j (toggle-editing-mode). The Readline default is emacs mode. --- 1622,1627 ----

    In order to switch interactively between emacs and vi ! editing modes, use the command M-C-j (bound to emacs-editing-mode ! when in vi mode and to vi-editing-mode in emacs mode). The Readline default is emacs mode. *************** *** 1613,1618 **** aid in writing your own custom functions. !

  • Readline Signal Handling: How Readline behaves when it receives signals. !
  • Custom Completers: Supplanting or supplementing Readline's completion functions. --- 1658,1663 ---- aid in writing your own custom functions. !
  • Readline Signal Handling: How Readline behaves when it receives signals. !
  • Custom Completers: Supplanting or supplementing Readline's completion functions. *************** *** 1627,1646 **** Readline is sufficient. This section describes how to use Readline in the simplest way possible, perhaps to replace calls in your code to ! gets() or fgets ().

    - ! The function readline () prints a prompt and then reads and returns ! a single line of text from the user. The line readline ! returns is allocated with malloc (); you should free () ! the line when you are done with it. The declaration for readline ! in ANSI C is

    ! char *readline (char *prompt);
      
    --- 1672,1695 ---- Readline is sufficient. This section describes how to use Readline in the simplest way possible, perhaps to replace calls in your code to ! gets() or fgets().

    ! ! !

    !

    ! The function readline() prints a prompt prompt ! and then reads and returns a single line of text from the user. ! If prompt is NULL or the empty string, no prompt is displayed. ! The line readline returns is allocated with malloc(); ! the caller should free() the line when it has finished with it. ! The declaration for readline in ANSI C is

    ! char *readline (const char *prompt);
      
    *************** *** 1666,1670 ****

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

    If you want the user to be able to get at the line later, (with ! C-p for example), you must call add_history() to save the line away in a history list of such lines. *************** *** 1682,1686 **** It is preferable to avoid saving empty lines on the history list, since users rarely have a burning need to reuse a blank line. Here is ! a function which usefully replaces the standard gets () library function, and has the advantage of no static buffer to overflow: --- 1731,1735 ---- It is preferable to avoid saving empty lines on the history list, since users rarely have a burning need to reuse a blank line. Here is ! a function which usefully replaces the standard gets() library function, and has the advantage of no static buffer to overflow: *************** *** 1718,1735 **** completion: completion on file names. If you do not want Readline to complete on filenames, you can change the binding of the TAB key ! with rl_bind_key ().

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

    ! rl_bind_key () takes two arguments: key is the character that you want to bind, and function is the address of the function to ! call when key is pressed. Binding TAB to rl_insert () makes TAB insert itself. ! rl_bind_key () returns non-zero if key is not a valid ASCII character code (between 0 and 255). --- 1767,1784 ---- completion: completion on file names. If you do not want Readline to complete on filenames, you can change the binding of the TAB key ! with rl_bind_key().

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

    ! rl_bind_key() takes two arguments: key is the character that you want to bind, and function is the address of the function to ! call when key is pressed. Binding TAB to rl_insert() makes TAB insert itself. ! rl_bind_key() returns non-zero if key is not a valid ASCII character code (between 0 and 255). *************** *** 1744,1750 ****

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

    --- 1793,1799 ----

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

    *************** *** 1772,1776 **** --- 1821,1825 ---- *************** *** 1778,1828 **** !

    The Function Type

    ! For readabilty, we declare a new type of object, called ! Function. A Function is a C function which ! returns an int. The type declaration for Function is:

    ! typedef int Function ();

    ! The reason for declaring this new type is to make it easier to write ! code describing pointers to C functions. Let us say we had a variable ! called func which was a pointer to a function. Instead of the ! classic C declaration

    ! int (*)()func;

    ! we may write

    ! Function *func;

    ! Similarly, there are

    !
    ! typedef void VFunction ();
    ! typedef char *CPFunction (); and
    ! typedef char **CPPFunction ();
    ! 
    !

    ! for functions returning no value, pointer to char, and ! pointer to pointer to char, respectively.

    --- 1827,1914 ---- !

    Readline Typedefs

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

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

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

    ! int (*func)();

    ! or the ANSI-C style declaration

    ! int (*func)(int, int);

    ! we may write

    +

    + rl_command_func_t *func; !

    ! The full list of function pointer types available is

    +
    + +
    typedef int rl_command_func_t (int, int); +
    +
    typedef char *rl_compentry_func_t (const char *, int); +
    +
    typedef char **rl_completion_func_t (const char *, int, int); +
    +
    typedef char *rl_quote_func_t (char *, int, char *); +
    +
    typedef char *rl_dequote_func_t (char *, int); +
    +
    typedef int rl_compignore_func_t (char **); +
    +
    typedef void rl_compdisp_func_t (char **, int, int); +
    +
    typedef int rl_hook_func_t (void); +
    +
    typedef int rl_getc_func_t (FILE *); +
    +
    typedef int rl_linebuf_func_t (char *, int); +
    +
    typedef int rl_intfunc_t (int); +
    +
    #define rl_ivoidfunc_t rl_hook_func_t +
    +
    typedef int rl_icpfunc_t (char *); +
    +
    typedef int rl_icppfunc_t (char **); +
    +
    typedef void rl_voidfunc_t (void); +
    +
    typedef void rl_vintfunc_t (int); +
    +
    typedef void rl_vcpfunc_t (char *); +
    +
    typedef void rl_vcppfunc_t (char **); +
    +
    + *************** *** 1872,1876 ****
    Variable: char * rl_line_buffer !
    This is the line gathered so far. You are welcome to modify the contents of the line, but see section Allowing Undoing. The --- 1958,1962 ----
    Variable: char * rl_line_buffer !
    This is the line gathered so far. You are welcome to modify the contents of the line, but see section Allowing Undoing. The *************** *** 1883,1887 ****
    Variable: int rl_point !
    The offset of the current cursor position in rl_line_buffer (the point). --- 1969,1973 ----
    Variable: int rl_point !
    The offset of the current cursor position in rl_line_buffer (the point). *************** *** 1892,1896 ****
    Variable: int rl_end !
    The number of characters present in rl_line_buffer. When rl_point is at the end of the line, rl_point and --- 1978,1982 ----
    Variable: int rl_end !
    The number of characters present in rl_line_buffer. When rl_point is at the end of the line, rl_point and *************** *** 1902,1907 ****
    Variable: int rl_mark !
    ! The mark (saved position) in the current line. If set, the mark and point define a region.
    --- 1988,1993 ----
    Variable: int rl_mark !
    ! The mark (saved position) in the current line. If set, the mark and point define a region.
    *************** *** 1911,1915 ****
    Variable: int rl_done !
    Setting this to a non-zero value causes Readline to return the current line immediately. --- 1997,2001 ----
    Variable: int rl_done !
    Setting this to a non-zero value causes Readline to return the current line immediately. *************** *** 1919,1924 ****

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

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

    +

    +

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

    Variable: int rl_erase_empty_line !
    Setting this to a non-zero value causes Readline to completely erase the current line, including any prompt, any time a newline is typed as --- 2024,2039 ----

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

    +

    +

    Variable: int rl_erase_empty_line !
    Setting this to a non-zero value causes Readline to completely erase the current line, including any prompt, any time a newline is typed as *************** *** 1940,1946 ****
    Variable: char * rl_prompt !
    The prompt Readline uses. This is set from the argument to ! readline (), and should not be assigned to directly.
    --- 2046,2054 ----
    Variable: char * rl_prompt !
    The prompt Readline uses. This is set from the argument to ! readline(), and should not be assigned to directly. ! The rl_set_prompt() function (see section Redisplay) may ! be used to modify the prompt string after calling readline().
    *************** *** 1949,1953 ****
    Variable: int rl_already_prompted !
    If an application wishes to display the prompt itself, rather than have Readline do it the first time readline() is called, it should set --- 2057,2061 ----
    Variable: int rl_already_prompted !
    If an application wishes to display the prompt itself, rather than have Readline do it the first time readline() is called, it should set *************** *** 1962,1967 ****

    !
    Variable: char * rl_library_version !
    The version number of this revision of the library.
    --- 2070,2075 ----

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

    !
    Variable: char * rl_terminal_name !
    ! The terminal type, used for initialization.
    --- 2078,2085 ----

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

    !
    Variable: char * rl_readline_name !
    This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file --- 2087,2102 ----

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

    !

    !

    !
    Variable: const char * rl_readline_name !
    This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file *************** *** 1989,1993 ****
    Variable: FILE * rl_instream !
    The stdio stream from which Readline reads input.
    --- 2108,2112 ----
    Variable: FILE * rl_instream !
    The stdio stream from which Readline reads input.
    *************** *** 1997,2001 ****
    Variable: FILE * rl_outstream !
    The stdio stream to which Readline performs output.
    --- 2116,2120 ----
    Variable: FILE * rl_outstream !
    The stdio stream to which Readline performs output.
    *************** *** 2004,2009 ****

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

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

    !

    !

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

    !
    Variable: Function * rl_pre_input_hook !
    If non-zero, this is the address of a function to call after the first prompt has been printed and just before readline --- 2142,2147 ----

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

    !
    Variable: Function * rl_event_hook !
    If non-zero, this is the address of a function to call periodically ! when readline is waiting for terminal input.
    --- 2152,2161 ----

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

    !
    Variable: Function * rl_getc_function !
    ! If non-zero, readline will call indirectly through this pointer to get a character from the input stream. By default, it is set to ! rl_getc, the default readline character input function ! (see section Utility Functions).
    --- 2163,2172 ----

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

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

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

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

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

    +

    +

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

    +

    +

    Variable: Keymap rl_executing_keymap !
    This variable is set to the keymap (see section Selecting a Keymap) in which the currently executing readline function was found. *************** *** 2064,2068 ****
    Variable: Keymap rl_binding_keymap !
    This variable is set to the keymap (see section Selecting a Keymap) in which the last key binding occurred. --- 2219,2223 ----
    Variable: Keymap rl_binding_keymap !
    This variable is set to the keymap (see section Selecting a Keymap) in which the last key binding occurred. *************** *** 2070,2073 **** --- 2225,2341 ----

    +

    +

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

    +

    +

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

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

    +

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

    +

    +

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

    +

    +

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

    + *************** *** 2084,2089 ****
  • Redisplay: Functions to control line display.
  • Modifying Text: Functions to modify rl_line_buffer. !
  • Utility Functions: Generally useful functions and hooks. !
  • Alternate Interface: Using Readline in a `callback' fashion. --- 2352,2361 ----
  • Redisplay: Functions to control line display.
  • Modifying Text: Functions to modify rl_line_buffer. !
  • Character Input: Functions to read keyboard input. !
  • Terminal Management: Functions to manage terminal settings. !
  • Utility Functions: Generally useful functions and hooks. !
  • Miscellaneous Functions: Functions that don't fall into any category. !
  • Alternate Interface: Using Readline in a `callback' fashion. !
  • A Readline Example: An example Readline function. *************** *** 2113,2121 ****

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

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

    !
    Function: Keymap rl_make_bare_keymap () !
    Returns a new, empty keymap. The space for the keymap is allocated with ! malloc (); you should free () it when you are done.
    --- 2414,2422 ----

    !
    Function: Keymap rl_make_bare_keymap (void) !
    Returns a new, empty keymap. The space for the keymap is allocated with ! malloc(); the caller should free it by calling ! rl_discard_keymap() when done.
    *************** *** 2152,2156 ****
    Function: Keymap rl_copy_keymap (Keymap map) !
    Return a new keymap which is a copy of map.
    --- 2425,2429 ----
    Function: Keymap rl_copy_keymap (Keymap map) !
    Return a new keymap which is a copy of map.
    *************** *** 2159,2164 ****

    !
    Function: Keymap rl_make_keymap () !
    Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and --- 2432,2437 ----

    !
    Function: Keymap rl_make_keymap (void) !
    Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their equivalents, and *************** *** 2170,2174 ****
    Function: void rl_discard_keymap (Keymap keymap) !
    Free the storage associated with keymap.
    --- 2443,2447 ----
    Function: void rl_discard_keymap (Keymap keymap) !
    Free the storage associated with keymap.
    *************** *** 2182,2187 ****

    !
    Function: Keymap rl_get_keymap () !
    Returns the currently active keymap.
    --- 2455,2460 ----

    !
    Function: Keymap rl_get_keymap (void) !
    Returns the currently active keymap.
    *************** *** 2191,2195 ****
    Function: void rl_set_keymap (Keymap keymap) !
    Makes keymap the currently active keymap.
    --- 2464,2468 ----
    Function: void rl_set_keymap (Keymap keymap) !
    Makes keymap the currently active keymap.
    *************** *** 2198,2203 ****

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

    !
    Function: Keymap rl_get_keymap_by_name (const char *name) !
    Return the keymap matching name. name is one which would be supplied in a set keymap inputrc line (see section Readline Init File). *************** *** 2208,2212 ****
    Function: char * rl_get_keymap_name (Keymap keymap) !
    Return the name matching keymap. name is one which would be supplied in a set keymap inputrc line (see section Readline Init File). --- 2481,2485 ----
    Function: char * rl_get_keymap_name (Keymap keymap) !
    Return the name matching keymap. name is one which would be supplied in a set keymap inputrc line (see section Readline Init File). *************** *** 2219,2224 ****

    ! You associate keys with functions through the keymap. Readline has ! several internal keymaps: emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap, vi_movement_keymap, and vi_insertion_keymap. --- 2492,2497 ----

    ! Key sequences are associate with functions through the keymap. ! Readline has several internal keymaps: emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap, vi_movement_keymap, and vi_insertion_keymap. *************** *** 2228,2234 ****

    ! Since readline installs a set of default key bindings the first time it is called, there is always the danger that a custom binding ! installed before the first call to readline will be overridden. An alternate mechanism is to install custom key bindings in an initialization function assigned to the rl_startup_hook variable --- 2501,2507 ----

    ! Since readline() installs a set of default key bindings the first time it is called, there is always the danger that a custom binding ! installed before the first call to readline() will be overridden. An alternate mechanism is to install custom key bindings in an initialization function assigned to the rl_startup_hook variable *************** *** 2242,2247 ****

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

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

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

    !
    Function: int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map) !
    Bind key to function in map. Returns non-zero in the case of an invalid key. *************** *** 2261,2265 ****
    Function: int rl_unbind_key (int key) !
    Bind key to the null function in the currently active keymap. Returns non-zero in case of error. --- 2534,2538 ----
    Function: int rl_unbind_key (int key) !
    Bind key to the null function in the currently active keymap. Returns non-zero in case of error. *************** *** 2270,2274 ****
    Function: int rl_unbind_key_in_map (int key, Keymap map) !
    Bind key to the null function in map. Returns non-zero in case of error. --- 2543,2547 ----
    Function: int rl_unbind_key_in_map (int key, Keymap map) !
    Bind key to the null function in map. Returns non-zero in case of error. *************** *** 2278,2283 ****

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

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

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

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

    !
    Function: int rl_generic_bind (int type, char *keyseq, char *data, Keymap map) !
    Bind the key sequence represented by the string keyseq to the arbitrary pointer data. type says what kind of data is pointed to by --- 2567,2582 ----

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

    !

    !

    !
    Function: int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map) !
    Bind the key sequence represented by the string keyseq to the arbitrary pointer data. type says what kind of data is pointed to by *************** *** 2307,2311 ****
    Function: int rl_parse_and_bind (char *line) !
    Parse line as if it had been read from the inputrc file and perform any key bindings and variable assignments found --- 2590,2594 ----
    Function: int rl_parse_and_bind (char *line) !
    Parse line as if it had been read from the inputrc file and perform any key bindings and variable assignments found *************** *** 2316,2321 ****

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

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

    These functions allow you to find out what keys invoke named functions ! and the functions invoked by a particular key sequence.

    !
    Function: Function * rl_named_function (char *name) !
    Return the function with name name.
    --- 2612,2623 ----

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

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

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

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

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

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

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

    !
    Function: char ** rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map) !
    Return an array of strings representing the key sequences used to invoke function in the keymap map. *************** *** 2372,2376 ****
    Function: void rl_function_dumper (int readable) !
    Print the readline function names and the key sequences currently bound to them to rl_outstream. If readable is non-zero, --- 2656,2660 ----
    Function: void rl_function_dumper (int readable) !
    Print the readline function names and the key sequences currently bound to them to rl_outstream. If readable is non-zero, *************** *** 2382,2387 ****

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

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

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

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

    !

    !

    !
    Function: int rl_add_funmap_entry (const char *name, rl_command_func_t *function) !
    ! Add name to the list of bindable Readline command names, and make ! function the function to be called when name is invoked.
    *************** *** 2405,2415 **** Supporting the undo command is a painless thing, and makes your functions much more useful. It is certainly easy to try ! something if you know you can undo it. I could use an undo function for ! the stock market.

    If your function simply inserts text once, or deletes text once, and ! uses rl_insert_text () or rl_delete_text () to do it, then undoing is already done for you automatically. --- 2698,2707 ---- Supporting the undo command is a painless thing, and makes your functions much more useful. It is certainly easy to try ! something if you know you can undo it.

    If your function simply inserts text once, or deletes text once, and ! uses rl_insert_text() or rl_delete_text() to do it, then undoing is already done for you automatically. *************** *** 2418,2423 **** If you do multiple insertions or multiple deletions, or any combination of these operations, you should group them together into one operation. ! This is done with rl_begin_undo_group () and ! rl_end_undo_group ().

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

    *************** *** 2434,2450 **** Notice that UNDO_DELETE means to insert some text, and UNDO_INSERT means to delete some text. That is, the undo code ! tells undo what to undo, not how to undo it. UNDO_BEGIN and ! UNDO_END are tags added by rl_begin_undo_group () and ! rl_end_undo_group ().

    !
    Function: int rl_begin_undo_group () !
    Begins saving undo information in a group construct. The undo ! information usually comes from calls to rl_insert_text () and ! rl_delete_text (), but could be the result of calls to ! rl_add_undo ().
    --- 2726,2742 ---- Notice that UNDO_DELETE means to insert some text, and UNDO_INSERT means to delete some text. That is, the undo code ! tells what to undo, not how to undo it. UNDO_BEGIN and ! UNDO_END are tags added by rl_begin_undo_group() and ! rl_end_undo_group().

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

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

    !
    Function: int rl_end_undo_group (void) !
    Closes the current undo group started with rl_begin_undo_group ! (). There should be one call to rl_end_undo_group() ! for each call to rl_begin_undo_group().
    *************** *** 2463,2467 ****
    Function: void rl_add_undo (enum undo_code what, int start, int end, char *text) !
    Remember how to undo an event (according to what). The affected text runs from start to end, and encompasses text. --- 2755,2759 ----
    Function: void rl_add_undo (enum undo_code what, int start, int end, char *text) !
    Remember how to undo an event (according to what). The affected text runs from start to end, and encompasses text. *************** *** 2471,2476 ****

    !
    Function: void free_undo_list () !
    Free the existing undo list.
    --- 2763,2768 ----

    !
    Function: void rl_free_undo_list (void) !
    Free the existing undo list.
    *************** *** 2479,2484 ****

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

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

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

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

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

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

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

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

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

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

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

    !
    Function: int rl_on_new_line_with_prompt () !
    Tell the update functions that we have moved onto a new line, with rl_prompt already displayed. --- 2828,2833 ----

    !
    Function: int rl_on_new_line_with_prompt (void) !
    Tell the update functions that we have moved onto a new line, with rl_prompt already displayed. *************** *** 2549,2554 ****

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

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

    !
    Function: int rl_message (va_alist) !
    ! The arguments are a string as would be supplied to printf. The ! resulting string is displayed in the echo area. The echo area is also used to display numeric arguments and search strings.
    --- 2850,2879 ----

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

    !

    !

    !
    Function: int rl_show_char (int c) !
    ! Display character c on rl_outstream. ! If Readline has not been set to display meta characters directly, this ! will convert meta characters to a meta-prefixed key sequence. ! This is intended for use by applications which wish to do their own ! redisplay. !
    ! !

    !

    !

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

    !
    Function: int rl_clear_message () !
    Clear the message in the echo area.
    --- 2882,2887 ----

    !
    Function: int rl_clear_message (void) !
    Clear the message in the echo area.
    *************** *** 2576,2583 ****

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

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

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

    !
    Function: void rl_restore_prompt (void) !
    Restore the local Readline prompt display state saved by the most recent call to rl_save_prompt. *************** *** 2592,2595 **** --- 2906,2933 ----

    +

    +

    +
    Function: int rl_expand_prompt (char *prompt) +
    + Expand any special character sequences in prompt and set up the + local Readline prompt redisplay variables. + This function is called by readline(). It may also be called to + expand the primary prompt if the rl_on_new_line_with_prompt() + function or rl_already_prompted variable is used. + It returns the number of visible characters on the last line of the + (possibly multi-line) prompt. +
    + +

    +

    +

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

    *************** *** 2598,2603 ****

    !
    Function: int rl_insert_text (char *text) !
    Insert text into the line at the current cursor position.
    --- 2936,2941 ----

    !
    Function: int rl_insert_text (const char *text) !
    Insert text into the line at the current cursor position.
    *************** *** 2607,2611 ****
    Function: int rl_delete_text (int start, int end) !
    Delete the text between start and end in the current line.
    --- 2945,2949 ----
    Function: int rl_delete_text (int start, int end) !
    Delete the text between start and end in the current line.
    *************** *** 2615,2619 ****
    Function: char * rl_copy_text (int start, int end) !
    Return a copy of the text between start and end in the current line. --- 2953,2957 ----
    Function: char * rl_copy_text (int start, int end) !
    Return a copy of the text between start and end in the current line. *************** *** 2624,2628 ****
    Function: int rl_kill_text (int start, int end) !
    Copy the text between start and end in the current line to the kill ring, appending or prepending to the last kill if the --- 2962,2966 ----
    Function: int rl_kill_text (int start, int end) !
    Copy the text between start and end in the current line to the kill ring, appending or prepending to the last kill if the *************** *** 2634,2648 ****

    !

    Utility Functions

    !
    Function: int rl_read_key () !
    ! Return the next character available. This handles input inserted into ! the input stream via pending input (see section Readline Variables) ! and rl_stuff_char (), macros, and characters read from the keyboard.
    --- 2972,2999 ----

    +

    +

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

    !

    Character Input

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

    !
    Function: int rl_getc (FILE *) !
    ! Return the next character available from the keyboard.
    --- 3001,3008 ----

    !
    Function: int rl_getc (FILE *stream) !
    ! Return the next character available from stream, which is assumed to ! be the keyboard.
    *************** *** 2659,2666 ****
    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 ().
    --- 3011,3018 ----
    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().
    *************** *** 2668,2675 ****

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

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

    !
    Function: int rl_initialize () !
    ! Initialize or re-initialize Readline's internal state.
    --- 3029,3037 ----

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

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

    !
    Function: int alphabetic (int c) !
    ! Return 1 if c is an alphabetic character.
    --- 3039,3107 ----

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

    ! ! !

    Terminal Management

    ! !

    !

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

    !

    !

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

    !

    !

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

    !

    !

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

    + + +

    Utility Functions

    +

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

    !
    Function: int numeric (int c) !
    ! Return 1 if c is a numeric character.
    --- 3109,3117 ----

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

    !
    Function: int ding () !
    Ring the terminal bell, obeying the setting of bell-style.
    --- 3119,3124 ----

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

    Function: void rl_display_match_list (char **matches, int len, int max) !
    A convenience function for displaying a list of strings in columnar format on Readline's output stream. matches is the list --- 3127,3140 ----

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

    +

    +

    Function: void rl_display_match_list (char **matches, int len, int max) !
    A convenience function for displaying a list of strings in columnar format on Readline's output stream. matches is the list *************** *** 2733,2743 ****

    ! The following are implemented as macros, defined in chartypes.h.

    !
    Function: int uppercase_p (int c) !
    Return 1 if c is an uppercase alphabetic character.
    --- 3148,3159 ----

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

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

    !
    Function: int lowercase_p (int c) !
    Return 1 if c is a lowercase alphabetic character.
    --- 3162,3167 ----

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

    !
    Function: int digit_p (int c) !
    Return 1 if c is a numeric character.
    --- 3170,3175 ----

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

    !
    Function: int to_upper (int c) !
    If c is a lowercase alphabetic character, return the corresponding uppercase character. --- 3178,3183 ----

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

    !
    Function: int to_lower (int c) !
    If c is an uppercase alphabetic character, return the corresponding lowercase character. --- 3187,3192 ----

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

    !
    Function: int digit_value (int c) !
    If c is a number, return the value it represents.
    --- 3196,3201 ----

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

    Alternate Interface

    --- 3204,3265 ---- !

    Miscellaneous Functions

    ! !

    !

    !
    Function: int rl_macro_bind (const char *keyseq, const char *macro, Keymap map) !
    ! Bind the key sequence keyseq to invoke the macro macro. ! The binding is performed in map. When keyseq is invoked, the ! macro will be inserted into the line. This function is deprecated; ! use rl_generic_bind() instead. !
    ! !

    !

    !

    !
    Function: void rl_macro_dumper (int readable) !
    ! Print the key sequences bound to macros and their values, using ! the current keymap, to rl_outstream. ! If readable is non-zero, the list is formatted in such a way ! that it can be made part of an inputrc file and re-read. !
    ! !

    !

    !

    !
    Function: int rl_variable_bind (const char *variable, const char *value) !
    ! Make the Readline variable variable have value. ! This behaves as if the readline command ! `set variable value' had been executed in an inputrc ! file (see section Readline Init File Syntax). !
    ! !

    !

    !

    !
    Function: void rl_variable_dumper (int readable) !
    ! Print the readline variable names and their current values ! to rl_outstream. ! If readable is non-zero, the list is formatted in such a way ! that it can be made part of an inputrc file and re-read. !
    ! !

    !

    !

    !
    Function: int rl_set_paren_blink_timeout (int u) !
    ! Set the time interval (in microseconds) that Readline waits when showing ! a balancing character when blink-matching-paren has been enabled. !
    ! !

    ! ! !

    Alternate Interface

    *************** *** 2801,2809 ****

    !
    Function: void rl_callback_handler_install (char *prompt, Vfunction *lhandler) !
    Set up the terminal for readline I/O and display the initial expanded value of prompt. Save the value of lhandler to ! use as a callback when a complete line of input has been entered.
    --- 3274,3283 ----

    !
    Function: void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler) !
    Set up the terminal for readline I/O and display the initial expanded value of prompt. Save the value of lhandler to ! use as a function to call when a complete line of input has been entered. ! The function takes the text of the line as an argument.
    *************** *** 2811,2816 ****

    !
    Function: void rl_callback_read_char () !
    Whenever an application determines that keyboard input is available, it should call rl_callback_read_char(), which will read the next --- 3285,3290 ----

    !
    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 *************** *** 2825,2830 ****

    !
    Function: void rl_callback_handler_remove () !
    Restore the terminal to its initial state and remove the line handler. This may be called from within a callback as well as independently. --- 3299,3304 ----

    !
    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. *************** *** 2834,2838 **** !

    An Example

    --- 3308,3312 ---- !

    A Readline Example

    *************** *** 2892,2899 **** for (i = start; i != end; i++) { ! if (uppercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = to_lower (rl_line_buffer[i]); ! else if (lowercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = to_upper (rl_line_buffer[i]); } /* Move point to on top of the last character changed. */ --- 3366,3373 ---- for (i = start; i != end; i++) { ! if (_rl_uppercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]); ! else if (_rl_lowercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]); } /* Move point to on top of the last character changed. */ *************** *** 2905,2920 **** !

    Readline Signal Handling

    Signals are asynchronous events sent to a process by the Unix kernel, sometimes on behalf of another process. They are intended to indicate ! exceptional events, like a user pressing the interrupt key on his ! terminal, or a network connection being broken. There is a class of ! signals that can be sent to the process currently reading input from ! the keyboard. Since Readline changes the terminal attributes when it ! is called, it needs to perform special processing when a signal is ! received to restore the terminal to a sane state, or provide application ! writers with functions to do so manually.

    --- 3379,3394 ---- !

    Readline Signal Handling

    Signals are asynchronous events sent to a process by the Unix kernel, sometimes on behalf of another process. They are intended to indicate ! exceptional events, like a user pressing the interrupt key on his terminal, ! or a network connection being broken. There is a class of signals that can ! be sent to the process currently reading input from the keyboard. Since ! Readline changes the terminal attributes when it is called, it needs to ! perform special processing when such a signal is received in order to ! restore the terminal to a sane state, or provide application writers with ! functions to do so manually.

    *************** *** 2925,2930 **** When one of these signals is received, the signal handler will reset the terminal attributes to those that were in effect before ! readline () was called, reset the signal handling to what it was ! before readline () was called, and resend the signal to the calling application. If and when the calling application's signal handler returns, Readline --- 3399,3404 ---- When one of these signals is received, the signal handler will reset the terminal attributes to those that were in effect before ! readline() was called, reset the signal handling to what it was ! before readline() was called, and resend the signal to the calling application. If and when the calling application's signal handler returns, Readline *************** *** 2932,2936 **** When a SIGINT is received, the Readline signal handler performs some additional work, which will cause any partially-entered line to be ! aborted (see the description of rl_free_line_state ()).

    --- 3406,3410 ---- When a SIGINT is received, the Readline signal handler performs some additional work, which will cause any partially-entered line to be ! aborted (see the description of rl_free_line_state() below).

    *************** *** 2939,2949 **** the kernel sends to a process whenever the terminal's size changes (for example, if a user resizes an xterm). The Readline SIGWINCH ! handler updates Readline's internal screen size state, and then calls any ! SIGWINCH signal handler the calling application has installed. Readline calls the application's SIGWINCH signal handler without resetting the terminal to its original state. If the application's signal handler does more than update its idea of the terminal size and return (for example, a longjmp back to a main processing loop), it must ! call rl_cleanup_after_signal () (described below), to restore the terminal state. --- 3413,3423 ---- the kernel sends to a process whenever the terminal's size changes (for example, if a user resizes an xterm). The Readline SIGWINCH ! handler updates Readline's internal screen size information, and then calls ! any SIGWINCH signal handler the calling application has installed. Readline calls the application's SIGWINCH signal handler without resetting the terminal to its original state. If the application's signal handler does more than update its idea of the terminal size and return (for example, a longjmp back to a main processing loop), it must ! call rl_cleanup_after_signal() (described below), to restore the terminal state. *************** *** 2953,2957 **** control whether or not it will catch certain signals and act on them when they are received. It is important that applications change the ! values of these variables only when calling readline (), not in a signal handler, so Readline's internal signal state is not corrupted. --- 3427,3431 ---- control whether or not it will catch certain signals and act on them when they are received. It is important that applications change the ! values of these variables only when calling readline(), not in a signal handler, so Readline's internal signal state is not corrupted. *************** *** 2960,2964 ****
    Variable: int rl_catch_signals !
    If this variable is non-zero, Readline will install signal handlers for SIGINT, SIGQUIT, SIGTERM, SIGALRM, --- 3434,3438 ----
    Variable: int rl_catch_signals !
    If this variable is non-zero, Readline will install signal handlers for SIGINT, SIGQUIT, SIGTERM, SIGALRM, *************** *** 2974,2978 ****
    Variable: int rl_catch_sigwinch !
    If this variable is non-zero, Readline will install a signal handler for SIGWINCH. --- 3448,3452 ----
    Variable: int rl_catch_sigwinch !
    If this variable is non-zero, Readline will install a signal handler for SIGWINCH. *************** *** 2995,3001 ****
    Function: void rl_cleanup_after_signal (void) !
    This function will reset the state of the terminal to what it was before ! readline () was called, and remove the Readline signal handlers for all signals, depending on the values of rl_catch_signals and rl_catch_sigwinch. --- 3469,3475 ----
    Function: void rl_cleanup_after_signal (void) !
    This function will reset the state of the terminal to what it was before ! readline() was called, and remove the Readline signal handlers for all signals, depending on the values of rl_catch_signals and rl_catch_sigwinch. *************** *** 3006,3014 ****
    Function: void rl_free_line_state (void) !
    This will free any partial state associated with the current input line (undo information, any partial history entry, any partially-entered keyboard macro, and any partially-entered numeric argument). This ! should be called before rl_cleanup_after_signal (). The Readline signal handler for SIGINT calls this to abort the current input line. --- 3480,3488 ----
    Function: void rl_free_line_state (void) !
    This will free any partial state associated with the current input line (undo information, any partial history entry, any partially-entered keyboard macro, and any partially-entered numeric argument). This ! should be called before rl_cleanup_after_signal(). The Readline signal handler for SIGINT calls this to abort the current input line. *************** *** 3019,3023 ****
    Function: void rl_reset_after_signal (void) !
    This will reinitialize the terminal and reinstall any Readline signal handlers, depending on the values of rl_catch_signals and --- 3493,3497 ----
    Function: void rl_reset_after_signal (void) !
    This will reinitialize the terminal and reinstall any Readline signal handlers, depending on the values of rl_catch_signals and *************** *** 3028,3033 ****

    If an application does not wish Readline to catch SIGWINCH, it may ! call rl_resize_terminal () to force Readline to update its idea of ! the terminal size when a SIGWINCH is received.

    --- 3502,3508 ----

    If an application does not wish Readline to catch SIGWINCH, it may ! call rl_resize_terminal() or rl_set_screen_size() to force ! Readline to update its idea of the terminal size when a SIGWINCH ! is received.

    *************** *** 3035,3040 ****
    Function: void rl_resize_terminal (void) !
    ! Update Readline's internal screen size.
    --- 3510,3539 ----
    Function: void rl_resize_terminal (void) !
    ! Update Readline's internal screen size by reading values from the kernel. !
    ! !

    !

    !

    !
    Function: void rl_set_screen_size (int rows, int cols) !
    ! Set Readline's idea of the terminal size to rows rows and ! cols columns. !
    ! !

    !

    ! If an application does not want to install a SIGWINCH handler, but ! is still interested in the screen dimensions, Readline's idea of the screen ! size may be queried. ! !

    !

    !

    !
    Function: void rl_get_screen_size (int *rows, int *cols) !
    ! Return Readline's idea of the terminal's size in the ! variables pointed to by the arguments.
    *************** *** 3047,3051 ****
    Function: int rl_set_signals (void) !
    Install Readline's signal handler for SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, --- 3546,3550 ----
    Function: int rl_set_signals (void) !
    Install Readline's signal handler for SIGINT, SIGQUIT, SIGTERM, SIGALRM, SIGTSTP, SIGTTIN, *************** *** 3058,3064 ****
    Function: int rl_clear_signals (void) !
    Remove all of the Readline signal handlers installed by ! rl_set_signals ().
    --- 3557,3563 ----
    Function: int rl_clear_signals (void) !
    Remove all of the Readline signal handlers installed by ! rl_set_signals().
    *************** *** 3066,3070 **** !

    Custom Completers

    --- 3565,3569 ---- !

    Custom Completers

    *************** *** 3078,3090 ****

    !

    How Completing Works

    --- 3577,3589 ----

    !

    How Completing Works

    *************** *** 3107,3115 ****

  • ! The user-interface function rl_complete (). This function is ! called with the same arguments as other Readline ! functions intended for interactive use: count and ! invoking_key. It isolates the word to be completed and calls ! completion_matches () to generate a list of possible completions. It then either lists the possible completions, inserts the possible completions, or actually performs the --- 3606,3614 ----
  • ! The user-interface function rl_complete(). This function is ! called with the same arguments as other bindable Readline functions: ! count and invoking_key. ! It isolates the word to be completed and calls ! rl_completion_matches() to generate a list of possible completions. It then either lists the possible completions, inserts the possible completions, or actually performs the *************** *** 3118,3136 ****
  • ! The internal function completion_matches () uses your ! generator function to generate the list of possible matches, and ! then returns the array of these matches. You should place the address ! of your generator function in rl_completion_entry_function.
  • The generator function is called repeatedly from ! completion_matches (), returning a string each time. The arguments to the generator function are text and state. text is the partial word to be completed. state is zero the first time the function is called, allowing the generator to perform any necessary initialization, and a positive non-zero integer for ! each subsequent call. When the generator function returns ! (char *)NULL this signals completion_matches () that there are no more possibilities left. Usually the generator function computes the list of possible completions when state is zero, and returns them --- 3617,3636 ----
  • ! The internal function rl_completion_matches() uses an ! application-supplied generator function to generate the list of ! possible matches, and then returns the array of these matches. ! The caller should place the address of its generator function in ! rl_completion_entry_function.
  • The generator function is called repeatedly from ! rl_completion_matches(), returning a string each time. The arguments to the generator function are text and state. text is the partial word to be completed. state is zero the first time the function is called, allowing the generator to perform any necessary initialization, and a positive non-zero integer for ! each subsequent call. The generator function returns ! (char *)NULL to inform rl_completion_matches() that there are no more possibilities left. Usually the generator function computes the list of possible completions when state is zero, and returns them *************** *** 3144,3151 ****
    Function: int rl_complete (int ignore, int invoking_key) !
    Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see ! completion_matches ()). The default is to do filename completion.
    --- 3644,3651 ----
    Function: int rl_complete (int ignore, int invoking_key) !
    Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see ! rl_completion_matches()). The default is to do filename completion.
    *************** *** 3153,3162 ****

    !
    Variable: Function * rl_completion_entry_function !
    ! This is a pointer to the generator function for completion_matches ! (). If the value of rl_completion_entry_function is ! (Function *)NULL then the default filename generator function, ! filename_completion_function (), is used.
    --- 3653,3663 ----

    !
    Variable: rl_compentry_func_t * rl_completion_entry_function !
    ! This is a pointer to the generator function for ! rl_completion_matches(). ! If the value of rl_completion_entry_function is ! NULL then the default filename generator ! function, rl_filename_completion_function(), is used.
    *************** *** 3164,3168 **** !

    Completion Functions

    --- 3665,3669 ---- !

    Completion Functions

    *************** *** 3174,3178 ****

    Function: int rl_complete_internal (int what_to_do) !
    Complete the word at or before point. what_to_do says what to do with the completion. A value of `?' means list the possible --- 3675,3679 ----
    Function: int rl_complete_internal (int what_to_do) !
    Complete the word at or before point. what_to_do says what to do with the completion. A value of `?' means list the possible *************** *** 3187,3196 ****
    Function: int rl_complete (int ignore, int invoking_key) !
    Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see ! completion_matches () and rl_completion_entry_function). The default is to do filename ! completion. This calls rl_complete_internal () with an argument depending on invoking_key.
    --- 3688,3697 ----
    Function: int rl_complete (int ignore, int invoking_key) !
    Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm (see ! rl_completion_matches() and rl_completion_entry_function). The default is to do filename ! completion. This calls rl_complete_internal() with an argument depending on invoking_key.
    *************** *** 3199,3206 ****

    !
    Function: int rl_possible_completions (int count, int invoking_key)) !
    List the possible completions. See description of rl_complete ! (). This calls rl_complete_internal () with an argument of `?'.
    --- 3700,3707 ----

    !
    Function: int rl_possible_completions (int count, int invoking_key) !
    List the possible completions. See description of rl_complete ! (). This calls rl_complete_internal() with an argument of `?'.
    *************** *** 3209,3217 ****

    !
    Function: int rl_insert_completions (int count, int invoking_key)) !
    Insert the list of possible completions into the line, deleting the ! partially-completed word. See description of rl_complete (). ! This calls rl_complete_internal () with an argument of `*'.
    --- 3710,3718 ----

    !
    Function: int rl_insert_completions (int count, int invoking_key) !
    Insert the list of possible completions into the line, deleting the ! partially-completed word. See description of rl_complete(). ! This calls rl_complete_internal() with an argument of `*'.
    *************** *** 3219,3226 ****

    !
    Function: char ** completion_matches (char *text, CPFunction *entry_func) !
    ! Returns an array of (char *) which is a list of completions for ! text. If there are no completions, returns (char **)NULL. The first entry in the returned array is the substitution for text. The remaining entries are the possible completions. The array is --- 3720,3727 ----

    !
    Function: char ** rl_completion_matches (const char *text, rl_compentry_func_t *entry_func) !
    ! Returns an array of strings which is a list of completions for ! text. If there are no completions, returns NULL. The first entry in the returned array is the substitution for text. The remaining entries are the possible completions. The array is *************** *** 3230,3234 ****

    entry_func is a function of two args, and returns a ! (char *). The first argument is text. The second is a state argument; it is zero on the first call, and non-zero on subsequent calls. entry_func returns a NULL pointer to the caller --- 3731,3735 ----

    entry_func is a function of two args, and returns a ! char *. The first argument is text. The second is a state argument; it is zero on the first call, and non-zero on subsequent calls. entry_func returns a NULL pointer to the caller *************** *** 3239,3249 ****

    !
    Function: char * filename_completion_function (char *text, int state) !
    ! A generator function for filename completion in the general case. Note ! that completion in Bash is a little different because of all ! the pathnames that must be followed when looking up completions for a ! command. The Bash source is a useful reference for writing custom ! completion functions.
    --- 3740,3750 ----

    !
    Function: char * rl_filename_completion_function (const char *text, int state) !
    ! A generator function for filename completion in the general case. ! text is a partial filename. ! The Bash source is a useful reference for writing custom ! completion functions (the Bash completion functions call this and other ! Readline functions).
    *************** *** 3251,3256 ****

    !
    Function: char * username_completion_function (char *text, int state) !
    A completion generator for usernames. text contains a partial username preceded by a random character (usually `~'). As with all --- 3752,3757 ----

    !
    Function: char * rl_username_completion_function (const char *text, int state) !
    A completion generator for usernames. text contains a partial username preceded by a random character (usually `~'). As with all *************** *** 3262,3273 **** !

    Completion Variables

    !
    Variable: Function * rl_completion_entry_function !
    ! A pointer to the generator function for completion_matches (). ! NULL means to use filename_completion_function (), the default filename completer.
    --- 3763,3774 ---- !

    Completion Variables

    !
    Variable: rl_compentry_func_t * rl_completion_entry_function !
    ! A pointer to the generator function for rl_completion_matches(). ! NULL means to use rl_filename_completion_function(), the default filename completer.
    *************** *** 3276,3289 ****

    !
    Variable: CPPFunction * rl_attempted_completion_function !
    A pointer to an alternative function to create matches. The function is called with text, start, and end. ! start and end are indices in rl_line_buffer saying ! what the boundaries of text are. If this function exists and ! returns NULL, or if this variable is set to NULL, then ! rl_complete () will call the value of rl_completion_entry_function to generate matches, otherwise the array of strings returned will be used.
    --- 3777,3793 ----

    !
    Variable: rl_completion_func_t * rl_attempted_completion_function !
    A pointer to an alternative function to create matches. The function is called with text, start, and end. ! start and end are indices in rl_line_buffer defining ! the boundaries of text, which is a character string. ! If this function exists and returns NULL, or if this variable is ! set to NULL, then rl_complete() will call the value of rl_completion_entry_function to generate matches, otherwise the array of strings returned will be used. + If this function sets the rl_attempted_completion_over + variable to a non-zero value, Readline will not perform its default + completion even if this function returns no matches.
    *************** *** 3291,3298 ****

    !
    Variable: CPFunction * rl_filename_quoting_function !
    ! A pointer to a function that will quote a filename in an application- ! specific fashion. This is called if filename completion is being attempted and one of the characters in rl_filename_quote_characters appears in a completed filename. The function is called with --- 3795,3802 ----

    !
    Variable: rl_quote_func_t * rl_filename_quoting_function !
    ! A pointer to a function that will quote a filename in an ! application-specific fashion. This is called if filename completion is being attempted and one of the characters in rl_filename_quote_characters appears in a completed filename. The function is called with *************** *** 3309,3314 ****

    !
    Variable: CPFunction * rl_filename_dequoting_function !
    A pointer to a function that will remove application-specific quoting characters from a filename before completion is attempted, so those --- 3813,3818 ----

    !
    Variable: rl_dequote_func_t * rl_filename_dequoting_function !
    A pointer to a function that will remove application-specific quoting characters from a filename before completion is attempted, so those *************** *** 3323,3331 ****

    !
    Variable: Function * rl_char_is_quoted_p !
    A pointer to a function to call that determines whether or not a specific character in the line buffer is quoted, according to whatever quoting ! mechanism the program calling readline uses. The function is called with two arguments: text, the text of the line, and index, the index of the character in the line. It is used to decide whether a --- 3827,3835 ----

    !
    Variable: rl_linebuf_func_t * rl_char_is_quoted_p !
    A pointer to a function to call that determines whether or not a specific character in the line buffer is quoted, according to whatever quoting ! mechanism the program calling Readline uses. The function is called with two arguments: text, the text of the line, and index, the index of the character in the line. It is used to decide whether a *************** *** 3338,3342 ****
    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 --- 3842,3846 ----
    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 *************** *** 3347,3355 ****

    !
    Variable: char * rl_basic_word_break_characters !
    The basic list of characters that signal a break between words for the completer routine. The default value of this variable is the characters ! which break words for completion in Bash, i.e., " \t\n\"\\'`@$><=;|&{(".
    --- 3851,3859 ----

    !
    Variable: const char * rl_basic_word_break_characters !
    The basic list of characters that signal a break between words for the completer routine. The default value of this variable is the characters ! which break words for completion in Bash: " \t\n\"\\'`@$><=;|&{(".
    *************** *** 3358,3364 ****

    !
    Variable: char * rl_basic_quote_characters !
    ! List of quote characters which can cause a word break.
    --- 3862,3868 ----

    !
    Variable: const char * rl_basic_quote_characters !
    ! A list of quote characters which can cause a word break.
    *************** *** 3366,3373 ****

    !
    Variable: char * rl_completer_word_break_characters !
    The list of characters that signal a break between words for ! rl_complete_internal (). The default list is the value of rl_basic_word_break_characters.
    --- 3870,3877 ----

    !
    Variable: const char * rl_completer_word_break_characters !
    The list of characters that signal a break between words for ! rl_complete_internal(). The default list is the value of rl_basic_word_break_characters.
    *************** *** 3376,3382 ****

    !
    Variable: char * rl_completer_quote_characters !
    ! List of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, --- 3880,3886 ----

    !
    Variable: const char * rl_completer_quote_characters !
    ! A list of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring rl_completer_word_break_characters are treated as any other character, *************** *** 3387,3392 ****

    !
    Variable: char * rl_filename_quote_characters !
    A list of characters that cause a filename to be quoted by the completer when they appear in a completed filename. The default is the null string. --- 3891,3896 ----

    !
    Variable: const char * rl_filename_quote_characters !
    A list of characters that cause a filename to be quoted by the completer when they appear in a completed filename. The default is the null string. *************** *** 3396,3401 ****

    !
    Variable: char * rl_special_prefixes !
    The list of characters that are word break characters, but should be left in text when it is passed to the completion function. --- 3900,3905 ----

    !
    Variable: const char * rl_special_prefixes !
    The list of characters that are word break characters, but should be left in text when it is passed to the completion function. *************** *** 3409,3413 ****
    Variable: int rl_completion_append_character !
    When a single completion alternative matches at the end of the command line, this character is appended to the inserted completion text. The --- 3913,3917 ----
    Variable: int rl_completion_append_character !
    When a single completion alternative matches at the end of the command line, this character is appended to the inserted completion text. The *************** *** 3423,3428 ****
    Variable: int rl_ignore_completion_duplicates !
    ! If non-zero, then disallow duplicates in the matches. Default is 1.
    --- 3927,3933 ----
    Variable: int rl_ignore_completion_duplicates !
    ! If non-zero, then duplicates in the matches are removed. ! The default is 1.
    *************** *** 3431,3441 ****
    Variable: int rl_filename_completion_desired !
    Non-zero means that the results of the matches are to be treated as filenames. This is always zero on entry, and can only be changed within a completion entry generator function. If it is set to a non-zero value, directory names have a slash appended and Readline attempts to ! quote completed filenames if they contain any embedded word break ! characters.
    --- 3936,3947 ----
    Variable: int rl_filename_completion_desired !
    Non-zero means that the results of the matches are to be treated as filenames. This is always zero on entry, and can only be changed within a completion entry generator function. If it is set to a non-zero value, directory names have a slash appended and Readline attempts to ! quote completed filenames if they contain any characters in ! rl_filename_quote_characters and rl_filename_quoting_desired ! is set to a non-zero value.
    *************** *** 3444,3448 ****
    Variable: int rl_filename_quoting_desired !
    Non-zero means that the results of the matches are to be quoted using double quotes (or an application-specific quoting mechanism) if the --- 3950,3954 ----
    Variable: int rl_filename_quoting_desired !
    Non-zero means that the results of the matches are to be quoted using double quotes (or an application-specific quoting mechanism) if the *************** *** 3457,3463 ****

    Variable: int rl_inhibit_completion !
    ! If this variable is non-zero, completion is inhibit<ed. The completion character will be inserted as any other bound to self-insert.
    --- 3963,3991 ----

    +
    Variable: int rl_attempted_completion_over +
    + If an application-specific completion function assigned to + rl_attempted_completion_function sets this variable to a non-zero + value, Readline will not perform its default filename completion even + if the application's completion function returns no matches. + It should be set only by an application's completion function. +
    + +

    +

    +

    +
    Variable: int rl_completion_type +
    + Set to a character describing the type of completion Readline is currently + attempting; see the description of rl_complete_internal() + (see section Completion Functions) for the list of characters. +
    + +

    +

    +

    Variable: int rl_inhibit_completion !
    ! If this variable is non-zero, completion is inhibited. The completion character will be inserted as any other bound to self-insert.
    *************** *** 3466,3471 ****

    !
    Variable: Function * 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. --- 3994,3999 ----

    !
    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. *************** *** 3480,3489 ****

    !
    Variable: Function * 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. It could be used ! to expand symbolic links or shell variables in pathnames.
    --- 4008,4023 ----

    !
    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.
    *************** *** 3491,3496 ****

    !
    Variable: VFunction * 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. --- 4025,4030 ----

    !
    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. *************** *** 3509,3513 **** !

    A Short Completion Example

    --- 4043,4047 ---- !

    A Short Completion Example

    *************** *** 3534,3543 **** #include <readline/history.h> - extern char *getwd (); extern char *xmalloc (); /* The names of functions that actually do the manipulation. */ ! int com_list (), com_view (), com_rename (), com_stat (), com_pwd (); ! int com_delete (), com_help (), com_cd (), com_quit (); /* A structure which contains information on the commands this program --- 4068,4083 ---- #include <readline/history.h> extern char *xmalloc (); /* The names of functions that actually do the manipulation. */ ! int com_list __P((char *)); ! int com_view __P((char *)); ! int com_rename __P((char *)); ! int com_stat __P((char *)); ! int com_pwd __P((char *)); ! int com_delete __P((char *)); ! int com_help __P((char *)); ! int com_cd __P((char *)); ! int com_quit __P((char *)); /* A structure which contains information on the commands this program *************** *** 3546,3550 **** typedef struct { char *name; /* User printable name of the function. */ ! Function *func; /* Function to call to do the job. */ char *doc; /* Documentation for this function. */ } COMMAND; --- 4086,4090 ---- typedef struct { char *name; /* User printable name of the function. */ ! rl_icpfunc_t *func; /* Function to call to do the job. */ char *doc; /* Documentation for this function. */ } COMMAND; *************** *** 3562,3566 **** { "stat", com_stat, "Print out statistics on FILE" }, { "view", com_view, "View the contents of FILE" }, ! { (char *)NULL, (Function *)NULL, (char *)NULL } }; --- 4102,4106 ---- { "stat", com_stat, "Print out statistics on FILE" }, { "view", com_view, "View the contents of FILE" }, ! { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; *************** *** 3572,3576 **** char *progname; ! /* When non-zero, this global means the user is done using this program. */ int done; --- 4112,4116 ---- char *progname; ! /* When non-zero, this means the user is done using this program. */ int done; *************** *** 3702,3711 **** /* **************************************************************** */ ! char *command_generator (); ! char **fileman_completion (); ! /* Tell the GNU Readline library how to complete. We want to try to complete ! on command names if this is the first word in the line, or on filenames ! if not. */ initialize_readline () { --- 4242,4251 ---- /* **************************************************************** */ ! char *command_generator __P((const char *, int)); ! char **fileman_completion __P((const char *, int, int)); ! /* Tell the GNU Readline library how to complete. We want to try to ! complete on command names if this is the first word in the line, or ! on filenames if not. */ initialize_readline () { *************** *** 3714,3728 **** /* Tell the completer that we want a crack first. */ ! rl_attempted_completion_function = (CPPFunction *)fileman_completion; } ! /* Attempt to complete on the contents of TEXT. START and END bound the ! region of rl_line_buffer that contains the word to complete. TEXT is ! the word to complete. We can use the entire contents of rl_line_buffer ! in case we want to do some simple parsing. Return the array of matches, ! or NULL if there aren't any. */ char ** fileman_completion (text, start, end) ! char *text; int start, end; { --- 4254,4268 ---- /* Tell the completer that we want a crack first. */ ! rl_attempted_completion_function = fileman_completion; } ! /* Attempt to complete on the contents of TEXT. START and END ! bound the region of rl_line_buffer that contains the word to ! complete. TEXT is the word to complete. We can use the entire ! contents of rl_line_buffer in case we want to do some simple ! parsing. Returnthe array of matches, or NULL if there aren't any. */ char ** fileman_completion (text, start, end) ! const char *text; int start, end; { *************** *** 3735,3749 **** directory. */ if (start == 0) ! matches = completion_matches (text, command_generator); return (matches); } ! /* Generator function for command completion. STATE lets us know whether ! to start from scratch; without any state (i.e. STATE == 0), then we ! start at the top of the list. */ char * command_generator (text, state) ! char *text; int state; { --- 4275,4289 ---- directory. */ if (start == 0) ! matches = rl_completion_matches (text, command_generator); return (matches); } ! /* Generator function for command completion. STATE lets us ! know whether to start from scratch; without any state ! (i.e. STATE == 0), then we start at the top of the list. */ char * command_generator (text, state) ! const char *text; int state; { *************** *** 3751,3757 **** char *name; ! /* If this is a new word to complete, initialize now. This includes ! saving the length of TEXT for efficiency, and initializing the index ! variable to 0. */ if (!state) { --- 4291,4297 ---- char *name; ! /* If this is a new word to complete, initialize now. This ! includes saving the length of TEXT for efficiency, and ! initializing the index variable to 0. */ if (!state) { *************** *** 3760,3764 **** } ! /* Return the next name which partially matches from the command list. */ while (name = commands[list_index].name) { --- 4300,4305 ---- } ! /* Return the next name which partially matches from the ! command list. */ while (name = commands[list_index].name) { *************** *** 3905,3909 **** char dir[1024], *s; ! s = getwd (dir); if (s == 0) { --- 4446,4450 ---- char dir[1024], *s; ! s = getcwd (dir, sizeof(dir) - 1); if (s == 0) { *************** *** 3916,3920 **** } ! /* The user wishes to quit using this program. Just set DONE non-zero. */ com_quit (arg) char *arg; --- 4457,4462 ---- } ! /* The user wishes to quit using this program. Just set DONE ! non-zero. */ com_quit (arg) char *arg; *************** *** 3951,3955 **** !

    Concept Index

    Jump to: --- 4493,4497 ---- !

    Concept Index

    Jump to: *************** *** 3966,3969 **** --- 4508,4513 ---- r - + v + - y

    *************** *** 3992,3996 ****

    r

    !
  • readline, function
  • y

    --- 4536,4544 ----

    r

    !
  • readline, function !
  • !

    v

    ! !
  • variables, readline
  • y

    *************** *** 4002,4008 **** !

    Function and Variable Index

    Jump to: a - --- 4550,4558 ---- !

    Function and Variable Index

    Jump to: + _ + - a - *************** *** 4023,4028 **** k - - l - - m - --- 4573,4576 ---- *************** *** 4047,4325 **** y

    a

    !
  • abort (C-g) !
  • accept-line (Newline, Return) !
  • alphabetic
  • b

    !
  • backward-char (C-b) !
  • backward-delete-char (Rubout) !
  • backward-kill-line (C-x Rubout) !
  • backward-kill-word (M-DEL) !
  • backward-word (M-b) !
  • beginning-of-history (M-&#60;) !
  • beginning-of-line (C-a) !
  • bell-style
  • c

    !
  • call-last-kbd-macro (C-x e) !
  • capitalize-word (M-c) !
  • character-search (C-]) !
  • character-search-backward (M-C-]) !
  • clear-screen (C-l) !
  • comment-begin !
  • complete (TAB) !
  • completion-query-items !
  • completion_matches !
  • convert-meta !
  • copy-backward-word () !
  • copy-forward-word () !
  • copy-region-as-kill ()
  • d

    !
  • delete-char (C-d) !
  • delete-char-or-list () !
  • delete-horizontal-space () !
  • digit-argument (M-0, M-1, ... M--) !
  • digit_p !
  • digit_value !
  • ding !
  • disable-completion !
  • do-uppercase-version (M-a, M-b, M-x, ...) !
  • downcase-word (M-l) !
  • dump-functions () !
  • dump-macros () !
  • dump-variables ()
  • e

    !
  • editing-mode !
  • enable-keypad !
  • end-kbd-macro (C-x )) !
  • end-of-history (M-&#62;) !
  • end-of-line (C-e) !
  • exchange-point-and-mark (C-x C-x) !
  • expand-tilde
  • f

    !
  • filename_completion_function !
  • forward-backward-delete-char () !
  • forward-char (C-f) !
  • forward-search-history (C-s) !
  • forward-word (M-f) !
  • free_undo_list
  • h

    !
  • history-search-backward () !
  • history-search-forward () !
  • horizontal-scroll-mode
  • i

    !
  • input-meta !
  • insert-comment (M-#) !
  • insert-completions (M-*) !
  • isearch-terminators
  • k

    !
  • keymap !
  • kill-line (C-k) !
  • kill-region () !
  • kill-whole-line () !
  • kill-word (M-d) !
  • !

    l

    ! !
  • lowercase_p
  • m

    !
  • mark-modified-lines !
  • menu-complete () !
  • meta-flag
  • n

    !
  • next-history (C-n) !
  • non-incremental-forward-search-history (M-n) !
  • non-incremental-reverse-search-history (M-p) !
  • numeric
  • o

    !
  • output-meta
  • p

    !
  • possible-completions (M-?) !
  • prefix-meta (ESC) !
  • previous-history (C-p)
  • q

    !
  • quoted-insert (C-q, C-v)
  • r

    !
  • re-read-init-file (C-x C-r) !
  • readline !
  • redraw-current-line () !
  • reverse-search-history (C-r) !
  • revert-line (M-r) !
  • rl_add_defun !
  • rl_add_undo !
  • rl_already_prompted !
  • rl_attempted_completion_function !
  • rl_basic_quote_characters !
  • rl_basic_word_break_characters !
  • rl_begin_undo_group !
  • rl_bind_key !
  • rl_bind_key_in_map !
  • rl_binding_keymap !
  • rl_callback_handler_install !
  • rl_callback_handler_remove !
  • rl_callback_read_char !
  • rl_catch_signals !
  • rl_catch_sigwinch !
  • rl_char_is_quoted_p !
  • rl_cleanup_after_signal !
  • rl_clear_message !
  • rl_clear_signals !
  • rl_complete, rl_complete !
  • rl_complete_internal !
  • rl_completer_quote_characters !
  • rl_completer_word_break_characters !
  • rl_completion_append_character !
  • rl_completion_display_matches_hook !
  • rl_completion_entry_function, rl_completion_entry_function !
  • rl_completion_query_items !
  • rl_copy_keymap !
  • rl_copy_text !
  • rl_delete_text !
  • rl_directory_completion_hook !
  • rl_discard_keymap !
  • rl_display_match_list !
  • rl_do_undo !
  • rl_done !
  • rl_end !
  • rl_end_undo_group !
  • rl_erase_empty_line !
  • rl_event_hook !
  • rl_executing_keymap !
  • rl_extend_line_buffer !
  • rl_filename_completion_desired !
  • rl_filename_dequoting_function !
  • rl_filename_quote_characters !
  • rl_filename_quoting_desired !
  • rl_filename_quoting_function !
  • rl_forced_update_display !
  • rl_free_line_state !
  • rl_function_dumper !
  • rl_function_of_keyseq !
  • rl_funmap_names !
  • rl_generic_bind !
  • rl_get_keymap !
  • rl_get_keymap_by_name !
  • rl_get_keymap_name !
  • rl_getc !
  • rl_getc_function !
  • rl_ignore_completion_duplicates !
  • rl_ignore_some_completions_function !
  • rl_inhibit_completion !
  • rl_initialize !
  • rl_insert_completions !
  • rl_insert_text !
  • rl_instream !
  • rl_invoking_keyseqs !
  • rl_invoking_keyseqs_in_map !
  • rl_kill_text !
  • rl_library_version !
  • rl_line_buffer !
  • rl_list_funmap_names !
  • rl_make_bare_keymap !
  • rl_make_keymap !
  • rl_mark !
  • rl_message !
  • rl_modifying !
  • rl_named_function !
  • rl_on_new_line !
  • rl_on_new_line_with_prompt !
  • rl_outstream !
  • rl_parse_and_bind !
  • rl_pending_input !
  • rl_point !
  • rl_possible_completions !
  • rl_pre_input_hook !
  • rl_prompt !
  • rl_read_init_file !
  • rl_read_key !
  • rl_readline_name !
  • rl_redisplay !
  • rl_redisplay_function !
  • rl_reset_after_signal !
  • rl_reset_line_state !
  • rl_reset_terminal !
  • rl_resize_terminal !
  • rl_restore_prompt !
  • rl_save_prompt !
  • rl_set_keymap !
  • rl_set_signals !
  • rl_special_prefixes !
  • rl_startup_hook !
  • rl_stuff_char !
  • rl_terminal_name !
  • rl_unbind_command_in_map !
  • rl_unbind_function_in_map !
  • rl_unbind_key !
  • rl_unbind_key_in_map
  • s

    !
  • self-insert (a, b, A, 1, !, ...) !
  • set-mark (C-@) !
  • show-all-if-ambiguous !
  • start-kbd-macro (C-x ()
  • t

    !
  • tab-insert (M-TAB) !
  • tilde-expand (M-~) !
  • to_lower !
  • to_upper !
  • transpose-chars (C-t) !
  • transpose-words (M-t)
  • u

    !
  • undo (C-_, C-x C-u) !
  • universal-argument () !
  • unix-line-discard (C-u) !
  • unix-word-rubout (C-w) !
  • upcase-word (M-u) !
  • uppercase_p !
  • username_completion_function
  • v

    !
  • visible-stats
  • y

    !
  • yank (C-y) !
  • yank-last-arg (M-., M-_) !
  • yank-nth-arg (M-C-y) !
  • yank-pop (M-y)

  • ! This document was generated on 1 March 2000 using the texi2html translator version 1.52.

    --- 4595,4905 ---- y

    +

    _

    + +
  • _rl_digit_p +
  • _rl_digit_value +
  • _rl_lowercase_p +
  • _rl_to_lower +
  • _rl_to_upper +
  • _rl_uppercase_p +
  • a

    !
  • abort (C-g) !
  • accept-line (Newline or Return)
  • b

    !
  • backward-char (C-b) !
  • backward-delete-char (Rubout) !
  • backward-kill-line (C-x Rubout) !
  • backward-kill-word (M-DEL) !
  • backward-word (M-b) !
  • beginning-of-history (M-&#60;) !
  • beginning-of-line (C-a) !
  • bell-style
  • c

    !
  • call-last-kbd-macro (C-x e) !
  • capitalize-word (M-c) !
  • character-search (C-]) !
  • character-search-backward (M-C-]) !
  • clear-screen (C-l) !
  • comment-begin !
  • complete (TAB) !
  • completion-query-items !
  • convert-meta !
  • copy-backward-word () !
  • copy-forward-word () !
  • copy-region-as-kill ()
  • d

    !
  • delete-char (C-d) !
  • delete-char-or-list () !
  • delete-horizontal-space () !
  • digit-argument (M-0, M-1, ... M--) !
  • disable-completion !
  • do-uppercase-version (M-a, M-b, M-x, ...) !
  • downcase-word (M-l) !
  • dump-functions () !
  • dump-macros () !
  • dump-variables ()
  • e

    !
  • editing-mode !
  • enable-keypad !
  • end-kbd-macro (C-x )) !
  • end-of-history (M-&#62;) !
  • end-of-line (C-e) !
  • exchange-point-and-mark (C-x C-x) !
  • expand-tilde
  • f

    !
  • forward-backward-delete-char () !
  • forward-char (C-f) !
  • forward-search-history (C-s) !
  • forward-word (M-f)
  • h

    !
  • history-search-backward () !
  • history-search-forward () !
  • horizontal-scroll-mode
  • i

    !
  • input-meta !
  • insert-comment (M-#) !
  • insert-completions (M-*) !
  • isearch-terminators
  • k

    !
  • keymap !
  • kill-line (C-k) !
  • kill-region () !
  • kill-whole-line () !
  • kill-word (M-d)
  • m

    !
  • mark-modified-lines !
  • menu-complete () !
  • meta-flag
  • n

    !
  • next-history (C-n) !
  • non-incremental-forward-search-history (M-n) !
  • non-incremental-reverse-search-history (M-p)
  • o

    !
  • output-meta
  • p

    !
  • possible-completions (M-?) !
  • prefix-meta (ESC) !
  • previous-history (C-p)
  • q

    !
  • quoted-insert (C-q or C-v)
  • r

    !
  • re-read-init-file (C-x C-r) !
  • readline !
  • redraw-current-line () !
  • reverse-search-history (C-r) !
  • revert-line (M-r) !
  • rl_add_defun !
  • rl_add_funmap_entry !
  • rl_add_undo !
  • rl_alphabetic !
  • rl_already_prompted !
  • rl_attempted_completion_function !
  • rl_attempted_completion_over !
  • rl_basic_quote_characters !
  • rl_basic_word_break_characters !
  • rl_begin_undo_group !
  • rl_bind_key !
  • rl_bind_key_in_map !
  • rl_binding_keymap !
  • rl_callback_handler_install !
  • rl_callback_handler_remove !
  • rl_callback_read_char !
  • rl_catch_signals !
  • rl_catch_sigwinch !
  • rl_char_is_quoted_p !
  • rl_cleanup_after_signal !
  • rl_clear_message !
  • rl_clear_pending_input !
  • rl_clear_signals !
  • rl_complete, rl_complete !
  • rl_complete_internal !
  • rl_completer_quote_characters !
  • rl_completer_word_break_characters !
  • rl_completion_append_character !
  • rl_completion_display_matches_hook !
  • rl_completion_entry_function, rl_completion_entry_function !
  • rl_completion_matches !
  • rl_completion_query_items !
  • rl_completion_type !
  • rl_copy_keymap !
  • rl_copy_text !
  • rl_crlf !
  • rl_delete_text !
  • rl_deprep_term_function !
  • rl_deprep_terminal !
  • rl_ding !
  • rl_directory_completion_hook !
  • rl_discard_keymap !
  • rl_dispatching !
  • rl_display_match_list !
  • rl_do_undo !
  • rl_done !
  • rl_editing_mode !
  • rl_end !
  • rl_end_undo_group !
  • rl_erase_empty_line !
  • rl_event_hook !
  • rl_execute_next !
  • rl_executing_keymap !
  • rl_executing_macro !
  • rl_expand_prompt !
  • rl_explicit_arg !
  • rl_extend_line_buffer !
  • rl_filename_completion_desired !
  • rl_filename_completion_function !
  • rl_filename_dequoting_function !
  • rl_filename_quote_characters !
  • rl_filename_quoting_desired !
  • rl_filename_quoting_function !
  • rl_forced_update_display !
  • rl_free_line_state !
  • rl_free_undo_list !
  • rl_function_dumper !
  • rl_function_of_keyseq !
  • rl_funmap_names !
  • rl_generic_bind !
  • rl_get_keymap !
  • rl_get_keymap_by_name !
  • rl_get_keymap_name !
  • rl_get_screen_size !
  • rl_getc !
  • rl_getc_function !
  • rl_gnu_readline_p !
  • rl_ignore_completion_duplicates !
  • rl_ignore_some_completions_function !
  • rl_inhibit_completion !
  • rl_initialize !
  • rl_insert_completions !
  • rl_insert_text !
  • rl_instream !
  • rl_invoking_keyseqs !
  • rl_invoking_keyseqs_in_map !
  • rl_kill_text !
  • rl_last_func !
  • rl_library_version !
  • rl_line_buffer !
  • rl_list_funmap_names !
  • rl_macro_bind !
  • rl_macro_dumper !
  • rl_make_bare_keymap !
  • rl_make_keymap !
  • rl_mark !
  • rl_message !
  • rl_modifying !
  • rl_named_function !
  • rl_num_chars_to_read !
  • rl_numeric_arg !
  • rl_on_new_line !
  • rl_on_new_line_with_prompt !
  • rl_outstream !
  • rl_parse_and_bind !
  • rl_pending_input !
  • rl_point !
  • rl_possible_completions !
  • rl_pre_input_hook !
  • rl_prep_term_function !
  • rl_prep_terminal !
  • rl_prompt !
  • rl_push_macro_input !
  • rl_read_init_file !
  • rl_read_key !
  • rl_readline_name !
  • rl_readline_state !
  • rl_redisplay !
  • rl_redisplay_function !
  • rl_reset_after_signal !
  • rl_reset_line_state !
  • rl_reset_terminal !
  • rl_resize_terminal !
  • rl_restore_prompt !
  • rl_save_prompt !
  • rl_set_key !
  • rl_set_keyboard_input_timeout !
  • rl_set_keymap !
  • rl_set_paren_blink_timeout !
  • rl_set_prompt !
  • rl_set_screen_size !
  • rl_set_signals !
  • rl_show_char !
  • rl_special_prefixes !
  • rl_startup_hook !
  • rl_stuff_char !
  • rl_terminal_name !
  • rl_tty_set_default_bindings !
  • rl_unbind_command_in_map !
  • rl_unbind_function_in_map !
  • rl_unbind_key !
  • rl_unbind_key_in_map !
  • rl_username_completion_function !
  • rl_variable_bind !
  • rl_variable_dumper
  • s

    !
  • self-insert (a, b, A, 1, !, ...) !
  • set-mark (C-@) !
  • show-all-if-ambiguous !
  • start-kbd-macro (C-x ()
  • t

    !
  • tab-insert (M-TAB) !
  • tilde-expand (M-~) !
  • transpose-chars (C-t) !
  • transpose-words (M-t)
  • u

    !
  • undo (C-_ or C-x C-u) !
  • universal-argument () !
  • unix-line-discard (C-u) !
  • unix-word-rubout (C-w) !
  • upcase-word (M-u)
  • v

    !
  • visible-stats
  • y

    !
  • yank (C-y) !
  • yank-last-arg (M-. or M-_) !
  • yank-nth-arg (M-C-y) !
  • yank-pop (M-y)

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

    diff -Nrc2 readline-4.1/doc/readline.info readline-4.2/doc/readline.info *** readline-4.1/doc/readline.info Wed Mar 1 14:52:58 2000 --- readline-4.2/doc/readline.info Mon Apr 16 11:05:39 2001 *************** *** 1,4 **** ! This is Info file readline.info, produced by Makeinfo version 1.68 from ! the input file /usr/homes/chet/src/bash/readline-src/doc/rlman.texinfo. INFO-DIR-SECTION Libraries --- 1,4 ---- ! This is readline.info, produced by makeinfo version 4.0 from ! /usr/homes/chet/src/bash/readline-src/doc/rlman.texinfo. INFO-DIR-SECTION Libraries *************** *** 11,15 **** need to provide a command line interface. ! Copyright (C) 1988-1999 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-2001 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this *************** *** 73,80 **** keystrokes. ! The text is read as `Control-K' and describes the character produced when the key is pressed while the Control key is depressed. ! The text is read as `Meta-K' and describes the character produced when the Meta key (if you have one) is depressed, and the key is pressed. The Meta key is labeled on many keyboards. On --- 73,80 ---- keystrokes. ! The text `C-k' is read as `Control-K' and describes the character produced when the key is pressed while the Control key is depressed. ! The text `M-k' is read as `Meta-K' and describes the character produced when the Meta key (if you have one) is depressed, and the key is pressed. The Meta key is labeled on many keyboards. On *************** *** 87,102 **** If you do not have a Meta or key, or another key working as a Meta key, the identical keystroke can be generated by typing ! first, and then typing . Either process is known as "metafying" the ! key. ! The text is read as `Meta-Control-k' and describes the ! character produced by "metafying" . In addition, several keys have their own names. Specifically, , , , , , and all stand for themselves ! when seen in this text, or in an init file (*note Readline Init ! File::.). If your keyboard lacks a key, typing will ! produce the desired character. The key may be labeled ! or on some keyboards.  --- 87,102 ---- If you do not have a Meta or key, or another key working as a Meta key, the identical keystroke can be generated by typing ! _first_, and then typing . Either process is known as "metafying" ! the key. ! The text `M-C-k' is read as `Meta-Control-k' and describes the ! character produced by "metafying" `C-k'. In addition, several keys have their own names. Specifically, , , , , , and all stand for themselves ! when seen in this text, or in an init file (*note Readline Init File::). ! If your keyboard lacks a key, typing will produce the ! desired character. The key may be labeled or on ! some keyboards.  *************** *** 113,119 **** you move the cursor to the place that needs correction, and delete or insert the text of the corrections. Then, when you are satisfied with ! the line, you simply press . You do not have to be at the end ! of the line to press ; the entire line is accepted regardless ! of the location of the cursor within the line. * Menu: --- 113,119 ---- you move the cursor to the place that needs correction, and delete or insert the text of the corrections. Then, when you are satisfied with ! the line, you simply press . You do not have to be at the end of ! the line to press ; the entire line is accepted regardless of the ! location of the cursor within the line. * Menu: *************** *** 138,143 **** Sometimes you may mistype a character, and not notice the error until you have typed several other characters. In that case, you can ! type to move the cursor to the left, and then correct your ! mistake. Afterwards, you can move the cursor to the right with . When you add text in the middle of a line, you will notice that --- 138,143 ---- Sometimes you may mistype a character, and not notice the error until you have typed several other characters. In that case, you can ! type `C-b' to move the cursor to the left, and then correct your ! mistake. Afterwards, you can move the cursor to the right with `C-f'. When you add text in the middle of a line, you will notice that *************** *** 149,156 **** follows. ! Move back one character. ! Move forward one character. --- 149,156 ---- follows. ! `C-b' Move back one character. ! `C-f' Move forward one character. *************** *** 158,162 **** Delete the character to the left of the cursor. ! Delete the character underneath the cursor. --- 158,162 ---- Delete the character to the left of the cursor. ! `C-d' Delete the character underneath the cursor. *************** *** 164,168 **** Insert the character into the line at the cursor. ! or Undo the last editing command. You can undo all the way back to an empty line. --- 164,168 ---- Insert the character into the line at the cursor. ! `C-_' or `C-x C-u' Undo the last editing command. You can undo all the way back to an empty line. *************** *** 170,174 **** (Depending on your configuration, the key be set to delete the character to the left of the cursor and the key set to delete ! the character underneath the cursor, like , rather than the character to the left of the cursor.) --- 170,174 ---- (Depending on your configuration, the key be set to delete the character to the left of the cursor and the key set to delete ! the character underneath the cursor, like `C-d', rather than the character to the left of the cursor.) *************** *** 181,204 **** The above table describes the most basic keystrokes that you need in order to do editing of the input line. For your convenience, many ! other commands have been added in addition to , , , and . Here are some commands for moving more rapidly about the line. ! Move to the start of the line. ! Move to the end of the line. ! Move forward a word, where a word is composed of letters and digits. ! Move backward a word. ! Clear the screen, reprinting the current line at the top. ! Notice how moves forward a character, while moves forward a word. It is a loose convention that control keystrokes operate on characters while meta keystrokes operate on words. --- 181,204 ---- The above table describes the most basic keystrokes that you need in order to do editing of the input line. For your convenience, many ! other commands have been added in addition to `C-b', `C-f', `C-d', and . Here are some commands for moving more rapidly about the line. ! `C-a' Move to the start of the line. ! `C-e' Move to the end of the line. ! `M-f' Move forward a word, where a word is composed of letters and digits. ! `M-b' Move backward a word. ! `C-l' Clear the screen, reprinting the current line at the top. ! Notice how `C-f' moves forward a character, while `M-f' moves forward a word. It is a loose convention that control keystrokes operate on characters while meta keystrokes operate on words. *************** *** 227,258 **** Here is the list of commands for killing text. ! Kill the text from the current cursor position to the end of the line. ! Kill from the cursor to the end of the current word, or, if between words, to the end of the next word. Word boundaries are the same ! as those used by . ! Kill from the cursor the start of the previous word, or, if between words, to the start of the previous word. Word boundaries are the ! same as those used by . ! Kill from the cursor to the previous whitespace. This is ! different than because the word boundaries differ. Here is how to "yank" the text back into the line. Yanking means to copy the most-recently-killed text from the kill buffer. ! Yank the most recently killed text back into the buffer at the cursor. ! Rotate the kill-ring, and yank the new top. You can only do this ! if the prior command is or .  --- 227,258 ---- Here is the list of commands for killing text. ! `C-k' Kill the text from the current cursor position to the end of the line. ! `M-d' Kill from the cursor to the end of the current word, or, if between words, to the end of the next word. Word boundaries are the same ! as those used by `M-f'. ! `M-' Kill from the cursor the start of the previous word, or, if between words, to the start of the previous word. Word boundaries are the ! same as those used by `M-b'. ! `C-w' Kill from the cursor to the previous whitespace. This is ! different than `M-' because the word boundaries differ. Here is how to "yank" the text back into the line. Yanking means to copy the most-recently-killed text from the kill buffer. ! `C-y' Yank the most recently killed text back into the buffer at the cursor. ! `M-y' Rotate the kill-ring, and yank the new top. You can only do this ! if the prior command is `C-y' or `M-y'.  *************** *** 274,278 **** have typed one meta digit to get the argument started, you can type the remainder of the digits, and then the command. For example, to give ! the command an argument of 10, you could type `M-1 0 C-d'.  --- 274,279 ---- have typed one meta digit to get the argument started, you can type the remainder of the digits, and then the command. For example, to give ! the `C-d' command an argument of 10, you could type `M-1 0 C-d', which ! will delete the next ten characters on the input line.  *************** *** 284,288 **** Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: ! INCREMENTAL and NON-INCREMENTAL. Incremental searches begin before the user has finished typing the --- 285,289 ---- Readline provides commands for searching through the command history for lines containing a specified string. There are two search modes: ! "incremental" and "non-incremental". Incremental searches begin before the user has finished typing the *************** *** 291,310 **** typed so far. An incremental search requires only as many characters as needed to find the desired history entry. To search backward in the ! history for a particular string, type . Typing searches forward through the history. The characters present in the value of the `isearch-terminators' variable are used to terminate an incremental search. If that variable has not been assigned a value, the and ! characters will terminate an incremental search. will abort an incremental search and restore the original line. When the search is terminated, the history entry containing the search string becomes the current line. ! To find other matching entries in the history list, type or ! as appropriate. This will search backward or forward in the history for the next entry matching the search string typed so far. Any other key sequence bound to a Readline command will terminate the search and execute that command. For instance, a will terminate the search and accept the line, thereby executing the command from the ! history list. Non-incremental searches read the entire search string before --- 292,312 ---- typed so far. An incremental search requires only as many characters as needed to find the desired history entry. To search backward in the ! history for a particular string, type `C-r'. Typing `C-s' searches forward through the history. The characters present in the value of the `isearch-terminators' variable are used to terminate an incremental search. If that variable has not been assigned a value, the and ! `C-J' characters will terminate an incremental search. `C-g' will abort an incremental search and restore the original line. When the search is terminated, the history entry containing the search string becomes the current line. ! To find other matching entries in the history list, type `C-r' or ! `C-s' as appropriate. This will search backward or forward in the history for the next entry matching the search string typed so far. Any other key sequence bound to a Readline command will terminate the search and execute that command. For instance, a will terminate the search and accept the line, thereby executing the command from the ! history list. A movement command will terminate the search, make the ! last line found the current line, and begin editing. Non-incremental searches read the entire search string before *************** *** 349,353 **** file. Blank lines are ignored. Lines beginning with a `#' are comments. Lines beginning with a `$' indicate conditional constructs ! (*note Conditional Init Constructs::.). Other lines denote variable settings and key bindings. --- 351,355 ---- file. Blank lines are ignored. Lines beginning with a `#' are comments. Lines beginning with a `$' indicate conditional constructs ! (*note Conditional Init Constructs::). Other lines denote variable settings and key bindings. *************** *** 355,363 **** You can modify the run-time behavior of Readline by altering the values of variables in Readline using the `set' command within the ! init file. Here is how to change from the default Emacs-like key ! binding to use `vi' line editing commands: set editing-mode vi A great deal of run-time behavior is changeable with the following variables. --- 357,372 ---- You can modify the run-time behavior of Readline by altering the values of variables in Readline using the `set' command within the ! init file. The syntax is simple: ! ! set VARIABLE VALUE ! ! Here, for example, is how to change from the default Emacs-like ! key binding to use `vi' line editing commands: set editing-mode vi + Variable names and values, where appropriate, are recognized + without regard to case. + A great deal of run-time behavior is changeable with the following variables. *************** *** 386,390 **** greater than this value, Readline will ask the user whether or not he wishes to view them; otherwise, they are simply ! listed. The default limit is `100'. `convert-meta' --- 395,400 ---- greater than this value, Readline will ask the user whether or not he wishes to view them; otherwise, they are simply ! listed. This variable must be set to an integer value ! greater than or equal to 0. The default limit is `100'. `convert-meta' *************** *** 423,427 **** `input-meta' If set to `on', Readline will enable eight-bit input (it will ! not strip the eighth bit from the characters it reads), regardless of what the terminal claims it can support. The default value is `off'. The name `meta-flag' is a synonym --- 433,437 ---- `input-meta' If set to `on', Readline will enable eight-bit input (it will ! not clear the eighth bit in the characters it reads), regardless of what the terminal claims it can support. The default value is `off'. The name `meta-flag' is a synonym *************** *** 431,436 **** The string of characters that should terminate an incremental search without subsequently executing the character as a ! command (*note Searching::.). If this variable has not been ! given a value, the characters and will terminate an incremental search. --- 441,446 ---- The string of characters that should terminate an incremental search without subsequently executing the character as a ! command (*note Searching::). If this variable has not been ! given a value, the characters and `C-J' will terminate an incremental search. *************** *** 438,442 **** Sets Readline's idea of the current keymap for key binding commands. Acceptable `keymap' names are `emacs', ! `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-command', and `vi-insert'. `vi' is equivalent to `vi-command'; `emacs' is equivalent to `emacs-standard'. The --- 448,452 ---- Sets Readline's idea of the current keymap for key binding commands. Acceptable `keymap' names are `emacs', ! `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move', `vi-command', and `vi-insert'. `vi' is equivalent to `vi-command'; `emacs' is equivalent to `emacs-standard'. The *************** *** 481,489 **** description of what the command does. ! Once you know the name of the command, simply place the name of ! the key you wish to bind the command to, a colon, and then the ! name of the command on a line in the init file. The name of the ! key can be expressed in different ways, depending on which is most ! comfortable for you. KEYNAME: FUNCTION-NAME or MACRO --- 491,502 ---- description of what the command does. ! Once you know the name of the command, simply place on a line in ! the init file the name of the key you wish to bind the command to, ! a colon, and then the name of the command. The name of the key ! can be expressed in different ways, depending on what you find most ! comfortable. ! ! In addition to command names, readline allows keys to be bound to ! a string that is inserted when the key is pressed (a MACRO). KEYNAME: FUNCTION-NAME or MACRO *************** *** 494,502 **** Control-o: "> output" ! In the above example, is bound to the function ! `universal-argument', and is bound to run the macro expressed on the right hand side (that is, to insert the text `> output' into the line). "KEYSEQ": FUNCTION-NAME or MACRO KEYSEQ differs from KEYNAME above in that strings denoting an --- 507,520 ---- Control-o: "> output" ! In the above example, `C-u' is bound to the function ! `universal-argument', `M-DEL' is bound to the function ! `backward-kill-word', and `C-o' is bound to run the macro expressed on the right hand side (that is, to insert the text `> output' into the line). + A number of symbolic character names are recognized while + processing this key binding syntax: DEL, ESC, ESCAPE, LFD, + NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB. + "KEYSEQ": FUNCTION-NAME or MACRO KEYSEQ differs from KEYNAME above in that strings denoting an *************** *** 510,518 **** "\e[11~": "Function Key 1" ! In the above example, is bound to the function `universal-argument' (just as it was in the first example), ! ` ' is bound to the function `re-read-init-file', ! and ` <[> <1> <1> <~>' is bound to insert the text ! `Function Key 1'. The following GNU Emacs style escape sequences are available when --- 528,536 ---- "\e[11~": "Function Key 1" ! In the above example, `C-u' is again bound to the function `universal-argument' (just as it was in the first example), ! `C-x C-r' is bound to the function `re-read-init-file', and ! ` <[> <1> <1> <~>' is bound to insert the text `Function ! Key 1'. The following GNU Emacs style escape sequences are available when *************** *** 565,573 **** `\NNN' ! the character whose `ASCII' code is the octal value NNN (one ! to three digits) `\xNNN' ! the character whose `ASCII' code is the hexadecimal value NNN (one to three digits) --- 583,591 ---- `\NNN' ! the character whose ASCII code is the octal value NNN (one to ! three digits) `\xNNN' ! the character whose ASCII code is the hexadecimal value NNN (one to three digits) *************** *** 618,625 **** application-specific settings. Each program using the Readline library sets the APPLICATION NAME, and you can test ! for it. This could be used to bind key sequences to ! functions useful for a specific program. For instance, the ! following command adds a key sequence that quotes the current ! or previous word in Bash: $if Bash # Quote the current or previous word --- 636,643 ---- application-specific settings. Each program using the Readline library sets the APPLICATION NAME, and you can test ! for a particular value. This could be used to bind key ! sequences to functions useful for a specific program. For ! instance, the following command adds a key sequence that ! quotes the current or previous word in Bash: $if Bash # Quote the current or previous word *************** *** 637,641 **** `$include' This directive takes a single filename as an argument and reads ! commands and bindings from that file. $include /etc/inputrc --- 655,660 ---- `$include' This directive takes a single filename as an argument and reads ! commands and bindings from that file. For example, the following ! directive reads from `/etc/inputrc': $include /etc/inputrc *************** *** 646,650 **** ---------------- ! Here is an example of an inputrc file. This illustrates key binding, variable assignment, and conditional syntax. --- 665,669 ---- ---------------- ! Here is an example of an INPUTRC file. This illustrates key binding, variable assignment, and conditional syntax. *************** *** 766,776 **** This section describes Readline commands that may be bound to key ! sequences. ! Command names without an accompanying key sequence are unbound by ! default. In the following descriptions, POINT refers to the current ! cursor position, and MARK refers to a cursor position saved by the `set-mark' command. The text between the point and mark is referred to ! as the REGION.  --- 785,795 ---- This section describes Readline commands that may be bound to key ! sequences. Command names without an accompanying key sequence are ! unbound by default. ! In the following descriptions, "point" refers to the current cursor ! position, and "mark" refers to a cursor position saved by the `set-mark' command. The text between the point and mark is referred to ! as the "region".  *************** *** 813,826 **** ------------------------------------- ! `accept-line (Newline, Return)' Accept the line regardless of where the cursor is. If this line is ! non-empty, add it to the history list. If this line was a history ! line, then restore the history line to its original state. `previous-history (C-p)' ! Move `up' through the history list. `next-history (C-n)' ! Move `down' through the history list. `beginning-of-history (M-<)' --- 832,847 ---- ------------------------------------- ! `accept-line (Newline or Return)' Accept the line regardless of where the cursor is. If this line is ! non-empty, it may be added to the history list for future recall ! with `add_history()'. If this line is a modified history line, ! the history line is restored to its original state. `previous-history (C-p)' ! Move `back' through the history list, fetching the previous ! command. `next-history (C-n)' ! Move `forward' through the history list, fetching the next command. `beginning-of-history (M-<)' *************** *** 862,871 **** `yank-nth-arg (M-C-y)' Insert the first argument to the previous command (usually the ! second word on the previous line). With an argument N, insert the ! Nth word from the previous command (the words in the previous ! command begin with word 0). A negative argument inserts the Nth ! word from the end of the previous command. ! `yank-last-arg (M-., M-_)' Insert last argument to the previous command (the last word of the previous history entry). With an argument, behave exactly like --- 883,892 ---- `yank-nth-arg (M-C-y)' Insert the first argument to the previous command (usually the ! second word on the previous line) at point. With an argument N, ! insert the Nth word from the previous command (the words in the ! previous command begin with word 0). A negative argument inserts ! the Nth word from the end of the previous command. ! `yank-last-arg (M-. or M-_)' Insert last argument to the previous command (the last word of the previous history entry). With an argument, behave exactly like *************** *** 881,888 **** `delete-char (C-d)' ! Delete the character under the cursor. If the cursor is at the ! beginning of the line, there are no characters in the line, and ! the last character typed was not bound to `delete-char', then ! return `EOF'. `backward-delete-char (Rubout)' --- 902,908 ---- `delete-char (C-d)' ! Delete the character at point. If point is at the beginning of ! the line, there are no characters in the line, and the last ! character typed was not bound to `delete-char', then return EOF. `backward-delete-char (Rubout)' *************** *** 895,903 **** deleted. By default, this is not bound to a key. ! `quoted-insert (C-q, C-v)' Add the next character typed to the line verbatim. This is how to ! insert key sequences like , for example. ! `tab-insert (M-TAB)' Insert a tab character. --- 915,923 ---- deleted. By default, this is not bound to a key. ! `quoted-insert (C-q or C-v)' Add the next character typed to the line verbatim. This is how to ! insert key sequences like `C-q', for example. ! `tab-insert (M-)' Insert a tab character. *************** *** 943,948 **** `kill-whole-line ()' ! Kill all characters on the current line, no matter point is. By ! default, this is unbound. `kill-word (M-d)' --- 963,968 ---- `kill-whole-line ()' ! Kill all characters on the current line, no matter where point is. ! By default, this is unbound. `kill-word (M-d)' *************** *** 951,955 **** as `forward-word'. ! `backward-kill-word (M-DEL)' Kill the word behind point. Word boundaries are the same as `backward-word'. --- 971,975 ---- as `forward-word'. ! `backward-kill-word (M-)' Kill the word behind point. Word boundaries are the same as `backward-word'. *************** *** 982,991 **** `yank (C-y)' ! Yank the top of the kill ring into the buffer at the current ! cursor position. `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.  --- 1002,1010 ---- `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'.  *************** *** 997,1001 **** `digit-argument (M-0, M-1, ... M--)' Add this digit to the argument already accumulating, or start a new ! argument. starts a negative argument. `universal-argument ()' --- 1016,1020 ---- `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 ()' *************** *** 1018,1032 **** ----------------------------- ! `complete (TAB)' ! Attempt to do completion on the text before the cursor. This is ! application-specific. Generally, if you are typing a filename ! argument, you can do filename completion; if you are typing a ! command, you can do command completion; if you are typing in a ! symbol to GDB, you can do symbol name completion; if you are ! typing in a variable to Bash, you can do variable name completion, ! and so on. `possible-completions (M-?)' ! List the possible completions of the text before the cursor. `insert-completions (M-*)' --- 1037,1047 ---- ----------------------------- ! `complete ()' ! Attempt to perform completion on the text before point. The ! actual completion performed is application-specific. The default ! is filename completion. `possible-completions (M-?)' ! List the possible completions of the text before point. `insert-completions (M-*)' *************** *** 1039,1046 **** execution of `menu-complete' steps through the list of possible completions, inserting each match in turn. At the end of the list ! of completions, the bell is rung and the original text is restored. ! An argument of N moves N positions forward in the list of matches; ! a negative argument may be used to move backward through the list. ! This command is intended to be bound to `TAB', but is unbound by default. --- 1054,1062 ---- execution of `menu-complete' steps through the list of possible completions, inserting each match in turn. At the end of the list ! of completions, the bell is rung (subject to the setting of ! `bell-style') and the original text is restored. An argument of N ! moves N positions forward in the list of matches; a negative ! argument may be used to move backward through the list. This ! command is intended to be bound to , but is unbound by default. *************** *** 1086,1094 **** bound to the corresponding uppercase character. ! `prefix-meta (ESC)' ! Make the next character typed be metafied. This is for keyboards ! without a meta key. Typing `ESC f' is equivalent to typing `M-f'. ! `undo (C-_, C-x C-u)' Incremental undo, separately remembered for each line. --- 1102,1110 ---- bound to the corresponding uppercase character. ! `prefix-meta ()' ! Metafy the next character typed. This is for keyboards without a ! meta key. Typing ` f' is equivalent to typing `M-f'. ! `undo (C-_ or C-x C-u)' Incremental undo, separately remembered for each line. *************** *** 1101,1106 **** `set-mark (C-@)' ! Set the mark to the current point. If a numeric argument is ! supplied, the mark is set to that position. `exchange-point-and-mark (C-x C-x)' --- 1117,1122 ---- `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)' *************** *** 1138,1144 **** `dump-macros ()' Print all of the Readline key sequences bound to macros and the ! strings they ouput. If a numeric argument is supplied, the output ! is formatted in such a way that it can be made part of an INPUTRC ! file. This command is unbound by default.  --- 1154,1160 ---- `dump-macros ()' Print all of the Readline key sequences bound to macros and the ! strings they output. If a numeric argument is supplied, the ! output is formatted in such a way that it can be made part of an ! INPUTRC file. This command is unbound by default.  *************** *** 1154,1158 **** In order to switch interactively between `emacs' and `vi' editing ! modes, use the command M-C-j (toggle-editing-mode). The Readline default is `emacs' mode. --- 1170,1175 ---- In order to switch interactively between `emacs' and `vi' editing ! modes, use the command `M-C-j' (bound to emacs-editing-mode when in ! `vi' mode and to vi-editing-mode in `emacs' mode). The Readline default is `emacs' mode. *************** *** 1167,1172 **** that need to provide a command line interface. ! Copyright (C) 1988, 1994, 1996, 1998, 1999 Free Software Foundation, ! Inc. Permission is granted to make and distribute verbatim copies of this --- 1184,1188 ---- 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 *************** *** 1219,1230 **** is sufficient. This section describes how to use Readline in the simplest way possible, perhaps to replace calls in your code to ! `gets()' or `fgets ()'. ! The function `readline ()' prints a prompt and then reads and returns ! a single line of text from the user. The line `readline' returns is ! allocated with `malloc ()'; you should `free ()' the line when you are ! done with it. The declaration for `readline' in ANSI C is ! `char *readline (char *PROMPT);' So, one might say --- 1235,1247 ---- is sufficient. This section describes how to use Readline in the simplest way possible, perhaps to replace calls in your code to ! `gets()' or `fgets()'. ! The function `readline()' prints a prompt PROMPT and then reads and ! returns a single line of text from the user. If PROMPT is `NULL' or ! the empty string, no prompt is displayed. The line `readline' returns ! is allocated with `malloc()'; the caller should `free()' the line when ! it has finished with it. The declaration for `readline' in ANSI C is ! `char *readline (const char *PROMPT);' So, one might say *************** *** 1239,1244 **** If you want the user to be able to get at the line later, (with ! for example), you must call `add_history ()' to save the line ! away in a "history" list of such lines. `add_history (line)'; --- 1256,1261 ---- If you want the user to be able to get at the line later, (with ! for example), you must call `add_history()' to save the line away ! in a "history" list of such lines. `add_history (line)'; *************** *** 1248,1252 **** It is preferable to avoid saving empty lines on the history list, since users rarely have a burning need to reuse a blank line. Here is ! a function which usefully replaces the standard `gets ()' library function, and has the advantage of no static buffer to overflow: --- 1265,1269 ---- It is preferable to avoid saving empty lines on the history list, since users rarely have a burning need to reuse a blank line. Here is ! a function which usefully replaces the standard `gets()' library function, and has the advantage of no static buffer to overflow: *************** *** 1279,1290 **** completion: completion on file names. If you do not want Readline to complete on filenames, you can change the binding of the key with ! `rl_bind_key ()'. ! `int rl_bind_key (int KEY, int (*FUNCTION)());' ! `rl_bind_key ()' takes two arguments: KEY is the character that you want to bind, and FUNCTION is the address of the function to call when ! KEY is pressed. Binding to `rl_insert ()' makes insert ! itself. `rl_bind_key ()' returns non-zero if KEY is not a valid ASCII character code (between 0 and 255). --- 1296,1307 ---- completion: completion on file names. If you do not want Readline to complete on filenames, you can change the binding of the key with ! `rl_bind_key()'. ! `int rl_bind_key (int KEY, rl_command_func_t *FUNCTION);' ! `rl_bind_key()' takes two arguments: KEY is the character that you want to bind, and FUNCTION is the address of the function to call when ! KEY is pressed. Binding to `rl_insert()' makes insert ! itself. `rl_bind_key()' returns non-zero if KEY is not a valid ASCII character code (between 0 and 255). *************** *** 1293,1299 **** This code should be executed once at the start of your program; you ! might write a function called `initialize_readline ()' which performs this and other desired initializations, such as installing custom ! completers (*note Custom Completers::.).  --- 1310,1316 ---- This code should be executed once at the start of your program; you ! might write a function called `initialize_readline()' which performs this and other desired initializations, such as installing custom ! completers (*note Custom Completers::).  *************** *** 1318,1358 **** * Menu: ! * The Function Type:: C declarations to make code readable. * Function Writing:: Variables and calling conventions.  ! File: readline.info, Node: The Function Type, Next: Function Writing, Up: Custom Functions ! The Function Type ----------------- ! For readabilty, we declare a new type of object, called "Function". ! A `Function' is a C function which returns an `int'. The type ! declaration for `Function' is: ! ! `typedef int Function ();' ! ! The reason for declaring this new type is to make it easier to write ! code describing pointers to C functions. Let us say we had a variable ! called FUNC which was a pointer to a function. Instead of the classic ! C declaration ! `int (*)()func;' we may write ! `Function *func;' ! Similarly, there are ! typedef void VFunction (); ! typedef char *CPFunction (); and ! typedef char **CPPFunction (); ! for functions returning no value, `pointer to char', and `pointer to ! pointer to char', respectively.  ! File: readline.info, Node: Function Writing, Prev: The Function Type, Up: Custom Functions Writing a New Function --- 1335,1408 ---- * Menu: ! * Readline Typedefs:: C declarations to make code readable. * Function Writing:: Variables and calling conventions.  ! File: readline.info, Node: Readline Typedefs, Next: Function Writing, Up: Custom Functions ! Readline Typedefs ----------------- ! For readabilty, we declare a number of new object types, all pointers ! to functions. ! ! The reason for declaring these new types is to make it easier to ! write code describing pointers to C functions with appropriately ! prototyped arguments and return values. ! ! For instance, say we want to declare a variable FUNC as a pointer to ! a function which takes two `int' arguments and returns an `int' (this ! is the type of all of the Readline bindable functions). Instead of the ! classic C declaration ! `int (*func)();' ! ! or the ANSI-C style declaration ! ! `int (*func)(int, int);' we may write ! `rl_command_func_t *func;' ! ! The full list of function pointer types available is ! ! `typedef int rl_command_func_t (int, int);' ! ! `typedef char *rl_compentry_func_t (const char *, int);' ! ! `typedef char **rl_completion_func_t (const char *, int, int);' ! ! `typedef char *rl_quote_func_t (char *, int, char *);' ! ! `typedef char *rl_dequote_func_t (char *, int);' ! ! `typedef int rl_compignore_func_t (char **);' ! ! `typedef void rl_compdisp_func_t (char **, int, int);' ! ! `typedef int rl_hook_func_t (void);' ! ! `typedef int rl_getc_func_t (FILE *);' ! ! `typedef int rl_linebuf_func_t (char *, int);' ! ! `typedef int rl_intfunc_t (int);' ! ! `#define rl_ivoidfunc_t rl_hook_func_t' ! ! `typedef int rl_icpfunc_t (char *);' ! `typedef int rl_icppfunc_t (char **);' ! `typedef void rl_voidfunc_t (void);' ! `typedef void rl_vintfunc_t (int);' + `typedef void rl_vcpfunc_t (char *);' + + `typedef void rl_vcppfunc_t (char **);'  ! File: readline.info, Node: Function Writing, Prev: Readline Typedefs, Up: Custom Functions Writing a New Function *************** *** 1395,1399 **** - Variable: int rl_point The offset of the current cursor position in `rl_line_buffer' (the ! *point*). - Variable: int rl_end --- 1445,1449 ---- - Variable: int rl_point The offset of the current cursor position in `rl_line_buffer' (the ! _point_). - Variable: int rl_end *************** *** 1403,1408 **** - Variable: int rl_mark ! The mark (saved position) in the current line. If set, the mark ! and point define a *region*. - Variable: int rl_done --- 1453,1458 ---- - Variable: int rl_mark ! The MARK (saved position) in the current line. If set, the mark ! and point define a _region_. - Variable: int rl_done *************** *** 1410,1417 **** --- 1460,1478 ---- current line immediately. + - Variable: int rl_num_chars_to_read + Setting this to a positive value before calling `readline()' causes + Readline to return after accepting that many characters, rather + than reading up to a character bound to `accept-line'. + - Variable: int rl_pending_input Setting this to a value makes it the next keystroke read. This is a way to stuff a single character into the input stream. + - Variable: int rl_dispatching + Set to a non-zero value if a function is being called from a key + binding; zero otherwise. Application functions can test this to + discover whether they were called directly or by Readline's + dispatching mechanism. + - Variable: int rl_erase_empty_line Setting this to a non-zero value causes Readline to completely *************** *** 1422,1426 **** - Variable: char * rl_prompt The prompt Readline uses. This is set from the argument to ! `readline ()', and should not be assigned to directly. - Variable: int rl_already_prompted --- 1483,1489 ---- - Variable: char * rl_prompt The prompt Readline uses. This is set from the argument to ! `readline()', and should not be assigned to directly. The ! `rl_set_prompt()' function (*note Redisplay::) may be used to ! modify the prompt string after calling `readline()'. - Variable: int rl_already_prompted *************** *** 1433,1446 **** value; Readline never sets it. ! - Variable: char * rl_library_version The version number of this revision of the library. ! - Variable: char * rl_terminal_name ! The terminal type, used for initialization. ! - Variable: char * rl_readline_name This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file ! (*note Conditional Init Constructs::.). - Variable: FILE * rl_instream --- 1496,1515 ---- value; Readline never sets it. ! - Variable: const char * rl_library_version The version number of this revision of the library. ! - Variable: int rl_gnu_readline_p ! Always set to 1, denoting that this is GNU readline rather than ! some emulation. ! ! - Variable: const char * rl_terminal_name ! The terminal type, used for initialization. If not set by the ! application, Readline sets this to the value of the `TERM' ! environment variable the first time it is called. ! - Variable: const char * rl_readline_name This variable is set to a unique name by each application using Readline. The value allows conditional parsing of the inputrc file ! (*note Conditional Init Constructs::). - Variable: FILE * rl_instream *************** *** 1450,1486 **** The stdio stream to which Readline performs output. ! - Variable: Function * rl_startup_hook If non-zero, this is the address of a function to call just before `readline' prints the first prompt. ! - Variable: Function * rl_pre_input_hook If non-zero, this is the address of a function to call after the first prompt has been printed and just before `readline' starts reading input characters. ! - Variable: Function * rl_event_hook If non-zero, this is the address of a function to call periodically ! when readline is waiting for terminal input. ! ! - Variable: Function * rl_getc_function ! If non-zero, `readline' will call indirectly through this pointer ! to get a character from the input stream. By default, it is set to ! `rl_getc', the default `readline' character input function (*note ! Utility Functions::.). ! ! - Variable: VFunction * rl_redisplay_function ! If non-zero, `readline' will call indirectly through this pointer ! to update the display with the current contents of the editing ! buffer. By default, it is set to `rl_redisplay', the default ! `readline' redisplay function (*note Redisplay::.). - Variable: Keymap rl_executing_keymap ! This variable is set to the keymap (*note Keymaps::.) in which the currently executing readline function was found. - Variable: Keymap rl_binding_keymap ! This variable is set to the keymap (*note Keymaps::.) in which the last key binding occurred.  File: readline.info, Node: Readline Convenience Functions, Next: Readline Signal Handling, Prev: Readline Variables, Up: Programming with GNU Readline --- 1519,1664 ---- The stdio stream to which Readline performs output. ! - Variable: rl_command_func_t * rl_last_func ! The address of the last command function Readline executed. May ! be used to test whether or not a function is being executed twice ! in succession, for example. ! ! - Variable: rl_hook_func_t * rl_startup_hook If non-zero, this is the address of a function to call just before `readline' prints the first prompt. ! - Variable: rl_hook_func_t * rl_pre_input_hook If non-zero, this is the address of a function to call after the first prompt has been printed and just before `readline' starts reading input characters. ! - Variable: rl_hook_func_t * rl_event_hook If non-zero, this is the address of a function to call periodically ! when Readline is waiting for terminal input. By default, this ! will be called at most ten times a second if there is no keyboard ! input. ! ! - Variable: rl_getc_func_t * rl_getc_function ! If non-zero, Readline will call indirectly through this pointer to ! get a character from the input stream. By default, it is set to ! `rl_getc', the default Readline character input function (*note ! Character Input::). ! ! - Variable: rl_voidfunc_t * rl_redisplay_function ! If non-zero, Readline will call indirectly through this pointer to ! update the display with the current contents of the editing buffer. ! By default, it is set to `rl_redisplay', the default Readline ! redisplay function (*note Redisplay::). ! ! - Variable: rl_vintfunc_t * rl_prep_term_function ! If non-zero, Readline will call indirectly through this pointer to ! initialize the terminal. The function takes a single argument, an ! `int' flag that says whether or not to use eight-bit characters. ! By default, this is set to `rl_prep_terminal' (*note Terminal ! Management::). ! ! - Variable: rl_voidfunc_t * rl_deprep_term_function ! If non-zero, Readline will call indirectly through this pointer to ! reset the terminal. This function should undo the effects of ! `rl_prep_term_function'. By default, this is set to ! `rl_deprep_terminal' (*note Terminal Management::). - Variable: Keymap rl_executing_keymap ! This variable is set to the keymap (*note Keymaps::) in which the currently executing readline function was found. - Variable: Keymap rl_binding_keymap ! This variable is set to the keymap (*note Keymaps::) in which the last key binding occurred. + - Variable: char * rl_executing_macro + This variable is set to the text of any currently-executing macro. + + - Variable: int rl_readline_state + A variable with bit values that encapsulate the current Readline + state. A bit is set with the `RL_SETSTATE' macro, and unset with + the `RL_UNSETSTATE' macro. Use the `RL_ISSTATE' macro to test + whether a particular state bit is set. Current state bits include: + + `RL_STATE_NONE' + Readline has not yet been called, nor has it begun to + intialize. + + `RL_STATE_INITIALIZING' + Readline is initializing its internal data structures. + + `RL_STATE_INITIALIZED' + Readline has completed its initialization. + + `RL_STATE_TERMPREPPED' + Readline has modified the terminal modes to do its own input + and redisplay. + + `RL_STATE_READCMD' + Readline is reading a command from the keyboard. + + `RL_STATE_METANEXT' + Readline is reading more input after reading the meta-prefix + character. + + `RL_STATE_DISPATCHING' + Readline is dispatching to a command. + + `RL_STATE_MOREINPUT' + Readline is reading more input while executing an editing + command. + + `RL_STATE_ISEARCH' + Readline is performing an incremental history search. + + `RL_STATE_NSEARCH' + Readline is performing a non-incremental history search. + + `RL_STATE_SEARCH' + Readline is searching backward or forward through the history + for a string. + + `RL_STATE_NUMERICARG' + Readline is reading a numeric argument. + + `RL_STATE_MACROINPUT' + Readline is currently getting its input from a + previously-defined keyboard macro. + + `RL_STATE_MACRODEF' + Readline is currently reading characters defining a keyboard + macro. + + `RL_STATE_OVERWRITE' + Readline is in overwrite mode. + + `RL_STATE_COMPLETING' + Readline is performing word completion. + + `RL_STATE_SIGHANDLER' + Readline is currently executing the readline signal handler. + + `RL_STATE_UNDOING' + Readline is performing an undo. + + `RL_STATE_DONE' + Readline has read a key sequence bound to `accept-line' and + is about to return the line to the caller. + + + - Variable: int rl_explicit_arg + Set to a non-zero value if an explicit numeric argument was + specified by the user. Only valid in a bindable command function. + + - Variable: int rl_numeric_arg + Set to the value of any numeric argument explicitly specified by + the user before executing the current Readline function. Only + valid in a bindable command function. + + - Variable: int rl_editing_mode + Set to a value denoting Readline's current editing mode. A value + of 1 means Readline is currently in emacs mode; 0 means that vi + mode is active. +  File: readline.info, Node: Readline Convenience Functions, Next: Readline Signal Handling, Prev: Readline Variables, Up: Programming with GNU Readline *************** *** 1499,1504 **** --- 1677,1686 ---- * Redisplay:: Functions to control line display. * Modifying Text:: Functions to modify `rl_line_buffer'. + * Character Input:: Functions to read keyboard input. + * Terminal Management:: Functions to manage terminal settings. * Utility Functions:: Generally useful functions and hooks. + * Miscellaneous Functions:: Functions that don't fall into any category. * Alternate Interface:: Using Readline in a `callback' fashion. + * A Readline Example:: An example Readline function.  *************** *** 1516,1527 **** This binds the keystroke to the function ! *descriptively* named `backward-kill-word'. You, as the programmer, should bind the functions you write to descriptive names as well. Readline provides a function for doing that: ! - Function: int rl_add_defun (char *name, Function *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it to ! FUNCTION using `rl_bind_key ()'. Using this function alone is sufficient for most applications. It is --- 1698,1710 ---- This binds the keystroke to the function ! _descriptively_ named `backward-kill-word'. You, as the programmer, should bind the functions you write to descriptive names as well. Readline provides a function for doing that: ! - Function: int rl_add_defun (const char *name, rl_command_func_t ! *function, int key) Add NAME to the list of named functions. Make FUNCTION be the function that gets called. If KEY is not -1, then bind it to ! FUNCTION using `rl_bind_key()'. Using this function alone is sufficient for most applications. It is *************** *** 1542,1554 **** Readline which keymap to use. ! - Function: Keymap rl_make_bare_keymap () Returns a new, empty keymap. The space for the keymap is ! allocated with `malloc ()'; you should `free ()' it when you are ! done. - Function: Keymap rl_copy_keymap (Keymap map) Return a new keymap which is a copy of MAP. ! - Function: Keymap rl_make_keymap () Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their --- 1725,1737 ---- Readline which keymap to use. ! - Function: Keymap rl_make_bare_keymap (void) Returns a new, empty keymap. The space for the keymap is ! allocated with `malloc()'; the caller should free it by calling ! `rl_discard_keymap()' when done. - Function: Keymap rl_copy_keymap (Keymap map) Return a new keymap which is a copy of MAP. ! - Function: Keymap rl_make_keymap (void) Return a new keymap with the printing characters bound to rl_insert, the lowercase Meta characters bound to run their *************** *** 1562,1566 **** change which keymap is active. ! - Function: Keymap rl_get_keymap () Returns the currently active keymap. --- 1745,1749 ---- change which keymap is active. ! - Function: Keymap rl_get_keymap (void) Returns the currently active keymap. *************** *** 1568,1580 **** Makes KEYMAP the currently active keymap. ! - Function: Keymap rl_get_keymap_by_name (char *name) Return the keymap matching NAME. NAME is one which would be supplied in a `set keymap' inputrc line (*note Readline Init ! File::.). - Function: char * rl_get_keymap_name (Keymap keymap) Return the name matching KEYMAP. NAME is one which would be supplied in a `set keymap' inputrc line (*note Readline Init ! File::.).  --- 1751,1763 ---- Makes KEYMAP the currently active keymap. ! - Function: Keymap rl_get_keymap_by_name (const char *name) Return the keymap matching NAME. NAME is one which would be supplied in a `set keymap' inputrc line (*note Readline Init ! File::). - Function: char * rl_get_keymap_name (Keymap keymap) Return the name matching KEYMAP. NAME is one which would be supplied in a `set keymap' inputrc line (*note Readline Init ! File::).  *************** *** 1584,1608 **** ------------ ! You associate keys with functions through the keymap. Readline has ! several internal keymaps: `emacs_standard_keymap', `emacs_meta_keymap', ! `emacs_ctlx_keymap', `vi_movement_keymap', and `vi_insertion_keymap'. ! `emacs_standard_keymap' is the default, and the examples in this manual ! assume that. ! Since `readline' installs a set of default key bindings the first time it is called, there is always the danger that a custom binding ! installed before the first call to `readline' will be overridden. An alternate mechanism is to install custom key bindings in an initialization function assigned to the `rl_startup_hook' variable ! (*note Readline Variables::.). These functions manage key bindings. ! - Function: int rl_bind_key (int key, Function *function) Binds KEY to FUNCTION in the currently active keymap. Returns non-zero in the case of an invalid KEY. ! - Function: int rl_bind_key_in_map (int key, Function *function, ! Keymap map) Bind KEY to FUNCTION in MAP. Returns non-zero in the case of an invalid KEY. --- 1767,1791 ---- ------------ ! Key sequences are associate with functions through the keymap. ! Readline has several internal keymaps: `emacs_standard_keymap', ! `emacs_meta_keymap', `emacs_ctlx_keymap', `vi_movement_keymap', and ! `vi_insertion_keymap'. `emacs_standard_keymap' is the default, and the ! examples in this manual assume that. ! Since `readline()' installs a set of default key bindings the first time it is called, there is always the danger that a custom binding ! installed before the first call to `readline()' will be overridden. An alternate mechanism is to install custom key bindings in an initialization function assigned to the `rl_startup_hook' variable ! (*note Readline Variables::). These functions manage key bindings. ! - Function: int rl_bind_key (int key, rl_command_func_t *function) Binds KEY to FUNCTION in the currently active keymap. Returns non-zero in the case of an invalid KEY. ! - Function: int rl_bind_key_in_map (int key, rl_command_func_t ! *function, Keymap map) Bind KEY to FUNCTION in MAP. Returns non-zero in the case of an invalid KEY. *************** *** 1616,1628 **** error. ! - Function: int rl_unbind_function_in_map (Function *function, Keymap ! map) Unbind all keys that execute FUNCTION in MAP. ! - Function: int rl_unbind_command_in_map (char *command, Keymap map) Unbind all keys that are bound to COMMAND in MAP. ! - Function: int rl_generic_bind (int type, char *keyseq, char *data, ! Keymap map) Bind the key sequence represented by the string KEYSEQ to the arbitrary pointer DATA. TYPE says what kind of data is pointed to --- 1799,1818 ---- error. ! - Function: int rl_unbind_function_in_map (rl_command_func_t ! *function, Keymap map) Unbind all keys that execute FUNCTION in MAP. ! - Function: int rl_unbind_command_in_map (const char *command, Keymap ! map) Unbind all keys that are bound to COMMAND in MAP. ! - Function: int rl_set_key (const char *keyseq, rl_command_func_t ! *function, Keymap map) ! Bind the key sequence represented by the string KEYSEQ to the ! function FUNCTION. This makes new keymaps as necessary. The ! initial keymap in which to do bindings is MAP. ! ! - Function: int rl_generic_bind (int type, const char *keyseq, char ! *data, Keymap map) Bind the key sequence represented by the string KEYSEQ to the arbitrary pointer DATA. TYPE says what kind of data is pointed to *************** *** 1634,1642 **** Parse LINE as if it had been read from the `inputrc' file and perform any key bindings and variable assignments found (*note ! Readline Init File::.). ! - Function: int rl_read_init_file (char *filename) Read keybindings and variable assignments from FILENAME (*note ! Readline Init File::.).  --- 1824,1832 ---- Parse LINE as if it had been read from the `inputrc' file and perform any key bindings and variable assignments found (*note ! Readline Init File::). ! - Function: int rl_read_init_file (const char *filename) Read keybindings and variable assignments from FILENAME (*note ! Readline Init File::).  *************** *** 1647,1668 **** These functions allow you to find out what keys invoke named ! functions and the functions invoked by a particular key sequence. ! - Function: Function * rl_named_function (char *name) Return the function with name NAME. ! - Function: Function * rl_function_of_keyseq (char *keyseq, Keymap ! map, int *type) Return the function invoked by KEYSEQ in keymap MAP. If MAP is ! NULL, the current keymap is used. If TYPE is not NULL, the type ! of the object is returned in it (one of `ISFUNC', `ISKMAP', or ! `ISMACR'). ! - Function: char ** rl_invoking_keyseqs (Function *function) Return an array of strings representing the key sequences used to invoke FUNCTION in the current keymap. ! - Function: char ** rl_invoking_keyseqs_in_map (Function *function, ! Keymap map) Return an array of strings representing the key sequences used to invoke FUNCTION in the keymap MAP. --- 1837,1859 ---- These functions allow you to find out what keys invoke named ! functions and the functions invoked by a particular key sequence. You ! may also associate a new function name with an arbitrary function. ! - Function: rl_command_func_t * rl_named_function (const char *name) Return the function with name NAME. ! - Function: rl_command_func_t * rl_function_of_keyseq (const char ! *keyseq, Keymap map, int *type) Return the function invoked by KEYSEQ in keymap MAP. If MAP is ! `NULL', the current keymap is used. If TYPE is not `NULL', the ! type of the object is returned in the `int' variable it points to ! (one of `ISFUNC', `ISKMAP', or `ISMACR'). ! - Function: char ** rl_invoking_keyseqs (rl_command_func_t *function) Return an array of strings representing the key sequences used to invoke FUNCTION in the current keymap. ! - Function: char ** rl_invoking_keyseqs_in_map (rl_command_func_t ! *function, Keymap map) Return an array of strings representing the key sequences used to invoke FUNCTION in the keymap MAP. *************** *** 1674,1686 **** `inputrc' file and re-read. ! - Function: void rl_list_funmap_names () Print the names of all bindable Readline functions to `rl_outstream'. ! - Function: char ** rl_funmap_names () Return a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings ! inside. You should free () the array when you done, but not the ! pointrs.  --- 1865,1882 ---- `inputrc' file and re-read. ! - Function: void rl_list_funmap_names (void) Print the names of all bindable Readline functions to `rl_outstream'. ! - Function: const char ** rl_funmap_names (void) Return a NULL terminated array of known function names. The array is sorted. The array itself is allocated, but not the strings ! inside. You should `free()' the array when you are done, but not ! the pointers. ! ! - Function: int rl_add_funmap_entry (const char *name, ! rl_command_func_t *function) ! Add NAME to the list of bindable Readline command names, and make ! FUNCTION the function to be called when NAME is invoked.  *************** *** 1692,1706 **** Supporting the undo command is a painless thing, and makes your functions much more useful. It is certainly easy to try something if ! you know you can undo it. I could use an undo function for the stock ! market. If your function simply inserts text once, or deletes text once, and ! uses `rl_insert_text ()' or `rl_delete_text ()' to do it, then undoing ! is already done for you automatically. If you do multiple insertions or multiple deletions, or any combination of these operations, you should group them together into ! one operation. This is done with `rl_begin_undo_group ()' and ! `rl_end_undo_group ()'. The types of events that can be undone are: --- 1888,1901 ---- Supporting the undo command is a painless thing, and makes your functions much more useful. It is certainly easy to try something if ! you know you can undo it. If your function simply inserts text once, or deletes text once, and ! uses `rl_insert_text()' or `rl_delete_text()' to do it, then undoing is ! already done for you automatically. If you do multiple insertions or multiple deletions, or any combination of these operations, you should group them together into ! one operation. This is done with `rl_begin_undo_group()' and ! `rl_end_undo_group()'. The types of events that can be undone are: *************** *** 1710,1726 **** Notice that `UNDO_DELETE' means to insert some text, and `UNDO_INSERT' means to delete some text. That is, the undo code tells ! undo what to undo, not how to undo it. `UNDO_BEGIN' and `UNDO_END' are ! tags added by `rl_begin_undo_group ()' and `rl_end_undo_group ()'. ! - Function: int rl_begin_undo_group () Begins saving undo information in a group construct. The undo ! information usually comes from calls to `rl_insert_text ()' and ! `rl_delete_text ()', but could be the result of calls to ! `rl_add_undo ()'. ! - Function: int rl_end_undo_group () Closes the current undo group started with `rl_begin_undo_group ! ()'. There should be one call to `rl_end_undo_group ()' for each ! call to `rl_begin_undo_group ()'. - Function: void rl_add_undo (enum undo_code what, int start, int end, --- 1905,1921 ---- Notice that `UNDO_DELETE' means to insert some text, and `UNDO_INSERT' means to delete some text. That is, the undo code tells ! what to undo, not how to undo it. `UNDO_BEGIN' and `UNDO_END' are tags ! added by `rl_begin_undo_group()' and `rl_end_undo_group()'. ! - Function: int rl_begin_undo_group (void) Begins saving undo information in a group construct. The undo ! information usually comes from calls to `rl_insert_text()' and ! `rl_delete_text()', but could be the result of calls to ! `rl_add_undo()'. ! - Function: int rl_end_undo_group (void) Closes the current undo group started with `rl_begin_undo_group ! ()'. There should be one call to `rl_end_undo_group()' for each ! call to `rl_begin_undo_group()'. - Function: void rl_add_undo (enum undo_code what, int start, int end, *************** *** 1729,1741 **** text runs from START to END, and encompasses TEXT. ! - Function: void free_undo_list () Free the existing undo list. ! - Function: int rl_do_undo () Undo the first thing on the undo list. Returns `0' if there was nothing to undo, non-zero if something was undone. Finally, if you neither insert nor delete text, but directly modify ! the existing text (e.g., change its case), call `rl_modifying ()' once, just before you modify the text. You must supply the indices of the text range that you are going to modify. --- 1924,1936 ---- text runs from START to END, and encompasses TEXT. ! - Function: void rl_free_undo_list (void) Free the existing undo list. ! - Function: int rl_do_undo (void) Undo the first thing on the undo list. Returns `0' if there was nothing to undo, non-zero if something was undone. Finally, if you neither insert nor delete text, but directly modify ! the existing text (e.g., change its case), call `rl_modifying()' once, just before you modify the text. You must supply the indices of the text range that you are going to modify. *************** *** 1752,1768 **** --------- ! - Function: void rl_redisplay () Change what's displayed on the screen to reflect the current contents of `rl_line_buffer'. ! - Function: int rl_forced_update_display () Force the line to be updated and redisplayed, whether or not Readline thinks the screen display is correct. ! - Function: int rl_on_new_line () Tell the update functions that we have moved onto a new (empty) line, usually after ouputting a newline. ! - Function: int rl_on_new_line_with_prompt () Tell the update functions that we have moved onto a new line, with RL_PROMPT already displayed. This could be used by applications --- 1947,1963 ---- --------- ! - Function: void rl_redisplay (void) Change what's displayed on the screen to reflect the current contents of `rl_line_buffer'. ! - Function: int rl_forced_update_display (void) Force the line to be updated and redisplayed, whether or not Readline thinks the screen display is correct. ! - Function: int rl_on_new_line (void) Tell the update functions that we have moved onto a new (empty) line, usually after ouputting a newline. ! - Function: int rl_on_new_line_with_prompt (void) Tell the update functions that we have moved onto a new line, with RL_PROMPT already displayed. This could be used by applications *************** *** 1771,1801 **** should be used after setting RL_ALREADY_PROMPTED. ! - Function: int rl_reset_line_state () Reset the display state to a clean state and redisplay the current line starting on a new line. ! - Function: int rl_message (va_alist) ! The arguments are a string as would be supplied to `printf'. The ! resulting string is displayed in the "echo area". The echo area ! is also used to display numeric arguments and search strings. ! - Function: int rl_clear_message () Clear the message in the echo area. ! - Function: void rl_save_prompt () Save the local Readline prompt display state in preparation for ! displaying a new message in the message area with `rl_message'. ! - Function: void rl_restore_prompt () Restore the local Readline prompt display state saved by the most recent call to `rl_save_prompt'.  ! File: readline.info, Node: Modifying Text, Next: Utility Functions, Prev: Redisplay, Up: Readline Convenience Functions Modifying Text -------------- ! - Function: int rl_insert_text (char *text) Insert TEXT into the line at the current cursor position. --- 1966,2022 ---- should be used after setting RL_ALREADY_PROMPTED. ! - Function: int rl_reset_line_state (void) Reset the display state to a clean state and redisplay the current line starting on a new line. ! - Function: int rl_crlf (void) ! Move the cursor to the start of the next screen line. ! ! - Function: int rl_show_char (int c) ! Display character C on `rl_outstream'. If Readline has not been ! set to display meta characters directly, this will convert meta ! characters to a meta-prefixed key sequence. This is intended for ! use by applications which wish to do their own redisplay. ! ! - Function: int rl_message (const char *, ...) ! The arguments are a format string as would be supplied to `printf', ! possibly containing conversion specifications such as `%d', and ! any additional arguments necessary to satisfy the conversion ! specifications. The resulting string is displayed in the "echo ! area". The echo area is also used to display numeric arguments ! and search strings. ! - Function: int rl_clear_message (void) Clear the message in the echo area. ! - Function: void rl_save_prompt (void) Save the local Readline prompt display state in preparation for ! displaying a new message in the message area with `rl_message()'. ! - Function: void rl_restore_prompt (void) Restore the local Readline prompt display state saved by the most recent call to `rl_save_prompt'. + - Function: int rl_expand_prompt (char *prompt) + Expand any special character sequences in PROMPT and set up the + local Readline prompt redisplay variables. This function is + called by `readline()'. It may also be called to expand the + primary prompt if the `rl_on_new_line_with_prompt()' function or + `rl_already_prompted' variable is used. It returns the number of + visible characters on the last line of the (possibly multi-line) + prompt. + + - Function: int rl_set_prompt (const char *prompt) + Make Readline use PROMPT for subsequent redisplay. This calls + `rl_expand_prompt()' to expand the prompt and sets `rl_prompt' to + the result. +  ! File: readline.info, Node: Modifying Text, Next: Character Input, Prev: Redisplay, Up: Readline Convenience Functions Modifying Text -------------- ! - Function: int rl_insert_text (const char *text) Insert TEXT into the line at the current cursor position. *************** *** 1814,1859 **** last command was not a kill, a new kill ring slot is used. !  ! File: readline.info, Node: Utility Functions, Next: Alternate Interface, Prev: Modifying Text, Up: Readline Convenience Functions ! Utility Functions ! ----------------- ! - Function: int rl_read_key () ! Return the next character available. This handles input inserted ! into the input stream via PENDING INPUT (*note Readline ! Variables::.) and `rl_stuff_char ()', macros, and characters read ! from the keyboard. ! - Function: int rl_getc (FILE *) ! Return the next character available from the keyboard. - Function: int rl_stuff_char (int c) Insert C into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with ! `rl_read_key ()'. ! - Function: int rl_extend_line_buffer (int len) ! Ensure that `rl_line_buffer' has enough space to hold LEN ! characters, possibly reallocating it if necessary. ! - Function: int rl_initialize () ! Initialize or re-initialize Readline's internal state. ! - Function: int rl_reset_terminal (char *terminal_name) Reinitialize Readline's idea of the terminal settings using TERMINAL_NAME as the terminal type (e.g., `vt100'). If ! TERMINAL_NAME is NULL, the value of the `TERM' environment variable is used. ! - Function: int alphabetic (int c) ! Return 1 if C is an alphabetic character. ! - Function: int numeric (int c) ! Return 1 if C is a numeric character. ! - Function: int ding () Ring the terminal bell, obeying the setting of `bell-style'. - Function: void rl_display_match_list (char **matches, int len, int max) --- 2035,2130 ---- last command was not a kill, a new kill ring slot is used. ! - Function: int rl_push_macro_input (char *macro) ! Cause MACRO to be inserted into the line, as if it had been invoked ! by a key bound to a macro. Not especially useful; use ! `rl_insert_text()' instead. !  ! File: readline.info, Node: Character Input, Next: Terminal Management, Prev: Modifying Text, Up: Readline Convenience Functions ! Character Input ! --------------- ! - Function: int rl_read_key (void) ! Return the next character available from Readline's current input ! stream. This handles input inserted into the input stream via ! RL_PENDING_INPUT (*note Readline Variables::) and ! `rl_stuff_char()', macros, and characters read from the keyboard. ! While waiting for input, this function will call any function ! assigned to the `rl_event_hook' variable. ! ! - Function: int rl_getc (FILE *stream) ! Return the next character available from STREAM, which is assumed ! to be the keyboard. - Function: int rl_stuff_char (int c) Insert C into the Readline input stream. It will be "read" before Readline attempts to read characters from the terminal with ! `rl_read_key()'. ! - Function: int rl_execute_next (int c) ! Make C be the next command to be executed when `rl_read_key()' is ! called. This sets RL_PENDING_INPUT. ! ! - Function: int rl_clear_pending_input (void) ! Unset RL_PENDING_INPUT, effectively negating the effect of any ! previous call to `rl_execute_next()'. This works only if the ! pending input has not already been read with `rl_read_key()'. ! - Function: int rl_set_keyboard_input_timeout (int u) ! While waiting for keyboard input in `rl_read_key()', Readline will ! wait for U microseconds for input before calling any function ! assigned to `rl_event_hook'. The default waiting period is ! one-tenth of a second. Returns the old timeout value. !  ! File: readline.info, Node: Terminal Management, Next: Utility Functions, Prev: Character Input, Up: Readline Convenience Functions ! ! Terminal Management ! ------------------- ! ! - Function: void rl_prep_terminal (int meta_flag) ! Modify the terminal settings for Readline's use, so `readline()' ! can read a single character at a time from the keyboard. The ! META_FLAG argument should be non-zero if Readline should read ! eight-bit input. ! ! - Function: void rl_deprep_terminal (void) ! Undo the effects of `rl_prep_terminal()', leaving the terminal in ! the state in which it was before the most recent call to ! `rl_prep_terminal()'. ! ! - Function: void rl_tty_set_default_bindings (Keymap kmap) ! Read the operating system's terminal editing characters (as would ! be displayed by `stty') to their Readline equivalents. The ! bindings are performed in KMAP. ! ! - Function: int rl_reset_terminal (const char *terminal_name) Reinitialize Readline's idea of the terminal settings using TERMINAL_NAME as the terminal type (e.g., `vt100'). If ! TERMINAL_NAME is `NULL', the value of the `TERM' environment variable is used. !  ! File: readline.info, Node: Utility Functions, Next: Miscellaneous Functions, Prev: Terminal Management, Up: Readline Convenience Functions ! Utility Functions ! ----------------- ! - Function: int rl_extend_line_buffer (int len) ! Ensure that `rl_line_buffer' has enough space to hold LEN ! characters, possibly reallocating it if necessary. ! ! - Function: int rl_initialize (void) ! Initialize or re-initialize Readline's internal state. It's not ! strictly necessary to call this; `readline()' calls it before ! reading any input. ! ! - Function: int rl_ding (void) Ring the terminal bell, obeying the setting of `bell-style'. + - Function: int rl_alphabetic (int c) + Return 1 if C is an alphabetic character. + - Function: void rl_display_match_list (char **matches, int len, int max) *************** *** 1864,1893 **** length of the longest string in `matches'. This function uses the setting of `print-completions-horizontally' to select how the ! matches are displayed (*note Readline Init File Syntax::.). ! The following are implemented as macros, defined in `chartypes.h'. ! - Function: int uppercase_p (int c) Return 1 if C is an uppercase alphabetic character. ! - Function: int lowercase_p (int c) Return 1 if C is a lowercase alphabetic character. ! - Function: int digit_p (int c) Return 1 if C is a numeric character. ! - Function: int to_upper (int c) If C is a lowercase alphabetic character, return the corresponding uppercase character. ! - Function: int to_lower (int c) If C is an uppercase alphabetic character, return the corresponding lowercase character. ! - Function: int digit_value (int c) If C is a number, return the value it represents.  ! File: readline.info, Node: Alternate Interface, Prev: Utility Functions, Up: Readline Convenience Functions Alternate Interface --- 2135,2201 ---- length of the longest string in `matches'. This function uses the setting of `print-completions-horizontally' to select how the ! matches are displayed (*note Readline Init File Syntax::). ! The following are implemented as macros, defined in `chardefs.h'. ! Applications should refrain from using them. ! - Function: int _rl_uppercase_p (int c) Return 1 if C is an uppercase alphabetic character. ! - Function: int _rl_lowercase_p (int c) Return 1 if C is a lowercase alphabetic character. ! - Function: int _rl_digit_p (int c) Return 1 if C is a numeric character. ! - Function: int _rl_to_upper (int c) If C is a lowercase alphabetic character, return the corresponding uppercase character. ! - Function: int _rl_to_lower (int c) If C is an uppercase alphabetic character, return the corresponding lowercase character. ! - Function: int _rl_digit_value (int c) If C is a number, return the value it represents.  ! File: readline.info, Node: Miscellaneous Functions, Next: Alternate Interface, Prev: Utility Functions, Up: Readline Convenience Functions ! ! Miscellaneous Functions ! ----------------------- ! ! - Function: int rl_macro_bind (const char *keyseq, const char *macro, ! Keymap map) ! Bind the key sequence KEYSEQ to invoke the macro MACRO. The ! binding is performed in MAP. When KEYSEQ is invoked, the MACRO ! will be inserted into the line. This function is deprecated; use ! `rl_generic_bind()' instead. ! ! - Function: void rl_macro_dumper (int readable) ! Print the key sequences bound to macros and their values, using ! the current keymap, to `rl_outstream'. If READABLE is non-zero, ! the list is formatted in such a way that it can be made part of an ! `inputrc' file and re-read. ! ! - Function: int rl_variable_bind (const char *variable, const char ! *value) ! Make the Readline variable VARIABLE have VALUE. This behaves as ! if the readline command `set VARIABLE VALUE' had been executed in ! an `inputrc' file (*note Readline Init File Syntax::). ! ! - Function: void rl_variable_dumper (int readable) ! Print the readline variable names and their current values to ! `rl_outstream'. If READABLE is non-zero, the list is formatted in ! such a way that it can be made part of an `inputrc' file and ! re-read. ! ! - Function: int rl_set_paren_blink_timeout (int u) ! Set the time interval (in microseconds) that Readline waits when ! showing a balancing character when `blink-matching-paren' has been ! enabled. ! !  ! File: readline.info, Node: Alternate Interface, Next: A Readline Example, Prev: Miscellaneous Functions, Up: Readline Convenience Functions Alternate Interface *************** *** 1901,1911 **** functions available to make this easy. ! - Function: void rl_callback_handler_install (char *prompt, Vfunction ! *lhandler) Set up the terminal for readline I/O and display the initial expanded value of PROMPT. Save the value of LHANDLER to use as a ! callback when a complete line of input has been entered. ! - Function: void rl_callback_read_char () Whenever an application determines that keyboard input is available, it should call `rl_callback_read_char()', which will --- 2209,2220 ---- functions available to make this easy. ! - Function: void rl_callback_handler_install (const char *prompt, ! rl_vcpfunc_t *lhandler) Set up the terminal for readline I/O and display the initial expanded value of PROMPT. Save the value of LHANDLER to use as a ! function to call when a complete line of input has been entered. ! The function takes the text of the line as an argument. ! - Function: void rl_callback_read_char (void) Whenever an application determines that keyboard input is available, it should call `rl_callback_read_char()', which will *************** *** 1916,1926 **** `NULL' line. ! - Function: void rl_callback_handler_remove () Restore the terminal to its initial state and remove the line handler. This may be called from within a callback as well as independently. ! An Example ! ---------- Here is a function which changes lowercase characters to their --- 2225,2238 ---- `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. !  ! File: readline.info, Node: A Readline Example, Prev: Alternate Interface, Up: Readline Convenience Functions ! ! A Readline Example ! ------------------ Here is a function which changes lowercase characters to their *************** *** 1976,1983 **** for (i = start; i != end; i++) { ! if (uppercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = to_lower (rl_line_buffer[i]); ! else if (lowercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = to_upper (rl_line_buffer[i]); } /* Move point to on top of the last character changed. */ --- 2288,2295 ---- for (i = start; i != end; i++) { ! if (_rl_uppercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]); ! else if (_rl_lowercase_p (rl_line_buffer[i])) ! rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]); } /* Move point to on top of the last character changed. */ *************** *** 1998,2004 **** signals that can be sent to the process currently reading input from the keyboard. Since Readline changes the terminal attributes when it ! is called, it needs to perform special processing when a signal is ! received to restore the terminal to a sane state, or provide application ! writers with functions to do so manually. Readline contains an internal signal handler that is installed for a --- 2310,2316 ---- signals that can be sent to the process currently reading input from the keyboard. Since Readline changes the terminal attributes when it ! is called, it needs to perform special processing when such a signal is ! received in order to restore the terminal to a sane state, or provide ! application writers with functions to do so manually. Readline contains an internal signal handler that is installed for a *************** *** 2006,2011 **** `SIGTSTP', `SIGTTIN', and `SIGTTOU'). When one of these signals is received, the signal handler will reset the terminal attributes to ! those that were in effect before `readline ()' was called, reset the ! signal handling to what it was before `readline ()' was called, and resend the signal to the calling application. If and when the calling application's signal handler returns, Readline will reinitialize the --- 2318,2323 ---- `SIGTSTP', `SIGTTIN', and `SIGTTOU'). When one of these signals is received, the signal handler will reset the terminal attributes to ! those that were in effect before `readline()' was called, reset the ! signal handling to what it was before `readline()' was called, and resend the signal to the calling application. If and when the calling application's signal handler returns, Readline will reinitialize the *************** *** 2013,2034 **** the Readline signal handler performs some additional work, which will cause any partially-entered line to be aborted (see the description of ! `rl_free_line_state ()'). There is an additional Readline signal handler, for `SIGWINCH', which the kernel sends to a process whenever the terminal's size changes (for example, if a user resizes an `xterm'). The Readline `SIGWINCH' ! handler updates Readline's internal screen size state, and then calls ! any `SIGWINCH' signal handler the calling application has installed. ! Readline calls the application's `SIGWINCH' signal handler without ! resetting the terminal to its original state. If the application's ! signal handler does more than update its idea of the terminal size and ! return (for example, a `longjmp' back to a main processing loop), it ! *must* call `rl_cleanup_after_signal ()' (described below), to restore ! the terminal state. Readline provides two variables that allow application writers to control whether or not it will catch certain signals and act on them when they are received. It is important that applications change the ! values of these variables only when calling `readline ()', not in a signal handler, so Readline's internal signal state is not corrupted. --- 2325,2346 ---- the Readline signal handler performs some additional work, which will cause any partially-entered line to be aborted (see the description of ! `rl_free_line_state()' below). There is an additional Readline signal handler, for `SIGWINCH', which the kernel sends to a process whenever the terminal's size changes (for example, if a user resizes an `xterm'). The Readline `SIGWINCH' ! handler updates Readline's internal screen size information, and then ! calls any `SIGWINCH' signal handler the calling application has ! installed. Readline calls the application's `SIGWINCH' signal handler ! without resetting the terminal to its original state. If the ! application's signal handler does more than update its idea of the ! terminal size and return (for example, a `longjmp' back to a main ! processing loop), it _must_ call `rl_cleanup_after_signal()' (described ! below), to restore the terminal state. Readline provides two variables that allow application writers to control whether or not it will catch certain signals and act on them when they are received. It is important that applications change the ! values of these variables only when calling `readline()', not in a signal handler, so Readline's internal signal state is not corrupted. *************** *** 2053,2057 **** - Function: void rl_cleanup_after_signal (void) This function will reset the state of the terminal to what it was ! before `readline ()' was called, and remove the Readline signal handlers for all signals, depending on the values of `rl_catch_signals' and `rl_catch_sigwinch'. --- 2365,2369 ---- - Function: void rl_cleanup_after_signal (void) This function will reset the state of the terminal to what it was ! before `readline()' was called, and remove the Readline signal handlers for all signals, depending on the values of `rl_catch_signals' and `rl_catch_sigwinch'. *************** *** 2062,2066 **** partially-entered keyboard macro, and any partially-entered numeric argument). This should be called before ! `rl_cleanup_after_signal ()'. The Readline signal handler for `SIGINT' calls this to abort the current input line. --- 2374,2378 ---- partially-entered keyboard macro, and any partially-entered numeric argument). This should be called before ! `rl_cleanup_after_signal()'. The Readline signal handler for `SIGINT' calls this to abort the current input line. *************** *** 2071,2079 **** If an application does not wish Readline to catch `SIGWINCH', it may ! call `rl_resize_terminal ()' to force Readline to update its idea of ! the terminal size when a `SIGWINCH' is received. - Function: void rl_resize_terminal (void) ! Update Readline's internal screen size. The following functions install and remove Readline's signal --- 2383,2404 ---- If an application does not wish Readline to catch `SIGWINCH', it may ! call `rl_resize_terminal()' or `rl_set_screen_size()' to force Readline ! to update its idea of the terminal size when a `SIGWINCH' is received. - Function: void rl_resize_terminal (void) ! Update Readline's internal screen size by reading values from the ! kernel. ! ! - Function: void rl_set_screen_size (int rows, int cols) ! Set Readline's idea of the terminal size to ROWS rows and COLS ! columns. ! ! If an application does not want to install a `SIGWINCH' handler, but ! is still interested in the screen dimensions, Readline's idea of the ! screen size may be queried. ! ! - Function: void rl_get_screen_size (int *rows, int *cols) ! Return Readline's idea of the terminal's size in the variables ! pointed to by the arguments. The following functions install and remove Readline's signal *************** *** 2088,2092 **** - Function: int rl_clear_signals (void) Remove all of the Readline signal handlers installed by ! `rl_set_signals ()'.  --- 2413,2417 ---- - Function: int rl_clear_signals (void) Remove all of the Readline signal handlers installed by ! `rl_set_signals()'.  *************** *** 2126,2155 **** There are three major functions used to perform completion: ! 1. The user-interface function `rl_complete ()'. This function is ! called with the same arguments as other Readline functions ! intended for interactive use: COUNT and INVOKING_KEY. It ! isolates the word to be completed and calls `completion_matches ! ()' to generate a list of possible completions. It then either ! lists the possible completions, inserts the possible completions, ! or actually performs the completion, depending on which behavior ! is desired. ! ! 2. The internal function `completion_matches ()' uses your ! "generator" function to generate the list of possible matches, and ! then returns the array of these matches. You should place the ! address of your generator function in `rl_completion_entry_function'. 3. The generator function is called repeatedly from ! `completion_matches ()', returning a string each time. The arguments to the generator function are TEXT and STATE. TEXT is the partial word to be completed. STATE is zero the first time the function is called, allowing the generator to perform any necessary initialization, and a positive non-zero integer for each ! subsequent call. When the generator function returns `(char ! *)NULL' this signals `completion_matches ()' that there are no ! more possibilities left. Usually the generator function computes ! the list of possible completions when STATE is zero, and returns ! them one at a time on subsequent calls. Each string the generator function returns as a match must be allocated with `malloc()'; Readline frees the strings when it has finished with them. --- 2451,2479 ---- There are three major functions used to perform completion: ! 1. The user-interface function `rl_complete()'. This function is ! called with the same arguments as other bindable Readline ! functions: COUNT and INVOKING_KEY. It isolates the word to be ! completed and calls `rl_completion_matches()' to generate a list ! of possible completions. It then either lists the possible ! completions, inserts the possible completions, or actually ! performs the completion, depending on which behavior is desired. ! ! 2. The internal function `rl_completion_matches()' uses an ! application-supplied "generator" function to generate the list of ! possible matches, and then returns the array of these matches. ! The caller should place the address of its generator function in `rl_completion_entry_function'. 3. The generator function is called repeatedly from ! `rl_completion_matches()', returning a string each time. The arguments to the generator function are TEXT and STATE. TEXT is the partial word to be completed. STATE is zero the first time the function is called, allowing the generator to perform any necessary initialization, and a positive non-zero integer for each ! subsequent call. The generator function returns `(char *)NULL' to ! inform `rl_completion_matches()' that there are no more ! possibilities left. Usually the generator function computes the ! list of possible completions when STATE is zero, and returns them ! one at a time on subsequent calls. Each string the generator function returns as a match must be allocated with `malloc()'; Readline frees the strings when it has finished with them. *************** *** 2159,2170 **** Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm ! (see `completion_matches ()'). The default is to do filename completion. ! - Variable: Function * rl_completion_entry_function ! This is a pointer to the generator function for `completion_matches ! ()'. If the value of `rl_completion_entry_function' is `(Function ! *)NULL' then the default filename generator function, ! `filename_completion_function ()', is used.  --- 2483,2494 ---- Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm ! (see `rl_completion_matches()'). The default is to do filename completion. ! - Variable: rl_compentry_func_t * rl_completion_entry_function ! This is a pointer to the generator function for ! `rl_completion_matches()'. If the value of ! `rl_completion_entry_function' is `NULL' then the default filename ! generator function, `rl_filename_completion_function()', is used.  *************** *** 2188,2227 **** Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm ! (see `completion_matches ()' and `rl_completion_entry_function'). The default is to do filename completion. This calls ! `rl_complete_internal ()' with an argument depending on INVOKING_KEY. ! - Function: int rl_possible_completions (int count, int invoking_key)) List the possible completions. See description of `rl_complete ! ()'. This calls `rl_complete_internal ()' with an argument of `?'. ! - Function: int rl_insert_completions (int count, int invoking_key)) Insert the list of possible completions into the line, deleting the ! partially-completed word. See description of `rl_complete ()'. ! This calls `rl_complete_internal ()' with an argument of `*'. ! - Function: char ** completion_matches (char *text, CPFunction ! *entry_func) ! Returns an array of `(char *)' which is a list of completions for ! TEXT. If there are no completions, returns `(char **)NULL'. The ! first entry in the returned array is the substitution for TEXT. ! The remaining entries are the possible completions. The array is terminated with a `NULL' pointer. ! ENTRY_FUNC is a function of two args, and returns a `(char *)'. ! The first argument is TEXT. The second is a state argument; it is zero on the first call, and non-zero on subsequent calls. ENTRY_FUNC returns a `NULL' pointer to the caller when there are no more matches. ! - Function: char * filename_completion_function (char *text, int state) A generator function for filename completion in the general case. ! Note that completion in Bash is a little different because of all ! the pathnames that must be followed when looking up completions ! for a command. The Bash source is a useful reference for writing ! custom completion functions. ! - Function: char * username_completion_function (char *text, int state) A completion generator for usernames. TEXT contains a partial username preceded by a random character (usually `~'). As with all --- 2512,2552 ---- Complete the word at or before point. You have supplied the function that does the initial simple matching selection algorithm ! (see `rl_completion_matches()' and `rl_completion_entry_function'). The default is to do filename completion. This calls ! `rl_complete_internal()' with an argument depending on INVOKING_KEY. ! - Function: int rl_possible_completions (int count, int invoking_key) List the possible completions. See description of `rl_complete ! ()'. This calls `rl_complete_internal()' with an argument of `?'. ! - Function: int rl_insert_completions (int count, int invoking_key) Insert the list of possible completions into the line, deleting the ! partially-completed word. See description of `rl_complete()'. ! This calls `rl_complete_internal()' with an argument of `*'. ! - Function: char ** rl_completion_matches (const char *text, ! rl_compentry_func_t *entry_func) ! Returns an array of strings which is a list of completions for ! TEXT. If there are no completions, returns `NULL'. The first ! entry in the returned array is the substitution for TEXT. The ! remaining entries are the possible completions. The array is terminated with a `NULL' pointer. ! ENTRY_FUNC is a function of two args, and returns a `char *'. The ! first argument is TEXT. The second is a state argument; it is zero on the first call, and non-zero on subsequent calls. ENTRY_FUNC returns a `NULL' pointer to the caller when there are no more matches. ! - Function: char * rl_filename_completion_function (const char *text, ! int state) A generator function for filename completion in the general case. ! TEXT is a partial filename. The Bash source is a useful reference ! for writing custom completion functions (the Bash completion ! functions call this and other Readline functions). ! - Function: char * rl_username_completion_function (const char *text, ! int state) A completion generator for usernames. TEXT contains a partial username preceded by a random character (usually `~'). As with all *************** *** 2235,2255 **** -------------------- ! - Variable: Function * rl_completion_entry_function ! A pointer to the generator function for `completion_matches ()'. ! `NULL' means to use `filename_completion_function ()', the default ! filename completer. ! - Variable: CPPFunction * rl_attempted_completion_function A pointer to an alternative function to create matches. The function is called with TEXT, START, and END. START and END are ! indices in `rl_line_buffer' saying what the boundaries of TEXT ! are. If this function exists and returns `NULL', or if this ! variable is set to `NULL', then `rl_complete ()' will call the ! value of `rl_completion_entry_function' to generate matches, ! otherwise the array of strings returned will be used. ! - Variable: CPFunction * rl_filename_quoting_function A pointer to a function that will quote a filename in an ! application- specific fashion. This is called if filename completion is being attempted and one of the characters in `rl_filename_quote_characters' appears in a completed filename. --- 2560,2583 ---- -------------------- ! - Variable: rl_compentry_func_t * rl_completion_entry_function ! A pointer to the generator function for `rl_completion_matches()'. ! `NULL' means to use `rl_filename_completion_function()', the ! default filename completer. ! - Variable: rl_completion_func_t * rl_attempted_completion_function A pointer to an alternative function to create matches. The function is called with TEXT, START, and END. START and END are ! indices in `rl_line_buffer' defining the boundaries of TEXT, which ! is a character string. If this function exists and returns ! `NULL', or if this variable is set to `NULL', then `rl_complete()' ! will call the value of `rl_completion_entry_function' to generate ! matches, otherwise the array of strings returned will be used. If ! this function sets the `rl_attempted_completion_over' variable to ! a non-zero value, Readline will not perform its default completion ! even if this function returns no matches. ! - Variable: rl_quote_func_t * rl_filename_quoting_function A pointer to a function that will quote a filename in an ! application-specific fashion. This is called if filename completion is being attempted and one of the characters in `rl_filename_quote_characters' appears in a completed filename. *************** *** 2262,2266 **** choose to reset this character. ! - Variable: CPFunction * rl_filename_dequoting_function A pointer to a function that will remove application-specific quoting characters from a filename before completion is attempted, --- 2590,2594 ---- choose to reset this character. ! - Variable: rl_dequote_func_t * rl_filename_dequoting_function A pointer to a function that will remove application-specific quoting characters from a filename before completion is attempted, *************** *** 2271,2278 **** QUOTE_CHAR is zero, the filename was not in an embedded string. ! - Variable: Function * rl_char_is_quoted_p A pointer to a function to call that determines whether or not a specific character in the line buffer is quoted, according to ! whatever quoting mechanism the program calling readline uses. The function is called with two arguments: TEXT, the text of the line, and INDEX, the index of the character in the line. It is used to --- 2599,2606 ---- QUOTE_CHAR is zero, the filename was not in an embedded string. ! - Variable: rl_linebuf_func_t * rl_char_is_quoted_p A pointer to a function to call that determines whether or not a specific character in the line buffer is quoted, according to ! whatever quoting mechanism the program calling Readline uses. The function is called with two arguments: TEXT, the text of the line, and INDEX, the index of the character in the line. It is used to *************** *** 2286,2315 **** sure she wants to see them all. The default value is 100. ! - Variable: char * rl_basic_word_break_characters The basic list of characters that signal a break between words for the completer routine. The default value of this variable is the ! characters which break words for completion in Bash, i.e., `" \t\n\"\\'`@$><=;|&{("'. ! - Variable: char * rl_basic_quote_characters ! List of quote characters which can cause a word break. ! - Variable: char * rl_completer_word_break_characters The list of characters that signal a break between words for ! `rl_complete_internal ()'. The default list is the value of `rl_basic_word_break_characters'. ! - Variable: char * rl_completer_quote_characters ! List of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring `rl_completer_word_break_characters' are treated as any other character, unless they also appear within this list. ! - Variable: char * rl_filename_quote_characters A list of characters that cause a filename to be quoted by the completer when they appear in a completed filename. The default is the null string. ! - Variable: char * rl_special_prefixes The list of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. --- 2614,2643 ---- sure she wants to see them all. The default value is 100. ! - Variable: const char * rl_basic_word_break_characters The basic list of characters that signal a break between words for the completer routine. The default value of this variable is the ! characters which break words for completion in Bash: `" \t\n\"\\'`@$><=;|&{("'. ! - Variable: const char * rl_basic_quote_characters ! A list of quote characters which can cause a word break. ! - Variable: const char * rl_completer_word_break_characters The list of characters that signal a break between words for ! `rl_complete_internal()'. The default list is the value of `rl_basic_word_break_characters'. ! - Variable: const char * rl_completer_quote_characters ! A list of characters which can be used to quote a substring of the line. Completion occurs on the entire substring, and within the substring `rl_completer_word_break_characters' are treated as any other character, unless they also appear within this list. ! - Variable: const char * rl_filename_quote_characters A list of characters that cause a filename to be quoted by the completer when they appear in a completed filename. The default is the null string. ! - Variable: const char * rl_special_prefixes The list of characters that are word break characters, but should be left in TEXT when it is passed to the completion function. *************** *** 2328,2341 **** - Variable: int rl_ignore_completion_duplicates ! If non-zero, then disallow duplicates in the matches. Default is ! 1. - Variable: int rl_filename_completion_desired Non-zero means that the results of the matches are to be treated as ! filenames. This is *always* zero on entry, and can only be changed within a completion entry generator function. If it is set to a non-zero value, directory names have a slash appended and Readline ! attempts to quote completed filenames if they contain any embedded ! word break characters. - Variable: int rl_filename_quoting_desired --- 2656,2670 ---- - Variable: int rl_ignore_completion_duplicates ! If non-zero, then duplicates in the matches are removed. The ! default is 1. - Variable: int rl_filename_completion_desired Non-zero means that the results of the matches are to be treated as ! filenames. This is _always_ zero on entry, and can only be changed within a completion entry generator function. If it is set to a non-zero value, directory names have a slash appended and Readline ! attempts to quote completed filenames if they contain any ! characters in `rl_filename_quote_characters' and ! `rl_filename_quoting_desired' is set to a non-zero value. - Variable: int rl_filename_quoting_desired *************** *** 2343,2357 **** using double quotes (or an application-specific quoting mechanism) if the completed filename contains any characters in ! `rl_filename_quote_chars'. This is *always* non-zero on entry, and can only be changed within a completion entry generator function. The quoting is effected via a call to the function pointed to by `rl_filename_quoting_function'. - Variable: int rl_inhibit_completion ! If this variable is non-zero, completion is inhibit - extern char *getwd (); extern char *xmalloc (); /* The names of functions that actually do the manipulation. */ ! int com_list (), com_view (), com_rename (), com_stat (), com_pwd (); ! int com_delete (), com_help (), com_cd (), com_quit (); /* A structure which contains information on the commands this program --- 2753,2768 ---- #include extern char *xmalloc (); /* The names of functions that actually do the manipulation. */ ! int com_list __P((char *)); ! int com_view __P((char *)); ! int com_rename __P((char *)); ! int com_stat __P((char *)); ! int com_pwd __P((char *)); ! int com_delete __P((char *)); ! int com_help __P((char *)); ! int com_cd __P((char *)); ! int com_quit __P((char *)); /* A structure which contains information on the commands this program *************** *** 2417,2421 **** typedef struct { char *name; /* User printable name of the function. */ ! Function *func; /* Function to call to do the job. */ char *doc; /* Documentation for this function. */ } COMMAND; --- 2771,2775 ---- typedef struct { char *name; /* User printable name of the function. */ ! rl_icpfunc_t *func; /* Function to call to do the job. */ char *doc; /* Documentation for this function. */ } COMMAND; *************** *** 2433,2437 **** { "stat", com_stat, "Print out statistics on FILE" }, { "view", com_view, "View the contents of FILE" }, ! { (char *)NULL, (Function *)NULL, (char *)NULL } }; --- 2787,2791 ---- { "stat", com_stat, "Print out statistics on FILE" }, { "view", com_view, "View the contents of FILE" }, ! { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL } }; *************** *** 2443,2447 **** char *progname; ! /* When non-zero, this global means the user is done using this program. */ int done; --- 2797,2801 ---- char *progname; ! /* When non-zero, this means the user is done using this program. */ int done; *************** *** 2573,2582 **** /* **************************************************************** */ ! char *command_generator (); ! char **fileman_completion (); ! /* Tell the GNU Readline library how to complete. We want to try to complete ! on command names if this is the first word in the line, or on filenames ! if not. */ initialize_readline () { --- 2927,2936 ---- /* **************************************************************** */ ! char *command_generator __P((const char *, int)); ! char **fileman_completion __P((const char *, int, int)); ! /* Tell the GNU Readline library how to complete. We want to try to ! complete on command names if this is the first word in the line, or ! on filenames if not. */ initialize_readline () { *************** *** 2585,2599 **** /* Tell the completer that we want a crack first. */ ! rl_attempted_completion_function = (CPPFunction *)fileman_completion; } ! /* Attempt to complete on the contents of TEXT. START and END bound the ! region of rl_line_buffer that contains the word to complete. TEXT is ! the word to complete. We can use the entire contents of rl_line_buffer ! in case we want to do some simple parsing. Return the array of matches, ! or NULL if there aren't any. */ char ** fileman_completion (text, start, end) ! char *text; int start, end; { --- 2939,2953 ---- /* Tell the completer that we want a crack first. */ ! rl_attempted_completion_function = fileman_completion; } ! /* Attempt to complete on the contents of TEXT. START and END ! bound the region of rl_line_buffer that contains the word to ! complete. TEXT is the word to complete. We can use the entire ! contents of rl_line_buffer in case we want to do some simple ! parsing. Returnthe array of matches, or NULL if there aren't any. */ char ** fileman_completion (text, start, end) ! const char *text; int start, end; { *************** *** 2606,2620 **** directory. */ if (start == 0) ! matches = completion_matches (text, command_generator); return (matches); } ! /* Generator function for command completion. STATE lets us know whether ! to start from scratch; without any state (i.e. STATE == 0), then we ! start at the top of the list. */ char * command_generator (text, state) ! char *text; int state; { --- 2960,2974 ---- directory. */ if (start == 0) ! matches = rl_completion_matches (text, command_generator); return (matches); } ! /* Generator function for command completion. STATE lets us ! know whether to start from scratch; without any state ! (i.e. STATE == 0), then we start at the top of the list. */ char * command_generator (text, state) ! const char *text; int state; { *************** *** 2622,2628 **** char *name; ! /* If this is a new word to complete, initialize now. This includes ! saving the length of TEXT for efficiency, and initializing the index ! variable to 0. */ if (!state) { --- 2976,2982 ---- char *name; ! /* If this is a new word to complete, initialize now. This ! includes saving the length of TEXT for efficiency, and ! initializing the index variable to 0. */ if (!state) { *************** *** 2631,2635 **** } ! /* Return the next name which partially matches from the command list. */ while (name = commands[list_index].name) { --- 2985,2990 ---- } ! /* Return the next name which partially matches from the ! command list. */ while (name = commands[list_index].name) { *************** *** 2776,2780 **** char dir[1024], *s; ! s = getwd (dir); if (s == 0) { --- 3131,3135 ---- char dir[1024], *s; ! s = getcwd (dir, sizeof(dir) - 1); if (s == 0) { *************** *** 2787,2791 **** } ! /* The user wishes to quit using this program. Just set DONE non-zero. */ com_quit (arg) char *arg; --- 3142,3147 ---- } ! /* The user wishes to quit using this program. Just set DONE ! non-zero. */ com_quit (arg) char *arg; *************** *** 2835,2838 **** --- 3191,3195 ---- * notation, readline: Readline Bare Essentials. * readline, function: Basic Behavior. + * variables, readline: Readline Init File Syntax. * yanking text: Readline Killing Commands. *************** *** 2845,2855 **** * Menu: * abort (C-g): Miscellaneous Commands. ! * accept-line (Newline, Return): Commands For History. ! * alphabetic: Utility Functions. * backward-char (C-b): Commands For Moving. * backward-delete-char (Rubout): Commands For Text. * backward-kill-line (C-x Rubout): Commands For Killing. ! * backward-kill-word (M-DEL): Commands For Killing. * backward-word (M-b): Commands For Moving. * beginning-of-history (M-<): Commands For History. --- 3202,3217 ---- * Menu: + * _rl_digit_p: Utility Functions. + * _rl_digit_value: Utility Functions. + * _rl_lowercase_p: Utility Functions. + * _rl_to_lower: Utility Functions. + * _rl_to_upper: Utility Functions. + * _rl_uppercase_p: Utility Functions. * abort (C-g): Miscellaneous Commands. ! * accept-line (Newline or Return): Commands For History. * backward-char (C-b): Commands For Moving. * backward-delete-char (Rubout): Commands For Text. * backward-kill-line (C-x Rubout): Commands For Killing. ! * backward-kill-word (M-): Commands For Killing. * backward-word (M-b): Commands For Moving. * beginning-of-history (M-<): Commands For History. *************** *** 2862,2868 **** * clear-screen (C-l): Commands For Moving. * comment-begin: Readline Init File Syntax. ! * complete (TAB): Commands For Completion. * completion-query-items: Readline Init File Syntax. - * completion_matches: Completion Functions. * convert-meta: Readline Init File Syntax. * copy-backward-word (): Commands For Killing. --- 3224,3229 ---- * clear-screen (C-l): Commands For Moving. * comment-begin: Readline Init File Syntax. ! * complete (): Commands For Completion. * completion-query-items: Readline Init File Syntax. * convert-meta: Readline Init File Syntax. * copy-backward-word (): Commands For Killing. *************** *** 2873,2879 **** * delete-horizontal-space (): Commands For Killing. * digit-argument (M-0, M-1, ... M--): Numeric Arguments. - * digit_p: Utility Functions. - * digit_value: Utility Functions. - * ding: Utility Functions. * disable-completion: Readline Init File Syntax. * do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands. --- 3234,3237 ---- *************** *** 2889,2898 **** * exchange-point-and-mark (C-x C-x): Miscellaneous Commands. * expand-tilde: Readline Init File Syntax. - * filename_completion_function: Completion Functions. * forward-backward-delete-char (): Commands For Text. * forward-char (C-f): Commands For Moving. * forward-search-history (C-s): Commands For History. * forward-word (M-f): Commands For Moving. - * free_undo_list: Allowing Undoing. * history-search-backward (): Commands For History. * history-search-forward (): Commands For History. --- 3247,3254 ---- *************** *** 2907,2911 **** * kill-whole-line (): Commands For Killing. * kill-word (M-d): Commands For Killing. - * lowercase_p: Utility Functions. * mark-modified-lines: Readline Init File Syntax. * menu-complete (): Commands For Completion. --- 3263,3266 ---- *************** *** 2914,2923 **** * non-incremental-forward-search-history (M-n): Commands For History. * non-incremental-reverse-search-history (M-p): Commands For History. - * numeric: Utility Functions. * output-meta: Readline Init File Syntax. * possible-completions (M-?): Commands For Completion. ! * prefix-meta (ESC): Miscellaneous Commands. * previous-history (C-p): Commands For History. ! * quoted-insert (C-q, C-v): Commands For Text. * re-read-init-file (C-x C-r): Miscellaneous Commands. * readline: Basic Behavior. --- 3269,3277 ---- * non-incremental-forward-search-history (M-n): Commands For History. * non-incremental-reverse-search-history (M-p): Commands For History. * output-meta: Readline Init File Syntax. * possible-completions (M-?): Commands For Completion. ! * prefix-meta (): Miscellaneous Commands. * previous-history (C-p): Commands For History. ! * quoted-insert (C-q or C-v): Commands For Text. * re-read-init-file (C-x C-r): Miscellaneous Commands. * readline: Basic Behavior. *************** *** 2926,2932 **** --- 3280,3289 ---- * revert-line (M-r): Miscellaneous Commands. * rl_add_defun: Function Naming. + * rl_add_funmap_entry: Associating Function Names and Bindings. * rl_add_undo: Allowing Undoing. + * rl_alphabetic: Utility Functions. * rl_already_prompted: Readline Variables. * rl_attempted_completion_function: Completion Variables. + * rl_attempted_completion_over: Completion Variables. * rl_basic_quote_characters: Completion Variables. * rl_basic_word_break_characters: Completion Variables. *************** *** 2943,2946 **** --- 3300,3304 ---- * rl_cleanup_after_signal: Readline Signal Handling. * rl_clear_message: Redisplay. + * rl_clear_pending_input: Character Input. * rl_clear_signals: Readline Signal Handling. * rl_complete <1>: Completion Functions. *************** *** 2953,2972 **** --- 3311,3343 ---- * rl_completion_entry_function <1>: Completion Variables. * rl_completion_entry_function: How Completing Works. + * rl_completion_matches: Completion Functions. * rl_completion_query_items: Completion Variables. + * rl_completion_type: Completion Variables. * rl_copy_keymap: Keymaps. * rl_copy_text: Modifying Text. + * rl_crlf: Redisplay. * rl_delete_text: Modifying Text. + * rl_deprep_term_function: Readline Variables. + * rl_deprep_terminal: Terminal Management. + * rl_ding: Utility Functions. * rl_directory_completion_hook: Completion Variables. * rl_discard_keymap: Keymaps. + * rl_dispatching: Readline Variables. * rl_display_match_list: Utility Functions. * rl_do_undo: Allowing Undoing. * rl_done: Readline Variables. + * rl_editing_mode: Readline Variables. * rl_end: Readline Variables. * rl_end_undo_group: Allowing Undoing. * rl_erase_empty_line: Readline Variables. * rl_event_hook: Readline Variables. + * rl_execute_next: Character Input. * rl_executing_keymap: Readline Variables. + * rl_executing_macro: Readline Variables. + * rl_expand_prompt: Redisplay. + * rl_explicit_arg: Readline Variables. * rl_extend_line_buffer: Utility Functions. * rl_filename_completion_desired: Completion Variables. + * rl_filename_completion_function: Completion Functions. * rl_filename_dequoting_function: Completion Variables. * rl_filename_quote_characters: Completion Variables. *************** *** 2975,2978 **** --- 3346,3350 ---- * rl_forced_update_display: Redisplay. * rl_free_line_state: Readline Signal Handling. + * rl_free_undo_list: Allowing Undoing. * rl_function_dumper: Associating Function Names and Bindings. * rl_function_of_keyseq: Associating Function Names and Bindings. *************** *** 2982,2987 **** * rl_get_keymap_by_name: Keymaps. * rl_get_keymap_name: Keymaps. ! * rl_getc: Utility Functions. * rl_getc_function: Readline Variables. * rl_ignore_completion_duplicates: Completion Variables. * rl_ignore_some_completions_function: Completion Variables. --- 3354,3361 ---- * rl_get_keymap_by_name: Keymaps. * rl_get_keymap_name: Keymaps. ! * rl_get_screen_size: Readline Signal Handling. ! * rl_getc: Character Input. * rl_getc_function: Readline Variables. + * rl_gnu_readline_p: Readline Variables. * rl_ignore_completion_duplicates: Completion Variables. * rl_ignore_some_completions_function: Completion Variables. *************** *** 2994,3000 **** --- 3368,3377 ---- * rl_invoking_keyseqs_in_map: Associating Function Names and Bindings. * rl_kill_text: Modifying Text. + * rl_last_func: Readline Variables. * rl_library_version: Readline Variables. * rl_line_buffer: Readline Variables. * rl_list_funmap_names: Associating Function Names and Bindings. + * rl_macro_bind: Miscellaneous Functions. + * rl_macro_dumper: Miscellaneous Functions. * rl_make_bare_keymap: Keymaps. * rl_make_keymap: Keymaps. *************** *** 3003,3006 **** --- 3380,3385 ---- * rl_modifying: Allowing Undoing. * rl_named_function: Associating Function Names and Bindings. + * rl_num_chars_to_read: Readline Variables. + * rl_numeric_arg: Readline Variables. * rl_on_new_line: Redisplay. * rl_on_new_line_with_prompt: Redisplay. *************** *** 3011,3054 **** * rl_possible_completions: Completion Functions. * rl_pre_input_hook: Readline Variables. * rl_prompt: Readline Variables. * rl_read_init_file: Binding Keys. ! * rl_read_key: Utility Functions. * rl_readline_name: Readline Variables. * rl_redisplay: Redisplay. * rl_redisplay_function: Readline Variables. * rl_reset_after_signal: Readline Signal Handling. * rl_reset_line_state: Redisplay. ! * rl_reset_terminal: Utility Functions. * rl_resize_terminal: Readline Signal Handling. * rl_restore_prompt: Redisplay. * rl_save_prompt: Redisplay. * rl_set_keymap: Keymaps. * rl_set_signals: Readline Signal Handling. * rl_special_prefixes: Completion Variables. * rl_startup_hook: Readline Variables. ! * rl_stuff_char: Utility Functions. * rl_terminal_name: Readline Variables. * rl_unbind_command_in_map: Binding Keys. * rl_unbind_function_in_map: Binding Keys. * rl_unbind_key: Binding Keys. * rl_unbind_key_in_map: Binding Keys. * self-insert (a, b, A, 1, !, ...): Commands For Text. * set-mark (C-@): Miscellaneous Commands. * show-all-if-ambiguous: Readline Init File Syntax. * start-kbd-macro (C-x (): Keyboard Macros. - * to_lower: Utility Functions. - * to_upper: Utility Functions. * transpose-chars (C-t): Commands For Text. * transpose-words (M-t): Commands For Text. ! * undo (C-_, C-x C-u): Miscellaneous Commands. * universal-argument (): Numeric Arguments. * unix-line-discard (C-u): Commands For Killing. * unix-word-rubout (C-w): Commands For Killing. * upcase-word (M-u): Commands For Text. - * uppercase_p: Utility Functions. - * username_completion_function: Completion Functions. * visible-stats: Readline Init File Syntax. * yank (C-y): Commands For Killing. ! * yank-last-arg (M-., M-_): Commands For History. * yank-nth-arg (M-C-y): Commands For History. * yank-pop (M-y): Commands For Killing. --- 3390,3443 ---- * rl_possible_completions: Completion Functions. * rl_pre_input_hook: Readline Variables. + * rl_prep_term_function: Readline Variables. + * rl_prep_terminal: Terminal Management. * rl_prompt: Readline Variables. + * rl_push_macro_input: Modifying Text. * rl_read_init_file: Binding Keys. ! * rl_read_key: Character Input. * rl_readline_name: Readline Variables. + * rl_readline_state: Readline Variables. * rl_redisplay: Redisplay. * rl_redisplay_function: Readline Variables. * rl_reset_after_signal: Readline Signal Handling. * rl_reset_line_state: Redisplay. ! * rl_reset_terminal: Terminal Management. * rl_resize_terminal: Readline Signal Handling. * rl_restore_prompt: Redisplay. * rl_save_prompt: Redisplay. + * rl_set_key: Binding Keys. + * rl_set_keyboard_input_timeout: Character Input. * rl_set_keymap: Keymaps. + * rl_set_paren_blink_timeout: Miscellaneous Functions. + * rl_set_prompt: Redisplay. + * rl_set_screen_size: Readline Signal Handling. * rl_set_signals: Readline Signal Handling. + * rl_show_char: Redisplay. * rl_special_prefixes: Completion Variables. * rl_startup_hook: Readline Variables. ! * rl_stuff_char: Character Input. * rl_terminal_name: Readline Variables. + * rl_tty_set_default_bindings: Terminal Management. * rl_unbind_command_in_map: Binding Keys. * rl_unbind_function_in_map: Binding Keys. * rl_unbind_key: Binding Keys. * rl_unbind_key_in_map: Binding Keys. + * rl_username_completion_function: Completion Functions. + * rl_variable_bind: Miscellaneous Functions. + * rl_variable_dumper: Miscellaneous Functions. * self-insert (a, b, A, 1, !, ...): Commands For Text. * set-mark (C-@): Miscellaneous Commands. * show-all-if-ambiguous: Readline Init File Syntax. * start-kbd-macro (C-x (): Keyboard Macros. * transpose-chars (C-t): Commands For Text. * transpose-words (M-t): Commands For Text. ! * undo (C-_ or C-x C-u): Miscellaneous Commands. * universal-argument (): Numeric Arguments. * unix-line-discard (C-u): Commands For Killing. * unix-word-rubout (C-w): Commands For Killing. * upcase-word (M-u): Commands For Text. * visible-stats: Readline Init File Syntax. * yank (C-y): Commands For Killing. ! * yank-last-arg (M-. or M-_): Commands For History. * yank-nth-arg (M-C-y): Commands For History. * yank-pop (M-y): Commands For Killing. *************** *** 3057,3107 ****  Tag Table: ! Node: Top1190 ! Node: Command Line Editing1789 ! Node: Introduction and Notation2440 ! Node: Readline Interaction4058 ! Node: Readline Bare Essentials5251 ! Node: Readline Movement Commands7032 ! Node: Readline Killing Commands7989 ! Node: Readline Arguments9895 ! Node: Searching10870 ! Node: Readline Init File12713 ! Node: Readline Init File Syntax13774 ! Node: Conditional Init Constructs23039 ! Node: Sample Init File25478 ! Node: Bindable Readline Commands28648 ! Node: Commands For Moving29692 ! Node: Commands For History30541 ! Node: Commands For Text33258 ! Node: Commands For Killing35261 ! Node: Numeric Arguments37228 ! Node: Commands For Completion38355 ! Node: Keyboard Macros40103 ! Node: Miscellaneous Commands40662 ! Node: Readline vi Mode43466 ! Node: Programming with GNU Readline45236 ! Node: Basic Behavior46204 ! Node: Custom Functions49530 ! Node: The Function Type50508 ! Node: Function Writing51353 ! Node: Readline Variables52437 ! Node: Readline Convenience Functions56649 ! Node: Function Naming57387 ! Node: Keymaps58615 ! Node: Binding Keys60329 ! Node: Associating Function Names and Bindings62903 ! Node: Allowing Undoing64746 ! Node: Redisplay67331 ! Node: Modifying Text69108 ! Node: Utility Functions70019 ! Node: Alternate Interface72799 ! Node: Readline Signal Handling76093 ! Node: Custom Completers81139 ! Node: How Completing Works81854 ! Node: Completion Functions84850 ! Node: Completion Variables87865 ! Node: A Short Completion Example95768 ! Node: Concept Index108074 ! Node: Function and Variable Index108828  End Tag Table --- 3446,3500 ----  Tag Table: ! Node: Top1164 ! Node: Command Line Editing1763 ! Node: Introduction and Notation2414 ! Node: Readline Interaction4032 ! Node: Readline Bare Essentials5219 ! Node: Readline Movement Commands7000 ! Node: Readline Killing Commands7957 ! Node: Readline Arguments9867 ! Node: Searching10903 ! Node: Readline Init File12859 ! Node: Readline Init File Syntax13920 ! Node: Conditional Init Constructs23842 ! Node: Sample Init File26367 ! Node: Bindable Readline Commands29537 ! Node: Commands For Moving30587 ! Node: Commands For History31436 ! Node: Commands For Text34294 ! Node: Commands For Killing36281 ! Node: Numeric Arguments38232 ! Node: Commands For Completion39360 ! Node: Keyboard Macros40892 ! Node: Miscellaneous Commands41451 ! Node: Readline vi Mode44244 ! Node: Programming with GNU Readline46062 ! Node: Basic Behavior47030 ! Node: Custom Functions50443 ! Node: Readline Typedefs51421 ! Node: Function Writing53050 ! Node: Readline Variables54134 ! Node: Readline Convenience Functions63133 ! Node: Function Naming64115 ! Node: Keymaps65367 ! Node: Binding Keys67123 ! Node: Associating Function Names and Bindings70049 ! Node: Allowing Undoing72294 ! Node: Redisplay74829 ! Node: Modifying Text77900 ! Node: Character Input79033 ! Node: Terminal Management80678 ! Node: Utility Functions81853 ! Node: Miscellaneous Functions83920 ! Node: Alternate Interface85512 ! Node: A Readline Example87135 ! Node: Readline Signal Handling89072 ! Node: Custom Completers94675 ! Node: How Completing Works95390 ! Node: Completion Functions98388 ! Node: Completion Variables101392 ! Node: A Short Completion Example110763 ! Node: Concept Index123288 ! Node: Function and Variable Index124110  End Tag Table diff -Nrc2 readline-4.1/doc/readline.ps readline-4.2/doc/readline.ps *** readline-4.1/doc/readline.ps Wed Mar 1 14:53:16 2000 --- readline-4.2/doc/readline.ps Mon Apr 16 11:05:46 2001 *************** *** 1,6 **** %!PS-Adobe-2.0 ! %%Creator: dvips(k) 5.82 Copyright 1998 Radical Eye Software %%Title: readline.dvi ! %%Pages: 56 %%PageOrder: Ascend %%BoundingBox: 0 0 612 792 --- 1,6 ---- %!PS-Adobe-2.0 ! %%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software %%Title: readline.dvi ! %%Pages: 62 %%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 2000.03.01:1453 %%BeginProcSet: texc.pro %! --- 9,13 ---- %DVIPSCommandLine: dvips -D 300 -t letter -o readline.ps readline.dvi %DVIPSParameters: dpi=300, compressed ! %DVIPSSource: TeX output 2001.04.16:1105 %%BeginProcSet: texc.pro %! *************** *** 21,27 **** exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] ! N/FBB[0 0 0 0]N/nn 0 N/IE 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array ! /BitMaps X/BuildChar{CharBuilder}N/Encoding IE N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A --- 21,27 ---- exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] ! N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array ! /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A *************** *** 51,55 **** SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X ! 1000 div/DVImag X/IE 256 array N 2 string 0 1 255{IE S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ --- 51,55 ---- SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X ! 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ *************** *** 70,85 **** TeXDict begin 40258431 52099146 1000 300 300 (readline.dvi) @start ! %DVIPSBitmapFont: Fa cmti10 10.95 1 ! /Fa 1 47 df<127012F8A212F012E005057B840E>46 D E ! %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fb cmbxti10 14.4 1 ! /Fb 1 47 df<120E123FEA7F80A212FFA21300127E123C0909798815>46 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fc cmmi9 9 1 ! /Fc 1 59 df<126012F0A2126004047D830B>58 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fd cmtt9 9 53 ! /Fd 53 127 df<126012F0AD12601200A4126012F0A212600417789614>33 D35 D46 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fb cmsl9 9 1 ! /Fb 1 121 df<383FC7E038078380EB0200EA038413C8EA01D8EA00F05B7F1201133812 ! 02487EEA081E123838FC3FC013107F8F14>120 D E ! %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fc cmsltt10 9 4 ! /Fc 4 78 df45 D48 ! D<134013E0EA01C01203120F123D12111201EA0380A6EA0700A6120EEAFFE0A20B177B96 ! 14>I<381F81F813C1380FC3E0EA0EC213C6A213CE13CC381CCDC013DD13D9A213F1A238 ! 38E3801303A53870070038FC0FC0A215177F9614>77 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fd cmtt9 9 46 ! /Fd 46 127 df<126012F0AD12601200A4126012F0A212600417789614>33 D35 DI<127012F812FCA2127C120C1218 123012E012C0060A798414>44 DI<127012F8A3127005057984 ! 14>I48 D<1203A25A5A123F12F712471207AEEA7FF0A20C177C ! 9614>I<1306131E133E13F8EA01F0EA03C0EA0F80EA1F00123C12F85A7E123C121FEA0F ! 80EA03C0EA01F0EA00F8133E131E13060F157E9514>60 D<12C012F07E123E7EEA0780EA ! 03E0EA01F0EA0078133E131E133E1378EA01F0EA03E0EA0780EA1F00123E12F85A12C00F ! 157E9514>62 DIIII<3801F180EA07FFEA0E1FEA1C ! 071238EA7003A348C7FCA738700380A338380700121CEA0E0EEA07FCEA01F011177F9614 ! >III76 ! D<38FC1F80A2007C1300EA7637A4EA7777A2EA7367A313E7EA71C7A2EA7007A638F80F80 ! A211177F9614>I<38FE3F80A2383E0E00123BA4138E1239A213CEA31238A213EE136EA4 ! 133E12FEA211177F9614>I82 DI<387FFF80B5FCEAE1C3A43801C000AFEA0FF8A211177F9614>I< ! EAFFE0A21200B3A712FFA20B1D7F9914>93 D95 ! D97 D<12FCA2121CA513F8EA1DFEEA1F07EA1E03001C1380EB01C0 ! A6EB0380001E1300EA1F0EEA1DFCEA0CF81217809614>II<137EA2130E ! A5EA07CEEA0FFEEA1C3EEA301EEA700E12E0A61270EA301EEA383E381FEFC0EA07CF1217 ! 7F9614>II<13FCEA01FEEA038EEA07041300A3EA7FFE12 ! FFEA0700ACEAFFF8A20F177F9614>II<12FCA2121CA51378EA1DFEEA1F86EA1E07121CAA38FF ! 8FE0A21317809614>I<1206120FA21206C7FCA4B4FCA21207ACEAFFF8A20D187C9714>I< ! 12FCA2121CA5EBFF80A2EB1C005B5B5BEA1DC0EA1FE0A2EA1E70EA1C38133C131C7F38FF ! 1F80A21117809614>107 DIIIIIIII<1206120EA4EA7FFC12FFEA0E00A8130EA3131CEA07F8EA01F0 ! 0F157F9414>II<38FE3F80A238 ! 3C1E00EA1C1CA36C5AA3EA0630EA0770A36C5AA311107F8F14>I<38FE3F80A238700700 ! EA380EA3EA39CEA3EA1B6C121AA3EA1E7CA2EA0E3811107F8F14>II<38 ! FE3F80A2381C0E005BA2120E5BA212071330A2EA0370A25B1201A25BA3485A12730077C7 ! FC127E123C11187F8F14>II126 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fe cmsl9 9 2 ! /Fe 2 121 df<1270A212F0126004047D830B>46 D<383FC7E038078380EB0200EA0384 ! 13C8EA01D8EA00F05B7F120113381202487EEA081E123838FC3FC013107F8F14>120 ! D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff cmr9 9 39 --- 93,142 ---- EA3FF8EA7FFCEAF39EEA638CEA0380A30F107E9214>I<127012F812FCA2127C120C1218 123012E012C0060A798414>44 DI<127012F8A3127005057984 ! 14>I<1203A25A5A123F12F712471207AEEA7FF0A20C177C9614>49 ! D<1306131E133E13F8EA01F0EA03C0EA0F80EA1F00123C12F85A7E123C121FEA0F80EA03 ! C0EA01F0EA00F8133E131E13060F157E9514>60 D<12C012F07E123E7EEA0780EA03E0EA ! 01F0EA0078133E131E133E1378EA01F0EA03E0EA0780EA1F00123E12F85A12C00F157E95 ! 14>62 DIII<3801F180EA07FFEA0E1FEA1C071238EA7003A348C7FCA738 ! 700380A338380700121CEA0E0EEA07FCEA01F011177F9614>67 D<38FC1F80A2007C1300 ! EA7637A4EA7777A2EA7367A313E7EA71C7A2EA7007A638F80F80A211177F9614>77 ! D<38FE3F80A2383E0E00123BA4138E1239A213CEA31238A213EE136EA4133E12FEA21117 ! 7F9614>I82 D93 ! D95 D97 D<12FCA2121CA513F8EA1DFEEA ! 1F07EA1E03001C1380EB01C0A6EB0380001E1300EA1F0EEA1DFCEA0CF81217809614>I< ! EA03F8EA0FFEEA1C0EEA3804EA7000126012E0A412601270EA380EEA1C1EEA0FFCEA03F0 ! 0F107E8F14>I<137EA2130EA5EA07CEEA0FFEEA1C3EEA301EEA700E12E0A61270EA301E ! EA383E381FEFC0EA07CF12177F9614>II<13FCEA01FEEA ! 038EEA07041300A3EA7FFE12FFEA0700ACEAFFF8A20F177F9614>II<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 ! /Fe 1 47 df<1230127812F0126005047C830C>46 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Ff cmr9 9 39 *************** *** 246,302 **** 19>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fi cmtt10 12 24 ! /Fi 24 122 df<13E0A538F0E1E0EAFCE7387EEFC0381FFF00EA07FCEA01F0EA07FCEA1F ! FF387EEFC038FCE7E0EAF0E13800E000A513157D991A>42 D67 D69 D<387FFFFCB5FC7E380E00 ! 1CA51400A2EB0380A3EA0FFFA3EA0E03A390C7FCA8EA7FE012FF127F161E7F9D1A>I73 D<387F03F838FF87FC387F03F8381C01 ! E0EB03C01480EB07005B131E131C5B13785B7F121DEA1FDC139C130EEA1E0F7F001C1380 ! 1303EB01C0A2EB00E0A21470007F13FC38FF81FE387F00FC171E7F9D1A>75 ! DI80 D<38FF01FEA3381C0070A3001E13F0000E13E0A3380701 ! C0A438038380A43801C700A4EA00C613EEA3136C137CA21338171E7F9D1A>86 ! D97 D99 DII<12FEA3120EA6133EEB ! FF80000F13C013C1EB80E01300120EAC38FFE3FE13E713E3171E7F9D1A>104 ! DI< ! 387CE0E038FFFBF8EA7FFF381F1F1CEA1E1EA2EA1C1CAC387F1F1F39FF9F9F80397F1F1F ! 00191580941A>109 DIII<387F81F838FF8FFC387F9FFE ! 3803FE1EEBF80CEBE000A25B5BAAEA7FFFB5FC7E17157F941A>114 ! D<487E1203A6387FFFE0B5FCA238038000AA1470A43801C1E013FF6C1380EB3F00141C7F ! 9B1A>116 D<38FE0FE0A3EA0E00AD1301EA0F033807FFFE7EEA00FC17157F941A>I<387F ! C7FC00FF13FE007F13FC380E00E0A3380701C0A338038380A33801C700A3EA00EEA3137C ! A2133817157F941A>I<387FC7FC00FF13FE007F13FC380E00E0A27EEB01C013811203EB ! 8380EA01C3A2EBC700EA00E7A213E61366136E133CA31338A3137813701230EA78E01271 ! EA7FC06C5A001EC7FC17207F941A>121 D E ! %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fj cmmi10 10.95 1 ! /Fj 1 59 df<127012F8A3127005057C840D>58 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fk cmsltt10 10.95 6 ! /Fk 6 102 df<1206120FEA1F80120FA21203EA0700A25A120E123C127C12F01260090E ! 769B18>39 D<387FFFC0B512E0A26C13C013047C8F18>45 D67 D<3907E01F80000FEB3FC0000714803903B02E ! 00146EA214CE380730DC1331149CA21333141C000E5B13371336133E133C131848C65AA6 ! 38FE03F800FF7F00FE5B1A1C7F9B18>77 D<126012F0A37E1278A3127C123CA3123E121E ! A3121F7EA313801207A313C01203A413E01201A313F0120013600C24789F18>92 ! D<13F8EA07FE487E381F0780EA3C03387801C0127012E0A2B5FCA2148000E0C7FCA21303 ! 3870078038780F00EA3FFE6C5AEA07F012147B9318>101 D E ! %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fl cmbx12 13.14 52 ! /Fl 52 122 df<123C127E12FFA4127E123C08087C8711>46 D48 D<131C133C13FC12FFA21200B3AA --- 241,290 ---- 19>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fi cmtt10 12 29 ! /Fi 29 122 df<13E0A538F0E1E0EAFCE7387EEFC0381FFF00EA07FCEA01F0EA07FCEA1F ! FF387EEFC038FCE7E0EAF0E13800E000A513157D991A>42 D69 ! D<387FFFFCB5FC7E380E001CA51400A2EB0380A3EA0FFFA3EA0E03A390C7FCA8EA7FE012 ! FF127F161E7F9D1A>I73 ! D<387F03F838FF87FC387F03F8381C01E0EB03C01480EB07005B131E131C5B13785B7F12 ! 1DEA1FDC139C130EEA1E0F7F001C13801303EB01C0A2EB00E0A21470007F13FC38FF81FE ! 387F00FC171E7F9D1A>75 DI<387FFFC0B512E0A26C13C013047D7E1A>95 D97 D<12FEA3120EA6133EEBFF80000F13E0EBC1F0EB8070EB00 ! 38120E141CA7000F13381478EB80F0EBC1E0EBFFC0000E138038063E00161E7F9D1A>I< ! EBFF80000313C0000F13E0EA1F01383C00C04813001270A25AA51270A2007813707E381F ! 01F0380FFFE0000313C03800FE0014157D941A>III< ! EB07E0EB1FF0EB3FF8EB7878EBF030EBE000A4387FFFF0B5FCA23800E000AF383FFF8048 ! 13C06C1380151E7F9D1A>I<3801F87C3807FFFE5A381E078C381C0380383801C0A5381C ! 0380EA1E07381FFF005BEA39F80038C7FCA27E381FFF8014E04813F83878007C0070131C ! 48130EA40070131C0078133C003E13F8381FFFF0000713C00001130017217F941A>I<12 ! FEA3120EA6133EEBFF80000F13C013C1EB80E01300120EAC38FFE3FE13E713E3171E7F9D ! 1A>I ! I<12FEA3120EA6EB0FFCEB1FFEEB0FFCEB03C0EB0780EB0F00131E5B5B13FC120F13DE13 ! 8F380E07801303EB01C014E0EB00F038FFE3FE14FF14FE181E7F9D1A>107 ! DI<387CE0E038FFFBF8EA7FFF381F1F1CEA ! 1E1EA2EA1C1CAC387F1F1F39FF9F9F80397F1F1F00191580941A>IIII<3801F8E0EA07FEEA0FFFEA1E07EA3C03EA78011270EAE000A613011270EA ! 7803123CEA1E0FEA0FFFEA07FCEA01F0C7FCA8EB0FFEA317207E941A>I<387F81F838FF ! 8FFC387F9FFE3803FE1EEBF80CEBE000A25B5BAAEA7FFFB5FC7E17157F941A>I<3807FB ! 80EA1FFF127FEA7807EAE003A30078C7FCEA7FC0EA1FFCEA07FE38003F801307386001C0 ! 12E0A2EAF00338FC0780B51200EAEFFEEAE3F812157C941A>I<487E1203A6387FFFE0B5 ! FCA238038000AA1470A43801C1E013FF6C1380EB3F00141C7F9B1A>I<38FE0FE0A3EA0E ! 00AD1301EA0F033807FFFE7EEA00FC17157F941A>I<387FC7FC00FF13FE007F13FC380E ! 00E0A3380701C0A338038380A33801C700A3EA00EEA3137CA2133817157F941A>I<387F ! C7FC00FF13FE007F13FC380E00E0A27EEB01C013811203EB8380EA01C3A2EBC700EA00E7 ! A213E61366136E133CA31338A3137813701230EA78E01271EA7FC06C5A001EC7FC17207F ! 941A>121 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fj cmbx12 13.14 52 ! /Fj 52 122 df<123C127E12FFA4127E123C08087C8711>46 D48 D<131C133C13FC12FFA21200B3AA *************** *** 402,454 **** >I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fm cmsl10 10.95 28 ! /Fm 28 122 df12 ! D45 D<0007B512F83900F800780178133815185B1508A53901E0 ! 0800A314181438EBFFF83803C0301410A491C7FC485AA648C8FC7FEAFFFC1D1F7E9E1E> ! 70 D<3A07FF803FE03A00F8001F000178130C5D4913205D5D4AC7FC1402140848485A5C ! 146014F013E1EBE4F83803C878EBD07CEBE03CEBC03E141E141F48487E81140781140381 ! 380F00016D487E39FFF00FFE231F7E9E23>75 D97 D<1207123F120F7EA2120EA65A137CEA1D83381E0180001C13C0EB00E05A14F0A538 ! 7001E0A214C013031480EB0700EAE80EEACC38EA83E014207B9F19>I<13FEEA0383380E ! 0780121C0038130090C7FC12785AA45AA37E5BEA70026C5AEA1C18EA07E011147D9314> ! I<1438EB01F8EB00781438A21470A614E013FCEA0382EA0601121CEA3C00383801C01278 ! 12F0A438E00380A412F0EA700738380F00381C37803807C7E015207D9F19>I<13F8EA07 ! 0EEA0E07121C383803801278127012F0A2B5FC00F0C7FC5AA46C5AEA7002EA3004EA1C18 ! EA07E011147D9314>II<140EEB3E11EBE1A33801C1C238 ! 0381E0EA07801301120FA3380703C01480EB8700EA04FC48C7FCA21218121CEA0FFF14C0 ! 14E0381800F04813305A5AA3006013606C13C0381C0700EA07FC181F809417>I<13E012 ! 0712011200A2485AA6485AEB8F80EB90E013A0EBC0601380000713E01300A5380E01C0A6 ! 381C0380001E13C038FF8FF014207E9F19>II<13E0120712011200 ! A2485AA6485AEB81FCEB80F014C0EB81801400EA07045B13181338137C131C120E7FA213 ! 0F7F1480EA1C03381E07C038FF8FF016207E9F18>107 D<13E0120712011200A2EA01C0 ! A6EA0380A6EA0700A6120EA65A121EEAFF800B207F9F0C>I<390387C07C391F98618639 ! 07A072073903C03403EB80380007EB7807EB0070A5000EEBE00EA64848485A001EEBE01E ! 3AFFCFFCFFC022147E9326>I<38038F80381F90E0EA07A03803C0601380000713E01300 ! A5380E01C0A6381C0380001E13C038FF8FF014147E9319>I<13FCEA0387380E0180381C ! 00C04813E0A24813F012F0A438E001E0A214C0130300F0138038700700EA380E6C5AEA07 ! E014147D9317>I ! IIII<1380EA0100A35A5A5A121EEAFFF8EA0E00 ! A45AA65A1310A41320A2EA1840EA0F800D1C7C9B12>I<381C0380EAFC1FEA3C07EA1C03 ! A238380700A6EA700EA4131EA25BEA305E381F9F8011147B9319>I<38FF83F8381E00E0 ! 001C13C01480121E380E01005B13025B12075BA25BEA039013A013E05B5B120190C7FC15 ! 147C9318>I<39FF9FE1FC393C078070391C030060148015401580EA0E0790380D810013 ! 09EB19C21311380F21C4EA0720EB40C814E8EB80F0A26C485A1460000213401E147C9321 ! >I<381FF0FF3803C0780001137014403800E0C0EBE180EB73001376133CA2131C132E13 ! 4E1387EA0107380203801204380C01C0383C03E038FE07FC18147F9318>I<390FF83F80 ! 3901E00E00EBC00C140813E000005B143014205C13705CA20171C7FC1339133A133E133C ! 133813181310A25BA25BEA70C0EAF08000F1C8FC12E61278191D809318>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fn cmr8 8 41 ! /Fn 41 124 df<126012F0A212701210A21220A21240A2040A7D960A>39 D45 D<1206120E12FE120EB1EAFFE00B157D9412>49 D<13101338A3135CA3138EA3EA0107A238020380A33807FFC0EA0401A2380800E0A20018 --- 390,513 ---- >I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fk cmsl10 10.95 46 ! /Fk 46 122 df12 ! DI ! 45 D<137EEA01C338030180000713C0EA0E0014E05AA2EA3C0112381278A538F003C0A5 ! 1480130712E01400A2130E1260EA701CEA3038EA3870EA0FC0131F7C9D17>48 ! D<13181338EA01F8EA0E701200A513E0A6EA01C0A6EA0380A6EA07001380EAFFFC0E1E7B ! 9D17>I<1408140C141C143CA2147C147E149EA2EB011EA21302801304A21308A2011013 ! 8014071320A2EB7FFF90384007C0EB8003A2EA0100A21202EC01E01206001F130339FF80 ! 1FFE1F207F9F22>65 D<0007B5FC3900F803C090387801E0EC00F04913F8A515F03801E0 ! 01EC03E015C0EC0F809038FFFE009038E00F803903C003C0EC01E015F0A21400A2485A14 ! 01A215E01403EC07C0390F000F80EC3E00B512F01D1F7E9E20>II<0007B57E3900F801E0903878007081497F151E150E150FA348481480A6 ! 484814005DA3151E153E4848133C5DA25D4A5A4A5A260F000FC7FC143CB512F0211F7E9E ! 23>I<0007B512FC3900F8007C0178131C150C5B1504A414043901E00800A31438EBFFF8 ! EBE0383803C010A4EC00081510485AA21520A2156015C0380F00011407B612801E1F7E9E ! 1F>I<0007B512F83900F800780178133815185B1508A53901E00800A314181438EBFFF8 ! 3803C0301410A491C7FC485AA648C8FC7FEAFFFC1D1F7E9E1E>I<3807FF803800F80013 ! 78A25BA6485AA6485AA6485AA648C7FC7FEAFFF0111F7E9E10>73 ! D<3A07FF803FE03A00F8001F000178130C5D4913205D5D4AC7FC1402140848485A5C1460 ! 14F013E1EBE4F83803C878EBD07CEBE03CEBC03E141E141F48487E81140781140381380F ! 00016D487E39FFF00FFE231F7E9E23>75 D<3807FFE0D800FCC7FC1378A25BA6485AA648 ! 5AA41580EC0100EA0780A25C14021406140E380F001E147CB512FC191F7E9E1C>I78 DI< ! 0007B5FC3900F803C090387800F015785B157CA41578484813F815F0EC01E0EC03C0EC0F ! 00EBFFFCD803C0C7FCA6485AA648C8FC7FEAFFF81E1F7E9E1F>I<3807FFFE3900F80780 ! 90387801E0EC00F05B15F8A415F03801E00115E0EC03C0EC0780EC1E00EBFFF03803C038 ! 80141E140EA2140F48485AA51501D80F0013029038800F8239FFF8078CC7EA01F020207E ! 9E22>82 DI<003FB512F0383C07800030 ! 1430126039400F0010A212C01280A3D8001E1300A65BA65BA65B7F383FFFE01C1F7A9E21 ! >I<39FFF00FF8391F0003E06CEB01801400001EEB0100A6481302A6485BA600705BA25C ! A200785B1238001813C06C48C7FCEA0706EA01F81D20799E22>I<3BFFF07FF81FF03B1F ! 000FC007C0001E903907800380001FED01006C1502140F5EEC17C002135B142301805C00 ! 0713435E14C3913883E0401481D981015B13C1D803C213E193C7FC13C415F2EBC80015F4 ! EA01F015F85B5D5B15605B000014402C207A9E2F>87 D97 D<1207123F120F7EA2120EA65A137CEA1D83381E0180001C13C0EB00E05A14 ! F0A5387001E0A214C013031480EB0700EAE80EEACC38EA83E014207B9F19>I<13FEEA03 ! 83380E0780121C0038130090C7FC12785AA45AA37E5BEA70026C5AEA1C18EA07E011147D ! 9314>I<1438EB01F8EB00781438A21470A614E013FCEA0382EA0601121CEA3C00383801 ! C0127812F0A438E00380A412F0EA700738380F00381C37803807C7E015207D9F19>I<13 ! F8EA070EEA0E07381C038012381278127012F0B5FC00F0C7FCA25AA46C5AEA7002EA3004 ! EA1C18EA07E011147D9314>II<140EEB3E11EBE1A33801 ! C1C2380381E0EA07801301120FA3380703C01480EB8700EA04FC48C7FCA21218121CEA0F ! FF14C014E0381800F04813305A5AA3006013606C13C0381C0700EA07FC181F809417>I< ! 13E0120712011200A2485AA6485AEB8F80EB90E013A0EBC0601380000713E01300A5380E ! 01C0A6381C0380001E13C038FF8FF014207E9F19>II<13E0120712 ! 011200A2485AA6485AEB81FCEB80F014C0EB81801400EA07045B13181338137C131C120E ! 7FA2130F7F1480EA1C03381E07C038FF8FF016207E9F18>107 D<13E0120712011200A2 ! EA01C0A6EA0380A6EA0700A6120EA65A121EEAFF800B207F9F0C>I<390387C07C391F98 ! 61863907A072073903C03403EB80380007EB7807EB0070A5000EEBE00EA64848485A001E ! EBE01E3AFFCFFCFFC022147E9326>I<38038F80381F90E0EA07A03803C0601380000713 ! E01300A5380E01C0A6381C0380001E13C038FF8FF014147E9319>I<13FCEA0387380E01 ! 80381C00C04813E0A24813F012F0A438E001E0A214C0130300F0138038700700EA380E6C ! 5AEA07E014147D9317>IIII< ! EA01F9EA0607EA080312181301EA3802EA3C00121F13F0EA07FCEA01FEEA001FEA400713 ! 03A212601306EAF004EAC818EA87E010147F9312>I<1380EA0100A35A5A5A121EEAFFF8 ! EA0E00A45AA65A1310A41320A2EA1840EA0F800D1C7C9B12>I<381C0380EAFC1FEA3C07 ! EA1C03A238380700A6EA700EA4131EA25BEA305E381F9F8011147B9319>I<38FF83F838 ! 1E00E0001C13C01480121E380E01005B13025B12075BA25BEA039013A013E05B5B120190 ! C7FC15147C9318>I<39FF9FE1FC393C078070391C030060148015401580EA0E0790380D ! 81001309EB19C21311380F21C4EA0720EB40C814E8EB80F0A26C485A1460000213401E14 ! 7C9321>I<381FF0FF3803C0780001137014403800E0C0EBE180EB73001376133CA2131C ! 132E134E1387EA0107380203801204380C01C0383C03E038FE07FC18147F9318>I<390F ! F83F803901E00E00EBC00C140813E000005B143014205C13705CA20171C7FC1339133A13 ! 3E133C133813181310A25BA25BEA70C0EAF08000F1C8FC12E61278191D809318>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fl cmti10 10.95 20 ! /Fl 20 122 df12 ! D<127012F8A212F012E005057B840E>46 D ! 97 D<137EEA01C138030080EA0E07121E001C1300003CC7FC5AA35AA45B12701302EA30 ! 0CEA1830EA07C011147C9315>99 D<1478EB03F8EB0070A414E0A4EB01C0A213F1EA0389 ! 38070780EA0E03121C123C383807001278A3EAF00EA31420EB1C40A2EA703C135C38308C ! 80380F070015207C9F17>I<137CEA01C2EA0701120E121C123CEA3802EA780CEA7FF0EA ! 78005AA4EA7001A21302EA380CEA1830EA07C010147C9315>I103 D<13C0EA01E0A213C0C7FC ! A7120E12131223EA4380EA4700A21287120EA35AA3EA38401380A21270EA31001232121C ! 0B1F7C9E0E>105 D108 D<391C0F80F0392630C318394740640C903880680EEB0070 ! A2008E495A120EA34848485AA3ED70803A3803807100A215E115623970070064D8300313 ! 3821147C9325>I<381C0F80382630C0384740601380EB0070A2008E13E0120EA3381C01 ! C0A3EB038400381388A2EB0708EB031000701330383001C016147C931A>I<137CEA01C3 ! 38030180000E13C0121E001C13E0123C1278A338F003C0A3EB07801400EA700F130EEA30 ! 18EA1870EA07C013147C9317>I<3801C1E0380262183804741C1378EB701EA2EA08E012 ! 00A33801C03CA3143838038078147014E0EBC1C038072380EB1E0090C7FCA2120EA45AA2 ! B47E171D809317>I114 D<13FCEA0302EA0601EA0C03130713061300EA0F8013F0 ! EA07F8EA03FCEA003E130E1270EAF00CA2EAE008EA4010EA2060EA1F8010147D9313>I< ! EA018013C0EA0380A4EA0700A2EAFFF0EA0700120EA45AA45AA31320EA7040A21380A2EA ! 3100121E0C1C7C9B0F>I<000E13C0001313E0382301C0EA4381EA4701A238870380120E ! A3381C0700A31410EB0E201218A2381C1E40EA0C263807C38014147C9318>I<380E0380 ! EA1307002313C0EA4383EA4701130000871380120EA3381C0100A31302A25BA25BEA0E30 ! EA03C012147C9315>I<000EEBC1C0001313E3392301C3E0384381C1384701C015603987 ! 038040120EA3391C070080A3EC0100A21306EB0F02000C5B380E13083803E1F01B147C93 ! 1E>I<000E13C0001313E0382301C0EA4381EA4701A238870380120EA3381C0700A4130E ! 1218A2EA1C1EEA0C3CEA07DCEA001CA25B12F05BEAE060485AEA4380003EC7FC131D7C93 ! 16>121 D E ! %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fm cmr8 8 29 ! /Fm 29 118 df<126012F0A212701210A21220A21240A2040A7D960A>39 D45 D<1206120E12FE120EB1EAFFE00B157D9412>49 D<13101338A3135CA3138EA3EA0107A238020380A33807FFC0EA0401A2380800E0A20018 *************** *** 460,522 **** E0EA1C00146014201410A3EB0400A3130CEA1FFCEA1C0C13041408A2130014181410A214 3014F0B5FC15177F9618>II74 D76 D<00FEEB03F8001E14C000171305A338138009A23811C011A33810E021A2EB7041A3 ! EB3881A2EB1D01A2130EA2123839FE040FF81D177F9620>I<00FC13FE001E1338001F13 ! 101217EA1380EA11C0A2EA10E013701338A2131C130E130F1307EB0390EB01D0A2EB00F0 ! 14701430123800FE131017177F961A>I80 D82 DI<387FFFF8386038 ! 1800401308A200801304A300001300AF3803FF8016177F9619>I<38FF80FE381C003814 ! 10B06C132012066C13403801818038007E0017177F961A>I<12FCA212C0B3AB12FCA206 ! 217D980A>91 D97 D<12F81238A8EA39F0EA3E0CEA380613077F1480A41400 ! 5B1306EA361CEA21F011177F9614>II<133E130EA8EA07CEEA1C3EEA300E1270126012 ! E0A412601270EA301EEA182E3807CF8011177F9614>IIII<1203EA0780A2EA0300C7FCA5EA1F801203AF1243EAE30012E712 ! 7C091D82960B>106 D<12F81238A8133E13381330134013801239EA3FC0EA39E0123813 ! F01378133CA2EAFE7F10177F9613>I<12F81238B3A312FE07177F960A>I110 DIIIII<1208A31218A21238EAFFC0 ! EA3800A71340A4EA1C80EA0F000A147F930E>II<38FEFE7C383838381410133C001C1320134C381E4E60380ECE40138700 ! 0713801303A200031300EA0201160E7F8D19>119 DII123 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fo cmsy9 9 2 ! /Fo 2 106 df<13801201EA0300A31206A25AA35AA35AA25AA35AA21260A37EA27EA37E A37EA27EA3EA0180120009267D9B0F>104 D<12C0A21260A37EA27EA37EA37EA27EA3EA 0180A2EA0300A31206A25AA35AA35AA25AA35AA209267E9B0F>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fp cmcsc10 10.95 8 ! /Fp 8 118 df73 D79 DI<3803F02038 ! 0C0C60381803E0EA30005A146012E01420A36C13007E127CEA7F80EA3FFC6CB4FC000713 ! 80000113C038000FE013031301EB00F014707EA46C136014E06C13C038F8018038C60300 ! EA81FC14217C9F1C>83 D<397FF807FE390FE001F0D807C013C06C6C6C5A000149C7FCEB ! F0023800F806EB78046D5AEB3E18EB1F106D5A14C0130713036D7E497EEB06F8EB0478EB ! 087CEB183EEB101EEB201F496C7EEBC007496C7ED801007F486D7E481300391F8001F83A ! FFC007FF80211F7E9E25>88 D103 D<38FC01FC381E007014201217EA1380A2EA11C0EA10E0A213701338A2131C ! 130E1307A2EB03A0EB01E0A213001460123800FE132016177E961C>110 D<38FF81FC381C00701420B0000C1340120E6C138038018300EA007C16177E961C>117 ! D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fq cmbx12 17.28 34 --- 519,620 ---- E0EA1C00146014201410A3EB0400A3130CEA1FFCEA1C0C13041408A2130014181410A214 3014F0B5FC15177F9618>II76 D<00FEEB03F8001E14C000171305A338138009A23811C011A3 ! 3810E021A2EB7041A3EB3881A2EB1D01A2130EA2123839FE040FF81D177F9620>I80 D82 DI<387FFFF83860381800401308A200801304A300001300AF3803FF ! 8016177F9619>I<12FCA212C0B3AB12FCA206217D980A>91 D97 ! D<12F81238A8EA39F0EA3E0CEA380613077F1480A414005B1306EA361CEA21F011177F96 ! 14>II101 D<1203EA0780A2EA0300C7FCA5EA1F801203AF1243EAE300 ! 12E7127C091D82960B>106 D<12F81238A8133E13381330134013801239EA3FC0EA39E0 ! 123813F01378133CA2EAFE7F10177F9613>I110 DII114 ! DI<1208A31218A21238EAFFC0EA3800A71340A4EA1C80EA0F000A147F93 ! 0E>II E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fn cmsy9 9 2 ! /Fn 2 106 df<13801201EA0300A31206A25AA35AA35AA25AA35AA21260A37EA27EA37E A37EA27EA3EA0180120009267D9B0F>104 D<12C0A21260A37EA27EA37EA37EA27EA3EA 0180A2EA0300A31206A25AA35AA35AA25AA35AA209267E9B0F>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fo cmsltt10 10.95 29 ! /Fo 29 122 df<1206120FEA1F80120FA21203EA0700A25A120E123C127C12F01260090E ! 769B18>39 D<387FFFC0B512E0A26C13C013047C8F18>45 D<133E13FF000313803807C3 ! C0EA0F01000E13E0EA1C00123C003813F014705AA34813E0A4EB01C0A2130300F01380EA ! 7007EB0F00EA781E6C5AEA1FF85BEA07C0141C7C9B18>48 D<13181338A2137813F81203 ! 120F137012041200A413E0A6EA01C0A6EA7FFE12FF127F0F1C7B9B18>I67 D<3807FFC014E014F03801C0F814 ! 78143C141CEA0380141EA2140EA33807001CA4143C1438120E147014F0EB01E0EB03C013 ! 07387FFF8038FFFE00EA7FF8171C7F9B18>I<0007B5FC5A7E3801C007A3140638038000 ! A2EB818014C0A213FF481380A21303A2140090C7FC120E140C141CA4387FFFF8B5FC7E18 ! 1C7F9B18>I74 D76 D<3907E01F80000FEB3FC0000714803903 ! B02E00146EA214CE380730DC1331149CA21333141C000E5B13371336133E133C131848C6 ! 5AA638FE03F800FF7F00FE5B1A1C7F9B18>I<126012F0A37E1278A3127C123CA3123E12 ! 1EA3121F7EA313801207A313C01203A413E01201A313F0120013600C24789F18>92 ! D<387FFFC0B512E0A26C13C013047E7F18>95 D97 D<127EA3120EA45A137CEA1DFF001F13801383381E01C0123CEB00E012 ! 38A4387801C0A2EB0380A2EB0F00EA7C1FEAFFFCEAEFF8EA63E0131C7C9B18>I100 D<13F8EA07FE487E381F ! 0780EA3C03387801C0127012E0A2B5FCA2148000E0C7FCA213033870078038780F00EA3F ! FE6C5AEA07F012147B9318>III<14C0EB01E013031301EB00C01400A4EBFFC0A31301A2EB0380A6 ! EB0700A6130EA65BA2EA6038EAF078B45A5BEA3F8013277F9C18>106 ! DII<13FCEA03FF000F1380 ! EA1F07383C03C0EA7801007013E0EAE000A4EB01C0A2EB0380EAF007EB0F00EA7C3EEA3F ! FC6C5AEA07E013147C9318>111 D113 D<381FE1F8EBE7FCEBEFFE3800FE1EEBFC0C3801F8005B5B5BA3485AA6EA ! FFFC7F5B17147E9318>II<387E07E0EAFE0FEA7E07EA0E00A2381C01C0A638380380A41307131F383FFF ! E06C13F03807E3E014147D9318>117 D<38FF87F8138F1387383800E0EB01C0A3148013 ! E3EA39F31233EB7700A212371376EA3666136EEA3C7CA2EA383815147C9318>119 ! D<381FE3FC13E713E33803C3C000011380EBE700EA00EE13FC137C1338137813FCEA01DC ! EA038E12071307120E38FF1FE0EB9FF0EB1FE016147E9318>I<380FF1FE381FF9FF380F ! F1FE3803807013C0000113E0A213C114C0A23800E380A2EBE700A213E6136E136C137C13 ! 78A21370A25BA2485A12F3EAF780B4C7FC5A1278181E7F9318>I ! E ! %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fp cmcsc10 10.95 12 ! /Fp 12 121 df<1318A2133CA3134EA213CF1387A238010380A2000313C0EA0201A23807 ! FFE0EA0400A2481370A2001813380038137838FE01FF18177F961C>97 ! D99 ! D101 DII105 D<38FC01FC381E007014201217EA1380A2EA11C0EA10E0A213701338A2131C13 ! 0E1307A2EB03A0EB01E0A213001460123800FE132016177E961C>110 ! D<13FE38038380380E00E0481370003C1378003813380078133C0070131C00F0131EA700 ! 70131C0078133C00381338003C1378001C13706C13E0380383803800FE0017177E961D> ! II115 D<38FF81FC381C00701420B0000C1340120E6C138038018300EA007C16177E961C>117 ! D<38FF80FE381F0070000E13606C1340EB80803803C100EA01C3EA00E213F4137813387F ! 133E134E13C7EB8780380103C0EA0201380600E0000413F0000C1370003C137800FE13FF ! 18177F961C>120 D E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fq cmbx12 17.28 34 *************** *** 603,613 **** %EndDVIPSBitmapFont %DVIPSBitmapFont: Fr cmsy10 10.95 1 ! /Fr 1 14 df<14FF010713E090381F00F80178131E01E01307D80180EB018048C812C000 ! 061560481530A248151848150CA2481506A4481503A900601506A46C150CA26C15186C15 ! 30A26C15606C15C06C6CEB0180D800E0EB07000178131E011F13F8903807FFE0010090C7 ! FC282B7EA02D>13 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fs cmbx12 14.4 55 ! /Fs 55 122 df<123C127FEAFF80A213C0A3127F123E1200A2EA0180A3EA0300A2120612 0E5A5A12100A157B8813>44 D<121C127FA2EAFF80A3EA7F00A2121C09097B8813>46 D<130E131E137EEA07FE12FFA212F81200B3ABB512FEA317277BA622>49 --- 701,711 ---- %EndDVIPSBitmapFont %DVIPSBitmapFont: Fr cmsy10 10.95 1 ! /Fr 1 14 df<14FE903807FFC090381F01F0903878003C01E0130ED80180130348C7EA01 ! 800006EC00C0481560A2481530481518A248150CA4481506A90060150CA46C1518A26C15 ! 306C1560A26C15C06CEC01806C6CEB0300D800E0130E0178133C90381F01F0903807FFC0 ! D900FEC7FC272B7DA02E>13 D E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fs cmbx12 14.4 54 ! /Fs 54 122 df<123C127FEAFF80A213C0A3127F123E1200A2EA0180A3EA0300A2120612 0E5A5A12100A157B8813>44 D<121C127FA2EAFF80A3EA7F00A2121C09097B8813>46 D<130E131E137EEA07FE12FFA212F81200B3ABB512FEA317277BA622>49 *************** *** 625,691 **** 8091C7FC127EA3EAFE02EB1FF0EB3FFCEB603EEB801F00FF14809038000FC0A24814E0A4 127EA4123E003F14C07EEC1F80D80F8013003807E07E6CB45A6C5B38003FC01B277DA622 ! >I<1238123E003FB512F0A34814E015C0158015003870000EA25C485B5C5CC6485AA249 ! 5A130791C7FC5B5B131E133EA2137E137CA213FCA41201A76C5A13701C297CA822>I57 ! D65 DI<91387FE003903907FFFC07011FEBFF0F90397FF00F9F ! 9039FF0001FFD801FC7F4848147F4848143F4848141F485A160F485A1607127FA290C9FC ! 5AA97E7F1607123FA26C7E160E6C7E6C6C141C6C6C143C6C6C14786CB4EB01F090397FF0 ! 07C0011FB512800107EBFE009038007FF028297CA831>IIII<91387FE003 ! 903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FFD801FC7F484880484880484880 ! 485A82485A82127FA290CAFC5AA892B512F87E7F03001300123FA26C7EA26C7E6C7E6C7E ! 6C7E6CB45B90387FF007011FB5129F0107EBFE0F9039007FF0032D297CA835>II< ! B512F0A33803FC00B3B1B512F0A314297EA819>I75 DIII< ! ECFFC0010F13FC90383F807F9039FE001FC0D801F8EB07E048486D7E48486D7E000F8148 ! 486D7EA24848147FA2007F168090C8123FA34816C0AA6C16806D147FA2003F1600A26C6C ! 14FEA26C6C495A6C6C495A6C6C495A6C6C495A6C6C495A90263FC0FFC7FC90380FFFFC01 ! 0013C02A297CA833>IIII<9038FF80600003EBF0E000 ! 0F13F8381F80FD383F001F003E1307481303A200FC1301A214007EA26C140013C0EA7FFC ! EBFFE06C13F86C13FE80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E013 ! 03A46C14E0A26C13076C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA825 ! >I<007FB71280A39039807F807FD87C00140F00781507A20070150300F016C0A2481501 ! A5C791C7FCB3A490B612C0A32A287EA72F>IIII89 D<3803FF80000F13F0381F01FC383F80FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA 0FE0EA1F80EA3F00127E5AA4145F007E13DF393F839FFC381FFE0F3803FC031E1B7E9A21 --- 723,787 ---- 8091C7FC127EA3EAFE02EB1FF0EB3FFCEB603EEB801F00FF14809038000FC0A24814E0A4 127EA4123E003F14C07EEC1F80D80F8013003807E07E6CB45A6C5B38003FC01B277DA622 ! >I ! 57 D65 DI<91387FE003903907FFFC07011FEBFF0F90397FF0 ! 0F9F9039FF0001FFD801FC7F4848147F4848143F4848141F485A160F485A1607127FA290 ! C9FC5AA97E7F1607123FA26C7E160E6C7E6C6C141C6C6C143C6C6C14786CB4EB01F09039 ! 7FF007C0011FB512800107EBFE009038007FF028297CA831>IIII<91387F ! E003903907FFFC07011FEBFF0F90397FF00F9F9039FF0001FFD801FC7F48488048488048 ! 4880485A82485A82127FA290CAFC5AA892B512F87E7F03001300123FA26C7EA26C7E6C7E ! 6C7E6C7E6CB45B90387FF007011FB5129F0107EBFE0F9039007FF0032D297CA835>III75 DII ! III< ! ECFFC0010F13FC90383FC0FF9039FE001FC048486D7ED803F0EB03F000078148486D7E48 ! 486D7EA24848147FA2007F1680A290C8123FA24816C0AA6C16806D147FA2003F1600A26C ! 6C14FE143E3A0FE07F81FC00079038C1C1F83A03F18063F0D801F9EB67E0D800FFEB3FC0 ! 90263FC07FC7FC90380FFFFC01004913C0EC003C811601ED1F8316FF6F1380A21700816F ! 5A6F5A6F5A2A357CA833>II<9038FF80600003EBF0E0 ! 000F13F8381F80FD383F001F003E1307481303A200FC1301A214007EA26C140013C0EA7F ! FCEBFFE06C13F86C13FE80000714806C14C0C6FC010F13E0EB007FEC1FF0140F140700E0 ! 1303A46C14E0A26C13076C14C0B4EB0F80EBE03F39E3FFFE0000E15B38C01FF01C297CA8 ! 25>I<007FB71280A39039807F807FD87C00140F00781507A20070150300F016C0A24815 ! 01A5C791C7FCB3A490B612C0A32A287EA72F>IIII89 D<3803FF80000F13F0381F01FC383F80FE147F801580EA1F00C7FCA4EB3FFF3801FC3FEA 0FE0EA1F80EA3F00127E5AA4145F007E13DF393F839FFC381FFE0F3803FC031E1B7E9A21 *************** *** 731,736 **** EA74F0EA3FE0EA0F8020277F9A23>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Ft cmtt10 10.95 90 ! /Ft 90 127 df<127012F8B012701200A5127012F8A31270051C779B18>33 DI --- 827,832 ---- EA74F0EA3FE0EA0F8020277F9A23>I E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Ft cmtt10 10.95 91 ! /Ft 91 127 df<127012F8B012701200A5127012F8A31270051C779B18>33 DI *************** *** 783,788 **** IIII<3801F1C0EA03FD EA0FFFEA1F0FEA1C03123813011270A290C7FC5AA5EB0FF0131F130F387001C0A2130312 38A2EA1C07EA1F0FEA0FFFEA03FDEA01F1141C7E9B18>I<387F07F038FF8FF8387F07F0 --- 879,884 ---- IIII<3801F1C0EA03FD EA0FFFEA1F0FEA1C03123813011270A290C7FC5AA5EB0FF0131F130F387001C0A2130312 38A2EA1C07EA1F0FEA0FFFEA03FDEA01F1141C7E9B18>I<387F07F038FF8FF8387F07F0 *************** *** 812,864 **** 03001E13C0387F07F000FF13F8007F13F0151C7F9B18>I<38FE03F8EAFF07EAFE03381C 01C0EA1E03000E1380EA0F0700071300A2EA038EA2EA01DCA3EA00F8A21370A9EA01FC48 ! 7E6C5A151C7F9B18>I91 ! D<126012F0A27E1278127C123CA2123E121E121F7EA27F12077F1203A27F12017F12007F ! 1378A2137C133C133E131EA2131F7F14801307A2EB030011247D9F18>II<387FFFC0B512E0A26C13C013047E7F18>95 ! D<1206121E123E12381270A212E0A312F812FC127CA21238070E789E18>II<127E12FE127E120EA5133EEBFF80000F13C0EBC1E0 ! 1380EB0070120E1438A6000F1370A2EB80E013C1EBFFC0000E138038063E00151C809B18 ! >IIIII< ! 3801E1F03807FFF85A381E1E30381C0E00487EA5EA1C0EEA1E1EEA1FFC5BEA39E00038C7 ! FC7EEA1FFEEBFFC04813E0387801F038700070481338A4007813F0EA7E03381FFFC06C13 ! 803801FC00151F7F9318>I<127E12FE127E120EA5133EEBFF80000F13C013C1EB80E013 ! 00120EAB387FC7FC38FFE7FE387FC7FC171C809B18>II<1338137CA313381300A4EA0FFCA3EA00 ! 1CB3A4EA6038EAF078EAFFF0EA7FE0EA3F800E277E9C18>I<127E12FE127E120EA5EB3F ! F0A3EB0780EB0F00131E5B5B5BEA0FF87F139C130EEA0E0F7FEB038014C0387FC7F812FF ! 127F151C7F9B18>II<38F9C1C038FFF7F013 ! FF383E3E38EA3C3CA2EA3838AB38FE3E3EEB7E7EEB3E3E1714809318>IIII<3801F380EA07FBEA1FFFEA3E1FEA380FEA7007A2EAE003A6 ! EA7007A2EA380FEA3C1FEA1FFFEA0FFBEA03E3EA0003A7EB1FF0EB3FF8EB1FF0151E7E93 ! 18>I<38FF0FC0EB3FE0EB7FF0EA07F0EBE060EBC0005BA290C7FCA9EAFFFC7F5B14147E ! 9318>II<487E1203A4387FFFC0B5 ! FCA238038000A9144014E0A33801C1C013FF6C1380EB3E0013197F9818>I<387E07E0EA ! FE0FEA7E07EA0E00AC1301EA0F033807FFFC6C13FE3801FCFC1714809318>I<387F8FF0 ! 00FF13F8007F13F0381C01C0380E0380A338070700A3138FEA038EA3EA01DCA3EA00F8A2 ! 137015147F9318>I<38FF07F8138F1307383800E0A4381C01C0137113F9A213D9EA1DDD ! 000D1380A3138DEA0F8FA23807070015147F9318>I<387F8FF0139F138F380F0700EA07 ! 8EEA039EEA01DC13F81200137013F07FEA01DCEA039E138EEA0707000E1380387F8FF000 ! FF13F8007F13F015147F9318>I<387F8FF000FF13F8007F13F0380E01C0EB0380A21207 ! EB0700A2EA0387A2138EEA01CEA213CC120013DC1378A31370A313F05B1279EA7BC0EA7F ! 806CC7FC121E151E7F9318>I<383FFFF05AA2387001E0EB03C0EB078038000F00131E5B ! 13F8485AEA03C0485A380F0070121E5A5AB512F0A314147F9318>I ! I<126012F0B3B012600424769F18>I<127CB4FC13C01203C67EAB7FEB7FC0EB3FE0A2EB ! 7FC0EBF0005BABEA03C012FF90C7FC127C13247E9F18>II E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fu cmr10 10.95 78 ! /Fu 78 123 df<90381F83E09038F06E303901C07878380380F8903800F03048EB7000A7 B612803907007000B2383FE3FF1D20809F1B>11 D<133FEBE0C0EA01C0380381E0EA0701 A290C7FCA6B512E0EA0700B2383FC3FC1620809F19>II<38FE03F8EAFF07EAFE03381C 01C0EA1E03000E1380EA0F0700071300A2EA038EA2EA01DCA3EA00F8A21370A9EA01FC48 ! 7E6C5A151C7F9B18>I<383FFFE05AA2387001C01303EB07801400C65A131E131C133C5B ! 137013F0485A5B1203485A90C7FC5A001E13E0121C123C5A1270B5FCA3131C7E9B18>I< ! EAFFF8A3EAE000B3ACEAFFF8A30D24779F18>I<126012F0A27E1278127C123CA2123E12 ! 1E121F7EA27F12077F1203A27F12017F12007F1378A2137C133C133E131EA2131F7F1480 ! 1307A2EB030011247D9F18>II<387FFFC0 ! B512E0A26C13C013047E7F18>95 D<1206121E123E12381270A212E0A312F812FC127CA2 ! 1238070E789E18>II<127E12FE127E12 ! 0EA5133EEBFF80000F13C0EBC1E01380EB0070120E1438A6000F1370A2EB80E013C1EBFF ! C0000E138038063E00151C809B18>IIIII<3801E1F03807FFF85A381E1E30381C0E00487EA5EA1C ! 0EEA1E1EEA1FFC5BEA39E00038C7FC7EEA1FFEEBFFC04813E0387801F038700070481338 ! A4007813F0EA7E03381FFFC06C13803801FC00151F7F9318>I<127E12FE127E120EA513 ! 3EEBFF80000F13C013C1EB80E01300120EAB387FC7FC38FFE7FE387FC7FC171C809B18> ! II<1338 ! 137CA313381300A4EA0FFCA3EA001CB3A4EA6038EAF078EAFFF0EA7FE0EA3F800E277E9C ! 18>I<127E12FE127E120EA5EB3FF0A3EB0780EB0F00131E5B5B5BEA0FF87F139C130EEA ! 0E0F7FEB038014C0387FC7F812FF127F151C7F9B18>II<38F9C1C038FFF7F013FF383E3E38EA3C3CA2EA3838AB38FE3E3EEB7E7EEB ! 3E3E1714809318>III< ! EA7E3E38FEFF80007F13C0380FC1E01380EB0070120E1438A6000F1370A2EB80E013C1EB ! FFC0000E1380EB3E0090C7FCA7EA7FC0487E6C5A151E809318>I<3801F380EA07FBEA1F ! FFEA3E1FEA380FEA7007A2EAE003A6EA7007A2EA380FEA3C1FEA1FFFEA0FFBEA03E3EA00 ! 03A7EB1FF0EB3FF8EB1FF0151E7E9318>I<38FF0FC0EB3FE0EB7FF0EA07F0EBE060EBC0 ! 005BA290C7FCA9EAFFFC7F5B14147E9318>II<487E1203A4387FFFC0B5FCA238038000A9144014E0A33801C1C013FF6C1380 ! EB3E0013197F9818>I<387E07E0EAFE0FEA7E07EA0E00AC1301EA0F033807FFFC6C13FE ! 3801FCFC1714809318>I<387F8FF000FF13F8007F13F0381C01C0380E0380A338070700 ! A3138FEA038EA3EA01DCA3EA00F8A2137015147F9318>I<38FF07F8138F1307383800E0 ! A4381C01C0137113F9A213D9EA1DDD000D1380A3138DEA0F8FA23807070015147F9318> ! I<387F8FF0139F138F380F0700EA078EEA039EEA01DC13F81200137013F07FEA01DCEA03 ! 9E138EEA0707000E1380387F8FF000FF13F8007F13F015147F9318>I<387F8FF000FF13 ! F8007F13F0380E01C0EB0380A21207EB0700A2EA0387A2138EEA01CEA213CC120013DC13 ! 78A31370A313F05B1279EA7BC0EA7F806CC7FC121E151E7F9318>I<383FFFF05AA23870 ! 01E0EB03C0EB078038000F00131E5B13F8485AEA03C0485A380F0070121E5A5AB512F0A3 ! 14147F9318>II<126012F0B3B012600424769F18>I<127CB4FC13C0 ! 1203C67EAB7FEB7FC0EB3FE0A2EB7FC0EBF0005BABEA03C012FF90C7FC127C13247E9F18 ! >II E %EndDVIPSBitmapFont ! %DVIPSBitmapFont: Fu cmr10 10.95 77 ! /Fu 77 123 df<90381F83E09038F06E303901C07878380380F8903800F03048EB7000A7 B612803907007000B2383FE3FF1D20809F1B>11 D<133FEBE0C0EA01C0380381E0EA0701 A290C7FCA6B512E0EA0700B2383FC3FC1620809F19>III<13801203120F12F31203B3A6EA ! 07C0EAFFFE0F1E7C9D17>IIII<13801203120F12F31203B3A6EA ! 07C0EA7FFE0F1E7C9D17>IIII<90380FE0109038381C309038E002703803C00139078000F048C71270121E ! 15305A1510127C127800F81400A7EC3FFEEC01F000781300127C123CA27EA27E6C7E3903 ! C001703900E002309038380C1090380FF0001F217E9F24>I<39FFF07FF8390F000780AD ! 90B5FCEB0007AF39FFF07FF81D1F7E9E22>II< ! 3807FFC038003E00131EB3A3122012F8A3EAF01CEA403CEA6038EA1070EA0FC012207F9E ! 17>I<39FFF007FC390F0003E0EC0180150014025C5C5C5C5C5C49C7FC5B497E130FEB13 ! C0EB21E01341EB80F0EB0078A28080A280EC0780A2EC03C015E015F039FFF01FFE1F1F7E ! 9E23>I ! IIIII< ! B57E380F00F0143C8080A21580A41500A2141E5C14F0EBFF80EB01C0EB0070A280143CA3 ! 143EA31504143F141FEC0F0839FFF00788C7EA01F01E207E9E21>82 D<3803F040380C0CC0EA1803EA3001EA6000A212E01440A36C13007E127CEA7F80EA3FF8 6CB4FC00071380C613C0EB1FE013031301EB00F014707EA46C136014E06C13C038F80180 --- 1003,1023 ---- 001440A3EC0020A31540A315C01401EC0380140FB6FC1B1F7E9E1F>II<90380FE02090387818609038E004E03803800238070001481300001E1460 ! A25A1520127C127800F81400A7EC7FFCEC03E000781301127C123CA27EA27E7E38038002 ! 3900E00460903878182090380FE0001E217D9F24>I<39FFF07FF8390F000780AD90B5FC ! EB0007AF39FFF07FF81D1F7E9E22>II<39FFF0 ! 07FC390F0003E0EC0180150014025C5C5C5C5C5C49C7FC5B497E130FEB13C0EB21E01341 ! EB80F0EB0078A28080A280EC0780A2EC03C015E015F039FFF01FFE1F1F7E9E23>75 ! DI ! IIII82 D<3803F040380C0CC0EA1803EA3001EA6000A212E01440A36C13007E127CEA7F80EA3FF8 6CB4FC00071380C613C0EB1FE013031301EB00F014707EA46C136014E06C13C038F80180 *************** *** 939,943 **** 40A3EAB85CEAFC7EA2EA7C3EEA381C0F0E7A9F17>I<12FFA21203B3B3A512FFA2082D80 A10D>I<120812101220A21240A21280A312B812FCA2127C1238060E7D9F0D>96 ! DI<121C12FC121CAA137CEA1D87381E0180EB00 C0001C13E01470A21478A6147014F014E0001E13C0381A018038198700EA107C15207E9F --- 1035,1039 ---- 40A3EAB85CEAFC7EA2EA7C3EEA381C0F0E7A9F17>I<12FFA21203B3B3A512FFA2082D80 A10D>I<120812101220A21240A21280A312B812FCA2127C1238060E7D9F0D>96 ! DI<121C12FC121CAA137CEA1D87381E0180EB00 C0001C13E01470A21478A6147014F014E0001E13C0381A018038198700EA107C15207E9F *************** *** 945,977 **** 0100EA0706EA01F811147F9314>III<137CEA01C6EA030F1207EA0E061300A7EAFFF0EA0E00B2EA7FE0 ! 1020809F0E>I<14E03803E330EA0E3CEA1C1C38380E00EA780FA5EA380E6C5AEA1E38EA ! 33E00020C7FCA21230A2EA3FFE381FFF8014C0383001E038600070481330A4006013606C ! 13C0381C03803803FC00141F7F9417>I<121C12FC121CAA137C1386EA1D03001E1380A2 ! 121CAE38FF8FF014207E9F19>I<1238127CA31238C7FCA6121C12FC121CB1EAFF80091F ! 7F9E0C>I<13E0EA01F0A3EA00E01300A61370EA07F012001370B3A31260EAF06013C0EA ! 6180EA3F000C28829E0E>I<121C12FC121CAAEB1FE0EB0780EB060013045B5B5B136013 ! E0EA1DF0EA1E70EA1C38133C131C7F130F7F148014C038FF9FF014207E9F18>I<121C12 ! FC121CB3ABEAFF8009207F9F0C>I<391C3E03E039FCC30C30391D039038391E01E01CA2 ! 001C13C0AE3AFF8FF8FF8021147E9326>IIII<3801F04038070CC0EA0E02EA1C03EA38011278127012F0A612 ! 7012781238EA1C03EA0C05EA0709EA01F1EA0001A8EB0FF8151D7F9318>III<1202A31206A2120EA2123EEAFFF8EA0E00AB1304A5EA07081203EA01F00E1C ! 7F9B12>I<381C0380EAFC1FEA1C03AE1307120CEA061B3803E3F014147E9319>I<38FF83 ! F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8A21370 ! A3132015147F9318>I<39FF9FE1FC393C078070391C030060EC8020000E1440A214C0D8 ! 0704138014E0A239038861001471A23801D032143A143E3800E01CA2EB6018EB40081E14 ! 7F9321>I<38FF87F8381E03C0380E0180EB0300EA0702EA0384EA01C813D8EA00F01370 ! 137813F8139CEA010E1202EA060738040380000C13C0003C13E038FE07FC16147F9318> ! I<38FF83F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00 ! E8A21370A31320A25BA3EAF080A200F1C7FC1262123C151D7F9318>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fv cmbx12 20.736 14 --- 1041,1073 ---- 0100EA0706EA01F811147F9314>III<137CEA01C6EA030F1207EA0E061300A7EAFFF0EA0E00B2EA7FE010 ! 20809F0E>I<14E03803E330EA0E3CEA1C1C38380E00EA780FA5EA380E6C5AEA1E38EA33 ! E00020C7FCA21230A2EA3FFE381FFF8014C0383001E038600070481330A4006013606C13 ! C0381C03803803FC00141F7F9417>I<121C12FC121CAA137C1386EA1D03001E1380A212 ! 1CAE38FF8FF014207E9F19>I<1238127CA31238C7FCA6121C12FC121CB1EAFF80091F7F ! 9E0C>I<13E0EA01F0A3EA00E01300A61370EA07F012001370B3A31260EAF06013C0EA61 ! 80EA3F000C28829E0E>I<121C12FC121CAAEB1FE0EB0780EB060013045B5B5B136013E0 ! EA1DF0EA1E70EA1C38133C131C7F130F7F148014C038FF9FF014207E9F18>I<121C12FC ! 121CB3ABEAFF8009207F9F0C>I<391C3E03E039FCC30C30391D019018001EEBE01CA200 ! 1C13C0AE3AFF8FF8FF8021147E9326>IIII<3801F04038070CC0EA0E02EA1C03EA38011278127012F0A61270 ! 12781238EA1C03EA0C05EA0709EA01F1EA0001A8EB0FF8151D7F9318>III<1202A31206A2120EA2123EEAFFF8EA0E00AB1304A5EA07081203EA01F00E1C7F ! 9B12>I<381C0380EAFC1FEA1C03AE1307120CEA061B3803E3F014147E9319>I<38FF83F8 ! 383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8A21370A3 ! 132015147F9318>I<39FF9FE1FC393C078070391C030060EC8020000E1440A214C0D807 ! 04138014E0A239038861001471A23801D032143A143E3800E01CA2EB6018EB40081E147F ! 9321>I<38FF87F8381E03C0380E0180EB0300EA0702EA0384EA01C813D8EA00F0137013 ! 7813F8139CEA010E1202EA060738040380000C13C0003C13E038FE07FC16147F9318>I< ! 38FF83F8383E00E0001C13C06C1380A338070100A21383EA0382A2EA01C4A213E4EA00E8 ! A21370A31320A25BA3EAF080A200F1C7FC1262123C151D7F9318>II E %EndDVIPSBitmapFont %DVIPSBitmapFont: Fv cmbx12 20.736 14 *************** *** 1028,1272 **** %%EndSetup %%Page: 1 1 ! 1 0 bop 75 693 a Fv(GNU)33 b(Readline)h(Library)p 75 ! 743 1800 17 v 936 791 a Fu(Edition)17 b(4.1,)c(for)i ! Ft(Readline)f(Library)g Fu(V)l(ersion)i(4.1.)1609 845 ! y(Jan)o(uary)f(2000)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 b(Reserv)n(e)f(Univ)n(ersit)n(y)p 75 2570 1800 9 v eop %%Page: 2 2 ! 2 1 bop 75 250 a Fu(This)14 b(do)q(cumen)o(t)h(describ)q(es)g(the)f ! (GNU)g(Readline)i(Library)l(,)e(a)g(utilit)o(y)h(whic)o(h)f(aids)g(in)h ! (the)f(consistency)75 305 y(of)h(user)g(in)o(terface)h(across)e (discrete)i(programs)e(that)h(need)h(to)e(pro)o(vide)i(a)f(command)g ! (line)i(in)o(terface.)75 373 y(Published)g(b)o(y)f(the)f(F)l(ree)g ! (Soft)o(w)o(are)f(F)l(oundation)75 427 y(59)h(T)l(emple)h(Place,)f ! (Suite)i(330,)75 482 y(Boston,)d(MA)h(02111)f(USA)75 ! 549 y(P)o(ermission)j(is)f(gran)o(ted)g(to)f(mak)o(e)h(and)g (distribute)i(v)o(erbatim)d(copies)i(of)f(this)h(man)o(ual)f(pro)o ! (vided)h(the)75 604 y(cop)o(yrigh)o(t)e(notice)h(and)f(this)h(p)q (ermission)g(notice)g(are)f(preserv)o(ed)h(on)f(all)h(copies.)75 ! 671 y(P)o(ermission)c(is)h(gran)o(ted)e(to)g(cop)o(y)h(and)g (distribute)h(mo)q(di\014ed)g(v)o(ersions)f(of)f(this)h(man)o(ual)g ! (under)h(the)f(con-)75 726 y(ditions)k(for)e(v)o(erbatim)h(cop)o(ying,) g(pro)o(vided)h(that)e(the)h(en)o(tire)h(resulting)g(deriv)o(ed)g(w)o ! (ork)e(is)h(distributed)75 781 y(under)h(the)f(terms)g(of)g(a)f(p)q (ermission)j(notice)f(iden)o(tical)h(to)e(this)g(one.)75 ! 848 y(P)o(ermission)i(is)g(gran)o(ted)f(to)g(cop)o(y)h(and)f (distribute)i(translations)f(of)f(this)h(man)o(ual)g(in)o(to)f(another) ! g(lan-)75 903 y(guage,)e(under)h(the)f(ab)q(o)o(v)o(e)g(conditions)i (for)d(mo)q(di\014ed)j(v)o(ersions,)e(except)h(that)f(this)h(p)q ! (ermission)g(notice)75 958 y(ma)o(y)f(b)q(e)i(stated)f(in)h(a)f (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)i Fu(1988-1999)e(F)l(ree)i(Soft)o(w)o(are)f(F)l (oundation,)h(Inc.)p eop %%Page: 1 3 1 2 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(1)75 183 y Fq(1)41 b(Command)28 b(Line)e(Editing)137 ! 299 y Fu(This)16 b(c)o(hapter)f(describ)q(es)i(the)e(basic)h(features)f (of)g(the)g Fp(gnu)g Fu(command)g(line)i(editing)f(in)o(terface.)75 ! 426 y Fs(1.1)33 b(In)n(tro)r(duction)24 b(to)e(Line)i(Editing)137 ! 522 y Fu(The)16 b(follo)o(wing)g(paragraphs)e(describ)q(e)j(the)e (notation)g(used)h(to)e(represen)o(t)i(k)o(eystrok)o(es.)137 ! 589 y(The)h(text)327 587 y Fo(h)p 339 561 56 2 v 339 ! 589 a Fn(C-k)p 339 597 V 393 587 a Fo(i)424 589 y Fu(is)f(read)g(as)g ! (`Con)o(trol-K')f(and)h(describ)q(es)i(the)e(c)o(haracter)g(pro)q ! (duced)h(when)f(the)1831 587 y Fo(h)p 1844 561 19 2 v ! 1844 589 a Fn(k)p 1844 597 V 1860 587 a Fo(i)75 644 y ! Fu(k)o(ey)f(is)h(pressed)g(while)g(the)f(Con)o(trol)g(k)o(ey)g(is)h ! (depressed.)137 711 y(The)f(text)325 709 y Fo(h)p 337 ! 683 63 2 v 337 711 a Fn(M-k)p 337 719 V 397 709 a Fo(i)427 ! 711 y Fu(is)g(read)g(as)f(`Meta-K')g(and)h(describ)q(es)i(the)e(c)o ! (haracter)f(pro)q(duced)i(when)f(the)g(Meta)75 766 y(k)o(ey)f(\(if)g(y) o(ou)g(ha)o(v)o(e)g(one\))g(is)h(depressed,)g(and)f(the)930 ! 764 y Fo(h)p 942 738 19 2 v 942 766 a Fn(k)p 942 774 ! V 958 764 a Fo(i)987 766 y Fu(k)o(ey)g(is)h(pressed.)20 ! b(The)15 b(Meta)e(k)o(ey)h(is)h(lab)q(eled)1779 764 y ! Fo(h)p 1791 738 72 2 v 1791 766 a Fn(AL)m(T)p 1791 774 ! V 1860 764 a Fo(i)75 821 y Fu(on)e(man)o(y)g(k)o(eyb)q(oards.)19 b(On)13 b(k)o(eyb)q(oards)g(with)h(t)o(w)o(o)e(k)o(eys)g(lab)q(eled) ! 1213 819 y Fo(h)p 1225 793 V 1225 821 a Fn(AL)m(T)p 1225 ! 828 V 1294 819 a Fo(i)1322 821 y Fu(\(usually)i(to)e(either)i(side)g ! (of)f(the)75 876 y(space)j(bar\),)f(the)388 874 y Fo(h)p ! 400 847 V 400 876 a Fn(AL)m(T)p 400 883 V 469 874 a Fo(i)499 ! 876 y Fu(on)h(the)g(left)g(side)g(is)g(generally)h(set)f(to)f(w)o(ork)g ! (as)g(a)g(Meta)g(k)o(ey)l(.)22 b(The)1697 874 y Fo(h)p ! 1709 847 V 1709 876 a Fn(AL)m(T)p 1709 883 V 1778 874 ! a Fo(i)1808 876 y Fu(k)o(ey)75 930 y(on)17 b(the)f(righ)o(t)h(ma)o(y)f (also)h(b)q(e)g(con\014gured)g(to)f(w)o(ork)g(as)g(a)h(Meta)f(k)o(ey)g ! (or)g(ma)o(y)g(b)q(e)i(con\014gured)f(as)f(some)75 985 y(other)f(mo)q(di\014er,)h(suc)o(h)f(as)g(a)g(Comp)q(ose)g(k)o(ey)g ! (for)f(t)o(yping)i(accen)o(ted)f(c)o(haracters.)137 1052 y(If)c(y)o(ou)g(do)g(not)f(ha)o(v)o(e)h(a)f(Meta)h(or)694 ! 1050 y Fo(h)p 706 1024 V 706 1052 a Fn(AL)m(T)p 706 1060 ! V 775 1050 a Fo(i)801 1052 y Fu(k)o(ey)l(,)g(or)g(another)f(k)o(ey)h(w) o(orking)f(as)h(a)f(Meta)h(k)o(ey)l(,)g(the)g(iden)o(tical)75 ! 1107 y(k)o(eystrok)o(e)f(can)i(b)q(e)f(generated)h(b)o(y)f(t)o(yping) ! 809 1105 y Fo(h)p 821 1079 70 2 v 821 1107 a Fn(ESC)p ! 821 1115 V 888 1105 a Fo(i)915 1107 y Fm(\014rst)p Fu(,)g(and)g(then)h ! (t)o(yping)1339 1105 y Fo(h)p 1351 1079 19 2 v 1351 1107 ! a Fn(k)p 1351 1115 V 1368 1105 a Fo(i)1383 1107 y Fu(.)18 ! b(Either)12 b(pro)q(cess)f(is)h(kno)o(wn)75 1162 y(as)j ! Fm(metafying)k Fu(the)425 1160 y Fo(h)p 437 1134 V 437 ! 1162 a Fn(k)p 437 1169 V 454 1160 a Fo(i)484 1162 y Fu(k)o(ey)l(.)137 ! 1229 y(The)h(text)334 1227 y Fo(h)p 347 1201 100 2 v ! 347 1229 a Fn(M-C-k)p 347 1236 V 444 1227 a Fo(i)479 ! 1229 y Fu(is)g(read)g(as)f(`Meta-Con)o(trol-k')f(and)i(describ)q(es)h ! (the)f(c)o(haracter)f(pro)q(duced)i(b)o(y)75 1283 y Fm(metafying)291 ! 1281 y Fo(h)p 303 1255 56 2 v 303 1283 a Fn(C-k)p 303 ! 1291 V 357 1281 a Fo(i)372 1283 y Fu(.)137 1350 y(In)e(addition,)h(sev) ! o(eral)f(k)o(eys)f(ha)o(v)o(e)g(their)h(o)o(wn)f(names.)30 ! b(Sp)q(eci\014cally)l(,)1384 1348 y Fo(h)p 1396 1322 ! 73 2 v 1396 1350 a Fn(DEL)p 1396 1358 V 1467 1348 a Fo(i)1482 ! 1350 y Fu(,)1514 1348 y Fo(h)p 1526 1322 70 2 v 1526 ! 1350 a Fn(ESC)p 1526 1358 V 1593 1348 a Fo(i)1608 1350 ! y Fu(,)1640 1348 y Fo(h)p 1652 1322 72 2 v 1652 1350 ! a Fn(LFD)p 1652 1358 V 1722 1348 a Fo(i)1737 1350 y Fu(,)1768 ! 1348 y Fo(h)p 1780 1322 70 2 v 1780 1350 a Fn(SPC)p 1780 ! 1358 V 1847 1348 a Fo(i)1862 1350 y Fu(,)75 1403 y Fo(h)p ! 87 1377 76 2 v 87 1405 a Fn(RET)p 87 1413 V 160 1403 ! a Fo(i)175 1405 y Fu(,)23 b(and)306 1403 y Fo(h)p 318 ! 1377 74 2 v 318 1405 a Fn(T)m(AB)p 318 1413 V 390 1403 ! a Fo(i)427 1405 y Fu(all)f(stand)g(for)f(themselv)o(es)h(when)h(seen)f (in)g(this)g(text,)h(or)e(in)i(an)e(init)i(\014le)g(\(see)75 ! 1460 y(Section)d(1.3)f([Readline)i(Init)f(File],)h(page)e(4\).)32 b(If)19 b(y)o(our)g(k)o(eyb)q(oard)h(lac)o(ks)f(a)1444 ! 1458 y Fo(h)p 1456 1432 72 2 v 1456 1460 a Fn(LFD)p 1456 ! 1468 V 1526 1458 a Fo(i)1560 1460 y Fu(k)o(ey)l(,)h(t)o(yping)1802 ! 1458 y Fo(h)p 1814 1432 49 2 v 1814 1460 a Fn(C-j)p 1814 ! 1468 V 1860 1458 a Fo(i)75 1515 y Fu(will)c(pro)q(duce)g(the)f(desired) ! h(c)o(haracter.)j(The)874 1513 y Fo(h)p 886 1487 76 2 ! v 886 1515 a Fn(RET)p 886 1522 V 959 1513 a Fo(i)989 ! 1515 y Fu(k)o(ey)c(ma)o(y)f(b)q(e)h(lab)q(eled)1385 1513 ! y Fo(h)p 1397 1487 109 2 v 1397 1515 a Fn(Return)p 1397 ! 1522 V 1503 1513 a Fo(i)1533 1515 y Fu(or)1588 1513 y ! Fo(h)p 1600 1487 86 2 v 1600 1515 a Fn(En)o(ter)p 1600 ! 1522 V 1684 1513 a Fo(i)1714 1515 y Fu(on)f(some)75 1569 ! y(k)o(eyb)q(oards.)75 1697 y Fs(1.2)33 b(Readline)23 ! b(In)n(teraction)137 1793 y Fu(Often)13 b(during)h(an)e(in)o(teractiv)o (e)h(session)g(y)o(ou)g(t)o(yp)q(e)f(in)i(a)e(long)h(line)h(of)e(text,) ! h(only)g(to)f(notice)h(that)f(the)75 1848 y(\014rst)k(w)o(ord)f(on)h ! (the)h(line)h(is)e(missp)q(elled.)26 b(The)16 b(Readline)j(library)e (giv)o(es)f(y)o(ou)g(a)g(set)g(of)g(commands)g(for)75 ! 1903 y(manipulating)g(the)f(text)g(as)f(y)o(ou)h(t)o(yp)q(e)g(it)g(in,) g(allo)o(wing)h(y)o(ou)f(to)f(just)h(\014x)g(y)o(our)f(t)o(yp)q(o,)g ! (and)h(not)g(forcing)75 1958 y(y)o(ou)f(to)f(ret)o(yp)q(e)h(the)g(ma)s (jorit)o(y)f(of)h(the)g(line.)21 b(Using)15 b(these)f(editing)h ! (commands,)f(y)o(ou)g(mo)o(v)o(e)f(the)h(cursor)75 2012 y(to)i(the)i(place)g(that)e(needs)i(correction,)g(and)f(delete)h(or)f (insert)g(the)h(text)e(of)h(the)g(corrections.)26 b(Then,)75 ! 2067 y(when)16 b(y)o(ou)f(are)h(satis\014ed)g(with)g(the)f(line,)i(y)o ! (ou)e(simply)i(press)1160 2065 y Fo(h)p 1172 2039 155 ! 2 v 1172 2067 a Fn(RETURN)p 1172 2075 V 1324 2065 a Fo(i)1339 ! 2067 y Fu(.)k(Y)l(ou)16 b(do)f(not)g(ha)o(v)o(e)g(to)g(b)q(e)i(at)75 ! 2122 y(the)g(end)g(of)f(the)g(line)i(to)e(press)634 2120 ! y Fo(h)p 646 2094 V 646 2122 a Fn(RETURN)p 646 2130 V ! 798 2120 a Fo(i)813 2122 y Fu(;)g(the)h(en)o(tire)g(line)h(is)f ! (accepted)g(regardless)g(of)f(the)g(lo)q(cation)75 2177 ! y(of)f(the)g(cursor)g(within)h(the)g(line.)75 2288 y ! Fl(1.2.1)30 b(Readline)20 b(Bare)g(Essen)n(tials)137 ! 2384 y Fu(In)12 b(order)g(to)f(en)o(ter)g(c)o(haracters)g(in)o(to)g ! (the)h(line,)h(simply)g(t)o(yp)q(e)f(them.)18 b(The)12 ! b(t)o(yp)q(ed)g(c)o(haracter)f(app)q(ears)75 2439 y(where)16 ! b(the)h(cursor)f(w)o(as,)f(and)h(then)h(the)f(cursor)g(mo)o(v)o(es)g ! (one)g(space)g(to)g(the)g(righ)o(t.)23 b(If)17 b(y)o(ou)f(mist)o(yp)q ! (e)g(a)75 2493 y(c)o(haracter,)e(y)o(ou)h(can)g(use)h(y)o(our)f(erase)g ! (c)o(haracter)f(to)h(bac)o(k)g(up)g(and)h(delete)g(the)f(mist)o(yp)q ! (ed)h(c)o(haracter.)137 2560 y(Sometimes)g(y)o(ou)f(ma)o(y)g(mist)o(yp) ! q(e)h(a)f(c)o(haracter,)f(and)i(not)f(notice)h(the)f(error)g(un)o(til)i ! (y)o(ou)e(ha)o(v)o(e)g(t)o(yp)q(ed)75 2615 y(sev)o(eral)f(other)f(c)o ! (haracters.)19 b(In)14 b(that)g(case,)f(y)o(ou)h(can)g(t)o(yp)q(e)1102 ! 2613 y Fo(h)p 1114 2587 57 2 v 1114 2615 a Fn(C-b)p 1114 ! 2623 V 1168 2613 a Fo(i)1197 2615 y Fu(to)f(mo)o(v)o(e)g(the)h(cursor)g ! (to)f(the)h(left,)g(and)75 2670 y(then)i(correct)e(y)o(our)h(mistak)o ! (e.)20 b(Afterw)o(ards,)13 b(y)o(ou)i(can)g(mo)o(v)o(e)g(the)g(cursor)g ! (to)g(the)g(righ)o(t)g(with)1714 2668 y Fo(h)p 1727 2642 ! 49 2 v 1727 2670 a Fn(C-f)p 1727 2678 V 1772 2668 a Fo(i)1787 ! 2670 y Fu(.)p eop %%Page: 2 4 ! 2 3 bop 75 -58 a Fu(2)1322 b(GNU)15 b(Readline)i(Library)137 ! 183 y(When)g(y)o(ou)f(add)g(text)g(in)h(the)g(middle)h(of)e(a)f(line,)j (y)o(ou)e(will)i(notice)f(that)f(c)o(haracters)f(to)h(the)g(righ)o(t)75 ! 238 y(of)e(the)g(cursor)g(are)g(`pushed)h(o)o(v)o(er')f(to)f(mak)o(e)h (ro)q(om)g(for)f(the)i(text)f(that)f(y)o(ou)h(ha)o(v)o(e)g(inserted.)21 ! b(Lik)o(ewise,)75 293 y(when)e(y)o(ou)g(delete)h(text)e(b)q(ehind)j (the)e(cursor,)g(c)o(haracters)f(to)g(the)h(righ)o(t)f(of)g(the)h ! (cursor)g(are)f(`pulled)75 348 y(bac)o(k')11 b(to)g(\014ll)h(in)h(the)e (blank)h(space)g(created)f(b)o(y)h(the)f(remo)o(v)m(al)g(of)g(the)h (text.)18 b(A)11 b(list)h(of)f(the)h(bare)f(essen)o(tials)75 ! 402 y(for)k(editing)h(the)f(text)g(of)g(an)g(input)h(line)h(follo)o ! (ws.)75 479 y Fo(h)p 87 453 57 2 v 87 481 a Fn(C-b)p ! 87 489 V 142 479 a Fo(i)315 481 y Fu(Mo)o(v)o(e)d(bac)o(k)h(one)h(c)o ! (haracter.)75 558 y Fo(h)p 87 532 49 2 v 87 560 a Fn(C-f)p ! 87 567 V 133 558 a Fo(i)315 560 y Fu(Mo)o(v)o(e)e(forw)o(ard)g(one)h(c) ! o(haracter.)75 636 y Fo(h)p 87 610 73 2 v 87 638 a Fn(DEL)p ! 87 646 V 158 636 a Fo(i)188 638 y Fu(or)244 636 y Fo(h)p ! 256 610 159 2 v 256 638 a Fn(Bac)o(kspace)p 256 646 V ! 412 636 a Fo(i)315 693 y Fu(Delete)h(the)f(c)o(haracter)g(to)f(the)h ! (left)h(of)f(the)g(cursor.)75 770 y Fo(h)p 87 744 57 ! 2 v 87 772 a Fn(C-d)p 87 779 V 142 770 a Fo(i)315 772 ! y Fu(Delete)h(the)f(c)o(haracter)g(underneath)h(the)f(cursor.)75 ! 850 y(Prin)o(ting)h(c)o(haracters)315 905 y(Insert)f(the)h(c)o (haracter)e(in)o(to)h(the)h(line)h(at)d(the)h(cursor.)75 ! 981 y Fo(h)p 87 955 50 2 v 87 983 a Fn(C-)p 126 983 11 ! 2 v 87 991 50 2 v 135 981 a Fo(i)165 983 y Fu(or)221 ! 981 y Fo(h)p 233 955 125 2 v 233 983 a Fn(C-x)c(C-u)p ! 233 991 V 355 981 a Fo(i)315 1038 y Fu(Undo)17 b(the)g(last)f(editing)i ! (command.)25 b(Y)l(ou)17 b(can)g(undo)g(all)g(the)g(w)o(a)o(y)f(bac)o ! (k)h(to)f(an)g(empt)o(y)315 1093 y(line.)75 1172 y(\(Dep)q(ending)i(on) ! f(y)o(our)g(con\014guration,)g(the)863 1170 y Fo(h)p ! 875 1144 159 2 v 875 1172 a Fn(Bac)o(kspace)p 875 1179 ! V 1032 1170 a Fo(i)1063 1172 y Fu(k)o(ey)g(b)q(e)h(set)f(to)f(delete)i ! (the)f(c)o(haracter)g(to)f(the)75 1226 y(left)h(of)f(the)h(cursor)f ! (and)g(the)596 1224 y Fo(h)p 608 1198 73 2 v 608 1226 ! a Fn(DEL)p 608 1234 V 679 1224 a Fo(i)710 1226 y Fu(k)o(ey)h(set)f(to)g ! (delete)h(the)g(c)o(haracter)f(underneath)h(the)g(cursor,)f(lik)o(e)75 ! 1279 y Fo(h)p 87 1253 57 2 v 87 1281 a Fn(C-d)p 87 1289 ! V 142 1279 a Fo(i)157 1281 y Fu(,)f(rather)f(than)h(the)h(c)o(haracter) ! e(to)h(the)g(left)g(of)g(the)g(cursor.\))75 1392 y Fl(1.2.2)30 ! b(Readline)20 b(Mo)n(v)n(emen)n(t)i(Commands)137 1487 ! y Fu(The)14 b(ab)q(o)o(v)o(e)e(table)i(describ)q(es)g(the)g(most)e (basic)i(k)o(eystrok)o(es)d(that)i(y)o(ou)g(need)h(in)f(order)g(to)g ! (do)g(editing)75 1542 y(of)f(the)h(input)h(line.)21 b(F)l(or)12 b(y)o(our)g(con)o(v)o(enience,)i(man)o(y)f(other)f(commands)h(ha)o(v)o ! (e)f(b)q(een)i(added)f(in)h(addition)75 1597 y(to)130 ! 1595 y Fo(h)p 142 1569 V 142 1597 a Fn(C-b)p 142 1605 ! V 197 1595 a Fo(i)212 1597 y Fu(,)239 1595 y Fo(h)p 251 ! 1569 49 2 v 251 1597 a Fn(C-f)p 251 1605 V 297 1595 a ! Fo(i)312 1597 y Fu(,)339 1595 y Fo(h)p 351 1569 57 2 ! v 351 1597 a Fn(C-d)p 351 1605 V 406 1595 a Fo(i)421 ! 1597 y Fu(,)g(and)536 1595 y Fo(h)p 548 1569 73 2 v 548 ! 1597 a Fn(DEL)p 548 1605 V 619 1595 a Fo(i)634 1597 y ! Fu(.)20 b(Here)15 b(are)f(some)g(commands)h(for)f(mo)o(ving)g(more)h ! (rapidly)g(ab)q(out)g(the)75 1652 y(line.)75 1728 y Fo(h)p ! 87 1702 55 2 v 87 1730 a Fn(C-a)p 87 1738 V 140 1728 ! a Fo(i)315 1730 y Fu(Mo)o(v)o(e)f(to)h(the)g(start)f(of)h(the)g(line.) ! 75 1807 y Fo(h)p 87 1781 53 2 v 87 1809 a Fn(C-e)p 87 ! 1817 V 138 1807 a Fo(i)315 1809 y Fu(Mo)o(v)o(e)f(to)h(the)g(end)h(of)f ! (the)g(line.)75 1885 y Fo(h)p 87 1859 55 2 v 87 1887 ! a Fn(M-f)p 87 1895 V 140 1885 a Fo(i)315 1887 y Fu(Mo)o(v)o(e)f(forw)o ! (ard)g(a)h(w)o(ord,)f(where)i(a)e(w)o(ord)h(is)h(comp)q(osed)f(of)g ! (letters)g(and)h(digits.)75 1964 y Fo(h)p 87 1938 64 ! 2 v 87 1966 a Fn(M-b)p 87 1974 V 149 1964 a Fo(i)315 ! 1966 y Fu(Mo)o(v)o(e)e(bac)o(kw)o(ard)h(a)g(w)o(ord.)75 ! 2043 y Fo(h)p 87 2017 48 2 v 87 2045 a Fn(C-l)p 87 2052 ! V 132 2043 a Fo(i)315 2045 y Fu(Clear)g(the)h(screen,)f(reprin)o(ting)h ! (the)f(curren)o(t)g(line)i(at)e(the)g(top.)137 2123 y(Notice)d(ho)o(w) ! 368 2121 y Fo(h)p 380 2095 49 2 v 380 2123 a Fn(C-f)p ! 380 2131 V 426 2121 a Fo(i)452 2123 y Fu(mo)o(v)o(es)f(forw)o(ard)f(a)i ! (c)o(haracter,)f(while)1105 2121 y Fo(h)p 1117 2095 55 ! 2 v 1117 2123 a Fn(M-f)p 1117 2131 V 1170 2121 a Fo(i)1197 ! 2123 y Fu(mo)o(v)o(es)f(forw)o(ard)h(a)g(w)o(ord.)18 ! b(It)12 b(is)g(a)g(lo)q(ose)75 2178 y(con)o(v)o(en)o(tion)j(that)f(con) o(trol)h(k)o(eystrok)o(es)f(op)q(erate)h(on)f(c)o(haracters)h(while)h ! (meta)e(k)o(eystrok)o(es)g(op)q(erate)h(on)75 2233 y(w)o(ords.)75 ! 2343 y Fl(1.2.3)30 b(Readline)20 b(Killing)h(Commands)137 ! 2439 y Fm(Killing)26 b Fu(text)18 b(means)g(to)g(delete)i(the)f(text)f (from)g(the)h(line,)i(but)d(to)g(sa)o(v)o(e)g(it)h(a)o(w)o(a)o(y)e(for) ! h(later)h(use,)75 2494 y(usually)f(b)o(y)f Fm(y)o(anking)22 b Fu(\(re-inserting\))17 b(it)g(bac)o(k)g(in)o(to)g(the)h(line.)27 b(\(`Cut')15 b(and)j(`paste')e(are)g(more)h(recen)o(t)75 ! 2549 y(jargon)d(for)h(`kill')h(and)g(`y)o(ank'.\))137 2615 y(If)g(the)f(description)h(for)f(a)g(command)g(sa)o(ys)f(that)h (it)g(`kills')h(text,)e(then)i(y)o(ou)f(can)g(b)q(e)h(sure)f(that)f(y)o --- 1124,1339 ---- %%EndSetup %%Page: 1 1 ! 1 0 bop 75 659 a Fv(GNU)33 b(Readline)h(Library)p 75 ! 709 1800 17 v 936 757 a Fu(Edition)17 b(4.2,)c(for)i ! Ft(Readline)f(Library)g Fu(V)l(ersion)i(4.2.)1692 811 ! y(Apr)f(2001)75 2467 y Fs(Brian)23 b(F)-6 b(o)n(x,)23 b(F)-6 b(ree)23 b(Soft)n(w)n(are)f(F)-6 b(oundation)75 2534 y(Chet)22 b(Ramey)-6 b(,)23 b(Case)e(W)-6 b(estern)23 b(Reserv)n(e)f(Univ)n(ersit)n(y)p 75 2570 1800 9 v eop %%Page: 2 2 ! 2 1 bop 75 217 a Fu(This)14 b(do)q(cumen)o(t)h(describ)q(es)g(the)f ! (GNU)g(Readline)h(Library)l(,)f(a)g(utilit)o(y)h(whic)o(h)f(aids)g(in)h ! (the)f(consistency)75 271 y(of)h(user)g(in)o(terface)h(across)e (discrete)i(programs)e(that)h(need)h(to)e(pro)o(vide)i(a)f(command)g ! (line)i(in)o(terface.)75 339 y(Published)g(b)o(y)f(the)f(F)l(ree)g ! (Soft)o(w)o(are)f(F)l(oundation)75 394 y(59)h(T)l(emple)h(Place,)f ! (Suite)i(330,)75 448 y(Boston,)d(MA)h(02111)f(USA)75 ! 516 y(P)o(ermission)j(is)f(gran)o(ted)g(to)f(mak)o(e)h(and)g (distribute)i(v)o(erbatim)d(copies)i(of)f(this)h(man)o(ual)f(pro)o ! (vided)h(the)75 570 y(cop)o(yrigh)o(t)e(notice)h(and)f(this)h(p)q (ermission)g(notice)g(are)f(preserv)o(ed)h(on)f(all)h(copies.)75 ! 638 y(P)o(ermission)c(is)h(gran)o(ted)e(to)g(cop)o(y)h(and)g (distribute)h(mo)q(di\014ed)g(v)o(ersions)f(of)f(this)h(man)o(ual)g ! (under)h(the)f(con-)75 692 y(ditions)k(for)e(v)o(erbatim)h(cop)o(ying,) g(pro)o(vided)h(that)e(the)h(en)o(tire)h(resulting)g(deriv)o(ed)g(w)o ! (ork)e(is)h(distributed)75 747 y(under)h(the)f(terms)g(of)g(a)f(p)q (ermission)j(notice)f(iden)o(tical)h(to)e(this)g(one.)75 ! 814 y(P)o(ermission)i(is)g(gran)o(ted)f(to)g(cop)o(y)h(and)f (distribute)i(translations)f(of)f(this)h(man)o(ual)g(in)o(to)f(another) ! g(lan-)75 869 y(guage,)e(under)h(the)f(ab)q(o)o(v)o(e)g(conditions)i (for)d(mo)q(di\014ed)j(v)o(ersions,)e(except)h(that)f(this)h(p)q ! (ermission)g(notice)75 924 y(ma)o(y)f(b)q(e)i(stated)f(in)h(a)f (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 1 2 bop 75 -58 a Fu(Chapter)15 b(1:)k(Command)c(Line)i(Editing)1077 ! b(1)75 149 y Fq(1)41 b(Command)28 b(Line)e(Editing)137 ! 271 y Fu(This)16 b(c)o(hapter)f(describ)q(es)i(the)e(basic)h(features)f (of)g(the)g Fp(gnu)g Fu(command)g(line)i(editing)f(in)o(terface.)75 ! 403 y Fs(1.1)33 b(In)n(tro)r(duction)24 b(to)e(Line)i(Editing)137 ! 501 y Fu(The)16 b(follo)o(wing)g(paragraphs)e(describ)q(e)j(the)e (notation)g(used)h(to)e(represen)o(t)i(k)o(eystrok)o(es.)137 ! 569 y(The)h(text)f Fo(C-k)h Fu(is)g(read)g(as)f(`Con)o(trol-K')g(and)h ! (describ)q(es)h(the)f(c)o(haracter)f(pro)q(duced)h(when)h(the)1831 ! 567 y Fn(h)p 1844 541 19 2 v 1844 569 a Fm(k)p 1844 577 ! V 1860 567 a Fn(i)75 624 y Fu(k)o(ey)d(is)h(pressed)g(while)g(the)f ! (Con)o(trol)g(k)o(ey)g(is)h(depressed.)137 693 y(The)g(text)g ! Fo(M-k)f Fu(is)i(read)f(as)f(`Meta-K')g(and)h(describ)q(es)i(the)e(c)o ! (haracter)f(pro)q(duced)i(when)g(the)f(Meta)75 747 y(k)o(ey)e(\(if)g(y) o(ou)g(ha)o(v)o(e)g(one\))g(is)h(depressed,)g(and)f(the)930 ! 745 y Fn(h)p 942 719 V 942 747 a Fm(k)p 942 755 V 958 ! 745 a Fn(i)987 747 y Fu(k)o(ey)g(is)h(pressed.)20 b(The)15 ! b(Meta)e(k)o(ey)h(is)h(lab)q(eled)1779 745 y Fn(h)p 1791 ! 719 72 2 v 1791 747 a Fm(AL)m(T)p 1791 755 V 1860 745 ! a Fn(i)75 802 y Fu(on)e(man)o(y)g(k)o(eyb)q(oards.)19 b(On)13 b(k)o(eyb)q(oards)g(with)h(t)o(w)o(o)e(k)o(eys)g(lab)q(eled) ! 1213 800 y Fn(h)p 1225 774 V 1225 802 a Fm(AL)m(T)p 1225 ! 810 V 1294 800 a Fn(i)1322 802 y Fu(\(usually)i(to)e(either)i(side)g ! (of)f(the)75 857 y(space)j(bar\),)f(the)388 855 y Fn(h)p ! 400 829 V 400 857 a Fm(AL)m(T)p 400 865 V 469 855 a Fn(i)499 ! 857 y Fu(on)h(the)g(left)g(side)g(is)g(generally)h(set)f(to)f(w)o(ork)g ! (as)g(a)g(Meta)g(k)o(ey)l(.)22 b(The)1697 855 y Fn(h)p ! 1709 829 V 1709 857 a Fm(AL)m(T)p 1709 865 V 1778 855 ! a Fn(i)1808 857 y Fu(k)o(ey)75 912 y(on)17 b(the)f(righ)o(t)h(ma)o(y)f (also)h(b)q(e)g(con\014gured)g(to)f(w)o(ork)g(as)g(a)h(Meta)f(k)o(ey)g ! (or)g(ma)o(y)g(b)q(e)i(con\014gured)f(as)f(some)75 967 y(other)f(mo)q(di\014er,)h(suc)o(h)f(as)g(a)g(Comp)q(ose)g(k)o(ey)g ! (for)f(t)o(yping)i(accen)o(ted)f(c)o(haracters.)137 1035 y(If)c(y)o(ou)g(do)g(not)f(ha)o(v)o(e)h(a)f(Meta)h(or)694 ! 1033 y Fn(h)p 706 1007 V 706 1035 a Fm(AL)m(T)p 706 1043 ! V 775 1033 a Fn(i)801 1035 y Fu(k)o(ey)l(,)g(or)g(another)f(k)o(ey)h(w) o(orking)f(as)h(a)f(Meta)h(k)o(ey)l(,)g(the)g(iden)o(tical)75 ! 1090 y(k)o(eystrok)o(e)f(can)i(b)q(e)g(generated)f(b)o(y)g(t)o(yping) ! 809 1088 y Fn(h)p 822 1062 70 2 v 822 1090 a Fm(ESC)p ! 822 1098 V 888 1088 a Fn(i)915 1090 y Fl(\014rst)p Fu(,)g(and)g(then)h ! (t)o(yping)1339 1088 y Fn(h)p 1351 1062 19 2 v 1351 1090 ! a Fm(k)p 1351 1098 V 1368 1088 a Fn(i)1383 1090 y Fu(.)18 ! b(Either)12 b(pro)q(cess)f(is)h(kno)o(wn)75 1145 y(as)j ! Fk(metafying)k Fu(the)425 1143 y Fn(h)p 437 1117 V 437 ! 1145 a Fm(k)p 437 1153 V 454 1143 a Fn(i)484 1145 y Fu(k)o(ey)l(.)137 ! 1214 y(The)i(text)e Fo(M-C-k)h Fu(is)h(read)f(as)f(`Meta-Con)o(trol-k') ! g(and)h(describ)q(es)i(the)e(c)o(haracter)g(pro)q(duced)h(b)o(y)75 ! 1268 y Fk(metafying)e Fo(C-k)p Fu(.)137 1337 y(In)g(addition,)h(sev)o ! (eral)f(k)o(eys)f(ha)o(v)o(e)g(their)h(o)o(wn)f(names.)30 ! b(Sp)q(eci\014cally)l(,)1384 1335 y Fn(h)p 1396 1309 ! 73 2 v 1396 1337 a Fm(DEL)p 1396 1345 V 1467 1335 a Fn(i)1482 ! 1337 y Fu(,)1514 1335 y Fn(h)p 1526 1309 70 2 v 1526 ! 1337 a Fm(ESC)p 1526 1345 V 1593 1335 a Fn(i)1608 1337 ! y Fu(,)1640 1335 y Fn(h)p 1652 1309 72 2 v 1652 1337 ! a Fm(LFD)p 1652 1345 V 1722 1335 a Fn(i)1737 1337 y Fu(,)1768 ! 1335 y Fn(h)p 1780 1309 70 2 v 1780 1337 a Fm(SPC)p 1780 ! 1345 V 1847 1335 a Fn(i)1862 1337 y Fu(,)75 1390 y Fn(h)p ! 87 1364 76 2 v 87 1392 a Fm(RET)p 87 1399 V 160 1390 ! a Fn(i)175 1392 y Fu(,)23 b(and)306 1390 y Fn(h)p 318 ! 1364 74 2 v 318 1392 a Fm(T)m(AB)p 318 1399 V 390 1390 ! a Fn(i)427 1392 y Fu(all)f(stand)g(for)f(themselv)o(es)h(when)h(seen)f (in)g(this)g(text,)h(or)e(in)i(an)e(init)i(\014le)g(\(see)75 ! 1447 y(Section)d(1.3)f([Readline)h(Init)g(File],)h(page)e(4\).)32 b(If)19 b(y)o(our)g(k)o(eyb)q(oard)h(lac)o(ks)f(a)1444 ! 1445 y Fn(h)p 1456 1419 72 2 v 1456 1447 a Fm(LFD)p 1456 ! 1454 V 1526 1445 a Fn(i)1560 1447 y Fu(k)o(ey)l(,)h(t)o(yping)1802 ! 1445 y Fn(h)p 1814 1419 49 2 v 1814 1447 a Fm(C-j)p 1814 ! 1454 V 1860 1445 a Fn(i)75 1501 y Fu(will)c(pro)q(duce)g(the)f(desired) ! h(c)o(haracter.)j(The)874 1499 y Fn(h)p 886 1473 76 2 ! v 886 1501 a Fm(RET)p 886 1509 V 959 1499 a Fn(i)989 ! 1501 y Fu(k)o(ey)c(ma)o(y)f(b)q(e)h(lab)q(eled)1385 1499 ! y Fn(h)p 1397 1473 109 2 v 1397 1501 a Fm(Return)p 1397 ! 1509 V 1503 1499 a Fn(i)1533 1501 y Fu(or)1588 1499 y ! Fn(h)p 1600 1473 86 2 v 1600 1501 a Fm(En)o(ter)p 1600 ! 1509 V 1684 1499 a Fn(i)1714 1501 y Fu(on)f(some)75 1556 ! y(k)o(eyb)q(oards.)75 1688 y Fs(1.2)33 b(Readline)23 ! b(In)n(teraction)137 1786 y Fu(Often)13 b(during)h(an)e(in)o(teractiv)o (e)h(session)g(y)o(ou)g(t)o(yp)q(e)f(in)i(a)e(long)h(line)h(of)e(text,) ! h(only)g(to)f(notice)h(that)f(the)75 1841 y(\014rst)k(w)o(ord)f(on)h ! (the)h(line)h(is)e(missp)q(elled.)26 b(The)16 b(Readline)i(library)f (giv)o(es)f(y)o(ou)g(a)g(set)g(of)g(commands)g(for)75 ! 1896 y(manipulating)g(the)f(text)g(as)f(y)o(ou)h(t)o(yp)q(e)g(it)g(in,) g(allo)o(wing)h(y)o(ou)f(to)f(just)h(\014x)g(y)o(our)f(t)o(yp)q(o,)g ! (and)h(not)g(forcing)75 1950 y(y)o(ou)f(to)f(ret)o(yp)q(e)h(the)g(ma)s (jorit)o(y)f(of)h(the)g(line.)21 b(Using)15 b(these)f(editing)h ! (commands,)f(y)o(ou)g(mo)o(v)o(e)f(the)h(cursor)75 2005 y(to)i(the)i(place)g(that)e(needs)i(correction,)g(and)f(delete)h(or)f (insert)g(the)h(text)e(of)h(the)g(corrections.)26 b(Then,)75 ! 2060 y(when)16 b(y)o(ou)f(are)h(satis\014ed)g(with)g(the)f(line,)i(y)o ! (ou)e(simply)i(press)1160 2058 y Fn(h)p 1172 2032 76 ! 2 v 1172 2060 a Fm(RET)p 1172 2068 V 1245 2058 a Fn(i)1260 ! 2060 y Fu(.)k(Y)l(ou)16 b(do)f(not)h(ha)o(v)o(e)f(to)g(b)q(e)h(at)f ! (the)75 2115 y(end)k(of)e(the)h(line)i(to)d(press)563 ! 2113 y Fn(h)p 575 2087 V 575 2115 a Fm(RET)p 575 2122 ! V 648 2113 a Fn(i)663 2115 y Fu(;)i(the)f(en)o(tire)h(line)g(is)g ! (accepted)f(regardless)g(of)g(the)g(lo)q(cation)g(of)g(the)75 ! 2170 y(cursor)d(within)h(the)g(line.)75 2284 y Fj(1.2.1)30 ! b(Readline)20 b(Bare)g(Essen)n(tials)137 2382 y Fu(In)12 ! b(order)g(to)f(en)o(ter)g(c)o(haracters)g(in)o(to)g(the)h(line,)h ! (simply)g(t)o(yp)q(e)f(them.)18 b(The)12 b(t)o(yp)q(ed)g(c)o(haracter)f ! (app)q(ears)75 2437 y(where)16 b(the)h(cursor)f(w)o(as,)f(and)h(then)h ! (the)f(cursor)g(mo)o(v)o(es)g(one)g(space)g(to)g(the)g(righ)o(t.)23 ! b(If)17 b(y)o(ou)f(mist)o(yp)q(e)g(a)75 2492 y(c)o(haracter,)e(y)o(ou)h ! (can)g(use)h(y)o(our)f(erase)g(c)o(haracter)f(to)h(bac)o(k)g(up)g(and)h ! (delete)g(the)f(mist)o(yp)q(ed)h(c)o(haracter.)137 2560 ! y(Sometimes)g(y)o(ou)f(ma)o(y)g(mist)o(yp)q(e)h(a)f(c)o(haracter,)f ! (and)i(not)f(notice)h(the)f(error)g(un)o(til)i(y)o(ou)e(ha)o(v)o(e)g(t) ! o(yp)q(ed)75 2615 y(sev)o(eral)g(other)f(c)o(haracters.)19 ! b(In)c(that)e(case,)i(y)o(ou)f(can)g(t)o(yp)q(e)h Fo(C-b)f ! Fu(to)g(mo)o(v)o(e)f(the)i(cursor)f(to)g(the)g(left,)h(and)75 ! 2670 y(then)h(correct)e(y)o(our)h(mistak)o(e.)20 b(Afterw)o(ards,)13 ! b(y)o(ou)i(can)g(mo)o(v)o(e)g(the)g(cursor)g(to)g(the)g(righ)o(t)g ! (with)g Fo(C-f)p Fu(.)p eop %%Page: 2 4 ! 2 3 bop 75 -58 a Fu(2)1322 b(GNU)15 b(Readline)h(Library)137 ! 149 y(When)h(y)o(ou)f(add)g(text)g(in)h(the)g(middle)h(of)e(a)f(line,)j (y)o(ou)e(will)i(notice)f(that)f(c)o(haracters)f(to)h(the)g(righ)o(t)75 ! 204 y(of)e(the)g(cursor)g(are)g(`pushed)h(o)o(v)o(er')f(to)f(mak)o(e)h (ro)q(om)g(for)f(the)i(text)f(that)f(y)o(ou)h(ha)o(v)o(e)g(inserted.)21 ! b(Lik)o(ewise,)75 259 y(when)e(y)o(ou)g(delete)h(text)e(b)q(ehind)j (the)e(cursor,)g(c)o(haracters)f(to)g(the)h(righ)o(t)f(of)g(the)h ! (cursor)g(are)f(`pulled)75 314 y(bac)o(k')11 b(to)g(\014ll)h(in)h(the)e (blank)h(space)g(created)f(b)o(y)h(the)f(remo)o(v)m(al)g(of)g(the)h (text.)18 b(A)11 b(list)h(of)f(the)h(bare)f(essen)o(tials)75 ! 369 y(for)k(editing)h(the)f(text)g(of)g(an)g(input)h(line)h(follo)o ! (ws.)75 449 y Fo(C-b)168 b Fu(Mo)o(v)o(e)14 b(bac)o(k)h(one)h(c)o ! (haracter.)75 530 y Fo(C-f)168 b Fu(Mo)o(v)o(e)14 b(forw)o(ard)g(one)h ! (c)o(haracter.)75 608 y Fn(h)p 87 582 73 2 v 87 610 a ! Fm(DEL)p 87 618 V 158 608 a Fn(i)188 610 y Fu(or)244 ! 608 y Fn(h)p 256 582 159 2 v 256 610 a Fm(Bac)o(kspace)p ! 256 618 V 412 608 a Fn(i)315 665 y Fu(Delete)h(the)f(c)o(haracter)g(to) ! f(the)h(left)h(of)f(the)g(cursor.)75 745 y Fo(C-d)168 ! b Fu(Delete)16 b(the)f(c)o(haracter)g(underneath)h(the)f(cursor.)75 ! 825 y(Prin)o(ting)h(c)o(haracters)315 880 y(Insert)f(the)h(c)o (haracter)e(in)o(to)h(the)h(line)h(at)d(the)h(cursor.)75 ! 961 y Fo(C-_)g Fu(or)f Fo(C-x)h(C-u)315 1015 y Fu(Undo)i(the)g(last)f ! (editing)i(command.)25 b(Y)l(ou)17 b(can)g(undo)g(all)g(the)g(w)o(a)o ! (y)f(bac)o(k)h(to)f(an)g(empt)o(y)315 1070 y(line.)75 ! 1151 y(\(Dep)q(ending)i(on)f(y)o(our)g(con\014guration,)g(the)863 ! 1149 y Fn(h)p 875 1123 V 875 1151 a Fm(Bac)o(kspace)p ! 875 1159 V 1032 1149 a Fn(i)1063 1151 y Fu(k)o(ey)g(b)q(e)h(set)f(to)f ! (delete)i(the)f(c)o(haracter)g(to)f(the)75 1206 y(left)h(of)f(the)h ! (cursor)f(and)g(the)596 1204 y Fn(h)p 608 1178 73 2 v ! 608 1206 a Fm(DEL)p 608 1213 V 679 1204 a Fn(i)710 1206 ! y Fu(k)o(ey)h(set)f(to)g(delete)h(the)g(c)o(haracter)f(underneath)h ! (the)g(cursor,)f(lik)o(e)75 1260 y Fo(C-d)p Fu(,)e(rather)h(than)g(the) ! g(c)o(haracter)g(to)f(the)i(left)f(of)g(the)g(cursor.\))75 ! 1374 y Fj(1.2.2)30 b(Readline)20 b(Mo)n(v)n(emen)n(t)i(Commands)137 ! 1471 y Fu(The)14 b(ab)q(o)o(v)o(e)e(table)i(describ)q(es)g(the)g(most)e (basic)i(k)o(eystrok)o(es)d(that)i(y)o(ou)g(need)h(in)f(order)g(to)g ! (do)g(editing)75 1526 y(of)f(the)h(input)h(line.)21 b(F)l(or)12 b(y)o(our)g(con)o(v)o(enience,)i(man)o(y)f(other)f(commands)h(ha)o(v)o ! (e)f(b)q(een)i(added)f(in)h(addition)75 1580 y(to)h Fo(C-b)p ! Fu(,)h Fo(C-f)p Fu(,)f Fo(C-d)p Fu(,)g(and)522 1578 y ! Fn(h)p 534 1552 V 534 1580 a Fm(DEL)p 534 1588 V 605 ! 1578 a Fn(i)619 1580 y Fu(.)23 b(Here)16 b(are)g(some)f(commands)h(for) ! f(mo)o(ving)h(more)g(rapidly)h(ab)q(out)f(the)75 1635 ! y(line.)75 1716 y Fo(C-a)168 b Fu(Mo)o(v)o(e)14 b(to)h(the)g(start)f ! (of)h(the)g(line.)75 1796 y Fo(C-e)168 b Fu(Mo)o(v)o(e)14 ! b(to)h(the)g(end)h(of)f(the)g(line.)75 1876 y Fo(M-f)168 ! b Fu(Mo)o(v)o(e)14 b(forw)o(ard)g(a)h(w)o(ord,)f(where)i(a)e(w)o(ord)h ! (is)h(comp)q(osed)f(of)g(letters)g(and)h(digits.)75 1957 ! y Fo(M-b)168 b Fu(Mo)o(v)o(e)14 b(bac)o(kw)o(ard)h(a)g(w)o(ord.)75 ! 2037 y Fo(C-l)168 b Fu(Clear)15 b(the)h(screen,)f(