changeset 3060:9c6cd52f3f5a

[project @ 1997-06-25 18:30:40 by jwe]
author jwe
date Wed, 25 Jun 1997 18:32:50 +0000
parents f2a34a28d9c5
children 1a5fe3010f09
files Announce ChangeLog PROJECTS configure.in src/ChangeLog src/oct-lvalue.h src/sysdep.cc src/toplev.cc
diffstat 8 files changed, 93 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/Announce
+++ b/Announce
@@ -1,15 +1,22 @@
-Subject: ANNOUNCE: Octave Version 2.0.7 released
+Subject: ANNOUNCE: Octave Version 2.0.8 released
 
-Octave version 2.0.7 is now available for ftp from ftp.che.wisc.edu
+Octave version 2.0.8 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  3345256 Jun  4 13:42 octave-2.0.7.tar.gz
-  -rw-r--r--   1 jwe     4120 Jun  4 13:43 octave-2.0.6-2.0.7.patch.gz
+  -rw-r--r--   1 jwe  3369407 Jun 23 15:44 octave-2.0.8.tar.gz
+  -rw-r--r--   1 jwe    41993 Jun 23 14:47 octave-2.0.7-2.0.8.patch.gz
 
 Most bugs reported since the release of version 2.0 have been fixed.
 
-This is a bug-fixing release.  There are no new features.
+This is a bug-fixing release.  There are only a few new features:
+
+  * If the argument to eig() is symmetric, Octave uses the specialized
+    Lapack subroutine for symmetric matrices for a significant
+    increase in performance.
+
+  * It is now possible to use the mkoctfile script to create .oct
+    files from multiple source and object files.
 
 Octave is a high-level interactive language primarily intended for
 numerical computations.  It is mostly compatible with MATLAB.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jun 23 09:16:56 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* configure.in (BOUNDS_CHECKING): Fix comment, allow bounds
+	checking to be enabled.
+
 Fri Jun 20 14:26:17 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* configure.in: Define SH_LD, SH_LDFLAGS, and RLD_FLAG for
--- a/PROJECTS
+++ b/PROJECTS
@@ -451,6 +451,15 @@
 
   * Make it possible to mark variables and functions as read-only.
 
+  * Provide a built-in function for applying a scalar function to an
+    array.  Be sure to note in the manual that this is not the
+    preferred way to write a function that can handle vector/matrix
+    arguments because there is a significant overhead for function
+    calls.  If you are really looking to make a function work for
+    vector/matrix arguments and you want it to run fast, you should
+    write it in terms of the existing vector/matrix operators as much
+    as possible.
+
 -------
 History:
 -------
--- a/configure.in
+++ b/configure.in
@@ -21,7 +21,7 @@
 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ### 02111-1307, USA. 
 
-AC_REVISION($Revision: 1.279 $)
+AC_REVISION($Revision: 1.280 $)
 AC_PREREQ(2.9)
 AC_INIT(src/octave.cc)
 AC_CONFIG_HEADER(config.h)
@@ -179,8 +179,8 @@
 
 BOUNDS_CHECKING=false
 AC_ARG_ENABLE(bounds-check,
-  [  --enable-bounds-check   for internal array classes (default is yes)],
-  [if test "$enableval" = no; then BOUNDS_CHECKING=false; fi], [])
+  [  --enable-bounds-check   for internal array classes (default is no)],
+  [if test "$enableval" = yes; then BOUNDS_CHECKING=true; fi], [])
 if $BOUNDS_CHECKING; then
   AC_DEFINE(BOUNDS_CHECKING, 1)
 fi
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,15 @@
+Wed Jun 25 13:31:06 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* oct-lvalue.h (octave_lvalue::struct_elt_ref): Ensure val is unique.
+
+Fri Jun 20 12:33:35 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* toplev.cc (cmd_death_handler): New function.
+	(run_command_and_return_output): Insert pid of command in
+	octave_child_list along with pointer to cmd_death_handler so we
+	can get the exit status without having to block SIGCHLD.
+	(cleanup_iprocstream): Remove pid of command from octave_child_list.
+
 Sun Jun 15 16:11:13 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* OPERATORS/op-cs-s.cc (ldiv): Doh, v1 is complex, v2 is real.
--- a/src/oct-lvalue.h
+++ b/src/oct-lvalue.h
@@ -73,7 +73,10 @@
   void assign (octave_value::assign_op, const octave_value&);
 
   octave_lvalue struct_elt_ref (const string& nm)
-    { return val->struct_elt_ref (nm); }
+    {
+      val->make_unique ();
+      return val->struct_elt_ref (nm);
+    }
 
   void set_index (const octave_value_list& i) { idx = i; }
 
--- a/src/sysdep.cc
+++ b/src/sysdep.cc
@@ -136,6 +136,8 @@
 }
 #endif
 
+// XXX FIXME XXX -- some systems define struct __exception.
+
 #if defined (EXCEPTION_IN_MATH)
 extern "C"
 int
--- a/src/toplev.cc
+++ b/src/toplev.cc
@@ -301,10 +301,22 @@
 
 // Execute a shell command.
 
+static int cmd_status = 0;
+
+static void
+cmd_death_handler (pid_t, int status)
+{
+  cmd_status = status;
+}
+
 static void
 cleanup_iprocstream (void *p)
 {
-  delete static_cast<iprocstream *> (p);
+  iprocstream *cmd = static_cast<iprocstream *> (p);
+
+  octave_child_list::remove (cmd->pid ());
+
+  delete cmd;
 }
 
 static octave_value_list
@@ -314,41 +326,53 @@
 
   iprocstream *cmd = new iprocstream (cmd_str.c_str ());
 
-  unwind_protect::add (cleanup_iprocstream, cmd);
+  cmd_status = -1;
 
-  int status = 127;
-
-  if (cmd && *cmd)
+  if (cmd)
     {
-      ostrstream output_buf;
+      octave_child_list::insert (cmd->pid (), cmd_death_handler);
+
+      unwind_protect::add (cleanup_iprocstream, cmd);
+
+      if (*cmd)
+	{
+	  ostrstream output_buf;
 
-      char ch;
-      while (cmd->get (ch))
-	output_buf.put (ch);
+	  char ch;
+	  while (cmd->get (ch))
+	    output_buf.put (ch);
 
-      status = cmd->close ();
+	  cmd->close ();
+
+	  // One way or another, cmd_death_handler should be called
+	  // when the process exits, and it will save the exit status
+	  // of the command in cmd_status.
 
-      // The value in status is as returned by waitpid.  If the
-      // process exited normally, extract the actual exit status of
-      // the command.  Otherwise, return 127 as a failure code.
+	  // The value in cmd_status is as returned by waitpid.  If
+	  // the process exited normally, extract the actual exit
+	  // status of the command.  Otherwise, return 127 as a
+	  // failure code.
 
-      if (WIFEXITED (status))
-	status = WEXITSTATUS (status);
+	  if (WIFEXITED (cmd_status))
+	    cmd_status = WEXITSTATUS (cmd_status);
+	  else
+	    cmd_status = 127;
 
-      output_buf << ends;
+	  output_buf << ends;
 
-      char *msg = output_buf.str ();
+	  char *msg = output_buf.str ();
 
-      retval(1) = static_cast<double> (status);
-      retval(0) = msg;
+	  retval(1) = (double) cmd_status;
+	  retval(0) = msg;
 
-      delete [] msg;
+	  delete [] msg;
+	}
+
+      unwind_protect::run ();
     }
   else
     error ("unable to start subprocess for `%s'", cmd_str.c_str ());
 
-  unwind_protect::run ();
-
   return retval;
 }