aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-06-14 21:31:15 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-06-14 21:31:15 +0300
commitc630e8cfcec2c34f2038f93f48867c79d493d494 (patch)
tree4e066428f8c03e3c9fb4bfa04c620e409e2e10fa /builtin.c
parent0d9aad3848b7e0d6717ca30b71bb788d8134a4a3 (diff)
parent92edf3d8864ca092c9cffb7e1211e38ef7556be5 (diff)
downloadegawk-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.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/builtin.c b/builtin.c
index 285b442b..888fa10c 100644
--- a/builtin.c
+++ b/builtin.c
@@ -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> */