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:

	gnuplot version 5.0 always tracked the autoscale range on the primary
	axis (x1 or y1) of a linked pair, even if the data was actually plotted
	on x2 or y2.  In verison 5.2 we track the data range on x1 x2 y1 y2
	separately.  This caused breakage wherever the program assumed the
	autoscale range on x1 (or y1) was always current.  Worse, it would
	propagate that range onto the secondary axis, possibly overwriting the
	correct range.  Now we introduce a new routine reconcile_linked_axes()
	that merges the min/max values from e.g. x1 and x2 so that the 
	autoscaled range covers input data plotted on either axis.
	Bug #1973

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

	* term/gd.trm:  Report number of frames in completed animation sequence.

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

	* src/win/wgraph.c:  Make sure that the bounding rectangle of emf data
	starts at 0,0.  Bugfix.

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

	* src/axis.h src/axis.c (axis_set_scale_and_range):  Incorrect use
	of unsigned parameters caused terminal scaling to fail if the axis 
	range was inverted. The error was introduced by converting from a
	macro to a subroutine in the run-up to 5.2.

2017-09-25  Dima Kogan  <dima@secretsauce.net>

	* src/axis.c (clone_linked_axes):  When sanity checking the via/inverse
	mapping functions for linked or nonlinear axes, adjust the allowable
	difference by a scale factor related to the axis range.

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

	* src/plot2d.c:  smoothing options csplines|acsplines|bezier|sbezier
	failed to recheck inrange/outrange after smoothing.  Example failure:
	    plot [0:4][4:0] '+' using 1:1 smooth bezier w lines
	Bugfix

	* src/interpol.c (mcs_interp):  The previous implementation of monotonic
	cubic splines did not guarantee that the original points were included
	in the set of generated points used to draw the resulting curve.  This
	meant that the curve might not pass through all points.  Now we merge
	the original points with the set of evenly sampled points.
	Thanks to K Antal for identifying and demonstrating the problem.
	Patch/Bug #1972

	* src/axis.c src/axis.h src/datafile.c src/gp_time.h src/gp_types.h
	src/internal.c src/time.c demo/timedat.dem docs/gnuplot.doc:
	Gnuplot already supports relative time format specifiers %tH %tM %tS
	for output via strftime() and in the time format for axis tic labels.
	Now we add the same format specifiers as an option for input via
	strptime().  They can also be used to read data fields containing 
	degrees/minutes/seconds.
	relative time formats for input (this patch)
	    print strptime("%tM:%tS", "-61:12.50")
	    -3672.5
	"normal" time formats don't work for this purpose (prints "0").

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

	* src/axis.c (gen_tics) docs/gnuplot.doc demo/nonlinear6.dem:
	Revise documentation of "set xtics" to include examples and description
	of logscale keyword.  Restore pre-5.2 behaviour that for log-scaled axes
	the increment in "set xtics {start,} incr {,end}" is interpreted as a
	multiplicative factor rather than a constant interval.  However this is
	only true if the "logscale" attribute is set for axis tics.
	New demo nonlinear6.dem exercises this feature and also shows the use of
	"set tics rangelimit" with log-scaled axes.
	Bug #1971

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

	* src/parse.c (parse_array_assignment):  Memory leak.

	* src/Makefile.am:  Fix recipe for building qt embed_example

2017-09-17  KH Moriyama  <khmoriym@users.sf.net>

	* src/axis.c (parse_range):  Backport from 5.3 - modify parse_range()
	to handle in-line ranges for linked or nonlinear axes.
	Bug #1964

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

	* src/set.c (parse_label_options):  Memory leak.

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

	* src/plot2d.c src/plot3d.c:  Starting in version 5, NaN and UNDEFINED
	input data points count toward the total number of points read.  This
	caused the test for "no points read" to not terminate iterations of the
	form  "for [i=min:*] ..." on the first missing file or invalid spec.
	To prevent runaway iteration we now test for "no INRANGE points read in".

	* src/graph3d.c src/datafile.c:  Add initializers for variables to
	silence compiler warnings.

	* src/datafile.c (f_columnhead):  columnhead(N) invoked inside a using
	specifier now returns the actual column header.
	See Bug #1968

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

	* src/graphics.c src/graph3d.c: The "title at {beg|end|<position>}"
	options were originally intended as an alternative to the normal key,
	so preservation of the key layout was not a concern. This patch allows
	you to mix custom-placed titles with in-key titles in the same plot.
	Bug #1967

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

	* src/axis.c( gen_tics ) src/axis.h( reorder_if_necessary ):
	New macro to reorder the min/max of axis ranges (but could be used
	elsewhere).  If the mapping function of linked axes inverts the
	axis direction, tics were not being generated because min > max.
	E.g. set link x2 via 100-x inv 100-x; set x2tics; plot [50:40] x

	* src/graphics.c (plot_border) src/boundary.c (boundary):
	Range-limited axes were not accounting for nonlinear or linked axes.
	Space reserved for long axis tic labels made the same mistake.
	Bug #1965

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

	Several additions already in 5.3 but held back from 5.2 during -rc testing

	* src/set.c (set_separator) src/show.c (show_table):  New command option
	    set table {separator {comma|tab|whitespace|"<char>"}}
	allows "plot with table" to create csv files.

	* src/tabulate.c:  Handle splot with rgbimage, rgbalpha

	* src/graphics.h src/graphics.c src/graph3d.c:  The 2D routine
	attach_title_to_plot() can be shared by the 3D code in order to support
	"splot ... with lines title at {beg|end}".

	* src/qtterminal/QtGnuplotScene.cpp":
	 QtAlign::foo properties are bit definitions, not integers

