diff options
author | Ron Yorston <rmy@pobox.com> | 2023-01-30 10:33:59 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-01-30 10:33:59 +0000 |
commit | 7a537eb71874cd6c8d0e9ab1f906e6466e7f793c (patch) | |
tree | af7b8c0218c5bc8b3e7c7aa5d86beca68350446f /libbb | |
parent | 33ae88c40cf56b53c06e627e0535c9c740767aa4 (diff) | |
download | busybox-w32-7a537eb71874cd6c8d0e9ab1f906e6466e7f793c.tar.gz busybox-w32-7a537eb71874cd6c8d0e9ab1f906e6466e7f793c.tar.bz2 busybox-w32-7a537eb71874cd6c8d0e9ab1f906e6466e7f793c.zip |
awk: CRLF handling
Previous efforts at handling DOS-style line endings in awk have
included commits ee7e00dc5 and 1a3717342.
The use of remove_cr() is unwise:
- It's overzealous, removing all CRs, not just those in CRLF pairs.
- Even if that were fixed awk reads input in chunks. There's a
remote chance a CRLF might appear at a chunk boundary and be
missed.
remove_cr() will be fixed separately. In awk treat all data input
as being in text mode.
Skipping CRs in skip_spaces() is also flawed. Instead read scripts
in text mode.
Add a couple of test cases. One of these (awk backslash+CRLF eaten
with no trace) fails without this patch.
Diffstat (limited to 'libbb')
0 files changed, 0 insertions, 0 deletions