Release 5.2.2

2017-11-15  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.

	* src/win/winmain.c (WinExit):  Missing cleanup of Direct2D resources.

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

	* win/README-Windows.txt:  Update to version 5.2.

	* src/win/wgdiplus.cpp:  Cleartype text antialiasing seems to be only
	applied to horizontal text.  Use grayscale antialiasing for rotated
	text.

	* src/win/wgdiplus.cpp (InitFont_gdiplus):  Fix double application of
	fontscale.

	* src/win/wgraph.c (WriteGraphIni):  Only save window size and position
	for standalone graph windows.

	* src/win/wd2d.cpp (W_line_width):  Enforce a minimum line width of 1
	pixel to avoid tiny dash patterns for grids in polar plots.

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

	Fix unhandled corner cases and improper command sequences found by
	afl-fuzz testing gnuplot input scripts:

	* src/util.c (gprintf):  Sanity check for NULL format

	* src/datafile.c (df_open):  Sanity check to catch "plot '+' binary ..."

	* src/gadgets.c (do_timestamp):  prevent early exit from do_timelabel
	from corrupting the timestamp structure

	* src/axis.c (clone_linked_axis):  Sanity check that inverse mapping
	function does not yield NaN at axis range endpoints.

	* src/graphics.c (process_image):  Sanity check for empty image data
	structure.

	* src/internal.c (f_power f_value):  Initialize imaginary component
	of returned value in case anyone ever looks at it.

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

	* src/show.c (show_version):  Remove obsolete configuration options
	from the list shown by "show version long".

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

	* src/graphics.c (plot_border):  Autoscaled rrange should not disable
	polar border.  Polar border should not be clipped to xy border.

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

	* config/msvc/Makefile:  Enable Unicode build.  Add missing user32.lib
	for gnuplot_qt. Set version number to 5.2.

	* config/mingw/Makefile:  Enable release build.

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

	* src/term.c (init_terminal):  Keep wxt as default terminal on Windows
	(as in version 4.2-5.0).

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

	* src/datablock.c(datablock_command):  Reorder sanity checks so that an
	improper command (e.g. "$DATA = foo") does not clobber the previous
	content of $DATA.

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

	* term/util.c (gprintf):  Do not use LaTeX formatting in tabular output.
	Bug #1931

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

	* src/gadgets.c src/plot.c src/term.c:  A 2017-04-10 patch re-ordered
	initialization of the session state, the default terminal, and error
	handling. This had the undesirable effect that a command in ~/.gnuplot
	that queried the terminal state would segfault because the terminal
	had not yet been initialized. Now we reorder again to (1) error handling
	(2) terminal init (3) session state from ~/.gnuplot.  For safety also
	add sanity checks in load_linetype() so that term == NULL does not
	segfault.

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

	Changes above this line will appear first in 5.2.rc2 if there is one,
	otherwise in 5.2.0.

2017-05-31  Release candidate 5.2.rc1

2017-05-30  (Debian /debian-science/packages/gnuplot.git/)

	* term/post.trm:  Do not emit Author field containing current username.

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

	* src/win/wgraph.c (GraphEnd):  Let the gnuplot core know the current
	window ID.

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

	* Makefile.maint README RELEASE_NOTES configure.ac docs/Makefile.am
	ReleaseNotes.css: Continued preparation for 5.2 release.

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

	* src/qtterminal/qt_term.cpp (qt_waitforinput):  The Windows code waits
	for the named pipe internally used by the QLocalSocket object. But in
	some cases the Qt object itself will not provide new data.  Handle
	that case by Sleep()ing to release the CPU instead of idling rapidly.
	Bug fix.

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

	* src/term.h:  Reenable dxf terminal in default build.  Apparently it is
	still usable despite having been neglected for ~30 years.  Nevertheless
	it would be nice if someone put in the effort to update it to the 2012
	DXF standard.

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

	* Branchpoint for 5.2 (cvs tag -b branch-5-2-stable)

	* VERSION PATCHLEVEL docs/gnuplot.doc docs/titlepag.tex src/version.c
	configure.ac:

	Bump version info to 5.2.rc0
	This is not an actual release, just an internal identifier while we
	assemble and test a first real 5.2 release candidate.

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

	* docs/gnuplot.doc:  Various trivial tweaks to improve the layout and
	formatting of pdf documentation . Revised text for sampling,raise/lower,
	and pseudo-files '+' and '++.

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

	* term/win.trm src/win/wgraph.c src/win/wgdiplus.cpp
	src/win/wd2d.cpp src/win/wgnuplib.h:
	Pointscale option for the windows terminal.

