mpaland / printf

Tiny, fast, non-dependent and fully loaded printf implementation for embedded systems. Extensive test suite passing.
MIT License
2.47k stars 452 forks source link

dos-style line breaks :-( #104

Open eyalroz opened 3 years ago

eyalroz commented 3 years ago

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.

Gnarflord commented 3 years ago

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?

eyalroz commented 3 years ago

@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.

Gnarflord commented 3 years ago

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!

eyalroz commented 3 years ago

@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.