2017-09-06  Martin Saturka  <kvutza@users.sf.net>

	* src/mousecmn.h src/mouse.c:  Bind the < and > keys to change the
	current azimuth setting while mousing 3D plots.
	(EAM) add an internal flag "Opt-" so that you can bind a hotkey for
	which the Alt and Ctrl modifiers are optional rather than required.

Release 5.2.0

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

	* PATCHLEVEL src/version.c:  Update versioning for 5.2 release

	* src/time.c (xstrftime):  The variant format specs for time
	%tH %tM did not behave as documented in that hours wrapped at 24 and
	minutes at 60 if a decimal precision modifier was not present.

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

	* src/axis.c (parse_range eval_link_function) docs/gnuplot.doc:
	Attempt to handle the case of linked axes (x+x2 or y+y2) and an in-line
	range specifier in the plot statement.  This fix only addresses simple
	cases, such as
	    set link x2;  plot [x=min:max] something-using-x2 axes x2y1
	Recommend to use separate "set xrange ... set yrange ..." instead.

2017-08-31  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/term-ja.diff docs/faq-ja.tex docs/gnuplot-ja.doc:
	Update Japanese documentation for 5.2 release

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

	* win/README-Windows.txt win/README-Windows-jp.txt:  Update and
	translation courtesy of Tatsuro Matsuoka and Shigeharu Takeno.

	* docs/gnuplot.doc:  Expand section on real/int/hex/octal constants.

	* src/command.c src/datablock.c src/datablock.h src/internal.c
	src/parse.c src/util.c:  Extend array syntax to named datablocks.
	|$DATABLOCK| gives the number of lines in the block.
	$DATABLOCK[n] returns line n as a string.  Back-ported from 5.3

	* demo/stringvar.dem:  Use the new syntax to avoid creating a temporary
	file during execution of the demo.

2017-08-29  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c (CopyPrint):  Check return values of GDI print API
	function calls.

	* src/win/wgraph.c src/win/wgdiplus.cpp src/win/wd2d.cpp
	(TEXTBOX_MARGINS):  Adjust scaling of textbox margin to be more like
	what the qt terminal does (ie. much smaller).

	* term/metapost.trm:  Missing check for EAM_BOXED_TEXT.

	* config/config.oww:  Update to version 5.2.  In particular enable
	boxed text and external functions and disable bitmap terminals by
	default.

	* src/win/wd2d.cpp:  Enable compilation with OpenWatcom, which is
	missing __uuidof().

	* config/watcom/Makefile:  Optionally build with GDI+ or Direct2D/
	DirectWrite.  These libs are available at
	https://sourceforge.net/p/gnuplot/patches/746/

	* config/watcom/Makefile:  Drop option -j for signed chars.

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

	* src/graphics.c src/graphics.h demo/image.dem demo/image2.dem:
	Since we have decoupled cbrange from rgbimage, the image demos need
	to change accordingly.  Add a placeholder macro rgbscale(colorval)
	that for now only enforces that color components are in [0:255] but
	can later be replaced with an actual scaling routine.

2017-08-22  Dima Kogan  <dima@secretsauce.net>

	* src/plot2d.c src/plot3d.c src/graphics.c (process_image):
	Do not apply cbrange to rgbimage data.  Do not use rgbimage range to
	autoscale cbrange.  For now this means that rgbimage color components
	must be in the range [0:255], as they are for png, jpeg, etc.

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

	* src/graphics.c (process_image):  Limit alpha channel range to [0:255]
	in "with rgbalpha pixels".

	* src/axis.c src/datafile.c src/plot2d.c src/plot3d.c src/graphics.c
	demo/sampling.dem docs/gnuplot.doc:
	Allow explicit sampling interval in the range statements associated with
	pseudofile '++' in both 2D and 3D.  Example:
	plot sample range [u=0:127][v=0:127] '++' using 1:2:(F(u,v)) with image

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

	* src/datafile.c (df_open): Expand leading ~ in filename for binary data
	files just as for text files.

