home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / utils / indent13.lha / indent-1.3 / arp-kick-1.3.diffs < prev    next >
Encoding:
Text File  |  1992-06-08  |  4.7 KB  |  212 lines

  1. Binary files indent-1.3-Kick-2.0/indent and indent-1.3-Kick-1.3/indent differ
  2. diff -c indent-1.3-Kick-2.0/indent.c indent-1.3-Kick-1.3/indent.c
  3. *** indent-1.3-Kick-2.0/indent.c    Mon Jun 08 19:02:00 1992
  4. --- indent-1.3-Kick-1.3/indent.c    Mon Jun 08 19:19:36 1992
  5. ***************
  6. *** 35,49 ****
  7.   
  8.   #ifdef AMIGA
  9.   #include <exec/types.h>
  10. ! #include <dos/dos.h>
  11. ! #include <dos/dosextens.h>
  12. ! #include <dos/dosasl.h>
  13.   #include <proto/dos.h>
  14.   
  15.   #define MAXPATH 200
  16.   #define MAXARGS 256
  17.   
  18. ! extern struct DosLibrary *DOSBase;
  19.   
  20.   int expand_args ();
  21.   #endif
  22. --- 35,51 ----
  23.   
  24.   #ifdef AMIGA
  25.   #include <exec/types.h>
  26. ! #include <libraries/dos.h>
  27. ! #include <libraries/dosextens.h>
  28. ! #include <libraries/arpbase.h>
  29. ! #include <proto/arp.h>
  30.   #include <proto/dos.h>
  31. + #include <proto/exec.h>
  32.   
  33.   #define MAXPATH 200
  34.   #define MAXARGS 256
  35.   
  36. ! struct ArpBase *ArpBase;
  37.   
  38.   int expand_args ();
  39.   #endif
  40. ***************
  41. *** 1541,1546 ****
  42. --- 1543,1549 ----
  43.     int using_stdin = false;
  44.   #ifdef AMIGA
  45.     int ex_err;
  46. +   int close_arp();
  47.   #endif
  48.   
  49.   #ifdef DEBUG
  50. ***************
  51. *** 1549,1559 ****
  52.   #endif
  53.   
  54.   #ifdef AMIGA
  55. !   if (DOSBase->dl_lib.lib_Version < 37)
  56. !     {
  57. !       fprintf (stderr, "You must have Kickstart 2.0 (V37) or higher!\n");
  58. !       exit (20);
  59. !     }
  60.   
  61.     if (argc == 2 && stricmp (argv[1],"-h") == 0)
  62.       {
  63. --- 1552,1564 ----
  64.   #endif
  65.   
  66.   #ifdef AMIGA
  67. !   ArpBase = (struct ArpBase *) OpenLibrary("arp.library",39);
  68. !   if (ArpBase != NULL)
  69. !     if(!onexit(close_arp))
  70. !       {
  71. !         fprintf (stderr, "Couldn't initialize properly\n");
  72. !         exit (20);
  73. !       }
  74.   
  75.     if (argc == 2 && stricmp (argv[1],"-h") == 0)
  76.       {
  77. ***************
  78. *** 1561,1575 ****
  79.         exit (0);
  80.       }
  81.   
  82. !   if ((ex_err = expand_args (&argc, &argv)) == 0)
  83.       {
  84. !       fprintf (stderr, "Couldn't expand wildcards\n");
  85. !       exit (20);
  86. !     }
  87. !   if (ex_err == 2)
  88. !     {
  89. !       fprintf (stderr, "Wildcards didn't match a file\n");
  90. !       exit (5);
  91.       }
  92.   #endif
  93.   
  94. --- 1566,1583 ----
  95.         exit (0);
  96.       }
  97.   
  98. !   if (ArpBase != NULL)
  99.       {
  100. !       if ((ex_err = expand_args (&argc, &argv)) == 0)
  101. !         {
  102. !           fprintf (stderr, "Couldn't expand wildcards\n");
  103. !           exit (20);
  104. !         }
  105. !       if (ex_err == 2)
  106. !         {
  107. !           fprintf (stderr, "Wildcards didn't match a file\n");
  108. !           exit (5);
  109. !         }
  110.       }
  111.   #endif
  112.   
  113. ***************
  114. *** 1756,1767 ****
  115.               an = malloc (sizeof (struct AnchorPath) + MAXPATH);
  116.               memset (an, 0, sizeof (struct AnchorPath) + MAXPATH);
  117.               an->ap_BreakBits = SIGBREAKF_CTRL_C;
  118. !             an->ap_Strlen = MAXPATH;
  119. !             an->ap_Flags = APF_DOWILD;
  120. !             err = MatchFirst (pattern, an);
  121.             }
  122.           else
  123. !           err = MatchNext (an);
  124.   
  125.           /* Expand only files */
  126.           if (an->ap_Info.fib_DirEntryType < 0)
  127. --- 1764,1775 ----
  128.               an = malloc (sizeof (struct AnchorPath) + MAXPATH);
  129.               memset (an, 0, sizeof (struct AnchorPath) + MAXPATH);
  130.               an->ap_BreakBits = SIGBREAKF_CTRL_C;
  131. !             an->ap_StrLen = MAXPATH;
  132. !             an->ap_Flags = APF_DoWild;
  133. !             err = FindFirst (pattern, an);
  134.             }
  135.           else
  136. !           err = FindNext (an);
  137.   
  138.           /* Expand only files */
  139.           if (an->ap_Info.fib_DirEntryType < 0)
  140. ***************
  141. *** 1770,1776 ****
  142.   
  143.     if (err)
  144.       {
  145. !       MatchEnd (an);
  146.         free (an);
  147.         an = NULL;
  148.         return NULL;
  149. --- 1778,1784 ----
  150.   
  151.     if (err)
  152.       {
  153. !       FreeAnchorChain (an);
  154.         free (an);
  155.         an = NULL;
  156.         return NULL;
  157. ***************
  158. *** 1814,1820 ****
  159.     argv[argc++] = (*oargv)[0];
  160.     for (i = 1; i < *oargc; i++)
  161.       {
  162. !       if (ParsePattern ((*oargv)[i], buf, MAXPATH))
  163.           {
  164.             contains_wildcards = 1;
  165.             num_matches = 0;
  166. --- 1822,1828 ----
  167.     argv[argc++] = (*oargv)[0];
  168.     for (i = 1; i < *oargc; i++)
  169.       {
  170. !       if (PreParse ((*oargv)[i], buf))
  171.           {
  172.             contains_wildcards = 1;
  173.             num_matches = 0;
  174. ***************
  175. *** 1854,1858 ****
  176. --- 1862,1876 ----
  177.       return 2;
  178.     else
  179.       return 1;
  180. + }
  181. + int
  182. + close_arp(i)
  183. +      int i;
  184. + {
  185. +   if (ArpBase != NULL)
  186. +     CloseLibrary ((struct Library *) ArpBase);
  187. +   return (i);
  188.   }
  189.   #endif
  190. diff -c indent-1.3-Kick-2.0/io.c indent-1.3-Kick-1.3/io.c
  191. *** indent-1.3-Kick-2.0/io.c    Fri Jun 05 21:45:50 1992
  192. --- indent-1.3-Kick-1.3/io.c    Mon Jun 08 19:16:50 1992
  193. ***************
  194. *** 31,37 ****
  195.   
  196.   #ifdef AMIGA
  197.   #include <exec/types.h>
  198. ! #include <dos/dos.h>
  199.   #include <proto/dos.h>
  200.   #define bcopy(s,d,l) memcpy(d,s,l)
  201.   #else
  202. --- 31,37 ----
  203.   
  204.   #ifdef AMIGA
  205.   #include <exec/types.h>
  206. ! #include <libraries/dos.h>
  207.   #include <proto/dos.h>
  208.   #define bcopy(s,d,l) memcpy(d,s,l)
  209.   #else
  210.