2019-04-25  Ethan A Merritt  <merritt@u.washington.edu>

	* src/boundary.c: Revise space allocated for ylabel
	Version 5.2 attempted to use estimated character length of the ylabel
	to decide the amount of space reserved to the left of the plot.
	This caused multiple problems, exacerbated by the lack of options to
	change the text justification.  The worst case was a non-rotated label
	with TeX markup that was misinterpreted as printable text (Bug #2165).
	These problems also applied to space on the right allocated for y2label.
	Fixes:
	 - use a fixed estimate of 3 character widths for nonrotated ylabel.
	   The user can adjust the for longer labels using a combination of
	   'set lmargin' and 'set ylabel offset delta_x'
	 - parse and apply test justification left/right/center for ylabel
	   The default remains center.
	This returns the overall behavior to close to that of gnuplot 5.0
	except that honoring left/right justification of ylabel text is new.
	Bug #2165

2019-04-01  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c: reset base_linetype only once per plot
	Bug #2153

2019-03-21  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot3d.c src/graph3d.c:
	The command 'splot FOO with labels' is potentially ambiguous.
	It could be a request for auto-generated contour labels or it could
	be a request to take individual labels from a file.  But it cannot be
	both at the same time.  Now we insure that the correct choice is made.
	Bug #2154

2019-02-22  Ethan A Merritt  <merritt@u.washington.edu>

	* src/mouse.c (event_reset):
	When a plot window is closed the main program may receive a GE_reset
	event.  Under some conditions this causes one character to be dropped
	from the command input stream.  I do not understand exactly what these
	conditions are.  Bug #2134 shows that driving gnuplot through a pipe	
	from tclsh is one such case.  The effect of a dropped character can be
	mitigated by having the event handler invoke ungetc('\n',stdin), at the
	risk of an extra blank line of output.  We were doing this already in
	the specific case of "pause mouse".  Now we extend this to call
	ungetc() whenever gnuplot thinks it is not being run from a direct
	terminal session (!isatty(fileno(stdin))).
	Bug #2134

2019-02-16  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c: Under some circumstances the data input loop for
	matrix data could issue an extra read at the end of the data stream.
	For input from a file this was harmless, as once the end of file is hit
	EOF is returned for all subseqent operations.  However for input from a
	datablock this extra read caused an illegal access to memory
	immediately following the last datablock line.
	Add check for previously having hit end-of-file (last datablock record).
	Bug #2129

2019-02-16  Ethan A Merritt  <merritt@u.washington.edu>

	* src/tabulate.c: Do not output field separator after last field of
	lines from "plot with table".  I.e. each line of a tab-separated table
	containing two values will be "<value1> <tab> <value2> " with no
	trailing <tab>.

2019-02-16  Ethan A Merritt  <merritt@u.washington.edu>

	* src/stats.c: handle NaN values in input stream to "stats FOO matrix"
	Bug #2129

2019-02-09  Ethan A Merritt  <merritt@u.washington.edu>

	* src/term.c (enhanced_recursion): Font names passed to enhanced text
	processing may be in quotes.
    
	This allows one to specify fonts whose name contains space characters
	when constructing a text string with enhanced text markup.
	E.g.  set title "{/'Times New Roman'=15:Italic A_i}"
	Bug #2121

2019-02-07  Ethan A Merritt  <merritt@u.washington.edu>

	* src/unset.c: "unset title" or "reset" resets _all_ title properties
	Bug #2120

2019-02-06  Ethan A Merritt  <merritt@u.washington.edu>

	* src/internal.c src/util.c:  preserve LC_NUMERIC locale inside 'using'
	
	To read input data in the user's preferred locale, the plot, splot, and
	stats commands set the numeric locale prior to data input and reset it
	afterwards.  Similarly in order to produce output in the preferred
	locale, the sprintf and gprintf functions set/reset the numeric locale
	on entry/exit.  Unfortunately these two policies collide head-on if
	sprintf or gprintf appears in a 'using' spec.  The set done by sprintf
	on entry is redundant and the subsequent reset on exit cancels the
	numeric locale currently in effect for data input.  As a consequence
	the next data input operation uses the wrong numeric locale.
	
	To resolve this we now wrap the set/reset_numeric_locale in sprintf and
	gprintf with " if (!evaluate_inside_using) ".
	Bug #2125

2019-02-05  Ethan A Merritt  <merritt@u.washington.edu>

	* src/hidden3d.c src/hidden3d.h src/util3d.c:

	Repair and complete implementation of arrowstyle settings "backhead"
	and "heads" in hidden3d mode.

2019-02-05  Ethan A Merritt  <merritt@u.washington.edu>

	* term/luz.trm term/lua/gnuplot-tikz.lua:

	Make the default tikz arrow routine interpret arrowstyle head angle = 0
	as "nohead", head angle = 90 as LaTeX arrowhead style '|'.
	This allows correct handling of hidden3d arrows with style "nohead".
	tikz options "gparrow" and "tikzarrow" are not affected.
	Bug #2124.

2019-02-05  Ethan A Merritt  <merritt@u.washington.edu>

	* src/tabulate.c:  'plot with table' assumed that the maximum size of an
	output column is the maximum width produced by format "%g", but that limit
	is irrelevant for string output.  Change it to dynamically allocate space
	for whatever string is returned by strcol(i).

2019-01-01  Release 5.2.6

2018-12-24  Ethan A Merritt  <merritt@u.washington.edu>

	* docs/titlepag.tex src/version.c configure.ac RELEASE_NOTES:
	Bump version to 2.6

2018-11-21  Ethan A Merritt  <merritt@u.washington.edu>

	* src/time.c (ggmtime): Allow for round-off error in date conversion
	
	The reported case was converting time = -1.75145e-13 seconds
	Round-off error put this initially in 1969, but counting out seconds
	per hour/day/month/ put it back at 1970 time 0 described as 1969
	month 13.  It looks to me that the same error could in principle
	trigger at any year boundary, so test explicitly for month wrap-around.
	Bug #2087
	
	reported by: Tim Blazytko, Cornelius Aschermann, Sergej Schumilo, Nils Bars

2018-11-20  Ethan A Merritt  <merritt@u.washington.edu>

	* various overflow cases found by fuzzing
	Credits:
	    Tim Blazytko
	    Cornelius Aschermann
	    Sergej Schumilo
	    Nils Bars
	
	Bug 2088: term.c(strlen_tex)
	Bug 2089: cairo.trm metapost.trm tgif.trm (arbitrarily long font name)
	Bug 2092: cgm.trm overwrites trailing '\0' in default font name
	      also context.trm emf.trm
	Bug 2094: also post.trm
	Bug 2093: datafile.c expand df_line on input as necessary to hold string data
	Bug 2095: eepic.trm (EEPIC_put_text) ignore request to print empty string
	Bug 2096: buffer underrun if input line begins with '\0'

2018-11-15  Ethan A Merritt  <merritt@u.washington.edu>

	* src/boundary.c src/gp_types.h src/graph3d.c src/graphics.c
	src/hidden3d.c src/parse.c src/plot2d.c src/plot3d.c:

	New keyword "keyentry" for both plot and splot commands. This places
	a line in the key but does not produce a corresponding plot.  The
	usual line/fill/style/title options control what symbol and text is
	used in the key entry.

	* demo/custom_key.dem demo/keyentry.dem

	* docs/gnuplot.doc docs/plotstyles.gnu

2018-11-14  Ethan A Merritt  <merritt@u.washington.edu>

	* src/util.c (print_line_with_error): Each if/else bracketed clause
	calls lf_push with NULL filename.  To retrieve the filename for error
	reporting we must unwind the lf stack.

2018-11-11  Ethan A Merritt  <merritt@u.washington.edu>

	* term/lua.trm:  Replace lua_tointeger() with lua_tonumber() everywhere.
	Apparently lua 5.3 has changed the behavior of tointeger() and it now
	fails for easily-hit cases in gnuplot.
	Bug #2084

2018-11-08  Ethan A Merritt  <merritt@u.washington.edu>

	* src/boundary.c:  Relax limit on extreme aspect ration of plot and
	apply the scaling after warning even if the limit is exceeded.

2018-10-29  Ethan A Merritt  <merritt@u.washington.edu>

	* src/wxterminal/wxt_gui.cpp: monothreaded wxt terminal needs a mutex
	to prevent recursion.  When a new plot window is created,
	e.g. 'set term wxt <new_id>', creation of the new window must lock out
	other operations otherwise the new window request is sent again and an
	infinite recursion can result.  Since we don't have a new window yet I
	can't use the window mutex, so I hard-wired one named wxt_interlock.
	Does not affect multithreaded wxt or windows.

2018-10-28  Ethan A Merritt  <merritt@u.washington.edu>

	* src/getcolor.c src/save.c src/set.c src/show.c src/tables.c
	demo/pm3dcolors.dem:

	Remove broken support for CIE/XYZ color space.  As reported by 
	Risto A. Paju, the XYZ->RGB transformation in getcolor.c is not correct.
	Furthermore it has never been correct.  As with the YIQ color space
	support removed a while ago, the transformation matrix was apparently
	never checked and hence any script that relied on it never produced
	correct output.
	Replace the black->gold palette example with an RGB space equivalent.
	Bug #2078

2018-10-18  Ethan A Merritt  <merritt@u.washington.edu>

	* datafile.c (df_open): "stats 'foo.dat' noautoscale"
	* graphics.c (plot_boxplot): bail early on empty data set
	* graphics.c (process_image): cannot clip if there is no bounding box
	* plot3d.c: "with vectors" style is not possible for a function splot
	* plot3d.c: cannot contour a plot with NODATA
	* term.c (estimate_strlen): mark string parameter as (const char *)
	* dumb.trm (ENHdumb_put_text): range-check (x,y) coords of enhanced text
	* post.trm (PS_options): Sanity check font size must be < 1000.
	* svg.trm (ENHsvg_writec): split output text into buffer-sized chunks

	Corner-case bugs found by afl-fuzz

2018-10-11  Ethan A Merritt  <merritt@u.washington.edu>

	* src/gadgets.h src/graphics.c src/plot2d.c src/set.c demo/boxplot.dem:
	New command option 'set style boxplot medianlinewidth <lw>'
	can be used to emphasize the position of the median.

2018-10-11  Ethan A Merritt  <merritt@u.washington.edu>

	* src/libcerf.c:  Version 1.7 of libcerf introduced a conflicting
	definition of "cmplx". Fortunately it is nice enough to handle the
	conflict if detected, but that means our definition of cmplx in
	cp_types.h must come before inclusion of cerf.h.

2018-10-06  Release 5.2.5

2018-09-26  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c:  Fix regression in parametric plots with logscale x.
	The check for logscaling in parametric plots was incorrectly made
	against SAMPLE_AXIS rather than T_AXIS (not that we support logscale T).
	So logscale x caused sample variable t to become 10^t.
	This error was present in 5.2.0 through 5.2.4
	Bug #2074

2018-09-25  Ethan A Merritt  <merritt@u.washington.edu>

	* src/misc.c:  Resolve inconsistency in the type/content of arguments
	to "call".  Now ARG1, ARG2, ... are always strings.
	ARGV[1] ... are complex for numerical arguments, strings otherwise.
	Thus after a call
	    call 'routine_1.gp'  1 pi "title"
	The three arguments are available inside routine_1.gp as follows
	    ARG1 = "1"         ARGV[1] = 1.0
	    ARG2 = "3.14159"   ARGV[2] = 3.14159265358979... 
	    ARG3 = "title"     ARGV[3] = "title"
	Bug #2073

2018-09-13  Ethan A Merritt  <merritt@u.washington.edu>

	* src/command.c (array_command):  Allow size of an array to be
	determined automatically from the number of initializers. E.g.
	    array A = ["a","b","c"]
	Backport from 5.3

2018-09-12  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c src/plot2d.c:  Fix regressions in 5.2 polar plot mode.
	trange was always interpreted as being in radians; now it tracks either
	radians or degrees according to 'set angle'.
	Clip radial grid lines and tick marks to current xrange and yrange.
	Either show or don't show crossbar on radial error bars (no partial
	clipping).
	Bug #2072

