diff options
| author | Eli Zaretskii | 2025-06-01 12:05:23 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2025-06-01 12:05:23 +0300 |
| commit | f77c8c7d45c0efa12bea148778772b557de18b95 (patch) | |
| tree | 52443c586a7f26687f8905612b09bda62d37d5b3 /src | |
| parent | c3d9581f84107c2e137c71bb8fbf386bc20c944c (diff) | |
| download | emacs-f77c8c7d45c0efa12bea148778772b557de18b95.tar.gz emacs-f77c8c7d45c0efa12bea148778772b557de18b95.zip | |
; Avoid compiler warnings in MinGW builds
* src/w32proc.c (child_proc_count, child_procs)
(Vw32_valid_locale_ids, Vw32_valid_codepages): Declare 'static'.
* src/w32inevt.c (faked_key): Declare.
* src/w32heap.c (data_region_base, data_region_end, heap): Declare.
* src/w32console.c (keyboard_handle, current_tty, cost): Declare.
* src/w32.c: Declare function pointers 'static'.
(excptr, excprec, ctxrec, g_b_init_compare_string_w)
(g_b_init_debug_break_process, LookupAccountSid_Name, dir_static)
(winsock_lib, _wsa_errlist): Declare.
* src/w32uniscribe.c: Declare function pointers 'static'.
(uniscribe_available, harfbuzz_available): Declare.
* src/w32term.c: Declare function pointers 'static'.
(vertical_scroll_bar_min_handle, horizontal_scroll_bar_min_handle)
(vertical_scroll_bar_top_border)
(vertical_scroll_bar_bottom_border)
(horizontal_scroll_bar_left_border)
(horizontal_scroll_bar_right_border, last_scroll_bar_drag_pos):
Declare 'static'.
* src/w32xfns.c (input_available, interrupt_handle, lpHead)
(lpTail, nQueue): Declare.
* src/w32menu.c: Declare function pointers 'static'.
* src/w32term.h (w32_frame_parm_handlers): Declare.
* src/w32fns.c: Declare function pointers 'static'.
(w32_darkmode, w32_color_map, deferred_msg_head, tip_frame)
(tip_timer, tip_last_string, tip_last_frame, tip_last_parms):
* src/lisp.h (daemon_type): Declare for WINDOWSNT as well.
* nt/cmdproxy.c (escape_char, child, interactive): Declare 'static'.
(Bug#78193)
Diffstat (limited to 'src')
| -rw-r--r-- | src/lisp.h | 5 | ||||
| -rw-r--r-- | src/w32.c | 88 | ||||
| -rw-r--r-- | src/w32console.c | 3 | ||||
| -rw-r--r-- | src/w32fns.c | 56 | ||||
| -rw-r--r-- | src/w32heap.c | 6 | ||||
| -rw-r--r-- | src/w32inevt.c | 1 | ||||
| -rw-r--r-- | src/w32menu.c | 14 | ||||
| -rw-r--r-- | src/w32proc.c | 8 | ||||
| -rw-r--r-- | src/w32term.c | 22 | ||||
| -rw-r--r-- | src/w32term.h | 1 | ||||
| -rw-r--r-- | src/w32uniscribe.c | 8 | ||||
| -rw-r--r-- | src/w32xfns.c | 9 |
12 files changed, 120 insertions, 101 deletions
diff --git a/src/lisp.h b/src/lisp.h index def1a0ebe34..605255dfaaa 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -5171,9 +5171,10 @@ extern bool no_site_lisp; | |||
| 5171 | /* True means put details like time stamps into builds. */ | 5171 | /* True means put details like time stamps into builds. */ |
| 5172 | extern bool build_details; | 5172 | extern bool build_details; |
| 5173 | 5173 | ||
| 5174 | #ifndef WINDOWSNT | 5174 | /* 0 not a daemon, 1 new-style (foreground), 2 old-style (background). |
| 5175 | /* 0 not a daemon, 1 foreground daemon, 2 background daemon. */ | 5175 | A negative value means the daemon initialization was already done. */ |
| 5176 | extern int daemon_type; | 5176 | extern int daemon_type; |
| 5177 | #ifndef WINDOWSNT | ||
| 5177 | #define IS_DAEMON (daemon_type != 0) | 5178 | #define IS_DAEMON (daemon_type != 0) |
| 5178 | /* Non-zero means daemon-initialized has not yet been called. */ | 5179 | /* Non-zero means daemon-initialized has not yet been called. */ |
| 5179 | #define DAEMON_RUNNING (daemon_type >= 0) | 5180 | #define DAEMON_RUNNING (daemon_type >= 0) |
| @@ -126,8 +126,11 @@ typedef struct _MEMORY_STATUS_EX { | |||
| 126 | (excptr->ExceptionRecord->ExceptionCode) and the address where the | 126 | (excptr->ExceptionRecord->ExceptionCode) and the address where the |
| 127 | exception happened (excptr->ExceptionRecord->ExceptionAddress), as | 127 | exception happened (excptr->ExceptionRecord->ExceptionAddress), as |
| 128 | well as some additional information specific to the exception. */ | 128 | well as some additional information specific to the exception. */ |
| 129 | extern PEXCEPTION_POINTERS excptr; | ||
| 129 | PEXCEPTION_POINTERS excptr; | 130 | PEXCEPTION_POINTERS excptr; |
| 131 | extern PEXCEPTION_RECORD excprec; | ||
| 130 | PEXCEPTION_RECORD excprec; | 132 | PEXCEPTION_RECORD excprec; |
| 133 | extern PCONTEXT ctxrec; | ||
| 131 | PCONTEXT ctxrec; | 134 | PCONTEXT ctxrec; |
| 132 | 135 | ||
| 133 | #include <lmcons.h> | 136 | #include <lmcons.h> |
| @@ -353,7 +356,9 @@ static BOOL g_b_init_expand_environment_strings_w; | |||
| 353 | static BOOL g_b_init_get_user_default_ui_language; | 356 | static BOOL g_b_init_get_user_default_ui_language; |
| 354 | static BOOL g_b_init_get_console_font_size; | 357 | static BOOL g_b_init_get_console_font_size; |
| 355 | 358 | ||
| 359 | extern BOOL g_b_init_compare_string_w; | ||
| 356 | BOOL g_b_init_compare_string_w; | 360 | BOOL g_b_init_compare_string_w; |
| 361 | extern BOOL g_b_init_debug_break_process; | ||
| 357 | BOOL g_b_init_debug_break_process; | 362 | BOOL g_b_init_debug_break_process; |
| 358 | 363 | ||
| 359 | /* | 364 | /* |
| @@ -379,12 +384,12 @@ typedef BOOL (WINAPI * GetProcessTimes_Proc) ( | |||
| 379 | LPFILETIME kernel_time, | 384 | LPFILETIME kernel_time, |
| 380 | LPFILETIME user_time); | 385 | LPFILETIME user_time); |
| 381 | 386 | ||
| 382 | GetProcessTimes_Proc get_process_times_fn = NULL; | 387 | static GetProcessTimes_Proc get_process_times_fn = NULL; |
| 383 | 388 | ||
| 384 | #ifdef _UNICODE | 389 | #ifdef _UNICODE |
| 385 | const char * const LookupAccountSid_Name = "LookupAccountSidW"; | 390 | static const char * const LookupAccountSid_Name = "LookupAccountSidW"; |
| 386 | #else | 391 | #else |
| 387 | const char * const LookupAccountSid_Name = "LookupAccountSidA"; | 392 | static const char * const LookupAccountSid_Name = "LookupAccountSidA"; |
| 388 | #endif | 393 | #endif |
| 389 | typedef BOOL (WINAPI * LookupAccountSid_Proc) ( | 394 | typedef BOOL (WINAPI * LookupAccountSid_Proc) ( |
| 390 | LPCTSTR lpSystemName, | 395 | LPCTSTR lpSystemName, |
| @@ -3647,7 +3652,7 @@ is_exec (const char * name) | |||
| 3647 | the code that calls them doesn't grok UTF-8 encoded file names we | 3652 | the code that calls them doesn't grok UTF-8 encoded file names we |
| 3648 | produce in dirent->d_name[]. */ | 3653 | produce in dirent->d_name[]. */ |
| 3649 | 3654 | ||
| 3650 | struct dirent dir_static; /* simulated directory contents */ | 3655 | static struct dirent dir_static; /* simulated directory contents */ |
| 3651 | static HANDLE dir_find_handle = INVALID_HANDLE_VALUE; | 3656 | static HANDLE dir_find_handle = INVALID_HANDLE_VALUE; |
| 3652 | static int dir_is_fat; | 3657 | static int dir_is_fat; |
| 3653 | static char dir_pathname[MAX_UTF8_PATH]; | 3658 | static char dir_pathname[MAX_UTF8_PATH]; |
| @@ -4777,7 +4782,7 @@ int | |||
| 4777 | sys_rename_replace (const char *oldname, const char *newname, BOOL force) | 4782 | sys_rename_replace (const char *oldname, const char *newname, BOOL force) |
| 4778 | { | 4783 | { |
| 4779 | BOOL result; | 4784 | BOOL result; |
| 4780 | char temp[MAX_UTF8_PATH], temp_a[MAX_PATH]; | 4785 | char temp[MAX_UTF8_PATH], temp_a[MAX_PATH + 15]; /* "+ 15": pacify GCC */ |
| 4781 | int newname_dev; | 4786 | int newname_dev; |
| 4782 | int oldname_dev; | 4787 | int oldname_dev; |
| 4783 | bool have_temp_a = false; | 4788 | bool have_temp_a = false; |
| @@ -7760,55 +7765,56 @@ w32_memory_info (unsigned long long *totalram, unsigned long long *freeram, | |||
| 7760 | (eg. gethostname). */ | 7765 | (eg. gethostname). */ |
| 7761 | 7766 | ||
| 7762 | /* function pointers for relevant socket functions */ | 7767 | /* function pointers for relevant socket functions */ |
| 7763 | int (PASCAL *pfn_WSAStartup) (WORD wVersionRequired, LPWSADATA lpWSAData); | 7768 | static int (PASCAL *pfn_WSAStartup) (WORD wVersionRequired, LPWSADATA lpWSAData); |
| 7764 | void (PASCAL *pfn_WSASetLastError) (int iError); | 7769 | static void (PASCAL *pfn_WSASetLastError) (int iError); |
| 7765 | int (PASCAL *pfn_WSAGetLastError) (void); | 7770 | static int (PASCAL *pfn_WSAGetLastError) (void); |
| 7766 | int (PASCAL *pfn_WSAEventSelect) (SOCKET s, HANDLE hEventObject, long lNetworkEvents); | 7771 | static int (PASCAL *pfn_WSAEventSelect) (SOCKET s, HANDLE hEventObject, long lNetworkEvents); |
| 7767 | int (PASCAL *pfn_WSAEnumNetworkEvents) (SOCKET s, HANDLE hEventObject, | 7772 | static int (PASCAL *pfn_WSAEnumNetworkEvents) (SOCKET s, HANDLE hEventObject, |
| 7768 | WSANETWORKEVENTS *NetworkEvents); | 7773 | WSANETWORKEVENTS *NetworkEvents); |
| 7769 | 7774 | ||
| 7770 | HANDLE (PASCAL *pfn_WSACreateEvent) (void); | 7775 | static HANDLE (PASCAL *pfn_WSACreateEvent) (void); |
| 7771 | int (PASCAL *pfn_WSACloseEvent) (HANDLE hEvent); | 7776 | static int (PASCAL *pfn_WSACloseEvent) (HANDLE hEvent); |
| 7772 | int (PASCAL *pfn_socket) (int af, int type, int protocol); | 7777 | static int (PASCAL *pfn_socket) (int af, int type, int protocol); |
| 7773 | int (PASCAL *pfn_bind) (SOCKET s, const struct sockaddr *addr, int namelen); | 7778 | static int (PASCAL *pfn_bind) (SOCKET s, const struct sockaddr *addr, int namelen); |
| 7774 | int (PASCAL *pfn_connect) (SOCKET s, const struct sockaddr *addr, int namelen); | 7779 | static int (PASCAL *pfn_connect) (SOCKET s, const struct sockaddr *addr, int namelen); |
| 7775 | int (PASCAL *pfn_ioctlsocket) (SOCKET s, long cmd, u_long *argp); | 7780 | static int (PASCAL *pfn_ioctlsocket) (SOCKET s, long cmd, u_long *argp); |
| 7776 | int (PASCAL *pfn_recv) (SOCKET s, char * buf, int len, int flags); | 7781 | static int (PASCAL *pfn_recv) (SOCKET s, char * buf, int len, int flags); |
| 7777 | int (PASCAL *pfn_send) (SOCKET s, const char * buf, int len, int flags); | 7782 | static int (PASCAL *pfn_send) (SOCKET s, const char * buf, int len, int flags); |
| 7778 | int (PASCAL *pfn_closesocket) (SOCKET s); | 7783 | static int (PASCAL *pfn_closesocket) (SOCKET s); |
| 7779 | int (PASCAL *pfn_shutdown) (SOCKET s, int how); | 7784 | static int (PASCAL *pfn_shutdown) (SOCKET s, int how); |
| 7780 | int (PASCAL *pfn_WSACleanup) (void); | 7785 | static int (PASCAL *pfn_WSACleanup) (void); |
| 7781 | 7786 | ||
| 7782 | u_short (PASCAL *pfn_htons) (u_short hostshort); | 7787 | static u_short (PASCAL *pfn_htons) (u_short hostshort); |
| 7783 | u_short (PASCAL *pfn_ntohs) (u_short netshort); | 7788 | static u_short (PASCAL *pfn_ntohs) (u_short netshort); |
| 7784 | u_long (PASCAL *pfn_htonl) (u_long hostlong); | 7789 | static u_long (PASCAL *pfn_htonl) (u_long hostlong); |
| 7785 | u_long (PASCAL *pfn_ntohl) (u_long netlong); | 7790 | static u_long (PASCAL *pfn_ntohl) (u_long netlong); |
| 7786 | unsigned long (PASCAL *pfn_inet_addr) (const char * cp); | 7791 | static unsigned long (PASCAL *pfn_inet_addr) (const char * cp); |
| 7787 | int (PASCAL *pfn_gethostname) (char * name, int namelen); | 7792 | static int (PASCAL *pfn_gethostname) (char * name, int namelen); |
| 7788 | struct hostent * (PASCAL *pfn_gethostbyname) (const char * name); | 7793 | static struct hostent * (PASCAL *pfn_gethostbyname) (const char * name); |
| 7789 | struct servent * (PASCAL *pfn_getservbyname) (const char * name, const char * proto); | 7794 | static struct servent * (PASCAL *pfn_getservbyname) (const char * name, const char * proto); |
| 7790 | int (PASCAL *pfn_getpeername) (SOCKET s, struct sockaddr *addr, int * namelen); | 7795 | static int (PASCAL *pfn_getpeername) (SOCKET s, struct sockaddr *addr, int * namelen); |
| 7791 | int (PASCAL *pfn_setsockopt) (SOCKET s, int level, int optname, | 7796 | static int (PASCAL *pfn_setsockopt) (SOCKET s, int level, int optname, |
| 7792 | const char * optval, int optlen); | 7797 | const char * optval, int optlen); |
| 7793 | int (PASCAL *pfn_listen) (SOCKET s, int backlog); | 7798 | static int (PASCAL *pfn_listen) (SOCKET s, int backlog); |
| 7794 | int (PASCAL *pfn_getsockname) (SOCKET s, struct sockaddr * name, | 7799 | static int (PASCAL *pfn_getsockname) (SOCKET s, struct sockaddr * name, |
| 7795 | int * namelen); | 7800 | int * namelen); |
| 7796 | SOCKET (PASCAL *pfn_accept) (SOCKET s, struct sockaddr * addr, int * addrlen); | 7801 | static SOCKET (PASCAL *pfn_accept) (SOCKET s, struct sockaddr * addr, int * addrlen); |
| 7797 | int (PASCAL *pfn_recvfrom) (SOCKET s, char * buf, int len, int flags, | 7802 | static int (PASCAL *pfn_recvfrom) (SOCKET s, char * buf, int len, int flags, |
| 7798 | struct sockaddr * from, int * fromlen); | 7803 | struct sockaddr * from, int * fromlen); |
| 7799 | int (PASCAL *pfn_sendto) (SOCKET s, const char * buf, int len, int flags, | 7804 | static int (PASCAL *pfn_sendto) (SOCKET s, const char * buf, int len, int flags, |
| 7800 | const struct sockaddr * to, int tolen); | 7805 | const struct sockaddr * to, int tolen); |
| 7801 | 7806 | ||
| 7802 | int (PASCAL *pfn_getaddrinfo) (const char *, const char *, | 7807 | static int (PASCAL *pfn_getaddrinfo) (const char *, const char *, |
| 7803 | const struct addrinfo *, struct addrinfo **); | 7808 | const struct addrinfo *, struct addrinfo **); |
| 7804 | void (PASCAL *pfn_freeaddrinfo) (struct addrinfo *); | 7809 | static void (PASCAL *pfn_freeaddrinfo) (struct addrinfo *); |
| 7805 | 7810 | ||
| 7806 | /* SetHandleInformation is only needed to make sockets non-inheritable. */ | 7811 | /* SetHandleInformation is only needed to make sockets non-inheritable. */ |
| 7807 | BOOL (WINAPI *pfn_SetHandleInformation) (HANDLE object, DWORD mask, DWORD flags); | 7812 | static BOOL (WINAPI *pfn_SetHandleInformation) (HANDLE object, DWORD mask, DWORD flags); |
| 7808 | #ifndef HANDLE_FLAG_INHERIT | 7813 | #ifndef HANDLE_FLAG_INHERIT |
| 7809 | #define HANDLE_FLAG_INHERIT 1 | 7814 | #define HANDLE_FLAG_INHERIT 1 |
| 7810 | #endif | 7815 | #endif |
| 7811 | 7816 | ||
| 7817 | extern HANDLE winsock_lib; | ||
| 7812 | HANDLE winsock_lib; | 7818 | HANDLE winsock_lib; |
| 7813 | static int winsock_inuse; | 7819 | static int winsock_inuse; |
| 7814 | 7820 | ||
| @@ -7971,7 +7977,7 @@ check_errno (void) | |||
| 7971 | } | 7977 | } |
| 7972 | 7978 | ||
| 7973 | /* Extend strerror to handle the winsock-specific error codes. */ | 7979 | /* Extend strerror to handle the winsock-specific error codes. */ |
| 7974 | struct { | 7980 | static struct { |
| 7975 | int errnum; | 7981 | int errnum; |
| 7976 | const char * msg; | 7982 | const char * msg; |
| 7977 | } _wsa_errlist[] = { | 7983 | } _wsa_errlist[] = { |
diff --git a/src/w32console.c b/src/w32console.c index b18eda437ad..1bca0cadff9 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -64,6 +64,7 @@ static CONSOLE_CURSOR_INFO console_cursor_info; | |||
| 64 | static CONSOLE_CURSOR_INFO prev_console_cursor; | 64 | static CONSOLE_CURSOR_INFO prev_console_cursor; |
| 65 | #endif | 65 | #endif |
| 66 | 66 | ||
| 67 | extern HANDLE keyboard_handle; | ||
| 67 | HANDLE keyboard_handle; | 68 | HANDLE keyboard_handle; |
| 68 | int w32_console_unicode_input; | 69 | int w32_console_unicode_input; |
| 69 | 70 | ||
| @@ -623,7 +624,9 @@ sys_tgetstr (char *cap, char **area) | |||
| 623 | stubs from cm.c | 624 | stubs from cm.c |
| 624 | ***********************************************************************/ | 625 | ***********************************************************************/ |
| 625 | 626 | ||
| 627 | extern struct tty_display_info *current_tty; | ||
| 626 | struct tty_display_info *current_tty = NULL; | 628 | struct tty_display_info *current_tty = NULL; |
| 629 | extern int cost; | ||
| 627 | int cost = 0; | 630 | int cost = 0; |
| 628 | 631 | ||
| 629 | int evalcost (int); | 632 | int evalcost (int); |
diff --git a/src/w32fns.c b/src/w32fns.c index 17221b73470..d96c051f30d 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -237,26 +237,28 @@ typedef struct Emacs_GESTURECONFIG | |||
| 237 | typedef BOOL (WINAPI * SetGestureConfig_proc) (HWND, DWORD, UINT, | 237 | typedef BOOL (WINAPI * SetGestureConfig_proc) (HWND, DWORD, UINT, |
| 238 | Emacs_PGESTURECONFIG, UINT); | 238 | Emacs_PGESTURECONFIG, UINT); |
| 239 | 239 | ||
| 240 | TrackMouseEvent_Proc track_mouse_event_fn = NULL; | 240 | static TrackMouseEvent_Proc track_mouse_event_fn = NULL; |
| 241 | ImmGetCompositionString_Proc get_composition_string_fn = NULL; | 241 | static ImmGetCompositionString_Proc get_composition_string_fn = NULL; |
| 242 | ImmGetContext_Proc get_ime_context_fn = NULL; | 242 | static ImmGetContext_Proc get_ime_context_fn = NULL; |
| 243 | ImmGetOpenStatus_Proc get_ime_open_status_fn = NULL; | 243 | static ImmGetOpenStatus_Proc get_ime_open_status_fn = NULL; |
| 244 | ImmSetOpenStatus_Proc set_ime_open_status_fn = NULL; | 244 | static ImmSetOpenStatus_Proc set_ime_open_status_fn = NULL; |
| 245 | ImmReleaseContext_Proc release_ime_context_fn = NULL; | 245 | static ImmReleaseContext_Proc release_ime_context_fn = NULL; |
| 246 | ImmSetCompositionWindow_Proc set_ime_composition_window_fn = NULL; | 246 | static ImmSetCompositionWindow_Proc set_ime_composition_window_fn = NULL; |
| 247 | MonitorFromPoint_Proc monitor_from_point_fn = NULL; | 247 | static MonitorFromPoint_Proc monitor_from_point_fn = NULL; |
| 248 | GetMonitorInfo_Proc get_monitor_info_fn = NULL; | 248 | static GetMonitorInfo_Proc get_monitor_info_fn = NULL; |
| 249 | MonitorFromWindow_Proc monitor_from_window_fn = NULL; | 249 | static MonitorFromWindow_Proc monitor_from_window_fn = NULL; |
| 250 | EnumDisplayMonitors_Proc enum_display_monitors_fn = NULL; | 250 | static EnumDisplayMonitors_Proc enum_display_monitors_fn = NULL; |
| 251 | GetTitleBarInfo_Proc get_title_bar_info_fn = NULL; | 251 | static GetTitleBarInfo_Proc get_title_bar_info_fn = NULL; |
| 252 | extern IsDebuggerPresent_Proc is_debugger_present; | ||
| 252 | IsDebuggerPresent_Proc is_debugger_present = NULL; | 253 | IsDebuggerPresent_Proc is_debugger_present = NULL; |
| 254 | extern SetThreadDescription_Proc set_thread_description; | ||
| 253 | SetThreadDescription_Proc set_thread_description = NULL; | 255 | SetThreadDescription_Proc set_thread_description = NULL; |
| 254 | SetWindowTheme_Proc SetWindowTheme_fn = NULL; | 256 | static SetWindowTheme_Proc SetWindowTheme_fn = NULL; |
| 255 | DwmSetWindowAttribute_Proc DwmSetWindowAttribute_fn = NULL; | 257 | static DwmSetWindowAttribute_Proc DwmSetWindowAttribute_fn = NULL; |
| 256 | WTSUnRegisterSessionNotification_Proc WTSUnRegisterSessionNotification_fn = NULL; | 258 | static WTSUnRegisterSessionNotification_Proc WTSUnRegisterSessionNotification_fn = NULL; |
| 257 | WTSRegisterSessionNotification_Proc WTSRegisterSessionNotification_fn = NULL; | 259 | static WTSRegisterSessionNotification_Proc WTSRegisterSessionNotification_fn = NULL; |
| 258 | RegisterTouchWindow_proc RegisterTouchWindow_fn = NULL; | 260 | static RegisterTouchWindow_proc RegisterTouchWindow_fn = NULL; |
| 259 | SetGestureConfig_proc SetGestureConfig_fn = NULL; | 261 | static SetGestureConfig_proc SetGestureConfig_fn = NULL; |
| 260 | 262 | ||
| 261 | extern AppendMenuW_Proc unicode_append_menu; | 263 | extern AppendMenuW_Proc unicode_append_menu; |
| 262 | 264 | ||
| @@ -312,7 +314,7 @@ int w32_minor_version; | |||
| 312 | int w32_build_number; | 314 | int w32_build_number; |
| 313 | 315 | ||
| 314 | /* If the OS is set to use dark mode. */ | 316 | /* If the OS is set to use dark mode. */ |
| 315 | BOOL w32_darkmode = FALSE; | 317 | static BOOL w32_darkmode = FALSE; |
| 316 | 318 | ||
| 317 | /* Distinguish between Windows NT and Windows 95. */ | 319 | /* Distinguish between Windows NT and Windows 95. */ |
| 318 | int os_subtype; | 320 | int os_subtype; |
| @@ -574,7 +576,7 @@ typedef struct colormap_t | |||
| 574 | COLORREF colorref; | 576 | COLORREF colorref; |
| 575 | } colormap_t; | 577 | } colormap_t; |
| 576 | 578 | ||
| 577 | colormap_t w32_color_map[] = | 579 | static colormap_t w32_color_map[] = |
| 578 | { | 580 | { |
| 579 | {"snow" , PALETTERGB (255,250,250)}, | 581 | {"snow" , PALETTERGB (255,250,250)}, |
| 580 | {"ghost white" , PALETTERGB (248,248,255)}, | 582 | {"ghost white" , PALETTERGB (248,248,255)}, |
| @@ -3816,7 +3818,7 @@ w32_msg_pump (deferred_msg * msg_buf) | |||
| 3816 | } | 3818 | } |
| 3817 | } | 3819 | } |
| 3818 | 3820 | ||
| 3819 | deferred_msg * deferred_msg_head; | 3821 | static deferred_msg * deferred_msg_head; |
| 3820 | 3822 | ||
| 3821 | static deferred_msg * | 3823 | static deferred_msg * |
| 3822 | find_deferred_msg (HWND hwnd, UINT msg) | 3824 | find_deferred_msg (HWND hwnd, UINT msg) |
| @@ -7356,7 +7358,7 @@ static void compute_tip_xy (struct frame *, Lisp_Object, Lisp_Object, | |||
| 7356 | Lisp_Object, int, int, int *, int *); | 7358 | Lisp_Object, int, int, int *, int *); |
| 7357 | 7359 | ||
| 7358 | /* The frame of the currently visible tooltip. */ | 7360 | /* The frame of the currently visible tooltip. */ |
| 7359 | Lisp_Object tip_frame; | 7361 | static Lisp_Object tip_frame; |
| 7360 | 7362 | ||
| 7361 | /* The window-system window corresponding to the frame of the | 7363 | /* The window-system window corresponding to the frame of the |
| 7362 | currently visible tooltip. */ | 7364 | currently visible tooltip. */ |
| @@ -7364,16 +7366,16 @@ Window tip_window; | |||
| 7364 | 7366 | ||
| 7365 | /* A timer that hides or deletes the currently visible tooltip when it | 7367 | /* A timer that hides or deletes the currently visible tooltip when it |
| 7366 | fires. */ | 7368 | fires. */ |
| 7367 | Lisp_Object tip_timer; | 7369 | static Lisp_Object tip_timer; |
| 7368 | 7370 | ||
| 7369 | /* STRING argument of last `x-show-tip' call. */ | 7371 | /* STRING argument of last `x-show-tip' call. */ |
| 7370 | Lisp_Object tip_last_string; | 7372 | static Lisp_Object tip_last_string; |
| 7371 | 7373 | ||
| 7372 | /* Normalized FRAME argument of last `x-show-tip' call. */ | 7374 | /* Normalized FRAME argument of last `x-show-tip' call. */ |
| 7373 | Lisp_Object tip_last_frame; | 7375 | static Lisp_Object tip_last_frame; |
| 7374 | 7376 | ||
| 7375 | /* PARMS argument of last `x-show-tip' call. */ | 7377 | /* PARMS argument of last `x-show-tip' call. */ |
| 7376 | Lisp_Object tip_last_parms; | 7378 | static Lisp_Object tip_last_parms; |
| 7377 | 7379 | ||
| 7378 | 7380 | ||
| 7379 | static void | 7381 | static void |
| @@ -10901,7 +10903,7 @@ w32_get_resource (const char *key, const char *name, LPDWORD lpdwtype) | |||
| 10901 | ***********************************************************************/ | 10903 | ***********************************************************************/ |
| 10902 | 10904 | ||
| 10903 | typedef BOOL (WINAPI * SystemParametersInfoW_Proc) (UINT,UINT,PVOID,UINT); | 10905 | typedef BOOL (WINAPI * SystemParametersInfoW_Proc) (UINT,UINT,PVOID,UINT); |
| 10904 | SystemParametersInfoW_Proc system_parameters_info_w_fn = NULL; | 10906 | static SystemParametersInfoW_Proc system_parameters_info_w_fn = NULL; |
| 10905 | 10907 | ||
| 10906 | DEFUN ("w32-set-wallpaper", Fw32_set_wallpaper, Sw32_set_wallpaper, 1, 1, 0, | 10908 | DEFUN ("w32-set-wallpaper", Fw32_set_wallpaper, Sw32_set_wallpaper, 1, 1, 0, |
| 10907 | doc: /* Set the desktop wallpaper image to IMAGE-FILE. */) | 10909 | doc: /* Set the desktop wallpaper image to IMAGE-FILE. */) |
diff --git a/src/w32heap.c b/src/w32heap.c index f767e5781bf..035dee15f3c 100644 --- a/src/w32heap.c +++ b/src/w32heap.c | |||
| @@ -87,14 +87,14 @@ typedef struct _RTL_HEAP_PARAMETERS { | |||
| 87 | } RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS; | 87 | } RTL_HEAP_PARAMETERS, *PRTL_HEAP_PARAMETERS; |
| 88 | 88 | ||
| 89 | /* Info for keeping track of our dynamic heap used after dumping. */ | 89 | /* Info for keeping track of our dynamic heap used after dumping. */ |
| 90 | unsigned char *data_region_base = NULL; | 90 | static unsigned char *data_region_base = NULL; |
| 91 | unsigned char *data_region_end = NULL; | 91 | static unsigned char *data_region_end = NULL; |
| 92 | 92 | ||
| 93 | /* Handle for the private heap: | 93 | /* Handle for the private heap: |
| 94 | - inside the dumped_data[] array before dump with unexec, | 94 | - inside the dumped_data[] array before dump with unexec, |
| 95 | - outside of it after dump, or always if pdumper is used. | 95 | - outside of it after dump, or always if pdumper is used. |
| 96 | */ | 96 | */ |
| 97 | HANDLE heap = NULL; | 97 | static HANDLE heap = NULL; |
| 98 | 98 | ||
| 99 | /* We redirect the standard allocation functions. */ | 99 | /* We redirect the standard allocation functions. */ |
| 100 | malloc_fn the_malloc_fn; | 100 | malloc_fn the_malloc_fn; |
diff --git a/src/w32inevt.c b/src/w32inevt.c index 9e3c3a75446..615f162a210 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c | |||
| @@ -72,6 +72,7 @@ w32_read_console_input (HANDLE h, INPUT_RECORD *rec, DWORD recsize, | |||
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | /* Set by w32_console_toggle_lock_key. */ | 74 | /* Set by w32_console_toggle_lock_key. */ |
| 75 | extern int faked_key; | ||
| 75 | int faked_key; | 76 | int faked_key; |
| 76 | 77 | ||
| 77 | static int | 78 | static int |
diff --git a/src/w32menu.c b/src/w32menu.c index df38c41b0f2..f35712f07f4 100644 --- a/src/w32menu.c +++ b/src/w32menu.c | |||
| @@ -141,15 +141,17 @@ typedef HRESULT (WINAPI *TaskDialogIndirect_Proc) ( | |||
| 141 | OUT BOOL *pfVerificationFlagChecked); | 141 | OUT BOOL *pfVerificationFlagChecked); |
| 142 | 142 | ||
| 143 | #ifdef NTGUI_UNICODE | 143 | #ifdef NTGUI_UNICODE |
| 144 | GetMenuItemInfoA_Proc get_menu_item_info = GetMenuItemInfoA; | 144 | static GetMenuItemInfoA_Proc get_menu_item_info = GetMenuItemInfoA; |
| 145 | SetMenuItemInfoA_Proc set_menu_item_info = SetMenuItemInfoA; | 145 | static SetMenuItemInfoA_Proc set_menu_item_info = SetMenuItemInfoA; |
| 146 | extern AppendMenuW_Proc unicode_append_menu; | ||
| 146 | AppendMenuW_Proc unicode_append_menu = AppendMenuW; | 147 | AppendMenuW_Proc unicode_append_menu = AppendMenuW; |
| 147 | MessageBoxW_Proc unicode_message_box = MessageBoxW; | 148 | static MessageBoxW_Proc unicode_message_box = MessageBoxW; |
| 148 | #else /* !NTGUI_UNICODE */ | 149 | #else /* !NTGUI_UNICODE */ |
| 149 | GetMenuItemInfoA_Proc get_menu_item_info = NULL; | 150 | static GetMenuItemInfoA_Proc get_menu_item_info = NULL; |
| 150 | SetMenuItemInfoA_Proc set_menu_item_info = NULL; | 151 | static SetMenuItemInfoA_Proc set_menu_item_info = NULL; |
| 152 | extern AppendMenuW_Proc unicode_append_menu; | ||
| 151 | AppendMenuW_Proc unicode_append_menu = NULL; | 153 | AppendMenuW_Proc unicode_append_menu = NULL; |
| 152 | MessageBoxW_Proc unicode_message_box = NULL; | 154 | static MessageBoxW_Proc unicode_message_box = NULL; |
| 153 | #endif /* NTGUI_UNICODE */ | 155 | #endif /* NTGUI_UNICODE */ |
| 154 | 156 | ||
| 155 | static TaskDialogIndirect_Proc task_dialog_indirect; | 157 | static TaskDialogIndirect_Proc task_dialog_indirect; |
diff --git a/src/w32proc.c b/src/w32proc.c index 77042149f96..d3c11b70f39 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -1795,8 +1795,8 @@ msg_wait_for_objects (DWORD nCount, HANDLE *lpHandles, | |||
| 1795 | #define _P_NOWAIT 1 | 1795 | #define _P_NOWAIT 1 |
| 1796 | 1796 | ||
| 1797 | /* Child process management list. */ | 1797 | /* Child process management list. */ |
| 1798 | int child_proc_count = 0; | 1798 | static int child_proc_count = 0; |
| 1799 | child_process child_procs[ MAX_CHILDREN ]; | 1799 | static child_process child_procs[ MAX_CHILDREN ]; |
| 1800 | 1800 | ||
| 1801 | static DWORD WINAPI reader_thread (void *arg); | 1801 | static DWORD WINAPI reader_thread (void *arg); |
| 1802 | 1802 | ||
| @@ -4293,7 +4293,7 @@ int_from_hex (char * s) | |||
| 4293 | 4293 | ||
| 4294 | /* We need to build a global list, since the EnumSystemLocale callback | 4294 | /* We need to build a global list, since the EnumSystemLocale callback |
| 4295 | function isn't given a context pointer. */ | 4295 | function isn't given a context pointer. */ |
| 4296 | Lisp_Object Vw32_valid_locale_ids; | 4296 | static Lisp_Object Vw32_valid_locale_ids; |
| 4297 | 4297 | ||
| 4298 | static BOOL CALLBACK ALIGN_STACK | 4298 | static BOOL CALLBACK ALIGN_STACK |
| 4299 | enum_locale_fn (LPTSTR localeNum) | 4299 | enum_locale_fn (LPTSTR localeNum) |
| @@ -4357,7 +4357,7 @@ If successful, the new locale id is returned, otherwise nil. */) | |||
| 4357 | 4357 | ||
| 4358 | /* We need to build a global list, since the EnumCodePages callback | 4358 | /* We need to build a global list, since the EnumCodePages callback |
| 4359 | function isn't given a context pointer. */ | 4359 | function isn't given a context pointer. */ |
| 4360 | Lisp_Object Vw32_valid_codepages; | 4360 | static Lisp_Object Vw32_valid_codepages; |
| 4361 | 4361 | ||
| 4362 | static BOOL CALLBACK ALIGN_STACK | 4362 | static BOOL CALLBACK ALIGN_STACK |
| 4363 | enum_codepage_fn (LPTSTR codepageNum) | 4363 | enum_codepage_fn (LPTSTR codepageNum) |
diff --git a/src/w32term.c b/src/w32term.c index 5613ade01ce..c9e7ac39379 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -118,10 +118,10 @@ typedef struct tagGLYPHSET | |||
| 118 | #endif /* compiling for pre-Win2k */ | 118 | #endif /* compiling for pre-Win2k */ |
| 119 | 119 | ||
| 120 | /* Dynamic linking to SetLayeredWindowAttribute (only since 2000). */ | 120 | /* Dynamic linking to SetLayeredWindowAttribute (only since 2000). */ |
| 121 | BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD); | 121 | static BOOL (WINAPI *pfnSetLayeredWindowAttributes) (HWND, COLORREF, BYTE, DWORD); |
| 122 | 122 | ||
| 123 | /* PlgBlt is available since Windows 2000. */ | 123 | /* PlgBlt is available since Windows 2000. */ |
| 124 | BOOL (WINAPI *pfnPlgBlt) (HDC, const POINT *, HDC, int, int, int, int, HBITMAP, int, int); | 124 | static BOOL (WINAPI *pfnPlgBlt) (HDC, const POINT *, HDC, int, int, int, int, HBITMAP, int, int); |
| 125 | 125 | ||
| 126 | /* Define required types and constants on systems with older headers | 126 | /* Define required types and constants on systems with older headers |
| 127 | lest they be absent. */ | 127 | lest they be absent. */ |
| @@ -159,8 +159,8 @@ typedef struct _TOUCHINPUT | |||
| 159 | typedef BOOL (WINAPI * CloseTouchInputHandle_proc) (HANDLE); | 159 | typedef BOOL (WINAPI * CloseTouchInputHandle_proc) (HANDLE); |
| 160 | typedef BOOL (WINAPI * GetTouchInputInfo_proc) (HANDLE, UINT, PTOUCHINPUT, int); | 160 | typedef BOOL (WINAPI * GetTouchInputInfo_proc) (HANDLE, UINT, PTOUCHINPUT, int); |
| 161 | 161 | ||
| 162 | CloseTouchInputHandle_proc pfnCloseTouchInputHandle; | 162 | static CloseTouchInputHandle_proc pfnCloseTouchInputHandle; |
| 163 | GetTouchInputInfo_proc pfnGetTouchInputInfo; | 163 | static GetTouchInputInfo_proc pfnGetTouchInputInfo; |
| 164 | 164 | ||
| 165 | #ifndef LWA_ALPHA | 165 | #ifndef LWA_ALPHA |
| 166 | #define LWA_ALPHA 0x02 | 166 | #define LWA_ALPHA 0x02 |
| @@ -193,14 +193,14 @@ HANDLE hWindowsThread = NULL; | |||
| 193 | DWORD dwMainThreadId = 0; | 193 | DWORD dwMainThreadId = 0; |
| 194 | HANDLE hMainThread = NULL; | 194 | HANDLE hMainThread = NULL; |
| 195 | 195 | ||
| 196 | int vertical_scroll_bar_min_handle; | 196 | static int vertical_scroll_bar_min_handle; |
| 197 | int horizontal_scroll_bar_min_handle; | 197 | static int horizontal_scroll_bar_min_handle; |
| 198 | int vertical_scroll_bar_top_border; | 198 | static int vertical_scroll_bar_top_border; |
| 199 | int vertical_scroll_bar_bottom_border; | 199 | static int vertical_scroll_bar_bottom_border; |
| 200 | int horizontal_scroll_bar_left_border; | 200 | static int horizontal_scroll_bar_left_border; |
| 201 | int horizontal_scroll_bar_right_border; | 201 | static int horizontal_scroll_bar_right_border; |
| 202 | 202 | ||
| 203 | int last_scroll_bar_drag_pos; | 203 | static int last_scroll_bar_drag_pos; |
| 204 | 204 | ||
| 205 | /* Keyboard code page - may be changed by language-change events. */ | 205 | /* Keyboard code page - may be changed by language-change events. */ |
| 206 | int w32_keyboard_codepage; | 206 | int w32_keyboard_codepage; |
diff --git a/src/w32term.h b/src/w32term.h index 2483ca9036c..12adc72f01c 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -271,6 +271,7 @@ extern const char *w32_get_string_resource (void *v_rdb, | |||
| 271 | const char *class); | 271 | const char *class); |
| 272 | 272 | ||
| 273 | /* w32fns.c */ | 273 | /* w32fns.c */ |
| 274 | extern frame_parm_handler w32_frame_parm_handlers[]; | ||
| 274 | extern void w32_default_font_parameter (struct frame* f, Lisp_Object parms); | 275 | extern void w32_default_font_parameter (struct frame* f, Lisp_Object parms); |
| 275 | extern Lisp_Object w32_process_dnd_data (int format, void *pDataObj); | 276 | extern Lisp_Object w32_process_dnd_data (int format, void *pDataObj); |
| 276 | 277 | ||
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index b412be6f2e1..485c612d182 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c | |||
| @@ -44,6 +44,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 44 | #include "pdumper.h" | 44 | #include "pdumper.h" |
| 45 | #include "w32common.h" | 45 | #include "w32common.h" |
| 46 | 46 | ||
| 47 | extern int uniscribe_available; | ||
| 47 | int uniscribe_available = 0; | 48 | int uniscribe_available = 0; |
| 48 | 49 | ||
| 49 | /* EnumFontFamiliesEx callback. */ | 50 | /* EnumFontFamiliesEx callback. */ |
| @@ -53,6 +54,7 @@ static int CALLBACK ALIGN_STACK add_opentype_font_name_to_list (ENUMLOGFONTEX *, | |||
| 53 | #ifdef HAVE_HARFBUZZ | 54 | #ifdef HAVE_HARFBUZZ |
| 54 | 55 | ||
| 55 | struct font_driver harfbuzz_font_driver; | 56 | struct font_driver harfbuzz_font_driver; |
| 57 | extern int harfbuzz_available; | ||
| 56 | int harfbuzz_available = 0; | 58 | int harfbuzz_available = 0; |
| 57 | 59 | ||
| 58 | /* Typedefs for HarfBuzz functions which we call through function | 60 | /* Typedefs for HarfBuzz functions which we call through function |
| @@ -811,9 +813,9 @@ typedef HRESULT (WINAPI *ScriptGetFontLanguageTags_Proc) | |||
| 811 | typedef HRESULT (WINAPI *ScriptGetFontFeatureTags_Proc) | 813 | typedef HRESULT (WINAPI *ScriptGetFontFeatureTags_Proc) |
| 812 | (HDC, SCRIPT_CACHE *, SCRIPT_ANALYSIS *, OPENTYPE_TAG, OPENTYPE_TAG, int, OPENTYPE_TAG *, int *); | 814 | (HDC, SCRIPT_CACHE *, SCRIPT_ANALYSIS *, OPENTYPE_TAG, OPENTYPE_TAG, int, OPENTYPE_TAG *, int *); |
| 813 | 815 | ||
| 814 | ScriptGetFontScriptTags_Proc script_get_font_scripts_fn; | 816 | static ScriptGetFontScriptTags_Proc script_get_font_scripts_fn; |
| 815 | ScriptGetFontLanguageTags_Proc script_get_font_languages_fn; | 817 | static ScriptGetFontLanguageTags_Proc script_get_font_languages_fn; |
| 816 | ScriptGetFontFeatureTags_Proc script_get_font_features_fn; | 818 | static ScriptGetFontFeatureTags_Proc script_get_font_features_fn; |
| 817 | 819 | ||
| 818 | static bool uniscribe_new_apis; | 820 | static bool uniscribe_new_apis; |
| 819 | 821 | ||
diff --git a/src/w32xfns.c b/src/w32xfns.c index 09ca77ae01f..db4e9fb6249 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c | |||
| @@ -50,7 +50,8 @@ CRITICAL_SECTION critsect; | |||
| 50 | extern HANDLE keyboard_handle; | 50 | extern HANDLE keyboard_handle; |
| 51 | #endif /* WINDOWSNT */ | 51 | #endif /* WINDOWSNT */ |
| 52 | 52 | ||
| 53 | HANDLE input_available = NULL; | 53 | static HANDLE input_available = NULL; |
| 54 | extern HANDLE interrupt_handle; | ||
| 54 | HANDLE interrupt_handle = NULL; | 55 | HANDLE interrupt_handle = NULL; |
| 55 | 56 | ||
| 56 | void | 57 | void |
| @@ -265,9 +266,9 @@ typedef struct int_msg | |||
| 265 | struct int_msg *lpNext; | 266 | struct int_msg *lpNext; |
| 266 | } int_msg; | 267 | } int_msg; |
| 267 | 268 | ||
| 268 | int_msg *lpHead = NULL; | 269 | static int_msg *lpHead = NULL; |
| 269 | int_msg *lpTail = NULL; | 270 | static int_msg *lpTail = NULL; |
| 270 | int nQueue = 0; | 271 | static int nQueue = 0; |
| 271 | 272 | ||
| 272 | BOOL | 273 | BOOL |
| 273 | get_next_msg (W32Msg * lpmsg, BOOL bWait) | 274 | get_next_msg (W32Msg * lpmsg, BOOL bWait) |