HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • Back to app-arch/zoo/2.10/1

app-arch/zoo/2.10/1: zoo-2.10.patch

File zoo-2.10.patch, 25.6 KB (added by thorn, 6 years ago)
  • ar.h

    diff -Naur ar.h.old ar.h
    old new  
    1515/* uchar should be 8 bits or more */ 
    1616/* typedef unsigned char  uchar;   -- already in zoo.h */ 
    1717 
    18 typedef unsigned int   uint;    /* 16 bits or more */ 
    19 #if !defined(__386BSD__) || !defined(_TYPES_H_) 
    20 typedef unsigned short ushort;  /* 16 bits or more */ 
    21 #endif 
    22 typedef unsigned long  ulong;   /* 32 bits or more */ 
     18typedef unsigned int   my_uint;    /* 16 bits or more */ 
     19typedef unsigned short my_ushort;  /* 16 bits or more */ 
     20typedef unsigned long  my_ulong;   /* 32 bits or more */ 
    2321 
    2422/* T_UINT16 must be #defined in options.h to be  
    2523a 16-bit unsigned integer type */ 
    … …  
    4947/* ar.c */ 
    5048 
    5149extern int unpackable; 
    52 extern ulong origsize, compsize; 
     50extern my_ulong origsize, compsize; 
    5351 
    5452/* all the prototypes follow here for all files */ 
    5553 
    … …  
    7876 
    7977/* DECODE.C */ 
    8078void decode_start PARMS((void )); 
    81 int decode PARMS((uint count , uchar *buffer)); 
     79int decode PARMS((uint count , uchar buffer [])); 
    8280 
    8381/* ENCODE.C */ 
    8482void encode PARMS((FILE *, FILE *)); 
    … …  
    8785void output PARMS((uint c , uint p )); 
    8886void huf_encode_start PARMS((void )); 
    8987void huf_encode_end PARMS((void )); 
    90 uint decode_c PARMS((void )); 
    91 uint decode_p PARMS((void )); 
     88my_uint decode_c PARMS((void )); 
     89my_uint decode_p PARMS((void )); 
    9290void huf_decode_start PARMS((void )); 
    9391 
    9492/* IO.C */ 
    9593void make_crctable PARMS((void )); 
    9694void fillbuf PARMS((int n )); 
    97 uint getbits PARMS((int n )); 
     95my_uint getbits PARMS((int n )); 
    9896void putbits PARMS((int n , uint x )); 
    9997int fread_crc PARMS((uchar *p , int n , FILE *f )); 
    10098void fwrite_crc PARMS((uchar *p , int n , FILE *f )); 
  • basename.c

    diff -Naur basename.c.old basename.c
    old new  
    1818 
    1919/* This function strips device/directory information from 
    2020a pathname and returns just the plain filename */ 
    21 void basename (pathname, fname) 
     21void mybasename (pathname, fname) 
    2222char *pathname; 
    2323char fname[]; 
    2424{ 
  • bsd.c

    diff -Naur bsd.c.old bsd.c
    old new  
    7474#define SEC_IN_DAY      (24L * 60L * 60L) 
    7575#define INV_VALUE               (SEC_IN_DAY + 1L) 
    7676        static long retval = INV_VALUE;      /* cache, init to impossible value */ 
    77 #ifndef __386BSD__ 
    7877   struct timeval tp; 
    7978   struct timezone tzp; 
    80 #else 
    81    time_t lt; 
    82    struct tm *tm; 
    83 #endif 
    8479        if (retval != INV_VALUE)                                 /* if have cached value, return it */ 
    8580                return retval; 
    86 #ifndef __386BSD__ 
    8781   gettimeofday (&tp, &tzp);              /* specific to 4.3BSD */ 
    8882   /* return (tzp.tz_minuteswest * 60); */ /* old incorrect code */ 
    8983        /* Timezone fix thanks to Bill Davidsen <wedu@ge-crd.ARPA> */ 
    90         /* !! - ache@hq.demos.su */ 
    91         retval = tzp.tz_minuteswest * 60 - (tzp.tz_dsttime != 0) * 3600L; 
    92 #else 
    93         time(&lt); 
    94         tm = localtime(&lt); 
    95         retval = -tm->tm_gmtoff; 
    96 #endif 
     84        retval = tzp.tz_minuteswest * 60 - tzp.tz_dsttime * 3600L; 
    9785        return retval; 
    9886} 
    9987 
  • decode.c

    diff -Naur decode.c.old decode.c
    old new  
    2727*/ 
    2828 
    2929int decode(count, buffer) 
    30 uint count; 
    31 uchar *buffer; 
     30my_uint count; 
     31uchar buffer[]; 
    3232        /* The calling function must keep the number of 
    3333           bytes to be processed.  This function decodes 
    3434           either 'count' bytes or 'DICSIZ' bytes, whichever 
    … …  
    3737           Call decode_start() once for each new file 
    3838           before calling this function. */ 
    3939{ 
    40         static uint i; 
    41         uint r, c; 
     40        static my_uint i; 
     41        my_uint r, c; 
    4242 
    4343        r = 0; 
    4444        while (--j >= 0) { 
  • encode.c

    diff -Naur encode.c.old encode.c
    old new  
    55Adapted from "ar" archiver written by Haruhiko Okumura. 
    66*/ 
    77 
    8 #ifdef ANSI_HDRS 
    9 # include <stdlib.h> 
    10 # include <string.h> 
    11 #endif 
    12  
    138#include "options.h" 
    149#include "zoo.h" 
    1510#include "ar.h" 
    … …  
    2015 
    2116#include <assert.h> 
    2217 
     18#ifdef ANSI_HDRS 
     19# include <stdlib.h> 
     20# include <string.h> 
     21#endif 
     22 
    2323#include "errors.i" 
    2424 
    2525FILE *lzh_infile; 
  • huf.c

    diff -Naur huf.c.old huf.c
    old new  
    55 
    66Adapted from "ar" archiver written by Haruhiko Okumura. 
    77***********************************************************/ 
    8 #ifdef ANSI_HDRS 
    9 # include <stdlib.h> 
    10 #endif 
    11  
    128#include "options.h" 
    139#include "zoo.h" 
    1410#include "ar.h" 
    … …  
    1713 
    1814extern void prterror(); 
    1915 
     16#ifdef ANSI_HDRS 
     17# include <stdlib.h> 
     18#endif 
     19 
    2020#define NP (DICBIT + 1) 
    2121#define NT (CODE_BIT + 3) 
    2222#define PBIT 4  /* smallest integer such that (1U << PBIT) > NP */ 
  • lzd.c

    diff -Naur lzd.c.old lzd.c
    old new  
    5959extern unsigned int filt_lzd_word; 
    6060#endif /* FILTER */ 
    6161 
    62 void xwr_dchar PARMS ((int)); 
     62void xwr_dchar PARMS ((char)); 
    6363static int firstchar PARMS ((int)); 
    6464static void cbfill PARMS ((void)); 
    6565 
  • lzh.c

    diff -Naur lzh.c.old lzh.c
    old new  
    4545 
    4646        decode_start(); 
    4747        while (!decoded) { 
    48                 n = decode((uint) DICSIZ, (uchar *)out_buf_adr); /* n = count of chars decoded */ 
     48                n = decode((my_uint) DICSIZ, out_buf_adr); /* n = count of chars decoded */ 
    4949#ifdef COUNT_BYTES 
    5050                bytes_decoded += n;     /*debug*/ 
    5151#endif 
    5252#ifdef CHECK_BREAK 
    5353                check_break(); 
    5454#endif 
    55                 fwrite_crc((uchar *)out_buf_adr, n, outfile); 
     55                fwrite_crc(out_buf_adr, n, outfile); 
    5656#ifdef SHOW_DOTS 
    5757                (void) putc('.', stderr); 
    5858                (void) fflush(stderr); 
  • lzh.h

    diff -Naur lzh.h.old lzh.h
    old new  
    3434#define CBIT 9  /* $\lfloor \log_2 NC \rfloor + 1$ */ 
    3535#define CODE_BIT  16  /* codeword length */ 
    3636 
    37 extern ushort left[], right[]; 
     37extern my_ushort left[], right[]; 
  • makefile

    diff -Naur makefile.old makefile
    old new  
    1818 
    1919MAKE = make           # needed for some systems e.g. older BSD 
    2020 
    21 CC = cc 
     21CC = gcc 
    2222CFLAGS = 
    2323MODEL = 
    2424EXTRA = -DBIG_MEM -DNDEBUG 
    2525LINTFLAGS = -DLINT 
    26 OPTIM = -O 
    27 DESTDIR = /usr/local/bin 
     26OPTIM = -O2  
     27DESTDIR = /boot/common 
     28BINDIR = $(DESTDIR)/bin 
     29MANDIR = $(DESTDIR)/man/man1 
     30 
    2831 
    2932#List of all object files created for Zoo 
    3033ZOOOBJS = addbfcrc.o addfname.o basename.o comment.o crcdefs.o \ 
    … …  
    5053        @echo "generic:      generic **IX environment, minimal functionlity" 
    5154        @echo "bsd:          4.3BSD or reasonable equivalent" 
    5255        @echo "bsdansi:      4.3BSD with ANSI C" 
     56        @echo "haiku:        Haiku" 
    5357        @echo "ultrix:       ULTRIX 4.1" 
    5458        @echo "convex:       Convex C200 series" 
    5559        @echo "sysv:         System V Release 2 or 3; or SCO Xenix" 
    … …  
    6872 
    6973# install alpha zoo as "tzoo" 
    7074install: 
    71         mv zoo $(DESTDIR)/tzoo 
     75        mv zoo $(BINDIR)/tzoo 
    7276 
    7377# install beta zoo as "bzoo" 
    7478inst_beta: 
    75         mv zoo $(DESTDIR)/bzoo 
     79        mv zoo $(BINDIR)/bzoo 
    7680 
    7781# install production zoo as "zoo" 
    7882inst_prod: 
    79         mv zoo $(DESTDIR)/zoo 
    80  
     83        cp zoo fiz $(BINDIR) 
     84        cp zoo.1 fiz.1 $(MANDIR) 
     85         
    8186# executable targets 
    8287TARGETS = zoo fiz 
    8388 
    … …  
    106111convex: 
    107112        $(MAKE) CFLAGS="-c $(OPTIM) -DBSD4_3 -DANSI_HDRS" $(TARGETS) 
    108113 
     114# Haiku 
     115haiku: 
     116        $(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V -DANSI_HDRS -DHAVE_MKDIR" $(TARGETS) 
     117 
    109118# SysV.2, V.3, SCO Xenix 
    110119sysv: 
    111120        $(MAKE) CFLAGS="-c $(OPTIM) -DSYS_V" $(TARGETS) 
    … …  
    189198# DO NOT DELETE THIS LINE -- it marks the beginning of this dependency list 
    190199 
    191200addbfcrc.o: options.h 
    192 addfname.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h 
     201addfname.o: options.h various.h zoo.h zoofns.h zooio.h 
    193202addfname.o: zoomem.h 
    194 basename.o: /usr/include/stdio.h assert.h debug.h options.h parse.h various.h 
     203basename.o: assert.h debug.h options.h parse.h various.h 
    195204basename.o: zoo.h zoofns.h zooio.h 
    196 bsd.o: /usr/include/sys/stat.h /usr/include/sys/time.h 
    197 bsd.o: /usr/include/sys/types.h nixmode.i nixtime.i 
    198 comment.o: /usr/include/signal.h /usr/include/stdio.h 
    199 comment.o: /usr/include/sys/signal.h errors.i options.h portable.h various.h 
     205bsd.o: nixmode.i nixtime.i 
     206comment.o: errors.i options.h portable.h various.h 
    200207comment.o: zoo.h zoofns.h zooio.h 
    201208crcdefs.o: options.h 
    202 decode.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h 
    203 encode.o: /usr/include/assert.h /usr/include/stdio.h ar.h errors.i lzh.h 
     209decode.o: ar.h lzh.h options.h zoo.h 
     210encode.o: ar.h errors.i lzh.h 
    204211encode.o: options.h zoo.h 
    205 fiz.o: /usr/include/stdio.h options.h portable.h various.h zoo.h zoofns.h 
     212fiz.o: options.h portable.h various.h zoo.h zoofns.h 
    206213fiz.o: zooio.h 
    207 generic.o: /usr/include/sys/stat.h /usr/include/sys/types.h 
    208 generic.o: /usr/include/time.h nixmode.i nixtime.i 
    209 getfile.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h 
     214generic.o: nixmode.i nixtime.i 
     215getfile.o: options.h various.h zoo.h zoofns.h zooio.h 
    210216getfile.o: zoomem.h 
    211 huf.o: /usr/include/stdio.h ar.h errors.i lzh.h options.h zoo.h 
    212 io.o: /usr/include/stdio.h ar.h errors.i lzh.h options.h portable.h zoo.h 
     217huf.o: ar.h errors.i lzh.h options.h zoo.h 
     218io.o: ar.h errors.i lzh.h options.h portable.h zoo.h 
    213219io.o: zooio.h 
    214 lzc.o: /usr/include/stdio.h assert.h debug.h lzconst.h options.h various.h 
     220lzc.o: assert.h debug.h lzconst.h options.h various.h 
    215221lzc.o: zoo.h zoofns.h zooio.h zoomem.h 
    216 lzd.o: /usr/include/stdio.h assert.h debug.h lzconst.h options.h various.h 
     222lzd.o: assert.h debug.h lzconst.h options.h various.h 
    217223lzd.o: zoo.h zoofns.h zooio.h zoomem.h 
    218 lzh.o: /usr/include/stdio.h ar.h errors.i options.h zoo.h 
    219 machine.o: /usr/include/stdio.h options.h various.h zoo.h zoofns.h zooio.h 
    220 makelist.o: /usr/include/stdio.h assert.h debug.h errors.i options.h 
     224lzh.o: ar.h errors.i options.h zoo.h 
     225machine.o: options.h various.h zoo.h zoofns.h zooio.h 
     226makelist.o: assert.h debug.h errors.i options.h 
    221227makelist.o: portable.h various.h zoo.h zoofns.h zooio.h 
    222 maketbl.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h 
    223 maketree.o: /usr/include/stdio.h ar.h lzh.h options.h zoo.h 
    224 misc.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h 
     228maketbl.o: ar.h lzh.h options.h zoo.h 
     229maketree.o: ar.h lzh.h options.h zoo.h 
    225230misc.o: errors.i options.h portable.h various.h zoo.h zoofns.h zooio.h 
    226 misc2.o: /usr/include/stdio.h errors.i options.h portable.h various.h zoo.h 
     231misc2.o: errors.i options.h portable.h various.h zoo.h 
    227232misc2.o: zoofns.h zooio.h zoomem.h 
    228 msdos.o: /usr/include/stdio.h errors.i options.h zoo.h zoofns.h zooio.h 
    229 needed.o: /usr/include/stdio.h debug.h options.h portable.h various.h zoo.h 
     233msdos.o: errors.i options.h zoo.h zoofns.h zooio.h 
     234needed.o: debug.h options.h portable.h various.h zoo.h 
    230235needed.o: zoofns.h zooio.h 
    231 nextfile.o: /usr/include/stdio.h options.h various.h zoo.h 
    232 options.o: /usr/include/stdio.h errors.i options.h various.h zoo.h zoofns.h 
     236nextfile.o: options.h various.h zoo.h 
     237options.o: errors.i options.h various.h zoo.h zoofns.h 
    233238options.o: zooio.h 
    234 parse.o: /usr/include/stdio.h assert.h options.h parse.h various.h zoo.h 
     239parse.o: assert.h options.h parse.h various.h zoo.h 
    235240parse.o: zoofns.h zooio.h 
    236 portable.o: /usr/include/stdio.h assert.h debug.h machine.h options.h 
     241portable.o: assert.h debug.h machine.h options.h 
    237242portable.o: portable.h various.h zoo.h zoofns.h zooio.h 
    238 prterror.o: /usr/include/stdio.h /usr/include/varargs.h options.h various.h 
     243prterror.o: options.h various.h 
    239244prterror.o: zoofns.h zooio.h 
    240 sysv.o: /usr/include/sys/stat.h /usr/include/sys/types.h /usr/include/time.h 
    241245sysv.o: nixmode.i nixtime.i 
    242 turboc.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h 
    243 vms.o: /usr/include/time.h 
    244 vmstime.o: /usr/include/stdio.h 
    245 zoo.o: /usr/include/stdio.h errors.i options.h various.h zoo.h zoofns.h 
     246zoo.o: errors.i options.h various.h zoo.h zoofns.h 
    246247zoo.o: zooio.h zoomem.h 
    247 zooadd.o: /usr/include/stdio.h debug.h errors.i options.h parse.h portable.h 
     248zooadd.o: debug.h errors.i options.h parse.h portable.h 
    248249zooadd.o: various.h zoo.h zoofns.h zooio.h zoomem.h 
    249 zooadd2.o: /usr/include/stdio.h assert.h debug.h errors.i options.h parse.h 
     250zooadd2.o: assert.h debug.h errors.i options.h parse.h 
    250251zooadd2.o: various.h zoo.h zoofns.h zooio.h 
    251 zoodel.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h 
    252252zoodel.o: errors.i options.h portable.h various.h zoo.h zoofns.h zooio.h 
    253 zooext.o: /usr/include/signal.h /usr/include/stdio.h /usr/include/sys/signal.h 
    254253zooext.o: errors.i machine.h options.h parse.h portable.h various.h zoo.h 
    255254zooext.o: zoofns.h zooio.h 
    256255zoofilt.o: options.h 
    257 zoolist.o: /usr/include/stdio.h errors.i options.h portable.h various.h zoo.h 
     256zoolist.o: errors.i options.h portable.h various.h zoo.h 
    258257zoolist.o: zoofns.h zooio.h zoomem.h 
    259 zoopack.o: /usr/include/signal.h /usr/include/stdio.h 
    260 zoopack.o: /usr/include/sys/signal.h errors.i options.h portable.h various.h 
     258zoopack.o: errors.i options.h portable.h various.h 
    261259zoopack.o: zoo.h zoofns.h zooio.h 
  • maketbl.c

    diff -Naur maketbl.c.old maketbl.c
    old new  
    1616int nchar; 
    1717uchar bitlen[]; 
    1818int tablebits; 
    19 ushort table[]; 
     19my_ushort table[]; 
    2020{ 
    21         ushort count[17], weight[17], start[18], *p; 
    22         uint i, k, len, ch, jutbits, avail, nextcode, mask; 
     21        my_ushort count[17], weight[17], start[18], *p; 
     22        my_uint i, k, len, ch, jutbits, avail, nextcode, mask; 
    2323 
    2424        for (i = 1; i <= 16; i++) count[i] = 0; 
    2525        for (i = 0; i < nchar; i++) count[bitlen[i]]++; 
    … …  
    2727        start[1] = 0; 
    2828        for (i = 1; i <= 16; i++) 
    2929                start[i + 1] = start[i] + (count[i] << (16 - i)); 
    30         if (start[17] != (ushort)((unsigned) 1 << 16)) 
     30        if (start[17] != (my_ushort)((unsigned) 1 << 16)) 
    3131                prterror('f', "Bad decode table\n"); 
    3232 
    3333        jutbits = 16 - tablebits; 
    … …  
    4141        } 
    4242 
    4343        i = start[tablebits + 1] >> jutbits; 
    44         if (i != (ushort)((unsigned) 1 << 16)) { 
     44        if (i != (my_ushort)((unsigned) 1 << 16)) { 
    4545                k = 1 << tablebits; 
    4646                while (i != k) table[i++] = 0; 
    4747        } 
  • maketree.c

    diff -Naur maketree.c.old maketree.c
    old new  
    1212 
    1313static int    n, heapsize; 
    1414static short  heap[NC + 1]; 
    15 static ushort *freq, *sortptr, len_cnt[17]; 
     15static my_ushort *freq, *sortptr, len_cnt[17]; 
    1616static uchar  *len; 
    1717 
    1818static void count_len(i)  /* call with i = root */ 
    … …  
    3333int root; 
    3434{ 
    3535        int i, k; 
    36         uint cum; 
     36        my_uint cum; 
    3737 
    3838        for (i = 0; i <= 16; i++) len_cnt[i] = 0; 
    3939        count_len(root); 
    … …  
    7575static void make_code(j, length, code) 
    7676int j; 
    7777uchar length[]; 
    78 ushort code[]; 
     78my_ushort code[]; 
    7979{ 
    8080        int    i; 
    81         ushort start[18]; 
     81        my_ushort start[18]; 
    8282 
    8383        start[1] = 0; 
    8484        for (i = 1; i <= 16; i++) 
    … …  
    8888 
    8989int make_tree(nparm, freqparm, lenparm, codeparm) 
    9090int nparm; 
    91 ushort freqparm[]; 
     91my_ushort freqparm[]; 
    9292uchar lenparm[]; 
    93 ushort codeparm[]; 
     93my_ushort codeparm[]; 
    9494        /* make tree, calculate len[], return root */ 
    9595{ 
    9696        int i, j, k, avail; 
  • options.h

    diff -Naur options.h.old options.h
    old new  
    3131#define GETTZ 
    3232#define FATTR 
    3333#define T_SIGNAL        void 
    34 #define VARARGS 
     34#define STDARG 
    3535#define NEED_MEMMOVE 
    3636/* #define NEED_MEMCPY */ 
    3737#define T_UINT16                unsigned short          /* must be 16 bit unsigned */ 
    … …  
    7373/* #define UNBUF_LIMIT  512 */ 
    7474#define  T_SIGNAL void 
    7575#define DIRECT_CONVERT 
     76#define STDARG 
    7677#define CHECK_BREAK 
    7778#define check_break kbhit 
    7879#define HAVE_ISATTY 
    … …  
    8889/***********************************************************************/ 
    8990 
    9091#ifdef BSD4_3 
     92#define NOSTRCHR /* not really needed for 4.3BSD */ 
    9193#define FILTER 
    9294#define IO_MACROS 
    9395#define EXISTS(f)               (access(f, 00) == 0) 
    … …  
    101103#define SETBUF 
    102104#define GETTZ 
    103105#define FATTR 
    104 #ifdef __STDC__ 
    105 #ifndef ANSI_HDRS 
    106 #define ANSI_HDRS 
    107 #endif 
    108 #define T_SIGNAL        void 
    109 #define STDARG 
    110 #define ANSI_PROTO 
    111 #define VOIDPTR         void * 
    112 #else 
    113 #define NOSTRCHR /* not really needed for 4.3BSD */ 
    114106#define T_SIGNAL        int 
    115107#define VARARGS 
    116108#define NEED_MEMMOVE 
    117 #define NEED_VPRINTF            /* older BSDs only; newer ones have vprintf */ 
    118 #endif 
    119109#define T_UINT16                unsigned short          /* must be 16 bit unsigned */ 
    120110#define HAVE_ISATTY 
     111#define NEED_VPRINTF            /* older BSDs only; newer ones have vprintf */ 
    121112#endif /* BSD4_3 */ 
    122113 
    123114/*  Ultrix 4.1 */ 
  • prterror.c

    diff -Naur prterror.c.old prterror.c
    old new  
    2323# include <ctype.h>     /* for isdigit() */ 
    2424#endif 
    2525 
    26 #ifdef STDARG 
    2726# include <stdarg.h> 
    28 #else 
    29 # ifdef VARARGS 
    30 #  include <varargs.h> 
    31 # else 
    32 #  include "MUST DEFINE STDARG OR VARARGS" 
    33 # endif 
    34 #endif 
    3527 
    3628#ifdef NEED_VPRINTF 
    3729static int zvfprintf(); 
    … …  
    115107char could_not_open[] = "Could not open %s.\n"; 
    116108#endif 
    117109 
    118 #ifdef STDARG 
    119 void prterror(int level, char *format, ...) 
    120 #else 
    121 /*VARARGS*/ 
    122 void prterror(va_alist) 
    123 va_dcl 
    124 #endif 
     110void prterror(level, format, a, b, c, d) 
     111register int level; 
     112char *format, *a, *b, *c, *d; 
    125113{ 
    126         va_list args; 
    127114   char string[120];       /* local format string */ 
    128 #ifdef VARARGS 
    129         int level; 
    130         char *format; 
    131 #endif 
    132  
    133 #ifdef STDARG 
    134         va_start(args, format); 
    135 #else 
    136         va_start(args); 
    137         level = va_arg(args, int); 
    138         format = va_arg(args, char *); 
    139 #endif 
    140  
    141115   *string = '\0';         /* get a null string to begin with */ 
    142116 
    143117#ifdef OOZ 
    … …  
    149123   switch (level) { 
    150124      case 'M': *string = '\0';                    /* fall through to 'm' */ 
    151125      case 'm': if (quiet) return; break; 
    152       case 'w':  
     126      case 'w': 
    153127                        if (quiet > 1) return; 
    154128                        strcat (string, "WARNING:  "); break; 
    155129      case 'e':  
    … …  
    163137   strcat (string, format);      /* just append supplied format string */ 
    164138 
    165139        /* and print the whole thing */ 
    166 #ifdef NEED_VPRINTF 
    167         (void) zvfprintf(stdout, string, args); 
    168 #else 
    169    (void) vprintf(string, args); 
    170 #endif 
    171         fflush (stdout); 
     140   printf (string, a, b, c, d);   /* and print the whole thing */ 
     141        fflush (stdout); 
    172142 
    173143   if (level == 'f')       /* and abort on fatal error 'f' but not 'F' */ 
    174144      zooexit (1); 
  • sysv.c

    diff -Naur sysv.c.old sysv.c
    old new  
    129129exists by the name of the needed directory. 
    130130*/ 
    131131 
     132#ifndef HAVE_MKDIR 
    132133int mkdir(dirname) 
    133134char *dirname; 
    134135{ 
    … …  
    140141   } 
    141142        return (0); 
    142143} 
     144#endif 
    143145 
    144146/* No file truncate system call in older System V.  If yours has one, 
    145147add it here -- see bsd.c for example.  It's ok for zootrunc to be 
  • zoo.c

    diff -Naur zoo.c.old zoo.c
    old new  
    225225   if (cmd != NONE) { 
    226226      switch (cmd) { 
    227227 
    228          case ADD:      zooadd (zooname, filecount, &argv[3], "ahP"); break; 
    229          case FRESHEN:  zooadd (zooname, filecount, &argv[3], "ahuP"); break; 
    230          case UPDATE:   zooadd (zooname, filecount, &argv[3], "ahunP"); break; 
    231          case MOVE:     zooadd (zooname, filecount, &argv[3], "ahMP"); break; 
     228         case ADD:      zooadd (zooname, filecount, &argv[3], "aP:"); break; 
     229         case FRESHEN:  zooadd (zooname, filecount, &argv[3], "auP:"); break; 
     230         case UPDATE:   zooadd (zooname, filecount, &argv[3], "aunP:"); break; 
     231         case MOVE:     zooadd (zooname, filecount, &argv[3], "aMP:"); break; 
    232232 
    233233         case EXTRACT:  zooext (zooname, "x"); break; 
    234234         case TEST:     zooext (zooname, "xNd"); break; 
    235235         case PRINT:    zooext (zooname, "xp"); break; 
    236236 
    237237         case DELETE:   zoodel (zooname, "DP",1); break; 
    238          case LIST:     zoolist (&argv[2], "Vm", argc-2); break; 
     238         case LIST:     zoolist (&argv[2], "VC", argc-2); break; 
    239239         case COMMENT:  comment (zooname, "c"); break; 
    240240         default: goto show_usage; 
    241241      } 
  • zoo.h

    diff -Naur zoo.h.old zoo.h
    old new  
    11/* derived from: zoo.h 2.16 88/01/27 23:21:36 */ 
    22 
    3 #ifndef ZOO_H 
    4  
    5 #define ZOO_H 
    6  
    73/* 
    84The contents of this file are hereby released to the public domain. 
    95 
    … …  
    131127   char fname[FNAMESIZE];               /* filename */ 
    132128 
    133129   int var_dir_len;           /* length of variable part of dir entry */ 
    134    char tz;                   /* timezone where file was archived */ 
     130   uchar tz;                   /* timezone where file was archived */ 
    135131   unsigned int dir_crc;      /* CRC of directory entry */ 
    136132 
    137133   /* fields for variable part of directory entry follow */ 
    … …  
    244240#define MAXGEN                          0x0f 
    245241/* version mask to prune down to correct size on large-word machines */ 
    246242#define VER_MASK                                0xffff 
    247  
    248 #endif  /* ZOO_H */ 
  • zoo.man

    diff -Naur zoo.man.old zoo.man
    old new  
    121121     Novice                                        Equivalent 
    122122     Command    Description                        Expert Command 
    123123     ____________________________________________________________ 
    124      -add       add files to archive               ahP 
     124     -add       add files to archive               aP 
    125125     -extract   extract files from archive         x 
    126      -move      move files to archive              ahMP 
     126     -move      move files to archive              aMP 
    127127     -test      test archive integrity             xNd 
    128128     -print     extract files to standard output   xp 
    129129     -delete    delete files from archive          DP 
    130      -list      list archive contents              Vm 
    131      -update    add new or newer files             ahunP 
    132      -freshen   by add newer files                 ahuP 
     130     -list      list archive contents              VC 
     131     -update    add new or newer files             aunP 
     132     -freshen   by add newer files                 auP 
    133133     -comment   add comments to files              c 
    134134 
    135135     Expert commands 
  • zooadd.c

    diff -Naur zooadd.c.old zooadd.c
    old new  
    3434               int *, int *, int *, int *, int *, int *, int *, int *)); 
    3535int ver_too_high PARMS ((struct zoo_header *)); 
    3636void get_comment PARMS ((struct direntry *, ZOOFILE, char *)); 
    37 #ifndef PORTABLE 
    3837void copyfields PARMS ((struct direntry *, struct tiny_header *)); 
    39 #endif 
    4038void storefname PARMS ((struct direntry *, char *, int)); 
    4139char *choosefname PARMS ((struct direntry *)); 
    4240 
    … …  
    134132 
    135133if (zoo_file == NOFILE) 
    136134   prterror ('f', could_not_open, zoo_path); 
    137 basename(zoo_path, zoo_fname);      /* get basename of archive */ 
     135mybasename(zoo_path, zoo_fname);      /* get basename of archive */ 
    138136rootname (zoo_path, zoo_bak);       /* name without extension */ 
    139137strcat (zoo_bak, BACKUP_EXT);       /* name of backup of this archive */ 
    140138 
    … …  
    224222                break; 
    225223        } 
    226224 
    227    basename (this_path, this_fname);   /* get just filename for later */ 
     225   mybasename (this_path, this_fname);   /* get just filename for later */ 
    228226 
    229227   this_file = zooopen(this_path, Z_READ); 
    230228   if (this_file == NOFILE) { 
  • zooadd2.c

    diff -Naur zooadd2.c.old zooadd2.c
    old new  
    263263   direntry->zoo_tag = ZOO_TAG; 
    264264   direntry->type = 2;                  /* type is now 2 */ 
    265265#ifdef GETTZ 
    266         direntry->tz = gettz() / (15 * 60); /* seconds => 15-min units */ 
     266        direntry->tz = (uchar) (gettz() / (15 * 60)); /* seconds => 15-min units */ 
    267267#else 
    268268   direntry->tz = NO_TZ;                /* timezone unknown */ 
    269269#endif 
  • zooext.c

    diff -Naur zooext.c.old zooext.c
    old new  
    626626 
    627627/* Ctrl_c() is called if ^C is hit while a file is being extracted. 
    628628   It closes the files, deletes it, and exits. */ 
    629 T_SIGNAL ctrl_c(int foo) 
     629T_SIGNAL ctrl_c() 
    630630{ 
    631631#ifndef NOSIGNAL 
    632632   signal (SIGINT, SIG_IGN);     /* ignore any more */ 
  • zoofns.h

    diff -Naur zoofns.h.old zoofns.h
    old new  
    4242int cfactor PARMS ((long, long)); 
    4343int chname PARMS ((char *, char *)); 
    4444int cmpnum PARMS ((unsigned int, unsigned int, unsigned int, unsigned int)); 
    45 T_SIGNAL ctrl_c PARMS ((int)); 
     45T_SIGNAL ctrl_c PARMS ((void)); 
    4646int exists PARMS ((char *)); 
    4747int getfile PARMS ((ZOOFILE, ZOOFILE, long, int)); 
    4848int getutime PARMS ((char *, unsigned *, unsigned *)); 
    4949int gettime PARMS ((ZOOFILE, unsigned *, unsigned *)); 
    50 T_SIGNAL handle_break PARMS ((int)); 
     50T_SIGNAL handle_break PARMS ((void)); 
    5151 
    5252#ifdef USE_ASCII 
    5353int isupper PARMS ((int)); 
    … …  
    8585void addfname PARMS ((char *, long, unsigned int, unsigned int,  
    8686                                                        unsigned, unsigned)); 
    8787void add_version PARMS ((char *, struct direntry *)); 
    88 void basename PARMS ((char *, char [])); 
     88void mybasename PARMS ((char *, char [])); 
    8989void break_off PARMS ((void)); 
    9090void close_file PARMS ((ZOOFILE)); 
    9191void comment PARMS ((char *, char *)); 
  • zooio.h

    diff -Naur zooio.h.old zooio.h
    old new  
    1212#define OK_STDIO 
    1313#endif 
    1414 
    15 #include "zoo.h" 
    16  
    1715#ifndef PARMS 
    1816#ifdef LINT_ARGS 
    1917#define PARMS(x)                x 
  • zoopack.c

    diff -Naur zoopack.c.old zoopack.c
    old new  
    171171} else { 
    172172   strcpy (temp_file, xes); 
    173173} 
    174 mktemp (temp_file);                    /* ... and make unique */ 
     174mkstemp (temp_file);                    /* ... and make unique */ 
    175175new_file = zoocreate (temp_file); 
    176176if (new_file == NOFILE) 
    177177   prterror ('f', "Could not create temporary file %s.\n", temp_file); 
    … …  
    388388 
    389389/* handle_break() */ 
    390390/* Sets break_hit to 1 when called */ 
    391 T_SIGNAL handle_break(int foo) 
     391T_SIGNAL handle_break() 
    392392{ 
    393393#ifndef NOSIGNAL 
    394394   signal (SIGINT, SIG_IGN);     /* ignore future control ^Cs for now */ 

Download in other formats:

  • Original Format

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/