2017-08-15  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c src/win/wgdiplus.cpp:  We intend to scale line widths
	with resolution when printing, but we got that wrong due to confusion of
	constants.

	* src/win/wgraph.c (CopyPrint):  Fix fallback from D2D to GDI+ for
	printing.

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

	* src/set.c (set_table):  Implement "append" option for datablocks.
	Bug #1951

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

	* src/parse.c (check_for_iteration):  If some depth of a nested
	iteration evaluates to an empty range, the evaluated limits of depths
	below it are irrelevant and possibly invalid.  Add a test to skip
	evaluation at lower depthes in such a case.
	Bug #1952

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

	* src/command.c src/parse.c src/plot2d.c demo/iterate.dem:
	Revise recursive iteration algorithm to address problems with empty
	ranges in a nested iteration. Add support for dynamic reevaluation of
	the string in nested ranges using "for [s in <string-expression>]".
	Bug #1952

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

	* src/plot2d.c src/plot3d.c:  Revert inadvertent change of 2017-03-31
	that failed to call update_gpval_variables in "set table" mode.
	Bug #1954

2017-08-07  Martin Beranek

	* term/metapost.trm:  Support for user-defined dashtypes.

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

	* src/graph3d.c:  "set key fixed" should be ignored in the case of
	"set view map".

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

	* src/set.c (set_view):  Switching from "set view equal xy[z]" to 
	"set view map" failed to clear the 3D aspect ratio flag, leading to
	conflicting scale factors.  Now we treat it as "set size ratio -1",
	which is what the documentation says.
	Bug #1948

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

	* config/mingw/Makefile config/msvc/Makefile win/gnuplot.iss:
	The pm3d and contrib subdirectories are no longer in the distribution
	source, so they must not appear in the windows installer inventory.

	* configure.ac PATCHLEVEL docs/titlepag.tex src/version.c:
	Bump patchlevel to rc4 and repackage
	NB: No change to any source files. This affects only the windows
	build scripts.

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

	* configure.ac PATCHLEVEL docs/titlepag.tex src/version.c:
	Bump patchlevel to rc3

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

	* config/mingw/Makefile config/msvc/Makefile:  Mingw-w64 and MSVC have
	working popen/pclose implementations for GUI applications.  So we use
	them instead of our own "fake" pipe emulation.
	Bug #1950

	* src/win/winmain.c src/syscfg.h config/config.nt config/config.oww:
	Unicode support for popen.

	* src/win/wd2d.cpp:  Direct2D implementation of pattern fill using a
	bitmap brush.  This eliminates the last GDI/GDI+ fallback, so we
	no longer aim to be compatible.

2017-07-29  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.h (autoscale_one_point) src/plot2d.c src/plot3d.c:
	Refresh_bounds and refresh_3dbounds perform only a simplified version
	of autoscaling.  Consolidate this into a macro autoscale_one_point().
	Extend the simplified autoscaling to include both ends of a VECTOR plot.
	Other cases remain where the simplified autoscale is insufficient.
	Bug #1947

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

	* src/fit.c:  Ignore non-numeric contents of potential dummy variables
	x y t u v used during fit evaluation.
	Bug #1949

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

	* src/datafile.c (df_open):  Reject plot command if input and output
	both use the same data block.  Prevents memory corruption / segfault.

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

	* src/fit.c:  The code saving the previous "fit" command incorrectly
	assumed that "fit" must be the first thing on the input line.  This
	is clearly not true, particularly when the command is inside a {}
	bracketed clause since the entire clause acts as one long input line.
	Bug #1946

2017-07-20  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (df_open df_readascii expect_string) src/datafile.h
	src/plot2d.c src/tabulate.c src/tabulate.h docs/gnuplot.doc:
	Move code for "plot with tables" into tabulate.c (tabulate_one_line).
	Plot styles (e.g. "with labels") already call expect_string(column) to
	signal that a particular input column is to be treated as a string.
	Now we add special case so that "with table" can use expect_string(-1)
	to signal that any column is treated as a string if its using specifier
	evaluates to a string.  This allows "plot ... with table" to create
	tables containing strings and to use sprintf/gprintf to format
	numerical output.

2017-07-18  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c src/plot3d.c docs/gnuplot.doc:
	Fix inconsistent handling of "plot ... with table".
	E.g. "set style data table; plot foo" tried to both plot and tabulate.
	Warn that function plots are not handled.
	Do not invalidate yrange.

