annotate src/os_win32.h @ 9065:3e45c2f5262b

Added tag v7.4.1817 for changeset a86103d4b356cb298869899ee322524652329d1a
author Christian Brabandt <cb@256bit.org>
date Wed, 04 May 2016 22:00:07 +0200
parents cfed0e9f0ca2
children 4aead6a9b7a9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 * Win32 (Windows NT and Windows 95) machine-dependent things.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 #include "os_dos.h" /* common MS-DOS and Win32 stuff */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 #ifndef __CYGWIN__
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
15 /* cproto fails on missing include files */
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
16 # ifndef PROTO
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
17 # include <direct.h> /* for _mkdir() */
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
18 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
638
593092a5362b updated for version 7.0185
vimboss
parents: 377
diff changeset
21 /* Stop the VC2005 compiler from nagging. */
593092a5362b updated for version 7.0185
vimboss
parents: 377
diff changeset
22 #if _MSC_VER >= 1400
593092a5362b updated for version 7.0185
vimboss
parents: 377
diff changeset
23 # define _CRT_SECURE_NO_DEPRECATE
593092a5362b updated for version 7.0185
vimboss
parents: 377
diff changeset
24 # define _CRT_NONSTDC_NO_DEPRECATE
593092a5362b updated for version 7.0185
vimboss
parents: 377
diff changeset
25 #endif
593092a5362b updated for version 7.0185
vimboss
parents: 377
diff changeset
26
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 #define BINARY_FILE_IO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 #define USE_EXE_NAME /* use argv[0] for $VIM */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 #define SYNC_DUP_CLOSE /* sync() a file with dup() and close() */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 #define USE_TERM_CONSOLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 #ifndef HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 # define HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 #endif
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 638
diff changeset
34 #ifndef HAVE_MATH_H
73fe8baea242 updated for version 7.2a
vimboss
parents: 638
diff changeset
35 # define HAVE_MATH_H
73fe8baea242 updated for version 7.2a
vimboss
parents: 638
diff changeset
36 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 #define HAVE_STRCSPN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 #ifndef __GNUC__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 #define HAVE_STRICMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 #define HAVE_STRNICMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 #ifndef HAVE_STRFTIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 # define HAVE_STRFTIME /* guessed */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 #define HAVE_MEMSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 #ifndef HAVE_LOCALE_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 # define HAVE_LOCALE_H 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 #ifndef HAVE_FCNTL_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 # define HAVE_FCNTL_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 #define HAVE_QSORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 #define HAVE_ST_MODE /* have stat.st_mode */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 #define FEAT_SHORTCUT /* resolve shortcuts */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
5049
72fcf674e545 updated for version 7.3.1268
Bram Moolenaar <bram@vim.org>
parents: 4789
diff changeset
57 #if (!defined(__BORLANDC__) || __BORLANDC__ >= 0x550) \
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 && (!defined(_MSC_VER) || _MSC_VER > 1020)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 * Access Control List (actually security info).
5049
72fcf674e545 updated for version 7.3.1268
Bram Moolenaar <bram@vim.org>
parents: 4789
diff changeset
61 * Borland has the acl stuff only in version 5.5 and later.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 * MSVC in 5.0, not in 4.2, don't know about 4.3.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 # define HAVE_ACL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 #define USE_FNAME_CASE /* adjust case of file names */
5735
50dbef5e774a updated for version 7.4.212
Bram Moolenaar <bram@vim.org>
parents: 5376
diff changeset
68 #if !defined(FEAT_CLIPBOARD) && defined(FEAT_MOUSE)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 # define FEAT_CLIPBOARD /* include clipboard support */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 #if defined(__DATE__) && defined(__TIME__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 # define HAVE_DATE_TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 #ifndef FEAT_GUI_W32 /* GUI works different */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 # define BREAKCHECK_SKIP 1 /* call mch_breakcheck() each time, it's fast */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
7460
1420ccc9f610 commit https://github.com/vim/vim/commit/ee2739787f1e996739541bb60e6003b892497e03
Christian Brabandt <cb@256bit.org>
parents: 5735
diff changeset
78 #define HAVE_TOTAL_MEM
1420ccc9f610 commit https://github.com/vim/vim/commit/ee2739787f1e996739541bb60e6003b892497e03
Christian Brabandt <cb@256bit.org>
parents: 5735
diff changeset
79
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 #define HAVE_PUTENV /* at least Bcc 5.2 and MSC have it */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 #ifdef FEAT_GUI_W32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 # define NO_CONSOLE /* don't included console-only code */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 /* toupper() is not really broken, but it's very slow. Probably because of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 * using Unicode characters on Windows NT */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 #define BROKEN_TOUPPER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 #define FNAME_ILLEGAL "\"*?><|" /* illegal characters in a file name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 #include <stdlib.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 #include <time.h>
2241
60da25e3aab7 Correct use of long instead of off_t for file size. (James Vega)
Bram Moolenaar <bram@vim.org>
parents: 1620
diff changeset
94 #include <sys/types.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 #ifndef STRICT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 # define STRICT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 #ifndef COBJMACROS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 # define COBJMACROS /* For OLE: Enable "friendlier" access to objects */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 #endif
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
102 #ifndef PROTO
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
103 # include <windows.h>
5225
8f983df0299f updated for version 7.4a.038
Bram Moolenaar <bram@vim.org>
parents: 5049
diff changeset
104 # ifndef SM_CXPADDEDBORDER
8f983df0299f updated for version 7.4a.038
Bram Moolenaar <bram@vim.org>
parents: 5049
diff changeset
105 # define SM_CXPADDEDBORDER 92
8f983df0299f updated for version 7.4a.038
Bram Moolenaar <bram@vim.org>
parents: 5049
diff changeset
106 # endif
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
107 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 * Win32 has plenty of memory, use large buffers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 #define CMDBUFFSIZE 1024 /* size of the command processing buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3902
d24d309c365f updated for version 7.3.707
Bram Moolenaar <bram@vim.org>
parents: 3010
diff changeset
114 /* _MAX_PATH is only 260 (stdlib.h), but we want more for the 'path' option,
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 * thus use a larger number. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 #define MAXPATHL 1024
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 #ifndef BASENAMELEN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 # define BASENAMELEN (_MAX_PATH - 5) /* length of base of file name */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 #define TEMPNAMELEN _MAX_PATH /* length of temp file name path */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 #ifndef DFLT_MAXMEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 # define DFLT_MAXMEM (2*1024) /* use up to 2 Mbyte for a buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 #ifndef DFLT_MAXMEMTOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 # define DFLT_MAXMEMTOT (5*1024) /* use up to 5 Mbyte for Vim */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
5376
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
132 /*
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
133 * Reparse Point
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
134 */
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
135 #ifndef FILE_ATTRIBUTE_REPARSE_POINT
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
136 # define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
137 #endif
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
138 #ifndef IO_REPARSE_TAG_MOUNT_POINT
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
139 # define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
140 #endif
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
141 #ifndef IO_REPARSE_TAG_SYMLINK
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
142 # define IO_REPARSE_TAG_SYMLINK 0xA000000C
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
143 #endif
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
144
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 #if defined(_MSC_VER) || defined(__BORLANDC__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 /* Support for __try / __except. All versions of MSVC and Borland C are
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 * expected to have this. Any other compilers that support it? */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 # define HAVE_TRY_EXCEPT 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 # include <malloc.h> /* for _resetstkoflw() */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 # if defined(_MSC_VER) && (_MSC_VER >= 1300)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 # define RESETSTKOFLW _resetstkoflw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 # define RESETSTKOFLW myresetstkoflw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 # define MYRESETSTKOFLW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 * Some simple debugging macros that look and behave a lot like their
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 * namesakes in MFC.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 #ifdef _DEBUG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 # if defined(_MSC_VER) && (_MSC_VER >= 1000)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 /* Use the new debugging tools in Visual C++ 4.x */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 # include <crtdbg.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 # define ASSERT(f) _ASSERT(f)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 # include <assert.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 # define ASSERT(f) assert(f)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 # define TRACE Trace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 # define TRACE0(sz) Trace(_T("%s"), _T(sz))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 # define TRACE1(sz, p1) Trace(_T(sz), p1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 # define TRACE2(sz, p1, p2) Trace(_T(sz), p1, p2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 # define TRACE3(sz, p1, p2, p3) Trace(_T(sz), p1, p2, p3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 # define TRACE4(sz, p1, p2, p3, p4) Trace(_T(sz), p1, p2, p3, p4)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 /* In debug version, writes trace messages to debug stream */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 void __cdecl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 Trace(char *pszFormat, ...);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 #else /* !_DEBUG */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 /* These macros should all compile away to nothing */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 # define ASSERT(f) ((void)0)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 # define TRACE 1 ? (void)0 : printf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 # define TRACE0(sz)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 # define TRACE1(sz, p1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 # define TRACE2(sz, p1, p2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 # define TRACE3(sz, p1, p2, p3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 # define TRACE4(sz, p1, p2, p3, p4)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196 #endif /* !_DEBUG */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 #define ASSERT_POINTER(p, type) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 ASSERT(((p) != NULL) && IsValidAddress((p), sizeof(type), FALSE))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 #define ASSERT_NULL_OR_POINTER(p, type) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 ASSERT(((p) == NULL) || IsValidAddress((p), sizeof(type), FALSE))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 #define mch_setenv(name, val, x) setenv(name, val, x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 #define mch_getenv(x) (char_u *)getenv((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 #ifdef __BORLANDC__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 # define vim_mkdir(x, y) mkdir(x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 #else
2803
66f2d62271fe updated for version 7.3.177
Bram Moolenaar <bram@vim.org>
parents: 2241
diff changeset
210 # define vim_mkdir(x, y) mch_mkdir(x)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 #endif
3010
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
212
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
213 #ifndef PROTO
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
214
4352
04736b4030ec updated for version 7.3.925
Bram Moolenaar <bram@vim.org>
parents: 4238
diff changeset
215 /* Enable common dialogs input unicode from IME if possible. */
3010
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
216 #ifdef FEAT_MBYTE
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
217 /* The variables are defined in os_win32.c. */
4238
26e59a39fdd9 updated for version 7.3.870
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
218 extern LRESULT (WINAPI *pDispatchMessage)(CONST MSG *);
3010
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
219 extern BOOL (WINAPI *pGetMessage)(LPMSG, HWND, UINT, UINT);
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
220 extern BOOL (WINAPI *pIsDialogMessage)(HWND, LPMSG);
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
221 extern BOOL (WINAPI *pPeekMessage)(LPMSG, HWND, UINT, UINT, UINT);
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
222 #else
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
223 # define pDispatchMessage DispatchMessage
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
224 # define pGetMessage GetMessage
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
225 # define pIsDialogMessage IsDialogMessage
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
226 # define pPeekMessage PeekMessage
e5b17a5f6516 updated for version 7.3.277
Bram Moolenaar <bram@vim.org>
parents: 2803
diff changeset
227 #endif
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
228
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
229 #endif /* PROTO */