]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r361884: sed: attempt to learn about hex escapes (e.g. \x27)
authorKyle Evans <kevans@FreeBSD.org>
Sun, 28 Jun 2020 02:38:07 +0000 (02:38 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Sun, 28 Jun 2020 02:38:07 +0000 (02:38 +0000)
commitf6adeb6a1d67a995a54575f6f2d01e6bc8a27147
tree8ae4c389149b46a797cd3bcf75ea0b1937efd840
parentdcc033b5c4fb04d063f09a15690d5dd7429d6d24
MFC r361884: sed: attempt to learn about hex escapes (e.g. \x27)

Somewhat predictably, software often wants to use \x27/\x24 among others so
that they can decline worrying about ugly escaping, if said escaping is even
possible. Right now, this software is using these and getting the wrong
results, as we'll interpret those as x27 and x24 respectively. Some examples
of this, when an exp-run was ran, were science/octopus and misc/vifm.

Go ahead and process these at all times.  We allow either one or two digits,
and the tests account for both.  If extra digits are specified, e.g. \x2727,
then the third and fourth digits are interpreted literally as one might
expect.
usr.bin/sed/compile.c
usr.bin/sed/tests/sed2_test.sh