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

	* term/svg.trm:  Default to embedding generated images rather than 
	creating and linking to separate *.png files.
	Bug #1801

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

	* term/canvas.trm term/js/gnuplot_mouse.js term/js/gnuplot_svg.js
	term/svg.trm:  Mousing support for "set theta <origin> <sense>".

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

	* src/plot3d.c:  When hidden3d mode is set, two linetypes are reserved
	for each plot (front and back surface).  This is not necessary if both
	the front and the back use the same linetype ('set hidden3d nooffset'),
	so if the linetype offset is zero then reserve only one linetype.

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

	* 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.

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

	* src/misc.c 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-15  Bastian Maerkisch  <bmaerkisch@web.de>

	* config/config.oww config/watcom/Makefile src/win/winmain.c:
	Enable fake pipes for OpenWatcom.  Here the system() function requires
	the command string to include the shell and wide character variant
	_wsystem() does not seem to work.

	* src/win/wgraph.c:  Fix initialization of the graph window struct when
	switching from standalone to docked mode and a previous window was open.

	* config/mingw/Makefile:  New variable CWFLAGS for warning flags to be
	put last in CFLAGS in order to overwrite e.g. -Wall.

	* config/mingw/Makefile:  New target "7z" which is similar to the "zip"
	target but outputs a 7-zip packed binary package.

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

	* src/axis.c src/axis.h src/graphics.c src/save.c src/set.c src/show.c
	src/tables.c src/tables.h src/unset.c src/mouse.c src/boundary.c
	docs/gnuplot.doc demo/ttics.dem demo/solar_path.dem:

	New command
	    set theta {right|top|left|bottom}
	    set theta {clockwise|cw|counterclockwise|ccw}

	controls layout of polar mode plots by specifying where to place the
	origin (theta=0) of the angular coordinate and its sense of rotation.
	The default remains "right" and "counterclockwise".

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  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* configure.ac: Require glib version >= 2.28
	(because src/wxterminal/gp_cairo.c now uses the g_clear_object macro)

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

	* src/boundary.c src/graph3d.c:  Use the shared routine write_label()
	to handle the key title.

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

	* src/plot2d.c:  Limit the scope of a sample variable to the plot
	command it is used in.  I.e. restore value of t after execution of
	plot sample [t=0:10] '+' using (f(t)):(g(t))
	Bug #1755

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

	* src/parse.h src/parse.c src/util.c src/command.c docs/gnuplot.doc:
	Limit the scope of an iteration variable to the command or clause being
	iterated. I.e. after execution of an iteration "for [N=1:10]" N retains
	whatever value it had prior to the iteration, possibly NOTDEFINED.
	For iterated plot and set statements this is robust against errors.
	However an error exit from inside a "do for [foo = ] {}" clause may
	leave foo with some intermediate value.
	Bug #1891

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

	* 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  kh.moriyama  <cheongsamkh@yahoo.co.jp>

	* src/axis.c src/axis.h src/gadgets.c src/gadgets.h src/graphics.c
	src/graphics.h src/misc.c src/save.c src/set.c src/term_api.h
	docs/gnuplot.doc:   New keyword "pointnumber|pn" to limit the total
	number of point symbols that lie along a plot "with linespoints".
	Similar to "pointinterval" except that the resulting spacing between
	point symbols does not depend on the total number of data points.

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

	* src/graph3d.c (plot3d_points) src/gadgets.c src/gadgets.h:
	Apply pointinterval property to splot with linespoints.

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

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

	* config/config.oww:  The OpenWatcom v2 fork has erf and erfc.

	* src/win/wmenu.c:  Revise the patch dated 2017-01-25 so it does not
	break non-UNICODE builds.

	* src/stdfn.c|h src/misc.c config/config.mgw:  Always use our own
	Windows version of opendir and friends as they handle encodings.
	Bugfix.

	* src/stdfn.c src/syscfg.h src/util.c src/win/wmenu.c:  Only include 
	direct.h where required. Remove a few unnecessary includes.

	* src/win/mingw/Makefile:  Optionally use pkg-config to use gdlib.
	Required with recent updates of MSYS2/Mingw-w64

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

	* src/stdfn.c|h (gp_getcwd):  New function for Windows which is aware
	of the current internal encoding. Bugfix.

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

	* src/win/wgdiplus.cpp config/config.oww config/watcom/Makefile:
	Enable build with OpenWatcom and GDI+.  See Patch #746.

	* src/win/wprinter.c:  Add missing calling convention.

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
	term/js/gnuplot_svg.js: Mouse support for inverted r axis.

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

	* src/win/wgraph.c (SaveAsEMF):  Default to EMF+ format when using the
	GDI+ backend.

	* src/win/wgraph.c (CopyClip):  Only attempt to set clipboard data if
	the bitmap/metafile handle is valid.  Emit an error message otherwise.

	* src/win/wgdiplus.cpp (clipboard_gdiplus):  Retrieving the handle to
	the metafile requires releasing the graphics object first.  Fixes
	copying EMF data to clipboard.

	* src/win/wgdiplus.cpp (clipboard_gdiplus, metafile_gdiplus): 
	Explicitly set the size of the metafile.

	* 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.

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

	* src/axis.h src/graphics.c:  Fix type mismatch in numeric comparison
	(clang generates an error or warning).

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

	* src/win/wgnuplib.h src/win/wgraph.c src/win/win/wmenu.c 
	src/win/wtext.c:  Fix string formats and messages in several places to
	make non-Unicode builds work again.

	* src/win/wprinter.c:  Fix compiler warnings.

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

	* src/win/wgdiplus.cpp (gdiplusCreatePen):  Remove now unused static
	function.

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".

	* src/graphics.c (plot_border draw_polar_circle) src/set.c src/show.c:
	New command "set border polar" draws a circle with radius matching the
	highest tic position on the r axis.

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

	* src/graphics.c:  Wrap polar grid radial lines in terminal notification
	TERM_LAYER_{BEGIN|END}_GRID

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

	* src/axis.c src/gadgets.h src/graphics.c src/save.c src/graph3d.c
	docs/gnuplot.doc:  New keyword `polar` to specify position. This allows
	labels, arrows, and objects to be placed in 2D plots using polar
	coordinates and in 3D plots using cylindrical coordinates.

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

	* src/axis.c src/axis.h src/boundary.c src/plot2d.c src/plot2d.h:
	Continue consolidation of polar to cartesian coordinate conversion.
	This patch fixes various problems with logscale r axis tic placement.
	It adds a filter to categorically reject points with negative r value 
	if the raxis is logscaled.

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

	* src/unset.c (unset_polar): "reset" needs to free data structures and
	rotation for ttics.

