[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sciibin ms-dos available



In article <01bcc81f$a8e12500$32a320cc@timesink>, "matthew p. conte"
<spam@somebody.else> wrote:

> Tony W. <twardXXXX@enteract.com> wrote:
> > Just out of curiosity, what are the bugs? I compiled the public source
> > code and have been using it for quite a while with no problems. Have I
> > been lucky, or are the bugs obscure?
> 
> there must be something wrong with my compiler then, (turbo c++ 3.0)
> because first it was throwing an extra two bytes into the decodings anytime
> 0x0A showed up, and then there were some int/long overflow issues that i
> had to take care of.

My guess is that the file was being opened like this:

fopen( "foo", "r" );

rather than like this:

fopen( "foo", "rb" );

and that the turbo c++ libraries attempt to "fix" files not opened as
binary by automatically translating LFs to CR/LF pairs. This sort of
thing is common when porting UN*X programs to PC or Mac.

As for the int overflow problem I like the FSF's statement:

However, don't make any effort to cater to the possibility that an
`int' will be less than 32 bits.  We don't support 16-bit machines in
GNU.

-- 
W. Sheldon Simms III   |   2000 is *still* the 20th century
sheldon@atlcom.net     |