diff options
author | Amadeusz Sławiński <amade@asmblr.net> | 2015-11-20 15:24:25 +0100 |
---|---|---|
committer | Amadeusz Sławiński <amade@asmblr.net> | 2017-02-01 15:54:21 +0100 |
commit | a8c0d68f669eb17a2bf9d8d97f834f5cabb1dad5 (patch) | |
tree | f58d612ead6c4ec444631cf2af20070497df50aa | |
parent | d6c724ad5348c529b87df6fd9be817e1f495451e (diff) | |
download | screen-a8c0d68f669eb17a2bf9d8d97f834f5cabb1dad5.tar.gz |
Z0width & Z1width are only assigned once, make them const
It's modified cherry-pick of f4e6265c8be5e74590b7bf24fe5250e70283ccb0
from master branch.
Fix: 50197
-rw-r--r-- | src/ansi.c | 4 | ||||
-rw-r--r-- | src/display.c | 2 | ||||
-rw-r--r-- | src/process.c | 2 | ||||
-rw-r--r-- | src/resize.c | 2 | ||||
-rw-r--r-- | src/termcap.c | 3 |
5 files changed, 6 insertions, 7 deletions
@@ -56,7 +56,9 @@ extern int compacthist; extern struct acluser *EffectiveAclUser; #endif -int Z0width, Z1width; /* widths for Z0/Z1 switching */ +/* widths for Z0/Z1 switching */ +const int Z0width = 132; +const int Z1width = 80; /* globals set in WriteString */ static struct win *curr; /* window we are working on */ diff --git a/src/display.c b/src/display.c index db8cb19..f4bcf89 100644 --- a/src/display.c +++ b/src/display.c @@ -73,7 +73,7 @@ extern struct LayFuncs WinLf; extern int use_hardstatus; extern int MsgWait, MsgMinWait; -extern int Z0width, Z1width; +extern const int Z0width, Z1width; extern unsigned char *blank, *null; extern struct mline mline_blank, mline_null, mline_old; extern struct mchar mchar_null, mchar_blank, mchar_so; diff --git a/src/process.c b/src/process.c index c58f64d..8477321 100644 --- a/src/process.c +++ b/src/process.c @@ -185,7 +185,7 @@ extern char screenterm[], HostName[], version[]; extern struct NewWindow nwin_undef, nwin_default; extern struct LayFuncs WinLf, MarkLf; -extern int Z0width, Z1width; +extern const int Z0width, Z1width; extern int real_uid, real_gid; #ifdef NETHACK diff --git a/src/resize.c b/src/resize.c index 7dfd77c..9786164 100644 --- a/src/resize.c +++ b/src/resize.c @@ -58,7 +58,7 @@ extern struct display *display, *displays; extern unsigned char *blank, *null; extern struct mline mline_blank, mline_null, mline_old; extern struct win *windows; -extern int Z0width, Z1width; +extern const int Z0width, Z1width; extern int captionalways; #if defined(TIOCGWINSZ) || defined(TIOCSWINSZ) diff --git a/src/termcap.c b/src/termcap.c index ae89d17..f8f67a4 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -36,7 +36,6 @@ extern int real_uid, real_gid, eff_uid, eff_gid; extern struct term term[]; /* terminal capabilities */ extern struct NewWindow nwin_undef, nwin_default, nwin_options; extern int force_vt; -extern int Z0width, Z1width; extern int hardstatusemu; #ifdef MAPKEYS extern struct action umtab[]; @@ -410,8 +409,6 @@ int he; /* Termcap fields Z0 & Z1 contain width-changing sequences. */ if (D_CZ1 == 0) D_CZ0 = 0; - Z0width = 132; - Z1width = 80; CheckScreenSize(0); |