#if 0
# define OPAQUE_TOOLBOX_STRUCTS 0
#endif
#ifdef HAVE_AVAILABILITYMACROS_H
# include <AvailabilityMacros.h>
#endif
#ifdef FEAT_GUI_MAC
# include <Quickdraw.h> // Apple calls it QuickDraw.h...
# include <ToolUtils.h>
# include <LowMem.h>
# include <Scrap.h>
# include <Sound.h>
# include <TextUtils.h>
# include <Memory.h>
# include <OSUtils.h>
# include <Files.h>
# include <Script.h>
#endif
#if defined(__APPLE_CC__) // for Project Builder and ...
# include <unistd.h>
# include <sys/stat.h>
# include <curses.h>
# undef reg
# undef ospeed
# undef OK
#endif
#include <signal.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <dirent.h>
#define USE_CMD_KEY
#define USE_UNIXFILENAME
#define FEAT_SOURCE_FFS
#define FEAT_SOURCE_FF_MAC
#define USE_EXE_NAME // to find $VIM
#define CASE_INSENSITIVE_FILENAME // ignore case when comparing file names
#define SPACE_IN_FILENAME
#define USE_FNAME_CASE // make ":e os_Mac.c" open the file in its
#define BINARY_FILE_IO
#define EOL_DEFAULT EOL_MAC
#define HAVE_AVAIL_MEM
#ifndef HAVE_CONFIG_H
# define HAVE_STRING_H
# define HAVE_STRCSPN
# define HAVE_MEMSET
# define USE_TMPNAM // use tmpnam() instead of mktemp()
# define HAVE_FCNTL_H
# define HAVE_QSORT
# define HAVE_ST_MODE // have stat.st_mode
# define HAVE_MATH_H
# if defined(__DATE__) && defined(__TIME__)
# define HAVE_DATE_TIME
# endif
# define HAVE_STRFTIME
#endif
#ifndef SYS_VIMRC_FILE
# define SYS_VIMRC_FILE "$VIM/vimrc"
#endif
#ifndef SYS_GVIMRC_FILE
# define SYS_GVIMRC_FILE "$VIM/gvimrc"
#endif
#ifndef SYS_MENU_FILE
# define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
#endif
#ifndef SYS_OPTWIN_FILE
# define SYS_OPTWIN_FILE "$VIMRUNTIME/optwin.vim"
#endif
#ifndef VIM_DEFAULTS_FILE
# define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
#endif
#ifndef EVIM_FILE
# define EVIM_FILE "$VIMRUNTIME/evim.vim"
#endif
#ifdef FEAT_GUI
# ifndef USR_GVIMRC_FILE
# define USR_GVIMRC_FILE "~/.gvimrc"
# endif
# ifndef GVIMRC_FILE
# define GVIMRC_FILE "_gvimrc"
# endif
#endif
#ifndef USR_VIMRC_FILE
# define USR_VIMRC_FILE "~/.vimrc"
#endif
#ifndef USR_EXRC_FILE
# define USR_EXRC_FILE "~/.exrc"
#endif
#ifndef VIMRC_FILE
# define VIMRC_FILE "_vimrc"
#endif
#ifndef EXRC_FILE
# define EXRC_FILE "_exrc"
#endif
#ifndef DFLT_HELPFILE
# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
#endif
#ifndef FILETYPE_FILE
# define FILETYPE_FILE "filetype.vim"
#endif
#ifndef FTPLUGIN_FILE
# define FTPLUGIN_FILE "ftplugin.vim"
#endif
#ifndef INDENT_FILE
# define INDENT_FILE "indent.vim"
#endif
#ifndef FTOFF_FILE
# define FTOFF_FILE "ftoff.vim"
#endif
#ifndef FTPLUGOF_FILE
# define FTPLUGOF_FILE "ftplugof.vim"
#endif
#ifndef INDOFF_FILE
# define INDOFF_FILE "indoff.vim"
#endif
#ifndef SYNTAX_FNAME
# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
#endif
#ifdef FEAT_VIMINFO
# ifndef VIMINFO_FILE
# define VIMINFO_FILE "~/.viminfo"
# endif
#endif // FEAT_VIMINFO
#ifndef DFLT_BDIR
# define DFLT_BDIR "." // default for 'backupdir'
#endif
#ifndef DFLT_DIR
# define DFLT_DIR "." // default for 'directory'
#endif
#ifndef DFLT_VDIR
# define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir'
#endif
#define DFLT_ERRORFILE "errors.err"
#ifndef DFLT_RUNTIMEPATH
# define DFLT_RUNTIMEPATH "~/.vim,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,~/.vim/after"
#endif
#ifndef CLEAN_RUNTIMEPATH
# define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
#endif
#define CMDBUFFSIZE 1024 // size of the command processing buffer
#ifndef DFLT_MAXMEM
# define DFLT_MAXMEM 512 // use up to 512 Kbyte for buffer
#endif
#ifndef DFLT_MAXMEMTOT
# define DFLT_MAXMEMTOT 2048 // use up to 2048 Kbyte for Vim
#endif
#define WILDCHAR_LIST "*?[{`$"
#define mch_rename(src, dst) rename(src, dst)
#define mch_remove(x) unlink((char *)(x))
#ifndef mch_getenv
# if defined(__APPLE_CC__)
# define mch_getenv(name) ((char_u *)getenv((char *)(name)))
# define mch_setenv(name, val, x) setenv(name, val, x)
# else
# define USE_VIMPTY_GETENV
# define mch_getenv(x) vimpty_getenv(x)
# define mch_setenv(name, val, x) setenv(name, val, x)
# endif
#endif
#ifndef HAVE_CONFIG_H
# ifdef __APPLE_CC__
# define HAVE_TGETENT
# define OSPEED_EXTERN
# define UP_BC_PC_EXTERN
# endif
#endif
#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 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(HAVE_CONFIG_H)
# define HAVE_PUTENV
#endif
#define UNKNOWN_CREATOR '\?\?\?\?'