sed depends on -r to be rightmost flag to simplify the REG_EXTENDED test.
authorRob Landley <rob@landley.net>
Fri, 6 Mar 2015 22:50:54 +0000 (16:50 -0600)
committerRob Landley <rob@landley.net>
Fri, 6 Mar 2015 22:50:54 +0000 (16:50 -0600)
commite3edd6cda410d25082135a6526cf7bfa17b49d8c
treee3b5a16d523de9aa192879d1df7c3cd161f5f134
parent1e2399b91cfd9895939876c4fb47af11c13ddf89
sed depends on -r to be rightmost flag to simplify the REG_EXTENDED test.

(If a flag is 1, you can multiply it by the value you want and get that value
else zero without a branch or conditional assignment.) So move -E one to the
left so FLAG_r is 1 again, and add a [+Er] suffix instead of testing
FLAG_r | FLAG_E in the users.
toys/posix/sed.c