- struct winsize w = { 0,0,0,0 };
+ struct winsize w = { 0, 0, 0, 0 };
/* We use _stderr_ in order to make resize usable
* in shell backticks (those redirect stdout away from tty).
* NB: other versions of resize open "/dev/tty"
* and operate on it - should we do the same?
*/
/* We use _stderr_ in order to make resize usable
* in shell backticks (those redirect stdout away from tty).
* NB: other versions of resize open "/dev/tty"
* and operate on it - should we do the same?
*/
- tcgetattr(STDERR_FILENO, &old_termios); /* fiddle echo */
- new = old_termios;
+ tcgetattr(STDERR_FILENO, old_termios_p); /* fiddle echo */
+ memcpy(&new, old_termios_p, sizeof(new));
*/
fprintf(stderr, ESC"7" ESC"[r" ESC"[999;999H" ESC"[6n");
alarm(3); /* Just in case terminal won't answer */
*/
fprintf(stderr, ESC"7" ESC"[r" ESC"[999;999H" ESC"[6n");
alarm(3); /* Just in case terminal won't answer */
* (gotten via TIOCGWINSZ) and recomputing *pixel values */
ret = ioctl(STDERR_FILENO, TIOCSWINSZ, &w);
* (gotten via TIOCGWINSZ) and recomputing *pixel values */
ret = ioctl(STDERR_FILENO, TIOCSWINSZ, &w);
if (ENABLE_FEATURE_RESIZE_PRINT)
printf("COLUMNS=%d;LINES=%d;export COLUMNS LINES;\n",
if (ENABLE_FEATURE_RESIZE_PRINT)
printf("COLUMNS=%d;LINES=%d;export COLUMNS LINES;\n",