Windows format string bits
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
@@ -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
@@ -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
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user