annotate src/os_mac.h @ 8374:5d834058bf44 v7.4.1479

commit https://github.com/vim/vim/commit/863c1a9079fa340d663ccafb011729a29186d73e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 3 15:47:06 2016 +0100 patch 7.4.1479 Problem: No testfor ":loadplugin". Solution: Add a test. Fix how option is being set.
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Mar 2016 16:00:05 +0100
parents 38a755adc580
children 284b4eb307fc
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 /* Before Including the MacOS specific files,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 * lets set the OPAQUE_TOOLBOX_STRUCTS to 0 so we
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 * can access the internal structures.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 * (Until fully Carbon compliant)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 * TODO: Can we remove this? (Dany)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 #if 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 # define OPAQUE_TOOLBOX_STRUCTS 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
5409
38a755adc580 updated for version 7.4.055
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
19 /* Include MAC_OS_X_VERSION_* macros */
38a755adc580 updated for version 7.4.055
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
20 #ifdef HAVE_AVAILABILITYMACROS_H
38a755adc580 updated for version 7.4.055
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
21 # include <AvailabilityMacros.h>
38a755adc580 updated for version 7.4.055
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
22 #endif
38a755adc580 updated for version 7.4.055
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
23
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 * Macintosh machine-dependent things.
18
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
26 *
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
27 * Include the Mac header files, unless also compiling with X11 (the header
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
28 * files have many conflicts).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 */
2309
543ea69d037f Add clipboard support in Mac console. (Bjorn Winckler)
Bram Moolenaar <bram@vim.org>
parents: 2214
diff changeset
30 #ifdef FEAT_GUI_MAC
841
c2cae213194d updated for version 7.0e07
vimboss
parents: 718
diff changeset
31 # include <Quickdraw.h> /* Apple calls it QuickDraw.h... */
18
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
32 # include <ToolUtils.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
33 # include <LowMem.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
34 # include <Scrap.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
35 # include <Sound.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
36 # include <TextUtils.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
37 # include <Memory.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
38 # include <OSUtils.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
39 # include <Files.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
40 # ifdef FEAT_MBYTE
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
41 # include <Script.h>
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
42 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 * Unix interface
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 #if defined(__APPLE_CC__) /* for Project Builder and ... */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 # include <unistd.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 /* Get stat.h or something similar. Comment: How come some OS get in in vim.h */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 # include <sys/stat.h>
718
7b21554be7a1 updated for version 7.0219
vimboss
parents: 675
diff changeset
52 /* && defined(HAVE_CURSE) */
4352
04736b4030ec updated for version 7.3.925
Bram Moolenaar <bram@vim.org>
parents: 2315
diff changeset
53 /* The curses.h from MacOS X provides by default some BACKWARD compatibility
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 * definition which can cause us problem later on. So we undefine a few of them. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 # include <curses.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 # undef reg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 # undef ospeed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 /* OK defined to 0 in MacOS X 10.2 curses! Remove it, we define it to be 1. */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 # undef OK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 #include <signal.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 #include <errno.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 #include <stdio.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 #include <stdlib.h>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 #include <time.h>
718
7b21554be7a1 updated for version 7.0219
vimboss
parents: 675
diff changeset
66 #include <dirent.h>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 * MacOS specific #define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 /* This will go away when CMD_KEY fully tested */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 #define USE_CMD_KEY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 /* On MacOS X use the / not the : */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 /* TODO: Should file such as ~/.vimrc reside instead in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 * ~/Library/Vim or ~/Library/Preferences/org.vim.vim/ ? (Dany)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 /* When compiled under MacOS X (including CARBON version)
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
79 * we use the Unix File path style. Also when UNIX is defined. */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 # define USE_UNIXFILENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 * Generic Vim #define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 #define FEAT_SOURCE_FFS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 #define FEAT_SOURCE_FF_MAC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 #define USE_EXE_NAME /* to find $VIM */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 #define CASE_INSENSITIVE_FILENAME /* ignore case when comparing file names */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 #define SPACE_IN_FILENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 #define BREAKCHECK_SKIP 32 /* call mch_breakcheck() each time, it's
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
94 quite fast. Did I forgot to update the
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
95 comment */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
584
5953bf5509ec updated for version 7.0166
vimboss
parents: 573
diff changeset
98 #define USE_FNAME_CASE /* make ":e os_Mac.c" open the file in its
5953bf5509ec updated for version 7.0166
vimboss
parents: 573
diff changeset
99 original case, as "os_mac.c" */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 #define BINARY_FILE_IO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 #define EOL_DEFAULT EOL_MAC
20
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
102 #ifndef MACOS_X_UNIX /* I hope that switching these two lines */
4ac1dce8dd5e updated for version 7.0012
vimboss
parents: 18
diff changeset
103 # define USE_CR /* does what I want -- BNF */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 # define NO_CONSOLE /* don't include console mode */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 #define HAVE_AVAIL_MEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 #ifndef HAVE_CONFIG_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 /* #define SYNC_DUP_CLOSE sync() a file with dup() and close() */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 # define HAVE_STRING_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 # define HAVE_STRCSPN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 # define HAVE_MEMSET
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 # define USE_TMPNAM /* use tmpnam() instead of mktemp() */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 # define HAVE_FCNTL_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 # define HAVE_QSORT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 # define HAVE_ST_MODE /* have stat.st_mode */
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 841
diff changeset
117 # define HAVE_MATH_H
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 # if defined(__DATE__) && defined(__TIME__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 # define HAVE_DATE_TIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 # define HAVE_STRFTIME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 * Names for the EXRC, HELP and temporary files.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 * Some of these may have been defined in the makefile.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 #ifndef SYS_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 # define SYS_VIMRC_FILE "$VIM/vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 #ifndef SYS_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 # define SYS_GVIMRC_FILE "$VIM/gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 #ifndef SYS_MENU_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 #ifndef SYS_OPTWIN_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 # define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 #ifndef EVIM_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 # define EVIM_FILE "$VIMRUNTIME/evim.vim"
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 #ifdef FEAT_GUI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 # ifndef USR_GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 # define USR_GVIMRC_FILE "~/.gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 # ifndef GVIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 # define GVIMRC_FILE "_gvimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 #ifndef USR_VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 # define USR_VIMRC_FILE "~/.vimrc"
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 #ifndef USR_EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 # define USR_EXRC_FILE "~/.exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162 #ifndef VIMRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 # define VIMRC_FILE "_vimrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 #ifndef EXRC_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 # define EXRC_FILE "_exrc"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 #ifndef DFLT_HELPFILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 #ifndef FILETYPE_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 # define FILETYPE_FILE "filetype.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 #ifndef FTPLUGIN_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 # define FTPLUGIN_FILE "ftplugin.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 #ifndef INDENT_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 # define INDENT_FILE "indent.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 #ifndef FTOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 # define FTOFF_FILE "ftoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 #ifndef FTPLUGOF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 # define FTPLUGOF_FILE "ftplugof.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 #ifndef INDOFF_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 # define INDOFF_FILE "indoff.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 #ifndef SYNTAX_FNAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 # define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 #ifdef FEAT_VIMINFO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 # ifndef VIMINFO_FILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 # define VIMINFO_FILE "~/.viminfo"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 #endif /* FEAT_VIMINFO */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 #ifndef DFLT_BDIR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 # define DFLT_BDIR "." /* default for 'backupdir' */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 #ifndef DFLT_DIR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 # define DFLT_DIR "." /* default for 'directory' */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 #ifndef DFLT_VDIR
2214
f8222d1f9a73 Included patch for persistent undo. Lots of changes and added test.
Bram Moolenaar <bram@vim.org>
parents: 1936
diff changeset
212 # define DFLT_VDIR "$VIM/vimfiles/view" /* default for 'viewdir' */
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
214
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
215 #define DFLT_ERRORFILE "errors.err"
18
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
216
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
217 #ifndef DFLT_RUNTIMEPATH
293621502c4d updated for version 7.0010
vimboss
parents: 7
diff changeset
218 # define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 /*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
222 * Macintosh has plenty of memory, use large buffers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
223 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
224 #define CMDBUFFSIZE 1024 /* size of the command processing buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
225
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 841
diff changeset
226 #if !defined(MACOS_X_UNIX)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
227 # define MAXPATHL 256 /* Limited by the Pascal Strings */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
228 # define BASENAMELEN (32-5-1) /* length of base of filename */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
229 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
230
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
231 #ifndef DFLT_MAXMEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
232 # define DFLT_MAXMEM 512 /* use up to 512 Kbyte for buffer */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
233 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
234
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
235 #ifndef DFLT_MAXMEMTOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
236 # define DFLT_MAXMEMTOT 2048 /* use up to 2048 Kbyte for Vim */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
237 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
238
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
239 #define WILDCHAR_LIST "*?[{`$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
240
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
241 /**************/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
242 #define mch_rename(src, dst) rename(src, dst)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
243 #define mch_remove(x) unlink((char *)(x))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
244 #ifndef mch_getenv
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
245 # if defined(__MRC__) || defined(__SC__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
246 # define mch_getenv(name) ((char_u *)getenv((char *)(name)))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
247 # define mch_setenv(name, val, x) setenv((name), (val))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
248 # elif defined(__APPLE_CC__)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
249 # define mch_getenv(name) ((char_u *)getenv((char *)(name)))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
250 /*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by Dany on Oct 30, 2001 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
251 # define mch_setenv(name, val, x) setenv(name, val, x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
252 # else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
253 /* vim_getenv() is in pty.c */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
254 # define USE_VIMPTY_GETENV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
255 # define mch_getenv(x) vimpty_getenv(x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
256 # define mch_setenv(name, val, x) setenv(name, val, x)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
257 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
258 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
259
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
260 #ifndef HAVE_CONFIG_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
261 # ifdef __APPLE_CC__
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
262 /* Assuming compiling for MacOS X */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
263 /* Trying to take advantage of the prebinding */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
264 # define HAVE_TGETENT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
265 # define OSPEED_EXTERN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
266 # define UP_BC_PC_EXTERN
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
270 /* Some "prep work" definition to be able to compile the MacOS X
5409
38a755adc580 updated for version 7.4.055
Bram Moolenaar <bram@vim.org>
parents: 4352
diff changeset
271 * version with os_unix.c instead of os_mac.c. Based on the result
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
272 * of ./configure for console MacOS X.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
273 */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
274
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
275 #ifdef MACOS_X_UNIX
1915
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
276 # ifndef SIGPROTOARG
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
277 # define SIGPROTOARG (int)
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
278 # endif
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
279 # ifndef SIGDEFARG
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
280 # define SIGDEFARG(s) (s) int s UNUSED;
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
281 # endif
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
282 # ifndef SIGDUMMYARG
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
283 # define SIGDUMMYARG 0
a7c4842a0be3 updated for version 7.2-212
vimboss
parents: 1619
diff changeset
284 # endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
285 # undef HAVE_AVAIL_MEM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
286 # ifndef HAVE_CONFIG_H
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
287 # define RETSIGTYPE void
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
288 # define SIGRETURN return
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
289 /*# define USE_SYSTEM */ /* Output ship do debugger :(, but ot compile */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
290 # define HAVE_SYS_WAIT_H 1 /* Attempt */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
291 # define HAVE_TERMIOS_H 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
292 # define SYS_SELECT_WITH_SYS_TIME 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
293 # define HAVE_SELECT 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
294 # define HAVE_SYS_SELECT_H 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
295 # define HAVE_PUTENV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
296 # define HAVE_SETENV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
297 # define HAVE_RENAME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
298 # endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
299 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
300
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
301 #if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
302 # define HAVE_PUTENV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
303 #endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
304
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
305 /* A Mac constant causing big problem to syntax highlighting */
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
306 #define UNKNOWN_CREATOR '\?\?\?\?'