2017-01-10  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/boundary.c src/plot2d.c src/plot2d.h docs/gnuplot.doc:
	New command "set rlabel" places an axis label above the raxis. The label
	is printed whether or not the program is currently in polar mode.
	Keywords for offset, font, etc as for the other axis label commands.

	* src/axis.c src/gadgets.c src/gadgets.h src/graphics.c src/mouse.c
	src/plot2d.c src/set.c docs/gnuplot.doc:  Support inverted r axis range.
	rrange must be linear and have fixed max/min (no autoscaling).
	Bug #1880

	Allows use of polar mode to display a projection of celestial horizontal
	coordinates (altitude + azimuth) with the zenith (altitude 90) at the
	center and the horizon (altitude 0) at the perimeter. Theta represents 
	the azimuthal angle. 

	* demo/solar_path.dem demo/solar_params.dem demo/all.dem:
	Use inverted rrange to display solar path at a specific latitude in
	celestial horizontal coordinates.

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

	* src/axis.c (gen_tics) unset.c (unset_polar):  Allow placement of tics
	and tic labels along THETA (set ttics) using angles outside the fixed
	range [0:360].  Handle auto-generated tic at 360 as a special case and
	omit it if there is already a tic at 0.

	* src/boundary.c src/graphics.c (ttick_callback place_grid):  Reserve
	sufficient space for THETA tic labels at the top and bottom of plot.
	ttic labels should not toggle on/off with the grid.
	Bug #1892

	* src/set.c (parse_plot_title) src/plot2d.c (attach_title_to_plot):
	Accept keywords {left|right} to control text justification of a plot
	title positioned at the beginning or end of a plotted line. E.g.
	    plot FOO ... with lines title "Foo" at end {left|right}

	* src/plot2d.c (polar_to_xy):
	Rename theta_r_to_x_y() to polar_to_xy() and add parameter TBOOLEAN update
	TRUE - do range-checking against rrange and update limits if autoscaling
	FALSE - convert theta;r to x;y with no range checking or update
	This patch moves the range checking done at each original site into the
	shared routine. The original range checks were not identical so it is
	possible that consolidation breaks something.  In particular the call
	from parametric_fixup() originally updated rrange based on fabs(r)
	rather than r.  If necessary we can replicate this using two 
	successive calls to polar_to_xy().

	* src/plot2d.c (polar_to_xy):
	Mapping negative numbers onto a polar plot with (R_AXIS.min != 0)
	was giving incorrect placement.  This patch catches and corrects most of
	the bad cases. Examples that were bad before this patch:
	    set polar; set grid polar; set rrange [1:5]; plot -2, 3
	(note that the "-2" circle was drawn outside the "3" circle
	    load 'ttics.dem'; set rrange [1:6]; replot
	(weird displacement of -t curve)
	Some corner cases may remain (e.g. nonlinear R with nonzero min)
	Bug #1892

2017-01-07 Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* src/win/wgraph.c (UpdateStatusLine):   Re-order code to support MSVC
	2010 (and OpenWatcom).

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

	* src/win/wcommon.h src/win/wgnuplib.c|h src/win/wgraph.c src/win/wmenu.c
	src/win/wtext.c term/win.trm docs/gnuplot.doc:
	Graph windows can be docked to the wgnuplot text window with 
	`set term win docked`.  Multiple graph windows can be docked at the same
	time and their layout can be changed with the new `layout <rows>,<cols>`
	option.  The fraction of the window which is reserved for text input
	can changed by moving a separator bar with the mouse and via wgnuplot.ini.
	This is useful in particular for Windows in "tablet mode" which only
	displays one maximised window at the time.
	Patch #711
	
2017-01-06  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (gen_tics):  Remove dead code for polar axis tics.

	* src/plot2d.c (theta_r_to_x_y):  Consolodate polar->cartesian input
	coordinate conversion into calls to a new routine theta_r_to_x_y().

	* src/graphics.c src/unset.c demo/ttics.dem docs/gnuplot.doc:
	Allow rotation of polar grid (theta) tic labels by "set ttics rotate".
	Extend the fixed range of theta axis so that the user can label from 
	-180 -> 180  rather than 0 -> 360.

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

	* demo/stringvar.dem:  Add platform specific code for Windows.

	* src/term.c (term_initialise):  Disable output of binary data to the
	wgnuplot text window.

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

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

	* demo/smooth_splines.dem demo/errorbars.dem demo/all.dem demo/html/*:
	Split mgr.dem into two parts, one illustrating the various spline
	smoothing options and the other showing various 2D plot styles
	with errorbars.

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

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.

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

	* src/internal.c (f_power): Use ISOC99 macro fpclassify(), if present,
	to detect floating underflow from evaluating X**Y.  Return 0.0 rather
	than UNDEFINED.
	Bug #1877

	* src/specfun.c (f_normal): Values of x < -38 cause floating underflow
	in the calculation of norm(x).  Return 0.0 rather than UNDEFINED.
	See bug #1877

	* src/save.c src/save.h src/show.c:  Consolidate save/show axis format.
	Fix minor bug in "show auto" (2D reports 3D status and vice versa).

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

	* src/qtterminal/QtGnuplotWindow (print):  QPrinterDialog requires
	a parent on Windows.  Set a generic document name.  Disable page
	range option in print dialog.

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

	* src/win/wgraph.c (drawgraph):  Fix incorrect determination for
	drawing to a metafile which caused point symbols to be drawn as
	a bitmap.

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-26  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c src/axis.h src/tables.c src/tables.h:
	Define new axis THETA_AXIS to hold tic definitions for labeled angles
	on perimeter of polar grid.

	* src/graphics.c (ttick_callback) src/save.c src/set.c src/show.c
	src/unset.c:  Support for "set ttics" "set mttics" and placement of
	labeled angles on perimeter of polar grid.

	* demo/ttics.dem docs/gnuplot.doc docs/plotstyles.gnu:
	Demo and documentation for "set ttics".

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

	* src/win/wmenu.c src/win/wgnuplot.mnu:  Show text for toolbar icons
	as tooltips, which can be a bit more descriptive.

2016-12-24  Vicente Olivert Riera <Vincent.Riera@imgtec.com>

	* configure.ac:  Keep track of gdlib-config path found during configure.
	* Makefile.am:  Remove vestigial reference to LISPDIR.

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

	* src/save.c:  Convert save tic/mtics routine to use axis pointers.

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

	* src/qtterminal/QtGnuplotScene.cpp:  Draw zoombox coordinates in front
	of everything else.

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

	* src/show.c src/set.c:  Repair a few places where axis_array[index].foo
	was not replaced with axis->foo.

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

	* src/axis.c src/axis.h src/boundary.c src/graphics.c src/set.c
	src/unset.c:  More tweaks of the raxis/polar grid code.  Allow polar
	grid even in cartesian axis mode.

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

	* src/axis.c (some_grid_selected gen_tics) src/unset.c set.c (set_grid)
	src/graphics.c (place_grid xtick2d_callback ytick2d_callback) src/save.c
	src/boundary.c:  Cleaner separation of control over polar grid elements
	and rectangular grid components. Each can be set or cleared independent
	of the others, e.g. "set grid r" will give you circles about the origin
	even in a non-polar plot.  Sanity checking of polar_grid_angle, the
	spacing between radial lines in a polar grid.
	Bug #1888

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

	* src/axis.c (bad_axis_range):  Don't include a test (max-min == 0) in
	the bad_axis_range() checks.  One of the primary callers is
	axis_checked_extend_empty_range, which is perfectly happy to expand an
	initially empty range.

	* src/wxterminal/gp_cairo.c:  Valgrind found some use-after-free
	problems with cairo object accounting.  Replace g_object_unref() with
	g_clear_object() everywhere.   This is a macro that decrements object
	reference count and clears the pointer when the count hits zero.
	Clear the pointer in-line for pango_attr_list_unref().
	Bug #1886

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

	* src/axis.c (bad_axis_range): Even more paranoid checks to protect
	against corrupted axis range state (Inf/-Inf) found by fuzzing.
	Introduce new routine bad_axis_range().

	* 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-13  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (axis_check_empty_nonlinear) src/axis.h src/plot3d.c:
	New routine analogous to the existing axis_checked_extend_empty_range
	except that it applies to nonlinear axes.  This is a bug fix to prevent
	a crash after axis range corruption.
	Example of bug:    set log; splot $FOO using 1:2:(NaN)

	* src/axis.c (axis_check_empty_nonlinear) src/axis.h src/plot3d.c:
	Additional sanity check on axis range after nonlinear transform.

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

	* src/boundary.c:  Fix incorrect vertical placement of multi-line
	x2 axis tick labels.  The calculated y coordinate must describe the
	bottom line of the label, not the top line.
	Bug #1882

	* src/axis.c (set_explicit_range) src/axis.h: New routine called from
	apply_zoom() to change the range of one axis directly instead of
	constructing and interpreting a "set [axis]range [newmin:newmax]"
	command string. This prevents loss of precision in the axis coordinates
	that can occur if there is an intermediate ascii representation for the
	range limits.
	Bugs #1881 #1882

	* src/mouse.c (apply_zoom): Call new routine set_explicit_range()
	rather than constructing an executable "set range" command string.
	Bugs #1881 #1882

	* src/mouse.c (rescale rescale_around_mouse): Zoom in response to
	mousing hotkeys +/- must take into account nonlinear axes.
	Nonlinear axes part 20
	Bug #1883

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

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

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

	* docs/gnuplot.doc docs/plotstyles.gnu:  Update filledcurves to include
	an example of representing error on y as a shaded region of uncertainty.

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

	* src/graph3d.c:  Revert problematic patch 2016-11-29 affecting order
	of grid drawing.  Work-around for the bug it fixed: 'set border behind'

	* src/show.c: Separate "show xyplane" from "show tics".

	* src/unset.c: "reset" should return border_layer to "front"

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

	* term/gd.trm: Co-opt the existing "animate" keyword for use by the new
	sixelgd terminal.  It sets the cursor position at the top left of the
	terminal before each plot so that successive plots overwrite the same
	screen area rather than scrolling off the top.  This is convenient when
	generating an animation sequence, particularly if you save it to a file
	for later playback.

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

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

	* term/sixel.c:  Required minimal version of gdlib is 2.1.0
	(gdImagePaletteToTrueColor, gdImageTrueColorToPaletteSetMethod).

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

	* term/gd.trm term/sixel.c term/Makefile.am.in:
	New terminal "sixelgd" based on kmiya@culti's sixel.c code
	available at http://nanno.dip.jp/softlib/man/rlogin/#REGWIND
	It produces sixel graphics like the "sixel" terminal, but uses
	gdlib to draw instead of the built-in bitmap code.  It hence
	offers an enhanced feature set, including support for up to 256
	colors, outline fonts, transparency, and anti-aliased lines.
	"set term sixelgd" uses only 16 colors for sixel output and up to
	256 palette colors internally, but "set term sixelgd truecolor"
	maps the internal ARGB image back down into 256 sixel colors
	using dithering.
	sixelgd piggy backs on the png/gif/jpeg terminal routines and
	thus offers the same options.  In "notruecolor" mode we no longer
	pre-allocate colors to avoid unnecessary transformations of the
	image in gdImageSixel.  The "transparent" option works with
	mintty or mlterm on Windows, but does currently not work with
	xterm or mlterm on *nix.
	Patch #742

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-12-01  Ethan A Merritt  <merritt@u.washington.edu>

	* term/dumb.trm: The set_pixel routine originally used a priority rank
	such that pixels belonging to the border or axis linetypes would always
	be overwritten by pixels belonging to a plot. This system started to
	break when the border linetype LT_BLACK became the default linetype and
	broke further with the addition of a new priority level for fill areas.
	The core code is pretty good at issuing draw commands in the desired
	order, so at this point we get better results by dropping the priority
	rank and having all set_pixel operations overwrite previous contents.

	* src/graphics.c src/plot2d.c term/vgagl.trm:
	Clean up typos, comments, old FIXMEs, dead code

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

	* src/graph3d.c (do_3dplot): Front/back layering of border+grid
	components was not always correct in hidden3d mode.  For example:
		set pm3d; set hidden3d; splot x*y with points
	Bugfix

	* src/pm3d.h:  Replace #defined constants PM3D_SCANS_xxx with an
	enum.

2016-11-27  Bastian Maerkisch  <bmaerkisch@web.de>

	 * term/dumb.trm:  Color support by ANSI escape sequences (16, 256,
	or RGB).  In 16/256 color mode, RGB colors are mapped assuming a
	fixed palette, which likely is not the actual palette of the
	terminal.  Support filled polygons.  Relax priority condition
	for overwriting a "pixel" by allowing equal type.
	Patch #741

2016-11-26  Bastian Maerkisch  <bmaerkisch@web.de>

	 * src/win/winmain.c (WinMain):  Enable Windows 10 support for
	console virtual terminal sequences, i.e. escape sequences.
	Show "inline" color plots on the Windows command line with
	"set term caca driver utf8".

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

2016-11-19  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/pm3d.c (pm3d_depth_queue_flush) src/term_api.h
	src/win/wgdiplus.cpp:  Add layer calls for pm3d queue flush.

	* src/win/wgraph.c src/win/wgdiplus.cpp|h src/win/wgnuplib.h:
	Until version 4.4 the windows terminal used only the Windows GDI to
	draw.  Since 4.6 it can additionally use a mixture of GDI and GDI+ -
	mainly to enable antialiasing.  Version 5.0 added a new variant in a
	separate code path which now only uses GDI+ (5.1).  Not only is this
	faster than the mixed GDI/GDI+ code, it also offers improved support
	for transparency (5.0), custom dash patterns (5.0), oversampling (5.1),
	and antialiasing of polygons with less (5.0) or no artefacts (5.1).
	Version 5.0 still uses GDI for enhanced text and images, but that
	changed in 5.1 already and could be backported to 5.0.  The GDI+ variant
	is the default since version 5.0 for drawing to the screen and is now
	also used for printing, copying to clipboard and saving of EMF data.
	The transition to GDI+ is now complete and this change removes the
	transitional GDI/GDI+ code.

2016-11-18  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c (CopyClip) src/win/wgdiplus.cpp (clipboard_gdiplus):
	Use GDI+ to copy EMF+ data to clipboard if the user selected the GDI+
	backend.

	* 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.

	* src/set.c (set_encoding, init_special_chars) setshow.h
	src/misc.c (init_encoding):  Move initialisation of special characters
	to a separate function, which is also called during program init on
	Windows.  Bug fix.

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

	* term/pdf.trm configure.ac src/term.h:
	Mark the pdf terminal as DEPRECATED. The deprecation notice will first
	appear in version 5.0.6.  This patch removes the configuration option.
	The terminal source itself is still there so it remains possible to
	manually uncomment the commented-out #include statement in term.h.
	GmbH dropped support in 2007 for the free (as in beer) but license-
	restricted version of PDFlib.  The gnuplot pdf driver has not been
	touched since 2010 other than to accommodate new default terminal
	settings for version 5.  PDF output remains possible using the pdfcairo
	terminal, any latex terminal + pdflatex, and the export menu provided by
	the wxt and qt interactive terminals.

	* docs/gnuplot.doc docs/plotstyles.gnu docs/titlepag.tex:
	Repair broken hyperlink in docs.  Use color in the histogram plot
	styles figures.  Add Daniel Sebald to list of contributers.

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

	* src/gadgets.h src/graph3d.c src/set.c:  Use the shared routine
	write_label() to handle 3D axis labels. This allows explicit rotation
	of xlabel and zlabel (ylabel rotation is suppressed so that the 2D
	default "ylabel rotate" does not affect 3D plots).  The revised zlabel
	code avoids printing the label twice (Bug #1277).

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

	* docs/plotstyles.gnu docs/gnuplot.doc demo/html/* demo/fenceplot.dem:
	Add zerror+fenceplot demo to the documentation and the online demo set.

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

	* src/win/wgraph.c (SaveAsEMF):  Option to save graph in EMF+ format.

	* src/wxterminal/wxt_term.h src/win/wxt_gui.cpp src/win/winmain.c:
	screendump command supports wxt terminal.

	 * src/win/wgraph.c (WndGraphProc):  Remove dead code in mouse handling:
	Single and double clicks are handles by the code in mouse.c and the
	window is not even configured to receive double click events.  Also make
	sure that mouse wheel "button" are released again.

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

	* src/axis.c src/axis.h src/boundary.c src/color.c src/graph3d.c
	src/graphics.c src/save.c src/set.c src/show.c:  Add a new field to
	the axis structure that stores tic label horizontal justification.
	Previous code was using axis->label->pos to store this, but that
	confounds justification of the tic labels and the axis label proper.

	* src/boundary: Revise calculation of space needed for x2 axis ticmarks.

	* src/save.c: saved timestamp command must use compatible syntax

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

	* src/graph3d.c: Check terminal supports filled_polygon before trying
	to carry out "with zerrorfill"

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

	* src/color.c (ifilled_quadrangle):  If pm3d border linetype is
	LT_DEFAULT, draw quadrangle borders in current color.  Unfortunately
	this is still a magic number (lt -6) in the user interface.

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

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

	* src/boundary.c src/gadgets.c src/gadgets.h src/graph3d.c src/set.c
	src/unset.c src/show.c:  Use the shared routine write_label() to handle
	"set timestamp" in both 2D and 3D.  Place the timestamp relative to page
	borders rather than the plot borders.  Timestamp offsets no longer
	affect placement of plot borders.  A timestamp is still generated for
	each subplot in a multiplot but now they all end up in the same place
	rather than overlapping bits of the multiplot.  This could be improved.

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

	* src/win/wgraph.c (CopyPrint): Fix braces broken by #ifdef.

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

	* src/gp_types.h src/graph3d.c src/graph3d.h src/plot3d.c src/pm3d.c
	src/pm3d.h src/tables.c demo/all.dem demo/zerror.dem docs/gnuplot.doc:

	New 3D plot style
	    splot <data> using <x>:<y>:<z>:<zlow>:<zhigh> with zerrorfill
	          {fillcolor <colorspec>}
	This produces a plot similar to the 2D filledcurves option to fill the
	area between two curves.  The primary linecolor is used to draw a line
	through the z values.  The fillcolor (defaults to the linecolor if not
	given) is used to fill the area between zlow and zhigh.  Depth sorting
	is possible using `set pm3d depthorder`.

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

	* src/win/wgdiplus.cpp|h (drawgraph_gdiplus):  Add wrapper functions
	instead of trying to determine the target (screen/printer/metafile)
	from the device context using GDI functions.

	* src/win/wgraph.c (CopyPrint):  Also use GDI+ to print if the user
	selected the GDI+ backend.

	* src/win/wgdiplus.cpp src/win/wgraph.c (draw_enhanced_init):  Take
	DPI into account when calculating the scaling factor for super- and
	subscripts.  Makes special code for printing superfluous.

	* 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.

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

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

	* src/gadgets.c src/gadgets.h src/graph3d.c src/save.c src/set.c
	src/show.c src/tables.c src/tables.h docs/gnuplot.doc:

	"set key" already offers 3 choices for placement of 3D plots:
	1) "at" user-specified position
	2) "outside" - shrinks the entire plot so that the key can be drawn
	   in one of the margins
	3) "inside" - (the default) rotates and scales with the plot itself
	   as the view changes.
	This patch introduces a 4th option
	4) "fixed" is like "inside" except that it is not affected by changing
	   the current view angles or scaling.
	"fixed" key placement does not move when the plot rotates. For 2D plots
	this is identical to "inside".  The new option is now the default.

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/save.c src/show.c src/gadgets.c:  save/show style arrow was
	showing incorrect settings for head/heads/backhead, and reporting
	LT_DEFAULT as an actual line type.

	* 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

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-23  Ethan A Merritt  <merritt@u.washington.edu>

	* src/set.c (set_style):  Allow "set style textbox border" without a
	specific border color to default to black.

	* term/svg.trm:  Transition to SVG 2.0
	Remove DTD.  Remove option "fontfile" and references to SVG fonts.

	* src/axis.h src/axis.c src/show.c: Macros AXIS_IS_FIRST AXIS_IS_SECOND
	are used only once. Remove them.

	* src/internal.c: Clarify error message printed when an undefined
	variable is found in a string expression.
	Bug #1783

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

	* src/parse.h src/parse.c:  Simplify the code that supports iteration.
	Part 4:  Iteration list no longer needs to be double-linked.

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

	* src/parse.h src/parse.c:  Simplify the code that supports iteration.
	Part 1:  Do not try to pre-calculate and flag empty iterations.

	* src/parse.c:  Simplify the code that supports iteration.
	Part 2:  Do not pre-calculate whether an iteration is "just once".

	* src/parse.h src/parse.c:  Simplify the code that supports iteration.
	Part 3:  Re-write next_iteration() to use recursion.

	* src/parse.h src/parse.c demo/iterate.dem:  Dynamic reevaluation of
	iteration limits.  Allows inner loop to reference variable from 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/command.c (timed_pause) src/stdfn.h (GP_SLEEP):  Enforce usage of
	win_sleep() even if usleep() is available.
	Bug #1867

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-10  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.

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

	* 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:  Enable antialiasing for polygons without
	seams:  Draw a run of filled polygons to a bitmap four times as large
	as the canvas and scale down with interpolation.

	* src/color.c src/term_api.h:  Add layer calls for color box.

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

	* src/wxterminal/wxt_gui.cpp|h (wxt_cairo_create_platform_context):
	Let cairo manage the Windows GDI bitmap internally. Requires cairo 1.4.

	* src/wxterminal/wxt_gui.cpp (OnPrint):  Use wxDC::GetHDC() instead of
	GetHandle() since that is also available in wxWidgets 2.8.

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

2016-10-06  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot.doc:  Fill in missing function definitions for "help"
	output.

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

	* docs/gnuplot.doc docs/plotstyles.gnu src/save.c:  Refer to the plot
	style as "boxxyerror" rather than "boxxyerrorbars" to reduce confusion
	arising from the style not drawing bars of any sort.

2016-10-04  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/win/wprinter.c: Has to include syscfg.h if definition of
	WINVER in there is to make any difference.

	* src/win/wpause.c: Dito.

2016-10-03 Allin Cottrell  <cottrell@wfu.edu>

	* src/win/wprinter.c:  Cross-compilation requires lower case include
	file names.

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

	* src/win/wgdiplus.cpp src/win/wgraph.c: Implement oversampling for the
	GDI+ windows terminal, i.e. draw diagonal lines at fractional pixel
	positions to avoid "wobbling" effects.  Vertical or horizontal lines
	and point symbols are still snapped to the nearest pixel to avoid
	blurry lines.  Replaces the old "oversampling" method which drew on a
	bitmap four times as large and then scaled down.

	* term/win.trm:  Update documentation of graph-menu and wgnuplot.ini.

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

	* src/term.c (enhanced_recursion): The enhanced text code was
	eating any whitespace that followed an opening '{'.  While this
	may not be noticeable in most cases, it breaks using the &{space}
	syntax to create or reproduce blank space in an enhanced text
	string.  Possibly the idea was to allow "{ /FontName
	text-in-new-font }" but the documentation has specifically
	disallowed this for many years.  Remove the offending loop that
	eats whitespace.  Bug #1863

	* src/boundary.c: Revised placement of x2label.

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

	* 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.

	* src/win/winmain.c:  Change only the state of minimised windows when
	raising text or graph windows.  In particular that does leave
	maximised windows as they are.

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

	* src/boundary.c: Use the shared routine write_label() to handle the 2D
	x, y, x2, and y2 axis labels rather than separate in-line code for each.
	This allows additional text properties for the axis labels, notably
	"boxed".  However this changes the effect of setting an offset for y, y2
	axis labels.  Previously this altered placement of the plot borders
	while leaving the absolute placement of the axis label on the page
	unchanged.  Now the plot borders remain fixed but the axis label moves.
	Bug #1550

	* term/svg.trm: Revert 2016-09-23 "in line images do not require png
	support".  Actually, they do.

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

	* src/color.c: Use the shared routine write_label() to handle the 2D
	cb axis label.

	* 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-24  Ethan A Merritt  <merritt@u.washington.edu>

	* term/post.trm: postscript terminal support for rotation of boxed text.
	This happens to also remove incompatibility of "set minussign" and
	"set term post noadobeglyphnames" and utf8 encoding.

2016-09-24 Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* src/wxterminal/wxt_gui.cpp (OnExport):  VS2010 does not accept
	splitting the string argument for wxT().

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

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

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

	* src/win/wgdiplus.cpp (EnhancedPutText):  Fix reference of rotation
	for enhanced text.

	* 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/wgdiplus.cpp:  Take fontscale into account. Bugfix.

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

	* term/svg.trm (SVG_image): Image support was conditional on png support
	but this can be relaxed for in-line images.

	* src/gadgets.c (write_label): If current textbox style has neither a
	border nor fill, then the "boxed" attribute can be ignored.

	* src/plot2d.c (cp_alloc): Initialize filledcurve_options to those from
	"set style data".

2016-09-22  Per Bothner  <per@bothner.com>

	* term/svg.trm (SVG_image): In domterm mode an embedded image should
	always be inline rather than linking to an external file.

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

	* src/wxterminal/wxt_gui.cpp|h:  Add "print" toolbar button. For now,
	it is only available on Windows, but support could in principle be
	added for other platforms. See feature request #304.

	* src/wxterminal/wxt_gui.cpp:  Eliminate warnings about unused
	variables. Used define _WIN32 to test for Windows platform.

	* src/wxterminal/wxt_gui.cpp (wxtFrame::OnExport):  Save as enhanced
	metafile (emf). Only available on Windows.

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

	* src/qtterminal/QtGnuplotScene.h src/qtterminal/QtGnuplotScene.cpp:
	qt terminal support for rotation of boxed text.

	* src/wxterminal/gp_cairo.c:
	cairo/wxt terminal support for rotation of boxed text.

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

	* src/internal.c src/eval.h src/eval.c src/internal.h src/parse.c
	docs/gnuplot.doc:  New cardinality operator |A| reports number of
	entries in array A.   Example:  plot for [i = 1 : |A|] f(A[i])

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

	* src/getcolor.c src/save.c src/show.c:  Remove unreachable case
	statements in color mode switch.  The fprintf warning they contained
	would have accessed uninitialized memory (found by canalyze static
	code analysis tool).

	* src/graph3d.c: Remove out-of-date comments.

	* src/graph3d.c (ztick_callback):  orientation of z-axis tick marks
	changes with azimuth.  "set zlabel rotate parallel" 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 examples in the manual.

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

	* src/multiplot.c:  Allow "boxed" attribute in the title for a multiplot
	layout. Example:  set multiplot layout 2,2 title "Example" boxed

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/boundary.c src/graph3d.c src/set.c src/unset.c:  Write plot titles
	using the general routine write_label() rather than in-line code.
	This allows use of additional text properties, in particular "boxed".

	* 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>

	* src/mouse.c:  Change mouse pointer to indicate rotation during azimuth
	change via mouse.  Add a help text for dragging with mouse button 3.

	* src/mouse.c:  Revert mouse pointer to normal when enabling/disabling
	mouse mode.

	* src/win/wgraph.c (GraphInit):  Do not set an (automatic) window class
	mouse pointer.  As we set the pointer ourselves as required, that caused
	flickering of the mouse pointer.

	* src/win/wtext.c:  Change mouse pointer while marking text.

	* src/term/cairo.trm (cairotrm_init):  Redirection of output to a
	printer on Windows requires the use of gpoutfile.  Let pdfcairo on
	Windows always use the cairostream_write callback to enable printing
	of PDF files.

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

	* src/win/wgnuplib.rc src/win/wgraph.c (CopyPrint) src/win/wprinter.c
	(DumpPrinter):  Remove unused lower part of the "general" print
	property sheet by supplying an (empty) dialog template.  Add a note
	that printer settings will be ignored since the PRN file mechanism
	sends terminal output to the printer unaltered.

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

	* src/win/wprinter.c:  Previous change failed to apply default size
	when not the corresponding property sheet was not shown.

	* src/win/winmain.c (close_printer):  The code relied on a windows
	terminal graph window being opened, but should not.  Always supply a
	valid window handle to DumpPrinter().  Include the current terminal
	name in the print job title.

	* 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.  Make
	use of the appropriate printer spooler API instead.  For constistency,
	use a print property sheet instead of a print-setup dialog here too.

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

	* src/graph3d.c src/graph3d.h src/mouse.c src/save.c src/set.c
	src/show.c src/unset.c src/eval.c docs/gnuplot.doc demo/azimuth.dem:

	New command "set view azimuth <angle-in-degrees>"
	Changing the view angles rot_x and rot_z cannot move the z axis out of
	the plane normal to the canvas horizontal. This patch adds a new angular
	setting "azimuth" that rotates the plane containing the z axis about
	the line of sight.  I.e. "set view azimuth 90" places the z axis
	parallel to the canvas horizontal rather than the canvas vertical.
	Click-and-drag with right mouse button provides interactive control of
	the azimuth.  Azimuth is ignored by 2D plots and by "set view map".

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

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

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

	* src/win/wgnuplot.exe.manifest src/win/wgnuplot.exe.manifest64:  Add
	compatibility flags vor Windows 7, 8, 8.1, and 10 to enable proper
	detection of the Windows version.
	Bug #1851

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

	* src/win/wgraph.c src/win/winmain.c src/win/wprinter.c
	src/win/wcommon.h src/win/wgnuplib.h src/win/wgnuplib.rc:
	Replace the deprecated old-style print-setup dialog (which was shown
	when the user requests the windows terminal to print) by a print
	property sheet.  Integrate the previously separate dialog to request
	the print size.  This sadly requires quite a bit of code to implement
	a COM callback object.  Also we now properly clean-up printing
	resources.

	* src/eval.c:  Windows 10 also deprecated the VerifyVersionInfo API
	which is used by the external findversion.h, as well as GetVersionEx.
	Since the above patch fixes GetVersionEx's behaviour on all current
	Windows versions, there's no need to rely on findversion.h any more.
	See Feature Request 422

	* config/mingw/Makefile:  Resource target depends on manifest files.

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

	* 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-09-07  Bastian Maerkisch  <bmaerkisch@web.de>

	* 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.

2016-09-06  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 splot borders drawn when the base is upside down.
	Bug #1810

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

	* 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-05  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

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

	* src/datafile.c term/svg.trm:  Remove dead code and comments.

	* 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-28  Ethan A Merritt  <merritt@u.washington.edu>

	* demo/smooth.dem docs/gnuplot.doc:  Update docs for "smooth" option.
	Fix regression in demo caused by failure to promote N = points per bin
	to a real number.

2016-08-26  Per Bothner  <per@bothner.com>

	* term/svg.trm src/term.c (init_terminal):
	New terminal "domterm" wraps svg output in escape sequences compatible
	with in-line display in terminal emulators based on DomTerm
	(http://domterm.org). Conceptually similar to the tektronix, sixel,
	selanar etc graphic modes that interleaved with text output in
	old-school character cell terminals or emulators like xterm.

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

	* src/color.c src/set.c src/gadgets.c src/gadgets.h src/tables.c
	src/tables.h src/save.c src/show.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

	* 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

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/plot2d.c (eval_plots): "smooth {freq|fnorm|cum|cnorm}" operations
	replace the original data, which invalidates autoscaling during input.
	Now we save/restore autoscale state during input so that autoscaling of
	the smoothed data starts from a clean slate.
	Bug #1826

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

	* src/gadgets.h (arrow_end_undefined) src/set.c src/graphics.c:
	Initialize arrow structure to have type arrow_end_undefined.
	If we see an arrow with that type later, it indicates corruption due
	to an error exit from "set arrow".

	* src/eval.c (evaluate_at): Make unsupported array operations fatal
	(int_error) rather than informational (int_warn).  The int_warn version
	eventually returned UNDEFINED or NaN to the caller, and not all callers
	were prepared to deal with that.  E.g.
	    array A[1]; set xrange [0:A]; set param; splot u,u,u ---> boom!

	* src/tabulate.c (output_number):  Oops. Forgot to check for log being
	implemented via nonlinear axes.  This should have been part of the
	nonlinear axis patch set.

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.

	* 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

	* src/axis.c (eval_link_function) src/save.c (save_nonlinear):
	If there is an expression-parsing error while processing a
	"set nonlinear" command, the forward/reverse axis mapping can be
	left in a corrupted state.  Add a sanity check for this to prevent
	bad things from happening when the axis mapping function is invoked.

	* src/axis.c (gstrdms):  Sanity check user-provided format.
	Reject format characters that are not handled explicitly.

	* src/stats.c (statsrequest):  Early exit if there are no usable points.

	* src/fit.c (update): Fix error in error reporting (null filename).

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

	* src/fit.c: Clear SAMPLE_AXIS before using it as scratch space.

	* 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  Dima Kogan  <dima@secretsauce.net>

	* src/gp_types.h src/interpol.c src/plot2d.c src/tables.c
	docs/gnuplot.doc:  New option "smooth fnormal" plots normalized
	frequency, analogous to plot foo using 1:(1./total) smooth freq"

2016-08-17  Daniel J Sebald <daniel.sebald@ieee.org>

	* term/lua.trm: Warn on error from fflush() or ftruncate().
	Bug #1840

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

	* src/graphics.c (plot_filledcurves) src/plot2d.c (cp_extend)
	src/plot2d.c docs/gnuplot.doc:
	This is a CHANGE in filledcurves behaviour with repect to fillstyle.
	The fillstyle "border" attribute is now ignored except for filledcurves
	option "closed", the default. In order to make sure the border is
	drawn all the way around, duplicate the first point at the end.

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

	* src/plot3d.c (eval_3dplots) src/plot2d.c (eval_plots):
	Check for legal log-scaled axis ranges before trying to plot.

	* src/axis.c (axis_log_value_checked):  Rewrite test for positive
	values so that it catches NaN as well as negative numbers.

	* src/command.c (link_command): More robust handling of error during
	'set link' or 'set nonlinear' commands. Do not fill in the
	axis->linked_to_* fields until after the points of potential failure.

	* 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-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/command.c (link_command):  If the "set nonlinear" failed to
	complete it could leave an axis marked as nonlinear but with no mapping
	functions defined.  Now we reset the links on failure.

	* 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
	rather glyph so it does not mix well with half-width digits in a number.
	This problem is specific to SJIS.

2016-08-11  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c:  Print the error code if opening the print dialog
	should fail.

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

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

	* src/win/wgraph.c (CopyPrint) src/win/wprinter.c (DumpPrinter)
	src/win/wresourc.h src/win/wgnuplib.rc src/win/wgnuplot.rc:
	Add a progress bar to print progress dialog.  Bump minimum Windows
	version to XP here, too.

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

	* src/win/wresourc.h:  Message code for saving as bitmap was in conflict
	with the message code for hiding graph #2.  Bugfix.

	* src/win/wcommon.h src/win/wgraph.c src/win/wprinter.c:  Store the
	memory handles itself to save the user's printer selection (instead of
	the pointer returned by GlobalAlloc) and use them in all printer
	dialogs. Bugfix.

	* src/win/wprinter.c (DumpPrinter, PrintDlgProc) src/win/wgraph.c
	(CopyPrint) src/win/wgnuplib.h (GP_PRINT):  Changing the private data
	of some possibly unknown window is dangerous.  Store the pointer to the
	printer data in the dialog's 'WindowLong's instead.

	* src/win/wprinter (DumpPrinter):  The Escape() function always expects
	a byte encoded string, irrespective if UNICODE is defined or not.
	Explicit type casting may hide errors. Bugfix.

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

	* 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.
	(VERSION_CPPFLAGS): Define version numbering flags.
	(doc2html.exe): Pass version numbering flags.
	(COMMONLIBS): Add newly required lib shlwapi.

	* config/config.nt (HAVE_ERF, HAVE_ERFC, HAVE_STDBOOL_H, isnan):
	Configure macros for current version of MSVC (VS 2015).

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

	* src/win/wgdiplus.cpp:  Fix two more memory leaks.

	* src/win/wcommon.h src/win/wgnuplib.h src/win/wgraph.c
	src/win/wgdiplus.cpp:  GDI+ implementation of enhanced text.
	Until now the GDI+ backend still used the GDI code to draw enhanced
	text, which caused differences in layout if text was rendered as
	"normal" or enhanced text.  We now re-use the previous GDI-only
	routines and introduce function pointers to call GDI or GDI+ code
	depending on if they are called from drawgraph() or
	drawgraph_gdiplus().

	* src/win/wmenu.c:  Loading of icon images requires GDI+.  Add an error
	message if support for it is not compiled in.  Fix the case when
	GNUPLOT_SHARE_DIR is not defined.

	* term/svg.trm:  The change on 2016-08-05 did not handle the case
	of GNUPLOT_JS_DIR being undefined.

	* src/win/wtext.c:  getc might be a macro and thus needs to be
	undefine'd before redefinition.

	* src/win/wgdiplus.cpp:  Include iostream.h before syscfg.h in order
	to avoid MSVC choking on the re-definition of stdio routines by
	wtext.h/winmain.c.  Do not use namespace std since this causes MSVC
	to throw an error because of the (re-)definition of bool in syscfg.h.

	* src/win/wmenu.c:  Move variable declaration to beginning of code
	block.  Required e.g. by MSVC 2012.

	* 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.

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

	* config/mingw/Makefile:  Enforce calling the lua executable instead
	of the lua wrapper script of Mingw64.  Better fix for the build failure
	of gnuplot-tikz.help.

2016-08-08  Bastian Maerkisch  <bmaerkisch@web.de>

	* config/mingw/Makefile:  Avoid warning messages when using clang.
	Qt 5.x assumes C++11. Omit C++ flags when building gp_cairo.c.
	Japanese help file was missing a graph from the demos.  Execute lua
	via the cmd.exe shell in order to avoid errors when redirecting its
	output.  Remove obsolete flag CONSOLE_SWITCH_CP.  Do not enable caca
	terminal by default.

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 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.

	* src/boundary.c (do_key_layout):  Tweak vertical spacing of key titles
	to make the result more like previous versions (in particular
	the canvas terminal).  See patch of 2016-07-14

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

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

2016-08-06  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/command.c src/plot.c src/syscfg.h src/win/winmain.c|h
	src/win/wtext.c|h:  Enable support for encodings (including UTF-8) for
	console mode gnuplot on Windows.
	Patch #734

	* src/win/wmenu.c src/win/wgdiplus.c|h src/win/wgnuplot.mnu:  Images
	of toolbar icons can be read from a file.

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

	* src/plot2d.c src/set.c src/mouse.c:  When logscaling is implemented
	via nonlinear axes, any test for "if (R_AXIS.log)" must come _after_
	a test for "if nonlinear(&R_AXIS)". Only affects logscaled polar axis.
	Nonlinear axes part 19

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

	* term/canvas.trm term/lua.trm term/svg.trm term/post.trm src/plot.c
	src/win/winmain.c|h:  The code to determine paths relative to the
	gnuplot executable on Windows spread by copy and paste.  Let all those
	sites call a single new function instead and fix an improper handling
	of wide strings which was overlooked due to an explicit type cast.
	Fix memory leaks while at it.
	Bug #1837

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/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 using the
	contents of the 4th entry in the `using` specifier.
	    plot foo using 1:2:3:4 with labels rotate variable

	* 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
	Bug #1835

	* demo/matrix_every.dem demo/all.dem:  Add demo that serves as a unit
	test for the above regression and fix.

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

	* src/axis.h src/plot2d.c:
	Stricter definition of nonlinear(axis) allows to distinguish nonlinear
	axes from linked (linear) axes.

	* src/axis.h demo/nonlinear2.dem:
	Rework tic and particularly minitic generation for nonlinear axes,
	including special case code for logscale axes.  The default minitics
	for log-scale axes in this mode are now always equivalent to
	"set mtics base" (i.e. unit intervals 1-9 for log10).
	Nonlinear axes part 17

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

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

	* src/axis.h src/command.c src/unset.c: Internal flag ticdef->logscaling
	was not being cleared by "unset log" or "set nonlinear".
	Nonlinear axes part 16

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

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

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

	* src/graph3d.c:  "splot ... with dots" was accidentally broken by the
	addition of multibyte PT_CHARACTER support.  This was a regression from
	released versions of 5.0.

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

	* src/win/wgraph.c src/win/wgdiplus.cpp|h src/win/wresourc.h:  Add an
	option to the menu to save the current graph as bitmap.  Supports all
	encoders available to GDI+.  On my system that is (TIFF, JPEG, GIF,
	PNG, and BMP).  Defaults to PNG.

	* src/win/wgraph.c (SaveAsEMF):  Tweak flags for GetSaveFileName() to
	make sure that the file/path is not read-only and to preserve the
	current working directory.

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

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

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

	* src/win/wgraph.c src/win/wmenu.c:  Use the "large" icon set for the
	toolbar if the nominal resolution is larger than 96dpi.  Use
	TB_ADDBUTTON instead of TB_LOADIMAGES as this somehow eliminates
	another major resource leak.

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

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

	* src/win/wgnuplot.exe.manifest src/win/wgnuplot.exe.manifest64
	src/win/wgraph.c src/win/winmain.c|h src/win/wtext.c:
	Windows scales gnuplot's windows according to the monitor's scaling
	factor.  This in turn may be based on the monitor's DPI or an explicit
	user setting.  In consequence gnuplot's text window and plot output look
	blurred e.g. on high-resolution screens.  This changeset makes gnuplot
	(system) DPI aware so that Windows no longer scales automatically
	(at least in the most common case).  Window sizes in wgnuplot.ini are
	(still) interpreted to be given in the default resolution of 96dpi.
	See also bug #1807.

	* src/win/wtext.c (DoLine):  Fix off-by-one error which caused the
	area below the last line to contain garbage in some cases.

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

	* src/win/wgdiplus.cpp src/win/wgraph.c:  Textbox fillcolor and
	bordercolor support for windows terminal.  Transparency works
	except when using the GDI only variant with antialiasing disabled.

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

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

	* src/gadgets.c src/gadgets.h src/save.c src/save.h src/set.c
	src/show.c docs/gnuplot.doc:
	Bookkeeping and core code implementation of textbox fillcolor and
	bordercolor. Note that transparency is possible if the fillcolor
	contains an alpha component.

	    set style textbox {noborder | border {<border_color}}
	                      {fillcolor <fill_color>}

	* src/qtterminal/QtGnuplotScene.cpp src/wxterminal/gp_cairo.c
	term/cairo.trm term/gd.trm term/lua/gnuplot-tikz.lua term/post.trm
	term/pslatex.trm term/tkcanvas.trm src/gplt_x11.c:
	Textbox fillcolor support for individual terminals.

	* demo/all.dem demo/textbox.dem:   New demo

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

	Enable UNICODE build on Windows.
	Patch #727

	* src/command.c src/show.c src/win/wcommon.h src/win/wgdiplus.cpp
	src/win/wgnuplib.c|h src/win/wgraph.c src/win/winmain.c|h
	src/win/wprinter.c src/win/wtext.c term/gd.trm term/win.trm
	config/mingw/Makefile config/watcom/Makefile:

	Windows offers two versions of its API:  a (multi-byte) variant
	termed "ANSI" and a Unicode (wchar_t) variant "W".  A set of TCHAR
	macros and types enables writing code which can be compiled with
	or without the UNICODE/_UNICODE flags being set.  With this change
	gnuplot on Windows now uses the Unicode variant by default.  While this
	at first looks like a massive set of changes, most of it is actually
	rather simple:
	  - Wrap strings constants in TEXT() macros.
	  - Use TCHAR types instead of plain char types.
	  - Replace string functions by tchar equivalents:
		_tcsdup (strdup) wsprintf (sprintf) _tcscmp (strcmp)
		_tcscpy (strcpy) _tcsncpy (strncpy) _tcscat (strcat)
		_tcsstr (strstr)
	  - Modify printf format strings.
	In addition we now explicitly call "ANSI" functions, or provide
	conversions from CHAR to WCHAR or vice versa in some cases.

	* src/show.c (show_version):  Add UNICODE build information to output of
	"show version long".

	* src/external.c|h:  Use dll_open_w() also for console mode gnuplot
	on Windows.

	* src/command.c src/show.c src/win/wgnuplib.h src/win/wgraph.c
	term/win.trm:  Define TCHARFMT to abstract the format string required
	for printf etc. for TCHAR strings.  Use it to fix a few format strings.
	Note that Mingw64 seems to accept %ls but not %ws which according
	to MSDN are supposed to mean the same thing.

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

	* src/win/wgdiplus.c wrc/win/wgnuplib.h src/win/wgraph.c term/win.trm:
	Aggregate related move/vector requests in a polyline.  This saves
	space in the internal list of drawing commands and accelerates
	re-drawing since the terminal code does not have to do this repeatedly.

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

	* src/history.c (write_history_list):  Recent regression caused the
	the history list numbering to be off-by-one. E.g. "history !N"
	mistakenly re-executed command N-1 rather than command N.
	See also Bug #1763

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-14  Ethan A Merritt  <merritt@u.washington.edu>

	* docs/gnuplot.doc docs/plotstyles.gnu demo/custom_key.dem:
	Add custom key demo figure to the documentation.

	* src/boundary.c (do_key_layout):
	The command 'set key spacing <foo>' adjusts the vertical spacing of
	entries in the key.  However a complicated minimum size test caused the
	result to be discontinuous as a function of <foo>.
	I.e. 'set key spacing 2' came out the same as 'set key spacing 1'
	but both were smaller than 'set key spacing 1.8'.
	This patch makes the vertical spacing a simple multiplier for
	character height in the current font.  It also dissociates the
	height of the key sample itself from the line spacing.

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.

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

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

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

	* src/win/screenbuf.c|h src/win/wtext.c:  Handling of colored text
	was lost when re-working the text window's internals for the 4.6
	release in 2011.  Turns out that it is not too hard to re-enable
	that again.

2016-07-03  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.

	* 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-07-02  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/command.c (changedir):  Handle encodings (Windows).

	* src/term.c:  Replace local function prototypes with proper include.

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

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

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

	* configure.ac:  The change of 2016/05/23 to the --with-readline=DIR
	code did not properly handle the case when libedit is installed and thus
	found by AC_CHECK_HEADERS, but we really want to point to GNU readline
	installed in DIR.

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

	* src/win/wtext.c (UpdateCaretPos):  Fix a resource leak which occurred
	only if the encondig is set to utf8 or sjis.

	* src/readline.c (readline):  VREPRINT conflicts with hard-coded ^R for
	reverse-search.  Deactivate that section.

	* src/history.c (gp_read_history):  Cast argument of isspace() to
	unsigned char.

	* src/history.c (write_history_list):  Avoid adding extra leading
	spaces when saving to a file.  Index of history_get is zero-based
	relative to history_base.

	* src/history.c (write_history_list):  Let the built-in readline use
	the same code as is used for GNU readline and libedit.

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/graph3d.c (draw_3d_graphbox): Don't draw ztics or tic labels
	at view angle rot_x=0 (projection along z axis).

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).

	* src/graphics.c:  Rearrange code to avoid compiler warning about
	unused variable image_z_axis.

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

	* src/readline.c src/plot.c config/config.mgw config/mingw/Makefile:
	Allow console mode gnuplot on Windows to use GNU readline, which is
	more powerful than the builtin code, but still does not handle Unicode
	input on Windows.

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

	* term/tkcanvas.trm:  Error check for ftruncate().
	Bug #1798

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-12  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/gplt_x11.c (gpXTextExtents):  Wrap call to XTextExtents() in a
	routine that checks first for multibyte support.

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

	* src/set.c (set_table) docs/gnuplot.doc:  New option to append tabular
	plot output to an existing file.  "set print" already works this way.
	    set table "outfile" {append}

	* src/multiplot.c (multiplot_start):  Remove alarming warning messages
	if default values for inter-plot spacing are used.

	* src/axis.c src/axis.h src/plot3d.c:  Remove unused macro definitions.

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

	* src/stats.c:
	Since we now store the data value itself rather than log(value), there
	is no longer a problem running stats while the axes are log-scaled.

	* src/stats.c:  An unreadable line in a data file should not be a fatal
	error in "stats".  Print a warning and keep going.

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

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

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

	* src/axis.h (ACTUAL_STORE_WITH_LOG_AND_UPDATE_RANGE):
	Since we now store the data value itself rather than log(value), there
	is no longer a need to replace non-positive values with NaN on input.
	Nonlinear axes part 15

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

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

	* src/readline.c src/gnuplot.doc:  ^R starts a backward-search through
	the history.  Searches the command history as you type.  Use ^R/^S to
	find the next/previous match.

	* src/history.c (history_find_by_number, history_find,
	history_find_all):  Share the functions for GNU readline and the
	built-in code.  Remove the old specialised code.

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

	Nonlinear axes part 14.

	* src/axis.h src/save.c src/set.c src/unset.c src/pm3d.c src/pm3d.h:

	- Turn all the log/delog macros into no-ops, including z2cb.
	This reduces the size of the gnuplot executable by 1-2% and removes
	any behavioral dependence on the axis->log flag in the core code.

	- Repurpose the axis->log flag to special-case nonlinear axes that
	were set up using the "set log" command.  This makes the save and show
	commands report axes as log-scaled if they were set up by "set log"
	but not if they were manually defined using "set nonlinear" even though
	the result is otherwise the same.  It also allows mousing of logscaled
	axes in the svg and canvas terminals.

	The implementation of "set log" has now been almost entirely replaced.
	This should be transparent to users.  I know of only a few exceptions.

	- In some cases the range limits chosen for autoscaled log axes come
	out slightly different with the new implementation.  In most cases this
	is an improvement, but it is possible there are other cases where the
	new autoscaled range is less satisfactory.
	Bug #1590

	- Log scaling proper and choice of log-scale axis tics are now
	separable. This addresses several long-standing bugs, including
	Bug #10 filed back in 2000!  I.e. even if the axis is log-scaled,
	you can still user "set tics <inc>" or "set tics nolog".
	Bug #10 Bug #1250

	- Minor axis tics now work as expected over all logscale axis ranges.
	Bug #1748

	- The new code is slightly slower.  Speed will be recovered in a
	separate patch.

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

	* src/pm3d.c src/pm3d.h:  Make z2cb() a macro that calls the original
	routine.  This will allow us to replace it cleanly with a no-op later.

	* src/set.c src/unset.c src/axis.h src/command.c src/axis.c:
	Nonlinear axes part 13.
	Re-implement the "set log <axis>" command internally as the pair of
	commands "set nonlinear <axis> via log10(x) inv 10**x; set xtics log".
	Similarly for an explicit base "set log <axis> <base>" and for
	"unset log".  The new code is selected by #define NONLINEAR_AXES 1
	The orignial code is still in place and can be selected either by
	1) ./configure --without-nonlinear-axes
	   (equivalent to #undef NONLINEAR_AXES)
	2) #define NONLINEAR_AXES 0
	   nonlinear axis support selected but "set log" command doesn't use it.

	Note: at this stage the "show" and "save" commands report logscaled
	axes as nonlinear but do not recognize that this is from "set log".
	The next patch set will repair this.

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

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

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

	* src/gp_hist.h:  Make (now) internal variables static.

	* src/readline.c:  Use the new readline-compatible functions to access
	the history.

	* src/command.c src/gp_hist.h src/history.c:  Use the new add_history
	function to add items to history.  Remove the old one.

	* src/gp_hist.h src/history.c:  Add functions similar to the GNU
	history library.  These will eventually be used to merge codepaths
	which use GNU readline/history and the built-in readline to ensure
	consistent behaviour.

	* src/command.c (history_command):  The `history !` command replaced
	the last command in the history list by the search result.  That used
	to be the history command itself, but since 2016-03-31 history
	commands are no longer stored in the history.  Now simply re-add
	the search result to the history.  Bug fix.

	* src/syscfg.h src/command.c src/gp_hist.h src/history.c src/show.c:
	New define USE_READLINE instead of a growing list of checks for
	(more or less) GNU readline compatible libraries.  Prepares for
	using WinEditLine on Windows.

	* src/plot.c (main) src/command.c (rlgets)
	src/readline.c|h (readline_ipc):  Move initialisation of
	rl_getc_wrapper from readline_ipc() to main() also for GNU readline.
	Remove the wrapper function readline_ipc.

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

	* term/win.trm:  Fix a few format specifiers for POINT members which
	are of type long int.

	* configure.ac:  Auto-detect if --with-readline=DIR refers to GNU
	readline or NetBSD editline.

	* src/win/wtext.c:  When pasting, escape tab characters by ^V instead
	of replacing them by space.
	Bug #1444

	* src/readline.c docs/gnuplot.c:  Ctrl-V disables the interpretation
	of the following key as editing command.  Hence, tabs can now be
	inserted again by pressing ^V TAB.  On Windows, Ctrl-V is not passed
	on to the built-in readline, though, but interpreted as "paste".

	* src/win/wmenu.c src/win/wgnuplib.h:  Use UTF16 "W" APIs to handle
	Unicode.  This affects all menu dialog boxes (open/save, directory,
	input).  It is still assumed that wgnuplot.mnu is encoded using the
	ANSI codepage.  Reformat source while at it.
	Part 5 of wgnuplot Unicode support.
	Patch #727

2016-05-22  Daniel J Sebald <daniel.sebald@ieee.org>

	* term/write_png_image.c:  gdImageDestroy() needed on code paths for
	both error and success.

2016-05-21  Daniel J Sebald <daniel.sebald@ieee.org>

	* term/write_png_image.c:  Add utility routines to encode the png
	image in Base64 for in-line inclusion.

	* term/svg.trm:  If the "standalone" terminal option is chosen, images
	will be embedded as a Base64 byte stream object rather than saved as an
	external *.png file and included by reference.
	Bug tracker item #1135

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

	* src/win/wmenu.c:  Use standard file API instead of _lopen and
	friends.

	* src/misc.c (encoding_from_locale):  On Windows, if the current
	encoding cannot be determined from the locale, fall back to deduce
	it from the currently active codepage.  Avoids an error with
	OpenWatcom, which only handles the C locale.

	* src/readline.c src/win/wtext.c src/win/wcommon.h src/win/wgnuplib.h:
	Screen updates during line-editing in wgnuplot are really slow since
	it needs to redraw the line for every character which is printed.  This
	is even more noticeable now that it needs to determine the on-screen
	width of text in order to take care of wide Unicode characters.

	This change improves the speed of screen output by eliminating
	unnecessary intermediate redraws by adding suspend/resume calls to
	several readline functions, which need to print and 'erase' (i.e.
	overwrite) multiple characters.  Screen output is temporarily
	disabled and changes are only saved to wgnuplot's buffers.  Only when
	the operation is finished, the current input line is redrawn.

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

	* src/win/text.c (TextUpdateStatus):  Mingw64's swprintf seems to have
	a problem with the %S format.  Use swprintf_s and format %hs instead.
	Bug #1794

	* config/config.mgw:  Add a work-around for the missing swprintf_s
	in MinGW32's library.

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

	* configure.ac:  Make --without-nonlinear-axes option match the help
	message.

	* src/axis.c (clone_linked_axes): Silence warnings generated by testing
	axis mappings at the current extrema (axis->set_m[in|ax]) if it is a
	dependent autoscaled axis.

	* src/command.c (link_command): Nonlinear axes part 12.
	As it stands, bad things happen if an axis ends up linked to another
	visible axis ("set link") and also to a shadow axis ("set nonlinear").
	This patch adds checks to both commands to prevent this from happening.

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

	* src/win/wtext.c src/win/wpause.c src/win/wcommon.h:  Show the current
	encoding in the status bar of the text window.

	* 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 (DragFunc, M_PASTE) src/win/wpause.c:  Make sure to
	use wide character APIs for Unicode windows. Bug fix.

2016-05-17  <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.

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

	* src/plot3d.c (get_3ddata):  The 7-column input case of "with vectors"
	was broken by code refactoring (2016-02-29). Clean this up and store
	color information in both head and tail of vector.
	Bug #1793

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

	* term/post.trm: Do not read beyond the end of a font spec.

2016-05-13  Tatsuro MATSUOKA  <tmacchant3@yahoo.co.jp>

	* src/internal.c (GP_MATHERR):  The matherr mechanism is not supported
	by Mingw64 in both 32bit and 64bit mode.  BM: But it is available with
	MSVC, so re-enable it there also for 64bit builds.
	Bug #1791

	* src/config/mingw/Makefile:  Add default path for QT in Mingw64 32bit
	builds.

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/axis.c (extend_primary_ticrange): Snap logscale range to nearest
	even power if it is already closer than epsilon (a.k.a. "set zero").
	Bug #1590

2016-05-09  Shigeharu Takeno  <shige@iee.niit.ac.jp>

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

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

	* src/pm3d.c src/command.c src/mouse.c src/plot2d.c: Where possible,
	use macro nonlinear(AXIS *) rather than #ifdef NONLINEAR_AXES.

	* src/axis.h src/contour.c src/datafile.c src/graph3d.c src/graph3d.h
	src/plot3d.c src/util3d.c src/axis.c src/boundary.c:
	Nonlinear axes part 11.  3D plot axes x, y, z, countours.

	* demo/all.dem demo/nonlinear5.dem:  logscale z with contours

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

	Let wgnuplot handle Unicode (not console mode gnuplot)
	Patch #727

	Part 4 - File APIs.

	Windows C runtimes do not handle UTF-8.  We work around this
	restriction by using the "wide" (UTF-16) variants of the API and
	translating from the internal encoding to UTF-16 when required.

	* src/win/winmain.c (win_fopen) src/syscfg.h:  Wrap calls to fopen()
	in a new routine win_fopen() on Windows which uses _wfopen().

	* src/win/command.c (do_system): Use _wsystem() instead of system().

	* src/win/winmain.c (fake_popen, fake_pclose):  Handle encodings by
	using _wsystem().

	* src/stdfn.c (opendir, closedir, readdir, rewinddir):  Handle
	encodings by using UTF-16 internally.  Convert search results to a
	byte encoded format according to `encoding`.  This most notably brings
	encoding/unicode support for tab-completion on the command line.

	* src/external.c|h (DLL_OPEN):  Handle encodings for the file name of
	external libraries.

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

	* src/gp_types.h (intNaN) src/axis.h (invalid_coordinate):
	If an expression returns "undefined" or NaN inside a function returning
	a real then the return value itself can be set to NaN. Inside a function
	returning an int, as for example the terminal coordinate mapping
	functions, this does not work. Now we define an integer equivalent
	intNaN with leading bit 1 and all trailing bits 0 (max negative value in
	two's complement representation).  Most callers can test via a generic
	macro:  if (invalid_coordinate(x,y)) ...

	* src/graphics.c:  Filter out invalid coordinates produced by axis
	mapping functions.  As an example this fixes bad postscript output
	produced by nonlinear1.dem.

	* src/axis.h:  New macro nonlinear(AXIS *) becomes a noop if configured
	without support for nonlinear axes.

	* src/save.c:  "save" command can use a loop to save the log status of
	all axes rather than running through them in-line one by one.

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

	Let wgnuplot handle Unicode (not console mode gnuplot)
	Patch #727

	Part 3 - GUI.

	* src/win/wtext.c (M_PASTE):  Always ask the clipboard for UTF-16
	encoded text.  This is always possible since Windows will convert
	other encodings (OEM/ANSI) for us.

	* src/win/wtext.c (TextCopyClip):  Now that strings for display
	are stored internally in UTF-16 format, use Unicode to copy to
	clipboard, too.

	* src/win/wgnuplib.h src/win/wgraph.c src/win/winmain.c src/win/wtext.c:
	Drag'n'drop handles Unicode encoded file and directory names.

	* src/win/winmain.c (Pause) src/win/wpause.c src/win/wcommon.h
	src/win/wgnuplib.c|h: Create pause dialog box as Unicode window.
	Pause() will do the text conversion according to current encoding.

	* src/command.c (pause_command):  Converting the string encoding
	is now only required for console mode gnuplot.

	* src/win/wmenu.c:  Temporary fix of string type of argument for
	MessageBox.

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

	* config/watcom/Makefile:  Fix compilation by adding definitions
	of version and patchlevel to flags.

	* config/config.oww:  Add some more defines for function names.

	* src/win/wgnuplib.h src/win/winmain.c:  Remove old compiler
	specific checks which are no longer required.

	* src/win/wgnuplib.h src/win/wgraph.c src/win/wpause.c
	src/win/wprinter.c src/win/wtext.c:  No need to have functions use
	WINAPI (stdcall) calling convention.  Remove define WDPROC.

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.

	* src/axis.h src/gadgets.c (apply_pm3dcolor) src/pm3d.c (z2cb):
	Use existing macros axis_do_log() and friends rather than doing
	hard-coded calculations with axis->log_base.

	* src/graph3d.c (draw_3d_graphbox): Fix think-o in revision to 3D axis
	label placement - should not multiply the constant offset by tic scale.
	Bug #1790

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

	Let wgnuplot handle Unicode (not console mode gnuplot)
	Patch #727

	Part 2 - Screen Output.

	* src/win/wtext.c src/win/screenbuf.c|h src/win/wgnuplib.h:  All output
	to the terminal window is stored in a buffer.  Change the internal data
	type of this buffer from "char" to "WCHAR".  This enables support for
	UCS-2 (i.e. BMP) characters.

	* src/win/wtext.c (TextPutCh):  All of gnuplot's screen output during
	line-editing passes through this function.  Make sure to properly
	convert codes to UTF-16 for storage in the buffer (includes UTF-8 and
	S-JIS sequences).

	Part 1 - Input.

	* src/text.c (WM_CHAR) src/win/wcommon.h src/win/wgnuplib.c:  Use "W"
	API variant to create text window to receive UTF-16 codes in WM_CHAR
	messages.  Convert them to the `encoding` set by the user for internal
	storage.  Handles basic multilingual plane (BMP) only.

	* src/misc.c|h (encoding_from_locale init_encoding) src/plot.c
	src/set.c:  When using the built-in readline, initialize the
	`encoding` according to current locale.  This is required since
	the behaviour of the built-in readline depends on `encoding` for
	utf8 and sjis.  Do this by extracting the code which handles
	`set encoding locale` to new functions in misc.c.

	* src/win/winmain.c|h (UnicodeText AnsiText WinGetCodePage
	WinGetEncoding) src/command.c src/win/wcommon.h src/win/wgraph
	src/win/wgdiplus.cpp:  Move code to convert a text from a given
	encoding to UTF-16 (UnicodeText) from wgraph.c to winmain.c.
	Extract mapping of gnuplot's encoding values to a Windows
	codepage (WinGetCodePage).  Move the inverse code from command.c
	to WinGetEncoding in winmain.c.  Implement AnsiText to convert
	from UTF-16 to a byte encoded string.

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

	* src/readline.c src/util.c|h:  The internal readline already
	handles UTF-8 multi-byte sequences.  Extend that mechanism
	to S-JIS. Likely most useful on Windows.
	Patch #729

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

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

	* src/graph3d.c:  Revise placement of axis labels in 3D plots.
	Remove dead code.  Use same axis-to-label gap on both x and y.
	Fix inconsistent use of h_tic or v_tic to define gap size.
	Bug #1781

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

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

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

	* src/command.c (link_command): Do not recalculate axis ranges after
	"unset link" for an axis that was not linked anyhow.

	* src/axis.c (parse_range):  The in-line range for a nonlinear axis
	must be transferred to its corresponding primary axis.

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.

	* src/datafile.c (df_generate_pseudodata): Nonlinear axes part 10.
	Sampling along '+' should track linear/nonlinear state of primary
	plot axis.

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

	* src/command.c src/plot2d.c src/set.c src/axis.c:
	Nonlinear axes part 9.
	Handle nonlinear polar axis r.  This completes support for 2D axes.

	* src/internal.c (f_assign):  In most places any numerical array index
	is accepted, but inside an assignment non-integral indexes caused an
	error.  Now the index is taken as floor(value) as it is elsewhere.

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

	* src/axis.c src/color.c src/command.c src/mouse.c src/parse.c
	src/plot2d.c src/pm3d.c src/save.c src/unset.c demo/nonlinear4.dem:
	Nonlinear axes parts 7 and 8
	Handle nonlinear x2, y2 axes (2D) and cb axis (2D and 3D).

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

	* src/axis.c src/axis.h src/set.c src/save.c:
	Nonlinear axes part 4
	New command "set tics logscale" lets the new nonlinear axis code use
	the old logscale tic placement code.  Thus the effect of the old command
	"set log x" can be replicated by
	    set nonlinear x via log10(x) inverse 10**x
	    set xtics logscale

	* docs/gnuplot.doc:  Nonlinear axes part 5 (documentation).

	* demo/all.dem demo/probably_tux.demo
	demo/nonlinear1.dem demo/nonlinear2.dem demo/nonlinear3.dem:
	Nonlinear axes part 6 (demos)

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

	* configure.ac src/axis.h:  Preparation for nonlinear axis code.
	Nonlinear axes part 1
	New configuration option --without-nonlinear-axes will allow to disable
	code that depends on #ifdef NONLINEAR_AXES.

	* src/graphics.c (adjust_offsets) src/plot2d.c (eval_plots):
	Revise tests for linked axes to distinguish between "set nonlinear"
	and "set link".

	* src/axis.c src/axis.h src/command.c src/mouse.c src/plot2d.c src/save.c
	src/save.h src/set.c src/show.c src/tables.c src/tables.h src/unset.c:
	Nonlinear axes part 2
	New command "set nonlinear <axis> via f(axis) inverse g(axis)"
	At this stage only the x and y axes are supported.

	* src/axis.c src/plot2d.c:
	Nonlinear axes part 3
	When plotting functions on a nonlinear axis, choose the samples evenly
	along the linear axis it is linked to.

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

	* src/graph3d.h src/util3d.c:  Move macro map_x3d() and friends from
	a shared header to the only file where they are used.

2016-04-21  Tatsuro MATSUOKA  <tmacchant3@yahoo.co.jp>

	* win/gnuplot.iss: Restore <BOM> to indicate utf-8 enconding.
	Reverts change 2016-04-10

	* config/mingw/Makefile:  Add warning that it is required to use the
	unicode version of Inno Setup Compiler rather than the standard version
	because gnuplot.iss is now encoded utf-8 with BOM.

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.  Now we fix the broken path so
	that both are working, at least on test data.
	Bug #1782

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

	* src/util3d.c (apply_3dhead_properties) src/util3d.h src/hidden3d.c
	src/graph3d.c:  After consolidation of 2D and 3D axis initialization
	into axis_set_scale_and_range() (3-Mar-2016) there is no longer any
	reason to have separate 2D and 3D versions of apply_head_properties
	for arrows.

	* 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/fit.c (fit_command): Replace misleading use of SECOND_Z_AXIS.

	* src/fit.c (fit_command): Avoid using globals x_axis/y_axis/z_axis.

	* src/axis.c:  Disallow commands affecting z2, e.g. "set log z2"

	* 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>

	* docs/gnuplot.doc:  Edits to description of dashtype and pt <char>.

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

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'
	failed to delog/log the updated min/max axis limits.
	Bug #1774

2016-04-10  Tatsuro MATSUOKA  <tmacchant3@yahoo.co.jp>

	* win/gnuplot.iss: Remove <BOM> marker from start of file, since this
	makes autoconfigure fail on MinGW. >>> NB: Reverted 2016-04-21

2016-04-08  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/util.c (existdir) src/misc.c (recursivefullname):  Use Windows
	implementations of getdir() and friends in stdfn.c instead of platform
	specific code (or the ones provided by OpenWatcom).

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

	* term/emf.trm:  Enhanced text mode was over-zealously skipping new
	set_font requests if successive writes requested the same font+property.
	This caused it to lose italic/bold/etc properties.
	Prevent this by clearing the font history at the end of each enhanced
	text write.
	Bug #1772

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

	* src/graphics.c (process_image):  There is not currently a fool-proof
	mechanism for inferring image dimension from a set of x/y/z coords read
	as ascii data.  But we can do better than transposing the row/column
	count by mistake.  Note that this same transposition was previously
	fixed for the case of ascii matrix data input (Bug #1654)
	Bug #1767

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

	* src/axis.c (eval_link_function):  Test for "undefined" status on
	return from link evaluation.

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

	* src/term_api.h src/graphics.c term/qt.trm:  The qt terminal output
	for "with image pixels" suffers from bad inter-pixel artifacts. This
	seems due to use of term->fillbox() rather than term->filled_polygon().
	The qt fillbox routine is probably fixable but for now we add a
	terminal flag TERM_POLYGON_PIXELS that tells the image code to use
	polygons instead.

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

	* src/command.c (rlgets) docs/gnuplot.doc:  Do not add lines to
	command line history which start with a history command.
	Bug #1763

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

	* src/history.c (add_history):  The documentation states that
	"set history N" will save N lines on history to a file on program exit.
	This is true in practice for both the readline-based history code and
	the built-in history code.  However the builtin code also truncates and
	renumbers the active history list in the current session.  This makes
	the numbers essentially useless once the list reaches N entries.
	Remove this unwanted secondary effect in the built-in version.
	Bug #1763.

	* src/axis.c (gen_tics):  Promote logscale base from 0 to 10 on entry
	rather than later having to test for nonzero each time.

2016-03-30  Bastian Maerkisch  <bmaerkisch@web.de>

	* config/mingw/Makefile:  Use local version of gnuplot to generate
	plots of the tutorial.

	* 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`.

2016-03-29  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wmenu.c:  Remove the alternative code which would use a
	modified file-open-dialog to select a directory.  This wasn't working
	since Vista anyway and was never included in any official binary.

	* src/command.c:  The Windows specific winsystem() has been deactivated
	for a long time. Remove it.

	* 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-03-25  Ethan A Merritt  <merritt@u.washington.edu>

	* axis.c (eval_link_function) graphics.c (plot_lines):
	If map_x() or map_y() trigger eval_link_function(), it may return NaN.
	In this case the mapped coordinate value is nonsense and the "undefined"
	flag is TRUE.  Check this flag to avoid drawing spurious line segments
	in plot with lines.

	* src/axis.c src/axis.h src/plot2d.c:  New routine init_sample_range().
	Always use SAMPLE_AXIS to hold bookkeeping values for function sampling,
	rather than sometimes using a real axis, sometimes a parametrics axis,
	and sometimes SAMPLE_AXIS.

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

	* src/command.c (array_command):
	Sanity check: array name must start with a letter.

	* src/command.c (command is_array_assignment):
	Change the order of parsing: check for array assignment before trying
	to interpret the first input token as a command keyword.  E.g.
	"array q[2]; q[1] = 1" must not interpret the initial 'q' as shorthand
	for 'quit'.
	Bug #1762

2016-03-24  Bastian Maerkisch  <bmaerkisch@web.de>

	* config/mingw/Makefile:  The proper way to invoke shell commands in
	GNU makefiles is via $(shell ...).  Using backticks relies on the
	shell doing the replacement and is not always what we want.
	Bug #1752

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

	* src/datafile.c src/datafile.h src/unset.c: The df_fgets() change
	4 days ago caused a regression because input buffer initialization was
	missed in some paths.  Rename the shared buffer to df_line.
	Move the initialization into a new routine df_init() called via
	reset_command() on program entry.
	Bug #1758

	* src/axis.c (clone_linked_axes): If an endpoint of a linked axis was
	exactly zero, the forward/reverse link check would complain because of a
	spurious divide-by-zero.  Now we test for this case separately.

	* src/graphics.c (do_plot plot_points):  The "dots" plot style is
	implemented internally as pointtype 0, although this was never stated in
	the documentation. Apparently some users discovered and used pointtype 0
	routinely and were unhappy that it stopped working in version 5.
	Neither the original behavior nor its removal was intentional, but it is
	easy enough to restore the pre-version 5 behaviour so we do it now.
	Bug #1733

2016-03-20  Matthew Halverson <mhalver@users.sf.net>

	* src/term.c (term_set_output):  Open pipes in binary mode if the
	terminal has the TERM_BINARY flag set.
	Bug #1756

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

	* src/plot2d.c:  If pointtype PT_CHARACTER is the default for a plot
	then allow text options like "tc rgb 'foo'" in the plot command.

	* src/command.c src/eval.c src/parse.c:  Disentangle gpfree_string() and
	gpfree_array().  Most callers should avoid the latter.

	* src/graph3d.c src/graphics.c src/hidden3d.c:  "pt variable" point
	types were off-by-1 on output.
	Bug #1754

	* src/datafile.c src/datafile.h src/datablock.c:
	There was already a routine df_gets() in datafile.c that safely reads in
	an arbitrary length line of data.  Split this into a public function
	df_fgets() and a private wrapper df_gets().  Share the public function
	with data input in datablock.c:datablock_command.  This removes the
	limit of 1024 characters per line read in to a datablock.

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

	* src/qtterminal/qt_term.cpp:  Revise "set term qt <N> close" so that
	1) It closes window with id N but leaves the current window id unchanged
	2) It executes the command immediately rather than queueing it
	Bug #1753

	* src/qtterminal/QtGnuplotWindow.cpp:  Do not set the DeleteOnClose
	attribute of plot windows.  This avoids an error message if you send a
	new plot after explicitly closing the current plot window.
	Bug #1753 #1554

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

	src/axis.h src/mouse.c src/save.c: Minor code cleanup for linked axes.

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

	* src/save.c (save_link) src/save.h src/show.c:  New routine so that
	"show/save link" is distinct from "show/save xrange".

2016-03-09 Allin Cottrell  <cottrell@wfu.edu>

	* term/aquaterm.trm: Incorrect argument type to abs() or fabs().

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

	* src/axis.h src/axis.c src/command.c src/unset.c src/set.c:
	Add a new field axis->linked_to_secondary so that the handling of linked
	axes is more symmetric.  Now you can do "set [*]range" on either end of
	the linkage and the min/max/etc for the other end of the linkage will be
	recalculated automatically.

	* src/axis.h src/axis.c src/boundary.c src/graph3d.c:  Replace
	AXIS_SETSCALE(AXIS_INDEX, ) and axis_set_graphical_range(AXIS_INDEX, )
	with a single combined routine axis_set_scale_and_range(AXIS *, ).

	* src/axis.c src/graphics.c:  More cleanup and generalization of linked
	axis code.

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

	* term/tkcanvas.trm src/win/wgnuplot.mnu:  Typos.

	* docs/term-ja.diff docs/gnuplot-ja.doc
	src/win/wgnuplot-ja.mnu win/README-Windows-ja.txt:
	Sync Japanese documentation to doc version 1.982

2016-03-06  Bastian Maerkisch  <bmaerkisch@web.de>

	* config/mingw/Makefile win/gnuplot.iss:  Support MSYS2/Mingw-w64 as
	well as MSYS/MinGW and compilation using clang.  Ability to build
	64bit or 32bit zip package and installer.  New make flags MINGW64,
	CLANG, COLOR-GCC, and M32.  Default to 64bit builds when using
	Mingw-w64, use M32 flag to select 32bit builds.

	* src/win/wcommon.h src/win/wgdiplus.cpp src/win/wgnuplib.h
	src/win/wgraph.c:  Fix several issues found by clang, with the most
	important being wrong delete's in wgdiplus.cpp.

	* scanner.c (get_num):  strtoll() on Windows may consume zero
	characters causing an infinite loop for the input "0x".
	Bug #1745

	* src/win/wgraph.c (MakeFonts, TryCreateFont):  Do not rely on GDI
	supplying a sensible substitute when a requested font is not
	available.  Instead, fall back to the user-supplied default font or
	the terminal's default font if the former is not available.
	Bug #1669

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

	* src/wxterminal/gp_cairo.c (gp_cairo_set_linewidth):  Change the
	minimum linewidth supported by pdfcairo to match the other cairo
	terminals.  Reduce all of them to 0.20 pts (was 0.25 or 0.50).

	* src/axis.c src/graphics.c:  More cleanup of linked axis code.

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

	* src/plot2d.c (get_data):  Introduction of "pt variable" increased the
	maximum number of data columns for "with points" to 5.  If the plot
	command really does consume 5 columns, fine.  But if get_data returns
	5 columns for a simple 'plot with points' command, we have to ignore the
	extra columns gracefully.
	Bugfix

	* src/axis.c src/axis.h src/eval.c src/eval.h:
	Move eval_link_function() from eval.c to axis.c

	* src/axis.c src/axis.h src/eval.c src/eval.h src/command.c
	src/graph3d.c src/graphics.c src/mouse.c src/plot2d.c src/set.c:
	Revise clone_linked_axes() and eval_link_function() to use
	(AXIS *) pointers rather than AXIS_INDEX.

	* src/axis.c (clone_linked_axes): Warn that the program cannot
	currently handle via/inverse mapping of linked logscale axes.
	Bug #1736

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

	* src/command.c (link_command): Accept "unset link <specific axis>"
	(regression since 5.0).

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

	* src/internal.c (f_assign): Sanity check for array index that
	is found to be zero during expression evaluation.

	* graphics.c (map_position_double): Fix stupid typo that tried to map a
	linked y axis through the x mapping function. This always mis-placed
	objects and labels whose position is given in terms of y2 whenever y2 is
	linked to y1. Furthermore placement on either x2 or y2 could be wrong if
	the most recent plot did not use that same linked axis.

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

	* src/gp_types.h src/graph3d.c src/graphics.c src/misc.c src/plot2d.c
	src/plot3d.c src/save.c src/term_api.h src/hidden3d.c docs/gnuplot.doc:
	Add support for "pointtype variable".  If there are multiple "variable"
	properties in the same [s]plot command, the order of columns in the
	using spec is
		[s]plot DATA using x:y:z:pointsize:pointtype:color
	"pointtype variable" is only allowed with "points" or "linespoints".
	Only numerical point types are possible; if you want variable character
	pointtypes use "with labels" instead.

	* src/stats.c:  "array A[n];  stats A" should default to single-column
	analysis (equivalent to stats A using 2) since the properties of the
	index are uninteresting.

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

	* src/util.h src/util.c (common_error_exit):  Move the code that resets
	various gnuplot state variables after an error from int_error() to a new
	common path routine common_error_exit() shared with os_error().  Ensure
	that GPVAL_ERRNO and GPVAL_ERRMSG are set in both cases.
	Bug #1741

2016-02-26  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/win/wgnuplot.mnu: Update the Windows GUI menu definitions a
	bit.

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

	* src/parse.c (parse_assignment_expression): In order to support
	assignment to an array element (e.g. A[i] = foo) a slot for the
	array index is always pushed onto the evaluation stack even if no
	array is involved.  However this slot was not being initialized to
	a valid PUSHC descriptor, so "show at" and certain other
	operations could fail even though they don't really care about
	this dummy slot.  Now we initialize it to report that a NOTDEFINED
	variable was pushed.

	* src/command.c src/eval.c (push) src/internal.c src/parse.c: Back
	off to the original idea that bare array names are not legal for
	expression evaluation.  The previous work-around of copying the
	entire array on every reference imposed a huge overhead for
	accessing the value of an individual entry. The previous code is
	left in place via #ifdef ARRAY_COPY_ON_REFERENCE to serve as a
	model for later expansion to support some subset of operations
	requiring a copy (e.g. simple assigment B=A or concatenation C =
	A.B).

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

	* src/command.c src/eval.c (push): Evaluation of expressions that
	contain a bare array name is problematic because any attempt to
	access the actual array contents during or after evaluation
	requires that they be duplicated on push() and freed
	later. Freeing is the tricky part, particularly if the array
	contains STRING elements.  This patch seems OK in preliminary
	testing, but at this point the only only possible operations are
	indexing and assignment. If other operations are added later they
	may reveal inadequacies in the alloc/free tracking.

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

	* src/wxterminal/wxt_gui.h:  Use local events to avoid warnings about
	incompatible linkage on Windows.

	* config/mingw/Makefile:  Use MinGW's own implementations of
	printf etc. which are C99 compliant.

	* src/win/wtext.h:  Avoid warnings about the re-definition of
	popen/pclose with fake pipe support using MSYS2/Mingw-w64.

	* src/wxterminal/wxt_gui.cpp|h:  Fixes to make the wxt terminal work
	with wxWidgets 3 on Windows:
	1) Disable wxWidgets debug assertions in release builds. This does
	not solve the problem with a setlocale(LC_ALL, NULL) == "C" test in
	wxLocale, but at least gets rid of the warning.
	2) Flush the cairo surface before blitting the internal bitmap to
	screen.

	* src/win/wgraph.c:  Include direct.h for _chdir().

	* term/tkcanvas.trm (TK_init):  TK_image requires WRITE_PNG_IMAGE to be
	defined.

2016-02-12  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* term/tkcanvas.trm:  More fixes suggested by clang warning messages.

2016-02-11  Bastian Maerkisch  <bmaerkisch@web.de>

	* term/wxterminal/wxt_gui.cpp (wxt_raise_window):  On Windows, only
	Restore() the window if it is iconized.  Fixes accidental resize of
	maximized windows.

	* term/tkcanvas.trm (TK_vector):  Fix for vector commands without
	preceeding move as e.g. in "with line lc variable".

	* src/fit.c:  Fix order of using specs printed to log-file.
	Bug #1657

	* docs/term-ja.diff:  Remove japanese documentation for sun, next, and
	openstep terminals which were removed on 2016-01-11.

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

	* src/term.c src/axis.h src/plot3d.c: Remove dead code and old comments.
	Comment out the call to AXIS_WRITEBACK that appears to be a vestige from
	a code reorganization in the version 3.8 era. There are no other users
	of this macro.

	* src/set.c src/show.c:  set/show arrow length wants only a single
	coordinate, not three.  (See patch of 2015-12-19).

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

	* term/dumb.trm:  Include stdint.h to make sure that uint32_t is defined
	(MSVC).

	* config/config.nt config/config.nt:  Sync with output of configure.

	* config/mingw/Makefile:  Use gnuplot's default settings to generate
	plots for the documentation.

	* configure.ac:  Cairo terminals require pango 1.22
	(pango_layout_get_baseline) now.  Consequently they do no longer build
	on RH5 etc.

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

	* src/command.c (print_command):  Do not allow printing a datablock into
	itself, which could cause infinite recursion.

	* src/stats.c: Reset data input mode to 2D at start of stats command.
	This produces consistent results for "stats FOO matrix", even if the
	previous command was "splot".
	Bug #1739

2016-02-08  Anton Gladky <gladk@debian.org>

	* term/tkcanvas.trm:  Replace statements of the form
	fprintf(gpoutfile, string) because they trigger a compiler warning/error
	with  -Werror=format-security.

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

	* src/datafile.c src/parse.c src/parse.h:

	Add bookkeeping to allow 'plot', 'stats', and 'fit' commands to work
	on data stored in an array.
	    array A[200]
	    do for [i=1:200] { A[i] = sin(pi * i/100.) }
	    plot A title "sin(x) in centiradians"

	*  demo/array.dem docs/gnuplot.doc:
	Documentation and demo for use of arrays in 'fit' and 'plot'.

	* src/command.c src/save.h src/save.c (save_array_content):
	Dump content of arrays in a "print" or "save" statement, analogous to
	printing/saving content of user-declared variables.

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

	* src/command.c src/command.h src/eval.c src/eval.h src/gp_types.h
	src/internal.c src/internal.h src/parse.c src/tables.c src/util.c
	src/save.c:  Basic support of arrays.

	Introduce support for arrays as an indexed list of variables.
	An array must be declared before its entries can be accessed.
	Each entry A[i] acts as a normal gnuplot user variable (integer, string,
	complex).  Variables held in an array need not be of the same type.
	    array A[2] = [ "apples", "oranges" ]
	    set title sprintf("Comparing %s and %s",A[1],A[2])
	    plot for [n = 1:2] A[n] title A[n]

	* docs/gnuplot.doc demo/array.dem demo/all.dem demo/html/*:
	Documentation and demo for basic use of arrays.

2016-02-04  <gbmiquel@users.sf.net>

	* src/gadgets.c (clip_line):  Use (double) rather than (int) for
	intermediate coordinates used in line clipping.
	Bug #1614

2016-02-04  Joachim Wuttke  <jwuttke@users.sourceforge.net>

	* term/tkcanvs.trm:  Replace old (pre-1999) tkcanvas.trm with a
	rewrite from Joachim Wuttke  <jwuttke@users.sourceforge.net>
	and Bastian Maerkisch  <bmaerkisch@web.de>

	This new driver has only partial support for scripting languages other
	than tcl and has unreliable support for image data, but it is strictly
	better than the 1999 terminal.

2016-02-03  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* config/mingw/Makefile:  Pass through MAINVERSION and PATCHLEVEL
	into the MinGW build process.

2016-02-03  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/help.c:  Be less aggressive about suppressing help index entries
	that might share a leading substring.
	Bug #1734

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

	* src/stats.c (create_and_set_int_var):  Some of the user-accessible
	variables created by the stats command are necessarily integral (e.g.
	STATS_records, STATS_columns).  Create these using Ginteger() rather
	than Gcomplex().

	* src/graphics.c (finish_filled_curve):  The routine fill_between()
	passes in an extra-long array whose last element stores above/below
	flag.  We must not try to test this flag on other processing paths
	because for them it is an out-of-bounds access (found by valgrind).

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

	* src/wxterminal/wxt_gui.cpp:  Another pair of fixes for wxt font
	processing.  Prevent a memory leak from temporary storage of the
	fontname.  Initial font used by enhanced text processing should be the
	most recently set font, not the original one from "set term".

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

	* src/set.c (set_missing): Remove minor memory leak if
	"set datafile missing '*'" is called repeatedly.

	* src/boundary.c src/graph3d.c src/graph3d.h src/graphics.c
	src/graphics.h src/plot2d.c src/plot3d.c:
	    {s}plot ... title "foo" at <xpos,ypos>
	New option for customized placement of individual key entries.

	* docs/gnuplot.doc demo/custom_key.dem:
	Documentation and demo for customized placement of key entries.

2016-01-26  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* term/wxt.trm: Previous fix for parsing font "name,size" was incorrect.
	Bug #1731

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

	* src/qtterminal/QtGnuplotScene.cpp:  Only toggle plots on left-click
	(not center- or right-click).

	* src/qtterminal/QtGnuplotScene.cpp:  Use explicit color Qt::lightGray
	to gray out toggled key entries.

2016-01-21  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* .../.cvsignore:  Include more of the auto-generated files in the lists
	of things for CVS to ignore during update/diff/status/commit/etc

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

	* src/plot2d.c (refresh_bounds):  The intent of this routine is to keep
	the previous axis range if the user has not changed autoscale settings.
	It wasn't working.  I'm not sure the revised code is doing quite the
	right thing either, but at least it correcly handles the test case in
	Bug #1709.

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

	* src/graphics.c (process_image): This routine handles both 2D and 3D
	images so it must not try to access fields only present in the 2D case
	(in this case plot->x_axis and friends).
	Bug #1718

	* term/wxt.trm (wxt_options):  Fix regression, fontsize ignored if it
	is the only thing in the requested font string (e.g. font ",12").
	Bug #1731

2016-01-16  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	Fix "make distclean" problems caused by a bug in automake, which
	in turn is triggered by docs/doc2wxhtml requring src/version.c.

	* configure.ac (VERSION_MAJOR, PATCHLEVEL): Export these from
	shell scripts to config.h.
	(PATCHLEVEL): Export to configure script.

	* docs/windows/doc2html.c (convert): Replace references to
	version.c constants by macros in config.h.

	* docs/Makefile.am (doc2wxhtml_SOURCES): Remove use of version.c.

	* term/djsvga.trm (DJSVGA_set_font): Somebody overlooked this call
	of graph_error.

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

	* src/eval.c (real) src/standard.c (f_int):  Special case handling of
	NaN or undefined values during expression evaluation was lost if the
	expression passed through an intermediate integer value. For example
	int(NaN) evaluated to "-2147483648" rather than "NaN" or "undefined".
	Add special case checks to the integer evaluation path.

2016-01-12  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* term/aquaterm.trm: Add support for version 5 custom dashtypes.

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

	* term/sun.trm: The SunView windowing system was phased out after
	Solaris 2.2 (end of life 1999). Remove the corresponding terminal
	from the gnuplot distribution.

	* configure.ac configure.vms config/makefile.dj2 config/makefile.emx
	docs/doc2texi.el docs/Makefile.am PORTING src/makefile.all
	src/makefile.awc src/term.c src/term.h:  Remove references to sun.trm.

	* docs/gpcard.tex (move to subdirectory docs/old/) Makefile.am
	makefile.os2 mingw/Makefile MacOSX/createdist.sh:
	gpcard is horribly out of date to the point of holding only historical
	interest.  Remove it from the build rules.  Also remove makefile.dst
	which was superseded by autotools + Makefile.am 15 years ago.

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

	* src/qtterminal/qt_term.cpp: "set term qt <num> title 'foo'" was
	incorrectly changing the title of the previous plot window in addition
	to that of the new plot window.

	* src/internal.c:  Error messages should distinguish between an
	uninitialized variable and an improper variable type.

	* configure.ac: Do not assume that wxwidgets uses the gtk2 toolkit
	(it might use gtk3 or on OSX it might use cocoa).

	* src/pm3d.c: Account for interpolated quadrangles when applying a pm3d
	lighting model.

	The NeXT and OpenStep platforms per se are 15-20 yrs dead and gone.
	Aquaterm is the evolutionary successor of openstep.

	* src/NeXT src/OpenStep term/next.trm term/openstep.trm configure.ac
	m4/next.m4: Remove the drivers proper.

	* src/Makefile.am src/axis.h src/makefile.all src/makefile.awc
	src/stdfn.h src/syscfg.h src/term.c src/term.h src/util.c
	src/variable.c term/cgm.trm term/driver.h docs/Makefile.am
	docs/doc2texi.el: Remove references to the next and openstep terminals
	and remove code conditional on NEXT.

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

	* src/fit.c:  The fit command should gracefully accept data files known
	to contain column headers.  Previously this sequence would fail:
	   set key autotitle columnhead;  fit ...

	* src/stats.c:  Make data errors in stats command non-fatal,
	i.e. int_warn() rather than int_error().

	* src/internal.c:  Store return value from system("") in GPVAL_ERRNO.

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

	* src/wxterminal/wxt_gui.cpp:  Several components of the gtk2 API have
	been deprecated, which prevents compiling the wxt terminal using wxt3
	or indeed recent versions of gtk2.
	1) Replace handle->window with gtk_widget_get_window(handle).
	2) gdk_window_foreign_new() (used only by --enable-raise-console) no
	longer exists. Make this code conditional on (GTK_MAJOR_VERSION == 2).

2015-12-31  Ethan A Merritt  <merritt@u.washington.edu>

	* term/post.trm (PS_dashtype): Prevent overflow of the custom
	dash pattern array, leading to possible corruption of the output
	postscipt file.

	* src/set.c src/show.c src/term.c:
	New command "set mono linetype cycle N" acts analogously to
	"set linetype cycle N".  If a monochrome linetype N is requested
	where N is larger than any defined monochrome linetype, then
	substitute a corresponding linetype in the range [1:cycle].

2015-12-30  Ethan A Merritt  <merritt@u.washington.edu>

	* src/term_api.h src/term.c src/set.c (init_monochrome):
	Move this routine from set.c to term.c

	* term/lua.trm: Treat "set term tikz monochrome" as
	"set term tikz; set monochrome".

	* term/lua/gnuplot-tikz.lua:  Add \SetUnicodeOption{mathletters}
	to document produced by "set term tikz standalone".  This handles
	utf-8 encoded greek letters in gnuplot labels and titles.

2015-12-29  Ethan A Merritt  <merritt@u.washington.edu>

	* term/wxt.trm (wxt_options): If a terminal setting option is not
	recognized, issue a warning rather than exiting early from terminal
	initialization. Incomplete initialization can cause segfaults later.

	* src/show.c: Show current state of "set monochrome" option.

	* src/unset.c (unset_monochrome): Clear monochrome flag in current term.

	* src/misc.c (parse_dashtype lp_parse) docs/psdoc/ps_symbols.gpi:
	Allow "dashtype 0", which is treated as LT_AXIS.
	Modify ps_symbols demo script to select dashed lines using version 5
	syntax ("dashtype N") rather than version 4 syntax ("linetype N").
	Bug #1724

2015-12-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/qtterminal/qt_term.cpp (qt_waitforinput):  This routine is called
	to receive both external (e.g. mouse) events and input from stdin.
	In cases where we only care about events we must not perturb the state
	of stdin.  One such case was missed, leading to a character being
	dropped from the stdin stream depending on event timing.
	Bug #1559

2015-12-24  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* src/qtterminal/QtGnuplotScene.cpp: On Mac OS X, the Qt::KeypadModifier
	bit of event->modifiers() is *always* set when an arrow key is pressed.

2015-12-21  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.h src/plot2d.c (parse_plot_title) src/plot3d.c
	src/gadgets.c src/gadgets.h docs/gnuplot.doc:
	Consolidate 2D and 3D code for "[s]plot ... title <options>" into a
	single routine parse_plot_title.

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

	* src/axis.h src/axis.c (get_position_default)
	src/setshow.h src/show.c (show_position) src/set.c (parse_label_options)
	src/save.h src/save.c (save_position)
	src/jitter.c src/plot2d.c src/plot3d.c:

	Distinguish internally between 1D positions (single coordinate),
	2D positions (only x,y) and 3D positions (x,y,z).
	This removes the ambiguity from commands like
	    plot foo with labels point offset 1,1,  func(x)
	Is func(x) a z offset (probably not) or is it a 2nd plot?
	Previously the get_position() code ate it as a z offset, but now the
	parsing is unambigously a 2D offset followed by a separate plot element.

2015-12-18  Ethan A Merritt  <merritt@u.washington.edu>

	* src/save.c (save_variables__sub):  Do not write ARGn variables to
	save file.

2015-12-16  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (copy_or_invent_formatstring): Too many fixed precision
	decimal places, all zero, could be generated by a plot sequence like
	    set log y; plot [1:100] exp(-x)
	limit the number of decimal places to 10.
	related to bugs #1496 $1518

2015-12-10  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/qtterminal/qt_conversion.cpp (qt_imageToQImage): Do not call
	C++ isnan() without a namespace specifier.

	EAM:  Reverting this change.  We may need a fix, but this isn't it.
	qtterminal/qt_conversion.cpp:
	In function 'QImage qt_imageToQImage(int, int, coordval*, t_imagecolor)':
	qtterminal/qt_conversion.cpp:129:14:
	error: expected unqualified-id before '(' token if (std::isnan(*image))

2015-11-29 Allin Cottrell  <cottrell@wfu.edu>

	* term/metapost.trm: Set terminal flag TERM_IS_LATEX unless the
	"notex" option is active.  This causes axis tic labels to use the
	same default format "$%h$" as other TeX terminal types.

2015-11-12  Douglas Mason  <douglasmason1@users.sf.net>
	    Lukas Jirkovsky  <stativ@users.sf.net>
	    Ethan A Merritt  <merritt@u.washington.edu>

	* src/pm3d.c (apply_lighting_model) src/pm3d.h src/save.c src/set.c
	src/show.c src/stdfn.h src/tables.c src/tables.h docs/gnuplot.doc:

	Add a simple lighting model to pm3d rendering.
	Syntax:
	    set pm3d nolighting    # default state
	    set pm3d lighting {primary <fraction>} {specular <fraction>}

	The command `set pm3d lighting` selects a simple lighting model in which
	a single fixed light contributes 50% of the overall illumination.
	The strength of this light relative to the ambient illumination can be
	adjusted by `set pm3d lighting primary <fraction>`.  Specular highlights
	are calculated using a Phong model with fixed exponent.  The fractional
	contribution of specular highlighting can be adjusted.  Model parameters
	controlling the illumination angle and Phong exponent are not exported
	to the user in this version, but easily could be if requested.

	Original patch by Douglas Mason. See Feature Request #323 (Mar 2012).
	Revised for gnuplot version 4.6 by Lukas Jirkovsky.  Revised by EAM for
	version 5.1 and modified to coexist with pm3d settings for depthorder,
	interpolation, and projection to the bottom or top of the view box.

	* demo/pm3d_lighting.dem:  New demo

2015-11-09  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c src/axis.h src/graphics.c src/save.c src/set.c src/show.c
	src/unset.c:  The documentation says that "set tics `front` or `back`
	controls whether the tics are placed behind or in front of the plot
	elements".  This was sort of true but it did this by moving the entire
	grid along with the tics, so you could not entirely place the tics
	and tic labels in front of the grid lines.
	Decouple these two operations so that `set tics {front|back}` does only
	what it is documented to do.
	Bug #1704

	* src/axis.c (gen_tics):  "set {*}tics rangelimit" applies to minor
	tics as well as major tics.
	Bug #1705

2015-11-06  Ethan A Merritt  <merritt@u.washington.edu>

	* src/qtterminal/qt_term.cpp: Improved vertical alignment of Qt text
	fragments (analogous to Jun's cairo patch).

2015-11-06  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* src/wxterminal/gp_cairo.c: Fix longstanding bug in vertical alignment
	of text fragments in cairo terminals (including wxt).  Text containing
	superscripts was placed too low; text with subscripts too high.
	This is corrected by a query to pango_layout_get_baseline().
	Bugs #1319 #1586, probably others

2015-11-06  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) and 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.

2015-11-02  Shigeharu Takeno  <shige@iee.niit.ac.jp>

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

	* docs/gnuplot.doc: typos

2015-11-02  Ethan A Merritt  <merritt@u.washington.edu>

	* 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.

2015-10-31  Ethan A Merritt  <merritt@u.washington.edu>

	* src/util3d.c src/util3d.h (edge3d_intersect two_edge3d_intersect):
	Change parameters to (coordinate *) rather than (array, index) so that
	the same routines can handle clipping 3D vectors that are not stored as
	successive entries in an array.

	* src/graph3d.c src/plot3d.c:  Support "set clip {one|two}" for 3D
	vector plots.

	* src/datafile.c (df_set_key_title):  Use of columnheader(N) could
	sometimes leave an extraneous character '@' in the plot title.
	This was introduced in 5.0.1 as a side effect to the fix for Bug #1596.

2015-10-28  Ethan A Merritt  <merritt@u.washington.edu>

	* src/interpol.c (mcs_interp): Handle log-scaled y axis when using
	monotonic cubic splines ('smooth mcs').

	* src/plot2d.c (boxplot_range_fiddling) src/graphics.c (plot_boxplot):
	Fix autoscaling of x axis if there are multiple boxplots with factors.
	Bug #1696

	* src/graphics.c (plot_points plot_boxplot): Declare and initialize
	p_height and p_width locally (no code was updating the global copy).
	This fixes nonfunctional "set clip points" command in version 5.

	* src/boundary.c (do_key_layout) src/graph3d.c (boundary3d):
	Remove reference to p_height, p_width, which were not being initialized.

	* src/show.c (show_clip) docs/gnuplot.doc: Clarify effect of "set clip".

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

	* Modify demos to increase coverage of gnuplot features.
	line_arrows:	illustrate 'set arrow from ... rto ...'
	rgba_lines:	illustrate 'set arrow from ... length ... angle ...'
	smooth: 	illustrate both smooth cumulative and smooth cnorm
	dashtypes:	illustrate numerical dashtype definition
	monotonic_spline: smooth mcs
	break_continue:	exercise "exit" command from inside "call <foo>"
	volatile:	exercise 'skip', 'volatile', 'refresh'
	boxplot:	illustrate 'nooutliers'

	* demo/all.dem: Call additional demos to increase code coverage.
	rgba_lines fitmulti break_continue monotonic_spline volatile

2015-10-26  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graph3d.c src/axis.c src/util.c src/util.h src/mouse.c
	src/dynarray.c src/util3d.c src/hidden3d.c:  Get rid of graph_error().
	The routine graph_error() was originally intended as a special case of
	int_error() to be called "while graphics active".  We have long since
	gone to calling int_error() everywhere.  Replace the remaining instances
	of graph_error() and remove it.  Comment out one call site in mouse.c
	that can no longer be reached since the error is trapped elsewhere.

2015-10-24  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (save_autoscaled_ranges restore_autoscaled_ranges)
	src/axis.h src/plot2d.c:  Auto-scaled axis ranges are extended as data
	is read in, but this is counterproductive for some processing modes
	(e.g. the y values contributing to 'smooth cnorm'). The new save/restore
	routines allow these plot modes to undo the effect of range extension.

2015-10-22  Ethan A Merritt  <merritt@u.washington.edu>

	* src/time.c (gstrptime): Fixes a bug in processing time input using
	format "%s".  Because time input can cross whitespace between fields,
	the string being parsed for one field may continue on into the next
	field.  The "%s" code looked for the first decimal point in the string,
	but would read beyond the current field to find it, causing an erroneous
	fractional second to be added to the input time value.

	* term/post.trm:  Fix scope of dictionary in Prolog

	* src/term_api.h term/post.trm src/graphics.c (plot_border)
	term/PostScript/prologue.ps term/PostScript/prologues.h:

	This change addresses a backward-compatibility issue with the postscript
	terminal in version 5.  The long ago original postscript terminal used a
	double-width line for the plot border. This was what you got when you
	specified "lt -1" in a gnuplot command.  All terminals agree that lt -1
	is black and solid, but postscript is anomalous in thinking that it has
	double width.  Furthermore postscript is anomalous in applying the
	current line width to draw dots (pointtype 0).  This meant that dots
	drawn with lt -1 were twice as big as dots drawn with other linetypes.
	We could just get rid of the double-width anomaly, but then new plots
	would have a thinner border than old plots produced with the same
	script.  This patch instead adds a layer flag TERM_LAYER_BEGIN_BORDER
	so that the postscript terminal can temporarily use a new line type LTB
	rather than LTb.  All other terminals will ignore it.
	Bug #1689 and others

2015-10-16  Abhijin Adiga  <abhijin@users.sf.net>

	* term/lua/gnuplot-tikz.lua:  Truncate term->h_char using math.floor().
	This prevents text placement errors on OSX 10.10.2 with lua5.3.
	Bug #1682

2015-10-16  Ethan A Merritt  <merritt@u.washington.edu>

	* term/lua/gnuplot-tikz.lua:  lua5.2 deprecates loadstring() in favor of
	load(). One of my test systems gives runtime errors without this change.
	Bug #1682

2015-10-13  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/makefile.awc (COREOBJS): Add jitter.c module.

	* src/jitter.c (jitter): Repair initializer --- completely empty
	is not allowed.

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

	* src/set.c (parse_label_options): Only the full word "boxed" is
	acceptable as a label option.  Allowing the shorthand "box" causes
	confusion in other commands with a "box" option.  Bug #1681

	* src/interpol.c (cp_implode): Fix bug in "smooth cnorm" that has been
	there since the option was first introduced.

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

	* src/plot2d.h src/plot2d.c docs/gnuplot.doc:  Until now,
	"plot foo using N smooth freq" and "plot foo using N smooth kdensity"
	were interpreted as if the using clause was "using 0:N".  This is
	almost certainly not what the user expected.  Change it so that the
	interpretation is "using N:(1.0)", i.e. unit weight for each data point.
	This was always the recommended use in the docs; now it is the default
	interpretation as well.

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

	* src/set.c (set_obj):  "set obj N polygon ..." failed to consume all
	possible options and keywords.
	Bug #1680

	* src/plot2d.c (get_data):  "plot $foo using N smooth kdensity" is now
	interpreted as "using N:(1)".  Before it was interpreted as "using 0:N"
	which makes little sense.

2015-10-02  Ethan A Merritt  <merritt@u.washington.edu>

	* src/boundary.c src/graphics.c src/save.c src/set.c src/term_api.h
	src/unset.c demo/varcolor.dem:
	Clean up implementation of "set errorbars <line properties>".
	Apply errorbars line properties also to candlesticks and boxplots.

	Add explicit handling for two line property settings that to the best
	of my knowledge were not used intentionally by other code paths.

	* src/term.c (term_apply_lp_properties): Treat LT_DEFAULT as "do not
	change current setting" rather than pass it to term->linetype(), which
	could produce unpredictable behaviour (not all terminals act the same).

	* src/gadgets.c (apply_pm3dcolor): Treat TC_VARIABLE as "do not change
	current setting".  Previously it would have resulted in setting the
	color to black, but that was unintentional.

2015-10-01  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (df_readascii): The test intended to check whether the
	user requested more than 7 columns of formatted input has always been
	incorrect for 'splot'.  It tested against MAXDATACOLS rather than the
	actual number of requested columns.  The test worked but was redundant
	for 'plot' since requesting more than 7 columns will trigger another
	error message "too many columns for requested style".  Remove the test.
	Bug #1675

	* src/axis.c src/axis.h src/boundary.c src/gadgets.c src/gadgets.h
	src/graph3d.c src/graphics.c src/hidden3d.c src/misc.c src/save.c
	src/set.c src/term_api.h src/term.c:
	#define and use DEFAULT_P_CHAR for all initializers.
	Change lp_style_type.p_char from an unsigned long to char [8].
	This suffices to hold the UTF-8 encoding of all unicode code points.
	Bug #1676

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

	* src/boundary.c (do_key_sample):  Use the same arrowhead style in the
	key sample as used by the plot itself.

2015-09-18  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (plot_boxplot):  Fix overrun if no valid points are
	found for some boxplot category (a.k.a. "level").  Fix clipping of
	outliers in zoomed boxplot.

2015-09-15  Mojca Miklavec  <mojca.miklavec.lists@gmail.com>

	* term/lua.trm:  lua 5.3 deprecates luaL_checkint()
	Bug #1672

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

	* src/graphics.c src/jitter.c src/jitter.h src/makefile.all
	src/Makefile.am src/save.c src/save.h src/set.c src/show.c
	src/tables.c src/tables.h src/unset.c:  New plot capability.

	Syntax:
	    set jitter {overlap <yposition>} {spread <factor>} {wrap <limit>}
	               {swarm|square}
	When the x coordinates of a data set are restricted to discrete values
	then many points may lie exactly on top of each other.  Jittering
	introduces an offset to the coordinates of these superimposed points
	that spreads them into a cluster.  This type of plot is called a
	"bee swarm" plot in R and other packages.

	* demo/all.dem demo/html/index.canvas demo/html/index.save
	demo/html/index.svg demo/html/Makefile demo/html/Makefile.canvas
	demo/html/Makefile.svg demo/jitter.dem docs/gnuplot.doc
	docs/plotstyles.gnu:  Documentation and demos for jitter settings and
	bee swarm plots.

2015-09-12  Ethan A Merritt  <merritt@u.washington.edu>

	* docs/gnuplot.doc:  Reorganize the section containing plot style
	examples so that styles not generated by "with <foo>" are listed
	separately at the end.  E.g. polar plots are generated by the same
	"plot ... with <foo>" commands as non-polar plots.

2015-09-11 Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* src/help.c term/lua.trm:  #ifdef _WIN32
	'\r' is accepted as a terminator after a prompt.

2015-09-04  Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c: For 2-column data plots with filledcurves, treat
	y=<value> as if it were provided in the 3rd data column.
	Bug #1568

	* src/graphics.c (plot_boxes): Prevent array overrun if there are
	undefined points are at the end of a data set, as in the first plot
	of smooth.dem.

2015-08-31  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

	* src/wxterminal/wxt_gui.cpp:  Reset "yield" interlock on ctrl-C.
	Prevents endless futile loop with single-threaded wxt terminal.

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

	* src/wxterminal/wxt_gui.cpp:  Remove FPRINTF statements referring
	to a stopwatch timer that no longer exists.

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

	* src/wxterminal/wxt_gui.cpp (wxt_waitforinput):
	The single-threaded code path used by OSX and Windows (and optionally
	linux) was not honoring "pause mouse ..." commands, including "pause
	mouse close".

	* src/wxterminal/wxt_gui.cpp (wxt_exec_event):
	The single-threaded code path could lose an input character that arrived
	during a "pause mouse" interval.  Use ungetc to push a character back
	onto the input queue in this case.  (Not applied for Windows but maybe
	it should be?)

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

	* src/datafile.c (plot_option_index):  Sanity check that index >= 0.

	* src/datafile.c (df_determine_matrix_info):  "skip" option applies to
	records at the start of ascii matrix data as it does for normal ascii
	files.

	* src/datafile.c (initialize_plot_style):
	Some binary file options need to know what style of plot is involved.
	This lookup was being done as part of adjust_binary_use_spec(), but
	not all plots need to call that routine for anything else.
	Move the plot style lookup into a separate routine.

	* src/datafile.c (df_add_binary_records):
	Remove dead code (error checks that can never be reached).
	Make some internal bookkeeping variables df_* static.

	* src/datafile.c: whitespace cleanup

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

	* src/datafile.c (df_readascii):  The code supporting an input format
	assumed that the data being interpreted came from a file rather than
	using whatever string was returned by df_gets().
	E.g. this failed
		plot $datablock using 1:2 "format-string"
	Bug #1666

2015-08-24  Dima Kogan  <dima@secretsauce.net>

	* src/datafile.c (df_open):
	Syntax  "<&N"  plots data read from an arbitrary file descriptor, but
	that descriptor may be a pipe (non-seekable) rather than a true file
	(seekable). If the fd is not seekable, mark it a "volatile" so that
	gnuplot doesn't try to reread it on "replot".

2015-08-21  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* docs/doc2tex.c (process_line): Improve passing of hyperlinks to
	pdftex.  Allow both multi-line and single line format, for both
	external and internal hrefs.

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

	* src/graphics.c (map_position_r):  There is no way to indicate
	"no offset" as opposed to "offset 0", which was causing problems
	if "offset 0" was applied as axis coordinates on a log-scaled axis.
	Now in 2D "offset 0" is interpreted as no offset even for log-scaled
	axes.  3D offsets are still a sore point.
	Bug #1662

	* src/datafile.c src/eval.c src/gp_types.h src/graphics.c sec/plot3d.c
	src/save.c term/svg.trm term/tgif.trm:
	Remove dead code.

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

	* src/parse.c src/parse.h src/plot2d.c src/plot3d.c src/set.c
	src/unset.c demo/iterate.dem docs/gnuplot.doc:
	New special case of iteration in a plot command:
		plot for [i=<start> : *] datafile ...
	This will iterate over all available data without generating an
	error message when the data is exhausted and without generating
	empty plots.  It can be used to iterate over an unknown number of
	columns (e.g. for histograms), an unknown number of data blocks
	(e.g. plot for [i=0:*] datafile index i)  or an unknown number of
	datafiles where the file name is generated from the iteration
	variable.

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

	* src/qtterminal/QtGnuplotEvent.cpp src/qtterminal/qt_term.cpp:
	Make the error messages from a broken connection to gnuplot_qt less
	alarming.  No change in functionality.  See Bug #1554

	* src/qtterminal/qt_term.cpp:  Use fprintf(stderr, ...) instead of
	qDebug() << ... for the inboard driver.  This allows allows Windows
	to catch error messages by the redefinition of fprintf in wtext.h.
	See Bug #1554

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

	* term/dumb.trm src/stdfn.h:  Handle UTF-8 encoding so long as each
	printed glyph occupies only one character cell.  The code is specific
	to UTF-8; i.e. it does not handle other multi-byte encodings.
	Bug #1477

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

	* src/datafile.c (df_generate_pseudodata):  The sampling coordinates
	generated by pseudofiles '+' and '++' were passed as an ascii string,
	which truncated precision to 6 digits (default for format %g).  Now pass
	in parallel the original (double) value so that no precision is lost.
	Bug #1650

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

	* src/command.c src/command.h src/misc.c src/tables.c
	* docs/gnuplot.doc demo/break_continue.dem:
	New commands `break` and `continue` to short-circuit or terminate
	iteration of a `do` or `while` bracketed clause.

2015-08-07  "Jun T." <takimoto-j@kba.biglobe.ne.jp>

	* term/aquaterm.trm: Failure to save+restore original color was causing
	successive fill areas to become more and more transparent.
	Alsi, make background color pure white.

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

	* src/parse.c (string_or_express): Prevent an empty string variable or
	expression from being interpreted as the magic names '' or "".
	E.g.
	    file1 = 'real-file'
	    file2 = "abc"[3:0]  # any expression that evaluates to ''
	    plot file1,file2    # plots file1 twice, no error message
	Bug #1660

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

	* src/boundary.c src/graphics.c src/graphics.h src/save.c src/save.h
	src/set.c src/setshow.h src/show.c src/unset.c src/tables.c
	docs/gnuplot.doc demo/varcolor.dem:

	Support a separate set of line properties for errorbars.
	New command "set errorbars" is an expansion of "set bars" to include
	line characteristics.  Save errorbars style (previously not saved).
	E.g.   set errorbars lc "black" lw 0.75

	* src/util.c (streq): Avoid buffer underrun on empty string.

2015-08-02 Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* src/qtterminal/qt_term.cpp: Fix #ifdef block syntax, modify
	string concatenation to make it acceptable in VS2010.

2015-08-02  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/Makefile.am (GNUPLOT_QT) [BUILD_QT]: New variable to
	communicate optionally transformed name of gnuplot_qt into main to
	main executable.
	(AM_CPPFLAGS) [BUILD_QT]: Pass GNUPLOT_QT to the preprocessor.
	(clean-demo) [BUILD_QT]: Fix copy-paste-edit oversight.

	* src/qtterminal/qt_term.cpp (GNUPLOT_QT): If not defined from
	outside, provide fall-back definition equal to previously
	hardcoded value.
	(execGnuplotQt): Untangle the conditionals a bit. Use new macro
	GNUPLOT_QT for the name of the outboard driver executable (fixes
	SF bug #1652)

	* term/pslatex.trm [!EAM_BOXED_TEXT]: Remove empty fallback
	definition for new entry function.  Remove extraneous optional
	terminal API entry.

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

	* src/command.c (history_command): protect against try_to_get_string
	failure in history commands.

	* src/parse.c (next_iteration): protect against user corrupting
	iteration variable.  E.g. either of these used to segfault
		plot for [n=1:2] x lw n='foo'
		do for [n=1:2] { n="foo" }

	* src/plot2d.c src/plot3d.c src/set.c:  Do not allow function plots
	to specifc an image style (with image/rgbimage/rgbalpha).

	* src/command.c (pause_command):  protect try_to_get_string failure in
	'pause' command.  linux/windows/os2 code fixes are distinct.

	* src/command.c (plot_command splot_command):  Fuzz-testing found
	cases where 'refresh' triggered program failure if there was not an
	active refreshable plot.

	* src/plot3d.c (eval_3dplots): 2015-05-07 code to accommodate images in
	hidden3d plots was being invoked even if hidden3d was not active.

	* src/set.c (set_key): protect against try_to_get_string failure.

	* src/axis.c (get_position_type): Revert recoding of get_position_type
	(2015-02-15). Fixes failure to keep axis setting if already known.
	Bug #1658

	* src/command.c (new_clause {if|else|while|do}_command):
	Better bookkeeping for the depth of nesting in bracketed clauses.

	* src/plot2d.c (eval_plots) src/plot3d.c (eval_3dplots):
	Example of bug:     plot for [i=1:3] T=sprintf("%d",i),i title T
	previous code evaluated the definition three times and only then
	drew [one] plot.   After this fix the code executes define+plot
	three separate times.

	* src/graphics.c (place_parallel_axes): Ignore plots containing no data
	and hence no initialization information for parallel axis structures.
	Example of bug:     plot 'foo' using 1:2:3:4:5 with parallel, 0

	* src/command.c (toggle_command):  Handle plots with no title.

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

	Sync restored repository on SourceForge to in-progress commit tree
	from 2015-07-15.  So far as I can see the only files affected are
	demo/html version updates.

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

	* src/datafile.c (df_determine_matrix_info):  The new (12 May 2015)
	mechanism for tracking matrix and image dimensions transposed the
	row and column counts in the case of
	    plot $asciidata matrix with image
	Bug #1654

	* demo/imageNaN.dem:  Revise the demo to use non-square matrices
	so that it acts as a unit test for errors like the above.

	* demo/html/index.*:  Update version and date

2015-07-15  Tatsuro MATSUOKA  <tmacchant3@yahoo.co.jp>

	* src/eval.c (update_gpval_variables):  Windows variant of linux/posix
	uname() information.  Store in variables
	    GPVAL_MACHINE         e.g. i686, x86_64
	    GPVAL_SYSNAME         e.g. linux, Windows
	    GPVAL_BITS            number of bits in a pointer

	* src/eval.c: Re-order code to support Windows non-C89 compilers
	(e.g. Visual Studio 2010)  (thanks to Akira Kakuto).

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

	* src/datafile.c (df_open):  Bookkeeping for matrix dimensions in plot
	structure must not be applied inside a stats command.

	* src/graphics.c (process_image):  Sanity check that input image data
	does not overflow the space allocated for it based on dimensions
	calculated when the input file was first opened.

	* src/plot3d.c (eval_3dplots):  Skip empty input file cleanly, as we
	already do for 2D plots.

	* src/datafile.c (df_open):  Filename of the form "+file.dat" must not
	be mistaken for special file '+'.

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

	* src/wxterminal/wxt_gui.cpp term/cairo.trm term/wxt.trm:
	Change fixed-length fontname storage to dynamic (cairo + wxt terminals)
	to prevent crashes found by fuzzing.

	* term/hpgl.trm (set_font):  Prevent same crash in hpgl/pcl5 terminal.

	* src/datablock.c:  The storage in a zero-length datablock was not
	initialized.

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

	* src/command.c (bind_command) src/mouse.c (bind_fmt):
	Very old bug (pre v4.0) in parsing the bind command, such that
		bind X" some longish command"
	would corrupt memory.  The output format was bad also.

	Remove ancient files from active repository: lineproc.mac header.mac
	According to Changelog.4 this was done in 2013, but apparently not.

2015-07-11  Christoph Bersch <usenet@bersch.net>

	* term/epslatex.trm:  enable dashtype processing

2015-07-11  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* demo/imageNaN.dem: Fix broken command in demo.

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

	* src/set.c (load_tic_series): Incorrect nesting of brackets caused
	"set xtics 0" to be accepted rather than rejected.  This could lead
	to various bad outcomes (as found by fuzz-testing).

	* src/stats.c: More fuzz-testing.
	Possible double free if string_or_express returns via int_error().

	* src/set.c: More fuzz-testing.  Fix various places where failure to
	parse a string could lead to a double-free

	* src/axis.c (load_range):  More fuzz-testing.  "set [xyz]range"
	per se does not care if the range limits are extremely large,
	e.g.  xrange [ -inf.0 : inf.0 ]
	but other places in the code do not handle this cleanly.
	Limit the range to +/- VERYLARGE

	* src/set.c (set_terminal) src/unset.c (unset_terminal)
	src/eval.c (del_udv_by_name):  More fuzz-testing.
	If GNUTERM is defined but empty, or if a "set term <garbage>" command
	fails during parsing, then the current terminal could be left as NULL.
	Now (I hope) we guarantee that at worst it is "unknown".

	* src/pm3d.c (pm3d_plot): More fuzz-testing.
	If no interpretable pm3d scan lines are found in a file the program
	could die on a divide-by-zero error before noticing the real problem.

	* src/set.c (set_style) src/show.c: "set style func parallelaxes"
	is not supported.  "set style data parallelaxes" was not saved.

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

	* term/estimate.trm:  Initialization of enhanced text string buffer.
	Bug #1648

	* src/set.c src/fit.c src/term.c src/parse.c term/cgm.trm term/gd.trm
	term/x11.trm:  Fuzz-testing found a recurring pattern of fragile code:
	if (isstringvalue(c_token))
	     foo = try_to_get_string();	/* cannot fail */
	Unfortunately it _can_ fail if an expression begins with a quoted string
	but is coerced into returning a numerical value. All of these sites
	require a specific check for (foo != NULL).
	Bug #1649

	* src/eval.c (pop_or_convert_from_string): Some of the cases of bad
	syntax can also be caught inside try_to_get_string() itself. It doesn't
	hurt to add the check at this level also (belt+suspenders approach).
	Bug #1649

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

	* src/wxterminal/gp_cairo.c (gp_cairo_set_dashtype):  If the dashtype
	is changed then the current path must be stroked and reopened.

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

	* configure.ac src/plot2d.h:  Move the definition of SMOOTH_BINS_OPTION
	into plot2d.h, since configure.ac is not seen by the build system on
	MSWin.

	* demo/html/webify.pl:  Default to pngcairo terminal rather than png.

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

	* src/graph3d.c:  An incorrect test for variable color was used for
	splots with impulses or points.  Replace it with a shared correct test
	in check3d_for_variable_color.  Note: Binary plots can still set an
	incorrect flag plot->pm3d_color_from_column but this flag is no longer
	sufficient to cause the observed problem.
	Bug #1644

2015-06-28  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* configure.ac: Check for existence of latex2html.
	* docs/Makefile.am (htmldocs/gnuplot.html): Do not try to build if
	latex2html was not found.
	(alldoc): Target 'ms' no longer exists.  Test actual outputs made
	from gnuplot.ms instead.

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

	* src/qtterminal/QtGnuplotItems.dpp (drawPoint):
	The "dots" style was inadvertantly made a no-op by change on 2015-02-15.

	* configure.ac demo/bins.dem docs/gnuplot.doc src/gp_types.h
	src/plot2d.c src/interpol.c src/interpol.h demo/random.dem:

	New data filter "bins" sorts the original data into equal width bins
	on x and then plots a single value per bin. The default number of bins
	is controlled by `set samples`, but this can be changed by giving an
	explicit number bins=N in the plot command.  The new feature is marked
	EXPERIMENTAL in the documentation because we may decide to change the
	syntax to "smooth bins" or "filter bins" or something else.

2015-06-23  Ethan A Merritt  <merritt@u.washington.edu>

	* src/mouse.c (do_event) src/command.c (replotrequest):
	An attempt to zoom or scroll the output from a "test" command could
	produce useless error messages on the console.  Now it will revert to
	the previous plot command, if any.
	Bug #1627

2015-06-20  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/util.c (gprintf): 'L' had broken if-else since 2010; 'B' was
	missing handling for power zero; 'B' had problem with excess
	precision.

2015-06-15  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/term.c (test_term):  Use of unsigned terminal coordinates could
	cause overflow and jam up display of very small plots in x11 terminal.
	Bug #1626

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

	* src/graphics.c (plot_boxes):  Autocalculation of box widths was bad
	whenever a NaN data value was encountered.  Now such data points are
	ignored, as they were in version 4.
	Bug #1623

2015-06-14  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/term.c (test_term):  Dashtype sample labels displayed by `test`
	were off by one.

2015-06-05  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/fit.c (fit_command): If there's exactly one more range in a
	'fit' command than there are independent variables, that last
	range has to be applied to the dependent variable
	(a.k.a. "function").

2015-06-04  <pudh4418@users.sf.net>

	* configure.ac:  Qt5 as build for Arch linux apparently requires
	compilation with -fPIC rather than -fPIE.
	Bug #1616

2015-06-03  Ethan A Merritt  <merritt@u.washington.edu>

	* src/util3d.c (draw3d_line_unconditional polyline3d_next):
	Do not reset line properties for each component line segment in a
	contour line.  This improves the dash-pattern rendering for contours.
	Bug #1612

	* src/parse.c (add_udv):  Warn if too-long variable name is truncated.
	Bug #1526

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

	* src/show.c:  Clarify the current "set clip" settings in "show clip".

	* src/term_api.h src/graph3d.c:  Send TERM_LAYER_3DPLOT to the terminal
	at the start of an splot.

	* src/qtterminal/QtGnuplotScene.{cpp|h} src/qtterminal/qt_term.cpp:
	If the current plot is 3D, do not update the status dispplay of x/y
	coordinates in response to a mouse move event.
	Bug #1605

2015-06-01  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/mouse.c (event_buttonrelease): Improved bookkeeping for which
	icon to display during mouse interaction.
	Bug #1617

	* src/gplt_x11.c (reset_cursor):  Do not reset the cursor of the
	currently active plot to default just before setting it to the correct
	cursor icon.  Prevents flicker due to transient change of icons.
	Bug #1618

2015-05-31  Jun-ichi Takimoto  <jtakimoto@users.sf.net>

	* src/qtterminal/qt_term.cpp:  Mouse coordinates must be passed to the
	clipboard as a QString.
	Bug #1602 (and earlier bugs)

	* src/qtterminal/QtGnuplotScene.cpp (mouseReleaseEvent): With the above
	fix in place, it is not necessary to lock out events during the
	doubleclick interval.

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

	* src/qtterminal/QtGnuplotEvent.cpp src/qtterminal/QtGnuplotScene.cpp:
	Always respond to mouse button release event, even if the graph widget
	is busy or the mouse has left the window area. This prevents the event
	from being lost, causing the rotate-on-mouse-motion mode to get stuck.
	Bug #1602

	* docs/doc2ms.c docs/windows/doc2html.c: Avoid finicky C90 compiler
	warnings.

2015-05-30  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* docs/Makefile.am (noinst_PROGRAMS): Add doc2wxhtml.
	(MOSTLYCLEANFILES, CLEANFILES): Split up into two lists, updated.
	(GNUPLOT_EXE): New variable, points to freshly built gnuplot
	executable.
	($(GNUPLOT_EXE)): Build executable, if not already present.
	(grotxt, grodvi, grops): Turn into proper phony targets: depend on
	the file actually built, do nothing themselves.
	(troff, gnuplot.nroff, gnuplot.txt, gnuplot-groff.dvi)
	(gnuplot-groff.ps): Must depend on titlepag.ms in srcdir, not
	builddir.  Use automatic make variables to simplify. Changed build
	of gnuplot.ms allows to remove complications for out-of-tree
	builds.
	(gnuplot.ms): Call doc2ms with new argument to ease out-of-tree
	builds.
	(gnuplot.tex, pdffigures, figures, nofigures, pdffigures.tex):
	Rules removed. Having different rules produce files of the same
	name, but with different content depending on the order of make
	targets built, cannot possibly work.
	(figures.tex, nofigures.tex): Keep two different versions of
	gnuplot.tex in different-named files.
	(pdf_figures, wxhelp_figures): New targets to handle generation of
	figures for use.
	(gnuplot.tex): Now just a link to (or copy of) nofigures.tex.
	(gnuplot.pdf, nofigures.pdf): Create pdffigures.tex on-the-fly,
	because its content cannot be assumed correct any other way.
	(dvi): Re-enabled.
	(gnuplot.dvi, gnuplot.pdf, nofigures.pdf, gpcard.dvi): Must depend
	on titlepag.tex and toc_entry.sty in srcdir, not builddir.
	(gnuplot.htb): Add necessary dependencies, some of them in srcdir.
	(doc2wxhtml_SOURCES, doc2wxhtml_CPPFLAGS): Use automake to build
	wxhtml, instead of spelling out compile rules ourselfs.

	* configure.ac (AM_INIT_AUTOMAKE): Up version requirement a bit,
	enable option subdir-objects.

	* docs/doc2ms.c (main, init): Add optional argument giving the
	location of titlepag.ms to be put into the file.  This way the
	file can be processed by roff tools as-is, without having to patch
	it on-the-fly.

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

	* term/js/gnuplot_svg.js:  The test (typeof tspan_element == 'tspan')
	is now failing in multiple browsers.  Comment it out for now.
	Bug #1340

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

	* src/command.c src/command.h src/tables.c docs/gnuplot.doc:
	New command `printerr` works exactly as `print` except that output is
	always to stderr even if normal print output has been redirected using
	`set print`.

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

	* src/axis.c src/axis.h:  Update routines that were missed in the
	axis pointer revision.  Remove GET_NUM_OR_TIME (no callers remain).
	Reorganize GET_NUMBER_OR_TIME, get_num_or_time to handle parallel axes.

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

	* term/tek.trm (SIXEL_fillbox): Handle FS_DEFAULT

	* term/tek.trm (SIXEL_make_palette): A second call to make_palette()
	was failed to reset the state, leading to loss of all palette info.
	Now it overwrites any previous palette.
	Bugfix (e.g. heatmaps demo)

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

	* src/qtterminal/QtGnuplotScene.* src/wxterminal/wxt_gui.*
	term/svg.trm term/js/gnuplot_svg.js docs/gnuplot.doc:
	EXPERIMENTAL support for a variant of hypertext that allows you to pop
	up an image on mouse-over.  The initial implementation looks for a
	hypertext string of the form "image{{xsize},{ysize}}:filename".

2015-05-13  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/command.c (pause_command): The windows "pause" command is
	sensitive to the locale encoding. Keep a translation table to convert
	between gnuplot's idea of the encoding and WIN32 encoding states so that
	strings output by "pause" are not corrupted.
	Bug #1580, Feature Request #415

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

	* src/term_api.h src/gadgets.h:  Move definition of struct t_image
	from term_api.h (no terminals use it) to gadgets.h (2D and 3D plots).

	* src/datafile.c src/graphics.c (process_image):  Remove old code that
	tried to empirically determine grid size of an image based on 3D coords.
	Replace it with new bookkeeping in plot->image_properties.{ncols,nrows}
	that is initialized when the image data is read in.
	Bug #1607

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

	* src/contour.c src/graphics.c src/internal.c src/interpol.c
	src/plot3d.c src/save.c src/set.c src/show.c src/tabulate.c:
	Whitespace/codestyle cleanup "if (FOO)" rather than "if( FOO )"

	* src/bitmap.c src/eval.c src/gadgets.c src/getcolor.c src/hidden3d.c
	src/plot3d.c src/save.c src/set.c src/show.c src/stats.c src/unset.c:
	Whitespace/codestyle "for (...) {" rather than "for( ... ){"

2015-05-07  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/graph3d.c src/graph3d.h src/graphics.c src/graphics.h
	src/plot2d.c src/hidden3d.c:
	Replace plot_image_or_update_axes(*plot, TBOOLEAN), which handled
	2 options, with new routine process_image(*plot, t_procimg_action).

	* src/plot3d.c (eval_3dplots):  Accommodate images in hidden3d
	plots in a way analogous to the current handling of pm3d surfaces.
	A phantom surface is constructed consisting of a single rectangle
	that overlays the image, and that phantom is included as surface
	in the hidden3d sort/divide/occlude processing.

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

	* src/hidden3d.c (build_networks):  In hidden3d mode do not draw
	the surface if the keyword 'nosurface' is present (set the linetype
	internally to LT_NODRAW).  Normally this keyword would mean "draw only
	the data lines, not the isosampled grid lines", but that makes little
	sense for a hidden3d surface.  This provides a way to draw only the
	contours of a hidden3d contour plot.
	See Bug #1603

2015-05-03  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* term/caca.trm: Insert missing include of <sys/select.h>.

	* src/wxterminal/wxt_gui.cpp: Insert missing include of
	<sys/select.h>.
	(wxt_waitforinput): Add note about missing check for HAVE_SELECT.

2015-05-02  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/Makefile.am (getcolor_x11.o): Use Automake macros to
	control whether tool calls are echoed or not.

	* docs/Makefile.am (LUA_HELP, allterm.h, troff, gnuplot.nroff)
	(grotxt, grodvi, grops, gnuplot.ms, htmldocs/gnuplot.html)
	(pdffigures.tex, figures, nofigures, gnuplot.pdf, gnuplot.tex)
	(gnuplot.dvi, gpcard.dvi, gnuplot.ps, gpcard.ps, gnuplot.hlp)
	(gnuplot.gih, allgih, gnuplot.htb, wxhelp/wgnuplot.html)
	(wxhelp/doc2html.o, wxhelp/doc2html$): Use Automake macros to
	control whether tool calls are echoed or not.
	(gnuplot.texi gnuplot-eldoc.el): Move compilation of ELisp out of
	here.  There was already a separate rule for it.
	(${ELCS}, gnuplot.info, install-info, gnuplot.ipf, gnuplot.rtf)
	(gnuplot.rnh, check-local, clean-local, install-vms): Use Automake
	macros to control whether tool calls are echoed or not.

	* docs/gnuplot.doc: Blank-only line fixed.

2015-04-30  Ethan A Merritt  <merritt@u.washington.edu>

	* src/hidden3d.c:  If a hidden3d plot included a "with image" component,
	the hidden3d processing was tracking individual pixels as points.  This
	slowed everything down without accomplishing anything useful.  Now we
	ignore image plots altogether in the hidden3d code.

	* demo/hidden2.dem:  Add a demo/test for hidden3d processing of image
	plots.  It doesn't actually work at this point, but is useful as a test
	case for new code.

	* src/axis.c (axis_init) src/axis.h src/plot2d.c:  Funnel existing
	macros AXIS_INIT2D and AXIS_INIT3D into a single routine axis_init().
	Whatever reason there was originally to distinguish the 2D and 3D cases
	is no longer applicable in version 5.

2015-04-29  Ethan A Merritt  <merritt@u.washington.edu>

	* Makefile.maint docs/pdffigures.tex docs/Makefile.am:
	Try to reduce churn during "make check" "make pdf" etc by removing
	dvi as an auto-generated target and defaulting to documentation with
	figures.

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

	* src/graph3d.c (do_3dplot):  Turning on "hidden3d" caused an off by
	one error in assigning color to contours levels.
	Bug #1603

	* src/command.c (do_line):  If an input line starts with a shell escape
	(e.g. '!' for linux) bypass first stage processing (df_tokenise) of the
	remainder of the line.  NB: This means that text following a comment
	character is now passed to the shell rather than being stripped.
	Bug #1517

2015-04-24  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/misc.c (parse_fillstyle):  Additional sanity checks when parsing
	fillstyle options.
	Bug #1597

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

	* src/fit.c:  Fit code really cares about MAX_NUM_VAR, not MAXDATACOLS.

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

	* src/datafile.c (f_stringcolumn f_columnhead df_set_key_title):
	columnhead(FOO) could return strange results for FOO > 999 or
	undefined or otherwise invalid.  Now we extend the range of valid
	column number to 9999 and return 0 for invalid or out of range FOO.
	Bug #1596

2015-04-21  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.ac src/axis.c src/axis.h src/plot2d.c src/set.c src/unset.c:
	Switch to dynamic allocation of parallel axis structures.  The count of
	currently allocated structures is kept in global num_parallel_axes.
	All storage is released by "reset".
	At this stage there still remains a limit on how many parallel axes you
	can use in practice because each one consumes a slot in the `using`
	specifier (limited by MAXDATACOLS).

2015-04-20  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* src/term.c (test_term):  Show terminal's native dashtype support in
	the `test` command output.

2015-04-20  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>.

	* src/mouse.c (apply_zoom):  axis->formatstring and axis->ticfmt are
	now dynamically allocated and must be saved and restored when zooming.

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

	* src/axis.c src/axis.h:  axis_defaults[PARALLEL_AXES] no longer needed.

	* src/set.c src/show.c src/unset.c: Clean up a few references to
	PARALLEL_AXES that should instead test for a more restrictive set of
	axes.

	* src/axis.c src/axis.h:  Simplify implementation of axis_name().

2015-04-17  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c src/axis.h: Second stage of moving parallel axis support
	into dynamically allocated storage.  Move the parallel axis structures
	into a separate array and shrink the main axis_array[] accordingly.

	* src/save.c src/set.c src/unset.c:  Split various loops over the full
	set of axes into two separate loops
	    for (axis=0; axis<AXIS_ARRAY_SIZE; axis++) ... axis_array[axis]
	    for (axis=0; axis<num_parallel_axes; axis++) ... parallel_axis[axis]

	* src/unset.c (unset_range reset_command):  Simplify code sections that
	only have to handle the regular axes (not called for parallel axes).
	Add temporary code to handle "reset" of parallel axes; this can go away
	again when "reset" is changed to deallocate the parallel axes altogether.

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

	* src/color.c (set_color):  Some terminals (pdfcairo, post) produced
	invalid output if given NaN as a gray value in term->set_color().
	Others variously ignored it, replaced it with black, or gray=0.
	Now we trap NaN in the core code and substitute a request for background
	color.  Note:  I'd rather substitute with a fully transparent color,
	but not all terminals handle transparency.
	Bug #1595

	* src/axis.c src/axis.h:  Initial stage of moving parallel axis support
	into dynamically allocated storage.  Here we introduce a new global
	    AXIS *parallel_axis = &axis_array[PARALLEL_AXES]
	For now it points to the existing storage. Later it will become dynamic.

	* src/graphics.c (plot_parallel place_parallel_axes)
	src/set.c (set_paxis) src/show.c (show_paxis):
	Index or point to parallel axis structures relative to parallel_axis[]
	rather than relative to axis_array[].

	* src/plot2d.c (get_data) src/save.c (save_set_all)
	src/unset.c (unset_command):
	Index or point to parallel axis structures relative to parallel_axis[]
	rather than relative to axis_array[].

	* src/unset.c (free_axis_struct):  New routine to free fields in an
	axis structure that is about to be reinitialized or deleted.

2015-04-15  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/show.c (show_paxis): Simplify call to save_prange();
	(show_range, show_link): Call save_prange() instead of deprecated
	save_range().

	* src/save.c (save_range): No longer called. Removed.
	(save_set_all): Replace calls to save_range() by equivalent ones
	to save_prange().

	* src/stdfn.h (FPRINTF, DEBUG_WHERE): Make inactive definitions
	more similar to active ones, for the benefit of people who don't
	like to use {} around their if() bodies.

	* src/save.h: Remove prototype for save_range.

2015-04-15  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (plot_parallel place_parallel_axes): Revise to use
	axis pointers rather than AXIS_INDEX.

	* src/unset.c: Avoid using AXIS_INDEX where practical.
	Limit initialization of grid/labels/etc to the axes that need it.

	* demo/fit.dem:  Exercise "set fit covariancevariables" in the demo.

	* src/save.c: Avoid using AXIS_INDEX where practical.

2015-04-10  Daniel J Sebald <daniel.sebald@ieee.org>

	* term/tkcanvas.trm:  Fix problems handling an empty font family name
	in a requested font string, as in   set term tkcanvas font ",15"
	Bug #1591

2015-04-09  Ethan A Merritt  <merritt@u.washington.edu>

	* src/show.c: Revise internal routines to use axis pointers rather
	than AXIS_INDEX.

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

	* src/fit.c (setvarcovar):  Allocated size of string for FIT_COV_*_*
	variables was too small, corrupting the allocation heap.

	* src/fit.c (regress_finalize):  Show results in the log file even if
	the "quiet" option suppresses screen output.

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

	* src/term.c (termp_apply_lp_properties):  Fix incorrect assumption
	that dashtype 1 is always solid and already set by default.
	Bug #1588

	* term/emf.trm (EMF_linetype):  Two linetypes (LT_SOLID LT_AXIS) have
	an intrinsic dash pattern.
	Bug #1588

	* src/term.c (test_term):  Use same sequence of setting line properties
	linewidth/linetype/dashtype in the "test" command as in the core code.

	* demo/imageNaN.dem:  Illustrate NaN generated by negative values
	on a log-scale palette mapping.

	* src/set.c src/term.c:  Adjust the new "set mono" option so that
	"set term xxx mono" is not persistent. I.e., it doesn't leave "set mono"
	in effect after the next terminal change.  This makes it more like the
	version 4 mono terminal option.  "set mono" itself is still persistent.

2015-04-04  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/term_api.h (DEFAULT_MONO_LINETYPES): Empty initializer is
	not allowed.

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

	* src/axis.h (ACTUAL_STORE_WITH_LOG_AND_UPDATE_RANGE):
	If the value being stored to a log-scaled axis is negative, the stored
	value should be NaN rather than the un-logged original value.

	* src/plot2d.c (get_data): But even that doesn't help if UNDEF_ACTION
	re-stores the orginal value, so don't do that.  Together these changes
	fix the problem that negative values mapped onto a log-scaled cbaxis
	produced a valid (but wrong) color rather than being treated as NaN.

2015-04-02  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* docs/gnuplot.doc:  Document the C library routines used to parse
	numerical constants in commands and expressions. Integer constants are
	read using strtoll(); floating point constants are read using atof().

2015-04-02  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* compile: Add script required by automake.

	* demo/plugin/Makefile.am (demo_plugin_so_SOURCES): Add
	gnuplot_plugin.h.
	(EXTRA_DIST): Add plugin.dem.

	* demo/Makefile.am.in (Makefile.am): Subdir 'plugin' has a
	Makefile.am, so it should not be in EXTRA_DIST.

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

	* src/gadgets.c src/gadgets.h src/set.c src/setshow.h src/tables.c
	src/tables.h src/term_api.h src/term.c src/unset.c term/x11.trm
	src/show.c docs/gnuplot.doc:
	New commands
		{un}set monochrome {linetype N <line-properties>}
		set color     (same as "unset mono")
	Maintain a set of monochrome linetypes (all black with varying dot-
	dash pattern and/or width) in parallel with the default set of
	color linetypes.  Switch between the two sets using "set mono" or
	"set color".  Terminal types that used to provide a separate "mono"
	keyword now trigger "set mono" as appropriate.  For example,
	"set term pdf mono" is equivalent to "set term pdf; set mono".
	Six default monochrome linetypes are pre-defined. These do not exactly
	duplicate the idiosynchratic mono linetypes of various pre-version 5
	terminals (be cairo cgm emf fig pdf post ...).
	Some further adjustment for individual terminals may be needed.

2015-03-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/save.c src/save.h src.show.c:  Axis pointer conversion of
	save_range, save_tics, save_num_or_time_input.

2015-03-24  Erik Olofsen <olofsen@users.sf.net>

	* term/tek.trm: RGB + palette support for sixel terminal.
	The vt100/vt340 sixel emulator is limited to 16 distinct colors per
	plot but other emulators may permit more.

2015-03-24  Ethan A Merritt  <merritt@u.washington.edu>

	* term/fig.trm term/epson.trm term/tek.trm:  Remove unused variables.

2015-03-24  <dcb314@users.sourceforge.net>

	* src/mouse.c src/plot2d.c src/wxterminal/gp_cairo.c:
	Incorrect argument type to abs() or fabs().

	* src/stats.c (analyze_sgl_column): Incorrect truncation of double to
	int while calculating absolute deviation.
	Bug #1584

2015-03-24  Tatsuro MATSUOKA  <tmacchant3@yahoo.co.jp>

	* src/command.c (pause_command): Work around a bug seen for
	mingw + SJIS encoding.

2015-03-23  Ethan A Merritt  <merritt@u.washington.edu>

	* term/fig.trm:  Preload user-defined linetype colors and gnuplot's
	set of named colors so that they are available in fig plots.

2015-03-22  Ethan A Merritt  <merritt@u.washington.edu>

	* term/cairo.trm:  The cairolatex terminal should not set the flag
	TERM_ENHANCED_TEXT since latex markup is not the same as gnuplot's
	enhanced text mode.  This does not hurt plotting per se, but it
	causes the "test" command to emit a non-latex string.

	* src/unset.c: Revise internal routines unset_tics() unset_minitics()
	and unset_range() to use axis pointers rather than AXIS_INDEX.

2015-03-21  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* demo/plugin/.cvsignore: Added.

	* config/cygwin/.cvsignore: Added.

	* config/watcom/.cvsignore: Ignore two more files.

	* docs/Makefile.am (clean-local): $(LUA_HELP) file has to be
	cleaned, too.

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

	* src/boundary.c (do_key_sample) src/graph3d.c src/graphics.c
	src/graphics.h (check_for_variable_color):  The key sample for plots
	with filled objects (boxes, circles, ellipses, etc) and "lc variable"
	was drawn in some non-obvious color not necessarily present in the plot.
	Now we guarantee that the key sample is drawn using the color of the
	first point in the plot.

2015-03-17  Ethan A Merritt  <merritt@u.washington.edu>

	* src/set.c: Revise many internal routines in set.c to use axis pointers
	rather than AXIS_INDEX.

2015-03-14  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.h src/plot2d.c:  Revise macros AXIS_INIT2D and (the big one)
	ACTUAL_STORE_WITH_LOG_AND_UPDATE_RANGE to use axis pointers rather than
	AXIS_INDEX.  This is mostly invisible to the higher-level code.

	* src/axis.h src/axis.c src/set.c:  Revise load_range() to take axis
	pointers. Export get_num_or_time().

	* src/axis.h src/axis.c src/plot2d.c src/set.c src/datafile.c:
	Revise add_tic_user() to take axis pointer rather than AXIS_INDEX.

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

	* src/axis.c src/axis.h src/datafile.c src/plot2d.c:
	Revise axis_unlog_interval() to use pointers rather than AXIS_INDEX.

	* src/axis.c src/axis.h src/graphics.c:
	Revise old routine axis_revert_range(AXIS_INDEX) to be a wrapper for a
	new routine axis_invert_if_requested(struct axis *).

	* src/axis.c:  Change many call sites to use the new macros and new
	routine variants taking an axis pointer rather than an AXIS_INDEX.
	This set of changes is purely internal to code in axis.c.

	* src/axis.c src/axis.h src/boundary.c src/graphics.c src/mouse.c
	src/plot3d.c:  Revise make_tics(), copy_or_invent_formatstring(), and
	setup_tics() to use axis pointers rather than AXIS_INDEX.

	* src/unset.c: Fix memory leak (linked axis function) on reset.

2015-03-12  Ethan A Merritt  <merritt@u.washington.edu>

	Begin bottom-up revision of axis handling routines to use pointers
	rather than array indices.

	* src/axis.h: Modify the template for axis tic-generation callbacks from
	  callback(AXIS_INDEX, ...) to callback(struct axis *, ...)
	* src/axis.c (widest_tic_callback): Modify widest_tic_callback to match
	  the new template, although it needs no axis information
	* src/graphics.c (xtick2d_callback ytick2d_callback)
	  src/graph3d.c (xtick_callback ytick_callback ztick_callback):
	  Modify 2D and 3D axis callbacks.
	* src/color.c (cbaxis_callback): Modify color axis callback.
	* src/axis.c (gen_tics): Modify the call sites for all of these.

	Next level up: Modify gen_tics() and all the places that call it.
	old: gen_tics(AXIS_INDEX axis, callback)
	new: gen_tics(struct axis *this, callback)

	* src/axis.h src/axis.c (gen_tics):
	* src/boundary.c src/color.c src/graph3d.c src/graphics.c: call sites

2015-03-11  Ethan A Merritt  <merritt@u.washington.edu>

	Gradually move all axis-related information into the axis structure
	itself rather than leaving it spread out among multiple arrays indexed
	in parallel.  The rationale is to allow routines that process this
	information to operate from a pointer to (struct axis) rather than from
	an array index.  This will allow dynamically allocated axis definitions.

	* src/axis.c src/axis.h src/unset.c:  Part 1 - Keep a copy of the axis
	index (e.g. SECOND_Y_AXIS) in the axis structure.  This may eventually
	go away again, but for now it allows calling a routine that wants the
	axis index from a routine that works from an axis pointer.

	* src/axis.c src/axis.h:  Part 2 - Replace the separate arrays
	timelevel[] and ticstep[] by moving their respective contents into new
	fields axis->timelevel and axis->ticstep.

	* src/axis.c src src/axis.h src/unset.c:  Part 3 - Replace the static
	array ticfmt[AXIS_ARRAY_SIZE][MAX_ID_LEN+1] with a dynamically
	maintained field axis->ticfmt.

	* src/axis.c src/axis.h:  Part 4 - Reduce length of axisname_tbl[] to
	contain only the axes that use it (i.e. no individual parallel axis
	entries).

	* src/axis.h:  New versions of axis data macros that use axis pointers.
	New macro axis_{un}do_log(struct axis *,value) analogous to
		  AXIS_{UN}DO_LOG(AXIS_INDEX,   vlaue)
	New macro axis_map(struct axis *, variable) analogous to
		  AXIS_MAP(AXIS_INDEX, variable)
	New macro tic_scale(ticlevel, struct axis *) analogous to
		  TIC_SCALE(ticlevel, AXIS_INDEX)

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

	* src/datafile.c: The code tracking matrix column/row headers tried
	to extract the relevant string from the wrong internal array.
	Bug #1575

2015-03-06 Allin Cottrell  <cottrell@wfu.edu>

	* src/wxterminal/gp_cairo.c:  Prevent free() of a string constant.

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

	* src/term_api.h src/term.c src/graphics.c term/estimate.trm:
	New routine estimate_plaintext(char *enhancedtext) returns a string
	stripped of all enhanced text markup.  Use this to provide plain
	text titles in output files even though the plot title itself contains
	markup characters.
	Bug #1573

	* demo/hypertext.dem: Simplify output file (attach hypertext to only
	one set of points).

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

	* src/tables.c src/graphics.c (plot_filledcurves) docs/gnuplot.doc:
	The "y1=foo" and "y2=foo" options to the filledcurves style are
	confusing, as both operate on the current plot's y axis regardless
	of whether it is y1 or y2.  Rename the option as "y=foo" and remove
	mention of the older y1= and y2=.  All three are accepted on input.
	Bug #1568

2015-02-26  Ethan A Merritt  <merritt@u.washington.edu>

	* src/fit.c src/fit.h src/set.c src/save.c src/show.c:  "set fit nolog"

	* term/tek.trm: Remove SIXEL_set_color() terminal entry.  This function
	does not perform the operation expected by the core code (change the
	current color for lines/texts/points/etc). Instead it redefines one of
	16 linetypes.  In gnuplot version 5 this causes most objects to be
	drawn in black.  Removing the entry allows the sixel terminal to work
	more or less like a fixed color 16-pen plotter.
	Bug #1556

2015-02-24  Mojca Miklavec  <mojca.miklavec.lists@gmail.com>

	* configure.ac m4/apple.m4 term/aquaterm.trm:
	Correct "Aquaterm" to "AquaTerm" (framework name is case sensitive).

2015-02-23  Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c:  Special case code for axis tickmarks in polar plots was
	incorrectly being applied to all axes, not just the polar axis.
	Bug #1569

2015-02-18  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* term/gd.trm (PNG_vector): Prevent accummulated round-off error in
	dotted line emulation by using (double) variables to track incremental
	coordinates.
	Bug #1549

2015-02-18  Ethan A Merritt  <merritt@u.washington.edu>

	* src/term.c (term_apply_lp_properties do_point load_linetype):
	Restore old (version 4) behavior of terminals such as hp pen plotter
	and pbm that do not support user-selected colors.
	Bug #1556

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

	* src/axis.h src/axis.c src/set.c:  Do away with 4 utility routines
	{set|get}_writeback_{min|max} that did nothing but provide a
	round-about way to access the next field in a structure that is
	already active. E.g. axis->min = get_writeback_min(axis) becomes
	axis->min = axis->writeback_min.

	* src/boundary.c src/color.c:  Remove dead code (commented-out extra
	parameter to gen_tics()).

2015-02-15  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/axis.h (AXIS_INDEX): Change value of NO_AXIS to -2.  Make
	AXIS_ARRAY_SIZE an enum entry, again.
	(NUMBER_OF_MAIN_VISIBLE_AXES): New name, to be used instead of
	LAST_REAL_AXIS.
	(LAST_REAL_AXIS): Removed.
	(AXIS_IS_SECOND, AXIS_IS_FIRST): New macros to formalize checking
	if an axis is among the second or first axes, respectively.
	(AXIS_MAP_FROM_FIRST_TO_SECOND, AXIS_MAP_FROM_SECOND_TO_FIRST):
	New macros to centrally define how to switch from a first axis to
	its corresponding secondary axis, and vice versa.
	(axis): Change type of linked_to_primary from bool to an actual
	pointer to the linked axis struct.
	(ACTUAL_STORE_WITH_LOG_AND_UPDATE_RANGE): Missing parentheses
	around macro argument use.  Use linked_to_primary as a pointer.

	* src/axis.c (setup_tics): Cloning takes only one argument now.
	(axis_output_tics): Rely less on axis array layout.
	(some_grid_selected): Use new axis range macro.
	(get_position_type): Use correct type for axis index argument.
	(get_position_default): Use correct type for localaxis index
	variable.  Catch attempted use of z2 axis.
	(clone_linked_axes): Use only one argument.  The other is implied
	anyway.  Do some sanity checks first up.

	* src/command.c (link_command): Initialize local variables.  Axis
	link information is a pointer now. Concentrate knowledge about
	links between axes more into axis methods.

	* src/eval.c (eval_link_function): Use correct type for axis index
	argument.

	* src/gplt_x11.c (plot_struct): Use new axis range name.
	(byteswap): Define variable more locally.
	(exec_cmd): New local pointer to make code easier to understand.
	Use new axis range name.

	* src/graphics.c (adjust_offsets): Concentrate knowledge about
	links between axes more into axis methods.

	* src/plot2d.c (eval_plots): Concentrate knowledge about links
	between axes more into axis methods.

	* src/save.c (save_set_all): Use new axis range name.
	(save_range): linked_to_primary is a pointer now.

	* src/show.c (show_zeroaxis): Use new macro about distinction
	between first and second axes.

	* src/unset.c (unset_logscale): Use new axis range name.
	(reset_command): linked_to_primary is a pointer now.

	* term/x11.trm (X11_text): Loop over AXIS_INDEX should use that
	type for the index variable.  Use new axis range name.

	* docs/doc2tex.c (section, puttex): Correct use for <ctype.h> functions on
	plain char requires a cast to unsigned char.

	* docs/doc2ms.c (section): Correct use for <ctype.h> functions on
	plain char requires a cast to unsigned char.

	* src/set.c (set_dummy): Correct use for <ctype.h> functions on
	plain char requires a cast to unsigned char.
	(set_degreesign): Avoid -Wunused.
	(set_logscale): Use modified axis range name.
	(set_range): Concentrate knowledge about links between axes more
	into axis methods.

2015-02-13  Ethan A Merritt  <merritt@u.washington.edu>

	* src/gadgets.c (apply_pm3dcolor): Variable color specifier "palette cb"
	failed to handle log-scaling of the color axis.
	Bug #1560

	* src/mouse.c (load_mouse_variables): MOUSE_BUTTON was not set correctly.

2015-02-11  Erik Olofsen <olofsen@users.sf.net>

	* configure.vms:  update compile-time variables to include HAVE_VFPRINTF
	and MAX_PARALLEL_AXES

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

	* src/boundary.c (do_key_sample_point) src/graphics.c (do_plot)
	src/graph3d.c (do_3dplot): Until now "with labels" plots could have
	a point associated with each label but the point style was not
	indicated in the key.  Now it is.

	* src/qtterminal/QtGnuplotIterms.cpp (drawPoint):
	Don't draw an extra dot at the nominal origin of each point symbol.

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

	* src/interpol.c (cp_implode):  The monotonic cubic spline code
	does not expect or handle multiple curves in a single data set.
	Thus cp_implode should not set the total number of averaged points
	to more than the total corresponding to the first curve.
	Bug #1548

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

	* src/plot2d.c:  Allow "noautoscale" keyword to appear anywhere in
	the plot command, not just immediately after the using specifier.

	* src/interpol.c:  Rework "smooth kdensity" so that
	1) it now handles logscale on y
	2) it treats xrange as other plot styles do; in particular it no longer
	limits the x range to that of the points making up the kernel.

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

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

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

	* src/graphics.c (plot_betweencurves):  This routine now handles both
	the 3-column variant of filledcurved ("between") and the y1=<yval> or
	y2=<yval> variants. In order that various lower level routines do not
	get confused, set the same options flag FILLEDCURVES_BETWEEN for all
	of these.  (Bug fix)

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

	* src/plot2d.c src/show.c docs/gnuplot.doc:  Report maximum number of
	parallel axes in "show version long".  Enforce this limit when plotting.
	Document the limitation.

	* src/util.c (gprintf):  The "%h" format want a proper multiplication
	sign rather than 'x' when possible.  We already do this for UTF8 and
	CP1252, now add support for iso_8859_* encodings.

	* src/save.c:  Use "set xyplane relative" rather than the deprecated
	"set ticslevel".

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

	* src/command.c (test_palette_subcommand):  Apply numeric locale to the
	$PALETTE datablock created by the "test palette" command.

	* term/pslatex.trm:  Separation of linetype/dashtype in version 5 means
	that term->set_color should not be turned into term->linetype.
	Bug #1545

	* src/term.c (term_test): Fix failure to save/restore arrow style.
	Use LT_SOLID for box around central text.
	Bug #1546

