Article View: comp.sources.bugs
Article #2082zoo timezone bug fix
From: Rahul Dhesi
Date: Tue, 21 Feb 1989 16:17
Date: Tue, 21 Feb 1989 16:17
103 lines
4461 bytes
4461 bytes
I was sent the following bug fix for the zoo timezone bug. It changes
the timezone field to a signed quantity. I have not tested it. It
looks like it should work. It does not introduce any incompatibility.
This fix should be needed only if you are t hours east of GMT, such
that 0 < t < 12, and if GETTZ is defined at compilation time. Thanks
to Thomas P.S. Olesen <mcvax!dkuug!dde!tpo> for this.
---------------------cut------------------------------------------
*** portable.c.ori
--- portable.c
**************
*** 20,25
For machine-dependent declarations see files "machine.h" and "options.h".
For machine-dependent functions see file "machine.c"
*/
#include "zooio.h"
--- 20,27 -----
For machine-dependent declarations see files "machine.h" and "options.h".
For machine-dependent functions see file "machine.c"
+ CHANGES:
+ changed tz in direntry to signed char (Thomas P. Olesen tpo@dde.dk)
*/
#include "zooio.h"
**************
*** 496,502
if (direntry->type == 2) { /* handle stuff relevant to type 2 */
cursize = SIZ_DIRL;
fixsize = SIZ_DIRL;
! bytes[TZ_I] = direntry->tz;
assert(direntry->namlen < 256 && direntry->namlen >= 0);
cursize += 2; /* space for namlen and dirlen */
if (direntry->namlen != 0) {
--- 498,504 -----
if (direntry->type == 2) { /* handle stuff relevant to type 2 */
cursize = SIZ_DIRL;
fixsize = SIZ_DIRL;
! bytes[TZ_I] = (uchar)direntry->tz;
assert(direntry->namlen < 256 && direntry->namlen >= 0);
cursize += 2; /* space for namlen and dirlen */
if (direntry->namlen != 0) {
**************
*** 594,600
assert(direntry->var_dir_len <= MAXDIRSIZE);
if (direntry->var_dir_len > MAXDIRSIZE)
direntry->var_dir_len = MAXDIRSIZE;
! direntry->tz = bytes[TZ_I];
if (direntry->var_dir_len > 0)
direntry->namlen = bytes[NAMLEN_I];
if (direntry->var_dir_len > 1)
--- 596,602 -----
assert(direntry->var_dir_len <= MAXDIRSIZE);
if (direntry->var_dir_len > MAXDIRSIZE)
direntry->var_dir_len = MAXDIRSIZE;
! direntry->tz = (char)bytes[TZ_I];
if (direntry->var_dir_len > 0)
direntry->namlen = bytes[NAMLEN_I];
if (direntry->var_dir_len > 1)
*** zoo.h.orig
--- zoo.h
**************
*** 49,54
The directory entry of each file will contain the minimum version number of
Zoo needed to extract that file. As far as possible, version 1.00 of Zoo
will be able to extract files from future version archives.
*/
#define H_TYPE 1 /* archive header type */
--- 49,57 -----
The directory entry of each file will contain the minimum version number of
Zoo needed to extract that file. As far as possible, version 1.00 of Zoo
will be able to extract files from future version archives.
+ -------------------------------------------------------------------------
+ CHANGES:
+ changed tz in direntry to signed char (Thomas P. Olesen tpo@dde.dk)
*/
#define H_TYPE 1 /* archive header type */
**************
*** 122,128
char fname[FNAMESIZE]; /* filename */
int var_dir_len; /* length of variable part of dir entry */
! uchar tz; /* timezone where file was archived */
unsigned int dir_crc; /* CRC of directory entry */
/* fields for variable part of directory entry follow */
--- 125,131 -----
char fname[FNAMESIZE]; /* filename */
int var_dir_len; /* length of variable part of dir entry */
! char tz; /* timezone where file was archived */
unsigned int dir_crc; /* CRC of directory entry */
/* fields for variable part of directory entry follow */
-- end of patch --
--
Rahul Dhesi UUCP: <backbones>!{iuvax,pur-ee}!bsu-cs!dhesi
ARPA: bsu-cs!dhesi@iuvax.cs.indiana.edu
Technical Details
Message-ID:
<5808@bsu-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!bsu-cs!dhesiShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.sources.bugs Subject: zoo timezone bug fix Summary: Semi-official timezone bug fix for zoo archiver 2.01 Message-ID: <5808@bsu-cs.UUCP> Date: 21 Feb 89 16:17:12 GMT Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 103