diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-10-29 22:03:40 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-10-29 22:03:40 +1000 |
commit | fb923fab4f0cf276c336d98692d00df6a943791d (patch) | |
tree | 3e5eaa338992ee764a4f8e340d31c1d2d73524cc /make-c-ext.tcl | |
parent | 6c7c53c8f1966847f303955135bbc1c1835c3464 (diff) | |
download | jimtcl-fb923fab4f0cf276c336d98692d00df6a943791d.zip jimtcl-fb923fab4f0cf276c336d98692d00df6a943791d.tar.gz jimtcl-fb923fab4f0cf276c336d98692d00df6a943791d.tar.bz2 |
build: Support sources with CRNL line endings0.80
make-c-ext.tcl and parse-unidata.tcl now support input files
with CRNL line endings
Reported-by: Mark@TheMarkitecht.com
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'make-c-ext.tcl')
-rw-r--r-- | make-c-ext.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/make-c-ext.tcl b/make-c-ext.tcl index fd1a056..00d4d1e 100644 --- a/make-c-ext.tcl +++ b/make-c-ext.tcl @@ -18,8 +18,8 @@ set f [open $source] while {[gets $f buf] >= 0} { # Remove comment lines regsub {^[ \t]*#.*$} $buf "" buf - # Escape quotes and backlashes - set buf [string map [list \\ \\\\ \" \\"] $buf] + # Escape quotes and backlashes and remove carriage returns + set buf [string map [list \\ \\\\ \" \\" \r ""] $buf] lappend sourcelines \"$buf\\n\" } close $f |