← Commit list

7940147e2

Robert Griebl
Robert Griebl
2002-08-06
FAILED Duration: 5s

Subject

Added the \CregexpC syntax as an alternative for /regexp/ (like GNU sed)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/sed.c+5 -1
@@ -194,7 +194,11 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *linenum, r
*linenum = -1;
idx++;
}
- else if (my_str[idx] == '/') {
+ else if (my_str[idx] == '/' || my_str[idx] == '\\') {
+ if (my_str[idx] == '\\') {
+ my_str[idx] = 0;
+ sed_cmd-> delimiter = my_str[++idx];
+ }
idx = index_of_next_unescaped_regexp_delim(sed_cmd, my_str, ++idx);
if (idx == -1)
error_msg_and_die("unterminated match expression");