changeset 2705:18395aaeafb7

[project @ 1997-02-20 04:56:43 by jwe]
author jwe
date Thu, 20 Feb 1997 04:58:02 +0000
parents 261befb7f938
children 5dd7d7e947b2
files Announce WWW/NEWS-2.html WWW/index.html doc/interpreter/Makefile.in doc/interpreter/octave.texi doc/liboctave/Makefile.in doc/liboctave/liboctave.texi src/ChangeLog src/help.cc src/oct-hist.cc src/pager.cc src/pt-plot.cc src/sighandlers.cc src/sighandlers.h src/toplev.cc
diffstat 15 files changed, 109 insertions(+), 115 deletions(-) [+]
line wrap: on
line diff
--- a/Announce	Wed Feb 19 19:37:10 1997 +0000
+++ b/Announce	Thu Feb 20 04:58:02 1997 +0000
@@ -1,49 +1,28 @@
-Subject: ANNOUNCE: Octave Version 2.0.2 released
+Subject: ANNOUNCE: Octave Version 2.0.4 released
 
-Octave version 2.0.3 is now available for ftp from ftp.che.wisc.edu
+Octave version 2.0.4 is now available for ftp from ftp.che.wisc.edu
 in the directory /pub/octave.  Diffs from the previous release are
 also available in the same directory.
 
-  -rw-r--r--   1 jwe  3312470 Feb 18 13:08 octave-2.0.3.tar.gz
-  -rw-r--r--   1 jwe   217812 Feb 18 13:43 octave-2.0.2-2.0.3.patch.
+  -rw-r--r--   1 jwe  3314916 Feb 19 15:32 octave-2.0.4.tar.gz
+  -rw-r--r--   1 jwe     9795 Feb 19 15:55 octave-2.0.3-2.0.4.patch.gz
 
-In addition to the source distributions, there are binary
-distributions available for Linux running on Intel systems, OSF/1
-running on Alpha systems, and HA-UX 9.x running on HPPA systems.
-Binary distributions for other platforms will be available from
-ftp.che.wisc.edu when they are contributed by volunteers.  If you
-would like to help to make a binary distribution available, please
-contact bug-octave@bevo.che.wisc.edu.
-
-Version 2.0.3 is primarily a bug-fixing release.  Most bugs reported
-since the release of version 2.0.2 have been fixed.  There are also a
-few new features, including:
-
-  * The manual has been completely revised and now corresponds much
-    more closely to the features of the current version.
+Version 2.0.4 fixes some problems with the configure scripts and
+Makefiles that were present in 2.0.3.  It will probably be the last
+2.0.x release unless some serious new bugs are found and reported.
 
-  * The return value for assignment expressions is now the RHS since
-    that is more consistent with the way other programming languages
-    work.  However, Octave still prints the entire LHS value so that
-
-      x = zeros (1, 2);
-      x(2) = 1
-
-    still prints
-
-      x =
+There are also two new features (what would be the fun of making a
+release just to fix bugs? :-) both of which are kluges to allow a bit
+more compatibility with Matlab:
 
-        0  1
-
-    but an assignment like
-
-      z = x(2) = 1
+  * It is now possible to use commands like ls, save, and cd as simple
+    variable names.  They still cannot be used as formal parameters
+    for functions, or as the names of structure variables.  Failed
+    assignments leave them undefined (you can recover the orginal
+    function definition using clear).
 
-    sets z to 1 (not [ 0, 1 ] as in previous versions of Octave).
-
-  * It is now much easier to make binary distributions.  See the
-    Binary Distributions section of the manual for more details.
-
+  * Is is now possible to invoke commands like ls, save, and cd as
+    normal functions (for example, load ("foo", "x", "y", "z")).
 
 You can help make Octave more reliable by reporting any bugs you find
 to bug-octave@bevo.che.wisc.edu.
--- a/WWW/NEWS-2.html	Wed Feb 19 19:37:10 1997 +0000
+++ b/WWW/NEWS-2.html	Thu Feb 20 04:58:02 1997 +0000
@@ -8,6 +8,21 @@
 <h1> News for Octave Version 2 </h1>
 <hr>
 
