typeahead() just didn't work. Perhaps one day this will be reimplemented

correctly. But more likely not -- it really only makes sense for slow
terminals.
This commit is contained in:
William McBrine
2006-03-25 00:41:27 +00:00
parent 723791050e
commit 677bec6012
11 changed files with 22 additions and 66 deletions

View File

@@ -15,7 +15,7 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
/* $Id: curses.h,v 1.148 2006/03/25 00:30:26 wmcbrine Exp $ */
/* $Id: curses.h,v 1.149 2006/03/25 00:40:59 wmcbrine Exp $ */
/*----------------------------------------------------------------------*
* PDCurses *
@@ -610,7 +610,6 @@ typedef struct
bool echo; /* if terminal echo */
bool raw_inp; /* raw input mode (v. cooked input) */
bool raw_out; /* raw output mode (7 v. 8 bits) */
bool refrbrk; /* if premature refresh brk allowed */
bool orgcbr; /* original MSDOS ^-BREAK setting */
bool visible_cursor; /* TRUE if cursor is visible */
bool audible; /* FALSE if the bell is visual */

View File

@@ -25,7 +25,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCdisp =
"$Id: pdcdisp.c,v 1.22 2006/02/23 01:46:52 wmcbrine Exp $";
"$Id: pdcdisp.c,v 1.23 2006/03/25 00:41:04 wmcbrine Exp $";
#endif
extern unsigned char atrtab[MAX_ATRTAB];
@@ -47,9 +47,8 @@ void movedata(unsigned sseg, unsigned soff, unsigned dseg,
PDC_clr_update() - Updates the screen with a full redraw.
PDCurses Description:
Updates the screen by clearing it and then redraw it in its
entirety. If SP->refrbrk is TRUE, and there is pending
input characters, the update will be prematurely terminated.
Updates the screen by clearing it and then redrawing it in its
entirety.
PDCurses Return Value:
This routine returns ERR if it is unable to accomplish its task.
@@ -148,10 +147,6 @@ int PDC_clr_update(WINDOW *s)
ch++;
}
if (SP->refrbrk && (SP->cbreak || SP->raw_inp)
&& PDC_breakout())
break;
curscr->_firstch[i] = _NO_CHANGE;
curscr->_lastch[i] = _NO_CHANGE;
}
@@ -578,8 +573,5 @@ bool PDC_transform_line(int lineno)
curscr->_firstch[lineno] = _NO_CHANGE;
curscr->_lastch[lineno] = _NO_CHANGE;
if (SP->refrbrk && (SP->cbreak || SP->raw_inp) && PDC_breakout())
return TRUE;
return FALSE;
}

View File

@@ -29,7 +29,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCscrn =
"$Id: pdcscrn.c,v 1.22 2006/02/28 02:04:57 wmcbrine Exp $";
"$Id: pdcscrn.c,v 1.23 2006/03/25 00:41:04 wmcbrine Exp $";
#endif
static unsigned short *saved_screen = NULL;
@@ -169,7 +169,6 @@ int PDC_scr_open(SCREEN *internal, bool echo)
internal->save_key_modifiers = FALSE;
internal->return_key_modifiers = FALSE;
internal->echo = echo;
internal->refrbrk = FALSE; /* no premature end of refresh*/
internal->video_seg = 0xb000; /* Base screen segment addr */
internal->video_ofs = 0x0; /* Base screen segment ofs */
internal->video_page = 0; /* Current Video Page */

View File

