Modified print_subst_w_backrefs() so it will print backslash escaped
characters properly, just like GNU sed.
diff --git a/editors/sed.c b/editors/sed.c
index 69a5e03..6654719 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -500,6 +500,12 @@
fputc(line[j], stdout);
}
+ /* if we find a backslash escaped character, print the character */
+ else if (replace[i] == '\\') {
+ ++i;
+ fputc(replace[i], stdout);
+ }
+
/* if we find an unescaped '&' print out the whole matched text.
* fortunately, regmatch[0] contains the indicies to the whole matched
* expression (kinda seems like it was designed for just such a