View | Details | Raw Unified
Collapse All | Expand All

(-) zoo/ar.h (-10 / +8 lines)
 Lines 15-25    Link Here 
/* uchar should be 8 bits or more */
/* uchar should be 8 bits or more */
/* typedef unsigned char  uchar;   -- already in zoo.h */
/* typedef unsigned char  uchar;   -- already in zoo.h */
typedef unsigned int   uint;    /* 16 bits or more */
typedef unsigned int   my_uint;    /* 16 bits or more */
#if !defined(__386BSD__) || !defined(_TYPES_H_)
typedef unsigned short my_ushort;  /* 16 bits or more */
typedef unsigned short ushort;  /* 16 bits or more */
typedef unsigned long  my_ulong;   /* 32 bits or more */
#endif
typedef unsigned long  ulong;   /* 32 bits or more */
/* T_UINT16 must be #defined in options.h to be 
/* T_UINT16 must be #defined in options.h to be 
a 16-bit unsigned integer type */
a 16-bit unsigned integer type */
 Lines 49-55    Link Here 
/* ar.c */
/* ar.c */
extern int unpackable;
extern int unpackable;
extern ulong origsize, compsize;
extern my_ulong origsize, compsize;
/* all the prototypes follow here for all files */
/* all the prototypes follow here for all files */
 Lines 78-84    Link Here 
/* DECODE.C */
/* DECODE.C */
void decode_start PARMS((void ));
void decode_start PARMS((void ));
int decode PARMS((uint count , uchar *buffer));
int decode PARMS((uint count , uchar buffer []));
/* ENCODE.C */
/* ENCODE.C */
void encode PARMS((FILE *, FILE *));
void encode PARMS((FILE *, FILE *));
 Lines 87-100    Link Here 
void output PARMS((uint c , uint p ));
void output PARMS((uint c , uint p ));
void huf_encode_start PARMS((void ));
void huf_encode_start PARMS((void ));
void huf_encode_end PARMS((void ));
void huf_encode_end PARMS((void ));
uint decode_c PARMS((void ));
my_uint decode_c PARMS((void ));
uint decode_p PARMS((void ));
my_uint decode_p PARMS((void ));
void huf_decode_start PARMS((void ));
void huf_decode_start PARMS((void ));
/* IO.C */
/* IO.C */
void make_crctable PARMS((void ));
void make_crctable PARMS((void ));
void fillbuf PARMS((int n ));
void fillbuf PARMS((int n ));
uint getbits PARMS((int n ));
my_uint getbits PARMS((int n ));
void putbits PARMS((int n , uint x ));
void putbits PARMS((int n , uint x ));
int fread_crc PARMS((uchar *p , int n , FILE *f ));
int fread_crc PARMS((uchar *p , int n , FILE *f ));
void fwrite_crc PARMS((uchar *p , int n , FILE *f ));
void fwrite_crc PARMS((uchar *p , int n , FILE *f ));
(-) zoo/basename.c (-1 / +1 lines)
 Lines 18-24    Link Here 
/* This function strips device/directory information from
/* This function strips device/directory information from
a pathname and returns just the plain filename */
a pathname and returns just the plain filename */
void basename (pathname, fname)
void mybasename (pathname, fname)
char *pathname;
char *pathname;
char fname[];
char fname[];
{
{
(-) zoo/bsd.c (-13 / +1 lines)
 Lines 74-99    Link Here 
#define SEC_IN_DAY	(24L * 60L * 60L)
#define SEC_IN_DAY	(24L * 60L * 60L)
#define INV_VALUE		(SEC_IN_DAY + 1L)
#define INV_VALUE		(SEC_IN_DAY + 1L)
	static long retval = INV_VALUE;	     /* cache, init to impossible value */
	static long retval = INV_VALUE;	     /* cache, init to impossible value */
#ifndef __386BSD__
   struct timeval tp;
   struct timeval tp;
   struct timezone tzp;
   struct timezone tzp;
#else
   time_t lt;
   struct tm *tm;
#endif
	if (retval != INV_VALUE)				 /* if have cached value, return it */
	if (retval != INV_VALUE)				 /* if have cached value, return it */
		return retval;
		return retval;
#ifndef __386BSD__
   gettimeofday (&tp, &tzp);              /* specific to 4.3BSD */
   gettimeofday (&tp, &tzp);              /* specific to 4.3BSD */
   /* return (tzp.tz_minuteswest * 60); */ /* old incorrect code */
   /* return (tzp.tz_minuteswest * 60); */ /* old incorrect code */
	/* Timezone fix thanks to Bill Davidsen <wedu@ge-crd.ARPA> */
	/* Timezone fix thanks to Bill Davidsen <wedu@ge-crd.ARPA> */
	/* !! - ache@hq.demos.su */
	retval = tzp.tz_minuteswest * 60 - tzp.tz_dsttime * 3600L;
	retval = tzp.tz_minuteswest * 60 - (tzp.tz_dsttime != 0) * 3600L;
#else
	time(&lt);
	tm = localtime(&lt);
	retval = -tm->tm_gmtoff;
#endif
	return retval;
	return retval;
}
}
(-) zoo/decode.c (-4 / +4 lines)
 Lines 27-34    Link Here 