2018-09-06  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.ac:  Switch the default configuration for wxt terminal to
	./configure --without-wx-multithreaded.  On my current linux machines,
	enabling wxgtk multithreading produces an unusable binary.  Others have
	reported consistent problems.
	Bug #1885

	* src/util.c src/wxterminal/wxt_gui.cpp sec/term.c:  Always set numeric
	locale to C following int_error() or terminal initialization.  This may
	or may not catch asynchronous corruption of the program locale by
	another thread or misbehaving library.
	Bug #2069

2018-08-29  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graph3d.c: Adjust axis tick and axis placement in 3D projections
	onto the xz or yz plane.  2D projection onto the xy plane is handled as
	a special case by "set view map".  Projections onto the xz or yz plane
	also need special treatment so that the x and y axis ticks are drawn in
	the plane of the graph rather than invisibly perpendicular.
	Customize placement of x and y axis labels for xz and yz projections.
	Azimuth +/-90 requires offset of z tic labels along y rather than x.

2018-08-26  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c src/jitter.c src/jitter.h:   New jitter option
	'set jitter vertical' jitters y coordinate rather than x coordinate.

2018-08-26  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c:  Make "with image pixels" work on terminals that
	support term->fillbox but not term->filled_polygon.
	I.e. 2D images with axes parallel to x and y are ok.
	This was always the intent, but the test for rectangular images was
	missing in the "with image pixels" case.