2015-01-20  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c:  Restore several lines of code that were inadvertantly
	lost in the revision to filledcurve processing (2015-01-16).

	* src/graphics.c src/help.c src/hidden3d.c src/interpol.c src/color.c
	src/graph3d.c:  Back in 2001 some comparator functions passed to qsort
	were made non-static to work around a bug in HPUX. The reason for that
	is long gone, so make them static as they ought to be.

2015-01-19  Ethan A Merritt  <merritt@u.washington.edu>

	* src/boundary.c src/set.c src/save.c: set/save/apply text justification
	to key title.

	* src/command.c src/datablock.c src/eval.c src/eval.h src/fit.c
	src/gp_types.h src/internal.c src/misc.c src/mouse.c src/parse.c
	src/plot2d.c src/plot3d.c src/plot.c src/save.c src/set.c src/show.c
	src/standard.c src/stats.c src/term.c src/util.c term/lua.trm:
	Move the "undefined" status flag from udvt_entry->udv_undef into
	the value itself (udvt_entry->udv_value.type == NOTDEFINED).
	This prevents coding mistakes which would leave a data type in the
	value even though the variable itself is marked undefined.
	Also it allows tracking or setting the undefined status in routines
	that are passed a pointer to a value rather than a udvt_entry.

2015-01-16  Ethan A Merritt  <merritt@u.washington.edu>

	* src/tabulate.c:  Tabular output of time/date values should check the
	new flag output flag (tictype) rather than the input flag (datatype),
	and fall back to a generic time format if the axis doesn't have one.

	* src/time.c (gstrptime): If the time format explicitly includes day,
	month, or year then always do sanity checking on the interpreted date.
	Return NULL if the sanity check fails.  Previously the sanity check
	was only done if that field of the format was evaluated (i.e. it was
	not done if input garbage caused parsing to terminate early), and
	zeros were returned in the time structure with no indication of failure.
	This "failure silently returns zero" behaviour is still kept for
	hour, minute, and second input fields.

	* demo/timedat.dat: Add a line of headers to exercise the new sanity
	checks in gstrptime.

	* src/graphics.c src/plot2d.c:  Fix breakage in plot style
	filledcurves {above|below} y1=<yval>

