changeset 4269:5b075bd78a91

[project @ 2003-01-03 18:13:14 by jwe]
author jwe
date Fri, 03 Jan 2003 18:14:53 +0000
parents 363d406ec86c
children e7e10ce42860
files src/ChangeLog src/cutils.c src/pr-output.cc src/symtab.cc
diffstat 4 files changed, 22 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Jan 03 15:55:33 2003 +0000
+++ b/src/ChangeLog	Fri Jan 03 18:14:53 2003 +0000
@@ -1,7 +1,14 @@
-2003-01-03  John W Eaton  <eatonj@sun-68.cae.wisc.edu>
+2003-01-03  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* symtab.cc (symbol_table::rename): Explicitly convert C string to
+	std::string so type of second arg of ?: matches third.
+	(symbol_table::lookup): Likewise.
 
 	* mappers.cc: Remove std:: qualifiers from C library names.
 
+	* pr-output.cc: Replace std:: qualifiers on pow with STD_QUAL.
+	(STD_QUAL): New macro.
+
 2003-01-03  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* pt-exp.h (tree_expression::has_magic_end): New pure virtual function.
--- a/src/cutils.c	Fri Jan 03 15:55:33 2003 +0000
+++ b/src/cutils.c	Fri Jan 03 18:14:53 2003 +0000
@@ -119,14 +119,14 @@
   return strncasecmp (s1, s2, n);
 }
 
-// XXX FIXME XXX -- we really need a configure test for this.
+/* XXX FIXME XXX -- we really need a configure test for this.  */
 
 #if defined __GNUC__ && __GNUC__ >= 3
 #define HAVE_C99_VSNPRINTF 1
 #endif
 
-// We manage storage.  User should not free it, and its contents are
-// only valid until next call to vsnprintf.
+/* We manage storage.  User should not free it, and its contents are
+   only valid until next call to vsnprintf.  */
 
 char *
 octave_vsnprintf (const char *fmt, va_list args)
--- a/src/pr-output.cc	Fri Jan 03 15:55:33 2003 +0000
+++ b/src/pr-output.cc	Fri Jan 03 18:14:53 2003 +0000
@@ -56,6 +56,12 @@
 #include "utils.h"
 #include "variables.h"
 
+#if defined (__GNUG__)
+#define STD_QUAL std::
+#else
+#define STD_QUAL
+#endif
+
 // TRUE means use a scaled fixed point format for `format long' and
 // `format short'.
 static bool Vfixed_point_format;
@@ -499,7 +505,7 @@
   int x_min = min_abs == 0.0
     ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0));
 
-  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : std::pow (10.0, x_max - 1);
+  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : STD_QUAL pow (10.0, x_max - 1);
 
   set_real_matrix_format (sign, x_max, x_min, inf_or_nan,
 			  int_or_inf_or_nan, fw);
@@ -850,7 +856,7 @@
   int x_max = r_x_max > i_x_max ? r_x_max : i_x_max;
   int x_min = r_x_min > i_x_min ? r_x_min : i_x_min;
 
-  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : std::pow (10.0, x_max - 1);
+  scale = (x_max == 0 || int_or_inf_or_nan) ? 1.0 : STD_QUAL pow (10.0, x_max - 1);
 
   set_complex_matrix_format (sign, x_max, x_min, r_x_max, r_x_min,
 			     inf_or_nan, int_or_inf_or_nan, r_fw, i_fw);
@@ -991,7 +997,7 @@
   int x_min = min_abs == 0.0
     ? 0 : static_cast<int> (floor (log10 (min_abs) + 1.0));
 
-  scale = (x_max == 0 || all_ints) ? 1.0 : std::pow (10.0, x_max - 1);
+  scale = (x_max == 0 || all_ints) ? 1.0 : STD_QUAL pow (10.0, x_max - 1);
 
   set_range_format (sign, x_max, x_min, all_ints, fw);
 }
--- a/src/symtab.cc	Fri Jan 03 15:55:33 2003 +0000
+++ b/src/symtab.cc	Fri Jan 03 18:14:53 2003 +0000
@@ -473,7 +473,7 @@
 {
   if (Vdebug_symtab_lookups)
     {
-      std::cerr << (table_name.empty () ? "???" : table_name)
+      std::cerr << (table_name.empty () ? std::string ("???") : table_name)
 		<< " symtab::lookup ["
 		<< (insert ? "I" : "-")
 		<< (warn ? "W" : "-")
@@ -511,7 +511,7 @@
 {
   if (Vdebug_symtab_lookups)
     {
-      std::cerr << (table_name.empty () ? "???" : table_name)
+      std::cerr << (table_name.empty () ? std::string ("???") : table_name)
 		<< " symtab::rename "
 		<< "\"" << old_name << "\""
 		<< " to "