1
|
1 // octave.cc -*- C++ -*- |
|
2 /* |
|
3 |
1009
|
4 Copyright (C) 1992, 1993, 1994, 1995 John W. Eaton |
1
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1
|
21 |
|
22 */ |
|
23 |
|
24 // Born February 20, 1992. |
|
25 |
240
|
26 #ifdef HAVE_CONFIG_H |
1192
|
27 #include <config.h> |
1
|
28 #endif |
|
29 |
1355
|
30 #include <cassert> |
|
31 #include <csetjmp> |
|
32 #include <csignal> |
|
33 #include <cstdlib> |
|
34 #include <cstring> |
|
35 #include <ctime> |
|
36 |
|
37 #include <fstream.h> |
|
38 #include <iostream.h> |
|
39 #include <strstream.h> |
|
40 |
|
41 #ifdef HAVE_UNISTD_H |
1
|
42 #include <sys/types.h> |
139
|
43 #include <unistd.h> |
|
44 #endif |
1355
|
45 |
1
|
46 #include <pwd.h> |
636
|
47 |
240
|
48 #include "lo-error.h" |
223
|
49 |
1355
|
50 #include "builtins.h" |
|
51 #include "defaults.h" |
|
52 #include "defun.h" |
703
|
53 #include "dynamic-ld.h" |
1355
|
54 #include "error.h" |
|
55 #include "file-io.h" |
1766
|
56 #include "file-ops.h" |
1355
|
57 #include "help.h" |
1
|
58 #include "input.h" |
|
59 #include "lex.h" |
1742
|
60 #include "oct-hist.h" |
1670
|
61 #include "toplev.h" |
1355
|
62 #include "pager.h" |
1
|
63 #include "parse.h" |
1355
|
64 #include "pathsearch.h" |
562
|
65 #include "procstream.h" |
1817
|
66 #include "prog-args.h" |
1355
|
67 #include "sighandlers.h" |
|
68 #include "sysdep.h" |
1742
|
69 #include "pt-const.h" |
|
70 #include "pt-misc.h" |
|
71 #include "pt-plot.h" |
1
|
72 #include "unwind-prot.h" |
1355
|
73 #include "user-prefs.h" |
|
74 #include "utils.h" |
|
75 #include "variables.h" |
1
|
76 #include "version.h" |
|
77 |
1704
|
78 #if !defined (HAVE_ATEXIT) && defined (HAVE_ON_EXIT) |
|
79 extern "C" int on_exit (); |
|
80 #define atexit on_exit |
|
81 #endif |
|
82 |
1792
|
83 // Don't redefine the variables if glibc already has. |
|
84 #ifndef HAVE_PROGRAM_INVOCATION_NAME |
|
85 char *program_invocation_name; |
|
86 char *program_invocation_short_name; |
|
87 #else |
|
88 extern char *program_invocation_name; |
|
89 extern char *program_invocation_short_name; |
|
90 #endif |
|
91 |
1684
|
92 // This is from readline's paren.c: |
|
93 extern int rl_blink_matching_paren; |
1516
|
94 |
1
|
95 // Top level context (?) |
|
96 jmp_buf toplevel; |
|
97 |
|
98 // Nonzero means we read ~/.octaverc and ./.octaverc. |
616
|
99 // (--norc; --ignore-init-file; -f) |
1
|
100 static int read_init_files = 1; |
|
101 |
1358
|
102 // Nonzero means we don't print the usual startup message. |
616
|
103 // (--quiet; --silent; -q) |
1
|
104 static int inhibit_startup_message = 0; |
|
105 |
1410
|
106 // Nonzero means we turn on compatibility options. |
|
107 // (--traditional) |
|
108 static int traditional = 0; |
|
109 |
1
|
110 // Usage message |
139
|
111 static const char *usage_string = |
1613
|
112 "octave [-?Vdfhiqvx] [--debug] [--echo-commands] [--exec-path path]\n\ |
|
113 [--help] [--ignore-init-file] [--info-file file] [--info-program prog]\n\ |
1821
|
114 [--interactive] [--no-line-editing] [-p path] [--path path] [--silent]\n\ |
|
115 [--traditional] [--verbose] [--version] [file]"; |
1
|
116 |
1358
|
117 // This is here so that it's more likely that the usage message and |
1410
|
118 // the real set of options will agree. Note: the `+' must come first |
|
119 // to prevent getopt from permuting arguments! |
|
120 static const char *short_opts = "+?Vdfhip:qvx"; |
139
|
121 |
1103
|
122 // Long options. See the comments in getopt.h for the meanings of the |
|
123 // fields in this structure. |
1613
|
124 #define EXEC_PATH_OPTION 1 |
|
125 #define INFO_FILE_OPTION 2 |
|
126 #define INFO_PROG_OPTION 3 |
1821
|
127 #define NO_LINE_EDITING_OPTION 4 |
|
128 #define TRADITIONAL_OPTION 5 |
1817
|
129 long_options long_opts[] = |
139
|
130 { |
1103
|
131 { "debug", no_argument, 0, 'd' }, |
1613
|
132 { "echo-commands", no_argument, 0, 'x' }, |
|
133 { "exec-path", required_argument, 0, EXEC_PATH_OPTION }, |
1103
|
134 { "help", no_argument, 0, 'h' }, |
1821
|
135 { "ignore-init-file", no_argument, 0, 'f' }, |
1103
|
136 { "info-file", required_argument, 0, INFO_FILE_OPTION }, |
1613
|
137 { "info-program", required_argument, 0, INFO_PROG_OPTION }, |
1821
|
138 { "interactive", no_argument, 0, 'i' }, |
|
139 { "no-line-editing", no_argument, 0, NO_LINE_EDITING_OPTION }, |
1103
|
140 { "norc", no_argument, 0, 'f' }, |
|
141 { "path", required_argument, 0, 'p' }, |
|
142 { "quiet", no_argument, 0, 'q' }, |
|
143 { "silent", no_argument, 0, 'q' }, |
1410
|
144 { "traditional", no_argument, 0, TRADITIONAL_OPTION }, |
1103
|
145 { "verbose", no_argument, 0, 'V' }, |
|
146 { "version", no_argument, 0, 'v' }, |
|
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 { |
|
155 if (argc > 1) |
|
156 { |
1572
|
157 int max_len = 0; |
1355
|
158 for (int i = 1; i < argc; i++) |
1572
|
159 { |
|
160 int tmp_len = strlen (argv[i]); |
|
161 if (tmp_len > max_len) |
|
162 max_len = tmp_len; |
|
163 } |
|
164 |
|
165 octave_argv.resize (argc-1, max_len, 0); |
|
166 |
|
167 for (int i = 1; i < argc; i++) |
|
168 octave_argv.insert (argv[i], i-1, 0); |
1411
|
169 |
|
170 bind_builtin_variable ("argv", octave_argv, 1, 1, 0); |
1355
|
171 } |
|
172 } |
|
173 |
581
|
174 // Initialize some global variables for later use. |
|
175 |
1
|
176 static void |
1755
|
177 initialize_globals (const string& name) |
1
|
178 { |
1792
|
179 // Kpathsea needs this. |
|
180 |
|
181 #ifndef HAVE_PROGRAM_INVOCATION_NAME |
|
182 program_invocation_name = strsave (name.c_str ()); |
|
183 program_invocation_short_name = strrchr (program_invocation_name, '/'); |
|
184 if (! program_invocation_short_name) |
|
185 program_invocation_short_name = program_invocation_name; |
|
186 #endif |
|
187 |
1755
|
188 raw_prog_name = name; |
|
189 size_t pos = raw_prog_name.rfind ('/'); |
|
190 if (pos == NPOS) |
|
191 prog_name = raw_prog_name; |
|
192 else |
|
193 prog_name = raw_prog_name.substr (pos+1); |
1355
|
194 |
1
|
195 struct passwd *entry = getpwuid (getuid ()); |
|
196 if (entry) |
1755
|
197 user_name = entry->pw_name; |
1
|
198 else |
1755
|
199 user_name = "I have no name!"; |
1
|
200 endpwent (); |
|
201 |
|
202 char hostname[256]; |
|
203 if (gethostname (hostname, 255) < 0) |
1755
|
204 host_name = "I have no host!"; |
1
|
205 else |
1755
|
206 host_name = hostname; |
1
|
207 |
|
208 char *hd = getenv ("HOME"); |
1755
|
209 home_directory = hd ? hd : "I have no home!"; |
1
|
210 |
1613
|
211 exec_path = default_exec_path (); |
|
212 |
1
|
213 load_path = default_path (); |
186
|
214 |
|
215 info_file = default_info_file (); |
195
|
216 |
1613
|
217 info_prog = default_info_prog (); |
|
218 |
195
|
219 editor = default_editor (); |
1
|
220 } |
|
221 |
1792
|
222 static void |
|
223 initialize_pathsearch (void) |
|
224 { |
|
225 // This may seem odd, but doing it this way means that we don't have |
|
226 // to modify the kpathsea library... |
|
227 |
|
228 char *odb = getenv ("OCTAVE_DB_DIR"); |
|
229 |
|
230 if (odb) |
|
231 oct_putenv ("TEXMF", odb); |
|
232 else |
|
233 { |
|
234 char *oh = getenv ("OCTAVE_HOME"); |
|
235 |
|
236 if (oh) |
|
237 { |
|
238 int len = strlen (oh) + 12; |
|
239 char *putenv_val = new char [len]; |
|
240 sprintf (putenv_val, "%s/lib/octave", oh); |
|
241 oct_putenv ("TEXMF", putenv_val); |
|
242 } |
|
243 else |
|
244 oct_putenv ("TEXMF", OCTAVE_DATADIR "/octave"); |
|
245 } |
|
246 } |
|
247 |
581
|
248 // Initialize by reading startup files. |
|
249 |
1
|
250 static void |
|
251 execute_startup_files (void) |
|
252 { |
315
|
253 begin_unwind_frame ("execute_startup_files"); |
|
254 |
1651
|
255 // XXX FIXME XXX -- need to make it possible to set this in startup |
|
256 // files. |
1588
|
257 |
1651
|
258 unwind_protect_int (input_from_startup_file); |
|
259 unwind_protect_int (user_pref.echo_executing_commands); |
|
260 |
|
261 input_from_startup_file = 1; |
1588
|
262 user_pref.echo_executing_commands = ECHO_OFF; |
315
|
263 |
793
|
264 int verbose = (verbose_flag && ! inhibit_startup_message); |
578
|
265 |
1477
|
266 // Execute commands from the site-wide configuration file. First |
|
267 // from the file $(prefix)/lib/octave/site/m/octaverc (if it exists), |
|
268 // then from the file $(prefix)/lib/octave/$(version)/m/octaverc (if |
|
269 // it exists). |
|
270 |
1755
|
271 string lsd = get_local_site_defaults (); |
1477
|
272 parse_and_execute (lsd, 0, verbose); |
1
|
273 |
1755
|
274 string sd = get_site_defaults (); |
578
|
275 parse_and_execute (sd, 0, verbose); |
1
|
276 |
1358
|
277 // Try to execute commands from $HOME/.octaverc and ./.octaverc. |
1
|
278 |
1755
|
279 int home_rc_already_executed = 0; |
|
280 string home_rc; |
|
281 if (! home_directory.empty ()) |
1
|
282 { |
1755
|
283 home_rc = home_directory; |
|
284 home_rc.append ("/.octaverc"); |
578
|
285 parse_and_execute (home_rc, 0, verbose); |
1755
|
286 |
|
287 // Names alone are not enough. |
|
288 |
1766
|
289 file_stat fs_home_rc (home_rc); |
1755
|
290 |
1766
|
291 if (fs_home_rc) |
|
292 { |
|
293 file_stat fs_dot_rc ("./.octaverc"); |
1755
|
294 |
1766
|
295 if (fs_dot_rc && fs_home_rc.ino () == fs_dot_rc.ino ()) |
|
296 home_rc_already_executed = 1; |
|
297 } |
1
|
298 } |
|
299 |
1755
|
300 if (! home_rc_already_executed) |
578
|
301 parse_and_execute ("./.octaverc", 0, verbose); |
315
|
302 |
|
303 run_unwind_frame ("execute_startup_files"); |
1
|
304 } |
|
305 |
581
|
306 // Usage message with extra help. |
|
307 |
1
|
308 static void |
|
309 verbose_usage (void) |
|
310 { |
1613
|
311 cout << "\n" OCTAVE_NAME_VERSION_AND_COPYRIGHT "\n\ |
|
312 \n\ |
|
313 Usage: octave [options]\n\ |
|
314 \n\ |
|
315 Options:\n\ |
1119
|
316 \n\ |
1613
|
317 -d, --debug Enter parser debugging mode.\n\ |
|
318 -x, --echo-commands Echo commands as they are executed.\n\ |
|
319 --exec-path PATH Set path for executing subprograms.\n\ |
|
320 -h, -?, --help Print short help message and exit.\n\ |
|
321 -f, --ignore-init-file Don't read any initialization files.\n\ |
|
322 --info-file FILE Use top-level info file FILE.\n\ |
|
323 --info-program PROGRAM Use PROGRAM for reading info files.\n\ |
|
324 -i, --interactive Force interactive behavior.\n\ |
1821
|
325 --no-line-editing Don't use readline for command-line editing\n\ |
1613
|
326 -p PATH, --path PATH Set initial LOADPATH to PATH.\n\ |
|
327 -q, --silent Don't print message at startup.\n\ |
|
328 --traditional Set compatibility variables.\n\ |
|
329 -V, --verbose Enable verbose output in some cases.\n\ |
|
330 -v, --version Print version number and exit.\n\ |
1119
|
331 \n\ |
1613
|
332 FILE Execute commands from FILE.\n\ |
1119
|
333 \n"; |
285
|
334 |
613
|
335 exit (0); |
1
|
336 } |
|
337 |
581
|
338 // Terse usage messsage. |
|
339 |
1
|
340 static void |
|
341 usage (void) |
|
342 { |
613
|
343 cerr << "usage: " << usage_string << "\n"; |
1
|
344 exit (1); |
|
345 } |
|
346 |
|
347 static void |
|
348 print_version_and_exit (void) |
|
349 { |
1107
|
350 cout << OCTAVE_NAME_AND_VERSION << "\n"; |
1
|
351 exit (0); |
|
352 } |
|
353 |
721
|
354 static void |
|
355 initialize_error_handlers () |
|
356 { |
|
357 set_liboctave_error_handler (error); |
|
358 } |
|
359 |
1410
|
360 // What happens on --traditional. |
|
361 |
|
362 static void |
|
363 maximum_braindamage (void) |
|
364 { |
|
365 bind_builtin_variable ("PS1", ">> "); |
|
366 bind_builtin_variable ("PS2", ""); |
1423
|
367 bind_builtin_variable ("beep_on_error", "true"); |
1410
|
368 bind_builtin_variable ("default_save_format", "mat-binary"); |
|
369 bind_builtin_variable ("define_all_return_values", "true"); |
|
370 bind_builtin_variable ("do_fortran_indexing", "true"); |
|
371 bind_builtin_variable ("empty_list_elements_ok", "true"); |
|
372 bind_builtin_variable ("implicit_str_to_num_ok", "true"); |
|
373 bind_builtin_variable ("ok_to_lose_imaginary_part", "true"); |
|
374 bind_builtin_variable ("page_screen_output", "false"); |
|
375 bind_builtin_variable ("prefer_column_vectors", "false"); |
|
376 bind_builtin_variable ("prefer_zero_one_indexing", "true"); |
|
377 bind_builtin_variable ("print_empty_dimensions", "false"); |
|
378 bind_builtin_variable ("treat_neg_dim_as_zero", "true"); |
|
379 bind_builtin_variable ("warn_function_name_clash", "false"); |
|
380 bind_builtin_variable ("whitespace_in_literal_matrix", "traditional"); |
|
381 } |
|
382 |
581
|
383 // You guessed it. |
|
384 |
1
|
385 int |
|
386 main (int argc, char **argv) |
|
387 { |
1588
|
388 int echo_commands = ECHO_OFF; |
|
389 |
1358
|
390 // The order of these calls is important, and initialize_globals |
|
391 // must come before the options are processed because some command |
|
392 // line options override defaults. |
721
|
393 |
|
394 init_user_prefs (); |
|
395 |
|
396 initialize_pager (); |
|
397 |
1
|
398 sysdep_init (); |
|
399 |
721
|
400 initialize_error_handlers (); |
223
|
401 |
1
|
402 initialize_globals (argv[0]); |
|
403 |
1792
|
404 initialize_pathsearch (); |
1744
|
405 |
1817
|
406 prog_args args (argc, argv, short_opts, long_opts); |
|
407 |
139
|
408 int optc; |
1817
|
409 while ((optc = args.getopt ()) != EOF) |
1
|
410 { |
139
|
411 switch (optc) |
1
|
412 { |
793
|
413 case 'V': |
|
414 verbose_flag++; |
|
415 break; |
|
416 |
1
|
417 case 'd': |
|
418 yydebug++; |
|
419 break; |
777
|
420 |
1
|
421 case 'f': |
|
422 read_init_files = 0; |
|
423 break; |
777
|
424 |
1
|
425 case 'h': |
|
426 case '?': |
|
427 verbose_usage (); |
|
428 break; |
777
|
429 |
1
|
430 case 'i': |
|
431 forced_interactive = 1; |
|
432 break; |
777
|
433 |
1
|
434 case 'p': |
1817
|
435 if (args.optarg ()) |
|
436 load_path = string (args.optarg ()); |
1
|
437 break; |
777
|
438 |
1
|
439 case 'q': |
|
440 inhibit_startup_message = 1; |
|
441 break; |
777
|
442 |
1
|
443 case 'x': |
1588
|
444 echo_commands = (ECHO_SCRIPTS | ECHO_FUNCTIONS | ECHO_CMD_LINE); |
1
|
445 break; |
777
|
446 |
1
|
447 case 'v': |
|
448 print_version_and_exit (); |
|
449 break; |
777
|
450 |
1613
|
451 case EXEC_PATH_OPTION: |
1817
|
452 if (args.optarg ()) |
|
453 exec_path = string (args.optarg ()); |
1613
|
454 break; |
|
455 |
186
|
456 case INFO_FILE_OPTION: |
1817
|
457 if (args.optarg ()) |
|
458 info_file = string (args.optarg ()); |
186
|
459 break; |
777
|
460 |
1613
|
461 case INFO_PROG_OPTION: |
1817
|
462 if (args.optarg ()) |
|
463 info_prog = string (args.optarg ()); |
1613
|
464 break; |
|
465 |
1821
|
466 case NO_LINE_EDITING_OPTION: |
|
467 using_readline = 0; |
|
468 break; |
|
469 |
1410
|
470 case TRADITIONAL_OPTION: |
|
471 traditional = 1; |
|
472 break; |
|
473 |
1
|
474 default: |
|
475 usage (); |
|
476 break; |
|
477 } |
|
478 } |
|
479 |
1651
|
480 #if defined (HAVE_ATEXIT) || defined (HAVE_ON_EXIT) |
1358
|
481 // Make sure we clean up when we exit. If we don't have atexit or |
|
482 // on_exit, we're going to leave some junk files around if we exit |
|
483 // abnormally. |
1
|
484 atexit (cleanup_tmp_files); |
318
|
485 #endif |
1
|
486 |
1358
|
487 // These can come after command line args since none of them set any |
|
488 // defaults that might be changed by command line options. |
581
|
489 |
636
|
490 install_signal_handlers (); |
|
491 |
1
|
492 initialize_file_io (); |
|
493 |
581
|
494 initialize_symbol_tables (); |
1
|
495 |
|
496 install_builtins (); |
|
497 |
315
|
498 initialize_readline (); |
|
499 |
721
|
500 init_dynamic_linker (); |
|
501 |
578
|
502 if (! inhibit_startup_message) |
1106
|
503 cout << OCTAVE_STARTUP_MESSAGE "\n" << endl; |
578
|
504 |
1410
|
505 if (traditional) |
|
506 maximum_braindamage (); |
|
507 |
1588
|
508 bind_builtin_variable ("echo_executing_commands", |
|
509 (double) echo_commands); |
|
510 |
1
|
511 if (read_init_files) |
1651
|
512 execute_startup_files (); |
|
513 |
1799
|
514 octave_command_history.read (); |
1
|
515 |
578
|
516 if (! inhibit_startup_message && reading_startup_message_printed) |
|
517 cout << endl; |
|
518 |
1358
|
519 // Avoid counting commands executed from startup files. |
|
520 |
1
|
521 current_command_number = 1; |
|
522 |
1358
|
523 // If there is an extra argument, see if it names a file to read. |
|
524 // Additional arguments are taken as command line options for the |
|
525 // script. |
1
|
526 |
1817
|
527 int last_arg_idx = args.optind (); |
|
528 int remaining_args = argc - last_arg_idx; |
1355
|
529 if (remaining_args > 0) |
149
|
530 { |
984
|
531 reading_script_file = 1; |
1817
|
532 curr_fcn_file_name = argv[last_arg_idx]; |
1608
|
533 curr_fcn_file_full_name = curr_fcn_file_name; |
1411
|
534 |
984
|
535 FILE *infile = get_input_from_file (curr_fcn_file_name); |
1411
|
536 |
529
|
537 if (infile) |
287
|
538 { |
1516
|
539 input_from_command_line_file = 1; |
|
540 |
1411
|
541 bind_builtin_variable ("program_invocation_name", |
|
542 curr_fcn_file_name); |
|
543 |
1755
|
544 size_t pos = curr_fcn_file_name.rfind ('/'); |
|
545 |
|
546 string tmp = (pos != NPOS) |
|
547 ? curr_fcn_file_name.substr (pos+1) : curr_fcn_file_name; |
1411
|
548 |
|
549 bind_builtin_variable ("program_name", tmp); |
|
550 |
1817
|
551 intern_argv (remaining_args, argv+last_arg_idx); |
1411
|
552 |
287
|
553 rl_blink_matching_paren = 0; |
|
554 switch_to_buffer (create_buffer (infile)); |
|
555 } |
529
|
556 else |
|
557 clean_up_and_exit (1); |
1
|
558 } |
|
559 else |
|
560 { |
1355
|
561 // Is input coming from a terminal? If so, we are probably |
|
562 // interactive. |
1
|
563 |
|
564 interactive = (isatty (fileno (stdin)) && isatty (fileno (stdout))); |
1355
|
565 |
|
566 intern_argv (argc, argv); |
|
567 |
|
568 switch_to_buffer (create_buffer (get_input_from_stdin ())); |
1
|
569 } |
|
570 |
1358
|
571 // Force input to be echoed if not really interactive, but the user |
|
572 // has forced interactive behavior. |
1
|
573 |
|
574 if (!interactive && forced_interactive) |
287
|
575 { |
|
576 rl_blink_matching_paren = 0; |
1588
|
577 |
|
578 // XXX FIXME XXX -- is this the right thing to do? |
|
579 |
|
580 bind_builtin_variable ("echo_executing_commands", |
|
581 (double) ECHO_CMD_LINE); |
287
|
582 } |
1
|
583 |
1410
|
584 if (! interactive) |
1
|
585 using_readline = 0; |
|
586 |
1358
|
587 // Allow the user to interrupt us without exiting. |
1
|
588 |
|
589 if (setjmp (toplevel) != 0) |
|
590 { |
|
591 raw_mode (0); |
176
|
592 |
1
|
593 cout << "\n"; |
|
594 } |
|
595 |
|
596 can_interrupt = 1; |
|
597 |
1651
|
598 catch_interrupts (); |
1
|
599 |
1358
|
600 // The big loop. |
1
|
601 |
|
602 int retval; |
|
603 do |
|
604 { |
287
|
605 curr_sym_tab = top_level_sym_tab; |
|
606 |
1
|
607 reset_parser (); |
287
|
608 |
1
|
609 retval = yyparse (); |
287
|
610 |
529
|
611 if (retval == 0 && global_command) |
1
|
612 { |
|
613 global_command->eval (1); |
|
614 delete global_command; |
|
615 current_command_number++; |
|
616 } |
|
617 } |
|
618 while (retval == 0); |
|
619 |
1005
|
620 if (retval == 1 && ! error_state) |
|
621 retval = 0; |
|
622 |
1
|
623 clean_up_and_exit (retval); |
|
624 } |
|
625 |
560
|
626 /* |
1
|
627 ;;; Local Variables: *** |
|
628 ;;; mode: C++ *** |
|
629 ;;; page-delimiter: "^/\\*" *** |
|
630 ;;; End: *** |
|
631 */ |