-
Notifications
You must be signed in to change notification settings - Fork 686
target: mbedos5: Add carriage return in jerry_port_console #1427
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
Conversation
cc3a159 to
d827e39
Compare
| vfprintf (stdout, format, args); | ||
| va_end (args); | ||
|
|
||
| if (strlen(format) == 1 && format[0] == 0x0a) { /* line feed (\n) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this follows the JerryScript coding style please put the { to the next line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And add whitespace after the strlen() like if (strlen (format)..., right @zherczeg ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
|
Any plans to fix the style issues? |
554a701 to
b9a04d7
Compare
Serial monitors (like screen on macOS / Linux) expect both CR and LF characters for new lines. Due to jerryscript only printing a line feed after calls to `print()` this makes log messages look wrong. This patch adds a CR when it encounters a LF character in jerry_port_console or jerry_port_log for the mbedos5 target. JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom janjongboom@gmail.com
|
@zherczeg Done! |
|
Thank you! |
LaszloLango
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Serial monitors (like screen on macOS / Linux) expect both CR and LF characters for new lines. Due to jerryscript only printing a line feed after calls to
print()this makes log messages look wrong. This patch adds a CR when it encounters a LF character in jerry_port_console or jerry_port_log for the mbedos5 target.JerryScript-DCO-1.0-Signed-off-by: Jan Jongboom jan.jongboom@arm.com
Fix for #1426