Removed lines of asterisks from function headers; made spacing more

consistent; minor code cleanups.
This commit is contained in:
William McBrine
2006-01-28 19:31:00 +00:00
parent add8dc21fd
commit 62b6ff87e3
40 changed files with 359 additions and 982 deletions

View File

@@ -39,7 +39,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_addch = "$Id: addch.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_addch = "$Id: addch.c,v 1.10 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -132,27 +132,21 @@ char *rcsid_addch = "$Id: addch.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL addch(const chtype ch)
/***********************************************************************/
int PDC_CDECL addch(const chtype ch)
{
PDC_LOG(("addch() - called: ch=%x\n", ch));
return PDC_chadd(stdscr, ch, (bool)(!(SP->raw_out)), TRUE);
}
/***********************************************************************/
int PDC_CDECL waddch(WINDOW *win, const chtype ch)
/***********************************************************************/
int PDC_CDECL waddch(WINDOW *win, const chtype ch)
{
PDC_LOG(("waddch() - called: win=%x ch=%x\n", win, ch));
return PDC_chadd(win, ch, (bool)(!(SP->raw_out)), TRUE);
}
/***********************************************************************/
int PDC_CDECL mvaddch(int y, int x, const chtype ch)
/***********************************************************************/
int PDC_CDECL mvaddch(int y, int x, const chtype ch)
{
PDC_LOG(("mvaddch() - called: y=%d x=%d ch=%x\n", y, x, ch));
@@ -162,9 +156,7 @@ int PDC_CDECL mvaddch(int y, int x, const chtype ch)
return PDC_chadd(stdscr, ch, (bool)(!(SP->raw_out)), TRUE);
}
/***********************************************************************/
int PDC_CDECL mvwaddch(WINDOW *win, int y, int x, const chtype ch)
/***********************************************************************/
int PDC_CDECL mvwaddch(WINDOW *win, int y, int x, const chtype ch)
{
PDC_LOG(("mvwaddch() - called: win=%x y=%d x=%d ch=%d\n",
win, y, x, ch));
@@ -175,9 +167,7 @@ int PDC_CDECL mvwaddch(WINDOW *win, int y, int x, const chtype ch)
return PDC_chadd(win, ch, (bool)(!(SP->raw_out)), TRUE);
}
/***********************************************************************/
int PDC_CDECL echochar(const chtype ch)
/***********************************************************************/
int PDC_CDECL echochar(const chtype ch)
{
PDC_LOG(("echochar() - called: ch=%x\n", ch));
@@ -187,9 +177,7 @@ int PDC_CDECL echochar(const chtype ch)
return refresh();
}
/***********************************************************************/
int PDC_CDECL wechochar(WINDOW *win, const chtype ch)
/***********************************************************************/
int PDC_CDECL wechochar(WINDOW *win, const chtype ch)
{
PDC_LOG(("wechochar() - called: win=%x ch=%x\n", win, ch));

View File

@@ -40,7 +40,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_addchstr = "$Id: addchstr.c,v 1.15 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_addchstr = "$Id: addchstr.c,v 1.16 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -90,36 +90,28 @@ char *rcsid_addchstr = "$Id: addchstr.c,v 1.15 2006/01/28 16:53:26 wmcbrine Exp
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL addchstr(const chtype *ch)
/***********************************************************************/
int PDC_CDECL addchstr(const chtype *ch)
{
PDC_LOG(("addchstr() - called\n"));
return waddchnstr(stdscr, ch, -1);
}
/***********************************************************************/
int PDC_CDECL addchnstr(const chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL addchnstr(const chtype *ch, int n)
{
PDC_LOG(("addchnstr() - called\n"));
return waddchnstr(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL waddchstr(WINDOW *win, const chtype *ch)
/***********************************************************************/
int PDC_CDECL waddchstr(WINDOW *win, const chtype *ch)
{
PDC_LOG(("waddchstr() - called: win=%x\n", win));
return waddchnstr(win, ch, -1);
}
/***********************************************************************/
int PDC_CDECL waddchnstr(WINDOW *win, const chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL waddchnstr(WINDOW *win, const chtype *ch, int n)
{
int y, x, maxx, minx;
chtype *ptr;
@@ -167,9 +159,7 @@ int PDC_CDECL waddchnstr(WINDOW *win, const chtype *ch, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvaddchstr(int y, int x, const chtype *ch)
/***********************************************************************/
int PDC_CDECL mvaddchstr(int y, int x, const chtype *ch)
{
PDC_LOG(("mvaddchstr() - called: y %d x %d\n", y, x));
@@ -179,9 +169,7 @@ int PDC_CDECL mvaddchstr(int y, int x, const chtype *ch)
return waddchnstr(stdscr, ch, -1);
}
/***********************************************************************/
int PDC_CDECL mvaddchnstr(int y, int x, const chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL mvaddchnstr(int y, int x, const chtype *ch, int n)
{
PDC_LOG(("mvaddchnstr() - called: y %d x %d n %d\n", y, x, n));
@@ -191,9 +179,7 @@ int PDC_CDECL mvaddchnstr(int y, int x, const chtype *ch, int n)
return waddchnstr(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL mvwaddchstr(WINDOW *win, int y, int x, const chtype *ch)
/***********************************************************************/
int PDC_CDECL mvwaddchstr(WINDOW *win, int y, int x, const chtype *ch)
{
PDC_LOG(("waddchstr() - called:\n"));
@@ -203,10 +189,8 @@ int PDC_CDECL mvwaddchstr(WINDOW *win, int y, int x, const chtype *ch)
return waddchnstr(win, ch, -1);
}
/***********************************************************************/
int PDC_CDECL mvwaddchnstr(WINDOW *win, int y, int x,
const chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL mvwaddchnstr(WINDOW *win, int y, int x,
const chtype *ch, int n)
{
PDC_LOG(("mvwaddchnstr() - called: y %d x %d n %d \n", y, x, n));

View File

@@ -41,7 +41,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_addstr = "$Id: addstr.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_addstr = "$Id: addstr.c,v 1.10 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -96,36 +96,28 @@ char *rcsid_addstr = "$Id: addstr.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL addstr(const char *str)
/***********************************************************************/
int PDC_CDECL addstr(const char *str)
{
PDC_LOG(("addstr() - called: string=\"%s\"\n", str));
return waddnstr(stdscr, str, -1);
}
/***********************************************************************/
int PDC_CDECL addnstr(const char *str, int n)
/***********************************************************************/
int PDC_CDECL addnstr(const char *str, int n)
{
PDC_LOG(("addnstr() - called: string=\"%s\" n %d \n", str, n));
return waddnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL waddstr(WINDOW *win, const char *str)
/***********************************************************************/
int PDC_CDECL waddstr(WINDOW *win, const char *str)
{
PDC_LOG(("waddstr() - called: string=\"%s\"\n", str));
return waddnstr(win, str, -1);
}
/***********************************************************************/
int PDC_CDECL waddnstr(WINDOW *win, const char *str, int n)
/***********************************************************************/
int PDC_CDECL waddnstr(WINDOW *win, const char *str, int n)
{
int i, ic;
@@ -148,9 +140,7 @@ int PDC_CDECL waddnstr(WINDOW *win, const char *str, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvaddstr(int y, int x, const char *str)
/***********************************************************************/
int PDC_CDECL mvaddstr(int y, int x, const char *str)
{
PDC_LOG(("mvaddstr() - called: y %d x %d string=\"%s\"\n", y, x, str));
@@ -160,9 +150,7 @@ int PDC_CDECL mvaddstr(int y, int x, const char *str)
return waddnstr(stdscr, str, -1);
}
/***********************************************************************/
int PDC_CDECL mvaddnstr(int y, int x, const char *str, int n)
/***********************************************************************/
int PDC_CDECL mvaddnstr(int y, int x, const char *str, int n)
{
PDC_LOG(("mvaddnstr() - called: y %d x %d string=\"%s\" n %d \n",
y, x, str, n));
@@ -173,9 +161,7 @@ int PDC_CDECL mvaddnstr(int y, int x, const char *str, int n)
return waddnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL mvwaddstr(WINDOW *win, int y, int x, const char *str)
/***********************************************************************/
int PDC_CDECL mvwaddstr(WINDOW *win, int y, int x, const char *str)
{
PDC_LOG(("mvwaddstr() - called: string=\"%s\"\n", str));
@@ -185,10 +171,8 @@ int PDC_CDECL mvwaddstr(WINDOW *win, int y, int x, const char *str)
return waddnstr(win, str, -1);
}
/***********************************************************************/
int PDC_CDECL mvwaddnstr(WINDOW *win, int y, int x,
const char *str, int n)
/***********************************************************************/
int PDC_CDECL mvwaddnstr(WINDOW *win, int y, int x,
const char *str, int n)
{
PDC_LOG(("mvwaddnstr() - called: y %d x %d string=\"%s\" n %d \n",
y, x, str, n));

View File

@@ -42,7 +42,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_attr = "$Id: attr.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_attr = "$Id: attr.c,v 1.13 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -119,18 +119,14 @@ char *rcsid_attr = "$Id: attr.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL attroff(chtype attrs)
/***********************************************************************/
int PDC_CDECL attroff(chtype attrs)
{
PDC_LOG(("attroff() - called\n"));
return wattroff(stdscr, attrs);
}
/***********************************************************************/
int PDC_CDECL wattroff(WINDOW *win, chtype attrs)
/***********************************************************************/
int PDC_CDECL wattroff(WINDOW *win, chtype attrs)
{
PDC_LOG(("wattroff() - called\n"));
@@ -142,18 +138,14 @@ int PDC_CDECL wattroff(WINDOW *win, chtype attrs)
return OK;
}
/***********************************************************************/
int PDC_CDECL attron(chtype attrs)
/***********************************************************************/
int PDC_CDECL attron(chtype attrs)
{
PDC_LOG(("attron() - called\n"));
return wattron(stdscr, attrs);
}
/***********************************************************************/
int PDC_CDECL wattron(WINDOW *win, chtype attrs)
/***********************************************************************/
int PDC_CDECL wattron(WINDOW *win, chtype attrs)
{
chtype newcolr, oldcolr;
chtype newattr, oldattr;
@@ -178,18 +170,14 @@ int PDC_CDECL wattron(WINDOW *win, chtype attrs)
return OK;
}
/***********************************************************************/
int PDC_CDECL attrset(chtype attrs)
/***********************************************************************/
int PDC_CDECL attrset(chtype attrs)
{
PDC_LOG(("attrset() - called\n"));
return wattrset(stdscr, attrs);
}
/***********************************************************************/
int PDC_CDECL wattrset(WINDOW *win, chtype attrs)
/***********************************************************************/
int PDC_CDECL wattrset(WINDOW *win, chtype attrs)
{
PDC_LOG(("wattrset() - called\n"));
@@ -201,61 +189,47 @@ int PDC_CDECL wattrset(WINDOW *win, chtype attrs)
return OK;
}
/***********************************************************************/
int PDC_CDECL standend(void)
/***********************************************************************/
int PDC_CDECL standend(void)
{
PDC_LOG(("standend() - called\n"));
return wattrset(stdscr, A_NORMAL);
}
/***********************************************************************/
int PDC_CDECL standout(void)
/***********************************************************************/
int PDC_CDECL standout(void)
{
PDC_LOG(("standout() - called\n"));
return wattrset(stdscr, A_STANDOUT);
}
/***********************************************************************/
int PDC_CDECL wstandend(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wstandend(WINDOW *win)
{
PDC_LOG(("wstandend() - called\n"));
return wattrset(win, A_NORMAL);
}
/***********************************************************************/
int PDC_CDECL wstandout(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wstandout(WINDOW *win)
{
PDC_LOG(("wstandout() - called\n"));
return wattrset(win, A_STANDOUT);
}
/***********************************************************************/
chtype PDC_CDECL getattrs(WINDOW *win)
/***********************************************************************/
chtype PDC_CDECL getattrs(WINDOW *win)
{
return win ? win->_attrs : 0;
}
/***********************************************************************/
int PDC_CDECL color_set(short color_pair, void *opts)
/***********************************************************************/
int PDC_CDECL color_set(short color_pair, void *opts)
{
PDC_LOG(("color_set() - called\n"));
return wcolor_set(stdscr, color_pair, opts);
}
/***********************************************************************/
int PDC_CDECL wcolor_set(WINDOW *win, short color_pair, void *opts)
/***********************************************************************/
int PDC_CDECL wcolor_set(WINDOW *win, short color_pair, void *opts)
{
PDC_LOG(("wcolor_set() - called\n"));

View File

@@ -32,7 +32,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_beep = "$Id: beep.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_beep = "$Id: beep.c,v 1.9 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -65,9 +65,7 @@ char *rcsid_beep = "$Id: beep.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL beep(void)
/***********************************************************************/
int PDC_CDECL beep(void)
{
PDC_LOG(("beep() - called\n"));
@@ -82,9 +80,7 @@ int PDC_CDECL beep(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL flash(void)
/***********************************************************************/
int PDC_CDECL flash(void)
{
PDC_LOG(("flash() - called\n"));

View File

@@ -30,7 +30,7 @@
#undef wbkgdset
#ifdef PDCDEBUG
char *rcsid_bkgd = "$Id: bkgd.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_bkgd = "$Id: bkgd.c,v 1.10 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -92,34 +92,26 @@ char *rcsid_bkgd = "$Id: bkgd.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL bkgd(chtype ch)
/***********************************************************************/
int PDC_CDECL bkgd(chtype ch)
{
PDC_LOG(("bkgd() - called\n"));
return wbkgd(stdscr, ch);
}
/***********************************************************************/
void PDC_CDECL bkgdset(chtype ch)
/***********************************************************************/
void PDC_CDECL bkgdset(chtype ch)
{
PDC_LOG(("bkgdset() - called\n"));
wbkgdset(stdscr, ch);
}
/***********************************************************************/
chtype PDC_CDECL getbkgd(WINDOW *win)
/***********************************************************************/
chtype PDC_CDECL getbkgd(WINDOW *win)
{
return win ? win->_bkgd : (chtype)ERR;
}
/***********************************************************************/
int PDC_CDECL wbkgd(WINDOW *win, chtype ch)
/***********************************************************************/
int PDC_CDECL wbkgd(WINDOW *win, chtype ch)
{
int x, y;
chtype oldcolr, oldch, newcolr, newch, colr, attr;
@@ -206,9 +198,7 @@ int PDC_CDECL wbkgd(WINDOW *win, chtype ch)
return OK;
}
/***********************************************************************/
void PDC_CDECL wbkgdset(WINDOW *win, chtype ch)
/***********************************************************************/
void PDC_CDECL wbkgdset(WINDOW *win, chtype ch)
{
chtype bkgdattr;

View File

@@ -43,7 +43,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_border = "$Id: border.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_border = "$Id: border.c,v 1.13 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -124,9 +124,7 @@ char *rcsid_border = "$Id: border.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
current background of win, as set by wbkgd(), should by combined with
it. Attributes set explicitly in ch take precedence. */
/***********************************************************************/
chtype PDC_attr_passthru(WINDOW *win, chtype ch)
/***********************************************************************/
{
chtype attr, bktmp;
@@ -162,11 +160,8 @@ chtype PDC_attr_passthru(WINDOW *win, chtype ch)
return ch;
}
/***********************************************************************/
int PDC_CDECL wborder(WINDOW *win, chtype ls, chtype rs,
chtype ts, chtype bs, chtype tl,
chtype tr, chtype bl, chtype br)
/***********************************************************************/
int PDC_CDECL wborder(WINDOW *win, chtype ls, chtype rs, chtype ts,
chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
{
int ymax, xmax;
int ymin, xmin;
@@ -227,19 +222,15 @@ int PDC_CDECL wborder(WINDOW *win, chtype ls, chtype rs,
return OK;
}
/***********************************************************************/
int PDC_CDECL border(chtype ls, chtype rs, chtype ts, chtype bs,
chtype tl, chtype tr, chtype bl, chtype br)
/***********************************************************************/
int PDC_CDECL 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 PDC_CDECL box(WINDOW *win, chtype verch, chtype horch)
/***********************************************************************/
int PDC_CDECL box(WINDOW *win, chtype verch, chtype horch)
{
PDC_LOG(("box() - called\n"));
@@ -249,27 +240,21 @@ int PDC_CDECL box(WINDOW *win, chtype verch, chtype horch)
return wborder(win, verch, verch, horch, horch, 0, 0, 0, 0);
}
/***********************************************************************/
int PDC_CDECL hline(chtype ch, int n)
/***********************************************************************/
int PDC_CDECL hline(chtype ch, int n)
{
PDC_LOG(("hline() - called\n"));
return whline(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL vline(chtype ch, int n)
/***********************************************************************/
int PDC_CDECL vline(chtype ch, int n)
{
PDC_LOG(("vline() - called\n"));
return wvline(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL whline(WINDOW *win, chtype ch, int n)
/***********************************************************************/
int PDC_CDECL whline(WINDOW *win, chtype ch, int n)
{
int startpos, endpos;
@@ -308,9 +293,7 @@ int PDC_CDECL whline(WINDOW *win, chtype ch, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL wvline(WINDOW *win, chtype ch, int n)
/***********************************************************************/
int PDC_CDECL wvline(WINDOW *win, chtype ch, int n)
{
int endpos;
@@ -347,9 +330,7 @@ int PDC_CDECL wvline(WINDOW *win, chtype ch, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvhline(int y, int x, chtype ch, int n)
/***********************************************************************/
int PDC_CDECL mvhline(int y, int x, chtype ch, int n)
{
PDC_LOG(("mvhline() - called\n"));
@@ -359,9 +340,7 @@ int PDC_CDECL mvhline(int y, int x, chtype ch, int n)
return whline(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL mvvline(int y, int x, chtype ch, int n)
/***********************************************************************/
int PDC_CDECL mvvline(int y, int x, chtype ch, int n)
{
PDC_LOG(("mvvline() - called\n"));
@@ -371,9 +350,7 @@ int PDC_CDECL mvvline(int y, int x, chtype ch, int n)
return wvline(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
/***********************************************************************/
int PDC_CDECL mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
{
PDC_LOG(("mvwhline() - called\n"));
@@ -383,9 +360,7 @@ int PDC_CDECL mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
return whline(win, ch, n);
}
/***********************************************************************/
int PDC_CDECL mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
/***********************************************************************/
int PDC_CDECL mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
{
PDC_LOG(("mvwvline() - called\n"));
@@ -398,10 +373,7 @@ int PDC_CDECL mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
/* PDC_lineattr() -- add the specified attribute to a line of chtypes.
Used only as the core routine for the next three functions. */
/***********************************************************************/
int PDC_CDECL PDC_lineattr(WINDOW *win, int n, bool state,
chtype attr)
/***********************************************************************/
int PDC_CDECL PDC_lineattr(WINDOW *win, int n, bool state, chtype attr)
{
int endpos;
@@ -439,27 +411,21 @@ int PDC_CDECL PDC_lineattr(WINDOW *win, int n, bool state,
return OK;
}
/***********************************************************************/
int PDC_CDECL PDC_wunderline(WINDOW *win, int n, bool state)
/***********************************************************************/
int PDC_CDECL PDC_wunderline(WINDOW *win, int n, bool state)
{
PDC_LOG(("PDC_wunderline() - called\n"));
return PDC_lineattr(win, n, state, A_UNDERLINE);
}
/***********************************************************************/
int PDC_CDECL PDC_wleftline(WINDOW *win, int n, bool state)
/***********************************************************************/
int PDC_CDECL PDC_wleftline(WINDOW *win, int n, bool state)
{
PDC_LOG(("PDC_wleftline() - called\n"));
return PDC_lineattr(win, n, state, A_LEFTLINE);
}
/***********************************************************************/
int PDC_CDECL PDC_wrightline(WINDOW *win, int n, bool state)
/***********************************************************************/
int PDC_CDECL PDC_wrightline(WINDOW *win, int n, bool state)
{
PDC_LOG(("PDC_wrightline() - called\n"));

View File

@@ -37,7 +37,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_clear = "$Id: clear.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_clear = "$Id: clear.c,v 1.10 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -101,9 +101,7 @@ char *rcsid_clear = "$Id: clear.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL clear(void)
/***********************************************************************/
int PDC_CDECL clear(void)
{
PDC_LOG(("clear() - called\n"));
@@ -114,9 +112,7 @@ int PDC_CDECL clear(void)
return erase();
}
/***********************************************************************/
int PDC_CDECL wclear(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wclear(WINDOW *win)
{
PDC_LOG(("wclear() - called\n"));
@@ -127,16 +123,12 @@ int PDC_CDECL wclear(WINDOW *win)
return werase(win);
}
/***********************************************************************/
int PDC_CDECL erase(void)
/***********************************************************************/
int PDC_CDECL erase(void)
{
return werase(stdscr);
}
/***********************************************************************/
int PDC_CDECL werase(WINDOW *win)
/***********************************************************************/
int PDC_CDECL werase(WINDOW *win)
{
PDC_LOG(("werase() - called\n"));
@@ -147,16 +139,12 @@ int PDC_CDECL werase(WINDOW *win)
return wclrtobot(win);
}
/***********************************************************************/
int PDC_CDECL clrtobot(void)
/***********************************************************************/
int PDC_CDECL clrtobot(void)
{
return wclrtobot(stdscr);
}
/***********************************************************************/
int PDC_CDECL wclrtobot(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wclrtobot(WINDOW *win)
{
int savey=win->_cury;
int savex=win->_curx;
@@ -166,7 +154,7 @@ int PDC_CDECL wclrtobot(WINDOW *win)
if (win == (WINDOW *)NULL)
return ERR;
/* should this involve scrolling region somehow ? */
/* should this involve scrolling region somehow ? */
if (win->_cury + 1 < win->_maxy)
{
@@ -183,16 +171,12 @@ int PDC_CDECL wclrtobot(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL clrtoeol(void)
/***********************************************************************/
int PDC_CDECL clrtoeol(void)
{
return wclrtoeol(stdscr);
}
/***********************************************************************/
int PDC_CDECL wclrtoeol(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wclrtoeol(WINDOW *win)
{
int x, y, minx;
chtype blank, *ptr;

View File

@@ -42,7 +42,7 @@
static void PDC_init_pair(short, short, short);
#ifdef PDCDEBUG
char *rcsid_color = "$Id: color.c,v 1.24 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_color = "$Id: color.c,v 1.25 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -176,9 +176,7 @@ unsigned char atrtab[MAX_ATRTAB] =
unsigned char colorset[PDC_COLOR_PAIRS];
/***********************************************************************/
chtype PDC_CDECL COLOR_PAIR(int n)
/***********************************************************************/
chtype PDC_CDECL COLOR_PAIR(int n)
{
#ifdef CHTYPE_LONG
return (chtype)n << 24;
@@ -187,9 +185,7 @@ chtype PDC_CDECL COLOR_PAIR(int n)
#endif
}
/***********************************************************************/
int PDC_CDECL PAIR_NUMBER(chtype value)
/***********************************************************************/
int PDC_CDECL PAIR_NUMBER(chtype value)
{
#ifdef CHTYPE_LONG
return (value & A_COLOR) >> 24;
@@ -198,9 +194,7 @@ int PDC_CDECL PAIR_NUMBER(chtype value)
#endif
}
/***********************************************************************/
int PDC_CDECL start_color(void)
/***********************************************************************/
int PDC_CDECL start_color(void)
{
PDC_LOG(("start_color() - called\n"));
@@ -219,10 +213,7 @@ int PDC_CDECL start_color(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL init_pair(short colorpair, short foreground,
short background)
/***********************************************************************/
int PDC_CDECL init_pair(short colorpair, short foreground, short background)
{
#if defined(CHTYPE_LONG) && !defined(XCURSES)
# define USE_PDC_INIT
@@ -254,43 +245,34 @@ int PDC_CDECL init_pair(short colorpair, short foreground,
# endif
#endif
/*
* To allow the PDC_PRESERVE_SCREEN option to work, we only reset
* curscr if this call to init_pair() alters a color pair created
* by the user.
*/
/* To allow the PDC_PRESERVE_SCREEN option to work, we only
reset curscr if this call to init_pair() alters a color pair
created by the user. */
if (colorset[colorpair])
{
if ( oldforeground != foreground || oldbackground != background )
if (oldforeground != foreground || oldbackground != background)
curscr->_clear = TRUE;
}
colorset[colorpair] = TRUE;
return OK;
}
/***********************************************************************/
bool PDC_CDECL has_colors(void)
/***********************************************************************/
bool PDC_CDECL has_colors(void)
{
PDC_LOG(("has_colors() - called\n"));
return SP->mono ? FALSE : TRUE;
}
/***********************************************************************/
int PDC_CDECL init_color(short color, short red, short green,
short blue)
/***********************************************************************/
int PDC_CDECL init_color(short color, short red, short green, short blue)
{
PDC_LOG(("init_color() - called\n"));
return ERR;
}
/***********************************************************************/
int PDC_CDECL color_content(short color, short *red, short *green,
short *blue)
/***********************************************************************/
int PDC_CDECL color_content(short color, short *red, short *green, short *blue)
{
PDC_LOG(("color_content() - called\n"));
@@ -308,19 +290,15 @@ int PDC_CDECL color_content(short color, short *red, short *green,
return OK;
}
/***********************************************************************/
bool PDC_CDECL can_change_color(void)
/***********************************************************************/
bool PDC_CDECL can_change_color(void)
{
PDC_LOG(("can_change_color() - called\n"));
return FALSE;
}
/***********************************************************************/
int PDC_CDECL pair_content(short colorpair, short *foreground,
short *background)
/***********************************************************************/
int PDC_CDECL pair_content(short colorpair, short *foreground,
short *background)
{
PDC_LOG(("pair_content() - called\n"));
@@ -334,9 +312,7 @@ int PDC_CDECL pair_content(short colorpair, short *foreground,
return OK;
}
/***********************************************************************/
int PDC_CDECL PDC_set_line_color(short color)
/***********************************************************************/
int PDC_CDECL PDC_set_line_color(short color)
{
if (color >= COLORS || color < 0)
return ERR;
@@ -347,9 +323,8 @@ int PDC_CDECL PDC_set_line_color(short color)
}
#if defined(CHTYPE_LONG)
/***********************************************************************/
void PDC_init_atrtab(void)
/***********************************************************************/
void PDC_init_atrtab(void)
{
int i, orig_fore, orig_back;
@@ -370,9 +345,7 @@ void PDC_init_atrtab(void)
PDC_init_pair(PDC_COLOR_PAIRS, orig_back, orig_fore);
}
/***********************************************************************/
static void PDC_init_pair(short pairnum, short fg, short bg)
/***********************************************************************/
static void PDC_init_pair(short pairnum, short fg, short bg)
{
unsigned char att, temp_bg;
chtype i;
@@ -398,4 +371,5 @@ static void PDC_init_pair(short pairnum, short fg, short bg)
atrtab[(pairnum * PDC_OFFSET) + i] = att;
}
}
#endif

View File

@@ -36,7 +36,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_delch = "$Id: delch.c,v 1.8 2006/01/28 18:19:51 wmcbrine Exp $";
char *rcsid_delch = "$Id: delch.c,v 1.9 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -122,9 +122,7 @@ int PDC_CDECL wdelch(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvdelch(int y, int x)
/***********************************************************************/
int PDC_CDECL mvdelch(int y, int x)
{
PDC_LOG(("mvdelch() - called\n"));
@@ -134,9 +132,7 @@ int PDC_CDECL mvdelch(int y, int x)
return wdelch(stdscr);
}
/***********************************************************************/
int PDC_CDECL mvwdelch(WINDOW *win, int y, int x)
/***********************************************************************/
int PDC_CDECL mvwdelch(WINDOW *win, int y, int x)
{
PDC_LOG(("mvwdelch() - called\n"));

View File

@@ -36,7 +36,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_deleteln = "$Id: deleteln.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_deleteln = "$Id: deleteln.c,v 1.9 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -88,18 +88,14 @@ char *rcsid_deleteln = "$Id: deleteln.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL deleteln(void)
/***********************************************************************/
int PDC_CDECL deleteln(void)
{
PDC_LOG(("deleteln() - called\n"));
return wdeleteln(stdscr);
}
/***********************************************************************/
int PDC_CDECL wdeleteln(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wdeleteln(WINDOW *win)
{
chtype blank;
chtype *temp;
@@ -140,18 +136,14 @@ int PDC_CDECL wdeleteln(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL insdelln(int n)
/***********************************************************************/
int PDC_CDECL insdelln(int n)
{
PDC_LOG(("insdelln() - called\n"));
return winsdelln(stdscr, n);
}
/***********************************************************************/
int PDC_CDECL winsdelln(WINDOW *win, int n)
/***********************************************************************/
int PDC_CDECL winsdelln(WINDOW *win, int n)
{
int i;
@@ -177,9 +169,7 @@ int PDC_CDECL winsdelln(WINDOW *win, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL winsertln(WINDOW *win)
/***********************************************************************/
int PDC_CDECL winsertln(WINDOW *win)
{
chtype blank;
chtype *temp;
@@ -217,18 +207,14 @@ int PDC_CDECL winsertln(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL insertln(void)
/***********************************************************************/
int PDC_CDECL insertln(void)
{
PDC_LOG(("insertln() - called\n"));
return winsertln(stdscr);
}
/***********************************************************************/
int PDC_CDECL mvwinsertln(WINDOW *win, int y, int x)
/***********************************************************************/
int PDC_CDECL mvwinsertln(WINDOW *win, int y, int x)
{
PDC_LOG(("mvwinsertln() - called\n"));

View File

@@ -38,7 +38,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_getch = "$Id: getch.c,v 1.18 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_getch = "$Id: getch.c,v 1.19 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -113,18 +113,14 @@ char *rcsid_getch = "$Id: getch.c,v 1.18 2006/01/28 16:53:26 wmcbrine Exp $";
#define getch PDC_getch
#define ungetch PDC_ungetch
/***********************************************************************/
int PDC_CDECL PDC_getch(void)
/***********************************************************************/
int PDC_CDECL PDC_getch(void)
{
PDC_LOG(("getch() - called\n"));
return wgetch(stdscr);
}
/***********************************************************************/
int PDC_CDECL wgetch(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wgetch(WINDOW *win)
{
extern int c_pindex; /* putter index */
extern int c_gindex; /* getter index */
@@ -257,9 +253,7 @@ int PDC_CDECL wgetch(WINDOW *win)
}
}
/***********************************************************************/
int PDC_CDECL mvgetch(int y, int x)
/***********************************************************************/
int PDC_CDECL mvgetch(int y, int x)
{
PDC_LOG(("mvgetch() - called\n"));
@@ -269,9 +263,7 @@ int PDC_CDECL mvgetch(int y, int x)
return wgetch(stdscr);
}
/***********************************************************************/
int PDC_CDECL mvwgetch(WINDOW *win, int y, int x)
/***********************************************************************/
int PDC_CDECL mvwgetch(WINDOW *win, int y, int x)
{
PDC_LOG(("mvwgetch() - called\n"));
@@ -281,9 +273,7 @@ int PDC_CDECL mvwgetch(WINDOW *win, int y, int x)
return wgetch(win);
}
/***********************************************************************/
int PDC_CDECL PDC_ungetch(int ch)
/***********************************************************************/
int PDC_CDECL PDC_ungetch(int ch)
{
extern int c_ungind; /* ungetch() push index */
extern int c_ungch[NUNGETCH]; /* array of ungotten chars */

View File

@@ -43,7 +43,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_getstr = "$Id: getstr.c,v 1.16 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_getstr = "$Id: getstr.c,v 1.17 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -102,27 +102,21 @@ char *rcsid_getstr = "$Id: getstr.c,v 1.16 2006/01/28 16:53:26 wmcbrine Exp $";
#define MAXLINE 255
/***********************************************************************/
int PDC_CDECL getstr(char *str)
/***********************************************************************/
{
PDC_LOG(("getstr() - called\n"));
return wgetnstr(stdscr, str, MAXLINE);
}
/***********************************************************************/
int PDC_CDECL wgetstr(WINDOW *win, char *str)
/***********************************************************************/
{
PDC_LOG(("wgetstr() - called\n"));
return wgetnstr(win, str, MAXLINE);
}
/***********************************************************************/
int PDC_CDECL mvgetstr(int y, int x, char *str)
/***********************************************************************/
{
PDC_LOG(("mvgetstr() - called\n"));
@@ -132,9 +126,7 @@ int PDC_CDECL mvgetstr(int y, int x, char *str)
return wgetnstr(stdscr, str, MAXLINE);
}
/***********************************************************************/
int PDC_CDECL mvwgetstr(WINDOW *win, int y, int x, char *str)
/***********************************************************************/
{
PDC_LOG(("mvwgetstr() - called\n"));
@@ -144,18 +136,14 @@ int PDC_CDECL mvwgetstr(WINDOW *win, int y, int x, char *str)
return wgetnstr(win, str, MAXLINE);
}
/***********************************************************************/
int PDC_CDECL getnstr(char *str, int n)
/***********************************************************************/
{
PDC_LOG(("getnstr() - called\n"));
return wgetnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL wgetnstr(WINDOW *win, char *str, int n)
/***********************************************************************/
{
int ch, i, num, t, x, chars;
char *p;
@@ -296,9 +284,7 @@ int PDC_CDECL wgetnstr(WINDOW *win, char *str, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvgetnstr(int y, int x, char *str, int n)
/***********************************************************************/
{
PDC_LOG(("mvgetnstr() - called\n"));
@@ -308,9 +294,7 @@ int PDC_CDECL mvgetnstr(int y, int x, char *str, int n)
return wgetnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL mvwgetnstr(WINDOW *win, int y, int x, char *str, int n)
/***********************************************************************/
{
PDC_LOG(("mvwgetnstr() - called\n"));

View File

@@ -35,7 +35,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_getyx = "$Id: getyx.c,v 1.6 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_getyx = "$Id: getyx.c,v 1.7 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -90,9 +90,7 @@ char *rcsid_getyx = "$Id: getyx.c,v 1.6 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL getbegy(WINDOW *win)
/***********************************************************************/
int PDC_CDECL getbegy(WINDOW *win)
{
PDC_LOG(("getbegy() - called\n"));
@@ -102,9 +100,7 @@ int PDC_CDECL getbegy(WINDOW *win)
return win->_begy;
}
/***********************************************************************/
int PDC_CDECL getbegx(WINDOW *win)
/***********************************************************************/
int PDC_CDECL getbegx(WINDOW *win)
{
PDC_LOG(("getbegx() - called\n"));
@@ -114,9 +110,7 @@ int PDC_CDECL getbegx(WINDOW *win)
return win->_begx;
}
/***********************************************************************/
int PDC_CDECL getpary(WINDOW *win)
/***********************************************************************/
int PDC_CDECL getpary(WINDOW *win)
{
PDC_LOG(("getpary() - called\n"));
@@ -126,9 +120,7 @@ int PDC_CDECL getpary(WINDOW *win)
return win->_pary;
}
/***********************************************************************/
int PDC_CDECL getparx(WINDOW *win)
/***********************************************************************/
int PDC_CDECL getparx(WINDOW *win)
{
PDC_LOG(("getparx() - called\n"));
@@ -138,9 +130,7 @@ int PDC_CDECL getparx(WINDOW *win)
return win->_parx;
}
/***********************************************************************/
int PDC_CDECL getmaxy(WINDOW *win)
/***********************************************************************/
int PDC_CDECL getmaxy(WINDOW *win)
{
PDC_LOG(("getmaxy() - called\n"));
@@ -150,9 +140,7 @@ int PDC_CDECL getmaxy(WINDOW *win)
return win->_maxy;
}
/***********************************************************************/
int PDC_CDECL getmaxx(WINDOW *win)
/***********************************************************************/
int PDC_CDECL getmaxx(WINDOW *win)
{
PDC_LOG(("getmaxx() - called\n"));

View File

@@ -35,7 +35,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_inch = "$Id: inch.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_inch = "$Id: inch.c,v 1.8 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -71,9 +71,7 @@ char *rcsid_inch = "$Id: inch.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
chtype PDC_CDECL winch(WINDOW *win)
/***********************************************************************/
chtype PDC_CDECL winch(WINDOW *win)
{
PDC_LOG(("winch() - called\n"));
@@ -83,18 +81,14 @@ chtype PDC_CDECL winch(WINDOW *win)
return win->_y[win->_cury][win->_curx];
}
/***********************************************************************/
chtype PDC_CDECL inch(void)
/***********************************************************************/
chtype PDC_CDECL inch(void)
{
PDC_LOG(("inch() - called\n"));
return winch(stdscr);
}
/***********************************************************************/
chtype PDC_CDECL mvinch(int y, int x)
/***********************************************************************/
chtype PDC_CDECL mvinch(int y, int x)
{
PDC_LOG(("mvinch() - called\n"));
@@ -104,9 +98,7 @@ chtype PDC_CDECL mvinch(int y, int x)
return stdscr->_y[stdscr->_cury][stdscr->_curx];
}
/***********************************************************************/
chtype PDC_CDECL mvwinch(WINDOW *win, int y, int x)
/***********************************************************************/
chtype PDC_CDECL mvwinch(WINDOW *win, int y, int x)
{
PDC_LOG(("mvwinch() - called\n"));

View File

@@ -39,7 +39,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_inchstr = "$Id: inchstr.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_inchstr = "$Id: inchstr.c,v 1.8 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -86,36 +86,28 @@ char *rcsid_inchstr = "$Id: inchstr.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL inchstr(chtype *ch)
/***********************************************************************/
int PDC_CDECL inchstr(chtype *ch)
{
PDC_LOG(("inchstr() - called\n"));
return winchnstr(stdscr, ch, stdscr->_maxx - stdscr->_curx);
}
/***********************************************************************/
int PDC_CDECL inchnstr(chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL inchnstr(chtype *ch, int n)
{
PDC_LOG(("inchnstr() - called\n"));
return winchnstr(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL winchstr(WINDOW *win, chtype *ch)
/***********************************************************************/
int PDC_CDECL winchstr(WINDOW *win, chtype *ch)
{
PDC_LOG(("winchstr() - called\n"));
return winchnstr(win, ch, win->_maxx - win->_curx);
}
/***********************************************************************/
int PDC_CDECL winchnstr(WINDOW *win, chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL winchnstr(WINDOW *win, chtype *ch, int n)
{
int i;
chtype *ptr;
@@ -138,9 +130,7 @@ int PDC_CDECL winchnstr(WINDOW *win, chtype *ch, int n)
return i;
}
/***********************************************************************/
int PDC_CDECL mvinchstr(int y, int x, chtype *ch)
/***********************************************************************/
int PDC_CDECL mvinchstr(int y, int x, chtype *ch)
{
PDC_LOG(("mvinchstr() - called: y %d x %d\n", y, x));
@@ -150,9 +140,7 @@ int PDC_CDECL mvinchstr(int y, int x, chtype *ch)
return winchnstr(stdscr, ch, stdscr->_maxx - stdscr->_curx);
}
/***********************************************************************/
int PDC_CDECL mvinchnstr(int y, int x, chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL mvinchnstr(int y, int x, chtype *ch, int n)
{
PDC_LOG(("mvinchnstr() - called: y %d x %d n %d\n", y, x, n));
@@ -162,9 +150,7 @@ int PDC_CDECL mvinchnstr(int y, int x, chtype *ch, int n)
return winchnstr(stdscr, ch, n);
}
/***********************************************************************/
int PDC_CDECL mvwinchstr(WINDOW *win, int y, int x, chtype *ch)
/***********************************************************************/
int PDC_CDECL mvwinchstr(WINDOW *win, int y, int x, chtype *ch)
{
PDC_LOG(("winchstr() - called:\n"));
@@ -174,10 +160,7 @@ int PDC_CDECL mvwinchstr(WINDOW *win, int y, int x, chtype *ch)
return winchnstr(win, ch, win->_maxx - win->_curx);
}
/***********************************************************************/
int PDC_CDECL mvwinchnstr(WINDOW *win, int y, int x,
chtype *ch, int n)
/***********************************************************************/
int PDC_CDECL 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));

View File

@@ -43,7 +43,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_initscr = "$Id: initscr.c,v 1.26 2006/01/28 18:19:51 wmcbrine Exp $";
char *rcsid_initscr = "$Id: initscr.c,v 1.27 2006/01/28 19:31:00 wmcbrine Exp $";
#else
char *_curses_notice = "PDCurses 2.7b - Public Domain 2006";
#endif
@@ -190,9 +190,7 @@ extern void (*PDC_initial_slk)(void);
**man-end**********************************************************************/
/***********************************************************************/
WINDOW* PDC_CDECL Xinitscr(int argc, char *argv[])
/***********************************************************************/
WINDOW * PDC_CDECL Xinitscr(int argc, char *argv[])
{
int i;
@@ -326,18 +324,14 @@ WINDOW* PDC_CDECL Xinitscr(int argc, char *argv[])
return stdscr;
}
/***********************************************************************/
WINDOW* PDC_CDECL initscr(void)
/***********************************************************************/
WINDOW * PDC_CDECL initscr(void)
{
PDC_LOG(("initscr() - called\n"));
return Xinitscr(0, NULL);
}
/***********************************************************************/
int PDC_CDECL endwin(void)
/***********************************************************************/
{
PDC_LOG(("endwin() - called\n"));
@@ -376,27 +370,21 @@ int PDC_CDECL endwin(void)
return OK;
}
/***********************************************************************/
bool PDC_CDECL isendwin(void)
/***********************************************************************/
bool PDC_CDECL isendwin(void)
{
PDC_LOG(("isendwin() - called\n"));
return SP->alive ? FALSE : TRUE;
}
/***********************************************************************/
SCREEN* PDC_CDECL newterm(char *type, FILE *outfd, FILE *infd)
/***********************************************************************/
SCREEN * PDC_CDECL newterm(char *type, FILE *outfd, FILE *infd)
{
PDC_LOG(("newterm() - called\n"));
return NULL;
}
/***********************************************************************/
SCREEN* PDC_CDECL set_term(SCREEN *new)
/***********************************************************************/
SCREEN * PDC_CDECL set_term(SCREEN *new)
{
PDC_LOG(("set_term() - called\n"));
@@ -405,9 +393,7 @@ SCREEN* PDC_CDECL set_term(SCREEN *new)
return SP;
}
/***********************************************************************/
void PDC_CDECL delscreen(SCREEN *sp)
/***********************************************************************/
void PDC_CDECL delscreen(SCREEN *sp)
{
PDC_LOG(("delscreen() - called\n"));
@@ -429,9 +415,7 @@ void PDC_CDECL delscreen(SCREEN *sp)
#endif
}
/***********************************************************************/
int PDC_CDECL resize_term(int nlines, int ncols)
/***********************************************************************/
int PDC_CDECL resize_term(int nlines, int ncols)
{
PDC_LOG(("resize_term() - called: nlines %d\n",nlines));
@@ -477,9 +461,7 @@ int PDC_CDECL resize_term(int nlines, int ncols)
return OK;
}
/***********************************************************************/
bool PDC_CDECL is_termresized(void)
/***********************************************************************/
bool PDC_CDECL is_termresized(void)
{
PDC_LOG(("is_termresized() - called\n"));

View File

@@ -48,7 +48,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_inopts = "$Id: inopts.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_inopts = "$Id: inopts.c,v 1.13 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -192,9 +192,7 @@ char *rcsid_inopts = "$Id: inopts.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL cbreak(void)
/***********************************************************************/
int PDC_CDECL cbreak(void)
{
PDC_LOG(("cbreak() - called\n"));
@@ -203,9 +201,7 @@ int PDC_CDECL cbreak(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL nocbreak(void)
/***********************************************************************/
int PDC_CDECL nocbreak(void)
{
PDC_LOG(("nocbreak() - called\n"));
@@ -215,9 +211,7 @@ int PDC_CDECL nocbreak(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL echo(void)
/***********************************************************************/
int PDC_CDECL echo(void)
{
PDC_LOG(("echo() - called\n"));
@@ -226,9 +220,7 @@ int PDC_CDECL echo(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL noecho(void)
/***********************************************************************/
int PDC_CDECL noecho(void)
{
PDC_LOG(("noecho() - called\n"));
@@ -237,9 +229,7 @@ int PDC_CDECL noecho(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL halfdelay(int tenths)
/***********************************************************************/
int PDC_CDECL halfdelay(int tenths)
{
PDC_LOG(("halfdelay() - called\n"));
@@ -251,9 +241,7 @@ int PDC_CDECL halfdelay(int tenths)
return OK;
}
/***********************************************************************/
int PDC_CDECL intrflush(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL intrflush(WINDOW *win, bool bf)
{
int y, maxy;
@@ -270,9 +258,7 @@ int PDC_CDECL intrflush(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
int PDC_CDECL keypad(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL keypad(WINDOW *win, bool bf)
{
PDC_LOG(("keypad() - called\n"));
@@ -284,9 +270,7 @@ int PDC_CDECL keypad(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
int PDC_CDECL meta(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL meta(WINDOW *win, bool bf)
{
PDC_LOG(("meta() - called\n"));
@@ -295,9 +279,7 @@ int PDC_CDECL meta(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
int PDC_CDECL nodelay(WINDOW *win, bool flag)
/***********************************************************************/
int PDC_CDECL nodelay(WINDOW *win, bool flag)
{
PDC_LOG(("nodelay() - called\n"));
@@ -309,18 +291,14 @@ int PDC_CDECL nodelay(WINDOW *win, bool flag)
return OK;
}
/***********************************************************************/
int PDC_CDECL notimeout(WINDOW *win, bool flag)
/***********************************************************************/
int PDC_CDECL notimeout(WINDOW *win, bool flag)
{
PDC_LOG(("notimeout() - called\n"));
return OK;
}
/***********************************************************************/
int PDC_CDECL raw(void)
/***********************************************************************/
int PDC_CDECL raw(void)
{
#ifdef OS2
# ifndef EMXVIDEO
@@ -346,9 +324,7 @@ int PDC_CDECL raw(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL noraw(void)
/***********************************************************************/
int PDC_CDECL noraw(void)
{
#ifdef OS2
# ifndef EMXVIDEO
@@ -373,23 +349,17 @@ int PDC_CDECL noraw(void)
return OK;
}
/***********************************************************************/
void PDC_CDECL noqiflush(void)
/***********************************************************************/
void PDC_CDECL noqiflush(void)
{
PDC_LOG(("noqiflush() - called\n"));
}
/***********************************************************************/
void PDC_CDECL qiflush(void)
/***********************************************************************/
void PDC_CDECL qiflush(void)
{
PDC_LOG(("qiflush() - called\n"));
}
/***********************************************************************/
int PDC_CDECL typeahead(int fildes)
/***********************************************************************/
int PDC_CDECL typeahead(int fildes)
{
PDC_LOG(("typeahead() - called\n"));
@@ -398,9 +368,7 @@ int PDC_CDECL typeahead(int fildes)
return OK;
}
/***********************************************************************/
void PDC_CDECL wtimeout(WINDOW *win, int delay)
/***********************************************************************/
void PDC_CDECL wtimeout(WINDOW *win, int delay)
{
PDC_LOG(("wtimeout() - called\n"));
@@ -434,9 +402,7 @@ void PDC_CDECL wtimeout(WINDOW *win, int delay)
}
}
/***********************************************************************/
void PDC_CDECL timeout(int delay)
/***********************************************************************/
void PDC_CDECL timeout(int delay)
{
PDC_LOG(("timeout() - called\n"));

View File

@@ -37,7 +37,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_insch = "$Id: insch.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_insch = "$Id: insch.c,v 1.9 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -126,27 +126,21 @@ char *rcsid_insch = "$Id: insch.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL insch(chtype ch)
/***********************************************************************/
int PDC_CDECL insch(chtype ch)
{
PDC_LOG(("insch() - called\n"));
return PDC_chins(stdscr, ch, (bool)(!(SP->raw_out)));
}
/***********************************************************************/
int PDC_CDECL winsch(WINDOW *win, chtype ch)
/***********************************************************************/
int PDC_CDECL winsch(WINDOW *win, chtype ch)
{
PDC_LOG(("winsch() - called\n"));
return PDC_chins(win, ch, (bool)(!(SP->raw_out)));
}
/***********************************************************************/
int PDC_CDECL mvinsch(int y, int x, chtype ch)
/***********************************************************************/
int PDC_CDECL mvinsch(int y, int x, chtype ch)
{
PDC_LOG(("mvinsch() - called\n"));
@@ -156,9 +150,7 @@ int PDC_CDECL mvinsch(int y, int x, chtype ch)
return PDC_chins(stdscr, ch, (bool)(!(SP->raw_out)));
}
/***********************************************************************/
int PDC_CDECL mvwinsch(WINDOW *win, int y, int x, chtype ch)
/***********************************************************************/
int PDC_CDECL mvwinsch(WINDOW *win, int y, int x, chtype ch)
{
PDC_LOG(("mvwinsch() - called\n"));

View File

@@ -42,7 +42,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_insstr = "$Id: insstr.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_insstr = "$Id: insstr.c,v 1.13 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -99,36 +99,28 @@ char *rcsid_insstr = "$Id: insstr.c,v 1.12 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL insstr(const char *str)
/***********************************************************************/
int PDC_CDECL insstr(const char *str)
{
PDC_LOG(("insstr() - called: string=\"%s\"\n", str));
return winsnstr(stdscr, str, -1);
}
/***********************************************************************/
int PDC_CDECL insnstr(const char *str, int n)
/***********************************************************************/
int PDC_CDECL insnstr(const char *str, int n)
{
PDC_LOG(("insnstr() - called: string=\"%s\" n %d \n", str, n));
return winsnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL winsstr(WINDOW *win, const char *str)
/***********************************************************************/
int PDC_CDECL winsstr(WINDOW *win, const char *str)
{
PDC_LOG(("winsstr() - called: string=\"%s\"\n", str));
return winsnstr(win, str, -1);
}
/***********************************************************************/
int PDC_CDECL winsnstr(WINDOW *win, const char *str, int n)
/***********************************************************************/
int PDC_CDECL winsnstr(WINDOW *win, const char *str, int n)
{
int ic;
@@ -151,9 +143,7 @@ int PDC_CDECL winsnstr(WINDOW *win, const char *str, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvinsstr(int y, int x, const char *str)
/***********************************************************************/
int PDC_CDECL mvinsstr(int y, int x, const char *str)
{
PDC_LOG(("mvinsstr() - called: y %d x %d string=\"%s\"\n",
y, x, str));
@@ -164,9 +154,7 @@ int PDC_CDECL mvinsstr(int y, int x, const char *str)
return winsnstr(stdscr, str, -1);
}
/***********************************************************************/
int PDC_CDECL mvinsnstr(int y, int x, const char *str, int n)
/***********************************************************************/
int PDC_CDECL mvinsnstr(int y, int x, const char *str, int n)
{
PDC_LOG(("mvinsnstr() - called: y %d x %d string=\"%s\" n %d \n",
y, x, str, n));
@@ -177,9 +165,7 @@ int PDC_CDECL mvinsnstr(int y, int x, const char *str, int n)
return winsnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL mvwinsstr(WINDOW *win, int y, int x, const char *str)
/***********************************************************************/
int PDC_CDECL mvwinsstr(WINDOW *win, int y, int x, const char *str)
{
PDC_LOG(("mvwinsstr() - called: string=\"%s\"\n", str));
@@ -189,10 +175,7 @@ int PDC_CDECL mvwinsstr(WINDOW *win, int y, int x, const char *str)
return winsnstr(win, str, -1);
}
/***********************************************************************/
int PDC_CDECL mvwinsnstr(WINDOW *win,int y, int x,
const char *str, int n)
/***********************************************************************/
int PDC_CDECL 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",
y, x, str, n));

View File

@@ -42,7 +42,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_instr = "$Id: instr.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_instr = "$Id: instr.c,v 1.9 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -88,36 +88,28 @@ char *rcsid_instr = "$Id: instr.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL instr(char *str)
/***********************************************************************/
int PDC_CDECL instr(char *str)
{
PDC_LOG(("instr() - called: string=\"%s\"\n", str));
return winnstr(stdscr, str, stdscr->_maxx);
}
/***********************************************************************/
int PDC_CDECL innstr(char *str, int n)
/***********************************************************************/
int PDC_CDECL innstr(char *str, int n)
{
PDC_LOG(("innstr() - called: n %d \n", n));
return winnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL winstr(WINDOW *win, char *str)
/***********************************************************************/
int PDC_CDECL winstr(WINDOW *win, char *str)
{
PDC_LOG(("winstr() - called: \n"));
return winnstr(win, str, win->_maxx);
}
/***********************************************************************/
int PDC_CDECL winnstr(WINDOW *win, char *str, int n)
/***********************************************************************/
int PDC_CDECL winnstr(WINDOW *win, char *str, int n)
{
chtype tmp;
int oldy, oldx, imax, ic;
@@ -154,9 +146,7 @@ int PDC_CDECL winnstr(WINDOW *win, char *str, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvinstr(int y, int x, char *str)
/***********************************************************************/
int PDC_CDECL mvinstr(int y, int x, char *str)
{
PDC_LOG(("mvinstr() - called: y %d x %d \n", y, x));
@@ -166,9 +156,7 @@ int PDC_CDECL mvinstr(int y, int x, char *str)
return winnstr(stdscr, str, stdscr->_maxx);
}
/***********************************************************************/
int PDC_CDECL mvinnstr(int y, int x, char *str, int n)
/***********************************************************************/
int PDC_CDECL mvinnstr(int y, int x, char *str, int n)
{
PDC_LOG(("mvinnstr() - called: y %d x %d n %d \n", y, x, n));
@@ -178,9 +166,7 @@ int PDC_CDECL mvinnstr(int y, int x, char *str, int n)
return winnstr(stdscr, str, n);
}
/***********************************************************************/
int PDC_CDECL mvwinstr(WINDOW *win, int y, int x, char *str)
/***********************************************************************/
int PDC_CDECL mvwinstr(WINDOW *win, int y, int x, char *str)
{
PDC_LOG(("mvwinstr() - called: y %d x %d \n", y, x));
@@ -190,9 +176,7 @@ int PDC_CDECL mvwinstr(WINDOW *win, int y, int x, char *str)
return winnstr(win, str, win->_maxx);
}
/***********************************************************************/
int PDC_CDECL mvwinnstr(WINDOW *win, int y, int x, char *str, int n)
/***********************************************************************/
int PDC_CDECL 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));

View File

@@ -72,7 +72,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_kernel = "$Id: kernel.c,v 1.27 2006/01/28 18:19:51 wmcbrine Exp $";
char *rcsid_kernel = "$Id: kernel.c,v 1.28 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
RIPPEDOFFLINE linesripped[5];
@@ -187,9 +187,7 @@ char linesrippedoff = 0;
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL def_prog_mode(void)
/***********************************************************************/
int PDC_CDECL def_prog_mode(void)
{
PDC_LOG(("def_prog_mode() - called\n"));
@@ -200,9 +198,7 @@ int PDC_CDECL def_prog_mode(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL def_shell_mode(void)
/***********************************************************************/
int PDC_CDECL def_shell_mode(void)
{
PDC_LOG(("def_shell_mode() - called\n"));
@@ -213,9 +209,7 @@ int PDC_CDECL def_shell_mode(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL reset_prog_mode(void)
/***********************************************************************/
{
#if defined(OS2) && !defined(EMXVIDEO)
VIOMODEINFO modeInfo;
@@ -263,9 +257,7 @@ int PDC_CDECL reset_prog_mode(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL reset_shell_mode(void)
/***********************************************************************/
{
#if defined(OS2) && !defined(EMXVIDEO)
VIOMODEINFO modeInfo;
@@ -320,9 +312,7 @@ int PDC_CDECL reset_shell_mode(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL resetty(void)
/***********************************************************************/
{
#if defined(OS2) && !defined(EMXVIDEO)
VIOMODEINFO modeInfo;
@@ -372,9 +362,7 @@ int PDC_CDECL resetty(void)
return c_save_tty.been_set ? OK : ERR;
}
/***********************************************************************/
int PDC_CDECL savetty(void)
/***********************************************************************/
int PDC_CDECL savetty(void)
{
PDC_LOG(("savetty() - called\n"));
@@ -384,18 +372,14 @@ int PDC_CDECL savetty(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL curs_set(int visibility)
/***********************************************************************/
int PDC_CDECL curs_set(int visibility)
{
PDC_LOG(("curs_set() - called: visibility=%d\n", visibility));
return PDC_curs_set(visibility);
}
/***********************************************************************/
int PDC_CDECL ripoffline(int line, int (*init)(WINDOW *, int))
/***********************************************************************/
int PDC_CDECL ripoffline(int line, int (*init)(WINDOW *, int))
{
PDC_LOG(("ripoffline() - called: line=%d\n", line));
@@ -408,9 +392,7 @@ int PDC_CDECL ripoffline(int line, int (*init)(WINDOW *, int))
return OK;
}
/***********************************************************************/
int PDC_CDECL napms(int ms)
/***********************************************************************/
int PDC_CDECL napms(int ms)
{
PDC_LOG(("napms() - called: ms=%d\n", ms));
@@ -427,7 +409,7 @@ int PDC_CDECL napms(int ms)
}
#elif defined(WIN32)
Sleep( ms );
Sleep(ms);
#elif defined(OS2)
@@ -441,7 +423,7 @@ int PDC_CDECL napms(int ms)
# if defined(TC) || defined(__WATCOMC__)
delay( ms );
delay(ms);
# elif defined(MSC) || defined(NDP)
{
@@ -464,9 +446,7 @@ int PDC_CDECL napms(int ms)
return OK;
}
/***********************************************************************/
int PDC_CDECL draino(int ms)
/***********************************************************************/
int PDC_CDECL draino(int ms)
{
PDC_LOG(("draino() - called: ms=%d\n", ms));

View File

@@ -38,7 +38,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_mouse = "$Id: mouse.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_mouse = "$Id: mouse.c,v 1.10 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -106,9 +106,7 @@ char *rcsid_mouse = "$Id: mouse.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL mouse_set(unsigned long mbe)
/***********************************************************************/
int PDC_CDECL mouse_set(unsigned long mbe)
{
PDC_LOG(("mouse_set() - called: event %x\n", mbe));
@@ -117,9 +115,7 @@ int PDC_CDECL mouse_set(unsigned long mbe)
return OK;
}
/***********************************************************************/
int PDC_CDECL mouse_on(unsigned long mbe)
/***********************************************************************/
int PDC_CDECL mouse_on(unsigned long mbe)
{
PDC_LOG(("mouse_on() - called: event %x\n", mbe));
@@ -128,9 +124,7 @@ int PDC_CDECL mouse_on(unsigned long mbe)
return OK;
}
/***********************************************************************/
int PDC_CDECL mouse_off(unsigned long mbe)
/***********************************************************************/
int PDC_CDECL mouse_off(unsigned long mbe)
{
PDC_LOG(("mouse_off() - called: event %x\n", mbe));
@@ -139,9 +133,7 @@ int PDC_CDECL mouse_off(unsigned long mbe)
return OK;
}
/***********************************************************************/
int PDC_CDECL map_button(unsigned long button)
/***********************************************************************/
int PDC_CDECL map_button(unsigned long button)
{
PDC_LOG(("map_button() - called: button %x\n", button));
@@ -151,9 +143,7 @@ int PDC_CDECL map_button(unsigned long button)
return OK;
}
/***********************************************************************/
int PDC_CDECL request_mouse_pos(void)
/***********************************************************************/
int PDC_CDECL request_mouse_pos(void)
{
extern MOUSE_STATUS Trapped_Mouse_status;
@@ -165,9 +155,7 @@ int PDC_CDECL request_mouse_pos(void)
return OK;
}
/***********************************************************************/
void PDC_CDECL wmouse_position(WINDOW *win, int *y, int *x)
/***********************************************************************/
void PDC_CDECL wmouse_position(WINDOW *win, int *y, int *x)
{
PDC_LOG(("wmouse_position() - called\n"));
@@ -193,18 +181,14 @@ void PDC_CDECL wmouse_position(WINDOW *win, int *y, int *x)
}
}
/***********************************************************************/
unsigned long PDC_CDECL getmouse(void)
/***********************************************************************/
unsigned long PDC_CDECL getmouse(void)
{
PDC_LOG(("getmouse() - called\n"));
return SP->_trap_mbe;
}
/***********************************************************************/
unsigned long PDC_CDECL getbmap(void)
/***********************************************************************/
unsigned long PDC_CDECL getbmap(void)
{
PDC_LOG(("getbmap() - called\n"));

View File

@@ -31,7 +31,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_move = "$Id: move.c,v 1.6 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_move = "$Id: move.c,v 1.7 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -63,9 +63,7 @@ char *rcsid_move = "$Id: move.c,v 1.6 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL move(int y, int x)
/***********************************************************************/
int PDC_CDECL move(int y, int x)
{
PDC_LOG(("move() - called: y=%d x=%d\n", y, x));
@@ -81,9 +79,7 @@ int PDC_CDECL move(int y, int x)
return OK;
}
/***********************************************************************/
int PDC_CDECL wmove(WINDOW *win, int y, int x)
/***********************************************************************/
int PDC_CDECL wmove(WINDOW *win, int y, int x)
{
PDC_LOG(("wmove() - called: y=%d x=%d\n", y, x));

View File

@@ -40,7 +40,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_outopts = "$Id: outopts.c,v 1.10 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_outopts = "$Id: outopts.c,v 1.11 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -153,9 +153,7 @@ char *rcsid_outopts = "$Id: outopts.c,v 1.10 2006/01/28 16:53:26 wmcbrine Exp $"
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL clearok(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL clearok(WINDOW *win, bool bf)
{
PDC_LOG(("clearok() - called\n"));
@@ -167,9 +165,7 @@ int PDC_CDECL clearok(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
int PDC_CDECL idlok(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL idlok(WINDOW *win, bool bf)
{
PDC_LOG(("idlok() - called\n"));
@@ -181,9 +177,7 @@ int PDC_CDECL idlok(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
void PDC_CDECL idcok(WINDOW *win, bool bf)
/***********************************************************************/
void PDC_CDECL idcok(WINDOW *win, bool bf)
{
PDC_LOG(("idcok() - called\n"));
@@ -191,9 +185,7 @@ void PDC_CDECL idcok(WINDOW *win, bool bf)
win->_use_idc = bf;
}
/***********************************************************************/
void PDC_CDECL immedok(WINDOW *win, bool bf)
/***********************************************************************/
void PDC_CDECL immedok(WINDOW *win, bool bf)
{
PDC_LOG(("immedok() - called\n"));
@@ -201,9 +193,7 @@ void PDC_CDECL immedok(WINDOW *win, bool bf)
win->_immed = bf;
}
/***********************************************************************/
int PDC_CDECL leaveok(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL leaveok(WINDOW *win, bool bf)
{
PDC_LOG(("leaveok() - called\n"));
@@ -220,18 +210,14 @@ int PDC_CDECL leaveok(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
int PDC_CDECL setscrreg(int top, int bottom)
/***********************************************************************/
int PDC_CDECL setscrreg(int top, int bottom)
{
PDC_LOG(("setscrreg() - called: top %d bottom %d\n", top, bottom));
return wsetscrreg(stdscr, top, bottom);
}
/***********************************************************************/
int PDC_CDECL wsetscrreg(WINDOW *win, int top, int bottom)
/***********************************************************************/
int PDC_CDECL wsetscrreg(WINDOW *win, int top, int bottom)
{
PDC_LOG(("wsetscrreg() - called: top %d bottom %d\n", top, bottom));
@@ -250,9 +236,7 @@ int PDC_CDECL wsetscrreg(WINDOW *win, int top, int bottom)
return ERR;
}
/***********************************************************************/
int PDC_CDECL scrollok(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL scrollok(WINDOW *win, bool bf)
{
PDC_LOG(("scrollok() - called\n"));
@@ -264,9 +248,7 @@ int PDC_CDECL scrollok(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
int PDC_CDECL nl(void)
/***********************************************************************/
int PDC_CDECL nl(void)
{
PDC_LOG(("nl() - called\n"));
@@ -275,9 +257,7 @@ int PDC_CDECL nl(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL nonl(void)
/***********************************************************************/
int PDC_CDECL nonl(void)
{
PDC_LOG(("nonl() - called\n"));
@@ -286,9 +266,7 @@ int PDC_CDECL nonl(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL raw_output(bool bf)
/***********************************************************************/
int PDC_CDECL raw_output(bool bf)
{
PDC_LOG(("raw_output() - called\n"));

View File

@@ -34,7 +34,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_overlay = "$Id: overlay.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_overlay = "$Id: overlay.c,v 1.9 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -96,9 +96,7 @@ char *rcsid_overlay = "$Id: overlay.c,v 1.8 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL overlay(const WINDOW *src_w, WINDOW *dst_w)
/***********************************************************************/
int PDC_CDECL overlay(const WINDOW *src_w, WINDOW *dst_w)
{
int first_line, first_col, last_line, last_col;
int src_start_x, src_start_y, dst_start_x, dst_start_y;
@@ -158,9 +156,7 @@ int PDC_CDECL overlay(const WINDOW *src_w, WINDOW *dst_w)
TRUE);
}
/***********************************************************************/
int PDC_CDECL overwrite(const WINDOW *src_w, WINDOW *dst_w)
/***********************************************************************/
int PDC_CDECL overwrite(const WINDOW *src_w, WINDOW *dst_w)
{
int first_line, first_col, last_line, last_col;
int src_start_x, src_start_y, dst_start_x, dst_start_y;
@@ -220,21 +216,13 @@ int PDC_CDECL overwrite(const WINDOW *src_w, WINDOW *dst_w)
FALSE);
}
/***********************************************************************/
int PDC_CDECL copywin(const WINDOW *src_w, WINDOW *dst_w,
int src_tr, int src_tc, int dst_tr,
int dst_tc, int dst_br, int dst_bc,
int overlay)
/***********************************************************************/
int PDC_CDECL copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr,
int src_tc, int dst_tr, int dst_tc, int dst_br,
int dst_bc, int overlay)
{
int src_start_x = src_tc;
int src_start_y = src_tr;
int dst_start_x = dst_tc;
int dst_start_y = dst_tr;
int src_end_x, src_end_y, dst_end_x, dst_end_y;
int src_rows, src_cols, dst_rows, dst_cols;
int min_rows, min_cols;
int src_end_x, src_end_y, dst_end_x, dst_end_y;
int src_rows, src_cols, dst_rows, dst_cols;
int min_rows, min_cols;
PDC_LOG(("copywin() - called\n"));
@@ -261,7 +249,7 @@ int PDC_CDECL copywin(const WINDOW *src_w, WINDOW *dst_w,
dst_end_y = dst_tr + min_rows;
dst_end_x = dst_tc + min_cols;
return PDC_copy_win(src_w, dst_w, src_start_y, src_start_x,
src_end_y, src_end_x, dst_start_y, dst_start_x,
return PDC_copy_win(src_w, dst_w, src_tr, src_tc,
src_end_y, src_end_x, dst_tr, dst_tc,
dst_end_y, dst_end_x, overlay);
}

View File

@@ -36,7 +36,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_pad = "$Id: pad.c,v 1.10 2006/01/28 18:19:51 wmcbrine Exp $";
char *rcsid_pad = "$Id: pad.c,v 1.11 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/* save values for pechochar() */
@@ -119,11 +119,9 @@ static int save_sminrow, save_smincol, save_smaxrow, save_smaxcol;
**man-end**********************************************************************/
/***********************************************************************/
WINDOW* PDC_CDECL newpad(int nlines, int ncols)
/***********************************************************************/
WINDOW * PDC_CDECL newpad(int nlines, int ncols)
{
extern void* (*callc)(size_t, size_t);
extern void *(*callc)(size_t, size_t);
extern void (*fre)(void *);
WINDOW *win;
@@ -174,10 +172,8 @@ WINDOW* PDC_CDECL newpad(int nlines, int ncols)
return win;
}
/***********************************************************************/
WINDOW* PDC_CDECL subpad(WINDOW *orig, int nlines, int ncols,
int begin_y, int begin_x)
/***********************************************************************/
WINDOW * PDC_CDECL subpad(WINDOW *orig, int nlines, int ncols,
int begin_y, int begin_x)
{
WINDOW *win;
int i;
@@ -234,10 +230,8 @@ WINDOW* PDC_CDECL subpad(WINDOW *orig, int nlines, int ncols,
return win;
}
/***********************************************************************/
int PDC_CDECL prefresh(WINDOW *win, int py, int px, int sy1, int sx1,
int sy2, int sx2)
/***********************************************************************/
{
PDC_LOG(("prefresh() - called\n"));
@@ -251,10 +245,8 @@ int PDC_CDECL prefresh(WINDOW *win, int py, int px, int sy1, int sx1,
return OK;
}
/***********************************************************************/
int PDC_CDECL pnoutrefresh(WINDOW *w, int py, int px, int sy1, int sx1,
int sy2, int sx2)
/***********************************************************************/
{
int num_cols;
int sline = sy1;
@@ -324,9 +316,7 @@ int PDC_CDECL pnoutrefresh(WINDOW *w, int py, int px, int sy1, int sx1,
return OK;
}
/***********************************************************************/
int PDC_CDECL pechochar(WINDOW *pad, chtype ch)
/***********************************************************************/
{
PDC_LOG(("pechochar() - called\n"));

View File

@@ -29,7 +29,7 @@
#undef PDC_debug
#ifdef PDCDEBUG
char *rcsid_PDCdebug = "$Id: pdcdebug.c,v 1.10 2006/01/28 15:01:41 wmcbrine Exp $";
char *rcsid_PDCdebug = "$Id: pdcdebug.c,v 1.11 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
bool trace_on = FALSE;
@@ -52,9 +52,7 @@ bool trace_on = FALSE;
**man-end**********************************************************************/
/***********************************************************************/
void PDC_CDECL PDC_debug(char *fmt, ...)
/***********************************************************************/
void PDC_CDECL PDC_debug(char *fmt, ...)
{
va_list args;
FILE *dbfp;

View File

@@ -24,7 +24,7 @@
#include <string.h>
#ifdef PDCDEBUG
char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.18 2006/01/28 18:19:51 wmcbrine Exp $";
char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.19 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -51,10 +51,9 @@ char *rcsid_PDCwin = "$Id: pdcwin.c,v 1.18 2006/01/28 18:19:51 wmcbrine Exp $";
**man-end**********************************************************************/
int PDC_copy_win(const WINDOW *src_w, WINDOW *dst_w,
int src_tr, int src_tc, int src_br, int src_bc,
int dst_tr, int dst_tc, int dst_br, int dst_bc,
bool overlay)
int PDC_copy_win(const WINDOW *src_w, WINDOW *dst_w, int src_tr,
int src_tc, int src_br, int src_bc, int dst_tr,
int dst_tc, int dst_br, int dst_bc, bool overlay)
{
int col, line, y1, fc, *minchng, *maxchng;
chtype *w1ptr, *w2ptr;
@@ -141,12 +140,12 @@ int PDC_copy_win(const WINDOW *src_w, WINDOW *dst_w,
a NULL pointer.
Portability:
PDCurses WINDOW *PDC_makenew(int num_lines, int num_columns,
int begy, int begx);
PDCurses WINDOW * PDC_makenew(int num_lines, int num_columns,
int begy, int begx);
**man-end**********************************************************************/
WINDOW *PDC_makenew(int num_lines, int num_columns, int begy, int begx)
WINDOW * PDC_makenew(int num_lines, int num_columns, int begy, int begx)
{
extern void *(*mallc)(size_t);
extern void *(*callc)(size_t, size_t);

View File

@@ -38,7 +38,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_printw = "$Id: printw.c,v 1.11 2006/01/28 15:01:41 wmcbrine Exp $";
char *rcsid_printw = "$Id: printw.c,v 1.12 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -94,9 +94,7 @@ char *rcsid_printw = "$Id: printw.c,v 1.11 2006/01/28 15:01:41 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL printw(char *fmt, ...)
/***********************************************************************/
int PDC_CDECL printw(char *fmt, ...)
{
va_list args;
int retval;
@@ -110,9 +108,7 @@ int PDC_CDECL printw(char *fmt, ...)
return retval;
}
/***********************************************************************/
int PDC_CDECL wprintw(WINDOW *win, char *fmt, ...)
/***********************************************************************/
int PDC_CDECL wprintw(WINDOW *win, char *fmt, ...)
{
va_list args;
int retval;
@@ -126,9 +122,7 @@ int PDC_CDECL wprintw(WINDOW *win, char *fmt, ...)
return retval;
}
/***********************************************************************/
int PDC_CDECL mvprintw(int y, int x, char *fmt, ...)
/***********************************************************************/
int PDC_CDECL mvprintw(int y, int x, char *fmt, ...)
{
va_list args;
int retval;
@@ -145,9 +139,7 @@ int PDC_CDECL mvprintw(int y, int x, char *fmt, ...)
return retval;
}
/***********************************************************************/
int PDC_CDECL mvwprintw(WINDOW *win, int y, int x, char *fmt, ...)
/***********************************************************************/
int PDC_CDECL mvwprintw(WINDOW *win, int y, int x, char *fmt, ...)
{
va_list args;
int retval;
@@ -164,9 +156,7 @@ int PDC_CDECL mvwprintw(WINDOW *win, int y, int x, char *fmt, ...)
return retval;
}
/***********************************************************************/
int PDC_CDECL vwprintw(WINDOW *win, char *fmt, va_list varglist)
/***********************************************************************/
int PDC_CDECL vwprintw(WINDOW *win, char *fmt, va_list varglist)
{
char printbuf[513];
int len;
@@ -178,9 +168,7 @@ int PDC_CDECL vwprintw(WINDOW *win, char *fmt, va_list varglist)
return (waddstr(win, printbuf) == ERR) ? ERR : len;
}
/***********************************************************************/
int PDC_CDECL vw_printw(WINDOW *win, char *fmt, va_list varglist)
/***********************************************************************/
int PDC_CDECL vw_printw(WINDOW *win, char *fmt, va_list varglist)
{
PDC_LOG(("vw_printw() - called\n"));

View File

@@ -43,7 +43,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_refresh = "$Id: refresh.c,v 1.12 2006/01/28 18:19:51 wmcbrine Exp $";
char *rcsid_refresh = "$Id: refresh.c,v 1.13 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -104,18 +104,14 @@ char *rcsid_refresh = "$Id: refresh.c,v 1.12 2006/01/28 18:19:51 wmcbrine Exp $"
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL refresh(void)
/***********************************************************************/
int PDC_CDECL refresh(void)
{
PDC_LOG(("refresh() - called\n"));
return wrefresh(stdscr);
}
/***********************************************************************/
int PDC_CDECL wrefresh(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wrefresh(WINDOW *win)
{
bool save_clear;
@@ -138,9 +134,7 @@ int PDC_CDECL wrefresh(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL wnoutrefresh(WINDOW *win)
/***********************************************************************/
int PDC_CDECL wnoutrefresh(WINDOW *win)
{
int first; /* first changed char on line */
int last; /* last changed char on line */
@@ -214,9 +208,7 @@ int PDC_CDECL wnoutrefresh(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL doupdate(void)
/***********************************************************************/
int PDC_CDECL doupdate(void)
{
int i;
#ifdef REGISTERWINDOWS
@@ -293,9 +285,7 @@ int PDC_CDECL doupdate(void)
return OK;
}
/***********************************************************************/
int PDC_CDECL redrawwin(WINDOW *win)
/***********************************************************************/
int PDC_CDECL redrawwin(WINDOW *win)
{
PDC_LOG(("redrawwin() - called: win=%x\n", win));
@@ -305,9 +295,7 @@ int PDC_CDECL redrawwin(WINDOW *win)
return wredrawln(win, 0, win->_maxy);
}
/***********************************************************************/
int PDC_CDECL wredrawln(WINDOW *win, int start, int num)
/***********************************************************************/
int PDC_CDECL wredrawln(WINDOW *win, int start, int num)
{
int i;

View File

@@ -43,7 +43,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_scanw = "$Id: scanw.c,v 1.12 2006/01/28 15:01:41 wmcbrine Exp $";
char *rcsid_scanw = "$Id: scanw.c,v 1.13 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -91,9 +91,7 @@ char *rcsid_scanw = "$Id: scanw.c,v 1.12 2006/01/28 15:01:41 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL scanw(char *fmt, ...)
/***********************************************************************/
int PDC_CDECL scanw(char *fmt, ...)
{
va_list args;
int retval;
@@ -107,9 +105,7 @@ int PDC_CDECL scanw(char *fmt, ...)
return retval;
}
/***********************************************************************/
int PDC_CDECL wscanw(WINDOW *win, char *fmt, ...)
/***********************************************************************/
int PDC_CDECL wscanw(WINDOW *win, char *fmt, ...)
{
va_list args;
int retval;
@@ -123,9 +119,7 @@ int PDC_CDECL wscanw(WINDOW *win, char *fmt, ...)
return retval;
}
/***********************************************************************/
int PDC_CDECL mvscanw(int y, int x, char *fmt, ... )
/***********************************************************************/
int PDC_CDECL mvscanw(int y, int x, char *fmt, ...)
{
va_list args;
int retval;
@@ -142,9 +136,7 @@ int PDC_CDECL mvscanw(int y, int x, char *fmt, ... )
return retval;
}
/***********************************************************************/
int PDC_CDECL mvwscanw(WINDOW *win, int y, int x, char *fmt,...)
/***********************************************************************/
int PDC_CDECL mvwscanw(WINDOW *win, int y, int x, char *fmt, ...)
{
va_list args;
int retval;
@@ -161,9 +153,7 @@ int PDC_CDECL mvwscanw(WINDOW *win, int y, int x, char *fmt,...)
return retval;
}
/***********************************************************************/
int PDC_CDECL vwscanw(WINDOW *win, char *fmt, va_list varglist)
/***********************************************************************/
int PDC_CDECL vwscanw(WINDOW *win, char *fmt, va_list varglist)
{
char scanbuf[513];
@@ -175,9 +165,7 @@ int PDC_CDECL vwscanw(WINDOW *win, char *fmt, va_list varglist)
return vsscanf(scanbuf, fmt, varglist);
}
/***********************************************************************/
int PDC_CDECL vw_scanw(WINDOW *win, char *fmt, va_list varglist)
/***********************************************************************/
int PDC_CDECL vw_scanw(WINDOW *win, char *fmt, va_list varglist)
{
PDC_LOG(("vw_scanw() - called\n"));

View File

@@ -33,7 +33,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_scr_dump = "$Id: scr_dump.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_scr_dump = "$Id: scr_dump.c,v 1.8 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -87,36 +87,28 @@ char *rcsid_scr_dump = "$Id: scr_dump.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $
**man-end**********************************************************************/
/***********************************************************************/
int scr_dump(const char *filename)
/***********************************************************************/
{
PDC_LOG(("scr_dump() - called: filename %s\n", filename));
return ERR;
}
/***********************************************************************/
int scr_init(const char *filename)
/***********************************************************************/
{
PDC_LOG(("scr_init() - called: filename %s\n", filename));
return ERR;
}
/***********************************************************************/
int scr_restore(const char *filename)
/***********************************************************************/
{
PDC_LOG(("scr_restore() - called: filename %s\n", filename));
return ERR;
}
/***********************************************************************/
int scr_set(const char *filename)
/***********************************************************************/
{
PDC_LOG(("scr_set() - called: filename %s\n", filename));

View File

@@ -32,7 +32,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_scroll = "$Id: scroll.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_scroll = "$Id: scroll.c,v 1.10 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -81,18 +81,14 @@ char *rcsid_scroll = "$Id: scroll.c,v 1.9 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL scroll(WINDOW *win)
/***********************************************************************/
{
PDC_LOG(("scroll() - called\n"));
return wscrl(win, 1);
}
/***********************************************************************/
int PDC_CDECL wscrl(WINDOW *win, int n)
/***********************************************************************/
int PDC_CDECL wscrl(WINDOW *win, int n)
{
int i, l;
chtype blank, *ptr, *temp;
@@ -168,9 +164,7 @@ int PDC_CDECL wscrl(WINDOW *win, int n)
return OK;
}
/***********************************************************************/
int PDC_CDECL scrl(int n)
/***********************************************************************/
{
PDC_LOG(("scrl() - called\n"));

View File

@@ -42,7 +42,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_slk = "$Id: slk.c,v 1.11 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_slk = "$Id: slk.c,v 1.12 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -128,13 +128,11 @@ static void PDC_slk_init(void);
static struct {
char label[32];
int format;
} slk_save[ LABEL_NCURSES_EXTENDED ];
int format;
} slk_save[LABEL_NCURSES_EXTENDED];
/***********************************************************************/
/*
slk_init() is the slk initialization routine.
/* slk_init() is the slk initialization routine.
This must be called before initscr().
label_fmt = 0, 1 or 55.
@@ -143,12 +141,9 @@ static struct {
2 = 4-4-4 format (ncurses extension for PC 12 function keys)
3 = 4-4-4 format (ncurses extension for PC 12 function keys -
with index line)
55 = 5 - 5 format (extended for PC, 10 function keys)
*/
55 = 5 - 5 format (extended for PC, 10 function keys) */
int PDC_CDECL slk_init(int fmt)
/***********************************************************************/
{
PDC_LOG(("slk_init() - called\n"));
@@ -187,9 +182,7 @@ int PDC_CDECL slk_init(int fmt)
return OK;
}
/***********************************************************************/
/*
PDC_slk_set() Used to set a slk label to a string.
/* PDC_slk_set() Used to set a slk label to a string.
label_num = 1 - 8 (or 10) (number of the label)
label_str = string (8 or 7 bytes total), NULL chars or NULL pointer
@@ -197,12 +190,10 @@ int PDC_CDECL slk_init(int fmt)
0 = left
1 = center
2 = right
save = 1 yes or 0 no
*/
save = 1 yes or 0 no */
static int PDC_slk_set(int label_num, const char *label_str,
int label_fmt, int save)
/***********************************************************************/
{
int i, num, slen, llen, col;
@@ -292,29 +283,23 @@ static int PDC_slk_set(int label_num, const char *label_str,
return OK;
}
/***********************************************************************/
/*
slk_set() Used to set a slk label to a string.
/* slk_set() Used to set a slk label to a string.
label_num = 1 - 8 (or 10) (number of the label)
label_str = string (8 or 7 bytes total), NULL chars or NULL pointer
label_fmt = justification
0 = left
1 = center
2 = right
*/
2 = right */
int PDC_CDECL slk_set(int label_num, const char *label_str, int label_fmt)
/***********************************************************************/
{
PDC_LOG(("slk_set() - called\n"));
return PDC_slk_set(label_num, label_str, label_fmt, 1);
}
/***********************************************************************/
int PDC_CDECL slk_refresh(void)
/***********************************************************************/
int PDC_CDECL slk_refresh(void)
{
PDC_LOG(("slk_refresh() - called\n"));
@@ -325,9 +310,7 @@ int PDC_CDECL slk_refresh(void)
return doupdate();
}
/***********************************************************************/
int PDC_CDECL slk_noutrefresh(void)
/***********************************************************************/
int PDC_CDECL slk_noutrefresh(void)
{
PDC_LOG(("slk_noutrefresh() - called\n"));
@@ -337,9 +320,7 @@ int PDC_CDECL slk_noutrefresh(void)
return wnoutrefresh(SP->slk_winptr);
}
/***********************************************************************/
char* PDC_CDECL slk_label(int labnum)
/***********************************************************************/
char * PDC_CDECL slk_label(int labnum)
{
PDC_LOG(("slk_label() - called\n"));
@@ -352,9 +333,7 @@ char* PDC_CDECL slk_label(int labnum)
return slk_temp_string; /* only good temporarily */
}
/***********************************************************************/
int PDC_CDECL slk_clear(void)
/***********************************************************************/
int PDC_CDECL slk_clear(void)
{
int i;
@@ -369,9 +348,7 @@ int PDC_CDECL slk_clear(void)
return wrefresh(SP->slk_winptr);
}
/***********************************************************************/
int PDC_CDECL slk_restore(void)
/***********************************************************************/
int PDC_CDECL slk_restore(void)
{
int i;
chtype attr = SP->slk_winptr->_attrs;
@@ -389,18 +366,14 @@ int PDC_CDECL slk_restore(void)
return wrefresh(SP->slk_winptr);
}
/***********************************************************************/
int PDC_CDECL slk_touch(void)
/***********************************************************************/
int PDC_CDECL slk_touch(void)
{
PDC_LOG(("slk_touch() - called\n"));
return touchwin(SP->slk_winptr);
}
/***********************************************************************/
int PDC_CDECL slk_attron(const chtype attrs)
/***********************************************************************/
int PDC_CDECL slk_attron(const chtype attrs)
{
int i, rc;
@@ -414,9 +387,7 @@ int PDC_CDECL slk_attron(const chtype attrs)
return rc;
}
/***********************************************************************/
int PDC_CDECL slk_attroff(const chtype attrs)
/***********************************************************************/
int PDC_CDECL slk_attroff(const chtype attrs)
{
int i, rc;
@@ -430,9 +401,7 @@ int PDC_CDECL slk_attroff(const chtype attrs)
return rc;
}
/***********************************************************************/
int PDC_CDECL slk_attrset(const chtype attrs)
/***********************************************************************/
int PDC_CDECL slk_attrset(const chtype attrs)
{
int i, rc;
@@ -446,9 +415,7 @@ int PDC_CDECL slk_attrset(const chtype attrs)
return rc;
}
/***********************************************************************/
int PDC_CDECL slk_color(short color_pair)
/***********************************************************************/
int PDC_CDECL slk_color(short color_pair)
{
int i, rc;
@@ -462,9 +429,7 @@ int PDC_CDECL slk_color(short color_pair)
return rc;
}
/***********************************************************************/
static void PDC_slk_init(void)
/***********************************************************************/
static void PDC_slk_init(void)
{
int i;
chtype save_attr;
@@ -509,9 +474,7 @@ static void PDC_slk_init(void)
touchwin(SP->slk_winptr);
}
/***********************************************************************/
void PDC_slk_calc(void)
/***********************************************************************/
void PDC_slk_calc(void)
{
int i, center, col = 0;
@@ -629,9 +592,7 @@ void PDC_slk_calc(void)
slk_set(i + 1, slk_save[i].label, slk_save[i].format);
}
/***********************************************************************/
int PDC_mouse_in_slk(int y, int x)
/***********************************************************************/
int PDC_mouse_in_slk(int y, int x)
{
int i;

View File

@@ -41,7 +41,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_termattr = "$Id: termattr.c,v 1.14 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_termattr = "$Id: termattr.c,v 1.15 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -137,54 +137,42 @@ char *rcsid_termattr = "$Id: termattr.c,v 1.14 2006/01/28 16:53:26 wmcbrine Exp
static char _display[128];
static char _shrtnme[14];
/***********************************************************************/
int PDC_CDECL baudrate(void)
/***********************************************************************/
int PDC_CDECL baudrate(void)
{
PDC_LOG(("baudrate() - called\n"));
return SP->direct_video ? INT_MAX : 19200;
}
/***********************************************************************/
char PDC_CDECL erasechar(void)
/***********************************************************************/
char PDC_CDECL erasechar(void)
{
PDC_LOG(("erasechar() - called\n"));
return _ECHAR; /* character delete char (^H) */
}
/***********************************************************************/
bool PDC_CDECL has_ic(void)
/***********************************************************************/
bool PDC_CDECL has_ic(void)
{
PDC_LOG(("has_ic() - called\n"));
return TRUE;
}
/***********************************************************************/
bool PDC_CDECL has_il(void)
/***********************************************************************/
bool PDC_CDECL has_il(void)
{
PDC_LOG(("has_il() - called\n"));
return TRUE;
}
/***********************************************************************/
char PDC_CDECL killchar(void)
/***********************************************************************/
char PDC_CDECL killchar(void)
{
PDC_LOG(("killchar() - called\n"));
return _DLCHAR; /* line delete char (^U) */
}
/***********************************************************************/
char* PDC_CDECL longname(void)
/***********************************************************************/
char * PDC_CDECL longname(void)
{
PDC_LOG(("longname() - called\n"));
@@ -273,9 +261,7 @@ char* PDC_CDECL longname(void)
return _display;
}
/***********************************************************************/
chtype PDC_CDECL termattrs(void)
/***********************************************************************/
chtype PDC_CDECL termattrs(void)
{
chtype temp = (A_NORMAL | A_BOLD | A_BLINK | A_REVERSE |
A_UNDERLINE | A_ITALIC);
@@ -290,9 +276,7 @@ chtype PDC_CDECL termattrs(void)
return temp;
}
/***********************************************************************/
char* PDC_CDECL termname(void)
/***********************************************************************/
char * PDC_CDECL termname(void)
{
PDC_LOG(("termname() - called\n"));
@@ -371,9 +355,7 @@ char* PDC_CDECL termname(void)
return _shrtnme;
}
/***********************************************************************/
char PDC_CDECL wordchar(void)
/***********************************************************************/
char PDC_CDECL wordchar(void)
{
PDC_LOG(("wordchar() - called\n"));

View File

@@ -32,7 +32,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_terminfo = "$Id: terminfo.c,v 1.11 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_terminfo = "$Id: terminfo.c,v 1.12 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -81,9 +81,7 @@ char *rcsid_terminfo = "$Id: terminfo.c,v 1.11 2006/01/28 16:53:26 wmcbrine Exp
TERMINAL *cur_term = NULL;
/***********************************************************************/
int PDC_CDECL mvcur(int oldrow, int oldcol, int newrow, int newcol)
/***********************************************************************/
int PDC_CDECL mvcur(int oldrow, int oldcol, int newrow, int newcol)
{
PDC_LOG(("mvcur() - called: oldrow %d oldcol %d newrow %d newcol %d\n",
oldrow, oldcol, newrow, newcol));
@@ -99,27 +97,21 @@ int PDC_CDECL mvcur(int oldrow, int oldcol, int newrow, int newcol)
return OK;
}
/***********************************************************************/
int PDC_CDECL del_curterm(TERMINAL *oterm)
/***********************************************************************/
int PDC_CDECL del_curterm(TERMINAL *oterm)
{
PDC_LOG(("del_curterm() - called\n"));
return ERR;
}
/***********************************************************************/
int PDC_CDECL putp(const char *str)
/***********************************************************************/
int PDC_CDECL putp(const char *str)
{
PDC_LOG(("putp() - called: str %s\n", str));
return ERR;
}
/***********************************************************************/
int PDC_CDECL restartterm(char *term, int filedes, int *errret)
/***********************************************************************/
int PDC_CDECL restartterm(char *term, int filedes, int *errret)
{
PDC_LOG(("restartterm() - called\n"));
@@ -129,27 +121,21 @@ int PDC_CDECL restartterm(char *term, int filedes, int *errret)
return ERR;
}
/***********************************************************************/
TERMINAL* PDC_CDECL set_curterm(TERMINAL *nterm)
/***********************************************************************/
TERMINAL * PDC_CDECL set_curterm(TERMINAL *nterm)
{
PDC_LOG(("set_curterm() - called\n"));
return (TERMINAL *)NULL;
}
/***********************************************************************/
int PDC_CDECL setterm(char *term)
/***********************************************************************/
int PDC_CDECL setterm(char *term)
{
PDC_LOG(("setterm() - called\n"));
return ERR;
}
/***********************************************************************/
int PDC_CDECL setupterm(char *term, int filedes, int *errret)
/***********************************************************************/
int PDC_CDECL setupterm(char *term, int filedes, int *errret)
{
PDC_LOG(("setupterm() - called\n"));
@@ -161,109 +147,85 @@ int PDC_CDECL setupterm(char *term, int filedes, int *errret)
return ERR;
}
/***********************************************************************/
int PDC_CDECL tgetent(char *bp, const char *name)
/***********************************************************************/
int PDC_CDECL tgetent(char *bp, const char *name)
{
PDC_LOG(("tgetent() - called: name %s\n", name));
return ERR;
}
/***********************************************************************/
int PDC_CDECL tgetflag(char *id)
/***********************************************************************/
int PDC_CDECL tgetflag(char *id)
{
PDC_LOG(("tgetflag() - called: id %s\n", id));
return ERR;
}
/***********************************************************************/
int PDC_CDECL tgetnum(char *id)
/***********************************************************************/
int PDC_CDECL tgetnum(char *id)
{
PDC_LOG(("tgetnum() - called: id %s\n", id));
return ERR;
}
/***********************************************************************/
char* PDC_CDECL tgetstr(char *id, char **area)
/***********************************************************************/
char * PDC_CDECL tgetstr(char *id, char **area)
{
PDC_LOG(("tgetstr() - called: id %s\n", id));
return (char *)NULL;
}
/***********************************************************************/
char* PDC_CDECL tgoto(char *cap, int col, int row)
/***********************************************************************/
char * PDC_CDECL tgoto(char *cap, int col, int row)
{
PDC_LOG(("tgoto() - called\n"));
return (char *)NULL;
}
/***********************************************************************/
int PDC_CDECL tigetflag(char *capname)
/***********************************************************************/
int PDC_CDECL tigetflag(char *capname)
{
PDC_LOG(("tigetflag() - called: capname %s\n", capname));
return -1;
}
/***********************************************************************/
int PDC_CDECL tigetnum(char *capname)
/***********************************************************************/
int PDC_CDECL tigetnum(char *capname)
{
PDC_LOG(("tigetnum() - called: capname %s\n", capname));
return -2;
}
/***********************************************************************/
char* PDC_CDECL tigetstr(char *capname)
/***********************************************************************/
char * PDC_CDECL tigetstr(char *capname)
{
PDC_LOG(("tigetstr() - called: capname %s\n", capname));
return (char *)(-1);
}
/***********************************************************************/
char* PDC_CDECL tparm(char *cap, long p1, long p2, long p3, long p4,
char * PDC_CDECL tparm(char *cap, long p1, long p2, long p3, long p4,
long p5, long p6, long p7, long p8, long p9)
/***********************************************************************/
{
PDC_LOG(("tparm() - called: cap %s\n", cap));
return (char *)NULL;
}
/***********************************************************************/
int PDC_CDECL tputs(const char *str, int affcnt, int (*putfunc)(int))
/***********************************************************************/
int PDC_CDECL tputs(const char *str, int affcnt, int (*putfunc)(int))
{
PDC_LOG(("tputs() - called\n"));
return ERR;
}
/***********************************************************************/
int PDC_CDECL vidattr(chtype attr)
/***********************************************************************/
int PDC_CDECL vidattr(chtype attr)
{
PDC_LOG(("vidattr() - called: attr %d\n", attr));
return ERR;
}
/***********************************************************************/
int PDC_CDECL vidputs(chtype attr, int (*putfunc)(int))
/***********************************************************************/
int PDC_CDECL vidputs(chtype attr, int (*putfunc)(int))
{
PDC_LOG(("vidputs() - called: attr %d\n", attr));

View File

@@ -37,7 +37,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_touch = "$Id: touch.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_touch = "$Id: touch.c,v 1.8 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -94,9 +94,7 @@ char *rcsid_touch = "$Id: touch.c,v 1.7 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
int PDC_CDECL touchwin(WINDOW *win)
/***********************************************************************/
int PDC_CDECL touchwin(WINDOW *win)
{
int i;
@@ -114,9 +112,7 @@ int PDC_CDECL touchwin(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL touchline(WINDOW *win, int start, int count)
/***********************************************************************/
int PDC_CDECL touchline(WINDOW *win, int start, int count)
{
int i;
@@ -136,9 +132,7 @@ int PDC_CDECL touchline(WINDOW *win, int start, int count)
return OK;
}
/***********************************************************************/
int PDC_CDECL untouchwin(WINDOW *win)
/***********************************************************************/
int PDC_CDECL untouchwin(WINDOW *win)
{
int i;
@@ -156,9 +150,7 @@ int PDC_CDECL untouchwin(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL wtouchln(WINDOW *win, int y, int n, int changed)
/***********************************************************************/
int PDC_CDECL wtouchln(WINDOW *win, int y, int n, int changed)
{
int i;
@@ -185,9 +177,7 @@ int PDC_CDECL wtouchln(WINDOW *win, int y, int n, int changed)
return OK;
}
/***********************************************************************/
bool PDC_CDECL is_linetouched(WINDOW *win, int line)
/***********************************************************************/
bool PDC_CDECL is_linetouched(WINDOW *win, int line)
{
PDC_LOG(("is_linetouched() - called: win=%x line=%d\n", win, line));
@@ -197,9 +187,7 @@ bool PDC_CDECL is_linetouched(WINDOW *win, int line)
return (win->_firstch[line] != _NO_CHANGE) ? TRUE : FALSE;
}
/***********************************************************************/
bool PDC_CDECL is_wintouched(WINDOW *win)
/***********************************************************************/
bool PDC_CDECL is_wintouched(WINDOW *win)
{
int i;

View File

@@ -42,7 +42,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_util = "$Id: util.c,v 1.20 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_util = "$Id: util.c,v 1.21 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -112,9 +112,7 @@ char *rcsid_util = "$Id: util.c,v 1.20 2006/01/28 16:53:26 wmcbrine Exp $";
static char strbuf[3] = {0, 0, 0};
/***********************************************************************/
char * PDC_CDECL unctrl(chtype c)
/***********************************************************************/
char * PDC_CDECL unctrl(chtype c)
{
chtype ic;
@@ -204,9 +202,7 @@ static char *key_name[] = {
"KEY_SUP", "KEY_SDOWN"
};
/***********************************************************************/
char * PDC_CDECL keyname(int key)
/***********************************************************************/
char * PDC_CDECL keyname(int key)
{
PDC_LOG(("keyname() - called: key %d\n", key));
@@ -219,8 +215,7 @@ char * PDC_CDECL keyname(int key)
return "NO KEY NAME";
}
/***********************************************************************/
bool PDC_CDECL has_key(int key)
bool PDC_CDECL has_key(int key)
{
PDC_LOG(("has_key() - called: key %d\n",key));
@@ -230,50 +225,38 @@ bool PDC_CDECL has_key(int key)
&& key <= (int)(sizeof(key_name) / sizeof(key_name[0]));
}
/***********************************************************************/
void PDC_CDECL filter(void)
/***********************************************************************/
void PDC_CDECL filter(void)
{
PDC_LOG(("filter() - called\n"));
}
/***********************************************************************/
void PDC_CDECL use_env(bool x)
/***********************************************************************/
void PDC_CDECL use_env(bool x)
{
PDC_LOG(("use_env() - called: x %d\n", x));
}
/***********************************************************************/
int PDC_CDECL putwin(WINDOW *win, FILE *filep)
/***********************************************************************/
int PDC_CDECL putwin(WINDOW *win, FILE *filep)
{
PDC_LOG(("putwin() - called\n"));
return ERR;
}
/***********************************************************************/
WINDOW* PDC_CDECL getwin(FILE *filep)
/***********************************************************************/
WINDOW * PDC_CDECL getwin(FILE *filep)
{
PDC_LOG(("getwin() - called\n"));
return (WINDOW *)NULL;
}
/***********************************************************************/
int PDC_CDECL delay_output(int ms)
/***********************************************************************/
int PDC_CDECL delay_output(int ms)
{
PDC_LOG(("delay_output() - called: ms %d\n", ms));
return napms(ms);
}
/***********************************************************************/
int PDC_CDECL flushinp(void)
/***********************************************************************/
int PDC_CDECL flushinp(void)
{
extern int c_pindex; /* putter index */
extern int c_gindex; /* getter index */
@@ -310,18 +293,14 @@ int PDC_CDECL flushinp(void)
#undef traceon
#undef traceoff
/***********************************************************************/
void PDC_CDECL traceon(void)
/***********************************************************************/
void PDC_CDECL traceon(void)
{
PDC_LOG(("traceon() - called\n"));
trace_on = TRUE;
}
/***********************************************************************/
void PDC_CDECL traceoff(void)
/***********************************************************************/
void PDC_CDECL traceoff(void)
{
PDC_LOG(("traceoff() - called\n"));

View File

@@ -47,7 +47,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_window = "$Id: window.c,v 1.13 2006/01/28 16:53:26 wmcbrine Exp $";
char *rcsid_window = "$Id: window.c,v 1.14 2006/01/28 19:31:00 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -158,9 +158,7 @@ char *rcsid_window = "$Id: window.c,v 1.13 2006/01/28 16:53:26 wmcbrine Exp $";
**man-end**********************************************************************/
/***********************************************************************/
WINDOW* PDC_CDECL newwin(int nlines, int ncols, int begy, int begx)
/***********************************************************************/
WINDOW * PDC_CDECL newwin(int nlines, int ncols, int begy, int begx)
{
extern void *(*callc)(size_t, size_t);
extern void (*fre)(void *);
@@ -211,9 +209,7 @@ WINDOW* PDC_CDECL newwin(int nlines, int ncols, int begy, int begx)
return win;
}
/***********************************************************************/
int PDC_CDECL delwin(WINDOW *win)
/***********************************************************************/
int PDC_CDECL delwin(WINDOW *win)
{
extern void (*fre)(void*);
@@ -242,9 +238,7 @@ int PDC_CDECL delwin(WINDOW *win)
return OK;
}
/***********************************************************************/
int PDC_CDECL mvwin(WINDOW *win, int y, int x)
/***********************************************************************/
int PDC_CDECL mvwin(WINDOW *win, int y, int x)
{
PDC_LOG(("mvwin() - called\n"));
@@ -260,10 +254,8 @@ int PDC_CDECL mvwin(WINDOW *win, int y, int x)
return OK;
}
/***********************************************************************/
WINDOW* PDC_CDECL subwin(WINDOW *orig, int nlines, int ncols,
int begin_y, int begin_x)
/***********************************************************************/
WINDOW * PDC_CDECL subwin(WINDOW *orig, int nlines, int ncols,
int begin_y, int begin_x)
{
WINDOW *win;
int i;
@@ -311,18 +303,14 @@ WINDOW* PDC_CDECL subwin(WINDOW *orig, int nlines, int ncols,
return win;
}
/***********************************************************************/
WINDOW* PDC_CDECL derwin(WINDOW *orig, int nlines, int ncols,
int begin_y, int begin_x)
/***********************************************************************/
WINDOW * PDC_CDECL derwin(WINDOW *orig, int nlines, int ncols,
int begin_y, int begin_x)
{
return subwin(orig, nlines, ncols, begin_y + orig->_begy,
begin_x + orig->_begx);
}
/***********************************************************************/
int PDC_CDECL mvderwin(WINDOW* win, int par_y, int par_x)
/***********************************************************************/
int PDC_CDECL mvderwin(WINDOW *win, int par_y, int par_x)
{
int i, j;
WINDOW *mypar;
@@ -348,9 +336,7 @@ int PDC_CDECL mvderwin(WINDOW* win, int par_y, int par_x)
return OK;
}
/***********************************************************************/
WINDOW* PDC_CDECL dupwin(WINDOW *win)
/***********************************************************************/
WINDOW * PDC_CDECL dupwin(WINDOW *win)
{
extern void *(*callc)(size_t, size_t);
extern void (*fre)(void *);
@@ -441,9 +427,7 @@ WINDOW* PDC_CDECL dupwin(WINDOW *win)
}
/***********************************************************************/
WINDOW * PDC_CDECL resize_window(WINDOW *win, int lins, int cols)
/***********************************************************************/
WINDOW * PDC_CDECL resize_window(WINDOW *win, int lins, int cols)
{
extern void *(*callc)(size_t, size_t);
extern void (*fre)(void *);
@@ -536,9 +520,7 @@ WINDOW * PDC_CDECL resize_window(WINDOW *win, int lins, int cols)
return new;
}
/***********************************************************************/
void PDC_CDECL wsyncup(WINDOW *win)
/***********************************************************************/
void PDC_CDECL wsyncup(WINDOW *win)
{
WINDOW *tmp;
@@ -548,9 +530,7 @@ void PDC_CDECL wsyncup(WINDOW *win)
touchwin(tmp);
}
/***********************************************************************/
int PDC_CDECL syncok(WINDOW *win, bool bf)
/***********************************************************************/
int PDC_CDECL syncok(WINDOW *win, bool bf)
{
PDC_LOG(("syncok() - called\n"));
@@ -562,9 +542,7 @@ int PDC_CDECL syncok(WINDOW *win, bool bf)
return OK;
}
/***********************************************************************/
void PDC_CDECL wcursyncup(WINDOW *win)
/***********************************************************************/
void PDC_CDECL wcursyncup(WINDOW *win)
{
WINDOW *tmp;
@@ -575,9 +553,7 @@ void PDC_CDECL wcursyncup(WINDOW *win)
tmp->_parx + tmp->_curx);
}
/***********************************************************************/
void PDC_CDECL wsyncdown(WINDOW *win)
/***********************************************************************/
void PDC_CDECL wsyncdown(WINDOW *win)
{
WINDOW *tmp;