2018-08-10  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot3d.c: Clip 3D splot with labels to show only INRANGE points.
	Bug #2068

2018-08-09  Ethan A Merritt  <merritt@u.washington.edu>

	* term/linux.trm term/vgagl.trm:  DEPRECATE these terminals.
	Both require support from svgalib, a corresponding custom kernal
	module, and installation of gnuplot as suid root.  The configuration
	option --with-linux-vga will be removed in a subsequent release.

2018-07-25  Ethan A Merritt  <merritt@u.washington.edu>

	* src/pm3d.c:  Backport from 5.3
	The flag controlling treatment of rgb colors was manipulated as if it
	were a per-plot flag, but "set pm3d depthorder" merges all pm3d plots
	together.  This meant that if some plots used a color column and some
	did not, the depth-sorted combition colored some plots incorrectly.
	Now we move the flag into the individual colored quadrangles by using
	a magic grey value PM3D_USE_RGB_COLOR_INSTEAD_OF_GRAY.
	Bug #2066

2018-07-17  Ethan A Merritt  <merritt@u.washington.edu>

	* src/p3md.c src/pm3d.h save.c set.c:  Backport from 5.3
	New option 'set pm3d depthorder base' sorts pm3d quadrangles on the
	depth of the projected intersection  of the quadrangle with the base
	plane z=0.  Useful for fence plots drawn with zerror.

