Removed PDC_doupate(), and the undocumented check for the environment

variable "PDC_FULL_DISPLAY". Performance testing showed no difference.
It probably _did_ make a difference, back in the refrbrk = TRUE days, by
bypassing the delay after each line.
This commit is contained in:
William McBrine
2006-03-27 14:07:21 +00:00
parent 61b5c857a4
commit 00ba481498
3 changed files with 3 additions and 108 deletions

View File

@@ -15,7 +15,7 @@
* See the file maintain.er for details of the current maintainer. *
************************************************************************/
/* $Id: curspriv.h,v 1.51 2006/03/27 04:26:18 wmcbrine Exp $ */
/* $Id: curspriv.h,v 1.52 2006/03/27 14:07:20 wmcbrine Exp $ */
/* CURSPRIV.H
@@ -270,10 +270,6 @@ int PDC_get_scrn_mode(void);
int PDC_query_adapter_type(void);
#endif
#ifdef WIN32
void PDC_doupdate(void);
#endif
#ifdef XCURSES
int XCurses_display_cursor(int, int, int, int, int);
int XCurses_rawgetch(int);

View File

@@ -40,7 +40,7 @@
#ifdef PDCDEBUG
const char *rcsid_refresh =
"$Id: refresh.c,v 1.25 2006/03/26 02:23:23 wmcbrine Exp $";
"$Id: refresh.c,v 1.26 2006/03/27 14:07:21 wmcbrine Exp $";
#endif
/*man-start**************************************************************
@@ -207,12 +207,6 @@ int doupdate(void)
if (curscr->_clear)
PDC_clr_update();
else
{
#ifdef WIN32
if (getenv("PDC_FULL_DISPLAY") != NULL)
PDC_doupdate();
else
#endif
for (i = 0; i < SP->lines; i++)
{
PDC_LOG(("doupdate() - Transforming line %d of %d: %s\n",
@@ -223,7 +217,6 @@ int doupdate(void)
PDC_transform_line(i)) /* if test new */
break;
}
}
#ifdef XCURSES
XCursesInstructAndWait(CURSES_REFRESH);

View File

@@ -26,7 +26,7 @@ extern unsigned char atrtab[MAX_ATRTAB];
#ifdef PDCDEBUG
const char *rcsid_PDCdisp =
"$Id: pdcdisp.c,v 1.18 2006/03/25 03:17:35 wmcbrine Exp $";
"$Id: pdcdisp.c,v 1.19 2006/03/27 14:07:21 wmcbrine Exp $";
#endif
/*man-start**************************************************************
@@ -356,97 +356,3 @@ bool PDC_transform_line(int lineno)
return FALSE;
}
/*man-start**************************************************************
PDC_doupdate() - display updated data in one call (Win32 only)
PDCurses Description:
This is a private PDCurses function.
Updates the given physical screen to look like _curscr.
PDCurses Return Value:
This routine returns nothing.
PDCurses Errors:
No errors are defined for this routine.
Portability:
PDCurses void PDC_doupdate(void);
**man-end****************************************************************/
void PDC_doupdate(void)
{
int i, j, k;
int starty = _NO_CHANGE, startx = _NO_CHANGE;
int size;
int endy = _NO_CHANGE, endx = _NO_CHANGE;
chtype *srcp;
CHAR_INFO *ptr;
COORD bufSize, bufPos;
SMALL_RECT sr;
PDC_LOG(("PDC_doupdate() - called:\n"));
if (curscr == (WINDOW *)NULL)
return;
for (i = 0; i < LINES; i++)
if (curscr->_firstch[i] != _NO_CHANGE)
{
if (starty == _NO_CHANGE)
starty = i;
endy = i;
if (startx == _NO_CHANGE
&& curscr->_firstch[i] != _NO_CHANGE)
startx = curscr->_firstch[i];
if (curscr->_firstch[i] < startx)
startx = curscr->_firstch[i];
if (curscr->_lastch[i] > endx)
endx = curscr->_lastch[i];
}
if (starty == _NO_CHANGE) /* nothing to do... */
return;
size = ((endy - starty) + 1) * ((endx - startx) + 1);
ptr = (CHAR_INFO*)malloc(size * sizeof(CHAR_INFO));
if (ptr == NULL)
return;
bufPos.X = bufPos.Y = 0;
bufSize.X = endx - startx + 1;
bufSize.Y = endy - starty + 1;
sr.Top = starty;
sr.Bottom = endy;
sr.Left = startx;
sr.Right = endx;
k = 0;
for (i = starty; i <= endy; i++)
{
srcp = curscr->_y[i];
for (j = startx; j <= endx; j++)
{
ptr[k].Char.AsciiChar = srcp[j] & A_CHARTEXT;
ptr[k].Attributes =
(chtype_attr(srcp[j]) & 0xFF00) >> 8;
k++;
}
curscr->_firstch[i] = _NO_CHANGE;
curscr->_lastch[i] = _NO_CHANGE;
}
WriteConsoleOutput(hConOut, ptr, bufSize, bufPos, &sr);
free(ptr);
}