2017-05-20  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/winmain.c (ConsoleHandler) src/plot.c|h (terminate_flag)
	src/readline.c (readline):  Add an event handler to catch "close"
	signals to console mode gnuplot on Windows.  These events are passed
	on to the main thread to terminate cleanly.
	Bugs #1916, #1917, #1918

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

	* src/command.c src/fit.c src/fit.h src/tables.c src/tables.h
	docs/gnuplot.doc:  Deprecate command "update" in favor of new command
	"save fit <filename>".  "update" will remain in version 5.2 for backward
	compatability but will eventually go away altogether.

2017-05-19  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/term-ja.diff docs/faq-ja.tex docs/gnuplot-ja.doc:
	Sync Japanese documentation to doc version 1.1080

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

	* docs/gnuplot.doc
	term/ai.trm term/corel.trm term/djsvga.trm term/dxf.trm term/dxy.trm
	term/emxvga.trm term/epson.trm term/excl.trm term/ggi.trm term/grass.trm
	term/hp500c.trm term/hpljii.trm term/hppj.trm term/mif.trm term/pbm.trm
	term/pc.trm term/regis.trm term/vws.trm:
	Flag bitmap and legacy terminals in the documentation.

	* src/term.h: Remove legacy terminals from the default build.
	corel (postscript variant of CorelDraw format circa 1995)
	dxf (Autocad DWGR10 format circa 1988)

	* docs/README docs/doc2tex.c: New markup ^#TeX in gnuplot.doc signals
	that the rest of the line is a LaTeX command to be passed through
	verbatim to the *.tex output stream.  Ignored by other doc2foo paths.

	* docs/gnuplot.doc docs/plotstyles.gnu:  Add figure for "with vectors".

2017-05-18  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot.doc: typos, missing section for "set mttics".

	* docs/doc2rtf.c docs/doc2texi.el:  Support for bulleted lists.

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

	* src/mouse.c:  Allow "bind 'shift-Button1' 'something'".
	Previously the shift key was ignored.

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

	* src/win/wgraph.c (MakeFonts):  Revert accidental change made in
	revision 1.247.

	* src/win/wgraph.c (MakeFonts):  Handle empty type face name (GDI).
	Bug #1860

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

	* demo/Makefile.am.in src/fit.c:  Suppress creation of fit log file
	during "make check".

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

	* docs/windows/doc2html.c:   Support bulleted lists at top level
	(i.e. not in a table).

	* src/term.c (do_arc):  Remove hack for the windows terminal which was
	meant to fix the drawing of circles, but broke it.  Note that there are
	similar cases in the code (ellipses) where a hack like this is actually
	necessary.  Further investigations required.
	Bug #1880

	* term/win.trm:  Update windows terminal help text to current status.

	* docs/gnuplot.doc:  Add a few more items to the section describing new
	features.

	* src/win/wgraph.c:  Use radio buttons to indicate the current backend
	selection.

