diff options
| author | Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com> | 2017-06-06 19:42:34 -0400 |
|---|---|---|
| committer | Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com> | 2017-06-06 19:42:34 -0400 |
| commit | 57bc003fcfcd699dc11e7190d88173cc235994d9 (patch) | |
| tree | 5f83e0f3cbec66c33a41bfbe7fd5393a48ba373b /sedt.c | |
| parent | 8c15427214095ab11697a7505e168ada0e33cdbf (diff) | |
| download | sedt-57bc003fcfcd699dc11e7190d88173cc235994d9.tar.gz sedt-57bc003fcfcd699dc11e7190d88173cc235994d9.zip | |
SEDT should now resize when the terminal does when compiled with curses on Linux
Diffstat (limited to 'sedt.c')
| -rw-r--r-- | sedt.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -161,6 +161,25 @@ void Fast Write_Rem() } } +#if defined(LINUX) +#ifndef KEY_RESIZE +int Do_Size; +void Handle_Resize(int val) +{ +#if defined(TERMCAP) + Phys_Length=Max_Length=Scr_Length = tgetnum ("li");/* get number of lines/columes from termcap */ + Phys_Width=Max_Width=Scr_Width = tgetnum ("co"); +#else + Phys_Length=Max_Length=Scr_Length=stdscr->_maxy; + Phys_Width=Max_Width=Scr_Width=stdscr->_maxx; +#endif + Do_Size=1; + Hdr_Changes=1; + Update_Flag=1; +} +#endif +#endif + void Fast Sedt_Init() {char S[80]; Cur_Buffer=0; @@ -185,6 +204,13 @@ void Fast Sedt_Init() B_Init(&Del); Set_Terminal(); Setup_Term(); + +#if defined(LINUX) +#ifndef KEY_RESIZE + signal(SIGWINCH, Handle_Resize); +#endif +#endif + Opt_Init(); #if !((defined(ATARI) & defined(GEM)) | ((defined(DOS) | defined(NT)) & (defined(Windows) | defined(TV)))) Newwindow(); |
