From f7eed062230579ec547747429cadb9c8feccadaa Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 11 Apr 2005 13:53:13 +0000 Subject: [PATCH] do not add a default command-line in in-place editing mode 2005-04-11 Paolo Bonzini * sed/execute.c (process_files): Do not add a default command-line in in-place editing mode. git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-45 --- ChangeLog | 5 +++++ sed/execute.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6499abc..44714a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-04-04 Paolo Bonzini + + * sed/execute.c (process_files): Do not add a default + command-line in in-place editing mode. + 2005-02-10 Paolo Bonzini * testsuite/appquit.good, testsuite/appquit.inp, diff --git a/sed/execute.c b/sed/execute.c index e05dbb9..6ccf944 100644 --- a/sed/execute.c +++ b/sed/execute.c @@ -1709,10 +1709,14 @@ process_files(the_program, argv) #ifdef EXPERIMENTAL_DASH_N_OPTIMIZATION branches = count_branches(the_program); #endif /*EXPERIMENTAL_DASH_N_OPTIMIZATION*/ - input.file_list = stdin_argv; input.reset_at_next_file = true; if (argv && *argv) input.file_list = argv; + else if (in_place_extension) + panic(_("no input files")); + else + input.file_list = stdin_argv; + input.bad_count = 0; input.line_number = 0; input.read_fn = read_always_fail;