Added REG_NEWLINE as cflags to xregcomp for normal addresses so EOL $ will work
authorMark Whitley <markw@lineo.com>
Mon, 14 May 2001 19:23:02 +0000 (19:23 -0000)
committerMark Whitley <markw@lineo.com>
Mon, 14 May 2001 19:23:02 +0000 (19:23 -0000)
editors/sed.c
sed.c

index 156ad3adaa30774168811ab780609e52a75ebb3a..99c49c3272f49e46995421c037e75a4d824c5902 100644 (file)
@@ -181,7 +181,7 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
                        error_msg_and_die("unterminated match expression");
                my_str[idx] = '\0';
                *regex = (regex_t *)xmalloc(sizeof(regex_t));
-               xregcomp(*regex, my_str+1, 0);
+               xregcomp(*regex, my_str+1, REG_NEWLINE);
                idx++; /* so it points to the next character after the last '/' */
        }
        else {
diff --git a/sed.c b/sed.c
index 156ad3adaa30774168811ab780609e52a75ebb3a..99c49c3272f49e46995421c037e75a4d824c5902 100644 (file)
--- a/sed.c
+++ b/sed.c
@@ -181,7 +181,7 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege
                        error_msg_and_die("unterminated match expression");
                my_str[idx] = '\0';
                *regex = (regex_t *)xmalloc(sizeof(regex_t));
-               xregcomp(*regex, my_str+1, 0);
+               xregcomp(*regex, my_str+1, REG_NEWLINE);
                idx++; /* so it points to the next character after the last '/' */
        }
        else {