From c86ca1a9fc3bb8b09eb429458b2ecf68b62cd1de Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Mon, 6 Nov 2023 11:36:02 +0100 Subject: FLUID: '\r' (CR) is skipped when reading project files Project and code files are now always written with LF instead of CRLF, even on MSWindows machines. --- fluid/file.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'fluid/file.h') diff --git a/fluid/file.h b/fluid/file.h index 3fabf244a..b2e3739a3 100644 --- a/fluid/file.h +++ b/fluid/file.h @@ -44,6 +44,8 @@ protected: void expand_buffer(int length); + int nextchar() { for (;;) { int ret = fgetc(fin); if (ret!='\r') return ret; } } + public: /// Holds the file version number after reading the "version" tag double read_version; @@ -67,7 +69,7 @@ public: class Fd_Project_Writer { protected: - // Project output file, mode "w" for files, "wb" for SourceView + // Project output file, always opened in "wb" mode FILE *fout; /// If set, one space is written before text unless the format starts with a newline character int needspace; -- cgit v1.2.3