diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-06-14 21:30:50 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-06-14 21:30:50 +0300 |
commit | 92edf3d8864ca092c9cffb7e1211e38ef7556be5 (patch) | |
tree | 8c9de16a939fc069a339c5ddfd9c0b4802637bd3 /builtin.c | |
parent | 68773e1444b7e353346e52756e9db8fb487b56d4 (diff) | |
parent | b5a63ab37a2d018b0ae08abbf76ee2e88c3aff4c (diff) | |
download | egawk-92edf3d8864ca092c9cffb7e1211e38ef7556be5.tar.gz egawk-92edf3d8864ca092c9cffb7e1211e38ef7556be5.tar.bz2 egawk-92edf3d8864ca092c9cffb7e1211e38ef7556be5.zip |
Merge branch 'gawk-4.1-stable'
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> */ |