+<h2>Summary of changes for version 2.0.4</h2>
+
+<ul>
+<li>It is now possible to use commands like ls, save, and cd as simple
+    variable names.  They still cannot be used as formal parameters
+    for functions, or as the names of structure variables.  Failed
+    assignments leave them undefined (you can recover the orginal
+    function definition using clear).
+<p>
+</li>
+<li>Is is now possible to invoke commands like ls, save, and cd as
+    normal functions (for example, load ("foo", "x", "y", "z")).
+</li>
+</ul>
+
 <h2>Summary of changes for version 2.0.3</h2>
 
 <ul>
--- a/WWW/index.html	Wed Feb 19 19:37:10 1997 +0000
+++ b/WWW/index.html	Thu Feb 20 04:58:02 1997 +0000
@@ -16,11 +16,8 @@
 
 <h2>News</h2>
 <p>
-Version 2.0.3 was released Tuesday February 18, 1997.  Most bugs
+Version 2.0.4 was released Wednesday February 19, 1997.  Most bugs
 reported since the release of version 2.0 have been fixed.
-Unfortunately, there are a few glitches in the installation procedure
-that will cause trouble on a few systems.  Look for 2.0.4 to correct
-these minor problems fairly soon.
 </p>
 
 <p>
--- a/doc/interpreter/Makefile.in	Wed Feb 19 19:37:10 1997 +0000
+++ b/doc/interpreter/Makefile.in	Thu Feb 20 04:58:02 1997 +0000
@@ -57,7 +57,7 @@
 .PHONY: all
 
 octave.info: $(TEXINFO) ../conf.texi
-	-makeinfo -I$(srcdir) $(srcdir)/octave.texi
+	-makeinfo -I$(srcdir) -I$(srcdir)/.. $(srcdir)/octave.texi
 
 octave.dvi: $(TEXINFO) ../conf.texi
 	-TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):" ; \
@@ -69,12 +69,12 @@
 
 ../../INSTALL.OCTAVE: install.texi
 	-makeinfo -D INSTALLONLY --no-headers --no-split --output INSTALL \
-	  -I$(srcdir) $(srcdir)/install.texi
+	  -I$(srcdir) -I$(srcdir)/.. $(srcdir)/install.texi
 	mv INSTALL ../../INSTALL.OCTAVE
 
 ../../BUGS: bugs.texi
 	-makeinfo -D BUGSONLY --no-headers --no-split --output BUGS \
-	  -I$(srcdir) $(srcdir)/bugs.texi
+	  -I$(srcdir) -I$(srcdir)/.. $(srcdir)/bugs.texi
 	mv BUGS ../../BUGS
 
 check: all
--- a/doc/interpreter/octave.texi	Wed Feb 19 19:37:10 1997 +0000
+++ b/doc/interpreter/octave.texi	Thu Feb 20 04:58:02 1997 +0000
@@ -36,7 +36,7 @@
 @c This file doesn't include a chapter, so it must not be included
 @c if you want to run the Emacs function texinfo-multiple-files-update.
 
-@include ../conf.texi
+@include conf.texi
 
 @settitle Octave
 
--- a/doc/liboctave/Makefile.in	Wed Feb 19 19:37:10 1997 +0000
+++ b/doc/liboctave/Makefile.in	Thu Feb 20 04:58:02 1997 +0000
@@ -42,7 +42,7 @@
 .PHONY: all
 
 liboctave.info: $(TEXINFO) ../conf.texi
-	-makeinfo -I$(srcdir) $(srcdir)/liboctave.texi
+	-makeinfo -I$(srcdir) -I$(srcdir)/.. $(srcdir)/liboctave.texi
 
 liboctave.dvi: $(TEXINFO) ../conf.texi
 	-TEXINPUTS="$(srcdir):$(srcdir)/..:$(TEXINPUTS):" ; \
--- a/doc/liboctave/liboctave.texi	Wed Feb 19 19:37:10 1997 +0000
+++ b/doc/liboctave/liboctave.texi	Thu Feb 20 04:58:02 1997 +0000
@@ -24,7 +24,11 @@
 
 @defindex op
 
-@include ../conf.texi
+@c Things like the Octave version number are defined in conf.texi.
+@c This file doesn't include a chapter, so it must not be included
+@c if you want to run the Emacs function texinfo-multiple-files-update.
+
+@include conf.texi
 
 @settitle Octave C++ Classes
 
--- a/src/ChangeLog	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/ChangeLog	Thu Feb 20 04:58:02 1997 +0000
@@ -2,6 +2,15 @@
 
 	* Version 2.0.4 released.
 