2018-06-29  Ethan A Merritt  <merritt@u.washington.edu>

	* src/multiplot.c src/multiplot.h src/unset.c:  The "reset" command
	should not perturb current multiplot status.  This allows a reset
	between plots in a multiplot.

2018-06-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/interpol.c (mcs_interp):  The Fritsch-Carlson monotonic spline
	algorithm leaves indeterminate what slope constraint to use at the first
	and last data points.  Previously the first point used the input slope
	but the last point used zero slope.  This is valid, but difference in
	treatment of the two ends is unexpected.  Now we use the input slope
	at both ends.
	Bug #2055

2018-06-20  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (plot_f_bars plot_c_bars): Clip all elements of
	candlesticks/financebars/boxplots against plot limits.
	Bug #2056

2018-06-08  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (plot_lines):

	Until now there have been two code paths to clip line segments to the
	portion within a bounding box (usually the plot boundaries).
	Plot styles "lines" and "linespoints" clip in the coordinate space
	of the plot axes via routines edge_intersect() and two_edge_intersect().
	Originally these routines had other callers as well, but those have all
	been rewritten.  Most of them first transform into terminal coordinates
	and then use draw_clip_line().  This split has led to clipping bugs that
	affected only some objects or plot conditions, e.g.
	Bugs #2030 #2046.
	
	Now we convert the routine graphics.c (plot_lines) to clip in terminal
	coordinate space using draw_clip_line().  This leaves no remaining
	callers of the edge_intersect routines, so remove them.
	
	Output before and after this change is not pixel-for-pixel identical
	because the calculated intersection of a line with the bounding box
	boundary comes out differ due to rounding when we are working in
	terminal coordinates (int) rather than plot coordinates (double).

2018-06-01  Release 5.2.4

	Released earlier than usual in order to correct regressions in 5.2.3

2018-05-31  Ethan A Merritt  <merritt@u.washington.edu>

	* 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  <merritt@u.washington.edu>

	* 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  <merritt@u.washington.edu>

	* src/plot3d.c:  refresh_3dbounds must check both head and tail of each
	vector for OUTRANGE.
	Bug #1948

2018-05-16  Miroslav Sulc <msulc@users.sourceforge.net>

	* 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  <merritt@u.washington.edu>

	* 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  <merritt@u.washington.edu>

	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  <dima@secretsauce.net>

	* 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  <merritt@u.washington.edu>

	* 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  <merritt@u.washington.edu>

	* 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  <merritt@u.washington.edu>

	Bump version to 5.2.3

2018-04-20  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c: Do not "snap" a sampled point of a function domain to 0
	for non-linear x axis.  The original motivation for this was to assure
	that coarse samples spanning x=0 would evaluate the sampled function at
	exactly f(0).  However this makes no sense for nonlinear axes,
	expecially log axes, because the sampling is actually being done on the
	hidden axis not the visible axis where x=0.
	Bug #2040

2018-04-12  Ethan A Merritt  <merritt@u.washington.edu>

	* src/specfun.c (airy) term/lua.trm (LUA_GP_get_boundingbox):
	Function declaration corrected to follow C prototype standard.

2018-04-11  Ethan A Merritt  <merritt@u.washington.edu>

	* src/term_api.h src/term.c (do_arc):  Use signed rather than unsigned
	terminal coordinates in do_arc().  This allows clipping of circles or
	arcs whose center is off-screen on the left or botton (negative x or y
	coordinate).  Previously the wrap-around of unsigned [cx,cy] caused
	these to be treated as very far off-screen in the positive direction
	and clipping failed to notice that portions of the arc could be visible.
	Bug #2035

