COLS / LINES handling in DOS and OS/2 doesn't seem useful.

This commit is contained in:
William McBrine
2019-09-15 11:14:18 -04:00
parent 956c5a445a
commit 00688c8f29
4 changed files with 4 additions and 38 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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

View File

@@ -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