Mail Archives: djgpp-workers/1997/12/18/06:42:26
molnarl AT cdata DOT tvnet DOT hu wrote:
> > I meant 'return ints in the range [-128..127] or -1'. Do I always have
> > to be *this* exact? I think it was obvious what I meant to say.
>
> I understand what you said. Maybe my comment wasn't clear: I just don't
> understand how do you decide whether getc read an EOF(=-1) or an 0xff
> character (which is -1 too if you convert it).
I must admit I never thought this would happen, but you are right of
course.
But, since getc is only supposed to be used for text files, which don't
usually contain '\xff' characters, I don't think this is really a
problem.
I've never seen a 'real' character value assigned to this value.
I see no workaround, but think the problem I originally stated is
majorly dominant over this one.
IIRC the '\xff' character (et al.) has been used in the past on file
systems with no exact file length entry in the directory. At least one
advantage, DJGPP would be compatible with programs written for those
file systems.
- Raw text -