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>

	* configure.ac docs/Makefile.am:  Some systems allow for parallel
	installation of different lua versions (e.g. Ubuntu).  We already use
	pkg-config to test for "lua" and "lua5.1" packages.  This patch extends
	that mechanism to lua5.2 and lua5.3.  Change the name of the lua
	executable used to build the docs of the gnuplot lua terminal
	accordingly.
	Patch #750

	* src/win/wgdiplus.cpp (drawgraph_gdiplus):  Use generic string format
	to determine string extent.  Bug fix.

	* term/caca.trm:  Eliminate compiler warnings.

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

	* src/graphics.c (place_objects):  Error messages from placement of
	circles and ellipses were misleadingly refering to "rect N" instead
	of "object N".

	* src/graph3d.c (map3d_position_r):  Placement of generic objects in
	"set view map" mode should not fail just because the z coordinate is
	non-positive and z is log-scaled.  The projection only uses x and y.

	* src/parse.h src/parse.c src/misc.c (parse_fillstyle):  New utility
	routine is_function(token) for convenience in parsing.

	* src/graph3d.c (draw_3d_graphbox): Clipping area was not maintained
	across this routine, causing object clipping in "set view map" to fail.

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

	* src/graphics.c docs/gnuplot.doc demo/armillary.dem:
	Allow polar (cylindrical) coordinates for circles in 3D plots.

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

	* src/eval.c (update_gpval_variables):  New exported variables giving
	screen coordinates of the 3D plot axial center and radius of the
	enclosing sphere. GPVAL_VIEW_XCENT GPVAL_VIEW_YCENT GPVAL_VIEW_RADIUS.

	* src/graphics.c (place_objects):  Allow placement and size of circles
	in 3D plot to use axis coordinates (used to only allow screen coords).
	As in 2D, the radius of the circle is always scaled to match the x axis
	and the circle itself is always drawn in the plane of the figure.

	* demo/armillary.dem docs/gnuplot.doc:  Document and provide example
	for use of axis coordinates to place circles in 3D.

	* demo/Makefile.am.in: Place quotes around $(GNUTERM) so that multi-word
	definitions do not gum up "make check".

	* src/plot.c src/term.c:  Defer detection of initial terminal type until
	after error handling has been set up.  This allows us to parse GNUTERM
	for terminal options in additional to the bare terminal name.
	E.g. GNUTERM="wxt size 500,500"

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

	* src/command.c (save_command):  Don't use loadpath to choose an
	output directory.

