mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-23 23:35:20 +00:00
Formatting, redundant and dead code.
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
* See the file maintain.er for details of the current maintainer.
|
||||
***************************************************************************
|
||||
*/
|
||||
#define CURSES_LIBRARY 1
|
||||
#define CURSES_LIBRARY 1
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
@@ -30,9 +30,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.11 2006/01/07 02:53:24 wmcbrine Exp $";
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.12 2006/01/22 19:57:10 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
#ifdef PC
|
||||
void movedata(unsigned sseg, unsigned soff, unsigned dseg,
|
||||
unsigned doff, unsigned n)
|
||||
@@ -67,8 +69,6 @@ void movedata(unsigned sseg, unsigned soff, unsigned dseg,
|
||||
|
||||
**man-end**********************************************************************/
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
/***********************************************************************/
|
||||
#ifdef HAVE_PROTO
|
||||
int PDC_clr_update(WINDOW *s)
|
||||
@@ -108,7 +108,7 @@ WINDOW *s;
|
||||
|
||||
for (i = 0; i < LINES; i++) /* update physical screen */
|
||||
{
|
||||
/* copy s to curscr - must be same size */
|
||||
/* copy s to curscr -- must be same size */
|
||||
|
||||
if (s != curscr)
|
||||
memcpy(curscr->_y[i], s->_y[i], COLS * sizeof(chtype));
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* See the file maintain.er for details of the current maintainer.
|
||||
***************************************************************************
|
||||
*/
|
||||
#define CURSES_LIBRARY 1
|
||||
#define CURSES_LIBRARY 1
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
@@ -30,9 +30,11 @@
|
||||
#endif
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.7 2006/01/12 00:20:13 wmcbrine Exp $";
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.8 2006/01/22 19:57:12 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
/*man-start*********************************************************************
|
||||
|
||||
PDC_clr_update() - Updates the screen with a full redraw.
|
||||
@@ -62,8 +64,6 @@ int PDC_clr_update(WINDOW *s)
|
||||
int i, j;
|
||||
unsigned short *ch;
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
/* the next two variables have been changed from chtype to
|
||||
unsigned short as this is the correct datatype for a physical
|
||||
character/attribute */
|
||||
@@ -99,8 +99,8 @@ int PDC_clr_update(WINDOW *s)
|
||||
|
||||
for (j = 0; j < COLS; j++)
|
||||
{
|
||||
chr = (unsigned short)(s->_y[i][j] & A_CHARTEXT);
|
||||
temp_line[j] = chtype_attr(s->_y[i][j]) | chr;
|
||||
chr = (unsigned short)(s->_y[i][j] & A_CHARTEXT);
|
||||
temp_line[j] = chtype_attr(s->_y[i][j]) | chr;
|
||||
}
|
||||
|
||||
if (SP->direct_video)
|
||||
@@ -115,8 +115,7 @@ int PDC_clr_update(WINDOW *s)
|
||||
for (j = 0; j < COLS; j++)
|
||||
{
|
||||
PDC_gotoxy(i, j);
|
||||
PDC_putc((*ch & A_CHARTEXT),
|
||||
(*ch & A_ATTRIBUTES) >> 8);
|
||||
PDC_putc((*ch & 0x00FF), (*ch & 0xFF00) >> 8);
|
||||
ch++;
|
||||
}
|
||||
|
||||
@@ -382,7 +381,6 @@ int PDC_putctty(chtype character, chtype color)
|
||||
int PDC_scroll(int urow, int lcol, int lrow, int rcol, int nlines, chtype attr)
|
||||
/***********************************************************************/
|
||||
{
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
int phys_attr = chtype_attr(attr);
|
||||
|
||||
#ifndef EMXVIDEO
|
||||
@@ -446,8 +444,6 @@ bool PDC_transform_line(int lineno)
|
||||
chtype *srcp;
|
||||
int j, x, endx, len;
|
||||
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
/* this should be enough for the maximum width of a screen. */
|
||||
|
||||
unsigned short temp_line[256];
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
***************************************************************************
|
||||
*/
|
||||
#include <string.h>
|
||||
#define CURSES_LIBRARY 1
|
||||
#define INCLUDE_WINDOWS_H
|
||||
#define CURSES_LIBRARY 1
|
||||
#define INCLUDE_WINDOWS_H
|
||||
#include <curses.h>
|
||||
|
||||
#ifdef HAVE_MEMORY_H
|
||||
@@ -27,9 +27,10 @@
|
||||
#endif
|
||||
|
||||
extern HANDLE hConOut;
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
#ifdef PDCDEBUG
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.6 2006/01/08 11:53:43 wmcbrine Exp $";
|
||||
char *rcsid_PDCdisp = "$Id: pdcdisp.c,v 1.7 2006/01/22 19:57:12 wmcbrine Exp $";
|
||||
#endif
|
||||
|
||||
static CHAR_INFO ci[512];
|
||||
@@ -60,8 +61,6 @@ static CHAR_INFO ci[512];
|
||||
int PDC_clr_update(WINDOW *s)
|
||||
/***********************************************************************/
|
||||
{
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
int i, j;
|
||||
chtype *srcp;
|
||||
COORD bufSize, bufPos;
|
||||
@@ -97,9 +96,6 @@ int PDC_clr_update(WINDOW *s)
|
||||
ci[j].Char.AsciiChar = srcp[j] & A_CHARTEXT;
|
||||
ci[j].Attributes =
|
||||
(chtype_attr(srcp[j]) & 0xFF00) >> 8;
|
||||
#ifdef HIDE_ATTR
|
||||
ci[j].Attributes = COLOR_WHITE;
|
||||
#endif
|
||||
}
|
||||
|
||||
WriteConsoleOutput(hConOut, ci, bufSize, bufPos, &sr);
|
||||
@@ -415,8 +411,6 @@ int PDC_scroll(int urow, int lcol, int lrow, int rcol, int nlines, chtype attr)
|
||||
bool PDC_transform_line(int lineno)
|
||||
/***********************************************************************/
|
||||
{
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
int j, x, endx, len;
|
||||
chtype *srcp;
|
||||
COORD bufSize, bufPos;
|
||||
@@ -446,9 +440,6 @@ bool PDC_transform_line(int lineno)
|
||||
{
|
||||
ci[j].Char.AsciiChar = srcp[j] & A_CHARTEXT;
|
||||
ci[j].Attributes = (chtype_attr(srcp[j]) & 0xFF00) >> 8;
|
||||
#ifdef HIDE_ATTR
|
||||
ci[j].Attributes = COLOR_WHITE;
|
||||
#endif
|
||||
}
|
||||
|
||||
WriteConsoleOutput(hConOut, ci, bufSize, bufPos, &sr);
|
||||
@@ -487,8 +478,6 @@ bool PDC_transform_line(int lineno)
|
||||
void PDC_doupdate(void)
|
||||
/***********************************************************************/
|
||||
{
|
||||
extern unsigned char atrtab[MAX_ATRTAB];
|
||||
|
||||
int i, j, k;
|
||||
int starty = _NO_CHANGE, startx = _NO_CHANGE;
|
||||
int size;
|
||||
@@ -551,9 +540,6 @@ void PDC_doupdate(void)
|
||||
ptr[k].Char.AsciiChar = srcp[j] & A_CHARTEXT;
|
||||
ptr[k].Attributes =
|
||||
(chtype_attr(srcp[j]) & 0xFF00) >> 8;
|
||||
#ifdef HIDE_ATTR
|
||||
ptr[k].Attributes = COLOR_WHITE;
|
||||
#endif
|
||||
k++;
|
||||
}
|
||||
curscr->_firstch[i] = _NO_CHANGE;
|
||||
|
||||
Reference in New Issue
Block a user