mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-09 19:50:32 +02:00
use name as GLOBSORT secondary sort key; new GLOBSORT sort specifier: `numeric'; let readonly and export work on local variables at previous scopes for both array and scalar variables
This commit is contained in:
+14
-2
@@ -71,6 +71,19 @@ extern void rl_set_screen_size (int, int);
|
||||
#endif
|
||||
extern void sh_set_lines_and_columns (int, int);
|
||||
|
||||
#ifndef HAVE_TCGETWINSIZE
|
||||
int
|
||||
tcgetwinsize (int fd, struct winsize *wp)
|
||||
{
|
||||
#if defined (TIOCGWINSZ)
|
||||
return (ioctl (fd, TIOCGWINSZ, wp));
|
||||
#else
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
get_new_window_size (int from_sig, int *rp, int *cp)
|
||||
{
|
||||
@@ -79,8 +92,7 @@ get_new_window_size (int from_sig, int *rp, int *cp)
|
||||
int tty;
|
||||
|
||||
tty = input_tty ();
|
||||
if (tty >= 0 && (ioctl (tty, TIOCGWINSZ, &win) == 0) &&
|
||||
win.ws_row > 0 && win.ws_col > 0)
|
||||
if (tty >= 0 && (tcgetwinsize (tty, &win) == 0) && win.ws_row > 0 && win.ws_col > 0)
|
||||
{
|
||||
sh_set_lines_and_columns (win.ws_row, win.ws_col);
|
||||
#if defined (READLINE)
|
||||
|
||||
Reference in New Issue
Block a user