comparison src/misc1.c @ 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 fad36581f788
children ebb4f6c93598
comparison
equal deleted inserted replaced
12715:279ec0abb4ac 12716:351cf7c67bbe
4332 pend = remove_tail(p, pend, (char_u *)RUNTIME_DIRNAME); 4332 pend = remove_tail(p, pend, (char_u *)RUNTIME_DIRNAME);
4333 pend = remove_tail(p, pend, (char_u *)VIM_VERSION_NODOT); 4333 pend = remove_tail(p, pend, (char_u *)VIM_VERSION_NODOT);
4334 } 4334 }
4335 4335
4336 /* remove trailing path separator */ 4336 /* remove trailing path separator */
4337 #ifndef MACOS_CLASSIC
4338 /* With MacOS path (with colons) the final colon is required */
4339 /* to avoid confusion between absolute and relative path */
4340 if (pend > p && after_pathsep(p, pend)) 4337 if (pend > p && after_pathsep(p, pend))
4341 --pend; 4338 --pend;
4342 #endif
4343 4339
4344 #ifdef MACOS_X 4340 #ifdef MACOS_X
4345 if (p == exe_name || p == p_hf) 4341 if (p == exe_name || p == p_hf)
4346 #endif 4342 #endif
4347 /* check that the result is a directory name */ 4343 /* check that the result is a directory name */
4497 char_u * 4493 char_u *
4498 get_env_name( 4494 get_env_name(
4499 expand_T *xp UNUSED, 4495 expand_T *xp UNUSED,
4500 int idx) 4496 int idx)
4501 { 4497 {
4502 # if defined(AMIGA) || defined(__MRC__) || defined(__SC__) 4498 # if defined(AMIGA)
4503 /* 4499 /*
4504 * No environ[] on the Amiga and on the Mac (using MPW). 4500 * No environ[] on the Amiga.
4505 */ 4501 */
4506 return NULL; 4502 return NULL;
4507 # else 4503 # else
4508 # ifndef __WIN32__ 4504 # ifndef __WIN32__
4509 /* Borland C++ 5.2 has this in a header file. */ 4505 /* Borland C++ 5.2 has this in a header file. */
10994 10990
10995 if (add_pat == -1 || (add_pat == 0 && (flags & EW_NOTFOUND))) 10991 if (add_pat == -1 || (add_pat == 0 && (flags & EW_NOTFOUND)))
10996 { 10992 {
10997 char_u *t = backslash_halve_save(p); 10993 char_u *t = backslash_halve_save(p);
10998 10994
10999 #if defined(MACOS_CLASSIC)
11000 slash_to_colon(t);
11001 #endif
11002 /* When EW_NOTFOUND is used, always add files and dirs. Makes 10995 /* When EW_NOTFOUND is used, always add files and dirs. Makes
11003 * "vim c:/" work. */ 10996 * "vim c:/" work. */
11004 if (flags & EW_NOTFOUND) 10997 if (flags & EW_NOTFOUND)
11005 addfile(&ga, t, flags | EW_DIR | EW_FILE); 10998 addfile(&ga, t, flags | EW_DIR | EW_FILE);
11006 else 10999 else