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