Windows format string bits

This commit is contained in:
nhmall
2021-02-02 21:55:34 -05:00
parent 4c16f74b7f
commit 7b454f8ba3
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -183,7 +183,7 @@ ProcessKeystroke(
if (portdebug) { if (portdebug) {
char buf[BUFSZ]; char buf[BUFSZ];
Sprintf(buf, 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); shortdllname, ch, scan, vk, shiftstate);
fprintf(stdout, "\n%s", buf); fprintf(stdout, "\n%s", buf);
} }
+1 -1
View File
@@ -214,7 +214,7 @@ ProcessKeystroke(
#ifdef PORT_DEBUG #ifdef PORT_DEBUG
if (portdebug) { if (portdebug) {
char buf[BUFSZ]; 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)", "ta=%d (ESC to end)",
shortdllname, ch, scan, vk, pre_ch, shiftstate, k); shortdllname, ch, scan, vk, pre_ch, shiftstate, k);
fprintf(stdout, "\n%s", buf); fprintf(stdout, "\n%s", buf);
+1 -1
View File
@@ -401,7 +401,7 @@ ProcessKeystroke(
if (portdebug) { if (portdebug) {
char buf[BUFSZ]; char buf[BUFSZ];
Sprintf(buf, "PORTDEBUG: ch=%u, scan=%u, vk=%d, pre=%d, " 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); ch, scan, vk, pre_ch, shiftstate);
fprintf(stdout, "\n%s", buf); fprintf(stdout, "\n%s", buf);
} }
+1 -1
View File
@@ -422,7 +422,7 @@ GetConsoleHwnd(void)
/* Get current window title */ /* Get current window title */
GetConsoleTitle(OldTitle, sizeof OldTitle); GetConsoleTitle(OldTitle, sizeof OldTitle);
(void) sprintf(NewTitle, "NETHACK%d/%d", GetTickCount(), (void) sprintf(NewTitle, "NETHACK%ld/%ld", GetTickCount(),
GetCurrentProcessId()); GetCurrentProcessId());
SetConsoleTitle(NewTitle); SetConsoleTitle(NewTitle);
+1 -1
View File
@@ -2178,7 +2178,7 @@ initMapTiles(void)
char errmsg[BUFSZ]; char errmsg[BUFSZ];
errcode = GetLastError(); errcode = GetLastError();
Sprintf(errmsg, "%s (0x%x).", Sprintf(errmsg, "%s (0x%lx).",
"Cannot load tiles from the file. Reverting back to default", "Cannot load tiles from the file. Reverting back to default",
errcode); errcode);
raw_print(errmsg); raw_print(errmsg);