Reordered functions -- if there's a core function, it goes at the top;

others below arranged by group. Use "%p" instead of "%x" for pointers.
Made man page prototypes match functions.
This commit is contained in:
William McBrine
2006-11-04 12:59:03 +00:00
parent c21dee2e05
commit b83a8af26f
18 changed files with 574 additions and 572 deletions

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: addch.c,v 1.32 2006/11/03 14:52:20 wmcbrine Exp $");
RCSID("$Id: addch.c,v 1.33 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -150,7 +150,7 @@ int PDC_chadd(WINDOW *win, chtype ch, bool advance)
chtype attr, bktmp;
bool xlat;
PDC_LOG(("PDC_chadd() - called: win=%x ch=%x "
PDC_LOG(("PDC_chadd() - called: win=%p ch=%x "
"(char=%c attr=0x%x) advance=%d\n", win, ch,
ch & A_CHARTEXT, ch & A_ATTRIBUTES, advance));
@@ -333,6 +333,13 @@ int PDC_chadd(WINDOW *win, chtype ch, bool advance)
return OK;
}
int waddch(WINDOW *win, const chtype ch)
{
PDC_LOG(("waddch() - called: win=%p ch=%x\n", win, ch));
return PDC_chadd(win, ch, TRUE);
}
int addch(const chtype ch)
{
PDC_LOG(("addch() - called: ch=%x\n", ch));
@@ -340,13 +347,6 @@ int addch(const chtype ch)
return waddch(stdscr, ch);
}
int waddch(WINDOW *win, const chtype ch)
{
PDC_LOG(("waddch() - called: win=%x ch=%x\n", win, ch));
return PDC_chadd(win, ch, TRUE);
}
int mvaddch(int y, int x, const chtype ch)
{
PDC_LOG(("mvaddch() - called: y=%d x=%d ch=%x\n", y, x, ch));
@@ -359,7 +359,7 @@ int mvaddch(int y, int x, const chtype ch)
int mvwaddch(WINDOW *win, int y, int x, const chtype ch)
{
PDC_LOG(("mvwaddch() - called: win=%x y=%d x=%d ch=%d\n",
PDC_LOG(("mvwaddch() - called: win=%p y=%d x=%d ch=%d\n",
win, y, x, ch));
if (wmove(win, y, x) == ERR)
@@ -377,7 +377,7 @@ int echochar(const chtype ch)
int wechochar(WINDOW *win, const chtype ch)
{
PDC_LOG(("wechochar() - called: win=%x ch=%x\n", win, ch));
PDC_LOG(("wechochar() - called: win=%p ch=%x\n", win, ch));
if (waddch(win, ch) == ERR)
return ERR;
@@ -386,6 +386,13 @@ int wechochar(WINDOW *win, const chtype ch)
}
#ifdef PDC_WIDE
int wadd_wch(WINDOW *win, const cchar_t *wch)
{
PDC_LOG(("wadd_wch() - called: win=%p wch=%x\n", win, *wch));
return wch ? PDC_chadd(win, *wch, TRUE) : ERR;
}
int add_wch(const cchar_t *wch)
{
PDC_LOG(("add_wch() - called: wch=%x\n", *wch));
@@ -393,13 +400,6 @@ int add_wch(const cchar_t *wch)
return wadd_wch(stdscr, wch);
}
int wadd_wch(WINDOW *win, const cchar_t *wch)
{
PDC_LOG(("wadd_wch() - called: win=%x wch=%x\n", win, *wch));
return wch ? PDC_chadd(win, *wch, TRUE) : ERR;
}
int mvadd_wch(int y, int x, const cchar_t *wch)
{
PDC_LOG(("mvaddch() - called: y=%d x=%d wch=%x\n", y, x, *wch));
@@ -412,7 +412,7 @@ int mvadd_wch(int y, int x, const cchar_t *wch)
int mvwadd_wch(WINDOW *win, int y, int x, const cchar_t *wch)
{
PDC_LOG(("mvwaddch() - called: win=%x y=%d x=%d wch=%d\n",
PDC_LOG(("mvwaddch() - called: win=%p y=%d x=%d wch=%d\n",
win, y, x, *wch));
if (wmove(win, y, x) == ERR)
@@ -430,7 +430,7 @@ int echo_wchar(const cchar_t *wch)
int wecho_wchar(WINDOW *win, const cchar_t *wch)
{
PDC_LOG(("wecho_wchar() - called: win=%x wch=%x\n", win, *wch));
PDC_LOG(("wecho_wchar() - called: win=%p wch=%x\n", win, *wch));
if (!wch || (wadd_wch(win, wch) == ERR))
return ERR;

View File

@@ -14,7 +14,7 @@
#include <curspriv.h>
#include <string.h>
RCSID("$Id: addchstr.c,v 1.34 2006/10/23 05:46:32 wmcbrine Exp $");
RCSID("$Id: addchstr.c,v 1.35 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -74,33 +74,12 @@ RCSID("$Id: addchstr.c,v 1.34 2006/10/23 05:46:32 wmcbrine Exp $");
**man-end****************************************************************/
int addchstr(const chtype *ch)
{
PDC_LOG(("addchstr() - called\n"));
return waddchnstr(stdscr, ch, -1);
}
int addchnstr(const chtype *ch, int n)
{
PDC_LOG(("addchnstr() - called\n"));
return waddchnstr(stdscr, ch, n);
}
int waddchstr(WINDOW *win, const chtype *ch)
{
PDC_LOG(("waddchstr() - called: win=%x\n", win));
return waddchnstr(win, ch, -1);
}
int waddchnstr(WINDOW *win, const chtype *ch, int n)
{
int y, x, maxx, minx;
chtype *ptr;
PDC_LOG(("waddchnstr() - called: win=%x n=%d\n", win, n));
PDC_LOG(("waddchnstr() - called: win=%p n=%d\n", win, n));
if (!win || !ch || !n || n < -1)
return ERR;
@@ -140,6 +119,27 @@ int waddchnstr(WINDOW *win, const chtype *ch, int n)
return OK;
}
int addchstr(const chtype *ch)
{
PDC_LOG(("addchstr() - called\n"));
return waddchnstr(stdscr, ch, -1);
}
int addchnstr(const chtype *ch, int n)
{
PDC_LOG(("addchnstr() - called\n"));
return waddchnstr(stdscr, ch, n);
}
int waddchstr(WINDOW *win, const chtype *ch)
{
PDC_LOG(("waddchstr() - called: win=%p\n", win));
return waddchnstr(win, ch, -1);
}
int mvaddchstr(int y, int x, const chtype *ch)
{
PDC_LOG(("mvaddchstr() - called: y %d x %d\n", y, x));
@@ -181,6 +181,13 @@ int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *ch, int n)
}
#ifdef PDC_WIDE
int wadd_wchnstr(WINDOW *win, const cchar_t *wch, int n)
{
PDC_LOG(("wadd_wchnstr() - called: win=%p n=%d\n", win, n));
return waddchnstr(win, wch, n);
}
int add_wchstr(const cchar_t *wch)
{
PDC_LOG(("add_wchstr() - called\n"));
@@ -197,18 +204,11 @@ int add_wchnstr(const cchar_t *wch, int n)
int wadd_wchstr(WINDOW *win, const cchar_t *wch)
{
PDC_LOG(("wadd_wchstr() - called: win=%x\n", win));
PDC_LOG(("wadd_wchstr() - called: win=%p\n", win));
return wadd_wchnstr(win, wch, -1);
}
int wadd_wchnstr(WINDOW *win, const cchar_t *wch, int n)
{
PDC_LOG(("wadd_wchnstr() - called: win=%x n=%d\n", win, n));
return waddchnstr(win, wch, n);
}
int mvadd_wchstr(int y, int x, const cchar_t *wch)
{
PDC_LOG(("mvadd_wchstr() - called: y %d x %d\n", y, x));

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: addstr.c,v 1.32 2006/10/23 05:46:32 wmcbrine Exp $");
RCSID("$Id: addstr.c,v 1.33 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -26,8 +26,8 @@ RCSID("$Id: addstr.c,v 1.32 2006/10/23 05:46:32 wmcbrine Exp $");
int waddnstr(WINDOW *win, const char *str, int n);
int mvaddstr(int y, int x, const char *str);
int mvaddnstr(int y, int x, const char *str, int n);
int mvwaddstr(WINDOW *, int y, int x, const char *str);
int mvwaddnstr(WINDOW *, int y, int x, const char *str, int n);
int mvwaddstr(WINDOW *win, int y, int x, const char *str);
int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n);
int addwstr(const wchar_t *wstr);
int addnwstr(const wchar_t *wstr, int n);
@@ -69,6 +69,24 @@ RCSID("$Id: addstr.c,v 1.32 2006/10/23 05:46:32 wmcbrine Exp $");
**man-end****************************************************************/
int waddnstr(WINDOW *win, const char *str, int n)
{
int ic;
PDC_LOG(("waddnstr() - called: string=\"%s\" n %d \n", str, n));
if (win == (WINDOW *)NULL || str == (const char *)NULL)
return ERR;
for (ic = 0; *str && (ic < n || n < 0); ic++)
{
if (waddch(win, (unsigned char)(*str++)) == ERR)
return ERR;
}
return OK;
}
int addstr(const char *str)
{
PDC_LOG(("addstr() - called: string=\"%s\"\n", str));
@@ -90,24 +108,6 @@ int waddstr(WINDOW *win, const char *str)
return waddnstr(win, str, -1);
}
int waddnstr(WINDOW *win, const char *str, int n)
{
int ic;
PDC_LOG(("waddnstr() - called: string=\"%s\" n %d \n", str, n));
if (win == (WINDOW *)NULL || str == (const char *)NULL)
return ERR;
for (ic = 0; *str && (ic < n || n < 0); ic++)
{
if (waddch(win, (unsigned char)(*str++)) == ERR)
return ERR;
}
return OK;
}
int mvaddstr(int y, int x, const char *str)
{
PDC_LOG(("mvaddstr() - called: y %d x %d string=\"%s\"\n", y, x, str));
@@ -151,27 +151,6 @@ int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n)
}
#ifdef PDC_WIDE
int addwstr(const wchar_t *wstr)
{
PDC_LOG(("addwstr() - called\n"));
return waddnwstr(stdscr, wstr, -1);
}
int addnwstr(const wchar_t *wstr, int n)
{
PDC_LOG(("addnwstr() - called\n"));
return waddnwstr(stdscr, wstr, n);
}
int waddwstr(WINDOW *win, const wchar_t *wstr)
{
PDC_LOG(("waddwstr() - called\n"));
return waddnwstr(win, wstr, -1);
}
int waddnwstr(WINDOW *win, const wchar_t *wstr, int n)
{
chtype cn;
@@ -193,6 +172,27 @@ int waddnwstr(WINDOW *win, const wchar_t *wstr, int n)
return OK;
}
int addwstr(const wchar_t *wstr)
{
PDC_LOG(("addwstr() - called\n"));
return waddnwstr(stdscr, wstr, -1);
}
int addnwstr(const wchar_t *wstr, int n)
{
PDC_LOG(("addnwstr() - called\n"));
return waddnwstr(stdscr, wstr, n);
}
int waddwstr(WINDOW *win, const wchar_t *wstr)
{
PDC_LOG(("waddwstr() - called\n"));
return waddnwstr(win, wstr, -1);
}
int mvaddwstr(int y, int x, const wchar_t *wstr)
{
PDC_LOG(("mvaddstr() - called\n"));

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: attr.c,v 1.30 2006/10/23 06:09:36 wmcbrine Exp $");
RCSID("$Id: attr.c,v 1.31 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -316,7 +316,7 @@ int wattr_set(WINDOW *win, attr_t attrs, short color_pair, void *opts)
int chgat(int n, attr_t attr, short color, const void *opts)
{
PDC_LOG(("wchgat() - called\n"));
PDC_LOG(("chgat() - called\n"));
return wchgat(stdscr, n, attr, color, opts);
}
@@ -347,6 +347,8 @@ int wchgat(WINDOW *win, int n, attr_t attr, short color, const void *opts)
chtype newattr, tmp;
int basey, basex, imax, ic;
PDC_LOG(("wchgat() - called\n"));
if (win == (WINDOW *)NULL)
return ERR;

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: bkgd.c,v 1.29 2006/10/23 05:46:32 wmcbrine Exp $");
RCSID("$Id: bkgd.c,v 1.30 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -83,27 +83,6 @@ RCSID("$Id: bkgd.c,v 1.29 2006/10/23 05:46:32 wmcbrine Exp $");
**man-end****************************************************************/
int bkgd(chtype ch)
{
PDC_LOG(("bkgd() - called\n"));
return wbkgd(stdscr, ch);
}
void bkgdset(chtype ch)
{
PDC_LOG(("bkgdset() - called\n"));
wbkgdset(stdscr, ch);
}
chtype getbkgd(WINDOW *win)
{
PDC_LOG(("getbkgd() - called\n"));
return win ? win->_bkgd : (chtype)ERR;
}
int wbkgd(WINDOW *win, chtype ch)
{
int x, y;
@@ -183,6 +162,13 @@ int wbkgd(WINDOW *win, chtype ch)
return OK;
}
int bkgd(chtype ch)
{
PDC_LOG(("bkgd() - called\n"));
return wbkgd(stdscr, ch);
}
void wbkgdset(WINDOW *win, chtype ch)
{
chtype bkgdattr;
@@ -208,28 +194,21 @@ void wbkgdset(WINDOW *win, chtype ch)
win->_bkgd = (ch | bkgdattr);
}
void bkgdset(chtype ch)
{
PDC_LOG(("bkgdset() - called\n"));
wbkgdset(stdscr, ch);
}
chtype getbkgd(WINDOW *win)
{
PDC_LOG(("getbkgd() - called\n"));
return win ? win->_bkgd : (chtype)ERR;
}
#ifdef PDC_WIDE
int bkgrnd(const cchar_t *wch)
{
PDC_LOG(("bkgrnd() - called\n"));
return wbkgrnd(stdscr, wch);
}
void bkgrndset(const cchar_t *wch)
{
PDC_LOG(("bkgrndset() - called\n"));
wbkgrndset(stdscr, wch);
}
int getbkgrnd(cchar_t *wch)
{
PDC_LOG(("getbkgrnd() - called\n"));
return wgetbkgrnd(stdscr, wch);
}
int wbkgrnd(WINDOW *win, const cchar_t *wch)
{
PDC_LOG(("wbkgrnd() - called\n"));
@@ -237,6 +216,13 @@ int wbkgrnd(WINDOW *win, const cchar_t *wch)
return wch ? wbkgd(win, *wch) : ERR;
}
int bkgrnd(const cchar_t *wch)
{
PDC_LOG(("bkgrnd() - called\n"));
return wbkgrnd(stdscr, wch);
}
void wbkgrndset(WINDOW *win, const cchar_t *wch)
{
PDC_LOG(("wbkgdset() - called\n"));
@@ -245,6 +231,13 @@ void wbkgrndset(WINDOW *win, const cchar_t *wch)
wbkgdset(win, *wch);
}
void bkgrndset(const cchar_t *wch)
{
PDC_LOG(("bkgrndset() - called\n"));
wbkgrndset(stdscr, wch);
}
int wgetbkgrnd(WINDOW *win, cchar_t *wch)
{
PDC_LOG(("wgetbkgrnd() - called\n"));
@@ -256,4 +249,11 @@ int wgetbkgrnd(WINDOW *win, cchar_t *wch)
return OK;
}
int getbkgrnd(cchar_t *wch)
{
PDC_LOG(("getbkgrnd() - called\n"));
return wgetbkgrnd(stdscr, wch);
}
#endif

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: border.c,v 1.39 2006/10/23 05:46:32 wmcbrine Exp $");
RCSID("$Id: border.c,v 1.40 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -146,14 +146,6 @@ static chtype _attr_passthru(WINDOW *win, chtype ch)
return ch;
}
int border(chtype ls, chtype rs, chtype ts, chtype bs,
chtype tl, chtype tr, chtype bl, chtype br)
{
PDC_LOG(("border() - called\n"));
return wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br);
}
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts,
chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
{
@@ -204,6 +196,14 @@ int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts,
return OK;
}
int border(chtype ls, chtype rs, chtype ts, chtype bs,
chtype tl, chtype tr, chtype bl, chtype br)
{
PDC_LOG(("border() - called\n"));
return wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br);
}
int box(WINDOW *win, chtype verch, chtype horch)
{
PDC_LOG(("box() - called\n"));
@@ -211,20 +211,6 @@ int box(WINDOW *win, chtype verch, chtype horch)
return wborder(win, verch, verch, horch, horch, 0, 0, 0, 0);
}
int hline(chtype ch, int n)
{
PDC_LOG(("hline() - called\n"));
return whline(stdscr, ch, n);
}
int vline(chtype ch, int n)
{
PDC_LOG(("vline() - called\n"));
return wvline(stdscr, ch, n);
}
int whline(WINDOW *win, chtype ch, int n)
{
int startpos, endpos;
@@ -264,6 +250,33 @@ int whline(WINDOW *win, chtype ch, int n)
return OK;
}
int hline(chtype ch, int n)
{
PDC_LOG(("hline() - called\n"));
return whline(stdscr, ch, n);
}
int mvhline(int y, int x, chtype ch, int n)
{
PDC_LOG(("mvhline() - called\n"));
if (move(y, x) == ERR)
return ERR;
return whline(stdscr, ch, n);
}
int mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
{
PDC_LOG(("mvwhline() - called\n"));
if (wmove(win, y, x) == ERR)
return ERR;
return whline(win, ch, n);
}
int wvline(WINDOW *win, chtype ch, int n)
{
int endpos;
@@ -301,14 +314,11 @@ int wvline(WINDOW *win, chtype ch, int n)
return OK;
}
int mvhline(int y, int x, chtype ch, int n)
int vline(chtype ch, int n)
{
PDC_LOG(("mvhline() - called\n"));
PDC_LOG(("vline() - called\n"));
if (move(y, x) == ERR)
return ERR;
return whline(stdscr, ch, n);
return wvline(stdscr, ch, n);
}
int mvvline(int y, int x, chtype ch, int n)
@@ -321,16 +331,6 @@ int mvvline(int y, int x, chtype ch, int n)
return wvline(stdscr, ch, n);
}
int mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
{
PDC_LOG(("mvwhline() - called\n"));
if (wmove(win, y, x) == ERR)
return ERR;
return whline(win, ch, n);
}
int mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
{
PDC_LOG(("mvwvline() - called\n"));
@@ -342,15 +342,6 @@ int mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
}
#ifdef PDC_WIDE
int border_set(const cchar_t *ls, const cchar_t *rs, const cchar_t *ts,
const cchar_t *bs, const cchar_t *tl, const cchar_t *tr,
const cchar_t *bl, const cchar_t *br)
{
PDC_LOG(("border_set() - called\n"));
return wborder_set(stdscr, ls, rs, ts, bs, tl, tr, bl, br);
}
int wborder_set(WINDOW *win, const cchar_t *ls, const cchar_t *rs,
const cchar_t *ts, const cchar_t *bs, const cchar_t *tl,
const cchar_t *tr, const cchar_t *bl, const cchar_t *br)
@@ -362,6 +353,15 @@ int wborder_set(WINDOW *win, const cchar_t *ls, const cchar_t *rs,
tl ? *tl : 0, tr ? *tr : 0, bl ? *bl : 0, br ? *br : 0);
}
int border_set(const cchar_t *ls, const cchar_t *rs, const cchar_t *ts,
const cchar_t *bs, const cchar_t *tl, const cchar_t *tr,
const cchar_t *bl, const cchar_t *br)
{
PDC_LOG(("border_set() - called\n"));
return wborder_set(stdscr, ls, rs, ts, bs, tl, tr, bl, br);
}
int box_set(WINDOW *win, const cchar_t *verch, const cchar_t *horch)
{
PDC_LOG(("box_set() - called\n"));
@@ -371,20 +371,6 @@ int box_set(WINDOW *win, const cchar_t *verch, const cchar_t *horch)
(const cchar_t *)NULL, (const cchar_t *)NULL);
}
int hline_set(const cchar_t *wch, int n)
{
PDC_LOG(("hline_set() - called\n"));
return whline_set(stdscr, wch, n);
}
int vline_set(const cchar_t *wch, int n)
{
PDC_LOG(("vline_set() - called\n"));
return wvline_set(stdscr, wch, n);
}
int whline_set(WINDOW *win, const cchar_t *wch, int n)
{
PDC_LOG(("whline_set() - called\n"));
@@ -392,11 +378,11 @@ int whline_set(WINDOW *win, const cchar_t *wch, int n)
return wch ? whline(win, *wch, n) : ERR;
}
int wvline_set(WINDOW *win, const cchar_t *wch, int n)
int hline_set(const cchar_t *wch, int n)
{
PDC_LOG(("wvline_set() - called\n"));
PDC_LOG(("hline_set() - called\n"));
return wch ? wvline(win, *wch, n) : ERR;
return whline_set(stdscr, wch, n);
}
int mvhline_set(int y, int x, const cchar_t *wch, int n)
@@ -409,16 +395,6 @@ int mvhline_set(int y, int x, const cchar_t *wch, int n)
return whline_set(stdscr, wch, n);
}
int mvvline_set(int y, int x, const cchar_t *wch, int n)
{
PDC_LOG(("mvvline_set() - called\n"));
if (move(y, x) == ERR)
return ERR;
return wvline_set(stdscr, wch, n);
}
int mvwhline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n)
{
PDC_LOG(("mvwhline_set() - called\n"));
@@ -429,6 +405,30 @@ int mvwhline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n)
return whline_set(win, wch, n);
}
int wvline_set(WINDOW *win, const cchar_t *wch, int n)
{
PDC_LOG(("wvline_set() - called\n"));
return wch ? wvline(win, *wch, n) : ERR;
}
int vline_set(const cchar_t *wch, int n)
{
PDC_LOG(("vline_set() - called\n"));
return wvline_set(stdscr, wch, n);
}
int mvvline_set(int y, int x, const cchar_t *wch, int n)
{
PDC_LOG(("mvvline_set() - called\n"));
if (move(y, x) == ERR)
return ERR;
return wvline_set(stdscr, wch, n);
}
int mvwvline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n)
{
PDC_LOG(("mvwvline_set() - called\n"));

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: clear.c,v 1.25 2006/10/23 05:03:30 wmcbrine Exp $");
RCSID("$Id: clear.c,v 1.26 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -62,81 +62,6 @@ RCSID("$Id: clear.c,v 1.25 2006/10/23 05:03:30 wmcbrine Exp $");
**man-end****************************************************************/
int clear(void)
{
PDC_LOG(("clear() - called\n"));
if (stdscr == (WINDOW *)NULL)
return ERR;
stdscr->_clear = TRUE;
return erase();
}
int wclear(WINDOW *win)
{
PDC_LOG(("wclear() - called\n"));
if (win == (WINDOW *)NULL)
return ERR;
win->_clear = TRUE;
return werase(win);
}
int erase(void)
{
return werase(stdscr);
}
int werase(WINDOW *win)
{
PDC_LOG(("werase() - called\n"));
if (win == (WINDOW *)NULL)
return ERR;
wmove(win, 0, 0);
return wclrtobot(win);
}
int clrtobot(void)
{
return wclrtobot(stdscr);
}
int wclrtobot(WINDOW *win)
{
int savey = win->_cury;
int savex = win->_curx;
PDC_LOG(("wclrtobot() - called\n"));
if (win == (WINDOW *)NULL)
return ERR;
/* should this involve scrolling region somehow ? */
if (win->_cury + 1 < win->_maxy)
{
win->_curx = 0;
win->_cury++;
for (; win->_maxy > win->_cury; win->_cury++)
wclrtoeol(win);
win->_cury = savey;
win->_curx = savex;
}
wclrtoeol(win);
PDC_sync(win);
return OK;
}
int clrtoeol(void)
{
return wclrtoeol(stdscr);
}
int wclrtoeol(WINDOW *win)
{
int x, y, minx;
@@ -165,3 +90,79 @@ int wclrtoeol(WINDOW *win)
PDC_sync(win);
return OK;
}
int clrtoeol(void)
{
PDC_LOG(("clrtoeol() - called\n"));
return wclrtoeol(stdscr);
}
int wclrtobot(WINDOW *win)
{
int savey = win->_cury;
int savex = win->_curx;
PDC_LOG(("wclrtobot() - called\n"));
if (win == (WINDOW *)NULL)
return ERR;
/* should this involve scrolling region somehow ? */
if (win->_cury + 1 < win->_maxy)
{
win->_curx = 0;
win->_cury++;
for (; win->_maxy > win->_cury; win->_cury++)
wclrtoeol(win);
win->_cury = savey;
win->_curx = savex;
}
wclrtoeol(win);
PDC_sync(win);
return OK;
}
int clrtobot(void)
{
PDC_LOG(("clrtobot() - called\n"));
return wclrtobot(stdscr);
}
int werase(WINDOW *win)
{
PDC_LOG(("werase() - called\n"));
if (wmove(win, 0, 0) == ERR)
return ERR;
return wclrtobot(win);
}
int erase(void)
{
PDC_LOG(("erase() - called\n"));
return werase(stdscr);
}
int wclear(WINDOW *win)
{
PDC_LOG(("wclear() - called\n"));
if (win == (WINDOW *)NULL)
return ERR;
win->_clear = TRUE;
return werase(win);
}
int clear(void)
{
PDC_LOG(("clear() - called\n"));
return wclear(stdscr);
}

View File

@@ -14,7 +14,7 @@
#include <curspriv.h>
#include <string.h>
RCSID("$Id: delch.c,v 1.24 2006/10/23 05:03:30 wmcbrine Exp $");
RCSID("$Id: delch.c,v 1.25 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -44,13 +44,6 @@ RCSID("$Id: delch.c,v 1.24 2006/10/23 05:03:30 wmcbrine Exp $");
**man-end****************************************************************/
int delch(void)
{
PDC_LOG(("delch() - called\n"));
return wdelch(stdscr);
}
int wdelch(WINDOW *win)
{
int y, x, maxx;
@@ -82,6 +75,13 @@ int wdelch(WINDOW *win)
return OK;
}
int delch(void)
{
PDC_LOG(("delch() - called\n"));
return wdelch(stdscr);
}
int mvdelch(int y, int x)
{
PDC_LOG(("mvdelch() - called\n"));

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: deleteln.c,v 1.24 2006/10/23 05:03:30 wmcbrine Exp $");
RCSID("$Id: deleteln.c,v 1.25 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -51,13 +51,6 @@ RCSID("$Id: deleteln.c,v 1.24 2006/10/23 05:03:30 wmcbrine Exp $");
**man-end****************************************************************/
int deleteln(void)
{
PDC_LOG(("deleteln() - called\n"));
return wdeleteln(stdscr);
}
int wdeleteln(WINDOW *win)
{
chtype blank, *temp, *ptr;
@@ -94,11 +87,11 @@ int wdeleteln(WINDOW *win)
return OK;
}
int insdelln(int n)
int deleteln(void)
{
PDC_LOG(("insdelln() - called\n"));
PDC_LOG(("deleteln() - called\n"));
return winsdelln(stdscr, n);
return wdeleteln(stdscr);
}
int winsdelln(WINDOW *win, int n)
@@ -127,6 +120,13 @@ int winsdelln(WINDOW *win, int n)
return OK;
}
int insdelln(int n)
{
PDC_LOG(("insdelln() - called\n"));
return winsdelln(stdscr, n);
}
int winsertln(WINDOW *win)
{
chtype blank, *temp, *end;

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: inchstr.c,v 1.25 2006/10/23 05:46:32 wmcbrine Exp $");
RCSID("$Id: inchstr.c,v 1.26 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -72,27 +72,6 @@ RCSID("$Id: inchstr.c,v 1.25 2006/10/23 05:46:32 wmcbrine Exp $");
**man-end****************************************************************/
int inchstr(chtype *ch)
{
PDC_LOG(("inchstr() - called\n"));
return winchnstr(stdscr, ch, stdscr->_maxx - stdscr->_curx);
}
int inchnstr(chtype *ch, int n)
{
PDC_LOG(("inchnstr() - called\n"));
return winchnstr(stdscr, ch, n);
}
int winchstr(WINDOW *win, chtype *ch)
{
PDC_LOG(("winchstr() - called\n"));
return winchnstr(win, ch, win->_maxx - win->_curx);
}
int winchnstr(WINDOW *win, chtype *ch, int n)
{
int i;
@@ -116,6 +95,20 @@ int winchnstr(WINDOW *win, chtype *ch, int n)
return OK;
}
int inchstr(chtype *ch)
{
PDC_LOG(("inchstr() - called\n"));
return winchnstr(stdscr, ch, stdscr->_maxx - stdscr->_curx);
}
int winchstr(WINDOW *win, chtype *ch)
{
PDC_LOG(("winchstr() - called\n"));
return winchnstr(win, ch, win->_maxx - win->_curx);
}
int mvinchstr(int y, int x, chtype *ch)
{
PDC_LOG(("mvinchstr() - called: y %d x %d\n", y, x));
@@ -126,16 +119,6 @@ int mvinchstr(int y, int x, chtype *ch)
return winchnstr(stdscr, ch, stdscr->_maxx - stdscr->_curx);
}
int mvinchnstr(int y, int x, chtype *ch, int n)
{
PDC_LOG(("mvinchnstr() - called: y %d x %d n %d\n", y, x, n));
if (move(y, x) == ERR)
return ERR;
return winchnstr(stdscr, ch, n);
}
int mvwinchstr(WINDOW *win, int y, int x, chtype *ch)
{
PDC_LOG(("mvwinchstr() - called:\n"));
@@ -146,6 +129,23 @@ int mvwinchstr(WINDOW *win, int y, int x, chtype *ch)
return winchnstr(win, ch, win->_maxx - win->_curx);
}
int inchnstr(chtype *ch, int n)
{
PDC_LOG(("inchnstr() - called\n"));
return winchnstr(stdscr, ch, n);
}
int mvinchnstr(int y, int x, chtype *ch, int n)
{
PDC_LOG(("mvinchnstr() - called: y %d x %d n %d\n", y, x, n));
if (move(y, x) == ERR)
return ERR;
return winchnstr(stdscr, ch, n);
}
int mvwinchnstr(WINDOW *win, int y, int x, chtype *ch, int n)
{
PDC_LOG(("mvwinchnstr() - called: y %d x %d n %d \n", y, x, n));
@@ -157,6 +157,13 @@ int mvwinchnstr(WINDOW *win, int y, int x, chtype *ch, int n)
}
#ifdef PDC_WIDE
int win_wchnstr(WINDOW *win, cchar_t *wch, int n)
{
PDC_LOG(("win_wchnstr() - called\n"));
return winchnstr(win, wch, n);
}
int in_wchstr(cchar_t *wch)
{
PDC_LOG(("in_wchstr() - called\n"));
@@ -164,13 +171,6 @@ int in_wchstr(cchar_t *wch)
return win_wchnstr(stdscr, wch, stdscr->_maxx - stdscr->_curx);
}
int in_wchnstr(cchar_t *wch, int n)
{
PDC_LOG(("in_wchnstr() - called\n"));
return win_wchnstr(stdscr, wch, n);
}
int win_wchstr(WINDOW *win, cchar_t *wch)
{
PDC_LOG(("win_wchstr() - called\n"));
@@ -178,13 +178,6 @@ int win_wchstr(WINDOW *win, cchar_t *wch)
return win_wchnstr(win, wch, win->_maxx - win->_curx);
}
int win_wchnstr(WINDOW *win, cchar_t *wch, int n)
{
PDC_LOG(("win_wchnstr() - called\n"));
return winchnstr(win, wch, n);
}
int mvin_wchstr(int y, int x, cchar_t *wch)
{
PDC_LOG(("mvin_wchstr() - called: y %d x %d\n", y, x));
@@ -195,16 +188,6 @@ int mvin_wchstr(int y, int x, cchar_t *wch)
return win_wchnstr(stdscr, wch, stdscr->_maxx - stdscr->_curx);
}
int mvin_wchnstr(int y, int x, cchar_t *wch, int n)
{
PDC_LOG(("mvin_wchnstr() - called: y %d x %d n %d\n", y, x, n));
if (move(y, x) == ERR)
return ERR;
return win_wchnstr(stdscr, wch, n);
}
int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wch)
{
PDC_LOG(("mvwin_wchstr() - called:\n"));
@@ -215,6 +198,23 @@ int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wch)
return win_wchnstr(win, wch, win->_maxx - win->_curx);
}
int in_wchnstr(cchar_t *wch, int n)
{
PDC_LOG(("in_wchnstr() - called\n"));
return win_wchnstr(stdscr, wch, n);
}
int mvin_wchnstr(int y, int x, cchar_t *wch, int n)
{
PDC_LOG(("mvin_wchnstr() - called: y %d x %d n %d\n", y, x, n));
if (move(y, x) == ERR)
return ERR;
return win_wchnstr(stdscr, wch, n);
}
int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wch, int n)
{
PDC_LOG(("mvwinchnstr() - called: y %d x %d n %d \n", y, x, n));

View File

@@ -14,7 +14,7 @@
#include <curspriv.h>
#include <string.h>
RCSID("$Id: insstr.c,v 1.33 2006/10/23 05:46:32 wmcbrine Exp $");
RCSID("$Id: insstr.c,v 1.34 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -72,27 +72,6 @@ RCSID("$Id: insstr.c,v 1.33 2006/10/23 05:46:32 wmcbrine Exp $");
**man-end****************************************************************/
int insstr(const char *str)
{
PDC_LOG(("insstr() - called: string=\"%s\"\n", str));
return winsnstr(stdscr, str, -1);
}
int insnstr(const char *str, int n)
{
PDC_LOG(("insnstr() - called: string=\"%s\" n %d \n", str, n));
return winsnstr(stdscr, str, n);
}
int winsstr(WINDOW *win, const char *str)
{
PDC_LOG(("winsstr() - called: string=\"%s\"\n", str));
return winsnstr(win, str, -1);
}
int winsnstr(WINDOW *win, const char *str, int n)
{
int ic;
@@ -116,6 +95,20 @@ int winsnstr(WINDOW *win, const char *str, int n)
return OK;
}
int insstr(const char *str)
{
PDC_LOG(("insstr() - called: string=\"%s\"\n", str));
return winsnstr(stdscr, str, -1);
}
int winsstr(WINDOW *win, const char *str)
{
PDC_LOG(("winsstr() - called: string=\"%s\"\n", str));
return winsnstr(win, str, -1);
}
int mvinsstr(int y, int x, const char *str)
{
PDC_LOG(("mvinsstr() - called: y %d x %d string=\"%s\"\n",
@@ -127,6 +120,23 @@ int mvinsstr(int y, int x, const char *str)
return winsnstr(stdscr, str, -1);
}
int mvwinsstr(WINDOW *win, int y, int x, const char *str)
{
PDC_LOG(("mvwinsstr() - called: string=\"%s\"\n", str));
if (wmove(win, y, x) == ERR)
return ERR;
return winsnstr(win, str, -1);
}
int insnstr(const char *str, int n)
{
PDC_LOG(("insnstr() - called: string=\"%s\" n %d \n", str, n));
return winsnstr(stdscr, str, n);
}
int mvinsnstr(int y, int x, const char *str, int n)
{
PDC_LOG(("mvinsnstr() - called: y %d x %d string=\"%s\" n %d \n",
@@ -138,16 +148,6 @@ int mvinsnstr(int y, int x, const char *str, int n)
return winsnstr(stdscr, str, n);
}
int mvwinsstr(WINDOW *win, int y, int x, const char *str)
{
PDC_LOG(("mvwinsstr() - called: string=\"%s\"\n", str));
if (wmove(win, y, x) == ERR)
return ERR;
return winsnstr(win, str, -1);
}
int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n)
{
PDC_LOG(("mvwinsnstr() - called: y %d x %d string=\"%s\" n %d \n",
@@ -160,27 +160,6 @@ int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n)
}
#ifdef PDC_WIDE
int ins_wstr(const wchar_t *wstr)
{
PDC_LOG(("ins_wstr() - called\n"));
return wins_nwstr(stdscr, wstr, -1);
}
int ins_nwstr(const wchar_t *wstr, int n)
{
PDC_LOG(("ins_nwstr() - called\n"));
return wins_nwstr(stdscr, wstr, n);
}
int wins_wstr(WINDOW *win, const wchar_t *wstr)
{
PDC_LOG(("wins_wstr() - called\n"));
return wins_nwstr(win, wstr, -1);
}
int wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
{
const wchar_t *p;
@@ -206,6 +185,20 @@ int wins_nwstr(WINDOW *win, const wchar_t *wstr, int n)
return OK;
}
int ins_wstr(const wchar_t *wstr)
{
PDC_LOG(("ins_wstr() - called\n"));
return wins_nwstr(stdscr, wstr, -1);
}
int wins_wstr(WINDOW *win, const wchar_t *wstr)
{
PDC_LOG(("wins_wstr() - called\n"));
return wins_nwstr(win, wstr, -1);
}
int mvins_wstr(int y, int x, const wchar_t *wstr)
{
PDC_LOG(("mvins_wstr() - called\n"));
@@ -216,16 +209,6 @@ int mvins_wstr(int y, int x, const wchar_t *wstr)
return wins_nwstr(stdscr, wstr, -1);
}
int mvins_nwstr(int y, int x, const wchar_t *wstr, int n)
{
PDC_LOG(("mvinsnstr() - called\n"));
if (move(y, x) == ERR)
return ERR;
return wins_nwstr(stdscr, wstr, n);
}
int mvwins_wstr(WINDOW *win, int y, int x, const wchar_t *wstr)
{
PDC_LOG(("mvwinsstr() - called\n"));
@@ -236,6 +219,23 @@ int mvwins_wstr(WINDOW *win, int y, int x, const wchar_t *wstr)
return wins_nwstr(win, wstr, -1);
}
int ins_nwstr(const wchar_t *wstr, int n)
{
PDC_LOG(("ins_nwstr() - called\n"));
return wins_nwstr(stdscr, wstr, n);
}
int mvins_nwstr(int y, int x, const wchar_t *wstr, int n)
{
PDC_LOG(("mvinsnstr() - called\n"));
if (move(y, x) == ERR)
return ERR;
return wins_nwstr(stdscr, wstr, n);
}
int mvwins_nwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n)
{
PDC_LOG(("mvwinsnstr() - called\n"));

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: instr.c,v 1.30 2006/10/23 05:46:32 wmcbrine Exp $");
RCSID("$Id: instr.c,v 1.31 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -71,27 +71,6 @@ RCSID("$Id: instr.c,v 1.30 2006/10/23 05:46:32 wmcbrine Exp $");
**man-end****************************************************************/
int instr(char *str)
{
PDC_LOG(("instr() - called: string=\"%s\"\n", str));
return (ERR == winnstr(stdscr, str, stdscr->_maxx)) ? ERR : OK;
}
int innstr(char *str, int n)
{
PDC_LOG(("innstr() - called: n %d \n", n));
return winnstr(stdscr, str, n);
}
int winstr(WINDOW *win, char *str)
{
PDC_LOG(("winstr() - called: \n"));
return (ERR == winnstr(win, str, win->_maxx)) ? ERR : OK;
}
int winnstr(WINDOW *win, char *str, int n)
{
chtype tmp;
@@ -129,6 +108,20 @@ int winnstr(WINDOW *win, char *str, int n)
return ic;
}
int instr(char *str)
{
PDC_LOG(("instr() - called: string=\"%s\"\n", str));
return (ERR == winnstr(stdscr, str, stdscr->_maxx)) ? ERR : OK;
}
int winstr(WINDOW *win, char *str)
{
PDC_LOG(("winstr() - called: \n"));
return (ERR == winnstr(win, str, win->_maxx)) ? ERR : OK;
}
int mvinstr(int y, int x, char *str)
{
PDC_LOG(("mvinstr() - called: y %d x %d \n", y, x));
@@ -139,16 +132,6 @@ int mvinstr(int y, int x, char *str)
return (ERR == winnstr(stdscr, str, stdscr->_maxx)) ? ERR : OK;
}
int mvinnstr(int y, int x, char *str, int n)
{
PDC_LOG(("mvinnstr() - called: y %d x %d n %d \n", y, x, n));
if (move(y, x) == ERR)
return ERR;
return winnstr(stdscr, str, n);
}
int mvwinstr(WINDOW *win, int y, int x, char *str)
{
PDC_LOG(("mvwinstr() - called: y %d x %d \n", y, x));
@@ -159,6 +142,23 @@ int mvwinstr(WINDOW *win, int y, int x, char *str)
return (ERR == winnstr(win, str, win->_maxx)) ? ERR : OK;
}
int innstr(char *str, int n)
{
PDC_LOG(("innstr() - called: n %d \n", n));
return winnstr(stdscr, str, n);
}
int mvinnstr(int y, int x, char *str, int n)
{
PDC_LOG(("mvinnstr() - called: y %d x %d n %d \n", y, x, n));
if (move(y, x) == ERR)
return ERR;
return winnstr(stdscr, str, n);
}
int mvwinnstr(WINDOW *win, int y, int x, char *str, int n)
{
PDC_LOG(("mvwinnstr() - called: y %d x %d n %d \n", y, x, n));
@@ -170,27 +170,6 @@ int mvwinnstr(WINDOW *win, int y, int x, char *str, int n)
}
#ifdef PDC_WIDE
int inwstr(wchar_t *wstr)
{
PDC_LOG(("inwstr() - called\n"));
return (ERR == winnwstr(stdscr, wstr, stdscr->_maxx)) ? ERR : OK;
}
int innwstr(wchar_t *wstr, int n)
{
PDC_LOG(("innwstr() - called\n"));
return winnwstr(stdscr, wstr, n);
}
int winwstr(WINDOW *win, wchar_t *wstr)
{
PDC_LOG(("winwstr() - called\n"));
return (ERR == winnwstr(win, wstr, win->_maxx)) ? ERR : OK;
}
int winnwstr(WINDOW *win, wchar_t *wstr, int n)
{
chtype tmp;
@@ -228,6 +207,20 @@ int winnwstr(WINDOW *win, wchar_t *wstr, int n)
return ic;
}
int inwstr(wchar_t *wstr)
{
PDC_LOG(("inwstr() - called\n"));
return (ERR == winnwstr(stdscr, wstr, stdscr->_maxx)) ? ERR : OK;
}
int winwstr(WINDOW *win, wchar_t *wstr)
{
PDC_LOG(("winwstr() - called\n"));
return (ERR == winnwstr(win, wstr, win->_maxx)) ? ERR : OK;
}
int mvinwstr(int y, int x, wchar_t *wstr)
{
PDC_LOG(("mvinwstr() - called\n"));
@@ -238,16 +231,6 @@ int mvinwstr(int y, int x, wchar_t *wstr)
return (ERR == winnwstr(stdscr, wstr, stdscr->_maxx)) ? ERR : OK;
}
int mvinnwstr(int y, int x, wchar_t *wstr, int n)
{
PDC_LOG(("mvinnstr() - called\n"));
if (move(y, x) == ERR)
return ERR;
return winnwstr(stdscr, wstr, n);
}
int mvwinwstr(WINDOW *win, int y, int x, wchar_t *wstr)
{
PDC_LOG(("mvwinstr() - called\n"));
@@ -258,6 +241,23 @@ int mvwinwstr(WINDOW *win, int y, int x, wchar_t *wstr)
return (ERR == winnwstr(win, wstr, win->_maxx)) ? ERR : OK;
}
int innwstr(wchar_t *wstr, int n)
{
PDC_LOG(("innwstr() - called\n"));
return winnwstr(stdscr, wstr, n);
}
int mvinnwstr(int y, int x, wchar_t *wstr, int n)
{
PDC_LOG(("mvinnstr() - called\n"));
if (move(y, x) == ERR)
return ERR;
return winnwstr(stdscr, wstr, n);
}
int mvwinnwstr(WINDOW *win, int y, int x, wchar_t *wstr, int n)
{
PDC_LOG(("mvwinnwstr() - called\n"));

View File

@@ -17,7 +17,7 @@
#include <curspriv.h>
#include <string.h>
RCSID("$Id: printw.c,v 1.30 2006/10/23 05:03:31 wmcbrine Exp $");
RCSID("$Id: printw.c,v 1.31 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -69,6 +69,21 @@ RCSID("$Id: printw.c,v 1.30 2006/10/23 05:03:31 wmcbrine Exp $");
**man-end****************************************************************/
int vwprintw(WINDOW *win, const char *fmt, va_list varglist)
{
char printbuf[513];
int len;
PDC_LOG(("vwprintw() - called\n"));
#ifdef HAVE_VSNPRINTF
len = vsnprintf(printbuf, 512, fmt, varglist);
#else
len = vsprintf(printbuf, fmt, varglist);
#endif
return (waddstr(win, printbuf) == ERR) ? ERR : len;
}
int printw(const char *fmt, ...)
{
va_list args;
@@ -131,21 +146,6 @@ int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...)
return retval;
}
int vwprintw(WINDOW *win, const char *fmt, va_list varglist)
{
char printbuf[513];
int len;
PDC_LOG(("vwprintw() - called\n"));
#ifdef HAVE_VSNPRINTF
len = vsnprintf(printbuf, 512, fmt, varglist);
#else
len = vsprintf(printbuf, fmt, varglist);
#endif
return (waddstr(win, printbuf) == ERR) ? ERR : len;
}
int vw_printw(WINDOW *win, const char *fmt, va_list varglist)
{
PDC_LOG(("vw_printw() - called\n"));

View File

@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <string.h>
RCSID("$Id: refresh.c,v 1.41 2006/10/23 05:03:31 wmcbrine Exp $");
RCSID("$Id: refresh.c,v 1.42 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -71,36 +71,6 @@ RCSID("$Id: refresh.c,v 1.41 2006/10/23 05:03:31 wmcbrine Exp $");
**man-end****************************************************************/
int refresh(void)
{
PDC_LOG(("refresh() - called\n"));
return wrefresh(stdscr);
}
int wrefresh(WINDOW *win)
{
bool save_clear;
PDC_LOG(("wrefresh() - called\n"));
if ( (win == (WINDOW *)NULL) || (win->_flags & (_PAD|_SUBPAD)) )
return ERR;
save_clear = win->_clear;
if (win == curscr)
curscr->_clear = TRUE;
else
wnoutrefresh(win);
if (save_clear && win->_maxy == SP->lines && win->_maxx == SP->cols)
curscr->_clear = TRUE;
doupdate();
return OK;
}
int wnoutrefresh(WINDOW *win)
{
int first; /* first changed char on line */
@@ -108,7 +78,7 @@ int wnoutrefresh(WINDOW *win)
int begy, begx; /* window's place on screen */
int i, j;
PDC_LOG(("wnoutrefresh() - called: win=%x\n", win));
PDC_LOG(("wnoutrefresh() - called: win=%p\n", win));
if ( (win == (WINDOW *)NULL) || (win->_flags & (_PAD|_SUBPAD)) )
return ERR;
@@ -209,21 +179,40 @@ int doupdate(void)
return OK;
}
int redrawwin(WINDOW *win)
int wrefresh(WINDOW *win)
{
PDC_LOG(("redrawwin() - called: win=%x\n", win));
bool save_clear;
if (win == (WINDOW *)NULL)
PDC_LOG(("wrefresh() - called\n"));
if ( (win == (WINDOW *)NULL) || (win->_flags & (_PAD|_SUBPAD)) )
return ERR;
return wredrawln(win, 0, win->_maxy);
save_clear = win->_clear;
if (win == curscr)
curscr->_clear = TRUE;
else
wnoutrefresh(win);
if (save_clear && win->_maxy == SP->lines && win->_maxx == SP->cols)
curscr->_clear = TRUE;
return doupdate();
}
int refresh(void)
{
PDC_LOG(("refresh() - called\n"));
return wrefresh(stdscr);
}
int wredrawln(WINDOW *win, int start, int num)
{
int i;
PDC_LOG(("wredrawln() - called: win=%x start=%d num=%d\n",
PDC_LOG(("wredrawln() - called: win=%p start=%d num=%d\n",
win, start, num));
if ((win == (WINDOW *)NULL) ||
@@ -238,3 +227,13 @@ int wredrawln(WINDOW *win, int start, int num)
return OK;
}
int redrawwin(WINDOW *win)
{
PDC_LOG(("redrawwin() - called: win=%p\n", win));
if (win == (WINDOW *)NULL)
return ERR;
return wredrawln(win, 0, win->_maxy);
}

View File

@@ -27,7 +27,7 @@ static int _pdc_vsscanf(const char *, const char *, va_list);
# define vsscanf _pdc_vsscanf
#endif
RCSID("$Id: scanw.c,v 1.31 2006/11/01 15:22:37 wmcbrine Exp $");
RCSID("$Id: scanw.c,v 1.32 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -71,6 +71,18 @@ RCSID("$Id: scanw.c,v 1.31 2006/11/01 15:22:37 wmcbrine Exp $");
**man-end****************************************************************/
int vwscanw(WINDOW *win, const char *fmt, va_list varglist)
{
char scanbuf[256];
PDC_LOG(("vwscanw() - called\n"));
if (wgetnstr(win, scanbuf, 255) == ERR)
return ERR;
return vsscanf(scanbuf, fmt, varglist);
}
int scanw(const char *fmt, ...)
{
va_list args;
@@ -133,18 +145,6 @@ int mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...)
return retval;
}
int vwscanw(WINDOW *win, const char *fmt, va_list varglist)
{
char scanbuf[256];
PDC_LOG(("vwscanw() - called\n"));
if (wgetnstr(win, scanbuf, 255) == ERR)
return ERR;
return vsscanf(scanbuf, fmt, varglist);
}
int vw_scanw(WINDOW *win, const char *fmt, va_list varglist)
{
PDC_LOG(("vw_scanw() - called\n"));

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: scroll.c,v 1.25 2006/10/23 05:03:31 wmcbrine Exp $");
RCSID("$Id: scroll.c,v 1.26 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -48,13 +48,6 @@ RCSID("$Id: scroll.c,v 1.25 2006/10/23 05:03:31 wmcbrine Exp $");
**man-end****************************************************************/
int scroll(WINDOW *win)
{
PDC_LOG(("scroll() - called\n"));
return wscrl(win, 1);
}
int wscrl(WINDOW *win, int n)
{
int i, l;
@@ -134,3 +127,10 @@ int scrl(int n)
return wscrl(stdscr, n);
}
int scroll(WINDOW *win)
{
PDC_LOG(("scroll() - called\n"));
return wscrl(win, 1);
}

View File

@@ -13,7 +13,7 @@
#include <curspriv.h>
RCSID("$Id: touch.c,v 1.21 2006/10/23 05:03:31 wmcbrine Exp $");
RCSID("$Id: touch.c,v 1.22 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -87,7 +87,7 @@ int touchline(WINDOW *win, int start, int count)
{
int i;
PDC_LOG(("touchline() - called: win=%x start %d count %d\n",
PDC_LOG(("touchline() - called: win=%p start %d count %d\n",
win, start, count));
if ((win == (WINDOW *)NULL) ||
@@ -107,7 +107,7 @@ int untouchwin(WINDOW *win)
{
int i;
PDC_LOG(("untouchwin() - called: win=%x", win));
PDC_LOG(("untouchwin() - called: win=%p", win));
if (win == (WINDOW *)NULL)
return ERR;
@@ -125,7 +125,7 @@ int wtouchln(WINDOW *win, int y, int n, int changed)
{
int i;
PDC_LOG(("wtouchln() - called: win=%x y=%d n=%d changed=%d\n",
PDC_LOG(("wtouchln() - called: win=%p y=%d n=%d changed=%d\n",
win, y, n, changed));
if ((win == (WINDOW *)NULL) || (y > win->_maxy || y + n > win->_maxy))
@@ -150,7 +150,7 @@ int wtouchln(WINDOW *win, int y, int n, int changed)
bool is_linetouched(WINDOW *win, int line)
{
PDC_LOG(("is_linetouched() - called: win=%x line=%d\n", win, line));
PDC_LOG(("is_linetouched() - called: win=%p line=%d\n", win, line));
if ((win == NULL) || (line > win->_maxy || line < 0))
return FALSE;
@@ -162,7 +162,7 @@ bool is_wintouched(WINDOW *win)
{
int i;
PDC_LOG(("is_wintouched() - called: win=%x\n", win));
PDC_LOG(("is_wintouched() - called: win=%p\n", win));
if (win != NULL)
for (i = 0; i < win->_maxy; i++)

View File

@@ -14,7 +14,7 @@
#include <curspriv.h>
#include <stdlib.h>
RCSID("$Id: window.c,v 1.42 2006/10/23 05:03:31 wmcbrine Exp $");
RCSID("$Id: window.c,v 1.43 2006/11/04 12:59:03 wmcbrine Exp $");
/*man-start**************************************************************
@@ -35,7 +35,7 @@ RCSID("$Id: window.c,v 1.42 2006/10/23 05:03:31 wmcbrine Exp $");
void wcursyncup(WINDOW *win);
void wsyncdown(WINDOW *win);
WINDOW *resize_window(WINDOW *w, int lins, int cols);
WINDOW *resize_window(WINDOW *win, int lins, int cols);
WINDOW *PDC_makenew(int num_lines, int num_columns,
int begy, int begx);
void PDC_sync(WINDOW *win);