mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 07:45:21 +00:00
PDC_chg_attrs() -- a nice function that's never been used. (And
incorrectly prototyped until 2.8.) Similar functionality is now available in the standard wchgat().
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* See the file maintain.er for details of the current maintainer. *
|
||||
************************************************************************/
|
||||
|
||||
/* $Id: curspriv.h,v 1.92 2006/07/16 19:56:07 wmcbrine Exp $ */
|
||||
/* $Id: curspriv.h,v 1.93 2006/07/17 07:02:30 wmcbrine Exp $ */
|
||||
|
||||
/* CURSPRIV.H
|
||||
|
||||
@@ -87,7 +87,6 @@ void PDC_beep(void);
|
||||
bool PDC_breakout(void);
|
||||
int PDC_chadd(WINDOW *, chtype, bool, bool);
|
||||
bool PDC_check_bios_key(void);
|
||||
int PDC_chg_attrs(WINDOW *, chtype, int, int, int, int);
|
||||
int PDC_chins(WINDOW *, chtype, bool);
|
||||
int PDC_copy_win(const WINDOW *, WINDOW *, int, int, int,
|
||||
int, int, int, bool);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcwin.c,v 1.44 2006/07/15 15:38:24 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcwin.c,v 1.45 2006/07/17 07:02:30 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -473,70 +473,6 @@ int PDC_chadd(WINDOW *win, chtype ch, bool xlat, bool advance)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_chg_attrs() - Change attributes in a rectangle
|
||||
|
||||
PDCurses Description:
|
||||
This routine will change the attribute(s) from a starting (y,x)
|
||||
position to an ending (y,x) position to the specified attribute.
|
||||
|
||||
PDCurses Return Value:
|
||||
This function returns OK on success and ERR on error.
|
||||
|
||||
PDCurses Errors:
|
||||
It is an error to call this function with a NULL window pointer.
|
||||
It is also an error to pass rectangular coordinates that lay
|
||||
outside of window.
|
||||
|
||||
Portability:
|
||||
PDCurses int PDC_chg_attrs(WINDOW *w, chtype attr,
|
||||
int sy, int sx, int ey, int ex);
|
||||
|
||||
**man-end****************************************************************/
|
||||
|
||||
int PDC_chg_attrs(WINDOW *win, chtype attr, int sy, int sx, int ey, int ex)
|
||||
{
|
||||
chtype oldattr = win->_attrs;
|
||||
int c, l;
|
||||
|
||||
PDC_LOG(("PDC_chr_attrs() - called\n"));
|
||||
|
||||
if ((win == (WINDOW *)NULL) || (sy > win->_maxy) || (sx > win->_maxx))
|
||||
return ERR;
|
||||
|
||||
if (ey >= win->_maxy)
|
||||
ey = win->_maxy - 1;
|
||||
if (ex >= win->_maxx)
|
||||
ex = win->_maxx - 1;
|
||||
|
||||
wattrset(win, attr);
|
||||
|
||||
for (l = sy; l <= ey; l++)
|
||||
{
|
||||
for (c = sx; c <= ex; c++)
|
||||
win->_y[l][c] = (win->_y[l][c] & A_CHARTEXT) | attr;
|
||||
|
||||
if (win->_firstch[l] == _NO_CHANGE)
|
||||
{
|
||||
win->_firstch[l] = sx;
|
||||
win->_lastch[l] = ex;
|
||||
}
|
||||
else if (win->_firstch[l] != _NO_CHANGE)
|
||||
{
|
||||
if (sx < win->_firstch[l])
|
||||
win->_firstch[l] = sx;
|
||||
if (ex > win->_lastch[l])
|
||||
win->_lastch[l] = ex;
|
||||
}
|
||||
}
|
||||
|
||||
win->_attrs = oldattr;
|
||||
PDC_sync(win);
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
PDC_chins() - Low-level insert character in window
|
||||
|
||||
@@ -270,7 +270,6 @@ EXPORTS tparm
|
||||
EXPORTS tputs
|
||||
EXPORTS PDC_chadd
|
||||
EXPORTS PDC_check_bios_key
|
||||
EXPORTS PDC_chg_attrs
|
||||
EXPORTS PDC_chins
|
||||
EXPORTS PDC_copy_win
|
||||
EXPORTS PDC_cursor_off
|
||||
|
||||
@@ -263,7 +263,6 @@ tparm
|
||||
tputs
|
||||
PDC_chadd
|
||||
PDC_check_bios_key
|
||||
PDC_chg_attrs
|
||||
PDC_chins
|
||||
PDC_copy_win
|
||||
PDC_cursor_off
|
||||
|
||||
Reference in New Issue
Block a user