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 /parse-unidata.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 'parse-unidata.tcl')
-rw-r--r-- | parse-unidata.tcl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/parse-unidata.tcl b/parse-unidata.tcl index 2bf6547..17e2e30 100644 --- a/parse-unidata.tcl +++ b/parse-unidata.tcl @@ -33,6 +33,8 @@ lassign $argv unicodefile widthfile set f [open $unicodefile] while {[gets $f buf] >= 0} { + # Remove any trailing whitespace, especially errant CR + set buf [string trim $buf] set title "" set lower "" set upper "" @@ -115,6 +117,8 @@ foreach type {upper lower title} { if {$do_width} { set f [open $widthfile] while {[gets $f buf] >= 0} { + # Remove any trailing whitespace, especially errant CR + set buf [string trim $buf] if {[regexp {^([0-9A-Fa-f.]+);W} $buf -> range]} { set range [string tolower $range] lassign [split $range .] lower - upper |