From 9af1cd47229041fda4dc07f0ef70691a64d49908 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 27 Jun 2012 07:10:29 +0000 Subject: 30530,30533: fix problems with COLUMNS or LINES < 1, and related issues --- ChangeLog | 15 ++++++++++++++- Src/params.c | 2 +- Src/utils.c | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2eb8fdf04..78f294a6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2012-06-26 Barton E. Schaefer + + * 30533: Src/utils.c: when processing a change in the value of + COLUMNS, do not assert the change into the tty driver winsize. + The code for this was dead the whole time IPDEF5 was broken and + this seems a bad time to make it live; besides which it is not + consistent about the handling of LINES (which is ignored when + changed by itself, but would be asserted when COLUMNS changes). + + * 30530: Src/params.c: fix long-broken IPDEF5 definition to use + the GSU struct, thus fixing problems with values of LINES or + COLUMNS less than 1. + 2012-06-21 Peter Stephenson * Danek (plus .distfiles changes): 30520: @@ -16411,5 +16424,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5674 $ +* $Revision: 1.5675 $ ***************************************************** diff --git a/Src/params.c b/Src/params.c index 966e3afcc..8649178ef 100644 --- a/Src/params.c +++ b/Src/params.c @@ -315,7 +315,7 @@ IPDEF4("LINENO", &lineno), IPDEF4("PPID", &ppid), IPDEF4("ZSH_SUBSHELL", &zsh_subshell), -#define IPDEF5(A,B,F) {{NULL,A,PM_INTEGER|PM_SPECIAL},BR((void *)B),GSU(varinteger_gsu),10,0,NULL,NULL,NULL,0} +#define IPDEF5(A,B,F) {{NULL,A,PM_INTEGER|PM_SPECIAL},BR((void *)B),GSU(F),10,0,NULL,NULL,NULL,0} IPDEF5("COLUMNS", &zterm_columns, zlevar_gsu), IPDEF5("LINES", &zterm_lines, zlevar_gsu), IPDEF5("OPTIND", &zoptind, varinteger_gsu), diff --git a/Src/utils.c b/Src/utils.c index 9603389cc..d35ca1dfd 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -1686,7 +1686,7 @@ adjustwinsize(int from) (shttyinfo.winsize.ws_row != ttyrows || shttyinfo.winsize.ws_col != ttycols)) { /* shttyinfo.winsize is already set up correctly */ - ioctl(SHTTY, TIOCSWINSZ, (char *)&shttyinfo.winsize); + /* ioctl(SHTTY, TIOCSWINSZ, (char *)&shttyinfo.winsize); */ } #endif /* TIOCGWINSZ */ -- cgit 1.4.1