2018-04-02  Ethan A Merritt  <merritt@u.washington.edu>

	* term/estimate.trm:  Incorrect cast in ENHest_writec caused all 3+
	byte UTF-8 sequences in enhanced text to be estimated as double-width.

2018-03-26  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c demo/poldat.dem:  yerrorbars in polar mode were being
	drawn as purely vertical rather than radial.  Add a yerrorbars test
	case to poldat.dem.
	Bug #2031

2018-03-25  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (plot_lines edge_intersect):  Handle clipping of line
	segment between INRANGE->UNDEFINED points.  Previously we checked for
	UNDEFINED->INRANGE but failed to consider INRANGE->UNDEFINED.
	In either case it should return zero, indicating that no clipped line
	is possible.
	Bug #2030

2018-03-23  Ethan A Merritt  <merritt@u.washington.edu>

	* src/color.c (draw_color_smooth_box):
	Default colorbox position in "set view map" mode should match 2D mode.
	The previous algorithm failed to allow for logscale or other nonlinear
	x axis settings, perturbing the width of the colorbox.
	Bug #2029

	* src/plot3d.c: emulate logscale axis range extension of pre-v5 splot
	The routine extend_primary_ticrange() emulates the old behaviour
	(i.e. prior to nonlinear axis code) of autoscaled logscaled axes.
	It extends the range of the plot to include the next tic at either end.
	We were already calling it for 2D plots; now we call it for 3D plots
	as well.
	Bug #2029

	* src/command.c (splot_map_activate/deactivate):
	'set view map' and 'set pm3d map' both flip the direction of the y
	axis so that the layout matches a 2D plot.  In the case of a nonlinear
	y axis, in particular 'set log y', this means we have to flip the
	linked primary axis as well.
	Bug #2029

2018-03-05  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (extend_primary_ticrange):
	This routine exists only to emulate the old behaviour (i.e. prior to
	nonlinear axis code) of autoscaled logscale axes.
	If it extends the range on the primary axis, this change must also be
	propagated to the secondary (user-visible) axis.  Otherwise the reported
	axis min/max are not correct.
	Bugfix for log-scale mousing in canvas terminal.

2018-03-03  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (eval_link_function):
	Executing the general case nonlinear axis mapping functions via a
	dynamically interpreted action table is slower than in-line evaluation.
	In the special case of log-scaled axes we can short-circuit the 
	general case evaluation by an immediate call to the log or exp function.
	microbenchmark speedup 25%

2018-02-23  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graph3d.c src/plot3d.c:  You might want contour lines to opt out
	of hidden3d processing, e.g. because it messes up dashed lines.  Since
	the low-level routines that draw the contour line segments look only at
	the global "hidden3d" flag, we must save/clear/restore this flag if the
	individual plot is marked "nohidden".

2018-02-22  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (df_set_key_title_columnhead):  Handle the case
	    stats FOO using 'namedcolumn' name columnhead
	Bug #2023

2018-02-21  Ethan A Merritt  <merritt@u.washington.edu>

	* src/qtterminal/QtGnuplotScene.cpp: include "notitle" plots in
	accounting for toggle commands.  Plots can be toggled by number even if
	they do not appear in the key.  Inclusion of "notitle" plots must not
	change mapping of key box area to plot number.
	Bug #2021

	* term/svg.trm:  Apply current color to dots.
	Bug #2022

2018-02-10  Ethan A Merritt  <merritt@u.washington.edu>

	* src/multiplot.c:  Allow multiplot title to use full range of 
	label properties (textcolor, boxed, offset, ...)

2018-02-08  Ethan A Merritt  <merritt@u.washington.edu>

	* term/svg.trm:
	The combination "set term svg mousing background 'black'" set the
	background to white instead.

2018-02-08  Bastian Maerkisch  <bmaerkisch@web.de>

	src/command.c src/datablock.c|h:  This patch splits lines containing
	newline characters into multiple lines when the target of a print
	command is a datablock.  That way we can e.g. get a datablock with
	names of files on Windows:
		set print $d; print system("dir /a-d /b *"); unset print;
		print |$d|
	Patch #754

2018-02-08  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/command.c src/datablock.c|h:  This patch splits lines containing
	newline characters into multiple lines when the target of a print
	command is a datablock.  That way we can e.g. get a datablock with
	names of files on Windows:
		set print $d; print system("dir /a-d /b *"); unset print;
		print |$d|
	Patch #754

