if (line_size > minsize)
minsize = line_size;
}
- realloc_line (minsize);
+ realloc_line (minsize);
if (vis_lbreaks == 0)
{
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) ();
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)
/* 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;
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
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