+	* sighandlers.cc (octave_ignore_interrupts,
+	octave_catch_interrupts, octave_set_interrupt_handler):
+	Return old value, not pointer to static data.  Fix all uses.
+	
+	* sighandlers.h (octave_interrupt_handler): Move declaration here.
+	* sighandlers.cc: From here.
+
+	* toplev.cc: Undo previous change.
+
 	* lex.l (handle_identifier): Allow commands like ls, save, etc. to
 	also be used as simple variable names.  Also make it possible to
 	use the normal function call syntax to invoke them.
--- a/src/help.cc	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/help.cc	Thu Feb 20 04:58:02 1997 +0000
@@ -553,7 +553,7 @@
 
   cmd_str = cmd_buf.str ();
 
-  volatile octave_interrupt_handler *old_interrupt_handler
+  volatile octave_interrupt_handler old_interrupt_handler
     = octave_ignore_interrupts ();
 
   status = system (cmd_str);
--- a/src/oct-hist.cc	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/oct-hist.cc	Thu Feb 20 04:58:02 1997 +0000
@@ -427,7 +427,7 @@
   // Ignore interrupts while we are off editing commands.  Should we
   // maybe avoid using system()?
 
-  volatile octave_interrupt_handler *old_interrupt_handler
+  volatile octave_interrupt_handler old_interrupt_handler
     = octave_ignore_interrupts ();
 
   system (cmd.c_str ());
--- a/src/pager.cc	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/pager.cc	Thu Feb 20 04:58:02 1997 +0000
@@ -72,7 +72,10 @@
 // through the pager.
 static bool Vpage_screen_output;
 
-static octave_interrupt_handler *saved_interrupt_handler = 0;
+// Only one pager can be active at once, so having these at file
+// scope should be ok.
+static octave_interrupt_handler saved_interrupt_handler;
+static bool interrupt_handler_saved = false;
 
 static int really_flush_to_pager = 0;
 
@@ -88,10 +91,10 @@
   delete external_pager;
   external_pager = 0;
 
-  if (saved_interrupt_handler)
+  if (interrupt_handler_saved)
     {
       octave_set_interrupt_handler (saved_interrupt_handler);
-      saved_interrupt_handler = 0;
+      interrupt_handler_saved = false;
     }
 }
 
@@ -140,6 +143,7 @@
 	      if (! pgr.empty ())
 		{
 		  saved_interrupt_handler = octave_ignore_interrupts ();
+		  interrupt_handler_saved = true;
 
 		  external_pager = new oprocstream (pgr.c_str ());
 
--- a/src/pt-plot.cc	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/pt-plot.cc	Thu Feb 20 04:58:02 1997 +0000
@@ -173,7 +173,7 @@
       sigaddset (&set, SIGINT);
       sigprocmask (SIG_BLOCK, &set, &oset);
 #else
-     volatile octave_interrupt_handler *old_interrupt_handler
+     volatile octave_interrupt_handler old_interrupt_handler
 	= octave_ignore_interrupts ();
 #endif
 
--- a/src/sighandlers.cc	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/sighandlers.cc	Thu Feb 20 04:58:02 1997 +0000
@@ -103,20 +103,6 @@
 #endif
 }
 