2017-07-11  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgdiplus.cpp (SaveAsBitmap):  Make sure that GDI+ is
	initialized.  Bug fix.

	* src/win/wgraph.c (TryCreateFont):  Silence font substitution
	warnings in GDI backend again.  This is consistent with other backends
	and less annoying.

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

	* src/term.c (test_term): Revise "test" command output.
	- simplify rotated text and arrow section
	- fix bug in "dumb" centering of polygon title
	- compare true textbox area with generic estimated text dimensions.

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

	* src/term.c (set_term init_terminal) src/unset.c (unset_terminal)
	docs/gnuplot.doc:
	On entry, copy environmental variable GNUTERM to internal variable
	GNUTERM.  Note that starting with version 5.2 this is a string that
	may include terminal options in addition to the terminal name. E.g.
	    GNUTERM="post eps color size 5in,3in" 
	Modify "set term <string>" to look only at the first word of <string>.
	Thus "set term GNUTERM" works as before. Note that "set term @GNUTERM"
	expands and applies the full set of options.
	Fix "unset term" to act equivalently to "set term GNUTERM" as
	documented.

	* term/dumb.trm:  Slightly nicer arrows.

2017-07-05  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.ac docs/Makefile.am term/caca.trm:
	Add caca terminal documentation to the user manual.  Fix segfault on
	"set term caca driver raw".

2017-07-03  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgdiplus.cpp:  Switching the compositing mode to take the
	gamma factor into account for filled polygons not only slows down
	drawing considerably, but also produces output different from
	other terminals or windows back-ends.  So stop doing that.  Also
	scale the linewidth when drawing anti-aliased polygons.  Bug fix.

2017-07-03  Release candidate 5.2.rc1

2017-07-03  Bastian Maerkisch  <bmaerkisch@web.de>

	* term/win.trm:  Cannot use docked graph windows in persist mode as
	the text window will not be shown.

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

	* src/graphics.c (place_raxis):  Raxis was being truncated to R=0.
	I.e. set rrange [90:-30] lost the final quarter of the axis.
	Bug #1370

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

	* src/win/wd2d.cpp:  Fix center of rotation for enhanced text.  Snap
	textbox coordinates to full pixels for vertical or horizontal
	orientation.

2017-06-27  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wd2d.cpp:  Respect the antialiasing setting.  Always clear
	the polygon render target to avoid "ghost" images and enforce its
	size in pixels.

2017-06-26  Ethan A Merritt  <merritt@u.washington.edu>

	* term/dumb.trm:  Core routine apply_lp_properties looks to see whether
	the current terminal lacks color support by testing the equivalence
	(term->set_color == null_set_color). Thus introduction of a non-NULL
	dumb_set_color() routine to support color output had the side-effect of
	losing the distinction between line types without color.  Fix this by
	only listing dumb_set_color() in TERM_TABLE when color mode is active.
	Bug fix.

2017-06-24  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c: Fix incorrect determination of the size of the
	toolbar and the statusbar.

	* src/win/wgdiplus.cpp:  We still need to indicate that text can be
	rotated. Bug fix.

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

	* term/dumb.trm:  Remove debug printout committed by mistake

2017-06-21  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgnuplib.h:  The dot needs not to be included in the number of
	different point types for cycling through.  Bug introduced on 2017-05-13.

2017-06-17  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c src/win/wgnuplib.h:  Remove the doublebuffer
	setting.  It is always enabled.

	* src/win/wgraph.c src/win/wgdiplus.cpp src/win/wd2d.cpp
	src/win/wgnuplib.h:  Remove remnants of the old oversampling code.

2017-06-15  Ethan A Merritt  <merritt@u.washington.edu>

	More corner-case failures found by fuzzing the demo set.

	* term/dumb.trm:  terminal character grid y limit was not checked prior
	to printing text with color+utf8 attributes.

	* src/command.c (print_set_output):  Fix failure to reset flag indicating
	output to a datablock. E.g. "set print $T; set print '-'; show print"

	* src/graphics.c:  Sanity check for well-defined coordinates at the
	corners of an image.  Variable initialization to make compiler happy.

2017-06-14  Ethan A Merritt  <merritt@u.washington.edu>

	* term/svg.trm:  Normalize handling of terminal option "fontscale" to
	match other terminals. Remove obsolete keyword "fsize".

	* src/axis.c (gen_tics) src/contour.c (contour) src/plot2d.c (eval_plots)
	src/set.c (load_tic_series) term/emf.trm term/write_png_image.c:
	Explicitly initialize some variables indicated as suspect by compiler
	option -Wuninitialized.  The one in set.c can cause a real fault;
	the others look like false positives to me but I am not 100% certain.
	Bug #1933

2017-06-14  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wd2d.cpp:  When compiled with D2DDEBUG defined, enable the
	Direct2D debug layer.