2017-05-13  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgnuplib.h src/win/wgraph.c src/win/wgdiplus.cpp
	src/win/wd2d.cpp:  Replace defines for commands and point symbol types
	by enums.

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

	* docs/doc2tex.c docs/doc2gih.c:  Support bulleted lists at top level
	(i.e. not in a table).

	* NEWS docs/gnuplot.doc:  Revise the section describing new features.

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

	* src/win/wgraph.c src/win/wd2d.cpp|h:  Reorganize initialisation of
	the Direct2D backend to correctly init font related terminal properties.

	* src/win/wd2d.cpp (d2dSetFont):  Missing init of indicator that text
	can be rotated.

	* src/win/wgraph.c (WM_SIZE):  Track canvas (and window) size.

	* src/win/wd2d.cpp (D2DCOLORREF):  Replace macro by an inline function.

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

	* src/term_api.h src/set.c term/cairo.trm term/post.trm:
	In order to scale up an existing plot uniformly, e.g. for printing
	a poster-size PostScript or PDF file, it is convenient to be able to
	give the scale factor in the "set term" command.  We already offer
	"set termoption {linewidth <factor>} {fontscale <factor>}".  This patch
	adds "set termoption {pointscale <factor>}" to scale up pointsize.

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

	* src/eval.c:  Add some DEBUG_* variables to help diagnose problems on
	other people's machines.

	* src/show.c src/variable.h:  All of the *_handler(ACTION, PARAM) calls
	are hidden by macros defined in variable.h except for ACTION_SHOW.
	Wrap these calls in a macro also.

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

	* term/canvas.trm:  Fix incorrect initialization of axis width/height.
	Bug #1925

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

	* src/fit.c (backup_file) demo/fit.dem docs/gnuplot.doc:
	The "update" command has not worked exactly as documented since
	version 4.something.  Revise the documentation and the support code.
	Remove pointless use of "update" from the fit demo.

	* docs/gnuplot.doc demo/cerf.dem demo/complex_trig.dem
	demo/heatmaps.dem demo/pm3d_lighting.dem demo/rgb_variable.dem:
	Update demos in accordance with the recent change to have '++' sample
	on u and v rather than x and y.

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

	* src/win/wgdiplus.cpp:  Graphics::MeasureString did not take trailing
	spaces into account. Bug fix.

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

	* src/command.c (do_system):  Report return code of (_w)system()
	also on Windows.

2017-04-24 Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* src/command.c (report_error): Dummy up WEXITSTATUS(ierr) as a no-op
	for _WIN32.

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

	* src/win/wd2d.cpp|h src/win/wgraph.c src/win/wgdiplus.cpp|h
	src/win/wgnuplib.h src/win/winmain.c src/win/wresourc.h
	term/win.trm config/mingw/Makefile config/msvc/Makefile
	config/config.nt config/config.mgw:

	New windows terminal backend which uses Direct2D and DirectWrite
	instead of GDI+ or GDI.  It uses graphic card acceleration and is hence
	typically much faster.  DirectWrite offers a much superior text
	rendering quality in particular for rotated text.  The terminal is
	feature-complete for drawing to the screen.  Printing, copying to
	clipboard and saving of EMF fall back to the GDI+ code.  Pattern
	fill is still implemented using GDI+ and is slow.  As of now, this code
	is considered experimental.

	* src/win/wgraph.c src/win/wcommon.h (draw_image):  Make static.

	* src/win/wgraph.c src/win/wgdiplus.cpp:  Off-by-one error in
	mapping of graph coordinates.

	* src/win/wgdiplus.cpp (SetFont_gdiplus):  Fix memory leak and
	simplify a bit.

	* src/win/wgdiplus.cpp:  Use a compatible bitmap for cached
	point symbols.  Eliminates artifacts on some systems.

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

	* src/command.c (do_system do_system_func report_error) src/eval.c
	docs/gnuplot.doc:

	Introduce new user-visible variables GPVAL_SYSTEM_ERRNO and
	GPVAL_SYSTEM_ERRMSG that hold the status returned by
	    system "some command"
	    ! "some command"
	    foo = system("some command")
	    foo = "`some command`"

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

	* src/win/wgdiplus.cpp: Correct calculation of vertical drawing position.
	Corrects differences between position of point symbols and error bars.

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

	* src/wxterminal/gp_cairo.cpp (gp_cairo_boxed_text): Scale linewidth of
	textbox border by the current terminal linewidth setting.
	Bug #1825

	* src/gadgets.h src/gadgets.c src/save.c src/set.c docs/gnuplot.doc:
	Add a "linewidth" property to the textbox style.

2017-04-19  Bastian Maerkisch  <bmaerkisch@web.de>

