]> git.pld-linux.org Git - packages/vim.git/blame - 6.2.115
- use new bonobo patch (20040115)
[packages/vim.git] / 6.2.115
CommitLineData
5f6937f1
AM
1To: vim-dev@vim.org
2Subject: Patch 6.2.115 (extra)
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 6.2.115 (extra)
11Problem: Compiler warnings with various Amiga compilers.
12Solution: Add typecast, prototypes, et al. Those changes that are
13 Amiga-specific. (Flavio Stanchina)
14Files: src/fileio.c, src/memfile.c, src/os_amiga.c, src/os_amiga.h,
15 src/vim.h
16
17
18*** ../vim-6.2.114/src/fileio.c Sat Sep 27 19:36:46 2003
19--- src/fileio.c Wed Sep 17 22:01:56 2003
20***************
21*** 25,34 ****
22 # include <fcntl.h>
23 #endif
24
25- #ifdef LATTICE
26- # include <proto/dos.h> /* for Lock() and UnLock() */
27- #endif
28-
29 #ifdef __TANDEM
30 # include <limits.h> /* for SSIZE_MAX */
31 #endif
32--- 25,30 ----
33*** ../vim-6.2.114/src/memfile.c Sun May 4 22:43:59 2003
34--- src/memfile.c Wed Sep 17 22:03:02 2003
35***************
36*** 660,667 ****
37 Flush(fp->ufbfh);
38 }
39 # else
40! # ifdef _DCC
41 {
42 BPTR fh = (BPTR)fdtofh(mfp->mf_fd);
43
44 if (fh != 0)
45--- 660,673 ----
46 Flush(fp->ufbfh);
47 }
48 # else
49! # if defined(_DCC) || defined(__GNUC__)
50 {
51+ # ifdef __GNUC__
52+ /* Have function (in libnix at least),
53+ * but ain't got no prototype anywhere. */
54+ unsigned long fdtofh(int filedescriptor);
55+ # endif
56+
57 BPTR fh = (BPTR)fdtofh(mfp->mf_fd);
58
59 if (fh != 0)
60*** ../vim-6.2.114/src/os_amiga.c Sat Apr 19 15:10:39 2003
61--- src/os_amiga.c Sun Oct 12 17:24:09 2003
62***************
63*** 62,68 ****
64 static int lock2name __ARGS((BPTR lock, char_u *buf, long len));
65 static void out_num __ARGS((long n));
66 static struct FileInfoBlock *get_fib __ARGS((char_u *));
67! static int sortcmp __ARGS((char **a, char **b));
68
69 static BPTR raw_in = (BPTR)NULL;
70 static BPTR raw_out = (BPTR)NULL;
71--- 62,68 ----
72 static int lock2name __ARGS((BPTR lock, char_u *buf, long len));
73 static void out_num __ARGS((long n));
74 static struct FileInfoBlock *get_fib __ARGS((char_u *));
75! static int sortcmp __ARGS((const void *a, const void *b));
76
77 static BPTR raw_in = (BPTR)NULL;
78 static BPTR raw_out = (BPTR)NULL;
79***************
80*** 233,239 ****
81 suspend_shell();
82 }
83
84! #define DOS_LIBRARY ((UBYTE *) "dos.library")
85
86 void
87 mch_init()
88--- 233,241 ----
89 suspend_shell();
90 }
91
92! #ifndef DOS_LIBRARY
93! # define DOS_LIBRARY ((UBYTE *)"dos.library")
94! #endif
95
96 void
97 mch_init()
98***************
99*** 304,310 ****
100 static char_u *(constrings[3]) = {(char_u *)"con:0/0/662/210/",
101 (char_u *)"con:0/0/640/200/",
102 (char_u *)"con:0/0/320/200/"};
103! static char_u winerr[] = _("VIM: Can't open window!\n");
104 struct WBArg *argp;
105 int ac;
106 char *av;
107--- 306,312 ----
108 static char_u *(constrings[3]) = {(char_u *)"con:0/0/662/210/",
109 (char_u *)"con:0/0/640/200/",
110 (char_u *)"con:0/0/320/200/"};
111! static char_u winerr[] = (char_u *)N_("VIM: Can't open window!\n");
112 struct WBArg *argp;
113 int ac;
114 char *av;
115***************
116*** 316,322 ****
117 /*
118 * check if we are running under DOS 2.0x or higher
119 */
120! if (DosBase = OpenLibrary(DOS_LIBRARY, 37L))
121 {
122 CloseLibrary(DosBase);
123 #ifdef FEAT_ARP
124--- 318,326 ----
125 /*
126 * check if we are running under DOS 2.0x or higher
127 */
128! DosBase = OpenLibrary(DOS_LIBRARY, 37L);
129! if (DosBase != NULL)
130! /* if (((struct Library *)DOSBase)->lib_Version >= 37) */
131 {
132 CloseLibrary(DosBase);
133 #ifdef FEAT_ARP
134***************
135*** 394,400 ****
136 }
137 if (raw_in == (BPTR)NULL) /* all three failed */
138 {
139! mch_errmsg((char *)winerr);
140 goto exit;
141 }
142 raw_out = raw_in;
143--- 398,404 ----
144 }
145 if (raw_in == (BPTR)NULL) /* all three failed */
146 {
147! mch_errmsg(_(winerr));
148 goto exit;
149 }
150 raw_out = raw_in;
151***************
152*** 412,418 ****
153 * Make a unique name for the temp file (which we will not delete!).
154 * Use a pointer on the stack (nobody else will be using it).
155 */
156! sprintf((char *)buf1, "t:nc%ld", (char *)buf1);
157 if ((fh = Open((UBYTE *)buf1, (long)MODE_NEWFILE)) == (BPTR)NULL)
158 {
159 mch_errmsg(_("Cannot create "));
160--- 416,422 ----
161 * Make a unique name for the temp file (which we will not delete!).
162 * Use a pointer on the stack (nobody else will be using it).
163 */
164! sprintf((char *)buf1, "t:nc%ld", (long)buf1);
165 if ((fh = Open((UBYTE *)buf1, (long)MODE_NEWFILE)) == (BPTR)NULL)
166 {
167 mch_errmsg(_("Cannot create "));
168***************
169*** 499,505 ****
170 if (i == 3) /* all three failed */
171 {
172 DeleteFile((UBYTE *)buf1);
173! mch_errmsg((char *)winerr);
174 goto exit;
175 }
176 exitval = 0; /* The Execute succeeded: exit this program */
177--- 503,509 ----
178 if (i == 3) /* all three failed */
179 {
180 DeleteFile((UBYTE *)buf1);
181! mch_errmsg(_(winerr));
182 goto exit;
183 }
184 exitval = 0; /* The Execute succeeded: exit this program */
185***************
186*** 1198,1204 ****
187 else if (x)
188 # endif
189 {
190! if (x = IoErr())
191 {
192 if (!(options & SHELL_SILENT))
193 {
194--- 1202,1208 ----
195 else if (x)
196 # endif
197 {
198! if ((x = IoErr()) != 0)
199 {
200 if (!(options & SHELL_SILENT))
201 {
202***************
203*** 1314,1320 ****
204 vim_free(shellcmd);
205 #endif /* AZTEC_C */
206
207! if (mydir = CurrentDir(mydir)) /* make sure we stay in the same directory */
208 UnLock(mydir);
209 if (tmode == TMODE_RAW)
210 settmode(TMODE_RAW); /* set to raw mode */
211--- 1318,1324 ----
212 vim_free(shellcmd);
213 #endif /* AZTEC_C */
214
215! if ((mydir = CurrentDir(mydir)) != 0) /* make sure we stay in the same directory */
216 UnLock(mydir);
217 if (tmode == TMODE_RAW)
218 settmode(TMODE_RAW); /* set to raw mode */
219***************
220*** 1478,1486 ****
221
222 static int
223 sortcmp(a, b)
224! char **a, **b;
225 {
226! return pathcmp(*a, *b);
227 }
228
229 /*
230--- 1482,1492 ----
231
232 static int
233 sortcmp(a, b)
234! const void *a, *b;
235 {
236! char_u *s = *(char **)a,
237! *t = *(char **)b;
238! return pathcmp(s, t);
239 }
240
241 /*
242*** ../vim-6.2.114/src/os_amiga.h Thu Jul 26 14:00:21 2001
243--- src/os_amiga.h Wed Sep 17 22:15:14 2003
244***************
245*** 17,23 ****
246 #define HAVE_AVAIL_MEM
247
248 #ifndef HAVE_CONFIG_H
249! # ifndef _DCC
250 # define HAVE_STAT_H
251 # endif
252 # define HAVE_STDLIB_H
253--- 17,23 ----
254 #define HAVE_AVAIL_MEM
255
256 #ifndef HAVE_CONFIG_H
257! # ifdef AZTEC_C
258 # define HAVE_STAT_H
259 # endif
260 # define HAVE_STDLIB_H
261***************
262*** 44,49 ****
263--- 44,60 ----
264
265 #endif /* HAVE_CONFIG_H */
266
267+ #include <exec/types.h>
268+ #include <libraries/dos.h>
269+ #include <libraries/dosextens.h>
270+
271+ /* Currently, all Amiga compilers except AZTEC C have these... */
272+ #ifndef AZTEC_C
273+ # include <proto/exec.h>
274+ # include <proto/dos.h>
275+ # include <proto/intuition.h>
276+ #endif
277+
278 #define FNAME_ILLEGAL ";*?`#%" /* illegal characters in a file name */
279
280 /*
281***************
282*** 55,60 ****
283--- 66,76 ----
284
285 #ifdef LATTICE
286 # define USE_TMPNAM /* use tmpnam() instead of mktemp() */
287+ #endif
288+
289+ #ifdef __GNUC__
290+ # include <sys/stat.h>
291+ # include <unistd.h>
292 #endif
293
294 /*
295*** ../vim-6.2.114/src/vim.h Sun Oct 12 16:42:14 2003
296--- src/vim.h Wed Sep 17 22:15:42 2003
297***************
298*** 128,134 ****
299 #ifdef AMIGA
300 /* Be conservative about sizeof(int). It could be 4 too. */
301 # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
302! # define SIZEOF_INT 2
303 # endif
304 #endif
305 #ifdef MACOS
306--- 130,140 ----
307 #ifdef AMIGA
308 /* Be conservative about sizeof(int). It could be 4 too. */
309 # ifndef FEAT_GUI_GTK /* avoid problems when generating prototypes */
310! # ifdef __GNUC__
311! # define SIZEOF_INT 4
312! # else
313! # define SIZEOF_INT 2
314! # endif
315 # endif
316 #endif
317 #ifdef MACOS
318*** ../vim-6.2.114/src/version.c Sun Oct 12 17:14:12 2003
319--- src/version.c Sun Oct 12 17:15:47 2003
320***************
321*** 639,640 ****
322--- 639,642 ----
323 { /* Add new patch number below this line */
324+ /**/
325+ 115,
326 /**/
327
328--
329Rule #1: Don't give somebody a tool that he's going to hurt himself with.
330
331 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
332/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
333\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
334 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
This page took 0.065306 seconds and 4 git commands to generate.