Windows format string bits

This commit is contained in:
nhmall
2021-02-02 21:53:13 -05:00
parent 4c16f74b7f
commit 7b454f8ba3
5 changed files with 5 additions and 5 deletions

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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);