From: Chet Ramey Date: Tue, 8 Apr 2025 15:20:02 +0000 (-0400) Subject: Readline-8.3-rc1 release X-Git-Tag: readline-8.3-rc1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cf1b7904a40a0416d749f96389619c4388aa423;p=thirdparty%2Freadline.git Readline-8.3-rc1 release --- diff --git a/aclocal.m4 b/aclocal.m4 index 7253f2c..bd59866 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -3,7 +3,7 @@ dnl Bash specific tests dnl dnl Some derived from PDKSH 5.1.3 autoconf tests dnl -dnl Copyright (C) 1987-2024 Free Software Foundation, Inc. +dnl Copyright (C) 1987-2025 Free Software Foundation, Inc. dnl dnl diff --git a/complete.c b/complete.c index 473f04d..9abdede 100644 --- a/complete.c +++ b/complete.c @@ -1,6 +1,6 @@ /* complete.c -- filename completion for readline. */ -/* Copyright (C) 1987-2024 Free Software Foundation, Inc. +/* Copyright (C) 1987-2025 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. @@ -3066,7 +3066,10 @@ _rl_export_completions (char **matches, char *text, int start, int end) fprintf (rl_outstream, "%s\n", text); fprintf (rl_outstream, "%d:%d\n", start, end); /* : because it's not a radix character */ for (i = 0; i < len; i++) - fprintf (rl_outstream, "%s\n", matches[i]); + { + print_filename (matches[i], matches[i], 0); + fprintf (rl_outstream, "\n"); + } fflush (rl_outstream); } diff --git a/config.h.in b/config.h.in index dd0a956..06a7e47 100644 --- a/config.h.in +++ b/config.h.in @@ -158,6 +158,12 @@ /* Define if you have the tcgetattr function. */ #undef HAVE_TCGETATTR +/* Define if you have the tcgetwinsize function. */ +#undef HAVE_TCGETWINSIZE + +/* Define if you have the tcsetwinsize function. */ +#undef HAVE_TCSETWINSIZE + /* Define if you have the towlower function. */ #undef HAVE_TOWLOWER diff --git a/configure b/configure index eb2c1bf..f3e20c5 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac for Readline 8.3, version 2.101. +# From configure.ac for Readline 8.3, version 2.102. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.72 for readline 8.3. # @@ -5266,6 +5266,18 @@ if test "x$ac_cv_func_tcgetattr" = xyes then : printf "%s\n" "#define HAVE_TCGETATTR 1" >>confdefs.h +fi +ac_fn_c_check_func "$LINENO" "tcgetwinsize" "ac_cv_func_tcgetwinsize" +if test "x$ac_cv_func_tcgetwinsize" = xyes +then : + printf "%s\n" "#define HAVE_TCGETWINSIZE 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "tcsetwinsize" "ac_cv_func_tcsetwinsize" +if test "x$ac_cv_func_tcsetwinsize" = xyes +then : + printf "%s\n" "#define HAVE_TCSETWINSIZE 1" >>confdefs.h + fi ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes @@ -6872,13 +6884,6 @@ printf "%s\n" "not found" >&6; } fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_ino" >&5 -printf %s "checking for struct dirent.d_ino... " >&6; } -if test ${bash_cv_dirent_has_d_ino+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_fn_c_check_member "$LINENO" "struct dirent" "d_ino" "ac_cv_member_struct_dirent_d_ino" " #include @@ -6907,31 +6912,11 @@ then : printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h -bash_cv_dirent_has_d_ino=yes -else case e in #( - e) bash_cv_dirent_has_d_ino=no ;; -esac -fi - ;; -esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_ino" >&5 -printf "%s\n" "$bash_cv_dirent_has_d_ino" >&6; } -if test $bash_cv_dirent_has_d_ino = yes; then -printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_fileno" >&5 -printf %s "checking for struct dirent.d_fileno... " >&6; } -if test ${bash_cv_dirent_has_d_fileno+y} -then : - printf %s "(cached) " >&6 -else case e in #( - e) ac_fn_c_check_member "$LINENO" "struct dirent" "d_fileno" "ac_cv_member_struct_dirent_d_fileno" " #include @@ -6960,22 +6945,9 @@ then : printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h -bash_cv_dirent_has_d_fileno=yes -else case e in #( - e) bash_cv_dirent_has_d_fileno=no ;; -esac -fi - ;; -esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dirent_has_d_fileno" >&5 -printf "%s\n" "$bash_cv_dirent_has_d_fileno" >&6; } -if test $bash_cv_dirent_has_d_fileno = yes; then -printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h - -fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5 printf %s "checking for struct timeval in sys/time.h and time.h... " >&6; } diff --git a/configure.ac b/configure.ac index 1783dae..b270ab7 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ dnl Process this file with autoconf to produce a configure script. # You should have received a copy of the GNU General Public License # along with this program. If not, see . -AC_REVISION([for Readline 8.3, version 2.101]) +AC_REVISION([for Readline 8.3, version 2.102]) AC_INIT(readline, 8.3, bug-readline@gnu.org) @@ -151,8 +151,9 @@ AC_HEADER_STAT AC_HEADER_DIRENT AC_CHECK_FUNCS(fcntl gettimeofday kill lstat pselect readlink select setitimer) -AC_CHECK_FUNCS(fnmatch memmove putenv setenv setlocale \ - strcasecmp strpbrk sysconf tcgetattr vsnprintf) +AC_CHECK_FUNCS(fnmatch memmove putenv setenv setlocale strcasecmp \ + strpbrk sysconf tcgetattr tcgetwinsize tcsetwinsize \ + vsnprintf) AC_CHECK_FUNCS(isascii isxdigit) AC_CHECK_FUNCS(getpwent getpwnam getpwuid) diff --git a/display.c b/display.c index f002369..021dc3f 100644 --- a/display.c +++ b/display.c @@ -1,6 +1,6 @@ /* display.c -- readline redisplay facility. */ -/* Copyright (C) 1987-2024 Free Software Foundation, Inc. +/* Copyright (C) 1987-2025 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. @@ -1489,7 +1489,7 @@ rl_redisplay (void) but the buffer position needs to be adjusted to account for invisible characters. */ if ((mb_cur_max == 1 || rl_byte_oriented) && cursor_linenum == prompt_last_screen_line) - _rl_last_c_pos = physpos + WRAP_OFFSET (cursor_linenum, wrap_offset);; + _rl_last_c_pos = physpos + WRAP_OFFSET (cursor_linenum, wrap_offset); } /* Now we move the cursor to where it needs to be. First, make @@ -1502,28 +1502,53 @@ rl_redisplay (void) invisible character in the prompt string. */ /* XXX - why not use local_prompt_len? */ nleft = prompt_visible_length + wrap_offset; - if (cursor_linenum == prompt_last_screen_line && wrap_offset > 0 && - _rl_last_c_pos > 0 && local_prompt && - _rl_last_c_pos < PROMPT_ENDING_INDEX) + if (cursor_linenum == prompt_last_screen_line) { - int pmt_offset; - - _rl_cr (); - if (modmark) - _rl_output_some_chars ("*", 1); - - /* If the number of characters in local_prompt is greater than - the screen width, the prompt wraps. We only want to print the - portion after the line wrap. */ - pmt_offset = local_prompt_newlines[cursor_linenum]; - if (cursor_linenum > 0 && pmt_offset > 0 && nleft > pmt_offset) - _rl_output_some_chars (local_prompt + pmt_offset, nleft - pmt_offset); - else - _rl_output_some_chars (local_prompt, nleft); - if (mb_cur_max > 1 && rl_byte_oriented == 0) - _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft, 1) - wrap_offset + modmark; + int pmt_offset = local_prompt_newlines ? local_prompt_newlines[cursor_linenum] : 0; + int curline_invchars = local_prompt_invis_chars ? local_prompt_invis_chars[cursor_linenum] : wrap_offset; + int cursor_bufpos; + + /* cursor_bufpos is where the portion of the prompt that appears + on the current screen line begins in the buffer. It is a + buffer position, an index into curline + (local_prompt + pmt_offset) */ + cursor_bufpos = pmt_offset; + if (mb_cur_max == 1 || rl_byte_oriented) + cursor_bufpos += _rl_last_c_pos; else - _rl_last_c_pos = nleft + modmark; /* buffer position */ + cursor_bufpos += _rl_last_c_pos + curline_invchars; + + if (local_prompt && local_prompt_invis_chars[cursor_linenum] && + _rl_last_c_pos > 0 && + cursor_bufpos <= prompt_last_invisible) + { + _rl_cr (); + if (modmark) + _rl_output_some_chars ("*", 1); + + /* If the number of characters in local_prompt is greater + than the screen width, the prompt wraps. We only want to + print the portion after the line wrap. */ + + /* Make sure we set _rl_last_c_pos based on the number of + characters we actually output, since we start at column 0. */ + if (cursor_linenum > 0 && pmt_offset > 0 && nleft > pmt_offset) + _rl_output_some_chars (local_prompt + pmt_offset, nleft - pmt_offset); + else + { + _rl_output_some_chars (local_prompt, nleft); + pmt_offset = 0; /* force for calculation below */ + } + + if (mb_cur_max > 1 && rl_byte_oriented == 0) + /* Start width calculation where we started output. */ + _rl_last_c_pos = _rl_col_width (local_prompt, pmt_offset, nleft, 1) - WRAP_OFFSET(cursor_linenum, wrap_offset) + modmark; + else + /* Index into invisible_line+inv_lbreaks[cursor_linenum], + since that's what we use in the call to + _rl_move_cursor_relative below. */ + _rl_last_c_pos = nleft + modmark - inv_lbreaks[cursor_linenum]; /* buffer position */ + } } /* Where on that line? And where does that line start diff --git a/doc/history.0 b/doc/history.0 index e532aba..1b94885 100644 --- a/doc/history.0 +++ b/doc/history.0 @@ -4,7 +4,7 @@ NNAAMMEE history - GNU History Library CCOOPPYYRRIIGGHHTT - The GNU History Library is Copyright (C) 1989-2024 by the Free Software + The GNU History Library is Copyright (C) 1989-2025 by the Free Software Foundation, Inc. DDEESSCCRRIIPPTTIIOONN @@ -532,4 +532,4 @@ BBUUGG RREEPPOORRTTSS Comments and bug reports concerning this manual page should be directed to _c_h_e_t_._r_a_m_e_y_@_c_a_s_e_._e_d_u. -GNU History 8.3 2024 November 29 _H_I_S_T_O_R_Y(3) +GNU History 8.3 2024 December 31 _H_I_S_T_O_R_Y(3) diff --git a/doc/history.3 b/doc/history.3 index 514d6f8..53be120 100644 --- a/doc/history.3 +++ b/doc/history.3 @@ -6,9 +6,9 @@ .\" Case Western Reserve University .\" chet.ramey@case.edu .\" -.\" Last Change: Fri Nov 29 18:17:58 EST 2024 +.\" Last Change: Tue Dec 31 13:35:52 EST 2024 .\" -.TH HISTORY 3 "2024 November 29" "GNU History 8.3" +.TH HISTORY 3 "2024 December 31" "GNU History 8.3" .\" .ie \n(.g \{\ .ds ' \(aq @@ -79,8 +79,8 @@ .SH NAME history \- GNU History Library .SH COPYRIGHT -.if t The GNU History Library is Copyright \(co 1989-2024 by the Free Software Foundation, Inc. -.if n The GNU History Library is Copyright (C) 1989-2024 by the Free Software Foundation, Inc. +.if t The GNU History Library is Copyright \(co 1989-2025 by the Free Software Foundation, Inc. +.if n The GNU History Library is Copyright (C) 1989-2025 by the Free Software Foundation, Inc. .SH DESCRIPTION Many programs read input from the user a line at a time. The GNU @@ -495,7 +495,8 @@ The history list will contain only \fImax\fP entries at a time. .F1 int unstifle_history "void" Stop stifling the history. This returns the previously-set maximum number of history entries (as set by \fBstifle_history()\fP). -history was stifled. The value is positive if the history was +history was stifled. +The value is positive if the history was stifled, negative if it wasn't. .PP .F1 int history_is_stifled "void" diff --git a/doc/history.dvi b/doc/history.dvi index 24cfd07..1cdf806 100644 Binary files a/doc/history.dvi and b/doc/history.dvi differ diff --git a/doc/history.html b/doc/history.html index e633f7e..62803d8 100644 --- a/doc/history.html +++ b/doc/history.html @@ -4,11 +4,11 @@