2017-04-02  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/eval.c (update_gpval_variables):  Sanity check the string
	stored in GPVAL_PWD.  However if the current directoty is invalid
	GPVAL_PWD still contains the previous string.

	* src/command.c (pwd_command):  Sanity check the validity of the
	current working directory.

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

	* src/mouse.c term/qt.trm src/qtterminal/qt_term.cpp
	src/qtterminal/QtGnuplotWindow.cpp: The qt terminal assumed that
	"space-raises-console" would be implemented in the core code.
	But it never was.  Instead on non-MSWin platforms hitting <space>
	in the qt window generates a mouse protocol error.
	Document that "space-raises-console" is only for MSWin, and have
	other platforms treat it like any other key.

	* configure.ac src/gplt_x11.c src/wxterminal/wxt_gui.cpp:
	The code chunk in gplt_x11.c that supports space-raises-console for the
	KDE3 konsole was giving compiler warnings.  Rather than fiddle with code
	used by almost no one (it doesn't work under KDE4 or KDE5),
	make KDE3+DCOP support a build-time option:
		./configure --with-x --with-x-dcop

2017-04-01  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/plot.c (main):  Exit with error if dropping privilege fails.

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

	* src/plot2d.h src/plot3d.c src/datafile.c:  Add a slot in the plot
	structure to track a 2nd named sampling variable, e.g.
	    splot [u=1:5][v=1:5] '++' using (u):(v):(u*sin(v))

	* src/plot2d.c src/plot3d.c:  Extend the sampling range parsing to
	track named sampling variables for 2D sampling '++' as well as 1D
	sampling '+'. Minor cosmetic modifications to the 2D and 3D code to
	make it more obviously parallel.

	* demo/sampling.dem:  Add example of named sampling ranges in 3D.

	* src/graph3d.c (do_3dplot):  "set xyplane at 0; set log z; splot..." =>
	no plot drawn.  Change this so that "at 0" for logscale z is treated as
	"xyplane at <Z-axis min>".
	Bugfix.

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

	* src/axis.h (ACTUAL_STORE_WITH_LOG_AND_UPDATE_RANGE)
	src/axis.c (update_primary_axis_range) src/plot2d.c src/plot3d.c
	src/datafile.c (df_generate_pseudodata):

	The nonlinear axis code as originally introduced tracked data min/max
	in the primary (i.e. linear) axis structure.  That was unnecessarily
	complicated since it required a coordinate transformation to update the
	range every time a point was stored.  Also since the current range
	stored in the visible axis structure was not always up-to-date, some
	autoscaling operations during plot layout could fail.
	Now we change this to track data min/max in the secondary (i.e. visible)
	axis coordinate system. At the end of data input and function evaluation
	we call new routine update_primary_axis() just once per nonlinear axis
	to transfer the min/max values to the primary axis structure as well.

	* demo/sampling.dem:  Unit tests for some of the failures addressed
	by this set of changes and a couple that have not been fixed yet.

	* src/axis.h src/plot2d.c:  The macro ACTUAL_STORE_WITH_LOG_...
	no longer needs a special case parameter for the color axis.

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

	* src/datafile.c (df_generate_pseudodata):  Use axes u and v to sample
	pseudofile "++" rather than axes x and y.  This allows for sampling
	ranges that are distinct from the plot axis range, as was already true
	for sampling "+".  The downside of this change is that we don't
	currently support nonlinear sampling on u or v, so it doesn't work as
	well when plotting logscale x or y.

	* src/plot2d.c (plotrequest):  Initialize state of u and v axes.

2017-03-20  Jeremy Green  <jeremyrgreen@users.sf.net>

	* src/graphics.c (plot_betweencurves):  Revised algorithm for filling
	the area between two curves.  Rather than filling adjacent segments
	one by one, trace the outline of the entire filled area.
	This avoids artifacts at the boundaries between segments.

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

	* src/gadgets.h src/graphics.c (plot_border):  Range-limited y2 axis was
	drawn in the wrong direction (top-to-bottom rather than bottom-to-top).
	If the top plot border was drawn also, this resulted in a spurious
	diagonal line across the plot.
	Bug #1921

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

	* src/interpol.h src/interpol.c src/plot2d.c docs/gnuplot.doc:
	Clean up code, documentation, and demos for the 'bins' option.
	- document the algorithm for choosing bins
	- binrange defaults to min/max of current data set (not axis range)
	- trap degenerate case of all points UNDEFINED
	- new option binwidth=<width>. Now you can either determine binwidth
	  from range + nbins, or nbins from range + binwidth

	* src/plot2d.c src/tables.c:  "smooth bins" is the same as "bins".

	* src/set.c (set_table):  The "set table <filename>" command was not
	doing tilde expansion on filename.

	* src/datafile.c (df_open):  If the previous plot command plotted from
	an array by name, try to retrieve that array by name for a subsequent
	plot that uses the special filename '' or "". E.g.
	    plot Array with lines, '' with impulses

	* configure.ac:  enable/disable comment for stats command was reversed

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

	* src/graphics.c (plot_impulses) docs/gnuplot.doc:  Apply the x offset
	created by "set jitter" to 2D plots with impulses.

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

	* docs/gnuplot.doc:  Restore EXPERIMENTAL warning to documentation for
	the "bins" plotting option (it had been removed 2017-02-19).  We may
	consider changing the interpretation of binrange [min:max] to be more
	consistent with R, so warning that "implementation details may change
	before inclusion in a stable release" is appropriate.

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

	* src/plot2d.c (eval_plots):  Do not enforce cbrange validity if the
	palette is unused by this plot.  Prevents spurious error from "set log"
	with default cbrange.
	Bug #1920

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

	Deal with various corner-case failures found by fuzzing the demo set.

	* src/hidden3d.c (build_networks):  A degenerate polygon can fall all
	the way through the classification loop, leaving the flag value -2 as
	the polygon number which is then used as an array index.  Oops.

	* term/dumb.trm (DUMB_options): Sanity check terminal size.

	* src/plot2d.c (eval_plots): Dummy variable must not be an array.
	E.g.  array t[10]; set dummy t; plot t

	* src/plot2d.c (get_data):  Defer initialization of parallel plot data
	structures so that it catches both "set style data parallel" and
	"with parallel".  Example failure case:
	set style data parallel; plot 'silver.dat' using 1:2:3 lc var

	* src/plot2d.c (eval_plots): Recently added stringent tests on axis
	scaling caused "plot with table" to fail because the y axis range is
	undefined. Skip the tests for this plot style.

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

	* src/command.c (plot_command splot_command) src/gplt_x11.c
	src/qtterminal/QtGnuplotScene.cpp src/wxterminal/wxt_gui.cpp:

	The toggle status of all plots (plot visible or hidden) was being reset
	in the terminal driver on every clear() event.  This caused the toggle
	state to be lost when the plot was rotated/panned and on refresh/replot.
	Now we do away with the automatic reset in the terminal drivers.
	Instead we send term->modify_plots(MODPLOTS_SET_VISIBLE, -1) as part of
	the plot and splot commands.

2017-02-27  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/wxterminal/wxt_gui.cpp:  Rename static int yield to avoid
	name conflict on Solaris 10.
	Bug #1914

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

	* src/stdfn.c:  Clarify warning message for abnormal exit.
	Bug #1913

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

	* src/interpol.c (do_cubic) docs/gnuplot.doc:  Document that smooth
	options (splines and bezier variants) are sensitive to blank lines and
	undefined values in the input data. Curves are fit separately to each
	uninterrupted subset of the original data. Curve segments that are
	entirely out of range on x are now ignored rather than triggering a
	error message.
	Bug #1911

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

	* src/term.c (term_initialise):  Revise the test for output of binary
	data to the wgnuplot text window by checking if the terminal actually
	writes to output.  Fixes caca output to a console window in wgnuplot.
	Bug #1912

	* demo/borders.dem demo/boxclusters.dem demo/boxplot.dem
	demo/circles.dem demo/ellipse.dem demo/ellipses_style.dem
	demo/histograms.dem demo/histograms2.dem demo/matrix_every.dem
	demo/mgr.dem demo/molecule.dem demo/orbits.dem demo/parallel.dem
	demo/probably_tux.dem demo/solar_path.dem demo/special_chars.dem
	demo/stats.dem demo/ttics.dem demo/world2.dem:
	End all demos with 'pause -1; reset'.  Set encoding to utf8 when
	required.

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

	* src/plot2d.h src/plot2d.c src/interpol.c: Remove the EXPERIMENTAL
	warning and conditional compilation for "smooth bins".

	* src/datafile.c (df_readbinary) src/plot2d.c (get_data):
	Version 5 intentionally returns input data with a flag UNDEFINED rather
	than skipping the point altogether. Unfortunately the binary data input
	path failed to clear/initialize/set-to-NaN the value returned from
	function evaluation during binary data input. Now we explicitly set NaN
	in additional to returning DF_UNDEFINED.
	This fix is incomplete because store2d_point() later overwrites the
	UNDEFINED flag, which is almost certainly the wrong thing to do.
