home *** CD-ROM | disk | FTP | other *** search
- diff -cr ram:indent-1.7/indent.c dh1:indent-1.7/indent.c
- *** ram:indent-1.7/indent.c Sat Feb 13 18:17:07 1993
- --- dh1:indent-1.7/indent.c Sat Feb 13 18:31:56 1993
- ***************
- *** 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 /* AMIGA */
- --- 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 /* AMIGA */
- ***************
- *** 1654,1659 ****
- --- 1656,1662 ----
- int using_stdin = false;
- #ifdef AMIGA
- int ex_err;
- + int close_arp();
- #endif /* AMIGA */
-
- #ifdef DEBUG
- ***************
- *** 1662,1672 ****
- #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)
- {
- --- 1665,1677 ----
- #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)
- {
- ***************
- *** 1674,1688 ****
- 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 /* AMIGA */
-
- --- 1679,1696 ----
- 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 /* AMIGA */
-
- ***************
- *** 1879,1890 ****
- 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)
- --- 1887,1898 ----
- 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)
- ***************
- *** 1893,1899 ****
-
- if (err)
- {
- ! MatchEnd (an);
- free (an);
- an = NULL;
- return NULL;
- --- 1901,1907 ----
-
- if (err)
- {
- ! FreeAnchorChain (an);
- free (an);
- an = NULL;
- return NULL;
- ***************
- *** 1937,1943 ****
- argv[argc++] = (*oargv)[0];
- for (i = 1; i < *oargc; i++)
- {
- ! if (ParsePattern ((*oargv)[i], buf, MAXPATH))
- {
- contains_wildcards = 1;
- num_matches = 0;
- --- 1945,1951 ----
- argv[argc++] = (*oargv)[0];
- for (i = 1; i < *oargc; i++)
- {
- ! if (PreParse ((*oargv)[i], buf))
- {
- contains_wildcards = 1;
- num_matches = 0;
- ***************
- *** 1978,1981 ****
- --- 1986,1999 ----
- else
- return 1;
- }
- +
- +
- + int
- + close_arp(i)
- + int i;
- + {
- + if (ArpBase != NULL)
- + CloseLibrary ((struct Library *) ArpBase);
- + return (i);
- + }
- #endif /* AMIGA */
- diff -cr ram:indent-1.7/io.c dh1:indent-1.7/io.c
- *** ram:indent-1.7/io.c Sat Feb 13 18:17:11 1993
- --- dh1:indent-1.7/io.c Sat Feb 13 18:31:57 1993
- ***************
- *** 28,34 ****
-
- #ifdef AMIGA
- #include <exec/types.h>
- ! #include <dos/dos.h>
- #include <proto/dos.h>
- #else /* !AMIGA */
- #include <sys/types.h>
- --- 28,34 ----
-
- #ifdef AMIGA
- #include <exec/types.h>
- ! #include <libraries/dos.h>
- #include <proto/dos.h>
- #else /* !AMIGA */
- #include <sys/types.h>
-