diff --git a/dos/pdcgetsc.c b/dos/pdcgetsc.c index 0827eb97..7db42d99 100644 --- a/dos/pdcgetsc.c +++ b/dos/pdcgetsc.c @@ -19,7 +19,7 @@ #include -RCSID("$Id: pdcgetsc.c,v 1.24 2006/07/15 15:38:24 wmcbrine Exp $"); +RCSID("$Id: pdcgetsc.c,v 1.25 2006/07/23 23:42:23 wmcbrine Exp $"); /*man-start************************************************************** @@ -143,11 +143,7 @@ int PDC_get_columns(void) PDC_get_cursor_mode() - Get the cursor start and stop scan lines. PDCurses Description: - Gets the cursor type to begin in scan line startrow and end in - scan line endrow. Both values should be 0-31. - - PDCurses Return Value: - This function returns OK on success and ERR on error. + Gets the cursor size. Portability: PDCurses int PDC_get_cursor_mode(void); diff --git a/dos/pdcsetsc.c b/dos/pdcsetsc.c index eadbe972..7c13451f 100644 --- a/dos/pdcsetsc.c +++ b/dos/pdcsetsc.c @@ -17,7 +17,7 @@ #include "pdcdos.h" -RCSID("$Id: pdcsetsc.c,v 1.21 2006/07/23 19:10:32 wmcbrine Exp $"); +RCSID("$Id: pdcsetsc.c,v 1.22 2006/07/23 23:42:23 wmcbrine Exp $"); /*man-start************************************************************** @@ -194,7 +194,7 @@ int PDC_set_scrn_mode(int new_mode) int PDC_curs_set(int visibility) { - int ret_vis, start = 6, end = 7; + int ret_vis, start, end = 7; PDC_LOG(("PDC_curs_set() - called: visibility=%d\n", visibility)); @@ -208,20 +208,11 @@ int PDC_curs_set(int visibility) end = 0; /* was 32 */ break; case 2: /* highly visible */ -#if 0 - start = 2; /* almost full-height block */ - end = SP->font-1; -#else start = 0; /* full-height block */ -#endif break; default: /* normal visibility */ - /* start = 6, end = 7 */ -#if 0 - start = SP->font - 2; - end = SP->font-1; -#endif - break; + start = (SP->orig_cursor >> 8) & 0xff; + end = SP->orig_cursor & 0xff; } /* if scrnmode is not set, some BIOSes hang */ diff --git a/os2/pdcgetsc.c b/os2/pdcgetsc.c index 3acbbf07..11c8a330 100644 --- a/os2/pdcgetsc.c +++ b/os2/pdcgetsc.c @@ -19,7 +19,7 @@ #include #include -RCSID("$Id: pdcgetsc.c,v 1.23 2006/07/15 15:38:24 wmcbrine Exp $"); +RCSID("$Id: pdcgetsc.c,v 1.24 2006/07/23 23:42:23 wmcbrine Exp $"); /*man-start************************************************************** @@ -154,12 +154,7 @@ int PDC_get_columns(void) PDC_get_cursor_mode() - Get the cursor start and stop scan lines. PDCurses Description: - Gets the cursor type to begin in scan line startrow and end in - scan line endrow. Both values should be in the range 0 through - 31. - - PDCurses Return Value: - This function returns OK on success and ERR on error. + Gets the cursor size. Portability: PDCurses int PDC_get_cursor_mode(void); @@ -181,8 +176,6 @@ int PDC_get_cursor_mode(void) #else VioGetCurType (&cursorInfo, 0); - /* I am not sure about this JGB */ - return (cursorInfo.yStart << 8) | cursorInfo.cEnd; #endif } diff --git a/os2/pdcsetsc.c b/os2/pdcsetsc.c index 65564b91..22bfd63d 100644 --- a/os2/pdcsetsc.c +++ b/os2/pdcsetsc.c @@ -19,7 +19,7 @@ #include #include -RCSID("$Id: pdcsetsc.c,v 1.23 2006/07/23 19:10:32 wmcbrine Exp $"); +RCSID("$Id: pdcsetsc.c,v 1.24 2006/07/23 23:42:23 wmcbrine Exp $"); /*man-start************************************************************** @@ -144,8 +144,8 @@ int PDC_curs_set(int visibility) break; default: /* normal visibility */ - start = SP->font - (SP->font / 4); - end = SP->font - 1; + start = (SP->orig_cursor >> 8) & 0xff; + end = SP->orig_cursor & 0xff; } #ifdef EMXVIDEO diff --git a/win32/pdcgetsc.c b/win32/pdcgetsc.c index 2a8ef8c8..15d4f7c8 100644 --- a/win32/pdcgetsc.c +++ b/win32/pdcgetsc.c @@ -19,7 +19,7 @@ #define INCLUDE_WINDOWS_H #include -RCSID("$Id: pdcgetsc.c,v 1.19 2006/07/15 15:38:24 wmcbrine Exp $"); +RCSID("$Id: pdcgetsc.c,v 1.20 2006/07/23 23:42:23 wmcbrine Exp $"); extern HANDLE hConOut, hConIn; extern CONSOLE_SCREEN_BUFFER_INFO scr; @@ -92,12 +92,7 @@ int PDC_get_attribute(void) PDC_get_cursor_mode() - Get the cursor start and stop scan lines. PDCurses Description: - Gets the cursor type to begin in scan line startrow and end in - scan line endrow. Both values should be in the range 0 through - 31. - - PDCurses Return Value: - This function returns OK on success and ERR on error. + Gets the cursor size. Portability: PDCurses int PDC_get_cursor_mode(void); @@ -112,9 +107,7 @@ int PDC_get_cursor_mode(void) GetConsoleCursorInfo(hConOut, &ci); - /* size is between 1 and 100, so convert it */ - - return ci.dwSize * 32 / 100 - 1; + return ci.dwSize; } /*man-start************************************************************** diff --git a/win32/pdcsetsc.c b/win32/pdcsetsc.c index 7f074a39..b2cd7dd4 100644 --- a/win32/pdcsetsc.c +++ b/win32/pdcsetsc.c @@ -19,7 +19,7 @@ #define INCLUDE_WINDOWS_H #include -RCSID("$Id: pdcsetsc.c,v 1.22 2006/07/23 16:51:14 wmcbrine Exp $"); +RCSID("$Id: pdcsetsc.c,v 1.23 2006/07/23 23:42:23 wmcbrine Exp $"); extern HANDLE hConOut; @@ -77,7 +77,7 @@ int PDC_curs_set(int visibility) break; default: /* normal visibility */ cci.bVisible = TRUE; - cci.dwSize = 25; + cci.dwSize = SP->orig_cursor; break; }