From 1241bfa21fa29fa1d11033eb988fd20d602945db Mon Sep 17 00:00:00 2001 From: William McBrine Date: Wed, 18 Oct 2006 23:09:16 +0000 Subject: [PATCH] Common initialization for orgcbr and orig_cursor. --- dos/pdcscrn.c | 5 +---- os2/pdcscrn.c | 4 +--- pdcurses/initscr.c | 5 ++++- win32/pdcscrn.c | 6 +----- x11/pdcgetsc.c | 7 ++++++- x11/pdcscrn.c | 4 +--- 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/dos/pdcscrn.c b/dos/pdcscrn.c index cbaad9f3..506a79d1 100644 --- a/dos/pdcscrn.c +++ b/dos/pdcscrn.c @@ -20,7 +20,7 @@ # include #endif -RCSID("$Id: pdcscrn.c,v 1.64 2006/10/18 22:35:11 wmcbrine Exp $"); +RCSID("$Id: pdcscrn.c,v 1.65 2006/10/18 23:09:16 wmcbrine Exp $"); int pdc_adapter; /* screen type */ int pdc_scrnmode; /* default screen mode */ @@ -562,9 +562,6 @@ int PDC_scr_open(int argc, char **argv) SP->lines = PDC_get_rows(); SP->cols = PDC_get_columns(); - SP->orig_cursor = PDC_get_cursor_mode(); - SP->orgcbr = PDC_get_ctrl_break(); - /* If the environment variable PDCURSES_BIOS is set, the DOS int10() BIOS calls are used in place of direct video memory access. */ diff --git a/os2/pdcscrn.c b/os2/pdcscrn.c index 9714fb2a..1385376d 100644 --- a/os2/pdcscrn.c +++ b/os2/pdcscrn.c @@ -13,7 +13,7 @@ #include "pdcos2.h" -RCSID("$Id: pdcscrn.c,v 1.56 2006/10/15 02:42:25 wmcbrine Exp $"); +RCSID("$Id: pdcscrn.c,v 1.57 2006/10/18 23:09:16 wmcbrine Exp $"); int pdc_font; /* default font size */ @@ -180,8 +180,6 @@ int PDC_scr_open(int argc, char **argv) #endif SP->lines = PDC_get_rows(); SP->cols = PDC_get_columns(); - SP->orig_cursor = PDC_get_cursor_mode(); - SP->orgcbr = PDC_get_ctrl_break(); /* This code for preserving the current screen */ diff --git a/pdcurses/initscr.c b/pdcurses/initscr.c index 055a2571..e64cbd6c 100644 --- a/pdcurses/initscr.c +++ b/pdcurses/initscr.c @@ -14,7 +14,7 @@ #include #include -RCSID("$Id: initscr.c,v 1.79 2006/10/15 02:42:25 wmcbrine Exp $"); +RCSID("$Id: initscr.c,v 1.80 2006/10/18 23:09:16 wmcbrine Exp $"); const char *_curses_notice = "PDCurses 3.0 - Public Domain 2006"; @@ -158,6 +158,9 @@ WINDOW *Xinitscr(int argc, char *argv[]) SP->linesrippedoffontop = 0; SP->delaytenths = 0; + SP->orgcbr = PDC_get_ctrl_break(); + SP->orig_cursor = PDC_get_cursor_mode(); + LINES = SP->lines; COLS = SP->cols; diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c index 29d23a21..b017fe32 100644 --- a/win32/pdcscrn.c +++ b/win32/pdcscrn.c @@ -13,7 +13,7 @@ #include "pdcwin.h" -RCSID("$Id: pdcscrn.c,v 1.67 2006/10/15 02:42:26 wmcbrine Exp $"); +RCSID("$Id: pdcscrn.c,v 1.68 2006/10/18 23:09:16 wmcbrine Exp $"); #define PDC_RESTORE_NONE 0 #define PDC_RESTORE_BUFFER 1 @@ -452,10 +452,6 @@ int PDC_scr_open(int argc, char **argv) SP->mono = FALSE; - SP->orig_cursor = PDC_get_cursor_mode(); - - SP->orgcbr = PDC_get_ctrl_break(); - if (is_nt) { console_info.Hwnd = _find_console_handle(); diff --git a/x11/pdcgetsc.c b/x11/pdcgetsc.c index 60ca5760..36c1faf0 100644 --- a/x11/pdcgetsc.c +++ b/x11/pdcgetsc.c @@ -13,7 +13,7 @@ #include "pdcx11.h" -RCSID("$Id: pdcgetsc.c,v 1.19 2006/10/15 02:42:26 wmcbrine Exp $"); +RCSID("$Id: pdcgetsc.c,v 1.20 2006/10/18 23:09:16 wmcbrine Exp $"); /*man-start************************************************************** @@ -43,6 +43,11 @@ int PDC_get_columns(void) return XCursesCOLS; } +int PDC_get_cursor_mode(void) +{ + return 0; +} + /*man-start************************************************************** PDC_get_rows() - Return number of screen rows. diff --git a/x11/pdcscrn.c b/x11/pdcscrn.c index 3b2c7b51..fc680c91 100644 --- a/x11/pdcscrn.c +++ b/x11/pdcscrn.c @@ -13,7 +13,7 @@ #include "pdcx11.h" -RCSID("$Id: pdcscrn.c,v 1.44 2006/10/15 02:42:26 wmcbrine Exp $"); +RCSID("$Id: pdcscrn.c,v 1.45 2006/10/18 23:09:16 wmcbrine Exp $"); /*man-start************************************************************** @@ -70,9 +70,7 @@ int PDC_scr_open(int argc, char **argv) return ERR; SP->cursrow = SP->curscol = 0; - SP->orig_cursor = 0; SP->orig_attr = FALSE; - SP->orgcbr = 0; SP->sb_on = sb_started; SP->sb_total_y = 0; SP->sb_viewport_y = 0;