|
Karsten Hopp |
ab0fac |
To: vim-dev@vim.org
|
|
Karsten Hopp |
ab0fac |
Subject: Patch 7.0.156
|
|
Karsten Hopp |
ab0fac |
Fcc: outbox
|
|
Karsten Hopp |
ab0fac |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
ab0fac |
Mime-Version: 1.0
|
|
Karsten Hopp |
ab0fac |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
ab0fac |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
ab0fac |
------------
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
Patch 7.0.156 (extra)
|
|
Karsten Hopp |
ab0fac |
Problem: Vim doesn't compile for Amiga OS 4.
|
|
Karsten Hopp |
ab0fac |
Solution: Various changes for Amiga OS4. (Peter Bengtsson)
|
|
Karsten Hopp |
ab0fac |
Files: src/feature.h, src/mbyte.c, src/memfile.c, src/memline.c,
|
|
Karsten Hopp |
ab0fac |
src/os_amiga.c, src/os_amiga.h, src/pty.c
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/feature.h Thu Apr 27 01:54:09 2006
|
|
Karsten Hopp |
ab0fac |
--- src/feature.h Wed Nov 1 17:52:54 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 1133,1139 ****
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* +ARP Amiga only. Use arp.library, DOS 2.0 is not required.
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
! #ifndef NO_ARP
|
|
Karsten Hopp |
ab0fac |
# define FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
--- 1133,1139 ----
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* +ARP Amiga only. Use arp.library, DOS 2.0 is not required.
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
! #if !defined(NO_ARP) && !defined(__amigaos4__)
|
|
Karsten Hopp |
ab0fac |
# define FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/mbyte.c Tue Aug 29 17:28:56 2006
|
|
Karsten Hopp |
ab0fac |
--- src/mbyte.c Wed Nov 1 17:52:54 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 667,673 ****
|
|
Karsten Hopp |
ab0fac |
* API */
|
|
Karsten Hopp |
ab0fac |
n = IsDBCSLeadByteEx(enc_dbcs, (BYTE)i) ? 2 : 1;
|
|
Karsten Hopp |
ab0fac |
#else
|
|
Karsten Hopp |
ab0fac |
! # ifdef MACOS
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* if mblen() is not available, character which MSB is turned on
|
|
Karsten Hopp |
ab0fac |
* are treated as leading byte character. (note : This assumption
|
|
Karsten Hopp |
ab0fac |
--- 667,673 ----
|
|
Karsten Hopp |
ab0fac |
* API */
|
|
Karsten Hopp |
ab0fac |
n = IsDBCSLeadByteEx(enc_dbcs, (BYTE)i) ? 2 : 1;
|
|
Karsten Hopp |
ab0fac |
#else
|
|
Karsten Hopp |
ab0fac |
! # if defined(MACOS) || defined(__amigaos4__)
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* if mblen() is not available, character which MSB is turned on
|
|
Karsten Hopp |
ab0fac |
* are treated as leading byte character. (note : This assumption
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/memfile.c Tue Sep 26 13:49:41 2006
|
|
Karsten Hopp |
ab0fac |
--- src/memfile.c Wed Nov 1 17:52:54 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 655,661 ****
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
#ifdef AMIGA
|
|
Karsten Hopp |
ab0fac |
! # ifdef __AROS__
|
|
Karsten Hopp |
ab0fac |
if (fsync(mfp->mf_fd) != 0)
|
|
Karsten Hopp |
ab0fac |
status = FAIL;
|
|
Karsten Hopp |
ab0fac |
# else
|
|
Karsten Hopp |
ab0fac |
--- 655,661 ----
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
#ifdef AMIGA
|
|
Karsten Hopp |
ab0fac |
! # if defined(__AROS__) || defined(__amigaos4__)
|
|
Karsten Hopp |
ab0fac |
if (fsync(mfp->mf_fd) != 0)
|
|
Karsten Hopp |
ab0fac |
status = FAIL;
|
|
Karsten Hopp |
ab0fac |
# else
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/memline.c Tue Oct 10 21:56:37 2006
|
|
Karsten Hopp |
ab0fac |
--- src/memline.c Wed Nov 1 17:52:54 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 55,64 ****
|
|
Karsten Hopp |
ab0fac |
# include <time.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifdef SASC
|
|
Karsten Hopp |
ab0fac |
# include <proto/dos.h> /* for Open() and Close() */
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
typedef struct block0 ZERO_BL; /* contents of the first block */
|
|
Karsten Hopp |
ab0fac |
typedef struct pointer_block PTR_BL; /* contents of a pointer block */
|
|
Karsten Hopp |
ab0fac |
typedef struct data_block DATA_BL; /* contents of a data block */
|
|
Karsten Hopp |
ab0fac |
--- 55,68 ----
|
|
Karsten Hopp |
ab0fac |
# include <time.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #if defined(SASC) || defined(__amigaos4__)
|
|
Karsten Hopp |
ab0fac |
# include <proto/dos.h> /* for Open() and Close() */
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
+ #ifdef HAVE_ERRNO_H
|
|
Karsten Hopp |
ab0fac |
+ # include <errno.h>
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
+
|
|
Karsten Hopp |
ab0fac |
typedef struct block0 ZERO_BL; /* contents of the first block */
|
|
Karsten Hopp |
ab0fac |
typedef struct pointer_block PTR_BL; /* contents of a pointer block */
|
|
Karsten Hopp |
ab0fac |
typedef struct data_block DATA_BL; /* contents of a data block */
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 4481,4487 ****
|
|
Karsten Hopp |
ab0fac |
curchnk = buf->b_ml.ml_chunksize + curix;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
if (updtype == ML_CHNK_DELLINE)
|
|
Karsten Hopp |
ab0fac |
! len *= -1;
|
|
Karsten Hopp |
ab0fac |
curchnk->mlcs_totalsize += len;
|
|
Karsten Hopp |
ab0fac |
if (updtype == ML_CHNK_ADDLINE)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
--- 4485,4491 ----
|
|
Karsten Hopp |
ab0fac |
curchnk = buf->b_ml.ml_chunksize + curix;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
if (updtype == ML_CHNK_DELLINE)
|
|
Karsten Hopp |
ab0fac |
! len = -len;
|
|
Karsten Hopp |
ab0fac |
curchnk->mlcs_totalsize += len;
|
|
Karsten Hopp |
ab0fac |
if (updtype == ML_CHNK_ADDLINE)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/os_amiga.c Thu Sep 14 21:36:35 2006
|
|
Karsten Hopp |
ab0fac |
--- src/os_amiga.c Wed Nov 1 18:09:46 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 30,49 ****
|
|
Karsten Hopp |
ab0fac |
# include <exec/types.h>
|
|
Karsten Hopp |
ab0fac |
# include <exec/exec.h>
|
|
Karsten Hopp |
ab0fac |
# include <libraries/dos.h>
|
|
Karsten Hopp |
ab0fac |
- # include <libraries/dosextens.h>
|
|
Karsten Hopp |
ab0fac |
# include <intuition/intuition.h>
|
|
Karsten Hopp |
ab0fac |
- #else
|
|
Karsten Hopp |
ab0fac |
- # include <proto/dos.h>
|
|
Karsten Hopp |
ab0fac |
- # include <libraries/dosextens.h>
|
|
Karsten Hopp |
ab0fac |
- # include <proto/intuition.h>
|
|
Karsten Hopp |
ab0fac |
- # include <proto/exec.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#include <exec/memory.h>
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#include <dos/dostags.h> /* for 2.0 functions */
|
|
Karsten Hopp |
ab0fac |
#include <dos/dosasl.h>
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#if defined(LATTICE) && !defined(SASC) && defined(FEAT_ARP)
|
|
Karsten Hopp |
ab0fac |
# include <libraries/arp_pragmas.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
--- 30,60 ----
|
|
Karsten Hopp |
ab0fac |
# include <exec/types.h>
|
|
Karsten Hopp |
ab0fac |
# include <exec/exec.h>
|
|
Karsten Hopp |
ab0fac |
# include <libraries/dos.h>
|
|
Karsten Hopp |
ab0fac |
# include <intuition/intuition.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
+ /* XXX These are included from os_amiga.h
|
|
Karsten Hopp |
ab0fac |
+ #include <proto/exec.h>
|
|
Karsten Hopp |
ab0fac |
+ #include <proto/dos.h>
|
|
Karsten Hopp |
ab0fac |
+ #include <proto/intuition.h>
|
|
Karsten Hopp |
ab0fac |
+ */
|
|
Karsten Hopp |
ab0fac |
+
|
|
Karsten Hopp |
ab0fac |
#include <exec/memory.h>
|
|
Karsten Hopp |
ab0fac |
+ #include <libraries/dosextens.h>
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#include <dos/dostags.h> /* for 2.0 functions */
|
|
Karsten Hopp |
ab0fac |
#include <dos/dosasl.h>
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
+ /* From version 4 of AmigaOS, several system structures must be allocated
|
|
Karsten Hopp |
ab0fac |
+ * and freed using system functions. "struct AnchorPath" is one.
|
|
Karsten Hopp |
ab0fac |
+ */
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ # include <dos/anchorpath.h>
|
|
Karsten Hopp |
ab0fac |
+ # define free_fib(x) FreeDosObject(DOS_FIB, x)
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
+ # define free_fib(x) vim_free(fib)
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
+
|
|
Karsten Hopp |
ab0fac |
#if defined(LATTICE) && !defined(SASC) && defined(FEAT_ARP)
|
|
Karsten Hopp |
ab0fac |
# include <libraries/arp_pragmas.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 56,62 ****
|
|
Karsten Hopp |
ab0fac |
#undef FALSE
|
|
Karsten Hopp |
ab0fac |
#define FALSE (0)
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #if !defined(AZTEC_C) && !defined(__AROS__)
|
|
Karsten Hopp |
ab0fac |
static long dos_packet __ARGS((struct MsgPort *, long, long));
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
static int lock2name __ARGS((BPTR lock, char_u *buf, long len));
|
|
Karsten Hopp |
ab0fac |
--- 67,75 ----
|
|
Karsten Hopp |
ab0fac |
#undef FALSE
|
|
Karsten Hopp |
ab0fac |
#define FALSE (0)
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
! # define dos_packet(a, b, c) DoPkt(a, b, c, 0, 0, 0, 0)
|
|
Karsten Hopp |
ab0fac |
! #elif !defined(AZTEC_C) && !defined(__AROS__)
|
|
Karsten Hopp |
ab0fac |
static long dos_packet __ARGS((struct MsgPort *, long, long));
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
static int lock2name __ARGS((BPTR lock, char_u *buf, long len));
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 68,74 ****
|
|
Karsten Hopp |
ab0fac |
--- 81,89 ----
|
|
Karsten Hopp |
ab0fac |
static BPTR raw_out = (BPTR)NULL;
|
|
Karsten Hopp |
ab0fac |
static int close_win = FALSE; /* set if Vim opened the window */
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
+ #ifndef __amigaos4__ /* Use autoopen for AmigaOS4 */
|
|
Karsten Hopp |
ab0fac |
struct IntuitionBase *IntuitionBase = NULL;
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
#ifdef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
struct ArpBase *ArpBase = NULL;
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 186,194 ****
|
|
Karsten Hopp |
ab0fac |
--- 201,217 ----
|
|
Karsten Hopp |
ab0fac |
mch_avail_mem(special)
|
|
Karsten Hopp |
ab0fac |
int special;
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ return (long_u)AvailMem(MEMF_ANY);
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
return (long_u)AvailMem(special ? (long)MEMF_CHIP : (long)MEMF_ANY);
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
+ /*
|
|
Karsten Hopp |
ab0fac |
+ * Waits a specified amount of time, or until input arrives if
|
|
Karsten Hopp |
ab0fac |
+ * ignoreinput is FALSE.
|
|
Karsten Hopp |
ab0fac |
+ */
|
|
Karsten Hopp |
ab0fac |
void
|
|
Karsten Hopp |
ab0fac |
mch_delay(msec, ignoreinput)
|
|
Karsten Hopp |
ab0fac |
long msec;
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 252,257 ****
|
|
Karsten Hopp |
ab0fac |
--- 275,281 ----
|
|
Karsten Hopp |
ab0fac |
out_flush();
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
wb_window = NULL;
|
|
Karsten Hopp |
ab0fac |
+ #ifndef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
if ((IntuitionBase = (struct IntuitionBase *)
|
|
Karsten Hopp |
ab0fac |
OpenLibrary((UBYTE *)intlibname, 0L)) == NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 260,265 ****
|
|
Karsten Hopp |
ab0fac |
--- 284,290 ----
|
|
Karsten Hopp |
ab0fac |
mch_errmsg("!?\n");
|
|
Karsten Hopp |
ab0fac |
mch_exit(3);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#include <workbench/startup.h>
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 284,290 ****
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
int i;
|
|
Karsten Hopp |
ab0fac |
BPTR nilfh, fh;
|
|
Karsten Hopp |
ab0fac |
! char_u buf1[20];
|
|
Karsten Hopp |
ab0fac |
char_u buf2[BUF2SIZE];
|
|
Karsten Hopp |
ab0fac |
static char_u *(constrings[3]) = {(char_u *)"con:0/0/662/210/",
|
|
Karsten Hopp |
ab0fac |
(char_u *)"con:0/0/640/200/",
|
|
Karsten Hopp |
ab0fac |
--- 309,315 ----
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
int i;
|
|
Karsten Hopp |
ab0fac |
BPTR nilfh, fh;
|
|
Karsten Hopp |
ab0fac |
! char_u buf1[24];
|
|
Karsten Hopp |
ab0fac |
char_u buf2[BUF2SIZE];
|
|
Karsten Hopp |
ab0fac |
static char_u *(constrings[3]) = {(char_u *)"con:0/0/662/210/",
|
|
Karsten Hopp |
ab0fac |
(char_u *)"con:0/0/640/200/",
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 295,329 ****
|
|
Karsten Hopp |
ab0fac |
char *av;
|
|
Karsten Hopp |
ab0fac |
char_u *device = NULL;
|
|
Karsten Hopp |
ab0fac |
int exitval = 4;
|
|
Karsten Hopp |
ab0fac |
struct Library *DosBase;
|
|
Karsten Hopp |
ab0fac |
int usewin = FALSE;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* check if we are running under DOS 2.0x or higher
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
DosBase = OpenLibrary(DOS_LIBRARY, 37L);
|
|
Karsten Hopp |
ab0fac |
if (DosBase != NULL)
|
|
Karsten Hopp |
ab0fac |
/* if (((struct Library *)DOSBase)->lib_Version >= 37) */
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
CloseLibrary(DosBase);
|
|
Karsten Hopp |
ab0fac |
! #ifdef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
dos2 = TRUE;
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
else /* without arp functions we NEED 2.0 */
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
! #ifndef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
mch_errmsg(_("Need Amigados version 2.04 or later\n"));
|
|
Karsten Hopp |
ab0fac |
exit(3);
|
|
Karsten Hopp |
ab0fac |
! #else
|
|
Karsten Hopp |
ab0fac |
/* need arp functions for dos 1.x */
|
|
Karsten Hopp |
ab0fac |
if (!(ArpBase = (struct ArpBase *) OpenLibrary((UBYTE *)ArpName, ArpVersion)))
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
fprintf(stderr, _("Need %s version %ld\n"), ArpName, ArpVersion);
|
|
Karsten Hopp |
ab0fac |
exit(3);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* scan argv[] for the "-f" and "-d" arguments
|
|
Karsten Hopp |
ab0fac |
--- 320,358 ----
|
|
Karsten Hopp |
ab0fac |
char *av;
|
|
Karsten Hopp |
ab0fac |
char_u *device = NULL;
|
|
Karsten Hopp |
ab0fac |
int exitval = 4;
|
|
Karsten Hopp |
ab0fac |
+ #ifndef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
struct Library *DosBase;
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
int usewin = FALSE;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* check if we are running under DOS 2.0x or higher
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
+ #ifndef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
DosBase = OpenLibrary(DOS_LIBRARY, 37L);
|
|
Karsten Hopp |
ab0fac |
if (DosBase != NULL)
|
|
Karsten Hopp |
ab0fac |
/* if (((struct Library *)DOSBase)->lib_Version >= 37) */
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
CloseLibrary(DosBase);
|
|
Karsten Hopp |
ab0fac |
! # ifdef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
dos2 = TRUE;
|
|
Karsten Hopp |
ab0fac |
! # endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
else /* without arp functions we NEED 2.0 */
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
! # ifndef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
mch_errmsg(_("Need Amigados version 2.04 or later\n"));
|
|
Karsten Hopp |
ab0fac |
exit(3);
|
|
Karsten Hopp |
ab0fac |
! # else
|
|
Karsten Hopp |
ab0fac |
/* need arp functions for dos 1.x */
|
|
Karsten Hopp |
ab0fac |
if (!(ArpBase = (struct ArpBase *) OpenLibrary((UBYTE *)ArpName, ArpVersion)))
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
fprintf(stderr, _("Need %s version %ld\n"), ArpName, ArpVersion);
|
|
Karsten Hopp |
ab0fac |
exit(3);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
! # endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
+ #endif /* __amigaos4__ */
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* scan argv[] for the "-f" and "-d" arguments
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 398,405 ****
|
|
Karsten Hopp |
ab0fac |
--- 427,441 ----
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* Make a unique name for the temp file (which we will not delete!).
|
|
Karsten Hopp |
ab0fac |
* Use a pointer on the stack (nobody else will be using it).
|
|
Karsten Hopp |
ab0fac |
+ * Under AmigaOS4, this assumption might change in the future, so
|
|
Karsten Hopp |
ab0fac |
+ * we use a pointer to the current task instead. This should be a
|
|
Karsten Hopp |
ab0fac |
+ * shared structure and thus globally unique.
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ sprintf((char *)buf1, "t:nc%p", FindTask(0));
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
sprintf((char *)buf1, "t:nc%ld", (long)buf1);
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
if ((fh = Open((UBYTE *)buf1, (long)MODE_NEWFILE)) == (BPTR)NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
mch_errmsg(_("Cannot create "));
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 513,519 ****
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* fname_case(): Set the case of the file name, if it already exists.
|
|
Karsten Hopp |
ab0fac |
! * This will cause the file name to remain exactly the same.
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
/*ARGSUSED*/
|
|
Karsten Hopp |
ab0fac |
void
|
|
Karsten Hopp |
ab0fac |
--- 549,556 ----
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* fname_case(): Set the case of the file name, if it already exists.
|
|
Karsten Hopp |
ab0fac |
! * This will cause the file name to remain exactly the same
|
|
Karsten Hopp |
ab0fac |
! * if the file system ignores, but preserves case.
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
/*ARGSUSED*/
|
|
Karsten Hopp |
ab0fac |
void
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 528,536 ****
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
flen = STRLEN(name);
|
|
Karsten Hopp |
ab0fac |
if (flen == strlen(fib->fib_FileName)) /* safety check */
|
|
Karsten Hopp |
ab0fac |
mch_memmove(name, fib->fib_FileName, flen);
|
|
Karsten Hopp |
ab0fac |
! vim_free(fib);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
--- 565,578 ----
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
flen = STRLEN(name);
|
|
Karsten Hopp |
ab0fac |
+ /* TODO: Check if this fix applies to AmigaOS < 4 too.*/
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ if (fib->fib_DirEntryType == ST_ROOT)
|
|
Karsten Hopp |
ab0fac |
+ strcat(fib->fib_FileName, ":");
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
if (flen == strlen(fib->fib_FileName)) /* safety check */
|
|
Karsten Hopp |
ab0fac |
mch_memmove(name, fib->fib_FileName, flen);
|
|
Karsten Hopp |
ab0fac |
! free_fib(fib);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 548,560 ****
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
if (fname == NULL) /* safety check */
|
|
Karsten Hopp |
ab0fac |
return NULL;
|
|
Karsten Hopp |
ab0fac |
! fib = (struct FileInfoBlock *)malloc(sizeof(struct FileInfoBlock));
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
flock = Lock((UBYTE *)fname, (long)ACCESS_READ);
|
|
Karsten Hopp |
ab0fac |
if (flock == (BPTR)NULL || !Examine(flock, fib))
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
! vim_free(fib); /* in case of an error the memory is freed here */
|
|
Karsten Hopp |
ab0fac |
fib = NULL;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
if (flock)
|
|
Karsten Hopp |
ab0fac |
--- 590,606 ----
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
if (fname == NULL) /* safety check */
|
|
Karsten Hopp |
ab0fac |
return NULL;
|
|
Karsten Hopp |
ab0fac |
! #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
! fib = AllocDosObject(DOS_FIB,0);
|
|
Karsten Hopp |
ab0fac |
! #else
|
|
Karsten Hopp |
ab0fac |
! fib = (struct FileInfoBlock *)alloc(sizeof(struct FileInfoBlock));
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
flock = Lock((UBYTE *)fname, (long)ACCESS_READ);
|
|
Karsten Hopp |
ab0fac |
if (flock == (BPTR)NULL || !Examine(flock, fib))
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
! free_fib(fib); /* in case of an error the memory is freed here */
|
|
Karsten Hopp |
ab0fac |
fib = NULL;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
if (flock)
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 613,618 ****
|
|
Karsten Hopp |
ab0fac |
--- 659,665 ----
|
|
Karsten Hopp |
ab0fac |
char_u *s;
|
|
Karsten Hopp |
ab0fac |
int len;
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
+ /* TODO: Implement this. */
|
|
Karsten Hopp |
ab0fac |
*s = NUL;
|
|
Karsten Hopp |
ab0fac |
return FAIL;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 625,631 ****
|
|
Karsten Hopp |
ab0fac |
--- 672,682 ----
|
|
Karsten Hopp |
ab0fac |
char_u *s;
|
|
Karsten Hopp |
ab0fac |
int len;
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
+ #if defined(__amigaos4__) && defined(__CLIB2__)
|
|
Karsten Hopp |
ab0fac |
+ gethostname(s, len);
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
vim_strncpy(s, "Amiga", len - 1);
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 634,640 ****
|
|
Karsten Hopp |
ab0fac |
--- 685,698 ----
|
|
Karsten Hopp |
ab0fac |
long
|
|
Karsten Hopp |
ab0fac |
mch_get_pid()
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ /* This is as close to a pid as we can come. We could use CLI numbers also,
|
|
Karsten Hopp |
ab0fac |
+ * but then we would have two different types of process identifiers.
|
|
Karsten Hopp |
ab0fac |
+ */
|
|
Karsten Hopp |
ab0fac |
+ return((long)FindTask(0));
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
return (long)0;
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 746,752 ****
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
retval = fib->fib_Protection;
|
|
Karsten Hopp |
ab0fac |
! vim_free(fib);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
return retval;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
--- 804,810 ----
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
retval = fib->fib_Protection;
|
|
Karsten Hopp |
ab0fac |
! free_fib(fib);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
return retval;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 790,797 ****
|
|
Karsten Hopp |
ab0fac |
fib = get_fib(name);
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
retval = ((fib->fib_DirEntryType >= 0) ? TRUE : FALSE);
|
|
Karsten Hopp |
ab0fac |
! vim_free(fib);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
return retval;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
--- 848,859 ----
|
|
Karsten Hopp |
ab0fac |
fib = get_fib(name);
|
|
Karsten Hopp |
ab0fac |
if (fib != NULL)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ retval = (FIB_IS_DRAWER(fib)) ? TRUE : FALSE;
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
retval = ((fib->fib_DirEntryType >= 0) ? TRUE : FALSE);
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
! free_fib(fib);
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
return retval;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 912,918 ****
|
|
Karsten Hopp |
ab0fac |
mch_settmode(tmode)
|
|
Karsten Hopp |
ab0fac |
int tmode;
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
! #ifdef __AROS__
|
|
Karsten Hopp |
ab0fac |
if (!SetMode(raw_in, tmode == TMODE_RAW ? 1 : 0))
|
|
Karsten Hopp |
ab0fac |
#else
|
|
Karsten Hopp |
ab0fac |
if (dos_packet(MP(raw_in), (long)ACTION_SCREEN_MODE,
|
|
Karsten Hopp |
ab0fac |
--- 974,980 ----
|
|
Karsten Hopp |
ab0fac |
mch_settmode(tmode)
|
|
Karsten Hopp |
ab0fac |
int tmode;
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
! #if defined(__AROS__) || defined(__amigaos4__)
|
|
Karsten Hopp |
ab0fac |
if (!SetMode(raw_in, tmode == TMODE_RAW ? 1 : 0))
|
|
Karsten Hopp |
ab0fac |
#else
|
|
Karsten Hopp |
ab0fac |
if (dos_packet(MP(raw_in), (long)ACTION_SCREEN_MODE,
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 954,967 ****
|
|
Karsten Hopp |
ab0fac |
mch_get_shellsize()
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
struct ConUnit *conUnit;
|
|
Karsten Hopp |
ab0fac |
char id_a[sizeof(struct InfoData) + 3];
|
|
Karsten Hopp |
ab0fac |
! struct InfoData *id;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
if (!term_console) /* not an amiga window */
|
|
Karsten Hopp |
ab0fac |
! return FAIL;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/* insure longword alignment */
|
|
Karsten Hopp |
ab0fac |
id = (struct InfoData *)(((long)id_a + 3L) & ~3L);
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* Should make console aware of real window size, not the one we set.
|
|
Karsten Hopp |
ab0fac |
--- 1016,1036 ----
|
|
Karsten Hopp |
ab0fac |
mch_get_shellsize()
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
struct ConUnit *conUnit;
|
|
Karsten Hopp |
ab0fac |
+ #ifndef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
char id_a[sizeof(struct InfoData) + 3];
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
! struct InfoData *id=0;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
if (!term_console) /* not an amiga window */
|
|
Karsten Hopp |
ab0fac |
! goto out;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/* insure longword alignment */
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ if(!(id = AllocDosObject(DOS_INFODATA, 0)))
|
|
Karsten Hopp |
ab0fac |
+ goto out;
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
id = (struct InfoData *)(((long)id_a + 3L) & ~3L);
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* Should make console aware of real window size, not the one we set.
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 983,989 ****
|
|
Karsten Hopp |
ab0fac |
/* it's not an amiga window, maybe aux device */
|
|
Karsten Hopp |
ab0fac |
/* terminal type should be set */
|
|
Karsten Hopp |
ab0fac |
term_console = FALSE;
|
|
Karsten Hopp |
ab0fac |
! return FAIL;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
if (oldwindowtitle == NULL)
|
|
Karsten Hopp |
ab0fac |
oldwindowtitle = (char_u *)wb_window->Title;
|
|
Karsten Hopp |
ab0fac |
--- 1052,1058 ----
|
|
Karsten Hopp |
ab0fac |
/* it's not an amiga window, maybe aux device */
|
|
Karsten Hopp |
ab0fac |
/* terminal type should be set */
|
|
Karsten Hopp |
ab0fac |
term_console = FALSE;
|
|
Karsten Hopp |
ab0fac |
! goto out;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
if (oldwindowtitle == NULL)
|
|
Karsten Hopp |
ab0fac |
oldwindowtitle = (char_u *)wb_window->Title;
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 1006,1011 ****
|
|
Karsten Hopp |
ab0fac |
--- 1075,1086 ----
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
return OK;
|
|
Karsten Hopp |
ab0fac |
+ out:
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ FreeDosObject(DOS_INFODATA, id); /* Safe to pass NULL */
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
+
|
|
Karsten Hopp |
ab0fac |
+ return FAIL;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 1046,1052 ****
|
|
Karsten Hopp |
ab0fac |
OUT_STR_NF(tltoa((unsigned long)n));
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #if !defined(AZTEC_C) && !defined(__AROS__)
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* Sendpacket.c
|
|
Karsten Hopp |
ab0fac |
*
|
|
Karsten Hopp |
ab0fac |
--- 1121,1127 ----
|
|
Karsten Hopp |
ab0fac |
OUT_STR_NF(tltoa((unsigned long)n));
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #if !defined(AZTEC_C) && !defined(__AROS__) && !defined(__amigaos4__)
|
|
Karsten Hopp |
ab0fac |
/*
|
|
Karsten Hopp |
ab0fac |
* Sendpacket.c
|
|
Karsten Hopp |
ab0fac |
*
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 1371,1378 ****
|
|
Karsten Hopp |
ab0fac |
* Use and abuse as you please.
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #define ANCHOR_BUF_SIZE (512)
|
|
Karsten Hopp |
ab0fac |
! #define ANCHOR_SIZE (sizeof(struct AnchorPath) + ANCHOR_BUF_SIZE)
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
int
|
|
Karsten Hopp |
ab0fac |
mch_expandpath(gap, pat, flags)
|
|
Karsten Hopp |
ab0fac |
--- 1446,1457 ----
|
|
Karsten Hopp |
ab0fac |
* Use and abuse as you please.
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
! # define ANCHOR_BUF_SIZE 1024
|
|
Karsten Hopp |
ab0fac |
! #else
|
|
Karsten Hopp |
ab0fac |
! # define ANCHOR_BUF_SIZE (512)
|
|
Karsten Hopp |
ab0fac |
! # define ANCHOR_SIZE (sizeof(struct AnchorPath) + ANCHOR_BUF_SIZE)
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
int
|
|
Karsten Hopp |
ab0fac |
mch_expandpath(gap, pat, flags)
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 1385,1403 ****
|
|
Karsten Hopp |
ab0fac |
char_u *starbuf, *sp, *dp;
|
|
Karsten Hopp |
ab0fac |
int start_len;
|
|
Karsten Hopp |
ab0fac |
int matches;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
start_len = gap->ga_len;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/* Get our AnchorBase */
|
|
Karsten Hopp |
ab0fac |
Anchor = (struct AnchorPath *)alloc_clear((unsigned)ANCHOR_SIZE);
|
|
Karsten Hopp |
ab0fac |
if (Anchor == NULL)
|
|
Karsten Hopp |
ab0fac |
return 0;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
Anchor->ap_Strlen = ANCHOR_BUF_SIZE; /* ap_Length not supported anymore */
|
|
Karsten Hopp |
ab0fac |
! #ifdef APF_DODOT
|
|
Karsten Hopp |
ab0fac |
Anchor->ap_Flags = APF_DODOT | APF_DOWILD; /* allow '.' for current dir */
|
|
Karsten Hopp |
ab0fac |
! #else
|
|
Karsten Hopp |
ab0fac |
Anchor->ap_Flags = APF_DoDot | APF_DoWild; /* allow '.' for current dir */
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifdef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
--- 1464,1495 ----
|
|
Karsten Hopp |
ab0fac |
char_u *starbuf, *sp, *dp;
|
|
Karsten Hopp |
ab0fac |
int start_len;
|
|
Karsten Hopp |
ab0fac |
int matches;
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ struct TagItem AnchorTags[] = {
|
|
Karsten Hopp |
ab0fac |
+ {ADO_Strlen, ANCHOR_BUF_SIZE},
|
|
Karsten Hopp |
ab0fac |
+ {ADO_Flags, APF_DODOT|APF_DOWILD|APF_MultiAssigns},
|
|
Karsten Hopp |
ab0fac |
+ {TAG_DONE, 0L}
|
|
Karsten Hopp |
ab0fac |
+ };
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
start_len = gap->ga_len;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/* Get our AnchorBase */
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ Anchor = AllocDosObject(DOS_ANCHORPATH, AnchorTags);
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
Anchor = (struct AnchorPath *)alloc_clear((unsigned)ANCHOR_SIZE);
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
if (Anchor == NULL)
|
|
Karsten Hopp |
ab0fac |
return 0;
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
+ #ifndef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
Anchor->ap_Strlen = ANCHOR_BUF_SIZE; /* ap_Length not supported anymore */
|
|
Karsten Hopp |
ab0fac |
! # ifdef APF_DODOT
|
|
Karsten Hopp |
ab0fac |
Anchor->ap_Flags = APF_DODOT | APF_DOWILD; /* allow '.' for current dir */
|
|
Karsten Hopp |
ab0fac |
! # else
|
|
Karsten Hopp |
ab0fac |
Anchor->ap_Flags = APF_DoDot | APF_DoWild; /* allow '.' for current dir */
|
|
Karsten Hopp |
ab0fac |
+ # endif
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifdef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 1432,1438 ****
|
|
Karsten Hopp |
ab0fac |
--- 1524,1534 ----
|
|
Karsten Hopp |
ab0fac |
*/
|
|
Karsten Hopp |
ab0fac |
while (Result == 0)
|
|
Karsten Hopp |
ab0fac |
{
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ addfile(gap, (char_u *)Anchor->ap_Buffer, flags);
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
addfile(gap, (char_u *)Anchor->ap_Buf, flags);
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
#ifdef FEAT_ARP
|
|
Karsten Hopp |
ab0fac |
if (dos2)
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 1469,1475 ****
|
|
Karsten Hopp |
ab0fac |
--- 1565,1575 ----
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
Return:
|
|
Karsten Hopp |
ab0fac |
+ #ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ FreeDosObject(DOS_ANCHORPATH, Anchor);
|
|
Karsten Hopp |
ab0fac |
+ #else
|
|
Karsten Hopp |
ab0fac |
vim_free(Anchor);
|
|
Karsten Hopp |
ab0fac |
+ #endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
return matches;
|
|
Karsten Hopp |
ab0fac |
}
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/os_amiga.h Sun Jun 13 22:09:36 2004
|
|
Karsten Hopp |
ab0fac |
--- src/os_amiga.h Wed Nov 1 18:03:32 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 17,25 ****
|
|
Karsten Hopp |
ab0fac |
#define HAVE_AVAIL_MEM
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifndef HAVE_CONFIG_H
|
|
Karsten Hopp |
ab0fac |
! # ifdef AZTEC_C
|
|
Karsten Hopp |
ab0fac |
# define HAVE_STAT_H
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
# define HAVE_STDLIB_H
|
|
Karsten Hopp |
ab0fac |
# define HAVE_STRING_H
|
|
Karsten Hopp |
ab0fac |
# define HAVE_FCNTL_H
|
|
Karsten Hopp |
ab0fac |
--- 17,28 ----
|
|
Karsten Hopp |
ab0fac |
#define HAVE_AVAIL_MEM
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifndef HAVE_CONFIG_H
|
|
Karsten Hopp |
ab0fac |
! # if defined(AZTEC_C) || defined(__amigaos4__)
|
|
Karsten Hopp |
ab0fac |
# define HAVE_STAT_H
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
+ # ifdef __amigaos4__
|
|
Karsten Hopp |
ab0fac |
+ # define HAVE_STDARG_H
|
|
Karsten Hopp |
ab0fac |
+ # endif
|
|
Karsten Hopp |
ab0fac |
# define HAVE_STDLIB_H
|
|
Karsten Hopp |
ab0fac |
# define HAVE_STRING_H
|
|
Karsten Hopp |
ab0fac |
# define HAVE_FCNTL_H
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 34,48 ****
|
|
Karsten Hopp |
ab0fac |
# define HAVE_DATE_TIME
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #define DFLT_ERRORFILE "AztecC.Err"
|
|
Karsten Hopp |
ab0fac |
! #define DFLT_RUNTIMEPATH "home:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,home:vimfiles/after"
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #define BASENAMELEN 26 /* Amiga */
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #define TEMPNAME "t:v?XXXXXX"
|
|
Karsten Hopp |
ab0fac |
! #define TEMPNAMELEN 12
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #endif /* HAVE_CONFIG_H */
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#include <exec/types.h>
|
|
Karsten Hopp |
ab0fac |
#include <libraries/dos.h>
|
|
Karsten Hopp |
ab0fac |
--- 37,60 ----
|
|
Karsten Hopp |
ab0fac |
# define HAVE_DATE_TIME
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #endif /* HAVE_CONFIG_H */
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifndef DFLT_ERRORFILE
|
|
Karsten Hopp |
ab0fac |
! # define DFLT_ERRORFILE "AztecC.Err" /* Should this change? */
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifndef DFLT_RUNTIMEPATH
|
|
Karsten Hopp |
ab0fac |
! # define DFLT_RUNTIMEPATH "home:vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,home:vimfiles/after"
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifndef BASENAMELEN
|
|
Karsten Hopp |
ab0fac |
! # define BASENAMELEN 26 /* Amiga */
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
!
|
|
Karsten Hopp |
ab0fac |
! #ifndef TEMPNAME
|
|
Karsten Hopp |
ab0fac |
! # define TEMPNAME "t:v?XXXXXX"
|
|
Karsten Hopp |
ab0fac |
! # define TEMPNAMELEN 12
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#include <exec/types.h>
|
|
Karsten Hopp |
ab0fac |
#include <libraries/dos.h>
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 155,163 ****
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifdef FEAT_VIMINFO
|
|
Karsten Hopp |
ab0fac |
! #ifndef VIMINFO_FILE
|
|
Karsten Hopp |
ab0fac |
! # define VIMINFO_FILE "s:.viminfo"
|
|
Karsten Hopp |
ab0fac |
! #endif
|
|
Karsten Hopp |
ab0fac |
#endif /* FEAT_VIMINFO */
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifndef EXRC_FILE
|
|
Karsten Hopp |
ab0fac |
--- 167,175 ----
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifdef FEAT_VIMINFO
|
|
Karsten Hopp |
ab0fac |
! # ifndef VIMINFO_FILE
|
|
Karsten Hopp |
ab0fac |
! # define VIMINFO_FILE "s:.viminfo"
|
|
Karsten Hopp |
ab0fac |
! # endif
|
|
Karsten Hopp |
ab0fac |
#endif /* FEAT_VIMINFO */
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#ifndef EXRC_FILE
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/pty.c Sun Jun 13 22:04:27 2004
|
|
Karsten Hopp |
ab0fac |
--- src/pty.c Wed Nov 1 17:53:01 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 51,57 ****
|
|
Karsten Hopp |
ab0fac |
# include <sys/termios.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #if HAVE_SYS_IOCTL_H
|
|
Karsten Hopp |
ab0fac |
# include <sys/ioctl.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
--- 51,57 ----
|
|
Karsten Hopp |
ab0fac |
# include <sys/termios.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifdef HAVE_SYS_IOCTL_H
|
|
Karsten Hopp |
ab0fac |
# include <sys/ioctl.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 69,82 ****
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #if HAVE_UNISTD_H
|
|
Karsten Hopp |
ab0fac |
# include <unistd.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#if HAVE_TERMIO_H
|
|
Karsten Hopp |
ab0fac |
# include <termio.h>
|
|
Karsten Hopp |
ab0fac |
#else
|
|
Karsten Hopp |
ab0fac |
! # if HAVE_TERMIOS_H
|
|
Karsten Hopp |
ab0fac |
# include <termios.h>
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
--- 69,82 ----
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
! #ifdef HAVE_UNISTD_H
|
|
Karsten Hopp |
ab0fac |
# include <unistd.h>
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
#if HAVE_TERMIO_H
|
|
Karsten Hopp |
ab0fac |
# include <termio.h>
|
|
Karsten Hopp |
ab0fac |
#else
|
|
Karsten Hopp |
ab0fac |
! # ifdef HAVE_TERMIOS_H
|
|
Karsten Hopp |
ab0fac |
# include <termios.h>
|
|
Karsten Hopp |
ab0fac |
# endif
|
|
Karsten Hopp |
ab0fac |
#endif
|
|
Karsten Hopp |
ab0fac |
*** ../vim-7.0.155/src/version.c Wed Nov 1 15:31:02 2006
|
|
Karsten Hopp |
ab0fac |
--- src/version.c Wed Nov 1 18:04:17 2006
|
|
Karsten Hopp |
ab0fac |
***************
|
|
Karsten Hopp |
ab0fac |
*** 668,669 ****
|
|
Karsten Hopp |
ab0fac |
--- 668,671 ----
|
|
Karsten Hopp |
ab0fac |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
ab0fac |
+ /**/
|
|
Karsten Hopp |
ab0fac |
+ 156,
|
|
Karsten Hopp |
ab0fac |
/**/
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
--
|
|
Karsten Hopp |
ab0fac |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
ab0fac |
139. You down your lunch in five minutes, at your desk, so you can
|
|
Karsten Hopp |
ab0fac |
spend the rest of the hour surfing the Net.
|
|
Karsten Hopp |
ab0fac |
|
|
Karsten Hopp |
ab0fac |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
ab0fac |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
ab0fac |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
ab0fac |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|