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:

	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.

