]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
minor updates for 8.3-rc1 releaes
authorChet Ramey <chet.ramey@case.edu>
Fri, 4 Apr 2025 14:53:31 +0000 (10:53 -0400)
committerChet Ramey <chet.ramey@case.edu>
Fri, 4 Apr 2025 14:53:31 +0000 (10:53 -0400)
35 files changed:
aclocal.m4
complete.c
config.h.in
configure
configure.ac
display.c
doc/history.0
doc/history.dvi
doc/history.html
doc/history.info
doc/history.pdf
doc/history_3.pdf
doc/readline.0
doc/readline.3
doc/readline.dvi
doc/readline.html
doc/readline.info
doc/readline.pdf
doc/readline_3.pdf
doc/rluser.texi
doc/rluserman.dvi
doc/rluserman.html
doc/rluserman.info
doc/rluserman.pdf
examples/rl-callbacktest.c
examples/rl-callbacktest3.c
examples/rlptytest.c
gettimeofday.c
histfile.c
input.c
m4/codeset.m4
posixtime.h
rlmbutil.h
rlprivate.h
signals.c

index 7253f2c4228e6ee3439bcdc9815d4f4752c3c5dc..bd598666c88fe465e74b94751f20d0c1acdf4f7a 100644 (file)
@@ -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
index 79026de6f8c389bb577423be2f2ff1a8e0beefcf..9abdedef2ec97e7302c06f1d4331386da48e3b2e 100644 (file)
@@ -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.
index 06a7e47731720e0e083dc4c056123a4a580a97a9..71b051e2c80aa291dc4a8160d09203ba5bfc5e79 100644 (file)
@@ -45,6 +45,8 @@
 
 #undef ssize_t
 
+#undef mode_t
+
 #undef const
 
 #undef volatile
index f3e20c5bc3fb2115334ccdbc1f50275c6a6ecb25..94903e2e7b01ce623a407d26dd3d381be19f41de 100755 (executable)
--- a/configure
+++ b/configure
@@ -4932,6 +4932,18 @@ esac
 fi
 
 
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = xyes
+then :
+
+else case e in #(
+  e)
+printf "%s\n" "#define mode_t int" >>confdefs.h
+ ;;
+esac
+fi
+
+
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
 printf %s "checking whether stat file-mode macros are broken... " >&6; }
 if test ${ac_cv_header_stat_broken+y}
@@ -7468,6 +7480,8 @@ fi
 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
 printf "%s\n" "$am_cv_langinfo_codeset" >&6; }
   if test $am_cv_langinfo_codeset = yes; then
+    printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h
+
 
 printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
 
index b270ab7d3d3228d97f10cdffa18b67fc87ed10f5..e22e57195dbb2b56b47f0e6f115d7a156344925a 100644 (file)
@@ -147,6 +147,8 @@ AC_C_VOLATILE
 AC_TYPE_SIZE_T
 AC_CHECK_TYPE(ssize_t, int)
 
+AC_TYPE_MODE_T
+
 AC_HEADER_STAT
 AC_HEADER_DIRENT
 
index dcc5e806d07210c9e69513a7d4fc211dd0ad8fa7..021dc3fc7aa24136ac3a3b879db779ff722fd27a 100644 (file)
--- 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.
index e532aba099e234c32cafb1759b00588bf2423ba0..1b94885413362011a6a3b04982fcb26866c92062 100644 (file)
@@ -4,7 +4,7 @@ N\bNA\bAM\bME\bE
        history - GNU History Library
 
 C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
-       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.
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
@@ -532,4 +532,4 @@ B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
        Comments and bug reports concerning this manual page should be directed
        to _\bc_\bh_\be_\bt_\b._\br_\ba_\bm_\be_\by_\b@_\bc_\ba_\bs_\be_\b._\be_\bd_\bu.
 
-GNU History 8.3                2024 November 29                     _\bH_\bI_\bS_\bT_\bO_\bR_\bY(3)
+GNU History 8.3                2024 December 31                     _\bH_\bI_\bS_\bT_\bO_\bR_\bY(3)
index 24cfd077ca86abd1291f7cd6cfa6d325b2d7cb8a..1cdf80606693a23e094e2e42fc9b71439ae33324 100644 (file)
Binary files a/doc/history.dvi and b/doc/history.dvi differ
index e633f7e925765d7b2a97b7b1a1854707366779eb..62803d81e89c7cbae8036be1c1ac466617d9ca19 100644 (file)
@@ -4,11 +4,11 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <!-- This document describes the GNU History library
-(version 8.3, 29 November 2024),
+(version 8.3, 30 December 2024),
 a programming tool that provides a consistent user interface for
 recalling lines of previously typed input.
 
-Copyright © 1988-2024 Free Software Foundation, Inc.
+Copyright © 1988-2025 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -288,6 +288,8 @@ It may be omitted if the word designator begins with a &lsquo;<samp class="samp"
 &lsquo;<samp class="samp">*</samp>&rsquo;, &lsquo;<samp class="samp">-</samp>&rsquo;, or &lsquo;<samp class="samp">%</samp>&rsquo;.
 Words are numbered from the beginning of the line,
 with the first word being denoted by 0 (zero).
+That first word is usually the command word, and the arguments begin
+with the second word.
 Words are inserted into the current line separated by single spaces.
 </p>
 <p>For example,
@@ -299,7 +301,7 @@ When you type this, the preceding command is repeated in toto.
 </p>
 </dd>
 <dt><code class="code">!!:$</code></dt>
-<dd><p>designates the last argument of the preceding command.
+<dd><p>designates the last word of the preceding command.
 This may be shortened to <code class="code">!$</code>.
 </p>
 </dd>
index f9752ea169f93dae7c87b554535f564c42766d7b..3663d06b53c9f4ad6a5b91d04c038198274acef4 100644 (file)
@@ -1,11 +1,11 @@
 This is history.info, produced by makeinfo version 7.1 from
 history.texi.
 
-This document describes the GNU History library (version 8.3, 29
-November 2024), a programming tool that provides a consistent user
+This document describes the GNU History library (version 8.3, 30
+December 2024), a programming tool that provides a consistent user
 interface for recalling lines of previously typed input.
 
-   Copyright © 1988-2024 Free Software Foundation, Inc.
+   Copyright © 1988-2025 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -164,8 +164,9 @@ expansion uses the entire 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.
+(zero).  That first word is usually the command word, and the arguments
+begin with the second word.  Words are inserted into the current line
+separated by single spaces.
 
    For example,
 
