From: Chet Ramey Date: Wed, 27 Jan 2016 16:06:37 +0000 (-0500) Subject: commit readline-20160127 snapshot X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ea6f792fe1ed3ad32412c9f8b36ddd039a13f98;p=thirdparty%2Freadline.git commit readline-20160127 snapshot --- 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 7007d52..4ab5410 100644 Binary files a/doc/history.dvi and b/doc/history.dvi differ diff --git a/doc/history.html b/doc/history.html index cba7535..a6be6e3 100644 --- a/doc/history.html +++ b/doc/history.html @@ -1,6 +1,6 @@ - + + +