summaryrefslogtreecommitdiff
path: root/src/os_mac.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-10-28 21:11:06 +0200
committerBram Moolenaar <Bram@vim.org>2017-10-28 21:11:06 +0200
commitd057301b1f28736f094affa17b190244ad56e8d9 (patch)
treeae20801354321a5ff0d7d23b04d8d6018c57645a /src/os_mac.h
parentef83956e1e67736b4c6b886d897b74f022622a74 (diff)
downloadvim-git-d057301b1f28736f094affa17b190244ad56e8d9.tar.gz
patch 8.0.1236: Mac features are confusingv8.0.1236
Problem: Mac features are confusing. Solution: Make feature names more consistent, add "osxdarwin". Rename feature flags, cleanup Mac code. (Kazunobu Kuriyama, closes #2178)
Diffstat (limited to 'src/os_mac.h')
-rw-r--r--src/os_mac.h90
1 files changed, 37 insertions, 53 deletions
diff --git a/src/os_mac.h b/src/os_mac.h
index a0eda8226..9fc2f9289 100644
--- a/src/os_mac.h
+++ b/src/os_mac.h
@@ -77,7 +77,7 @@
*/
/* When compiled under MacOS X (including CARBON version)
* we use the Unix File path style. Also when UNIX is defined. */
-# define USE_UNIXFILENAME
+#define USE_UNIXFILENAME
/*
@@ -94,15 +94,10 @@
quite fast. Did I forgot to update the
comment */
-
#define USE_FNAME_CASE /* make ":e os_Mac.c" open the file in its
original case, as "os_mac.c" */
#define BINARY_FILE_IO
#define EOL_DEFAULT EOL_MAC
-#ifndef MACOS_X_UNIX /* I hope that switching these two lines */
-# define USE_CR /* does what I want -- BNF */
-# define NO_CONSOLE /* don't include console mode */
-#endif
#define HAVE_AVAIL_MEM
#ifndef HAVE_CONFIG_H
@@ -128,38 +123,38 @@
*/
#ifndef SYS_VIMRC_FILE
-# define SYS_VIMRC_FILE "$VIM/vimrc"
+# define SYS_VIMRC_FILE "$VIM/vimrc"
#endif
#ifndef SYS_GVIMRC_FILE
-# define SYS_GVIMRC_FILE "$VIM/gvimrc"
+# define SYS_GVIMRC_FILE "$VIM/gvimrc"
#endif
#ifndef SYS_MENU_FILE
-# define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
+# define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
#endif
#ifndef SYS_OPTWIN_FILE
-# define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
+# define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
#endif
#ifndef VIM_DEFAULTS_FILE
-# define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
+# define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
#endif
#ifndef EVIM_FILE
-# define EVIM_FILE "$VIMRUNTIME/evim.vim"
+# define EVIM_FILE "$VIMRUNTIME/evim.vim"
#endif
#ifdef FEAT_GUI
# ifndef USR_GVIMRC_FILE
-# define USR_GVIMRC_FILE "~/.gvimrc"
+# define USR_GVIMRC_FILE "~/.gvimrc"
# endif
# ifndef GVIMRC_FILE
# define GVIMRC_FILE "_gvimrc"
# endif
#endif
#ifndef USR_VIMRC_FILE
-# define USR_VIMRC_FILE "~/.vimrc"
+# define USR_VIMRC_FILE "~/.vimrc"
#endif
#ifndef USR_EXRC_FILE
-# define USR_EXRC_FILE "~/.exrc"
+# define USR_EXRC_FILE "~/.exrc"
#endif
#ifndef VIMRC_FILE
@@ -171,7 +166,7 @@
#endif
#ifndef DFLT_HELPFILE
-# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
+# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
#endif
#ifndef FILETYPE_FILE
@@ -194,12 +189,12 @@
#endif
#ifndef SYNTAX_FNAME
-# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
+# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
#endif
#ifdef FEAT_VIMINFO
# ifndef VIMINFO_FILE
-# define VIMINFO_FILE "~/.viminfo"
+# define VIMINFO_FILE "~/.viminfo"
# endif
#endif /* FEAT_VIMINFO */
@@ -218,7 +213,7 @@
#define DFLT_ERRORFILE "errors.err"
#ifndef DFLT_RUNTIMEPATH
-# define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
+# define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
#endif
/*
@@ -226,11 +221,6 @@
*/
#define CMDBUFFSIZE 1024 /* size of the command processing buffer */
-#if !defined(MACOS_X_UNIX)
-# define MAXPATHL 256 /* Limited by the Pascal Strings */
-# define BASENAMELEN (32-5-1) /* length of base of filename */
-#endif
-
#ifndef DFLT_MAXMEM
# define DFLT_MAXMEM 512 /* use up to 512 Kbyte for buffer */
#endif
@@ -245,12 +235,8 @@
#define mch_rename(src, dst) rename(src, dst)
#define mch_remove(x) unlink((char *)(x))
#ifndef mch_getenv
-# if defined(__MRC__) || defined(__SC__)
+# if defined(__APPLE_CC__)
# define mch_getenv(name) ((char_u *)getenv((char *)(name)))
-# define mch_setenv(name, val, x) setenv((name), (val))
-# elif defined(__APPLE_CC__)
-# define mch_getenv(name) ((char_u *)getenv((char *)(name)))
-/*# define mch_setenv(name, val, x) setenv((name), (val)) */ /* Obsoleted by Dany on Oct 30, 2001 */
# define mch_setenv(name, val, x) setenv(name, val, x)
# else
/* vim_getenv() is in pty.c */
@@ -275,33 +261,31 @@
* of ./configure for console MacOS X.
*/
-#ifdef MACOS_X_UNIX
-# ifndef SIGPROTOARG
-# define SIGPROTOARG (int)
-# endif
-# ifndef SIGDEFARG
-# define SIGDEFARG(s) (s) int s UNUSED;
-# endif
-# ifndef SIGDUMMYARG
-# define SIGDUMMYARG 0
-# endif
-# undef HAVE_AVAIL_MEM
-# ifndef HAVE_CONFIG_H
-# define RETSIGTYPE void
-# define SIGRETURN return
+#ifndef SIGPROTOARG
+# define SIGPROTOARG (int)
+#endif
+#ifndef SIGDEFARG
+# define SIGDEFARG(s) (s) int s UNUSED;
+#endif
+#ifndef SIGDUMMYARG
+# define SIGDUMMYARG 0
+#endif
+#undef HAVE_AVAIL_MEM
+#ifndef HAVE_CONFIG_H
+# define RETSIGTYPE void
+# define SIGRETURN return
/*# define USE_SYSTEM */ /* Output ship do debugger :(, but ot compile */
-# define HAVE_SYS_WAIT_H 1 /* Attempt */
-# define HAVE_TERMIOS_H 1
-# define SYS_SELECT_WITH_SYS_TIME 1
-# define HAVE_SELECT 1
-# define HAVE_SYS_SELECT_H 1
-# define HAVE_PUTENV
-# define HAVE_SETENV
-# define HAVE_RENAME
-# endif
+# define HAVE_SYS_WAIT_H 1 /* Attempt */
+# define HAVE_TERMIOS_H 1
+# define SYS_SELECT_WITH_SYS_TIME 1
+# define HAVE_SELECT 1
+# define HAVE_SYS_SELECT_H 1
+# define HAVE_PUTENV
+# define HAVE_SETENV
+# define HAVE_RENAME
#endif
-#if defined(MACOS_X) && !defined(HAVE_CONFIG_H)
+#if !defined(HAVE_CONFIG_H)
# define HAVE_PUTENV
#endif