annotate src/os_unix.h @ 7625:b4384c581806 v7.4.1112

commit https://github.com/vim/vim/commit/2db5c3b3ceeaded7fb5a64dc5cb22b0cb95b78a1 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 16 22:49:34 2016 +0100 patch 7.4.1112 Problem: When using ":next" with an illegal file name no error is reported. Solution: Give an error message.
author Christian Brabandt <cb@256bit.org>
date Sat, 16 Jan 2016 23:00:05 +0100
parents 1a528724f9d6
children 1a5d34492798
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 *
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 * 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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 #ifdef __EMX__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 # define HAVE_TOTAL_MEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 #if defined(__CYGWIN__) || defined(__CYGWIN32__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 # define WIN32UNIX /* Compiling for Win32 using Unix files. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 # define BINARY_FILE_IO
585
c10855f07ab0 updated for version 7.0166
vimboss
parents: 7
diff changeset
43
c10855f07ab0 updated for version 7.0166
vimboss
parents: 7
diff changeset
44 # define CASE_INSENSITIVE_FILENAME
c10855f07ab0 updated for version 7.0166
vimboss
parents: 7
diff changeset
45 # define USE_FNAME_CASE /* Fix filename case differences. */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 /* On AIX 4.2 there is a conflicting prototype for ioctl() in stropts.h and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 * unistd.h. This hack should fix that (suggested by Jeff George).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 * But on AIX 4.3 it's alright (suggested by Jake Hamby). */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 #if defined(FEAT_GUI) && defined(_AIX) && !defined(_AIX43) && !defined(_NO_PROTO)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 # define _NO_PROTO
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_UNISTD_H
1879
e8eeeff19eae updated for version 7.2-176
vimboss
parents: 1877
diff changeset
56 # include <unistd.h>
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_LIBC_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 # include <libc.h> /* for NeXT */
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 #ifdef HAVE_SYS_PARAM_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 # include <sys/param.h> /* defines BSD, if it's a BSD system */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 * Using getcwd() is preferred, because it checks for a buffer overflow.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 * 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
70 * autoconf check for this.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 * Use getcwd() anyway if getwd() isn't present.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 #if defined(HAVE_GETCWD) && !(defined(BAD_GETCWD) && defined(HAVE_GETWD))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 # define USE_GETCWD
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 __ARGS
7598
1a528724f9d6 commit https://github.com/vim/vim/commit/b7604cc19fa1db6a8182546bf662aa13d4574d7a
Christian Brabandt <cb@256bit.org>
parents: 7408
diff changeset
78 # define __ARGS(x) x
7
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 /* always use unlink() to remove files */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 #ifndef PROTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 # define mch_remove(x) delete((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 # define vim_mkdir(x, y) mkdir((char *)(x), y)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 # ifdef VAX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 # define mch_rmdir(x) rmdir((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 # define vim_mkdir(x, y) mkdir((char *)(x), y)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 # define mch_rmdir(x) rmdir((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 # define mch_remove(x) unlink((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 /* The number of arguments to a signal handler is configured here. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 /* It used to be a long list of almost all systems. Any system that doesn't
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 * have an argument??? */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 #define SIGHASARG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 /* List 3 arg systems here. I guess __sgi, please test and correct me. jw. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 #if defined(__sgi) && defined(HAVE_SIGCONTEXT)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 # define SIGHAS3ARGS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 #ifdef SIGHASARG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 # ifdef SIGHAS3ARGS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 # define SIGPROTOARG (int, int, struct sigcontext *)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 # define SIGDEFARG(s) (s, sig2, scont) int s, sig2; struct sigcontext *scont;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 # define SIGDUMMYARG 0, 0, (struct sigcontext *)0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 # define SIGPROTOARG (int)
1877
b5c1cb6f8d56 updated for version 7.2-174
vimboss
parents: 1869
diff changeset
114 # define SIGDEFARG(s) (s) int s UNUSED;
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 # define SIGDUMMYARG 0
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 SIGPROTOARG (void)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 # define SIGDEFARG(s) ()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 # define SIGDUMMYARG
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 #ifdef HAVE_DIRENT_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 # include <dirent.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 # ifndef NAMLEN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 # define NAMLEN(dirent) strlen((dirent)->d_name)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 # define dirent direct
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 # define NAMLEN(dirent) (dirent)->d_namlen
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 # if HAVE_SYS_NDIR_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 # include <sys/ndir.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 # if HAVE_SYS_DIR_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 # include <sys/dir.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 # if HAVE_NDIR_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 # include <ndir.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 # endif
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(HAVE_SYS_TIME_H) || defined(TIME_WITH_SYS_TIME)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 # include <time.h> /* on some systems time.h should not be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 included together with sys/time.h */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 #ifdef HAVE_SYS_TIME_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 # include <sys/time.h>
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 #include <signal.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 #if defined(DIRSIZ) && !defined(MAXNAMLEN)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 # define MAXNAMLEN DIRSIZ
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 #if defined(UFS_MAXNAMLEN) && !defined(MAXNAMLEN)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 # define MAXNAMLEN UFS_MAXNAMLEN /* for dynix/ptx */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 #if defined(NAME_MAX) && !defined(MAXNAMLEN)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 # define MAXNAMLEN NAME_MAX /* for Linux before .99p3 */
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 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 * Note: if MAXNAMLEN has the wrong value, you will get error messages
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 * for not being able to open the swap file.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 #if !defined(MAXNAMLEN)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 # define MAXNAMLEN 512 /* for all other Unix */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 #define BASENAMELEN (MAXNAMLEN - 5)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 #ifdef HAVE_PWD_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 # include <pwd.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 #if (defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_GETRLIMIT)) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 || (defined(HAVE_SYS_SYSINFO_H) && defined(HAVE_SYSINFO)) \
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 || defined(HAVE_SYSCTL) || defined(HAVE_SYSCONF)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 # define HAVE_TOTAL_MEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
184
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
185 #ifndef PROTO
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
186
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 #ifdef VMS
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
188 # include <unixio.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
189 # include <unixlib.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
190 # include <signal.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
191 # include <file.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
192 # include <ssdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
193 # include <descrip.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
194 # include <libclidef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
195 # include <lnmdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
196 # include <psldef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
197 # include <prvdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
198 # include <dvidef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
199 # include <dcdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
200 # include <stsdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
201 # include <iodef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
202 # include <ttdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
203 # include <tt2def.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
204 # include <jpidef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
205 # include <rms.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
206 # include <trmdef.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
207 # include <string.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
208 # include <starlet.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
209 # include <socket.h>
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
210 # include <lib$routines.h>
5541
2f99966971b0 updated for version 7.4.119
Bram Moolenaar <bram@vim.org>
parents: 4863
diff changeset
211 # include <libdef.h>
2f99966971b0 updated for version 7.4.119
Bram Moolenaar <bram@vim.org>
parents: 4863
diff changeset
212 # include <libdtdef.h>
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
213
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
214 # ifdef FEAT_GUI_GTK
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
215 # include "gui_gtk_vms.h"
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 585
diff changeset
216 # endif
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
217 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218
3927
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
219 #endif /* PROTO */
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
220
e6d8b44065bc updated for version 7.3.719
Bram Moolenaar <bram@vim.org>
parents: 2715
diff changeset
221 #ifdef VMS
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 typedef struct dsc$descriptor DESC;
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
226 * Unix system-dependent file names
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 #ifndef SYS_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 # define SYS_VIMRC_FILE "$VIM/vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 #ifndef SYS_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 # define SYS_GVIMRC_FILE "$VIM/gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234 #ifndef DFLT_HELPFILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 #ifndef FILETYPE_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238 # define FILETYPE_FILE "filetype.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 FTPLUGIN_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 # define FTPLUGIN_FILE "ftplugin.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 INDENT_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 # define INDENT_FILE "indent.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 FTOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 # define FTOFF_FILE "ftoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 #ifndef FTPLUGOF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 # define FTPLUGOF_FILE "ftplugof.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 #ifndef INDOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 # define INDOFF_FILE "indoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 #ifndef SYS_MENU_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259 #ifndef USR_EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 # define USR_EXRC_FILE "sys$login:.exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 # define USR_EXRC_FILE "$HOME/.exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
267 #if !defined(USR_EXRC_FILE2) && defined(VMS)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
268 # define USR_EXRC_FILE2 "sys$login:_exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
269 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
271 #ifndef USR_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 # define USR_VIMRC_FILE "sys$login:.vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 # define USR_VIMRC_FILE "$HOME/.vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
276 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
277 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
278
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
279
6783
56e121fd109b patch 7.4.713
Bram Moolenaar <bram@vim.org>
parents: 6737
diff changeset
280 #if !defined(USR_VIMRC_FILE2)
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
281 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
282 # 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
283 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
284 # define USR_VIMRC_FILE2 "~/.vim/vimrc"
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
285 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 #endif
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
287
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
288 #if !defined(USR_VIMRC_FILE3) && defined(VMS)
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
289 # define USR_VIMRC_FILE3 "sys$login:_vimrc"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 #ifndef USR_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 # define USR_GVIMRC_FILE "sys$login:.gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 # define USR_GVIMRC_FILE "$HOME/.gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
300 #ifndef USR_GVIMRC_FILE2
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
301 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
302 # 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
303 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
304 # define USR_GVIMRC_FILE2 "~/.vim/gvimrc"
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
305 # endif
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
306 #endif
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
307
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
308 #ifdef VMS
4863
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
309 # ifndef USR_GVIMRC_FILE3
c4d4f0fc12b9 updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents: 3927
diff changeset
310 # define USR_GVIMRC_FILE3 "sys$login:_gvimrc"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
311 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
312 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
313
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
314 #ifndef EVIM_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
315 # define EVIM_FILE "$VIMRUNTIME/evim.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
316 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
317
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
318 #ifdef FEAT_VIMINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
319 # ifndef VIMINFO_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
320 # ifdef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
321 # define VIMINFO_FILE "sys$login:.viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
322 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
323 # define VIMINFO_FILE "$HOME/.viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
324 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
325 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
326 # if !defined(VIMINFO_FILE2) && defined(VMS)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
327 # define VIMINFO_FILE2 "sys$login:_viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
328 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
329 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
330
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
331 #ifndef EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
332 # define EXRC_FILE ".exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
333 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
334
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
335 #ifndef VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
336 # define VIMRC_FILE ".vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
337 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
338
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
339 #ifdef FEAT_GUI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
340 # ifndef GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
341 # define GVIMRC_FILE ".gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
342 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
343 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
344
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
345 #ifndef SYNTAX_FNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
346 # define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
347 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
348
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
349 #ifndef DFLT_BDIR
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
350 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
351 # define DFLT_BDIR "./,sys$login:,tmp:"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
352 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
353 # define DFLT_BDIR ".,~/tmp,~/" /* default for 'backupdir' */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
354 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
355 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
356
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
357 #ifndef DFLT_DIR
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
358 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
359 # define DFLT_DIR "./,sys$login:,tmp:"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
360 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
361 # define DFLT_DIR ".,~/tmp,/var/tmp,/tmp" /* default for 'directory' */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
362 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
363 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
364
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
365 #ifndef DFLT_VDIR
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
366 # ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
367 # define DFLT_VDIR "sys$login:vimfiles/view"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
368 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
369 # define DFLT_VDIR "$HOME/.vim/view" /* default for 'viewdir' */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
370 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
371 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
372
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
373 #define DFLT_ERRORFILE "errors.err"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
374
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
375 #ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
376 # define DFLT_RUNTIMEPATH "sys$login:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,sys$login:vimfiles/after"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
377 #else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
378 # ifdef RUNTIME_GLOBAL
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
379 # define DFLT_RUNTIMEPATH "~/.vim," RUNTIME_GLOBAL ",$VIMRUNTIME," RUNTIME_GLOBAL "/after,~/.vim/after"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
380 # else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
381 # define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
382 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
383 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
384
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
385 #ifdef VMS
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
386 # ifndef VAX
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
387 # define VMS_TEMPNAM /* to fix default .LIS extension */
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
388 # endif
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
389 # define TEMPNAME "TMP:v?XXXXXX.txt"
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
390 # define TEMPNAMELEN 28
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
391 #else
7408
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
392 /* Try several directories to put the temp files. */
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
393 # define TEMPDIRNAMES "$TMPDIR", "/tmp", ".", "$HOME"
1886f2863437 commit https://github.com/vim/vim/commit/e7fedb6ebe72d9a475aa65109b77d5ed4667067a
Christian Brabandt <cb@256bit.org>
parents: 6783
diff changeset
394 # define TEMPNAMELEN 256
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
395 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
396
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
397 /* Special wildcards that need to be handled by the shell */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
398 #define SPECIAL_WILDCHAR "`'{"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
399
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
400 #ifndef HAVE_OPENDIR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
401 # define NO_EXPANDPATH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
402 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
403
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
404 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
405 * Unix has plenty of memory, use large buffers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
406 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
407 #define CMDBUFFSIZE 1024 /* size of the command processing buffer */
1611
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
408
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
409 /* Use the system path length if it makes sense. */
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
410 #if defined(PATH_MAX) && (PATH_MAX > 1000)
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
411 # define MAXPATHL PATH_MAX
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
412 #else
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
413 # define MAXPATHL 1024
c669f3280f59 updated for version 7.1-324
vimboss
parents: 1313
diff changeset
414 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
415
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
416 #define CHECK_INODE /* used when checking if a swap file already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
417 exists for a file */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
418 #ifdef VMS /* Use less memory because of older systems */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
419 # ifndef DFLT_MAXMEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
420 # define DFLT_MAXMEM (2*1024)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
421 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
422 # ifndef DFLT_MAXMEMTOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
423 # define DFLT_MAXMEMTOT (5*1024)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
424 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
425 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
426 # ifndef DFLT_MAXMEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
427 # define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
428 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
429 # ifndef DFLT_MAXMEMTOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
430 # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
431 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
432 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
433
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
434 /* memmove is not present on all systems, use memmove, bcopy, memcpy or our
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
435 * own version */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
436 /* Some systems have (void *) arguments, some (char *). If we use (char *) it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
437 * works for all */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
438 #ifdef USEMEMMOVE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
439 # define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
440 #else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
441 # ifdef USEBCOPY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
442 # define mch_memmove(to, from, len) bcopy((char *)(from), (char *)(to), len)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
443 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
444 # ifdef USEMEMCPY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
445 # define mch_memmove(to, from, len) memcpy((char *)(to), (char *)(from), len)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
446 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
447 # define VIM_MEMMOVE /* found in misc2.c */
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 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
451
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
452 #ifndef PROTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
453 # ifdef HAVE_RENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
454 # define mch_rename(src, dst) rename(src, dst)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
455 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
456 int mch_rename __ARGS((const char *src, const char *dest));
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
457 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
458 # ifndef VMS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
459 # ifdef __MVS__
1204
a3c21128b246 updated for version 7.1b
vimboss
parents: 819
diff changeset
460 /* on OS390 Unix getenv() doesn't return a pointer to persistent
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
461 * storage -> use __getenv() */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
462 # define mch_getenv(x) (char_u *)__getenv((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
463 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
464 # define mch_getenv(x) (char_u *)getenv((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
465 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
466 # define mch_setenv(name, val, x) setenv(name, val, x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
467 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
468 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
469
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
470 #if !defined(S_ISDIR) && defined(S_IFDIR)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
471 # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
472 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
473 #if !defined(S_ISREG) && defined(S_IFREG)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
474 # define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
475 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
476 #if !defined(S_ISBLK) && defined(S_IFBLK)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
477 # define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
478 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
479 #if !defined(S_ISSOCK) && defined(S_IFSOCK)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
480 # define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
481 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
482 #if !defined(S_ISFIFO) && defined(S_IFIFO)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
483 # define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
484 #endif
1313
dbd226be80b1 updated for version 7.1-027
vimboss
parents: 1204
diff changeset
485 #if !defined(S_ISCHR) && defined(S_IFCHR)
dbd226be80b1 updated for version 7.1-027
vimboss
parents: 1204
diff changeset
486 # define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
dbd226be80b1 updated for version 7.1-027
vimboss
parents: 1204
diff changeset
487 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
488
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
489 /* Note: Some systems need both string.h and strings.h (Savage). However,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
490 * some systems can't handle both, only use string.h in that case. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
491 #ifdef HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
492 # include <string.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
493 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
494 #if defined(HAVE_STRINGS_H) && !defined(NO_STRINGS_WITH_STRING_H)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
495 # include <strings.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
496 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
497
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
498 #if defined(HAVE_SETJMP_H)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
499 # include <setjmp.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
500 # ifdef HAVE_SIGSETJMP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
501 # define JMP_BUF sigjmp_buf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
502 # define SETJMP(x) sigsetjmp((x), 1)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
503 # define LONGJMP siglongjmp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
504 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
505 # define JMP_BUF jmp_buf
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
506 # define SETJMP(x) setjmp(x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
507 # define LONGJMP longjmp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
508 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
509 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
510
5743
bf1775553d3b updated for version 7.4.216
Bram Moolenaar <bram@vim.org>
parents: 5704
diff changeset
511 #ifndef HAVE_DUP
bf1775553d3b updated for version 7.4.216
Bram Moolenaar <bram@vim.org>
parents: 5704
diff changeset
512 # define HAVE_DUP /* have dup() */
bf1775553d3b updated for version 7.4.216
Bram Moolenaar <bram@vim.org>
parents: 5704
diff changeset
513 #endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
514 #define HAVE_ST_MODE /* have stat.st_mode */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
515
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
516 /* We have three kinds of ACL support. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
517 #define HAVE_ACL (HAVE_POSIX_ACL || HAVE_SOLARIS_ACL || HAVE_AIX_ACL)