@@ -21,7 +21,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCdisp =
"$Id: pdcdisp.c,v 1.18 2006/02/23 01:46:52 wmcbrine Exp $";
"$Id: pdcdisp.c,v 1.19 2006/03/25 00:41:12 wmcbrine Exp $";
#endif
extern unsigned char atrtab[MAX_ATRTAB];
@@ -31,9 +31,8 @@ extern unsigned char atrtab[MAX_ATRTAB];
PDC_clr_update() - Updates the screen with a full redraw.
PDCurses Description:
Updates the screen by clearing it and then redraw it in its
entirety. If SP->refrbrk is TRUE, and there is pending
input characters, the update will be prematurely terminated.
Updates the screen by clearing it and then redrawing it in its
entirety.
PDCurses Return Value:
This routine returns ERR if it is unable to accomplish its task.
@@ -108,10 +107,6 @@ int PDC_clr_update(WINDOW *s)
ch++;
}
if (SP->refrbrk && (SP->cbreak || SP->raw_inp)
&& PDC_breakout())
break;
curscr->_firstch[i] = _NO_CHANGE;
curscr->_lastch[i] = _NO_CHANGE;
}
@@ -466,8 +461,5 @@ bool PDC_transform_line(int lineno)
curscr->_firstch[lineno] = _NO_CHANGE;
curscr->_lastch[lineno] = _NO_CHANGE;
if (SP->refrbrk && (SP->cbreak || SP->raw_inp) && PDC_breakout())
return TRUE;
return FALSE;
}

View File

@@ -22,7 +22,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCscrn =
"$Id: pdcscrn.c,v 1.19 2006/02/28 02:04:57 wmcbrine Exp $";
"$Id: pdcscrn.c,v 1.20 2006/03/25 00:41:12 wmcbrine Exp $";
#endif
#ifdef EMXVIDEO
@@ -165,7 +165,6 @@ int PDC_scr_open(SCREEN *internal, bool echo)
internal->save_key_modifiers = FALSE;
internal->return_key_modifiers = FALSE;
internal->echo = echo;
internal->refrbrk = FALSE; /* no premature end of refresh*/
internal->video_page = 0; /* Current Video Page */
internal->visible_cursor = TRUE; /* Assume that it is visible */
internal->cursor = PDC_get_cursor_mode();

View File

@@ -47,7 +47,7 @@
#ifdef PDCDEBUG
const char *rcsid_inopts =
"$Id: inopts.c,v 1.23 2006/02/23 01:46:52 wmcbrine Exp $";
"$Id: inopts.c,v 1.24 2006/03/25 00:41:22 wmcbrine Exp $";
#endif
/*man-start**************************************************************
@@ -167,8 +167,8 @@ const char *rcsid_inopts =
The meta() function is provided for portability. By default, 8
bits are returned.
intrflush(), notimeout(), noqiflush() and qiflush() are no-ops
in PDCurses.
intrflush(), notimeout(), noqiflush(), qiflush() and typeahead()
are no-ops in PDCurses.
X/Open Return Value:
All functions return OK on success and ERR on error.
@@ -379,8 +379,6 @@ int typeahead(int fildes)
{
PDC_LOG(("typeahead() - called\n"));
SP->refrbrk = (fildes >= 0);
return OK;
}

View File

@@ -40,7 +40,7 @@
#ifdef PDCDEBUG
const char *rcsid_refresh =
"$Id: refresh.c,v 1.22 2006/03/25 00:11:53 wmcbrine Exp $";
"$Id: refresh.c,v 1.23 2006/03/25 00:41:22 wmcbrine Exp $";
#endif
/*man-start**************************************************************
@@ -207,17 +207,12 @@ int doupdate(void)
if (curscr == (WINDOW *)NULL)
return ERR;
/* if checking for typeahead, bail out here if any is found */
if (SP->refrbrk && (SP->cbreak || SP->raw_inp) && PDC_breakout())
return OK;
if (curscr->_clear)
PDC_clr_update(curscr);
else
{
#ifdef WIN32
if (!SP->refrbrk && getenv("PDC_FULL_DISPLAY") != NULL)
if (getenv("PDC_FULL_DISPLAY") != NULL)
PDC_doupdate();
else
#endif

View File

@@ -26,7 +26,7 @@ extern unsigned char atrtab[MAX_ATRTAB];
#ifdef PDCDEBUG
const char *rcsid_PDCdisp =
"$Id: pdcdisp.c,v 1.16 2006/02/23 01:46:52 wmcbrine Exp $";
"$Id: pdcdisp.c,v 1.17 2006/03/25 00:41:25 wmcbrine Exp $";
#endif
static CHAR_INFO ci[512];
@@ -36,9 +36,8 @@ static CHAR_INFO ci[512];
PDC_clr_update() - Updates the screen with a full redraw.
PDCurses Description:
Updates the screen by clearing it and then redraw it in its
entirety. If SP->refrbrk is TRUE, and there is pending
input characters, the update will be prematurely terminated.
Updates the screen by clearing it and then redrawing it in its
entirety.
PDCurses Return Value:
This routine returns ERR if it is unable to accomplish its task.
@@ -93,10 +92,6 @@ int PDC_clr_update(WINDOW *s)
}
WriteConsoleOutput(hConOut, ci, bufSize, bufPos, &sr);
if (SP->refrbrk && (SP->cbreak || SP->raw_inp)
&& PDC_breakout())
break;
}
return OK;
@@ -426,9 +421,6 @@ bool PDC_transform_line(int lineno)
curscr->_firstch[lineno] = _NO_CHANGE;
curscr->_lastch[lineno] = _NO_CHANGE;
if (SP->refrbrk && (SP->cbreak || SP->raw_inp) && PDC_breakout())
return TRUE;
return FALSE;
}

