# HG changeset patch # User John W. Eaton # Date 1328314561 18000 # Node ID ec99c8c185beac4996230943a59b8eb79463971e # Parent 17de694961f5f3ac4c73ae5fe48824baad7ae5d9# Parent 45f5a5d5656fd30b527cab87e7464f13ed27eb69 maint: periodic merge of stable to default diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -649,7 +649,7 @@ OCTAVE_CHECK_LIBRARY(qhull, QHull, [Qhull library not found -- this will result in loss of functionality of some geometry functions.], - [qhull/libqhull.h libqhull.h qhull/qhull.h qhull.h], [qh_qhull], [], [], + [libqhull/libqhull.h qhull/libqhull.h libqhull.h qhull/qhull.h qhull.h], [qh_qhull], [], [], [warn_qhull= OCTAVE_CHECK_QHULL_VERSION OCTAVE_CHECK_QHULL_OK([TEXINFO_QHULL="@set HAVE_QHULL" diff --git a/m4/acinclude.m4 b/m4/acinclude.m4 --- a/m4/acinclude.m4 +++ b/m4/acinclude.m4 @@ -937,7 +937,13 @@ octave_cv_lib_qhull_version, [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include -#if defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) +#if defined (HAVE_LIBQHULL_LIBQHULL_H) +# include +# include +# include +# include +# include +#elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) # if defined (HAVE_QHULL_LIBQHULL_H) # include # else @@ -974,7 +980,13 @@ octave_cv_lib_qhull_ok, [ AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include -#if defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) +#if defined (HAVE_LIBQHULL_LIBQHULL_H) +# include +# include +# include +# include +# include +#elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) # if defined (HAVE_QHULL_LIBQHULL_H) # include # else diff --git a/scripts/io/strread.m b/scripts/io/strread.m --- a/scripts/io/strread.m +++ b/scripts/io/strread.m @@ -439,14 +439,13 @@ iwrd = 1; iwrdp = 0; iwrdl = length (words{iwrd}); for ii = 1:numel (fmt_words) + nxt_wrd = 0; + if (idf(ii)) ## Literal expected if (isempty (strfind (fmt_words{ii}, words(iwrd)))) ## Not found in current word; supposed to be in next word - ++iwrd; iwrdp = 0; - if (ii < numel (fmt_words)) - iwrdl = length (words{iwrd}); - endif + nxt_wrd = 1; else ## Found it in current word. Subtract literal length iwrdp += length (fmt_words{ii}); @@ -455,34 +454,28 @@ warning ("strread: literal '%s' (fmt spec # %d) does not match data", ... fmt_words{ii}, ii); ## Word assumed to be completely "used up". Next word - ++iwrd; iwrdp = 0; - if (ii < numel (fmt_words)) - iwrdl = length (words{iwrd}); - endif + nxt_wrd = 1; elseif (iwrdp == iwrdl) ## Word completely "used up". Next word - ++iwrd; iwrdp = 0; - if (ii < numel (fmt_words)) - iwrdl = length (words{iwrd}); - endif + nxt_wrd = 1; endif endif elseif (idg(ii)) ## Fixed width specifier (%N or %*N): read just a part of word - iwrdp += floor ... - (str2double (fmt_words{ii}(regexp(fmt_words{ii}, '\d') : end-1))); - if (iwrdp > iwrdl) - ## Match error. Field extends beyond word boundary. - warning ... - ("strread: field width '%s' (fmt spec # %d) extends beyond actual word limit", ... - fmt_words{ii}, ii); - ## Assume word to be completely "used up". Next word - ++iwrd; iwrdp = 0; iwrdl = length (words{iwrd}); - elseif (iwrdp == iwrdl) - ## Word completely "used up". Next word - ++iwrd; iwrdp = 0; iwrdl = length (words{iwrd}); - endif + iwrdp += floor ... + (str2double (fmt_words{ii}(regexp(fmt_words{ii}, '\d') : end-1))); + if (iwrdp > iwrdl) + ## Match error. Field extends beyond word boundary. + warning ... + ("strread: field width '%s' (fmt spec # %d) extends beyond actual word limit", ... + fmt_words{ii}, ii); + ## Assume word to be completely "used up". Next word + nxt_wrd = 1; + elseif (iwrdp == iwrdl) + ## Word completely "used up". Next word + nxt_wrd = 1; + endif else ## A simple format conv. specifier. Either (1) uses rest of word, or @@ -492,20 +485,25 @@ ## Next fmt_word is a literal... if (! index (words{iwrd}(iwrdp+1:end), fmt_words{ii+1})) ## ...but not found in current word => field uses rest of word - ++iwrd; iwrdp = 0; iwrdl = length (words{iwrd}); + nxt_wrd = 1; else ## ..or it IS found. Add inferred width of current conversion field iwrdp += index (words{iwrd}(iwrdp+1:end), fmt_words{ii+1}) - 1; endif elseif (iwrdp < iwrdl) ## No bordering literal to the right => field occupies (rest of) word - ++iwrd; iwrdp = 0; - if (ii < numel (fmt_words)) - iwrdl = length (words{iwrd}); - endif + nxt_wrd = 1; endif endif + + if (nxt_wrd) + ++iwrd; iwrdp = 0; + if (ii < numel (fmt_words)) + iwrdl = length (words{iwrd}); + endif + endif + endfor ## Done words_period = max (iwrd - 1, 1); @@ -670,7 +668,7 @@ k++; case "s" if (pad_out) - data(end+1:num_lines) = {""} + data(end+1:num_lines) = {""}; endif varargout{k} = strtrunc (data, swidth)'; k++; diff --git a/scripts/plot/semilogx.m b/scripts/plot/semilogx.m --- a/scripts/plot/semilogx.m +++ b/scripts/plot/semilogx.m @@ -112,11 +112,11 @@ %!test %! hf = figure ("visible", "off"); %! unwind_protect -%! a = logspace (-5, 1, 10); -%! b =-logspace (-5, 1, 10); +%! a =-logspace (-5, 1, 10); +%! b = logspace (-5, 1, 10); %! semilogx (a, b); %! axis tight; -%! assert (all (get (gca, "ytick") < 0)); +%! assert (all (get (gca, "xtick") < 0)); %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect diff --git a/src/DLD-FUNCTIONS/oct-qhull.h b/src/DLD-FUNCTIONS/oct-qhull.h --- a/src/DLD-FUNCTIONS/oct-qhull.h +++ b/src/DLD-FUNCTIONS/oct-qhull.h @@ -27,7 +27,13 @@ extern "C" { -#if defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) +#if defined (HAVE_LIBQHULL_LIBQHULL_H) +# include +# include +# include +# include +# include +#elif defined (HAVE_QHULL_LIBQHULL_H) || defined (HAVE_QHULL_QHULL_H) # if defined (HAVE_QHULL_LIBQHULL_H) # include # else diff --git a/src/graphics.cc b/src/graphics.cc --- a/src/graphics.cc +++ b/src/graphics.cc @@ -5995,7 +5995,7 @@ ticks = tmp_ticks; - int n = is_logscale ? 9 : 4; + int n = is_logscale ? 8 : 4; Matrix tmp_mticks (1, n * (tmp_ticks.numel () - 1)); for (int i = 0; i < tmp_ticks.numel ()-1; i++) @@ -6632,8 +6632,11 @@ double max_neg_y = -octave_Inf; get_children_limits (miny, maxy, min_pos_y, max_neg_y, kids, 'y'); - xlims = do_zoom (x, factor, xlims, xscale_is ("log")); - ylims = do_zoom (y, factor, ylims, yscale_is ("log")); + if (! xscale_is ("log")) + xlims = do_zoom (x, factor, xlims, xscale_is ("log")); + + if (! yscale_is ("log")) + ylims = do_zoom (y, factor, ylims, yscale_is ("log")); zoom (xlims, ylims, push_to_zoom_stack); }