# HG changeset patch # User dbateman # Date 1187987184 0 # Node ID 6c85f7d37e6154775c055e65985d25e1630c70af # Parent d069de22e9aa329aae8d8aaddea96581ad85e3e2 [project @ 2007-08-24 20:23:21 by dbateman] diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-08-24 David Bateman + + * configure.in: Extra Qhull bits. + 2007-08-24 Kim Hansen * run-octave.in: Use `command` instead of $(command) to accomodate diff --git a/configure.in b/configure.in --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ EXTERN_CXXFLAGS="$CXXFLAGS" AC_INIT -AC_REVISION($Revision: 1.571 $) +AC_REVISION($Revision: 1.572 $) AC_PREREQ(2.57) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -1433,10 +1433,10 @@ lstat memmove mkdir mkfifo mkstemp on_exit pipe poll putenv raise \ readlink realpath rename resolvepath rindex rmdir round select setgrent \ setlocale setpwent setvbuf sigaction siglongjmp sigpending sigprocmask \ - sigsuspend stat strcasecmp strdup strerror stricmp \ + sigsuspend snprintf stat strcasecmp strdup strerror stricmp \ strncasecmp strnicmp strsignal symlink tempnam umask \ uname unlink usleep utime vfprintf vsprintf vsnprintf waitpid \ - _chmod _utime _utime32) + _chmod _snprintf x_utime _utime32) case "$canonical_host_type" in *-*-msdosmsvc) @@ -2056,6 +2056,7 @@ HDF5 libraries: $HDF5_LIBS CURL libraries: $CURL_LIBS REGEX libraries: $REGEX_LIBS + QHULL libraries: $QHULL_LIBS LIBS: $LIBS Default pager: $DEFAULT_PAGER gnuplot: $GNUPLOT_BINARY @@ -2190,6 +2191,11 @@ warn_msg_printed=true fi +if test -n "$warn_qhull"; then + AC_MSG_WARN($warn_qhull) + warn_msg_printed=true +fi + if test -n "$warn_zlib"; then AC_MSG_WARN($warn_zlib) warn_msg_printed=true diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2007-08-24 David Bateman + + * plot/__go_draw_axes__.m: Treat text color property. + 2007-08-24 John W. Eaton * plot/subplot.m, plot/plot.m, plot/grid.m: diff --git a/scripts/plot/__go_draw_axes__.m b/scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -599,22 +599,51 @@ halign = obj.horizontalalignment; angle = obj.rotation; units = obj.units; + color = obj.color; if (strcmpi (units, "normalized")) units = "graph"; else units = ""; endif + if (isnumeric (color)) + if (have_newer_gnuplot) + colorspec = sprintf ("textcolor rgb \"#%02x%02x%02x\"", + round (255*color)); + else + if (isequal (color, [0,0,0])) + typ = -1; + elseif (isequal (color, [1,0,0])) + typ = 1; + elseif (isequal (color, [0,1,0])) + typ = 2; + elseif (isequal (color, [0,0,1])) + typ = 3; + elseif (isequal (color, [1,0,1])) + typ = 4; + elseif (isequal (color, [0,1,1])) + typ = 5; + elseif (isequal (color, [1,1,1])) + typ = -1; + elseif (isequal (color, [1,1,0])) + typ = 7; + else + typ = -1; + endif + colorspec = sprintf ("textcolor lt %d", typ); + endif + endif + if (nd == 3) fprintf (plot_stream, - "set label \"%s\" at %s %g,%g,%g %s rotate by %f;\n", + "set label \"%s\" at %s %g,%g,%g %s rotate by %f %s;\n", undo_string_escapes (label), units, - lpos(1), lpos(2), lpos(3), halign, angle); + lpos(1), lpos(2), lpos(3), halign, angle, colorspec); else fprintf (plot_stream, - "set label \"%s\" at %s %g,%g %s rotate by %f;\n", + "set label \"%s\" at %s %g,%g %s rotate by %f %s;\n", undo_string_escapes (label), units, - lpos(1), lpos(2), halign, angle); + lpos(1), lpos(2), halign, angle, colorspec); endif otherwise diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,19 @@ +2007-08-24 David Bateman + + * symtab.cc (void symbol_table::clear (void)): If the record in + the symbol table to clear is a user function that is a sub + function with a static parent or if the parent is the current + parent function, don't delete the record. + (void symbol_table::clear_functions (void)): ditto. + (void symbol_table::clear (const std::string&)): ditto. + (void symbol_table::clear_function (const std::string&)): ditto. + + * graphics.h (class text): Add property color. + * graphics.cc (text::text_properties::text_properties) ditto. + (text::text_properties::set): ditto. + (text::text_properties::get): ditto. + (text::text_properties::factory_defaults): ditto. + 2007-08-24 John W. Eaton * mappers.cc (octave_is_NA (int), xisnan (int)): New functions. diff --git a/src/graphics.cc b/src/graphics.cc --- a/src/graphics.cc +++ b/src/graphics.cc @@ -1800,7 +1800,8 @@ units ("data"), position (Matrix (1, 3, 0.0)), rotation (0), - horizontalalignment ("left") + horizontalalignment ("left"), + color (Matrix (1, 3, 1.0)) { } void @@ -1827,6 +1828,8 @@ rotation = val; else if (name.compare ("horizontalalignment")) horizontalalignment = val; + else if (name.compare ("color")) + color = val; else { modified = false; @@ -1851,6 +1854,7 @@ m.assign ("position", position); m.assign ("rotation", rotation); m.assign ("horizontalalignment", horizontalalignment); + m.assign ("color", color); return m; } @@ -1878,6 +1882,8 @@ retval = rotation; else if (name.compare ("horizontalalignment")) retval = horizontalalignment; + else if (name.compare ("color")) + retval = color; else warning ("get: invalid property `%s'", name.c_str ()); @@ -1894,6 +1900,7 @@ m["position"] = Matrix (1, 3, 0.0); m["rotation"] = 0; m["horizontalalignment"] = "left"; + m["color"] = Matrix (1, 3, 1.0); return m; } diff --git a/src/graphics.h b/src/graphics.h --- a/src/graphics.h +++ b/src/graphics.h @@ -1446,6 +1446,7 @@ octave_value position; octave_value rotation; octave_value horizontalalignment; + octave_value color; static std::string go_name; }; diff --git a/src/symtab.cc b/src/symtab.cc --- a/src/symtab.cc +++ b/src/symtab.cc @@ -45,6 +45,8 @@ #include "symtab.h" #include "utils.h" #include "variables.h" +#include "ov-usr-fcn.h" +#include "toplev.h" #include "gripes.h" #include "lo-mappers.h" @@ -794,6 +796,32 @@ while (ptr) { + if (ptr->is_user_function()) + { + octave_user_function *fcn = ptr->def ().user_function_value (); + std::string parent = (fcn ? fcn->parent_fcn_name () : + std::string ()); + + if (! parent.empty ()) + { + if (curr_parent_function && + parent == curr_parent_function->name ()) + { + ptr = ptr->next (); + continue; + } + + symbol_record *parent_sr = fbi_sym_tab->lookup (parent); + + if (parent_sr && (parent_sr->is_static () || + parent_sr->is_eternal ())) + { + ptr = ptr->next (); + continue; + } + } + } + ptr->clear (); ptr = ptr->next (); @@ -832,7 +860,37 @@ if (ptr->is_user_function () || ptr->is_dld_function () || ptr->is_mex_function ()) - ptr->clear (); + { + + if (ptr->is_user_function()) + { + octave_user_function *fcn = + ptr->def ().user_function_value (); + std::string parent = (fcn ? fcn->parent_fcn_name () : + std::string ()); + + if (! parent.empty ()) + { + if (curr_parent_function && + parent == curr_parent_function->name ()) + { + ptr = ptr->next (); + continue; + } + + symbol_record *parent_sr = fbi_sym_tab->lookup (parent); + + if (parent_sr && (parent_sr->is_static () || + parent_sr->is_eternal ())) + { + ptr = ptr->next (); + continue; + } + } + } + + ptr->clear (); + } ptr = ptr->next (); } @@ -884,6 +942,27 @@ { if (ptr->name () == nm) { + if (ptr->is_user_function()) + { + octave_user_function *fcn = + ptr->def ().user_function_value (); + std::string parent = (fcn ? fcn->parent_fcn_name () : + std::string ()); + + if (! parent.empty ()) + { + if (curr_parent_function && + parent == curr_parent_function->name ()) + return true; + + symbol_record *parent_sr = fbi_sym_tab->lookup (parent); + + if (parent_sr && (parent_sr->is_static () || + parent_sr->is_eternal ())) + return true; + } + } + ptr->clear (); return true; @@ -952,6 +1031,27 @@ || ptr->is_dld_function () || ptr->is_mex_function ())) { + if (ptr->is_user_function()) + { + octave_user_function *fcn = + ptr->def ().user_function_value (); + std::string parent = (fcn ? fcn->parent_fcn_name () : + std::string ()); + + if (! parent.empty ()) + { + if (curr_parent_function && + parent == curr_parent_function->name ()) + return true; + + symbol_record *parent_sr = fbi_sym_tab->lookup (parent); + + if (parent_sr && (parent_sr->is_static () || + parent_sr->is_eternal ())) + return true; + } + } + ptr->clear (); return true; }