extern void _DebPrint (const char *fmt, ...);
# define DebPrint(stuff) _DebPrint stuff
# else
-# define DebPrint(stuff)
+/* Avoid compiler warnings about empty body of 'if' statement. */
+# define DebPrint(stuff) do {} while (false)
# endif
#endif
#define PIX_MASK_DRAW 1
#define x_defined_color w32_defined_color
+#if 0 /* unused */
#define DefaultDepthOfScreen(screen) (one_w32_display_info.n_cbits)
+#endif
#endif /* HAVE_NTGUI */
#endif /* HAVE_X_WINDOWS */
#ifdef HAVE_NTGUI
+ Lisp_Object frame UNINIT; /* The value is not used. */
Pixmap bitmap;
bitmap = CreateBitmap (width, height,
FRAME_DISPLAY_INFO (XFRAME (frame))->n_planes,
{
#ifdef HAVE_NTGUI
return -1; /* W32_TODO : bitmap support */
-#endif /* HAVE_NTGUI */
-
+#else
Display_Info *dpyinfo = FRAME_DISPLAY_INFO (f);
+#endif
#ifdef HAVE_NS
ptrdiff_t id;
STR's value is not necessarily copied. The resulting Lisp string
should not be modified or made visible to user code. */
+/* Avoid initializing NAME to prevent "jump-misses-init" compiler
+ warnings. */
#define AUTO_STRING_WITH_LEN(name, str, len) \
- Lisp_Object name = \
+ Lisp_Object name; name = \
(USE_STACK_STRING \
? (make_lisp_ptr \
((&(union Aligned_String) \
#endif /* HAVE_WINDOW_SYSTEM */
#ifdef HAVE_NTGUI
-# ifdef NTGUI_UNICODE
-# define unicode_append_menu AppendMenuW
-# else /* !NTGUI_UNICODE */
extern AppendMenuW_Proc unicode_append_menu;
-# endif /* NTGUI_UNICODE */
#endif /* HAVE_NTGUI */
#include "menu.h"
EnumDisplayMonitors_Proc enum_display_monitors_fn = NULL;
GetTitleBarInfo_Proc get_title_bar_info_fn = NULL;
-#ifdef NTGUI_UNICODE
-#define unicode_append_menu AppendMenuW
-#else /* !NTGUI_UNICODE */
extern AppendMenuW_Proc unicode_append_menu;
-#endif /* NTGUI_UNICODE */
/* Flag to selectively ignore WM_IME_CHAR messages. */
static int ignore_ime_char = 0;
}
}
+#ifdef WINDOWSNT
/* Check the current Win key pressed state. */
int
check_w32_winkey_state (int vkey)
}
return 0;
}
+#endif /* WINDOWSNT */
/* Reset the keyboard hook state. Locking the workstation with Win-L
leaves the Win key(s) "down" from the hook's point of view - the
else
return (GetKeyState (vkey) & 0x1);
}
+#ifdef WINDOWSNT
if (w32_kbdhook_active && (vkey == VK_LWIN || vkey == VK_RWIN))
return check_w32_winkey_state (vkey);
+#endif
if (!modifiers_recorded)
return (GetKeyState (vkey) & 0x8000);
/* Create a frame for the tooltip, and record it in the global
variable tip_frame. */
+ struct frame *f; /* The value is unused. */
if (NILP (tip_frame = x_create_tip_frame (FRAME_DISPLAY_INFO (f), parms)))
{
/* Creating the tip frame failed. */
{
/* Filter index: 1: All Files, 2: Directories only */
static const wchar_t filter_w[] = L"All Files (*.*)\0*.*\0Directories\0*|*\0";
+#ifndef NTGUI_UNICODE
static const char filter_a[] = "All Files (*.*)\0*.*\0Directories\0*|*\0";
+#endif
Lisp_Object filename = default_filename;
struct frame *f = SELECTED_FRAME ();
--ret;
buf[ret] = '\0';
if (!ret)
- sprintf (buf, "w32 error %u", error_no);
+ sprintf (buf, "w32 error %d", error_no);
return buf;
}
but not on Windows 7. addr2line doesn't mind a missing
"0x", but will be confused by an extra one. */
if (except_addr)
- sprintf (buf, "\r\nException 0x%lx at this address:\r\n%p\r\n",
- except_code, except_addr);
+ sprintf (buf, "\r\nException 0x%x at this address:\r\n%p\r\n",
+ (unsigned int) except_code, except_addr);
if (stderr_fd >= 0)
{
if (except_addr)
default:
/* Encode numerical value of unknown charset. */
- sprintf (buf, "*-#%u", fncharset);
+ sprintf (buf, "*-#%d", fncharset);
return buf;
}
/* If no match, encode the numeric value. */
if (!best_match)
{
- sprintf (buf, "*-#%u", fncharset);
+ sprintf (buf, "*-#%d", fncharset);
return buf;
}
IN UINT type);
#ifdef NTGUI_UNICODE
-#define get_menu_item_info GetMenuItemInfoA
-#define set_menu_item_info SetMenuItemInfoA
-#define unicode_append_menu AppendMenuW
-#define unicode_message_box MessageBoxW
+GetMenuItemInfoA_Proc get_menu_item_info = GetMenuItemInfoA;
+SetMenuItemInfoA_Proc set_menu_item_info = SetMenuItemInfoA;
+AppendMenuW_Proc unicode_append_menu = AppendMenuW;
+MessageBoxW_Proc unicode_message_box = MessageBoxW;
#else /* !NTGUI_UNICODE */
GetMenuItemInfoA_Proc get_menu_item_info = NULL;
SetMenuItemInfoA_Proc set_menu_item_info = NULL;
{
sprintf ((char *) buf, "%0*X",
glyph->u.glyphless.ch < 0x10000 ? 4 : 6,
- glyph->u.glyphless.ch);
+ (unsigned int) glyph->u.glyphless.ch);
str = buf;
}
y = si.nPos;
bar->dragging = 0;
+ struct frame *f; /* Value is not used. */
FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam;
switch (sb_event)
y = si.nMax - si.nPage;
bar->dragging = 0;
+ struct frame *f; /* Value is not used. */
FRAME_DISPLAY_INFO (f)->last_mouse_scroll_bar_pos = msg->msg.wParam;
switch (sb_event)
#define FRAME_BASELINE_OFFSET(f) ((f)->output_data.w32->baseline_offset)
/* This gives the w32_display_info structure for the display F is on. */
-#define FRAME_DISPLAY_INFO(f) (&one_w32_display_info)
+#define FRAME_DISPLAY_INFO(f) ((void) (f), (&one_w32_display_info))
/* This is the `Display *' which frame F is on. */
#define FRAME_X_DISPLAY(f) (0)