void *addr = (void *) funcptr;
/* Step 1: Find the handle of the module where ADDR lives. */
- if (os_subtype == OS_9X
+ if (os_subtype == OS_SUBTYPE_9X
/* Windows NT family version before XP (v5.1). */
|| ((w32_major_version + (w32_minor_version > 0)) < 6))
{
/* volume_info is set indirectly by map_w32_filename. */
oldname_dev = volume_info.serialnum;
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
{
char * o;
char * p;
HANDLE
maybe_load_unicows_dll (void)
{
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
{
HANDLE ret = LoadLibrary ("Unicows.dll");
if (ret)
extern int w32_build_number;
enum {
- OS_9X = 1,
- OS_NT
+ OS_SUBTYPE_9X = 1,
+ OS_SUBTYPE_NT
};
extern int os_subtype;
ceol_initialized = FALSE;
}
- if (os_subtype == OS_NT)
+ if (os_subtype == OS_SUBTYPE_NT)
w32_console_unicode_input = 1;
else
w32_console_unicode_input = 0;
/* The Unicode version of SHFileOperation is not supported on
Windows 9X. */
- if (w32_unicode_filenames && os_subtype != OS_9X)
+ if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X)
{
SHFILEOPSTRUCTW file_op_w;
/* We need one more element beyond MAX_PATH because this is
/* When "mouse trails" are in effect, moving the mouse cursor
sometimes leaves behind an annoying "ghost" of the pointer.
Avoid that by momentarily switching off mouse trails. */
- if (os_subtype == OS_NT
+ if (os_subtype == OS_SUBTYPE_NT
&& w32_major_version + w32_minor_version >= 6)
ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0);
SetCursorPos (XFIXNUM (x), XFIXNUM (y));
if (!OpenPrinter (pname_buf, &hPrn, NULL))
return Qnil;
/* GetPrinterW is not supported by unicows.dll. */
- if (w32_unicode_filenames && os_subtype != OS_9X)
+ if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X)
GetPrinterW (hPrn, 2, NULL, 0, &dwNeeded);
else
GetPrinterA (hPrn, 2, NULL, 0, &dwNeeded);
return Qnil;
}
/* Call GetPrinter again with big enough memory block. */
- if (w32_unicode_filenames && os_subtype != OS_9X)
+ if (w32_unicode_filenames && os_subtype != OS_SUBTYPE_9X)
{
/* Allocate memory for the PRINTER_INFO_2 struct. */
ppi2w = xmalloc (dwNeeded);
w32_minor_version = version.info.minor;
if (version.info.platform & 0x8000)
- os_subtype = OS_9X;
+ os_subtype = OS_SUBTYPE_9X;
else
- os_subtype = OS_NT;
+ os_subtype = OS_SUBTYPE_NT;
/* Cache page size, allocation unit, processor type, etc. */
GetSystemInfo (&sysinfo_cache);
GetVersionEx (&osinfo_cache);
w32_build_number = osinfo_cache.dwBuildNumber;
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
w32_build_number &= 0xffff;
w32_num_mouse_buttons = GetSystemMetrics (SM_CMOUSEBUTTONS);
/* On NT, call ToUnicode instead and then convert to the current
console input codepage. */
- if (os_subtype == OS_NT)
+ if (os_subtype == OS_SUBTYPE_NT)
{
WCHAR buf[128];
w32_multibyte_code_page = _getmbcp ();
#endif
- if (os_subtype == OS_NT)
+ if (os_subtype == OS_SUBTYPE_NT)
w32_unicode_gui = 1;
else
w32_unicode_gui = 0;
}
#endif
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
{
the_malloc_fn = malloc_after_dump_9x;
the_realloc_fn = realloc_after_dump_9x;
}
heap = s_pfn_Rtl_Create_Heap (0, data_region_base, 0, 0, NULL, ¶ms);
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
{
fprintf (stderr, "Cannot dump Emacs on Windows 9X; exiting.\n");
exit (-1);
CHECK_LIST (filter);
/* The underlying features are available only since XP. */
- if (os_subtype == OS_9X
+ if (os_subtype == OS_SUBTYPE_9X
|| (w32_major_version == 5 && w32_minor_version < 1))
{
errno = ENOSYS;
need to probe for its availability dynamically, and call it
through a pointer. */
s_pfn_Get_Thread_Times = NULL; /* in case dumped Emacs comes with a value */
- if (os_subtype != OS_9X)
+ if (os_subtype != OS_SUBTYPE_9X)
s_pfn_Get_Thread_Times = (GetThreadTimes_Proc)
get_proc_addr (GetModuleHandle ("kernel32.dll"), "GetThreadTimes");
GetClassName (hwnd, window_class, sizeof (window_class));
if (strcmp (window_class,
- (os_subtype == OS_9X)
+ (os_subtype == OS_SUBTYPE_9X)
? "tty"
: "ConsoleWindowClass") == 0)
{
if (NILP (Vw32_start_process_share_console) && cp && cp->hwnd)
{
#if 1
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
{
/*
Another possibility is to try terminating the VDM out-right by
if (!g_b_init_compare_string_w)
{
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
{
pCompareStringW = (CompareStringW_Proc)
get_proc_addr (LoadLibrary ("Unicows.dll"),
QANSICP = coding_from_cp (ANSICP);
QOEMCP = coding_from_cp (OEMCP);
- if (os_subtype == OS_NT)
+ if (os_subtype == OS_SUBTYPE_NT)
Vselection_coding_system = Qutf_16le_dos;
else if (inhibit_window_system)
Vselection_coding_system = QOEMCP;
/* HALFTONE produces better results, especially when
scaling to a larger size, but Windows 9X doesn't
support HALFTONE. */
- if (os_subtype == OS_NT
+ if (os_subtype == OS_SUBTYPE_NT
&& (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0)
SetBrushOrgEx (s->hdc, 0, 0, NULL);
StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height,
{
int pmode = 0;
/* Windows 9X doesn't support HALFTONE. */
- if (os_subtype == OS_NT
+ if (os_subtype == OS_SUBTYPE_NT
&& (pmode = SetStretchBltMode (s->hdc, HALFTONE)) != 0)
SetBrushOrgEx (s->hdc, 0, 0, NULL);
StretchBlt (s->hdc, x, y, s->slice.width, s->slice.height,
/* When "mouse trails" are in effect, moving the mouse cursor
sometimes leaves behind an annoying "ghost" of the pointer.
Avoid that by momentarily switching off mouse trails. */
- if (os_subtype == OS_NT
+ if (os_subtype == OS_SUBTYPE_NT
&& w32_major_version + w32_minor_version >= 6)
ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0);
SetCursorPos (pt.x, pt.y);
This variable is set to non-nil by default when Emacs runs on Windows
systems of the NT family, including W2K, XP, Vista, Windows 7 and
Windows 8. It is set to nil on Windows 9X. */);
- if (os_subtype == OS_9X)
+ if (os_subtype == OS_SUBTYPE_9X)
w32_unicode_filenames = 0;
else
w32_unicode_filenames = 1;
extern void setup_w32_kbdhook (void);
extern void remove_w32_kbdhook (void);
extern int check_w32_winkey_state (int);
-#define w32_kbdhook_active (os_subtype != OS_9X)
+#define w32_kbdhook_active (os_subtype != OS_SUBTYPE_9X)
#else
#define w32_kbdhook_active 0
#endif