changeset 2431:8426659cd60e

[project @ 1996-10-26 04:37:45 by jwe]
author jwe
date Sat, 26 Oct 1996 04:39:01 +0000
parents 47cc2a839994
children 874f758eade5
files liboctave/ChangeLog liboctave/file-ops.cc liboctave/str-vec.h src/ChangeLog src/input.cc src/ov-ch-mat.h src/pt-const.h src/sighandlers.cc
diffstat 8 files changed, 37 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/ChangeLog
+++ b/liboctave/ChangeLog
@@ -1,5 +1,11 @@
 Fri Oct 25 01:24:51 1996  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* str-vec.h (str_vec_compare): Declare args as const void *, then
+	cast them to const string * in the body of the function.
+
+	* file-ops.cc (file_stat::mode_as_string): Explicitly construct
+	string from buf.
+
 	* Array3.h (Array3::checkelem): Tag bogus return value with
 	GCC_ATTRIBUTE_UNUSED.
 	* Array2.h (Array2::checkelem): Likewise.
--- a/liboctave/file-ops.cc
+++ b/liboctave/file-ops.cc
@@ -100,7 +100,7 @@
 
   buf[10] = '\0';
 
-  return buf;
+  return string (buf);
 }
 
 // Private stuff:
--- a/liboctave/str-vec.h
+++ b/liboctave/str-vec.h
@@ -30,8 +30,11 @@
 #include "Array.h"
 
 static int
-str_vec_compare (const string *a, const string *b)
+str_vec_compare (const void *a_arg, const void *b_arg)
 {
+  const string *a = (const string *) a_arg;
+  const string *b = (const string *) b_arg;
+
   return a->compare (*b);
 }
 
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,17 @@
 Fri Oct 25 01:10:51 1996  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* ov-ch-mat.h (octave_char_matrix::any): Return 0.0 instead of false.
+	(octave_char_matrix::all): Likewise.
+
+	* input.cc (Fecho): When binding value of echo_executing_commands,
+	cast ECHO_* to double.
+
+	* sighandlers.cc (octave_child_list::do_remove): Delete unused
+	variable `enlarge'.
+
+	* pt-const.h (tree_constant::tree_constant (const tree_constant&)):
+	Don't pass arg to tree_fvc constructor.
+
 	* resource.cc (getrusage): [HAVE_GETRUSAGE && RUSAGE_TIMES_ONLY]:
 	Only fill in time values.
 
--- a/src/input.cc
+++ b/src/input.cc
@@ -1158,9 +1158,11 @@
       {
 	if ((Vecho_executing_commands & ECHO_SCRIPTS)
 	    || (Vecho_executing_commands & ECHO_FUNCTIONS))
-	  bind_builtin_variable ("echo_executing_commands", ECHO_OFF);
+	  bind_builtin_variable ("echo_executing_commands",
+				 (double) ECHO_OFF);
 	else
-	  bind_builtin_variable ("echo_executing_commands", ECHO_SCRIPTS);
+	  bind_builtin_variable ("echo_executing_commands",
+				 (double) ECHO_SCRIPTS);
       }
       break;
 
@@ -1169,9 +1171,11 @@
 	string arg = argv[1];
 
 	if (arg == "on")
-	  bind_builtin_variable ("echo_executing_commands", ECHO_SCRIPTS);
+	  bind_builtin_variable ("echo_executing_commands",
+				 (double) ECHO_SCRIPTS);
 	else if (arg == "off")
-	  bind_builtin_variable ("echo_executing_commands", ECHO_OFF);
+	  bind_builtin_variable ("echo_executing_commands",
+				 (double) ECHO_OFF);
 	else
 	  print_usage ("echo");
       }
@@ -1183,9 +1187,10 @@
 
 	if (arg == "on" && argv[2] == "all")
 	  bind_builtin_variable ("echo_executing_commands",
-				 (ECHO_SCRIPTS | ECHO_FUNCTIONS));
+				 (double) (ECHO_SCRIPTS | ECHO_FUNCTIONS));
 	else if (arg == "off" && argv[2] == "all")
-	  bind_builtin_variable ("echo_executing_commands", ECHO_OFF);
+	  bind_builtin_variable ("echo_executing_commands",
+				 (double) ECHO_OFF);
 	else
 	  print_usage ("echo");
       }
--- a/src/ov-ch-mat.h
+++ b/src/ov-ch-mat.h
@@ -87,8 +87,8 @@
   bool is_char_matrix (void) const { return true; }
 
   // XXX FIXME XXX
-  octave_value all (void) const { return false; }
-  octave_value any (void) const { return false; }
+  octave_value all (void) const { return 0.0; }
+  octave_value any (void) const { return 0.0; }
 
   bool is_real_type (void) const { return true; }
 
--- a/src/pt-const.h
+++ b/src/pt-const.h
@@ -142,7 +142,7 @@
     : tree_fvc (l, c), val (v), orig_text () { }
 
   tree_constant (const tree_constant& a)
-    : tree_fvc (a), val (a.val), orig_text () { }
+    : tree_fvc (), val (a.val), orig_text () { }
 
   ~tree_constant (void) { }
 
--- a/src/sighandlers.cc
+++ b/src/sighandlers.cc
@@ -508,8 +508,6 @@
 {
   // Mark the record for PID invalid.
 
-  bool enlarge = true;
-
   for (int i = 0; i < curr_len; i++)
     {
       octave_child& tmp = list (i);