summaryrefslogtreecommitdiff
path: root/term.c
diff options
context:
space:
mode:
authorJeff Armstrong <jeffrey.armstrong@approximatrix.com>2017-07-05 21:03:06 -0400
committerJeff Armstrong <jeffrey.armstrong@approximatrix.com>2017-07-05 21:03:06 -0400
commit97fd3c0a40abdb973da17dd2dd835095fc232bb0 (patch)
tree1d2d77c4eb28f9c94c9cd620d42cdb3555384eb0 /term.c
parent57bc003fcfcd699dc11e7190d88173cc235994d9 (diff)
downloadsedt-97fd3c0a40abdb973da17dd2dd835095fc232bb0.tar.gz
sedt-97fd3c0a40abdb973da17dd2dd835095fc232bb0.zip
Fixed resize operations and makefile for better portability. Properly implemented Do_Size global variable.HEADmaster
Diffstat (limited to 'term.c')
-rw-r--r--term.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/term.c b/term.c
index 78055d6..42e6661 100644
--- a/term.c
+++ b/term.c
@@ -3247,6 +3247,10 @@ void Fast Conin()
struct _KBDKEYINFO Key_Data;
struct _NOPTRRECT No_Pointer;
#endif
+#if defined(UNIX) & !defined(TERMCAP)
+int mx, my;
+#endif
+
#if defined(DOS) & !(defined(Windows) | defined(TV))
int M1;
#endif
@@ -3303,8 +3307,9 @@ void Fast Conin()
/* May be called if SIGWINCH fired */
if(Do_Size == 1) {
- Phys_Length=Max_Length=Scr_Length=stdscr->_maxy+1;
- Phys_Width=Max_Width=Scr_Width=stdscr->_maxx+1;
+ getmaxyx(stdscr, my, mx);
+ Phys_Length=Max_Length=Scr_Length=my+1;
+ Phys_Width=Max_Width=Scr_Width=mx+1;
endwin();
refresh();
@@ -3683,13 +3688,11 @@ void Fast Setup_Term()
case VT3XX:
case VT4XX:
Out_S("\033=");
-#if defined(UNIX)
{if (Use_Mouse) /* 290a */
Enable_Mouse();
Out_S("\033[1;3'{"); /* Select Button Up and Down Events*/
Gotmouse=1;
}
-#endif
case VT1XX:
case VK100:
{Out_S("\033[?6l");
@@ -3706,6 +3709,8 @@ void Fast Setup_Term()
Scl_Top = 0;
Set_Scroll (1, Scr_Length);
#else
+int mx, my;
+
initscr();
nonl();
cbreak();
@@ -3715,9 +3720,9 @@ void Fast Setup_Term()
/* For nonblocking getch() - unneeded if KEY_RESIZE is a thing */
timeout(0);
#endif
-
- Max_Length=Scr_Length=stdscr->_maxy+1;
- Max_Width=Scr_Width=stdscr->_maxx+1;
+ getmaxyx(stdscr, my, mx);
+ Max_Length=Scr_Length=my+1;
+ Max_Width=Scr_Width=mx+1;
#endif
#endif
#if defined(VMS)