diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-06-14 21:31:15 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-06-14 21:31:15 +0300 |
commit | c630e8cfcec2c34f2038f93f48867c79d493d494 (patch) | |
tree | 4e066428f8c03e3c9fb4bfa04c620e409e2e10fa /builtin.c | |
parent | 0d9aad3848b7e0d6717ca30b71bb788d8134a4a3 (diff) | |
parent | 92edf3d8864ca092c9cffb7e1211e38ef7556be5 (diff) | |
download | egawk-c630e8cfcec2c34f2038f93f48867c79d493d494.tar.gz egawk-c630e8cfcec2c34f2038f93f48867c79d493d494.tar.bz2 egawk-c630e8cfcec2c34f2038f93f48867c79d493d494.zip |
Merge branch 'master' into feature/cmake
Diffstat (limited to 'builtin.c')
-rw-r--r-- | builtin.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2973,8 +2973,10 @@ set_how_many: leave alone, it goes into the output */ } else { /* gawk default behavior since 1996 */ - if (strncmp(scan, "\\\\\\&", 4) == 0) { + if (strncmp(scan, "\\\\\\&", 4) == 0 + || strncmp(scan, "\\\\\\\\", 4) == 0) { /* 2016: fixed */ /* \\\& --> \& */ + /* \\\\ --> \\ */ repllen -= 2; scan += 3; } else if (strncmp(scan, "\\\\&", 3) == 0) { @@ -3087,10 +3089,12 @@ set_how_many: *bp++ = *scan; } else { /* gawk default behavior since 1996 */ - if (strncmp(scan, "\\\\\\&", 4) == 0) { + if (strncmp(scan, "\\\\\\&", 4) == 0 + || strncmp(scan, "\\\\\\\\", 4) == 0) { /* 2016: fixed */ /* \\\& --> \& */ + /* \\\\ --> \\ */ *bp++ = '\\'; - *bp++ = '&'; + *bp++ = scan[3]; scan += 3; } else if (strncmp(scan, "\\\\&", 3) == 0) { /* \\& --> \<string> */ |