annotate src/syswindows.h @ 5022:cfe36e196dc7

long comment in syswindows.h about build constants -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-09 Ben Wing <ben@xemacs.org> * syswindows.h: Create a long comment about build flags such as WIN32_NATIVE, HAVE_MS_WINDOWS.
author Ben Wing <ben@xemacs.org>
date Tue, 09 Feb 2010 19:07:36 -0600
parents 4cfb6aeb989d
children d2c3bac89ba0 d4f666cda5e6
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.
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
2 Copyright (C) 2000, 2001, 2002, 2004, 2010 Ben Wing.
442
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
5022
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
23 #ifndef INCLUDED_syswindows_h_
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
24 #define INCLUDED_syswindows_h_
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
25
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
26 /* Authorship:
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
27
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
28 Current primary author: Ben Wing <ben@xemacs.org>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
29
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
30 Created May 2000 by Andy Piper.
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
31 Windows-Mule stuff added by Ben Wing, 2000-2001.
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
32 September 2001 Ben Wing reorganized and included nt.h and ntheap.h into
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
33 this file; comments in those files say:
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
34 * Adapted for XEmacs by David Hobley <david@spook-le0.cia.com.au>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
35 * Sync'ed with Emacs 19.34.6 by Marc Paquette <marcpa@cam.org>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
36 (Note: Sync messages from Marc Paquette may indicate
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
37 incomplete synching, so beware.)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
38 (in ntheap.h only) Geoff Voelker (voelker@cs.washington.edu) 7-29-94
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
39
442
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
5022
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
42 /* See win32.c for info about the different Windows files in XEmacs. */
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
43
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
44 /*
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
45 A capsule introduction to Windows-related build flags:
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
46
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
47 See also: (Info-goto-node "(internals)Windows Build Flags")
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
48
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
49 1. Operating-system level:
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
50 --------------------------
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
51
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
52 `CYGWIN' Compiled for Cygwin. Cygwin provides a full Unix-like
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
53 environment under Windows. Applications compiled for Cygwin
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
54 are linked with CYGWIN1.DLL, which provides the POSIX
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
55 emulation.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
56
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
57 Corresponding s/ file: s/cygwin32.h
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
58
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
59 `MINGW' Compiled for MinGW. MinGW is a Unix-like environment under
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
60 Windows that allows for the use of `gcc' to create fully
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
61 native Windows applications that link with the normal
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
62 Microsoft C-runtime library (e.g. MSVCRT.DLL), and don't
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
63 require a special POSIX-emulation DLL (e.g. CYGWIN1.DLL).
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
64 Conversely, the only POSIX-like services available are
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
65 those in MSVCRT.DLL, which isn't much. Essentially, coding
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
66 for MinGW is identical to coding for native Windows using
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
67 Visual C++ or the like, whereas coding for Cygwin is like
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
68 coding for Linux, but with the additional possibility of
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
69 making Win32-API calls. Additional confusion comes from
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
70 the fact that you can use the Cygwin environment and
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
71 compilers to build a MINGW application (e.g. by passing the
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
72 `-mno-cygwin' command-line argument to `gcc').
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
73
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
74 Corresponding s/ file: s/mingw32.h
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
75
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
76 (none) There's no flag to indicate that you are specifically
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
77 targetting native Windows and not doing this with MINGW.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
78 Presumably this means you're using Visual C++.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
79
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
80 Corresponding s/ file: s/windowsnt.h
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
81
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
82 `WIN32_ANY' Any of the above three environments.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
83
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
84 Corresponding s/ file: s/win32-common.h
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
85
5022
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
86 `WIN32_NATIVE'
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
87 Native Windows target, either MinGW or Visual C++.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
88 That is, not Cygwin.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
89
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
90 Corresponding s/ file: s/win32-native.h
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
91
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
92
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
93 2. Compiler level:
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
94 ------------------
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
95
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
96 `__GNUC__' Defined whenever compiling with gcc (Cygwin or MinGW).
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
97
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
98 `_MSC_VER' Defined whenever compiling with Visual C++.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
99
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
100 `CYGWIN_HEADERS'
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
101 Defined whenever using Cygwin-style header files rather
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
102 than Visual C++ headers. Currently this means the same
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
103 as "Cygwin or MinGW" and the same as "compiling with gcc".
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
104 This applies especially to the header files in
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
105 /usr/include/w32api, which is a free replacement for the
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
106 standard Visual C++ headers for the Win32 API.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
107
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
108
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
109 3. Window-system level:
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
110 -----------------------
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
111
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
112 `HAVE_MS_WINDOWS'
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
113 MS Windows native windowing system (anything related to the
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
114 appearance of the graphical screen). May or may not apply
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
115 to any of VC++, MinGW, or Cygwin. For example, it's
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
116 definitely possible to compile XEmacs under Cygwin with
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
117 support for X-Windows frames and TTY frames, but no
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
118 native MS Windows frames. It may also be possible to do that
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
119 under MinGW or (less likely, but feasible) Visual C++.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
120
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
121 `HAVE_X_WINDOWS'
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
122 Support for X-Windows frames, regardless of whether under
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
123 MS Windows. You can certainly compile XEmacs with support
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
124 for X-Windows frames when running on MS Windows, using Cygwin.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
125
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
126 `HAVE_GTK', `HAVE_TTY'
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
127 Likewise. All are available on MS Windows with Cygwin.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
128
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
129 Note further that more than one of these can be defined at the same time.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
130 In fact, in general, it's possible to compile with support for all of
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
131 these at the same time.
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
132
cfe36e196dc7 long comment in syswindows.h about build constants
Ben Wing <ben@xemacs.org>
parents: 4988
diff changeset
133 */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
134
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
135 /* ------------------------- Basic includes ------------------------- */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
136
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
137 #ifndef WIN32_LEAN_AND_MEAN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
138 #define WIN32_LEAN_AND_MEAN
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
139 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
140
4858
e1d8b6b0c589 Define CYGWIN_HEADERS in s/cygwin32.h and s/mingw32.h instead of syswindows.h, so they're available everywhere
Ben Wing <ben@xemacs.org>
parents: 4854
diff changeset
141 #ifdef CYGWIN_HEADERS
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
142 # ifndef _WIN32_IE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
143 # define _WIN32_IE 0x0400
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
144 # endif
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
145
1743
543769b89fed [xemacs-hg @ 2003-10-14 05:02:57 by james]
james
parents: 1685
diff changeset
146 BEGIN_C_DECLS
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
147
4827
11daf37dae4d more fixes to get a clean compile
Ben Wing <ben@xemacs.org>
parents: 4824
diff changeset
148 #if 0 /* breaks the build, as of GCC 3.4.4 or earlier, since the prototype
11daf37dae4d more fixes to get a clean compile
Ben Wing <ben@xemacs.org>
parents: 4824
diff changeset
149 is now declared static */
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
150 /* Fucking GCC complains about "no previous prototype" for inline
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
151 functions. DUH! See DECLARE_INLINE_HEADER. */
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
152 extern __inline void *GetCurrentFiber (void);
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
153 extern __inline void *GetFiberData (void);
4824
c12b646d84ee changes to get things to compile under latest cygwin
Ben Wing <ben@xemacs.org>
parents: 4538
diff changeset
154 #endif
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
155
1743
543769b89fed [xemacs-hg @ 2003-10-14 05:02:57 by james]
james
parents: 1685
diff changeset
156 END_C_DECLS
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
157
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
158 #endif
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 593
diff changeset
159
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
160 /* Defines for COM so it's usable in both C and C++. XECOMCALLn() calls a
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
161 method with the specified number of parameters. XECOMID() surrounds a
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
162 class or interface name when passed to CoCreateInstance, a
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
163 QueryInterface method, or the like. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
164 #ifdef __cplusplus
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
165 #define XECOMCALL0(cl, meth) ((cl)->meth ())
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
166 #define XECOMCALL1(cl, meth, a1) ((cl)->meth (a1))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
167 #define XECOMCALL2(cl, meth, a1, a2) ((cl)->meth (a1, a2))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
168 #define XECOMCALL3(cl, meth, a1, a2, a3) ((cl)->meth (a1, a2, a3))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
169 #define XECOMCALL4(cl, meth, a1, a2, a3, a4) ((cl)->meth (a1, a2, a3, a4))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
170 #define XECOMID(id) (id)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
171 #else
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
172 #define XECOMCALL0(cl, meth) ((cl)->lpVtbl->meth (cl))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
173 #define XECOMCALL1(cl, meth, a1) ((cl)->lpVtbl->meth (cl, a1))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
174 #define XECOMCALL2(cl, meth, a1, a2) ((cl)->lpVtbl->meth (cl, a1, a2))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
175 #define XECOMCALL3(cl, meth, a1, a2, a3) ((cl)->lpVtbl->meth (cl, a1, a2, a3))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
176 #define XECOMCALL4(cl, meth, a1, a2, a3, a4) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
177 ((cl)->lpVtbl->meth (cl, a1, a2, a3, a4))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
178 #define XECOMID(id) (&(id))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
179 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
180
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
181 #define OEMRESOURCE /* Define OCR_ and friend constants */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
182 #include <windows.h>
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
183
3728
6765f2581182 [xemacs-hg @ 2006-12-08 02:21:53 by vins]
vins
parents: 3025
diff changeset
184 #include <aclapi.h>
6765f2581182 [xemacs-hg @ 2006-12-08 02:21:53 by vins]
vins
parents: 3025
diff changeset
185
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
186 #if defined (WIN32_LEAN_AND_MEAN)
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
187 # ifdef HAVE_X_WINDOWS
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
188 /* Christ almighty. The problems you get when combining two large code bases,
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
189 neither with any respect for namespace purity. */
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
190 # undef Status
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
191 # endif
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
192 # include <winspool.h>
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
193 # ifdef HAVE_X_WINDOWS
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
194 # define Status int
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
195 # endif
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
196 # include <mmsystem.h>
673
685b588e92d8 [xemacs-hg @ 2001-10-30 05:13:26 by andyp]
andyp
parents: 665
diff changeset
197 # include <shlobj.h>
558
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
198 # include <shellapi.h>
ed498ef2108b [xemacs-hg @ 2001-05-23 09:59:33 by ben]
ben
parents: 546
diff changeset
199 # include <ddeml.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
200 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
201
546
666d73d6ac56 [xemacs-hg @ 2001-05-20 01:17:07 by ben]
ben
parents: 531
diff changeset
202 #include <lmaccess.h> /* next three for NetUserEnum and friends */
531
0493e9f3c27f [xemacs-hg @ 2001-05-12 11:16:12 by ben]
ben
parents: 442
diff changeset
203 #include <lmapibuf.h>
0493e9f3c27f [xemacs-hg @ 2001-05-12 11:16:12 by ben]
ben
parents: 442
diff changeset
204 #include <lmerr.h>
546
666d73d6ac56 [xemacs-hg @ 2001-05-20 01:17:07 by ben]
ben
parents: 531
diff changeset
205 #include <lmcons.h> /* for UNLEN and possibly other constants */
531
0493e9f3c27f [xemacs-hg @ 2001-05-12 11:16:12 by ben]
ben
parents: 442
diff changeset
206
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
207 #include <cderr.h>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
208 #include <commdlg.h>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
209
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
210 #ifdef NEED_MSWINDOWS_COMMCTRL
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
211 #include <commctrl.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
212 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
213 #ifdef NEED_MSWINDOWS_OBJBASE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
214 #include <objbase.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
215 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
216 #ifdef NEED_MSWINDOWS_SHLOBJ
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
217 #include <shlobj.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
218 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
219
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
220 #include <zmouse.h> /* WHEEL_PAGESCROLL under Cygwin */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
221
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
222 #include <wchar.h>
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
223
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
224 /* ------------------------- Cygwin header brokenness ---------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
225
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
226 #ifdef CYGWIN_HEADERS
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
227
1683
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
228 #include <cygwin/stat.h> /* for struct stat */
1304
579d37cb4395 [xemacs-hg @ 2003-02-15 11:20:38 by ben]
ben
parents: 1204
diff changeset
229 #include <w32api.h> /* for version info */
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
230 #include <sys/cygwin.h> /* path conversion functions */
1304
579d37cb4395 [xemacs-hg @ 2003-02-15 11:20:38 by ben]
ben
parents: 1204
diff changeset
231
1683
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
232 /* Test for a specific version of w32api */
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
233 #define W32API_VER(major,minor) (((major) << 16) + (minor))
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
234 #define W32API_INSTALLED_VER \
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
235 W32API_VER (__W32API_MAJOR_VERSION, __W32API_MINOR_VERSION)
1304
579d37cb4395 [xemacs-hg @ 2003-02-15 11:20:38 by ben]
ben
parents: 1204
diff changeset
236
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
237 /* Various brokennesses in various versions of Cygwin */
673
685b588e92d8 [xemacs-hg @ 2001-10-30 05:13:26 by andyp]
andyp
parents: 665
diff changeset
238
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
239 /* windows.h defines. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
240 #ifndef SPI_GETWHEELSCROLLLINES
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
241 #define SPI_GETWHEELSCROLLLINES 104
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
242 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
243
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
244 /* commctrl.h defines. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
245 #ifndef TB_SETIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
246 #define TB_SETIMAGELIST (WM_USER + 48)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
247 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
248 #ifndef TB_GETIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
249 #define TB_GETIMAGELIST (WM_USER + 49)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
250 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
251 #ifndef TB_SETDISABLEDIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
252 #define TB_SETDISABLEDIMAGELIST (WM_USER + 54)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
253 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
254 #ifndef TB_GETDISABLEDIMAGELIST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
255 #define TB_GETDISABLEDIMAGELIST (WM_USER + 55)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
256 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
257 #ifndef TB_SETPADDING
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
258 #define TB_SETPADDING (WM_USER + 87)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
259 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
260 #ifndef TB_GETBUTTONINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
261 #define TB_GETBUTTONINFOA (WM_USER + 65)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
262 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
263 #ifndef TB_GETBUTTONINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
264 #define TB_GETBUTTONINFOW (WM_USER + 63)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
265 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
266 #ifndef TB_SETBUTTONINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
267 #define TB_SETBUTTONINFOA (WM_USER + 66)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
268 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
269 #ifndef TB_SETBUTTONINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
270 #define TB_SETBUTTONINFOW (WM_USER + 64)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
271 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
272 #ifndef TB_INSERTBUTTONA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
273 #define TB_INSERTBUTTONA (WM_USER + 21)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
274 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
275 #ifndef TB_INSERTBUTTONW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
276 #define TB_INSERTBUTTONW (WM_USER + 67)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
277 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
278 #ifndef TB_ADDBUTTONSA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
279 #define TB_ADDBUTTONSA (WM_USER + 20)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
280 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
281 #ifndef TB_ADDBUTTONSW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
282 #define TB_ADDBUTTONSW (WM_USER + 68)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
283 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
284 #ifndef LVM_SETBKIMAGEA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
285 #define LVM_SETBKIMAGEA (LVM_FIRST + 68)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
286 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
287 #ifndef LVM_SETBKIMAGEW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
288 #define LVM_SETBKIMAGEW (LVM_FIRST + 138)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
289 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
290 #ifndef LVM_GETBKIMAGEA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
291 #define LVM_GETBKIMAGEA (LVM_FIRST + 69)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
292 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
293 #ifndef LVM_GETBKIMAGEW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
294 #define LVM_GETBKIMAGEW (LVM_FIRST + 139)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
295 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
296 #ifndef WC_COMBOBOXEXW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
297 #define WC_COMBOBOXEXW L"ComboBoxEx32"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
298 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
299 #ifndef CBEM_INSERTITEMA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
300 #define CBEM_INSERTITEMA (WM_USER + 1)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
301 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
302 #ifndef CBEM_INSERTITEMW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
303 #define CBEM_INSERTITEMW (WM_USER + 11)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
304 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
305 #ifndef CBEM_SETITEMA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
306 #define CBEM_SETITEMA (WM_USER + 5)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
307 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
308 #ifndef CBEM_SETITEMW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
309 #define CBEM_SETITEMW (WM_USER + 12)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
310 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
311 #ifndef CBEM_GETITEMA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
312 #define CBEM_GETITEMA (WM_USER + 4)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
313 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
314 #ifndef CBEM_GETITEMW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
315 #define CBEM_GETITEMW (WM_USER + 13)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
316 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
317 #ifndef HDN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
318 #define HDN_GETDISPINFOA (HDN_FIRST - 9)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
319 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
320 #ifndef HDN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
321 #define HDN_GETDISPINFOW (HDN_FIRST - 29)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
322 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
323 #ifndef TBN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
324 #define TBN_GETDISPINFOA (TBN_FIRST - 16)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
325 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
326 #ifndef TBN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
327 #define TBN_GETDISPINFOW (TBN_FIRST - 17)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
328 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
329 #ifndef TBN_GETINFOTIPA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
330 #define TBN_GETINFOTIPA (TBN_FIRST - 18)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
331 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
332 #ifndef TBN_GETINFOTIPW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
333 #define TBN_GETINFOTIPW (TBN_FIRST - 19)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
334 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
335 #ifndef TTN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
336 #define TTN_GETDISPINFOA (TTN_FIRST - 0)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
337 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
338 #ifndef TTN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
339 #define TTN_GETDISPINFOW (TTN_FIRST - 10)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
340 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
341
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
342 #if (_WIN32_IE >= 0x0400)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
343
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
344 #ifndef LVN_GETINFOTIPA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
345 #define LVN_GETINFOTIPA (LVN_FIRST - 57)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
346 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
347 #ifndef LVN_GETINFOTIPW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
348 #define LVN_GETINFOTIPW (LVN_FIRST - 58)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
349 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
350 #ifndef TVN_GETINFOTIPA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
351 #define TVN_GETINFOTIPA (TVN_FIRST - 13)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
352 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
353 #ifndef TVN_GETINFOTIPW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
354 #define TVN_GETINFOTIPW (TVN_FIRST - 14)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
355 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
356 #ifndef CBEN_GETDISPINFOA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
357 #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
358 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
359 #ifndef CBEN_GETDISPINFOW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
360 #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
361 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
362 #ifndef CBEN_DRAGBEGINA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
363 #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
364 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
365 #ifndef CBEN_DRAGBEGINW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
366 #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
367 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
368
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
369 #endif /* (_WIN32_IE >= 0x0400) */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
370
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
371 #ifndef CBEN_ENDEDITA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
372 #define CBEN_ENDEDITA (CBEN_FIRST - 5)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
373 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
374 #ifndef CBEN_ENDEDITW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
375 #define CBEN_ENDEDITW (CBEN_FIRST - 6)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
376 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
377
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
378 #ifndef CBEMAXSTRLEN
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
379 #define CBEMAXSTRLEN 260
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
380 #endif
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
381
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
382 #ifndef NMCBEENDEDIT
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
383
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
384 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
385 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
386 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
387 BOOL fChanged;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
388 int iNewSelection;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
389 WCHAR szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
390 int iWhy;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
391 } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
392
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
393 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
394 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
395 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
396 BOOL fChanged;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
397 int iNewSelection;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
398 char szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
399 int iWhy;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
400 } NMCBEENDEDITA, *LPNMCBEENDEDITA,*PNMCBEENDEDITA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
401
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
402 #endif /* not NMCBEENDEDIT */
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
403
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
404 #if (_WIN32_IE >= 0x0400)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
405
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
406 #ifndef NMCBEDRAGBEGIN
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
407
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
408 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
409 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
410 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
411 int iItemid;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
412 WCHAR szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
413 } NMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
414
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
415 typedef struct
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
416 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
417 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
418 int iItemid;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
419 char szText[CBEMAXSTRLEN];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
420 } NMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
421
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
422 #endif /* not NMCBEDRAGBEGIN */
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
423
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
424 typedef struct tagNMDATETIMEFORMATA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
425 {
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
426 NMHDR nmhdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
427 LPCSTR pszFormat;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
428 SYSTEMTIME st;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
429 LPCSTR pszDisplay;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
430 CHAR szDisplay[64];
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
431 } NMDATETIMEFORMATA, FAR * LPNMDATETIMEFORMATA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
432
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
433 typedef struct tagNMDATETIMEFORMATW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
434 {
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
435 NMHDR nmhdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
436 LPCWSTR pszFormat;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
437 SYSTEMTIME st;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
438 LPCWSTR pszDisplay;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
439 WCHAR szDisplay[64];
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
440 } NMDATETIMEFORMATW, FAR * LPNMDATETIMEFORMATW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
441
1683
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
442 #if W32API_INSTALLED_VER < W32API_VER(2,2)
1304
579d37cb4395 [xemacs-hg @ 2003-02-15 11:20:38 by ben]
ben
parents: 1204
diff changeset
443
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
444 typedef struct tagNMTTDISPIFNOA
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
445 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
446 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
447 LPSTR lpszText;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
448 char szText[80];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
449 HINSTANCE hinst;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
450 UINT uFlags;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
451 #if (_WIN32_IE >= 0x0300)
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
452 LPARAM lParam;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
453 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
454 } NMTTDISPINFOA, FAR *LPNMTTDISPINFOA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
455
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
456 typedef struct tagNMTTDISPINFOW
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
457 {
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
458 NMHDR hdr;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
459 LPWSTR lpszText;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
460 WCHAR szText[80];
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
461 HINSTANCE hinst;
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
462 UINT uFlags;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
463 #if (_WIN32_IE >= 0x0300)
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
464 LPARAM lParam;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
465 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
466 } NMTTDISPINFOW, FAR *LPNMTTDISPINFOW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
467
1683
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
468 #endif /* W32API_INSTALLED_VER < W32API_VER(2,2) */
1304
579d37cb4395 [xemacs-hg @ 2003-02-15 11:20:38 by ben]
ben
parents: 1204
diff changeset
469
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
470 #endif /* (_WIN32_IE >= 0x0400) */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
471
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
472 /* shlobj.h defines */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
473 #ifndef BFFM_VALIDATEFAILEDA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
474 #define BFFM_VALIDATEFAILEDA 3
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
475 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
476 #ifndef BFFM_VALIDATEFAILEDW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
477 #define BFFM_VALIDATEFAILEDW 4
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
478 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
479 #ifndef BFFM_SETSELECTIONA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
480 #define BFFM_SETSELECTIONA (WM_USER + 102)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
481 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
482 #ifndef BFFM_SETSELECTIONW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
483 #define BFFM_SETSELECTIONW (WM_USER + 103)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
484 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
485 #ifndef BFFM_SETSTATUSTEXTA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
486 #define BFFM_SETSTATUSTEXTA (WM_USER + 100)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
487 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
488 #ifndef BFFM_SETSTATUSTEXTW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
489 #define BFFM_SETSTATUSTEXTW (WM_USER + 104)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
490 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
491 #ifndef SHARD_PATHA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
492 #define SHARD_PATHA 2
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
493 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
494 #ifndef SHARD_PATHW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
495 #define SHARD_PATHW 3
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
496 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
497 #ifndef SHCNF_PATHA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
498 #define SHCNF_PATHA 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
499 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
500 #ifndef SHCNF_PATHW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
501 #define SHCNF_PATHW 5
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
502 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
503 #ifndef SHCNF_PRINTERA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
504 #define SHCNF_PRINTERA 2
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
505 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
506 #ifndef SHCNF_PRINTERW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
507 #define SHCNF_PRINTERW 6
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
508 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
509 #ifndef BFFM_VALIDATEFAILED
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
510 #ifdef UNICODE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
511 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
512 #else
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
513 #define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
514 #endif
819
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
515 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
516
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
517 /* winnls.h defines */
819
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
518 #ifndef MAC_CHARSET
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
519 #define MAC_CHARSET 77
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
520 #endif
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
521 #ifndef LOCALE_RETURN_NUMBER
819
6504113e7c2d [xemacs-hg @ 2002-04-25 18:03:23 by andyp]
andyp
parents: 814
diff changeset
522 #define LOCALE_RETURN_NUMBER 0x20000000
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
523 #endif
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
524
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
525 /* OEM resources */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
526 #ifndef OCR_ICOCUR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
527 #define OCR_ICOCUR 32647
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
528 #define OIC_SAMPLE 32512
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
529 #define OIC_HAND 32513
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
530 #define OIC_QUES 32514
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
531 #define OIC_BANG 32515
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
532 #define OIC_NOTE 32516
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
533 #define OIC_WINLOGO 32517
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
534 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
535
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
536 /* More Cygwin stupidity: Current w32api's winuser.h has IME message
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
537 constants and they conflict with imm.h. (NOTE: Currently fixed, but
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
538 I'm sure the problems were present post 1.0.) */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
539 #undef WM_IME_STARTCOMPOSITION
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
540 #undef WM_IME_ENDCOMPOSITION
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
541 #undef WM_IME_COMPOSITION
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
542 #undef WM_IME_KEYLAST
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
543 #undef WM_IME_SETCONTEXT
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
544 #undef WM_IME_NOTIFY
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
545 #undef WM_IME_CONTROL
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
546 #undef WM_IME_COMPOSITIONFULL
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
547 #undef WM_IME_SELECT
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
548 #undef WM_IME_CHAR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
549 #undef WM_IME_KEYDOWN
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
550 #undef WM_IME_KEYUP
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
551
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
552 #include <imm.h>
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
553
1683
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
554 #if W32API_INSTALLED_VER < W32API_VER(2,4)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
555 typedef struct _SHQUERYRBINFO
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
556 {
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
557 DWORD cbSize;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
558 __int64 i64Size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
559 __int64 i64NumItems;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
560 } SHQUERYRBINFO, *LPSHQUERYRBINFO;
1683
74353ce403ce [xemacs-hg @ 2003-09-15 15:24:56 by james]
james
parents: 1304
diff changeset
561 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
562
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
563 typedef LPCDLGTEMPLATE LPCDLGTEMPLATEW;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
564 typedef LPCDLGTEMPLATE LPCDLGTEMPLATEA;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
565
1685
29c45c1b64f3 [xemacs-hg @ 2003-09-15 21:19:11 by james]
james
parents: 1683
diff changeset
566 #else /* !CYGWIN_HEADERS */
4893
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
567
1685
29c45c1b64f3 [xemacs-hg @ 2003-09-15 21:19:11 by james]
james
parents: 1683
diff changeset
568 #define W32API_VER(major,minor) 0
29c45c1b64f3 [xemacs-hg @ 2003-09-15 21:19:11 by james]
james
parents: 1683
diff changeset
569 #define W32API_INSTALLED_VER 0
4893
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
570
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
571 /* Some types that show up in Cygwin headers but not in Visual Studio headers,
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
572 and cause problems if we used Cygwin headers to generate
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
573 intl-auto-encap-win32.[ch]. */
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
574 typedef LPCVOID PCVOID;
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
575 typedef LPDWORD *PDWORD_PTR;
99f2102552d7 Add typedefs for PCVOID and PDWORD_PTR for non-Cygwin-headers folks.
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
576
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
577 #endif /* CYGWIN_HEADERS */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
578
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
579 /* Not in VC 6 */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
580 #ifndef BIF_NEWDIALOGSTYLE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
581 #define BIF_NEWDIALOGSTYLE 64
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
582 #endif
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
583
4538
112f6ed44299 Allow compilation under Cygwin 1.7
acs@samwise
parents: 3728
diff changeset
584 #if defined (CYGWIN) && (CYGWIN_VERSION_DLL_COMBINED < 190)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
585
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
586 /* All but wcscmp and wcslen left out of Cygwin headers -- but present
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
587 in /usr/include/mingw/string.h! */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
588 wchar_t* wcscat (wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
589 wchar_t* wcschr (const wchar_t*, wchar_t);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
590 int wcscoll (const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
591 wchar_t* wcscpy (wchar_t*, const wchar_t*);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
592 wchar_t* wcsdup (const wchar_t*);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
593 size_t wcscspn (const wchar_t*, const wchar_t*);
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
594 /* Note: No wcserror in CRTDLL. */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
595 wchar_t* wcsncat (wchar_t*, const wchar_t*, size_t);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
596 int wcsncmp (const wchar_t*, const wchar_t*, size_t);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
597 wchar_t* wcsncpy (wchar_t*, const wchar_t*, size_t);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
598 wchar_t* wcspbrk (const wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
599 wchar_t* wcsrchr (const wchar_t*, wchar_t);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
600 size_t wcsspn (const wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
601 wchar_t* wcsstr (const wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
602 wchar_t* wcstok (wchar_t*, const wchar_t*);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
603 size_t wcsxfrm (wchar_t*, const wchar_t*, size_t);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
604
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
605 #endif /* CYGWIN */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
606
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
607 /* ------------------------- Unicode encapsulation ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
608
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
609 /* See intl-win32.c for more information about Unicode-encapsulation */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
610
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
611 #define ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
612
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
613 #include "intl-auto-encap-win32.h"
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
614
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
615 /* would be encapsulatable but for parsing problems */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
616
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
617 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
618 #undef DefWindowProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
619 #define DefWindowProc error use qxeDefWindowProc or DefWindowProcA/DefWindowProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
620 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
621 LRESULT qxeDefWindowProc (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
622
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
623 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
624 #undef CallWindowProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
625 #define CallWindowProc error use qxeCallWindowProc or CallWindowProcA/CallWindowProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
626 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
627 LRESULT qxeCallWindowProc (WNDPROC lpPrevWndFunc, HWND hWnd, UINT Msg,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
628 WPARAM wParam, LPARAM lParam);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
629
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
630 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
631 #undef DefDlgProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
632 #define DefDlgProc error use qxeDefDlgProc or DefDlgProcA/DefDlgProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
633 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
634 LRESULT qxeDefDlgProc (HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
635
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
636 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
637 #undef SetWindowsHook
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
638 #define SetWindowsHook error use qxeSetWindowsHook or SetWindowsHookA/SetWindowsHookW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
639 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
640 HHOOK qxeSetWindowsHook (int nFilterType, HOOKPROC pfnFilterProc);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
641
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
642 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
643 #undef DefMDIChildProc
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
644 #define DefMDIChildProc error use qxeDefMDIChildProc or DefMDIChildProcA/DefMDIChildProcW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
645 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
646 LRESULT qxeDefMDIChildProc (HWND hWnd, UINT uMsg, WPARAM wParam,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
647 LPARAM lParam);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
648
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
649 #undef GetEnvironmentStrings
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
650 #undef GetEnvironmentStringsA
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
651 #define GetEnvironmentStringsA GetEnvironmentStrings
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
652 Extbyte * qxeGetEnvironmentStrings (void);
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
653
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
654 /* would be encapsulatable but for Cygwin problems */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
655
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
656 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
1111
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
657 #undef DdeCreateStringHandle
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
658 #define DdeCreateStringHandle error use qxeDdeCreateStringHandle or DdeCreateStringHandleA/DdeCreateStringHandleW
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
659 #endif
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
660 HSZ qxeDdeCreateStringHandle (DWORD idInst, const Extbyte * psz, int iCodePage);
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
661
184461bc8de4 [xemacs-hg @ 2002-11-18 06:52:23 by ben]
ben
parents: 872
diff changeset
662 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
663 #undef RegConnectRegistry
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
664 #define RegConnectRegistry error use qxeRegConnectRegistry or RegConnectRegistryA/RegConnectRegistryW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
665 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
666 LONG qxeRegConnectRegistry (const Extbyte * lpMachineName, HKEY hKey, PHKEY phkResult);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
667
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
668 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
669 #undef ExtractIconEx
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
670 #define ExtractIconEx error use qxeExtractIconEx or ExtractIconExA/ExtractIconExW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
671 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
672 UINT qxeExtractIconEx (const Extbyte * lpszFile, int nIconIndex, HICON FAR * phiconLarge, HICON FAR * phiconSmall, UINT nIcons);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
673
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
674 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
675 #undef GetICMProfile
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
676 #define GetICMProfile error use qxeGetICMProfile or GetICMProfileA/GetICMProfileW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
677 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
678 BOOL qxeGetICMProfile (HDC arg1, LPDWORD arg2, Extbyte * arg3);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
679
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
680 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
681 #undef UpdateICMRegKey
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
682 #define UpdateICMRegKey error use qxeUpdateICMRegKey or UpdateICMRegKeyA/UpdateICMRegKeyW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
683 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
684 BOOL qxeUpdateICMRegKey (DWORD arg1, Extbyte * arg2, Extbyte * arg3, UINT arg4);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
685
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
686 /* would be encapsulatable but for header changes in different versions of VC++ */
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
687
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
688 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
689 #undef EnumResourceTypes
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
690 #define EnumResourceTypes error_use_qxeEnumResourceTypes_or_EnumResourceTypesA_and_EnumResourceTypesW
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
691 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
692 #if MSC_VERSION >= 1300
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
693 BOOL qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROCW lpEnumFunc, LONG lParam);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
694 #else
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
695 BOOL qxeEnumResourceTypes (HMODULE hModule, ENUMRESTYPEPROC lpEnumFunc, LONG lParam);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
696 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
697
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
698 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
699 #undef EnumResourceNames
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
700 #define EnumResourceNames error_use_qxeEnumResourceNames_or_EnumResourceNamesA_and_EnumResourceNamesW
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
701 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
702 #if MSC_VERSION >= 1300
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
703 BOOL qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROCW lpEnumFunc, LONG lParam);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
704 #else
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
705 BOOL qxeEnumResourceNames (HMODULE hModule, const Extbyte * lpType, ENUMRESNAMEPROC lpEnumFunc, LONG lParam);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
706 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
707
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
708 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
709 #undef EnumResourceLanguages
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
710 #define EnumResourceLanguages error_use_qxeEnumResourceLanguages_or_EnumResourceLanguagesA_and_EnumResourceLanguagesW
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
711 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
712 #if MSC_VERSION >= 1300
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
713 BOOL qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROCW lpEnumFunc, LONG lParam);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
714 #else
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
715 BOOL qxeEnumResourceLanguages (HMODULE hModule, const Extbyte * lpType, const Extbyte * lpName, ENUMRESLANGPROC lpEnumFunc, LONG lParam);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
716 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
717
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
718 /* files */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
719 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
720 #undef FindFirstFile
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
721 #define FindFirstFile error use qxeFindFirstFile or FindFirstFileA/FindFirstFileW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
722 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
723 HANDLE qxeFindFirstFile (const Extbyte *lpFileName,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
724 WIN32_FIND_DATAW *lpFindFileData);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
725
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
726 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
727 #undef FindNextFile
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
728 #define FindNextFile error use qxeFindNextFile or FindNextFileA/FindNextFileW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
729 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
730 BOOL qxeFindNextFile (HANDLE hFindFile, WIN32_FIND_DATAW *lpFindFileData);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
731
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
732 /* shell */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
733 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
734 #undef SHGetFileInfo
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
735 #define SHGetFileInfo error use qxeSHGetFileInfo or SHGetFileInfoA/SHGetFileInfoW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
736 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
737 DWORD qxeSHGetFileInfo (const Extbyte *pszPath, DWORD dwFileAttributes,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
738 SHFILEINFOW *psfi, UINT cbFileInfo, UINT uFlags);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
739
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
740 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
741 #undef SHBrowseForFolder
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
742 #define SHBrowseForFolder error use qxeSHBrowseForFolder or SHBrowseForFolderA/SHBrowseForFolderW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
743 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
744 LPITEMIDLIST qxeSHBrowseForFolder (LPBROWSEINFOW lpbi);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
745
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
746 /* Not Unicode-split */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
747 VOID qxeSHAddToRecentDocs (UINT uFlags, LPCVOID pv);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
748
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
749 /* Not Unicode-split */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
750 VOID qxeSHChangeNotify (LONG wEventId, UINT uFlags, LPCVOID dwItem1,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
751 LPCVOID dwItem2);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
752
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
753 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
754 #undef SHGetDataFromIDList
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
755 #define SHGetDataFromIDList error use qxeSHGetDataFromIDList or SHGetDataFromIDListA/SHGetDataFromIDListW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
756 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
757 HRESULT qxeSHGetDataFromIDList (IShellFolder *psf, LPCITEMIDLIST pidl,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
758 int nFormat, PVOID pv, int cb);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
759
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
760 /* devmode */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
761 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
762 #undef CreateDC
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
763 #define CreateDC error use qxeCreateDC or CreateDCA/CreateDCW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
764 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
765 HDC qxeCreateDC (const Extbyte *lpszDriver, const Extbyte *lpszDevice,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
766 const Extbyte *lpszOutput, CONST DEVMODEW *lpInitData);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
767
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
768 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
769 #undef ResetDC
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
770 #define ResetDC error use qxeResetDC or ResetDCA/ResetDCW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
771 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
772 HDC qxeResetDC (HDC hdc, CONST DEVMODEW *lpInitData);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
773
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
774 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
775 #undef OpenPrinter
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
776 #define OpenPrinter error use qxeOpenPrinter or OpenPrinterA/OpenPrinterW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
777 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
778 DWORD qxeOpenPrinter (Extbyte *pPrinterName, LPHANDLE phPrinter,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
779 LPPRINTER_DEFAULTSW pDefaultconst);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
780
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
781 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
782 #undef DocumentProperties
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
783 #define DocumentProperties error use qxeDocumentProperties or DocumentPropertiesA/DocumentPropertiesW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
784 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
785 LONG qxeDocumentProperties (HWND hWnd, HANDLE hPrinter, Extbyte *pDeviceName,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
786 DEVMODEW *pDevModeOutput, DEVMODEW *pDevModeInput,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
787 DWORD fMode);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
788
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
789 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
790 #undef PrintDlg
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
791 #define PrintDlg error use qxePrintDlg or PrintDlgA/PrintDlgW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
792 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
793 BOOL qxePrintDlg (PRINTDLGW *lppd);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
794
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
795 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
796 #undef PageSetupDlg
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
797 #define PageSetupDlg error use qxePageSetupDlg or PageSetupDlgA/PageSetupDlgW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
798 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
799 BOOL qxePageSetupDlg (PAGESETUPDLGW *lppd);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
800
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
801 /* fonts */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
802
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
803 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
804 #undef EnumFontFamiliesEx
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
805 #define EnumFontFamiliesEx error use qxeEnumFontFamiliesEx or EnumFontFamiliesExA/EnumFontFamiliesExW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
806 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
807 int qxeEnumFontFamiliesEx (HDC hdc, LOGFONTW *lpLogfont,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
808 FONTENUMPROCW lpEnumFontFamProc, LPARAM lParam,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
809 DWORD dwFlags);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
810
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
811 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
812 #undef CreateFontIndirect
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
813 #define CreateFontIndirect error use qxeCreateFontIndirect or CreateFontIndirectA/CreateFontIndirectW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
814 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
815 HFONT qxeCreateFontIndirect (CONST LOGFONTW *lplf);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
816
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
817 #if defined (HAVE_MS_WINDOWS)
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
818 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
819 #undef ImmSetCompositionFont
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
820 #define ImmSetCompositionFont error use qxeImmSetCompositionFont or ImmSetCompositionFontA/ImmSetCompositionFontW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
821 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
822 BOOL qxeImmSetCompositionFont (HIMC imc, LOGFONTW *lplf);
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
823 #endif /* defined (HAVE_MS_WINDOWS) */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
824
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
825 #if defined (HAVE_MS_WINDOWS)
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
826 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
827 #undef ImmGetCompositionFont
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
828 #define ImmGetCompositionFont error use qxeImmGetCompositionFont or ImmGetCompositionFontA/ImmGetCompositionFontW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
829 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
830 BOOL qxeImmGetCompositionFont (HIMC imc, LOGFONTW *lplf);
2500
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
831 #endif /* defined (HAVE_MS_WINDOWS) */
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
832
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
833 #if defined (HAVE_MS_WINDOWS)
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
834 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
835 #undef ImmSetCompositionString
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
836 #define ImmSetCompositionString error_use_qxeImmSetCompositionString_or_ImmSetCompositionStringA_and_ImmSetCompositionStringW
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
837 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
838 #if MSC_VERSION >= 1300
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
839 BOOL qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
840 #else
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
841 BOOL qxeImmSetCompositionString (HIMC arg1, DWORD dwIndex, LPCVOID lpComp, DWORD arg4, LPCVOID lpRead, DWORD arg6);
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
842 #endif
3d8143fc88e1 [xemacs-hg @ 2005-01-24 23:33:30 by ben]
ben
parents: 2421
diff changeset
843 #endif /* defined (HAVE_MS_WINDOWS) */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
844
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
845 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
846 #undef GetObject
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
847 #define GetObject error use qxeGetObject or GetObjectA/GetObjectW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
848 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
849 int qxeGetObject (HGDIOBJ hgdiobj, int cbBuffer, LPVOID lpvObject);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
850
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
851 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
852 #undef GetTextMetrics
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
853 #define GetTextMetrics error use qxeGetTextMetrics or GetTextMetricsA/GetTextMetricsW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
854 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
855 BOOL qxeGetTextMetrics (HDC hdc, LPTEXTMETRICW lptm);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
856
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
857 /* COMMCTRL.H */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
858
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
859 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
860 #undef SendMessage
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
861 #define SendMessage error use qxeSendMessage or SendMessageA/SendMessageW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
862 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
863 LRESULT qxeSendMessage (HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
864
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
865 /* windows */
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
866
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
867 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
868 #undef RegisterClass
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
869 #define RegisterClass error use qxeRegisterClass or RegisterClassA/RegisterClassW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
870 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
871 ATOM qxeRegisterClass (CONST WNDCLASSW * lpWndClass);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
872
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
873 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
874 #undef UnregisterClass
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
875 #define UnregisterClass error use qxeUnregisterClass or UnregisterClassA/UnregisterClassW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
876 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
877 BOOL qxeUnregisterClass (const Extbyte * lpClassName, HINSTANCE hInstance);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
878
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
879 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
880 #undef RegisterClassEx
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
881 #define RegisterClassEx error use qxeRegisterClassEx or RegisterClassExA/RegisterClassExW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
882 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
883 ATOM qxeRegisterClassEx (CONST WNDCLASSEXW * arg1);
800
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
884
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
885 #ifdef ERROR_WHEN_NONINTERCEPTED_FUNS_USED
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
886 #undef CreateWindow
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
887 #define CreateWindow error use qxeCreateWindow or CreateWindowA/CreateWindowW
a5954632b187 [xemacs-hg @ 2002-03-31 08:27:14 by ben]
ben
parents: 771
diff changeset
888 #endif
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
889 #define qxeCreateWindow(lpClassName, lpWindowName, dwStyle, x, y, \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
890 nWidth, nHeight, hWndParent, hMenu, hInstance, \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
891 lpParam) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
892 qxeCreateWindowEx (0L, lpClassName, lpWindowName, dwStyle, x, y, \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
893 nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
894
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
895 /* ------------------------- Unicode conversion ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
896
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
897 /* Set early in command-line processing, when -nuni or
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
898 --no-unicode-lib-calls is seen. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
899 extern int no_mswin_unicode_lib_calls;
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
900 /* Set early, in init_win32_very_very_early(). */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
901 extern int mswindows_windows9x_p;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
902 #define XEUNICODE_P (!mswindows_windows9x_p && !no_mswin_unicode_lib_calls)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
903
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
904 #define XELPTSTR LPWSTR
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
905 #define XELPCTSTR LPCWSTR
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
906
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
907 #define XETCHAR_SIZE (XEUNICODE_P ? sizeof (WCHAR) : sizeof (CHAR))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
908 #define MAX_XETCHAR_SIZE sizeof (WCHAR)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
909 #define XETEXT1(arg) (XEUNICODE_P ? ((char *) (L##arg)) : (arg))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
910 /* 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
911 I don't really understand why. --ben */
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
912 #define XETEXT(arg) XETEXT1(arg)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
913 #define XECOPY_TCHAR(ptr, ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
914 (XEUNICODE_P ? (* (LPWSTR) (ptr) = L##ch) : (* (LPSTR) (ptr) = (ch)))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
915 #define qxetcslen(arg) \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
916 (XEUNICODE_P ? wcslen ((wchar_t *) arg) : strlen (arg))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
917 #define qxetcsbytelen(arg) \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
918 (XEUNICODE_P ? wcslen ((wchar_t *) arg) * XETCHAR_SIZE : strlen (arg))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
919 #define qxetcscmp(s1, s2) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
920 (XEUNICODE_P ? wcscmp ((wchar_t *) s1, (wchar_t *) s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
921 : strcmp (s1, s2))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
922 #define qxetcscpy(s1, s2) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
923 (XEUNICODE_P ? (char *) wcscpy ((wchar_t *) s1, (wchar_t *) s2) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
924 : strcpy (s1, s2))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
925 #define qxetcsncpy(s1, s2, n) \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
926 (XEUNICODE_P ? (char *) wcsncpy ((wchar_t *) s1, (wchar_t *) s2, n) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
927 : strncpy (s1, s2, n))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
928 #define qxetcschr(s, ch) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
929 (XEUNICODE_P ? (char *) wcschr ((wchar_t *) s, (WCHAR) ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
930 : strchr (s, ch))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
931 #define qxetcsrchr(s, ch) \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
932 (XEUNICODE_P ? (char *) wcsrchr ((wchar_t *) s, (WCHAR) ch) \
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
933 : strrchr (s, ch))
2421
ab71ad6ff3dd [xemacs-hg @ 2004-12-06 03:50:53 by ben]
ben
parents: 2367
diff changeset
934 #define qxetcsdup(s) \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
935 (XEUNICODE_P ? (char *) wcsdup ((wchar_t *) s) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
936 : xstrdup (s))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
937
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
938 #define ITEXT_TO_TSTR(in) ITEXT_TO_EXTERNAL (in, Qmswindows_tstr)
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
939 #define LISP_STRING_TO_TSTR(in) LISP_STRING_TO_EXTERNAL (in, Qmswindows_tstr)
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
940 #define TSTR_TO_ITEXT(in) EXTERNAL_TO_ITEXT (in, Qmswindows_tstr)
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
941 #define TSTR_TO_ITEXT_MALLOC(in) \
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
942 EXTERNAL_TO_ITEXT_MALLOC (in, Qmswindows_tstr)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
943
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
944 #define build_tstr_string(in) \
4953
304aebb79cd3 function renamings to track names of char typedefs
Ben Wing <ben@xemacs.org>
parents: 4952
diff changeset
945 make_extstring (in, qxetcsbytelen ((Extbyte *) in), Qmswindows_tstr)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
946
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
947 #define MAX_ANSI_CHAR_LEN 1
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
948 #define MAX_UNICODE_CHAR_LEN 2
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
949
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
950 DECLARE_INLINE_HEADER (int ansi_char_to_text (int ch, Extbyte *t))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
951 {
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
952 ch &= 0xFF;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
953 t[0] = ch;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
954 return 1;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
955 }
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
956
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
957 DECLARE_INLINE_HEADER (int unicode_char_to_text (int ch, Extbyte *t))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
958 {
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
959 t[0] = ch & 0xFF;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
960 t[1] = (ch >> 8) & 0xFF;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
961 return 2;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
962 }
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
963
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
964 Extbyte *convert_multibyte_to_unicode_malloc (const Extbyte *src,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
965 Bytecount n,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
966 int cp, Bytecount *size_out);
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
967 Extbyte *convert_unicode_to_multibyte_malloc (const Extbyte *src,
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
968 Bytecount n,
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
969 int cp, Bytecount *size_out);
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
970 Ibyte *convert_multibyte_to_internal_malloc (const Extbyte *src,
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
971 Bytecount n,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
972 int cp, Bytecount *size_out);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
973 void convert_multibyte_to_unicode_dynarr (const Extbyte *src, Bytecount n,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
974 int cp, unsigned_char_dynarr *dst);
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
975 void convert_unicode_to_multibyte_dynarr (const Extbyte *src, Bytecount n,
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
976 int cp, unsigned_char_dynarr *dst);
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
977
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
978 Bytecount unicode_multibyte_convert_size (const char *srctext, const void *src,
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
979 Bytecount src_size, int to_unicode,
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
980 int cp);
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
981 void *unicode_multibyte_convert_copy_data (const char *srctext,
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
982 void *alloca_data);
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
983
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
984 /* NOTE: If you make two invocations of the following functions in the same
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
985 subexpression and use the exact same expression for the source in both
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
986 cases, you will lose. In this unlikely case, you may get an abort, and
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
987 need to rewrite the code.
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
988
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
989 We need to use ALLOCA_FUNCALL_OK here, see NEW_DFC in text.h.
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
990 */
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
991
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
992 #ifdef WEXTTEXT_IS_WIDE
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
993 #define MULTIBYTE_TO_WEXTTEXT(str) \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
994 ((Wexttext *) \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
995 unicode_multibyte_convert_copy_data \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
996 (#str, ALLOCA_FUNCALL_OK (unicode_multibyte_convert_size \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
997 (#str, str, strlen (str) + 1, 1, CP_ACP))))
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
998
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
999 #define WEXTTEXT_TO_MULTIBYTE(str) \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1000 ((Extbyte *) \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1001 unicode_multibyte_convert_copy_data \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1002 (#str, ALLOCA_FUNCALL_OK (unicode_multibyte_convert_size \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1003 (#str, str, \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1004 (wcslen (str) + 1) * sizeof (WCHAR), 0, \
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1005 CP_ACP))))
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1006 #else
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1007 #define MULTIBYTE_TO_WEXTTEXT(str) ((Wexttext *) (str))
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1008 #define WEXTTEXT_TO_MULTIBYTE(str) ((Extbyte *) (str))
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1009 #endif
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1010
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1011 /* #### mbstowcs() uses MB_ERR_INVALID_CHARS in addition to MB_PRECOMPOSED.
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1012 Should we do this? But then we have to handle errors.
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1013 #### Do we already check for invalid sequences in the coding system? */
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1014 #define MBTOWC_OPTIONS MB_PRECOMPOSED /* | MB_ERR_INVALID_CHARS */
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1015 /* The following options are what wcstombs() uses in the CRT. It uses
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1016 NULL in place of "~". */
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1017 #define WCTOMB_OPTIONS WC_COMPOSITECHECK | WC_SEPCHARS
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1018 #define WCTOMB_INVALID_STRING "~"
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1019
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1020 /* ------------------------- Other Mule stuff ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1021
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1022 LCID mswindows_current_locale (void);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1023 int mswindows_locale_to_code_page (LCID lcid);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1024 int mswindows_locale_to_oem_code_page (LCID lcid);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1025
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1026 /* ------------------------- Filename conversion ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1027
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1028 #ifdef CYGWIN
1743
543769b89fed [xemacs-hg @ 2003-10-14 05:02:57 by james]
james
parents: 1685
diff changeset
1029
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1030 /* We should just remove the Windows 9x support */
1743
543769b89fed [xemacs-hg @ 2003-10-14 05:02:57 by james]
james
parents: 1685
diff changeset
1031
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1032 #define CCP_POSIX_TO_WIN_T \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1033 (XEUNICODE_P ? CCP_POSIX_TO_WIN_W : CCP_POSIX_TO_WIN_A)
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1034 #define CCP_WIN_T_TO_POSIX \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1035 (XEUNICODE_P ? CCP_WIN_W_TO_POSIX : CCP_WIN_A_TO_POSIX)
1743
543769b89fed [xemacs-hg @ 2003-10-14 05:02:57 by james]
james
parents: 1685
diff changeset
1036
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1037 #endif
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1038
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1039 #ifdef HAVE_CYGWIN_CONV_PATH
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1040 #define LOCAL_FILE_FORMAT_TO_TSTR(path, out) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1041 do { \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1042 const Ibyte *lfftt = (path); \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1043 const Extbyte **lffttout = (const Extbyte **) &(out); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1044 if (isalpha (lfftt[0]) && (IS_DEVICE_SEP (lfftt[1]))) \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1045 PATHNAME_CONVERT_OUT_TSTR (lfftt, *lffttout); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1046 else \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1047 { \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1048 int lfftt_size; \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1049 Extbyte *lfftt_utf8_path; \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1050 Extbyte *lfftt_tstr_path; \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1051 \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1052 PATHNAME_CONVERT_OUT_UTF_8 (lfftt, lfftt_utf8_path); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1053 lfftt_size = cygwin_conv_path (CCP_POSIX_TO_WIN_T | CCP_RELATIVE, \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1054 lfftt_utf8_path, NULL, 0); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1055 lfftt_tstr_path = alloca_extbytes (lfftt_size); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1056 cygwin_conv_path (CCP_POSIX_TO_WIN_T | CCP_RELATIVE, \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1057 lfftt_utf8_path, lfftt_tstr_path, lfftt_size); \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1058 *lffttout = lfftt_tstr_path; \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1059 } \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1060 } while (0)
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1061 #define TSTR_TO_LOCAL_FILE_FORMAT(path, out) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1062 do { \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1063 const Extbyte *ttlff = (path); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1064 int ttlff_size; \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1065 Extbyte *ttlff_utf8_path; \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1066 \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1067 ttlff_size = cygwin_conv_path (CCP_WIN_T_TO_POSIX | CCP_RELATIVE, \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1068 ttlff, NULL, 0); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1069 ttlff_utf8_path = alloca_extbytes (ttlff_size); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1070 cygwin_conv_path (CCP_WIN_T_TO_POSIX | CCP_RELATIVE, \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1071 ttlff, ttlff_utf8_path, ttlff_size); \
4988
4cfb6aeb989d fix compile problems on Windows native
Ben Wing <ben@xemacs.org>
parents: 4981
diff changeset
1072 (out) = EXTERNAL_TO_ITEXT (ttlff_utf8_path, Qutf_8); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1073 } while (0)
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1074 #else /* not HAVE_CYGWIN_CONV_PATH */
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1075 #define LOCAL_FILE_FORMAT_TO_TSTR(path, out) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1076 do { \
4867
7822019c5d98 Revert cast in check_writable() and fix up macros to use const.
Vin Shelton <acs@xemacs.org>
parents: 4858
diff changeset
1077 const Ibyte *lfftt; \
4988
4cfb6aeb989d fix compile problems on Windows native
Ben Wing <ben@xemacs.org>
parents: 4981
diff changeset
1078 const Extbyte **lffttout = (const Extbyte **) &(out); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1079 \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1080 LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN (path, lfftt); \
4988
4cfb6aeb989d fix compile problems on Windows native
Ben Wing <ben@xemacs.org>
parents: 4981
diff changeset
1081 PATHNAME_CONVERT_OUT_TSTR (lfftt, *lffttout); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1082 } while (0)
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1083 #define TSTR_TO_LOCAL_FILE_FORMAT(path, out) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1084 do { \
4867
7822019c5d98 Revert cast in check_writable() and fix up macros to use const.
Vin Shelton <acs@xemacs.org>
parents: 4858
diff changeset
1085 const Ibyte *ttlff; \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1086 \
4988
4cfb6aeb989d fix compile problems on Windows native
Ben Wing <ben@xemacs.org>
parents: 4981
diff changeset
1087 ttlff = TSTR_TO_ITEXT (path); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1088 INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT (ttlff, out); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1089 } while (0)
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1090 #endif /* (not) HAVE_CYGWIN_CONV_PATH */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1091
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1092 #define LISP_LOCAL_FILE_FORMAT_TO_TSTR(path, out) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1093 LOCAL_FILE_FORMAT_TO_TSTR (XSTRING_DATA (path), out)
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1094 /* Convert from local file format, as used in XEmacs, to valid win32
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1095 filenames as can be given to Windows API routines. Under native XEmacs,
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1096 this is a no-op, but under Cygwin, the local names look different --
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1097 Cygwin mount points, forward slashes, etc. Currently, under Cygwin, we
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1098 actually allow local names to be of both formats, i.e. Cygwin or Win32
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1099 native. So we check to see if we have Win32 native already (a cheesy
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1100 check, look for letter plus colon at beginning of name) and do nothing
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1101 in that case. */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1102
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1103 #ifdef HAVE_CYGWIN_CONV_PATH
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1104 /* When Cygwin uses UTF-8, we can't just manipulate internal-format data
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1105 with its routines because it will mangle the high bytes, so we need to
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1106 convert to UTF-8 first, then to Win32 TSTR format (i.e. UTF-16, on
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1107 Windows NT), then back to internal format. Routines that want external
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1108 format should avoid this by using LISP_LOCAL_FILE_FORMAT_TO_TSTR().
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1109 Same thing applies going the other direction. */
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1110 #define LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN(path, pathout) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1111 do \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1112 { \
4867
7822019c5d98 Revert cast in check_writable() and fix up macros to use const.
Vin Shelton <acs@xemacs.org>
parents: 4858
diff changeset
1113 const Extbyte *lfftiwp; \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1114 \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1115 LOCAL_FILE_FORMAT_TO_TSTR (path, lfftiwp); \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1116 (pathout) = TSTR_TO_ITEXT (lfftiwp); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1117 } \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1118 while (0)
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1119 #define INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT(path, pathout) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1120 do { \
4867
7822019c5d98 Revert cast in check_writable() and fix up macros to use const.
Vin Shelton <acs@xemacs.org>
parents: 4858
diff changeset
1121 const Extbyte *iwtlffp; \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1122 iwtlffp = ITEXT_TO_TSTR (path); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1123 TSTR_TO_LOCAL_FILE_FORMAT (iwtlffp, pathout); \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1124 } while (0)
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1125 #elif defined (CYGWIN)
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1126 #define LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN(path, pathout) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1127 do { \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1128 /* NOTE: It is a bit evil that here and below we are passing \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1129 internal-format data to a function that (nominally) should work \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1130 with external-format data. But in point of fact, the Cygwin \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1131 conversion functions are *NOT* localized, and will fail if they \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1132 get 7-bit ISO2022-encoded data. We know that our internal format \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1133 is ASCII-compatible, and so these functions will work fine with \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1134 this data (maybe ... not when Cygwin uses UTF-8) */ \
4867
7822019c5d98 Revert cast in check_writable() and fix up macros to use const.
Vin Shelton <acs@xemacs.org>
parents: 4858
diff changeset
1135 const Ibyte *lfftiwp = (path); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1136 if (isalpha (lfftiwp[0]) && (IS_DEVICE_SEP (lfftiwp[1]))) \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1137 (pathout) = lfftiwp; \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1138 else \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1139 { \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1140 int lfftiw2 = \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1141 cygwin_posix_to_win32_path_list_buf_size ((char *) lfftiwp); \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1142 (pathout) = alloca_ibytes (lfftiw2); \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1143 cygwin_posix_to_win32_path_list ((char *) lfftiwp, (char *) pathout); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1144 } \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1145 } while (0)
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1146 #define INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT(path, pathout) \
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
1147 do { \
4867
7822019c5d98 Revert cast in check_writable() and fix up macros to use const.
Vin Shelton <acs@xemacs.org>
parents: 4858
diff changeset
1148 const Ibyte *wtlff1 = (path); \
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
1149 int wtlff2 = \
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
1150 cygwin_win32_to_posix_path_list_buf_size ((char *) wtlff1); \
2367
ecf1ebac70d8 [xemacs-hg @ 2004-11-04 23:05:23 by ben]
ben
parents: 1743
diff changeset
1151 Ibyte *wtlff3 = alloca_ibytes (wtlff2); \
593
5fd7ba8b56e7 [xemacs-hg @ 2001-05-31 12:45:27 by ben]
ben
parents: 558
diff changeset
1152 cygwin_win32_to_posix_path_list ((char *) wtlff1, (char *) wtlff3); \
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1153 (pathout) = wtlff3; \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1154 } while (0)
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1155 #else /* not defined (CYGWIN) */
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1156 #define LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN(path, pathout) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1157 do { \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1158 (pathout) = (path); \
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1159 } while (0)
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1160 #define INTERNAL_MSWIN_TO_LOCAL_FILE_FORMAT(path, pathout) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1161 do { \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1162 (pathout) = (path); \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1163 } while (0)
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1164 #endif /* (not) defined (CYGWIN) */
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1165
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1166 Lisp_Object tstr_to_local_file_format (Extbyte *pathout);
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1167
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1168 /* Convert a local-format file name or URL in internal format into a Win32
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1169 file name or URL in tstr format. */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1170
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1171 #ifdef CYGWIN
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1172
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1173 #define LISP_LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR(lispstr, pathout) \
2526
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1174 do \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1175 { \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1176 Ibyte *lffmutt_fname1; \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1177 Ibyte *lffmutt_pathint = XSTRING_DATA (lispstr); \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1178 \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1179 if ((lffmutt_fname1 = qxestrchr (lffmutt_pathint, ':')) != NULL \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1180 && *++lffmutt_fname1 == '/' && *++lffmutt_fname1 == '/') \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1181 { \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1182 /* If URL style file, the innards may have Cygwin mount points and \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1183 the like. so separate out the innards, process them, and put back \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1184 together. */ \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1185 if (qxestrncasecmp_ascii (lffmutt_pathint, "file://", 7) == 0) \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1186 { \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1187 Ibyte *lffmutt_path1, *lffmutt_path2; \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1188 LOCAL_FILE_FORMAT_TO_INTERNAL_MSWIN (lffmutt_pathint + 7, \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1189 lffmutt_path1); \
2526
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1190 if (lffmutt_path1 == lffmutt_pathint + 7) /* Optimization */ \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1191 lffmutt_path2 = lffmutt_pathint; \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1192 else \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1193 { \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1194 lffmutt_path2 = alloca_ibytes (7 + qxestrlen (lffmutt_path1) \
2526
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1195 + 1); \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1196 qxestrncpy (lffmutt_path2, lffmutt_pathint, 7); \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1197 qxestrcpy (lffmutt_path2 + 7, lffmutt_path1); \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1198 } \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1199 (pathout) = ITEXT_TO_TSTR (lffmutt_path2); \
2526
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1200 } \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1201 else \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1202 /* A straight URL, just convert */ \
4981
4aebb0131297 Cleanups/renaming of EXTERNAL_TO_C_STRING and friends
Ben Wing <ben@xemacs.org>
parents: 4959
diff changeset
1203 (pathout) = LISP_STRING_TO_TSTR (lispstr); \
2526
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1204 } \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1205 else \
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1206 /* Not URL-style, must be a straight filename. */ \
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1207 LISP_LOCAL_FILE_FORMAT_TO_TSTR (lispstr, pathout); \
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1208 } while (0)
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1209
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1210 #else /* not CYGWIN */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1211
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1212 /* URL's (and everything else) are already in the right format */
4834
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1213 #define LISP_LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR(lispstr, pathout) \
b3ea9c582280 Use new cygwin_conv_path API with Cygwin 1.7 for converting names between Win32 and POSIX, UTF-8-aware, with attendant changes elsewhere
Ben Wing <ben@xemacs.org>
parents: 4827
diff changeset
1214 LISP_LOCAL_FILE_FORMAT_TO_TSTR (lispstr, pathout)
826
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1215
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1216 #endif /* not CYGWIN */
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1217
6728e641994e [xemacs-hg @ 2002-05-05 11:30:15 by ben]
ben
parents: 819
diff changeset
1218
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1219 Ibyte *urlify_filename (Ibyte *filename);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1220 Ibyte *mswindows_canonicalize_filename (Ibyte *name);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1221 #define MSWINDOWS_NORMALIZE_FILENAME(name) \
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1222 IBYTE_STRING_TO_ALLOCA (mswindows_canonicalize_filename (name), name)
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1223
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1224 /* ------------------- Functions needed dynamic binding ------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1225
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1226 typedef BOOL (WINAPI *pfSwitchToThread_t) (VOID);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1227
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1228 typedef NET_API_STATUS (NET_API_FUNCTION *pfNetUserEnum_t)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1229 (LPCWSTR, DWORD, DWORD, LPBYTE *, DWORD, LPDWORD, LPDWORD, LPDWORD);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1230 typedef NET_API_STATUS (NET_API_FUNCTION *pfNetApiBufferFree_t) (LPVOID);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1231
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1232 extern pfSwitchToThread_t xSwitchToThread;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1233
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1234 extern pfNetUserEnum_t xNetUserEnum;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1235 extern pfNetApiBufferFree_t xNetApiBufferFree;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1236
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1237 /* --------- Useful routines for manipulating memory-mapped files -------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1238
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1239 typedef struct file_data
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1240 {
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1241 const Ibyte *name;
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1242 unsigned long size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1243 HANDLE file;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1244 HANDLE file_mapping;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1245 void *file_base;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1246 } file_data;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1247
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1248 #define OFFSET_TO_RVA(var,section) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1249 (section->VirtualAddress + \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1250 ((DWORD)(var) - section->PointerToRawData))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1251
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1252 #define RVA_TO_OFFSET(var,section) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1253 (section->PointerToRawData + \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1254 ((DWORD)(var) - section->VirtualAddress))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1255
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1256 #define RVA_TO_PTR(var,section,filedata) \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1257 ((void *)(RVA_TO_OFFSET(var,section) + \
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1258 (char *)(filedata).file_base))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1259
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1260 int open_input_file (file_data *p_file, const Ibyte *name);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1261 int open_output_file (file_data *p_file, const Ibyte *name,
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1262 unsigned long size);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1263 void close_file_data (file_data *p_file);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1264
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1265 /* ------------------------- Heap related stuff ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1266
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1267 #ifdef WIN32_NATIVE
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1268
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1269 #define get_reserved_heap_size() reserved_heap_size
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1270 #define get_committed_heap_size() (get_data_end () - get_data_start ())
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1271 #define get_heap_start() get_data_start ()
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1272 #define get_heap_end() get_data_end ()
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1273 #define get_page_size() sysinfo_cache.dwPageSize
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1274 #define get_allocation_unit() sysinfo_cache.dwAllocationGranularity
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1275 #define get_processor_type() sysinfo_cache.dwProcessorType
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1276 #define get_nt_major_version() nt_major_version
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1277 #define get_nt_minor_version() nt_minor_version
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1278
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1279 unsigned char *get_data_start (void);
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1280 unsigned char *get_data_end (void);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1281 extern unsigned long data_region_size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1282 extern unsigned long reserved_heap_size;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1283 extern SYSTEM_INFO sysinfo_cache;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1284 extern int nt_major_version;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1285 extern int nt_minor_version;
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1286
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1287 /* To prevent zero-initialized variables from being placed into the bss
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1288 section, use non-zero values to represent an uninitialized state. */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1289 #define UNINIT_PTR ((unsigned char*) 0xF0A0F0A0)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1290 #define UNINIT_LONG (0xF0A0F0A0L)
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1291
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1292 /* Recreate the heap created during dumping. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1293 void recreate_heap (Extbyte *executable_path);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1294
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1295 /* Round the heap to this size. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1296 void round_heap (unsigned long size);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1297
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1298 /* Load in the dumped .bss section. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1299 void read_in_bss (Extbyte *name);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1300
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1301 /* Map in the dumped heap. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1302 void map_in_heap (Extbyte *name);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1303
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1304 /* Cache system info, e.g., the NT page size. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1305 void cache_system_info (void);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1306
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1307 /* Round ADDRESS up to be aligned with ALIGN. */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1308 unsigned char *round_to_next (unsigned char *address,
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1309 unsigned long align);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1310 #endif /* WIN32_NATIVE */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1311
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1312 /* ------------------------- Misc prototypes ------------------------- */
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1313
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1314 #ifdef WIN32_NATIVE
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1315 DECLARE_INLINE_HEADER (int strcasecmp (const char *a, const char *b))
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1316 {
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1317 return qxestrcasecmp ((const Ibyte *) a, (const Ibyte *) b);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1318 }
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1319 #endif /* WIN32_NATIVE */
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1320
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1321 /* in nt.c */
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1322 int mswindows_access (const Ibyte *path, int mode);
3025
facf3239ba30 [xemacs-hg @ 2005-10-25 11:16:19 by ben]
ben
parents: 2526
diff changeset
1323 int mswindows_link (const Ibyte *old, const Ibyte *new_);
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1324 int mswindows_rename (const Ibyte *oldname, const Ibyte *newname);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1325 int mswindows_unlink (const Ibyte *path);
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1326 int mswindows_stat (const Ibyte *path, struct stat *buf);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1327 int mswindows_fstat (int desc, struct stat *buf);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1328 time_t mswindows_convert_time (FILETIME ft);
1204
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
1329 int mswindows_is_executable (const Ibyte *filename);
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
1330 void mswindows_executable_type (const Ibyte *filename, int *is_dos_app,
e22b0213b713 [xemacs-hg @ 2003-01-12 11:07:58 by michaels]
michaels
parents: 1111
diff changeset
1331 int *is_cygnus_app);
867
804517e16990 [xemacs-hg @ 2002-06-05 09:54:39 by ben]
ben
parents: 851
diff changeset
1332 Ibyte *mswindows_getdcwd (int drivelet);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1333
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1334 /* in process-nt.c */
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1335 extern int mswindows_compare_env (const void *strp1, const void *strp2);
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1336
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1337 /* in win32.c */
814
a634e3b7acc8 [xemacs-hg @ 2002-04-14 12:41:59 by ben]
ben
parents: 800
diff changeset
1338 Extbyte *mswindows_get_module_file_name (void);
4932
8b63e21b0436 fix compile issues with gcc 4
Ben Wing <ben@xemacs.org>
parents: 4867
diff changeset
1339 void mswindows_output_last_error (const Ascbyte *frob);
4952
19a72041c5ed Mule-izing, various fixes related to char * arguments
Ben Wing <ben@xemacs.org>
parents: 4932
diff changeset
1340 DECLARE_DOESNT_RETURN (mswindows_report_process_error (const Ascbyte *reason,
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1341 Lisp_Object data,
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1342 int errnum));
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1343 Lisp_Object mswindows_lisp_error (int errnum);
2526
902d5bd9b75c [xemacs-hg @ 2005-01-28 02:36:11 by ben]
ben
parents: 2500
diff changeset
1344 Ibyte *mswindows_read_link (const Ibyte *fname);
771
943eaba38521 [xemacs-hg @ 2002-03-13 08:51:24 by ben]
ben
parents: 673
diff changeset
1345
872
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1346 /* in intl-win32.c */
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1347 extern Lisp_Object Qmswindows_tstr, Qmswindows_unicode;
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1348 extern Lisp_Object Qmswindows_multibyte, Qmswindows_multibyte_to_unicode;
79c6ff3eef26 [xemacs-hg @ 2002-06-20 21:18:01 by ben]
ben
parents: 867
diff changeset
1349
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents:
diff changeset
1350 #endif /* INCLUDED_syswindows_h_ */