]> granicus.if.org Git - nethack/commitdiff
Windows format string bits
authornhmall <nhmall@nethack.org>
Wed, 3 Feb 2021 02:53:13 +0000 (21:53 -0500)
committernhmall <nhmall@nethack.org>
Wed, 3 Feb 2021 02:55:34 +0000 (21:55 -0500)
sys/winnt/nh340key.c
sys/winnt/nhdefkey.c
sys/winnt/nhraykey.c
sys/winnt/winnt.c
win/win32/mswproc.c

index ec2e82711dd4fc18ea81a00eaaa377e3dff873bf..1a54ff27b9ecc83b0e6122a47c30b4c3605dd651 100644 (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);
     }
index 1f2f9d51e6470981234e5c592b271b3cf4a19564..a3bde087eb1b1e1af69c4eca29f6dd7d1fcae0a8 100644 (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);
index 51d513587aa1a1bc0c92482619f64cf708581027..978b6564fa34969731dab53aaaa200fce63e36b4 100644 (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);
     }
index dc98e95f58a21a031129011b4eb4f5dd200dca18..45ececc754f9c1f479db3280533872c16d0f565e 100644 (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);
 
index 60d65ff2a94189a3957abda81ad1c616335fd4c6..3ebb1922e7bfe1fa951f86a7e295ddfef3ac3442 100644 (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);