Let --posix turn off nonportable scripts ending in backslash.
* sed/compile.c (errors, INCOMPLETE_CMD): New error string. (compile_program): In strict posix mode, complain about incomplete command. * NEWS: Update. Report by Bruno Haible.
This commit is contained in:
1 parent
f38d4c196a
commit
327beba781
2 files changed
+15
-2
No files matched your search
@@ -1,3 +1,12 @@
|
||||
2019-07-19 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Let --posix turn off nonportable scripts ending in backslash.
|
||||
* sed/compile.c (errors, INCOMPLETE_CMD): New error string.
|
||||
(compile_program): In strict posix mode, complain about incomplete
|
||||
command.
|
||||
* NEWS: Update.
|
||||
Report by Bruno Haible.
|
||||
|
||||
2010-07-16 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* autoboot.conf (gnulib_modules): Replace mkstemp with mkostemp.
|
||||
|
||||
+6
-2
@@ -155,7 +155,8 @@ static const char errors[] =
|
||||
"delimiter character is not a single-byte character\0"
|
||||
"expected newer version of sed\0"
|
||||
"invalid usage of line address 0\0"
|
||||
"unknown command: `%c'";
|
||||
"unknown command: `%c'\0"
|
||||
"incomplete command";
|
||||
|
||||
#define BAD_BANG (errors)
|
||||
#define BAD_COMMA (BAD_BANG + sizeof(N_("multiple `!'s")))
|
||||
@@ -182,7 +183,8 @@ static const char errors[] =
|
||||
#define ANCIENT_VERSION (BAD_DELIM + sizeof(N_("delimiter character is not a single-byte character")))
|
||||
#define INVALID_LINE_0 (ANCIENT_VERSION + sizeof(N_("expected newer version of sed")))
|
||||
#define UNKNOWN_CMD (INVALID_LINE_0 + sizeof(N_("invalid usage of line address 0")))
|
||||
#define END_ERRORS (UNKNOWN_CMD + sizeof(N_("unknown command: `%c'")))
|
||||
#define INCOMPLETE_CMD (UNKNOWN_CMD + sizeof(N_("unknown command: `%c'")))
|
||||
#define END_ERRORS (INCOMPLETE_CMD + sizeof(N_("incomplete command")))
|
||||
|
||||
static struct output *file_read = NULL;
|
||||
static struct output *file_write = NULL;
|
||||
@@ -1404,6 +1406,8 @@ compile_program(vector)
|
||||
/* this is buried down here so that "continue" statements will miss it */
|
||||
++vector->v_length;
|
||||
}
|
||||
if (posixicity == POSIXLY_BASIC && pending_text)
|
||||
bad_prog (_(INCOMPLETE_CMD));
|
||||
return vector;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user