delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/05/06/07:39:47

Date: Tue, 6 May 2003 14:27:31 +0300 (EET DST)
From: Esa A E Peuha <peuha AT cc DOT helsinki DOT fi>
Sender: peuha AT sirppi DOT helsinki DOT fi
To: djgpp-workers AT delorie DOT com
Subject: Re: djtar and slightly weirdly formatted ZIPs, revision 2 [PATCH]
In-Reply-To: <E19Bvwx-0000zi-00@phekda.freeserve.co.uk>
Message-ID: <Pine.OSF.4.51.0305061421140.24402@sirppi.helsinki.fi>
References: <E19Bvwx-0000zi-00 AT phekda DOT freeserve DOT co DOT uk>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 3 May 2003, Richard Dawe wrote:

> ! 	  fprintf(log_out,
> ! 		  "%s: don't understand header type 0x%x%x\n",
> ! 		  zipfilename, ((char *)&buffer)[0], ((char *)&buffer)[1]);

These bytes should be printed with "%02x", not "%x" (else 0x0f0f will be
printed as 0xff), and the casts should be to unsigned char * (otherwise
0x8080 turns to 0xffffff80ffffff80).  The rest of the code seems fine.

-- 
Esa Peuha
student of mathematics at the University of Helsinki
http://www.helsinki.fi/~peuha/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019