@@ -174,7 +175,7 @@ spaces.
      preceding command is repeated in toto.
 
 ‘!!:$’
-     designates the last argument of the preceding command.  This may be
+     designates the last word of the preceding command.  This may be
      shortened to ‘!$’.
 
 ‘!fi:2’
@@ -287,7 +288,7 @@ Interactively::.
 * Introduction to History::    What is the GNU History library for?
 * History Storage::            How information is stored.
 * History Functions::          Functions that you can use.
-* History Variables::          Variables that control behaviour.
+* History Variables::          Variables that control behavior.
 * History Programming Example::        Example of using the GNU History Library.
 
 \1f
@@ -1434,23 +1435,23 @@ Node: Using History Interactively\7f1493
 Node: History Interaction\7f2001
 Node: Event Designators\7f4715
 Node: Word Designators\7f6217
-Node: Modifiers\7f8524
-Node: Programming with GNU History\7f10171
-Node: Introduction to History\7f10915
-Node: History Storage\7f12647
-Node: History Functions\7f13827
-Node: Initializing History and State Management\7f14816
-Node: History List Management\7f15619
-Node: Information About the History List\7f18050
-Node: Moving Around the History List\7f19663
-Node: Searching the History List\7f20743
-Node: Managing the History File\7f22689
-Node: History Expansion\7f25159
-Node: History Variables\7f27132
-Node: History Programming Example\7f31247
-Node: GNU Free Documentation License\7f33901
-Node: Concept Index\7f59076
-Node: Function and Variable Index\7f59781
+Node: Modifiers\7f8612
+Node: Programming with GNU History\7f10259
+Node: Introduction to History\7f11002
+Node: History Storage\7f12734
+Node: History Functions\7f13914
+Node: Initializing History and State Management\7f14903
+Node: History List Management\7f15706
+Node: Information About the History List\7f18137
+Node: Moving Around the History List\7f19750
+Node: Searching the History List\7f20830
+Node: Managing the History File\7f22776
+Node: History Expansion\7f25246
+Node: History Variables\7f27219
+Node: History Programming Example\7f31334
+Node: GNU Free Documentation License\7f33988
+Node: Concept Index\7f59163
+Node: Function and Variable Index\7f59868
 \1f
 End Tag Table
 
index 7bcdad68ee9bfadfaf81876f9ba1a1597e4d6f18..c85ebefdfb96562ecb1e0ee02daec4e005ce75e5 100644 (file)
Binary files a/doc/history.pdf and b/doc/history.pdf differ
index 01b360ec099a01cd1577a9903dca82a457912643..a90090820f9a44e25435e559cef011d2b2dbbc9e 100644 (file)
Binary files a/doc/history_3.pdf and b/doc/history_3.pdf differ
index 7e3d945a072f3a1161d1296cdd5bd393a2a74057..703480ed172f938f522a4792304a2f71dfc32579 100644 (file)
@@ -12,7 +12,7 @@ S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
        r\bre\bea\bad\bdl\bli\bin\bne\be (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bp_\br_\bo_\bm_\bp_\bt);
 
 C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
-       Readline is Copyright (C) 1989-2024 Free Software Foundation,  Inc.
+       Readline is Copyright (C) 1989-2025 Free Software Foundation,  Inc.
 
 D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        r\bre\bea\bad\bdl\bli\bin\bne\be  reads a line from the terminal and return it, using p\bpr\bro\bom\bmp\bpt\bt as
@@ -660,8 +660,8 @@ E\bED\bDI\bIT\bTI\bIN\bNG\bG C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
               at the top of the screen.
        c\bcl\ble\bea\bar\br-\b-s\bsc\bcr\bre\bee\ben\bn (\b(C\bC-\b-l\bl)\b)
               Clear the screen, then redraw the current line, leaving the cur-
-              rent line at the top of the screen.  With an  argument,  refresh
-              the current line without clearing the screen.
+              rent line at the top of the screen.  With  a  numeric  argument,
+              refresh the current line without clearing the screen.
        r\bre\bed\bdr\bra\baw\bw-\b-c\bcu\bur\brr\bre\ben\bnt\bt-\b-l\bli\bin\bne\be
               Refresh the current line.
 
@@ -798,7 +798,7 @@ E\bED\bDI\bIT\bTI\bIN\bNG\bG C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
               Negative arguments have no effect.
        t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
               Drag the word before point past the  word  after  point,  moving
-              point  over  that  word  as well.  If point is at the end of the
+              point  past  that  word  as well.  If point is at the end of the
               line, this transposes the last two words on the line.
        u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
               Uppercase the current (or following) word.  With a negative  ar-
@@ -930,7 +930,7 @@ E\bED\bDI\bIT\bTI\bIN\bNG\bG C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
 
               +\bo      the number of matches _\bN;
               +\bo      the word being completed;
-              +\bo      _\bS:_\bE, where S and E are the start and end offsets  of  the
+              +\bo      _\bS:_\bE, where _\bS and _\bE are the start and end offsets  of  the
                      word in the r\bre\bea\bad\bdl\bli\bin\bne\be line buffer; then
               +\bo      each match, one per line
 
@@ -1294,4 +1294,4 @@ B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
 B\bBU\bUG\bGS\bS
        It's too big and too slow.
 
-GNU Readline 8.3               2024 November 29                    _\bR_\bE_\bA_\bD_\bL_\bI_\bN_\bE(3)
+GNU Readline 8.3               2024 December 30                    _\bR_\bE_\bA_\bD_\bL_\bI_\bN_\bE(3)
index 3c1ef4838062772d7f14b5491b3847a438612635..f66e21a318daf1008d99026534e2d4c76af357c6 100644 (file)
@@ -1057,7 +1057,7 @@ leaving the current line at the top of the screen.
 Clear the screen,
 then redraw the current line,
 leaving the current line at the top of the screen.
-With an argument, refresh the current line without clearing the
+With a numeric argument, refresh the current line without clearing the
 screen.
 .TP
 .B redraw\-current\-line
index 9ffd9b4ee55b335ee59f373f875918c2ff1ca4e8..27f73a441ebd1e5314a027ef934c6526503e1c49 100644 (file)
Binary files a/doc/readline.dvi and b/doc/readline.dvi differ
index 4182c89fb67cbbec495b0c3bbcaced8a0dbd2e35..897bc7c22091a3d3a2e80ffabf3f1341c67c9fa4 100644 (file)
@@ -4,11 +4,11 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <!-- This manual describes the GNU Readline Library
-(version 8.3, 29 November 2024), a library which aids in the
+(version 8.3, 30 December 2024), a library which aids in the
 consistency of user interface across discrete programs which provide
 a command line interface.
 
