]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/libreadline/CHANGES
This commit was generated by cvs2svn to compensate for changes in r102550,
[FreeBSD/FreeBSD.git] / contrib / libreadline / CHANGES
1 This document details the changes between this version, readline-4.2,
2 and the previous version, readline-4.1.
3
4 1.  Changes to Readline
5
6 a.  When setting the terminal attributes on systems using `struct termio',
7     readline waits for output to drain before changing the attributes.
8
9 b.  A fix was made to the history word tokenization code to avoid attempts to
10     dereference a null pointer.
11
12 c.  Readline now defaults rl_terminal_name to $TERM if the calling application
13     has left it unset, and tries to initialize with the resultant value.
14
15 d.  Instead of calling (*rl_getc_function)() directly to get input in certain
16     places, readline now calls rl_read_key() consistently.
17
18 e.  Fixed a bug in the completion code that allowed a backslash to quote a
19     single quote inside a single-quoted string.
20
21 f.  rl_prompt is no longer assigned directly from the argument to readline(),
22     but uses memory allocated by readline.  This allows constant strings to
23     be passed to readline without problems arising when the prompt processing
24     code wants to modify the string.
25
26 g.  Fixed a bug that caused non-interactive history searches to return the
27     wrong line when performing multiple searches backward for the same string.
28
29 h.  Many variables, function arguments, and function return values are now
30     declared `const' where appropriate, to improve behavior when linking with
31     C++ code.
32
33 i.  The control character detection code now works better on systems where
34     `char' is unsigned by default.
35
36 j.  The vi-mode numeric argument is now capped at 999999, just like emacs mode.
37
38 k.  The Function, CPFunction, CPPFunction, and VFunction typedefs have been
39     replaced with a set of specific prototyped typedefs, though they are
40     still in the readline header files for backwards compatibility.
41
42 m.  Nearly all of the (undocumented) internal global variables in the library
43     now have an _rl_ prefix -- there were a number that did not, like
44     screenheight, screenwidth, alphabetic, etc.
45
46 n.  The ding() convenience function has been renamed to rl_ding(), though the
47     old function is still defined for backwards compatibility.
48
49 o.  The completion convenience functions filename_completion_function,
50     username_completion_function, and completion_matches now have an rl_
51     prefix, though the old names are still defined for backwards compatibility.
52
53 p.  The functions shared by readline and bash (linkage is satisfied from bash
54     when compiling with bash, and internally otherwise) now have an sh_ prefix.
55
56 q.  Changed the shared library creation procedure on Linux and BSD/OS 4.x so
57     that the `soname' contains only the major version number rather than the
58     major and minor numbers.
59
60 r.  Fixed a redisplay bug that occurred when the prompt spanned more than one
61     physical line and contained invisible characters.
62
63 s.  Added a missing `includedir' variable to the Makefile.
64
65 t.  When installing the shared libraries, make sure symbolic links are relative.
66
67 u.  Added configure test so that it can set `${MAKE}' appropriately.
68
69 v.  Fixed a bug in rl_forward that could cause the point to be set to before
70     the beginning of the line in vi mode.
71
72 w.  Fixed a bug in the callback read-char interface to make it work when a
73     readline function pushes some input onto the input stream with
74     rl_execute_next (like the incremental search functions).
75
76 x.  Fixed a file descriptor leak in the history file manipulation code that
77     was tripped when attempting to truncate a non-regular file (like
78     /dev/null).
79
80 y.  Changes to make all of the exported readline functions declared in
81     readline.h have an rl_ prefix (rltty_set_default_bindings is now
82     rl_tty_set_default_bindings, crlf is now rl_crlf, etc.)
83
84 z.  The formatted documentation included in the base readline distribution
85     is no longer removed on a `make distclean'.
86
87 aa. Some changes were made to avoid gcc warnings with -Wall.
88
89 bb. rl_get_keymap_by_name now finds keymaps case-insensitively, so
90     `set keymap EMACS' works.
91
92 cc. The history file writing and truncation functions now return a useful
93     status on error.
94
95 dd. Fixed a bug that could cause applications to dereference a NULL pointer
96     if a NULL second argument was passed to history_expand().
97
98 ee. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
99     value, rl_read_key() now immediately returns '\n' (which is assumed to   
100     be bound to accept-line).
101
102 2.  New Features in Readline
103
104 a.  The blink timeout for paren matching is now settable by applications,
105     via the rl_set_paren_blink_timeout() function.
106
107 b.  _rl_executing_macro has been renamed to rl_executing_macro, which means
108     it's now part of the public interface.
109
110 c.  Readline has a new variable, rl_readline_state, which is a bitmap that
111     encapsulates the current state of the library; intended for use by
112     callbacks and hook functions.
113
114 d.  rlfe has a new -l option to log input and output (-a appends to logfile),
115     a new -n option to set the readline application name, and -v and -h
116     options for version and help information.
117
118 e.  rlfe can now perform filename completion for the inferior process if the
119     OS has a /proc/<PID>/cwd that can be read with readlink(2) to get the
120     inferior's current working directory.
121
122 f.  A new file, rltypedefs.h, contains the new typedefs for function pointers
123     and is installed by `make install'.
124
125 g.  New application-callable function rl_set_prompt(const char *prompt):
126     expands its prompt string argument and sets rl_prompt to the result.
127
128 h.  New application-callable function rl_set_screen_size(int rows, int cols):
129     public method for applications to set readline's idea of the screen
130     dimensions.
131
132 i.  The history example program (examples/histexamp.c) is now built as one
133     of the examples.
134
135 j.  The documentation has been updated to cover nearly all of the public
136     functions and variables declared in readline.h.
137
138 k.  New function, rl_get_screen_size (int *rows, int *columns), returns
139     readline's idea of the screen dimensions.
140
141 l.  The timeout in rl_gather_tyi (readline keyboard input polling function)
142     is now settable via a function (rl_set_keyboard_input_timeout()).
143
144 m.  Renamed the max_input_history variable to history_max_entries; the old
145     variable is maintained for backwards compatibility.
146
147 n.  The list of characters that separate words for the history tokenizer is
148     now settable with a variable:  history_word_delimiters.  The default
149     value is as before.
150
151 o.  There is a new history.3 manual page documenting the history library.
152
153 -------------------------------------------------------------------------------
154 This document details the changes between this version, readline-4.1,
155 and the previous version, readline-4.0.
156
157 1.  Changes to Readline
158
159 a.  Changed the HTML documents so that the table-of-contents is no longer
160     a separate file.
161
162 b.  Changes to the shared object configuration for: Irix 5.x, Irix 6.x,
163     OSF/1.
164
165 c.  The shared library major and minor versions are now constructed
166     automatically by configure and substituted into the makefiles.
167
168 d.  It's now possible to install the shared libraries separately from the
169     static libraries.
170
171 e.  The history library tries to truncate the history file only if it is a
172     regular file.
173
174 f.  A bug that caused _rl_dispatch to address negative array indices on
175     systems with signed chars was fixed.
176
177 g.  rl-yank-nth-arg now leaves the history position the same as when it was
178     called.
179
180 h.  Changes to the completion code to handle MS-DOS drive-letter:pathname
181     filenames.
182
183 i.  Completion is now case-insensitive by default on MS-DOS.
184
185 j.  Fixes to the history file manipulation code for MS-DOS.
186
187 k.  Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
188
189 l.  Some fixes were made to the redisplay code for better operation on MS-DOS.
190
191 m.  The quoted-insert code will now insert tty special chars like ^C.
192
193 n.  A bug was fixed that caused the display code to reference memory before
194     the start of the prompt string.
195
196 o.  More support for __EMX__ (OS/2).
197
198 p.  A bug was fixed in readline's signal handling that could cause infinite
199     recursion in signal handlers.
200
201 q.  A bug was fixed that caused the point to be less than zero when rl_forward
202     was given a very large numeric argument.
203
204 r.  The vi-mode code now gets characters via the application-settable value
205     of rl_getc_function rather than calling rl_getc directly.
206
207 s.  The history file code now uses O_BINARY mode when reading and writing
208     the history file on cygwin32.
209
210 t.  Fixed a bug in the redisplay code for lines with more than 256 line
211     breaks.
212
213 u.  A bug was fixed which caused invisible character markers to not be
214     stripped from the prompt string if the terminal was in no-echo mode.
215     
216 v.  Readline no longer tries to get the variables it needs for redisplay 
217     from the termcap entry if the calling application has specified its
218     own redisplay function.  Readline treats the terminal as `dumb' in
219     this case.
220
221 w.  Fixes to the SIGWINCH code so that a multiple-line prompt with escape
222     sequences is redrawn correctly.
223
224 x.  Changes to the install and install-shared targets so that the libraries
225     and header files are installed separately.
226
227 2.  New Features in Readline
228
229 a.  A new Readline `user manual' is in doc/rluserman.texinfo.
230
231 b.  Parentheses matching is now always compiled into readline, and enabled
232     or disabled when the value of the `blink-matching-paren' variable is
233     changed.
234
235 c.  MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
236
237 d.  MS-DOS systems now use ~/_history as the default history file.
238
239 e.  history-search-{forward,backward} now leave the point at the end of the
240     line when the string to search for is empty, like
241     {reverse,forward}-search-history.
242
243 f.  history-search-{forward,backward} now leave the last history line found
244     in the readline buffer if the second or subsequent search fails.
245
246 g.  New function for use by applications:  rl_on_new_line_with_prompt, used
247     when an application displays the prompt itself before calling readline().
248
249 h.  New variable for use by applications:  rl_already_prompted.  An application
250     that displays the prompt itself before calling readline() must set this to
251     a non-zero value.
252
253 i.  A new variable, rl_gnu_readline_p, always 1.  The intent is that an
254     application can verify whether or not it is linked with the `real'
255     readline library or some substitute.
256
257 j.  Per Bothner's `rlfe' (pronounced `Ralphie') readline front-end program
258     is included in the examples subdirectory, though it is not built
259     by default.
260
261 -------------------------------------------------------------------------------
262 This document details the changes between this version, readline-4.0,
263 and the previous version, readline-2.2.
264
265 1.  Changes to Readline
266
267 a.  The version number is now 4.0, to match the major and minor version
268     numbers on the shared readline and history libraries.  Future
269     releases will maintain the identical numbering.
270
271 b.  Fixed a typo in the `make install' recipe that copied libreadline.a
272     to libhistory.old right after installing it.
273
274 c.  The readline and history info files are now installed out of the source
275     directory if they are not found in the build directory.
276
277 d.  The library no longer exports a function named `savestring' -- backwards
278     compatibility be damned.
279
280 e.  There is no longer any #ifdef SHELL code in the source files.
281
282 f.  Some changes were made to the key binding code to fix memory leaks and
283     better support Win32 systems.
284
285 g.  Fixed a silly typo in the paren matching code -- it's microseconds, not
286     milliseconds.
287
288 h.  The readline library should be compilable by C++ compilers.
289
290 i.  The readline.h public header file now includes function prototypes for
291     all readline functions, and some changes were made to fix errors in the
292     source files uncovered by the use of prototypes.
293
294 j.  The maximum numeric argument is now clamped at 1000000.
295
296 k.  Fixes to rl_yank_last_arg to make it behave better.
297
298 l.  Fixed a bug in the display code that caused core dumps if the prompt
299     string length exceeded 1024 characters.
300
301 m.  The menu completion code was fixed to properly insert a single completion
302     if there is only one match.
303
304 n.  A bug was fixed that caused the display code to improperly display tabs
305     after newlines.
306
307 o.  A fix was made to the completion code in which a typo caused the wrong
308     value to be passed to the function that computed the longest common
309     prefix of the list of matches.
310
311 p.  The completion code now checks the value of rl_filename_completion_desired,
312     which is set by application-supplied completion functions to indicate
313     that filename completion is being performed, to decide whether or not to
314     call an application-supplied `ignore completions' function.
315
316 q.  Code was added to the history library to catch history substitutions
317     using `&' without a previous history substitution or search having been
318     performed.
319
320
321 2.  New Features in Readline
322
323 a.  There is a new script, support/shobj-conf, to do system-specific shared
324     object and library configuration.  It generates variables for configure
325     to substitute into makefiles.  The README file provides a detailed
326     explanation of the shared library creation process.
327
328 b.  Shared libraries and objects are now built in the `shlib' subdirectory.
329     There is a shlib/Makefile.in to control the build process.  `make shared'
330     from the top-level directory is still the right way to build shared
331     versions of the libraries.
332
333 c.  rlconf.h is now installed, so applications can find out which features
334     have been compiled into the installed readline and history libraries.
335
336 d.  rlstdc.h is now an installed header file.
337
338 e.  Many changes to the signal handling:
339         o Readline now catches SIGQUIT and cleans up the tty before returning;
340         o A new variable, rl_catch_signals, is available to application writers 
341           to indicate to readline whether or not it should install its own
342           signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
343           SIGTTIN, and SIGTTOU;
344         o A new variable, rl_catch_sigwinch, is available to application
345           writers to indicate to readline whether or not it should install its
346           own signal handler for SIGWINCH, which will chain to the calling
347           applications's SIGWINCH handler, if one is installed;
348         o There is a new function, rl_free_line_state, for application signal
349           handlers to call to free up the state associated with the current
350           line after receiving a signal;
351         o There is a new function, rl_cleanup_after_signal, to clean up the
352           display and terminal state after receiving a signal;
353         o There is a new function, rl_reset_after_signal, to reinitialize the
354           terminal and display state after an application signal handler
355           returns and readline continues
356
357 f.  There is a new function, rl_resize_terminal, to reset readline's idea of
358     the screen size after a SIGWINCH.
359
360 g.  New public functions: rl_save_prompt and rl_restore_prompt.  These were
361     previously private functions with a `_' prefix.  These functions are
362     used when an application wants to write a message to the `message area'
363     with rl_message and have the prompt restored correctly when the message
364     is erased.
365
366 h.  New function hook: rl_pre_input_hook, called just before readline starts
367     reading input, after initialization.
368
369 i.  New function hook: rl_display_matches_hook, called when readline would
370     display the list of completion matches.  The new function
371     rl_display_match_list is what readline uses internally, and is available
372     for use by application functions called via this hook.
373
374 j.  New bindable function, delete-char-or-list, like tcsh.
375
376 k.  A new variable, rl_erase_empty_line, which, if set by an application using
377     readline, will cause readline to erase, prompt and all, lines on which the
378     only thing typed was a newline.
379
380 l.  There is a new script, support/shlib-install, to install and uninstall
381     the shared readline and history libraries.
382
383 m.  A new bindable variable, `isearch-terminators', which is a string
384     containing the set of characters that should terminate an incremental
385     search without being executed as a command.
386
387 n.  A new bindable function, forward-backward-delete-char.
388
389 -------------------------------------------------------------------------------
390 This document details the changes between this version, readline-2.2,
391 and the previous version, readline-2.1.
392
393 1.  Changes to Readline
394
395 a.  Added a missing `extern' to a declaration in readline.h that kept
396     readline from compiling cleanly on some systems.
397
398 b.  The history file is now opened with mode 0600 when it is written for
399     better security.
400
401 c.  Changes were made to the SIGWINCH handling code so that prompt redisplay
402     is done better.
403
404 d.  ^G now interrupts incremental searches correctly.
405
406 e.  A bug that caused a core dump when the set of characters to be quoted
407     when completing words was empty was fixed.
408
409 f.  Fixed a problem in the readline test program rltest.c that caused a core
410     dump.
411
412 g.  The code that handles parser directives in inputrc files now displays
413     more error messages.
414
415 h.  The history expansion code was fixed so that the appearance of the
416     history comment character at the beginning of a word inhibits history
417     expansion for that word and the rest of the input line.
418
419 i.  The code that prints completion listings now behaves better if one or
420     more of the filenames contains non-printable characters.
421
422 j.  The time delay when showing matching parentheses is now 0.5 seconds.
423
424
425 2.  New Features in Readline
426
427 a.  There is now an option for `iterative' yank-last-arg handline, so a user
428     can keep entering `M-.', yanking the last argument of successive history
429     lines.
430
431 b.  New variable, `print-completions-horizontally', which causes completion
432     matches to be displayed across the screen (like `ls -x') rather than up
433     and down the screen (like `ls').
434
435 c.  New variable, `completion-ignore-case', which causes filename completion
436     and matching to be performed case-insensitively.
437
438 d.  There is a new bindable command, `magic-space', which causes history
439     expansion to be performed on the current readline buffer and a space to
440     be inserted into the result.
441
442 e.  There is a new bindable command, `menu-complete', which enables tcsh-like
443     menu completion (successive executions of menu-complete insert a single
444     completion match, cycling through the list of possible completions).
445
446 f.  There is a new bindable command, `paste-from-clipboard', for use on Win32
447     systems, to insert the text from the Win32 clipboard into the editing
448     buffer.
449
450 g.  The key sequence translation code now understands printf-style backslash
451     escape sequences, including \NNN octal escapes.  These escape sequences
452     may be used in key sequence definitions or macro values.
453
454 h.  An `$include' inputrc file parser directive has been added.