[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6350] TIOCSWINSZ ioctl in pseudotty
From: |
Gavin D. Smith |
Subject: |
[6350] TIOCSWINSZ ioctl in pseudotty |
Date: |
Sat, 20 Jun 2015 15:28:40 +0000 |
Revision: 6350
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6350
Author: gavin
Date: 2015-06-20 15:28:39 +0000 (Sat, 20 Jun 2015)
Log Message:
-----------
TIOCSWINSZ ioctl in pseudotty
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/pseudotty.c
trunk/info/t/c-u-m-x-scroll-forward.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-06-20 14:15:09 UTC (rev 6349)
+++ trunk/ChangeLog 2015-06-20 15:28:39 UTC (rev 6350)
@@ -1,3 +1,8 @@
+2015-06-20 Gavin Smith <address@hidden>
+
+ * info/pseudotty.c: Attempt to register display size as 0 by 0.
+ * info/t/c-u-m-x-scroll-forward.sh: Comment changed.
+
2015-06-20 Eli Zaretskii <address@hidden>
* info/pcterm.c (kill): Move prototype from here...
Modified: trunk/info/pseudotty.c
===================================================================
--- trunk/info/pseudotty.c 2015-06-20 14:15:09 UTC (rev 6349)
+++ trunk/info/pseudotty.c 2015-06-20 15:28:39 UTC (rev 6350)
@@ -37,6 +37,8 @@
#include <stropts.h>
#endif
+#include "termdep.h"
+
/* Used by "error" function. */
const char *program_name = "pseudotty";
@@ -84,6 +86,19 @@
*/
#endif
+#if defined (TIOCSWINSZ)
+ {
+ struct winsize ws;
+ ws.ws_col = ws.ws_row = 0;
+
+ error (0, 0, "attempting to set window size");
+ if (ioctl (master, TIOCSWINSZ, &ws) == 0)
+ error (0, 0, "...succeeded");
+ else
+ error (0, 0, "...failed");
+ }
+#endif
+
printf ("%s\n", name);
if (fclose (stdout) != 0)
error (1, 0, "error closing stdout: aborting");
Modified: trunk/info/t/c-u-m-x-scroll-forward.sh
===================================================================
--- trunk/info/t/c-u-m-x-scroll-forward.sh 2015-06-20 14:15:09 UTC (rev
6349)
+++ trunk/info/t/c-u-m-x-scroll-forward.sh 2015-06-20 15:28:39 UTC (rev
6350)
@@ -21,8 +21,10 @@
# Set screen geometry so that scrolling down by screens goes to
# predictable places. 5 lines of the node should be visible at once, 1
# status line and 1 line for the echo area.
-# This relies on the TIOCGWINSZ ioctl failing for the pseudotty (see
-# terminal_get_screen_size in terminal.c).
+# This relies on the TIOCGWINSZ ioctl either failing for the pseudotty,
+# or returning non-positive values.
+# (See terminal_get_screen_size in terminal.c, and the use of
+# TIOCSWINSZ in pseudotty.c.)
LINES=7; export LINES
COLUMNS=80; export COLUMNS
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6350] TIOCSWINSZ ioctl in pseudotty,
Gavin D. Smith <=