arg = va_arg(vp, int);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ sprintf(tmp, "%c", arg);
/* Done */
break;
arg = va_arg(vp, long);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ sprintf(tmp, "%ld", arg);
}
else
{
arg = va_arg(vp, int);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ sprintf(tmp, "%d", arg);
}
/* Done */
arg = va_arg(vp, unsigned long);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ switch (aux[q-1])
+ {
+ case 'u':
+ sprintf(tmp, "%lu", arg);
+ break;
+ case 'o':
+ sprintf(tmp, "%lo", arg);
+ break;
+ case 'x':
+ sprintf(tmp, "%lx", arg);
+ break;
+ case 'X':
+ sprintf(tmp, "%lX", arg);
+ break;
+ default:
+ sprintf(tmp, "");
+ break;
+ }
+
}
else
{
arg = va_arg(vp, unsigned int);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ switch (aux[q - 1])
+ {
+ case 'u':
+ sprintf(tmp, "%u", arg);
+ break;
+ case 'o':
+ sprintf(tmp, "%o", arg);
+ break;
+ case 'x':
+ sprintf(tmp, "%x", arg);
+ break;
+ case 'X':
+ sprintf(tmp, "%X", arg);
+ break;
+ default:
+ sprintf(tmp, "");
+ break;
+ }
}
/* Done */
arg = va_arg(vp, double);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ switch (aux[q - 1])
+ {
+ case 'f':
+ sprintf(tmp, "%f", arg);
+ break;
+ case 'e':
+ sprintf(tmp, "%e", arg);
+ break;
+ case 'E':
+ sprintf(tmp, "%E", arg);
+ break;
+ case 'g':
+ sprintf(tmp, "%g", arg);
+ break;
+ case 'G':
+ sprintf(tmp, "%G", arg);
+ break;
+ default:
+ sprintf(tmp, aux, arg);
+ break;
+ }
/* Done */
break;
arg = va_arg(vp, vptr);
/* Format the argument */
- sprintf(tmp, aux, arg);
+ sprintf(tmp, "%p", arg);
/* Done */
break;
arg2[1023] = '\0';
/* Format the argument */
- sprintf(tmp, aux, arg2);
+ sprintf(tmp, "%s", arg2);
/* Done */
break;
arg = va_arg(vp, vptr);
/* Format the "user data" */
- (void)vstrnfmt_aux(tmp, 1000, aux, arg);
+ (void)vstrnfmt_aux(tmp, 1000, aux[q-1] == 'V' ? "%V" : "%v", arg);
/* Done */
break;
{
/* Capitalize if possible */
if (islower(tmp[q]))
- tmp[q] = toupper(tmp[q]);
+ tmp[q] = (char)toupper(tmp[q]);
/* Done */
break;
*scr_tcc = tc;
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info for this row */
- if (x < Term->x1[y]) Term->x1[y] = x;
- if (x > Term->x2[y]) Term->x2[y] = x;
+ if (x < Term->x1[y]) Term->x1[y] = (byte_hack)x;
+ if (x > Term->x2[y]) Term->x2[y] = (byte_hack)x;
#ifdef JP
if (((scrn->a[y][x] & AF_BIGTILE2) == AF_BIGTILE2) ||
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = x1;
- if (x2 > Term->x2[y]) Term->x2[y] = x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
}
}
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = x1;
- if (x2 > Term->x2[y]) Term->x2[y] = x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
}
}
}
/* This row is all done */
- Term->x1[y] = w;
+ Term->x1[y] = (byte_hack)w;
Term->x2[y] = 0;
/* Hack -- Flush that row (if allowed) */
}
/* No rows are invalid */
- Term->y1 = h;
+ Term->y1 = (byte_hack)h;
Term->y2 = 0;
}
if (Term->scr->cv == v) return (1);
/* Change */
- Term->scr->cv = v;
+ Term->scr->cv = (bool_hack)v;
/* Success */
return (0);
if ((y < 0) || (y >= h)) return (-1);
/* Remember the cursor */
- Term->scr->cx = x;
- Term->scr->cy = y;
+ Term->scr->cx = (byte_hack)x;
+ Term->scr->cy = (byte_hack)y;
/* The cursor is not useless */
Term->scr->cu = 0;
Term_queue_chars(Term->scr->cx, Term->scr->cy, n, a, s);
/* Advance the cursor */
- Term->scr->cx += n;
+ Term->scr->cx += (byte_hack)n;
/* Hack -- Notice "Useless" cursor */
if (res) Term->scr->cu = 1;
n++;
#endif
/* Save the "literal" information */
- scr_aa[x] = na;
- scr_cc[x] = nc;
+ scr_aa[x] = (byte_hack)na;
+ scr_cc[x] = (char)nc;
scr_taa[x] = 0;
scr_tcc[x] = 0;
if (x1 >= 0)
{
/* Check for new min/max row info */
- if (y < Term->y1) Term->y1 = y;
- if (y > Term->y2) Term->y2 = y;
+ if (y < Term->y1) Term->y1 = (byte_hack)y;
+ if (y > Term->y2) Term->y2 = (byte_hack)y;
/* Check for new min/max col info in this row */
- if (x1 < Term->x1[y]) Term->x1[y] = x1;
- if (x2 > Term->x2[y]) Term->x2[y] = x2;
+ if (x1 < Term->x1[y]) Term->x1[y] = (byte_hack)x1;
+ if (x2 > Term->x2[y]) Term->x2[y] = (byte_hack)x2;
}
/* Success */
if (x1 < 0) x1 = 0;
/* Set y limits */
- Term->y1 = y1;
- Term->y2 = y2;
+ Term->y1 = (byte_hack)y1;
+ Term->y2 = (byte_hack)y2;
/* Set the x limits */
for (i = Term->y1; i <= Term->y2; i++)
if (Term->scr->a[i][x2j] & AF_KANJI1) x2j++;
}
- Term->x1[i] = x1j;
- Term->x2[i] = x2j;
+ Term->x1[i] = (byte_hack)x1j;
+ Term->x2[i] = (byte_hack)x2j;
c_ptr = Term->old->c[i];
if (!k) return (-1);
/* Store the char, advance the queue */
- Term->key_queue[Term->key_head++] = k;
+ Term->key_queue[Term->key_head++] = (char)k;
/* Circular queue, handle wrap */
if (Term->key_head == Term->key_size) Term->key_head = 0;
if (Term->key_tail == 0) Term->key_tail = Term->key_size;
/* Back up, Store the char */
- Term->key_queue[--Term->key_tail] = k;
+ Term->key_queue[--Term->key_tail] = (char)k;
/* Success (unless overflow) */
if (Term->key_head != Term->key_tail) return (0);
}
/* Save new size */
- Term->wid = w;
- Term->hgt = h;
+ Term->wid = (byte_hack)w;
+ Term->hgt = (byte_hack)h;
/* Force "total erase" */
Term->total_erase = TRUE;
t->key_head = t->key_tail = 0;
/* Determine the input queue size */
- t->key_size = k;
+ t->key_size = (u16b)k;
/* Allocate the input queue */
C_MAKE(t->key_queue, t->key_size, char);
/* Save the size */
- t->wid = w;
- t->hgt = h;
+ t->wid = (byte_hack)w;
+ t->hgt = (byte_hack)h;
/* Allocate change arrays */
C_MAKE(t->x1, h, byte);