-struct
-octave_interrupt_handler
-{
-#ifdef SIGINT
-  sig_handler *int_handler;
-#endif
-
-#ifdef SIGBREAK
-  sig_handler *brk_handler;
-#endif
-};
-
-static octave_interrupt_handler the_interrupt_handler;
-
 static void
 my_friendly_exit (const char *sig_name, int sig_number)
 {
@@ -189,7 +175,7 @@
 static RETSIGTYPE
 sigchld_handler (int /* sig */)
 {
-  volatile octave_interrupt_handler *saved_interrupt_handler
+  volatile octave_interrupt_handler saved_interrupt_handler
      = octave_ignore_interrupts ();
 
   // I wonder if this is really right, or if SIGCHLD should just be
@@ -313,55 +299,52 @@
   SIGHANDLER_RETURN (0);
 }
 
-void
+octave_interrupt_handler
 octave_catch_interrupts (void)
 {
-#ifdef SIGINT
-  octave_set_signal_handler (SIGINT, sigint_handler);
-
-  the_interrupt_handler.int_handler = sigint_handler;
-#endif
-
-#ifdef SIGBREAK
-  octave_set_signal_handler (SIGBREAK, sigint_handler);
+  octave_interrupt_handler retval;
 
-  the_interrupt_handler.brk_handler = sigint_handler;
-#endif
-}
-
-octave_interrupt_handler *
-octave_ignore_interrupts (void)
-{
 #ifdef SIGINT
-  the_interrupt_handler.int_handler
-    = octave_set_signal_handler (SIGINT, SIG_IGN);
+  retval.int_handler = octave_set_signal_handler (SIGINT, sigint_handler);
 #endif
 
 #ifdef SIGBREAK
-  the_interrupt_handler.int_handler
-    = octave_set_signal_handler (SIGBREAK, SIG_IGN);
+  retval.brk_handler = octave_set_signal_handler (SIGBREAK, sigint_handler);
 #endif
-  
-  return &the_interrupt_handler;
+
+  return retval;
 }
 
-octave_interrupt_handler *
-octave_set_interrupt_handler (const volatile octave_interrupt_handler *h)
+octave_interrupt_handler
+octave_ignore_interrupts (void)
 {
-  if (h)
-    {
+  octave_interrupt_handler retval;
+
 #ifdef SIGINT
-      the_interrupt_handler.int_handler
-	= octave_set_signal_handler (SIGINT, h->int_handler);
+  retval.int_handler = octave_set_signal_handler (SIGINT, SIG_IGN);
 #endif
 
 #ifdef SIGBREAK
-      the_interrupt_handler.int_handler
-	= octave_set_signal_handler (SIGBREAK, h->brk_handler);
+  retval.brk_handler = octave_set_signal_handler (SIGBREAK, SIG_IGN);
 #endif
-    }
-  
-  return &the_interrupt_handler;
+
+  return retval;
+}
+
+octave_interrupt_handler
+octave_set_interrupt_handler (const volatile octave_interrupt_handler& h)
+{
+  octave_interrupt_handler retval;
+
+#ifdef SIGINT
+  retval.int_handler = octave_set_signal_handler (SIGINT, h.int_handler);
+#endif
+
+#ifdef SIGBREAK
+  retval.brk_handler = octave_set_signal_handler (SIGBREAK, h.brk_handler);
+#endif
+
+  return retval;
 }
 
 // Install all the handlers for the signals we might care about.
--- a/src/sighandlers.h	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/sighandlers.h	Thu Feb 20 04:58:02 1997 +0000
@@ -59,10 +59,19 @@
 
 typedef RETSIGTYPE sig_handler (int);
 
-// All we need to do is declare pointers to this, so we don't need to
-// have the whole declaration here.
+// XXX FIXME XXX -- the data should probably be private...
 
-struct octave_interrupt_handler;
+struct
+octave_interrupt_handler
+{
+#ifdef SIGINT
+  sig_handler *int_handler;
+#endif
+
+#ifdef SIGBREAK
+  sig_handler *brk_handler;
+#endif
+};
 
 // Nonzero means we have already printed a message for this series of
 // SIGPIPES.  We assume that the writer will eventually give up.
@@ -75,12 +84,12 @@
 
 extern void install_signal_handlers (void);
 
-extern void octave_catch_interrupts (void);
+extern octave_interrupt_handler octave_catch_interrupts (void);
 
-extern octave_interrupt_handler *octave_ignore_interrupts (void);
+extern octave_interrupt_handler octave_ignore_interrupts (void);
 
-extern octave_interrupt_handler *
-octave_set_interrupt_handler (const volatile octave_interrupt_handler *);
+extern octave_interrupt_handler
+octave_set_interrupt_handler (const volatile octave_interrupt_handler&);
 
 extern void octave_save_signal_mask (void);
 
--- a/src/toplev.cc	Wed Feb 19 19:37:10 1997 +0000
+++ b/src/toplev.cc	Thu Feb 20 04:58:02 1997 +0000
@@ -650,13 +650,9 @@
 
 // Execute a shell command.
 
-static sigset_t signal_set, old_signal_set;
-
 static void
 cleanup_iprocstream (void *p)
 {
-  UNBLOCK_CHILD (old_signal_set);
-
   delete (iprocstream *) p;
 }
 
@@ -665,8 +661,6 @@
 {
   octave_value_list retval;
 
-  BLOCK_CHILD (signal_set, old_signal_set);
-
   iprocstream *cmd = new iprocstream (cmd_str.c_str ());
 
   add_unwind_protect (cleanup_iprocstream, cmd);