1
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
20 |
|
21 */ |
|
22 |
|
23 // Born February 20, 1992. |
|
24 |
240
|
25 #ifdef HAVE_CONFIG_H |
1192
|
26 #include <config.h> |
1
|
27 #endif |
|
28 |
1355
|
29 #include <cassert> |
|
30 #include <cstdlib> |
|
31 #include <cstring> |
|
32 #include <ctime> |
|
33 |
3503
|
34 #include <fstream> |
|
35 #include <iostream> |
|
36 #include <strstream> |
1355
|
37 |
|
38 #ifdef HAVE_UNISTD_H |
2442
|
39 #ifdef HAVE_SYS_TYPES_H |
1
|
40 #include <sys/types.h> |
2442
|
41 #endif |
139
|
42 #include <unistd.h> |
|
43 #endif |
1355
|
44 |
2926
|
45 #include "cmd-edit.h" |
|
46 #include "file-stat.h" |
240
|
47 #include "lo-error.h" |
2926
|
48 #include "oct-env.h" |
3019
|
49 #include "pathsearch.h" |
1907
|
50 #include "str-vec.h" |
223
|
51 |
2492
|
52 #include <defaults.h> |
1355
|
53 #include "defun.h" |
|
54 #include "error.h" |
|
55 #include "file-io.h" |
1
|
56 #include "input.h" |
|
57 #include "lex.h" |
1742
|
58 #include "oct-hist.h" |
3195
|
59 #include "oct-obj.h" |
2375
|
60 #include "ops.h" |
1670
|
61 #include "toplev.h" |
1
|
62 #include "parse.h" |
2982
|
63 #include "pt-plot.h" |
562
|
64 #include "procstream.h" |
1817
|
65 #include "prog-args.h" |
1355
|
66 #include "sighandlers.h" |
|
67 #include "sysdep.h" |
2375
|
68 #include "ov.h" |
1
|
69 #include "unwind-prot.h" |
1355
|
70 #include "utils.h" |
|
71 #include "variables.h" |
2492
|
72 #include <version.h> |
1
|
73 |
2910
|
74 extern void install_builtins (void); |
|
75 |
1704
|
76 #if !defined (HAVE_ATEXIT) && defined (HAVE_ON_EXIT) |
|
77 extern "C" int on_exit (); |
|
78 #define atexit on_exit |
|
79 #endif |
|
80 |
1907
|
81 // The command-line options. |
|
82 static string_vector octave_argv; |
1
|
83 |
2239
|
84 // TRUE means we read ~/.octaverc and ./.octaverc. |
|
85 // (--norc; --no-init-file; -f) |
|
86 static bool read_init_files = true; |
|
87 |
|
88 // TRUE means we read the site-wide octaverc files. |
|
89 // (--norc; --no-site-file; -f) |
2240
|
90 static bool read_site_files = true; |
1
|
91 |
3019
|
92 // TRUE means we don't print the usual startup message. |
616
|
93 // (--quiet; --silent; -q) |
2239
|
94 static bool inhibit_startup_message = false; |
1
|
95 |
3019
|
96 // TRUE means we turn on compatibility options. |
1410
|
97 // (--traditional) |
2239
|
98 static bool traditional = false; |
1410
|
99 |
3019
|
100 // If TRUE, print verbose info in some cases. |
1825
|
101 // (--verbose; -V) |
2239
|
102 static bool verbose_flag = false; |
1825
|
103 |
1
|
104 // Usage message |
139
|
105 static const char *usage_string = |
3180
|
106 "octave [-?HVdfhiqvx] [--debug] [--echo-commands] [--exec-path path]\n\ |
2239
|
107 [--help] [--info-file file] [--info-program prog] [--interactive]\n\ |
3180
|
108 [--no-history] [--no-init-file] [--no-line-editing] [--no-site-file]\n\ |
|
109 [-p path] [--path path] [--silent] [--traditional] [--verbose]\n\ |
|
110 [--version] [file]"; |
1
|
111 |
1358
|
112 // This is here so that it's more likely that the usage message and |
1410
|
113 // the real set of options will agree. Note: the `+' must come first |
|
114 // to prevent getopt from permuting arguments! |
3180
|
115 static const char *short_opts = "+?HVdfhip:qvx"; |
139
|
116 |
1103
|
117 // Long options. See the comments in getopt.h for the meanings of the |
|
118 // fields in this structure. |
1613
|
119 #define EXEC_PATH_OPTION 1 |
|
120 #define INFO_FILE_OPTION 2 |
|
121 #define INFO_PROG_OPTION 3 |
2240
|
122 #define NO_INIT_FILE_OPTION 4 |
|
123 #define NO_LINE_EDITING_OPTION 5 |
|
124 #define NO_SITE_FILE_OPTION 6 |
|
125 #define TRADITIONAL_OPTION 7 |
1817
|
126 long_options long_opts[] = |
139
|
127 { |
1855
|
128 { "debug", prog_args::no_arg, 0, 'd' }, |
2277
|
129 { "braindead", prog_args::no_arg, 0, TRADITIONAL_OPTION }, |
1855
|
130 { "echo-commands", prog_args::no_arg, 0, 'x' }, |
|
131 { "exec-path", prog_args::required_arg, 0, EXEC_PATH_OPTION }, |
|
132 { "help", prog_args::no_arg, 0, 'h' }, |
|
133 { "info-file", prog_args::required_arg, 0, INFO_FILE_OPTION }, |
|
134 { "info-program", prog_args::required_arg, 0, INFO_PROG_OPTION }, |
|
135 { "interactive", prog_args::no_arg, 0, 'i' }, |
3180
|
136 { "no-history", prog_args::no_arg, 0, 'H' }, |
2239
|
137 { "no-init-file", prog_args::no_arg, 0, NO_INIT_FILE_OPTION }, |
1855
|
138 { "no-line-editing", prog_args::no_arg, 0, NO_LINE_EDITING_OPTION }, |
2239
|
139 { "no-site-file", prog_args::no_arg, 0, NO_SITE_FILE_OPTION }, |
1855
|
140 { "norc", prog_args::no_arg, 0, 'f' }, |
|
141 { "path", prog_args::required_arg, 0, 'p' }, |
|
142 { "quiet", prog_args::no_arg, 0, 'q' }, |
|
143 { "silent", prog_args::no_arg, 0, 'q' }, |
|
144 { "traditional", prog_args::no_arg, 0, TRADITIONAL_OPTION }, |
|
145 { "verbose", prog_args::no_arg, 0, 'V' }, |
|
146 { "version", prog_args::no_arg, 0, 'v' }, |
3019
|
147 { 0, 0, 0, 0 } |
139
|
148 }; |
1
|
149 |
1355
|
150 // Store the command-line options for later use. |
|
151 |
|
152 static void |
|
153 intern_argv (int argc, char **argv) |
|
154 { |
3259
|
155 bind_builtin_variable ("nargin", static_cast<double> (argc-1), |
|
156 true, true, 0); |
3195
|
157 |
|
158 octave_value_list octave_argv; |
|
159 |
1355
|
160 if (argc > 1) |
|
161 { |
2495
|
162 // Skip program name in argv. |
3195
|
163 while (--argc > 0) |
|
164 octave_argv(argc-1) = octave_value (*(argv+argc)); |
1411
|
165 |
1355
|
166 } |
1907
|
167 |
3259
|
168 bind_builtin_constant ("argv", octave_argv, true, true); |
|
169 bind_builtin_constant ("__argv__", octave_argv, true, true); |
1355
|
170 } |
|
171 |
1792
|
172 static void |
|
173 initialize_pathsearch (void) |
|
174 { |
|
175 // This may seem odd, but doing it this way means that we don't have |
|
176 // to modify the kpathsea library... |
|
177 |
3523
|
178 std::string odb = octave_env::getenv ("OCTAVE_DB_PATH"); |
3141
|
179 |
|
180 // For backward compatibility. |
1792
|
181 |
2926
|
182 if (odb.empty ()) |
3141
|
183 odb = octave_env::getenv ("OCTAVE_DB_DIR"); |
1792
|
184 |
3141
|
185 if (odb.empty ()) |
3523
|
186 odb = Vdata_dir + std::string ("/octave:") + Vlibexec_dir + std::string ("/octave"); |
3141
|
187 |
|
188 octave_env::putenv ("TEXMFDBS", odb); |
1792
|
189 } |
|
190 |
581
|
191 // Initialize by reading startup files. |
|
192 |
1
|
193 static void |
|
194 execute_startup_files (void) |
|
195 { |
2985
|
196 unwind_protect::begin_frame ("execute_startup_files"); |
315
|
197 |
1651
|
198 // XXX FIXME XXX -- need to make it possible to set this in startup |
|
199 // files. |
1588
|
200 |
3019
|
201 unwind_protect_bool (input_from_startup_file); |
1651
|
202 |
3019
|
203 input_from_startup_file = true; |
315
|
204 |
793
|
205 int verbose = (verbose_flag && ! inhibit_startup_message); |
578
|
206 |
2239
|
207 if (read_site_files) |
1
|
208 { |
2239
|
209 // Execute commands from the site-wide configuration file. |
|
210 // First from the file $(prefix)/lib/octave/site/m/octaverc |
|
211 // (if it exists), then from the file |
3597
|
212 // $(prefix)/share/octave/$(version)/m/octaverc (if it exists). |
1755
|
213 |
2897
|
214 parse_and_execute (Vlocal_site_defaults_file, verbose); |
1755
|
215 |
2897
|
216 parse_and_execute (Vsite_defaults_file, verbose); |
1
|
217 } |
|
218 |
2239
|
219 if (read_init_files) |
|
220 { |
2512
|
221 // Try to execute commands from $HOME/$OCTAVE_INITFILE and |
|
222 // $OCTAVE_INITFILE. If $OCTAVE_INITFILE is not set, .octaverc |
|
223 // is assumed. |
2239
|
224 |
|
225 int home_rc_already_executed = 0; |
2512
|
226 |
3523
|
227 std::string initfile = octave_env::getenv ("OCTAVE_INITFILE"); |
2512
|
228 |
2926
|
229 if (initfile.empty ()) |
2512
|
230 initfile = ".octaverc"; |
|
231 |
3523
|
232 std::string home_dir = octave_env::get_home_directory (); |
2926
|
233 |
3523
|
234 std::string home_rc = home_dir + "/" + initfile; |
|
235 std::string local_rc = std::string ("./") + initfile; |
2239
|
236 |
2926
|
237 if (! home_dir.empty ()) |
2239
|
238 { |
2897
|
239 parse_and_execute (home_rc, verbose); |
2239
|
240 |
|
241 // Names alone are not enough. |
|
242 |
|
243 file_stat fs_home_rc (home_rc); |
|
244 |
|
245 if (fs_home_rc) |
|
246 { |
2512
|
247 file_stat fs_dot_rc (local_rc); |
2239
|
248 |
|
249 if (fs_dot_rc && fs_home_rc.ino () == fs_dot_rc.ino ()) |
|
250 home_rc_already_executed = 1; |
|
251 } |
|
252 } |
|
253 |
|
254 if (! home_rc_already_executed) |
2897
|
255 parse_and_execute (local_rc, verbose); |
2239
|
256 } |
315
|
257 |
2985
|
258 unwind_protect::run_frame ("execute_startup_files"); |
1
|
259 } |
|
260 |
581
|
261 // Usage message with extra help. |
|
262 |
1
|
263 static void |
|
264 verbose_usage (void) |
|
265 { |
3531
|
266 std::cout << OCTAVE_NAME_VERSION_AND_COPYRIGHT "\n\ |
1613
|
267 \n\ |
|
268 Usage: octave [options]\n\ |
|
269 \n\ |
|
270 Options:\n\ |
1119
|
271 \n\ |
3180
|
272 --debug, -d Enter parser debugging mode.\n\ |
|
273 --echo-commands, -x Echo commands as they are executed.\n\ |
1613
|
274 --exec-path PATH Set path for executing subprograms.\n\ |
3180
|
275 --help, -h, -? Print short help message and exit.\n\ |
1613
|
276 --info-file FILE Use top-level info file FILE.\n\ |
|
277 --info-program PROGRAM Use PROGRAM for reading info files.\n\ |
3180
|
278 --interactive, -i Force interactive behavior.\n\ |
|
279 --no-history, -H Don't save commands to the history list\n\ |
2470
|
280 --no-init-file Don't read the ~/.octaverc or .octaverc files.\n\ |
2212
|
281 --no-line-editing Don't use readline for command-line editing.\n\ |
2470
|
282 --no-site-file Don't read the site-wide octaverc file.\n\ |
3238
|
283 --norc, -f Don't read any initialization files.\n\ |
3180
|
284 --path PATH, -p PATH Set initial LOADPATH to PATH.\n\ |
|
285 --silent, -q Don't print message at startup.\n\ |
1613
|
286 --traditional Set compatibility variables.\n\ |
3180
|
287 --verbose, -V Enable verbose output in some cases.\n\ |
|
288 --version, -v Print version number and exit.\n\ |
1119
|
289 \n\ |
1613
|
290 FILE Execute commands from FILE.\n\ |
2375
|
291 \n\ |
|
292 Additional information about Octave is available via the WWW at\n\ |
3159
|
293 http://www.che.wisc.edu/octave/octave.html.\n\ |
2375
|
294 \n\ |
|
295 Please report bugs to the mailing list `bug-octave@bevo.che.wisc.edu'.\n"; |
285
|
296 |
613
|
297 exit (0); |
1
|
298 } |
|
299 |
581
|
300 // Terse usage messsage. |
|
301 |
1
|
302 static void |
|
303 usage (void) |
|
304 { |
3531
|
305 std::cerr << "usage: " << usage_string << "\n"; |
1
|
306 exit (1); |
|
307 } |
|
308 |
|
309 static void |
|
310 print_version_and_exit (void) |
|
311 { |
3531
|
312 std::cout << OCTAVE_NAME_AND_VERSION << "\n"; |
1
|
313 exit (0); |
|
314 } |
|
315 |
721
|
316 static void |
|
317 initialize_error_handlers () |
|
318 { |
|
319 set_liboctave_error_handler (error); |
3325
|
320 set_liboctave_warning_handler (warning); |
721
|
321 } |
|
322 |
1410
|
323 // What happens on --traditional. |
|
324 |
|
325 static void |
|
326 maximum_braindamage (void) |
|
327 { |
|
328 bind_builtin_variable ("PS1", ">> "); |
|
329 bind_builtin_variable ("PS2", ""); |
2402
|
330 bind_builtin_variable ("beep_on_error", 1.0); |
3189
|
331 bind_builtin_variable ("crash_dumps_octave_core", 0.0); |
2993
|
332 bind_builtin_variable ("default_eval_print_flag", 0.0); |
3156
|
333 bind_builtin_variable ("default_global_variable_value", Matrix ()); |
1410
|
334 bind_builtin_variable ("default_save_format", "mat-binary"); |
2402
|
335 bind_builtin_variable ("define_all_return_values", 1.0); |
|
336 bind_builtin_variable ("do_fortran_indexing", 1.0); |
|
337 bind_builtin_variable ("empty_list_elements_ok", 1.0); |
3105
|
338 bind_builtin_variable ("fixed_point_format", 1.0); |
3110
|
339 bind_builtin_variable ("implicit_num_to_str_ok", 1.0); |
2402
|
340 bind_builtin_variable ("implicit_str_to_num_ok", 1.0); |
3156
|
341 bind_builtin_variable ("initialize_global_variables", 1.0); |
2402
|
342 bind_builtin_variable ("ok_to_lose_imaginary_part", 1.0); |
|
343 bind_builtin_variable ("page_screen_output", 0.0); |
|
344 bind_builtin_variable ("prefer_column_vectors", 0.0); |
|
345 bind_builtin_variable ("print_empty_dimensions", 0.0); |
|
346 bind_builtin_variable ("treat_neg_dim_as_zero", 1.0); |
|
347 bind_builtin_variable ("warn_function_name_clash", 0.0); |
1410
|
348 bind_builtin_variable ("whitespace_in_literal_matrix", "traditional"); |
|
349 } |
|
350 |
581
|
351 // You guessed it. |
|
352 |
1
|
353 int |
|
354 main (int argc, char **argv) |
|
355 { |
3019
|
356 octave_env::set_program_name (argv[0]); |
|
357 |
3024
|
358 dir_path::set_program_name (argv[0]); |
|
359 |
2205
|
360 // The order of these calls is important. The call to |
2926
|
361 // install_defaults must come before install_builtins because |
3019
|
362 // default variable values must be available for the variables to be |
2205
|
363 // installed, and the call to install_builtins must come before the |
|
364 // options are processed because some command line options override |
|
365 // defaults by calling bind_builtin_variable. |
721
|
366 |
1
|
367 sysdep_init (); |
|
368 |
721
|
369 initialize_error_handlers (); |
223
|
370 |
2926
|
371 install_defaults (); |
1
|
372 |
1792
|
373 initialize_pathsearch (); |
1744
|
374 |
2205
|
375 install_signal_handlers (); |
|
376 |
|
377 initialize_file_io (); |
|
378 |
2375
|
379 initialize_symbol_tables (); |
|
380 |
|
381 install_types (); |
|
382 |
|
383 install_ops (); |
2205
|
384 |
|
385 install_builtins (); |
|
386 |
1817
|
387 prog_args args (argc, argv, short_opts, long_opts); |
|
388 |
139
|
389 int optc; |
1817
|
390 while ((optc = args.getopt ()) != EOF) |
1
|
391 { |
139
|
392 switch (optc) |
1
|
393 { |
3180
|
394 case 'H': |
|
395 bind_builtin_variable ("saving_history", 0.0); |
|
396 break; |
|
397 |
793
|
398 case 'V': |
2239
|
399 verbose_flag = true; |
793
|
400 break; |
|
401 |
1
|
402 case 'd': |
|
403 yydebug++; |
|
404 break; |
777
|
405 |
1
|
406 case 'f': |
2239
|
407 read_init_files = false; |
|
408 read_site_files = false; |
1
|
409 break; |
777
|
410 |
1
|
411 case 'h': |
|
412 case '?': |
|
413 verbose_usage (); |
|
414 break; |
777
|
415 |
1
|
416 case 'i': |
3019
|
417 forced_interactive = true; |
1
|
418 break; |
777
|
419 |
1
|
420 case 'p': |
1817
|
421 if (args.optarg ()) |
2205
|
422 bind_builtin_variable ("LOADPATH", args.optarg ()); |
1
|
423 break; |
777
|
424 |
1
|
425 case 'q': |
2239
|
426 inhibit_startup_message = true; |
1
|
427 break; |
777
|
428 |
1
|
429 case 'x': |
2205
|
430 { |
|
431 double tmp = (ECHO_SCRIPTS | ECHO_FUNCTIONS | ECHO_CMD_LINE); |
|
432 bind_builtin_variable ("echo_executing_commands", tmp); |
|
433 } |
1
|
434 break; |
777
|
435 |
1
|
436 case 'v': |
|
437 print_version_and_exit (); |
|
438 break; |
777
|
439 |
1613
|
440 case EXEC_PATH_OPTION: |
1817
|
441 if (args.optarg ()) |
2205
|
442 bind_builtin_variable ("EXEC_PATH", args.optarg ()); |
1613
|
443 break; |
|
444 |
186
|
445 case INFO_FILE_OPTION: |
1817
|
446 if (args.optarg ()) |
2205
|
447 bind_builtin_variable ("INFO_FILE", args.optarg ()); |
186
|
448 break; |
777
|
449 |
1613
|
450 case INFO_PROG_OPTION: |
1817
|
451 if (args.optarg ()) |
2205
|
452 bind_builtin_variable ("INFO_PROGRAM", args.optarg ()); |
1613
|
453 break; |
|
454 |
2239
|
455 case NO_INIT_FILE_OPTION: |
|
456 read_init_files = false; |
|
457 break; |
|
458 |
1821
|
459 case NO_LINE_EDITING_OPTION: |
3019
|
460 line_editing = false; |
2239
|
461 break; |
|
462 |
|
463 case NO_SITE_FILE_OPTION: |
|
464 read_site_files = 0; |
1821
|
465 break; |
|
466 |
1410
|
467 case TRADITIONAL_OPTION: |
2239
|
468 traditional = true; |
1410
|
469 break; |
|
470 |
1
|
471 default: |
|
472 usage (); |
|
473 break; |
|
474 } |
|
475 } |
|
476 |
1651
|
477 #if defined (HAVE_ATEXIT) || defined (HAVE_ON_EXIT) |
2077
|
478 // Make sure we clean up when we exit. Also allow users to register |
|
479 // functions. If we don't have atexit or on_exit, we're going to |
|
480 // leave some junk files around if we exit abnormally. |
|
481 |
|
482 atexit (do_octave_atexit); |
318
|
483 #endif |
1
|
484 |
1358
|
485 // These can come after command line args since none of them set any |
|
486 // defaults that might be changed by command line options. |
581
|
487 |
2926
|
488 initialize_command_input (); |
315
|
489 |
578
|
490 if (! inhibit_startup_message) |
3538
|
491 std::cout << OCTAVE_STARTUP_MESSAGE "\n" << std::endl; |
578
|
492 |
1410
|
493 if (traditional) |
|
494 maximum_braindamage (); |
|
495 |
2239
|
496 execute_startup_files (); |
1651
|
497 |
2926
|
498 command_history::read (false); |
1
|
499 |
578
|
500 if (! inhibit_startup_message && reading_startup_message_printed) |
3538
|
501 std::cout << std::endl; |
578
|
502 |
1358
|
503 // Avoid counting commands executed from startup files. |
|
504 |
2926
|
505 command_editor::reset_current_command_number (1); |
1
|
506 |
1358
|
507 // If there is an extra argument, see if it names a file to read. |
|
508 // Additional arguments are taken as command line options for the |
|
509 // script. |
1
|
510 |
1817
|
511 int last_arg_idx = args.optind (); |
3019
|
512 |
1817
|
513 int remaining_args = argc - last_arg_idx; |
3019
|
514 |
1355
|
515 if (remaining_args > 0) |
149
|
516 { |
3019
|
517 reading_script_file = true; |
|
518 |
1817
|
519 curr_fcn_file_name = argv[last_arg_idx]; |
1608
|
520 curr_fcn_file_full_name = curr_fcn_file_name; |
1411
|
521 |
984
|
522 FILE *infile = get_input_from_file (curr_fcn_file_name); |
1411
|
523 |
529
|
524 if (infile) |
287
|
525 { |
3019
|
526 input_from_command_line_file = true; |
1516
|
527 |
1411
|
528 bind_builtin_variable ("program_invocation_name", |
|
529 curr_fcn_file_name); |
|
530 |
1755
|
531 size_t pos = curr_fcn_file_name.rfind ('/'); |
|
532 |
3523
|
533 std::string tmp = (pos != NPOS) |
1755
|
534 ? curr_fcn_file_name.substr (pos+1) : curr_fcn_file_name; |
1411
|
535 |
|
536 bind_builtin_variable ("program_name", tmp); |
|
537 |
1817
|
538 intern_argv (remaining_args, argv+last_arg_idx); |
1411
|
539 |
2926
|
540 command_editor::blink_matching_paren (false); |
|
541 |
287
|
542 switch_to_buffer (create_buffer (infile)); |
|
543 } |
529
|
544 else |
|
545 clean_up_and_exit (1); |
1
|
546 } |
|
547 else |
|
548 { |
1355
|
549 // Is input coming from a terminal? If so, we are probably |
|
550 // interactive. |
1
|
551 |
|
552 interactive = (isatty (fileno (stdin)) && isatty (fileno (stdout))); |
1355
|
553 |
|
554 intern_argv (argc, argv); |
|
555 |
|
556 switch_to_buffer (create_buffer (get_input_from_stdin ())); |
1
|
557 } |
|
558 |
1358
|
559 // Force input to be echoed if not really interactive, but the user |
|
560 // has forced interactive behavior. |
1
|
561 |
1907
|
562 if (! interactive && forced_interactive) |
287
|
563 { |
2926
|
564 command_editor::blink_matching_paren (false); |
1588
|
565 |
|
566 // XXX FIXME XXX -- is this the right thing to do? |
|
567 |
|
568 bind_builtin_variable ("echo_executing_commands", |
2800
|
569 static_cast<double> (ECHO_CMD_LINE)); |
287
|
570 } |
1
|
571 |
1410
|
572 if (! interactive) |
3019
|
573 line_editing = false; |
1
|
574 |
1907
|
575 int retval = main_loop (); |
1
|
576 |
1005
|
577 if (retval == 1 && ! error_state) |
|
578 retval = 0; |
|
579 |
1
|
580 clean_up_and_exit (retval); |
|
581 } |
|
582 |
560
|
583 /* |
1
|
584 ;;; Local Variables: *** |
|
585 ;;; mode: C++ *** |
|
586 ;;; End: *** |
|
587 */ |