2018-01-30  Ethan A Merritt  <merritt@u.washington.edu>

	* term/canvas.trm:  Always apply term->set_color(), including optional
	alpha channel, to both strokeStyle and fillStyle.  This allows the
	canvas terminal to honor RGBA colors for points and lines as well as
	for area fill. Other terminals got this fix way back in version 4.6.
	This change does not affect the javascript support routines so there
	should be no backward-compatability issues.
	Bug #2013

2018-01-25  Ethan A Merritt  <merritt@u.washington.edu>

	* src/contour.c src/contour.h src/graph3d.c src/save.c src/set.c
	src/show.c src/unset.c docs/gnuplot.doc demo/custom_contours.dem:

	New options for customizing contour lines
		set cntrparam {firstlinetype N} {{un}sorted}
	The 'firstlinetype' option allows you to set linetype properties for
	a block of linetypes, including dot-dash patterns,  and then specify
	that these customized linetypes be used to generate contour lines.
	In this case you probably want to also use the other new keyword
	'sorted' because by default contour lines are not generated in
	consistent ascending order.
	Bugs #1603 #1612

2018-01-25  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.* src/graph3d.c src/save.c src/set.c src/show.c src/unset.c:
	New command "set grid {no}vertical" includes vertical grid lines in the
	xz and yz planes corresponding to the major and minor x/y tic locations
	already drawn in the xy plane.  Lines extend from zmin to the top of
	the plot box, i.e. not all the way to the base plane.
	Affects only 3D plots.

2018-01-21  Ethan A Merritt  <merritt@u.washington.edu>

	* src/internal.c (f_gprintf):  The count of characters immediately
	following "%%" in a format statement was not checked against the current
	buffer length. Remove unsafe alternative code that doesn't use snprintf.
	Bug #2011

2018-01-10  Ethan A Merritt  <merritt@u.washington.edu>

	* src/time.c (xstrftime) internal.c (f_strftime):  Protect against
	buffer overflow from user-supplied time format string.  E.g.
	    print time(0,"%100tH%D")
	Bug #2009

2018-01-05  Ethan A Merritt  <merritt@u.washington.edu>

	* src/history.c:  If ./configure --disable-history-file or
	--without-readline then do not try to build the routine that reads a
	history file.  Whether --without-readline should really disable
	history is another question, but that is a configuration issue not a
	compile issue.
	Bug #2008

2018-01-04  Ethan A Merritt  <merritt@u.washington.edu>

	* src/gplt_x11.c:  When directing x11 output into an existing window,
	use the same visualid that window already reports.  This fixes a failure
	to connect gnuplot output to a socket window created by gtk3.
	Failure and fix both reported by Dima Litvinov.
	Bug #1980

2017-12-28  Rin Okuyama <rokuyama@rk.phys.keio.ac.jp>

	* configure.ac src/readline.* src/term.c src/qtterminal/qt_term.cpp
	src/wxterminal/wxt_gui.* term/x11.trm:
	Gnuplot does not suspend immediately by Control-z when it is configured
	--with-readline=gnu; suspension is triggered by a subsequent input
	character.

	When SIGTSTP is received, the signal handler of readline sets a flag
	and just returns. Routines of readline check this flag to invoke the
	real handler to suspend. Since we replace rl_getc_function by our own
	routine to catch input from mouse, we should also check this flag to
	invoke the real handler. Othewise, we cannot suspend until next time
	routines of readline are used.

	Unfortunately, there is no portable ways to invoke the real handler of
	readline at the moment. We need to use its internal routine. libreadline
	will implement a public function for this purpose in a future release.

	EAM: Original patch included the wrapper code directly in x11.trm;
	I moved it into a separate routine wrap_readline_signal_handler()
	so that it can be shared by other gnuplot terminals.
	Bug #2002

2017-12-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/util.c (print_line_with_error):
	print_line_with_error() must not alter global gp_input_line or inline_num.
	If called from int_error() or os_error() this would not matter because the
	correct values will be reset anyway, but if called from int_warn() this
	can truncate the current input line and/or print the wrong line number in
	the warning message.  In particular it can cause premature exit from a
	bracketed clause.
	Bug #2007

2017-12-25  Bastian Maerkisch  <bmaerkisch@web.de>

	* term/caca.trm:  The raw and null libcaca drivers don't do anything
	useful for us.  So don't include them in the list of available drivers
	shown to the user.

	* term/caca.trm:  Various range and null pointer checks to avoid
	segfaults when using the raw and null drivers.  Still these won't
	produce any useful output.

	* term/caca.trm (CACA_init_display):  On Windows, disable the
	console's quick edit mode to directly enable mouse interaction.

	* term/caca.trm (CACA_process_events):  Failed to change internal
	canvas size on window resize.  Bugfix.

	* term/caca.trm (CACA_waitforinput):  Correct the check if the caca
	driver window was closed.  This bug would cause gnuplot to exit on
	the first keypress after closing the window.
	Bugfix.

	* term/caca.trm:  Simple bold / italic font support. libcaca supports
	theses attributes currently only for ncurses, html, html3, bbfr, and
	troff.

	* term/caca.trm:  Add an emacs type modeline.

	* term/caca.trm (CACA_text):  Test for input redirection.  Resolves
	hang with slang/ncurses drivers in
	    gnuplot -e "load 'simple.dem'" < /bin/true

