annotate src/os_dos.h @ 16825:ce04ebdf26b8 v8.1.1414

patch 8.1.1414: alloc() returning "char_u *" causes a lot of type casts commit https://github.com/vim/vim/commit/c799fe206e61f2e2c1231bc46cbe4bb354f3da69 Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 28 23:08:19 2019 +0200 patch 8.1.1414: alloc() returning "char_u *" causes a lot of type casts Problem: Alloc() returning "char_u *" causes a lot of type casts. Solution: Have it return "void *". (Mike Williams) Define ALLOC_ONE() to check the simple allocations.
author Bram Moolenaar <Bram@vim.org>
date Tue, 28 May 2019 23:15:10 +0200
parents 65c29bd4548b
children 6e3dc2d630c2
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: 9669
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 * Common MS-DOS and Win32 (Windows NT and Windows 95) defines.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 * Names for the EXRC, HELP and temporary files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 * Some of these may have been defined in the makefile or feature.h.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 #ifndef SYS_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 # define SYS_VIMRC_FILE "$VIM\\vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 #ifndef USR_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 # define USR_VIMRC_FILE "$HOME\\_vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 #ifndef USR_VIMRC_FILE2
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
23 # define USR_VIMRC_FILE2 "$HOME\\vimfiles\\vimrc"
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
24 #endif
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
25 #ifndef USR_VIMRC_FILE3
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
26 # define USR_VIMRC_FILE3 "$VIM\\_vimrc"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 #endif
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents: 5527
diff changeset
28 #ifndef VIM_DEFAULTS_FILE
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents: 5527
diff changeset
29 # define VIM_DEFAULTS_FILE "$VIMRUNTIME\\defaults.vim"
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents: 5527
diff changeset
30 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 #ifndef EVIM_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 # define EVIM_FILE "$VIMRUNTIME\\evim.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 #ifndef USR_EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 # define USR_EXRC_FILE "$HOME\\_exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 #ifndef USR_EXRC_FILE2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 # define USR_EXRC_FILE2 "$VIM\\_exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 #ifdef FEAT_GUI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 # ifndef SYS_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 # define SYS_GVIMRC_FILE "$VIM\\gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 # ifndef USR_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 # define USR_GVIMRC_FILE "$HOME\\_gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 # ifndef USR_GVIMRC_FILE2
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
50 # define USR_GVIMRC_FILE2 "$HOME\\vimfiles\\gvimrc"
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
51 # endif
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
52 # ifndef USR_GVIMRC_FILE3
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 7
diff changeset
53 # define USR_GVIMRC_FILE3 "$VIM\\_gvimrc"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 # ifndef SYS_MENU_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 # define SYS_MENU_FILE "$VIMRUNTIME\\menu.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 #ifndef SYS_OPTWIN_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 # define SYS_OPTWIN_FILE "$VIMRUNTIME\\optwin.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 #ifdef FEAT_VIMINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 # ifndef VIMINFO_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 # define VIMINFO_FILE "$HOME\\_viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 # ifndef VIMINFO_FILE2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 # define VIMINFO_FILE2 "$VIM\\_viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 #ifndef VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 # define VIMRC_FILE "_vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 #ifndef EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 # define EXRC_FILE "_exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 #ifdef FEAT_GUI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 # ifndef GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 # define GVIMRC_FILE "_gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 #ifndef DFLT_HELPFILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 # define DFLT_HELPFILE "$VIMRUNTIME\\doc\\help.txt"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 #ifndef FILETYPE_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 # define FILETYPE_FILE "filetype.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 #ifndef FTPLUGIN_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 # define FTPLUGIN_FILE "ftplugin.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 #ifndef INDENT_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 # define INDENT_FILE "indent.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 #ifndef FTOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 # define FTOFF_FILE "ftoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 #ifndef FTPLUGOF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 # define FTPLUGOF_FILE "ftplugof.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 #ifndef INDOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 # define INDOFF_FILE "indoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 #ifndef SYNTAX_FNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 # define SYNTAX_FNAME "$VIMRUNTIME\\syntax\\%s.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 #ifndef DFLT_BDIR
5527
af8217e4ed7e updated for version 7.4.112
Bram Moolenaar <bram@vim.org>
parents: 4863
diff changeset
115 # define DFLT_BDIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'backupdir' */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 #ifndef DFLT_VDIR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 # define DFLT_VDIR "$VIM/vimfiles/view" /* default for 'viewdir' */
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 #ifndef DFLT_DIR
5527
af8217e4ed7e updated for version 7.4.112
Bram Moolenaar <bram@vim.org>
parents: 4863
diff changeset
123 # define DFLT_DIR ".,$TEMP,c:\\tmp,c:\\temp" /* default for 'directory' */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 #define DFLT_ERRORFILE "errors.err"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 #define DFLT_RUNTIMEPATH "$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/vimfiles/after"
13361
65c29bd4548b patch 8.0.1554: custom plugins loaded with --clean
Christian Brabandt <cb@256bit.org>
parents: 10042
diff changeset
128 #define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 #define CASE_INSENSITIVE_FILENAME /* ignore case when comparing file names */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 #define SPACE_IN_FILENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 #define BACKSLASH_IN_FILENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 #define USE_CRNL /* lines end in CR-NL instead of NL */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 #define HAVE_DUP /* have dup() */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 #define HAVE_ST_MODE /* have stat.st_mode */