# HG changeset patch # User jwe # Date 819443201 0 # Node ID e846e361a26571b94e250eb63ee3eefaf4f40ee8 # Parent 23aa282707e8eca5069604447aa4b329dc5e2215 [project @ 1995-12-20 06:59:12 by jwe] diff -r 23aa282707e8 -r e846e361a265 src/arith-ops.cc --- a/src/arith-ops.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/arith-ops.cc Wed Dec 20 07:06:41 1995 +0000 @@ -28,7 +28,7 @@ #include #include -#include +#include "oct-cmplx.h" #include "arith-ops.h" #include "error.h" diff -r 23aa282707e8 -r e846e361a265 src/arith-ops.h --- a/src/arith-ops.h Wed Dec 20 06:55:46 1995 +0000 +++ b/src/arith-ops.h Wed Dec 20 07:06:41 1995 +0000 @@ -24,9 +24,10 @@ #if !defined (octave_arith_ops_h) #define octave_arith_ops_h 1 +#include "oct-cmplx.h" + #include "tree-expr.h" -class Complex; class Matrix; class ComplexMatrix; class tree_constant; diff -r 23aa282707e8 -r e846e361a265 src/mappers.cc --- a/src/mappers.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/mappers.cc Wed Dec 20 07:06:41 1995 +0000 @@ -28,7 +28,7 @@ #include #include -#include +#include "oct-cmplx.h" #include "defun.h" #include "error.h" diff -r 23aa282707e8 -r e846e361a265 src/mappers.h --- a/src/mappers.h Wed Dec 20 06:55:46 1995 +0000 +++ b/src/mappers.h Wed Dec 20 07:06:41 1995 +0000 @@ -24,7 +24,7 @@ #if !defined (octave_mappers_h) #define octave_mappers_h 1 -class Complex; +#include "oct-cmplx.h" typedef double (*d_d_Mapper)(double); typedef double (*d_c_Mapper)(const Complex&); diff -r 23aa282707e8 -r e846e361a265 src/octave.cc --- a/src/octave.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/octave.cc Wed Dec 20 07:06:41 1995 +0000 @@ -152,20 +152,9 @@ // Top level context (?) jmp_buf toplevel; -// This is not really the right place to do this... -typedef void (*one_arg_error_handler_t) (const char*); -extern one_arg_error_handler_t set_Complex_error_handler - (one_arg_error_handler_t f); - // This is from readline's paren.c: extern int rl_blink_matching_paren; -static void -octave_Complex_error_handler (const char* msg) -{ - warning (msg); -} - // Nonzero means we read ~/.octaverc and ./.octaverc. // (--norc; --ignore-init-file; -f) static int read_init_files = 1; @@ -320,11 +309,9 @@ switch_to_buffer (new_buf); unwind_protect_int (using_readline); - unwind_protect_int (saving_history); unwind_protect_int (input_from_command_line_file); using_readline = 0; - saving_history = 0; input_from_command_line_file = 0; unwind_protect_ptr (curr_sym_tab); @@ -429,11 +416,14 @@ { begin_unwind_frame ("execute_startup_files"); - unwind_protect_int (user_pref.echo_executing_commands); - unwind_protect_int (input_from_startup_file); + // XXX FIXME XXX -- need to make it possible to set this in startup + // files. + unwind_protect_int (input_from_startup_file); + unwind_protect_int (user_pref.echo_executing_commands); + + input_from_startup_file = 1; user_pref.echo_executing_commands = ECHO_OFF; - input_from_startup_file = 1; int verbose = (verbose_flag && ! inhibit_startup_message); @@ -553,8 +543,6 @@ static void initialize_error_handlers () { - set_Complex_error_handler (octave_Complex_error_handler); - set_liboctave_error_handler (error); } @@ -670,7 +658,7 @@ } } -#if defined (HAVE_ATEXIT) || (HAVE_ON_EXIT) +#if defined (HAVE_ATEXIT) || defined (HAVE_ON_EXIT) // Make sure we clean up when we exit. If we don't have atexit or // on_exit, we're going to leave some junk files around if we exit // abnormally. @@ -682,8 +670,6 @@ install_signal_handlers (); - initialize_history (); - initialize_file_io (); initialize_symbol_tables (); @@ -704,11 +690,9 @@ (double) echo_commands); if (read_init_files) - { - saving_history = 0; - execute_startup_files (); - saving_history = 1; - } + execute_startup_files (); + + initialize_history (); if (! inhibit_startup_message && reading_startup_message_printed) cout << endl; @@ -792,7 +776,7 @@ can_interrupt = 1; - octave_set_signal_handler (SIGINT, saved_sigint_handler); + catch_interrupts (); // The big loop. diff -r 23aa282707e8 -r e846e361a265 src/pr-output.cc --- a/src/pr-output.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/pr-output.cc Wed Dec 20 07:06:41 1995 +0000 @@ -32,11 +32,10 @@ #include #include -#include - #include "CMatrix.h" #include "Range.h" #include "dMatrix.h" +#include "oct-cmplx.h" #include "defun.h" #include "error.h" diff -r 23aa282707e8 -r e846e361a265 src/pr-output.h --- a/src/pr-output.h Wed Dec 20 06:55:46 1995 +0000 +++ b/src/pr-output.h Wed Dec 20 07:06:41 1995 +0000 @@ -26,8 +26,9 @@ class ostream; +#include "oct-cmplx.h" + class Matrix; -class Complex; class ComplexMatrix; class charMatrix; class Range; diff -r 23aa282707e8 -r e846e361a265 src/sighandlers.cc --- a/src/sighandlers.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/sighandlers.cc Wed Dec 20 07:06:41 1995 +0000 @@ -215,6 +215,12 @@ #endif } +void +catch_interrupts (void) +{ + octave_set_signal_handler (SIGINT, sigint_handler); +} + // Install all the handlers for the signals we might care about. void diff -r 23aa282707e8 -r e846e361a265 src/sighandlers.h --- a/src/sighandlers.h Wed Dec 20 06:55:46 1995 +0000 +++ b/src/sighandlers.h Wed Dec 20 07:06:41 1995 +0000 @@ -47,6 +47,8 @@ extern void install_signal_handlers (void); +extern void catch_interrupts (void); + // This is taken directly from Emacs 19: #ifndef SYS_SIGLIST_DECLARED diff -r 23aa282707e8 -r e846e361a265 src/utils.cc --- a/src/utils.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/utils.cc Wed Dec 20 07:06:41 1995 +0000 @@ -38,8 +38,6 @@ #include #endif -#include - #if defined (HAVE_TERMIOS_H) #include #elif defined (HAVE_TERMIO_H) @@ -58,6 +56,8 @@ #include "SLStack.h" +#include "oct-cmplx.h" + #include "defun.h" #include "dirfns.h" #include "error.h" diff -r 23aa282707e8 -r e846e361a265 src/xdiv.cc --- a/src/xdiv.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/xdiv.cc Wed Dec 20 07:06:41 1995 +0000 @@ -27,10 +27,9 @@ #include -#include - #include "CMatrix.h" #include "dMatrix.h" +#include "oct-cmplx.h" #include "error.h" #include "tree-const.h" diff -r 23aa282707e8 -r e846e361a265 src/xdiv.h --- a/src/xdiv.h Wed Dec 20 06:55:46 1995 +0000 +++ b/src/xdiv.h Wed Dec 20 07:06:41 1995 +0000 @@ -24,7 +24,8 @@ #if !defined (octave_xdiv_h) #define octave_xdiv_h 1 -class Complex; +#include "oct-cmplx.h" + class Matrix; class ComplexMatrix; class tree_constant; diff -r 23aa282707e8 -r e846e361a265 src/xpow.cc --- a/src/xpow.cc Wed Dec 20 06:55:46 1995 +0000 +++ b/src/xpow.cc Wed Dec 20 07:06:41 1995 +0000 @@ -28,14 +28,13 @@ #include #include -#include - #include "CColVector.h" #include "CDiagMatrix.h" #include "CMatrix.h" #include "EIG.h" #include "dDiagMatrix.h" #include "dMatrix.h" +#include "oct-cmplx.h" #include "error.h" #include "tree-const.h" diff -r 23aa282707e8 -r e846e361a265 src/xpow.h --- a/src/xpow.h Wed Dec 20 06:55:46 1995 +0000 +++ b/src/xpow.h Wed Dec 20 07:06:41 1995 +0000 @@ -24,7 +24,8 @@ #if !defined (octave_xpow_h) #define octave_xpow_h 1 -class Complex; +#include "oct-cmplx.h" + class Matrix; class ComplexMatrix; class tree_constant;