blob: 718241dd768f97020369b5c1b3090766f100263f [file] [log] [blame]
Bram Moolenaaredf3f972016-08-29 22:49:24 +02001/* vi:set ts=8 sts=4 sw=4 noet:
Bram Moolenaar071d4272004-06-13 20:20:40 +00002 *
3 * VIM - Vi IMproved by Bram Moolenaar
4 *
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.
7 */
8
9/*
10 * Amiga Machine-dependent things
11 */
12
13#define CASE_INSENSITIVE_FILENAME /* ignore case when comparing file names */
14#define SPACE_IN_FILENAME
15#define USE_FNAME_CASE /* adjust case of file names */
16#define USE_TERM_CONSOLE
17#define HAVE_AVAIL_MEM
18
19#ifndef HAVE_CONFIG_H
Bram Moolenaar5a6404c2006-11-01 17:12:57 +000020# if defined(AZTEC_C) || defined(__amigaos4__)
Bram Moolenaar071d4272004-06-13 20:20:40 +000021# define HAVE_STAT_H
22# endif
23# define HAVE_STDLIB_H
24# define HAVE_STRING_H
25# define HAVE_FCNTL_H
26# define HAVE_STRCSPN
27# define HAVE_STRICMP
28# define HAVE_STRNICMP
29# define HAVE_STRFTIME /* guessed */
30# define HAVE_SETENV
31# define HAVE_MEMSET
32# define HAVE_QSORT
33# if defined(__DATE__) && defined(__TIME__)
34# define HAVE_DATE_TIME
35# endif
36
Bram Moolenaar071d4272004-06-13 20:20:40 +000037#endif /* HAVE_CONFIG_H */
38
Bram Moolenaar5a6404c2006-11-01 17:12:57 +000039#ifndef DFLT_ERRORFILE
40# define DFLT_ERRORFILE "AztecC.Err" /* Should this change? */
41#endif
42
43#ifndef DFLT_RUNTIMEPATH
44# define DFLT_RUNTIMEPATH "home:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,home:vimfiles/after"
45#endif
Bram Moolenaar07268702018-03-01 21:57:32 +010046#ifndef CLEAN_RUNTIMEPATH
47# define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after"
48#endif
Bram Moolenaar5a6404c2006-11-01 17:12:57 +000049
50#ifndef BASENAMELEN
51# define BASENAMELEN 26 /* Amiga */
52#endif
53
54#ifndef TEMPNAME
55# define TEMPNAME "t:v?XXXXXX"
56# define TEMPNAMELEN 12
57#endif
58
Bram Moolenaar82881492012-11-20 16:53:39 +010059/* cproto fails on missing include files */
60#ifndef PROTO
61
Bram Moolenaar071d4272004-06-13 20:20:40 +000062#include <exec/types.h>
63#include <libraries/dos.h>
64#include <libraries/dosextens.h>
65
66/* Currently, all Amiga compilers except AZTEC C have these... */
67#ifndef AZTEC_C
68# include <proto/exec.h>
69# include <proto/dos.h>
70# include <proto/intuition.h>
71#endif
72
Bram Moolenaar82881492012-11-20 16:53:39 +010073#endif /* PROTO */
74
Bram Moolenaar071d4272004-06-13 20:20:40 +000075#define FNAME_ILLEGAL ";*?`#%" /* illegal characters in a file name */
76
77/*
78 * Manx doesn't have off_t, define it here.
79 */
80#ifdef AZTEC_C
81typedef long off_t;
82#endif
83
84#ifdef LATTICE
85# define USE_TMPNAM /* use tmpnam() instead of mktemp() */
86#endif
87
88#ifdef __GNUC__
89# include <sys/stat.h>
90# include <unistd.h>
Bram Moolenaar8531dc62019-07-01 22:28:20 +020091# include <limits.h>
92# include <errno.h>
93# include <time.h>
94# include <dirent.h>
Bram Moolenaar071d4272004-06-13 20:20:40 +000095#endif
96
Bram Moolenaar82881492012-11-20 16:53:39 +010097#ifndef PROTO
Bram Moolenaar071d4272004-06-13 20:20:40 +000098/*
99 * arpbase.h must be included before functions.h
100 */
101#ifdef FEAT_ARP
102# include <libraries/arpbase.h>
103#endif
104
Bram Moolenaar82881492012-11-20 16:53:39 +0100105#endif /* PROTO */
106
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107/*
108 * This won't be needed if you have a version of Lattice 4.01 without broken
109 * break signal handling.
110 */
111#include <signal.h>
112
113/*
114 * Names for the EXRC, HELP and temporary files.
115 * Some of these may have been defined in the makefile.
116 */
117#ifndef SYS_VIMRC_FILE
118# define SYS_VIMRC_FILE "$VIM/vimrc"
119#endif
120#ifndef SYS_GVIMRC_FILE
121# define SYS_GVIMRC_FILE "$VIM/gvimrc"
122#endif
123#ifndef SYS_MENU_FILE
124# define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
125#endif
126#ifndef DFLT_HELPFILE
127# define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
128#endif
129#ifndef FILETYPE_FILE
130# define FILETYPE_FILE "filetype.vim"
131#endif
132#ifndef FTPLUGIN_FILE
133# define FTPLUGIN_FILE "ftplugin.vim"
134#endif
135#ifndef INDENT_FILE
136# define INDENT_FILE "indent.vim"
137#endif
138#ifndef FTOFF_FILE
139# define FTOFF_FILE "ftoff.vim"
140#endif
141#ifndef FTPLUGOF_FILE
142# define FTPLUGOF_FILE "ftplugof.vim"
143#endif
144#ifndef INDOFF_FILE
145# define INDOFF_FILE "indoff.vim"
146#endif
147#ifndef SYNTAX_FNAME
148# define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
149#endif
150
151#ifndef USR_EXRC_FILE
152# define USR_EXRC_FILE "s:.exrc"
153#endif
154#ifndef USR_EXRC_FILE2
155# define USR_EXRC_FILE2 "home:.exrc"
156#endif
157
158#ifndef USR_VIMRC_FILE
159# define USR_VIMRC_FILE "s:.vimrc"
160#endif
161#ifndef USR_VIMRC_FILE2
162# define USR_VIMRC_FILE2 "home:.vimrc"
163#endif
164#ifndef USR_VIMRC_FILE3
Bram Moolenaar22971aa2013-06-12 20:35:58 +0200165# define USR_VIMRC_FILE3 "home:vimfiles:vimrc"
166#endif
167#ifndef USR_VIMRC_FILE4
168# define USR_VIMRC_FILE4 "$VIM/.vimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000169#endif
Bram Moolenaar8c08b5b2016-07-28 22:24:15 +0200170#ifndef VIM_DEFAULTS_FILE
171# define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim"
172#endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000173#ifndef EVIM_FILE
174# define EVIM_FILE "$VIMRUNTIME/evim.vim"
175#endif
176
177#ifndef USR_GVIMRC_FILE
178# define USR_GVIMRC_FILE "s:.gvimrc"
179#endif
180#ifndef USR_GVIMRC_FILE2
181# define USR_GVIMRC_FILE2 "home:.gvimrc"
182#endif
183#ifndef USR_GVIMRC_FILE3
Bram Moolenaar22971aa2013-06-12 20:35:58 +0200184# define USR_GVIMRC_FILE3 "home:vimfiles:gvimrc"
185#endif
186#ifndef USR_GVIMRC_FILE4
187# define USR_GVIMRC_FILE4 "$VIM/.gvimrc"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000188#endif
189
190#ifdef FEAT_VIMINFO
Bram Moolenaar5a6404c2006-11-01 17:12:57 +0000191# ifndef VIMINFO_FILE
192# define VIMINFO_FILE "s:.viminfo"
193# endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000194#endif /* FEAT_VIMINFO */
195
196#ifndef EXRC_FILE
197# define EXRC_FILE ".exrc"
198#endif
199
200#ifndef VIMRC_FILE
201# define VIMRC_FILE ".vimrc"
202#endif
203
204#ifndef GVIMRC_FILE
205# define GVIMRC_FILE ".gvimrc"
206#endif
207
208#ifndef DFLT_BDIR
209# define DFLT_BDIR ".,t:" /* default for 'backupdir' */
210#endif
211
212#ifndef DFLT_DIR
213# define DFLT_DIR ".,t:" /* default for 'directory' */
214#endif
215
216#ifndef DFLT_VDIR
217# define DFLT_VDIR "$VIM/vimfiles/view" /* default for 'viewdir' */
218#endif
219
220#ifndef DFLT_MAXMEM
221# define DFLT_MAXMEM 256 /* use up to 256Kbyte for buffer */
222#endif
223#ifndef DFLT_MAXMEMTOT
224# define DFLT_MAXMEMTOT 0 /* decide in set_init */
225#endif
226
227#if defined(SASC)
228int setenv(const char *, const char *);
229#endif
230
231#define mch_remove(x) remove((char *)(x))
232#define mch_rename(src, dst) rename(src, dst)
233#define mch_chdir(s) chdir(s)
234#define vim_mkdir(x, y) mch_mkdir(x)