-Copyright © 1988-2024 Free Software Foundation, Inc.
+Copyright © 1988-2025 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -612,9 +612,10 @@ A sample value might be &lsquo;<samp class="samp">\e[01;33m</samp>&rsquo;.
 </p>
 </dd>
 <dt><a id="index-active_002dregion_002dend_002dcolor"></a><span><code class="code">active-region-end-color</code><a class="copiable-link" href="#index-active_002dregion_002dend_002dcolor"> &para;</a></span></dt>
-<dd><p>A string variable that &quot;undoes&quot; the effects of <code class="code">active-region-start-color</code>
-and restores &quot;normal&quot; terminal display appearance after displaying text
-in the active region.
+<dd><p>A string variable that &ldquo;undoes&rdquo;
+the effects of <code class="code">active-region-start-color</code>
+and restores &ldquo;normal&rdquo;
+terminal display appearance after displaying text in the active region.
 This string must not take up any physical character positions on the display,
 so it should consist only of terminal escape sequences.
 It is output to the terminal after displaying the text in the active region.
@@ -1214,7 +1215,7 @@ set of backslash escapes is available:
 <p>When entering the text of a macro, single or double quotes must
 be used to indicate a macro definition.
 Unquoted text is assumed to be a function name.
-Tthe backslash escapes described above are expanded
+The backslash escapes described above are expanded
 in the macro body.
 Backslash will quote any other character in the macro text,
 including &lsquo;<samp class="samp">&quot;</samp>&rsquo; and &lsquo;<samp class="samp">'</samp>&rsquo;.
@@ -1368,7 +1369,7 @@ Previous: <a href="#Conditional-Init-Constructs" accesskey="p" rel="prev">Condit
 binding, variable assignment, and conditional syntax.
 </p>
 <div class="example">
-<pre class="example-preformatted"># This file controls the behaviour of line input editing for
+<pre class="example-preformatted"># This file controls the behavior of line input editing for
 # programs that use the GNU Readline library.  Existing
 # programs include FTP, Bash, and GDB.
 #
@@ -1488,10 +1489,13 @@ Command names without an accompanying key sequence are unbound by default.
 position, and <em class="dfn">mark</em> refers to a cursor position saved by the
 <code class="code">set-mark</code> command.
 The text between the point and mark is referred to as the <em class="dfn">region</em>.
-Readline has the concept of an <em class="emph">active region</em>:
+Readline
+has the concept of an <em class="emph">active region</em>:
 when the region is active,
 Readline redisplay highlights the region using the
-value of the <code class="code">active-region-start-color</code> variable.
+value of the
+<code class="code">active-region-start-color</code>
+variable.
 The <code class="code">enable-active-region</code> variable turns this on and off.
 Several commands set the region to active; those are noted below.
 </p>
@@ -1571,6 +1575,8 @@ leaving the current line at the top of the screen.
 <dd><p>Clear the screen,
 then redraw the current line,
 leaving the current line at the top of the screen.
+If given a numeric argument, this refreshes the current line
+without clearing the screen.
 </p>
 </dd>
 <dt><a id="index-redraw_002dcurrent_002dline-_0028_0029"></a><span><code class="code">redraw-current-line ()</code><a class="copiable-link" href="#index-redraw_002dcurrent_002dline-_0028_0029"> &para;</a></span></dt>
@@ -2031,7 +2037,7 @@ using the following format, writing information on separate lines:
 <li>the number of matches <var class="var">N</var>;
 </li><li>the word being completed;
 </li><li><var class="var">S</var>:<var class="var">E</var>,
-where S and E are the start and end offsets of the word
+where <var class="var">S</var> and <var class="var">E</var> are the start and end offsets of the word
 in the Readline line buffer; then
 </li><li>each match, one per line
 </li></ul>
@@ -2294,7 +2300,7 @@ Next: <a href="#Custom-Functions" accesskey="n" rel="next">Custom Functions</a>,
 
 <p>Many programs provide a command line interface, such as <code class="code">mail</code>,
 <code class="code">ftp</code>, and <code class="code">sh</code>.
-For such programs, the default behaviour of Readline is sufficient.
+For such programs, the default behavior of Readline is sufficient.
 This section describes how to use Readline in
 the simplest way possible, perhaps to replace calls in your code to
 <code class="code">fgets()</code>.
@@ -2382,7 +2388,7 @@ rl_gets ()
 }
 </pre></div>
 
-<p>This function gives the user the default behaviour of <kbd class="key">TAB</kbd>
+<p>This function gives the user the default behavior of <kbd class="key">TAB</kbd>
 completion: filename completion.
 If you do not want Readline to
 complete filenames, you can change the binding of the <kbd class="key">TAB</kbd> key
@@ -3100,7 +3106,7 @@ The caller should free <var class="var">keymap</var>.
 <dl class="first-deftypefn first-deftypefun-alias-first-deftypefn">
 <dt class="deftypefn deftypefun-alias-deftypefn" id="index-rl_005ffree_005fkeymap"><span class="category-def">Function: </span><span><code class="def-type">void</code> <strong class="def-name">rl_free_keymap</strong> <code class="def-code-arguments">(Keymap keymap)</code><a class="copiable-link" href="#index-rl_005ffree_005fkeymap"> &para;</a></span></dt>
 <dd><p>Free all storage associated with <var class="var">keymap</var>.
-This calls <code class="code">rl_discard_keymap</code> to free subordindate
+This calls <code class="code">rl_discard_keymap</code> to free subordinate
 keymaps and macros.
 </p></dd></dl>
 
