2017-03-17  Release 5.0.6

	PATCHLEVEL etc:  Bump versioning to 5.0.6 for release

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

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

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

	* src/qtterminal/QtGnuplotEvent.h: Move new enum GEPID (2017-02-25) to
	end of enum list rather than in the middle.  Otherwise the gnuplot_qt
	built for 5.0.6 is incompatible with gnuplot executables 5.0.0-5, which
	makes comparison of multiple versions to debug things harder than it
	needs to be.  If the new event is at the end, all earlier gnuplot 5.0.x
	versions can share gnuplot_qt 5.0.6.

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

	* 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

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

	* config/msvc/Makefile:  Support building 32 and 64 bit variants.
	Include Manifest files. HTML help compiler is located in 32 bit program
	folder.  

	* config/msvc/Makefile (#QTDIR, TOP, MOC, UIC, RCC, S, W, WX, Q)
	(T, D, M, {$(S)}.c.obj, {$(S)}.c.cobj, $(HELPFILE), doc2html.exe)
	($(M)bf_test.exe, demo_plugin.dll): Reduce slightly excessive use
	of double backslashes. Changes by Hans-Bernhard Broeker.

	* config/mingw/Makefile:  Enforce calling the lua executable instead
	of the lua wrapper script of Mingw64.

	* src/win/wgdiplus.cpp src/win/wgnuplib.h src/win/wtext.c
	src/wixterminal/wxt_gui.cpp term/caca.trm term/win.trm:  Eliminate a few
	compiler warnings.

2017-03-02  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
	by some terminal drivers 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-28  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c src/win/wgdiplus.cpp:  Positioning of rotated text
	depends on the currently selected font and in particular on the font
	size.  Bugfix.

	* src/win/wgraph.c src/win/wgdiplus.cpp|h (InitFont_gdiplus):
	Determine initial font metrics etc. using the correct API (GDI/GDI+)
	instead of always using GDI.  Take actual canvas size into account.
	Bug fix.

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

	* configure.in:  Bump versioning to 5.0.6pre in preparation for release

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

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-25  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/mingw/Makefile:  Optionally use pkg-config to use gdlib.
	Required with recent updates of MSYS2/Mingw-w64.  New variable
	CWFLAGS for warning flags to be put last in CFLAGS in order to
	overwrite e.g. -Wall.  New target "7z" which is similar to the "zip"
	target but outputs a 7-zip packed binary package.  Resource target
	depends on manifest files.  Use C++11 mode. Omit C++ flags when
	building gp_cairo.c.  Use local the build of gnuplot to create plots
	for the turorial.

	* config/mingw/Makefile:  Collecting all required DLLs for a Windows
	binary package can be tedious.  When activated via the DLLS=1 option,
	we now try to at least automatically copy all DLLs from Mingw-w64.
	Applies to targets `install`, `installer`, and `zip`.

	* src/set.c (set_degreesign):  Remove special Windows code since we
	cannot rely on the locale on this platform.  Fixes degree sign for
	UTF-8 encoding.

	* src/set.c (encoding_micro):  Fix micro sign for CP1252 and add a few
	more encodings, including CP437 and CP850.

	* src/win/wgdiplus.cpp:  Default GDI+ dash patterns use a very narrow
	spacing which does not scale with the line width.  We now use our own
	custom dash patterns which resemble the GDI default patterns for unit
	line width.  This in particular improves the appearance of grid lines
	in polar plots.

	* 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/mgr.dem demo/molecule.dem
	demo/orbits.dem demo/parallel.dem demo/special_chars.dem
	demo/stats.dem demo/world2.dem:
	End all demos with 'pause -1; reset'.  Set encoding to utf8 when
	required.

	* docs/plotstyles.gnu:  On Windows, use "Tahoma" instead of "Times"
	"Times New Roman".  The former is not available and the later does not
	provide the characters required by the 2nd "with labels" plot.  Scale
	down fontsizes to better fit the size of the plots.

	* src/win/winmain.c (WinRaiseConsole):  Raise pause message box instead
	of the text window during pause.

	* src/mousecmn.h src/qtterminal/qt_term.cpp
	src/qtterminal/QtGnuplotEvent.h
	src/qtterminal/QtGnuplotWindow.cpp|h: Enable space-raises-console
	and terminal option "raise" for qt on Windows.  Since gnuplot and
	the qt terminal are realized as two different processes, the
	currently active process has to allow the other to "raise" itself.

2017-02-25  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* config/mingw/Makefile:  Enforce calling the lua executable instead
	of the lua wrapper script of Mingw64.

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

	* src/gadgets.c src/save.c src/show.c: save/show style arrow was
	showing incorrect settings for head/heads/backhead, and reporting
	LT_DEFAULT as an actual line type.

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

	* term/svg.trm term/write_png_image.c:  Backport svg terminal from 5.1.
	Generated bitmap images are embedded rather than being stored as
	external *.png files.  This version contains support for the "domterm"
	terminal emulator (http://domterm.org) that can display svg graphics
	in-line.

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

	* 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.
	Bug #1911

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

	* src/misc.c (arrow_use_properties): If an arrowstyle has no explicit
	linetype or color, apply the current plot linecolor. This prevents 3D
	vector plots with a default linetype from being colored as if they
	were "lc palette z".
	Bug #1869

	* src/hidden3d.c:  Arrowhead properties were being applied as each plot
	was set up. This doesn't work in hidden3d mode because arrows from 
	multiple plots are sorted jointly and drawn later.  Arrowhead style must
	be applied separatedly for each arrow.
	Bug #1492

2017-02-10  Mojca Miklavec  <mojca.miklavec.lists@gmail.com>

	* src/qtterminal/qt_term.cpp term/aquaterm.trm:
	Make the the "set term ... linewidth" option more like other terminals.

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

	* term/aquaterm.trm term/qt.trm src/qtterminal/qt_term.cpp term/wxt.trm:
	Add "linewidth <lw>" to the list of options accepted for "set term" or
	"set termoption".

	* configure.in term/qt.trm:  Qt4 info only printed for Qt4 build.
	Bug #1905

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

	* src/hidden3d.c (build_networks):  Hidden3d structures were not
	correctly initialized for "splot with dots".
	Bug #1904

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

	* demo/boxclusters.dem demo/html/*:  Add demo to collection.

	* src/gplt_x11.c:  Zero out each command string as it is freed.
	I am not sure this fixes a reported use-after-free segmentation error
	but it can't hurt.
	Bug #1866

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

	* src/graph3d.c (plot3d_points) src/gadgets.{ch} src/graphics.c:
	Apply pointinterval property to splot with linespoints.

	* src/hidden3d.c: Apply pointinterval property in hidden3d mode also.

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

	* src/util.c (print_line_with_error):  Replace macros
	PRINT_MESSAGE_TO_STDERR PRINT_SPACES_UPTO_TOKEN PRINT_FILE_AND_LINE
	with new utility routine.  Add code to reconstruct the original input
	line number by counting \n characters embedded in a command line
	produced by concatenation of successive lines in a bracketed clause.
	Backported from 5.1

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

	* src/datafile.c (df_determine_matrix_info):  Check and report error
	return from fseek, which cannot work if the input stream is a pipe.
	Now you get: "seek error in binary input stream - Illegal seek" instead
	of the non-informative "File doesn't factorize into full matrix".
	Bug #1901

2017-01-24  Stefan Althoefer  <stefan-alth@users.sourceforge.net>

	* term/js/gnuplot_mouse.js:  Improved placement of hypertext and 
	mouse-click output. Fix multiline hypertext.

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

	* term/canvas.trm term/svg.trm term/js/gnuplot_mouse.js:
	Mouse support for inverted r axis (which core code doesn't yet support).

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

	* term/pslatex.trm:  Do not write postscript comments in output stream
	to cairolatex terminal.
	Bug #1898

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

	* src/set.c (parse_label_options):  Save label z value into its point
	colorspec as well as its text colorspec
	Bug #1897

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

	* src/datafile.c (f_dollar f_column df_readascii):
	Version 5 was supposed to do away with differences between data read
	by 'plot ... using N' and 'plot ... using ($N)'. It turns out that was
	not true with regard to missing data.  If the "missing" flag is present
	in the data then 'using N' catches it but 'using ($N)' does not.
	The problem is that ($N) and (column(N)) and "header_of_N" all invoke
	expression evaluation, which has had no mechanism to indicate a missing
	value on return rather than NaN.  This patch overloads the imaginary
	slot of a complex NaN value to hold DF_MISSING rather than 0.0 on return
	from f_dollar() and f_column() as appropriate.  For convenience the body
	of f_dollar() is replaced by a pass-through to f_column() so that both
	routines behave the same way.
	Bug #1896

	* src/plot2d.c (get_data) src/set.c src/show.c docs/gnuplot.doc:
	The fix for bug #1896 did not address the case where a missing value is
	encountered during evaluation of an expression.  E.g. 'using ($1+$2)'
	when there is missing data in either column 1 or 2 will evaluate to NaN.
	This patch adds an additional option 'set datafile missing NaN' that
	tells gnuplot to treat NaN data values as missing rather than invalid.
	Based on patch #725 (Christoph Bersch)

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

	* src/save.c (save_linetype):  Save and show commands were failing to
	list linecolor for lines that were originally specified as "lt -1".

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

	* docs/gnuplot.doc:  Clarify the meaning of the binary file keyword
	"transpose".  Provide index entries for all binary file keywords.

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

	* src/win/wgraph.c (drawgraph):  Fix incorrect detection of a
	metafile device context which caused point symbols to be drawn as
	a bitmap.

	* src/util.c (strappend):  Fix insufficient memory allocation.

	* src/qtterminal/QtGnuplotWindow.cpp (print):  QPrinterDialog
	requires a parent on Windows.

	* src/win/winmain.c (open_printer):  Open temporary file in binary mode
	as required e.g. for PDF data.

	* src/win/wprinter (DumpPrinter):  The Escape() PASSTHROUGH function
	was included in Windows 3(!) for backward compatibility with earlier
	versions and is no longer supported by some printer drivers.  Detect
	that and display an error message.

	* src/win/wgraph.c src/win/wgdiplus.cpp|h (InitFont_gdiplus):
	Determine initial font metrics etc. using the correct API (GDI/GDI+)
	for no-enhanced text instead of always using GDI.  Take actual canvas
	size into account.  Note that version 5.0 still uses GDI to draw
	enhanced text.

2017-01-02  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* term/aquaterm.trm (ENHAQUA_put_text):  aquaterm was ignoring
	ignore_enhanced_text;  i.e. you could not bypass enhanced text 
	processing.

2016-12-28  Ethan A Merritt  <merritt@u.washington.edu>

	* src/set.c: Do not allow the axis range on polar axis R to invert.
	Bug #1880

2016-12-19  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c src/unset.c:  Accept only polar_grid_angle > 0.
	Bug #1888

2016-12-15  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c:  Fuzz-testing found a crash from trying to adjust the
	range of a boxplot containing no points.

	* src/pm3d.c:  The combination 'set pm3d depthorder interpolate N,M'
	was not correctly tracking memory allocation.
	Bug #1884

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

	* src/unset.c (reset_command):  Reset border layer to "front".

	* src/graph3d.c: Revert unsuccessful changeset (2016-11-29) that
	tried to make layering of the plot border components correct in all
	cases by default.  It broke as many cases as it fixed.

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

	* term/gd.trm: It is only by historical accident that the gd terminal
	tracks font size as an integer.  Make it a double so that fractional
	font sizes are possible.

2016-12-02  Ethan A Merritt  <merritt@u.washington.edu>

	* term/gd.trm (PNG_set_font): Repair a read past end of string error
	found by valgrind.

	* src/plot3d.c: Initialize vector of data values so that incomplete 
	data lines do not result in passing uninitialized values to
	STORE_WITH_LOG_AND_UPDATE_RANGE

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

	* term/pdf.trm:  Mark this terminal as DEPRECATED. GmbH dropped support
	in 2007 for the free (as in beer) but license-restricted version of
	PDFlib.  The --with-pdf configuration option remains unchanged for now
	but will be removed in a future gnuplot release (probably 5.2).

	* src/qtterminal/QtGnuplotScene.{cpp,h}: Track current fillstyle so that
	qt terminal can distinguish between opaque and transparent pattern fill.

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

	* src/boundary.c:  Better adjustment of plot x2label and plot title when
	x2tics are enabled.

	* src/graph3d.c:  Avoid writing zlabel twice when 'set grid defaultlayer'.
	Bug #1277

2016-11-03  Craig DeForest  <zowie@users.sf.net>

	* src/datafile.c (plot_option_binary):  Interpretation of dimensions
	given via "binary record=(a,b)" contridicted that for dimensions given
	via "binary array=(a,b)".  This caused mangling of image data read in
	using the "record" keyword.  Change the interpretation to match that 
	of "array".
	Bug #1873

2016-10-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c src/plot3d.c: Recent reorganization of next_iteration()
	code makes it unnecessary to separately track highest iteration in each
	plot clause.

2016-10-26  Thomas Sefzick <t.sefzick@fz-juelich.de>

	* src/plot2d.c: Never decrease value of highest_iteration.
	Avoids missed plots when a plot command contains more than one
	iteration and the last iteration is shorter than the others.
	Bug #1871

2016-10-21  Ethan A Merritt  <merritt@u.washington.edu>

	* src/eval.c src/save.c src/set.c src/show.c src/tables.c src/tables.h
	src/unset.c src/util.c src/util.h demo/special_chars.dem:
	New command "set micro" tells gnuplot to use an encoding-specific
	character sequence rather than "u" for the micro sign (unicode U+00B5)
	used as a prefix in scientific notation.  This affects the "%c" format
	used by gprintf() to label axis ticks.

	* term/pslatex.trm:  For pslatex, epslatex, cairolatex "standalone"
	option, if the current encoding is utf8 then put a line in the output
	/usepackage[utf8x]{inputenc}
	Note that [utf8x] (not [utf8]) is needed to correctly process the 
	degree sign and micro characters.

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

	* src/parse.c src/parse.h demo/iterate.dem:
	Backport revised iteration code from development version, including
	dynamic reevaluation of start/end limits in nested iterations.
	This allows an inner loop to reference a variable from an outer loop:
	E.g.    for [i=1:N] for [j=i:i+1] f(i,j)
	Bug #1817

2016-10-15  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgdiplus.cpp:  Take fontscale into account. Bugfix.

2016-10-15  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/command.c (timed_pause) src/stdfn.h (GP_SLEEP):  Enforce usage of
	win_sleep() even if usleep() is available.
	Bug #1867

	* src/win/wgraph.c src/win/wmenu.c src/win/wtext.c:  Argument of the
	function ShowWindow is not a boolean.

	* src/win/wgdiplus.cpp (W_image):  Draw images with GDI+ using nearest
	neighbour interpolation.

	* src/win/wgraph.c (drawgraph):  Missed to recreate the brush in case
	of fractional solid fill was requested. Bugfix.

	* src/win/wgdiplus.cpp:  Use StringFormat::GenericTypographic() to draw
	text.  This reduces differences in text placement between GDI and GDI+
	output.

	* src/win/wgraph.c src/win/wtext.c:  Ensure proper initalisation of the
	font chooser dialog also on non-english systems by using the LOGFONT
	fields to request bold or italic fonts instead of using strings.
	Request scalable fonts only, to ensure fonts can be scaled or rotated,
	or offer (some) Unicode characters.

	* src/win/wgraph.c (MakeFonts):  Calculation of hchar and vtic lost
	precision.  Bugfix.

2016-10-13  Ethan A Merritt  <merritt@u.washington.edu>

	* src/wxterminal/wxt_gui.cpp:  Screen refresh must hold mutex lock,
	failure is triggered by resizing active plot window by dragging mouse.
	Bug #1845.

2016-10-09  Release 5.0.5

	PATCHLEVEL etc:  Bump versioning to 5.0.5 for release

2016-10-01  Daniel J Sebald <daniel.sebald@ieee.org>

	* QtGnuplotItems.{h|cpp} (QtGnuplotEnhancedFragment::width):
	Introduce a true string width function rather than using boundingBox(),
	which ignores leading or trailing whitespace.  This repairs enhanced
	text overprint and place-holder markup in the qt terminal.
	Bug #1863

2016-09-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c (eval_plots):  Initialize fillcolor.

	* src/stats.c: Do not use columnheader as a prefix for "stats" unless it
	is specifically requested. 

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

	* src/pm3d.c (set_plot_with_palette): When checking for plot elements 
	that refer to palette coloring, go through the list of objects also.

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

	* src/set.c docs/gnuplot.doc:  Ignore "set termopt {dashed|solid}".
	Remove use of this option from the manual.

2016-09-14  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c (drawgraph):  Fix a GDI resource leak which is
	only important when opening and closing a massive number of different
	graph windows.

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

	* src/graph3d.c (setup_3d_box_corners):  2016-09-06 revision to which
	plot edges have tic labels attached should not have been applied to
	"set view map" mode.

2016-09-12  Bastian Maerkisch  <bmaerkisch@web.de>

	* config/config.nt (HAVE_ERF, HAVE_ERFC, HAVE_STDBOOL_H, isnan
	EAM_OBJECTS):  Version dependent macros to enable compilation
	with at least VS2012 or newer.

	* src/win/wgnuplib.rc:  Change (nominal) font size of most dialogs to
	8pt in order to match Windows default settings.

	* src/win/wgraph.c src/win/wgdiplus.cpp (W_hypertext):  Use the
	encoding which was active while plotting (not the current one) to
	display hypertext.

	* src/win/wgdiplus.cpp:  Fix a resource and memory leak.

	* src/win/wpause.c:  Use default GUI font (not the archaic system font).
	Match the size of the dialog box to the actual length of the message.

	* src/win/wtext.c (UpdateScrollBars):  The size of the scroll bar
	thumb reflects the length or width of the scrollable area.

	* src/win/wtext.c:  Ctrl-C copies to clipboard if there's selected text
	or sets the Ctrl-C (break) flag otherwise.

	* src/win/wgraph.c src/win/wmenu.c:  Use TB_ADDBUTTON instead of
	TB_LOADIMAGES to load standard icons as this somehow eliminates
	a resource leak.

2016-09-07  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/graph3d.c (setup_3d_box_corners): Add quandrant processing for
	surface_rot_x similar to that for surface_rot_z.  This fixes
	inconsistent borders drawn when the base is upside down.
	Bug #1810

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

	* src/tabulate.c( imploded ): The smoothing routine cp_implode()
	creates a new set of plots separated by dummy UNDEFINED points.
	However data files use a blank line to separate curves.  Thus
	  "set table foo; plot ... smooth freq"
	creates a file foo that is not in standard format, creating problems
	if it is read back in to plot later.  This patch replaces each
	UNDEFINED point with a blank line when smoothed data is tabulated.
	Bug #1274

	* src/stats.c: In the case of 'stats foo prefix columnhead' check that
	the string found in the column header is a legal identifier (i.e. rule
	out numbers and punctuation).

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

	* src/stats.c:  Track and report number of lines treated as column 
	headers rather than as data.

	* src/show.c:  Show state of 'autotitle columnheaders' even if the key
	is currently unset.

	* docs/gnuplot.doc:  Update sections referring to columnheaders.
	Note that the effect of `set key autotitle columnhead` extends to
	stats and fit commands, and applies even if the key is unset.

	* src/datafile.c (df_open):  Guarantee that first line of data is
	skipped if 'set key autotitle columnhead' is in effect regardless of
	whether the column headers are used.
	Bug #1751

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

	* src/datafile.c (df_generate_pseudodata):
	Grid coordinates generated by splot '++' are subject to round-off error.
	This error is most noticeable at the plot boundary, where it may be that
	(sample_min + nsteps * stepsize != sample_max). This is more likely to
	be visible on 32-bit systems than on 64-bit systems.
	Force the final grid coordinate to be exactly sample_max.
	Bug #1850

2016-09-01  Ethan A Merritt  <merritt@u.washington.edu>

	* term/pslatex.trm:  The begin/end of plot bookkeeping of internal state
	that would otherwise be done by PS_layer() needs to be done instead by
	the replacement routine PSLATEX_layer().  In particular the final line
	a plot needs to be stroked and the linetype reset.
	Bug #1852

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

	* src/wxterminal/wxt_gui.cpp (wxtFrame::OnExport):  Revisit the file
	export widget. I misread the code previously, thinking there was only a
	single global command list. Actually there is a global pointer but each
	window has its own command list.  So we really can export inactive plots
	as well as the active plot.  The global command list pointer is now
	unused so get rid of it.
	Bug #1843

	* src/color.c src/set.c src/gadgets.c src/gadgets.h src/tables.c
	src/tables.h src/save.c docs/gnuplot.doc:  New keyword
	"set colorbox {{no}invert" flips the top/bottom orientation of a
	vertical gradient; i.e. the same color maps to the same numerical value
	but the orientation of the sample is inverted.  Display of horizontal
	gradients is not affected.
	Tracker issue #1808

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

	* src/plot2d.c (refresh_bounds box_range_fiddling): Improved autoscaling
	of plots "with boxes". Extend y range to 0. Distinguish between absolute
	and relative boxwidth.
	Bug #1827

	* src/datafile.h src/datafile.c src/stats.c docs/gnuplot.doc:
	Rearrange the order in which we parse the "stats" command.
	This allows passing "columnheader" or "columnheader(N)" to the 
	"name" option rather than a fixed character string.
	Bug #1841

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

	* src/wxterminal/wxt_gui.cpp (wxtFrame::OnExport):  The Export widget
	on a plot window should dump a copy of the plot in that window, not a
	copy of the currently active plot.  Modify the OnExport function 
	accordingly.  Unfortunately to generate PDF or SVG files we want to
	reexecute the list of commands that generated the plot, but we only 
	keep such a list for the currently active plot.  So Export from 
	inactive windows is limited to the clipboard or PNG files.
	Bug #1843
	
	* src/readline.c (getc_wrapper):  Clear errno before reading next
	character.  This fix contributed anonymously.
	Bug #1846 #1865

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

	* src/util.c (squash_spaces) src/util.h src/command.c:
	Modify squash_spaces() utility routine to optionally leave a single
	space in place of whitespace or remove whitespace altogether.

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

	* src/eval.c src/eval.h (free_at): afl-fuzz found multiple crashes
	caused by trying to evaluate a defunct action table.  This patch wraps
	free_at() in a macro that clears the pointer to an action table after
	freeing it.

2016-08-17  AMD  <allanduncan@sf.net>

	* term/post.trm: Different treatment of simplex/duplex option 
	depending on whether the PostScript support is limited to Level 1.

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

	* src/misc.c (lp_parse) src/plot2d.c (eval_plots): Remove order
	dependence of the "fillcolor" keyword and confusion with line style.
	For example these commands were not working:
	    plot 'silver.dat' with boxes fs solid 1.0 border -1 fc "cyan"
	    plot 'silver.dat' with boxes fc "cyan" fs solid 1.0 border -1 lw 2

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

	* src/plot2d.c (box_range_fiddling):  afl-fuzz found a crash caused by
	 an incorrect test for no data points.

	* src/set.c (encoding_minus):  Comment out replacement of the SJIS minus
	sign character.  The character itself is correct but it is a full-width
	glyph so it does not mix well with half-width digits in a number.
	This problem is specific to SJIS.

2016-08-09  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* config/config.oww (ftruncate): Definition needed to compile on
	Open Watcom.

	* config/config.nt (HAVE_ERF, HAVE_ERFC, HAVE_STDBOOL_H)
	(HAVE_STDINT_H, isnan): Update some flage to match current version
	of MSVC (VS 2015).

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

	* src/save.c src/set.c src/show.c src/tables.c src/tables.h src/unset.c
	src/util.c src/util.h src/eval.c docs/gnuplot.doc term/js/canvasmath.js:

	New command "set minussign" tells gprintf() to use an encoding-specific
	minus sign character for numeric output rather than the ascii hyphen
	character produced by sprintf().
	    UTF-8:	Unicode U+2212 "minus sign"
	    CP1252:	ALT+150 "en dash"
	    SJIS:	0x817c
	    default:	ascii \055 "hyphen"

	The substitution of minus sign for hyphen is not made during tabular
	output ("set table") or when the current terminal is a LaTeX terminal.
	It affects only numbers formatted by gprint().  Other hyphens are 
	not affected even if they are in a gprintf format string.

	* PATCHLEVEL: increment to 5pre to distinguish test builds from 5.0.4

2016-08-06  Tatsuro MATSUOKA  <tmacchant3@yahoo.co.jp>

	* src/wxterminal/wxt_gui.h:  Correct spelling of include file name.
	Bug #1836

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

	* term/svg.trm:  Better vertical justification of rotated text.

	* src/qtterminal/QtGnuplotScene.cpp src/qtterminal/QtGnuplotItems.cpp:
	*.pcf (bitmap) fonts are non-rotatable. Furthermore Qt can die horribly
	while trying (seen with Qt 5.4.2). To make matters worse, requesting
	font "Times" may give you the Adobe pcf font Times (perfect name match)
	rather than a rotatable ttf or odf font like TimesNewRoman.  This patch
	adds style strategy QFont::ForceOutline to forbid selection of a
	bitmap font.

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

	* src/datafile.c:  Matrix dimensions were not being adjusted to account
	for subsampling by "every" in the using specifier, so "with image"
	plots came out mangled.  This was a regression from 4.6.6 and 5.0.1.
	Bug #1835

	* src/set.c src/gadgets.h src/plot2d.c demo/rotate_labels.dem
	docs/gnuplot.doc demo/all.dem:  New option `rotate variable` to assign
	a separate rotation angle for each point in a 2D `plot with labels` 
	using the contents of the 4th entry in the using specifier.
	    plot foo using 1:2:3:4 with labels rotate variable

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

	* src/unset.c:  "unset y2mtics" was clearing the setting for x, not y2.

2016-07-31  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/win/wgnuplot-ja.mnu src/win/README.win-ja:  Update Japanese
	menu translations and help text.

2016-07-31  Bastian Maerkisch  <bmaerkisch@web.de>

	Backport bug-fixes from 5.1

	* src/wxterminal/wxt_gui.cpp:  Handle errors when creating a cairo
	surface.
	Bug #1621

	* win/gnuplot.iss:  Enforce inclusion of directory and program group
	pages since the default changed in Inno setup version 5.5.7.
	Bug #1831

	* src/win/wgraph.c (drawgraph) src/win/wgdiplus.cpp(drawgraph_gdiplus):
	Missing cleanup of cached point symbols caused a sizeable resource
	leak. Bugfix.

	* src/readline.c (fn_completion):  Allow filename completion for system
	commands '!' and after pipe symbols '<', '|'.
	Bug #1747

	* src/readline.c:  The return value of the *_getch() functions should
	be int, not char, in order to avoid confusion between EOF (-1) and
	(char)0xff.
	Bug 1558

	* src/qtterminal/qtconversion.cpp:  Avoid use of isnan() in C++ code.
	The C++11 standard has it as a function in the std namespace, whereas
	older compilers provude it as a macro or as ::isnan(). Use (var != var)
	instead.

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

	* src/term_api.h:  Define TERM_POLYGON_PIXELS.
	* src/graphics.c (plot_image_or_update_axes):  If this flag is set,
	implement "plot ... with image pixels" using term->filled_polygon()
	rather than term->fillbox().
	* term/qt.trm: Set TERM_POLYGON_PIXELS to avoid aliasing artifacts.

2016-07-19  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* term/aquaterm.trm:  The AQUA_boxfill() routine scales very badly 
	with the total number of rectangles, making it horribly slow when 
	invoked by "plot $foo with image pixels".  Set the terminal flag
	TERM_POLYGON_PIXELS so that the image processing code will call
	term->filled_polygon() in preference to term->fillbox().

2016-07-15  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgdiplus.cpp (W_enhanced_text):  Apply text color to enhanced
	text.
	Bug #1829

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

	* Bump PATCHLEVEL to 5.0.4

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

	* src/gadgets.c (write_label): Consolidate code to create a textbox for
	this label.

	* term/pslatex.trm: Implement textbox margins for epslatex.
	Note that textbox margins are undocumented and not yet completely
	implemented.

	* src/qtterminal/qt_term.cpp src/qtterminal/QtGnuplotScene.cpp
	src/qtterminal/QtGnuplotScene.h:  Implement textbox margins for qt.

	* src/wxterminal/gp_cairo.c (gp_cairo_boxed_text): Reduce textbox
	margin size and linewidth to better match other terminals.

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

	* src/graphics.c(plot_betweencurves):  The filled curve options y=foo,
	below y=foo, etc were reworked to piggyback on the 'fill between' code
	by pre-loading ymax with foo on data input.  However this mechanism
	breaks if the curve is smoothed because ymax is lost during smoothing.
	Revert the case of smooth + filledcurves + y=foo to use the original
	FILLEDCURVES_ATY1 code.  This original rationale (IIRC) was to get
	better clipping but since we now have good general case polygon
	clipping perhaps all the piggyback cases should be reverted.

2016-06-22  Ethan A Merritt  <merritt@u.washington.edu>

	* RELEASE_NOTES demo/plugin/Makefile.am:  Note compiler flags needed
	to build gnuplot using Solaris SunPro C compiler.
	Bugs #1786 #1821
	
2016-06-17  Ethan A Merritt  <merritt@u.washington.edu>
	
	* parse.h plot2d.c plot3d.c:  Tracking the wrong iteration 
	variable (iteration_current rather than iteration) caused plot
	command iteration with a negative increment to fail to iterate at all.
	E.g. 'plot for [i=9:1:-1] foo' plotted only the single plot with i=9.  
	Bug #1819

	* src/mouse.c (do_event):  The combination of in-line data and a
	resize+replot event could result in the program exiting.
	Use do_string_replot("") rather than do_string("replot").
	Bug #1818

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

	* src/datafile.c (check_missing):  Fix test for explicit 'set missing'
	string in a csv file (previous check assumed the string was followed by
	whitespace rather than a field separator).

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

	* src/internal.c (f_word f_words):  The implementation of word(string,N)
	returned the total number of words for any N<0.  This was used internally
	to implement words(string) as word(string,-1) but meant that any N<0
	returned an unexpected value to the user.  Limit the special case to 
	a single magic value and let all other N<0 return "" as expected.

	* src/axis.h (ACTUAL_STORE_WITH_LOG_AND_UPDATE_RANGE):
	Only update axis->data_min/max if the point being stored is INRANGE.
	Bug #1804

2016-06-12  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/graph3d.c:  Better fix for bug #1809 (placement of xyplane
	independent of tics or grid lines).

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

	* src/stats.c:  Change most file-reading errors in "stats" to warnings
	rather than error, so that a script can continue after trying to stat a
	file the contains bad data.

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

	* src/graph3d.c:  Consistent placement of xyplane regardless of whether
	tics or grid lines are present.
	Bug #1809

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

	* set/set.c (set_palette):  Disallow "set palette maxcolors 1" because
	this causes divide-by-zero errors during color smoothing.
	Reported originally as an Octave bug
	https://bugzilla.redhat.com/show_bug.cgi?id=1340660 

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

	* src/datafile.c:  partial "every" specifiers are not compatible with
	image plots.  Ignore them when figuring out image dimensions.
	Bug #1796

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

	* src/plot3d.c (get_3ddata):  Color information from 7-column input to
	"splot ... with vectors" was stored only for the tail, not the head.
	Bug #1793

2016-05-16  <ceprio@users.sf.net>

	* term/js/gnuplot_svg.js: Apply screen transform to mouse coordinates,
	so that browser-mediated changes of scale and origin are accounted for.
	In particular this handles the case where the size of an svg image is
	not the same as the object it is embedded in.
	Note:  Old code claiming to handle scrollbars is left in place but may
	now be counterproductive.

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

	* src/fit.c (fit_command):  Since memory requirements are linear in the
	number of datapoints, double max_data if we need to enlarge the 
	internal buffers.  Remove the associated message.
	Feature Request #444.

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

	* src/graphics.c src/graphics.h src/plot2d.c:  Improved handling of
	boxplot data with multiple "factors" (i.e. category labels). The data
	is now sorted only once, rather than once per factor.  This change
	was documented as appearing in 5.0.1, but appently was never applied.
	Bug #1769

	* src/graphics.h src/plot2d.c: Add a new field to (struct curve_points).
	plot->base_linetype holds the original linetype index for this 2D plot,
	prior to applying variable color, linetypes defined in terms of other
	linetypes, etc. This allows assigning successive colors or other
	properties to elements of a 2D plot (e.g. histogram components, boxplot
	factors).  An analogous field splot->hidden3d_top_linetype is already 
	maintained in (struct surface_points) for use by 3D plots.

	* src/graphics.c src/plot2d.c: In boxplots with multiple component
	factors, interpret "lc variable" as requesting a new color for each
	factor.

2016-05-07 Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/term.h: Move estimate.trm further up, so emf.trm can see it.

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

	* term/emf.trm: Better (though still not perfect) estimation of
	the space occupied by a UTF-8 string. Till now each byte in a
	multi-byte character was being counted as occupying space.  Bug
	#1787

	* src/term.h: The above change means that estimate.trm must be
	included earlier in term.h than emf.trm.  Bump it to the top.

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

	* src/save.c:  "rotate parallel" was not being saved correctly.

2016-05-01  Matthew Halverson  <mhalver@users.sf.net>

	* term/svg.trm: Do not flag svg terminal as TERM_BINARY.

2016-04-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/fit.c (call_gnuplot):  More robust handling of undefined value
	returned by function being fit.

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

	* src/graphics.c (process_image):  There are two paths through the
	code that extracts image data from an ascii input stream, depending
	on whether the x or y coordinate varies fastest.  The fix for Bug #1767
	corrected one path but broke the other.  I.e. none of version 5.0
	patchlevels 0-3 worked correctly on all image input.  Now we fix the
	broken path so that all cases are working, at least on test data.
	Bug #1782

2016-04-16  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graph3d.c (get_arrow3d):  Fix typo introduced in 5.0 that caused
	arrows defined by "from ... rto ..." to be mangled in 3D plots.

	* src/graphics.c (attach_title_to_plot): Bad things happen if you try
	to attach a title to the end point of a plot with no points (NODATA).

2016-04-15  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/term.c:  Windows requires mode "wb" for pipe output, BSD requires
	"w" (no "b" character), linux will accept either.
	Bug #1756

2016-04-14  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (clone_linked_axes):  Backport cleanup of tests for
	consistency of forward/reverse mapping functions in a 'set link'
	command so that spurious warnings are not generated at runtime.
	Bug #1777

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

	* src/plot2d.c (refresh_bounds):  Patch from 2016-01-18 to fix bug 
	#1709 introduced a regression.   Minimal example:
		'set log x; plot '-'; replot' 
