diff --git a/curspriv.h b/curspriv.h index d67f81a4..b49da067 100644 --- a/curspriv.h +++ b/curspriv.h @@ -15,7 +15,7 @@ * See the file maintain.er for details of the current maintainer. * ************************************************************************/ -/* $Id: curspriv.h,v 1.100 2006/07/23 13:45:52 wmcbrine Exp $ */ +/* $Id: curspriv.h,v 1.101 2006/07/23 19:10:32 wmcbrine Exp $ */ /* CURSPRIV.H @@ -86,8 +86,6 @@ void PDC_beep(void); bool PDC_check_bios_key(void); int PDC_copy_win(const WINDOW *, WINDOW *, int, int, int, int, int, int, bool); -int PDC_cursor_off(void); -int PDC_cursor_on(void); int PDC_curs_set(int); void PDC_flushinp(void); int PDC_get_bios_key(void); @@ -112,7 +110,6 @@ int PDC_resize_screen(int, int); int PDC_scr_close(void); int PDC_scr_open(int, char **); int PDC_set_ctrl_break(bool); -int PDC_set_cursor_mode(int, int); int PDC_set_font(int); void PDC_sync(WINDOW *); int PDC_sysgetch(void); diff --git a/doc/intro.man b/doc/intro.man index 9b81e91e..fede9403 100644 --- a/doc/intro.man +++ b/doc/intro.man @@ -528,8 +528,6 @@ FUNCTIONS PDC_check_bios_key pdckbd PDC_chins pdcdisp PDC_copy_win pdcwin - PDC_cursor_off pdcdisp - PDC_cursor_on pdcdisp PDC_debug pdcdebug PDC_flushinp pdckbd PDC_getch getch @@ -554,7 +552,6 @@ FUNCTIONS PDC_scr_close pdcscrn PDC_scr_open pdcscrn PDC_set_ctrl_break pdckbd - PDC_set_cursor_mode pdcsetsc PDC_set_font pdcsetsc PDC_set_scrn_mode pdcsetsc PDC_set_title pdcsetsc diff --git a/dos/pdcdisp.c b/dos/pdcdisp.c index 14f847cb..3126b0e5 100644 --- a/dos/pdcdisp.c +++ b/dos/pdcdisp.c @@ -19,7 +19,7 @@ #include -RCSID("$Id: pdcdisp.c,v 1.37 2006/07/18 23:11:53 wmcbrine Exp $"); +RCSID("$Id: pdcdisp.c,v 1.38 2006/07/23 19:10:32 wmcbrine Exp $"); extern unsigned char atrtab[MAX_ATRTAB]; @@ -37,86 +37,6 @@ void movedata(unsigned sseg, unsigned soff, unsigned dseg, } #endif -/*man-start************************************************************** - - PDC_cursor_on() - Turns on the hardware cursor. - - PDCurses Description: - Turns on the hardware cursor; does nothing if it is already on. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - Portability: - PDCurses int PDC_cursor_on(void); - -**man-end****************************************************************/ - -int PDC_cursor_on(void) -{ - PDC_LOG(("PDC_cursor_on() - called\n")); - - if (!SP->visible_cursor) - { - SP->visible_cursor = TRUE; -/* PDC_fix_cursor(SP->orig_emulation);*/ - - if (SP->bogus_adapter) - PDC_set_cursor_mode((SP->cursor & 0xff00) >> 8, - (SP->cursor & 0x00ff)); - else - { - switch (SP->adapter) { - case _MDA: - case _CGA: - case _EGACOLOR: - case _EGAMONO: - case _VGACOLOR: - case _VGAMONO: - case _MDS_GENIUS: - case _MCGACOLOR: - case _MCGAMONO: - PDC_set_cursor_mode((SP->cursor & 0xff00) >> 8, - (SP->cursor & 0x00ff)); - } - } - } - - return OK; -} - -/*man-start************************************************************** - - PDC_cursor_off() - Turns off the hardware cursor. - - PDCurses Description: - Turns off the hardware curses, it does nothing if it is already - off. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - PDCurses Errors: - ERR will be returned if the hardware cursor can not be disabled. - - Portability: - PDCurses int PDC_cursor_off(void); - -**man-end****************************************************************/ - -int PDC_cursor_off(void) -{ - PDC_LOG(("PDC_cursor_off() - called\n")); - - if (SP->visible_cursor) - { - SP->visible_cursor = FALSE; - PDC_set_cursor_mode(32, 33); /* turn it off */ - } - - return OK; -} - /*man-start************************************************************** PDC_fix_cursor() - Fix the cursor start and stop scan lines diff --git a/dos/pdcsetsc.c b/dos/pdcsetsc.c index d7bc8961..eadbe972 100644 --- a/dos/pdcsetsc.c +++ b/dos/pdcsetsc.c @@ -17,7 +17,7 @@ #include "pdcdos.h" -RCSID("$Id: pdcsetsc.c,v 1.20 2006/07/23 13:45:52 wmcbrine Exp $"); +RCSID("$Id: pdcsetsc.c,v 1.21 2006/07/23 19:10:32 wmcbrine Exp $"); /*man-start************************************************************** @@ -62,35 +62,6 @@ int PDC_set_80x25(void) return OK; } -/*man-start************************************************************** - - PDC_set_cursor_mode() - Set the cursor start and stop scan lines. - - PDCurses Description: - Sets 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. - - Portability: - PDCurses int PDC_set_cursor_mode(int startrow, int endrow); - -**man-end****************************************************************/ - -int PDC_set_cursor_mode(int startrow, int endrow) -{ - PDC_LOG(("PDC_set_cursor_mode() - called: startrow %d endrow %d\n", - startrow, endrow)); - - regs.h.ah = 0x01; - regs.h.ch = (unsigned char) startrow; - regs.h.cl = (unsigned char) endrow; - int86(0x10, ®s, ®s); - - return OK; -} - /*man-start************************************************************** PDC_set_font() - sets the current font size @@ -179,10 +150,7 @@ int PDC_set_font(int size) } } - if (SP->visible_cursor) - PDC_cursor_on(); - else - PDC_cursor_off(); + curs_set(SP->visibility); SP->font = PDC_get_font(); diff --git a/os2/pdcdisp.c b/os2/pdcdisp.c index 86eccaa0..dc95ce55 100644 --- a/os2/pdcdisp.c +++ b/os2/pdcdisp.c @@ -19,70 +19,10 @@ #include #include -RCSID("$Id: pdcdisp.c,v 1.28 2006/07/17 21:45:15 wmcbrine Exp $"); +RCSID("$Id: pdcdisp.c,v 1.29 2006/07/23 19:10:32 wmcbrine Exp $"); extern unsigned char atrtab[MAX_ATRTAB]; -/*man-start************************************************************** - - PDC_cursor_on() - Turns on the hardware cursor. - - PDCurses Description: - Turns on the hardware cursor; does nothing if it is already on. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - Portability: - PDCurses int PDC_cursor_on(void); - -**man-end****************************************************************/ - -int PDC_cursor_on(void) -{ - PDC_LOG(("PDC_cursor_on() - called\n")); - - if (!SP->visible_cursor) - { - SP->visible_cursor = TRUE; - PDC_set_cursor_mode((SP->cursor & 0xff00) >> 8, - (SP->cursor & 0x00ff)); - } - - return OK; -} - -/*man-start************************************************************** - - PDC_cursor_off() - Turns off the hardware cursor. - - PDCurses Description: - Turns off the hardware cursor; does nothing if it is already off. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - PDCurses Errors: - ERR will be returned if the hardware cursor can not be disabled. - - Portability: - PDCurses int PDC_cursor_off(void); - -**man-end****************************************************************/ - -int PDC_cursor_off(void) -{ - PDC_LOG(("PDC_cursor_off() - called\n")); - - if (SP->visible_cursor) - { - SP->visible_cursor = FALSE; - PDC_set_cursor_mode(32, 33); /* turn it off */ - } - - return OK; -} - /*man-start************************************************************** PDC_gotoyx() - position hardware cursor at (y, x) diff --git a/os2/pdcsetsc.c b/os2/pdcsetsc.c index 498685c7..65564b91 100644 --- a/os2/pdcsetsc.c +++ b/os2/pdcsetsc.c @@ -19,48 +19,7 @@ #include #include -RCSID("$Id: pdcsetsc.c,v 1.22 2006/07/23 13:45:52 wmcbrine Exp $"); - -/*man-start************************************************************** - - PDC_set_cursor_mode() - Set the cursor start and stop scan lines. - - PDCurses Description: - Sets 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. - - Portability: - PDCurses int PDC_set_cursor_mode(int startrow, int endrow); - -**man-end****************************************************************/ - -int PDC_set_cursor_mode(int startrow, int endrow) -{ -#ifndef EMXVIDEO - VIOCURSORINFO cursorInfo = {0}; -#endif - PDC_LOG(("PDC_set_cursor_mode() - called: startrow %d endrow %d\n", - startrow, endrow)); - -#ifdef EMXVIDEO - if (endrow <= startrow) - v_hidecursor(); - else - v_ctype(startrow, endrow); - - return OK; -#else - cursorInfo.yStart = startrow; - cursorInfo.cEnd = endrow; - cursorInfo.cx = 1; - cursorInfo.attr = 0; - - return (VioSetCurType(&cursorInfo, 0) == 0); -#endif -} +RCSID("$Id: pdcsetsc.c,v 1.23 2006/07/23 19:10:32 wmcbrine Exp $"); /*man-start************************************************************** @@ -106,10 +65,7 @@ int PDC_set_font(int size) VioSetMode(&modeInfo, 0); } - if (SP->visible_cursor) - PDC_cursor_on(); - else - PDC_cursor_off(); + curs_set(SP->visibility); SP->font = PDC_get_font(); #endif diff --git a/win32/curses.def b/win32/curses.def index 6a6569ce..129a67d1 100644 --- a/win32/curses.def +++ b/win32/curses.def @@ -272,8 +272,6 @@ EXPORTS PDC_chadd EXPORTS PDC_check_bios_key EXPORTS PDC_chins EXPORTS PDC_copy_win -EXPORTS PDC_cursor_off -EXPORTS PDC_cursor_on EXPORTS PDC_debug EXPORTS PDC_getch EXPORTS PDC_getclipboard diff --git a/win32/curses_lcc.def b/win32/curses_lcc.def index 7a8a9922..999098b9 100644 --- a/win32/curses_lcc.def +++ b/win32/curses_lcc.def @@ -265,8 +265,6 @@ PDC_chadd PDC_check_bios_key PDC_chins PDC_copy_win -PDC_cursor_off -PDC_cursor_on PDC_debug PDC_getch PDC_getclipboard diff --git a/win32/pdcdisp.c b/win32/pdcdisp.c index ceb771f2..cebe5ee2 100644 --- a/win32/pdcdisp.c +++ b/win32/pdcdisp.c @@ -24,74 +24,7 @@ extern HANDLE hConOut; extern unsigned char atrtab[MAX_ATRTAB]; -RCSID("$Id: pdcdisp.c,v 1.27 2006/07/17 21:45:16 wmcbrine Exp $"); - -/*man-start************************************************************** - - PDC_cursor_on() - Turns on the hardware cursor. - - PDCurses Description: - Turns on the hardware cursor; does nothing if it is already on. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - Portability: - PDCurses int PDC_cursor_on(void); - -**man-end****************************************************************/ - -int PDC_cursor_on(void) -{ - CONSOLE_CURSOR_INFO cci; - - PDC_LOG(("PDC_cursor_on() - called\n")); - - if (!SP->visible_cursor) - { - SP->visible_cursor = TRUE; - GetConsoleCursorInfo(hConOut, &cci); - cci.bVisible = TRUE; - SetConsoleCursorInfo(hConOut, &cci); - } - - return OK; -} - -/*man-start************************************************************** - - PDC_cursor_off() - Turns off the hardware cursor. - - PDCurses Description: - Turns off the hardware cursor; does nothing if it is already off. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - PDCurses Errors: - ERR will be returned if the hardware cursor can not be disabled. - - Portability: - PDCurses int PDC_cursor_off(void); - -**man-end****************************************************************/ - -int PDC_cursor_off(void) -{ - CONSOLE_CURSOR_INFO cci; - - PDC_LOG(("PDC_cursor_off() - called\n")); - - if (SP->visible_cursor) - { - SP->visible_cursor = FALSE; - GetConsoleCursorInfo(hConOut, &cci); - cci.bVisible = FALSE; - SetConsoleCursorInfo(hConOut, &cci); - } - - return OK; -} +RCSID("$Id: pdcdisp.c,v 1.28 2006/07/23 19:10:32 wmcbrine Exp $"); /*man-start************************************************************** diff --git a/x11/pdcdisp.c b/x11/pdcdisp.c index d8118442..91f40989 100644 --- a/x11/pdcdisp.c +++ b/x11/pdcdisp.c @@ -19,7 +19,7 @@ #include -RCSID("$Id: pdcdisp.c,v 1.29 2006/07/21 04:07:05 wmcbrine Exp $"); +RCSID("$Id: pdcdisp.c,v 1.30 2006/07/23 19:10:32 wmcbrine Exp $"); int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol, int visibility) @@ -62,53 +62,6 @@ int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol, return OK; } -/*man-start************************************************************** - - PDC_cursor_on() - Turns on the hardware cursor. - - PDCurses Description: - Turns on the hardware curses, it does nothing if it is already on. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - Portability: - PDCurses int PDC_cursor_on(void); - -**man-end****************************************************************/ - -int PDC_cursor_on(void) -{ - PDC_LOG(("PDC_cursor_on() - called\n")); - - return OK; -} - -/*man-start************************************************************** - - PDC_cursor_off() - Turns off the hardware cursor. - - PDCurses Description: - Turns off the hardware curses, it does nothing if it is already off. - - PDCurses Return Value: - Returns OK upon success, ERR upon failure. - - PDCurses Errors: - ERR will be returned if the hardware cursor can not be disabled. - - Portability: - PDCurses int PDC_cursor_off(void); - -**man-end****************************************************************/ - -int PDC_cursor_off(void) -{ - PDC_LOG(("PDC_cursor_off() - called\n")); - - return OK; -} - /*man-start************************************************************** PDC_gotoyx() - position hardware cursor at (y, x)