# HG changeset patch # User jwe # Date 1041617693 0 # Node ID 5b075bd78a91ba2e85d8d15009af5ab26ba8fc2a # Parent 363d406ec86cf1b5bc95aef34eb18c733aea6bdb [project @ 2003-01-03 18:13:14 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,7 +1,14 @@ -2003-01-03 John W Eaton +2003-01-03 John W. Eaton + + * 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 * pt-exp.h (tree_expression::has_magic_end): New pure virtual function. diff --git a/src/cutils.c b/src/cutils.c --- a/src/cutils.c +++ b/src/cutils.c @@ -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) diff --git a/src/pr-output.cc b/src/pr-output.cc --- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -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 (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 (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); } diff --git a/src/symtab.cc b/src/symtab.cc --- a/src/symtab.cc +++ b/src/symtab.cc @@ -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 "