home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 9 Archive
/
09-Archive.zip
/
zoo21-2.zip
/
source
/
Patches.os2
< prev
next >
Wrap
Text File
|
1993-10-06
|
16KB
|
588 lines
Only in new: patches.os2
Only in new: makefile.emx
Only in new: makefile.os2
Only in new: zoo.def
Only in new: fiz.def
Only in new: addbfmsc.c
Only in new: emx.c
Only in new: msc.c
Only in new: os2.c
diff -cb orig/addfname.c new/addfname.c
*** orig/addfname.c Thu Jul 11 12:03:20 1991
--- new/addfname.c Sun Sep 20 19:14:09 1992
***************
*** 13,21 ****
parameters suppplied are stored with the name of the file and
returned by inlist. */
- #include "zooio.h"
#include "various.h"
#include "zoo.h"
#include "zoofns.h"
#include "zoomem.h" /* to get LIST_SIZE */
--- 13,21 ----
parameters suppplied are stored with the name of the file and
returned by inlist. */
#include "various.h"
#include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h"
#include "zoomem.h" /* to get LIST_SIZE */
diff -cb orig/basename.c new/basename.c
*** orig/basename.c Thu Jul 11 12:03:21 1991
--- new/basename.c Sun Sep 20 19:14:09 1992
***************
*** 8,15 ****
*/
#include "options.h"
- #include "zooio.h"
#include "zoo.h"
#include "parse.h"
#include "various.h"
#include "zoofns.h"
--- 8,15 ----
*/
#include "options.h"
#include "zoo.h"
+ #include "zooio.h"
#include "parse.h"
#include "various.h"
#include "zoofns.h"
diff -cb orig/comment.c new/comment.c
*** orig/comment.c Thu Jul 11 12:03:23 1991
--- new/comment.c Sun Sep 20 19:13:07 1992
***************
*** 16,22 ****
#define COMMENT_LINE_SIZE 76
#define MAX_COMMENT_SIZE 32767
- #include "zooio.h"
#include "various.h"
#ifndef NOSIGNAL
--- 16,21 ----
***************
*** 24,29 ****
--- 23,29 ----
#endif
#include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h"
#include "errors.i"
diff -cb orig/crcdefs.c new/crcdefs.c
*** orig/crcdefs.c Sun Sep 20 21:34:15 1992
--- new/crcdefs.c Sun Jul 14 19:47:22 1991
***************
*** 11,17 ****
-- Rahul Dhesi 1987/08/27
*/
! unsigned int crccode;
unsigned int crctab[] = {
0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
--- 11,17 ----
-- Rahul Dhesi 1987/08/27
*/
! unsigned int crccode = 0;
unsigned int crctab[] = {
0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
diff -cb orig/fiz.c new/fiz.c
*** orig/fiz.c Sun Sep 20 21:34:15 1992
--- new/fiz.c Sun Sep 20 19:22:02 1992
***************
*** 15,25 ****
*/
#include "options.h"
- #include "zooio.h"
#include "various.h"
#include "zoofns.h"
#include "portable.h" /* I/O definitions */
- #include "zoo.h"
void prtctrl ();
void prtch ();
--- 15,25 ----
*/
#include "options.h"
#include "various.h"
+ #include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h"
#include "portable.h" /* I/O definitions */
void prtctrl ();
void prtch ();
***************
*** 33,40 ****
int state; /* to keep track of how much of tag seen */
int inch; /* char just read from archive */
! static char usage1[] = "Fiz 2.0 (1987/02/01) public domain Zoo archive repair utility by Rahul Dhesi\n";
! static char usage2[] = "Usage: fiz archive[.zoo] (\"fiz -h\" for help)\n";
#ifdef SETBUF
/* set stdout to unbuffered */
--- 33,40 ----
int state; /* to keep track of how much of tag seen */
int inch; /* char just read from archive */
! static char usage1[] = "\nFiz 2.0 (1987/02/01) public domain Zoo archive repair utility by Rahul Dhesi\n";
! static char usage2[] = "\nUsage: fiz archive[.zoo] (\"fiz -h\" for help)\n";
#ifdef SETBUF
/* set stdout to unbuffered */
***************
*** 161,167 ****
To remove printf:
:s/^printf("\(.*\)\\n");/\1/
*/
! printf("Fiz is used to help you recover data from a damaged archive. Fiz searches\n");
printf("the specified archive for directory entries and stored files, and prints the\n");
printf("position of each one found. Each directory entry contains a number that\n");
printf("represents the location in the archive where the file is stored; fiz also\n");
--- 161,167 ----
To remove printf:
:s/^printf("\(.*\)\\n");/\1/
*/
! printf("\nFiz is used to help you recover data from a damaged archive. Fiz searches\n");
printf("the specified archive for directory entries and stored files, and prints the\n");
printf("position of each one found. Each directory entry contains a number that\n");
printf("represents the location in the archive where the file is stored; fiz also\n");
diff -cb orig/lzd.c new/lzd.c
*** orig/lzd.c Sun Sep 20 21:34:16 1992
--- new/lzd.c Sun Jul 14 20:38:20 1991
***************
*** 66,74 ****
/* wr_dchar() is a macro for speed */
#define wr_dchar(c) { \
if (outbufp<outbuflim) \
! *outbufp++=(c); \
else \
! xwr_dchar(c); \
}
extern char *out_buf_adr; /* output buffer */
--- 66,74 ----
/* wr_dchar() is a macro for speed */
#define wr_dchar(c) { \
if (outbufp<outbuflim) \
! *outbufp++=(char)(c); \
else \
! xwr_dchar((char)c); \
}
extern char *out_buf_adr; /* output buffer */
diff -cb orig/machine.c new/machine.c
*** orig/machine.c Sun Sep 20 21:34:16 1992
--- new/machine.c Sun Sep 20 19:15:07 1992
***************
*** 12,19 ****
/* This file is in two parts. */
#include "options.h"
- #include "zooio.h"
#include "zoo.h"
#include "zoofns.h"
#include "various.h"
--- 12,19 ----
/* This file is in two parts. */
#include "options.h"
#include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h"
#include "various.h"
***************
*** 69,75 ****
#endif
#ifdef MSC
! #include "ERROR -- NOT SUPPORTED"
#endif
#ifdef TURBOC
--- 69,79 ----
#endif
#ifdef MSC
! #include "msc.c"
! #endif
!
! #ifdef __EMX__
! #include "emx.c"
#endif
#ifdef TURBOC
diff -cb orig/misc2.c new/misc2.c
*** orig/misc2.c Thu Jul 11 12:04:07 1991
--- new/misc2.c Sun Sep 20 19:15:07 1992
***************
*** 10,20 ****
#include "options.h"
/* Miscellaneous routines */
#include "portable.h"
- #include "zooio.h"
#include "various.h"
#include "errors.i"
#include "zoomem.h"
#include "zoo.h"
#include "zoofns.h" /* only for malloc */
void makepath PARMS((char *));
--- 10,20 ----
#include "options.h"
/* Miscellaneous routines */
#include "portable.h"
#include "various.h"
#include "errors.i"
#include "zoomem.h"
#include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h" /* only for malloc */
void makepath PARMS((char *));
diff -cb orig/nextfile.c new/nextfile.c
*** orig/nextfile.c Sun Sep 20 21:34:16 1992
--- new/nextfile.c Sun Jul 14 18:49:29 1991
***************
*** 54,59 ****
--- 54,61 ----
#else
/* if not PORTABLE then */
+ #ifndef OS2 /* the OS/2 version sits in os2.c to cleanly separate all
+ OS-dependent code in one module */
#include <dir.h>
#include <dos.h>
#include "assert.h" /* macro definition: assert() macro */
***************
*** 203,205 ****
--- 205,208 ----
new_path[start_pos+13] = '\0';
}
#endif /* PORTABLE */
+ #endif /* OS2 */
diff -cb orig/options.c new/options.c
*** orig/options.c Thu Jul 11 12:04:10 1991
--- new/options.c Sun Sep 20 19:18:05 1992
***************
*** 12,20 ****
*/
#include "options.h"
- #include "zooio.h"
#include "various.h"
#include "zoo.h"
#include "zoofns.h"
#include "errors.i"
--- 12,20 ----
*/
#include "options.h"
#include "various.h"
#include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h"
#include "errors.i"
diff -cb orig/options.h new/options.h
*** orig/options.h Sun Sep 20 21:34:16 1992
--- new/options.h Sun Sep 20 20:18:23 1992
***************
*** 234,239 ****
--- 234,290 ----
#endif
/***********************************************************************/
+ /* Microsoft C 6.00 for MS-DOS and OS/2, emx for OS/2 */
+ /***********************************************************************/
+
+ #if defined(MSC) || defined(__EMX__)
+ #undef PORTABLE
+ #define FILTER
+ #define NEEDCTYP
+ #define MEMSET
+ #define ANSI_HDRS
+ /* #define USE_ASCII */
+ #define SPECINIT
+ #define SPECEXIT
+ #define PURIFY
+ #define DISK_CH ':'
+ #define IGNORECASE
+ #define WILDCARD "*.*"
+ #ifndef OS2
+ #define FOLD
+ #endif
+ #define FORCESLASH
+ #define FNLIMIT 256
+ #define CUR_DIR "."
+ #define PATH_SEP ":/\\"
+ #define EXT_SEP ":/\\."
+ #define SETMODE
+ #define MODE_BIN(f) setmode(fileno(f), 0x8000)
+ #define MODE_TEXT(f) setmode(fileno(f), 0x4000)
+ #define NEED_STDIO
+ #define ANSI_PROTO
+ #define VOIDPTR void *
+ #define REN_STDC
+ #define STDARG
+ #define T_UINT16 unsigned short /* must be 16 bit unsigned */
+ /* #define UNBUF_IO */
+ /* #define UNBUF_LIMIT 512 */
+ #define T_SIGNAL void
+ #define DIRECT_CONVERT
+ #define STDARG
+ #define HAVE_ISATTY
+ #ifdef PORTABLE /* for testing only */
+ # define SPECNEXT
+ # define NIXTIME
+ # undef WILDCARD
+ #endif
+ #define FPUTCHAR
+ #ifdef __GNUC__
+ #pragma pack(1)
+ #endif
+ #endif /* MSC, __EMX__ */
+
+ /***********************************************************************/
/* GENERIC **IX SYSTEM -- GOOD STARTING POINT FOR YOURS */
/***********************************************************************/
diff -cb orig/portable.c new/portable.c
*** orig/portable.c Sun Jul 14 22:38:12 1991
--- new/portable.c Sun Sep 20 20:24:13 1992
***************
*** 289,295 ****
BYTE bytes[];
int word;
{
! * (int *) bytes = word;
}
/**********************
--- 289,295 ----
BYTE bytes[];
int word;
{
! * (unsigned short *) bytes = (unsigned short) (word & 0xffff);
}
/**********************
***************
*** 299,305 ****
int to_int(data)
BYTE data[];
{
! return (*(int *) data);
}
#endif /* ifndef DIRECT_CONVERT .. else ... */
--- 299,305 ----
int to_int(data)
BYTE data[];
{
! return (*(unsigned short *) data);
}
#endif /* ifndef DIRECT_CONVERT .. else ... */
diff -cb orig/portable.h new/portable.h
*** orig/portable.h Thu Jul 11 12:04:14 1991
--- new/portable.h Sun Sep 20 19:13:20 1992
***************
*** 42,49 ****
int mkdir PARMS((char *));
#endif
! /* Microsoft C 3.0 */
! #ifdef MSC
/* options for zooopen(), zoocreate() */
#define Z_WRITE "r+b"
#define Z_READ "rb"
--- 42,49 ----
int mkdir PARMS((char *));
#endif
! /* Microsoft C, emx, other PC compilers? */
! #if defined(MSC) || defined(__EMX__)
/* options for zooopen(), zoocreate() */
#define Z_WRITE "r+b"
#define Z_READ "rb"
***************
*** 52,59 ****
#define zgetc(x) getc(x)
#define zputc(c, f) putc(c, f)
#define zputchar(c) putchar(c)
#define MKDIR(x) mkdir(x)
- int mkdir (char *);
#endif
#endif
--- 52,61 ----
#define zgetc(x) getc(x)
#define zputc(c, f) putc(c, f)
#define zputchar(c) putchar(c)
+ #ifdef __EMX__
+ #define MKDIR(x) mkdir(x, 0777)
+ #else
#define MKDIR(x) mkdir(x)
#endif
#endif
diff -cb orig/prterror.c new/prterror.c
*** orig/prterror.c Thu Jul 11 12:04:15 1991
--- new/prterror.c Sun Sep 20 19:18:05 1992
***************
*** 16,21 ****
--- 16,22 ----
#define OK_STDIO
#endif
#include "various.h"
+ #include "zoo.h"
#include "zooio.h"
#include "zoofns.h"
diff -cb orig/zoo.c new/zoo.c
*** orig/zoo.c Sun Sep 20 21:34:17 1992
--- new/zoo.c Sun Sep 20 19:18:05 1992
***************
*** 16,25 ****
(C) Copyright 1991 Rahul Dhesi -- All rights reserved
*/
#include "options.h"
- #include "zooio.h"
#include "various.h"
#include "zoo.h"
#include "zoofns.h"
#include "errors.i"
--- 16,25 ----
(C) Copyright 1991 Rahul Dhesi -- All rights reserved
*/
#include "options.h"
#include "various.h"
#include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h"
#include "errors.i"
***************
*** 34,41 ****
int instr PARMS ((char *, char *));
! char *out_buf_adr; /* points to memory allocated for output buffer(s) */
! char *in_buf_adr; /* points to memory allocated for input buffer */
/* static declarations */
int quiet = 0; /* whether to be quiet */
--- 34,41 ----
int instr PARMS ((char *, char *));
! char *out_buf_adr = NULL; /* points to memory allocated for output buffer(s) */
! char *in_buf_adr = NULL; /* points to memory allocated for input buffer */
/* static declarations */
int quiet = 0; /* whether to be quiet */
***************
*** 56,62 ****
#ifdef OOZ
#else
/* else not OOZ */
! static char usage[] = "Usage: zoo {acDeglLPTuUvx}[aAcCdEfInmMNoOpPqu1:/.@n] archive file\n(\"zoo h\" for help, \"zoo H\" for extended help)\n";
static char nov_usage[] =
"\nNovice usage: zoo -cmd archive[.zoo] file... where -cmd is one of these:\n";
char *option;
--- 56,62 ----
#ifdef OOZ
#else
/* else not OOZ */
! static char usage[] = "\nUsage: zoo {acDeglLPTuUvx}[aAcCdEfInmMNoOpPqu1:/.@n] archive file\n(\"zoo h\" for help, \"zoo H\" for extended help)\n";
static char nov_usage[] =
"\nNovice usage: zoo -cmd archive[.zoo] file... where -cmd is one of these:\n";
char *option;
***************
*** 276,282 ****
/* usage list including Novice commands */
show_usage:
! fprintf (stderr, "%s\n\n%s%s%s", version, usage, nov_usage, nov_cmds);
zooexit (1);
/* brief usage list */
--- 276,284 ----
/* usage list including Novice commands */
show_usage:
! printf ("\nZoo archiver, %s\n", version);
! printf ("(C) Copyright 1988 Rahul Dhesi -- Noncommercial use permitted\n");
! printf ("%s%s%s", usage, nov_usage, nov_cmds);
zooexit (1);
/* brief usage list */
diff -cb orig/zoofilt.c new/zoofilt.c
*** orig/zoofilt.c Sun Sep 20 21:34:17 1992
--- new/zoofilt.c Sun Sep 20 19:18:05 1992
***************
*** 16,21 ****
--- 16,22 ----
#ifdef FILTER
+ #include "zoo.h"
#include "zooio.h"
#include "errors.i"
#include "zoofns.h"
***************
*** 54,59 ****
--- 55,62 ----
}
}
+ MODE_BIN(stdin);
+ MODE_BIN(stdout);
crccode = 0; /* needed whether compressing or uncompressing */
switch (choice) {
diff -cb orig/zoopack.c new/zoopack.c
*** orig/zoopack.c Thu Jul 11 12:05:01 1991
--- new/zoopack.c Sun Sep 20 19:18:26 1992
***************
*** 23,31 ****
#include "portable.h"
- #include "zooio.h"
#include "various.h"
#include "zoo.h"
#include "zoofns.h"
#include "errors.i"
#ifndef NOSIGNAL
--- 23,31 ----
#include "portable.h"
#include "various.h"
#include "zoo.h"
+ #include "zooio.h"
#include "zoofns.h"
#include "errors.i"
#ifndef NOSIGNAL