Mail Archives: djgpp/2004/11/04/20:50:25
> After beating my head against something, I have come to the
> conclusion that fgets() in DJGPP 2.03 (and maybe getc etc too)
> simply suppress any isolated \r. I expected that suppression would
> only occur when followed by \n (cr/lf). This is using stdin
> undiddled, i.e. as a text file.
>
> Does anyone know if this is correct?
DJGPP has always done that. In text mode, \r's are simply deleted
when encountered. This is very efficient, compatible with other
compilers, and if you have a bare \r in a TEXT file, you have an
invalid text file, so legally we can do whatever we want with it.
We've tried smarter solutions, but they've never worked out.
- Raw text -