home *** CD-ROM | disk | FTP | other *** search
/ TopWare Tools / TOOLS.iso / tools / top1245 / source.zoo / source / Patches.os2 < prev    next >
Encoding:
Text File  |  1992-09-21  |  15.3 KB  |  577 lines

  1. Only in new: patches.os2
  2. Only in new: makefile.emx
  3. Only in new: makefile.os2
  4. Only in new: zoo.def
  5. Only in new: fiz.def
  6. Only in new: addbfmsc.c
  7. Only in new: emx.c
  8. Only in new: msc.c
  9. Only in new: os2.c
  10. diff -cb orig/addfname.c new/addfname.c
  11. *** orig/addfname.c    Thu Jul 11 12:03:20 1991
  12. --- new/addfname.c    Sun Sep 20 19:14:09 1992
  13. ***************
  14. *** 13,21 ****
  15.   parameters suppplied are stored with the name of the file and
  16.   returned by inlist. */
  17.   
  18. - #include "zooio.h"
  19.   #include "various.h"
  20.   #include "zoo.h"
  21.   #include "zoofns.h"
  22.   #include "zoomem.h" /* to get LIST_SIZE */
  23.   
  24. --- 13,21 ----
  25.   parameters suppplied are stored with the name of the file and
  26.   returned by inlist. */
  27.   
  28.   #include "various.h"
  29.   #include "zoo.h"
  30. + #include "zooio.h"
  31.   #include "zoofns.h"
  32.   #include "zoomem.h" /* to get LIST_SIZE */
  33.   
  34. diff -cb orig/basename.c new/basename.c
  35. *** orig/basename.c    Thu Jul 11 12:03:21 1991
  36. --- new/basename.c    Sun Sep 20 19:14:09 1992
  37. ***************
  38. *** 8,15 ****
  39.   */
  40.   
  41.   #include "options.h"
  42. - #include "zooio.h"
  43.   #include "zoo.h"
  44.   #include "parse.h"
  45.   #include "various.h"
  46.   #include "zoofns.h"
  47. --- 8,15 ----
  48.   */
  49.   
  50.   #include "options.h"
  51.   #include "zoo.h"
  52. + #include "zooio.h"
  53.   #include "parse.h"
  54.   #include "various.h"
  55.   #include "zoofns.h"
  56. diff -cb orig/comment.c new/comment.c
  57. *** orig/comment.c    Thu Jul 11 12:03:23 1991
  58. --- new/comment.c    Sun Sep 20 19:13:07 1992
  59. ***************
  60. *** 16,22 ****
  61.   #define  COMMENT_LINE_SIZE 76
  62.   
  63.   #define  MAX_COMMENT_SIZE  32767
  64. - #include "zooio.h"
  65.   #include "various.h"
  66.   
  67.   #ifndef NOSIGNAL
  68. --- 16,21 ----
  69. ***************
  70. *** 24,29 ****
  71. --- 23,29 ----
  72.   #endif
  73.   
  74.   #include "zoo.h"
  75. + #include "zooio.h"
  76.   #include "zoofns.h"
  77.   #include "errors.i"
  78.   
  79. diff -cb orig/crcdefs.c new/crcdefs.c
  80. *** orig/crcdefs.c    Sun Sep 20 21:34:15 1992
  81. --- new/crcdefs.c    Sun Jul 14 19:47:22 1991
  82. ***************
  83. *** 11,17 ****
  84.                                     -- Rahul Dhesi 1987/08/27
  85.   */
  86.   
  87. ! unsigned int crccode;
  88.   unsigned int crctab[] = {
  89.      0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
  90.       0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
  91. --- 11,17 ----
  92.                                     -- Rahul Dhesi 1987/08/27
  93.   */
  94.   
  95. ! unsigned int crccode = 0;
  96.   unsigned int crctab[] = {
  97.      0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
  98.       0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
  99. diff -cb orig/fiz.c new/fiz.c
  100. *** orig/fiz.c    Sun Sep 20 21:34:15 1992
  101. --- new/fiz.c    Sun Sep 20 19:22:02 1992
  102. ***************
  103. *** 15,25 ****
  104.   */
  105.   
  106.   #include "options.h"
  107. - #include "zooio.h"
  108.   #include "various.h"
  109.   #include "zoofns.h"
  110.   #include "portable.h"         /* I/O definitions */
  111. - #include "zoo.h"
  112.   
  113.   void prtctrl ();
  114.   void prtch ();
  115. --- 15,25 ----
  116.   */
  117.   
  118.   #include "options.h"
  119.   #include "various.h"
  120. + #include "zoo.h"
  121. + #include "zooio.h"
  122.   #include "zoofns.h"
  123.   #include "portable.h"         /* I/O definitions */
  124.   
  125.   void prtctrl ();
  126.   void prtch ();
  127. ***************
  128. *** 33,40 ****
  129.      int state;              /* to keep track of how much of tag seen */
  130.      int inch;               /* char just read from archive */
  131.   
  132. !    static char usage1[] = "Fiz 2.0 (1987/02/01) public domain Zoo archive repair utility by Rahul Dhesi\n";
  133. !    static char usage2[] = "Usage:  fiz archive[.zoo]  (\"fiz -h\" for help)\n";
  134.   
  135.   #ifdef SETBUF
  136.   /* set stdout to unbuffered */
  137. --- 33,40 ----
  138.      int state;              /* to keep track of how much of tag seen */
  139.      int inch;               /* char just read from archive */
  140.   
  141. !    static char usage1[] = "\nFiz 2.0 (1987/02/01) public domain Zoo archive repair utility by Rahul Dhesi\n";
  142. !    static char usage2[] = "\nUsage:  fiz archive[.zoo]  (\"fiz -h\" for help)\n";
  143.   
  144.   #ifdef SETBUF
  145.   /* set stdout to unbuffered */
  146. ***************
  147. *** 161,167 ****
  148.   To remove printf:
  149.   :s/^printf("\(.*\)\\n");/\1/
  150.   */
  151. ! printf("Fiz is used to help you recover data from a damaged archive.  Fiz searches\n");
  152.   printf("the specified archive for directory entries and stored files, and prints the\n");
  153.   printf("position of each one found.  Each directory entry contains a number that\n");
  154.   printf("represents the location in the archive where the file is stored;  fiz also\n");
  155. --- 161,167 ----
  156.   To remove printf:
  157.   :s/^printf("\(.*\)\\n");/\1/
  158.   */
  159. ! printf("\nFiz is used to help you recover data from a damaged archive.  Fiz searches\n");
  160.   printf("the specified archive for directory entries and stored files, and prints the\n");
  161.   printf("position of each one found.  Each directory entry contains a number that\n");
  162.   printf("represents the location in the archive where the file is stored;  fiz also\n");
  163. diff -cb orig/lzd.c new/lzd.c
  164. *** orig/lzd.c    Sun Sep 20 21:34:16 1992
  165. --- new/lzd.c    Sun Jul 14 20:38:20 1991
  166. ***************
  167. *** 66,74 ****
  168.   /* wr_dchar() is a macro for speed */
  169.   #define wr_dchar(c) {                             \
  170.                              if (outbufp<outbuflim) \
  171. !                               *outbufp++=(c);     \
  172.                              else                   \
  173. !                               xwr_dchar(c);       \
  174.                       }
  175.   
  176.   extern char *out_buf_adr;        /* output buffer */
  177. --- 66,74 ----
  178.   /* wr_dchar() is a macro for speed */
  179.   #define wr_dchar(c) {                             \
  180.                              if (outbufp<outbuflim) \
  181. !                               *outbufp++=(char)(c);     \
  182.                              else                   \
  183. !                               xwr_dchar((char)c);       \
  184.                       }
  185.   
  186.   extern char *out_buf_adr;        /* output buffer */
  187. diff -cb orig/machine.c new/machine.c
  188. *** orig/machine.c    Sun Sep 20 21:34:16 1992
  189. --- new/machine.c    Sun Sep 20 19:15:07 1992
  190. ***************
  191. *** 12,19 ****
  192.   /* This file is in two parts. */
  193.   
  194.   #include "options.h"
  195. - #include "zooio.h"
  196.   #include "zoo.h"
  197.   #include "zoofns.h"
  198.   #include "various.h"
  199.   
  200. --- 12,19 ----
  201.   /* This file is in two parts. */
  202.   
  203.   #include "options.h"
  204.   #include "zoo.h"
  205. + #include "zooio.h"
  206.   #include "zoofns.h"
  207.   #include "various.h"
  208.   
  209. ***************
  210. *** 69,75 ****
  211.   #endif
  212.   
  213.   #ifdef MSC
  214. ! #include "ERROR -- NOT SUPPORTED"
  215.   #endif
  216.   
  217.   #ifdef TURBOC
  218. --- 69,79 ----
  219.   #endif
  220.   
  221.   #ifdef MSC
  222. ! #include "msc.c"
  223. ! #endif
  224. ! #ifdef __EMX__
  225. ! #include "emx.c"
  226.   #endif
  227.   
  228.   #ifdef TURBOC
  229. diff -cb orig/misc2.c new/misc2.c
  230. *** orig/misc2.c    Thu Jul 11 12:04:07 1991
  231. --- new/misc2.c    Sun Sep 20 19:15:07 1992
  232. ***************
  233. *** 10,20 ****
  234.   #include "options.h"
  235.   /* Miscellaneous routines */
  236.   #include "portable.h"
  237. - #include "zooio.h"
  238.   #include "various.h"
  239.   #include "errors.i"
  240.   #include "zoomem.h"
  241.   #include "zoo.h"
  242.   #include "zoofns.h"     /* only for malloc */
  243.   
  244.   void makepath PARMS((char *));
  245. --- 10,20 ----
  246.   #include "options.h"
  247.   /* Miscellaneous routines */
  248.   #include "portable.h"
  249.   #include "various.h"
  250.   #include "errors.i"
  251.   #include "zoomem.h"
  252.   #include "zoo.h"
  253. + #include "zooio.h"
  254.   #include "zoofns.h"     /* only for malloc */
  255.   
  256.   void makepath PARMS((char *));
  257. diff -cb orig/nextfile.c new/nextfile.c
  258. *** orig/nextfile.c    Sun Sep 20 21:34:16 1992
  259. --- new/nextfile.c    Sun Jul 14 18:49:29 1991
  260. ***************
  261. *** 54,59 ****
  262. --- 54,61 ----
  263.   #else
  264.   /* if not PORTABLE  then */
  265.   
  266. + #ifndef OS2 /* the OS/2 version sits in os2.c to cleanly separate all
  267. +                OS-dependent code in one module */
  268.   #include <dir.h>
  269.   #include <dos.h>
  270.   #include "assert.h"     /* macro definition:  assert() macro            */
  271. ***************
  272. *** 203,205 ****
  273. --- 205,208 ----
  274.      new_path[start_pos+13] = '\0';
  275.   }
  276.   #endif /* PORTABLE */
  277. + #endif /* OS2 */
  278. diff -cb orig/options.c new/options.c
  279. *** orig/options.c    Thu Jul 11 12:04:10 1991
  280. --- new/options.c    Sun Sep 20 19:18:05 1992
  281. ***************
  282. *** 12,20 ****
  283.   */
  284.   
  285.   #include "options.h"
  286. - #include "zooio.h"
  287.   #include "various.h"
  288.   #include "zoo.h"
  289.   #include "zoofns.h"
  290.   #include "errors.i"
  291.   
  292. --- 12,20 ----
  293.   */
  294.   
  295.   #include "options.h"
  296.   #include "various.h"
  297.   #include "zoo.h"
  298. + #include "zooio.h"
  299.   #include "zoofns.h"
  300.   #include "errors.i"
  301.   
  302. diff -cb orig/options.h new/options.h
  303. *** orig/options.h    Sun Sep 20 21:34:16 1992
  304. --- new/options.h    Sun Sep 20 20:18:23 1992
  305. ***************
  306. *** 234,239 ****
  307. --- 234,290 ----
  308.   #endif
  309.   
  310.   /***********************************************************************/
  311. + /* Microsoft C 6.00 for MS-DOS and OS/2, emx for OS/2                  */
  312. + /***********************************************************************/
  313. + #if defined(MSC) || defined(__EMX__)
  314. + #undef PORTABLE
  315. + #define FILTER
  316. + #define NEEDCTYP
  317. + #define MEMSET
  318. + #define ANSI_HDRS
  319. + /* #define USE_ASCII */
  320. + #define SPECINIT
  321. + #define SPECEXIT
  322. + #define PURIFY
  323. + #define DISK_CH ':'
  324. + #define IGNORECASE
  325. + #define WILDCARD "*.*"
  326. + #ifndef OS2
  327. + #define FOLD
  328. + #endif
  329. + #define FORCESLASH
  330. + #define FNLIMIT 256
  331. + #define CUR_DIR "."
  332. + #define PATH_SEP ":/\\"
  333. + #define EXT_SEP  ":/\\."
  334. + #define SETMODE
  335. + #define MODE_BIN(f)      setmode(fileno(f), 0x8000)
  336. + #define MODE_TEXT(f)     setmode(fileno(f), 0x4000)
  337. + #define NEED_STDIO
  338. + #define ANSI_PROTO
  339. + #define VOIDPTR        void *
  340. + #define REN_STDC
  341. + #define STDARG
  342. + #define T_UINT16        unsigned short        /* must be 16 bit unsigned */
  343. + /* #define UNBUF_IO */
  344. + /* #define UNBUF_LIMIT    512 */
  345. + #define  T_SIGNAL void
  346. + #define DIRECT_CONVERT
  347. + #define STDARG
  348. + #define HAVE_ISATTY
  349. + #ifdef  PORTABLE        /* for testing only */
  350. + # define SPECNEXT
  351. + # define NIXTIME
  352. + # undef  WILDCARD
  353. + #endif
  354. + #define FPUTCHAR
  355. + #ifdef __GNUC__
  356. + #pragma pack(1)
  357. + #endif
  358. + #endif /* MSC, __EMX__ */
  359. + /***********************************************************************/
  360.   /* GENERIC **IX SYSTEM -- GOOD STARTING POINT FOR YOURS                */
  361.   /***********************************************************************/
  362.   
  363. diff -cb orig/portable.c new/portable.c
  364. *** orig/portable.c    Sun Jul 14 22:38:12 1991
  365. --- new/portable.c    Sun Sep 20 20:24:13 1992
  366. ***************
  367. *** 289,295 ****
  368.   BYTE bytes[];
  369.   int word;
  370.   {
  371. !    * (int *) bytes = word;
  372.   }
  373.   
  374.   /**********************
  375. --- 289,295 ----
  376.   BYTE bytes[];
  377.   int word;
  378.   {
  379. !    * (unsigned short *) bytes = (unsigned short) (word & 0xffff);
  380.   }
  381.   
  382.   /**********************
  383. ***************
  384. *** 299,305 ****
  385.   int to_int(data)
  386.   BYTE data[];
  387.   {
  388. !    return (*(int *) data);
  389.   }
  390.   
  391.   #endif /* ifndef DIRECT_CONVERT .. else ... */
  392. --- 299,305 ----
  393.   int to_int(data)
  394.   BYTE data[];
  395.   {
  396. !    return (*(unsigned short *) data);
  397.   }
  398.   
  399.   #endif /* ifndef DIRECT_CONVERT .. else ... */
  400. diff -cb orig/portable.h new/portable.h
  401. *** orig/portable.h    Thu Jul 11 12:04:14 1991
  402. --- new/portable.h    Sun Sep 20 19:13:20 1992
  403. ***************
  404. *** 42,49 ****
  405.   int mkdir PARMS((char *));
  406.   #endif
  407.   
  408. ! /* Microsoft C 3.0 */
  409. ! #ifdef   MSC
  410.   /* options for zooopen(), zoocreate() */
  411.   #define  Z_WRITE        "r+b"
  412.   #define  Z_READ         "rb"
  413. --- 42,49 ----
  414.   int mkdir PARMS((char *));
  415.   #endif
  416.   
  417. ! /* Microsoft C, emx, other PC compilers? */
  418. ! #if defined(MSC) || defined(__EMX__)
  419.   /* options for zooopen(), zoocreate() */
  420.   #define  Z_WRITE        "r+b"
  421.   #define  Z_READ         "rb"
  422. ***************
  423. *** 53,59 ****
  424.   #define  zputc(c, f)        putc(c, f)
  425.   #define    zputchar(c)        putchar(c)
  426.   #define  MKDIR(x)       mkdir(x)
  427. - int mkdir (char *);
  428.   #endif
  429.   
  430.   #ifdef VMS
  431. --- 53,58 ----
  432. diff -cb orig/prterror.c new/prterror.c
  433. *** orig/prterror.c    Thu Jul 11 12:04:15 1991
  434. --- new/prterror.c    Sun Sep 20 19:18:05 1992
  435. ***************
  436. *** 16,21 ****
  437. --- 16,22 ----
  438.   #define    OK_STDIO
  439.   #endif
  440.   #include "various.h"
  441. + #include "zoo.h"
  442.   #include "zooio.h"
  443.   #include "zoofns.h"
  444.   
  445. diff -cb orig/zoo.c new/zoo.c
  446. *** orig/zoo.c    Sun Sep 20 21:34:17 1992
  447. --- new/zoo.c    Sun Sep 20 19:18:05 1992
  448. ***************
  449. *** 16,25 ****
  450.   (C) Copyright 1991 Rahul Dhesi -- All rights reserved
  451.   */
  452.   #include "options.h"
  453. - #include "zooio.h"
  454.   #include "various.h"
  455.   
  456.   #include "zoo.h"
  457.   #include "zoofns.h"
  458.   
  459.   #include "errors.i"
  460. --- 16,25 ----
  461.   (C) Copyright 1991 Rahul Dhesi -- All rights reserved
  462.   */
  463.   #include "options.h"
  464.   #include "various.h"
  465.   
  466.   #include "zoo.h"
  467. + #include "zooio.h"
  468.   #include "zoofns.h"
  469.   
  470.   #include "errors.i"
  471. ***************
  472. *** 34,41 ****
  473.   
  474.   int instr PARMS ((char *, char *));
  475.   
  476. ! char *out_buf_adr;      /* points to memory allocated for output buffer(s) */
  477. ! char *in_buf_adr;       /* points to memory allocated for input buffer */
  478.   
  479.   /* static declarations */
  480.   int quiet = 0;             /* whether to be quiet */
  481. --- 34,41 ----
  482.   
  483.   int instr PARMS ((char *, char *));
  484.   
  485. ! char *out_buf_adr = NULL;      /* points to memory allocated for output buffer(s) */
  486. ! char *in_buf_adr = NULL;       /* points to memory allocated for input buffer */
  487.   
  488.   /* static declarations */
  489.   int quiet = 0;             /* whether to be quiet */
  490. ***************
  491. *** 56,62 ****
  492.   #ifdef OOZ
  493.   #else
  494.   /* else not OOZ */
  495. !       static char usage[] = "Usage: zoo {acDeglLPTuUvx}[aAcCdEfInmMNoOpPqu1:/.@n] archive file\n(\"zoo h\" for help, \"zoo H\" for extended help)\n";
  496.         static char nov_usage[] =
  497.             "\nNovice usage:  zoo -cmd archive[.zoo] file...  where -cmd is one of these:\n";
  498.         char *option;
  499. --- 56,62 ----
  500.   #ifdef OOZ
  501.   #else
  502.   /* else not OOZ */
  503. !       static char usage[] = "\nUsage: zoo {acDeglLPTuUvx}[aAcCdEfInmMNoOpPqu1:/.@n] archive file\n(\"zoo h\" for help, \"zoo H\" for extended help)\n";
  504.         static char nov_usage[] =
  505.             "\nNovice usage:  zoo -cmd archive[.zoo] file...  where -cmd is one of these:\n";
  506.         char *option;
  507. ***************
  508. *** 276,282 ****
  509.   
  510.   /* usage list including Novice commands */
  511.   show_usage:
  512. !    fprintf (stderr, "%s\n\n%s%s%s", version, usage, nov_usage, nov_cmds);
  513.       zooexit (1);
  514.   
  515.   /* brief usage list */
  516. --- 276,284 ----
  517.   
  518.   /* usage list including Novice commands */
  519.   show_usage:
  520. !    printf ("\nZoo archiver, %s\n", version);
  521. !    printf ("(C) Copyright 1988 Rahul Dhesi -- Noncommercial use permitted\n");
  522. !    printf ("%s%s%s", usage, nov_usage, nov_cmds);
  523.       zooexit (1);
  524.   
  525.   /* brief usage list */
  526. diff -cb orig/zoofilt.c new/zoofilt.c
  527. *** orig/zoofilt.c    Sun Sep 20 21:34:17 1992
  528. --- new/zoofilt.c    Sun Sep 20 19:18:05 1992
  529. ***************
  530. *** 16,21 ****
  531. --- 16,22 ----
  532.   
  533.   #ifdef FILTER
  534.   
  535. + #include "zoo.h"
  536.   #include "zooio.h"
  537.   #include "errors.i"
  538.   #include "zoofns.h"
  539. ***************
  540. *** 54,59 ****
  541. --- 55,62 ----
  542.                   }
  543.       }
  544.   
  545. +         MODE_BIN(stdin);
  546. +         MODE_BIN(stdout);
  547.       crccode = 0;    /* needed whether compressing or uncompressing */
  548.   
  549.       switch (choice) {
  550. diff -cb orig/zoopack.c new/zoopack.c
  551. *** orig/zoopack.c    Thu Jul 11 12:05:01 1991
  552. --- new/zoopack.c    Sun Sep 20 19:18:26 1992
  553. ***************
  554. *** 23,31 ****
  555.   
  556.   
  557.   #include "portable.h"
  558. - #include "zooio.h"
  559.   #include "various.h"
  560.   #include "zoo.h"
  561.   #include "zoofns.h"
  562.   #include "errors.i"
  563.   #ifndef NOSIGNAL
  564. --- 23,31 ----
  565.   
  566.   
  567.   #include "portable.h"
  568.   #include "various.h"
  569.   #include "zoo.h"
  570. + #include "zooio.h"
  571.   #include "zoofns.h"
  572.   #include "errors.i"
  573.   #ifndef NOSIGNAL
  574.