*/
*/
int decode(count, buffer)
int decode(count, buffer)
uint count;
my_uint count;
uchar *buffer;
uchar buffer[];
	/* The calling function must keep the number of
	/* The calling function must keep the number of
	   bytes to be processed.  This function decodes
	   bytes to be processed.  This function decodes
	   either 'count' bytes or 'DICSIZ' bytes, whichever
	   either 'count' bytes or 'DICSIZ' bytes, whichever
 Lines 37-44    Link Here 
	   Call decode_start() once for each new file
	   Call decode_start() once for each new file
	   before calling this function. */
	   before calling this function. */
{
{
	static uint i;
	static my_uint i;
	uint r, c;
	my_uint r, c;
	r = 0;
	r = 0;
	while (--j >= 0) {
	while (--j >= 0) {
(-) zoo/encode.c (-5 / +5 lines)
 Lines 5-15    Link Here 
Adapted from "ar" archiver written by Haruhiko Okumura.
Adapted from "ar" archiver written by Haruhiko Okumura.
*/
*/
#ifdef ANSI_HDRS
# include <stdlib.h>
# include <string.h>
#endif
#include "options.h"
#include "options.h"
#include "zoo.h"
#include "zoo.h"
#include "ar.h"
#include "ar.h"
 Lines 20-25    Link Here 
#include <assert.h>
#include <assert.h>
#ifdef ANSI_HDRS
# include <stdlib.h>
# include <string.h>
#endif
#include "errors.i"
#include "errors.i"
FILE *lzh_infile;
FILE *lzh_infile;
(-) zoo/huf.c (-4 / +4 lines)
 Lines 5-14    Link Here 
Adapted from "ar" archiver written by Haruhiko Okumura.
Adapted from "ar" archiver written by Haruhiko Okumura.
***********************************************************/
***********************************************************/
#ifdef ANSI_HDRS
# include <stdlib.h>
#endif
#include "options.h"
#include "options.h"
#include "zoo.h"
#include "zoo.h"
#include "ar.h"
#include "ar.h"
 Lines 17-22    Link Here 
extern void prterror();
extern void prterror();
#ifdef ANSI_HDRS
# include <stdlib.h>
#endif
#define NP (DICBIT + 1)
#define NP (DICBIT + 1)
#define NT (CODE_BIT + 3)
#define NT (CODE_BIT + 3)
#define PBIT 4  /* smallest integer such that (1U << PBIT) > NP */
#define PBIT 4  /* smallest integer such that (1U << PBIT) > NP */
(-) zoo/lzd.c (-1 / +1 lines)
 Lines 59-65    Link Here 
extern unsigned int filt_lzd_word;
extern unsigned int filt_lzd_word;
#endif /* FILTER */
#endif /* FILTER */
void xwr_dchar PARMS ((int));
void xwr_dchar PARMS ((char));
static int firstchar PARMS ((int));
static int firstchar PARMS ((int));
static void cbfill PARMS ((void));
static void cbfill PARMS ((void));
(-) zoo/lzh.c (-2 / +2 lines)
 Lines 45-58    Link Here 
	decode_start();
	decode_start();
	while (!decoded) {
	while (!decoded) {
		n = decode((uint) DICSIZ, (uchar *)out_buf_adr); /* n = count of chars decoded */
		n = decode((my_uint) DICSIZ, out_buf_adr); /* n = count of chars decoded */
#ifdef COUNT_BYTES
#ifdef COUNT_BYTES
		bytes_decoded += n;	/*debug*/
		bytes_decoded += n;	/*debug*/
#endif
#endif
#ifdef CHECK_BREAK
#ifdef CHECK_BREAK
		check_break();
		check_break();
#endif
#endif
		fwrite_crc((uchar *)out_buf_adr, n, outfile);
		fwrite_crc(out_buf_adr, n, outfile);
#ifdef SHOW_DOTS
#ifdef SHOW_DOTS
		(void) putc('.', stderr);
		(void) putc('.', stderr);
		(void) fflush(stderr);
		(void) fflush(stderr);
(-) zoo/lzh.h (-1 / +1 lines)
 Lines 34-37    Link Here 
#define CBIT 9  /* $\lfloor \log_2 NC \rfloor + 1$ */
#define CBIT 9  /* $\lfloor \log_2 NC \rfloor + 1$ */
#define CODE_BIT  16  /* codeword length */
#define CODE_BIT  16  /* codeword length */
extern ushort left[], right[];
extern my_ushort left[], right[];
(-) zoo/makefile (-4 / +9 lines)
 Lines 18-30    Link Here 
MAKE = make	      # needed for some systems e.g. older BSD
MAKE = make	      # needed for some systems e.g. older BSD
CC = cc
CC = gcc
CFLAGS =
CFLAGS =
MODEL =
MODEL =
EXTRA = -DBIG_MEM -DNDEBUG
EXTRA = -DBIG_MEM -DNDEBUG
LINTFLAGS = -DLINT
LINTFLAGS = -DLINT
OPTIM = -O
OPTIM = -O3
DESTDIR = /usr/local/bin
DESTDIR = /usr/bin
#List of all object files created for Zoo
#List of all object files created for Zoo
ZOOOBJS = addbfcrc.o addfname.o basename.o comment.o crcdefs.o \
ZOOOBJS = addbfcrc.o addfname.o basename.o comment.o crcdefs.o \
 Lines 50-55    Link Here 
	@echo "generic:      generic **IX environment, minimal functionlity"
	@echo "generic:      generic **IX environment, minimal functionlity"
	@echo "bsd:          4.3BSD or reasonable equivalent"
	@echo "bsd:          4.3BSD or reasonable equivalent"
	@echo "bsdansi:      4.3BSD with ANSI C"
	@echo "bsdansi:      4.3BSD with ANSI C"
	@echo "linux:	     Linux for Alpha & i386"
	@echo "ultrix:       ULTRIX 4.1"
	@echo "ultrix:       ULTRIX 4.1"
	@echo "convex:       Convex C200 series"
	@echo "convex:       Convex C200 series"
	@echo "sysv:         System V Release 2 or 3; or SCO Xenix"
	@echo "sysv:         System V Release 2 or 3; or SCO Xenix"
 Lines 106-111    Link Here 
convex:
convex:
	$(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS)
	$(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS)
# Linux
linux:
	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V -DANSI_HDRS -DHAVE_MKDIR" $(TARGETS)
# SysV.2, V.3, SCO Xenix
# SysV.2, V.3, SCO Xenix
sysv:
sysv:
	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" $(TARGETS)
	$(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" $(TARGETS)
 Lines 235-241    Link Here 
parse.o: zoofns.h zooio.h
parse.o: zoofns.h zooio.h
portable.o: /usr/include/stdio.h assert.h debug.h machine.h options.h
portable.o: /usr/include/stdio.h assert.h debug.h machine.h options.h
portable.o: portable.h various.h zoo.h zoofns.h zooio.h
portable.o: portable.h various.h zoo.h zoofns.h zooio.h
prterror.o: /usr/include/stdio.h /usr/include/varargs.h options.h various.h
prterror.o: /usr/include/stdio.h options.h various.h
prterror.o: zoofns.h zooio.h
prterror.o: zoofns.h zooio.h
sysv.o: /usr/include/sys/stat.h /usr/include/sys/types.h /usr/include/time.h
sysv.o: /usr/include/sys/stat.h /usr/include/sys/types.h /usr/include/time.h
sysv.o: nixmode.i nixtime.i
sysv.o: nixmode.i nixtime.i
(-) zoo/maketbl.c (-5 / +5 lines)
 Lines 16-25    Link Here 
int nchar;
int nchar;
uchar bitlen[];
uchar bitlen[];
int tablebits;
int tablebits;
ushort table[];
my_ushort table[];
{
{
	ushort count[17], weight[17], start[18], *p;
	my_ushort count[17], weight[17], start[18], *p;
	uint i, k, len, ch, jutbits, avail, nextcode, mask;
	my_uint i, k, len, ch, jutbits, avail, nextcode, mask;
	for (i = 1; i <= 16; i++) count[i] = 0;
	for (i = 1; i <= 16; i++) count[i] = 0;
	for (i = 0; i < nchar; i++) count[bitlen[i]]++;
	for (i = 0; i < nchar; i++) count[bitlen[i]]++;
 Lines 27-33    Link Here 
	start[1] = 0;
	start[1] = 0;
	for (i = 1; i <= 16; i++)
	for (i = 1; i <= 16; i++)
		start[i + 1] = start[i] + (count[i] << (16 - i));
		start[i + 1] = start[i] + (count[i] << (16 - i));
	if (start[17] != (ushort)((unsigned) 1 << 16))
	if (start[17] != (my_ushort)((unsigned) 1 << 16))
		prterror('f', "Bad decode table\n");
		prterror('f', "Bad decode table\n");
	jutbits = 16 - tablebits;
	jutbits = 16 - tablebits;
 Lines 41-47    Link Here 
        }
        }
	i = start[tablebits + 1] >> jutbits;
	i = start[tablebits + 1] >> jutbits;
	if (i != (ushort)((unsigned) 1 << 16)) {
	if (i != (my_ushort)((unsigned) 1 << 16)) {
		k = 1 << tablebits;
		k = 1 << tablebits;
		while (i != k) table[i++] = 0;
		while (i != k) table[i++] = 0;
	}
	}
(-) zoo/maketree.c (-6 / +6 lines)
 Lines 12-18    Link Here 
static int    n, heapsize;
static int    n, heapsize;
static short  heap[NC + 1];
static short  heap[NC + 1];
static ushort *freq, *sortptr, len_cnt[17];
static my_ushort *freq, *sortptr, len_cnt[17];
static uchar  *len;
static uchar  *len;
static void count_len(i)  /* call with i = root */
static void count_len(i)  /* call with i = root */
 Lines 33-39    Link Here 
int root;
int root;
{
{
	int i, k;
	int i, k;
	uint cum;
	my_uint cum;
	for (i = 0; i <= 16; i++) len_cnt[i] = 0;
	for (i = 0; i <= 16; i++) len_cnt[i] = 0;
	count_len(root);
	count_len(root);
 Lines 75-84    Link Here 
static void make_code(j, length, code)
static void make_code(j, length, code)
int j;
int j;
uchar length[];
uchar length[];
ushort code[];
my_ushort code[];
{
{
	int    i;
	int    i;
	ushort start[18];
	my_ushort start[18];
	start[1] = 0;
	start[1] = 0;
	for (i = 1; i <= 16; i++)
	for (i = 1; i <= 16; i++)
 Lines 88-96    Link Here 
int make_tree(nparm, freqparm, lenparm, codeparm)
int make_tree(nparm, freqparm, lenparm, codeparm)
int nparm;
int nparm;
ushort freqparm[];
my_ushort freqparm[];
uchar lenparm[];
uchar lenparm[];
ushort codeparm[];
my_ushort codeparm[];
	/* make tree, calculate len[], return root */
	/* make tree, calculate len[], return root */
{
{
	int i, j, k, avail;
	int i, j, k, avail;
(-) zoo/options.h (-13 / +4 lines)
 Lines 31-37    Link Here 
#define GETTZ
#define GETTZ
#define FATTR
#define FATTR
#define T_SIGNAL	void
#define T_SIGNAL	void
#define VARARGS
#define STDARG
#define NEED_MEMMOVE
#define NEED_MEMMOVE
/* #define NEED_MEMCPY */
/* #define NEED_MEMCPY */
#define T_UINT16		unsigned short		/* must be 16 bit unsigned */
#define T_UINT16		unsigned short		/* must be 16 bit unsigned */
 Lines 73-78    Link Here 
/* #define UNBUF_LIMIT	512 */
/* #define UNBUF_LIMIT	512 */
#define  T_SIGNAL void
#define  T_SIGNAL void
#define DIRECT_CONVERT
#define DIRECT_CONVERT
#define STDARG
#define CHECK_BREAK
#define CHECK_BREAK
#define check_break kbhit
#define check_break kbhit
#define HAVE_ISATTY
#define HAVE_ISATTY
 Lines 88-93    Link Here 
/***********************************************************************/
/***********************************************************************/
#ifdef BSD4_3
#ifdef BSD4_3
#define NOSTRCHR /* not really needed for 4.3BSD */
#define FILTER
#define FILTER
#define IO_MACROS
#define IO_MACROS
#define EXISTS(f)		(access(f, 00) == 0)
#define EXISTS(f)		(access(f, 00) == 0)
 Lines 101-123    Link Here 
#define SETBUF
#define SETBUF
#define GETTZ
#define GETTZ
#define FATTR
#define FATTR
#ifdef __STDC__
#ifndef ANSI_HDRS
#define ANSI_HDRS
#endif
#define T_SIGNAL        void
#define STDARG
#define ANSI_PROTO
#define VOIDPTR		void *
#else
#define NOSTRCHR /* not really needed for 4.3BSD */
#define T_SIGNAL	int
#define T_SIGNAL	int
#define VARARGS
#define VARARGS
#define NEED_MEMMOVE
#define NEED_MEMMOVE
#define NEED_VPRINTF		/* older BSDs only; newer ones have vprintf */
#endif
#define T_UINT16		unsigned short		/* must be 16 bit unsigned */
#define T_UINT16		unsigned short		/* must be 16 bit unsigned */
#define HAVE_ISATTY
#define HAVE_ISATTY
#define NEED_VPRINTF		/* older BSDs only; newer ones have vprintf */
#endif /* BSD4_3 */
#endif /* BSD4_3 */
/*  Ultrix 4.1 */
/*  Ultrix 4.1 */
(-) zoo/prterror.c (-36 / +6 lines)
 Lines 23-37    Link Here 
# include <ctype.h>	/* for isdigit() */
# include <ctype.h>	/* for isdigit() */
#endif
#endif
#ifdef STDARG
# include <stdarg.h>
# include <stdarg.h>
#else
# ifdef VARARGS
#  include <varargs.h>
# else
#  include "MUST DEFINE STDARG OR VARARGS"
# endif
#endif
#ifdef NEED_VPRINTF
#ifdef NEED_VPRINTF
static int zvfprintf();
static int zvfprintf();
 Lines 115-143    Link Here 
char could_not_open[] = "Could not open %s.\n";
char could_not_open[] = "Could not open %s.\n";
#endif
#endif
#ifdef STDARG
void prterror(level, format, a, b, c, d)
void prterror(int level, char *format, ...)
register int level;
#else
char *format, *a, *b, *c, *d;
/*VARARGS*/
void prterror(va_alist)
va_dcl
#endif
{
{
	va_list args;
   char string[120];       /* local format string */
   char string[120];       /* local format string */
#ifdef VARARGS
	int level;
	char *format;
#endif
#ifdef STDARG
	va_start(args, format);
#else
	va_start(args);
	level = va_arg(args, int);
	format = va_arg(args, char *);
#endif
   *string = '\0';         /* get a null string to begin with */
   *string = '\0';         /* get a null string to begin with */
#ifdef OOZ
#ifdef OOZ
 Lines 149-155    Link Here 
   switch (level) {
   switch (level) {
      case 'M': *string = '\0';                    /* fall through to 'm' */
      case 'M': *string = '\0';                    /* fall through to 'm' */
      case 'm': if (quiet) return; break;
      case 'm': if (quiet) return; break;
      case 'w': 
      case 'w':
			if (quiet > 1) return;
			if (quiet > 1) return;
			strcat (string, "WARNING:  "); break;
			strcat (string, "WARNING:  "); break;
      case 'e': 
      case 'e': 
 Lines 163-174    Link Here 
   strcat (string, format);      /* just append supplied format string */
   strcat (string, format);      /* just append supplied format string */
	/* and print the whole thing */
	/* and print the whole thing */
#ifdef NEED_VPRINTF
   printf (string, a, b, c, d);   /* and print the whole thing */
	(void) zvfprintf(stdout, string, args);
        fflush (stdout);
#else
   (void) vprintf(string, args);
#endif
	fflush (stdout);
   if (level == 'f')       /* and abort on fatal error 'f' but not 'F' */
   if (level == 'f')       /* and abort on fatal error 'f' but not 'F' */
      zooexit (1);
      zooexit (1);
(-) zoo/sysv.c (+2 lines)
 Lines 129-134    Link Here 
exists by the name of the needed directory.
exists by the name of the needed directory.
*/
*/
#ifndef HAVE_MKDIR
int mkdir(dirname)
int mkdir(dirname)
char *dirname;
char *dirname;
{
{
 Lines 140-145    Link Here 
   }
   }
	return (0);
	return (0);
}
}
#endif
/* No file truncate system call in older System V.  If yours has one,
/* No file truncate system call in older System V.  If yours has one,
add it here -- see bsd.c for example.  It's ok for zootrunc to be
add it here -- see bsd.c for example.  It's ok for zootrunc to be
(-) zoo/zoo.1 (-6 / +6 lines)
 Lines 176-190    Link Here 
Novice@@Equivalent
Novice@@Equivalent
Command@Description@Expert Command
Command@Description@Expert Command
_
_
\-add@add files to archive@ahP
\-add@add files to archive@aP:
\-extract@extract files from archive@x
\-extract@extract files from archive@x
\-move@move files to archive@ahMP
\-move@move files to archive@aMP:
\-test@test archive integrity@xNd
\-test@test archive integrity@xNd
\-print@extract files to standard output@xp
\-print@extract files to standard output@xp
\-delete@delete files from archive@DP
\-delete@delete files from archive@DP
\-list@list archive contents@Vm
\-list@list archive contents@VC
\-update@add new or newer files@ahunP
\-update@add new or newer files@aunP:
\-freshen@by add newer files@ahuP
\-freshen@by add newer files@auP:
\-comment@add comments to files@c
\-comment@add comments to files@c
.TE
.TE
.fi
.fi
 Lines 1041-1047    Link Here 
Matches any sequence of zero or more characters.
Matches any sequence of zero or more characters.
.PP
.PP
.TP
.TP
.B ?
.B \?
Matches any single character.
Matches any single character.
.sp 1
.sp 1
Arbitrary combinations of 
Arbitrary combinations of 
(-) zoo/zoo.c (-5 / +5 lines)
 Lines 225-241    Link Here 
   if (cmd != NONE) {
   if (cmd != NONE) {
      switch (cmd) {
      switch (cmd) {
	 case ADD:      zooadd (zooname, filecount, &argv[3], "ahP"); break;
	 case ADD:      zooadd (zooname, filecount, &argv[3], "aP:"); break;
	 case FRESHEN:  zooadd (zooname, filecount, &argv[3], "ahuP"); break;
	 case FRESHEN:  zooadd (zooname, filecount, &argv[3], "auP:"); break;
	 case UPDATE:   zooadd (zooname, filecount, &argv[3], "ahunP"); break;
	 case UPDATE:   zooadd (zooname, filecount, &argv[3], "aunP:"); break;
	 case MOVE:     zooadd (zooname, filecount, &argv[3], "ahMP"); break;
	 case MOVE:     zooadd (zooname, filecount, &argv[3], "aMP:"); break;
         case EXTRACT:  zooext (zooname, "x"); break;
         case EXTRACT:  zooext (zooname, "x"); break;
         case TEST:     zooext (zooname, "xNd"); break;
         case TEST:     zooext (zooname, "xNd"); break;
         case PRINT:    zooext (zooname, "xp"); break;
         case PRINT:    zooext (zooname, "xp"); break;
         case DELETE:   zoodel (zooname, "DP",1); break;
         case DELETE:   zoodel (zooname, "DP",1); break;
	 case LIST:     zoolist (&argv[2], "Vm", argc-2); break;
	 case LIST:     zoolist (&argv[2], "VC", argc-2); break;
         case COMMENT:  comment (zooname, "c"); break;
         case COMMENT:  comment (zooname, "c"); break;
         default: goto show_usage;
         default: goto show_usage;
      }
      }
(-) zoo/zoo.h (-7 / +1 lines)
 Lines 1-9    Link Here 
/* derived from: zoo.h 2.16 88/01/27 23:21:36 */
/* derived from: zoo.h 2.16 88/01/27 23:21:36 */
#ifndef ZOO_H
#define ZOO_H
/*
/*
The contents of this file are hereby released to the public domain.
The contents of this file are hereby released to the public domain.
 Lines 131-137    Link Here 
   char fname[FNAMESIZE]; 		/* filename */
   char fname[FNAMESIZE]; 		/* filename */
   int var_dir_len;           /* length of variable part of dir entry */
   int var_dir_len;           /* length of variable part of dir entry */
   char tz;                   /* timezone where file was archived */
   uchar tz;                   /* timezone where file was archived */
   unsigned int dir_crc;      /* CRC of directory entry */
   unsigned int dir_crc;      /* CRC of directory entry */
   /* fields for variable part of directory entry follow */
   /* fields for variable part of directory entry follow */
 Lines 244-248    Link Here 
#define	MAXGEN				0x0f
#define	MAXGEN				0x0f
/* version mask to prune down to correct size on large-word machines */
/* version mask to prune down to correct size on large-word machines */
#define VER_MASK				0xffff
#define VER_MASK				0xffff
#endif  /* ZOO_H */
(-) zoo/zoo.man (-5 / +5 lines)
 Lines 121-135    Link Here 
     Novice                                        Equivalent
     Novice                                        Equivalent
     Command    Description                        Expert Command
     Command    Description                        Expert Command
     ____________________________________________________________
     ____________________________________________________________
     -add       add files to archive               ahP
     -add       add files to archive               aP
     -extract   extract files from archive         x
     -extract   extract files from archive         x
     -move      move files to archive              ahMP
     -move      move files to archive              aMP
     -test      test archive integrity             xNd
     -test      test archive integrity             xNd
     -print     extract files to standard output   xp
     -print     extract files to standard output   xp
     -delete    delete files from archive          DP
     -delete    delete files from archive          DP
     -list      list archive contents              Vm
     -list      list archive contents              VC
     -update    add new or newer files             ahunP
     -update    add new or newer files             aunP
     -freshen   by add newer files                 ahuP
     -freshen   by add newer files                 auP
     -comment   add comments to files              c
     -comment   add comments to files              c
     Expert commands
     Expert commands
(-) zoo/zooadd.c (-4 / +2 lines)
 Lines 34-42    Link Here 
               int *, int *, int *, int *, int *, int *, int *, int *));
               int *, int *, int *, int *, int *, int *, int *, int *));
int ver_too_high PARMS ((struct zoo_header *));
int ver_too_high PARMS ((struct zoo_header *));
void get_comment PARMS ((struct direntry *, ZOOFILE, char *));
void get_comment PARMS ((struct direntry *, ZOOFILE, char *));
#ifndef PORTABLE
void copyfields PARMS ((struct direntry *, struct tiny_header *));
void copyfields PARMS ((struct direntry *, struct tiny_header *));
#endif
void storefname PARMS ((struct direntry *, char *, int));
void storefname PARMS ((struct direntry *, char *, int));
char *choosefname PARMS ((struct direntry *));
char *choosefname PARMS ((struct direntry *));
 Lines 134-140    Link Here 
if (zoo_file == NOFILE)
if (zoo_file == NOFILE)
   prterror ('f', could_not_open, zoo_path);
   prterror ('f', could_not_open, zoo_path);
basename(zoo_path, zoo_fname);      /* get basename of archive */
mybasename(zoo_path, zoo_fname);      /* get basename of archive */
rootname (zoo_path, zoo_bak);       /* name without extension */
rootname (zoo_path, zoo_bak);       /* name without extension */
strcat (zoo_bak, BACKUP_EXT);       /* name of backup of this archive */
strcat (zoo_bak, BACKUP_EXT);       /* name of backup of this archive */
 Lines 224-230    Link Here 
		break;
		break;
	}
	}
   basename (this_path, this_fname);   /* get just filename for later */
   mybasename (this_path, this_fname);   /* get just filename for later */
   this_file = zooopen(this_path, Z_READ);
   this_file = zooopen(this_path, Z_READ);
   if (this_file == NOFILE) {
   if (this_file == NOFILE) {
(-) zoo/zooadd2.c (-1 / +1 lines)
 Lines 263-269    Link Here 
   direntry->zoo_tag = ZOO_TAG;
   direntry->zoo_tag = ZOO_TAG;
   direntry->type = 2;                  /* type is now 2 */
   direntry->type = 2;                  /* type is now 2 */
#ifdef GETTZ
#ifdef GETTZ
	direntry->tz = gettz() / (15 * 60); /* seconds => 15-min units */
	direntry->tz = (uchar) (gettz() / (15 * 60)); /* seconds => 15-min units */
#else
#else
   direntry->tz = NO_TZ;                /* timezone unknown */
   direntry->tz = NO_TZ;                /* timezone unknown */
#endif
#endif
(-) zoo/zooext.c (-1 / +1 lines)
 Lines 626-632    Link Here 
/* Ctrl_c() is called if ^C is hit while a file is being extracted.
/* Ctrl_c() is called if ^C is hit while a file is being extracted.
   It closes the files, deletes it, and exits. */
   It closes the files, deletes it, and exits. */
T_SIGNAL ctrl_c(int foo)
T_SIGNAL ctrl_c()
{
{
#ifndef NOSIGNAL
#ifndef NOSIGNAL
   signal (SIGINT, SIG_IGN);     /* ignore any more */
   signal (SIGINT, SIG_IGN);     /* ignore any more */
(-) zoo/zoofns.h (-3 / +3 lines)
 Lines 42-53    Link Here 
int cfactor PARMS ((long, long));
int cfactor PARMS ((long, long));
int chname PARMS ((char *, char *));
int chname PARMS ((char *, char *));
int cmpnum PARMS ((unsigned int, unsigned int, unsigned int, unsigned int));
int cmpnum PARMS ((unsigned int, unsigned int, unsigned int, unsigned int));
T_SIGNAL ctrl_c PARMS ((int));
T_SIGNAL ctrl_c PARMS ((void));
int exists PARMS ((char *));
int exists PARMS ((char *));
int getfile PARMS ((ZOOFILE, ZOOFILE, long, int));
int getfile PARMS ((ZOOFILE, ZOOFILE, long, int));
int getutime PARMS ((char *, unsigned *, unsigned *));
int getutime PARMS ((char *, unsigned *, unsigned *));
int gettime PARMS ((ZOOFILE, unsigned *, unsigned *));
int gettime PARMS ((ZOOFILE, unsigned *, unsigned *));
T_SIGNAL handle_break PARMS ((int));
T_SIGNAL handle_break PARMS ((void));
#ifdef USE_ASCII
#ifdef USE_ASCII
int isupper PARMS ((int));
int isupper PARMS ((int));
 Lines 85-91    Link Here 
void addfname PARMS ((char *, long, unsigned int, unsigned int, 
void addfname PARMS ((char *, long, unsigned int, unsigned int, 
							unsigned, unsigned));
							unsigned, unsigned));
void add_version PARMS ((char *, struct direntry *));
void add_version PARMS ((char *, struct direntry *));
void basename PARMS ((char *, char []));
void mybasename PARMS ((char *, char []));
void break_off PARMS ((void));
void break_off PARMS ((void));
void close_file PARMS ((ZOOFILE));
void close_file PARMS ((ZOOFILE));
void comment PARMS ((char *, char *));
void comment PARMS ((char *, char *));
(-) zoo/zooio.h (-2 lines)
 Lines 12-19    Link Here 
#define	OK_STDIO
#define	OK_STDIO
#endif
#endif
#include "zoo.h"
#ifndef PARMS
#ifndef PARMS
#ifdef LINT_ARGS
#ifdef LINT_ARGS
#define	PARMS(x)		x
#define	PARMS(x)		x
(-) zoo/zoopack.c (-2 / +2 lines)
 Lines 171-177    Link Here 
} else {
} else {
   strcpy (temp_file, xes);
   strcpy (temp_file, xes);
}
}
mktemp (temp_file);                    /* ... and make unique */
mkstemp (temp_file);                    /* ... and make unique */
new_file = zoocreate (temp_file);
new_file = zoocreate (temp_file);
if (new_file == NOFILE)
if (new_file == NOFILE)
   prterror ('f', "Could not create temporary file %s.\n", temp_file);
   prterror ('f', "Could not create temporary file %s.\n", temp_file);
 Lines 388-394    Link Here 
/* handle_break() */
/* handle_break() */
/* Sets break_hit to 1 when called */
/* Sets break_hit to 1 when called */
T_SIGNAL handle_break(int foo)
T_SIGNAL handle_break()
{
{
#ifndef NOSIGNAL
#ifndef NOSIGNAL
   signal (SIGINT, SIG_IGN);     /* ignore future control ^Cs for now */
   signal (SIGINT, SIG_IGN);     /* ignore future control ^Cs for now */