annotate src/os_unix.h @ 29555:72a842b8f99f

Added tag v9.0.0118 for changeset d413dccd4f8a1ba5fbfe67c1da913e59c8d8a2c5
author Bram Moolenaar <Bram@vim.org>
date Sun, 31 Jul 2022 12:45:06 +0200
parents 1690417aeafe
children 3276298c67c5
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 * NextStep has a problem with configure, undefine a few things:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 #ifdef NeXT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 # ifdef HAVE_UTIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 # undef HAVE_UTIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 # ifdef HAVE_SYS_UTSNAME_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 # undef HAVE_SYS_UTSNAME_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 #include <stdio.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 #include <ctype.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 #ifdef VAXC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 # include <types.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 # include <stat.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 # include <sys/types.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 # include <sys/stat.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 #ifdef HAVE_STDLIB_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 # include <stdlib.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
15963
2d8fa45b341d patch 8.1.0987: unnecessary condition in #ifdef
Bram Moolenaar <Bram@vim.org>
parents: 15205
diff changeset
36 #ifdef __CYGWIN__
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
37 # define WIN32UNIX // Compiling for Win32 using Unix files.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 # define BINARY_FILE_IO
585
c10855f07ab0 updated for version 7.0166
vimboss
parents: 7
diff changeset
39
c10855f07ab0 updated for version 7.0166
vimboss
parents: 7
diff changeset
40 # define CASE_INSENSITIVE_FILENAME
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
41 # define USE_FNAME_CASE // Fix filename case differences.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
44 // On AIX 4.2 there is a conflicting prototype for ioctl() in stropts.h and
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
45 // unistd.h. This hack should fix that (suggested by Jeff George).
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
46 // But on AIX 4.3 it's alright (suggested by Jake Hamby).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 #if defined(FEAT_GUI) && defined(_AIX) && !defined(_AIX43) && !defined(_NO_PROTO)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 # define _NO_PROTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 #ifdef HAVE_UNISTD_H
1879
e8eeeff19eae updated for version 7.2-176
vimboss
parents: 1877
diff changeset
52 # include <unistd.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 #ifdef HAVE_LIBC_H
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
56 # include <libc.h> // for NeXT
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 #ifdef HAVE_SYS_PARAM_H
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
60 # include <sys/param.h> // defines BSD, if it's a BSD system
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 * Using getcwd() is preferred, because it checks for a buffer overflow.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 * Don't use getcwd() on systems do use system("sh -c pwd"). There is an
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 * autoconf check for this.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 * Use getcwd() anyway if getwd() isn't present.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 #if defined(HAVE_GETCWD) && !(defined(BAD_GETCWD) && defined(HAVE_GETWD))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 # define USE_GETCWD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
73 // always use unlink() to remove files
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 #ifndef PROTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 # ifdef VMS
23503
49d866e9b439 patch 8.2.2294: VMS: a few remaining problems
Bram Moolenaar <Bram@vim.org>
parents: 23408
diff changeset
76 # define vim_mkdir(x, y) mkdir((char *)vms_fixfilename(x), y)
49d866e9b439 patch 8.2.2294: VMS: a few remaining problems
Bram Moolenaar <Bram@vim.org>
parents: 23408
diff changeset
77 # define mch_rmdir(x) delete((char *)vms_fixfilename(x))
49d866e9b439 patch 8.2.2294: VMS: a few remaining problems
Bram Moolenaar <Bram@vim.org>
parents: 23408
diff changeset
78 # define mch_remove(x) delete((char *)vms_fixfilename(x))
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 # define vim_mkdir(x, y) mkdir((char *)(x), y)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 # define mch_rmdir(x) rmdir((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 # define mch_remove(x) unlink((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
86 // The number of arguments to a signal handler is configured here.
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
87 // It used to be a long list of almost all systems. Any system that doesn't
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
88 // have an argument???
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 #define SIGHASARG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
91 // List 3 arg systems here. I guess __sgi, please test and correct me. jw.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 #if defined(__sgi) && defined(HAVE_SIGCONTEXT)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 # define SIGHAS3ARGS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 #ifdef SIGHASARG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 # ifdef SIGHAS3ARGS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 # define SIGPROTOARG (int, int, struct sigcontext *)
25824
3f5f25f7d8a2 patch 8.2.3447: a couple of declarations are not ANSI C
Bram Moolenaar <Bram@vim.org>
parents: 23503
diff changeset
99 # define SIGDEFARG(s) (int s, int sig2, struct sigcontext *scont)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 # define SIGDUMMYARG 0, 0, (struct sigcontext *)0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 # define SIGPROTOARG (int)
25824
3f5f25f7d8a2 patch 8.2.3447: a couple of declarations are not ANSI C
Bram Moolenaar <Bram@vim.org>
parents: 23503
diff changeset
103 # define SIGDEFARG(s) (int s UNUSED)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 # define SIGDUMMYARG 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 # define SIGPROTOARG (void)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 # define SIGDEFARG(s) ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 # define SIGDUMMYARG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 #ifdef HAVE_DIRENT_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 # include <dirent.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 # ifndef NAMLEN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 # define NAMLEN(dirent) strlen((dirent)->d_name)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 # define dirent direct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 # define NAMLEN(dirent) (dirent)->d_namlen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 # if HAVE_SYS_NDIR_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 # include <sys/ndir.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 # if HAVE_SYS_DIR_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 # include <sys/dir.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 # if HAVE_NDIR_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 # include <ndir.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130
29241
1690417aeafe patch 8.2.5139: TIME_WITH_SYS_TIME is no longer supported by autoconf
Bram Moolenaar <Bram@vim.org>
parents: 25824
diff changeset
131 #include <time.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 #ifdef HAVE_SYS_TIME_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 # include <sys/time.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 #include <signal.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 #if defined(DIRSIZ) && !defined(MAXNAMLEN)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 # define MAXNAMLEN DIRSIZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 #if defined(UFS_MAXNAMLEN) && !defined(MAXNAMLEN)
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
143 # define MAXNAMLEN UFS_MAXNAMLEN // for dynix/ptx
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 #if defined(NAME_MAX) && !defined(MAXNAMLEN)
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
147 # define MAXNAMLEN NAME_MAX // for Linux before .99p3
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 * Note: if MAXNAMLEN has the wrong value, you will get error messages
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 * for not being able to open the swap file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 #if !defined(MAXNAMLEN)
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
155 # define MAXNAMLEN 512 // for all other Unix
7
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 #define BASENAMELEN (MAXNAMLEN - 5)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 #ifdef HAVE_PWD_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 # include <pwd.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 #if (defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 || (defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 || defined(HAVE_SYSCTL) || defined(HAVE_SYSCONF)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 # define HAVE_TOTAL_MEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
170
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
171 #ifndef PROTO
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
172
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 #ifdef VMS
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
174 # include <unixio.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
175 # include <unixlib.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
176 # include <signal.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
177 # include <file.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
178 # include <ssdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
179 # include <descrip.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
180 # include <libclidef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
181 # include <lnmdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
182 # include <psldef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
183 # include <prvdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
184 # include <dvidef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
185 # include <dcdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
186 # include <stsdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
187 # include <iodef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
188 # include <ttdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
189 # include <tt2def.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
190 # include <jpidef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
191 # include <rms.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
192 # include <trmdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
193 # include <string.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
194 # include <starlet.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
195 # include <socket.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
196 # include <lib$routines.h>
5541
2f99966971b0 updated for version 7.4.119
Bram Moolenaar <bram@vim.org>
parents: 4863
diff changeset
197 # include <libdef.h>
2f99966971b0 updated for version 7.4.119
Bram Moolenaar <bram@vim.org>
parents: 4863
diff changeset
198 # include <libdtdef.h>
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
199
23408
bdda90ed5f6c patch 8.2.2247: VMS: various smaller problems
Bram Moolenaar <Bram@vim.org>
parents: 20311
diff changeset
200 # if defined(FEAT_GUI_MOTIF)
bdda90ed5f6c patch 8.2.2247: VMS: various smaller problems
Bram Moolenaar <Bram@vim.org>
parents: 20311
diff changeset
201 # define XFree XFREE
bdda90ed5f6c patch 8.2.2247: VMS: various smaller problems
Bram Moolenaar <Bram@vim.org>
parents: 20311
diff changeset
202 # define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
203 # endif
23408
bdda90ed5f6c patch 8.2.2247: VMS: various smaller problems
Bram Moolenaar <Bram@vim.org>
parents: 20311
diff changeset
204 #endif // VMS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205
20311
05b4efb062a7 patch 8.2.0711: temp directory might be cleared
Bram Moolenaar <Bram@vim.org>
parents: 19526
diff changeset
206 #ifdef HAVE_FLOCK
05b4efb062a7 patch 8.2.0711: temp directory might be cleared
Bram Moolenaar <Bram@vim.org>
parents: 19526
diff changeset
207 # include <sys/file.h>
05b4efb062a7 patch 8.2.0711: temp directory might be cleared
Bram Moolenaar <Bram@vim.org>
parents: 19526
diff changeset
208 #endif
05b4efb062a7 patch 8.2.0711: temp directory might be cleared
Bram Moolenaar <Bram@vim.org>
parents: 19526
diff changeset
209
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
210 #endif // PROTO
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
211
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
212 #ifdef VMS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 typedef struct dsc$descriptor DESC;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
216 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
217 * Unix system-dependent file names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 #ifndef SYS_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220 # define SYS_VIMRC_FILE "$VIM/vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 #ifndef SYS_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 # define SYS_GVIMRC_FILE "$VIM/gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 #ifndef DFLT_HELPFILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 #ifndef FILETYPE_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 # define FILETYPE_FILE "filetype.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 #ifndef FTPLUGIN_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 # define FTPLUGIN_FILE "ftplugin.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 #ifndef INDENT_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 # define INDENT_FILE "indent.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 #ifndef FTOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 # define FTOFF_FILE "ftoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240 #ifndef FTPLUGOF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 # define FTPLUGOF_FILE "ftplugof.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 #ifndef INDOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 # define INDOFF_FILE "indoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 #ifndef SYS_MENU_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 #ifndef USR_EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 # define USR_EXRC_FILE "sys$login:.exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 # define USR_EXRC_FILE "$HOME/.exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 #if !defined(USR_EXRC_FILE2) && defined(VMS)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 # define USR_EXRC_FILE2 "sys$login:_exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 #ifndef USR_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 # define USR_VIMRC_FILE "sys$login:.vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 # define USR_VIMRC_FILE "$HOME/.vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
270
6783
56e121fd109b patch 7.4.713
Bram Moolenaar <bram@vim.org>
parents: 6737
diff changeset
271 #if !defined(USR_VIMRC_FILE2)
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
272 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
273 # define USR_VIMRC_FILE2 "sys$login:vimfiles/vimrc"
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
274 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
275 # define USR_VIMRC_FILE2 "~/.vim/vimrc"
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
276 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 #endif
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
278
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
279 #if !defined(USR_VIMRC_FILE3) && defined(VMS)
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
280 # define USR_VIMRC_FILE3 "sys$login:_vimrc"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
281 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
282
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
283 #ifndef USR_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
284 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 # define USR_GVIMRC_FILE "sys$login:.gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 # define USR_GVIMRC_FILE "$HOME/.gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
291 #ifndef USR_GVIMRC_FILE2
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
292 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
293 # define USR_GVIMRC_FILE2 "sys$login:vimfiles/gvimrc"
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
294 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
295 # define USR_GVIMRC_FILE2 "~/.vim/gvimrc"
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
296 # endif
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
297 #endif
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
298
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 #ifdef VMS
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
300 # ifndef USR_GVIMRC_FILE3
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
301 # define USR_GVIMRC_FILE3 "sys$login:_gvimrc"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304
9669
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents: 9536
diff changeset
305 #ifndef VIM_DEFAULTS_FILE
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents: 9536
diff changeset
306 # define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents: 9536
diff changeset
307 #endif
284b4eb307fc commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents: 9536
diff changeset
308
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
309 #ifndef EVIM_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
310 # define EVIM_FILE "$VIMRUNTIME/evim.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313 #ifdef FEAT_VIMINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 # ifndef VIMINFO_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 # define VIMINFO_FILE "sys$login:.viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 # define VIMINFO_FILE "$HOME/.viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 # if !defined(VIMINFO_FILE2) && defined(VMS)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 # define VIMINFO_FILE2 "sys$login:_viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 #ifndef EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 # define EXRC_FILE ".exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330 #ifndef VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 # define VIMRC_FILE ".vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334 #ifdef FEAT_GUI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 # ifndef GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 # define GVIMRC_FILE ".gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 #ifndef SYNTAX_FNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 # define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344 #ifndef DFLT_BDIR
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
345 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
346 # define DFLT_BDIR "./,sys$login:,tmp:"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 # else
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
348 # define DFLT_BDIR ".,~/tmp,~/" // default for 'backupdir'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
350 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
351
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 #ifndef DFLT_DIR
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
353 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
354 # define DFLT_DIR "./,sys$login:,tmp:"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 # else
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
356 # define DFLT_DIR ".,~/tmp,/var/tmp,/tmp" // default for 'directory'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
358 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
359
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 #ifndef DFLT_VDIR
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
361 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
362 # define DFLT_VDIR "sys$login:vimfiles/view"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 # else
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
364 # define DFLT_VDIR "$HOME/.vim/view" // default for 'viewdir'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
366 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
367
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 #define DFLT_ERRORFILE "errors.err"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
369
19526
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
370 #ifndef DFLT_RUNTIMEPATH
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
371
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
372 # ifdef VMS
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
373 # define DFLT_RUNTIMEPATH "sys$login:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,sys$login:vimfiles/after"
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
374 # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
375 # else
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
376 # ifdef RUNTIME_GLOBAL
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
377 # ifdef RUNTIME_GLOBAL_AFTER
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
378 # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER ",~/.vim/after"
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
379 # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL_AFTER
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
380 # else
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
381 # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
382 # define CLEAN_RUNTIMEPATH RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after"
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
383 # endif
15205
54d2905bd5ab patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents: 14509
diff changeset
384 # else
19526
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
385 # define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
386 # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
15205
54d2905bd5ab patch 8.1.0612: cannot use two global runtime dirs with configure
Bram Moolenaar <Bram@vim.org>
parents: 14509
diff changeset
387 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
388 # endif
19526
22f0dda71638 patch 8.2.0320: no Haiku support
Bram Moolenaar <Bram@vim.org>
parents: 18753
diff changeset
389
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
390 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
392 #ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
393 # ifndef VAX
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
394 # define VMS_TEMPNAM // to fix default .LIS extension
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
395 # endif
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
396 # define TEMPNAME "TMP:v?XXXXXX.txt"
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
397 # define TEMPNAMELEN 28
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398 #else
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
399 // Try several directories to put the temp files.
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
400 # define TEMPDIRNAMES "$TMPDIR", "/tmp", ".", "$HOME"
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
401 # define TEMPNAMELEN 256
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
404 // Special wildcards that need to be handled by the shell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 #define SPECIAL_WILDCHAR "`'{"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
408 * Unix has plenty of memory, use large buffers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
409 */
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
410 #define CMDBUFFSIZE 1024 // size of the command processing buffer
1611
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
411
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
412 // Use the system path length if it makes sense.
1611
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
413 #if defined(PATH_MAX) && (PATH_MAX > 1000)
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
414 # define MAXPATHL PATH_MAX
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
415 #else
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
416 # define MAXPATHL 1024
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
417 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
419 #define CHECK_INODE // used when checking if a swap file already
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
420 // exists for a file
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
421 #ifdef VMS // Use less memory because of older systems
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 # ifndef DFLT_MAXMEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 # define DFLT_MAXMEM (2*1024)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 # ifndef DFLT_MAXMEMTOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 # define DFLT_MAXMEMTOT (5*1024)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 # ifndef DFLT_MAXMEM
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
430 # define DFLT_MAXMEM (5*1024) // use up to 5 Mbyte for a buffer
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 # ifndef DFLT_MAXMEMTOT
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
433 # define DFLT_MAXMEMTOT (10*1024) // use up to 10 Mbyte for Vim
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
437 // memmove() is not present on all systems, use memmove, bcopy or memcpy.
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
438 // Some systems have (void *) arguments, some (char *). If we use (char *) it
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
439 // works for all
10702
24a1fbd78b76 patch 8.0.0241: fallback implementation of mch_memmove is unused
Christian Brabandt <cb@256bit.org>
parents: 10328
diff changeset
440 #if defined(USEMEMMOVE) || (!defined(USEBCOPY) && !defined(USEMEMCPY))
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 # define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 # ifdef USEBCOPY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 # define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 # else
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
446 // ifdef USEMEMCPY
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 # define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
448 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
449 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
450
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451 #ifndef PROTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 # ifdef HAVE_RENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 # define mch_rename(src, dst) rename(src, dst)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454 # else
7807
1a5d34492798 commit https://github.com/vim/vim/commit/d99df423c559d85c17779b3685426c489554908c
Christian Brabandt <cb@256bit.org>
parents: 7598
diff changeset
455 int mch_rename(const char *src, const char *dest);
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 # ifndef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 # ifdef __MVS__
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
459 // on OS390 Unix getenv() doesn't return a pointer to persistent
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
460 // storage -> use __getenv()
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 # define mch_getenv(x) (char_u *)__getenv((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463 # define mch_getenv(x) (char_u *)getenv((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 # define mch_setenv(name, val, x) setenv(name, val, x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
469 // Note: Some systems need both string.h and strings.h (Savage). However,
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
470 // some systems can't handle both, only use string.h in that case.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 #ifdef HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 # include <string.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 #if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 # include <strings.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 #if defined(HAVE_SETJMP_H)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 # include <setjmp.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 # ifdef HAVE_SIGSETJMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 # define JMP_BUF sigjmp_buf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 # define SETJMP(x) sigsetjmp((x), 1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 # define LONGJMP siglongjmp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
485 # define JMP_BUF jmp_buf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
486 # define SETJMP(x) setjmp(x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
487 # define LONGJMP longjmp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490
5743
bf1775553d3b updated for version 7.4.216
Bram Moolenaar <bram@vim.org>
parents: 5704
diff changeset
491 #ifndef HAVE_DUP
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
492 # define HAVE_DUP // have dup()
5743
bf1775553d3b updated for version 7.4.216
Bram Moolenaar <bram@vim.org>
parents: 5704
diff changeset
493 #endif
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
494 #define HAVE_ST_MODE // have stat.st_mode
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495
18753
6e3dc2d630c2 patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents: 18705
diff changeset
496 // We have three kinds of ACL support.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497 #define HAVE_ACL (HAVE_POSIX_ACL || HAVE_SOLARIS_ACL || HAVE_AIX_ACL)