[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6370] save LINES and COLUMNS before tgetent
From: |
Gavin D. Smith |
Subject: |
[6370] save LINES and COLUMNS before tgetent |
Date: |
Wed, 01 Jul 2015 20:09:22 +0000 |
Revision: 6370
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6370
Author: gavin
Date: 2015-07-01 20:09:20 +0000 (Wed, 01 Jul 2015)
Log Message:
-----------
save LINES and COLUMNS before tgetent
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/t/c-u-m-x-scroll-forward.sh
trunk/info/terminal.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-07-01 14:25:28 UTC (rev 6369)
+++ trunk/ChangeLog 2015-07-01 20:09:20 UTC (rev 6370)
@@ -1,3 +1,11 @@
+2015-07-01 Gavin Smith <address@hidden>
+
+ * info/terminal.c (terminal_initialize_terminal): Save values of
+ LINES and COLUMNS environmental variables.
+ (terminal_get_screen_size): Use saved values.
+ * info/t/c-u-m-x-scroll-forward.sh: Correct use of
+ synch_with_program function.
+
2015-07-01 Karl Berry <address@hidden>
* doc/texinfo.tex: doc tweaks.
Modified: trunk/info/t/c-u-m-x-scroll-forward.sh
===================================================================
--- trunk/info/t/c-u-m-x-scroll-forward.sh 2015-07-01 14:25:28 UTC (rev
6369)
+++ trunk/info/t/c-u-m-x-scroll-forward.sh 2015-07-01 20:09:20 UTC (rev
6370)
@@ -30,7 +30,7 @@
run_ginfo -f intera -n 'Scroll four lines'
-sync_with_program
+synch_with_program
# C-u M-x scroll-forward should scroll four lines, not four screens
printf '\025\033xscroll-forward\r' >$PTY_TYPE
Modified: trunk/info/terminal.c
===================================================================
--- trunk/info/terminal.c 2015-07-01 14:25:28 UTC (rev 6369)
+++ trunk/info/terminal.c 2015-07-01 20:09:20 UTC (rev 6370)
@@ -535,6 +535,9 @@
}
}
+/* Saved values of the LINES and COLUMNS environmental variables. */
+static char *env_lines, *env_columns;
+
/* Set the global variables SCREENWIDTH and SCREENHEIGHT. */
void
terminal_get_screen_size (void)
@@ -562,8 +565,8 @@
{
char *sw = getenv ("COLUMNS");
- if (sw)
- screenwidth = atoi (sw);
+ if (env_columns)
+ screenwidth = atoi (env_columns);
if (screenwidth <= 0)
screenwidth = tgetnum ("co");
@@ -572,11 +575,9 @@
/* Environment variable LINES overrides setting of "li". */
if (screenheight <= 0)
{
- char *sh = getenv ("LINES");
+ if (env_lines)
+ screenheight = atoi (env_lines);
- if (sh)
- screenheight = atoi (sh);
-
if (screenheight <= 0)
screenheight = tgetnum ("li");
}
@@ -733,6 +734,12 @@
if (!term_name)
term_name = "dumb";
+ env_lines = getenv ("LINES");
+ env_columns = getenv ("COLUMNS");
+ /* We save LINES and COLUMNS before the call to tgetent below, because
+ on some openSUSE systems, including openSUSE 12.3, the call to tgetent
+ changes the values returned by getenv for these. */
+
if (!term_string_buffer)
term_string_buffer = xmalloc (2048);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6370] save LINES and COLUMNS before tgetent,
Gavin D. Smith <=