comparison src/macros.h @ 12716:351cf7c67bbe v8.0.1236

patch 8.0.1236: Mac features are confusing commit https://github.com/vim/vim/commit/d057301b1f28736f094affa17b190244ad56e8d9 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 28 21:11:06 2017 +0200 patch 8.0.1236: Mac features are confusing Problem: Mac features are confusing. Solution: Make feature names more consistent, add "osxdarwin". Rename feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
author Christian Brabandt <cb@256bit.org>
date Sat, 28 Oct 2017 21:15:35 +0200
parents bafbdbc64bbe
children 808625d4b71b
comparison
equal deleted inserted replaced
12715:279ec0abb4ac 12716:351cf7c67bbe
207 # define mch_lstat(n, p) lstat((n), (p)) 207 # define mch_lstat(n, p) lstat((n), (p))
208 #else 208 #else
209 # define mch_lstat(n, p) mch_stat((n), (p)) 209 # define mch_lstat(n, p) mch_stat((n), (p))
210 #endif 210 #endif
211 211
212 #ifdef MACOS_CLASSIC 212 #ifdef VMS
213 /* MacOS classic doesn't support perm but MacOS X does. */
214 # define mch_open(n, m, p) open((n), (m))
215 #else
216 # ifdef VMS
217 /* 213 /*
218 * It is possible to force some record format with: 214 * It is possible to force some record format with:
219 * # define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p)), "rat=cr", "rfm=stmlf", "mrs=0") 215 * # define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p)), "rat=cr", "rfm=stmlf", "mrs=0")
220 * but it is not recommended, because it can destroy indexes etc. 216 * but it is not recommended, because it can destroy indexes etc.
221 */ 217 */
222 # define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p)) 218 # define mch_open(n, m, p) open(vms_fixfilename(n), (m), (p))
223 # endif
224 #endif 219 #endif
225 220
226 /* mch_open_rw(): invoke mch_open() with third argument for user R/W. */ 221 /* mch_open_rw(): invoke mch_open() with third argument for user R/W. */
227 #if defined(UNIX) || defined(VMS) /* open in rw------- mode */ 222 #if defined(UNIX) || defined(VMS) /* open in rw------- mode */
228 # define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600) 223 # define mch_open_rw(n, f) mch_open((n), (f), (mode_t)0600)
264 * multi-byte characters if needed. 259 * multi-byte characters if needed.
265 * MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers. 260 * MB_COPY_CHAR(f, t): copy one char from "f" to "t" and advance the pointers.
266 * PTR2CHAR(): get character from pointer. 261 * PTR2CHAR(): get character from pointer.
267 */ 262 */
268 #ifdef FEAT_MBYTE 263 #ifdef FEAT_MBYTE
269 /* Get the length of the character p points to */ 264 /* Get the length of the character p points to, including composing chars */
270 # define MB_PTR2LEN(p) (has_mbyte ? (*mb_ptr2len)(p) : 1) 265 # define MB_PTR2LEN(p) (has_mbyte ? (*mb_ptr2len)(p) : 1)
271 /* Advance multi-byte pointer, skip over composing chars. */ 266 /* Advance multi-byte pointer, skip over composing chars. */
272 # define MB_PTR_ADV(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1 267 # define MB_PTR_ADV(p) p += has_mbyte ? (*mb_ptr2len)(p) : 1
273 /* Advance multi-byte pointer, do not skip over composing chars. */ 268 /* Advance multi-byte pointer, do not skip over composing chars. */
274 # define MB_CPTR_ADV(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1 269 # define MB_CPTR_ADV(p) p += enc_utf8 ? utf_ptr2len(p) : has_mbyte ? (*mb_ptr2len)(p) : 1