Edward Welbourne writes:

 > The remaining question is whether it's *possible* for a text-mode
 > file handle on MS to still have a '\r' just before its '\n' in a
 > line, presumably due to a CRCRLF mess in the raw file.

 Yes, it most certainly is possible.  Translation only occurs on
 '\r\n'.

   Hello\r\r\n.

 Will end up as:

   Hello\r\n

 after being read.  The translation doesn't back up and reprocess:.

   Hello\r\n

 into

   Hello\n

 The '\n' conversion to '\r\n' on output is transparent, and putting
 '\r\n' in the output stream will end up with '\r\r\n' in the file.


--
What books will be in the Trump Presidential Library?

_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to