mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-23 23:35:20 +00:00
setsyx() -> void, after ncurses; simplified.
This commit is contained in:
2
curses.h
2
curses.h
@@ -1220,7 +1220,7 @@ PDCEX int draino(int);
|
||||
PDCEX int resetterm(void);
|
||||
PDCEX int fixterm(void);
|
||||
PDCEX int saveterm(void);
|
||||
PDCEX int setsyx(int, int);
|
||||
PDCEX void setsyx(int, int);
|
||||
|
||||
PDCEX int mouse_set(unsigned long);
|
||||
PDCEX int mouse_on(unsigned long);
|
||||
|
||||
@@ -15,7 +15,7 @@ getyx
|
||||
void getmaxyx(WINDOW *win, int y, int x);
|
||||
|
||||
void getsyx(int y, int x);
|
||||
int setsyx(int y, int x);
|
||||
void setsyx(int y, int x);
|
||||
|
||||
int getbegy(WINDOW *win);
|
||||
int getbegx(WINDOW *win);
|
||||
@@ -43,7 +43,7 @@ getyx
|
||||
values should only be used with setsyx().
|
||||
|
||||
setsyx() sets the virtual screen cursor to the y, x coordinates.
|
||||
If y, x are -1, -1, leaveok() is set TRUE.
|
||||
If either y or x is -1, leaveok() is set TRUE, else it's set FALSE.
|
||||
|
||||
getsyx() and setsyx() are meant to be used by a library routine
|
||||
that manipulates curses windows without altering the position of
|
||||
@@ -128,23 +128,12 @@ int getmaxx(WINDOW *win)
|
||||
return win ? win->_maxx : ERR;
|
||||
}
|
||||
|
||||
int setsyx(int y, int x)
|
||||
void setsyx(int y, int x)
|
||||
{
|
||||
PDC_LOG(("setsyx() - called\n"));
|
||||
|
||||
if (y == -1 && x == -1)
|
||||
{
|
||||
curscr->_leaveit = TRUE;
|
||||
return OK;
|
||||
}
|
||||
else if (y == -1 || x == -1)
|
||||
{
|
||||
return OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
curscr->_leaveit = FALSE;
|
||||
curscr->_leaveit = y == -1 || x == -1;
|
||||
|
||||
if (!curscr->_leaveit)
|
||||
wmove(curscr, y, x);
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user