printf icon indicating copy to clipboard operation
printf copied to clipboard

dos-style line breaks :-(

Open eyalroz opened this issue 3 years ago • 4 comments

Currently, most (but not all) files in this repository have CRLF's and end of lines - like in MS-DOS... those are quite uncommon these days. I suggest you switch to regular LF-only line breaks.

Note: I don't mean CRLFs in what's produced by the code, I mean line breaks at the end of lines in printf.c, printf.h etc.

eyalroz avatar Jun 28 '21 13:06 eyalroz

I'd suggest something along the lines of

char const newline[] = "\r\n";  //  Or whatever the convention is

I fully agree with you that CRLF-newlines are horrible and we should all just switch to \n but I got some test gear with very specific taste in regards to their carriage return (everything from \r\n to only \n to \n\r and some with just a random byte as "end of command"). So maybe have LF-only as the default but make it switchable inside of printf.h or something?

Gnarflord avatar Jul 09 '21 08:07 Gnarflord

@Gnarflord : Oh, no, I think you misunderstood me. I mean that the source files in this repository have DOS-style line breaks. what you're suggesting is about what printf(), sprintf() etc. produce.

eyalroz avatar Jul 09 '21 09:07 eyalroz

Ah haha :D Yeah of course, seems like I need another coffee. And here I was, trying to look at your changes and complaining about the github diff-tool being broken as it showed every single line being changed though they all look the same lol Sorry to bother!

Gnarflord avatar Jul 09 '21 10:07 Gnarflord

@Gnarflord : Well, regardless - this is fixed in my fork. I noticed @mpaland has been basically inactive for 2 years now, so I merged a bunch of PR's in there, and also switched to CMake for building.

eyalroz avatar Jul 09 '21 13:07 eyalroz