1 /* vi:set ts=8 sts=4 sw=4:
3 * VIM - Vi IMproved by Bram Moolenaar
5 * Do ":help uganda" in Vim to read copying and usage conditions.
6 * Do ":help credits" in Vim to see a list of people who contributed.
11 #include <sys/ioctl.h>
14 #include <unixlib/local.h>
18 #define CASE_INSENSITIVE_FILENAME
19 #define FEAT_MODIFY_FNAME
20 #define FEAT_OSFILETYPE
21 #define DFLT_OFT "Text"
22 #define USE_TERM_CONSOLE
23 #define HAVE_AVAIL_MEM
25 /* Longer filenames now accessible to all */
27 # define BASENAMELEN 64 /* Same length as unzip */
31 # define TEMPNAME "<Wimp$ScrapDir>.v?XXXXXX"
32 # define TEMPNAMELEN 25
36 # define DFLT_HELPFILE "Vim:doc.help"
40 # define DFLT_BDIR ".,<Wimp$ScrapDir>." /* default for 'backupdir' */
43 /* Paths to try putting swap file in. */
45 # define DFLT_DIR "<Wimp$ScrapDir>.,." /* default for 'directory' */
49 # define DFLT_VDIR "Choices:Vim.view" /* default for 'viewdir' */
53 # define TERMCAPFILE "Vim:TermCap"
58 # define SYNTAX_FNAME "Vim:Syntax.%s"
62 # define EVIM_FILE "Vim:Evim"
68 # define VIMINFO_FILE "<Choices$Write>.Vim.VimInfo"
71 # define VIMINFO_FILE2 "Choices:Vim.VimInfo"
75 # define VIMRC_FILE "/vimrc"
78 # define EXRC_FILE "/exrc"
81 # define GVIMRC_FILE "/gvimrc"
83 #ifndef USR_VIMRC_FILE
84 # define USR_VIMRC_FILE "Vim:Evim"
87 # define SESSION_FILE "/Session.vim"
89 #ifndef USR_VIMRC_FILE
90 # define USR_VIMRC_FILE "Choices:Vim.VimRC"
92 #ifndef USR_GVIMRC_FILE
93 # define USR_GVIMRC_FILE "Choices:Vim.GVimRC"
96 # define USR_EXRC_FILE "Choices:Vim.ExRC"
98 #ifndef SYS_VIMRC_FILE
99 # define SYS_VIMRC_FILE "Vim:VimRC"
101 #ifndef SYS_GVIMRC_FILE
102 # define SYS_GVIMRC_FILE "Vim:GVimRC"
104 #ifndef SYS_MENU_FILE
105 # define SYS_MENU_FILE "Vim:Menu"
107 #ifndef SYS_OPTWIN_FILE
108 # define SYS_OPTWIN_FILE "Vim:Optwin"
110 #ifndef FILETYPE_FILE
111 # define FILETYPE_FILE "Vim:Filetype"
113 #ifndef FTPLUGIN_FILE
114 # define FTPLUGIN_FILE "Vim:Ftplugin/vim"
117 # define INDENT_FILE "Vim:Indent/vim"
120 # define FTOFF_FILE "Vim:Ftoff"
122 #ifndef FTPLUGOF_FILE
123 # define FTPLUGOF_FILE "Vim:Ftplugof"
126 # define INDOFF_FILE "Vim:Indoff"
129 #define DFLT_ERRORFILE "errors/vim"
130 #define DFLT_RUNTIMEPATH "Choices:Vim,Vim:,Choices:Vim.after"
133 * RISC PCs have plenty of memory, use large buffers
135 #define CMDBUFFSIZE 1024 /* size of the command processing buffer */
136 #define MAXPATHL 256 /* paths are always quite short though */
139 # define DFLT_MAXMEM (5*1024) /* use up to 5 Mbyte for a buffer */
142 #ifndef DFLT_MAXMEMTOT
143 # define DFLT_MAXMEMTOT (10*1024) /* use up to 10 Mbyte for Vim */
147 # define signal sigset
150 #define n_flag (1<<31)
151 #define z_flag (1<<30)
152 #define c_flag (1<<29)
153 #define v_flag (1<<28)
155 /* These take r0-r7 as inputs, returns r0-r7 in global variables. */
156 void swi(int swinum
, ...); /* Handles errors itself */
157 int xswi(int swinum
, ...); /* Returns errors using v flag */
158 extern int r0
, r1
, r2
, r3
, r4
, r5
, r6
, r7
; /* For return values */
163 #define mch_memmove(to, from, len) memmove((char *)(to), (char *)(from), len)
164 #define mch_rename(src, dst) rename(src, dst)
165 #define mch_getenv(x) (char_u *)getenv((char *)x)
166 #define mch_setenv(name, val, x) setenv(name, val, x)