#include "w32term.h"
#include "frame.h"
#include "window.h"
-#include "character.h"
#include "buffer.h"
-#include "intervals.h"
-#include "dispextern.h"
#include "keyboard.h"
#include "blockinput.h"
-#include "epaths.h"
-#include "charset.h"
#include "coding.h"
-#include "ccl.h"
-#include "fontset.h"
-#include "systime.h"
-#include "termhooks.h"
#include "w32common.h"
#ifdef WINDOWSNT
-#include "w32heap.h"
#include <mbstring.h>
#endif /* WINDOWSNT */
#include "w32.h"
#endif
-#include "bitmaps/gray.xbm"
-
#include <commctrl.h>
#include <commdlg.h>
#include <shellapi.h>
#include <imm.h>
#include <windowsx.h>
-#include "font.h"
-#include "w32font.h"
-
#ifndef FOF_NO_CONNECTED_ELEMENTS
#define FOF_NO_CONNECTED_ELEMENTS 0x2000
#endif
tem = XCAR (elt);
- if (lstrcmpi (SDATA (tem), colorname) == 0)
+ if (lstrcmpi (SSDATA (tem), colorname) == 0)
{
ret = Fcdr (elt);
break;
strcpy (full_name_buffer, SYSTEM_COLOR_PREFIX);
while (RegEnumValueA (colors_key, index, name_buffer, &name_size,
- NULL, NULL, color_buffer, &color_size)
+ NULL, NULL, (LPBYTE)color_buffer, &color_size)
== ERROR_SUCCESS)
{
int r, g, b;
CHECK_STRING (arg);
- if (strcmp (SDATA (arg), "black") == 0)
+ if (strcmp (SSDATA (arg), "black") == 0)
return BLACK_PIX_DEFAULT (f);
- else if (strcmp (SDATA (arg), "white") == 0)
+ else if (strcmp (SSDATA (arg), "white") == 0)
return WHITE_PIX_DEFAULT (f);
if ((FRAME_DISPLAY_INFO (f)->n_planes * FRAME_DISPLAY_INFO (f)->n_cbits) == 1)
/* w32_defined_color is responsible for coping with failures
by looking for a near-miss. */
- if (w32_defined_color (f, SDATA (arg), &cdef, true))
+ if (w32_defined_color (f, SSDATA (arg), &cdef, true))
return cdef.pixel;
/* defined_color failed; return an ultimate default. */
/* Check for no change needed in this very common case
before we do any consing. */
if (!strcmp (FRAME_DISPLAY_INFO (f)->w32_id_name,
- SDATA (f->name)))
+ SSDATA (f->name)))
return;
name = build_string (FRAME_DISPLAY_INFO (f)->w32_id_name);
}
#ifdef DBG_WM_CHARS
# define FPRINTF_WM_CHARS(ARG) fprintf ARG
#else
-# define FPRINTF_WM_CHARS(ARG) 0
+# define FPRINTF_WM_CHARS(ARG) (void)0
#endif
/* This is a heuristic only. This is supposed to track the state of the
&& console_modifiers & (RIGHT_CTRL_PRESSED | LEFT_CTRL_PRESSED))
{
type_CtrlAlt = "bB"; /* generic bindable Ctrl-Alt- modifiers */
- if (console_modifiers & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED)
+ if ((console_modifiers & (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
== (LEFT_CTRL_PRESSED | RIGHT_CTRL_PRESSED))
/* double-Ctrl:
e.g. AltGr-rCtrl on some layouts (in this order!) */
type_CtrlAlt = "dD";
- else if (console_modifiers
- & (LEFT_CTRL_PRESSED | LEFT_ALT_PRESSED)
+ else if ((console_modifiers
+ & (LEFT_CTRL_PRESSED | LEFT_ALT_PRESSED))
== (LEFT_CTRL_PRESSED | LEFT_ALT_PRESSED))
type_CtrlAlt = "lL"; /* Ctrl-Alt- modifiers on the left */
else if (!NILP (Vw32_recognize_altgr)
- && (console_modifiers
- & (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED))
+ && ((console_modifiers
+ & (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED)))
== (RIGHT_ALT_PRESSED | LEFT_CTRL_PRESSED))
type_CtrlAlt = "gG"; /* modifiers as in AltGr */
}
else if (wmsg.dwModifiers & (alt_modifier | meta_modifier)
- || (console_modifiers
- & (LEFT_WIN_PRESSED | RIGHT_WIN_PRESSED
- | APPS_PRESSED | SCROLLLOCK_ON)))
+ || ((console_modifiers
+ & (LEFT_WIN_PRESSED | RIGHT_WIN_PRESSED
+ | APPS_PRESSED | SCROLLLOCK_ON))))
{
/* Pure Alt (or combination of Alt, Win, APPS, scrolllock. */
type_CtrlAlt = "aA";
unwind_create_frame (frame);
}
-static void
-unwind_create_frame_1 (Lisp_Object val)
-{
- inhibit_lisp_code = val;
-}
-
static void
x_default_font_parameter (struct frame *f, Lisp_Object parms)
{
CHECK_STRING (color);
- if (w32_defined_color (f, SDATA (color), &foo, false))
+ if (w32_defined_color (f, SSDATA (color), &foo, false))
return Qt;
else
return Qnil;
CHECK_STRING (color);
- if (w32_defined_color (f, SDATA (color), &foo, false))
+ if (w32_defined_color (f, SSDATA (color), &foo, false))
return list3i ((GetRValue (foo.pixel) << 8) | GetRValue (foo.pixel),
(GetGValue (foo.pixel) << 8) | GetGValue (foo.pixel),
(GetBValue (foo.pixel) << 8) | GetBValue (foo.pixel));
validate_x_resource_name ();
- dpyinfo = w32_term_init (name, (unsigned char *)0,
- SSDATA (Vx_resource_name));
+ dpyinfo = w32_term_init (name, NULL, SSDATA (Vx_resource_name));
if (dpyinfo == 0)
error ("Cannot connect to server %s", SDATA (name));
(In the Nextstep version, the last two arguments are currently ignored.) */)
(Lisp_Object display, Lisp_Object xrm_string, Lisp_Object must_succeed)
{
- unsigned char *xrm_option;
+ char *xrm_option;
struct w32_display_info *dpyinfo;
CHECK_STRING (display);
add_system_logical_colors_to_map (&Vw32_color_map);
if (! NILP (xrm_string))
- xrm_option = SDATA (xrm_string);
+ xrm_option = SSDATA (xrm_string);
else
- xrm_option = (unsigned char *) 0;
+ xrm_option = NULL;
/* Use this general default value to start with. */
/* First remove .exe suffix from invocation-name - it looks ugly. */
/* This is what opens the connection and sets x_current_display.
This also initializes many symbols, such as those used for input. */
- dpyinfo = w32_term_init (display, xrm_option,
- SSDATA (Vx_resource_name));
+ dpyinfo = w32_term_init (display, xrm_option, SSDATA (Vx_resource_name));
if (dpyinfo == 0)
{
struct frame *f;
Lisp_Object frame;
Lisp_Object name;
- long window_prompting = 0;
int width, height;
ptrdiff_t count = SPECPDL_INDEX ();
struct kboard *kb;
f->output_data.w32->dwStyle = WS_BORDER | WS_POPUP | WS_DISABLED;
f->output_data.w32->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
- window_prompting = x_figure_window_size (f, parms, true, &x_width, &x_height);
+ x_figure_window_size (f, parms, true, &x_width, &x_height);
/* No fringes on tip frame. */
f->fringe_cols = 0;
/* We modify these in-place, so make copies for safety. */
dir = Fcopy_sequence (dir);
- unixtodos_filename (SDATA (dir));
+ unixtodos_filename (SSDATA (dir));
filename = Fcopy_sequence (filename);
- unixtodos_filename (SDATA (filename));
+ unixtodos_filename (SSDATA (filename));
if (SBYTES (filename) >= MAX_UTF8_PATH)
report_file_error ("filename too long", default_filename);
if (w32_unicode_filenames)
encoded_file = ENCODE_FILE (filename);
- path = map_w32_filename (SDATA (encoded_file), NULL);
+ path = map_w32_filename (SSDATA (encoded_file), NULL);
/* The Unicode version of SHFileOperation is not supported on
Windows 9X. */
/* If a file cannot be represented in ANSI codepage, don't
let them inadvertently delete other files because some
characters are interpreted as a wildcards. */
- if (_mbspbrk (tmp_path_a, "?*"))
+ if (_mbspbrk ((unsigned char *)tmp_path_a,
+ (const unsigned char *)"?*"))
result = ERROR_FILE_NOT_FOUND;
else
{
c = Fcar (c);
if (!SYMBOLP (c))
emacs_abort ();
- vk_code = lookup_vk_code (SDATA (SYMBOL_NAME (c)));
+ vk_code = lookup_vk_code (SSDATA (SYMBOL_NAME (c)));
}
else if (INTEGERP (c))
{
char rootname[MAX_UTF8_PATH];
wchar_t rootname_w[MAX_PATH];
char rootname_a[MAX_PATH];
- char *name = SDATA (encoded);
+ char *name = SSDATA (encoded);
BOOL result;
/* find the root name of the volume if given */
event->uChar.UnicodeChar = buf[isdead - 1];
isdead = WideCharToMultiByte (cpId, 0, buf, isdead,
- ansi_code, 4, NULL, NULL);
+ (LPSTR)ansi_code, 4, NULL, NULL);
}
else
isdead = 0;