Skip to content

Fix rcore_desktop_rgfw.c line terminators #4957

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

Closed
wants to merge 1 commit into from

Conversation

M374LX
Copy link
Contributor

@M374LX M374LX commented May 28, 2025

The file rcore_desktop_rgfw.c uses CR+LF line terminators, but other files use just LF.

This PR fixes this inconsistency and also removes some trailing spaces.

@raysan5
Copy link
Owner

raysan5 commented May 29, 2025

I work on Windows so, technically all raylib src code files are CR + LF.

@raysan5 raysan5 closed this May 29, 2025
@M374LX
Copy link
Contributor Author

M374LX commented May 29, 2025

All source files except rcore_desktop_rgfw.c actually use LF line terminators, as shown by the file utility:

~/raylib/src$ file raylib.h config.h *.c
raylib.h:    C source, Unicode text, UTF-8 text
config.h:    C source, ASCII text
raudio.c:    C source, ASCII text
rcore.c:     C source, ASCII text
rglfw.c:     C source, ASCII text
rmodels.c:   C source, ASCII text
rshapes.c:   C source, ASCII text
rtext.c:     C source, ASCII text
rtextures.c: C source, ASCII text
utils.c:     C source, ASCII text
~/raylib/src$ file platforms/*.c
platforms/rcore_android.c:      C source, ASCII text
platforms/rcore_desktop_glfw.c: C source, ASCII text
platforms/rcore_desktop_rgfw.c: C source, ASCII text, with CRLF line terminators
platforms/rcore_desktop_sdl.c:  C source, ASCII text, with very long lines (315)
platforms/rcore_drm.c:          C source, ASCII text
platforms/rcore_template.c:     C source, ASCII text
platforms/rcore_web.c:          C source, ASCII text
~/contrib/raylib/src$

Most modern text editors and IDEs for Windows, including Notepad from Windows 10 onwards, support LF line terminators. So, working on Windows does not mean necessarily using CR+LF.

@M374LX
Copy link
Contributor Author

M374LX commented May 30, 2025

@raysan5 Did you notice that? Do you agree that all source files should use LF line terminators?

@raysan5
Copy link
Owner

raysan5 commented May 30, 2025

@M374LX When I open raylib source files on Windows with Notepad++, they are CR+LF. I think GitHub could be changing it when uploaded to the server... not sure...

@M374LX M374LX deleted the rgfw-lf branch May 31, 2025 19:59
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.

2 participants