(void)x;
(void)y;
- /* Oops */
return (-1);
}
(void)y;
(void)n;
- /* Oops */
return (-1);
}
/*
* Hack -- fake hook for "Term_text()" (see above)
*/
-static errr Term_text_hack(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr cp)
+static errr Term_text_hack(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr cp)
{
/* Unused */
(void)x;
(void)a;
(void)cp;
- /* Oops */
return (-1);
}
/*
* Hack -- fake hook for "Term_pict()" (see above)
*/
-static errr Term_pict_hack(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, cptr cp, const TERM_COLOR *tap, cptr tcp)
+static errr Term_pict_hack(TERM_LEN x, TERM_LEN y, int n, const TERM_COLOR *ap, concptr cp, const TERM_COLOR *tap, concptr tcp)
{
/* Unused */
(void)x;
(void)tap;
(void)tcp;
- /* Oops */
return (-1);
}
* a valid location, so the first "n" characters of "s" can all be added
* starting at (x,y) without causing any illegal operations.
*/
-void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s)
+void Term_queue_chars(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr s)
{
TERM_LEN x1 = -1, x2 = -1;
* On systems with a "soft" cursor, we must explicitly erase the cursor
* before flushing the output, if needed, to prevent a "jumpy" refresh.
* The actual method for this is horrible, but there is very little that
- * we can do to simplify it efficiently. XXX XXX XXX
+ * we can do to simplify it efficiently.
*
* On systems with a "hard" cursor, we will "hide" the cursor before
* flushing the output, if needed, to avoid a "flickery" refresh. It
* positive value, future calls to either function will
* return negative ones.
*/
-errr Term_addstr(int n, TERM_COLOR a, cptr s)
+errr Term_addstr(int n, TERM_COLOR a, concptr s)
{
int k;
TERM_LEN w = Term->wid;
/*
* Move to a location and, using an attr, add a string
*/
-errr Term_putstr(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, cptr s)
+errr Term_putstr(TERM_LEN x, TERM_LEN y, int n, TERM_COLOR a, concptr s)
{
errr res;
/*
* Move to a location and, using an attr, add a string vertically
*/
-errr Term_putstr_v(TERM_LEN x, TERM_LEN y, int n, byte a, cptr s)
+errr Term_putstr_v(TERM_LEN x, TERM_LEN y, int n, byte a, concptr s)
{
errr res;
int i;
/*
* Extract the current cursor location
*/
-errr Term_locate(int *x, int *y)
+errr Term_locate(TERM_LEN *x, TERM_LEN *y)
{
/* Access the cursor */
(*x) = Term->scr->cx;
/* Success (unless overflow) */
if (Term->key_head != Term->key_tail) return (0);
-#if 0
- /* Hack -- Forget the oldest key */
- if (++Term->key_tail == Term->key_size) Term->key_tail = 0;
-#endif
-
/* Problem */
return (1);
}
*/
errr Term_save(void)
{
- int w = Term->wid;
- int h = Term->hgt;
+ TERM_LEN w = Term->wid;
+ TERM_LEN h = Term->hgt;
/* Create */
if (!Term->mem)
{
TERM_LEN y;
- int w = Term->wid;
- int h = Term->hgt;
+ TERM_LEN w = Term->wid;
+ TERM_LEN h = Term->hgt;
term_win *exchanger;
/*
* React to a new physical window size.
*/
-errr Term_resize(int w, int h)
+errr Term_resize(TERM_LEN w, TERM_LEN h)
{
int i;
- int wid, hgt;
+ TERM_LEN wid, hgt;
- byte *hold_x1;
- byte *hold_x2;
+ TERM_LEN *hold_x1;
+ TERM_LEN *hold_x2;
term_win *hold_old;
term_win *hold_scr;
hold_tmp = Term->tmp;
/* Create new scanners */
- C_MAKE(Term->x1, h, byte);
- C_MAKE(Term->x2, h, byte);
+ C_MAKE(Term->x1, h, TERM_LEN);
+ C_MAKE(Term->x2, h, TERM_LEN);
/* Create new window */
MAKE(Term->old, term_win);
}
/* Free some arrays */
- C_KILL(hold_x1, Term->hgt, byte);
- C_KILL(hold_x2, Term->hgt, byte);
+ C_KILL(hold_x1, Term->hgt, TERM_LEN);
+ C_KILL(hold_x2, Term->hgt, TERM_LEN);
/* Nuke */
term_win_nuke(hold_old, Term->wid, Term->hgt);
}
/* Save new size */
- Term->wid = (byte_hack)w;
- Term->hgt = (byte_hack)h;
+ Term->wid = w;
+ Term->hgt = h;
/* Force "total erase" */
Term->total_erase = TRUE;
*/
errr term_nuke(term *t)
{
- int w = t->wid;
- int h = t->hgt;
+ TERM_LEN w = t->wid;
+ TERM_LEN h = t->hgt;
/* Hack -- Call the special "nuke" hook */
}
/* Free some arrays */
- C_KILL(t->x1, h, byte);
- C_KILL(t->x2, h, byte);
+ C_KILL(t->x1, h, TERM_LEN);
+ C_KILL(t->x2, h, TERM_LEN);
/* Free the input queue */
C_KILL(t->key_queue, t->key_size, char);
* By default, the cursor starts out "invisible"
* By default, we "erase" using "black spaces"
*/
-errr term_init(term *t, int w, int h, int k)
+errr term_init(term *t, TERM_LEN w, TERM_LEN h, int k)
{
TERM_LEN y;
/* Save the size */
- t->wid = (byte_hack)w;
- t->hgt = (byte_hack)h;
+ t->wid = w;
+ t->hgt = h;
/* Allocate change arrays */
- C_MAKE(t->x1, h, byte);
- C_MAKE(t->x2, h, byte);
+ C_MAKE(t->x1, h, TERM_LEN);
+ C_MAKE(t->x2, h, TERM_LEN);
/* Allocate "displayed" */