2015-01-15  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (plot_filledcurves):  Reevaluate variable fill color
	for every polygon in the input stream to "with filledcurves".
	Bug/Feature Request #411

	* src/gadgets.c (apply_pm3dcolor) src/term.c (load_linetype):
	Remove special-cased test for monochrome terminals that can lead cause
	a failure to update the linecolor in version 5 (e.g. background->black).
	Bug fix

2015-01-13  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (df_read_matrix) demo/matrix_index.dem:
	Handle named indices (extra line in data file containing name of
	subsequent data matrix) for nonuniform ascii matrix data.
	Bug #1538

	* src/stats.c:  The special code path to handle ascii matrix data was
	not correct.  Fortunately the general case code works so long as the
	data is recognized as matrix data.  This removes the broken code path.

2015-01-10  Ethan A Merritt  <merritt@u.washington.edu>

	* src/save.c (save_tics):  The order in which tics options were saved
	could produce illegal syntax in the save file.
	Bug fix

	* term/cairo.trm (cairotrm_put_text):  For some reason the bold/italic
	flags can become stuck after printing text.  This patch fixes it by
	restoring the original terminal font after printing any enhanced text
	string, but I do not understand why this would be necessary for the
	cairo terminals when other terminals do not require it.
	Test case:  set key title "{/:Bold Hello}"; plot sin(x) title "World"
	Bug fix

