From 7b454f8ba3f3be66084b2e908e1d963c703beb6f Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 2 Feb 2021 21:53:13 -0500 Subject: [PATCH] Windows format string bits --- sys/winnt/nh340key.c | 2 +- sys/winnt/nhdefkey.c | 2 +- sys/winnt/nhraykey.c | 2 +- sys/winnt/winnt.c | 2 +- win/win32/mswproc.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/winnt/nh340key.c b/sys/winnt/nh340key.c index ec2e82711..1a54ff27b 100644 --- a/sys/winnt/nh340key.c +++ b/sys/winnt/nh340key.c @@ -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); } diff --git a/sys/winnt/nhdefkey.c b/sys/winnt/nhdefkey.c index 1f2f9d51e..a3bde087e 100644 --- a/sys/winnt/nhdefkey.c +++ b/sys/winnt/nhdefkey.c @@ -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); diff --git a/sys/winnt/nhraykey.c b/sys/winnt/nhraykey.c index 51d513587..978b6564f 100644 --- a/sys/winnt/nhraykey.c +++ b/sys/winnt/nhraykey.c @@ -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); } diff --git a/sys/winnt/winnt.c b/sys/winnt/winnt.c index dc98e95f5..45ececc75 100644 --- a/sys/winnt/winnt.c +++ b/sys/winnt/winnt.c @@ -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); diff --git a/win/win32/mswproc.c b/win/win32/mswproc.c index 60d65ff2a..3ebb1922e 100644 --- a/win/win32/mswproc.c +++ b/win/win32/mswproc.c @@ -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);