From 00688c8f294fa63eaecaa51a5523100662607eb5 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 15 Sep 2019 11:14:18 -0400 Subject: [PATCH] COLS / LINES handling in DOS and OS/2 doesn't seem useful. --- dos/pdcgetsc.c | 17 ----------------- os2/pdcgetsc.c | 13 ------------- sdl1/README.md | 6 ++---- sdl2/README.md | 6 ++---- 4 files changed, 4 insertions(+), 38 deletions(-) diff --git a/dos/pdcgetsc.c b/dos/pdcgetsc.c index beafd416..cef9bd09 100644 --- a/dos/pdcgetsc.c +++ b/dos/pdcgetsc.c @@ -10,22 +10,13 @@ int PDC_get_columns(void) { PDCREGS regs; int cols; - const char *env_cols; PDC_LOG(("PDC_get_columns() - called\n")); - /* use the value from COLS environment variable, if set. MH 10-Jun-92 */ - /* and use the minimum of COLS and return from int10h MH 18-Jun-92 */ - regs.h.ah = 0x0f; PDCINT(0x10, regs); cols = (int)regs.h.ah; - env_cols = getenv("COLS"); - - if (env_cols) - cols = min(atoi(env_cols), cols); - PDC_LOG(("PDC_get_columns() - returned: cols %d\n", cols)); return cols; @@ -44,19 +35,11 @@ int PDC_get_cursor_mode(void) int PDC_get_rows(void) { - const char *env_rows; int rows; PDC_LOG(("PDC_get_rows() - called\n")); - /* use the value from LINES environment variable, if set. MH 10-Jun-92 */ - /* and use the minimum of LINES and *ROWS. MH 18-Jun-92 */ - rows = getdosmembyte(0x484) + 1; - env_rows = getenv("LINES"); - - if (env_rows) - rows = min(atoi(env_rows), rows); if (rows == 1 && pdc_adapter == _MDS_GENIUS) rows = 66; diff --git a/os2/pdcgetsc.c b/os2/pdcgetsc.c index 1885b00f..2a5e8f62 100644 --- a/os2/pdcgetsc.c +++ b/os2/pdcgetsc.c @@ -8,7 +8,6 @@ int PDC_get_columns(void) { VIOMODEINFO modeInfo = {0}; int cols = 0; - const char *env_cols; PDC_LOG(("PDC_get_columns() - called\n")); @@ -16,10 +15,6 @@ int PDC_get_columns(void) VioGetMode(&modeInfo, 0); cols = modeInfo.col; - env_cols = getenv("COLS"); - if (env_cols) - cols = min(atoi(env_cols), cols); - PDC_LOG(("PDC_get_columns() - returned: cols %d\n", cols)); return cols; @@ -44,21 +39,13 @@ int PDC_get_rows(void) { VIOMODEINFO modeInfo = {0}; int rows = 0; - const char *env_rows; PDC_LOG(("PDC_get_rows() - called\n")); - /* use the value from LINES environment variable, if set. MH 10-Jun-92 */ - /* and use the minimum of LINES and *ROWS. MH 18-Jun-92 */ - modeInfo.cb = sizeof(modeInfo); VioGetMode(&modeInfo, 0); rows = modeInfo.row; - env_rows = getenv("LINES"); - if (env_rows) - rows = min(atoi(env_rows), rows); - PDC_LOG(("PDC_get_rows() - returned: rows %d\n", rows)); return rows; diff --git a/sdl1/README.md b/sdl1/README.md index 7b27a0ef..c46bd65e 100644 --- a/sdl1/README.md +++ b/sdl1/README.md @@ -106,10 +106,8 @@ Screen size The default screen size is 80x25 characters (whatever size they may be), but you can override this via the environment variables PDC_COLS and/or -PDC_LINES. (Some other ports use COLS and LINES; this is not done here -because those values are, or should be, those of the controlling -terminal, and PDCurses for SDL is independent of the terminal.) If -pdc_screen is preinitialized (see below), these are ignored. +PDC_LINES. If pdc_screen is preinitialized (see below), these are +ignored. Integration with SDL diff --git a/sdl2/README.md b/sdl2/README.md index 2b9730a3..aefe4e2d 100644 --- a/sdl2/README.md +++ b/sdl2/README.md @@ -118,10 +118,8 @@ Screen size The default screen size is 80x25 characters (whatever size they may be), but you can override this via the environment variables PDC_COLS and/or -PDC_LINES. (Some other ports use COLS and LINES; this is not done here -because those values are, or should be, those of the controlling -terminal, and PDCurses for SDL is independent of the terminal.) If -pdc_screen is preinitialized (see below), these are ignored. +PDC_LINES. If pdc_screen is preinitialized (see below), these are +ignored. Integration with SDL