@@ -3575,7 +3581,7 @@ displaying a new message in the message area with <code class="code">rl_message(
 <dt class="deftypefn deftypefun-alias-deftypefn" id="index-rl_005frestore_005fprompt"><span class="category-def">Function: </span><span><code class="def-type">void</code> <strong class="def-name">rl_restore_prompt</strong> <code class="def-code-arguments">(void)</code><a class="copiable-link" href="#index-rl_005frestore_005fprompt"> &para;</a></span></dt>
 <dd><p>Restore the local Readline prompt display state saved by the most
 recent call to <code class="code">rl_save_prompt</code>.
-if you called <code class="code">rl_save_prompt</code> to save the prompt before a call
+If you called <code class="code">rl_save_prompt</code> to save the prompt before a call
 to <code class="code">rl_message</code>, you should call this function before the
 corresponding call to <code class="code">rl_clear_message</code>.
 </p></dd></dl>
index 3ad1ccb56e4e340fea77353f6d4a906b79d27c8c..33b4b45ea6ee6bb08b0b90e0e640aed166150c06 100644 (file)
@@ -1,10 +1,10 @@
 This is readline.info, produced by makeinfo version 7.1 from rlman.texi.
 
-This manual describes the GNU Readline Library (version 8.3, 29 November
+This manual describes the GNU Readline Library (version 8.3, 30 December
 2024), a library which aids in the consistency of user interface across
 discrete programs which provide a command line interface.
 
-   Copyright © 1988-2024 Free Software Foundation, Inc.
+   Copyright © 1988-2025 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -859,7 +859,7 @@ Key Bindings
 
      When entering the text of a macro, single or double quotes must be
      used to indicate a macro definition.  Unquoted text is assumed to
-     be a function name.  Tthe backslash escapes described above are
+     be a function name.  The backslash escapes described above are
      expanded in the macro body.  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
@@ -966,7 +966,7 @@ File: readline.info,  Node: Sample Init File,  Prev: Conditional Init Constructs
 Here is an example of an INPUTRC file.  This illustrates key binding,
 variable assignment, and conditional syntax.
 
-     # This file controls the behaviour of line input editing for
+     # This file controls the behavior of line input editing for
      # programs that use the GNU Readline library.  Existing
      # programs include FTP, Bash, and GDB.
      #
@@ -1147,7 +1147,8 @@ File: readline.info,  Node: Commands For Moving,  Next: Commands For History,  U
 
 ‘clear-screen (C-l)’
      Clear the screen, then redraw the current line, leaving the current
-     line at the top of the screen.
+     line at the top of the screen.  If given a numeric argument, this
+     refreshes the current line without clearing the screen.
 
 ‘redraw-current-line ()’
      Refresh the current line.  By default, this is unbound.
@@ -1662,7 +1663,7 @@ and subsequent lines with ‘j’, and so forth.
 aiding in the consistency of user interface across discrete programs
 that need to provide a command line interface.
 
-   Copyright (C) 1988-2024 Free Software Foundation, Inc.
+   Copyright (C) 1988-2025 Free Software Foundation, Inc.
 
    Permission is granted to make and distribute verbatim copies of this
 manual provided the copyright notice and this permission notice pare
@@ -1710,7 +1711,7 @@ File: readline.info,  Node: Basic Behavior,  Next: Custom Functions,  Up: Progra
 ==================
 
 Many programs provide a command line interface, such as ‘mail’, ‘ftp’,
-and ‘sh’.  For such programs, the default behaviour of Readline is
+and ‘sh’.  For such programs, the default behavior of Readline is
 sufficient.  This section describes how to use Readline in the simplest
 way possible, perhaps to replace calls in your code to ‘fgets()’.
 
@@ -1781,7 +1782,7 @@ and has the advantage of no static buffer to overflow:
        return (line_read);
      }
 
-   This function gives the user the default behaviour of <TAB>
+   This function gives the user the default behavior of <TAB>
 completion: filename completion.  If you do not want Readline to
 complete filenames, you can change the binding of the <TAB> key with
 ‘rl_bind_key()’.
@@ -2338,7 +2339,7 @@ which keymap to use.
 
  -- Function: void rl_free_keymap (Keymap keymap)
      Free all storage associated with KEYMAP.  This calls
-     ‘rl_discard_keymap’ to free subordindate keymaps and macros.
+     ‘rl_discard_keymap’ to free subordinate keymaps and macros.
 
  -- Function: int rl_empty_keymap (Keymap keymap)
      Return non-zero if there are no keys bound to functions in KEYMAP;
@@ -2687,7 +2688,7 @@ File: readline.info,  Node: Redisplay,  Next: Modifying Text,  Prev: Allowing Un
 
  -- Function: void rl_restore_prompt (void)
      Restore the local Readline prompt display state saved by the most
-     recent call to ‘rl_save_prompt’.  if you called ‘rl_save_prompt’ to
+     recent call to ‘rl_save_prompt’.  If you called ‘rl_save_prompt’ to
      save the prompt before a call to ‘rl_message’, you should call this
      function before the corresponding call to ‘rl_clear_message’.
 
@@ -5092,7 +5093,7 @@ Function and Variable Index
 * re-read-init-file (C-x C-r):           Miscellaneous Commands.
                                                               (line   6)
 * readline:                              Basic Behavior.      (line  11)
-* redraw-current-line ():                Commands For Moving. (line  53)
+* redraw-current-line ():                Commands For Moving. (line  54)
 * reverse-search-history (C-r):          Commands For History.
                                                               (line  28)
 * revert-all-at-newline:                 Readline Init File Syntax.
@@ -5454,48 +5455,48 @@ Node: Readline Arguments\7f10628
 Node: Searching\7f11689
 Node: Readline Init File\7f13902
 Node: Readline Init File Syntax\7f15099
-Node: Conditional Init Constructs\7f41574
-Node: Sample Init File\7f45963
-Node: Bindable Readline Commands\7f49088
-Node: Commands For Moving\7f50472
-Node: Commands For History\7f52543
-Node: Commands For Text\7f57885
-Node: Commands For Killing\7f61730
-Node: Numeric Arguments\7f64186
-Node: Commands For Completion\7f65342
-Node: Keyboard Macros\7f68625
-Node: Miscellaneous Commands\7f69330
-Node: Readline vi Mode\7f73661
-Node: Programming with GNU Readline\7f75558
-Node: Basic Behavior\7f76544
-Node: Custom Functions\7f80607
-Node: Readline Typedefs\7f82129
-Node: Function Writing\7f84015
-Node: Readline Variables\7f85321
-Node: Readline Convenience Functions\7f100275
-Node: Function Naming\7f101351
-Node: Keymaps\7f102682
-Node: Binding Keys\7f105844
-Node: Associating Function Names and Bindings\7f110669
-Node: Allowing Undoing\7f114499
-Node: Redisplay\7f117249
-Node: Modifying Text\7f121551
-Node: Character Input\7f123090
-Node: Terminal Management\7f126247
-Node: Utility Functions\7f128134
-Node: Miscellaneous Functions\7f131244
-Node: Alternate Interface\7f135134
-Node: A Readline Example\7f138029
-Node: Alternate Interface Example\7f139947
-Node: Readline Signal Handling\7f143566
-Node: Custom Completers\7f153116
-Node: How Completing Works\7f153836
-Node: Completion Functions\7f157212
-Node: Completion Variables\7f160879
-Node: A Short Completion Example\7f179197
-Node: GNU Free Documentation License\7f191866
-Node: Concept Index\7f217043
-Node: Function and Variable Index\7f218564
+Node: Conditional Init Constructs\7f41573
+Node: Sample Init File\7f45962
+Node: Bindable Readline Commands\7f49086
+Node: Commands For Moving\7f50470
+Node: Commands For History\7f52637
+Node: Commands For Text\7f57979
+Node: Commands For Killing\7f61824
+Node: Numeric Arguments\7f64280
+Node: Commands For Completion\7f65436
+Node: Keyboard Macros\7f68719
+Node: Miscellaneous Commands\7f69424
+Node: Readline vi Mode\7f73755
+Node: Programming with GNU Readline\7f75652
+Node: Basic Behavior\7f76638
+Node: Custom Functions\7f80699
+Node: Readline Typedefs\7f82221
+Node: Function Writing\7f84107
+Node: Readline Variables\7f85413
+Node: Readline Convenience Functions\7f100367
+Node: Function Naming\7f101443
+Node: Keymaps\7f102774
+Node: Binding Keys\7f105935
+Node: Associating Function Names and Bindings\7f110760
+Node: Allowing Undoing\7f114590
+Node: Redisplay\7f117340
+Node: Modifying Text\7f121642
+Node: Character Input\7f123181
+Node: Terminal Management\7f126338
+Node: Utility Functions\7f128225
+Node: Miscellaneous Functions\7f131335
+Node: Alternate Interface\7f135225
+Node: A Readline Example\7f138120
+Node: Alternate Interface Example\7f140038
+Node: Readline Signal Handling\7f143657
+Node: Custom Completers\7f153207
+Node: How Completing Works\7f153927
+Node: Completion Functions\7f157303
+Node: Completion Variables\7f160970
+Node: A Short Completion Example\7f179288
+Node: GNU Free Documentation License\7f191957
+Node: Concept Index\7f217134
+Node: Function and Variable Index\7f218655
 \1f
 End Tag Table
 
index b214f0f6d1f3ccd84dacc412d7d376543fd5ff80..60f31b571693e5aefa5852903d066d13405271f2 100644 (file)
Binary files a/doc/readline.pdf and b/doc/readline.pdf differ
index 4347206307f0ad9e1a7615e38924716ee87a3a5d..bba85e9aaa2770ddc55d519c766caa57ea47b54b 100644 (file)
Binary files a/doc/readline_3.pdf and b/doc/readline_3.pdf differ
index 27078b5e01324379c6aa042a6fae1bc5872eda02..704b88f2b0b82b123f530e27f0a6e274731c6869 100644 (file)
@@ -1388,6 +1388,8 @@ leaving the current line at the top of the screen.
 Clear the screen,
 then redraw the current line,
 leaving the current line at the top of the screen.
+If given a numeric argument, this refreshes the current line
+without clearing the screen.
 
 @item redraw-current-line ()
 Refresh the current line.  By default, this is unbound.
index e04ac76363d2c91d435fc9bb0c7353ca3e7d51ba..595b69e7663a90c233a52da9f209103920675875 100644 (file)
Binary files a/doc/rluserman.dvi and b/doc/rluserman.dvi differ
index f238c2bcdf5d734668d4f40a86a96bd56076f4fd..b79efb467d131d6b0559eca95f5339a7e58b092d 100644 (file)
@@ -4,11 +4,11 @@
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <!-- This manual describes the end user interface of the GNU Readline Library
-(version 8.3, 29 November 2024), a library which aids in the
+(version 8.3, 30 December 2024), a library which aids in the
 consistency of user interface across discrete programs which provide
 a command line interface.
 
-Copyright © 1988-2024 Free Software Foundation, Inc.
+Copyright © 1988-2025 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.3 or
@@ -568,9 +568,10 @@ A sample value might be &lsquo;<samp class="samp">\e[01;33m</samp>&rsquo;.
 </p>
 </dd>
 <dt><a id="index-active_002dregion_002dend_002dcolor"></a><span><code class="code">active-region-end-color</code><a class="copiable-link" href="#index-active_002dregion_002dend_002dcolor"> &para;</a></span></dt>
-<dd><p>A string variable that &quot;undoes&quot; the effects of <code class="code">active-region-start-color</code>
-and restores &quot;normal&quot; terminal display appearance after displaying text
-in the active region.
+<dd><p>A string variable that &ldquo;undoes&rdquo;
+the effects of <code class="code">active-region-start-color</code>
+and restores &ldquo;normal&rdquo;
+terminal display appearance after displaying text in the active region.
 This string must not take up any physical character positions on the display,
 so it should consist only of terminal escape sequences.
 It is output to the terminal after displaying the text in the active region.
@@ -1170,7 +1171,7 @@ set of backslash escapes is available:
 <p>When entering the text of a macro, single or double quotes must
 be used to indicate a macro definition.
 Unquoted text is assumed to be a function name.
-Tthe backslash escapes described above are expanded
+The backslash escapes described above are expanded
 in the macro body.
 Backslash will quote any other character in the macro text,
 including &lsquo;<samp class="samp">&quot;</samp>&rsquo; and &lsquo;<samp class="samp">'</samp>&rsquo;.
@@ -1324,7 +1325,7 @@ Previous: <a href="#Conditional-Init-Constructs" accesskey="p" rel="prev">Condit
 binding, variable assignment, and conditional syntax.
 </p>
 <div class="example">
-<pre class="example-preformatted"># This file controls the behaviour of line input editing for
+<pre class="example-preformatted"># This file controls the behavior of line input editing for
 # programs that use the GNU Readline library.  Existing
 # programs include FTP, Bash, and GDB.
 #
@@ -1444,10 +1445,13 @@ Command names without an accompanying key sequence are unbound by default.
 position, and <em class="dfn">mark</em> refers to a cursor position saved by the
 <code class="code">set-mark</code> command.
 The text between the point and mark is referred to as the <em class="dfn">region</em>.
-Readline has the concept of an <em class="emph">active region</em>:
+Readline
+has the concept of an <em class="emph">active region</em>:
 when the region is active,
 Readline redisplay highlights the region using the
-value of the <code class="code">active-region-start-color</code> variable.
+value of the
+<code class="code">active-region-start-color</code>
+variable.
 The <code class="code">enable-active-region</code> variable turns this on and off.
 Several commands set the region to active; those are noted below.
 </p>
@@ -1527,6 +1531,8 @@ leaving the current line at the top of the screen.
 <dd><p>Clear the screen,
 then redraw the current line,
 leaving the current line at the top of the screen.
+If given a numeric argument, this refreshes the current line
+without clearing the screen.
 </p>
 </dd>
 <dt><a id="index-redraw_002dcurrent_002dline-_0028_0029"></a><span><code class="code">redraw-current-line ()</code><a class="copiable-link" href="#index-redraw_002dcurrent_002dline-_0028_0029"> &para;</a></span></dt>
@@ -1987,7 +1993,7 @@ using the following format, writing information on separate lines:
 <li>the number of matches <var class="var">N</var>;
 </li><li>the word being completed;
 </li><li><var class="var">S</var>:<var class="var">E</var>,
-where S and E are the start and end offsets of the word
+where <var class="var">S</var> and <var class="var">E</var> are the start and end offsets of the word
 in the Readline line buffer; then
 </li><li>each match, one per line
 </li></ul>
index 5eaaeed1cbf58f011c43cabab19c5747c1985e35..093ecce00d90f34f0d3dde7d8ab48eb12a2112b6 100644 (file)
@@ -2,11 +2,11 @@ This is rluserman.info, produced by makeinfo version 7.1 from
 rluserman.texi.
 
 This manual describes the end user interface of the GNU Readline Library
-(version 8.3, 29 November 2024), a library which aids in the consistency
+(version 8.3, 30 December 2024), a library which aids in the consistency
 of user interface across discrete programs which provide a command line
 interface.
 
-   Copyright © 1988-2024 Free Software Foundation, Inc.
+   Copyright © 1988-2025 Free Software Foundation, Inc.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -857,7 +857,7 @@ Key Bindings
 
      When entering the text of a macro, single or double quotes must be
      used to indicate a macro definition.  Unquoted text is assumed to
-     be a function name.  Tthe backslash escapes described above are
+     be a function name.  The backslash escapes described above are
      expanded in the macro body.  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
@@ -964,7 +964,7 @@ File: rluserman.info,  Node: Sample Init File,  Prev: Conditional Init Construct
 Here is an example of an INPUTRC file.  This illustrates key binding,
 variable assignment, and conditional syntax.
 
-     # This file controls the behaviour of line input editing for
+     # This file controls the behavior of line input editing for
      # programs that use the GNU Readline library.  Existing
      # programs include FTP, Bash, and GDB.
      #
@@ -1145,7 +1145,8 @@ File: rluserman.info,  Node: Commands For Moving,  Next: Commands For History,
 
 ‘clear-screen (C-l)’
      Clear the screen, then redraw the current line, leaving the current
-     line at the top of the screen.
+     line at the top of the screen.  If given a numeric argument, this
+     refreshes the current line without clearing the screen.
 
 ‘redraw-current-line ()’
      Refresh the current line.  By default, this is unbound.
@@ -2152,19 +2153,19 @@ Node: Readline Arguments\7f10475
 Node: Searching\7f11537
 Node: Readline Init File\7f13751
 Node: Readline Init File Syntax\7f14949
-Node: Conditional Init Constructs\7f41425
-Node: Sample Init File\7f45815
-Node: Bindable Readline Commands\7f48941
-Node: Commands For Moving\7f50326
-Node: Commands For History\7f52398
-Node: Commands For Text\7f57741
-Node: Commands For Killing\7f61587
-Node: Numeric Arguments\7f64044
-Node: Commands For Completion\7f65201
-Node: Keyboard Macros\7f68485
-Node: Miscellaneous Commands\7f69191
-Node: Readline vi Mode\7f73523
-Node: GNU Free Documentation License\7f74517
+Node: Conditional Init Constructs\7f41424
+Node: Sample Init File\7f45814
+Node: Bindable Readline Commands\7f48939
+Node: Commands For Moving\7f50324
+Node: Commands For History\7f52492
+Node: Commands For Text\7f57835
+Node: Commands For Killing\7f61681
+Node: Numeric Arguments\7f64138
+Node: Commands For Completion\7f65295
+Node: Keyboard Macros\7f68579
+Node: Miscellaneous Commands\7f69285
+Node: Readline vi Mode\7f73617
+Node: GNU Free Documentation License\7f74611
 \1f
 End Tag Table
 
index 467d6c99a30e853f9697fffaa9418618e646de09..b016e75f970601b94245712f34d395b4e8c0c19e 100644 (file)
Binary files a/doc/rluserman.pdf and b/doc/rluserman.pdf differ
index b6b38e8e5817032667ae1f485789b7ac41ba28cb..4468c325824ddb18c9599a2701149c66258f16ec 100644 (file)
@@ -79,9 +79,11 @@ main (int c, char **v)
   /* Set the default locale values according to environment variables. */
   setlocale (LC_ALL, "");
 
+#if defined (SIGWINCH)
   /* Handle window size changes when readline is not active and reading
      characters. */
   signal (SIGWINCH, sighandler);
+#endif
   
   /* Install the line handler. */
   rl_callback_handler_install (prompt, cb_linehandler);
index 28255cc12b65e7a40b1054ec41af844689f268a6..3534822b1c919b3a90e3d3f0ea211dde622b08a2 100644 (file)
@@ -91,7 +91,9 @@ main (int c, char **v)
 
   /* Handle window size changes when readline is not active and reading
      characters. */
+#ifdef SIGWINCH
   signal (SIGWINCH, sigwinch_handler);
+#endif
   signal (SIGINT, sigint_handler);
 
   rl_getc_function = my_getc;
index 226444120b714ec47e46860402af74517607c72f..0368728c1f84b83d0b0fd38040ba4bc5389a9722 100644 (file)
@@ -337,7 +337,9 @@ main(int c, char **v)
   if (val == -1)
     return -1;
 
+#ifdef SIGWINCH
   signal (SIGWINCH, sigwinch);
+#endif
   signal (SIGINT, sigint);
 
   val = init_readline (slavefd, slavefd);
index 1b78dcb2f47286573e824c579fe7937ca9d5186d..76b16573e4d01e973810f1f8e57839eca01c165b 100644 (file)
-/* gettimeofday.c - gettimeofday replacement using time() */
+/* Provide gettimeofday for systems that don't have it or for which it's broken.
 
-/* Copyright (C) 2020, 2022 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2007, 2009-2025 Free Software Foundation, Inc.
 
-   This file is part of GNU Bash, the Bourne Again SHell.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   Bash 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 3 of the License, or
-   (at your option) any later version.
-
-   Bash is distributed in the hope that it will be useful,
+   This file 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.
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-   You should have received a copy of the GNU General Public License
-   along with Bash.  If not, see <http://www.gnu.org/licenses/>.
-*/
+/* written by Jim Meyering */
+
+/* A version of gettimeofday that just sets tv_sec from time(3) on Unix-like
+   systems that don't have it, or a version for Win32 systems. From gnulib */
 
-#include "config.h"
+#include <config.h>
 
 #if !defined (HAVE_GETTIMEOFDAY)
 
 #include "posixtime.h"
-#if HAVE_STDINT_H
-#include <stdint.h>
+
+#if defined _WIN32 && ! defined __CYGWIN__
+# define WINDOWS_NATIVE
+# include <windows.h>
 #endif
 
-/* A version of gettimeofday that just sets tv_sec from time(3) on Unix-like
-   systems that don't have it, or a version for Win32 systems. */
+#ifdef WINDOWS_NATIVE
+
+# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
+
+/* Avoid warnings from gcc -Wcast-function-type.  */
+#  define GetProcAddress \
+    (void *) GetProcAddress
+
+/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8.  */
+typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime);
+static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL;
+static BOOL initialized = FALSE;
+
+static void
+initialize (void)
+{
+  HMODULE kernel32 = LoadLibrary ("kernel32.dll");
+  if (kernel32 != NULL)
+    {
+      GetSystemTimePreciseAsFileTimeFunc =
+        (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
+    }
+  initialized = TRUE;
+}
+
+# else /* !(_WIN32_WINNT >= _WIN32_WINNT_WIN8) */
+
+#  define GetSystemTimePreciseAsFileTimeFunc GetSystemTimePreciseAsFileTime
+
+# endif /* !(_WIN32_WINNT >= _WIN32_WINNT_WIN8) */
+
+#endif /* WINDOWS_NATIVE */
+
+/* This is a wrapper for gettimeofday.  It is used only on systems
+   that lack this function, or whose implementation of this function
+   causes problems.
+   Work around the bug in some systems whereby gettimeofday clobbers
+   the static buffer that localtime uses for its return value.  The
+   gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
+   this problem.  */
+
 int
 gettimeofday (struct timeval *restrict tv, void *restrict tz)
 {
-#if !defined (_WIN32)
+#undef gettimeofday
+#ifdef WINDOWS_NATIVE
+
+  /* On native Windows, there are two ways to get the current time:
+     GetSystemTimeAsFileTime
+     <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime>
+     or
+     GetSystemTimePreciseAsFileTime
+     <https://docs.microsoft.com/en-us/windows/desktop/api/sysinfoapi/nf-sysinfoapi-getsystemtimepreciseasfiletime>.
+     GetSystemTimeAsFileTime produces values that jump by increments of
+     15.627 milliseconds (!) on average.
+     Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2
+     microseconds.
+     More discussion on this topic:
+     <http://www.windowstimestamp.com/description>.  */
+  FILETIME current_time;
+
+# if !(_WIN32_WINNT >= _WIN32_WINNT_WIN8)
+  if (!initialized)
+    initialize ();
+# endif
+  if (GetSystemTimePreciseAsFileTimeFunc != NULL)
+    GetSystemTimePreciseAsFileTimeFunc (&current_time);
+  else
+    GetSystemTimeAsFileTime (&current_time);
+
+  /* Convert from FILETIME to 'struct timeval'.  */
+  /* FILETIME: <https://docs.microsoft.com/en-us/windows/desktop/api/minwinbase/ns-minwinbase-filetime> */
+  ULONGLONG since_1601 =
+    ((ULONGLONG) current_time.dwHighDateTime << 32)
+    | (ULONGLONG) current_time.dwLowDateTime;
+  /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap
+     years, in total 134774 days.  */
+  ULONGLONG since_1970 =
+    since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000;
+  ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10;
+  *tv = (struct timeval) {
+    .tv_sec  = microseconds_since_1970 / (ULONGLONG) 1000000,
+    .tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000
+  };
+
+  return 0;
+
+#else /* !WINDOWS_NATIVE */
+
   tv->tv_sec = (time_t) time ((time_t *)0);
   tv->tv_usec = 0;
-#else
-  /* EPOCH is the number of 100 nanosecond intervals from
-    January 1, 1601 (UTC) to January 1, 1970.
-    (the correct value has 9 trailing zeros) */
-  static const uint64_t EPOCH = ((uint64_t) 116444736000000000ULL);
-
-  SYSTEMTIME  system_time;
-  FILETIME    file_time;
-  uint64_t    time;
-
-  GetSystemTime(&system_time);
-  SystemTimeToFileTime(&system_time, &file_time);
-  time =  ((uint64_t)file_time.dwLowDateTime);
-  time += ((uint64_t)file_time.dwHighDateTime) << 32;
-
-  tp->tv_sec  = (long) ((time - EPOCH) / 10000000L);
-  tp->tv_usec = (long) (system_time.wMilliseconds * 1000);
-#endif
 
   return 0;
+
+#endif /* !WINDOWS_NATIVE */
 }
-#endif
+
+#endif /* !HAVE_GETTIMEOFDAY */
index 3499d40ce8434581024cae7ba04420af94c9798b..9a259146f002afa871f208366bfef5aeb1d4b305 100644 (file)
@@ -1,6 +1,6 @@
 /* histfile.c - functions to manipulate the history file. */
 
-/* Copyright (C) 1989-2019,2023-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2019,2023-2025 Free Software Foundation, Inc.
 
    This file contains the GNU History Library (History), a set of
    routines for managing the text of previously typed lines.
@@ -298,21 +298,24 @@ read_history_range (const char *filename, int from, int to)
 #endif
       goto error_and_exit;
     }
-
-  file_size = (size_t)finfo.st_size;
-
-  /* check for overflow on very large files */
-  if (file_size != finfo.st_size || file_size + 1 < file_size)
+  else
     {
-      errno = overflow_errno;
-      goto error_and_exit;
-    }
+      /* regular file */
+      file_size = (size_t)finfo.st_size;
 
-  if (file_size == 0)
-    {
-      xfree (input);
-      close (file);
-      return 0;        /* don't waste time if we don't have to */
+      /* check for overflow on very large files */
+      if (file_size != finfo.st_size || file_size + 1 < file_size)
+       {
+         errno = overflow_errno;
+         goto error_and_exit;
+       }
+
+      if (file_size == 0)
+       {
+         xfree (input);
+         close (file);
+         return 0;     /* don't waste time if we don't have to */
+       }
     }
 
 #ifdef HISTORY_USE_MMAP
diff --git a/input.c b/input.c
index c3ac64dcee58d1df777236d5202886148f65d7bd..4eefb274e6bd0153ddcf9c3881b2bd4cd9614c6e 100644 (file)
--- a/input.c
+++ b/input.c
@@ -1,6 +1,6 @@
 /* input.c -- character input functions for readline. */
 
-/* Copyright (C) 1994-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1994-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.      
@@ -554,15 +554,15 @@ reset_alarm ()
   timerclear (&it.it_value);
   setitimer (ITIMER_REAL, &it, NULL);
 }
-#  else
-#  if defined (__MINGW32_MAJOR_VERSION)
+#  else /* !HAVE_SETITIMER */
+#    if defined (__MINGW32_MAJOR_VERSION)
 /* mingw.org's MinGW doesn't have alarm(3).  */
 unsigned int
 alarm (unsigned int seconds)
 {
   return 0;
 }
-#  endif
+#    endif /* __MINGW32_MAJOR_VERSION */
 
 static int
 set_alarm (unsigned int *secs, unsigned int *usecs)
@@ -578,8 +578,8 @@ reset_alarm ()
 {
   alarm (0);
 }
-#  endif
-#endif
+#  endif /* !HAVE_SETITIMER */
+#endif /* RL_TIMEOUT_USE_SIGALRM */
 
 /* Set a timeout which will be used for the next call of `readline
    ()'.  When (0, 0) are specified the timeout is cleared.  */
index eb7326013d3091b72af3d7fb3f73ae38820ef820..9230acaf16e1dc80732058a4ce80716fa74eb17f 100644 (file)
@@ -18,6 +18,7 @@ AC_DEFUN([AM_LANGINFO_CODESET],
        [am_cv_langinfo_codeset=no])
     ])
   if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE([HAVE_NL_LANGINFO], [1])
     AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
       [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
   fi
index a731b006ad89d31ef8628f5e60f4d365ca056fda..692f6ea4a5f089f2d6de0401af8175da78b14196 100644 (file)
@@ -90,4 +90,12 @@ getnow(void)
   } while (0)
 #endif
 