View File

@@ -21,7 +21,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCscrn =
"$Id: pdcscrn.c,v 1.27 2006/02/28 02:04:57 wmcbrine Exp $";
"$Id: pdcscrn.c,v 1.28 2006/03/25 00:41:25 wmcbrine Exp $";
#endif
#define PDC_RESTORE_NONE 0
@@ -310,7 +310,6 @@ int PDC_scr_open(SCREEN *internal, bool echo)
internal->save_key_modifiers = FALSE;
internal->return_key_modifiers = FALSE;
internal->echo = echo;
internal->refrbrk = FALSE; /* no premature end of refresh */
internal->video_seg = 0xb000; /* Base screen segment addr */
internal->video_ofs = 0; /* Base screen segment ofs */
internal->video_page = 0; /* Current Video Page */

View File

@@ -21,7 +21,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCdisp =
"$Id: pdcdisp.c,v 1.17 2006/02/27 07:48:45 wmcbrine Exp $";
"$Id: pdcdisp.c,v 1.18 2006/03/25 00:41:27 wmcbrine Exp $";
#endif
/*man-start**************************************************************
@@ -29,9 +29,8 @@ const char *rcsid_PDCdisp =
PDC_clr_update() - Updates the screen with a full redraw.
PDCurses Description:
Updates the screen by clearing it and then redraw it in its
entirety. If SP->refrbrk is TRUE, and there is pending
input characters, the update will be prematurely terminated.
Updates the screen by clearing it and then redrawing it in its
entirety.
PDCurses Return Value:
This routine returns ERR if it is unable to accomplish its task.
@@ -64,10 +63,6 @@ int PDC_clr_update(WINDOW *s)
XCurses_transform_line(curscr->_y[i], i, 0, COLS);
if (SP->refrbrk && (SP->cbreak || SP->raw_inp)
&& PDC_breakout())
break;
curscr->_firstch[i] = _NO_CHANGE;
curscr->_lastch[i] = _NO_CHANGE;
}
@@ -197,8 +192,5 @@ bool PDC_transform_line(int lineno)
curscr->_firstch[lineno] = _NO_CHANGE;
curscr->_lastch[lineno] = _NO_CHANGE;
if (SP->refrbrk && (SP->cbreak || SP->raw_inp) && PDC_breakout())
return TRUE;
return FALSE;
}

View File

@@ -20,7 +20,7 @@
#ifdef PDCDEBUG
const char *rcsid_PDCscrn =
"$Id: pdcscrn.c,v 1.18 2006/02/28 02:04:57 wmcbrine Exp $";
"$Id: pdcscrn.c,v 1.19 2006/03/25 00:41:27 wmcbrine Exp $";
#endif
bool GLOBAL_sb_on = FALSE;
@@ -115,7 +115,6 @@ int PDC_scr_open(SCREEN *internal, bool echo)
internal->save_key_modifiers = FALSE;
internal->return_key_modifiers = FALSE;
internal->echo = echo;
internal->refrbrk = FALSE; /* no premature end of refresh*/
internal->video_page = 0; /* Current Video Page */
internal->visible_cursor= TRUE; /* Assume that it is visible */
internal->cursor = 0;