Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CRLF line-endings #341

Merged
merged 13 commits into from Dec 30, 2017
Merged

Use CRLF line-endings #341

merged 13 commits into from Dec 30, 2017

Conversation

stefanor
Copy link
Contributor

@stefanor stefanor commented Aug 5, 2017

Most serial communication uses CRLF, so this is what serial terminals expect.

#endif
puts(s);
putchar('\r');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong here....

@mithro
Copy link
Member

mithro commented Oct 31, 2017

@stefanor Any chance we could add something to the CI which prevents people accidently landing '\n\r' pattern in the C code?

Is something as simple as

if grep '\\n\\r' firmware/*.c firmware/*.h; then
  echo "Should just use '\n' rather than '\n\r'"
  exit 1
fi

?

@stefanor
Copy link
Contributor Author

I was sceptical of that for a while, but what the hell, sure.

This does really need a better test suite at some point...

So that it goes to telnet too.
I don't think we ever compile them in
stdio_wrap translates LF to CR-LF is printed messages.
They will always be following a CR, that we already consumed. Without
this, you can't turn "status on" because it'll see the LF and
immediately turn it off, again.
"help" was causing telnet to disconnect
They go to the serial console only. And don't go through stdio_wrap,
which expands LF to CRLF.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants