Mercurial > hg > octave-nkf
changeset 1651:e846e361a265
[project @ 1995-12-20 06:59:12 by jwe]
author | jwe |
---|---|
date | Wed, 20 Dec 1995 07:06:41 +0000 |
parents | 23aa282707e8 |
children | c764beacdfb2 |
files | src/arith-ops.cc src/arith-ops.h src/mappers.cc src/mappers.h src/octave.cc src/pr-output.cc src/pr-output.h src/sighandlers.cc src/sighandlers.h src/utils.cc src/xdiv.cc src/xdiv.h src/xpow.cc src/xpow.h |
diffstat | 14 files changed, 35 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/src/arith-ops.cc +++ b/src/arith-ops.cc @@ -28,7 +28,7 @@ #include <cctype> #include <cmath> -#include <Complex.h> +#include "oct-cmplx.h" #include "arith-ops.h" #include "error.h"
--- a/src/arith-ops.h +++ b/src/arith-ops.h @@ -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;
--- a/src/mappers.cc +++ b/src/mappers.cc @@ -28,7 +28,7 @@ #include <cmath> #include <cfloat> -#include <Complex.h> +#include "oct-cmplx.h" #include "defun.h" #include "error.h"
--- a/src/mappers.h +++ b/src/mappers.h @@ -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&);
--- a/src/octave.cc +++ b/src/octave.cc @@ -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.
--- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -32,11 +32,10 @@ #include <iostream.h> #include <strstream.h> -#include <Complex.h> - #include "CMatrix.h" #include "Range.h" #include "dMatrix.h" +#include "oct-cmplx.h" #include "defun.h" #include "error.h"
--- a/src/pr-output.h +++ b/src/pr-output.h @@ -26,8 +26,9 @@ class ostream; +#include "oct-cmplx.h" + class Matrix; -class Complex; class ComplexMatrix; class charMatrix; class Range;
--- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -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
--- a/src/sighandlers.h +++ b/src/sighandlers.h @@ -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
--- a/src/utils.cc +++ b/src/utils.cc @@ -38,8 +38,6 @@ #include <unistd.h> #endif -#include <Complex.h> - #if defined (HAVE_TERMIOS_H) #include <termios.h> #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"
--- a/src/xdiv.cc +++ b/src/xdiv.cc @@ -27,10 +27,9 @@ #include <cassert> -#include <Complex.h> - #include "CMatrix.h" #include "dMatrix.h" +#include "oct-cmplx.h" #include "error.h" #include "tree-const.h"
--- a/src/xdiv.h +++ b/src/xdiv.h @@ -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;
--- a/src/xpow.cc +++ b/src/xpow.cc @@ -28,14 +28,13 @@ #include <cassert> #include <climits> -#include <Complex.h> - #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"