]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
readline-20221008 snapshot
authorChet Ramey <chet.ramey@case.edu>
Sat, 8 Oct 2022 18:25:55 +0000 (14:25 -0400)
committerChet Ramey <chet.ramey@case.edu>
Sat, 8 Oct 2022 18:25:55 +0000 (14:25 -0400)
display.c
input.c
nls.c
rlprivate.h

index c1135ec59294a394e8b852b37c2e4d420a3dca87..df9d74925772f1835783a8a438dce98ffaca9e73 100644 (file)
--- a/display.c
+++ b/display.c
@@ -684,7 +684,7 @@ init_line_structures (int minsize)
       if (line_size > minsize)
        minsize = line_size;
     }
-   realloc_line (minsize); 
+  realloc_line (minsize); 
 
   if (vis_lbreaks == 0)
     {
@@ -2681,13 +2681,11 @@ int
 rl_forced_update_display (void)
 {
   register char *temp;
+  register int tlen;
 
   if (visible_line)
-    {
-      temp = visible_line;
-      while (*temp)
-       *temp++ = '\0';
-    }
+    memset (visible_line, 0, line_size);
+
   rl_on_new_line ();
   forced_display++;
   (*rl_redisplay_function) ();
diff --git a/input.c b/input.c
index 6f038d4508a457d8a52f24ab65a51a61cd5af4c7..da4da45525f4ab80615dcb277b07dc3ff97cd661 100644 (file)
--- a/input.c
+++ b/input.c
@@ -151,7 +151,9 @@ int rl_timeout_remaining (unsigned int *, unsigned int *);
 
 int _rl_timeout_init (void);
 int _rl_timeout_sigalrm_handler (void);
+#if defined (RL_TIMEOUT_USE_SELECT)
 int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *);
+#endif
 
 static void _rl_timeout_handle (void);
 #if defined (RL_TIMEOUT_USE_SIGALRM)
@@ -818,7 +820,7 @@ rl_getc (FILE *stream)
       /* We know at this point that _rl_caught_signal == 0 */
 
 #if defined (__MINGW32__)
-      if (isatty (fd)
+      if (isatty (fd))
        return (_getch ());     /* "There is no error return." */
 #endif
       result = 0;
diff --git a/nls.c b/nls.c
index 5c6a13b6e9ce6687b72410cf29c399215aef0003..8c027d6be500d06d90a7549e70127c3ba16093a6 100644 (file)
--- a/nls.c
+++ b/nls.c
@@ -141,6 +141,10 @@ _rl_init_locale (void)
   if (lspec == 0)
     lspec = "";
   ret = setlocale (LC_CTYPE, lspec);   /* ok, since it does not change locale */
+  if (ret == 0 || *ret == 0)
+    ret = setlocale (LC_CTYPE, (char *)NULL);
+  if (ret == 0 || *ret == 0)
+    ret = RL_DEFAULT_LOCALE;
 #else
   ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
 #endif
index d87d07a72ee19c06b24338ac2f7c4ab80eb83870..fc3171aa2d15ccb0e8f60777e0ba3c3d7f110832 100644 (file)
@@ -303,7 +303,7 @@ extern int _rl_pushed_input_available (void);
 
 extern int _rl_timeout_init (void);
 extern int _rl_timeout_handle_sigalrm (void);
-#if defined (_POSIXSELECT_H_)
+#if defined (_POSIXSELECT_H_) && !defined (__MINGW32__)
 /* use as a sentinel for fd_set, struct timeval,  and sigset_t definitions */
 extern int _rl_timeout_select (int, fd_set *, fd_set *, fd_set *, const struct timeval *, const sigset_t *);
 #endif