2017-12-25  Bastian Maerkisch  <bmaerkisch@web.de>

	* .gitattributes:  ChangeLogs are prone to merge errors.  The GNU tool
	 git-merge-changelog has been developed to avoid that and is likely
	 available in most distributions.  Caveat is that git committers now
	 need it to be installed and configured, see e.g.,
	 https://gnu.wildebeest.org/blog/mjw/2012/03/16/automagically-merging-changelog-files-with-mercurial-or-git/

2017-12-24  Ethan A Merritt  <merritt@u.washington.edu>

	* src/misc.c src/set.c src/util.c src/util.h:
	new utility routine might_be_numeric() to be called before trying
	to parse optional numeric value in command
	Bug #2006

2017-12-23  Bastian Maerkisch  <bmaerkisch@web.de>

	* .gitattributes src/os2/4allterm.cmd:  Enforce EOL style or treatment
	as binary for certain file types.

2017-12-22  Ethan A Merritt  <merritt@u.washington.edu>

	* src/gadgets.c:  Only terminate polygon with "closepath" if it is
	not clipped.  Bug #1995 revisited.

	* term/cairo.trm:  Initial font used in enhanced text processing
	should be the most recently set font, not the original font from
	"set term".
	Bug #1997

2017-12-21  Ethan A Merritt  <merritt@u.washington.edu>

	* term/PostScript/prologue.ps term/PostScript/prologues.h:
	Fix mismatched newpath/closepath and missing stroke in macro for
	pm3d surface quadrangles.  This could generate a spurious rectangle
	on the next stroke command.
	Bug #2005

2017-12-04  Ethan A Merritt  <merritt@u.washington.edu>

	* src/gadgets.c term/svg.trm:  Create a new path for each polygon.
	In particular this provides a chance for a change in line properties
	to take effect.
	Bug #1995

	* term/latex.trm: Sanity check latex terminal options.
	Bug #1996

2017-11-17  Ethan A Merritt  <merritt@u.washington.edu>

	* src/getcolor.c src/getcolor.h src/save.c src/show.c src/tables.c
	term/context.trm term/post.trm docs/gnuplot.doc demo/pm3dcolors.dem:

	Remove vestigial implementation of YIQ colorspace.
	The YIQ colorspace option for "set palette" was incorrectly implemented
	back in the mists of time.  E.g. the parsing code enforces color
	component range [0:1] but YIQ coefficients can be negative; syntax for
	"set palette defined" is incompatible with negative values; YIQ_2_RGB
	 uses incorrect transformation matrix.  No user interface to YIQ_2_RGB
	was provided.  Thanks to Isao MORI <orios814@users.sf.net> for pointing
	out the various fundamental flaws.

2017-11-16  Ethan A Merritt  <merritt@u.washington.edu>

	graphics.c (plot_vectors):
	The code for drawing 2D  "plot ... with vectors" is redundant.
	Replace the core of it with a call to draw_clip_arrow().

	gadgets.c (draw_clip_arrow):
	Do not call term->arrow() if the entire arrow is out of range.

2017-11-16  Hans-Bernhard Broeker  <broeker@users.sourceforge.net>

	* prepare (AUTOMAKE): Remove permission fix-up commands, in favour
	of letting git handle this.

	* missing config/djconfig.sh: Set permissions to executable.

Release 5.2.2

2017-11-08  Ethan A Merritt  <merritt@u.washington.edu>

	* src/set.c (set_logscale):  If the axis is currently autoscaled and
	the range limits still hold non-positive values from a previous state,
	reset them to [0.1 : 10.].

2017-11-04  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.ac src/syscfg.h src/command.c:
	(back-ported HBB patch from 5.3 with addition of OS2) 
	Include <sys/wait.h>, if it exists.  Provide fall-back definition
	for WEXITSTATUS if none is found via <sys/wait.h>.
	Move MS Windows specific replacement from command.c to syscfg.h.
	Bug #1989