2015-01-10  Ethan A Merritt  <merritt@u.washington.edu>

	* term/gd.trm:  Ensure that the brush used for drawing dotted lines
	is reinitialized for each new line.
	Bug #1516

2015-01-10  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* docs/gnuplot.doc:  Clarify sampling used by '+' special file.

2015-01-10  Christoph Bersch <usenet@bersch.net>

	* src/multiplot.c demo/heatmaps.dem demo/layout.dem docs/gnuplot.doc:
	Fix inconsistencies in the margin and spacing options for
	"set multiplot layout".  Allow using character or screen units.
	Make the character/screen keyword sticky; i.e. it applies to all four
	values in the command `set multiplot margins screen 0.1,0.9,0.9,0.1`
	Issue appropriate errors or warnings if margins and spacing aren't set
	together.  Update and expand the documentation.

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

	* src/datafile.c (df_determine_matrix_info):  Apply numeric locale
	when reading ascii matrix data.
	Bug #1536

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

	* configure.ac: Qt5 check via pkg-config --variable=host_bins seems
	fragile; revise to work on two different test machines.

	* 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.

2015-01-07  Achim Gratz  <Stromeko@nexgo.de>

	* configure.ac: Qt5 check via pkg-config should use --variable=host_bins
	rather than --variable=exec_prefix

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

	* src/boundary.c src/gadgets.h src/graph3d.c src/save.c src/set.c
	src/show.c src/unset.c:  Track font and enhanced flag for the key title
	separately from those for the key entries.
	Bug #1525

	* docs/gnuplot.doc src/set.c src/show.c:
	In 5.0.0 the set margin command interpreted 4 values in the order
	  set margin <left>, <right>, <top>, <bottom>
	but this order in non-intuitive and conflicts with the order in
	other commands (e.g. set multiplot layout).  CHANGE this to
	  set margin <left>, <right>, <bottom>, <top>
	Note that the code now sanity checks that (top > bottom), so this change
	will not be noticed for margins given in screen coordinates.

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

	* src/graphics.c src/graphics.h src/plot2d.c:  Simplify the boxplot
	data handling. Collapse the separate filter_boxplot_factor() and
	filter_boxplot() into a single routine with a single supporting
	routine compare_ypoints().  Points are now sorted using the "factor"
	as a primary key, rather than using a separate pass to overwrite
	all y values to VERYLARGE if the factor does not match.
	Inspired by a patch from Jouke Witteveen  <j.witteveen@gmail.com>
	Bug #1532

