From 0ea6f792fe1ed3ad32412c9f8b36ddd039a13f98 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Wed, 27 Jan 2016 11:06:37 -0500 Subject: [PATCH] commit readline-20160127 snapshot --- CHANGES | 26 + NEWS | 11 + bind.c | 12 +- callback.c | 2 +- chardefs.h | 2 +- colors.c | 4 +- colors.h | 4 +- doc/history.dvi | Bin 85260 -> 69104 bytes doc/history.html | 7 +- doc/history.info | 55 +- doc/history.pdf | Bin 221898 -> 201621 bytes doc/history.ps | 5227 +++++++++++------------- doc/history.texi | 2 +- doc/hstech.texi | 3 +- doc/hsuser.texi | 2 +- doc/readline.dvi | Bin 322164 -> 305400 bytes doc/readline.html | 13 +- doc/readline.info | 151 +- doc/readline.pdf | Bin 392127 -> 386185 bytes doc/readline.ps | 9689 ++++++++++++++++++++++---------------------- doc/rlman.texi | 2 +- doc/rltech.texi | 2 +- doc/rluser.texi | 2 +- doc/rluserman.dvi | Bin 109128 -> 108836 bytes doc/rluserman.html | 11 +- doc/rluserman.info | 63 +- doc/rluserman.pdf | Bin 226390 -> 226306 bytes doc/rluserman.ps | 719 ++-- doc/rluserman.texi | 2 +- doc/version.texi | 12 +- funmap.c | 2 +- histfile.c | 8 +- kill.c | 2 +- mbutil.c | 2 +- misc.c | 2 +- parens.c | 2 +- readline.c | 5 +- readline.h | 2 +- rlconf.h | 2 +- rlmbutil.h | 2 +- rlprivate.h | 2 +- rltty.c | 2 +- search.c | 2 +- signals.c | 2 +- tcap.h | 2 +- terminal.c | 2 +- text.c | 4 +- undo.c | 5 +- vi_mode.c | 2 +- 49 files changed, 7648 insertions(+), 8427 deletions(-) diff --git a/CHANGES b/CHANGES index 13d75fc..4edf8f7 100644 --- a/CHANGES +++ b/CHANGES @@ -78,6 +78,21 @@ y. Updated tty auditing feature based on patch from Red Hat. z. Fixed a bug that could cause the history library to crash on overflows introduced by malicious editing of timestamps in the history file. +aa. The history file writing functions only attempt to create and use a backup + history file if the history file exists and is a regular file. + +bb. Fixed an out-of-bounds read in readline's internal tilde expansion interface. + +cc. Fixed several redisplay bugs with prompt strings containing multibyte + and non-visible characters whose physical length is longer than the screen + width. + +dd. Fixed a redisplay bug with prompt strings containing invisible characters + whose physical length exceeds the screen width and using incremental search. + +ee. Readline prints more descriptive error messages when it encounters errors + while reading an inputrc file. + 2. New Features in Readline a. The history truncation code now uses the same error recovery mechansim as @@ -112,6 +127,17 @@ i. rl_callback_sigcleanup: a new application function that can clean up and unset any state set by readline's callback mode. Intended to be used after a signal. +j. If an incremental search string has its last character removed with DEL, the + resulting empty search string no longer matches the previous line. + +k. If readline reads a history file that begins with `#' (or the value of + the history comment character) and has enabled history timestamps, the history + entries are assumed to be delimited by timestamps. This allows multi-line + history entries. + +l. Readline now throws an error if it parses a key binding without a terminating + `:' or whitespace. + ------------------------------------------------------------------------------- This document details the changes between this version, readline-6.3, and the previous version, readline-6.2. diff --git a/NEWS b/NEWS index 11ac0e3..cf7107e 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,17 @@ i. rl_callback_sigcleanup: a new application function that can clean up and unset any state set by readline's callback mode. Intended to be used after a signal. +j. If an incremental search string has its last character removed with DEL, the + resulting empty search string no longer matches the previous line. + +k. If readline reads a history file that begins with `#' (or the value of + the history comment character) and has enabled history timestamps, the history + entries are assumed to be delimited by timestamps. This allows multi-line + history entries. + +l. Readline now throws an error if it parses a key binding without a terminating + `:' or whitespace. + ------------------------------------------------------------------------------- This is a terse description of the new features added to readline-6.3 since the release of readline-6.2. diff --git a/bind.c b/bind.c index 77c594a..3dbc1ce 100644 --- a/bind.c +++ b/bind.c @@ -1,6 +1,6 @@ /* bind.c -- key binding and startup file support for the readline library. */ -/* Copyright (C) 1987-2012 Free Software Foundation, Inc. +/* Copyright (C) 1987-2016 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. @@ -1288,7 +1288,7 @@ rl_parse_and_bind (string) { char *funname, *kname; register int c, i; - int key, equivalency, foundmod; + int key, equivalency, foundmod, foundsep; while (string && whitespace (*string)) string++; @@ -1330,6 +1330,8 @@ rl_parse_and_bind (string) equivalency = (c == ':' && string[i + 1] == '='); + foundsep = c != 0; + /* Mark the end of the command (or keyname). */ if (string[i]) string[i++] = '\0'; @@ -1419,6 +1421,12 @@ remove_trailing: return 0; } + if (foundsep == 0) + { + _rl_init_file_error ("%s: no key sequence terminator", string); + return 1; + } + /* If this is a new-style key-binding, then do the binding with rl_bind_keyseq (). Otherwise, let the older code deal with it. */ if (*string == '"') diff --git a/callback.c b/callback.c index ec48b76..fafe5a5 100644 --- a/callback.c +++ b/callback.c @@ -1,6 +1,6 @@ /* callback.c -- functions to use readline as an X `callback' mechanism. */ -/* Copyright (C) 1987-2009 Free Software Foundation, Inc. +/* Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. diff --git a/chardefs.h b/chardefs.h index 43aab7a..3cf1326 100644 --- a/chardefs.h +++ b/chardefs.h @@ -1,6 +1,6 @@ /* chardefs.h -- Character definitions for readline. */ -/* Copyright (C) 1994-2009 Free Software Foundation, Inc. +/* Copyright (C) 1994-2015 Free Software Foundation, Inc. This file is part of the GNU Readline Library (Readline), a library for reading lines of text with interactive input and history editing. diff --git a/colors.c b/colors.c index d4bcb32..7859f5d 100644 --- a/colors.c +++ b/colors.c @@ -2,8 +2,8 @@ Modified by Chet Ramey for Readline. - Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 Free Software Foundation, - Inc. + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015 + Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/colors.h b/colors.h index ec62774..6561ad9 100644 --- a/colors.h +++ b/colors.h @@ -2,8 +2,8 @@ Modified by Chet Ramey for Readline. - Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012 Free Software Foundation, - Inc. + Copyright (C) 1985, 1988, 1990-1991, 1995-2010, 2012, 2015 + Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/doc/history.dvi b/doc/history.dvi index 7007d52097509e8ade2d1a186abe64027e0623e3..4ab54101ea6fbb55fc3e616e18228e2e1e6e0459 100644 GIT binary patch delta 3128 zc-oCtdstKF9X{VVA(4O*zz`7-xvAVjz<~v(H63>Z6ry6d8NwlC4M{jBAaSnXtXeh` zbNnV@*k@?x*wQh6W=KAPtUA;}5rD9v1+uZk^gh&d1EPtHK@Akgm z`+et^->$)c@qHrKg3uhLDpQ%2otK%NmH9n_AOJickjT|UgL2L)N0%KMYMD~S{Vi`L zx+$GQvkAhn2XyRyTBb9*PRDiX7&}KDYRyt*<~a8Q$LE_J6AkbFrE)(pr?r&`Mg_(C z_U7))tg!}I1M)y9bOKk;K2c>~i)C-cb$w?$jmy|LQRR1AXjab{n<32(*xKlRWGSv( ziyVz5M%HFw?9gOvW)R-Mk}i}&Gpx~KhKN-fC+gmll|AsB(Ez5CjO|c2U}Y@n&V#d; zE_HBWp~VJ9*WS}^G#mQKla$Tks<>`3L0g;7#*rsQD0J|2T$d3sfjX$Sm|28On+I&L zlcgCPVMH%9)2h?cu+_pqhSuv$CR7b^Gt(@Nu(U!eLw6Z1ovg_YZ3A{I!k}B62LyPd z+1hD?3Ti#b;VslA5?qCM0umG&L9)=|6Mm9uV4OHs;@sugm(1LxP$J-hW9T8;0<;Hj z=g>DYp)5lVH1K|08c_0)@jHO@KW7{Q(pUq3G(ir)HU6E%Bz(J-#8L~7#(TUI1_5z) z!WBP61K*t-2!INHCuKLd2E$T|QKB}rfJC>U^mIUq%i(CL0$OrYU`R#;Fz|~q&P&kk zZjPBG!`EOZZ^=DD$zrbh5&fE%sBQUTDrR>B|HI`qASmWUgpcdLSCj)vc391qtxP1r zA)a}u0^cqa9LI5TU!1*Y84wN04!;D?6kEU{m{_tA9DuKtT!36@IvMu{VxWb!rMZEg z9nb3?hv8)_P{`UcmI}GAgzuGYkam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