Windows format string bits
This commit is contained in:
@@ -183,7 +183,7 @@ ProcessKeystroke(
|
||||
if (portdebug) {
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf,
|
||||
"PORTDEBUG (%s): ch=%u, sc=%u, vk=%d, sh=0x%X (ESC to end)",
|
||||
"PORTDEBUG (%s): ch=%u, sc=%u, vk=%d, sh=0x%lX (ESC to end)",
|
||||
shortdllname, ch, scan, vk, shiftstate);
|
||||
fprintf(stdout, "\n%s", buf);
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ ProcessKeystroke(
|
||||
#ifdef PORT_DEBUG
|
||||
if (portdebug) {
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf, "PORTDEBUG (%s): ch=%u, sc=%u, vk=%d, pre=%d, sh=0x%X, "
|
||||
Sprintf(buf, "PORTDEBUG (%s): ch=%u, sc=%u, vk=%d, pre=%d, sh=0x%lX, "
|
||||
"ta=%d (ESC to end)",
|
||||
shortdllname, ch, scan, vk, pre_ch, shiftstate, k);
|
||||
fprintf(stdout, "\n%s", buf);
|
||||
|
||||
@@ -401,7 +401,7 @@ ProcessKeystroke(
|
||||
if (portdebug) {
|
||||
char buf[BUFSZ];
|
||||
Sprintf(buf, "PORTDEBUG: ch=%u, scan=%u, vk=%d, pre=%d, "
|
||||
"shiftstate=0x%X (ESC to end)\n",
|
||||
"shiftstate=0x%lX (ESC to end)\n",
|
||||
ch, scan, vk, pre_ch, shiftstate);
|
||||
fprintf(stdout, "\n%s", buf);
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ GetConsoleHwnd(void)
|
||||
/* Get current window title */
|
||||
GetConsoleTitle(OldTitle, sizeof OldTitle);
|
||||
|
||||
(void) sprintf(NewTitle, "NETHACK%d/%d", GetTickCount(),
|
||||
(void) sprintf(NewTitle, "NETHACK%ld/%ld", GetTickCount(),
|
||||
GetCurrentProcessId());
|
||||
SetConsoleTitle(NewTitle);
|
||||
|
||||
|
||||
@@ -2178,7 +2178,7 @@ initMapTiles(void)
|
||||
char errmsg[BUFSZ];
|
||||
|
||||
errcode = GetLastError();
|
||||
Sprintf(errmsg, "%s (0x%x).",
|
||||
Sprintf(errmsg, "%s (0x%lx).",
|
||||
"Cannot load tiles from the file. Reverting back to default",
|
||||
errcode);
|
||||
raw_print(errmsg);
|
||||
|
||||
Reference in New Issue
Block a user