Date: Tue, 6 May 2003 14:27:31 +0300 (EET DST) From: Esa A E Peuha 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: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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/