home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zoo21-2.zip / source / Patches.os2 < prev    next >
Text File  |  1993-10-06  |  16KB  |  588 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. *** 52,59 ****
  424.   #define    zgetc(x)            getc(x)
  425.   #define  zputc(c, f)        putc(c, f)
  426.   #define    zputchar(c)        putchar(c)
  427.   #define  MKDIR(x)       mkdir(x)
  428. - int mkdir (char *);
  429.   #endif
  430.   #endif
  431.   
  432. --- 52,61 ----
  433.   #define    zgetc(x)            getc(x)
  434.   #define  zputc(c, f)        putc(c, f)
  435.   #define    zputchar(c)        putchar(c)
  436. + #ifdef __EMX__
  437. + #define  MKDIR(x)       mkdir(x, 0777)
  438. + #else
  439.   #define  MKDIR(x)       mkdir(x)
  440.   #endif
  441.   #endif
  442.   
  443. diff -cb orig/prterror.c new/prterror.c
  444. *** orig/prterror.c    Thu Jul 11 12:04:15 1991
  445. --- new/prterror.c    Sun Sep 20 19:18:05 1992
  446. ***************
  447. *** 16,21 ****
  448. --- 16,22 ----
  449.   #define    OK_STDIO
  450.   #endif
  451.   #include "various.h"
  452. + #include "zoo.h"
  453.   #include "zooio.h"
  454.   #include "zoofns.h"
  455.   
  456. diff -cb orig/zoo.c new/zoo.c
  457. *** orig/zoo.c    Sun Sep 20 21:34:17 1992
  458. --- new/zoo.c    Sun Sep 20 19:18:05 1992
  459. ***************
  460. *** 16,25 ****
  461.   (C) Copyright 1991 Rahul Dhesi -- All rights reserved
  462.   */
  463.   #include "options.h"
  464. - #include "zooio.h"
  465.   #include "various.h"
  466.   
  467.   #include "zoo.h"
  468.   #include "zoofns.h"
  469.   
  470.   #include "errors.i"
  471. --- 16,25 ----
  472.   (C) Copyright 1991 Rahul Dhesi -- All rights reserved
  473.   */
  474.   #include "options.h"
  475.   #include "various.h"
  476.   
  477.   #include "zoo.h"
  478. + #include "zooio.h"
  479.   #include "zoofns.h"
  480.   
  481.   #include "errors.i"
  482. ***************
  483. *** 34,41 ****
  484.   
  485.   int instr PARMS ((char *, char *));
  486.   
  487. ! char *out_buf_adr;      /* points to memory allocated for output buffer(s) */
  488. ! char *in_buf_adr;       /* points to memory allocated for input buffer */
  489.   
  490.   /* static declarations */
  491.   int quiet = 0;             /* whether to be quiet */
  492. --- 34,41 ----
  493.   
  494.   int instr PARMS ((char *, char *));
  495.   
  496. ! char *out_buf_adr = NULL;      /* points to memory allocated for output buffer(s) */
  497. ! char *in_buf_adr = NULL;       /* points to memory allocated for input buffer */
  498.   
  499.   /* static declarations */
  500.   int quiet = 0;             /* whether to be quiet */
  501. ***************
  502. *** 56,62 ****
  503.   #ifdef OOZ
  504.   #else
  505.   /* else not OOZ */
  506. !       static char usage[] = "Usage: zoo {acDeglLPTuUvx}[aAcCdEfInmMNoOpPqu1:/.@n] archive file\n(\"zoo h\" for help, \"zoo H\" for extended help)\n";
  507.         static char nov_usage[] =
  508.             "\nNovice usage:  zoo -cmd archive[.zoo] file...  where -cmd is one of these:\n";
  509.         char *option;
  510. --- 56,62 ----
  511.   #ifdef OOZ
  512.   #else
  513.   /* else not OOZ */
  514. !       static char usage[] = "\nUsage: zoo {acDeglLPTuUvx}[aAcCdEfInmMNoOpPqu1:/.@n] archive file\n(\"zoo h\" for help, \"zoo H\" for extended help)\n";
  515.         static char nov_usage[] =
  516.             "\nNovice usage:  zoo -cmd archive[.zoo] file...  where -cmd is one of these:\n";
  517.         char *option;
  518. ***************
  519. *** 276,282 ****
  520.   
  521.   /* usage list including Novice commands */
  522.   show_usage:
  523. !    fprintf (stderr, "%s\n\n%s%s%s", version, usage, nov_usage, nov_cmds);
  524.       zooexit (1);
  525.   
  526.   /* brief usage list */
  527. --- 276,284 ----
  528.   
  529.   /* usage list including Novice commands */
  530.   show_usage:
  531. !    printf ("\nZoo archiver, %s\n", version);
  532. !    printf ("(C) Copyright 1988 Rahul Dhesi -- Noncommercial use permitted\n");
  533. !    printf ("%s%s%s", usage, nov_usage, nov_cmds);
  534.       zooexit (1);
  535.   
  536.   /* brief usage list */
  537. diff -cb orig/zoofilt.c new/zoofilt.c
  538. *** orig/zoofilt.c    Sun Sep 20 21:34:17 1992
  539. --- new/zoofilt.c    Sun Sep 20 19:18:05 1992
  540. ***************
  541. *** 16,21 ****
  542. --- 16,22 ----
  543.   
  544.   #ifdef FILTER
  545.   
  546. + #include "zoo.h"
  547.   #include "zooio.h"
  548.   #include "errors.i"
  549.   #include "zoofns.h"
  550. ***************
  551. *** 54,59 ****
  552. --- 55,62 ----
  553.                   }
  554.       }
  555.   
  556. +         MODE_BIN(stdin);
  557. +         MODE_BIN(stdout);
  558.       crccode = 0;    /* needed whether compressing or uncompressing */
  559.   
  560.       switch (choice) {
  561. diff -cb orig/zoopack.c new/zoopack.c
  562. *** orig/zoopack.c    Thu Jul 11 12:05:01 1991
  563. --- new/zoopack.c    Sun Sep 20 19:18:26 1992
  564. ***************
  565. *** 23,31 ****
  566.   
  567.   
  568.   #include "portable.h"
  569. - #include "zooio.h"
  570.   #include "various.h"
  571.   #include "zoo.h"
  572.   #include "zoofns.h"
  573.   #include "errors.i"
  574.   #ifndef NOSIGNAL
  575. --- 23,31 ----
  576.   
  577.   
  578.   #include "portable.h"
  579.   #include "various.h"
  580.   #include "zoo.h"
  581. + #include "zooio.h"
  582.   #include "zoofns.h"
  583.   #include "errors.i"
  584.   #ifndef NOSIGNAL
  585.