Mercurial > vim
annotate src/os_amiga.h @ 21604:d9c45474cac1 v8.2.1352
patch 8.2.1352: Vim9: no error for shadowing a script-local function
Commit: https://github.com/vim/vim/commit/ad486a0f0dd194826fdb733516bf0f35382c9dd7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 1 23:22:18 2020 +0200
patch 8.2.1352: Vim9: no error for shadowing a script-local function
Problem: Vim9: no error for shadowing a script-local function by a nested
function.
Solution: Check for script-local function. (closes #6586)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 01 Aug 2020 23:30:03 +0200 |
parents | 6e3dc2d630c2 |
children | 4aa525b44ff2 |
rev | line source |
---|---|
10042
4aead6a9b7a9
commit https://github.com/vim/vim/commit/edf3f97ae2af024708ebb4ac614227327033ca47
Christian Brabandt <cb@256bit.org>
parents:
9669
diff
changeset
|
1 /* vi:set ts=8 sts=4 sw=4 noet: |
7 | 2 * |
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 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
13 #define CASE_INSENSITIVE_FILENAME // ignore case when comparing file names |
7 | 14 #define SPACE_IN_FILENAME |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
15 #define USE_FNAME_CASE // adjust case of file names |
7 | 16 #define USE_TERM_CONSOLE |
17 #define HAVE_AVAIL_MEM | |
18 | |
19 #ifndef HAVE_CONFIG_H | |
1030 | 20 # if defined(AZTEC_C) || defined(__amigaos4__) |
7 | 21 # 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 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
29 # define HAVE_STRFTIME // guessed |
7 | 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 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
37 #endif // HAVE_CONFIG_H |
7 | 38 |
1030 | 39 #ifndef DFLT_ERRORFILE |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
40 # define DFLT_ERRORFILE "AztecC.Err" // Should this change? |
1030 | 41 #endif |
7 | 42 |
1030 | 43 #ifndef DFLT_RUNTIMEPATH |
44 # define DFLT_RUNTIMEPATH "home:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,home:vimfiles/after" | |
45 #endif | |
13361
65c29bd4548b
patch 8.0.1554: custom plugins loaded with --clean
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
46 #ifndef CLEAN_RUNTIMEPATH |
65c29bd4548b
patch 8.0.1554: custom plugins loaded with --clean
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
47 # define CLEAN_RUNTIMEPATH "$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after" |
65c29bd4548b
patch 8.0.1554: custom plugins loaded with --clean
Christian Brabandt <cb@256bit.org>
parents:
10042
diff
changeset
|
48 #endif |
7 | 49 |
1030 | 50 #ifndef BASENAMELEN |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
51 # define BASENAMELEN 26 // Amiga |
1030 | 52 #endif |
53 | |
54 #ifndef TEMPNAME | |
55 # define TEMPNAME "t:v?XXXXXX" | |
56 # define TEMPNAMELEN 12 | |
57 #endif | |
7 | 58 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
59 // cproto fails on missing include files |
3927 | 60 #ifndef PROTO |
61 | |
7 | 62 #include <exec/types.h> |
63 #include <libraries/dos.h> | |
64 #include <libraries/dosextens.h> | |
65 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
66 // Currently, all Amiga compilers except AZTEC C have these... |
7 | 67 #ifndef AZTEC_C |
68 # include <proto/exec.h> | |
69 # include <proto/dos.h> | |
70 # include <proto/intuition.h> | |
71 #endif | |
72 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
73 #endif // PROTO |
3927 | 74 |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
75 #define FNAME_ILLEGAL ";*?`#%" // illegal characters in a file name |
7 | 76 |
77 /* | |
78 * Manx doesn't have off_t, define it here. | |
79 */ | |
80 #ifdef AZTEC_C | |
81 typedef long off_t; | |
82 #endif | |
83 | |
84 #ifdef LATTICE | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
85 # define USE_TMPNAM // use tmpnam() instead of mktemp() |
7 | 86 #endif |
87 | |
88 #ifdef __GNUC__ | |
89 # include <sys/stat.h> | |
90 # include <unistd.h> | |
17233
e7a4d1ac0d0d
patch 8.1.1616: build failure with gcc on Amiga
Bram Moolenaar <Bram@vim.org>
parents:
13361
diff
changeset
|
91 # include <limits.h> |
e7a4d1ac0d0d
patch 8.1.1616: build failure with gcc on Amiga
Bram Moolenaar <Bram@vim.org>
parents:
13361
diff
changeset
|
92 # include <errno.h> |
18178
a3ddd35ee6d4
patch 8.1.2084: Amiga: cannot get the user name
Bram Moolenaar <Bram@vim.org>
parents:
17243
diff
changeset
|
93 # include <pwd.h> |
17233
e7a4d1ac0d0d
patch 8.1.1616: build failure with gcc on Amiga
Bram Moolenaar <Bram@vim.org>
parents:
13361
diff
changeset
|
94 # include <dirent.h> |
7 | 95 #endif |
96 | |
17243
24f42f0bf27e
patch 8.1.1621: Amiga: time.h included twice
Bram Moolenaar <Bram@vim.org>
parents:
17233
diff
changeset
|
97 #include <time.h> // for strftime() and others |
24f42f0bf27e
patch 8.1.1621: Amiga: time.h included twice
Bram Moolenaar <Bram@vim.org>
parents:
17233
diff
changeset
|
98 |
3927 | 99 #ifndef PROTO |
7 | 100 /* |
101 * arpbase.h must be included before functions.h | |
102 */ | |
103 #ifdef FEAT_ARP | |
104 # include <libraries/arpbase.h> | |
105 #endif | |
106 | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
107 #endif // PROTO |
3927 | 108 |
7 | 109 /* |
110 * This won't be needed if you have a version of Lattice 4.01 without broken | |
111 * break signal handling. | |
112 */ | |
113 #include <signal.h> | |
114 | |
115 /* | |
116 * Names for the EXRC, HELP and temporary files. | |
117 * Some of these may have been defined in the makefile. | |
118 */ | |
119 #ifndef SYS_VIMRC_FILE | |
120 # define SYS_VIMRC_FILE "$VIM/vimrc" | |
121 #endif | |
122 #ifndef SYS_GVIMRC_FILE | |
123 # define SYS_GVIMRC_FILE "$VIM/gvimrc" | |
124 #endif | |
125 #ifndef SYS_MENU_FILE | |
126 # define SYS_MENU_FILE "$VIMRUNTIME/menu.vim" | |
127 #endif | |
128 #ifndef DFLT_HELPFILE | |
129 # define DFLT_HELPFILE "$VIMRUNTIME/doc/help.txt" | |
130 #endif | |
131 #ifndef FILETYPE_FILE | |
132 # define FILETYPE_FILE "filetype.vim" | |
133 #endif | |
134 #ifndef FTPLUGIN_FILE | |
135 # define FTPLUGIN_FILE "ftplugin.vim" | |
136 #endif | |
137 #ifndef INDENT_FILE | |
138 # define INDENT_FILE "indent.vim" | |
139 #endif | |
140 #ifndef FTOFF_FILE | |
141 # define FTOFF_FILE "ftoff.vim" | |
142 #endif | |
143 #ifndef FTPLUGOF_FILE | |
144 # define FTPLUGOF_FILE "ftplugof.vim" | |
145 #endif | |
146 #ifndef INDOFF_FILE | |
147 # define INDOFF_FILE "indoff.vim" | |
148 #endif | |
149 #ifndef SYNTAX_FNAME | |
150 # define SYNTAX_FNAME "$VIMRUNTIME/syntax/%s.vim" | |
151 #endif | |
152 | |
153 #ifndef USR_EXRC_FILE | |
154 # define USR_EXRC_FILE "s:.exrc" | |
155 #endif | |
156 #ifndef USR_EXRC_FILE2 | |
157 # define USR_EXRC_FILE2 "home:.exrc" | |
158 #endif | |
159 | |
160 #ifndef USR_VIMRC_FILE | |
161 # define USR_VIMRC_FILE "s:.vimrc" | |
162 #endif | |
163 #ifndef USR_VIMRC_FILE2 | |
164 # define USR_VIMRC_FILE2 "home:.vimrc" | |
165 #endif | |
166 #ifndef USR_VIMRC_FILE3 | |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
167 # define USR_VIMRC_FILE3 "home:vimfiles:vimrc" |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
168 #endif |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
169 #ifndef USR_VIMRC_FILE4 |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
170 # define USR_VIMRC_FILE4 "$VIM/.vimrc" |
7 | 171 #endif |
9669
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
7838
diff
changeset
|
172 #ifndef VIM_DEFAULTS_FILE |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
7838
diff
changeset
|
173 # define VIM_DEFAULTS_FILE "$VIMRUNTIME/defaults.vim" |
284b4eb307fc
commit https://github.com/vim/vim/commit/8c08b5b569e2a9e9f63dea514591ecfa2d3bb392
Christian Brabandt <cb@256bit.org>
parents:
7838
diff
changeset
|
174 #endif |
7 | 175 #ifndef EVIM_FILE |
176 # define EVIM_FILE "$VIMRUNTIME/evim.vim" | |
177 #endif | |
178 | |
179 #ifndef USR_GVIMRC_FILE | |
180 # define USR_GVIMRC_FILE "s:.gvimrc" | |
181 #endif | |
182 #ifndef USR_GVIMRC_FILE2 | |
183 # define USR_GVIMRC_FILE2 "home:.gvimrc" | |
184 #endif | |
185 #ifndef USR_GVIMRC_FILE3 | |
4863
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
186 # define USR_GVIMRC_FILE3 "home:vimfiles:gvimrc" |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
187 #endif |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
188 #ifndef USR_GVIMRC_FILE4 |
c4d4f0fc12b9
updated for version 7.3.1178
Bram Moolenaar <bram@vim.org>
parents:
3927
diff
changeset
|
189 # define USR_GVIMRC_FILE4 "$VIM/.gvimrc" |
7 | 190 #endif |
191 | |
192 #ifdef FEAT_VIMINFO | |
1030 | 193 # ifndef VIMINFO_FILE |
194 # define VIMINFO_FILE "s:.viminfo" | |
195 # endif | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
196 #endif |
7 | 197 |
198 #ifndef EXRC_FILE | |
199 # define EXRC_FILE ".exrc" | |
200 #endif | |
201 | |
202 #ifndef VIMRC_FILE | |
203 # define VIMRC_FILE ".vimrc" | |
204 #endif | |
205 | |
206 #ifndef GVIMRC_FILE | |
207 # define GVIMRC_FILE ".gvimrc" | |
208 #endif | |
209 | |
210 #ifndef DFLT_BDIR | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
211 # define DFLT_BDIR ".,t:" // default for 'backupdir' |
7 | 212 #endif |
213 | |
214 #ifndef DFLT_DIR | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
215 # define DFLT_DIR ".,t:" // default for 'directory' |
7 | 216 #endif |
217 | |
218 #ifndef DFLT_VDIR | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
219 # define DFLT_VDIR "$VIM/vimfiles/view" // default for 'viewdir' |
7 | 220 #endif |
221 | |
222 #ifndef DFLT_MAXMEM | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
223 # define DFLT_MAXMEM 256 // use up to 256Kbyte for buffer |
7 | 224 #endif |
225 #ifndef DFLT_MAXMEMTOT | |
18753
6e3dc2d630c2
patch 8.1.2366: using old C style comments
Bram Moolenaar <Bram@vim.org>
parents:
18178
diff
changeset
|
226 # define DFLT_MAXMEMTOT 0 // decide in set_init |
7 | 227 #endif |
228 | |
229 #if defined(SASC) | |
230 int setenv(const char *, const char *); | |
231 #endif | |
232 | |
233 #define mch_remove(x) remove((char *)(x)) | |
234 #define mch_rename(src, dst) rename(src, dst) | |
235 #define mch_chdir(s) chdir(s) | |
236 #define vim_mkdir(x, y) mch_mkdir(x) |