Hello community, here is the log from the commit of package gnuplot for openSUSE:Factory checked in at 2018-07-06 10:43:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gnuplot (Old) and /work/SRC/openSUSE:Factory/.gnuplot.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gnuplot" Fri Jul 6 10:43:07 2018 rev:69 rq:620919 version:5.2.4 Changes: -------- --- /work/SRC/openSUSE:Factory/gnuplot/gnuplot.changes 2018-05-07 14:54:01.181400577 +0200 +++ /work/SRC/openSUSE:Factory/.gnuplot.new/gnuplot.changes 2018-07-06 10:43:20.567158545 +0200 @@ -1,0 +2,14 @@ +Mon Jun 4 07:18:27 UTC 2018 - [email protected] + +- Update to gnuplot 5.2.4 + * NEW "call" parameters ARG1, ARG2, ... are also present as ARGV[1]...ARGV[ARGC] + * CHANGE generalize the test for missing data flag in input data + * CHANGE "set []range writeback" is now essentially always in effect + * CHANGE consistent placement of timestamp at true bottom of page + * FIX spurious evaluation of logscale coordinates as UNDEFINED + * FIX column header title assignments for histogram with errorbars + * FIX re-implement "refresh" command to use autoscale writeback/restore + * FIX font-handling bug; line-spacing of previous font still in effect + * FIX post, svg, dumb terminals: early fontsize initialization + +------------------------------------------------------------------- Old: ---- gnuplot-5.2.3.tar.gz New: ---- gnuplot-5.2.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gnuplot.spec ++++++ --- /var/tmp/diff_new_pack.j1cNyr/_old 2018-07-06 10:43:21.679157221 +0200 +++ /var/tmp/diff_new_pack.j1cNyr/_new 2018-07-06 10:43:21.683157217 +0200 @@ -77,7 +77,7 @@ BuildRequires: wxWidgets-devel >= 3 %endif Url: http://www.gnuplot.info/ -Version: 5.2.3 +Version: 5.2.4 Release: 0 Summary: Function Plotting Utility and more License: SUSE-Gnuplot and GPL-2.0+ ++++++ gnuplot-5.2.3.tar.gz -> gnuplot-5.2.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/ChangeLog new/gnuplot-5.2.4/ChangeLog --- old/gnuplot-5.2.3/ChangeLog 2018-04-21 01:23:00.000000000 +0200 +++ new/gnuplot-5.2.4/ChangeLog 2018-05-31 23:05:51.000000000 +0200 @@ -1,3 +1,106 @@ +2018-05-31 Ethan A Merritt <[email protected]> + + * src/axis.c (eval_link_function) src/eval.c src/internal.c: + Prevent spurious evaluation of logscale axis values as UNDEFINED. + Various abnormal conditions during evaluation of an action table are + signalled by setting undefined=TRUE. The code can check this flag + immediately after calling evaluate_at(). Routines map_x() and map_y() + improperly tested the flag after calling eval_link_function(), which + worked in the general case because eval_link_function itself calls + evaluate_at(). However the shortcut code to speed up logscale + transforms returns without calling evaluate_at() and thus did not + reset the undefined flag. Enabling this shortcut in 5.2.3 introduced + a regression where successive calls to map axis coordinates all + returned with the undefined flag incorrectly set to TRUE. + + Now we reset the undefined flag explicitly in eval_link_function() so + that it is valid to test it immediately after a call to either + eval_link_function() or evaluate_at(). + + Bug #2050 + +2018-05-30 Ethan A Merritt <[email protected]> + + * src/datafile.c: Use of "autotitle columnhead" with plot style + histogram errorbars requires taking the title from column 1 rather + than column 2. + +2018-05-22 Ethan A Merritt <[email protected]> + + * src/plot3d.c: refresh_3dbounds must check both head and tail of each + vector for OUTRANGE. + Bug #1948 + +2018-05-16 Miroslav Sulc <[email protected]> + + * src/misc.c: Support ARGC/ARGV parameter convention for "call". + I.e. string variables ARG1 ARG2 ... are also accessible as + ARGV[1] ARGV[2] ... ARGV[ARGC]. + +2018-05-09 Ethan A Merritt <[email protected]> + + * src/boundary.c src/graph3d.c: Consistent placement of timestamp at + true bottom of page. In 2D plots move the key box upwards if necessary + to clear the timestamp (earlier versions moved the timestamp up instead). + In 3D plots always place the timestamp at the true page bottom (this + reverts the placement that that used in version 5.0). + +2018-05-08 Ethan A Merritt <[email protected]> + + Various sanity checks and variable initializations added to prevent + crashes found by fuzzing. + + graph3d.c: revise MAP_HEIGHT macro to guarantee result is either 0 or 1 + eval.c: revise Gstring to never store a STRING value with a NULL pointer + dumb.trm: guard against text output to out-of-range character cells + post.trm: guard against fontsize ever being set to zero + +2018-05-05 Dima Kogan <[email protected]> + + * src/axis.h src/command.c src/plot2d.c src/plot3d.c: + + Rework the "refresh" command to use autoscaled axis writeback/restore. + This mechanism replaces AXIS_INIT2D_REFRESH and AXIS_UPDATE2D_REFRESH. + "set xrange writeback" is now essentially always in effect. + "set xrange restore" still works as before. + Fixes buggy refresh of logscale inline data. + Fixes buggy axis ranges on refresh of splot with volatile data + (volatile.dem now highlights the error if you run previous code). + + FIXME: The new method works by always setting the WRITEBACK axis range + flag during plot commands. Conceiveably some existing script depends on + a sequence of commands that includes "set xrange nowriteback" but I + do not know if there is a real-world example of that. + +2018-05-05 Ethan A Merritt <[email protected]> + + * src/datafile.c src/datafile.h: Skip evaluation of expressions in + a 'using" specifier that depend on a missing data value. The presence + of a "missing" flag in the input is easy to detect if it is encountered + in place of a bare number ('using N'), but if it is encountered while + evaluating an expression ('using (func($N))') then the function may + exit via int_error() before the missing value can be flagged for the + calling code. Now we pre-screen expressions in a using spec for the + presence of "$N" and note this dependence in a new field + use_spec->depends_on_column. During data input if that field is + non-zero the corresponding column can be checked for a missing value + flag before evaluating the expression. + Bug #2042 + +2018-05-05 Ethan A Merritt <[email protected]> + + * src/term.c term/post.trm: Move postscript-specific fix from + ignore_enhanced() into ENHPS_put_text(). + + Bug #266 (from 2005) noted that the postscript terminal left whatever + font was last used in an enhanced text string active afterwards. + The fix at the time was to force all non-enhanced strings to reset the + font by putting a call term->set_font("") in ignore_enhanced. + This had other side effects (Bug #2033) and was only ever useful for + postscript output, so move the font reset into the postscript terminal. + +2018-05-04 Release 5.2.3 + 2018-04-20 Ethan A Merritt <[email protected]> Bump version to 5.2.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/NEWS new/gnuplot-5.2.4/NEWS --- old/gnuplot-5.2.3/NEWS 2018-04-21 05:50:17.000000000 +0200 +++ new/gnuplot-5.2.4/NEWS 2018-05-31 19:48:18.000000000 +0200 @@ -1,3 +1,15 @@ +Changes in 5.2.4 +================ +* NEW "call" parameters ARG1, ARG2, ... are also present as ARGV[1]...ARGV[ARGC] +* CHANGE generalize the test for missing data flag in input data +* CHANGE "set []range writeback" is now essentially always in effect +* CHANGE consistent placement of timestamp at true bottom of page +* FIX spurious evaluation of logscale coordinates as UNDEFINED +* FIX column header title assignments for histogram with errorbars +* FIX re-implement "refresh" command to use autoscale writeback/restore +* FIX font-handling bug; line-spacing of previous font still in effect +* FIX post, svg, dumb terminals: early fontsize initialization + Changes in 5.2.3 ================ * NEW "set grid {no}vertical" adds grid lines in the xz and xz planes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/PATCHLEVEL new/gnuplot-5.2.4/PATCHLEVEL --- old/gnuplot-5.2.3/PATCHLEVEL 2018-03-27 21:03:40.000000000 +0200 +++ new/gnuplot-5.2.4/PATCHLEVEL 2018-05-31 19:58:40.000000000 +0200 @@ -1 +1 @@ -3 +4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/RELEASE_NOTES new/gnuplot-5.2.4/RELEASE_NOTES --- old/gnuplot-5.2.3/RELEASE_NOTES 2018-04-11 21:17:58.000000000 +0200 +++ new/gnuplot-5.2.4/RELEASE_NOTES 2018-05-31 21:25:43.000000000 +0200 @@ -1,18 +1,37 @@ - GNUPLOT Version 5.2.3 Release Notes + GNUPLOT Version 5.2.4 Release Notes =================================== -These release notes are for version 5.2 patchlevel 3 (5.2.3). -This release contains bug-fixes, a few changes back-ported from the -development version, and a few new features. +These release notes are for version 5.2 patchlevel 4 (5.2.4). + +This release contains +- a fix for a serious regression in 5.2.3 (spurious evaluation of logscale + coordinates as UNDEFINED) +- re-implementation of the "refresh" command to correct regressions in + 5.2.0 through 5.2.3 +- sanity checks for several invalid command sequences found by fuzzing +- several minor bug-fixes +- two recent minor changes back-ported from the development version Please see the ChangeLog file for a complete list of changes made during the course of development from 5.0 to 5.2. -Release Notes date: 11-Apr-2018 +Release Notes date: 31-May-2018 + +CHANGES IN 5.2.4 +================ +* NEW "call" parameters ARG1, ARG2, ... are also present as ARGV[1]...ARGV[ARGC] +* CHANGE generalize the test for missing data flag in input data +* CHANGE "set []range writeback" is now essentially always in effect +* CHANGE consistent placement of timestamp at true bottom of page +* FIX spurious evaluation of logscale coordinates as UNDEFINED +* FIX column header title assignments for histogram with errorbars +* FIX re-implement "refresh" command to use autoscale writeback/restore +* FIX font-handling bug; line-spacing of previous font still in effect +* FIX post, svg, dumb terminals: early fontsize initialization CHANGES IN 5.2.3 ================ -* NEW "set grid {no}vertical" adds grid lines in the xz and xz planes +* NEW "set grid {no}vertical" adds grid lines in the xz and yz planes * NEW "set cntrparam {firstlinetype N} {{un}sorted}" * CHANGE drop non-working support for YIQ color space * CHANGE expand \n characters when printing into a datablock @@ -324,7 +343,7 @@ 5.2.1, 5.2.2, etc., approximately twice a year or as needed to correct a serious problem. -Note: development has recently moved from cvs to git. Most of the files -in the 5.2.3 source distribution still contain a cvs version identifier +Note: development has recently moved from cvs to git. Many of the files +in the 5.2.4 source distribution still contain a cvs version identifier $RCSid and date, but these are not current if the file has been changed since the move to git. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/configure new/gnuplot-5.2.4/configure --- old/gnuplot-5.2.3/configure 2018-04-13 05:48:36.000000000 +0200 +++ new/gnuplot-5.2.4/configure 2018-06-01 03:51:14.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gnuplot 5.2.3. +# Generated by GNU Autoconf 2.69 for gnuplot 5.2.4. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='gnuplot' PACKAGE_TARNAME='gnuplot' -PACKAGE_VERSION='5.2.3' -PACKAGE_STRING='gnuplot 5.2.3' +PACKAGE_VERSION='5.2.4' +PACKAGE_STRING='gnuplot 5.2.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1418,7 +1418,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gnuplot 5.2.3 to adapt to many kinds of systems. +\`configure' configures gnuplot 5.2.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1488,7 +1488,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gnuplot 5.2.3:";; + short | recursive ) echo "Configuration of gnuplot 5.2.4:";; esac cat <<\_ACEOF @@ -1670,7 +1670,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gnuplot configure 5.2.3 +gnuplot configure 5.2.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2294,7 +2294,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gnuplot $as_me 5.2.3, which was +It was created by gnuplot $as_me 5.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3161,7 +3161,7 @@ # Define the identity of the package. PACKAGE='gnuplot' - VERSION='5.2.3' + VERSION='5.2.4' cat >>confdefs.h <<_ACEOF @@ -15870,7 +15870,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gnuplot $as_me 5.2.3, which was +This file was extended by gnuplot $as_me 5.2.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15936,7 +15936,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gnuplot config.status 5.2.3 +gnuplot config.status 5.2.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/configure.ac new/gnuplot-5.2.4/configure.ac --- old/gnuplot-5.2.3/configure.ac 2018-03-27 21:03:40.000000000 +0200 +++ new/gnuplot-5.2.4/configure.ac 2018-05-31 19:59:07.000000000 +0200 @@ -6,7 +6,7 @@ dnl this is actually major.minor ... dnl note that for a non-beta release, we need to disable DEVELOPMENT_RELEASE dnl -AC_INIT([gnuplot],[5.2.3]) +AC_INIT([gnuplot],[5.2.4]) AC_CONFIG_SRCDIR(src/graphics.c) AC_PREREQ([2.69]) AC_CONFIG_HEADERS(config.h:config.hin) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/demo/callargs.dem new/gnuplot-5.2.4/demo/callargs.dem --- old/gnuplot-5.2.3/demo/callargs.dem 2017-12-22 18:32:30.000000000 +0100 +++ new/gnuplot-5.2.4/demo/callargs.dem 2018-05-18 03:23:20.000000000 +0200 @@ -32,4 +32,5 @@ print "ARG6 (string variable) came through as ", ARG6 print " words(ARG6) = ", words(ARG6) print "ARG7 (expression) came through as ", ARG7 + if (exists("ARGV")) { print "ARGV = ", ARGV } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/docs/gnuplot.doc new/gnuplot-5.2.4/docs/gnuplot.doc --- old/gnuplot-5.2.3/docs/gnuplot.doc 2018-04-07 22:55:58.000000000 +0200 +++ new/gnuplot-5.2.4/docs/gnuplot.doc 2018-05-31 19:31:15.000000000 +0200 @@ -391,11 +391,12 @@ such as `set xrange [0:1]`. If you want to reverse the direction of the x axis in such a case, say instead `set xrange [1:0]`. - * The `call` command is implemented by providing a set of variables ARGC, - ARG0, ..., ARG9. ARG0 holds the name of the script file being executed. - ARG1 to ARG9 are string variables and thus may either be referenced directly - or expanded as macros, e.g. @ARG1. The older convention for referencing - call parameters as tokens $0 ... $9 is deprecated. + * The `call` command is provides a set of variables ARGC, ARG0, ..., ARG9. + ARG0 holds the name of the script file being executed. ARG1 to ARG9 are string + variables and thus may either be referenced directly or expanded as macros, + e.g. @ARG1. The contents of ARG0 ... ARG9 may alternatively be accessed as + array elements ARGV[0] ... ARGV[ARGC]. An older gnuplot convention of + referencing call parameters as tokens $0 ... $9 is deprecated. * The optional bandwidth for the kernel density smoothing option is taken from a keyword rather than a data column. See `smooth kdensity`. @@ -8686,13 +8687,13 @@ ^ <a href="http://www.gnuplot.info/demo/mgr.html"> imageNaN demo. ^ </a> - As of version 5.0.6 this is also true for the missing value flag. - Earlier versions failed to recognize the missing value flag if the plot - command specified `using ($N)` rather than `using N`. Note, however, that - even in current gnuplot using a "missing" value for computation will result - in NaN. I.e. a `missing` string in either columns 1 or 2 will cause - `using ($1+$2)` to evaluate as NaN. If you nevertheless want to treat this - as missing data, use the command `set datafile missing NaN`. + Similarly gnuplot now notices the missing value flag in column N whether + the plot command specifies `using N` or `using ($N)` or `using (func($N))`. + However if the "missing" value is encountered during evaluation of some more + complicated expression, e.g. `using (column(strcol(1))`, it may evaluate to + NaN and be treated as invalid data rather than as a missing data point. + If you nevertheless want to treat this as missing data, use the command + `set datafile missing NaN`. 4 set datafile separator ?set datafile separator ?show datafile separator Binary files old/gnuplot-5.2.3/docs/gnuplot.pdf and new/gnuplot-5.2.4/docs/gnuplot.pdf differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/docs/titlepag.tex new/gnuplot-5.2.4/docs/titlepag.tex --- old/gnuplot-5.2.3/docs/titlepag.tex 2018-02-23 01:27:28.000000000 +0100 +++ new/gnuplot-5.2.4/docs/titlepag.tex 2018-05-05 06:44:04.000000000 +0200 @@ -176,7 +176,7 @@ \vspace{2ex} % 31 May 2017 Version 5.2 - Version 5.2.2 (November 2017) + Version 5.2.3 (May 2018) \end{center} \newpage diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/axis.c new/gnuplot-5.2.4/src/axis.c --- old/gnuplot-5.2.3/src/axis.c 2018-04-07 23:42:47.000000000 +0200 +++ new/gnuplot-5.2.4/src/axis.c 2018-05-31 19:40:11.000000000 +0200 @@ -212,12 +212,12 @@ void -axis_init(AXIS *this_axis, TBOOLEAN infinite) +axis_init(AXIS *this_axis, TBOOLEAN reset_autoscale) { this_axis->autoscale = this_axis->set_autoscale; - this_axis->min = (infinite && (this_axis->set_autoscale & AUTOSCALE_MIN)) + this_axis->min = (reset_autoscale && (this_axis->set_autoscale & AUTOSCALE_MIN)) ? VERYLARGE : this_axis->set_min; - this_axis->max = (infinite && (this_axis->set_autoscale & AUTOSCALE_MAX)) + this_axis->max = (reset_autoscale && (this_axis->set_autoscale & AUTOSCALE_MAX)) ? -VERYLARGE : this_axis->set_max; this_axis->data_min = VERYLARGE; this_axis->data_max = -VERYLARGE; @@ -1763,9 +1763,10 @@ && (axis->datatype == DT_TIMEDATE) && isstringvalue(c_token)) { struct tm tm; double usec; - char *ss = try_to_get_string(); - if (gstrptime(ss, timefmt, &tm,&usec, &value) == DT_TIMEDATE) - value = (double) gtimegm(&tm) + usec; + char *ss; + if ((ss = try_to_get_string())) + if (gstrptime(ss, timefmt, &tm,&usec, &value) == DT_TIMEDATE) + value = (double) gtimegm(&tm) + usec; free(ss); } else { value = real_expression(); @@ -2482,6 +2483,12 @@ int dummy_var; struct value a; + /* A test for if (undefined) is allowed only immediately following + * either evalute_at() or eval_link_function(). Both must clear it + * on entry so that the value on return reflects what really happened. + */ + undefined = FALSE; + #if defined(NONLINEAR_AXES) && (NONLINEAR_AXES > 0) /* Special case to speed up evaluation of log scaling * benchmark timing results diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/axis.h new/gnuplot-5.2.4/src/axis.h --- old/gnuplot-5.2.3/src/axis.h 2018-01-25 22:47:34.000000000 +0100 +++ new/gnuplot-5.2.4/src/axis.h 2018-05-06 06:03:18.000000000 +0200 @@ -1,8 +1,3 @@ -/* - * $Id: axis.h,v 1.166.2.4 2017/09/29 19:02:17 sfeam Exp $ - * - */ - /*[ * Copyright 2000, 2004 Thomas Williams, Colin Kelley * @@ -408,7 +403,7 @@ #define axis_map(axis, variable) \ (int) ((axis)->term_lower + ((variable) - (axis)->min) * (axis)->term_scale + 0.5) #define axis_mapback(axis, pos) \ - (((double)(pos) - axis->term_lower)/axis->term_scale + axis->min) + (((double)(pos) - (axis)->term_lower)/(axis)->term_scale + (axis)->min) #if defined(NONLINEAR_AXES) && (NONLINEAR_AXES > 0) @@ -442,37 +437,6 @@ #endif /* (NONLINEAR_AXES > 0) */ -/* April 2015: I'm not 100% sure, but I believe there is no longer - * any need to treat 2D and 3D axis initialization differently - */ -#define AXIS_INIT3D(axis, islog_override, infinite) \ - axis_init((&axis_array[axis]), infinite) - -#define AXIS_INIT2D(axis, infinite) \ - axis_init((&axis_array[axis]), infinite) - -/* AXIS_INIT2D_REFRESH and AXIS_UPDATE2D_REFRESH(axis) are for volatile data */ -#define AXIS_INIT2D_REFRESH(axis, infinite) \ -do { \ - AXIS *this = axis_array + axis; \ - \ - this->autoscale = this->set_autoscale; \ - this->min = (infinite && (this->set_autoscale & AUTOSCALE_MIN)) \ - ? VERYLARGE : AXIS_LOG_VALUE(axis, this->set_min); \ - this->max = (infinite && (this->set_autoscale & AUTOSCALE_MAX)) \ - ? -VERYLARGE : AXIS_LOG_VALUE(axis, this->set_max); \ - this->log_base = this->log ? log(this->base) : 0; \ -} while(0) - -#define AXIS_UPDATE2D_REFRESH(axis) \ -do { \ - AXIS *this_axis = axis_array + axis; \ - if ((this_axis->set_autoscale & AUTOSCALE_MIN) == 0) \ - this_axis->min = AXIS_LOG_VALUE(axis, this_axis->set_min); \ - if ((this_axis->set_autoscale & AUTOSCALE_MAX) == 0) \ - this_axis->max = AXIS_LOG_VALUE(axis, this_axis->set_max); \ -} while (0) - /* Simplest form of autoscaling (no check on autoscale constraints). * Used by refresh_bounds() and refresh_3dbounds(). */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/boundary.c new/gnuplot-5.2.4/src/boundary.c --- old/gnuplot-5.2.3/src/boundary.c 2017-12-22 18:32:48.000000000 +0100 +++ new/gnuplot-5.2.4/src/boundary.c 2018-05-09 23:34:01.000000000 +0200 @@ -231,9 +231,12 @@ if (vertical_timelabel) { timelabel_textheight = timelabel_textwidth * t->v_char; timelabel_textwidth = (timelin + 1.5) * t->h_char; + timelabel.place.y = 0; } else { timelabel_textheight = timelin * t->v_char; timelabel_textwidth = timelabel_textwidth * t->h_char; + /* save textheight for use in do_key_bounds() */ + timelabel.place.y = timelabel_textheight; } } @@ -852,6 +855,8 @@ } else if (key->margin == GPKEY_BMARGIN) { /* align bottom first since bmargin may be manual */ key->bounds.ybot = yoffset * t->ymax + t->v_tic; + if (timelabel.rotate == 0 && timelabel_bottom && timelabel.place.y > 0) + key->bounds.ybot += (int)(timelabel.place.y); key->bounds.ytop = key->bounds.ybot + key_height; } else { if (key->vpos == JUST_TOP) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/command.c new/gnuplot-5.2.4/src/command.c --- old/gnuplot-5.2.3/src/command.c 2018-04-07 23:41:21.000000000 +0200 +++ new/gnuplot-5.2.4/src/command.c 2018-05-06 06:03:18.000000000 +0200 @@ -2027,7 +2027,7 @@ void refresh_request() { - FPRINTF((stderr,"refresh_request\n")); + AXIS_INDEX axis; if ( ((first_plot == NULL) && (refresh_ok == E_REFRESH_OK_2D)) || ((first_3dplot == NULL) && (refresh_ok == E_REFRESH_OK_3D)) @@ -2041,30 +2041,24 @@ return; } - /* If the state has been reset to autoscale since the last plot, - * initialize the axis limits. + /* Restore the axis range/scaling state from original plot + * Dima Kogan April 2018 */ - AXIS_INIT2D_REFRESH(FIRST_X_AXIS,TRUE); - AXIS_INIT2D_REFRESH(FIRST_Y_AXIS,TRUE); - AXIS_INIT2D_REFRESH(SECOND_X_AXIS,TRUE); - AXIS_INIT2D_REFRESH(SECOND_Y_AXIS,TRUE); - - AXIS_UPDATE2D_REFRESH(T_AXIS); /* Untested: T and R want INIT2D or UPDATE2D?? */ - AXIS_UPDATE2D_REFRESH(POLAR_AXIS); - - AXIS_UPDATE2D_REFRESH(FIRST_Z_AXIS); - AXIS_UPDATE2D_REFRESH(COLOR_AXIS); - - /* Nonlinear mapping of x or y via linkage to a hidden primary axis */ - if (nonlinear(&axis_array[FIRST_X_AXIS])) { - AXIS *primary = axis_array[FIRST_X_AXIS].linked_to_primary; - primary->min = primary->set_min; - primary->max = primary->set_max; - } - if (nonlinear(&axis_array[FIRST_Y_AXIS])) { - AXIS *primary = axis_array[FIRST_Y_AXIS].linked_to_primary; - primary->min = primary->set_min; - primary->max = primary->set_max; + for (axis = 0; axis < NUMBER_OF_MAIN_VISIBLE_AXES; axis++) { + AXIS *this_axis = &axis_array[axis]; + if (this_axis->set_autoscale & AUTOSCALE_MIN) + this_axis->set_min = this_axis->writeback_min; + else + this_axis->min = this_axis->set_min; + if (this_axis->set_autoscale & AUTOSCALE_MAX) + this_axis->set_max = this_axis->writeback_max; + else + this_axis->max = this_axis->set_max; + + if (this_axis->linked_to_secondary) + clone_linked_axes(this_axis, this_axis->linked_to_secondary); + else if (this_axis->linked_to_primary) + clone_linked_axes(this_axis, this_axis->linked_to_primary); } if (refresh_ok == E_REFRESH_OK_2D) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/datafile.c new/gnuplot-5.2.4/src/datafile.c --- old/gnuplot-5.2.3/src/datafile.c 2018-04-07 23:42:24.000000000 +0200 +++ new/gnuplot-5.2.4/src/datafile.c 2018-05-31 19:34:38.000000000 +0200 @@ -998,6 +998,7 @@ free_at(use_spec[i].at); use_spec[i].at = NULL; /* no expression */ } + use_spec[i].depends_on_column = -1; /* we don't know of any dependence */ df_axis[i] = NO_AXIS; /* no timefmt for this output column */ } } @@ -1272,6 +1273,8 @@ if ((&keyT)->auto_titles == COLUMNHEAD_KEYTITLES) { if (df_no_use_specs == 1) column_for_key_title = use_spec[0].column; + else if (plot && plot->plot_style == HISTOGRAMS) + column_for_key_title = use_spec[0].column; else if (plot && plot->plot_type == DATA3D) column_for_key_title = use_spec[2].column; else @@ -1653,15 +1656,29 @@ /* do not increment c+token ; let while() find the : */ } else if (equals(c_token, "(")) { + int i; + struct use_spec_s *spec = &use_spec[df_no_use_specs]; + fast_columns = 0; /* corey@cac */ dummy_func = NULL; /* no dummy variables active */ - /* this will match ()'s: */ at_highest_column_used = NO_COLUMN_HEADER; - use_spec[df_no_use_specs].at = perm_at(); + + spec->at = perm_at(); if (no_cols < at_highest_column_used) no_cols = at_highest_column_used; + + /* Try to detect dependence on a particular column so that + * if it contains a "missing value" placeholder we can skip + * evaluation altogether. + */ + for (i = 0; i < spec->at->a_count; i++) { + if (spec->at->actions[i].index == DOLLARS) + spec->depends_on_column = (int)spec->at->actions[i].arg.v_arg.v.int_val; + } + /* Catch at least the simplest case of 'autotitle columnhead' using an expression */ - use_spec[df_no_use_specs++].column = at_highest_column_used; + spec->column = at_highest_column_used; + df_no_use_specs++; /* It would be nice to handle these like any other */ /* internal function via perm_at() but it doesn't work. */ @@ -2136,15 +2153,30 @@ if (use_spec[output].at) { struct value a; TBOOLEAN timefield = FALSE; - /* no dummy values to set up prior to... */ + + /* Don't try to evaluate an expression that depends on a + * data field value that is missing. + */ + if (use_spec[output].depends_on_column > 0) { + if ((use_spec[output].depends_on_column > df_no_cols) + || df_column[use_spec[output].depends_on_column-1].good == DF_MISSING) { + FPRINTF((stderr, + "df_readascii: skipping evaluation that uses missing value in $%d\n", + use_spec[output].depends_on_column)); + v[output] = not_a_number(); + return_value = DF_MISSING; + continue; + } + } + a.type = NOTDEFINED; evaluate_inside_using = TRUE; evaluate_at(use_spec[output].at, &a); evaluate_inside_using = FALSE; - /* If column N contains the "missing" flag and is referenced by */ - /* using N then we caught it already. Here we are checking for */ - /* indirect references like using ($N) or using "header_of_N". */ - /* It does not catch deeper evaluations like using (2*f($N)). */ + /* If column N contains the "missing" flag and is referenced by + * 'using N' or 'using (func($N)) then we caught it already. + * Here we check for indirect references like 'using "header_of_N"'. + */ if ((a.type == CMPLX) && isnan(a.v.cmplx_val.real) && (a.v.cmplx_val.imag == DF_MISSING)) { return_value = DF_MISSING; @@ -2956,6 +2988,8 @@ } if (df_no_use_specs == 1) column_for_key_title = use_spec[0].column; + else if (plot->plot_style == HISTOGRAMS) + column_for_key_title = use_spec[0].column; else if (plot->plot_type == DATA3D) column_for_key_title = use_spec[2].column; else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/datafile.h new/gnuplot-5.2.4/src/datafile.h --- old/gnuplot-5.2.3/src/datafile.h 2017-12-22 18:32:48.000000000 +0100 +++ new/gnuplot-5.2.4/src/datafile.h 2018-05-06 05:59:44.000000000 +0200 @@ -1,7 +1,3 @@ -/* - * $Id: datafile.h,v 1.52 2016/08/19 16:51:58 sfeam Exp $ - */ - /* GNUPLOT - datafile.h */ /*[ @@ -162,6 +158,7 @@ int column; int expected_type; struct at_type *at; + int depends_on_column; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/eval.c new/gnuplot-5.2.4/src/eval.c --- old/gnuplot-5.2.3/src/eval.c 2017-12-22 18:32:48.000000000 +0100 +++ new/gnuplot-5.2.4/src/eval.c 2018-05-31 19:42:14.000000000 +0200 @@ -1,7 +1,3 @@ -#ifndef lint -static char *RCSid() { return RCSid("$Id: eval.c,v 1.146 2017/05/05 06:09:32 sfeam Exp $"); } -#endif - /* GNUPLOT - eval.c */ /*[ @@ -68,6 +64,12 @@ /* pointer to first udv users can delete */ struct udvt_entry **udv_user_head; +/* Various abnormal conditions during evaluation of an action table + * (the stored form of an expression) are signalled by setting + * undefined = TRUE. + * NB: A test for "if (undefined)" is only valid immediately + * following a call to evaluate_at() or eval_link_function(). + */ TBOOLEAN undefined; /* The stack this operates on */ @@ -405,7 +407,7 @@ Gstring(struct value *a, char *s) { a->type = STRING; - a->v.string_val = s; + a->v.string_val = s ? s : strdup(""); return (a); } @@ -687,7 +689,12 @@ void evaluate_at(struct at_type *at_ptr, struct value *val_ptr) { + /* A test for if (undefined) is allowed only immediately following + * evalute_at() or eval_link_function(). Both must clear it on entry + * so that the value on return reflects what really happened. + */ undefined = FALSE; + errno = 0; reset_stack(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/graph3d.c new/gnuplot-5.2.4/src/graph3d.c --- old/gnuplot-5.2.3/src/graph3d.c 2018-04-07 23:42:31.000000000 +0200 +++ new/gnuplot-5.2.4/src/graph3d.c 2018-05-09 23:34:01.000000000 +0200 @@ -856,7 +856,9 @@ if (timelabel.text) { unsigned int x, y; x = t->v_char; - y = timelabel_bottom ? page_bounds.ybot : page_bounds.ytop; + y = timelabel_bottom + ? yoffset * Y_AXIS.max + t->v_char + : plot_bounds.ytop - t->v_char; do_timelabel(x,y); } @@ -2049,8 +2051,8 @@ /* map xmin | xmax to 0 | 1 and same for y * 0.1 avoids any rounding errors */ -#define MAP_HEIGHT_X(x) ( (int) (((x)-X_AXIS.min)/(X_AXIS.max-X_AXIS.min)+0.1) ) -#define MAP_HEIGHT_Y(y) ( (int) (((y)-Y_AXIS.min)/(Y_AXIS.max-Y_AXIS.min)+0.1) ) +#define MAP_HEIGHT_X(x) ( ((x)-X_AXIS.min)/(X_AXIS.max-X_AXIS.min) > 0.9 ? 1 : 0 ) +#define MAP_HEIGHT_Y(y) ( ((y)-Y_AXIS.min)/(Y_AXIS.max-Y_AXIS.min) > 0.9 ? 1 : 0 ) /* if point is at corner, update height[][] and depth[][] * we are still assuming that extremes of surfaces are at corners, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/internal.c new/gnuplot-5.2.4/src/internal.c --- old/gnuplot-5.2.3/src/internal.c 2018-04-07 23:42:40.000000000 +0200 +++ new/gnuplot-5.2.4/src/internal.c 2018-05-31 20:53:35.000000000 +0200 @@ -79,6 +79,7 @@ eval_reset_after_error() { recursion_depth = 0; + undefined = FALSE; } void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/misc.c new/gnuplot-5.2.4/src/misc.c --- old/gnuplot-5.2.3/src/misc.c 2018-04-07 23:41:37.000000000 +0200 +++ new/gnuplot-5.2.4/src/misc.c 2018-05-18 05:23:00.000000000 +0200 @@ -141,7 +141,10 @@ prepare_call(int calltype) { struct udvt_entry *udv; + struct value *ARGV; int argindex; + int argv_size; + if (calltype == 2) { call_argc = 0; while (!END_OF_COMMAND && call_argc <= 9) { @@ -204,14 +207,29 @@ /* FIXME: If we defined these on entry, we could use get_udv* here */ udv = add_udv_by_name("ARGC"); Ginteger(&(udv->udv_value), call_argc); + udv = add_udv_by_name("ARG0"); gpfree_string(&(udv->udv_value)); Gstring(&(udv->udv_value), gp_strdup(lf_head->name)); + + udv = add_udv_by_name("ARGV"); + gpfree_array(&(udv->udv_value)); + gpfree_string(&(udv->udv_value)); + + argv_size = GPMIN(call_argc, 9); + udv->udv_value.type = ARRAY; + ARGV = udv->udv_value.v.value_array = gp_alloc((argv_size + 1) * sizeof(t_value), "array_command"); + ARGV[0].v.int_val = argv_size; + for (argindex = 1; argindex <= 9; argindex++) { - char *arg = gp_strdup(call_args[argindex-1]); + char *arg = call_args[argindex-1]; + udv = add_udv_by_name(argname[argindex]); gpfree_string(&(udv->udv_value)); - Gstring(&(udv->udv_value), arg ? arg : gp_strdup("")); + Gstring(&(udv->udv_value), arg ? gp_strdup(arg) : gp_strdup("")); + + if (argindex <= argv_size) + Gstring(&ARGV[argindex], arg ? gp_strdup(arg) : gp_strdup("")); } } @@ -449,11 +467,13 @@ if ((udv = get_udv_by_name("ARGC"))) { Ginteger(&(udv->udv_value), call_argc); } + if ((udv = get_udv_by_name("ARG0"))) { gpfree_string(&(udv->udv_value)); Gstring(&(udv->udv_value), (lf->prev && lf->prev->name) ? gp_strdup(lf->prev->name) : gp_strdup("")); } + for (argindex = 1; argindex <= 9; argindex++) { if ((udv = get_udv_by_name(argname[argindex]))) { gpfree_string(&(udv->udv_value)); @@ -463,6 +483,24 @@ Gstring(&(udv->udv_value), gp_strdup(call_args[argindex-1])); } } + + if ((udv = get_udv_by_name("ARGV")) && udv->udv_value.type == ARRAY) { + struct value *ARGV; + int argv_size = GPMIN(call_argc, 9); + + gpfree_array(&(udv->udv_value)); + udv->udv_value.type = ARRAY; + ARGV = udv->udv_value.v.value_array = gp_alloc((argv_size + 1) * sizeof(t_value), "array_command"); + ARGV[0].v.int_val = argv_size; + + for (argindex = 1; argindex <= argv_size; argindex++) { + if (!call_args[argindex - 1]) + ARGV[argindex].type = NOTDEFINED; + else + Gstring(&ARGV[argindex], gp_strdup(call_args[argindex-1])); + } + } + } interactive = lf->interactive; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/plot2d.c new/gnuplot-5.2.4/src/plot2d.c --- old/gnuplot-5.2.3/src/plot2d.c 2018-04-21 01:28:52.000000000 +0200 +++ new/gnuplot-5.2.4/src/plot2d.c 2018-05-06 06:03:18.000000000 +0200 @@ -225,17 +225,26 @@ if (parametric && strcmp(set_dummy_var[0], "u") == 0) strcpy(set_dummy_var[0], "t"); - /* initialise the arrays from the 'set' scalars */ - - AXIS_INIT2D(FIRST_X_AXIS, 0); - AXIS_INIT2D(FIRST_Y_AXIS, 1); - AXIS_INIT2D(SECOND_X_AXIS, 0); - AXIS_INIT2D(SECOND_Y_AXIS, 1); - AXIS_INIT2D(T_AXIS, 0); - AXIS_INIT2D(U_AXIS, 0); - AXIS_INIT2D(V_AXIS, 0); - AXIS_INIT2D(POLAR_AXIS, 1); - AXIS_INIT2D(COLOR_AXIS, 1); + /* initialize the arrays from the 'set' scalars */ + axis_init(&axis_array[FIRST_X_AXIS], FALSE); + axis_init(&axis_array[FIRST_Y_AXIS], TRUE); + axis_init(&axis_array[SECOND_X_AXIS], FALSE); + axis_init(&axis_array[SECOND_Y_AXIS], TRUE); + axis_init(&axis_array[T_AXIS], FALSE); + axis_init(&axis_array[U_AXIS], FALSE); + axis_init(&axis_array[V_AXIS], FALSE); + axis_init(&axis_array[POLAR_AXIS], TRUE); + axis_init(&axis_array[COLOR_AXIS], TRUE); + + /* Always be prepared to restore the autoscaled values on "refresh" + * Dima Kogan April 2018 + * FIXME: Could we fold this into axis_init? + */ + for (axis = 0; axis < NUMBER_OF_MAIN_VISIBLE_AXES; axis++) { + AXIS *this_axis = &axis_array[axis]; + if (this_axis->set_autoscale != AUTOSCALE_NONE) + this_axis->range_flags |= RANGE_WRITEBACK; + } #ifdef NONLINEAR_AXES /* Nonlinear mapping of x or y via linkage to a hidden primary axis. */ @@ -317,19 +326,6 @@ continue; } - /* FIXME: I don't think this test does what the comment says. */ - /* - * If the state has been set to autoscale since the last plot, - * mark everything INRANGE and re-evaluate the axis limits now. - * Otherwise test INRANGE/OUTRANGE against previous data limits. - */ - if (!this_plot->noautoscale) { - if (x_axis->set_autoscale & AUTOSCALE_MIN && x_axis->data_min < x_axis->min) - x_axis->min = axis_log_value(x_axis, x_axis->data_min); - if (x_axis->set_autoscale & AUTOSCALE_MAX && x_axis->data_max > x_axis->max) - x_axis->max = axis_log_value(x_axis, x_axis->data_max); - } - for (i=0; i<this_plot->p_count; i++) { struct coordinate GPHUGE *point = &this_plot->points[i]; @@ -3337,6 +3333,7 @@ if (axis_array[FIRST_X_AXIS].max == -VERYLARGE || axis_array[FIRST_X_AXIS].min == VERYLARGE) int_error(NO_CARET, "all points undefined!"); + axis_revert_and_unlog_range(FIRST_X_AXIS); } else { assert(uses_axis[SECOND_X_AXIS]); } @@ -3344,11 +3341,10 @@ if (axis_array[SECOND_X_AXIS].max == -VERYLARGE || axis_array[SECOND_X_AXIS].min == VERYLARGE) int_error(NO_CARET, "all points undefined!"); + axis_revert_and_unlog_range(SECOND_X_AXIS); } else { assert(uses_axis[FIRST_X_AXIS]); } - axis_revert_and_unlog_range(FIRST_X_AXIS); - axis_revert_and_unlog_range(SECOND_X_AXIS); /* For nonlinear axes, but must also be compatible with "set link x". */ /* min/max values were tracked during input for the visible axes. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/plot3d.c new/gnuplot-5.2.4/src/plot3d.c --- old/gnuplot-5.2.3/src/plot3d.c 2018-04-07 23:42:02.000000000 +0200 +++ new/gnuplot-5.2.4/src/plot3d.c 2018-05-23 03:31:45.000000000 +0200 @@ -240,13 +240,23 @@ strcpy(set_dummy_var[1], "v"); } - /* put stuff into arrays to simplify access */ - AXIS_INIT3D(FIRST_X_AXIS, 0, 0); - AXIS_INIT3D(FIRST_Y_AXIS, 0, 0); - AXIS_INIT3D(FIRST_Z_AXIS, 0, 1); - AXIS_INIT3D(U_AXIS, 1, 0); - AXIS_INIT3D(V_AXIS, 1, 0); - AXIS_INIT3D(COLOR_AXIS, 0, 1); + /* initialize the arrays from the 'set' scalars */ + axis_init(&axis_array[FIRST_X_AXIS], FALSE); + axis_init(&axis_array[FIRST_Y_AXIS], FALSE); + axis_init(&axis_array[FIRST_Z_AXIS], TRUE); + axis_init(&axis_array[U_AXIS], FALSE); + axis_init(&axis_array[V_AXIS], FALSE); + axis_init(&axis_array[COLOR_AXIS], TRUE); + + /* Always be prepared to restore the autoscaled values on "refresh" + * Dima Kogan April 2018 + * FIXME: Could we fold this into axis_init? + */ + for (axis = 0; axis < NUMBER_OF_MAIN_VISIBLE_AXES; axis++) { + AXIS *this_axis = &axis_array[axis]; + if (this_axis->set_autoscale != AUTOSCALE_NONE) + this_axis->range_flags |= RANGE_WRITEBACK; + } #ifdef NONLINEAR_AXES /* Nonlinear mapping of x or y via linkage to a hidden primary axis. */ @@ -347,44 +357,55 @@ continue; } - for ( this_curve = this_plot->iso_crvs; this_curve; this_curve = this_curve->next) { + for (this_curve = this_plot->iso_crvs; this_curve; this_curve = this_curve->next) { - for (i=0; i<this_curve->p_count; i++) { - struct coordinate GPHUGE *point = &this_curve->points[i]; - - if (point->type == UNDEFINED) - continue; + /* VECTOR plots consume two iso_crvs structures, one for heads and one for tails. + * Only the first one has the true point count; the second one claims zero. + * FIXME: Maybe we should change this? + */ + int n_points; + if (this_plot->plot_style == VECTOR) + n_points = this_plot->iso_crvs->p_count; else - point->type = INRANGE; + n_points = this_curve->p_count; - /* If the state has been set to autoscale since the last plot, - * mark everything INRANGE and re-evaluate the axis limits now. - * Otherwise test INRANGE/OUTRANGE against previous axis limits. - */ + for (i=0; i<n_points; i++) { + struct coordinate *point = &this_curve->points[i]; - /* This autoscaling logic is parallel to that in - * refresh_bounds() in plot2d.c - */ - if (!this_plot->noautoscale) { - autoscale_one_point(x_axis, point->x); - autoscale_one_point(y_axis, point->y); - } - if (!inrange(point->x, x_axis->min, x_axis->max) - || !inrange(point->y, y_axis->min, y_axis->max)) { - point->type = OUTRANGE; - continue; - } - if (!this_plot->noautoscale) { - autoscale_one_point(z_axis, point->z); - } - if (!inrange(point->z, z_axis->min, z_axis->max)) { - point->type = OUTRANGE; - continue; - } - } /* End of this curve */ - } + if (point->type == UNDEFINED) + continue; + else + point->type = INRANGE; + + /* If the state has been set to autoscale since the last plot, + * mark everything INRANGE and re-evaluate the axis limits now. + * Otherwise test INRANGE/OUTRANGE against previous axis limits. + */ + + /* This autoscaling logic is parallel to that in + * refresh_bounds() in plot2d.c + */ + if (!this_plot->noautoscale) { + autoscale_one_point(x_axis, point->x); + autoscale_one_point(y_axis, point->y); + } + if (!inrange(point->x, x_axis->min, x_axis->max) + || !inrange(point->y, y_axis->min, y_axis->max)) { + point->type = OUTRANGE; + continue; + } + if (!this_plot->noautoscale) { + autoscale_one_point(z_axis, point->z); + } + if (!inrange(point->z, z_axis->min, z_axis->max)) { + point->type = OUTRANGE; + continue; + } + + } /* End of points in this curve */ + } /* End of curves in this plot */ - } /* End of this plot */ + } /* End of plots in this splot command */ /* handle 'reverse' ranges */ axis_revert_range(FIRST_X_AXIS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/save.c new/gnuplot-5.2.4/src/save.c --- old/gnuplot-5.2.3/src/save.c 2018-04-07 23:42:10.000000000 +0200 +++ new/gnuplot-5.2.4/src/save.c 2018-05-21 19:27:32.000000000 +0200 @@ -134,10 +134,11 @@ while (udv) { if (udv->udv_value.type != NOTDEFINED) { - if (udv->udv_value.type == ARRAY) { - fprintf(fp,"array %s[%d] = ", udv->udv_name, + if ((udv->udv_value.type == ARRAY) + && strncmp(udv->udv_name,"ARGV",4)) { + fprintf(fp,"array %s[%d] = ", udv->udv_name, udv->udv_value.v.value_array[0].v.int_val); - save_array_content(fp, udv->udv_value.v.value_array); + save_array_content(fp, udv->udv_value.v.value_array); } else if (strncmp(udv->udv_name,"GPVAL_",6) && strncmp(udv->udv_name,"GPFUN_",6) && strncmp(udv->udv_name,"MOUSE_",6) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/set.c new/gnuplot-5.2.4/src/set.c --- old/gnuplot-5.2.3/src/set.c 2018-04-07 23:42:43.000000000 +0200 +++ new/gnuplot-5.2.4/src/set.c 2018-05-10 23:31:06.000000000 +0200 @@ -2127,6 +2127,7 @@ c_token++; set_hidden3doptions(); hidden3d = TRUE; + SET_REFRESH_OK(E_REFRESH_NOT_OK,0); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/stats.c new/gnuplot-5.2.4/src/stats.c --- old/gnuplot-5.2.3/src/stats.c 2017-12-22 18:32:48.000000000 +0100 +++ new/gnuplot-5.2.4/src/stats.c 2018-05-06 06:01:51.000000000 +0200 @@ -1,7 +1,3 @@ -#ifndef lint -static char *RCSid() { return RCSid("$Id: stats.c,v 1.32 2016/09/06 19:42:57 sfeam Exp $"); } -#endif - /* GNUPLOT - stats.c */ /* @@ -768,8 +764,8 @@ c_token++; /* Parse ranges */ - AXIS_INIT2D(FIRST_X_AXIS, 0); - AXIS_INIT2D(FIRST_Y_AXIS, 0); + axis_init(&axis_array[FIRST_X_AXIS], FALSE); + axis_init(&axis_array[FIRST_Y_AXIS], FALSE); parse_range(FIRST_X_AXIS); parse_range(FIRST_Y_AXIS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/term.c new/gnuplot-5.2.4/src/term.c --- old/gnuplot-5.2.3/src/term.c 2018-04-11 21:15:45.000000000 +0200 +++ new/gnuplot-5.2.4/src/term.c 2018-05-05 07:38:56.000000000 +0200 @@ -2641,11 +2641,17 @@ void ignore_enhanced(TBOOLEAN flag) { - /* Force a return to the default font */ +#if (0) + /* Apr 2018: This code was introduced long ago (2005; Bug #266) to address + * a glitch in the postscript terminal that left the last-used font in + * an enhanced text string active afterwards. + * We now deal with this in ENHPS_put_text() instead. + */ if (flag && !ignore_enhanced_text) { ignore_enhanced_text = TRUE; term->set_font(""); } +#endif ignore_enhanced_text = flag; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/src/version.c new/gnuplot-5.2.4/src/version.c --- old/gnuplot-5.2.3/src/version.c 2018-05-04 20:52:49.000000000 +0200 +++ new/gnuplot-5.2.4/src/version.c 2018-05-31 19:59:44.000000000 +0200 @@ -36,11 +36,11 @@ const char gnuplot_version[] = "5.2"; -const char gnuplot_patchlevel[] = "3"; +const char gnuplot_patchlevel[] = "4"; #ifdef DEVELOPMENT_VERSION #include "timestamp.h" #else -const char gnuplot_date[] = "2018-05-04 "; +const char gnuplot_date[] = "2018-06-01 "; #endif const char gnuplot_copyright[] = "Copyright (C) 1986-1993, 1998, 2004, 2007-2018"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/term/dumb.trm new/gnuplot-5.2.4/term/dumb.trm --- old/gnuplot-5.2.3/term/dumb.trm 2017-12-22 18:32:48.000000000 +0100 +++ new/gnuplot-5.2.4/term/dumb.trm 2018-05-09 04:57:30.000000000 +0200 @@ -1,8 +1,3 @@ -/* Hello, Emacs, this is -*-C-*- - * $Id: dumb.trm,v 1.38.2.3 2017/06/26 15:32:48 sfeam Exp $ - * - */ - /* GNUPLOT - dumb.trm */ /*[ @@ -623,7 +618,7 @@ { int i, length; - if ((unsigned int) y > dumb_ymax) + if (y > dumb_ymax) return; length = gp_strlen(str); @@ -631,7 +626,7 @@ x = GPMAX(0, dumb_xmax - length); #ifdef DUMB_UTF8 - for (i = 0; i < length; i++, x++) { + for (i = 0; i < length && x < dumb_xmax; i++, x++) { utf8_copy_one( (char *)(&DUMB_PIXEL(x, y)), gp_strchrn(str,i)); #ifndef NO_DUMB_COLOR_SUPPORT memcpy(&dumb_colors[dumb_xmax * y + x], &dumb_color, sizeof(t_colorspec)); @@ -749,7 +744,7 @@ /* print the string fragment, perhaps invisibly */ /* NB: base expresses offset from current y pos */ - if (ENHdumb_show) { + if (ENHdumb_show && y < dumb_ymax) { #ifdef DUMB_UTF8 for (i = 0; i < len && x < dumb_xmax; i++, x++) { utf8_copy_one( (char *)(&DUMB_PIXEL(x, y)), gp_strchrn(str,i)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/term/post.trm new/gnuplot-5.2.4/term/post.trm --- old/gnuplot-5.2.3/term/post.trm 2018-05-04 20:46:45.000000000 +0200 +++ new/gnuplot-5.2.4/term/post.trm 2018-05-09 04:44:01.000000000 +0200 @@ -1167,6 +1167,8 @@ set_fontsize = TRUE; /* We have font size specified */ ps_params->fontsize = real_expression(); + if (ps_params->fontsize <= 0) + ps_params->fontsize = 14; } break; } @@ -2830,6 +2832,14 @@ fputs("grestore\n", gppsfile); ps_path_count = 0; PS_relative_ok = FALSE; + + /* Apr 2018: Unlike other terminals, this leaves the last-used font + * in the enhanced text string active. For a long time we dealt with + * this by calling term->set_font("") in ignore_enhanced(), but that + * introduces other side effects and has no benefit (I think!) for + * other terminals. Try doing it here instead. + */ + PS_set_font(""); } static void diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gnuplot-5.2.3/term/pstricks.trm new/gnuplot-5.2.4/term/pstricks.trm --- old/gnuplot-5.2.3/term/pstricks.trm 2017-12-22 18:32:48.000000000 +0100 +++ new/gnuplot-5.2.4/term/pstricks.trm 2018-05-30 20:47:10.000000000 +0200 @@ -126,7 +126,7 @@ #define PSTRICKS_SHORTER_FILE 1 #ifdef PSTRICKS_SHORTER_FILE -static int PSTRICKS_color = 0; +static int PSTRICKS_color; #else static char PSTRICKS_color_str[16] = ""; #endif @@ -281,6 +281,11 @@ (xoffset + xsize), (yoffset + ysize) ); +#ifdef PSTRICKS_SHORTER_FILE + PSTRICKS_color = -1; +#else + PSTRICKS_color_str[0] = 0; +#endif } @@ -634,10 +639,16 @@ int i; #ifdef PSTRICKS_SHORTER_FILE - /* using a macro for an abbreviation */ - fprintf(gpoutfile, "\\polypmIIId{%d}", PSTRICKS_color); + if (PSTRICKS_color != -1) { + /* using a macro for an abbreviation */ + fprintf(gpoutfile, "\\polypmIIId{%d}", PSTRICKS_color); + } else { + /* no palette color set; use black to fill */ + fputs("\\pspolygon[linestyle=none,fillstyle=solid,fillcolor=black]", gpoutfile); + } #else - fprintf(gpoutfile, "\\pspolygon[linestyle=none,fillstyle=solid,fillcolor=%s]", PSTRICKS_color_str); + fprintf(gpoutfile, "\\pspolygon[linestyle=none,fillstyle=solid,fillcolor=%s]", + PSTRICKS_color_str[0] ? PSTRICKS_color_str : "black"); #endif for (i=0; i < points; i++) { if (i % 8 == 7) /* up to 8 corners per line */
