annotate src/os_amiga.h @ 0:76efa0be13f1

Initial revision
author atsuki
date Sat, 10 Nov 2007 15:07:22 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 /* vi:set ts=8 sts=4 sw=4:
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 *
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 * VIM - Vi IMproved by Bram Moolenaar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 *
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 * Do ":help uganda" in Vim to read copying and usage conditions.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6 * Do ":help credits" in Vim to see a list of people who contributed.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9 /*
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 * Amiga Machine-dependent things
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13 #define CASE_INSENSITIVE_FILENAME /* ignore case when comparing file names */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 #define SPACE_IN_FILENAME
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 #define USE_FNAME_CASE /* adjust case of file names */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16 #define USE_TERM_CONSOLE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17 #define HAVE_AVAIL_MEM
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19 #ifndef HAVE_CONFIG_H
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 # if defined(AZTEC_C) || defined(__amigaos4__)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 # define HAVE_STAT_H
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22 # endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 # ifdef __amigaos4__
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 # define HAVE_STDARG_H
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25 # endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26 # define HAVE_STDLIB_H
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 # define HAVE_STRING_H
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 # define HAVE_FCNTL_H
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29 # define HAVE_STRCSPN
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 # define HAVE_STRICMP
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 # define HAVE_STRNICMP
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 # define HAVE_STRFTIME /* guessed */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33 # define HAVE_SETENV
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 # define HAVE_MEMSET
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 # define HAVE_QSORT
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 # if defined(__DATE__) && defined(__TIME__)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 # define HAVE_DATE_TIME
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 # endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 #endif /* HAVE_CONFIG_H */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42 #ifndef DFLT_ERRORFILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 # define DFLT_ERRORFILE "AztecC.Err" /* Should this change? */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 #ifndef DFLT_RUNTIMEPATH
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 # define DFLT_RUNTIMEPATH "home:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,home:vimfiles/after"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50 #ifndef BASENAMELEN
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51 # define BASENAMELEN 26 /* Amiga */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54 #ifndef TEMPNAME
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55 # define TEMPNAME "t:v?XXXXXX"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56 # define TEMPNAMELEN 12
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59 #include <exec/types.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 #include <libraries/dos.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 #include <libraries/dosextens.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 /* Currently, all Amiga compilers except AZTEC C have these... */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 #ifndef AZTEC_C
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 # include <proto/exec.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66 # include <proto/dos.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 # include <proto/intuition.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70 #define FNAME_ILLEGAL ";*?`#%" /* illegal characters in a file name */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 /*
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 * Manx doesn't have off_t, define it here.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74 */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75 #ifdef AZTEC_C
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76 typedef long off_t;
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 #ifdef LATTICE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
80 # define USE_TMPNAM /* use tmpnam() instead of mktemp() */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 #ifdef __GNUC__
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84 # include <sys/stat.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 # include <unistd.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88 /*
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
89 * arpbase.h must be included before functions.h
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
90 */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
91 #ifdef FEAT_ARP
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
92 # include <libraries/arpbase.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
93 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
94
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
95 /*
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
96 * This won't be needed if you have a version of Lattice 4.01 without broken
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
97 * break signal handling.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
98 */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
99 #include <signal.h>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
100
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
101 /*
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
102 * Names for the EXRC, HELP and temporary files.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
103 * Some of these may have been defined in the makefile.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
104 */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
105 #ifndef SYS_VIMRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
106 # define SYS_VIMRC_FILE "$VIM/vimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
107 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
108 #ifndef SYS_GVIMRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
109 # define SYS_GVIMRC_FILE "$VIM/gvimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
110 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
111 #ifndef SYS_MENU_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
112 # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
113 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
114 #ifndef DFLT_HELPFILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
115 # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
116 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
117 #ifndef FILETYPE_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
118 # define FILETYPE_FILE "filetype.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
119 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
120 #ifndef FTPLUGIN_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
121 # define FTPLUGIN_FILE "ftplugin.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
122 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
123 #ifndef INDENT_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
124 # define INDENT_FILE "indent.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
125 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
126 #ifndef FTOFF_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
127 # define FTOFF_FILE "ftoff.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
128 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
129 #ifndef FTPLUGOF_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
130 # define FTPLUGOF_FILE "ftplugof.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
131 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
132 #ifndef INDOFF_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
133 # define INDOFF_FILE "indoff.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
134 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
135 #ifndef SYNTAX_FNAME
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
136 # define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
137 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
138
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
139 #ifndef USR_EXRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
140 # define USR_EXRC_FILE "s:.exrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
141 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
142 #ifndef USR_EXRC_FILE2
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
143 # define USR_EXRC_FILE2 "home:.exrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
144 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
145
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
146 #ifndef USR_VIMRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
147 # define USR_VIMRC_FILE "s:.vimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
148 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
149 #ifndef USR_VIMRC_FILE2
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
150 # define USR_VIMRC_FILE2 "home:.vimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
151 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
152 #ifndef USR_VIMRC_FILE3
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
153 # define USR_VIMRC_FILE3 "$VIM/.vimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
154 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
155 #ifndef EVIM_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
156 # define EVIM_FILE "$VIMRUNTIME/evim.vim"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
157 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
158
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
159 #ifndef USR_GVIMRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
160 # define USR_GVIMRC_FILE "s:.gvimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
161 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
162 #ifndef USR_GVIMRC_FILE2
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
163 # define USR_GVIMRC_FILE2 "home:.gvimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
164 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
165 #ifndef USR_GVIMRC_FILE3
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
166 # define USR_GVIMRC_FILE3 "$VIM/.gvimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
167 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
168
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
169 #ifdef FEAT_VIMINFO
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
170 # ifndef VIMINFO_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
171 # define VIMINFO_FILE "s:.viminfo"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
172 # endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
173 #endif /* FEAT_VIMINFO */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
174
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
175 #ifndef EXRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
176 # define EXRC_FILE ".exrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
177 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
178
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
179 #ifndef VIMRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
180 # define VIMRC_FILE ".vimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
181 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
182
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
183 #ifndef GVIMRC_FILE
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
184 # define GVIMRC_FILE ".gvimrc"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
185 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
186
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
187 #ifndef DFLT_BDIR
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
188 # define DFLT_BDIR ".,t:" /* default for 'backupdir' */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
189 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
190
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
191 #ifndef DFLT_DIR
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
192 # define DFLT_DIR ".,t:" /* default for 'directory' */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
193 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
194
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
195 #ifndef DFLT_VDIR
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
196 # define DFLT_VDIR "$VIM/vimfiles/view" /* default for 'viewdir' */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
197 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
198
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
199 #ifndef DFLT_MAXMEM
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
200 # define DFLT_MAXMEM 256 /* use up to 256Kbyte for buffer */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
201 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
202 #ifndef DFLT_MAXMEMTOT
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
203 # define DFLT_MAXMEMTOT 0 /* decide in set_init */
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
204 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
205
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
206 #if defined(SASC)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
207 int setenv(const char *, const char *);
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
208 #endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
209
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
210 #define mch_remove(x) remove((char *)(x))
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
211 #define mch_rename(src, dst) rename(src, dst)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
212 #define mch_chdir(s) chdir(s)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
213 #define vim_mkdir(x, y) mch_mkdir(x)