2015-01-04  Jouke Witteveen  <j.witteveen@gmail.com>

	* src/plot2d.c (check_or_add_boxplot_factor) src/gadgets.h:
	When the requested "factor" column of boxplot data is missing or
	empty, the y value was being stored instead.  Now we store
	DEFAULT_BOXPLOT_FACTOR (-1) instead, since this can never be
	mistaken for a label array index.
	EAM: Store this factor index in z rather than ylow.  This prepares
	for a later patch to get rid of repeated swapping of y and ylow
	values rather than simply looking at the stored index directly.
	Bug #1532

2015-01-03  Jouke Witteveen  <j.witteveen@gmail.com>

	* src/plot2d.c (check_or_add_boxplot_factor):  Distinguish between
	boxplot category labels where one is a leading substring of the other.
	Bug #1532

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

	* src/set.c src/boundary.c src/graph3d.c:  Add a sanity check to
	ensure that the top margin is above the bottom margin.  This corrects
	for possible user confusion or error in specifying on one line
	set margins <left>, <right>, <bottom>, <top>   # (wrong order)

2014-12-30  Ethan A Merritt  <merritt@u.washington.edu>

	* src/qtterminal/qt_term.cpp (qt_atexit): Sanity check.

2014-12-28  Bastian Maerkisch  <bmaerkisch@web.de>

	* docs/titlepag.ms:  Update to version 5.

	* docs/gnuplot.doc:  groff tables for stats command. Several groff
	syntax fixes and minor layout tweaks.

	* config/mingw/Makefile:  New targets grops and gropdf.

	* config/config.os2 config/makefile.os2:  Update to version 5.

	* src/term_api.h src/os2/gclient.c:  Eliminate compiler warnings.

	* src/wxterminal/wxt_gui.cpp:
	Use cairo_show_page() rather than cairo_surface_show_page()

2014-12-26  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/qtterminal/qt_term.cpp:  Remove dead code. Avoid implicit
	casts to unsigned int.

2014-12-24  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c (drawgraph) src/win/wgdiplus (drawgraph_gdiplus):
	Failure to re-initialize the font name and size for enhanced text.
	Bug #1529

2014-12-24  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/win/wgdiplus.cpp (SetFont_gdiplus):  Font names may be given in
	current encoding. Patch #712

2014-12-23  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/win/wgnuplot.mnu: Parameter input for atan2() was wrong. SF
	patch #1530 by Shigeharu Takeno.

	* src/win/wgnuplot-ja.mnu: Dito.

2014-12-21  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/wxterminal/wxt_gui.cpp:  Track the most recent directory used
	by the export-to-file widget.

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

	* src/wxterminal/wxt_gui.cpp (wxtPanel::wxt_cairo_create_bitmap):
	Another fix for the wxt terminal linked against wxWidgets 3.0.
	wxWidgets + wxgtk version 2.8 were fine with the sequence
	    delete cairo_bitmap;
	    cairo_bitmap = new wxBitmap(*image);
	but version 3.0 hits a use-after-free that can be attributed to a
	UI-triggered event invoking OnPaint(), which tries to access the old
	bitmap before the new one has been assigned.  Omitting the delete
	"cures" this, but then there is a memory leak.  Empirical tests seem
	to show that it suffices to defer the delete operation until after
	the assignment operation.  A proper interlock might be better yet.

2014-12-18 Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (df_parse_string_field): If an input data file uses
	Mac OS-9 format with \r as a line terminator, the entire file is
	mis-recognized as one very long line.  If there are nevertheless
	recognizable field separators, the code to split out string fields into
	separate saved storage goes crazy, consuming huge amounts of memory.
	Detect and warn if an input string field exceeds MAX_LINE_LEN.
	Bug #1445 (also see Bug #1355)

	* src/command.c (do_line):
	Report error if a "load" file fails to close an open bracketed clause.
	Bug #1522

2014-12-18  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* term/win.trm (WIN_set_font): Revert incorrect change from
	strncpy() to safe_strncpy().

2014-12-16  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* configure.ac: Added copy of former configure.in, updated to
	preferences of autoconf-2.69, automake-1.14.

	* configure.in: Dropped

	* mkinstalldirs, missing, install-sh, depcomp: Update from recent
	autoconf/automake.

	* src/syscfg.h (RETSIGTYPE): Note that former fall-back definition is now
	hardwired.

2014-12-16  Bastian Maerkisch  <bmaerkisch@web.de>

	* win/gnuplot.iss: Change working directory of shortcuts to
	current users's document folder. Works on Vista and upwards.
	Bug #1415

2014-12-15  Bastian Maerkisch  <bmaerkisch@web.de>

	* demo/kdensity.dem:  End demo with pause / reset

	* config/mingw/Makefile:  Convert eol style of text files to CRLF
	during install.
	Bug #1520

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

	* src/mouse.c (do_event) src/gplt_x11.c src/wxterminal/wxt_gui.cpp
	src/qtterminal/QtGnuplotWidget.cpp:
	Distinguish auto-generated replot events (e.g. replot-on-resize) from
	user-generated replot events ('e' hotkey or toolbar replot widget).
	Use GE_replot for the former, GE_keypress('e') for the latter.
	Reject auto-generated replot requests while multiplot is active.
	(wxt was already doing this; now we extend it to qt and x11 also).
	Bug #1521

	* src/wxterminal/wxt_gui.cpp:  Do not change working directory in
	file export widget.

2014-12-14  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/command.c src/command.h src/mouse.c src/mousecmn.h src/plot.c
	src/qtterminal/qt_term.cpp src/win/wgraph.c src/win/wpause.c
	src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_term.h:
	Revise "pause mouse" handling on Windows to handle windows, wxt, qt
	and caca terminals.  Test if the current terminal window is actually
	open before waiting for mouse input. (Not yet implemented for qt.)
	The windows terminal no longer expects the core code to reset the
	paused_for_mouse flag (like the qt, wxt and x11 terminals).  The
	code no longer opens an invisible window to handle "pause mouse" and
	code to close this window when "pause mouse" mode ends can thus be
	removed.  Interrupting pause mouse via Ctrl-C should now be possible.
	Bug #1502

	* term/caca.trm (waitforinput):  Support "pause mouse" if the graph is
	shown in a window. Bugfix.

	* docs/windows/doc2html.c:  Rename variable "basename" to "name" to
	avoid a name conflict on some platforms.

2014-12-13 Ethan A Merritt  <merritt@u.washington.edu>

	* src/wxterminal/wxt_gui.cpp (wxtPanel::wxt_cairo_refresh):
	The wxt terminal has been failing when linked against wxgtk3.0.
	The overt symptom is a library assert statement sometimes followed by a
	segfault:
	  ./src/gtk/dcclient.cpp(2043): assert "m_window" failed in DoGetSize():
	  GetSize() doesn't work without window [in thread 7fb21f386700]
	  Call stack:
	  [00] wxOnAssert()
	  [01] wxClientDCImpl::DoGetSize(int*, int*) const
	  [02] wxBufferedDC::UnMask()
	Both the assert and the segfault are due to the plot window not yet
	having been rendered on the screen. The documented wxwidgets function
	panel->IsShownOnScreen() fails to reliably detect this condition, so we
	must use our own window id bookkeeping to skip any refresh commands
	before the window appears.

	Gnuplot Bug #1401
	Debian Bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750045
	wxWidgets Bug  http://trac.wxwidgets.org/ticket/16034

2014-12-11 Ethan A Merritt  <merritt@u.washington.edu>

	* src/wxterminal/gp_cairo.c (gp_cairo_move):  Do not let zero-length
	move interrupt the current polyline context (dash pattern, end caps,
	polygon closure).
	Bug #1523

	* src/datafile.c (df_generate_pseudodata):  Prevent infinite loop if
	sampling range is zero.

	* src/plot2d.c (eval_plots):  Save/restore original dummy variable name
	for 'x', so that a sampling range using a named variable does not
	clobber it.

2014-12-11  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c (drawgaph) src/win/wgdiplus.c (drawgraph_gdiplus):
	Ignore intermediate move commands in a polyline sequence. Fixes
	custom dashpatterns for splots and improves drawing performance. Note
	that custom dashpatterns are only available for the GDI+ variant.
	Bug #1523

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

	* src/axis.c (parse_range) src/datafile.c (df_generate_pseudodata):
	Allow an optional sampling interval as part of the sampling range spec
	for pseudofile '+' in a plot command:
	    plot sample [a=0:360:10] '+' using (3+sin(a)):(cos(a)) with points

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

	* src/term.c (do_point):  Always use solid lines to draw point symbols.

	* src/win/wgraph.c term/win.trm:  Make sure that the window size
	variables are initialized if wgnuplot.ini does not exist yet.
	Fixes a regression introduced on 2014-10-16.

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

	* src/datafile.c (df_generate_pseudodata): The sampling variable in a
	sampled plot is not necessarily x, so "set log x" should not affect it.
	E.g.    set log x; set angle degrees;
	        plot sample [a=1:360] '+' using (3+sin(a)):(cos(a)) with points
	Bug #1495

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

	* term/PostScript/prologue.ps:  Re-order dash types to more closely
	match the cairo and qt terminals.

2014-12-03 Ethan A Merritt  <merritt@u.washington.edu>

	* src/internal.c: Indentation cleanup for type-check macro BAD_DEFAULT

	* src/gp_types.h: New state flag INVALID_NAME for internal variables.
	src/eval.c (pop_or_convert_from_string eval_link_function):
	Consolidate initial tests for invalid internal variable type.
	Test for the correct use of linked axis mapping function variables
	(f(x) for x axis, f(y) for y axis, etc).
	Bug #1519

2014-12-01 Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c (clone_linked_axes): Sanity check for linked axis via and
	inverse functions used fabs() with wrong grouping of parentheses.
	Bug #1519

2014-11-25 Ethan A Merritt  <merritt@u.washington.edu>

	* src/qtterminal/qt_term.cpp: Increase the number of pre-defined dash
	patterns for the qt terminal to 5, matching the order used by the cairo
	terminals.

2014-11-23 Ethan A Merritt  <merritt@u.washington.edu>

	* src/axis.c src/set.c: The full names of the parallel axes are too long
	to fit in character arrays built to hold the simpler name "x2/cb/etc".
	But the 'set' commands using these arrays do not apply to parallel axes,
	so we avoid problems by never loading these arrays for parallel axes.

2014-11-21 Ethan A Merritt  <merritt@u.washington.edu>

	* term/gd.trm:  Replace the dotted-line code in PNG_vector with an
	adaptation of the dash pattern code used by canvas.trm.

	* src/term.c (term_apply_lp_properties):  Special linetype LT_AXIS is
	intended to produce a dotted line if possible, even on terminals that
	do not support the general dash pattern mechanism introduced in v5.
	This means that when rendering lines with linetype LT_AXIS the
	dashtype code should not be called at all. This bug affected at least
	the gd and qt terminals.
	Bug #1516

	* src/axis.c (axis_name) src/save.c: paxis tics and range settings
	were not being saved.

	* src/show.c: formatting typos (missing \t at beginning of line)

	* src/graphics.c (map_position_r): If only the x coorinate delta is
	requested, don't bother to calculate delta y, particularly because
	delta y=0 will fail if y is log scale.
	Bug #1512

2014-11-21  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/config/mingw/Makefile:  Build gnuplot-tikz.help.

	* src/config/config.mgw:  Sync with config.h created by autoconf tools.

2014-11-18 Ethan A Merritt  <merritt@u.washington.edu>

	* src/wxterminal/wxt_gui.*: The toolbar widgets for replot/zoom/grid
	require intervention by the core code in order to act.  This is not
	possible when in -persist mode after the parent process has exited,
	so disable the toolbar widgets.

2014-11-16  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* term/Makefile.am.in (Makefile.am): Drop creation of conditional
	definition of build_lua.
	(all, $(srcdir)/lua/gnuplot-tikz.help): Drop rules for lua help
	file fragment generation.

	* docs/Makefile.am (LUA_HELP) [BUILD_LUA]: Define to name of lua
	help file fragment.
	($(LUA_HELP)) [BUILD_LUA]: Build lua help file fragment.
	(allterm.h): Depend on $(LUA_HELP).

	* term/lua.trm: Make inclusion of help file fragment depend on
	HAVE_LUA.  Needed for doc builds that unconditionally include all
	terminals' help. Remove "lua/" from include file name.

2014-11-15  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* term/Makefile.am.in ($(srcdir)/lua/gnuplot-tikz.help): Test for
	file existence is -f, not -x.

2014-11-15 Ethan A Merritt  <merritt@u.washington.edu>

	* term/Makefile.am.in: rebuild term/lua/gnuplot-tikz.help
	only if --with-lua, otherwise skip this in building the docs

2014-11-12 Ethan A Merritt  <merritt@u.washington.edu>

	* term/lua/gnuplot-tiz.help (remove from repository)
	* term/Makefile.am.in: rebuild term/lua/gnuplot-tikz.help

2014-11-07 Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* term/luz/gnuplot-tikz.lua:  Use \errmessage rather than \PackageError
	because not all TeX variants provide the latter.

2014-11-06 Ethan A Merritt  <merritt@u.washington.edu>

	* src/time.c (gstrftime xstrftime) docs/gnuplotdoc demo/timedat.dem:
	Introduce a new time format modifier 't', used to distinguish dates
	from times.  This allows formatting time data as hours/minutes/seconds
	relative to time=0 rather than as a calendar date.  Compare these
	representations of the stored value -3672.50 seconds:
	    default date format    # "12/31/69 \n 22:58"
	    format "%tH:%tM:%tS"   # "-01:01:12"
	    format "%.2tH hours"   # "-1.02 hours"
	    format "%tM:%.2tS"     # "-61:12.50"

2014-11-04  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/wxterminal/wxt_gui.cpp: Restore Copy-to-Clipboard option in wxt
	toolbar.

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

	* src/datafile.c (f_dollar f_column):  When a data field containing NaN
	is encountered, df_readline returns DF_UNDEFINED to the caller.
	This is sufficient to handle plotting that point per se, but if the
	value is also used in evaluation of an arithmetic expression with a side
	effect then this undefined status flag is not available. For consistency
	we now pass NaN to the expression evaluation code as well.  E.g.
		plot FOO using 1:(side_effect=f($2))
	could leave some random (probably left-over) value in side_effect.
	Now if $2 is NaN and for example f(x) = (x+foo) then side_effect becomes
	NaN also.  Before this side_effect would have received some other,
	incorrect, numerical value.

	* src/save.c (save_dashtype):  dashtype -1 is an internal flag; do not
	save it to an external file.

2014-11-02  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* config/config.oww: If we're going to use strnlen_s for strnlen,
	must define according C99 library extension macro.

	* src/set.c (set_dashtype): Command input following the 'default'
	option would cause a crash by double-deleting from linked list.
	(parse_histogramstyle): Option "title" is not protected against
	multiple use.  This might cause double-free of font field.

	* src/bf_test.c (main): Move file-open error handling further up,
	to avoid (harmless) memory leak.  Use standard failure return
	instead of magic constant.  Allocations were relying on
	sizeof(float)==sizeof(float *).

	* src/getcolor.c (GROW_GRADIENT): Query realloc()ed pointer for its
	own type's size; safer than making assumptions about it.
	(approximate_palette): Dito; and in this case the type was
	actually wrong.

2014-11-01 Ethan A Merritt  <merritt@u.washington.edu>

	* term/cairo.trm (cairotrm_put_text) src/wxterminal/wxt_gui.cpp
	(wxt_put_text):  Start each top level enhanced text recursion  using
	the full font name given in "set term font 'foo'", rather than the
	most recent font stored in the plot (which is only the font family
	name, not bold/italic/other).  This maintains bold or italic in the
	original font name, but I am not entirely convinced that it cannot
	overwrite an intentional change in font family.
	Bug #1505

2014-10-31 Ethan A Merritt  <merritt@u.washington.edu>

	* src/plot2d.c:  Issue a warning if someone tries to specify a
	sampling range for a data plot.
	Bug #1510

2014-10-31  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/wxterminal/wxt_gui.cpp (wxtFrame::OnSize):  Only replot on
	resize if the wxt settings were properly initialized by wxt_init().
	On Windows, this would otherwise cause many graph windows to be
	opened when the first plot command is issued and gnuplot finally
	hangs or crashes.
	Bugfix.

2014-10-30  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/wxterminal/wxt_gui.{cpp|h}: Replace the clipboard widget on the
	wxt terminal toolbar with a widget to save current plot to a file.
	EAM: Output to PNG via standard wxWidgets component
	     Output to SVG or PDF by replaying cairo history for current plot.

2014-10-29  Christoph Bersch <usenet@bersch.net>

	* term/lua/gnuplot-tikz.lua term/luz.trm:  Boxed text support.

2014-10-29  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot.doc docs/term-ja.diff docs/gnuplot-ja.doc:
	Fix typos. Sync Japanese documentation to 1.921

2014-10-26 Ethan A Merritt  <merritt@u.washington.edu>

	* term/wxt.trm src/wxterminal/wxt_term.h src/wxterminal/wxt_gui.*:
	Add a checkbox to the tool widget controlling whether or not the
	plot is redrawn via "replot" as the terminal window is resized.

2014-10-19  Christoph Bersch <usenet@bersch.net>

	* term/lua/gnuplot-tikz.lua:  Missing initializations.
	Bug #1503

2014-10-16  Christoph Bersch <usenet@bersch.net>

	* src/stats.c:  The stats code was confusing the x and y dimensions of
	matrix data.  E.g. it would report a 5X7 matrix as being 7X5, and
	mis-calculate the indices of the min/max values.
	Bug #1501

	* term/lua/gnuplot-tikz.lua:  Fix incorrect font test.
	Bug (Feature Request) #409

2014-10-16  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgnuplib.h src/win/wgraph.c term/win.trm:  The `size` option
	now refers to the canvas size instead of the window size in order to be
	consistent with the qt and wxt terminals.  The window size can still be
	set with the new `wsize` option. Settings are now included in output of
	`show term`.
	Bug #1400

2014-10-11  Christoph Bersch <usenet@bersch.net>

	* term/lua/gnuplot-tikz.lua:  LT_AXIS and LT_SOLID imply specific
	dash types.
	Bug #1491

2014-10-11  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/axis.c (copy_or_invent_formatstring): Lower end of axis may
	need more precision in invented format than the distance between
	max and min. Bug #1496

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

	* src/save.c (save_all): Write out the filename last used for plotting.
	This makes a saved plot command referencing '' slightly more useful.

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

	* src/misc.c (lf_push lf_pop):  If lf_push/lf_pop are invoked from
	do_string_and_free to handle bracketed if{} or do{} expressions, they
	should not touch the call arguments ARG1, ARG2, ...  Save/restore of the
	call arguments is only needed if lf_push/lf_pop are invoked by "call".
	Bug #1494

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

	* src/axis.h src/set.c (set_format):

	Timefmt revision part 6
	- Add tictype keywords to "set format {axis} {time|geographic|numeric}"
	- Reset to numeric on "unset format"

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

	* src/axis.c src/axis.h src/datafile.c src/fit.c src/mouse.c src/parse.c
	src/save.c src/set.c src/setshow.h src/show.c src/unset.c
	docs/gnuplot.doc demo/gantt.dem:

	Timefmt revision part 1 of 4
	- Remove axis->timefmt and replace it with a single global timefmt.
	  This is what the documentation has always said, but it breaks the
	  undocumented command:   set timefmt y "fmt-different-from-xaxis-fmt"
	- Add a new flag axis->tictype to control interpretation of tic format.
	  axis->datatype will continue to control input format interpretation.
	- If only a single parameter is passed to timecolumn() try to emulate
	  the version 4 behavior (use global timefmt)

	* src/save.c src/save.h src/setshow.h src/show.c:

	Timefmt revision part 2 of 4
	- Replace macro SAVE_NUM_OR_TIME with routine save_num_or_time_input().
	  This routine uses _input_ data format, mostly for reporting axis range.

	* src/save.c src/save.h src/show.c:

	Timefmt revision part 3 of 4
	- Show and save xyz positions using time-format coordinates when needed.
	  Note that like axis ranges, these are meant to be read in again later
	  so they are written using the input format not the output format.

	* src/axis.c (get_tics copy_or_invent_formatstring) src/set.c
	src/unset.c src/show.c src/save.c docs/gnuplot.doc demo/world.dem:

	Timefmt revision part 4 of 4
	- New command set {xyz}tics {time|geographic|numeric} sets axis->tictype
	- Output formats chosen based on axis->tictype rather than axis->datatype
	- Report axis->tictype setting with axis->format in "show" and "save"

2014-10-03  Christoph Bersch <usenet@bersch.net>

	* term/lua/gnuplot-tikz.lua:  linetype -1 must reset dashtype to solid.
	Bug #1491

2014-10-01 Ethan A Merritt  <merritt@u.washington.edu>

	* src/misc.c (arrow_parse): Remove order dependence of "fixed" keyword.

	* src/hidden3d.c (draw_edge): When an arrow is split into segments by
	hidden surface processing, only keep the arrowhead on the original tip.

	* src/plot2d.c (get_data): Timedata for HISTOGRAMS requires a special
	case.

	* src/boundary.c src/color.c src/gadgets.c src/gadgets.h src/graph3d.c
	src/graphics.c src/hidden3d.c src/misc.c src/mouse.c src/multiplot.c
	src/term.c:  Remove wasted parameter passed to apply_pm3dcolor(),
	reset_textcolor(), and get_offsets().

	* docs/gnuplot.doc:  Replace outdated section on `set xdata time`.

2014-09-26 Ethan A Merritt  <merritt@u.washington.edu>

	* term/js/gnuplot_mouse.js:  Typo in logical test for hypertext.

	* src/axis.h src/save.c src/set.c src/show.c src/unset.c src/graphics.c
	src/graph3d.c:   set [*]tics {{no}enhanced}

2014-09-24  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c term/win.trm:  The windows terminal allowed users
	to change linetypes via an ini file or with the help of a dialog.  This
	has been superseeded by the more general `set linetype` mechanism.
	The old code is still available but only active with WIN_CUSTOM_PENS
	defined during compilation.

	* src/win/wgraph.c src/win/wgidplus.c:  Accept zero point size.
	Eliminates drawing of unwanted point symbols for labelled contours.
	Bugfix

2014-09-24 Ethan A Merritt  <merritt@u.washington.edu>

	* term/aed.trm term/v384.trm
	config/makefile.dj2 config/makefile.emx config/makefile.vms
	configure.vms docs/doc2texi.el docs/Makefile.am src/makefile.all
	src/makefile.awc src/term.h:

	Remove obsolete terminals:
	aed:  pre-1980 display device ($15,000) with 500x500 pixels, 256 colors
	v384: Vectrix VX 384 mid 1980s graphics display terminal ($5000) with
	      672x480 pixels, 512 colors

	* src/interpol.c:  Force the number of intervals used for interpolating
	monotonic cubic splines ("smooth mcsplines") to be at least twice the
	number of data points.

2014-09-22  Christoph Bersch <usenet@bersch.net>

	* src/misc.c (parse_fillstyle): Remove order dependence of keyword
	"transparent".

	* term/lua.trm term/lua/gnuplot-tikz.lua:
	Support RGBA linecolors and LT_NODRAW.  Add a linewidth terminal option.

2014-09-20  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/fit.c src/fit.h src/save.c src/set.c src/show.c src/unset.c
	docs/gnuplot.doc demo/fit.dem:  Remove xerrors option (which requires 3
	columns) since it is not like the xerrorbars plot style (which requires 4).
	Rename `noerrors` option to `unitweights`.  Let the fit command default
	to `unitweights`, i.e. do not interpret the last column of the using
	spec as z-errors.  Add a command `set fit v4|v5` to switch between
	old-style command line syntax and the new one. Default to `v5`, but
	`reset` does not change the current setting.

	Note that this change is backward-incompatible with v5-rc1 and v5-rc2.
	However it restores compatibility with v4, subject to the restriction
	that all independent variables must appear in the "fit" command itself
	(see below).

	* src/fit.c: Ethan A Merritt - use the tally of dummy variable names
	to detect version 4 syntax in which the last column of a using spec
	contains zerror but no "*error" keyword is provided.

2014-09-18 Ethan A Merritt  <merritt@u.washington.edu>

	* src/fit.c src/parse.c src/parse.h (int fit_dummy_var[]):
	Track the occurrence of dummy variable names in a fit command. This lets
	us count the independent variables so long as they are not obscured.
	   fit f(x,y) 'data' using 1:2:3:4      # flags use of 'x' and 'y'
	   fit x*y    'data' using 1:2:3:4      # flags use of 'x' and 'y'
	   g(x) = x*y;
	   fit g(x)   'data' using 1:2:3:4      # flags 'x', doesn't notice 'y'
	In each case fit_dummy_var[0] is 1.  In the 3rd case fit_dummy_var[1]
	is 0 but should be 1.  Fixing this would be quite hard.

2014-09-18  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgnuplib.h src/wgraph.c term/win.trm:  windows terminal
	supports the toggle command.

2014-09-18 Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c:  Revised error message for datafile open failure.

2014-09-14 Ethan A Merritt  <merritt@u.washington.edu>

	* src/tables.c src/command.c src/command.h docs/gnuplot.doc:
	New command `toggle {<plotno> | "plottitle" | all} has the same effect
	as left-clicking on the key entry for a plot shown by an interactive
	terminal (qt, wxt, x11).

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

	* src/mouse.c (xDateTimeFormat):  Use ggmtime() instead of gmtime() to
	avoid platform specific restrictions.
	Bug #1470

2014-09-09  Pieter-Tjerk de Boer <p.t.deboer@utwente.nl>

	* docs/gnuplot.doc:  Update help on fit to new command syntax.

	* src/fit.c:  Fix init of num_errors.

2014-09-09  Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* src/win/wpause.c (PauseBox):  Do not wait for further events after
	pause dialog box was closed. Bugfix.

2014-09-08  Christoph Bersch <usenet@bersch.net>

	* demo/stringvar.dem docs/gnuplot.doc src/internal.c (f_word f_words):
	Modify the word() and words() functions to recognize quoted strings
	inside the top level string as single entities.

2014-09-08  Christoph Junghans <ottxor@users.sourceforge.net>

	* configure.in:  New option --without-libcerf

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

	* src/misc.c (lp_parse parse_colorspec):  Allow a quoted colorname to
	immediately follow the keywords lc|linecolor|fc|fillcolor; i.e. in this
	case the additional rgbcolor keyword is optional.

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

	* src/plot2d.c:  "set linetype 1 pt 'A'; plot x with lp" requires that
	the plot->labels field be initialized before plotting.

	* src/save.c:  handle PT_CHARACTER when saving linetype

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

	* src/term_src/api.h src/gadgets.c src/hidden3d.c src/misc.c
	src/plot2d.c src/plot3d.c src/save.c src/set.c src/ show.c src/term.c:

	The field lp_style_type.pointflag was variously used as a Boolean,
	an integer, or a magic number indicating an uninitialized state.
	Clean this up by replacing it with a bitfield lp_style_type.flags
	with defined bits LP_SHOW_POINTS LP_NOT_INITIALIZED LP_EXPLICIT_COLOR.
	This has the side effect of allowing a trivial fix for a regression
	in 4.6.5 that caused "set hidden3d; splot ... lc <foo>" to ignore the
	requested color.  See Bugs #1284 #1475

2014-09-05  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* docs/plotstyles.gnu:  Dummy up a version of the missing/NaN figure
	for use with Windows documentation.

2014-09-04 Ethan A Merritt  <merritt@u.washington.edu>

	* src/mouse.c src/term_api.h src/gplt_x11.c
	src/qtterminal/QtGnuplotScene.cpp src/qtterminal/qt_term.*
	src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_term.h
	term/caca.trm term/README term/win.trm term/x11.trm:

	Add a 2nd parameter to the API term->modify_plots(operations, plotno).
	All terminals for which this entry point is not NULL are updated
	accordingly.  This patchset does not by itself add any new
	functionality or change user-visible behavior.  It prepares for later
	adding command-line equivalents to mouse operations like "toggle".

2014-09-04 Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (place_arrows) src/graph3d.c (place_arrows3d):
	Revert arrowhead patch of 2014-08-18.  Document that if you want a
	dashed arrow shaft it is best to use "nofilled" for the arrow head.
	Bugs #1460 #1476

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

	* src/graph3d.c src/hidden3d.c:  "splot ... with dots" was not drawing
	the dots.
	Bug #1474

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

	* src/stats.c docs/gnuplot.doc:  Calculate and report sample standard
	deviation (STATS_ssd) as well as the population standard deviation
	(STATS_stddev).  Provide formulae for the reported quantities in the
	LaTeX documentation, and document the difference between
	_ssd and _stddev in all documentation formats.

	* src/stats.c:  In version 5 when there is no using spec df_readline()
	always returns at most the number of columns present on the first line.
	Bug #1472

2014-08-30  Petr Mikulik  <mikulik@physics.muni.cz>

	* config/config.os2: Use _strtoll.

2014-08-29  Petr Mikulik  <mikulik@physics.muni.cz>

	* src/gplt_x11.c (exec_cmd process_configure_notify_event):
	Add missing #ifdefs: USE_X11_MULTIBYTE and PIPE_IPC.

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

	* src/fit.c:  Handle columnheaders in input to "fit".
	Bug #1467

	* src/misc.c (lp_parse):  Flag "set object N lt <lt>" as an error,
	since currently this must be done be "set object N fs bo <lt>".
	Probably we should figure out how to make this command work, but
	better to issue an error than accept it and then ignore it.
	Bug #1460

	* src/bf_test.c:  Use HAVE_STDLIB_H and HAVE_MALLOC_H to include proper
	header file for calloc().  "Jun T." <takimoto-j@kba.biglobe.ne.jp>.

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

	* Branchpoint for 5.0 (cvs tag -b branch-5-0-stable)

	The main (development) branch is now marked 5.1 and will eventually
	be used as the basis for a future release named gnuplot version 5.2.

				>>> NOTE <<<

	Starting now
	============

	* Bugfixes for version 5 should be applied to both the main branch
	(5.1 == this one) and the stable branch (branch-5-0-stable).
	They will first appear in patchlevel releases 5.0.1, 5.0.2, and so on.

	* Major new features and experimental changes belong here, not in the
	stable branch.  They will appear eventually in release 5.2.

	* Minor new features can go in both branches at your discretion, but
	remember that the stable branch should ideally never break.
	That means new code should be tested here in the development
	branch first, and only after testing be added or back-ported to the
	stable branch.

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

	* src/wxterminal/gp_cairo.c:  Distinct empirical scale factors for
	dashlength used by pngcairo, pdfcairo, and wxt.
	* term/emf.trm:  Scale dashlength with current linewidth.

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

	* src/graphics.c (place_arrows) src/graph3d.c (place_arrows3d):
	Only invoke the arrowheads only code if there really is an arrowhead.

2014-08-18  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* config/mingw/Makefile (VPATH): Drop $W from VPATH.  Necessary to
	avoid circular dependency on wgnuplot.mnu
	(%.$(O)): Use pattern rule instead of VPATH to build Windows
	source files.
	(VERSIONING): Avoid inverted logic in makefile conditional.
	(console, windows, pipes): Simplify by letting the default rule in
	the sub-make handle things.
	(default, all): Versioning is really needed by $(TARGET) rule,
	so let that handle constructing it.
	($(TARGET)): Do VERSIONING first, drop dependencies on icon files.
	(%.o): Use pattern rules to build Qt source files.  Much simpler
	than spelling it out long hand for every single source file.

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

	* src/bf_test.c src/Makefile.am src/binary.* (removed)
	config/makefile.os2 config/makefile.dj2 config/makefile.cyg
	config/cygwin/Makefile config/mingw/Makefile config/msvc/Makefile:
	Remove bf_test dependence on all other gnuplot files and libraries.
	This makes binary.c and binary.h superfluous.
	Bugs #1412 #1451

	* src/makefile.all src/makefile.awc: Remove mention of binary.o

	* config/*/Makefile: Remove alloc and binary from bf_test dependencies

	* src/graphics.c (place_objects) src/set.c (set_obj):
	Apply default rectangle style at the time of a "set object rect"
	command rather than waiting until the rectangle is drawn.  This prevents
	the default style line/dash settings from overriding explicit rectangle
	commands.
	Bug #1460

	* src/save.c (save_linetype):  Bugfix - dashtype was being saved only if
	there was also a point type.

	* src/gadgets.c (apply_pm3dcolor):  Don't clobber current dashtype by
	calling term->linetype(LT_BLACK).  Call term->set_color(BLACK_COLORSPEC)
	instead.

	* src/graphics.c (place_arrows) src/graph3d.c (place_arrows3d):
	Force solid lines for arrow heads.

2014-08-15  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/gplt_x11.c:  For single byte fonts gnuplot_x11 uses a list of
	previously used fonts to speed up the search for a new target font.
	Now we add an equivalent for multi-byte font search.

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

	* src/graphics.c (do_rectangle) src/graph3d.c (map3d_position_r)
	demo/rectangle.dem:  Fix y extent and clipping of rectangles with
	negative y coord or inverted axes.
	Bug #1462

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

	* src/mouse.c (event_buttonpress):  Remove extraneous event_reset.

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

	* src/misc.c (parse_colorspec):  Apply user-defined line colors
	to text color also.
	Bug #1452

	src/misc.c src/save.c src/set.c src/term.c src/term_api.h:
	Store custom dashtype string as a constant length character array
	rather than a dynamically allocated string.  This fixes memory
	leakage that happened whenever a linetype using dashes was discarded.

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

	* src/mouse.c (event_buttonpress):  Trap mouse button click on
	press rather than on release so that "pause mouse {button1|any}"
	takes precedence over a key binding to the mouse button.
	Bugfix

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

	* term/x11.trm:  Remove misleading mention of -noevents.  This is a
	command line option for gnuplot_x11, not for gnuplot itself.

	* src/datafile.c docs/gnuplot.doc demo/heatmaps.dem:
	New text input matrix keywords `columnheaders` and `rowheaders`.
	These handle reading matrix data from a csv file in which the first
	row and/or column contains labels rather than data.

	* src/eval.c (update_plot_bounds):  Provide a user-visible copy of
	the current terminal scale (oversampling, etc) as GPVAL_TERM_SCALE.
	Bug #1291

2014-07-28 Allin Cottrell  <cottrell@wfu.edu>

	* src/syscfg.h:  Report 32/64 bit Windows build in version string

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

	* src/wxterminal/gp_cairo.c:  Do not pass a linewidth of zero to the
	cairo library.  The linewidth of LT_AXIS is now set in the core code,
	do not further reduce it in gp_cairo_stroke().

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

	* src/gplt_x11.c: Scale x11 dashlength with linewidth.

2014-07-23  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* src/mouse.c src/mouse.h src/set.c src/show.c docs/gnuplot.doc:
	New command 'set mouse zoomfactors <xfactor>,<yfactor>'

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

	* src/gp_types.h src/plot2d.c (store2d_point):
	INRANGE/OUTRANGE refer to points that are inside/outside the plot
	boundaries as defined by xrange, yrange, etc.  They fail to handle
	points that are outside theta range limits given for polar data.
	That is, a point may be outside of trange [pi/2:pi] even though it
	would lie well inside the plot boundaries if drawn.
	Add a new category EXCLUDEDRANGE for such points.

	* src/graphics.c (plot_impulses):  Test for EXCLUDEDRANGE data points
	so that set trange [theta_min:theta_max] actually does something.
	Bug #1439

	* demo/poldat.dem:  Make sure trange includes the whole plot.

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

	* demo/Makefile.am.in: Do not create a symlink to GNUPLOT_X11 in the
	build directory during "make check". This was probably intended to
	handle the rare case of ./configure --program-suffix=foo but it breaks
	the more common case of configuring on a system without x11 support
	and then running "make check" twice.
	Bugfix

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

	* src/gadgets.c src/save.c src/set.c src/gadgets.h:
	Continue to recognize "set style increment user" even though it has
	been deprecated in favor of "set linetype".
	Bug #1411 (not really a bug)

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

	* src/parse.c (check_for_iteration):  Fix failure to detect some loop
	[start:end:increment] combinations that should be executed only once
	or not executed at all.
	Bug #1441

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

	* src/set.c (set_dummy):  More sanity checks on "set dummy" syntax.
	Bug #1442

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

	* src/set.c (load_tic_user):  "set Xtics ()" should clear the list
	of user-specified tics rather than setting tic generation to auto.

2014-07-04  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot.doc docs/term-ja.diff docs/gnuplot-ja.doc
	man/gnuplot.1 man/gnuplot-ja.1:
	Fix typos. Sync Japanese documentation to 1.896

2014-07-04  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c:  'q' closes graph window.

	* src/qtterminal/qt_term.cpp (qt_options) term/wxt.trm (wxt_options):
	On Windows, the wxt and qt terminals can be used in the same session.

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

	* term/cairo.trm, term/wxt.trm:
	Always report {no}enhanced property in "show term".

	* src/color.c: If the current terminal has property "monochrome" then
	convert all requests for constant color as "black".
	Bug #1423

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

	* src/set.c src/show.c src/tables.c docs/gnuplot.doc:
	New command:  set margins <left>, <right>, <top>, <bottom>
	acts just like four successive commands set lmargin <left>, ...

	* src/unset.c:  unset margins

2014-06-20  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.in src/wxterminal/wxt_gui.h:  The configuration test for
	wxWidgets >= 2.8 had no effect on code generation. Remove this test.

	* configure.in src/wxterminal/wxt_gui.h:  Revert the attemp to guess
	whether -lX11 is required by wxt. As feared, this causes problems on OSX
	and other platforms where wx is built on top of something other than X11.

2014-06-16  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* fit.c:  FIT_NITER holds number of iterations used by previous fit.

2014-06-16  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.in src/wxterminal/wxt_gui.h:  wxWidgets versions > 2.8 want
	the main program to call XInitThreads(), but fail to specify -lX11 in
	wxt-config.   So we force this ourselves.   [=> reverted 2014-06-20]
	Bug #1401

	* src/graphics.c (xtick2d_callback): Clip r axis tics and tic labels to
	the bounding box of the plot.
	Bug #1290

2014-06-15  Dmitri A. Sergatskov  <dasergatskov@gmail.com>

	* configure.in: Add LRELEASE for Qt5 autoconfiguration

2014-06-15  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/plot.c (main):  Fix persist mode on Windows when reading
	from a pipe.
	See Bug #1322

2014-06-15  Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* src/binary.c src/datafile.h src/syscfg.h:  LFS support on Windows
	for MSVC and MinGW.
	See also Patch #675

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

	* src/axis.h src/axis.c src/boundary.c src/plot2d.c (eval_plots):
	Unlike all other axes, log scaling was being applied to the color axis
	(cb) in do_plot() rather than in the caller eval_plots().
	This caused "refresh" (as opposed to "replot") to fail.  Move the
	log-scale correction up to eval_plots() like the other axes.
	Bug #1425

	* src/misc.c (prepare_call):  Allow parenthesized expressions as
	call parameters.  The value is passed as a string.

	* src/command.c (exit_command):  New option "exit error 'message'"
	prints the message and return to the top command line, breaking out
	of any loops or calls cleanly.  In non-interactive mode the program
	then exits.

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

	* src/qtterminal/qt_term.cpp (qt_waitforinput):  Fix index error
	when trying to stop thread which reads from pipe.
	Bug #1426

2014-06-13  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (df_generate_pseudodata):  Do not try to access plot
	structure if we were called from fit rather than plot.
	Bug #1427

2014-06-12  Christoph Bersch <usenet@bersch.net>

	* term/lua.trm term/lua/gnuplot-tikz.lua:
	Scale dashlength with linewidth.

2014-06-11  Ethan A Merritt  <merritt@u.washington.edu>

	* src/mouse.c (event_reset) src/qtterminal/QtGnuplotWindow.{h|cpp}:
	Window close events from qt were not being passed through to the main
	program, so "pause mouse close" did not work. Also a backgrounded
	instance could hang rather than exit when the last plot window closed.
	Bug #1418

	* src/fit.c: Remove spurious test and error message for time data
	with only 2 columns in the using spec.
	Bug #1424

	* man/gnuplot.1: update

2014-06-11  Mojca Miklavec  <mojca.miklavec.lists@gmail.com>

	* term/aquaterm.trm:  Correctly support encoding CP1252.

2014-06-11  Tatsuro MATSUOKA <tmacchant3@yahoo.co.jp>

	* win/gnuplot.iss:  Include Qt platform DLLs in distribution package.

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

	* docs/gnuplot.doc:  Add a section explaining the "persist" option.
	Bug #1418, #1419

	* term/post.trm term/svg.trm src/qtterminal/qt_term.cpp:
	Add an empirical scale factor to the dashlength*linewidth computation to
	make the resulting patterns closer in total size to the built-in ones.

2014-06-10  Christoph Bersch <usenet@bersch.net>

	* term/post.trm term/svg.trm:  Scale dashlength with linewidth.

2014-06-09  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/qtterminal/QtGnuplotWidget.cpp (processEvent):  Always "resize"
	the initial plot to its own size.  This may work around strangeness on
	some systems that create the initial qt plot window with the wrong size.
	Bug #1417 (forwarded from Debian) Patch #661

2014-06-09  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgdiplus.cpp src/win/wgraph.c src/win/wgnuplib.h
	term/win.trm:
	Version 5 dashtypes. Custom dashtypes supported by GDI+ driver.

	* src/wxterminal/wxt_gui.cpp:  Also "restore" the window state on
	"raise".
	Bug #1389

	* src/win/winmain.c (WinMain):  Change type from PASCAL to CALLBACK.

	* src/fit.c:  Test if covariance matrix is available before saving
	it to user variables.

2014-06-08  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot.doc win/README-Windows.txt win/README-ja.txt
	docs/gnuplot-ja.doc:  sync to docs version 1.891

2014-06-07  Mojca Miklavec  <mojca.miklavec.lists@gmail.com>

	* src/wxterminal/gp_cairo.c:  Scale dashlength with linewidth, similar
	to what qt does.

2014-06-04  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/plot.c src/win/winmain.c|h term/caca.trm:  Only if a wxt, caca
	or windows terminal window is open, the -persist option is handled by
	keeping the main input loop running. This is unfortunate but maybe the
	best we can do since we are missing a process fork or detach mechanism.
	This avoids a zombie process when no plot windows are open in a
	session. For the qt terminal -persist works as on other platforms
	since it uses a secondary process.
	Bugs #1308, #1335, #1343

2014-06-03  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graph3d.c src/show.c src/save.c docs/gnuplot.doc:
	The hidden3d code processes the lines making up the plot border using
	the same algorithm as it does for the plot elements.  This renders
	partially occluded borders correctly for actual surfaces but fails to
	recognize occlusion for, e.g., 3D histograms drawn with impulses.
	New keyword option "set border behind" draws the border lines before
	the plot elements even for hidden3d plots.

	* src/term_api.h src/wxterminal/gp_cairo.c src/wxterminal/wxt_gui.cpp:
	Change the implementation of greying out inactive keybox entries in wxt
	to use a textbox rather than the active area of the key entry.
	Bug #1416

	* src/hidden3d.c (draw_vertex):  Handle p_type == PT_CHARACTER.

2014-06-02  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/win/wgraph.c src/win/wgdiplus.cpp:
	Grey out key entries when corresponding plot is toggled off.

	* src/win/wgraph.c (GraphUpdateWindowPosSize) src/win/wgnuplib.h
	term/win.trm (WIN_options):  Immediately apply changes to window
	position and size.
	Bug #1400

	* src/datafile.h:  Revert the Windows LFS changes for now as
	they seem to cause problems on some systems.

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

	* src/axis.c src/gadgets.c src/misc.c src/set.c src/unset.c:
	Replace magic numbers with LAYER_{BEHIND|BACK|FRONT}.

	* src/graph3d.c: Remove obsolete (always true) conditional
	USE_GRID_LAYERS.  Minor clean up for the grid layer logic.

2014-06-01  Tatsuro MATSUOKA <tmacchant3@yahoo.co.jp>

	* win/gnuplot.iss:  Include gnuplot_qt.exe in installer.
	Patch #689

	* src/qtterminal/gnuplot_qt.cpp:  Search for Qt translation files
	in gnuplot's installation directory on Windows.
	Patch #687

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

	* src/datafile.h:  Partial support for LFS on Windows. Currently
	mostly useful for 64 bit builds since integers on the the gnuplot
	command line are limited to 31bits otherwise.
	Patch #675

2014-06-01  Bastian Maerkisch  <bmaerkisch@web.de>

	* config/mingw/Makefile:  Target 'clean' and 'veryclean' include
	Qt files, see patch #688.

	* config/mingw/Makefile win/gnuplot.iss:  Include RELEASE_NOTES.
	Add "qt" as option as default terminal.

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

	* term/post.trm term/cairo.trm:  The "header" keyword for epslatex
	and related terminals can introduce a string of arbitrary length.
	Therefore it is not safe to try to store it in the fixed length
	term_options character array.
	Bug #1413

	* term/gd.trm:  Limit the stored length of the font so that term_options
	cannot overflow.
	Bug #1413

	* Makefile.am RELEASE_NOTES:  Include Release Notes in the distribution
	package.

	* FAQ.PDF:  Update for version 5.

	* src/gplt_x11.c:
	Grey out key entries when corresponding plot is toggled off.

2014-05-29  Akira Kakuto <kakuto@fuk.kindai.ac.jp>

	* term/caca.trm:  Modify nominal codepage to accommodate CJK Windows.

2014-05-29  Tatsuro MATSUOKA <tmacchant3@yahoo.co.jp>

	* config/mingw/Makefile:  Support compilation of the qt terminal.
	Patch #684

2014-05-29  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* docs/gnuplot.doc:  Improve documentation of `update` command.
	Patch #686

	* src/win/wgdiplus.c src/win/wgraph.c:  Change order of pointtypes to
	match the sequence in other terminals (cairo, postscript, gd, svg).
	Patch #681

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

	* src/graph3d.c (plot3d_points):  Handle pointtype PT_CHARACTER.

	* src/plot3d.c:  Rearrange the order of testing for plot style options
	so that it is not possible to end up with uninitialized font or text
	properties.

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

	* src/datafile.c (df_readascii): Report status DF_UNDEFINED if a data
	value evaluates to the constant "NaN", just as if we calculated it on
	the fly to be e.g. 1/0.
	* src/stats.c: Remove out-of-date comment that incorrectly describes
	what happens in this case.
	Bug #1408

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

	* term/js/gnuplot_svg.js term/svg.trm:
	Grey out key entries when corresponding plot is toggled off.

	* src/qtterminal/QtGnuplotItems.* src/qtterminal/QtGnuplotScene.cpp:
	Grey out key entries when corresponding plot is toggled off.

	* src/wxterminal/wxt_gui.cpp (wxt_grey_out_key_box):
	Grey out key entries when corresponding plot is toggled off.

2014-05-24  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/wxterminal/wxt_gui.cpp (wxt_waitforinput):  Do not wait for an
	event when only checking for mouse events.
	Bugfix

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

	* src/boundary.c:  A width adjustment for the length of the key title
	was being applied to every column of entries in the key instead of just
	once for the whole key.  Apply the "set key {no}enhanced" property to
	the key title as well as to the individual plot titles.
	Bugfix.

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

	* src/wxterminal/wxt_gui.h: Apparently wxWidgets3 (wxgtk3) threads call
	into Xlib but fail to initialize X threading before doing so. Therefore
	we must call XInitThreads before forking wxt threads.
	Bug #1401

2014-05-19  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* term/emf.trm: Add point types pentagon (14) and filled pentagon (15)

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

	* src/term.c (load_linetype):  As documented, "set linetype cycle N"
	should only affect line properties (color, width, dash), not point
	properties (type, interval, size).  This got lost somewhere, which
	meant point types > linetype_recycle_count were never used by default.
	Now they are.  This means that, as intended, 'with linespoints' cycles
	through (linetype_recycle_count * terminal's_max_point_type) distinct
	combinations before repeating so long as those two numbers are
	mutually prime.  Unfortunately that's not guaranteed and is terminal-
	dependent.  We really need a "set pointtype cycle M" command also so
	that you can choose M to be prime relative to N.
	Bugfix.

	* INSTALL docs/gnuplot.doc:  Update description of new features.

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

	* configure.in PATCHLEVEL src/version.c docs/titlepag.tex:
	Bump version information to 5.0.rc1

	* demo/dashtypes.dem:  Avoid irrelevant warning message.

2014-05-14  Karl Ratzsch  <ratzsch@uni-freiburg.de>

	* term/svg.trm src/wxterminal/gp_cairo.c:
	Add point types pentagon (14) and filled pentagon (15)

	* src/qtterminal/QtGnuplotItems.cpp:
	(EAM) Add point types pentagon (14) and filled pentagon (15)

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

	* src/command.c src/tables.c src/tables.h: Remove undocumented routine
	test_time(). It was never updated to handle sub-second time precision,
	and in any case the functionality is now covered adequately by
	"print strptime()" and "print strftime()".

	* src/color.c (filled_polygon_3dcoords filled_polygon_zfixed)
	src/pm3d.c (filled_color_contour_plot):	 The option "set pm3d at C" is
	undocumented and doesn't work anyhow.  Wrap the corresponding code in
	#ifdef PM3D_CONTOURS . This disabled code may or may not be useful for
	some future implementation of filled contours.

	* term/post.trm (PS_dashtype): Always stroke the previous path before
	setting a new dashtype.

2014-05-11  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/util.c (LOCAL_BUFFER_SIZE): New constant.
	(gprintf): Use constant to identify buffer size, instead of typing
	the same magic number multiple times. Insert warning about
	remaining magic number.

	* src/plot2d.c (get_data): Fix buffer overflow a bit more cleanly.
	(compare_boxplot_factors): Insert warning about magic number.

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

	* src/plot2d.c (get_data): fix buffer overflow

	* src/datafile.c (f_stringcolumn): Return an empty string if asked for
	stringcolumn(N) on an empty field of a *.csv file.  Otherwise it would
	return NULL which may cause a segfault later on.
	Bugfix.

	* src/datafile.c (df_readascii): If xticlabels(f(n)) returns a
	non-string value then do not generate an axis tic.  It used to issue
	a warning about illegal string values but generated a tic anyway.

2014-05-10  Dima Kogan  <dima@secretsauce.net>

	* src/mouse.c (do_zoom rescale_around_mouse):  Handle various conditions
	that caused zooming around the current mouse position to fail.
	Re-applied after tracking down conflict.

2014-05-10  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot.doc: various small corrections
	* docs/gnuplot-ja.doc term-ja.diff:  Sync translation to version 1.887

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

	* term/gd.trm: Do not allow setting terminal size to 0.  Bug #1398

2014-05-10  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* term/lua.trm: Ensure initialization of alpha.

	* src/hidden3d.c (store_polygon): Ensure initialization of v[],
	just in case somebody calls this function with an illegal
	'direction' enum value.

	* src/win/wgraph.c (PATTERN_BITMAP_LENGTH): Give name to magic number.
	(pattern_bitmaps): Use new name.

	* term/emf.trm (PATTERN_BITMAP_LENGTH): Give name to magic number.
	(pattern_bitmaps): Use new name and make const.
	(EMF_filled_polygon): Define pattern pointer more locally and make
	it point to const. Use named constant in loop.  Fix table
	underrun.

	* src/win/wgnuplib.c (GetInt): Add some parentheses.

	* src/stats.c (statsrequest): Initialize local data structs, to
	avoid warnings about printing uninitialized results.

	* src/readline.c (BACKSPACE): Define as a character constant, not
	some hex number.
	(readline): Write TAB as character constant, not some hex number.

	* src/interpol.c (gen_interp_frequency): Ensure initialization of
	y_total regardless of smooth type.

	* src/plot3d.c (grid_nongrid_data): Ensure initialization of
	numpoints.

	* src/pm3d.c (pm3d_plot): Ensure initialiation of gray.

	All the following concern the same problem: Macros from <ctype.h>
	cannot safely be called with arguments of type 'char' (because
	that may be signed).  Such values have to be cast to unsigned char
	on passing.

	* src/win/wtext.c (TextPutStr): See above.

	* term/post.trm (PS_load_fontfile): See above.

	* src/win/winmain.c (GetLanguageCode, open_printer): See above.

	* src/util.c (streq): See above.

	* src/term.c (enhanced_recursion): See above.

	* src/scanner.c (legal_identifier, scanner): See above.

	* src/readline.c (backspace): See above.

	* src/plot2d.c (store_label): See above.

	* src/internal.c (f_word): See above.

	* src/gplt_x11.c (exec_cmd): See above.

	* src/eval.c (set_gpval_axis_sth_double): See above.

	* src/datafile.c (df_readascii, plot_option_binary_format): See above.

	* src/command.c (changedir, expand_1level_macros): See above.

	* src/breaders.c (edf_findInHeader): See above.

2014-05-08  Dima Kogan  <dima@secretsauce.net>

	REVERT patch from 2014-04-26 because it broke normal zoom operations.
	* src/mouse.c (do_zoom rescale_around_mouse):  Handle various conditions
	that caused zooming around the current mouse position to fail.

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

	* src/axis.h (ACTUAL_STORE_WITH_LOG_AND_UPDATE_RANGE)
	src/plot2d.c (store2d_point) src/plot3d.c (get_3ddata)
	src/datafile.c (df_readascii) src/tabulate.c:
	Revised handling of NaN or Inf in the input data stream.  The program
	used to set type=undefined for this point but left all the data fields
	untouched (i.e. left them containing random garbage).  Version 5 fills
	in all data fields, including the one[s] containing NaN or Inf.
	This means that the output from "set table" matches the input data
	whereas before any line marked "u" contained garbage in the data fields.

	Note: For 3D data z=NaN or z=Inf is replaced by z=0.  This is needed to
	avoid problems with image data.  Possibly this special case should be
	handled in the image code itself rather than at the input stage.

	* src/plot2d.c (impulse_range_fiddling) src/plot3d.c: Don't extend
	range to zero for log-scaled axes.

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

	* term/emf.trm: Custom dashtype support.

	* configure.in term/pdf.trm: Modify PDFlib terminal for use with
	version 5 dashtypes (but no custom dashtype support).  Do not build
	by default.

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

	* src/gp_types.h src/graphics.c (place_objects do_rectangle)
	src/misc.c (lp_parse) src/save.c (save_object) src/set.c (set_obj):
	Allow object borders to have a full set of line properties including
	dashtype.

	* docs/gnuplot.doc: Update documentation to better describe recent
	changes.

	* src/qtterminal/QtGnuplotScene.cpp: Always use a solid line to draw
	point symbols, even if the current linetype has a dash pattern.

	* term/cairo.trm term/canvas.trm term/post.trm term/svg.trm term/wxt.trm
	term/x11.trm src/term.c:  Terminals that have been upgraded to version 5
	dash handling should ignore the "dashed/solid" terminal setting.

	* src/plot2d.c (impulse_range_fiddling) src/plot3d.c:  Autoscaled plots
	"with impulses" should include y=0 (z=0 in 3D) unless log-scaled.

2014-05-05  Tatsuro MATSUOKA <tmacchant3@yahoo.co.jp>

	* src/qtterminal/po/qtgnuplot_ja.ts: Update translations

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

	* src/qtterminal/po/qtgnuplot_ja.ts: Update translations.

2014-05-01  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* config/mingw/Makefile (LDFLAGS2): Add auto-import flag.
	($(TARGET)): Add icon files and Makefile as dependencies.

	* config/config.mgw, config/config.cyg: The set of used /
	available configuration macros has changed across the past several
	years.

	* src/stdfn.h (sgn): Fix parenthesization of macro.
	(PATH_MAX): CLang compiler on Cygwin needs a silly little tweak.

	* src/graphics.c (samesign): Improve parenthesization a bit.

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

	* demo/gantt.dem demo/html/*:  Add Gantt chart to demo collection.
	Add dashtypes to demo collection.

	* src/show.c:  Show "fixed" property of arrow style.

2014-04-29  Ethan A Merritt  <merritt@u.washington.edu>

	* src/datafile.c (f_timecolumn): Replace the old 1-parameter function
	timecolumn(col) with a 2-parameter timecolumn(col,"timeformat"). The
	old version had no way to handle time data that didn't correspond to
	a coordinate on a plot axis in time format (e.g. set xdata time).
	It would segfault if the function appeared in a using spec slot >= 2.
	Now we require an explicit format, so data input is dissociated from
	any particular axis or time setting.
	Bug #1394

	* src/gplt_x11.c term/x11.trm term/xlib.trm:
	Custom dashtype support for X11.

2014-04-28  Dima Kogan  <dima@secretsauce.net>

	* src/mouse.c src/mouse.h src/set.c src/show.c docs/gnuplot.doc:
	Remove the distinction between "coordinate format echoed to the screen
	during mousing" and "coordinate format saved to the clipboard on click".
	This removes the default bindings for hotkeys 3 and 4.

2014-04-28  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot-ja.doc term-ja.diff:  Sync translation to version 1.882
	* docs/gnuplot.doc: typos

2014-04-28  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c src/graph3d.c src/save.c src/show.c: Use named
	values LAYER_{BEHIND|BACK|FRONT} rather than magic numbers.

	* docs/gnuplot.doc: Add a section documenting the use of layers.

2014-04-27  Dima Kogan  <dima@secretsauce.net>

	* src/gplt_x11.c: Fix off-by-one error in selection string.
	Allow clipboard contents to be retrieved more than once.

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

	* src/graphics.c (plot_steps): Avoid overflow in clipping code.
	==> Reverted in favor of fixing the clipping code itself.

	* src/gadgets.c (clip_line): It is not safe to use (A*B >= 0) as a
	substitute for the test (sign(A) != sign(B)).
	It fails when A and B are integers and their product overflows.
	Bugs #1390, #1392	See also Bug #1358

	* src/stdfn.h: Define a sgn() function.

	* src/graphics.c: Use sgn() function to define samesign().

	* src/mouse.c: No longer need a local definition of sgn().

2014-04-26  Dima Kogan  <dima@secretsauce.net>

	* src/mouse.c (do_zoom rescale_around_mouse):  Handle various conditions
	that caused zooming around the current mouse position to fail.
	Bug #1380
	[REVERTED 2013-05-08 because it broke normal zoom]

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

	* src/misc.c (lp_parse):  Disallow defining "set lt N lt M".
	This used to mean "define effective linetype N to be the hidden device
	specific linetype M", except that in other contexts it meant "use
	effective linetype M rather than effective linetype N". Version 5
	distinguishes between color and dashpatten, so require an explicit
	command to set one or both rather than an ambiguous old-style request.

	* src/save.c (save_pm3dcolor save_linetype):  Save special linetypes
	by keyword rather than a magic number (e.g. lt bgnd rather than -3).

2014-04-24  Ethan A Merritt  <merritt@u.washington.edu>

	* src/gp_types.h src/misc.c (lp_parse) src/misc.h src/plot2d.c
	src/plot3d.c src/set.c:  Revise the parameters passed to lp_parse() so
	that the legal options can vary depending on the identity of the caller.

	* src/term.c (test_term): Reset to default font after Bold/Italic test.
	Bug #1387

2014-04-24  Dima Kogan  <dima@secretsauce.net>

	* src/mouse.c (do_zoom_scroll_up):  Fix typo that causes incorrect
	manipulation of y2 axis scale during zoom.
	Bug (Patch #647)

2014-04-23  Ethan A Merritt  <merritt@u.washington.edu>

	* src/command.c src/graph3d.* src/set.c src/show.c src/save.c
	docs/gnuplot.doc:  Introduce a scale parameter "set view map {scale}"
	and set the default size of a plot in this mode to approximately the
	same as a default 2D plot.

	* src/command.c (replotrequest):  It's now OK to have a range in a
	replot command, since it can be applied to the new plot piece only.

	* src/datafile.c (df_readascii):  If a read request returns a string
	rather than a numerical value, nevertheless fill in the numerical
	value as NaN.  This is better than leaving some random garbage there
	(in practice probably some earlier data value).
	Bugfix.

2014-04-21  Ethan A Merritt  <merritt@u.washington.edu>

	* term/canvas.trm: Support for custom dashtypes.

2014-04-20  Jérôme Lodewyck  <lodewyck@users.sourceforge.net>

	* src/qtterminal/po/*.ts: Update translations.

	* src/qtterminal/qt_conversion.cpp: Add new encoding types.

	* src/qtterminal/QtGnuplotEvent.* src/qtterminal/QtGnuplotWindow.cpp
	src/qtterminal/qt_term.cpp src/wxterminal/wxt_gui.cpp
	src/wxterminal/wxt_term.h term/qt.trm term/wxt.trm: new terminal option
	"position" that specifies the initial position of the plot window.
	Applies to Qt and wxt terminals. Feature request #386.

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

	* src/command.c (test_command):  When "test" is issued before any plot
	command, suppress error messages if the window is resized.

	* term/PostScript/prologue.ps term/PostScript/prologues.h:
	Update PostScript prolog for version 5 and regenerate headers.

	* term/post.trm:
	Support for custom dashtypes in PostScript output.

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

	* term/svg.trm (set_dashtype):  Fix potential buffer overrun;

	* src/misc.c (parse_dashtype):  A custom pattern must contain an even
	number of entries.

	* demo/dashtypes.dem demo/all.dem:  New dashtype demo.

	* src/qtterminal/QtGnuplotEvent.h src/qtterminal/QtGnuplotScene.cpp
	src/qtterminal/qt_term.cpp src/qtterminal/qt_term.h term/qt.trm:
	Support for custom dashtypes and dashlength in qt terminal.
	Change implementation of "lt nodraw" from background color to NoPen.

	* src/term.c (enhanced_recursion):  Consume only a single space following
	the font name in an enhanced text string "{/Fontname      text}".

	* docs/gnuplot.doc:  Initial documentation for `set dashtype` and
	dash properties in version 5.

2014-04-17  Ethan A Merritt  <merritt@u.washington.edu>

	* src/misc.c (parse_dashtype) src/save.c (save_dashtype) src/term_api.h
	src/term.c (term_apply_lp_properties) demo/dashcolor.dem:
	Fix some glitches found while testing custom dashtypes.

	* src/term.c (test_term): Exercise bold/italic.  Longer line samples to
	make it easier to distinguish dashtypes.  Minor layout changes.

	* term/svg.trm:  Support for custom dashtypes.

	* src/wxterminal/gp_cairo.* src/wxterminal/wxt_gui.*
	src/wxterminal/wxt_term.h term/cairo.trm term/wxt.trm:
	Support for custom dashtype in all cairo-based terminals.

2014-04-14  Dima Kogan  <dima@secretsauce.net>

	* src/mouse.c (event_buttonpress):  Flip direction of horizontal
	scrolling to match the convention used by vertical scrolling.

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

	* configure.in (AC_FUNC_FSEEKO) src/datafile.h: LFS support part 2.
	If possible, use fseeko/ftello to navigate input data files.

2014-04-13  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.in (AC_CHECK_TYPES([off_t])) src/syscfg.h (#define off_t)
	src/binary.c src/datafile.c src/datafile.h:  Change the declared type
	of all variables contributing to calculation of file offsets from (int)
	to (off_t).  This is sufficient to allow seeking in files > 2GB on 64bit
	platforms.  It may also allow LFS support on some 32bit platforms if
	compiled with -D_FILE_OFFSET_BITS=64 but in general it will also be
	necessary to replace fseek/ftell with fseeko/ftello (32bit linux) or
	_fseeki64/_ftelli64 (MSVC).

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

	* src/datafile.c (df_binary_details[]): Handle int64 and uint64 types
	even if current platform has sizeof(long) = 4.
	Bugfix

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

	* src/save.c (save_linetype) src/misc.c (lp_parse)
	src/graphics.c (plot_lines) src/graph3d.c (do_3dplot plot3d_lines)
	src/boundary.c (do_key_sample):

	New linetype keyword "nodraw" maps to existing internal value LT_NODRAW.
	Apply this in the graphics layer rather than the terminal layer in order
	to distinguish between line properties and point properties.
	I.e. this draws blue points but no lines:
	  plot $FOO with linespoints lt nodraw pointtype 6 lc rgb "blue"

	* src/term.c (term_apply_lp_properties):  Distinguish between l_type
	values that really indicate a linetype (e.g. LT_NODRAW, LT_AXIS) and
	those which indicate a dash pattern. Send the former directly to
	term->linetype(). Send the latter to term->dashtype(), which may itself
	call term->linetype() if there is no private implementation of dashes.

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

	* src/term.c (null_dashtype):  Ignore custom dashtypes. Pass through
	dashtypes > 0 to term->linetype(). Treat negative dashtypes as LT_BLACK.
	This should allow terminals without a private dashtype implementation to
	continue working as they did before (pre-version 5).

	* src/plot2d.c (eval_plots):  Don't call lp_parse if all we want is
	a fill color.

	* src/boundary.c (do_key_sample) src/graphics.c (plot_boxes plot_c_bars):
	Funnel requests for linetype changes through term_apply_lp_properties().

	* demo/all.dem:  Add varcolor.dem to the test set.

2014-04-06  Christoph Bersch <usenet@bersch.net>

	* src/graphics.c (fill_between):  It is no longer necessary to clip in
	this routine because the component quadrilaterals will be clipped later.

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

	* src/set.c (set_table): Name leak.

2014-04-05  Bastian Maerkisch  <bmaerkisch@web.de>

	* demo/vector.dem docs/gnuplot.doc src/command.c src/datablock.c
	src/datablock.h src/gadgets.c src/gadgets.h src/plot2d.c src/set.c
	src/tabulate.c src/tabulate.h src/unset.c src/util.c src/util.h:
	'set table $datablock' redirects table output to a named data block.
	Patch #662

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

	* src/term.c (load_linetype):  If a line style is based on a lt < 0
	(LT_NODRAW, LT_BACKGROUND, LT_BLACK, etc), take only the line color.
	FIXME: LT_AXIS should also take the dash pattern but that mechanism
	isn't fully in place yet.
	Bug #1369

	* src/util.c (value_to_str):  Fix error in buffer length accounting.
	Bug #1372

	* src/alloc.c src/alloc.h src/bf_test.c: The conditional code in
	alloc.c for tracking memory allocation/free has bit-rotted to a point
	where the program segfaults on entry if it is enabled.  Since this sort
	of accounting is now better done using valgrind it is not worth fixing
	the old code.  Delete it.

	* src/alloc.c: Although freeing old help messages may free some memory,
	entangling the help system with every memory allocation seems excessive.
	If we're about to run out of memory there are deeper problems than old
	help messages.

	* configure.in: Remove EXPERIMENTAL warning from older options.

	* src/save.c src/set.c src/term.c:  Code style / whitespace cleanup

	* src/set.c (set_dashtype) src/misc.c (parse_dashtype):  Add comments.
	Truncate dashtype string to match size of stored pattern array.

2014-04-03  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/fit.h (error_ex):  Add noreturn attribute to avoid compiler
	warnings.

	* src/fit.c:  Correct test for invalid covariance matrix.

	* src/util.h (int_error, os_error, graph_error):  noreturn attribute
	for MSVC.

	* src/wgdiplus.cpp (drawgraph_gdiplus) src/win/wgraph.c (drawgraph):
	Test if command list is available.

	* src/win.trm (WIN_update_options) src/win/wmenu.c:  Incomplete format
	strings.

2014-04-02  Ethan A Merritt  <merritt@u.washington.edu>

	* src/misc.c demo/heatmaps.dem docs/gnuplot.doc:
	Document and add a demo for "with image pixels" (formerly "failsafe").

	* src/color.c src/plot3d.c src/pm3d.c src/pm3d.h src/save.c src/set.c
	src/show.c src/tables.c src/tables.h src/term.c src/unset.c:
	Revise "set pm3d hidden3d <lt>" to match other places where you can
	specify line properties.
	- Full syntax is now "set hidden3d {no}border {line-properties}"
	- Individual line properties can be overridden in the plot command
	- Old sytax is accepted as a synonym for "set hidden3d border lc <lt>"

	* demo/transparent_solids.dem docs/gnuplot.doc:
	Update documentation and demo to show new syntax

	* src/contour.c (end_crnt_cntr): Initialize blank label in new contour.

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

	* src/command.c (test_palette_command):  Write the palette colors into
	a datablock $PALETTE rather than writing them as in-line data in a temp
	file.  Simplify the internal command sequence that generates the test
	output.  TODO: Move the command sequence into a datablock as well.

2014-03-30  Bastian Maerkisch  <bmaerkisch@web.de>

	* term/caca.trm:  Change codepage from 932 to 437 on Japanese Windows.
	Apparently this fixes display problems, although libcaca uses unicode
	functions to write to screen.
	Bug #1361

	* src/eval.c src/internal.c|h src/parse.c:  Implement f_words instead
	of treating it as a special case in the parser.

	* src/command.c src/command.h src/plot.c src/stdfn.h src/syscfg.h
	src/win/wgraph.c src/win/winmain.c src/win/wprinter.c:  Include file
	cleanup.

	* src/win/screenbuf.c:  Avoid crashes on memory allocation errors.

	* src/makefile.all src/makefile.awc:  Recreate to include multiplot.c.

	* demo/lines_arrows.dem:  UTF-8 encoding.

	* config/mingw/Makefile:  Fix non-numeric version number due to
	patchlevel "alpha".

2014-03-29  Christoph Bersch <usenet@bersch.net>

	* src/multiplot.h src/multiplot.c demo/layout.dem docs/gnuplot.doc:
	New autolayout options for multiplot:
	  set multiplot layout margins LEFT, RIGHT, BOTTOM, TOP spacing GAP
	Patch #611

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

	* src/term.c (multiplot_current_panel) term/svg.trm src/term_api.h:
	Hide internal data structure behind an access function.

	* src/multiplot.h src/multiplot.c src/term.c src/term_api.h
	src/Makefile.am:  Move multiplot layout code from term.c into a new
	file multiplot.c.

2014-03-27  Shigeharu Takeno  <shige@iee.niit.ac.jp>

	* docs/gnuplot-ja.doc term-ja.diff:  Sync translation to version 1.872
	* docs/gnuplot.doc: typos

2014-03-27  Dima Kogan  <dima@secretsauce.net>

	* docs/gnuplot.doc

2014-03-27  Ethan A Merritt  <merritt@u.washington.edu>

	* src/qtterminal/qt_term.cpp (qt_text_wrapper):
	Prevent segfault on "set term qt; set multiplot; quit".

2014-03-24  Ethan A Merritt  <merritt@u.washington.edu>

	* src/graphics.c (place_objects do_rectangle): When fillcolor for an
	objects is given as a linecolor it should be interpreted as referring
	to a current linetype.

	* src/command.c: clean up to remove compiler warnings.

	* term/emf.trm:  Bold/Italic markup in enhanced text mode

	* src/boundary.c (do_key_sample_point) demo/lines_arrows.dem:
	Apply textcolor to character point type in key sample.

2014-03-23  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/command.c src/command.h src/datablock.c src/datablock.h
	src/set.c src/show.c src/unset.c docs/gnuplot.doc demo/ellipse.dem
	demo/fitmulti.dem demo/gen-random.inc demo/rugplot.dem:
	Implement 'set print $datablock' which redirects 'print' output to
	an in-memory datablock.
	Patch #662

	* src/setshow.h src/show.c src/util.c src/util.h:  Factor out new
	routine value_to_str() which returns a string representation of a
	struct value from disp_value().

	* demo/tango_colors.dem:  set linetype cycle.

	* docs/plotstyles.gnu:  Encoding is utf8.

	* src/win/wcommon.h src/win/wgraph.c:  Fix const-ness for
	enhanced_recursion().

	* src/util.c (gprintf):  Skip leading zeroes of negative exponents.

2014-03-22  Ethan A Merritt  <merritt@u.washington.edu>

	* docs/gnuplot.doc docs/doc2tex.c docs/titlepag.tex:
	Update documentation New Features, Changes for version 5.

	* src/plot.c (init_session) src/set.c (set_colorsequence) src/setshow.h
	src/show.c src/tables.c src/tables.h src/term_api.h:
	New command:
		set colorsequence {default | classic | podo}
	Built-in command to select one of the linetype color sequences provided
	in .../share.  The default sequence is visibly changed from the old
	red/green/blue ugliness, which should make users immediately aware that
	the colors can be customized.

	* src/set.c (set_linestyle):  Dash type of newly created linetype should
	by solid unless otherwise specified.

	* src/misc.c:  Allow `black` as a colorspec or linetype, analogous to
	`bgnd`.

2014-03-21  Ethan A Merritt  <merritt@u.washington.edu>

	* src/parse.c (check_for_iteration next_iteration):
	Replace overly clever checks for end condition already satisfied with
	one that doesn't fail due to overflow of integer multiplication.
	Bug #1358

	* src/term.c (enhanced_recursion) term/post.trm(ENHPS_OPEN):
	The bold/italic support code has revealed a problem with PostScript
	output. The core code assumes that passing a blank font name means
	"keep the previous font" or at worst "use the default font". post.trm
	failed to do this for some command sequences. Fix it in two places.
	In term.c pass the previous font if we already know it.
	In post.trm fall back to the default rather than place a blank
	string in the ouput *.ps file.
	Bug #1359

2014-03-20  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/set.c src/term.c src/term_api.h src/util.c src/win/wgraph.c
	src/wxterminal/gp_cairo.c term/aquaterm.trm term/pdf.trm term/post.trm
	term/pslatex.trm term/svg.trm:  Add support for codepage 1252, the
	standard Western European encoding on Windows.

	* src/set.c:  "set encoding locale" only handles utf8 and sjis. Extend
	this to all supported encodings on Windows, probably the only platform
	where this is still relevant.
	Bug #1270

	* demo/dashcolor.dem:  UTF-8 encoding.

	* src/fit.c (show_results):  Do not try to print parameter errors if
	the covariance matrix is unavailable or invalid.

2014-03-20  Thomas Henlich  <thenlich@users.sourceforge.net>

	* term/PostScript/cp1252.ps:  CP1252 encoding support for PostScript
	terminal. Based on Patch #341, but with non-standard characters
	removed.

2014-03-20  Ethan A Merritt  <merritt@u.washington.edu>

	* term/svg.trm:  svg was losing the current linetype (i.e. dash type)
	between drawing the key sample and drawing the main plot.

2014-03-19  Bastian Maerkisch  <bmaerkisch@web.de>

	* src/stdfn.c src/stdfn.h src/internal.c src/win/winmain.c
	src/win/wtext.h config/config.nt:  Standard compliant replacements
	of snprintf() and vsnprintf() for MSVC.  Note that _snprintf does set
	errno=ERANGE if the destination buffer is too small.

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

	* src/plot2d.c: Fix parsing error for "with lp pt 'X', ..."

	* src/boundary.c src/boundary.h src/graphics.c:  Refactor code that
	draws key samples for point plots.

	* configure.in term/gpic.trm src/term.h:
	Add configuration option --with-gpic

	* configure.in src/term.h:  FrameMaker now allows import of svg, so the
	utility of the ancient mif v3 support is dubious. Disable by default.
	Add configuration option --with-mif

	* demo/lines_arrows.dem demo/stringvar.dem demo/html/Makefile
	demo/html/index.* demo/html/webify.pl: Update demos for version 5.

2014-03-19  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/misc.c (parse_dashtype): Avoid warning about assignment used
	as a condition value.  Some reindentation.

2014-03-19  Jérôme Lodewyck  <lodewyck@users.sourceforge.net>

	* src/qtterminal/QtGnuplotScene.cpp
	src/qtterminal/QtGnuplotItems.h src/qtterminal/qt_term.cpp:
	Implement image clipping for the Qt terminal.  Fix issue with
	unsigned variables in terminal coordinates.  Bug #1349

2014-03-18  Peter Juhasz  <juhaszp@users.sourceforge.net>

	* src/term.c src/set.c: Fix leaks and invalid reads associated
	with dashtype strings.

2014-03-18  Ethan A Merritt  <merritt@u.washington.edu>

	* src/wxterminal/gp_cairo.c:  PANGO_WEIGHT_NORMAL is not the same as 0.

	* term/x11.trm:  Make the "persist" flag local to x11 and remember
	what is was the last time we set the terminal to x11.
	Bug #1348

2014-03-18  Jérôme Lodewyck  <lodewyck@users.sourceforge.net>

	* src/qtterminal/QtGnuplotEvent.* src/qtterminal/QtGnuplotWindow.cpp
	src/qtterminal/QtGnuplotWidget.cpp src/qtterminal/QtGnuplotScene.cpp:
	Block events that come from inactive plot widgets.

2014-03-17  Peter Juhasz  <juhaszp@users.sourceforge.net>

	* src/term_api.h src/misc.c src/misc.h src/save.c src/save.h:
	Parse and save dashtype specification in the form of "-_. " or
	"(1.0, 0.3, 1.5, 2.0)". In the latter form alternating numbers
	specify dash lengths and spaces between them.

	* src/gadgets.c src/gadgets.h:
	Added new type custom_dashtype_def and global variable
	first_custom_dashtype in preparation of new "set dashtype" command.

	* src/gadgets.h src/misc.c src/set.c src/setshow.h src/show.c
	src/tables.c src/tables.h src/term_api.h src/unset.c:
	New commands 'set|show|unset dashtype <N> <dashtype_spec>' to
	specify permanent, user-defined dashtypes.

	* src/termp_api.h src/term.c src/misc.c: lp_parse() loads dashtype
	from the list of user-defined dashtypes if the absence of an explicit
	definition.

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

	* src/axis.c src/axis.h src/gadgets.c src/gadgets.h src/graphics.c
	src/misc.c src/plot2d.c src/set.c src/term_api.h docs/gnuplot.doc
	docs/plotstyles.gnu:
	New point type that consists of a single character (possibly a
	multibyte character).  This is particularly useful as
	    plot $FOO with linespoints pointtype "#" pointinterval -1
	where # is the desired character drawn at each point.

2014-03-16  Peter Juhasz  <juhaszp@users.sourceforge.net>

	* src/term_api.h src/term.c src/misc.c src/plot2d.c src/plot2d.c
	src/set.c src/save.c src/graphics.c src/gadgets.c src/gadgets.h:
	Introduce new "dashtype" line property that controls dot/dash
	pattern independently. Allow it in "set|show linetype|linestyle",
	"plot", etc., display it in "save".
	Only numeric "dashtype N" supported for now.
	New function dashtype() added to termentry struct, but none of the
	terminals use it yet.

	* src/set.c (set_linestyle): Set pm3d_color.type to TC_LT and
	pm3d_color.lt to line number by default. This is necessary because
	since the use_palette flag was removed, pm3d_color information is
	used everywhere, yet, it was not set properly. This resulted,
	among others, a broken "show linetype" output with empty "linecolor"
	spec.

2014-03-16  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/axis.h (en_minitics_status): Give enum a typedef name, too.
	(axis): Use new type for element of AXIS struct, instead of int.

	* src/axis.c (gen_tics): Simplify by using local OO-like "this"
	pointer variable.  Remove pointless local variable "minifreq".
	Treat "minitics" variable as a proper enum everywhere (no
	set/compare to zero).

2014-03-15  Ethan A Merritt  <merritt@u.washington.edu>

	* configure.in VERSION PATCHLEVEL share/gnuplotrc src/version.c
	demo/html/index.canvas demo/html/index.save demo/html/index.svg
	docs/doc2texi.el docs/gnuplot.doc docs/titlepag.tex:

	>>>>> Bump version to 5.0 alpha <<<<<

>>> Earlier entries are in ChangeLog.4
