Mercurial > hg > octave-nkf
diff src/octave.cc @ 1516:14d8c0a838c1
[project @ 1995-10-03 13:21:12 by jwe]
author | jwe |
---|---|
date | Tue, 03 Oct 1995 13:22:22 +0000 |
parents | 3e705c864019 |
children | 0d9e10d10bd7 |
line wrap: on
line diff
--- a/src/octave.cc +++ b/src/octave.cc @@ -135,6 +135,10 @@ // The command-line options. Octave_str_obj octave_argv; +// Nonzero means that input is coming from a file that was named on +// the command line. +int input_from_command_line_file = 1; + // Top level context (?) jmp_buf toplevel; @@ -314,10 +318,12 @@ unwind_protect_int (echo_input); unwind_protect_int (using_readline); unwind_protect_int (saving_history); + unwind_protect_int (input_from_command_line_file); echo_input = 0; using_readline = 0; saving_history = 0; + input_from_command_line_file = 0; unwind_protect_ptr (curr_sym_tab); @@ -663,6 +669,8 @@ if (infile) { + input_from_command_line_file = 1; + bind_builtin_variable ("program_invocation_name", curr_fcn_file_name); @@ -896,10 +904,12 @@ begin_unwind_frame ("eval_string"); unwind_protect_int (get_input_from_eval_string); + unwind_protect_int (input_from_command_line_file); unwind_protect_ptr (global_command); unwind_protect_ptr (current_eval_string); get_input_from_eval_string = 1; + input_from_command_line_file = 0; current_eval_string = string; YY_BUFFER_STATE old_buf = current_buffer ();