Added REG_NEWLINE as cflags to xregcomp for normal addresses so EOL $ will work

This commit is contained in:
Mark Whitley 2001-05-14 19:23:02 +00:00
parent 9496466044
commit 452cc1f293
2 changed files with 2 additions and 2 deletions

View 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"); error_msg_and_die("unterminated match expression");
my_str[idx] = '\0'; my_str[idx] = '\0';
*regex = (regex_t *)xmalloc(sizeof(regex_t)); *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 '/' */ idx++; /* so it points to the next character after the last '/' */
} }
else { else {

2
sed.c
View 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"); error_msg_and_die("unterminated match expression");
my_str[idx] = '\0'; my_str[idx] = '\0';
*regex = (regex_t *)xmalloc(sizeof(regex_t)); *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 '/' */ idx++; /* so it points to the next character after the last '/' */
} }
else { else {