annotate src/syswindows.h @ 518:e6e7cbdea419

[xemacs-hg @ 2001-05-08 05:23:51 by martinb] s/bsd386.h: Use NOT_C_CODE instead of emacs to protect Makefiles
author martinb
date Tue, 08 May 2001 05:23:54 +0000
parents abe6d1db359e
children 0493e9f3c27f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1 /* Copyright (C) 2000 Free Software Foundation, Inc.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
2 Copyright (C) 2000 Ben Wing.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
3
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
4 This file is part of XEmacs.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
5
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
9 later version.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
10
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
14 for more details.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
15
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
20
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
22
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
23 /* Authorship:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
25 Created May 2000 by Andy Piper.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
26 Windows-Mule stuff added by Ben Wing.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
27 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
28
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
29 #ifndef INCLUDED_syswindows_h_
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
30 #define INCLUDED_syswindows_h_
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
31
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
32 /* Note that there are currently FOUR different general
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
33 Windows-related include files in src!
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
34
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
35 Uses are approximately:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
36
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
37 syswindows.h: Mostly a wrapper around <windows.h>, including missing
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
38 defines as necessary. Also includes stuff needed on both Cygwin and
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
39 native Windows, regardless of window system chosen.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
40
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
41 console-msw.h: Used on both Cygwin and native Windows, but only when
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
42 native window system (as opposed to X) chosen.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
43
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
44 nt.h: [will be renamed to win32.h] Used only on native Windows, and
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
45 regardless of window system chosen -- but used on both purely native
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
46 Windows (s/windowsnt.h) and MinGW (s/mingw32.h).
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
47
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
48 ntheap.h: Used only on native Windows and only when standard dumping
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
49 mechanism (unexnt.c) used.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
50
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
51 All of the last three files include the first.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
52 */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
53
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
54 #ifndef WIN32_LEAN_AND_MEAN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
55 #define WIN32_LEAN_AND_MEAN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
56 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
57
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
58 #include <windows.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
59
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
60 #if (defined (CYGWIN) || defined(MINGW)) && \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
61 CYGWIN_VERSION_DLL_MAJOR < 21
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
62 extern BOOL WINAPI DdeFreeStringHandle(DWORD,HSZ);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
63 extern BOOL WINAPI PlaySound(LPCSTR,HMODULE,DWORD);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
64 #define stricmp strcasecmp
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
65 #define FONTENUMPROC FONTENUMEXPROC
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
66 #define ntmTm ntmentm
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
67 #elif defined (WIN32_LEAN_AND_MEAN)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
68 #ifdef HAVE_X_WINDOWS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
69 /* Christ almighty. The problems you get when combining two large code bases,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
70 neither with any respect for namespace purity. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
71 #undef Status
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
72 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
73 #include <winspool.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
74 #ifdef HAVE_X_WINDOWS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
75 #define Status int
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
76 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
77 #include <mmsystem.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
78 #include <shellapi.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
79 #include <ddeml.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
80 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
81
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
82 /* mmsystem.h defines. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
83 #ifndef SND_ASYNC
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
84 #define SND_ASYNC 1
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
85 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
86 #ifndef SND_NODEFAULT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
87 #define SND_NODEFAULT 2
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
88 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
89 #ifndef SND_MEMORY
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
90 #define SND_MEMORY 4
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
91 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
92 #ifndef SND_FILENAME
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
93 #define SND_FILENAME 0x2000L
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
94 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
95
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
96 /* winspool.h defines. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
97 #ifndef PHYSICALWIDTH
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
98 #define PHYSICALWIDTH 110
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
99 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
100 #ifndef PHYSICALHEIGHT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
101 #define PHYSICALHEIGHT 111
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
102 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
103 #ifndef PHYSICALOFFSETX
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
104 #define PHYSICALOFFSETX 112
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
105 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
106 #ifndef PHYSICALOFFSETY
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
107 #define PHYSICALOFFSETY 113
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
108 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
109
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
110 /* windows.h defines. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
111 #if defined (CYGWIN) && (CYGWIN_VERSION_DLL_MAJOR < 20)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
112 typedef NMHDR *LPNMHDR;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
113 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
114
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
115 #ifndef SPI_GETWHEELSCROLLLINES
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
116 #define SPI_GETWHEELSCROLLLINES 104
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
117 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
118 #ifndef WHEEL_PAGESCROLL
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
119 #define WHEEL_PAGESCROLL (UINT_MAX)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
120 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
121 #ifndef WHEEL_DELTA
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
122 #define WHEEL_DELTA 120
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
123 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
124 #ifndef WM_MOUSEWHEEL
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
125 #define WM_MOUSEWHEEL 0x20A
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
126 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
127 #ifndef VK_APPS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
128 #define VK_APPS 0x5D
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
129 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
130 #ifndef SIF_TRACKPOS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
131 #define SIF_TRACKPOS 0x0010
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
132 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
133 #ifndef FW_BLACK
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
134 #define FW_BLACK FW_HEAVY
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
135 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
136 #ifndef FW_ULTRABOLD
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
137 #define FW_ULTRABOLD FW_EXTRABOLD
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
138 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
139 #ifndef FW_DEMIBOLD
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
140 #define FW_DEMIBOLD FW_SEMIBOLD
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
141 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
142 #ifndef FW_ULTRALIGHT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
143 #define FW_ULTRALIGHT FW_EXTRALIGHT
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
144 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
145 #ifndef APPCMD_FILTERINITS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
146 #define APPCMD_FILTERINITS 0x20L
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
147 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
148 #ifndef CBF_FAIL_SELFCONNECTIONS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
149 #define CBF_FAIL_SELFCONNECTIONS 0x1000
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
150 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
151 #ifndef CBF_SKIP_ALLNOTIFICATIONS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
152 #define CBF_SKIP_ALLNOTIFICATIONS 0x3C0000
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
153 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
154 #ifndef CBF_FAIL_ADVISES
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
155 #define CBF_FAIL_ADVISES 0x4000
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
156 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
157 #ifndef CBF_FAIL_POKES
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
158 #define CBF_FAIL_POKES 0x10000
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
159 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
160 #ifndef CBF_FAIL_REQUESTS
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
161 #define CBF_FAIL_REQUESTS 0x20000
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
162 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
163 #ifndef SZDDESYS_TOPIC
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
164 #define SZDDESYS_TOPIC "System"
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
165 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
166 #ifndef JOHAB_CHARSET
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
167 #define JOHAB_CHARSET 130
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
168 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
169 #ifndef MAC_CHARSET
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
170 #define MAC_CHARSET 77
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
171 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
172
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
173 /***************************************************************/
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
174
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
175 /* Definitions for Mule under MS Windows */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
176
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
177 #include <wchar.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
178
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
179 #ifdef CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
180
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
181 /* All but wcscmp and wcslen left out of Cygwin headers -- but present
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
182 in /usr/include/mingw32/string.h! */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
183 wchar_t* wcscat (wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
184 wchar_t* wcschr (const wchar_t*, wchar_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
185 int wcscoll (const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
186 wchar_t* wcscpy (wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
187 size_t wcscspn (const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
188 /* Note: No wcserror in CRTDLL. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
189 wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
190 int wcsncmp(const wchar_t*, const wchar_t*, size_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
191 wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
192 wchar_t* wcspbrk(const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
193 wchar_t* wcsrchr(const wchar_t*, wchar_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
194 size_t wcsspn(const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
195 wchar_t* wcsstr(const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
196 wchar_t* wcstok(wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
197 size_t wcsxfrm(wchar_t*, const wchar_t*, size_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
198
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
199 #endif /* CYGWIN */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
200
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
201 // extern int mswindows_windows9x_p;
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
202 /* #define XEUNICODE_P (!mswindows_windows9x_p) */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
203 #define XEUNICODE_P 0
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
204
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
205 #define XETCHAR_SIZE (XEUNICODE_P ? sizeof (WCHAR) : sizeof (CHAR))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
206 #define MAX_XETCHAR_SIZE sizeof (WCHAR)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
207 #define XETEXT1(arg) (XEUNICODE_P ? ((char *) (L##arg)) : (arg))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
208 /* We need to do this indirection in case ARG is also a manifest constant.
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
209 I don't really understand why. --ben */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
210 #define XETEXT(arg) XETEXT1(arg)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
211 #define XECOPY_TCHAR(ptr, ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
212 (XEUNICODE_P ? (* (LPWSTR) (ptr) = L##ch) : (* (LPSTR) (ptr) = (ch)))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
213 #define xetcslen(arg) (XEUNICODE_P ? wcslen ((wchar_t *) arg) : strlen (arg))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
214 #define xetcscmp(s1, s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
215 (XEUNICODE_P ? wcscmp ((wchar_t *) s1, (wchar_t *) s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
216 : strcmp (s1, s2))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
217 #define xetcscpy(s1, s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
218 (XEUNICODE_P ? (char *) wcscpy ((wchar_t *) s1, (wchar_t *) s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
219 : strcpy (s1, s2))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
220 #define xetcschr(s, ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
221 (XEUNICODE_P ? (char *) wcschr ((wchar_t *) s, (WCHAR) ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
222 : strchr (s, ch))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
223 #define xetcsrchr(s, ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
224 (XEUNICODE_P ? (char *) wcsrchr ((wchar_t *) s, (WCHAR) ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
225 : strrchr (s, ch))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
226
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
227
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
228 #define LOCAL_FILE_FORMAT_TO_TSTR(path, out) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
229 do { \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
230 Bufbyte *lttff; \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
231 \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
232 LOCAL_TO_WIN32_FILE_FORMAT (path, lttff); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
233 C_STRING_TO_EXTERNAL (lttff, out, Qmswindows_tstr); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
234 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
235
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
236 Lisp_Object tstr_to_local_file_format (Extbyte *pathout);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
237
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
238 #ifdef CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
239 #define LOCAL_TO_WIN32_FILE_FORMAT(path, pathout) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
240 do { \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
241 Lisp_Object ltwff1 = (path); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
242 int ltwff2 = \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
243 cygwin_posix_to_win32_path_list_buf_size (XSTRING_DATA (ltwff1)); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
244 pathout = (Bufbyte *) alloca (ltwff2); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
245 cygwin_posix_to_win32_path_list (XSTRING_DATA (ltwff1), pathout); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
246 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
247 #else
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
248 #define LOCAL_TO_WIN32_FILE_FORMAT(path, pathout) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
249 do { \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
250 (pathout) = XSTRING_DATA (path); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
251 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
252 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
253
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
254 #ifdef CYGWIN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
255 #define WIN32_TO_LOCAL_FILE_FORMAT(path, pathout) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
256 do { \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
257 Bufbyte *wtlff1 = (path); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
258 int wtlff2 = \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
259 cygwin_win32_to_posix_path_list_buf_size (wtlff1); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
260 Bufbyte *wtlff3 = (Bufbyte *) alloca (wtlff2); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
261 cygwin_win32_to_posix_path_list (wtlff1, wtlff3); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
262 (pathout) = build_string (wtlff3); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
263 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
264 #else
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
265 #define WIN32_TO_LOCAL_FILE_FORMAT(path, pathout) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
266 do { \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
267 (pathout) = build_string (path); \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
268 } while (0)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
269 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
270
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
271 extern BOOL (WINAPI *xSwitchToThread) (VOID);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
272
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
273 extern HKL (WINAPI *xGetKeyboardLayout) (DWORD);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
274 extern BOOL (WINAPI *xSetMenuDefaultItem) (HMENU, UINT, UINT);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
275 extern BOOL (WINAPI *xInsertMenuItemA) (HMENU, UINT, BOOL, LPCMENUITEMINFOA);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
276 extern BOOL (WINAPI *xInsertMenuItemW) (HMENU, UINT, BOOL, LPCMENUITEMINFOW);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
277 extern HANDLE (WINAPI *xLoadImageA) (HINSTANCE, LPCSTR, UINT, int, int, UINT);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
278 extern HANDLE (WINAPI *xLoadImageW) (HINSTANCE, LPCWSTR, UINT, int, int, UINT);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
279 extern ATOM (WINAPI *xRegisterClassExA) (CONST WNDCLASSEXA *);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
280 extern ATOM (WINAPI *xRegisterClassExW) (CONST WNDCLASSEXW *);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
281
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
282 extern int (WINAPI *xEnumFontFamiliesExA) (HDC, LPLOGFONTA, FONTENUMPROCA,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
283 LPARAM, DWORD);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
284 extern int (WINAPI *xEnumFontFamiliesExW) (HDC, LPLOGFONTW, FONTENUMPROCW,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
285 LPARAM, DWORD);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
286
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
287 extern DWORD (WINAPI *xSHGetFileInfoA) (LPCSTR, DWORD, SHFILEINFOA FAR *, UINT,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
288 UINT);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
289 extern DWORD (WINAPI *xSHGetFileInfoW) (LPCWSTR, DWORD, SHFILEINFOW FAR *,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
290 UINT, UINT);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
291
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
292 #endif /* INCLUDED_syswindows_h_ */