Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!uvaarpa!mcnc!rti!sunpix!matthew From: matthew@sunpix.UUCP ( Sun NCAA) Newsgroups: comp.binaries.apple2 Subject: unblu.c Keywords: binary 2, executioner, unsqueeze programs on Unix Message-ID: <586@greens.UUCP> Date: 7 Apr 89 17:03:49 GMT Organization: Sun Microsystems, Research Triangle Park, NC Lines: 23 Warning! I recently got around to compiling and using Marcel Mol's unblu program. It compiled without error, but while extracting the first file of a multi-file .BNY file, it complained about an invalid .BNY file. While trying to debug the code I found it was stopping 256 bytes short of the end of the first file. Checking through the code I found the problem. The code assumed that it was being compiled by a compiler that defaulted to unsigned 'char's. The 'C' compiler under SunOS 4.0 defaults to signed chars. After redeclaring all declarations of 'buf' from 'char *buf;' to 'unsigned char *buf;' the program compiled and executed correctly. Moral: when using a char to hold anything but characters, ensure you declare it signed or unsigned as necessary. -- Matthew Lee Stier | Sun Microsystems --- RTP, NC 27709-3447 | "Wisconsin Escapee" uucp: { sun, mcnc!rti }!sunpix!matthew | phone: (919) 469-8300 fax: (919) 460-8355 |