home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d7xx
/
d702
/
indent.lha
/
Indent
/
Indent.lha
/
indent-1.4arp-kick-1.3.diffs
< prev
next >
Wrap
Text File
|
1992-06-24
|
5KB
|
211 lines
diff -c -r indent-1.4-Kick-2.0/indent.c indent-1.4-Kick-1.3/indent.c
*** indent-1.4-Kick-2.0/indent.c Wed Jun 24 20:24:15 1992
--- indent-1.4-Kick-1.3/indent.c Wed Jun 24 21:26:46 1992
***************
*** 23,37 ****
#ifdef AMIGA
#include <exec/types.h>
! #include <dos/dos.h>
! #include <dos/dosextens.h>
! #include <dos/dosasl.h>
#include <proto/dos.h>
#define MAXPATH 200
#define MAXARGS 256
! extern struct DosLibrary *DOSBase;
int expand_args ();
#endif
--- 23,39 ----
#ifdef AMIGA
#include <exec/types.h>
! #include <libraries/dos.h>
! #include <libraries/dosextens.h>
! #include <libraries/arpbase.h>
! #include <proto/arp.h>
#include <proto/dos.h>
+ #include <proto/exec.h>
#define MAXPATH 200
#define MAXARGS 256
! struct ArpBase *ArpBase;
int expand_args ();
#endif
***************
*** 1531,1536 ****
--- 1533,1539 ----
int using_stdin = false;
#ifdef AMIGA
int ex_err;
+ int close_arp();
#endif
#ifdef DEBUG
***************
*** 1539,1549 ****
#endif
#ifdef AMIGA
! if (DOSBase->dl_lib.lib_Version < 37)
! {
! fprintf (stderr, "You must have Kickstart 2.0 (V37) or higher!\n");
! exit (20);
! }
if (argc == 2 && stricmp (argv[1],"-h") == 0)
{
--- 1542,1554 ----
#endif
#ifdef AMIGA
! ArpBase = (struct ArpBase *) OpenLibrary("arp.library",39);
! if (ArpBase != NULL)
! if(!onexit(close_arp))
! {
! fprintf (stderr, "Couldn't initialize properly\n");
! exit (20);
! }
if (argc == 2 && stricmp (argv[1],"-h") == 0)
{
***************
*** 1551,1565 ****
exit (0);
}
! if ((ex_err = expand_args (&argc, &argv)) == 0)
{
! fprintf (stderr, "Couldn't expand wildcards\n");
! exit (20);
! }
! if (ex_err == 2)
! {
! fprintf (stderr, "Wildcards didn't match a file\n");
! exit (5);
}
#endif
--- 1556,1573 ----
exit (0);
}
! if (ArpBase != NULL)
{
! if ((ex_err = expand_args (&argc, &argv)) == 0)
! {
! fprintf (stderr, "Couldn't expand wildcards\n");
! exit (20);
! }
! if (ex_err == 2)
! {
! fprintf (stderr, "Wildcards didn't match a file\n");
! exit (5);
! }
}
#endif
***************
*** 1753,1764 ****
an = malloc (sizeof (struct AnchorPath) + MAXPATH);
memset (an, 0, sizeof (struct AnchorPath) + MAXPATH);
an->ap_BreakBits = SIGBREAKF_CTRL_C;
! an->ap_Strlen = MAXPATH;
! an->ap_Flags = APF_DOWILD;
! err = MatchFirst (pattern, an);
}
else
! err = MatchNext (an);
/* Expand only files */
if (an->ap_Info.fib_DirEntryType < 0)
--- 1761,1772 ----
an = malloc (sizeof (struct AnchorPath) + MAXPATH);
memset (an, 0, sizeof (struct AnchorPath) + MAXPATH);
an->ap_BreakBits = SIGBREAKF_CTRL_C;
! an->ap_StrLen = MAXPATH;
! an->ap_Flags = APF_DoWild;
! err = FindFirst (pattern, an);
}
else
! err = FindNext (an);
/* Expand only files */
if (an->ap_Info.fib_DirEntryType < 0)
***************
*** 1767,1773 ****
if (err)
{
! MatchEnd (an);
free (an);
an = NULL;
return NULL;
--- 1775,1781 ----
if (err)
{
! FreeAnchorChain (an);
free (an);
an = NULL;
return NULL;
***************
*** 1811,1817 ****
argv[argc++] = (*oargv)[0];
for (i = 1; i < *oargc; i++)
{
! if (ParsePattern ((*oargv)[i], buf, MAXPATH))
{
contains_wildcards = 1;
num_matches = 0;
--- 1819,1825 ----
argv[argc++] = (*oargv)[0];
for (i = 1; i < *oargc; i++)
{
! if (PreParse ((*oargv)[i], buf))
{
contains_wildcards = 1;
num_matches = 0;
***************
*** 1851,1855 ****
--- 1859,1873 ----
return 2;
else
return 1;
+ }
+
+
+ int
+ close_arp(i)
+ int i;
+ {
+ if (ArpBase != NULL)
+ CloseLibrary ((struct Library *) ArpBase);
+ return (i);
}
#endif
diff -c -r indent-1.4-Kick-2.0/io.c indent-1.4-Kick-1.3/io.c
*** indent-1.4-Kick-2.0/io.c Wed Jun 24 20:30:58 1992
--- indent-1.4-Kick-1.3/io.c Wed Jun 24 21:26:53 1992
***************
*** 28,34 ****
#ifdef AMIGA
#include <exec/types.h>
! #include <dos/dos.h>
#include <proto/dos.h>
#define bcopy(s,d,l) memcpy(d,s,l)
#else
--- 28,34 ----
#ifdef AMIGA
#include <exec/types.h>
! #include <libraries/dos.h>
#include <proto/dos.h>
#define bcopy(s,d,l) memcpy(d,s,l)
#else