+#ifndef TIMESPEC_TO_TIMEVAL
+#  define TIMESPEC_TO_TIMEVAL(tv, ts) \
+  do { \
+    (tv)->tv_sec = (ts)->tv_sec; \
+    (tv)->tv_usec = (tv)->tv_nsec / 1000; \
+  } while (0)
+#endif
+
 #endif /* _POSIXTIME_H_ */
index 9eefa889c51b6ce2cff399e6950f43df61ba6abe..607a262c9d7c1eec9f8c87746f37b58446fd1011 100644 (file)
@@ -148,26 +148,26 @@ _rl_wcwidth (WCHAR_T wc)
 {
   switch (wc)
     {
-    case ' ': case '!': case '"': case '#': case '%':
-    case '&': case '\'': case '(': case ')': case '*':
-    case '+': case ',': case '-': case '.': case '/':
-    case '0': case '1': case '2': case '3': case '4':
-    case '5': case '6': case '7': case '8': case '9':
-    case ':': case ';': case '<': case '=': case '>':
-    case '?':
-    case 'A': case 'B': case 'C': case 'D': case 'E':
-    case 'F': case 'G': case 'H': case 'I': case 'J':
-    case 'K': case 'L': case 'M': case 'N': case 'O':
-    case 'P': case 'Q': case 'R': case 'S': case 'T':
-    case 'U': case 'V': case 'W': case 'X': case 'Y':
-    case 'Z':
-    case '[': case '\\': case ']': case '^': case '_':
-    case 'a': case 'b': case 'c': case 'd': case 'e':
-    case 'f': case 'g': case 'h': case 'i': case 'j':
-    case 'k': case 'l': case 'm': case 'n': case 'o':
-    case 'p': case 'q': case 'r': case 's': case 't':
-    case 'u': case 'v': case 'w': case 'x': case 'y':
-    case 'z': case '{': case '|': case '}': case '~':
+    case L' ': case L'!': case L'"': case L'#': case L'%':
+    case L'&': case L'\'': case L'(': case L')': case L'*':
+    case L'+': case L',': case L'-': case L'.': case L'/':
+    case L'0': case L'1': case L'2': case L'3': case L'4':
+    case L'5': case L'6': case L'7': case L'8': case L'9':
+    case L':': case L';': case L'<': case L'=': case L'>':
+    case L'?':
+    case L'A': case L'B': case L'C': case L'D': case L'E':
+    case L'F': case L'G': case L'H': case L'I': case L'J':
+    case L'K': case L'L': case L'M': case L'N': case L'O':
+    case L'P': case L'Q': case L'R': case L'S': case L'T':
+    case L'U': case L'V': case L'W': case L'X': case L'Y':
+    case L'Z':
+    case L'[': case L'\\': case L']': case L'^': case L'_':
+    case L'a': case L'b': case L'c': case L'd': case L'e':
+    case L'f': case L'g': case L'h': case L'i': case L'j':
+    case L'k': case L'l': case L'm': case L'n': case L'o':
+    case L'p': case L'q': case L'r': case L's': case L't':
+    case L'u': case L'v': case L'w': case L'x': case L'y':
+    case L'z': case L'{': case L'|': case L'}': case L'~':
       return 1;
     default:
       return wcwidth (wc);
index ac1de28c77e3abec7f0860774b55008ffe745dc6..eb0495f9be5914129233da2988142283eb0bfbda 100644 (file)
@@ -1,7 +1,7 @@
 /* rlprivate.h -- functions and variables global to the readline library,
                  but not intended for use by applications. */
 
-/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
+/* Copyright (C) 1999-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.
index 8c4f3fad20380b23ba75419d5ebff0157692466d..5a070d774614483b5ef0f602929ee76e3eb3d7ef 100644 (file)
--- a/signals.c
+++ b/signals.c
@@ -1,6 +1,6 @@
 /* signals.c -- signal handling support 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.