summaryrefslogtreecommitdiff
path: root/fluid/file.h
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2023-11-06 11:36:02 +0100
committerMatthias Melcher <github@matthiasm.com>2023-11-06 11:36:02 +0100
commitc86ca1a9fc3bb8b09eb429458b2ecf68b62cd1de (patch)
tree8c60474e660a584412fd590ef347c05ded35ac90 /fluid/file.h
parentacc96cdf5666a37ff87d0038af74c1af1628ca11 (diff)
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.
Diffstat (limited to 'fluid/file.h')
-rw-r--r--fluid/file.h4
1 files changed, 3 insertions, 1 deletions
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;