annotate src/os_win32.h @ 32164:673dcbaded32 v9.0.1413

patch 9.0.1413: compiler warning for unused variable Commit: https://github.com/vim/vim/commit/2a003177eb3cee535bb8a384b4b87db13f0486ae Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 17 18:50:48 2023 +0000 patch 9.0.1413: compiler warning for unused variable Problem: Compiler warning for unused variable. Solution: Move variable declaration. (John Marriott)
author Bram Moolenaar <Bram@vim.org>
date Fri, 17 Mar 2023 20:00:06 +0100
parents bf4f25d50fdd
children c0b3e3c7786c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10042
4aead6a9b7a9 commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents: 7838
diff changeset
1 /* vi:set ts=8 sts=4 sw=4 noet:
7
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
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
13 #include "os_dos.h" // common MS-DOS and Win32 stuff
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
14 // cproto fails on missing include files
27533
4f1c67a5f446 patch 8.2.4294: MS-Windows: #ifdefs for Cygwin are too complicated
Bram Moolenaar <Bram@vim.org>
parents: 27342
diff changeset
15 #ifndef PROTO
4f1c67a5f446 patch 8.2.4294: MS-Windows: #ifdefs for Cygwin are too complicated
Bram Moolenaar <Bram@vim.org>
parents: 27342
diff changeset
16 # include <direct.h> // for _mkdir()
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 #define BINARY_FILE_IO
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
20 #define USE_EXE_NAME // use argv[0] for $VIM
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 #define USE_TERM_CONSOLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 #ifndef HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 # define HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 #endif
1620
73fe8baea242 updated for version 7.2a
vimboss
parents: 638
diff changeset
25 #ifndef HAVE_MATH_H
73fe8baea242 updated for version 7.2a
vimboss
parents: 638
diff changeset
26 # define HAVE_MATH_H
73fe8baea242 updated for version 7.2a
vimboss
parents: 638
diff changeset
27 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 #define HAVE_STRCSPN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 #ifndef __GNUC__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 #define HAVE_STRICMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 #define HAVE_STRNICMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 #ifndef HAVE_STRFTIME
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
34 # define HAVE_STRFTIME // guessed
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 #define HAVE_MEMSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 #ifndef HAVE_LOCALE_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 # define HAVE_LOCALE_H 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 #ifndef HAVE_FCNTL_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 # define HAVE_FCNTL_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 #define HAVE_QSORT
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
44 #define HAVE_ST_MODE // have stat.st_mode
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
46 #define FEAT_SHORTCUT // resolve shortcuts
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
27342
41a940219183 patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful
Bram Moolenaar <Bram@vim.org>
parents: 27283
diff changeset
48 // Access Control List (actually security info).
41a940219183 patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful
Bram Moolenaar <Bram@vim.org>
parents: 27283
diff changeset
49 #define HAVE_ACL
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
51 #define USE_FNAME_CASE // adjust case of file names
18354
9f51d0cef8da patch 8.1.2171: mouse support not always available
Bram Moolenaar <Bram@vim.org>
parents: 16606
diff changeset
52 #if !defined(FEAT_CLIPBOARD)
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
53 # define FEAT_CLIPBOARD // include clipboard support
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 #if defined(__DATE__) && defined(__TIME__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 # define HAVE_DATE_TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 #endif
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
58 #ifndef FEAT_GUI_MSWIN // GUI works different
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
59 # define BREAKCHECK_SKIP 1 // call mch_breakcheck() each time, it's fast
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
7460
1420ccc9f610 commit https://github.com/vim/vim/commit/ee2739787f1e996739541bb60e6003b892497e03
Christian Brabandt <cb@256bit.org>
parents: 5735
diff changeset
62 #define HAVE_TOTAL_MEM
1420ccc9f610 commit https://github.com/vim/vim/commit/ee2739787f1e996739541bb60e6003b892497e03
Christian Brabandt <cb@256bit.org>
parents: 5735
diff changeset
63
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
64 #define HAVE_PUTENV // at least Bcc 5.2 and MSC have it
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
16451
7ae2396cef62 patch 8.1.1230: a lot of code is shared between vim.exe and gvim.exe
Bram Moolenaar <Bram@vim.org>
parents: 15868
diff changeset
66 #if defined(FEAT_GUI_MSWIN) && !defined(VIMDLL)
26771
fc859aea8cec patch 8.2.3914: various spelling mistakes in comments
Bram Moolenaar <Bram@vim.org>
parents: 19376
diff changeset
67 # define NO_CONSOLE // don't include console-only code
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
70 // toupper() is not really broken, but it's very slow. Probably because of
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
71 // using Unicode characters on Windows NT
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 #define BROKEN_TOUPPER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
74 #define FNAME_ILLEGAL "\"*?><|" // illegal characters in a file name
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
14597
27e814e21594 patch 8.1.0312: wrong type for flags used in signal handlers
Christian Brabandt <cb@256bit.org>
parents: 10781
diff changeset
76 #include <signal.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 #include <stdlib.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 #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
79 #include <sys/types.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 #ifndef STRICT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 # define STRICT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 #ifndef COBJMACROS
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
85 # define COBJMACROS // For OLE: Enable "friendlier" access to objects
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 #endif
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
87 #ifndef PROTO
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
88 # include <windows.h>
30894
bf4f25d50fdd patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy
Bram Moolenaar <Bram@vim.org>
parents: 29105
diff changeset
89
bf4f25d50fdd patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy
Bram Moolenaar <Bram@vim.org>
parents: 29105
diff changeset
90 // Weird: rpcndr.h defines "small" to "char", which causes trouble
bf4f25d50fdd patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy
Bram Moolenaar <Bram@vim.org>
parents: 29105
diff changeset
91 #undef small
bf4f25d50fdd patch 9.0.0781: workaround to rename "small" to "smallfont" is clumsy
Bram Moolenaar <Bram@vim.org>
parents: 29105
diff changeset
92
5225
8f983df0299f updated for version 7.4a.038
Bram Moolenaar <bram@vim.org>
parents: 5049
diff changeset
93 # ifndef SM_CXPADDEDBORDER
8f983df0299f updated for version 7.4a.038
Bram Moolenaar <bram@vim.org>
parents: 5049
diff changeset
94 # define SM_CXPADDEDBORDER 92
8f983df0299f updated for version 7.4a.038
Bram Moolenaar <bram@vim.org>
parents: 5049
diff changeset
95 # endif
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 3902
diff changeset
96 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 * Win32 has plenty of memory, use large buffers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 */
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
101 #define CMDBUFFSIZE 1024 // size of the command processing buffer
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
103 // _MAX_PATH is only 260 (stdlib.h), but we want more for the 'path' option,
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
104 // thus use a larger number.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 #define MAXPATHL 1024
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 #ifndef BASENAMELEN
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
108 # define BASENAMELEN (_MAX_PATH - 5) // length of base of file name
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
111 #define TEMPNAMELEN _MAX_PATH // length of temp file name path
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 #ifndef DFLT_MAXMEM
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
114 # define DFLT_MAXMEM (2*1024) // use up to 2 Mbyte for a buffer
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 #ifndef DFLT_MAXMEMTOT
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
118 # define DFLT_MAXMEMTOT (5*1024) // use up to 5 Mbyte for Vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
5376
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
121 /*
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
122 * Reparse Point
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
123 */
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
124 #ifndef FILE_ATTRIBUTE_REPARSE_POINT
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
125 # define FILE_ATTRIBUTE_REPARSE_POINT 0x00000400
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
126 #endif
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
127 #ifndef IO_REPARSE_TAG_MOUNT_POINT
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
128 # define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
129 #endif
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
130 #ifndef IO_REPARSE_TAG_SYMLINK
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
131 # define IO_REPARSE_TAG_SYMLINK 0xA000000C
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
132 #endif
28702
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
133 #ifndef IO_REPARSE_TAG_APPEXECLINK
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
134 # define IO_REPARSE_TAG_APPEXECLINK 0x8000001B
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
135 #endif
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
136
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
137 /*
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
138 * Definition of the reparse point buffer.
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
139 * This is usually defined in the DDK, copy the definition here to avoid
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
140 * adding it as a dependence only for a single structure.
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
141 */
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
142 typedef struct _REPARSE_DATA_BUFFER {
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
143 ULONG ReparseTag;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
144 USHORT ReparseDataLength;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
145 USHORT Reserved;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
146 union {
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
147 struct {
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
148 USHORT SubstituteNameOffset;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
149 USHORT SubstituteNameLength;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
150 USHORT PrintNameOffset;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
151 USHORT PrintNameLength;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
152 ULONG Flags;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
153 WCHAR PathBuffer[1];
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
154 } SymbolicLinkReparseBuffer;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
155 struct {
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
156 USHORT SubstituteNameOffset;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
157 USHORT SubstituteNameLength;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
158 USHORT PrintNameOffset;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
159 USHORT PrintNameLength;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
160 WCHAR PathBuffer[1];
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
161 } MountPointReparseBuffer;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
162 struct {
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
163 UCHAR DataBuffer[1];
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
164 } GenericReparseBuffer;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
165 struct
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
166 {
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
167 ULONG StringCount;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
168 WCHAR StringList[1];
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
169 } AppExecLinkReparseBuffer;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
170 } DUMMYUNIONNAME;
99729fe344f7 patch 8.2.4875: MS-Windows: some .exe files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27533
diff changeset
171 } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
5376
4dfba3df303c updated for version 7.4.039
Bram Moolenaar <bram@vim.org>
parents: 5225
diff changeset
172
27342
41a940219183 patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful
Bram Moolenaar <Bram@vim.org>
parents: 27283
diff changeset
173 #ifdef _MSC_VER
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
174 // Support for __try / __except. All versions of MSVC are
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
175 // expected to have this. Any other compilers that support it?
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 # define HAVE_TRY_EXCEPT 1
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
177 # include <malloc.h> // for _resetstkoflw()
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 * Some simple debugging macros that look and behave a lot like their
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 * namesakes in MFC.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 #ifdef _DEBUG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
27342
41a940219183 patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful
Bram Moolenaar <Bram@vim.org>
parents: 27283
diff changeset
187 # include <crtdbg.h>
41a940219183 patch 8.2.4199: MS-Windows: Support for MSVC 2003 is not useful
Bram Moolenaar <Bram@vim.org>
parents: 27283
diff changeset
188 # define ASSERT(f) _ASSERT(f)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 # define TRACE Trace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 # define TRACE0(sz) Trace(_T("%s"), _T(sz))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 # define TRACE1(sz, p1) Trace(_T(sz), p1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 # define TRACE2(sz, p1, p2) Trace(_T(sz), p1, p2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 # define TRACE3(sz, p1, p2, p3) Trace(_T(sz), p1, p2, p3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 # define TRACE4(sz, p1, p2, p3, p4) Trace(_T(sz), p1, p2, p3, p4)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
197 // In debug version, writes trace messages to debug stream
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 void __cdecl
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 Trace(char *pszFormat, ...);
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
201 #else // !_DEBUG
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
203 // These macros should all compile away to nothing
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 # define ASSERT(f) ((void)0)
29105
faf7fcd1c8d5 patch 8.2.5073: clang on MS-Windows produces warnings
Bram Moolenaar <Bram@vim.org>
parents: 28702
diff changeset
205 # define TRACE 1 ? (void)0 : (void)printf
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206 # define TRACE0(sz)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 # define TRACE1(sz, p1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 # define TRACE2(sz, p1, p2)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 # define TRACE3(sz, p1, p2, p3)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 # define TRACE4(sz, p1, p2, p3, p4)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18354
diff changeset
212 #endif // !_DEBUG
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 #define ASSERT_POINTER(p, type) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 ASSERT(((p) != NULL) && IsValidAddress((p), sizeof(type), FALSE))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 #define ASSERT_NULL_OR_POINTER(p, type) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 ASSERT(((p) == NULL) || IsValidAddress((p), sizeof(type), FALSE))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
10781
c96534dd2b2f patch 8.0.0280: problem setting multi-byte environment var on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 10264
diff changeset
221 #ifndef HAVE_SETENV
c96534dd2b2f patch 8.0.0280: problem setting multi-byte environment var on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 10264
diff changeset
222 # define HAVE_SETENV
c96534dd2b2f patch 8.0.0280: problem setting multi-byte environment var on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 10264
diff changeset
223 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 #define mch_getenv(x) (char_u *)getenv((char *)(x))
16606
7e733046db1d patch 8.1.1306: Borland support is outdated and doesn't work
Bram Moolenaar <Bram@vim.org>
parents: 16451
diff changeset
225 #define vim_mkdir(x, y) mch_mkdir(x)