On Sun, Oct 19, 2014 at 04:45:41PM -0600, Karl Berry wrote: > Patrice, > > That is, remove all CR before NL and replace all other CR with NL, not > worrying about whether a given file is "consistent" or not. I have seen > plenty of input files with inconsistent EOL conventions, due to > different people editing it and the tools/os's not doing the right > thing. It's all just a needless hassle that we can get rid of, so we > might as well do so, seems to me.
Thaat could work on input, but it means that on output we must readd end of lines everywhere. I think that we already do that at some points, but not everywhere. > What chomp does depends on the system that Perl is running on -- on > Windows it will remove CRLF, on Unix just LF. It is useless for our > purposes since the input file may have been created on a different > system than the current one where makeinfo is running. I am pretty sure that I used chomp in a attempt to be more portable... Looks like it is incorrect. > I'm pretty sure that Perl does not do any kind of magic on input. I agree, but I think there is some "magic" on what is \n. It will be different on Unix and Windows. > Anyway, whatever magic Perl does or doesn't do, we don't need to worry > about it or try to take advantage of it. Just remove/replace the stupid > CR's and be done with it. Not really be done with it, but then consider that platform specific handling of \n (and chomp) will do as intended. -- Pat
