# HG changeset patch # User jwe # Date 1037135644 0 # Node ID 2e94b2abfe6de3ab9a80a8e6d29a6196dacda2ab # Parent 04694e5b4239a34b7fb5a5eb051e04c7bfe478ca [project @ 2002-11-12 21:14:04 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2002-11-12 John W. Eaton + + * signal/bartlett.m: Avoid row/column mismatch error. + 2002-11-12 Paul Kienzle * statistics/base/var.m: Use better formula for improved accuracy. diff --git a/scripts/signal/bartlett.m b/scripts/signal/bartlett.m --- a/scripts/signal/bartlett.m +++ b/scripts/signal/bartlett.m @@ -44,10 +44,7 @@ else m = m - 1; n = fix (m / 2); - c (1 : n+1) = 2 * (0 : n)' / m; - c (n+2 : m+1) = 2 - 2 * (n+1 : m)'/m; + c = [2*(0:n)/m, 2-2*(n+1:m)/m]'; endif - c = c'; - endfunction diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2002-11-12 John W. Eaton + * toplev.cc (octave_initialized): New global variable. + (main_loop): Set it to true here. + * sighandlers.cc (sigint_handler): Exit immediately if we have not + finished init process. + * load-save.cc (extract_keyword): Return std::string, not char *. Change all uses. (read_ascii_data): Likewise. diff --git a/src/sighandlers.cc b/src/sighandlers.cc --- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -283,6 +283,9 @@ MAYBE_REINSTALL_SIGHANDLER (sig, sigint_handler); + if (! octave_initialized) + exit (1); + if (can_interrupt) { #if defined (USE_EXCEPTIONS_FOR_INTERRUPTS) diff --git a/src/toplev.cc b/src/toplev.cc --- a/src/toplev.cc +++ b/src/toplev.cc @@ -78,6 +78,9 @@ // TRUE means we are exiting via the builtin exit or quit functions. static bool quitting_gracefully = false; +// TRUE means we've processed all the init code and we are good to go. +bool octave_initialized = false; + // Current command to execute. tree_statement_list *global_command = 0; @@ -108,6 +111,8 @@ octave_catch_interrupts (); + octave_initialized = true; + // The big loop. int retval = 0; diff --git a/src/toplev.h b/src/toplev.h --- a/src/toplev.h +++ b/src/toplev.h @@ -51,6 +51,9 @@ // Original value of TEXMFDBS environment variable. extern std::string octave_original_texmfdbs; +// TRUE means we've processed all the init code and we are good to go. +extern bool octave_initialized; + #endif /*