From 03ca45e6c86c32f345f8026802ef55d6bf4ff2cd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 10 Oct 2022 18:24:09 +0300 Subject: [PATCH 29/29] Add function header for Windows console reading thread entrypoint - Rename thread_proc() as windows_console_thread() - Document it See osdn #45509 Signed-off-by: Marko Lindqvist --- utility/support.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/utility/support.c b/utility/support.c index bd845e89ff..ee96bd909b 100644 --- a/utility/support.c +++ b/utility/support.c @@ -1020,7 +1020,10 @@ static char console_buf[CONSOLE_BUF_SIZE + 1]; #ifdef FREECIV_MSWINDOWS static HANDLE console_thread = INVALID_HANDLE_VALUE; -static DWORD WINAPI thread_proc(LPVOID arg) +/********************************************************************** + Windows console reading thread entrypoint. +***********************************************************************/ +static DWORD WINAPI windows_console_thread(LPVOID arg) { if (fgets(console_buf, CONSOLE_BUF_SIZE, stdin)) { char *s; @@ -1045,7 +1048,8 @@ void fc_init_console(void) } console_buf[0] = '\0'; - console_thread = (HANDLE) CreateThread(NULL, 0, thread_proc, NULL, 0, NULL); + console_thread = (HANDLE) CreateThread(NULL, 0, windows_console_thread, + NULL, 0, NULL); #else /* FREECIV_MSWINDOWS */ static bool initialized = FALSE; -- 2.35.1