]> git.ipfire.org Git - thirdparty/coreutils.git/commit
nl: support multi-byte section delimiters
authorCollin Funk <collin.funk1@gmail.com>
Sat, 7 Feb 2026 19:15:23 +0000 (11:15 -0800)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 9 Feb 2026 02:45:24 +0000 (18:45 -0800)
commit6bbf04db6335a97adf06ad31ab6cea9292ad7d2c
tree5ec19cab89cae6ede78d83bf99c715ed39e2fb3e
parenta3dbfb60e4b873c4c4d44c2fd273461e292a860b
nl: support multi-byte section delimiters

* NEWS: Mention the improvement.
* src/nl.c: Include mcel.h.
(DEFAULT_SECTION_DELIMITERS): Resize to fit 2 multi-byte characters.
(section_del_len): New variable.
(check_section): Compare against section_del_len instead of 2.
(main): Support multi-byte characters for the -d option.
* tests/nl/multibyte.sh: New file.
* tests/nl/nl.sh: New file, moved from tests/misc/nl.sh.
* tests/local.mk (all_tests): Add the new test. Adjust the existing
tests file name.
* cfg.mk (exclude_file_name_regexp--sc_space_tab): Adjust Adjust the
existing tests file name.
NEWS
cfg.mk
src/nl.c
tests/local.mk
tests/nl/multibyte.sh [new file with mode: 0755]
tests/nl/nl.sh [moved from tests/misc/nl.sh with 100% similarity]