rricharz / Tek4010

Free Tektronix 4010, 4013, 4014 and 4015 terminal emulator for Raspberry Pi, Linux, macOS (Macintosh) and Windows
GNU General Public License v3.0
244 stars 29 forks source link

Proposal to Standardize Whitespace in Source Code #47

Closed hanyazou closed 5 months ago

hanyazou commented 5 months ago

I've noticed that the source code files include a mix of whitespace and tab characters, along with extra spaces at the end of lines. In the image attached, you'll see the tab characters highlighted in yellow and the extra spaces in red.

To improve readability and maintain consistency, I suggest we standardize the use of whitespace characters and remove any trailing spaces. While this update involves several changes, they are purely cosmetic and should enhance the code's clarity.

What are your thoughts on this? If you're in agreement, I will prepare a pull request with these modifications.

Screenshot 2024-06-02 at 8 43 01
rricharz commented 5 months ago

I think there is more to this. Your screen shot also shows that intention is not always right. This is most likely the result of using different means to edit the files on different systems. I'm worried that fixing this would involve all source files and extensive tests might be required. What are your thoughts? Could you check whether the compiled program tek4010 would not be altered? If yes, I will approve the cosmetic changes to the source files.

hanyazou commented 5 months ago

Thanks for your comment. I will try to create a PR next week.

It is inevitable that many files will be affected, but I am not too worried about introducing troublesome bug because it does not change the logic at all, just the removal or addition of whitespace and tab codes. I will make sure that demo.sh works as well as ever on Linux and macOS. Please let me know if you have any other test cases. I will run it and confirm.

rricharz commented 5 months ago

Just use tek4010 demos/demo.sh for testing.

hanyazou commented 5 months ago

I've completed running demo.sh on my Linux system and macOS without any problems and submitted https://github.com/rricharz/Tek4010/pull/48.

You can ensure the PR does not change any program logic because the URL with ?w=1 does not show any changes. Please look at the URL below:

https://github.com/rricharz/Tek4010/pull/48/files?w=1

Screenshot 2024-06-02 at 17 33 10
rricharz commented 5 months ago

Fixed with pull request #48