2017-11-01  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c (histogram_range_fiddling):  For stacked histograms,
	autoscaling did not distinguish between 'set xrange [*:*]' and 
	'set xrange [explicit_min:*]', always resetting min to -1.
	Bugfix

	* RELEASE_NOTES NEWS PATCHLEVEL configure.ac src/version.c
	Bump version to 5.2.2 (but not yet tagged)

2017-10-31  Ethan A Merritt  <merritt@u.washington.edu>

	* src/command.c: Fix #define breakage

2017-10-31  Dima Kogan  <dima@secretsauce.net>

	* configure.in:  Add $LIBRARIES_FOR_X to WX_LIBS so that configuration
	 of Makefiles includes -lX11 as required by wxgtk3

2017-10-31  Petr Mikulik  <mikulik@physics.muni.cz>

	* src/command.c (is_history_command): Remove use of isblank() to support
	older compilers.

2017-10-31  Petr Mikulik  <mikulik@physics.muni.cz>

	* term/context.trm: In OS/2, LINEJOIN constants are defined in os2emx.h.

	* config/config.os2: Define int32_t as int.

	* src/command.c: Define WEXITSTATUS empty for both Windows and OS/2.

2017-10-30  Ethan A Merritt  <merritt@u.washington.edu>

	* RELEASE_NOTES NEWS src/version.c demo/image2.dem:
	Bring CVS files up date with the contents of the 5.2.1 tarball.

2017-10-30  Achim Gratz  <Stromeko@nexgo.de>
	
	* configure.ac:  The configury supposedly tries to find TEXDIR via
	kpsexpand, but that code never got run if $prefix is set.  Now it is.

2017-10-30  Ethan A Merritt  <merritt@u.washington.edu>

	* term/post.trm:  Raise the limit on number of relative moves before
	a "stroke" so that a full circle as drawn by do_arc() does not glitch
	due to insertion of a "stroke xx yy M" sequence that resets the
	dot/dash pattern.
	Bug #1987

	* src/axis.c (gen_tics):  `set log x; set xtics foo` would always place
	the first axis tic at foo rather than at (foo / base^N) for suitable N.

	* src/graphics.c (plot_betweencurves):
		plot 'foo' with filledcurves below y=bar
	would fail to identify "below" regions where the y value of the start
	or end data point was exactly (foo[x] == bar).
	Bug #1983

2017-10-30  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/winmain.c (ConsolePutS, ConsolePutCh):  Use standard file IO
	instead of Console API to enable word-wrapping on Windows 10 and to
	allow for redirection of stdout/stderr.
	Bug #1985

2017-10-30  Ethan A Merritt  <merritt@u.washington.edu>

	* docs/gnuplot.doc src/gadgets.c:  Trivial typos and out-of-date
	comments.  Fix index entries for help section on piped data.

	* plot2d.c (eval_plots):  Fix a regression causing an empty range on
	log-scale y axis to error out rather than auto-extending the axis range.
	Extension can be handled by the same routine used for linear axes.
	Bug #1978

Release 5.2.1

2017-10-13  Petr Mikulik  <mikulik@physics.muni.cz>

	* src/pm3d.c (pm3d_draw_one pm3d_plot): Move call of term->layer() with
	TERM_LAYER_BEGIN_PM3D_MAP and TERM_LAYER_END_PM3D_MAP from pm3d_draw_one
	to pm3d_plot in order to avoid insertion of line commands between the
	%pm3d_map_begin and pm3d surface commands in the postscript file
	which broke the pm3dCompress.awk and pm3dConvertToImage.awk scripts.

2017-10-11  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (gen_tics): The start point for log-scale tic placement
	could not lie outside the axis range (e.g. start at 1 for axis range
	[5:50]).  Remove this restriction.  Still not perfect backwards
	compatibility with log-scale tic placement in earlier versions.

2017-10-09  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (df_generate_pseudodata):  The sample-generation code
	failed to distinguish between nonlinear x2 (primary axis hidden) and
	"set link x2 via f(x) inv g(x)" (primary axis x1).
	Bug #1973

	* src/graphics.c src/graphics.h src/set.c src/tables.c src/tables.h
	src/unset.c src/show.c src/save.c demo/image2.dem docs/gnuplot.doc:

	The default interpretation of RGB color components on input is that
	they are integer values in the range [0:255].  This matches the 
	content of PNG and JPEG files. Since the interpretation of RGB color
	components has been decoupled from the palette range limits controlled
	by "set cbrange", data using some other RGB convention must be rescaled.
	This patch introduces a new command `set rgbmax`.  The primary use is
	so that data using the convention that color components are floating
	point values in the range [0:1] can be plotted using
	    set rgbmax 1.0;   plot 'imagedata' with rgbimage

2017-10-08  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (reconcile_linked_axes) src/axis.h src/plot2d.c:

