You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I compile the example programs I am finding that the output is misaligned. At first I thought it was extra spacing but later realized that the cursor was not going to the beginning of the next line. I am used to unix style line endings but if I change "\n" to "\r\n" then the output of programs looks as I would expect. Am I doing something wrong or should most example programs be updated?
Default output of sisense-welcome
After swapping "\r\n" in for "\n"
The text was updated successfully, but these errors were encountered:
Historically, Freedom-Metal used to (sneakily, silently) replace \n by \r\n in C standard output routines. I found this behavior to be problematic and so I pushed to change it in March 2020 (PR #236). I think I still feel the same way.
A different question is whether the examples should instead use \r\n. I have less strong of an opinion here. There's no universally correct way to display a newline: \n, \r, \r\n, etc., are all "correct" on different terminal emulators, so it's impossible to write a single example program that will work correctly for everyone.
This being said, there is an issue here: you apparently followed our instructions (to use GNU screen), and had a bad experience. I think the solution is for SiFive to provide users with instructions on how to reconfigure GNU screen to reinterpret \n as \r\n (or whatever screen needs to display the correct output). Perhaps this isn't a screen setting at all, but is coming from the underlying terminal emulator that screen is running in. I Googled for a few minutes and couldn't figure this out: most Google hits suggested using a different program, or hacking the GNU screen source code.
When I compile the example programs I am finding that the output is misaligned. At first I thought it was extra spacing but later realized that the cursor was not going to the beginning of the next line. I am used to unix style line endings but if I change "\n" to "\r\n" then the output of programs looks as I would expect. Am I doing something wrong or should most example programs be updated?
Default output of sisense-welcome
After swapping "\r\n" in for "\n"
The text was updated successfully, but these errors were encountered: