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

	* src/wxtterminal/wxt_gui.cpp:  Build testing under Cygwin failed
	because of gtk2->gtk3 api change.  We fixed this in 5.2, so back-port
	that fix for 5.0.7 also.  
	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).

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

	Tag 5_0_7

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

	PATCHLEVEL etc:  Bump versioning to 5.0.7

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

	* src/command.c src/parse.c src/plot2d.c demo/iterate.dem:
	Revise recursive iteration algorithm to address problems with empty
	ranges in a nested iteration. Add support for dynamic reevaluation of
	the string in nested ranges using "for [s in <string-expression>]".
	Bug #1952

2017-08-07  Martin Beranek

	* term/metapost.trm:  Support for user-defined dashtypes.

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

	* src/axis.c (parse_range) src/datafile.c (df_generate_pseudodata)
	src/axis.h src/plot2d.c:  Somewhat delayed application of patch from 
	2014-12-08, originally deferred so that the feature could be tested
	in the development version.  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

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

	* src/graphics.c(plot_image_or_update_axes): Image code is shared by
	2D and 3D paths.  If we are in 2D we cannot rely on pixel.z being a
	reasonable z coordinate, so treat all z coordinats as 0.
	5.0.6 would segfault on command
	    set log xy; plot 'blutux.rgb' binary array=(128,128) flipy \
		format='%uchar' with rgbimage

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

	* config/mingw/Makefile config/msvc/Makefile config/config.nt:
	Mingw-w64 and MSVC have working popen/pclose implementations for GUI
	applications.  So we use them instead of our own "fake" pipe emulation.

	* config/watcom/Makefile config/config.oww:  Enable pipe support
	using pipe emulation for wgnuplot.

	Bug #1950

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

	* src/command.c src/fit.c src/fit.h src/tables.c src/tables.h
	docs/gnuplot.doc:  Deprecate command "update" in favor of new command
	"save fit <filename>".  "update" remains for backward compatability but
	will be removed in 5.3.

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

	* src/fit.c:  The code saving the previous "fit" command incorrectly
	assumed that "fit" must be the first thing on the input line.  This
	is clearly not true, particularly when the command is inside a {}
	bracketed clause since the entire clause acts as one long input line.
	Bug #1946

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

	* src/plot2d.c src/plot3d.c docs/gnuplot.doc:
	Fix inconsistent handling of "plot ... with table".
	E.g. "set style data table; plot foo" tried to both plot and tabulate.
	Warn that function plots are not handled.

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

	* src/win/wgdiplus.cpp:  Do not apply gamma correction to filled
	polygons. Speeds up drawing and yields results consistent with
	other terminals.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	* src/stats.c:  Clean exit from stats routine after finding no data in
	input file.
	Bug #1930

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

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

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

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

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

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

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

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

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

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

	Backport changes from 5.1:

	* src/win/wgdiplus.cpp:
	Graphics::MeasureString did not take trailing spaces into account.
	Off-by-one error in mapping of graph coordinates.
	Fix memory leak in SetFont_gdiplus.

	* src/win/wgraph.c:
	(drawgraph) Off-by-one error in mapping of graph coordinates.
	(CopyClip) Only attempt to set clipboard data if the bitmap/metafile
	handle is valid.  Emit an error message otherwise.
	(SaveAsEMF) Tweak flags for GetSaveFileName() to make sure that the
	file/path is not read-only and to preserve the current working
	directory.
	(WndGraphProc): Remove dead code in mouse handling: Single and double
	clicks are handled 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"s are released again.

	* 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/wgraph.c src/win/wcommon.h (draw_image):  Make static.

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

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

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

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

	* term/js/gnuplot_mouse.js:  Work-around for plots that were generated
	prior to the above fix.  You can use this mousing code even if the plots
	being moused contain the initialization error.
	Bug #1925

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	* src/qtterminal/QtGnuplotEvent.h src/qtterminal/QtGnuplotWindow.cpp:
	Event type GEPID was added between the 5.0.5 and 5.0.6 releases.
	It is used only by Windows, and only to allow space-raises-console.
	Adding it in the middle of the enum definition made gnuplot_qt built for
	5.0.6 incompatible with previous builds, so I moved GEPID to the highest
	defined enum value.  Unfortunately this broke the code in
	QtGnuplotEventHandler that treats any event type > GEDone as an error.
	So now we put it back in the middle of the enum definition but only
	define it for WIN32.

	Add a warning that GEDone must be the highest event type value defined.

2017-03-21  Craig DeForest  <zowie@users.sf.net>

	* src/datafile.c (plot_option_binary):  Interpretation of dimensions
	given via "binary record=(a,b)" contradicted that for dimensions given
	via "binary array=(a,b)".  This caused mangling of image data read in
	using the "record" keyword.
	NB: This was applied 2016-11-03 but somehow got lost in 5.0.6 - reapply!
	Bug #1873

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

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

2017-03-17  Release 5.0.6

	PATCHLEVEL etc:  Bump versioning to 5.0.6 for release

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2016-10-09  Release 5.0.5

	PATCHLEVEL etc:  Bump versioning to 5.0.5 for release

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	Backport bug-fixes from 5.1

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

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

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

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

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

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

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

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

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

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

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

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

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

	* Bump PATCHLEVEL to 5.0.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	* src/plot2d.c (refresh_bounds):  Patch from 2016-01-18 to fix bug 
	#1709 introduced a regression.   Minimal example:
		'set log x; plot '-'; replot' 
	failed to delog/log the updated min/max axis limits.
	Bug #1774	

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

2016-03-22  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

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

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

	* src/datafile.c: df_fgets() change from 4 days ago caused a regression 
	because input buffer initialization was missed in some paths.
	Replicate the initialization in both df_gets() and df_fgets()
	Rename the shared line buffer df_line to make it more obvious.
	It would be better to have a single initialization routine df_init()
	called once on program entry.
	Bug #1758

	* 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 here we do so.
	Bug #1733

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

	* src/graphics.c (plot_boxes): Backport fix to prevents array overrun if
	there are undefined points are at the end of a data set.

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

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.

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-09 Allin Cottrell  <cottrell@wfu.edu>

	* configure.in:  Backport configuration tweak for wxt on OSX.
	Do not assume that wxwidgets uses the gtk2 toolkit.
	It might use gtk3 or on OSX it might use cocoa.

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

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 it for all of them to 0.20 pt (was 0.25 or 0.50).

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

	* 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.
	Multiple bugs including #1777

2016-02-22  Release 5.0.3

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

	* config/mingw/Makefile:  Use gnuplot's default settings to generate
	plots for the documentation.  Use MinGW's own implementations of
	printf etc. which are C99 compliant.

	* src/qtterminal/qt_term.h src/qtterminal/qt_conversion.cpp:  isnan()
	is in namespace std.  -- Reverted since not all relevant compilers
	follow the C++11 standard just yet.

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

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

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

	* src/version.c PATCHLEVEL configure.in docs/titlepag.tex:
	Update patchlevel to 5.0.3

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/tkcanvas.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 incomplete support for image data, but it is strictly
	better than the 1999 terminal.

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

	* 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/graphics.c (plot_filledcurves):  Reevaluate variable fill color
	for every polygon in the input stream to "with filledcurves".
	This change was noted in the ChangeLog for 15-Jan-2015 but apparently
	was not actually applied to the code.
	Bug/Feature Request #411

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-18  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 (plot_image_or_update_axes):
	Remove old code that tried to empirically determine the grid size of
	an image based on 3D coords.  Backport v5.1 bookkeeping that stores
	dimensions in plot->image_properties.{ncols,nrows} when image data is
	read in.

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

	These changes are back-ported from version 5.1 to address
	Bugs #1607 #1703 #1709 #1718

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

	* 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-12  Jun Takimoto <takimoto-j@kba.biglobe.ne.jp>

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

2016-01-09  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 datafiles where the file name is
	generated from the iteration variable, or an unknown number of data
	blocks (e.g. plot for [i=0:*] datafile index i).

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.

2016-01-06  Release 5.0.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".

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

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

	Bump PATCHLEVEL 2 in preparation for incremental release 5.0.2

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

	* src/plot2d.c:  Allow "noautoscale" keyword for 2D function plots.

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 to major tics.
	Bug #1705

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

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.

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

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

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

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.

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

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-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/util.c (streq): Avoid buffer underrun on empty string.
	
	* src/axis.c (load_range):  "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

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  <pudh4418@users.sf.net>

	* configure.in:  latest Qt5 requires compilation with -fPIC rather
	than -fPIE.
	Bug #1616

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

	* src/stats.c src/set.c src/eval.c:
	Protect against 'free(foo); foo = try_to_get_string()' returning via
	int_error() and hence never resetting the value of foo. If executed
	again this leads to a double-free error.

	* 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/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
	make [one] plot.   After this fix the code executes define+plot
	three separate times.

	* src/command.c (plot_command splot_command):  Fuzz-testing found
	cases where 'refresh' triggered program failure if there was not an
	active refreshable plot.

2015-07-14  Ethan A Merritt  <merritt@u.washington.edu>

	Handle various cases of unexpected input commands or data that caused
	crashes in fuzz-testing.

	* src/datafile.c (df_open):  Filename of the form "+file.dat" must not
	be mistaken for special file '+'.

	* src/wxterminal/wxt_gui.cpp term/cairo.trm term/wxt.trm:
	Change fixed-length fontname storage to dynamic (cairo + wxt terminals).

	* src/datablock.c:  The storage in a zero-length datablock was not
	initialized.

	* src/set.c (set_style) src/save.c (save_data_func_style):
	Do not allow "set style func parallelaxes"

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.

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

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

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

	* demo/html/webify.pl:  Default to pngcairo terminal rather than png.

2015-06-28  Hans-Bernhard Broeker  <broeker@physik.rwth-aachen.de>

	* src/Makefile.am (gnuplot_x11_SOURCES): Add getcolor.c/.h to
	regular source list.
	(gnuplot_x11_CPPFLAGS): New, to communicate compiler flag into
	getcolor.c.
	(gnuplot_x11_LDADD): Remove manually created getcolor_x11.o file.
	(getcolor_x11.o): Rule Removed.

	* docs/Makefile.am (noinst_PROGRAMS): Add doc2wxhtml.
	(MOSTLYCLEANFILES, CLEANFILES): Split up into two lists, updated.
	(GNUPLOT_EXE, SRC_VERSION_O): New variables, point to freshly
	built files in main src directory.
	($(GNUPLOT_EXE), $(SRC_VERSION_O)): Build , 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.
	(alldoc): Target 'ms' no longer exists.  Test actual outputs made
	from gnuplot.ms instead.
	(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.
	(htmldocs/gnuplot.html): Do not try to build if latex2html was not
	found.

	* configure.in: Check for existence of latex2html.

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

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-07  Release 5.0.1

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

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

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

	* PATCHLEVEL RELEASE_NOTES configure.in src/version.c:
	Update in preparation for June(?) release of patchlevel 5.0.1

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  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 suppressing 
	dvi as an auto-generated target and defaulting to documentation with
	figures.

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.

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/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-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-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 substitute with a fully transparent color,
	but not all terminals handle transparency.
	Bug #1595

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-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 log file even if the
	"quiet" flag 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 is 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.

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

	* term/fig.trm: unused variable

2015-03-24  Erik Olofsen <olofsen@sourceforge.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  <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.

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

	* src/unset.c: Fix memory leak (linked axis function) on reset

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

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

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

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

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

2015-02-11  Erik Olofsen <olofsen@sourceforge.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/qtterminal/QtGnuplotIterms.cpp (drawPoint):
	Don't draw an extra dot at the nominal origin of each point symbol.

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

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

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

	* src/save.c (save_textcolor):  Remove redundant line left by 
	mis-applied patch.

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

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

	* src/boundary.c src/gadgets.h src/graph3d.c src/save.c src/set.c
	src/unset.c:  Track text properties (font, enhanced, justification) for
	the key title separately from those for the key entries.
	Bug #1525 #1542

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>

	* term/cairo.trm (cairotrm_put_text):  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.
	Test case:  set key title "{/:Bold Hello}"; plot sin(x) title "World"
	Bug fix

	* 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

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-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  Achim Gratz  <Stromeko@nexgo.de>

	* configure.in: 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/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)

	* src/save.c (save_textcolor):  TC_VARIABLE was not handled correctly.

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  Release 5.0

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

	* src/term.c:  Default to wxt terminal instead of the newly suported
	qt terminal on Windows.

	* win/gnuplot.iss:  Display RELEASE_NOTES instead of NEWS file.

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

	* FAQ.pdf: Fix broken URLs.

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

	* src/qtterminal/qt_term.cpp (qt_atexit): Sanity check.

	* src/command.c src/command.h src/mouse.c src/mousecmn.h src/plot.c
	src/term.c:  Backport core pieces of version 5.1 fix for Windows bugs
	#1432 and #1502.

	* src/win/wgnuplib.h src/win/wgraph.c src/win/winmain.c src/win/wpause.c:
	Backport win term pieces of version 5.1 fix for Windows bugs
	#1432 and #1502.

	* src/wxt/wxt_gui.cpp src/wxt/wxt_gui.h:
	Backport wxt term piece (referenced from wpause.c) of version 5.1 fix
	for Windows bugs #1432 and #1502

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

	* src/command.c (do_line):
	Report error if a "load" file fails to close an open bracketed clause.
	Bug #1522

	* src/wxterminal/wxt_gui.*: remove old debug code.

	* FAQ.pdf: update for version 5 release

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)

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

	* 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 gp_cairo_initialize_plot):
	Do not let zero-length move iterrupt the current polyline context
	(dash pattern, end caps, polygon closure).
	Bug #1523

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

	* docs/gnuplot.doc docs/term-jp.diff:  sync to docs version 1.902.2.20

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

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

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

	* bump patchlevel identifier to -rc3

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

	* src/term_api.h term/README:  Add a 2nd parameter to the interface for
	term->modify_plots(operations, plotno). All terminals for which this
	entry point is not NULL must be updated accordingly.  This patch does
	not by itself add any new functionality or user-visible change.
	Better to make this change now rather than after release of 5.0 since it
	breaks compatibility between core code and outboard drivers.

	* src/mouse.c src/gplt_x11.c term/caca.trm term/win.trm term/x11.trm
	src/qtterminal/QtGnuplotScene.cpp src/qtterminal/qt_term.*
	src/wxterminal/wxt_gui.cpp src/wxterminal/wxt_term.h:
	Update term->modify_plots() entry in the terminals that provide it.

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

	Timefmt revision part 1 of 7
	* 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:

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

	Timefmt revision part 2 of 7
	* src/save.c src/save.h src/setshow.h src/show.c:

	- Replace macro SAVE_NUM_OR_TIME with routine save_num_or_time_input().
	  This routine uses _input_ data format, mostly for reporting axis range.

	Timefmt revision part 3 of 7
	* src/save.c src/save.h src/show.c:

	- 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.
	  Thus they are written using the input format not the output format.

	Timefmt revision part 4 of 7
	* 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:

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

	Timefmt revision part 5 of 7
	* src/datafile.c src/parse.c:

	- Track how many parameters were passed to timecolumn(), so that
	  version 4 behavior can be emulated when only 1 parameter is passed.

	Timefmt revision part 6 of 7
	* src/axis.h src/set.c:

	- Add the tictype keywords to set format {axis} {time|geographic|numeric}
	- Reset to numeric on "unset format"

	Timefmt revision part 7 of 7
	* 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-07  Daniel J Sebald <daniel.sebald@ieee.org>

	* src/wxterminal/wxt_gui.{cpp|h}:  Add a toolbar widget on the wxt
	terminal to export current plot to a PNG, SVG, or PDF file.

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-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-29  Christoph Bersch <usenet@bersch.net>

	* term/lua/gnuplot-tikz.lua term/luz.trm:  Boxed text support.

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/wgraph.c src/win/wgidplus.c:  Accept zero point size.
	Eliminates drawing of unwanted point symbols for labelled contours.
	Bugfix

	* 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

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

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

	* 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

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

	* 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 v4 syntax is only recognized if all independent variables 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/datafile.c:  Revised error message for datafile open failure.

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

	* src/mouse.c (xDateTimeFormat):  Use gnuplot's own ggmtime() instead
	of gmtime() to avoid platform dependant restrictions. Fixes display of
	dates before 1970 and after 2038 in the status bar on Windows.
	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.

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

	* docs/gnuplot.doc docs/term-ja.diff docs/gnuplot-ja.doc
	man/gnuplot-ja.1:  Sync Japanese documentation to 1.902.2.5

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

	* Prepare release notes for 5.0.rc2
	* src/fit.c:  Initialize number of error terms for "zerror" option
	(fixes a possible segfault) but otherwise defer work on the new error
	options for later as warned in the release notes.

2014-08-22  "Jun T." <takimoto-j@kba.biglobe.ne.jp>.

	* src/bf_test.c:  Use HAVE_STDLIB_H and HAVE_MALLOC_H to determine
	proper system header file for calloc().

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

	* src/fit.c:  Handle columnheaders in input to "fit".
	Bug #1467

2014-08-20  Ethan A Merritt  <merritt@u.washington.edu>

	* Branchpoint for 5.0 (cvs tag -b branch-5-0-stable)

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
