From 9548cb74851fe15e460db76afa0e0c6149453d4d75989c19f50c9e0eb80b76c4 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 15 Jun 2009 14:35:00 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnuplot?expand=0&rev=15 --- gnuplot-4.2.0-x11ovf.dif | 13 - gnuplot-4.2.5-demo.dif | 2008 ++----------- gnuplot-4.2.5-fix-format-errors.dif | 8 +- ...4.2.2-fonts.dif => gnuplot-4.2.5-fonts.dif | 14 +- gnuplot-4.2.5-utf8.dif | 2583 ++++++++--------- ...lot-4.2.0-wxt.dif => gnuplot-4.2.5-wxt.dif | 10 +- gnuplot-4.2.5-x11ovf.dif | 35 + gnuplot-4.2.5.dif | 119 +- gnuplot.changes | 6 + gnuplot.spec | 18 +- 10 files changed, 1570 insertions(+), 3244 deletions(-) delete mode 100644 gnuplot-4.2.0-x11ovf.dif rename gnuplot-4.2.2-fonts.dif => gnuplot-4.2.5-fonts.dif (87%) rename gnuplot-4.2.0-wxt.dif => gnuplot-4.2.5-wxt.dif (85%) create mode 100644 gnuplot-4.2.5-x11ovf.dif diff --git a/gnuplot-4.2.0-x11ovf.dif b/gnuplot-4.2.0-x11ovf.dif deleted file mode 100644 index 016ab7c..0000000 --- a/gnuplot-4.2.0-x11ovf.dif +++ /dev/null @@ -1,13 +0,0 @@ ---- src/gplt_x11.c -+++ src/gplt_x11.c 2006-01-31 11:09:17.000000000 +0000 -@@ -1103,8 +1103,8 @@ - static int - read_input() - { -- static int rdbuf_size = 10 * Nbuf; -- static char rdbuf[10 * Nbuf]; -+ const int rdbuf_size = 10 * Nbuf; -+ static char rdbuf[rdbuf_size+1]; - static int total_chars; - static int rdbuf_offset; - static int buf_offset; diff --git a/gnuplot-4.2.5-demo.dif b/gnuplot-4.2.5-demo.dif index 88a2177..d3a614b 100644 --- a/gnuplot-4.2.5-demo.dif +++ b/gnuplot-4.2.5-demo.dif @@ -1,1846 +1,226 @@ ---- demo/all.dem 2009-02-19 22:16:03.000000000 +0100 -+++ demo/all.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -5,218 +5,218 @@ - # - - print "******************** file simple.dem ********************" --load "simple.dem" -+load "@@GNUPLOTDEMOPATH@@simple.dem" - reset - - print "******************** file controls.dem ********************" --load "controls.dem" -+load "@@GNUPLOTDEMOPATH@@controls.dem" - reset - - print "******************** file electron.dem ********************" --load "electron.dem" -+load "@@GNUPLOTDEMOPATH@@electron.dem" - reset - - print "******************** file using.dem ********************" --load "using.dem" -+load "@@GNUPLOTDEMOPATH@@using.dem" - reset - - print "******************** file fillstyle.dem ********************" --load "fillstyle.dem" -+load "@@GNUPLOTDEMOPATH@@fillstyle.dem" - reset - - print "******************** file fillcvrs.dem ********************" --load "fillcrvs.dem" --load "fillbetween.dem" -+load "@@GNUPLOTDEMOPATH@@fillcrvs.dem" -+load "@@GNUPLOTDEMOPATH@@fillbetween.dem" - reset - - print "******************** file candlesticks.dem ********************" --load "candlesticks.dem" -+load "@@GNUPLOTDEMOPATH@@candlesticks.dem" - reset - - print "******************** file mgr.dem ********************" --load "mgr.dem" -+load "@@GNUPLOTDEMOPATH@@mgr.dem" - reset - - print "******************** file fit.dem ********************" --load "fit.dem" -+load "@@GNUPLOTDEMOPATH@@fit.dem" - reset - - print "******************** file param.dem ********************" --load "param.dem" -+load "@@GNUPLOTDEMOPATH@@param.dem" - reset - - print "******************** file polar.dem ********************" --load "polar.dem" -+load "@@GNUPLOTDEMOPATH@@polar.dem" - reset - - print "******************** file poldat.dem ********************" --load "poldat.dem" -+load "@@GNUPLOTDEMOPATH@@poldat.dem" - reset - - print "******************** file multiplt.dem ********************" --load "multiplt.dem" --load "layout.dem" --load "margins.dem" -+load "@@GNUPLOTDEMOPATH@@multiplt.dem" -+load "@@GNUPLOTDEMOPATH@@layout.dem" -+load "@@GNUPLOTDEMOPATH@@margins.dem" - reset - - print "******************** file surface1.dem ********************" --load "surface1.dem" -+load "@@GNUPLOTDEMOPATH@@surface1.dem" - reset - - print "******************** file discrete.dem ********************" --load "discrete.dem" -+load "@@GNUPLOTDEMOPATH@@discrete.dem" - reset - - print "******************** file hidden.dem ********************" --load "hidden.dem" -+load "@@GNUPLOTDEMOPATH@@hidden.dem" - reset - - print "******************** file world.dem ********************" --load "world.dem" --load "world2.dem" -+load "@@GNUPLOTDEMOPATH@@world.dem" -+load "@@GNUPLOTDEMOPATH@@world2.dem" - reset - - print "******************** file prob.dem ********************" --load "prob.dem" -+load "@@GNUPLOTDEMOPATH@@prob.dem" - reset - - print "******************** file prob2.dem ********************" --load "prob2.dem" -+load "@@GNUPLOTDEMOPATH@@prob2.dem" - reset - - print "******************** file random.dem ********************" --load "random.dem" -+load "@@GNUPLOTDEMOPATH@@random.dem" - reset - - print "******************** file spline.dem ********************" --load "spline.dem" -+load "@@GNUPLOTDEMOPATH@@spline.dem" - reset - - print "******************** file binary.dem ********************" --load "binary.dem" -+load "@@GNUPLOTDEMOPATH@@binary.dem" - reset - - print "******************** file steps.dem ********************" --load "steps.dem" -+load "@@GNUPLOTDEMOPATH@@steps.dem" - reset - - print "******************** file scatter.dem ********************" --load "scatter.dem" -+load "@@GNUPLOTDEMOPATH@@scatter.dem" - reset - - print "******************** file singulr.dem ********************" --load "singulr.dem" -+load "@@GNUPLOTDEMOPATH@@singulr.dem" - reset - - print "******************** file airfoil.dem ********************" --load "airfoil.dem" -+load "@@GNUPLOTDEMOPATH@@airfoil.dem" - reset - - print "******************** file surface2.dem ********************" --load "surface2.dem" -+load "@@GNUPLOTDEMOPATH@@surface2.dem" - reset - - print "******************** file contours.dem ********************" --load "contours.dem" -+load "@@GNUPLOTDEMOPATH@@contours.dem" - reset - - print "******************** file multimsh.dem ********************" --load "multimsh.dem" -+load "@@GNUPLOTDEMOPATH@@multimsh.dem" - reset - - print "******************** file bivariat.dem ********************" --load "bivariat.dem" -+load "@@GNUPLOTDEMOPATH@@bivariat.dem" - reset - - print "******************** file timedat.dem ********************" --load "timedat.dem" -+load "@@GNUPLOTDEMOPATH@@timedat.dem" - reset - - print "******************** file animate.dem ********************" --load "animate.dem" -+load "@@GNUPLOTDEMOPATH@@animate.dem" - reset - - print "********************** file rainbow.dem *********************" --load "rainbow.dem" -+load "@@GNUPLOTDEMOPATH@@rainbow.dem" - reset - - print "********************** file rgb_variable.dem *********************" --load "rgb_variable.dem" -+load "@@GNUPLOTDEMOPATH@@rgb_variable.dem" - reset - - print "********************** file pm3d.dem *********************" --load "pm3d.dem" -+load "@@GNUPLOTDEMOPATH@@pm3d.dem" - reset - - print "********************** file pm3dcolors.dem *********************" --load "pm3dcolors.dem" -+load "@@GNUPLOTDEMOPATH@@pm3dcolors.dem" - reset - - print "********************** file pm3dgamma.dem *********************" --load "pm3dgamma.dem" -+load "@@GNUPLOTDEMOPATH@@pm3dgamma.dem" - reset - - print "********************** file heatmaps.dem ***********************" --load "heatmaps.dem" -+load "@@GNUPLOTDEMOPATH@@heatmaps.dem" - reset - - print "********************** file hidden2.dem ***********************" --load "hidden2.dem" -+load "@@GNUPLOTDEMOPATH@@hidden2.dem" - reset - - print "********************** file textcolor.dem *********************" --load "textcolor.dem" -+load "@@GNUPLOTDEMOPATH@@textcolor.dem" - reset - - print "********************** file textrotate.dem *********************" --load "textrotate.dem" -+load "@@GNUPLOTDEMOPATH@@textrotate.dem" - reset - - print "********************** file enhancedtext.dem *********************" --load "enhancedtext.dem" -+load "@@GNUPLOTDEMOPATH@@enhancedtext.dem" - reset - - print "********************** file arrowstyle.dem *********************" --load "arrowstyle.dem" -+load "@@GNUPLOTDEMOPATH@@arrowstyle.dem" - reset - - print "********************** file vector.dem *********************" --load "vector.dem" -+load "@@GNUPLOTDEMOPATH@@vector.dem" - reset - - print "********************** file tics.dem *********************" --load "tics.dem" -+load "@@GNUPLOTDEMOPATH@@tics.dem" - reset - - print "********************** file datastrings.dem *********************" --load "datastrings.dem" -+load "@@GNUPLOTDEMOPATH@@datastrings.dem" - reset - - print "********************** file histograms.dem *********************" --load "histograms.dem" --load "histograms2.dem" -+load "@@GNUPLOTDEMOPATH@@histograms.dem" -+load "@@GNUPLOTDEMOPATH@@histograms2.dem" - reset - - print "********************** file image.dem *********************" --load "image.dem" -+load "@@GNUPLOTDEMOPATH@@image.dem" - reset - - print "********************** file stringvar.dem *********************" --load "stringvar.dem" -+load "@@GNUPLOTDEMOPATH@@stringvar.dem" - reset - - print "********************** file pointsize.dem *********************" --load "pointsize.dem" -+load "@@GNUPLOTDEMOPATH@@pointsize.dem" - reset - - print "********************** file key.dem *********************" --load "key.dem" -+load "@@GNUPLOTDEMOPATH@@key.dem" - reset - - print "********************** file borders.dem *********************" --load "borders.dem" -+load "@@GNUPLOTDEMOPATH@@borders.dem" - reset - - print "********************** file rectangle.dem *********************" --load "rectangle.dem" -+load "@@GNUPLOTDEMOPATH@@rectangle.dem" - reset -diff -U 3 -H -d -r -N -- demo/animate.dem demo/animate.dem ---- demo/animate.dem 2006-01-08 00:21:02.000000000 +0100 -+++ demo/animate.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -20,7 +20,7 @@ - xview(xrot)=(50.+30.*sin((xrot%180)/180.*pi)) - zview(zrot)=(60.+45.*sin(zrot/180.*pi)) - set view xview(xrot),zview(zrot) --splot "glass.dat" -+splot "@@GNUPLOTDEMOPATH@@glass.dat" - - limit_iterations=40 # limits number of iterations if nonzero - -@@ -32,5 +32,5 @@ - pause -1 "Press a key to start the rotation..." - - iteration_count=0 --load "gnuplot.rot" -+load '@@GNUPLOTDEMOPATH@@gnuplot.rot' - reset -diff -U 3 -H -d -r -N -- demo/arrowstyle.dem demo/arrowstyle.dem ---- demo/arrowstyle.dem 2003-07-03 02:13:29.000000000 +0200 -+++ demo/arrowstyle.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -40,42 +40,42 @@ - - set title 'Top: plot with vectors arrowstyle 1, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 1 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 1 - pause -1 "Hit return to continue" - - set title 'Top: plot with vectors arrowstyle 2, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 2 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 2 - pause -1 "Hit return to continue" - - set title 'Top: plot with vectors arrowstyle 3, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 3 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 3 - pause -1 "Hit return to continue" - - set title 'Top: plot with vectors arrowstyle 4, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 4 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 4 - pause -1 "Hit return to continue" - - set title 'Top: plot with vectors arrowstyle 5, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 5 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 5 - pause -1 "Hit return to continue" - - set title 'Top: plot with vectors arrowstyle 6, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 6 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 6 - pause -1 "Hit return to continue" - - set title 'Top: plot with vectors arrowstyle 7, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 7 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 7 - pause -1 "Hit return to continue" - - set title 'Top: plot with vectors arrowstyle 8, Bottom: explicit arrows' - plot \ -- 'arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 8 -+ '@@GNUPLOTDEMOPATH@@arrowstyle.dat' using 1:2:(0):3 notitle with vectors arrowstyle 8 - pause -1 "Hit return to continue" - - reset -@@ -86,9 +86,9 @@ - set title "Plot 'file' with vectors " - set key box - set yrange [*:10] --plot '1.dat' using 1:2:(+1):(+1) with vectors lt 4 filled title 'filled', \ -- '2.dat' using 1:2:(+1):(+1) with vectors lt 1 heads title 'double-headed', \ -- '2.dat' using ($1):(2-$2/3):(+1):(+.5) with vectors lt -1 lw 3 nohead title 'no head' -+plot '@@GNUPLOTDEMOPATH@@1.dat' using 1:2:(+1):(+1) with vectors lt 4 filled title 'filled', \ -+ '@@GNUPLOTDEMOPATH@@2.dat' using 1:2:(+1):(+1) with vectors lt 1 heads title 'double-headed', \ -+ '@@GNUPLOTDEMOPATH@@2.dat' using ($1):(2-$2/3):(+1):(+.5) with vectors lt -1 lw 3 nohead title 'no head' - # - pause -1 "Hi return to continue" - # -diff -U 3 -H -d -r -N -- demo/binary.dem demo/binary.dem ---- demo/binary.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/binary.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -9,20 +9,20 @@ - - set xrange [-3:3] - set yrange [-2:2] --splot "binary1" binary -+splot "@@GNUPLOTDEMOPATH@@binary1" binary - pause -1 "Hit return to continue (1)" - - set view 70,45 - set xrange [-3:3] - set yrange [-3:3] --splot "binary2" binary -+splot "@@GNUPLOTDEMOPATH@@binary2" binary - pause -1 "Hit return to continue (2)" - - set title "Notice that sampling rate can change" - set vi 70,10 - set xrange [-3:6] - set yrange [-3:6] --splot "binary3" binary -+splot "@@GNUPLOTDEMOPATH@@binary3" binary - pause -1 "Hit return to continue (3)" - - reset -diff -U 3 -H -d -r -N -- demo/candlesticks.dem demo/candlesticks.dem ---- demo/candlesticks.dem 2005-03-30 08:02:45.000000000 +0200 -+++ demo/candlesticks.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -8,7 +8,7 @@ - set yrange [0:10] - # - set title "candlesticks with open boxes (default)" --plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks -+plot '@@GNUPLOTDEMOPATH@@candlesticks.dat' using 1:3:2:6:5 with candlesticks - # - pause -1 "Hit return to continue" - # -@@ -27,13 +27,13 @@ - # - set title "box-and-whisker plot adding median value as bar" - set style fill empty --plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles', \ -+plot '@@GNUPLOTDEMOPATH@@candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles', \ - '' using 1:4:4:4:4 with candlesticks lt -1 lw 2 notitle - # - pause -1 "Hit return to continue" - # - set title "box-and-whisker with median bar and whiskerbars" --plot 'candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles' whiskerbars, \ -+plot '@@GNUPLOTDEMOPATH@@candlesticks.dat' using 1:3:2:6:5 with candlesticks lt 3 lw 2 title 'Quartiles' whiskerbars, \ - '' using 1:4:4:4:4 with candlesticks lt -1 lw 2 notitle - pause -1 "Hit return to continue" - # -diff -U 3 -H -d -r -N -- demo/contours.dem demo/contours.dem ---- demo/contours.dem 2006-06-25 19:24:32.000000000 +0200 -+++ demo/contours.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -85,13 +85,13 @@ - set style data lines - set title "3D gnuplot demo - contour of data grid plotting" - set parametric --splot "glass.dat" -+splot "@@GNUPLOTDEMOPATH@@glass.dat" - pause -1 "Hit return to continue (19)" - set xrange [0:15] - set yrange [0:15] - set zrange [-1.2:1.2] - unset parametric --splot "glass.dat" using 1 -+splot "@@GNUPLOTDEMOPATH@@glass.dat" using 1 - pause -1 "Hit return to continue (20)" - set view map - unset surface -diff -U 3 -H -d -r -N -- demo/datastrings.dem demo/datastrings.dem ---- demo/datastrings.dem 2009-03-14 01:11:12.000000000 +0100 -+++ demo/datastrings.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -17,7 +17,7 @@ - set yrange [0:200] - # - set key autotitle columnhead --plot 'ctg-y2.dat' using 2:xticlabel(1) index 2, \ -+plot '@@GNUPLOTDEMOPATH@@ctg-y2.dat' using 2:xticlabel(1) index 2, \ - '' using 2 index 3 - # - pause -1 " to plot again using x2ticlabels" -@@ -38,7 +38,7 @@ - set xtics - # - set key autotitle columnhead --plot 'ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ -+plot '@@GNUPLOTDEMOPATH@@ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ - '' using ($0+0.2):2 index 1 with boxes title " 2000-2001", \ - '' using ($0):2 index 2 with linespoints lw 3 title "runoff 1992-2000", \ - '' using ($0):2:xticlabels(1) index 3 with linespoints lw 3 title " 2000-2001" -@@ -47,7 +47,7 @@ - # - set title "Same plot using x2ticlabels also" - set x2tics --plot 'ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ -+plot '@@GNUPLOTDEMOPATH@@ctg-y2.dat' using ($0-0.2):2 index 0 with boxes title "precipitation 1992-2000", \ - '' using ($0+0.2):2 index 1 with boxes title " 2000-2001", \ - '' using ($0):2 index 2 with linespoints lw 3 title "runoff 1992-2000", \ - '' using ($0):2:x2ticlabels(1) index 3 with linespoints lw 3 title " 2000-2001" -@@ -55,7 +55,7 @@ - pause -1 " to plot same data from table format" - set title "Plot from table format (titles taken from column headers)" - unset x2tics --plot 'table.dat' using ($0-0.2):2 title column(2) with boxes, \ -+plot '@@GNUPLOTDEMOPATH@@table.dat' using ($0-0.2):2 title column(2) with boxes, \ - '' using ($0+0.2):3 title column(3) with boxes, \ - '' using ($0):4 title column(4) with linespoints, \ - '' using ($0):5:xtic(1) title column(5) with linespoints -@@ -63,7 +63,7 @@ - pause -1 " to show double use of y values" - # - set title "Plot actual y-value as a label" --plot 'table.dat' using 0:2 title columnhead with boxes, \ -+plot '@@GNUPLOTDEMOPATH@@table.dat' using 0:2 title columnhead with boxes, \ - '' using 0:2:2 with labels center offset 0,1 notitle - # - pause -1 " continue" -@@ -81,7 +81,7 @@ - set ylabel "Z--->" - set key bottom right - # --plot 'labelplot.pdb' using 7:9 with lines notitle, \ -+plot '@@GNUPLOTDEMOPATH@@labelplot.pdb' using 7:9 with lines notitle, \ - '' using 7:9:4 with labels tc lt 3 font "Helvetica,10" notitle - # '' using 7:9 with points notitle ps 5 lt -1 - # -@@ -95,13 +95,13 @@ - set view 70,210, 1.0,1.7 - set ticslevel 0.0 - --splot 'labelplot.pdb' using 7:8:9 with lines notitle, \ -+splot '@@GNUPLOTDEMOPATH@@labelplot.pdb' using 7:8:9 with lines notitle, \ - '' using 7:8:9:4 with labels left offset 1,0 point \ - ps 2 pt 1 tc lt 3 font "Helvetica,10" notitle - # - pause -1 " to view star map" - # - reset --load "starmap.dem" -+load '@@GNUPLOTDEMOPATH@@starmap.dem' - # - pause -1 " to end demo" -diff -U 3 -H -d -r -N -- demo/fillbetween.dem demo/fillbetween.dem ---- demo/fillbetween.dem 2004-07-09 02:32:34.000000000 +0200 -+++ demo/fillbetween.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -8,7 +8,7 @@ - set style data lines - set xrange [10:*] - set yrange [0:175] --plot 'silver.dat' u 1:2:3 w filledcu, \ -+plot '@@GNUPLOTDEMOPATH@@silver.dat' u 1:2:3 w filledcu, \ - '' u 1:2 lt -1 notitle, '' u 1:3 lt -1 notitle - pause -1 "Hit return to continue" - set style fill pattern 2 -@@ -19,7 +19,7 @@ - set style fill solid 1.0 noborder - set xrange [250:500] - set auto y --plot 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ -+plot '@@GNUPLOTDEMOPATH@@silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ - '' u 1:2:($3+$1/50.) w filledcurves below title 'Below', \ - '' u 1:2 lt -1 lw 2 title 'curve 1', \ - '' u 1:($3+$1/50.) lt 3 lw 2 title 'curve 2' -diff -U 3 -H -d -r -N -- demo/fit.dem demo/fit.dem ---- demo/fit.dem 2004-09-25 05:39:20.000000000 +0200 -+++ demo/fit.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -5,65 +5,66 @@ +--- demo/fit.dem ++++ demo/fit.dem 2009-06-15 14:13:03.358008816 +0200 +@@ -5,6 +5,7 @@ print "Some examples how data fitting using nonlinear least squares fit" print "can be done." print "" -+set fit logfile '/tmp/fit.log' ++set fit logfile "`mktemp /tmp/fit.log.XXXXXX`" pause -1 "first plotting the pure data set (-> return)" set title 'data for first fit demo' --plot 'lcdemo.dat' -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat' - set xlabel "Temperature T [deg Cels.]" - set ylabel "Density [g/cm3]" - set key below - - print "now fitting a straight line to the data :-)" - print "only as a demo without physical meaning" --load 'line.fnc' -+load '@@GNUPLOTDEMOPATH@@line.fnc' - y0 = 0.0 - m = 0.0 - show variables - pause -1 "first a plot with all parameters set to zero (-> return)" - set title 'all fit params set to 0' --plot 'lcdemo.dat', l(x) -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat', l(x) - pause -1 "now start fitting... (-> return)" --fit l(x) 'lcdemo.dat' via y0, m -+fit l(x) '@@GNUPLOTDEMOPATH@@lcdemo.dat' via y0, m - pause -1 "now look at the result (-> return)" - set title 'unweighted fit' --plot 'lcdemo.dat', l(x) -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat', l(x) - - pause -1 "see the influence of weights for single data points (-> return)" --fit l(x) 'lcdemo.dat' using 1:2:3 via y0, m -+fit l(x) '@@GNUPLOTDEMOPATH@@lcdemo.dat' using 1:2:3 via y0, m - pause -1 "now look at the result (-> return)" - set title 'fit weighted towards low temperatures' --plot 'lcdemo.dat', l(x) -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat', l(x) - - pause -1 "now prefer the high temperature data (-> return)" --fit l(x) 'lcdemo.dat' using 1:2:4 via y0, m -+fit l(x) '@@GNUPLOTDEMOPATH@@lcdemo.dat' using 1:2:4 via y0, m - pause -1 "now look at the result (-> return)" - set title 'bias to high-temperates' --plot 'lcdemo.dat', l(x) -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat', l(x) - - print "now use real single-measurement errors to reach such a result (-> return)" - print "(look at the file lcdemo.dat and compare the columns to see the difference)" - pause -1 "(-> return)" - set title 'data with experimental errors' --plot 'lcdemo.dat' using 1:2:5 with errorbars --fit l(x) 'lcdemo.dat' using 1:2:5 via y0, m -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat' using 1:2:5 with errorbars -+fit l(x) '@@GNUPLOTDEMOPATH@@lcdemo.dat' using 1:2:5 via y0, m - pause -1 "now look at the result (-> return)" - set title 'fit weighted by experimental errors' --plot 'lcdemo.dat' using 1:2:5 with errorbars, l(x) -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat' using 1:2:5 with errorbars, l(x) - - print "It's time now to try a more realistic model function" --load 'density.fnc' -+load '@@GNUPLOTDEMOPATH@@density.fnc' - show functions - print "density(x) is a function which shall fit the whole temperature" - print "range using a ?: expression. It contains 6 model parameters which" - print "will all be varied. Now take the start parameters out of the" - pause -1 "file 'start.par' and plot the function (-> return)" --load 'start.par' -+load '@@GNUPLOTDEMOPATH@@start.par' - set title 'initial parameters for realistic model function' --plot 'lcdemo.dat', density(x) --fit density(x) 'lcdemo.dat' via 'start.par' -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat', density(x) -+fit density(x) '@@GNUPLOTDEMOPATH@@lcdemo.dat' via '@@GNUPLOTDEMOPATH@@start.par' - pause -1 "now look at the result (-> return)" - set title 'fitted to realistic model function' --plot 'lcdemo.dat', density(x) -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat', density(x) - - print "looks already rather nice? We will do now the following: set" - print "the epsilon limit higher so that we need more iteration steps" -@@ -76,10 +77,10 @@ - print "" - pause -1 "(-> return)" - FIT_LIMIT = 1e-10 --fit density(x) 'lcdemo.dat' via 'start.par' -+fit density(x) '@@GNUPLOTDEMOPATH@@lcdemo.dat' via '@@GNUPLOTDEMOPATH@@start.par' - pause -1 "now look at the result (-> return)" - set title 'fit with more iterations' --plot 'lcdemo.dat', density(x) -+plot '@@GNUPLOTDEMOPATH@@lcdemo.dat', density(x) - - FIT_LIMIT = 1e-5 - print "\nNow a brief demonstration of 3d fitting." -@@ -96,16 +97,16 @@ - r=0.5 - FIT_MAXITER=50 - set title 'the scattered points, and the initial parameter' --splot 'hemisphr.dat' using 1:2:3, h(x,y) -+splot '@@GNUPLOTDEMOPATH@@hemisphr.dat' using 1:2:3, h(x,y) - pause -1 "(-> return)" - - # we *must* provide 4 columns for a 3d fit. We fake errors=1 --fit h(x,y) 'hemisphr.dat' using 1:2:3:(1) via r, x0, y0, z0 -+fit h(x,y) '@@GNUPLOTDEMOPATH@@hemisphr.dat' using 1:2:3:(1) via r, x0, y0, z0 - set title 'the scattered points, fitted curve' --splot 'hemisphr.dat' using 1:2:3, h(x,y) -+splot '@@GNUPLOTDEMOPATH@@hemisphr.dat' using 1:2:3, h(x,y) - print "\n\nNotice, however, that this would converge much faster when" - print "fitted in a more appropriate co-ordinate system:" --print "fit r 'hemisphr.dat' using 0:($1*$1+$2*$2+$3*$3) via r" -+print "fit r '@@GNUPLOTDEMOPATH@@hemisphr.dat' using 0:($1*$1+$2*$2+$3*$3) via r" - print "where we are fitting f(x)=r to the radii calculated as the data" - print "is read from the file. No x value is required in this case." - pause -1 "(This is left as an excercise for the user). (-> return)" -@@ -118,18 +119,18 @@ - print "The model uses these data in order to fit elastic stiffnesses" - print "which occur differently in both branches.\n" - pause -1 "(-> return)" --load 'hexa.fnc' --load 'sound.par' -+load '@@GNUPLOTDEMOPATH@@hexa.fnc' -+load '@@GNUPLOTDEMOPATH@@sound.par' - set title 'sound data, and model with initial parameters' --plot 'soundvel.dat', vlong(x), vtrans(x) -+plot '@@GNUPLOTDEMOPATH@@soundvel.dat', vlong(x), vtrans(x) +@@ -125,7 +126,7 @@ plot 'soundvel.dat', vlong(x), vtrans(x) # Must provide an error estimate for a 3d fit. Use constant 1 --fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via 'sound.par' -+fit f(x,y) '@@GNUPLOTDEMOPATH@@soundvel.dat' using 1:-2:2:(1) via '@@GNUPLOTDEMOPATH@@sound.par' + fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via 'sound.par' #create soundfit.par, reading from sound.par and updating values -update 'sound.par' 'soundfit.par' -+update '@@GNUPLOTDEMOPATH@@sound.par' '/tmp/soundfit.par' ++update 'sound.par' "`mktemp /tmp/soundfit.par.XXXXXX`" print "" pause -1 "(-> return)" set title 'pseudo-3d multi-branch fit to velocity data' --plot 'soundvel.dat', vlong(x), vtrans(x) -+plot '@@GNUPLOTDEMOPATH@@soundvel.dat', vlong(x), vtrans(x) - print "Look at the file 'hexa.fnc' to see how the branches are realized" - print "using the data index as a pseudo-3d fit" - print "" -@@ -138,10 +139,10 @@ - print "fitting result." - print "" - pause -1 "(-> return)" --load 'sound.par' --fit f(x,y) 'soundvel.dat' every 5 using 1:-2:2:(1) via 'sound.par' -+load '@@GNUPLOTDEMOPATH@@sound.par' -+fit f(x,y) '@@GNUPLOTDEMOPATH@@soundvel.dat' every 5 using 1:-2:2:(1) via '@@GNUPLOTDEMOPATH@@sound.par' - set title 'fitted only every 5th data point' --plot 'soundvel.dat', vlong(x), vtrans(x) -+plot '@@GNUPLOTDEMOPATH@@soundvel.dat', vlong(x), vtrans(x) - print "When you compare the results (see 'fit.log') you remark that" - print "the uncertainties in the fitted constants have become larger," - print "the quality of the plot is only slightly affected." -@@ -150,24 +151,24 @@ - print "you fit only the others (c44 and c13 fixed here)." - print "" - pause -1 "(-> return)" --load 'sound2.par' -+load '@@GNUPLOTDEMOPATH@@sound2.par' - set title 'initial parameters' --plot 'soundvel.dat', vlong(x), vtrans(x) --fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via 'sound2.par' -+plot '@@GNUPLOTDEMOPATH@@soundvel.dat', vlong(x), vtrans(x) -+fit f(x,y) '@@GNUPLOTDEMOPATH@@soundvel.dat' using 1:-2:2:(1) via '@@GNUPLOTDEMOPATH@@sound2.par' - set title 'fit with c44 and c13 fixed' --plot 'soundvel.dat', vlong(x), vtrans(x) -+plot '@@GNUPLOTDEMOPATH@@soundvel.dat', vlong(x), vtrans(x) - print "This has the same effect as specifying only the real free" - print "parameters by the 'via' syntax." - print "" - print "fit f(x) 'soundvel.dat' via c33, c11, phi0" - print "" - pause -1 "(-> return)" --load 'sound.par' -+load '@@GNUPLOTDEMOPATH@@sound.par' - set title 'initial parameters' --plot 'soundvel.dat', vlong(x), vtrans(x) --fit f(x,y) 'soundvel.dat' using 1:-2:2:(1) via c33, c11, phi0 -+plot '@@GNUPLOTDEMOPATH@@soundvel.dat', vlong(x), vtrans(x) -+fit f(x,y) '@@GNUPLOTDEMOPATH@@soundvel.dat' using 1:-2:2:(1) via c33, c11, phi0 - set title 'fit via c33,c11,phi0' --plot 'soundvel.dat', vlong(x), vtrans(x) -+plot '@@GNUPLOTDEMOPATH@@soundvel.dat', vlong(x), vtrans(x) - - print "Here comes an example of a very complex function..." - print "" -@@ -177,10 +178,10 @@ - set ylabel "Reflectivity" - set title 'raw data' - #HBB 970522: here and below, use the error column present in moli3.dat: --plot 'moli3.dat' w e -+plot '@@GNUPLOTDEMOPATH@@moli3.dat' w e - - print "now fitting the model function to the data" --load 'reflect.fnc' -+load '@@GNUPLOTDEMOPATH@@reflect.fnc' - - #HBB 970522: Changed initial values to something sensible, i.e. - # something an experienced user of fit would actually use. -@@ -193,9 +194,9 @@ - show functions - pause -1 "first a plot with all parameters set to initial values (-> return)" - set title 'initial parameters' --plot 'moli3.dat' w e, R(x) -+plot '@@GNUPLOTDEMOPATH@@moli3.dat' w e, R(x) - pause -1 "now start fitting... (-> return)" --fit R(x) 'moli3.dat' u 1:2:3 via eta, tc -+fit R(x) '@@GNUPLOTDEMOPATH@@moli3.dat' u 1:2:3 via eta, tc - pause -1 "Hit return to continue" - set title 'fitted parameters' - replot -diff -U 3 -H -d -r -N -- demo/hidden.dem demo/hidden.dem ---- demo/hidden.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/hidden.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -48,7 +48,7 @@ - # autoranging loses the verticals - set xrange [0:15] - set yrange [0:15] --splot "glass.dat" using 1 -+splot "@@GNUPLOTDEMOPATH@@glass.dat" using 1 - pause -1 "Hit return to continue (6)" - - set view 50 -diff -U 3 -H -d -r -N -- demo/histograms.dem demo/histograms.dem ---- demo/histograms.dem 2009-03-14 01:11:12.000000000 +0100 -+++ demo/histograms.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -9,7 +9,7 @@ - # First plot using linespoints - set style data linespoints - set key autotitle columnhead --plot 'immigration.dat' using 2:xtic(1), \ -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using 2:xtic(1), \ - '' u 3, '' u 4, '' u 5, '' u 6, \ - '' u 7, '' u 8, '' u 9, '' u 10, \ - '' u 11, '' u 12, '' u 13, '' u 14, \ -@@ -27,7 +27,7 @@ - set boxwidth 0.9 - set xtic rotate by -45 - #set bmargin 10 --plot 'immigration.dat' using 6:xtic(1) ti col, '' u 12 ti col, '' u 13 ti col, '' u 14 ti col -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using 6:xtic(1) ti col, '' u 12 ti col, '' u 13 ti col, '' u 14 ti col - # - pause -1 " to change the gap between clusters" - # -@@ -52,7 +52,7 @@ - set style fill solid border -1 - set boxwidth 0.75 - # --plot 'immigration.dat' using 2:xtic(1), \ -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using 2:xtic(1), \ - '' using 3, \ - '' using 4, \ - '' using 5, \ -@@ -90,7 +90,7 @@ - set style fill solid border -1 - set boxwidth 0.75 - # --plot 'immigration.dat' using (100.*$2/$24):xtic(1) title column(2), \ -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using (100.*$2/$24):xtic(1) title column(2), \ - '' using (100.*$3/$24) title column(3), \ - '' using (100.*$4/$24) title column(4), \ - '' using (100.*$5/$24) title column(5), \ -@@ -129,7 +129,7 @@ - set ytics - unset xtics - set xtics norotate nomirror --plot 'immigration.dat' using 6 ti col, '' using 12 ti col, \ -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using 6 ti col, '' using 12 ti col, \ - '' using 13 ti col, '' using 14:key(1) ti col - # - pause -1 "Next we do several sets of parallel histograms" -@@ -150,7 +150,7 @@ - set auto y - plot \ - newhistogram "Northern Europe", \ --'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ -+'@@GNUPLOTDEMOPATH@@immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ - newhistogram "Southern Europe", \ - '' u 9:xtic(1), '' u 17, '' u 22, \ - newhistogram "British Isles", \ -diff -U 3 -H -d -r -N -- demo/histograms2.dem demo/histograms2.dem ---- demo/histograms2.dem 2009-03-14 01:11:12.000000000 +0100 -+++ demo/histograms2.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -26,7 +26,7 @@ - # - plot \ - newhistogram "Northern Europe", \ --'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ -+'@@GNUPLOTDEMOPATH@@immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ - newhistogram "Southern Europe", \ - '' u 9:xtic(1), '' u 17, '' u 22, \ - newhistogram "British Isles", \ -@@ -36,7 +36,7 @@ - set title "Explicit start color in 'newhistogram' command" - plot \ - newhistogram "Northern Europe" lt 4, \ --'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ -+'@@GNUPLOTDEMOPATH@@immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ - newhistogram "Southern Europe" lt 4, \ - '' u 9:xtic(1), '' u 17, '' u 22, \ - newhistogram "British Isles" lt 4, \ -@@ -48,7 +48,7 @@ - set style fill pattern 1 border -1 - plot \ - newhistogram "Northern Europe" fs pattern 1, \ --'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ -+'@@GNUPLOTDEMOPATH@@immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ - newhistogram "Southern Europe" fs pattern 1, \ - '' u 9:xtic(1), '' u 17, '' u 22, \ - newhistogram "British Isles" fs pattern 1, \ -@@ -60,7 +60,7 @@ - set style fill pattern 1 border -1 - plot \ - newhistogram "Northern Europe" lt 2 fs pattern 1, \ --'immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ -+'@@GNUPLOTDEMOPATH@@immigration.dat' using 6:xtic(1), '' u 13, '' u 14, \ - newhistogram "Southern Europe" lt 2 fs pattern 1, \ - '' u 9:xtic(1), '' u 17, '' u 22, \ - newhistogram "British Isles" lt 2 fs pattern 1, \ -diff -U 3 -H -d -r -N -- demo/image.dem demo/image.dem ---- demo/image.dem 2006-12-28 22:19:20.000000000 +0100 -+++ demo/image.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -32,7 +32,7 @@ - set xrange [-10:137] - set yrange [-10:157] - set label "\"I flew here... by plane. Why? For the halibut.\"" at 64,135 center --plot 'blutux.rgb' binary array=128x128 flipy format='%uchar' with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar' with rgbimage - pause -1 "Hit return to continue" - reset - -@@ -58,10 +58,10 @@ - set yrange [-10:300] +--- demo/poldat.dem ++++ demo/poldat.dem 2009-05-09 13:32:24.000000000 +0200 +@@ -11,7 +11,7 @@ + unset polar + set title "Primitive Smith Chart" unset key - set label "\"Time for a dip...\"" at 132,285 center --plot 'blutux.rgb' binary array=128x128 flipy center=( 64,201 ) format='%uchar' with rgbimage, \ -- 'blutux.rgb' binary array=128x128 flipy rotation=-90d center=(201,201) format='%uchar' with rgbimage, \ -- 'blutux.rgb' binary array=128x128 flip=y rotate=3.1415 center=(201,64) format='%uchar' with rgbimage, \ -- 'blutux.rgb' binary array=128x128 flip=y rot=0.5pi center=(64,64) format='%uchar' using 1:2:3 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy center=( 64,201 ) format='%uchar' with rgbimage, \ -+ '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy rotation=-90d center=(201,201) format='%uchar' with rgbimage, \ -+ '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y rotate=3.1415 center=(201,64) format='%uchar' with rgbimage, \ -+ '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y rot=0.5pi center=(64,64) format='%uchar' using 1:2:3 with rgbimage - pause -1 "Hit return to continue" - reset - -@@ -82,7 +82,7 @@ - set label 1 "\"I am the penguin, GOO GOO GOO JOOB.\"" at 63,140 center - set title "Palette mode 'image' used to produce psychedelic bird" - unset colorbox --plot 'blutux.rgb' binary array=128x128 flipy format='%uchar%uchar%uchar' using ($1+$2+$3) with image -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar%uchar%uchar' using ($1+$2+$3) with image - pause -1 "Hit return to continue" - reset - -@@ -106,7 +106,7 @@ - set title "The palette can be changed from color to gray scale" - set palette gray - unset colorbox --plot 'blutux.rgb' binary array=128x128 flipy format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image - pause -1 "Hit return to continue" - unset label 1 - -@@ -133,7 +133,7 @@ - set colorbox - set cbrange [0:255] - set title "As with 3d color surfaces, a color box may be added to the plot" --splot 'blutux.rgb' binary array=128x128 flipy format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image -+splot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image - pause -1 "Hit return to continue" - - print "" -@@ -162,7 +162,7 @@ - set tics out - set title "Polygons used to draw pixels for rotated images\nNotice the slower refresh rate than for the next plot" - unset colorbox --plot 'blutux.rgb' binary array=128x128 dx=0.70711 dy=0.70711 flipy rotation=45d center=(63.5,63.5) format='%uchar' using ($1+$2+$3)/3 with image -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 dx=0.70711 dy=0.70711 flipy rotation=45d center=(63.5,63.5) format='%uchar' using ($1+$2+$3)/3 with image - pause -1 "Hit return to continue" - reset - -@@ -182,7 +182,7 @@ - set tics out - set title "Terminal image routine used to draw plot rotated about origin\nNotice the faster refresh rate than for the previous plot" - unset colorbox --plot 'blutux.rgb' binary array=128x128 dx=1 flip=y rotation=0.5pi origin=(0,0) format='%uchar' using ($1+$2+$3)/3 with image -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 dx=1 flip=y rotation=0.5pi origin=(0,0) format='%uchar' using ($1+$2+$3)/3 with image - pause -1 "Hit return to continue" - reset - -@@ -205,20 +205,20 @@ - set tics out - set label 1 "Selection of the input channels via \`using\`" at 140,160 center - set title '"I do impersonations..."' offset 0,-0.5 --plot 'blutux.rgb' binary array=128x128 flip=y format='%uchar' using 1:2:3 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y format='%uchar' using 1:2:3 with rgbimage - unset label 1 - set size 0.5,0.48 - set origin 0.5,0.47 - set title '"A cardinal."' --plot 'blutux.rgb' binary array=128x128 flip=y format='%uchar%*uchar%*uchar' using 1:(0):(0) with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y format='%uchar%*uchar%*uchar' using 1:(0):(0) with rgbimage - set size 0.5,0.48 - set origin 0.0,0.0 - set title '"A parrot."' --plot 'blutux.rgb' binary array=128x128 flipy format='%*uchar%uchar%*uchar' using (0):1:(0) with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%*uchar%uchar%*uchar' using (0):1:(0) with rgbimage - set size 0.5,0.48 - set origin 0.5,0.0 - set title '"A bluebird."' --plot 'blutux.rgb' binary array=128x128 flipy format='%*uchar%*uchar%uchar' using (0):(0):1 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%*uchar%*uchar%uchar' using (0):(0):1 with rgbimage - unset multiplot - pause -1 "Hit return to continue" - reset -@@ -248,23 +248,23 @@ - set label 1 "Luminance adjustment via \`cbrange\`" at 140,160 center - set title 'Lake Mendota, "or Wonk-sheck-ho-mik-la!"' offset 0,-0.5 - set cbrange [*:*] --plot 'blutux.rgb' binary array=128x128 flipy format='%uchar' using 1:2:3 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar' using 1:2:3 with rgbimage - unset label 1 - set size 0.5,0.48 - set origin 0.5,0.47 - set title '"Lucky I brought sunscreen."' - set cbrange [0:200] --plot 'blutux.rgb' binary array=128x128 flip=y format='%uchar' using 1:2:3 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y format='%uchar' using 1:2:3 with rgbimage - set size 0.5,0.48 - set origin 0.0,0.0 - set title 'Sunset on the Terrace' - set cbrange [0:400] --plot 'blutux.rgb' binary array=128x128 flip=y format='%uchar' using (1.5*$1):2:3 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y format='%uchar' using (1.5*$1):2:3 with rgbimage - set size 0.5,0.48 - set origin 0.5,0.0 - set title 'Sultry evening' - set cbrange [0:400] --plot 'blutux.rgb' binary array=128x128 flipy format='%uchar' using 1:2:3 with rgbimage, '-' w points pt 7 ps 6 lt -2, '-' w points pt 7 ps 0.65 lt -2 -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar' using 1:2:3 with rgbimage, '-' w points pt 7 ps 6 lt -2, '-' w points pt 7 ps 0.65 lt -2 - 110 100 - e - 10 95 -@@ -295,8 +295,8 @@ - set title "Convex November 1-7 1989 Circadian" - set key left box - set xrange[-1:24] --plot 'using.bin' binary format='%*int32%int8%*int16%int8%*int16%*int16' using 1:2 title "Logged in" with impulses,\ -- 'using.bin' binary format='%*int32%int8%*int16%int8%*int16%*int16' using 1:2 title "Logged in" with points -+plot '@@GNUPLOTDEMOPATH@@using.bin' binary format='%*int32%int8%*int16%int8%*int16%*int16' using 1:2 title "Logged in" with impulses,\ -+ '@@GNUPLOTDEMOPATH@@using.bin' binary format='%*int32%int8%*int16%int8%*int16%*int16' using 1:2 title "Logged in" with points - pause -1 "Hit return to continue" - reset - -@@ -308,9 +308,9 @@ - set title "Convex November 1-7 1989" - set key below - set label "(Weekend)" at 5,25 center --plot 'using.bin' binary format='%*int32%*int8%int16%int8%*int16%*int16' using ($1/100):2 title "Logged in" with impulses,\ -- 'using.bin' binary format='%*int32%*int8%int16%*int8%int16%*int16' using ($1/100):($2/100) t "Load average" with points,\ -- 'using.bin' binary format='%*int32%*int8%int16%*int8%*int16%int16' using ($1/100):($2/100) t "%CPU used" with lines -+plot '@@GNUPLOTDEMOPATH@@using.bin' binary format='%*int32%*int8%int16%int8%*int16%*int16' using ($1/100):2 title "Logged in" with impulses,\ -+ '@@GNUPLOTDEMOPATH@@using.bin' binary format='%*int32%*int8%int16%*int8%int16%*int16' using ($1/100):($2/100) t "Load average" with points,\ -+ '@@GNUPLOTDEMOPATH@@using.bin' binary format='%*int32%*int8%int16%*int8%*int16%int16' using ($1/100):($2/100) t "%CPU used" with lines - unset label - pause -1 "Hit return to continue" - reset -@@ -422,7 +422,7 @@ - set xrange [-10:137] - set yrange [-10:157] - set cbrange [0:255] --splot 'blutux.rgb' binary array=128x128 flip=y format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image -+splot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image - pause -1 "Hit return to continue" - reset - -@@ -433,7 +433,7 @@ - print "" - unset colorbox - set title "Orientation operations from \'plot\' also apply to to \'splot\'" --splot 'blutux.rgb' binary array=128x128 flipy rotate=90d center = (63.5,63.5,50) format='%uchar%uchar%uchar' using ($1+$2+$3) with image -+splot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy rotate=90d center = (63.5,63.5,50) format='%uchar%uchar%uchar' using ($1+$2+$3) with image - pause -1 "Hit return to continue" - reset - -@@ -456,7 +456,7 @@ - set arrow from 0,-10,0 to 0,10,0 as 1 - set arrow from 0,0,-10 to 0,0,10 as 1 - set arrow from 0,0,0 to 30,30,30 as 2 --splot 'blutux.rgb' binary array=128x128 flipy rot=1.0pi center = (63.5,63.5,50) perp=(1,1,1) format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image -+splot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy rot=1.0pi center = (63.5,63.5,50) perp=(1,1,1) format='%uchar%uchar%uchar' using ($1+$2+$3)/3 with image - pause -1 "Hit return to continue" - reset - -@@ -542,7 +542,7 @@ - set xrange [-1.3:1.3] - set yrange [-1.3:1.3] - # The sinusoid has period T=8/7. Also, dx=0.01. So solving 8/7 dt = 2/3 pi dx, we get dt = 0.018326. --plot 'sine.bin' binary endian=little array=201 dt=0.018326 origin=(0,0) format='%f' using 1 with lines -+plot '@@GNUPLOTDEMOPATH@@sine.bin' binary endian=little array=201 dt=0.018326 origin=(0,0) format='%f' using 1 with lines - pause -1 "Hit return to continue" - reset - -@@ -565,10 +565,10 @@ - set xrange [-3:15] - set yrange [-3:15] - set zrange [-0.2:1.2] --splot "binary3" binary center=(1.5,1.5,0), \ -- "binary3" binary center=(10.5,1.5,0) rotate=0.5pi u 1:2:3, \ -- "binary3" binary center=(10.5,10.5,0) rotate=1.0pi u 1:2:3, \ -- "binary3" binary center=(1.5,10.5,0) rotate=1.5pi u 1:2:3 -+splot '@@GNUPLOTDEMOPATH@@binary3' binary center=(1.5,1.5,0), \ -+ '@@GNUPLOTDEMOPATH@@binary3' binary center=(10.5,1.5,0) rotate=0.5pi u 1:2:3, \ -+ '@@GNUPLOTDEMOPATH@@binary3' binary center=(10.5,10.5,0) rotate=1.0pi u 1:2:3, \ -+ '@@GNUPLOTDEMOPATH@@binary3' binary center=(1.5,10.5,0) rotate=1.5pi u 1:2:3 - pause -1 "Hit return to continue" - reset - -@@ -588,16 +588,16 @@ - set view 70,45 - set xrange [-3:3] - set yrange [-3:3] --splot "binary2" binary -+splot '@@GNUPLOTDEMOPATH@@binary2' binary - pause -1 "Hit return to continue" - set title "Decimate by two in first dimension" --splot "binary2" binary every 2 -+splot '@@GNUPLOTDEMOPATH@@binary2' binary every 2 - pause -1 "Hit return to continue" - set title "Decimate by three in second dimension" --splot "binary2" binary every :3 -+splot '@@GNUPLOTDEMOPATH@@binary2' binary every :3 - pause -1 "Hit return to continue" - set title "Decimate by four in both dimensions" --splot "binary2" binary every 4:4 -+splot '@@GNUPLOTDEMOPATH@@binary2' binary every 4:4 - pause -1 "Hit return to continue" - reset - -@@ -609,13 +609,13 @@ - set xrange [28:98] - set yrange [55:125] - set label 1 "\"Can I do that?\"" at 64,116 center --plot 'blutux.rgb' binary array=128x128 flipy format='%uchar' every 1:1:43:15:83:65 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar' every 1:1:43:15:83:65 with rgbimage - pause -1 "Hit return to continue" - set title "... Sure, go ahead." - set xrange [-10:130] - set yrange [-8:157] - set label 1 "\"Picasso's \'Penguin on Beach\'\"" at 64,139 center --plot 'blutux.rgb' binary array=128x128 flipy format='%uchar' every 8:8 with rgbimage -+plot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy format='%uchar' every 8:8 with rgbimage - pause -1 "Hit return to continue" - reset - -@@ -635,7 +635,7 @@ - print "line can still be used to over-ride in-file attributes." - print "" - set title "Automatically recognizing file type and extracting file information" --plot 'demo.edf' binary filetype=auto with image -+plot '@@GNUPLOTDEMOPATH@@demo.edf' binary filetype=auto with image - pause -1 "Hit return to continue" - reset - -@@ -748,19 +748,19 @@ - unset key - set tics out - set title "'asciimat.dat' matrix index 0" --splot 'asciimat.dat' matrix index 0 -+splot '@@GNUPLOTDEMOPATH@@asciimat.dat' matrix index 0 - set size 0.5,0.5 - set origin 0.5,0.5 - set title "'asciimat.dat' matrix index 1" --splot 'asciimat.dat' matrix index 1 -+splot '@@GNUPLOTDEMOPATH@@asciimat.dat' matrix index 1 - set size 0.5,0.5 - set origin 0.0,0.0 - set title "'asciimat.dat' matrix index 2" --splot 'asciimat.dat' matrix index 2 -+splot '@@GNUPLOTDEMOPATH@@asciimat.dat' matrix index 2 - set size 0.5,0.5 - set origin 0.5,0.0 - set title "'asciimat.dat' matrix index 2 using 1:(2*$2):($3*$3)" --splot 'asciimat.dat' matrix index 2 using 1:(2*$2):($3*$3) -+splot '@@GNUPLOTDEMOPATH@@asciimat.dat' matrix index 2 using 1:(2*$2):($3*$3) - unset multiplot - pause -1 "Hit return to continue" - reset -@@ -782,8 +782,8 @@ - set lmargin 0 - set view 60, 45, 1, 1 - set label 1 "\"Mirror mirror on the wall,\nwho's the GNUiest penguin of all?\"" at 140,0,40 center --splot 'blutux.rgb' binary array=128x128 flip=y rot=90d origin=(0,0,0) perp = (1,0,0) format='%uchar' using ($1+$2+$3) with image, \ -- 'blutux.rgb' binary array=128x128 flipy rot=90d origin=(+137,+137,0) perp=(0,1,0) format='%uchar' using ($1+$2+$3) with image -+splot '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flip=y rot=90d origin=(0,0,0) perp = (1,0,0) format='%uchar' using ($1+$2+$3) with image, \ -+ '@@GNUPLOTDEMOPATH@@blutux.rgb' binary array=128x128 flipy rot=90d origin=(+137,+137,0) perp=(0,1,0) format='%uchar' using ($1+$2+$3) with image - pause -1 "Hit return to continue" - reset - -diff -U 3 -H -d -r -N -- demo/layout.dem demo/layout.dem ---- demo/layout.dem 2005-08-08 11:13:02.000000000 +0200 -+++ demo/layout.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -8,7 +8,7 @@ - plot sin(x)/x - # - set title "Plot 2" --plot 'silver.dat' using 1:2 ti 'silver.dat' -+plot '@@GNUPLOTDEMOPATH@@silver.dat' using 1:2 ti 'silver.dat' - # - set style histogram columns - set style fill solid -@@ -17,7 +17,7 @@ - set format y " " - set tics scale 0 - set title "Plot 3" --plot 'immigration.dat' using 2 with histograms, \ -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using 2 with histograms, \ - '' using 7 with histograms , \ - '' using 8 with histograms , \ - '' using 11 with histograms -@@ -36,7 +36,7 @@ - plot sin(x)/x - # - set title "Plot 2" --plot 'silver.dat' using 1:2 ti 'silver.dat' -+plot '@@GNUPLOTDEMOPATH@@silver.dat' using 1:2 ti 'silver.dat' - # - set title "Plot 3" - set style histogram columns -@@ -45,7 +45,7 @@ - set boxwidth 0.8 - set format y " " - set tics scale 0 --plot 'immigration.dat' using 2 with histograms , \ -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using 2 with histograms , \ - '' using 7 with histograms , \ - '' using 8 with histograms , \ - '' using 11 with histograms -@@ -65,7 +65,7 @@ - plot sin(x)/x - # - set title "Plot 2" --plot 'silver.dat' using 1:2 ti 'silver.dat' -+plot '@@GNUPLOTDEMOPATH@@silver.dat' using 1:2 ti 'silver.dat' - # - set title "Plot 3" - set style histogram columns -@@ -74,7 +74,7 @@ - set boxwidth 0.8 - set format y " " - set tics scale 0 --plot 'immigration.dat' using 2 with histograms , \ -+plot '@@GNUPLOTDEMOPATH@@immigration.dat' using 2 with histograms , \ - '' using 7 with histograms , \ - '' using 8 with histograms , \ - '' using 11 with histograms -diff -U 3 -H -d -r -N -- demo/mgr.dem demo/mgr.dem ---- demo/mgr.dem 2004-01-13 08:01:10.000000000 +0100 -+++ demo/mgr.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -7,7 +7,7 @@ - set ylabel "Amplitude" - set key box - set title "Bragg reflection -- Peak only" --plot "big_peak.dat" title "Rate" with errorbars, \ -+plot "@@GNUPLOTDEMOPATH@@big_peak.dat" title "Rate" with errorbars, \ - "" smooth csplines t "Rate" - pause -1 "You would draw smaller bars? (-> return)" - set bars small -@@ -19,16 +19,16 @@ - set xlabel "Time (sec)" - set ylabel "Rate" - set title "Ag 108 decay data" --plot "silver.dat" t "experimental" w errorb, \ -+plot "@@GNUPLOTDEMOPATH@@silver.dat" t "experimental" w errorb, \ - "" smooth csplines t "cubic smooth" - # error is column 3; weight larger errors less - # start with rel error = 1/($3/$2) - pause -1 "Now apply a smoothing spline, weighted by 1/rel error (-> return)" - S=1 --plot "silver.dat" t "experimental" w errorb,\ -+plot "@@GNUPLOTDEMOPATH@@silver.dat" t "experimental" w errorb,\ - "" u 1:2:(S*$2/$3) smooth acsplines t "acspline Y/Z" - pause -1 "Make it smoother by changing the smoothing weights (-> return)" --plot "silver.dat" t "rate" w errorb,\ -+plot "@@GNUPLOTDEMOPATH@@silver.dat" t "rate" w errorb,\ - "" u 1:2:($2/($3*1.e1)) sm acs t "acspline Y/(Z*1.e1)",\ - "" u 1:2:($2/($3*1.e3)) sm acs t " Y/(Z*1.e3)",\ - "" u 1:2:($2/($3*1.e5)) sm acs t " Y/(Z*1.e5)" -@@ -37,11 +37,11 @@ - replot - pause -1 "Now approximate the data with a bezier curve between the endpoints (-> return)" - unset logscale y --plot "silver.dat" t "experimental" w errorb,\ -+plot "@@GNUPLOTDEMOPATH@@silver.dat" t "experimental" w errorb,\ - "" smooth sbezier t "bezier" - pause -1 "You would rather use log-scales ? (-> return)" - set logscale y --plot "silver.dat" t "rate" w errorb, \ -+plot "@@GNUPLOTDEMOPATH@@silver.dat" t "rate" w errorb, \ - "" smooth sbezier t "bezier" - # - pause -1 "Errorbar demo (-> return)" -@@ -51,26 +51,26 @@ - set ylabel "Power [W]" - set title "UM1-Cell Power" - n(x)=1.53**2*x/(5.67+x)**2 --plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines - pause -1 "Would you like boxes? (-> return)" --plot [0:50] "battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" t "Power" with boxxy, n(x) t "Theory" w lines - pause -1 "Only X-Bars? (-> return)" --plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines - pause -1 "Only Y-Bars? (-> return)" --plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines - pause -1 "Logscaled? (-> return)" - set logscale y --plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines - pause -1 "X as well? (-> return)" - set logscale xy --plot [1:50] "battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines -+plot [1:50] "@@GNUPLOTDEMOPATH@@battery.dat" t "Power" w xyerr, n(x) t "Theory" w lines - pause -1 "If you like bars without tics (-> return)" - unset logscale - set bars small --plot [0:50] "battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" t "Power" with xyerrorbars, n(x) t "Theory" w lines - pause -1 "X-Bars only (-> return)" --plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines - pause -1 "Y-Bars only (-> return)" --plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines -+plot [0:50] "@@GNUPLOTDEMOPATH@@battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines - reset - -diff -U 3 -H -d -r -N -- demo/multimsh.dem demo/multimsh.dem ---- demo/multimsh.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/multimsh.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -9,40 +9,40 @@ - set zrange [-2:2] - set style data line - set title "Demo of multiple mesh per file capability - Digitized Blue Whale" --splot "whale.dat" -+splot "@@GNUPLOTDEMOPATH@@whale.dat" - pause -1 "Press Return" - set title "Demo of multiple mesh per file capability - Digitized Blue Whale" - set xlabel "Mesh or Network 0" --splot "whale.dat" index 0 -+splot "@@GNUPLOTDEMOPATH@@whale.dat" index 0 - pause -1 "Press Return" - - set autoscale z - set xlabel "Mesh or Network 6" - set autoscale z --splot "whale.dat" index 6 using 3:2:1 -+splot "@@GNUPLOTDEMOPATH@@whale.dat" index 6 using 3:2:1 - pause -1 "Press Return" - - set zrange [-2:2] - set xlabel "Mesh or Network 12" --splot "whale.dat" index 12 with points -+splot "@@GNUPLOTDEMOPATH@@whale.dat" index 12 with points - pause -1 "Press Return" - - set xlabel "Mesh or Network 13" --splot "whale.dat" i 13 -+splot "@@GNUPLOTDEMOPATH@@whale.dat" i 13 - pause -1 "Press Return - A Loop over Indices could be done with reread" - - # #file "loop" - # maxmsh = 16 - # ind = (ind + 1)%maxmsh --# splot "whale.dat" i ind -+# splot "@@GNUPLOTDEMOPATH@@whale.dat" i ind - # reread "loop" - - set xlabel "Mesh or Network 4" --splot "whale.dat" i 4 -+splot "@@GNUPLOTDEMOPATH@@whale.dat" i 4 - pause -1 "Press Return" - - set xlabel "Mesh or Network 5" --splot "whale.dat" i 5 -+splot "@@GNUPLOTDEMOPATH@@whale.dat" i 5 - pause -1 "Press Return" - - reset -diff -U 3 -H -d -r -N -- demo/pm3d.dem demo/pm3d.dem ---- demo/pm3d.dem 2007-01-19 22:15:47.000000000 +0100 -+++ demo/pm3d.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -8,7 +8,7 @@ - # Otherwise you can use the output to postscript, for example: - # set term push; set term postscript color enhanced - # set out 'pm3d_demo.ps' --# load 'pm3d.dem' -+# load '@@GNUPLOTDEMOPATH@@pm3d.dem' - # set out; set term pop - - # Prepared by Petr Mikulik -@@ -230,7 +230,7 @@ - set pm3d flush begin - set title "Datafile with different nb of points in scans; pm3d flush begin" - set pm3d flush begin noftriangles scansforward --splot 'triangle.dat' -+splot '@@GNUPLOTDEMOPATH@@triangle.dat' - #show pm3d - pause -1 "Hit return to continue" - -@@ -249,7 +249,7 @@ - set pm3d flush begin - set title "Data with different nb of points in scans; pm3d ftriangles flush begin" - set pm3d flush begin ftriangles scansforward --splot 'triangle.dat' -+splot '@@GNUPLOTDEMOPATH@@triangle.dat' - #show pm3d - pause -1 "Hit return to continue" - -@@ -332,12 +332,12 @@ - set pm3d map - - set xrange [0:2] --splot 'clip14in.dat' -+splot '@@GNUPLOTDEMOPATH@@clip14in.dat' - pause -1 "Hit return to continue" - - set xrange [0:1.5] - set yrange [*:*] --set title "...and now xrange is [0:1.5] and 'set pm3d clip1in'" -+set title "... and now xrange is [0:1.5] and \'set pm3d clip1in\'" - set pm3d clip1in - replot - pause -1 "Hit return to continue" -@@ -360,19 +360,19 @@ - - set pm3d at s explicit - --# 'binary2' binary u 1:2:(column(3)+column(-1)/20.0):3 w pm3d, -+# '@@GNUPLOTDEMOPATH@@binary2' binary u 1:2:(column(3)+column(-1)/20.0):3 w pm3d, - - splot \ -- 'binary2' binary u 1:2:3:($2+($1+$2)/10) w pm3d, \ -+ '@@GNUPLOTDEMOPATH@@binary2' binary u 1:2:3:($2+($1+$2)/10) w pm3d, \ - 1+sinc(x*4, y*4) w l - pause -1 "Hit return to continue" - - set title "coloring according to the 3rd 'using' parameter (left) and to the z-value (bottom)" - set border 895 - splot \ -- 'binary2' binary u 2:(12 - column(3) * 10):1 notitle w lines, \ -- 'binary2' binary u (-12 + column(3) * 10):2:1:(-12 + column(3) * 10) notitle w pm3d, \ -- 'binary2' binary u 1:2:(column(3) * 10 - 12) notitle w pm3d -+ '@@GNUPLOTDEMOPATH@@binary2' binary u 2:(12 - column(3) * 10):1 notitle w lines, \ -+ '@@GNUPLOTDEMOPATH@@binary2' binary u (-12 + column(3) * 10):2:1:(-12 + column(3) * 10) notitle w pm3d, \ -+ '@@GNUPLOTDEMOPATH@@binary2' binary u 1:2:(column(3) * 10 - 12) notitle w pm3d - - pause -1 "Hit return to continue" - -diff -U 3 -H -d -r -N -- demo/pointsize.dem demo/pointsize.dem ---- demo/pointsize.dem 2006-02-23 09:10:57.000000000 +0100 -+++ demo/pointsize.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -13,16 +13,16 @@ - # plot a 2D map with locations marked by variable sized points - # - set title "plot with variable size points" --plot 'world.dat' with lines lt 3, \ -- 'world.cor' using 1:2:(5.*rand(0)) with points lt 1 pt 6 ps variable -+plot '@@GNUPLOTDEMOPATH@@world.dat' with lines lt 3, \ -+ '@@GNUPLOTDEMOPATH@@world.cor' using 1:2:(5.*rand(0)) with points lt 1 pt 6 ps variable - pause -1 "Hit return to continue" - - # - set title "splot with variable size points\nit is possible to specify size and color separately" - set view map - unset hidden3d --splot 'world.dat' using 1:2:(0) with lines lt 3, \ -- 'world.cor' using 1:2:(0.5-rand(0)):(5.*rand(0)) with points pt 5 ps var lt palette -+splot '@@GNUPLOTDEMOPATH@@world.dat' using 1:2:(0) with lines lt 3, \ -+ '@@GNUPLOTDEMOPATH@@world.cor' using 1:2:(0.5-rand(0)):(5.*rand(0)) with points pt 5 ps var lt palette - pause -1 "Hit return to continue" - - # -@@ -38,8 +38,8 @@ - set urange [-90:90] - set vrange [0:360] - splot cos(u)*cos(v),cos(u)*sin(v),sin(u) with lines lt 5,\ -- 'world.dat' with lines lt 3, \ -- 'world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps variable -+ '@@GNUPLOTDEMOPATH@@world.dat' with lines lt 3, \ -+ '@@GNUPLOTDEMOPATH@@world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps variable - pause -1 "Hit return to continue" - - # -@@ -52,8 +52,8 @@ - set arrow from -1.2, 0, 0 to 1.2, 0, 0 nohead lt 5 lw 1 - set arrow from 0, -1.2, 0 to 0, 1.2, 0 nohead lt 5 lw 1 - splot cos(u)*cos(v),-cos(u)*sin(v),sin(u) with lines lt 5,\ -- 'world.dat' u 1:2:(1.001) with lines lt 3, \ -- 'world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps var -+ '@@GNUPLOTDEMOPATH@@world.dat' u 1:2:(1.001) with lines lt 3, \ -+ '@@GNUPLOTDEMOPATH@@world.cor' using 1:2:(1):(5.*rand(0)) with points lt 1 pt 6 ps var - pause -1 "Hit return to continue" - - reset -diff -U 3 -H -d -r -N -- demo/prob.dem demo/prob.dem ---- demo/prob.dem 2006-06-14 05:24:09.000000000 +0200 -+++ demo/prob.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -17,7 +17,7 @@ - print " Press Ctrl-C to exit right now" - pause -1 " Press Return to start demo ..." - --load "stat.inc" -+load '@@GNUPLOTDEMOPATH@@stat.inc' - - eps = 1.0e-10 # Supposed to be float resolution (nice if were defined internally) - -diff -U 3 -H -d -r -N -- demo/prob2.dem demo/prob2.dem ---- demo/prob2.dem 2006-06-14 05:24:09.000000000 +0200 -+++ demo/prob2.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -34,7 +34,7 @@ - print "" - pause -1 " Press Return to start demo ..." - --load "stat.inc" -+load "@@GNUPLOTDEMOPATH@@stat.inc" - rnd(x) = floor(x+0.5) - r_xmin = -1 - r_sigma = 4.0 -diff -U 3 -H -d -r -N -- demo/rainbow.dem demo/rainbow.dem ---- demo/rainbow.dem 2006-08-07 22:27:13.000000000 +0200 -+++ demo/rainbow.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -79,7 +79,7 @@ - # - # Load terminal-independent colorwheel (HSV full saturation) - # --load 'colorwheel.dem' -+load '@@GNUPLOTDEMOPATH@@colorwheel.dem' - # - # define line styles using macros and a fixed palette - # -diff -U 3 -H -d -r -N -- demo/random.dem demo/random.dem ---- demo/random.dem 2008-09-24 01:11:31.000000000 +0200 -+++ demo/random.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -79,7 +79,7 @@ +-set xlabel "Impedance or Admittance Coordinates" ++set xlabel "Impedance or Admittance Coordinates" 12,-1 + set para + set rrange [-0 : 10] + set trange [-pi : pi] +--- demo/random.dem ++++ demo/random.dem 2009-06-15 14:28:57.277902957 +0200 +@@ -53,7 +53,8 @@ set parametric + # non-pressing plot-command feature addition may address this issue. + set samples nsamp + set format "%8.5g" +-set table "random.tmp" ++random="`mktemp /tmp/random.XXXXXX`" ++set table random + plot invnorm(rand(0)),invnorm(rand(0)) + unset table + unset format +@@ -75,7 +76,7 @@ set vrange [-3:3] + set ticslevel 0 + set isosamples 30 + splot u,v,( 1/(2*pi) * exp(-0.5 * (u**2 + v**2)) ) with line lc rgb "black", \ +- "random.tmp" using 1:2:(-0.2) with points pointtype 7 lc rgb "black" ++ random using 1:2:(-0.2) with points pointtype 7 lc rgb "black" pause -1 "Hit return to continue" unset contour --load "stat.inc" -+load "@@GNUPLOTDEMOPATH@@stat.inc" - - print "" - print "Simple Monte Carlo simulation" -diff -U 3 -H -d -r -N -- demo/rgb_variable.dem demo/rgb_variable.dem ---- demo/rgb_variable.dem 2006-10-16 18:09:00.000000000 +0200 -+++ demo/rgb_variable.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -12,7 +12,7 @@ - # - rgb(r,g,b) = int(r)*65536 + int(g)*256 + int(b) - # --splot 'rgb_variable.dat' using 1:2:3:(rgb($1,$2,$3)) with points pt 7 ps 4 lc rgb variable, \ -+splot '@@GNUPLOTDEMOPATH@@rgb_variable.dat' using 1:2:3:(rgb($1,$2,$3)) with points pt 7 ps 4 lc rgb variable, \ - '' using 1:2:3:(sprintf("0x%x",rgb($1,$2,$3))) with labels left offset 1 notitle - pause -1 "Hit return to continue" - # -@@ -23,7 +23,7 @@ - if (0 == int('0x01')) \ - set label 99 at screen .05, screen .15 "If you see only black dots,\nthis means your platform does not \nsupport reading hexadecimal constants\nfrom a data file. Get a newer libc." - --splot 'rgb_variable.dat' using 1:2:3:(5*rand(0)):4 with points pt 7 ps variable lc rgb variable \ -+splot '@@GNUPLOTDEMOPATH@@rgb_variable.dat' using 1:2:3:(5*rand(0)):4 with points pt 7 ps variable lc rgb variable \ - title "variable pointsize and rgb color read as hexidecimal" - - pause -1 "Hit return to continue" -@@ -38,7 +38,7 @@ - set zzeroaxis lt -1 lc rgb "blue" lw 2 - set xyplane at 0.0 - --splot 'rgb_variable.dat' using 1:2:3:(5*rand(0)):(rgb($1,$2,$3)) with points pt 7 ps variable lc rgb variable \ -+splot '@@GNUPLOTDEMOPATH@@rgb_variable.dat' using 1:2:3:(5*rand(0)):(rgb($1,$2,$3)) with points pt 7 ps variable lc rgb variable \ - title "variable pointsize and rgb color computed from coords" - pause -1 "Hit return to continue" - -diff -U 3 -H -d -r -N -- demo/scatter.dem demo/scatter.dem ---- demo/scatter.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/scatter.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -13,48 +13,48 @@ - set style data points - set xlabel "data style point - no dgrid" - set key box --splot "hemisphr.dat" -+splot "@@GNUPLOTDEMOPATH@@hemisphr.dat" - pause -1 "Hit return to continue (1)" - - set dgrid3d 10,10,1 - set xlabel " data style lines, dgrid3d 10,10,1" - set style data lines --splot "hemisphr.dat" -+splot "@@GNUPLOTDEMOPATH@@hemisphr.dat" - pause -1 "Hit return to continue (2)" - - set dgrid3d ,,4 - set xlabel " data style lines, dgrid3d ,,4 " - set style data lines --splot "hemisphr.dat" -+splot "@@GNUPLOTDEMOPATH@@hemisphr.dat" - pause -1 "Hit return to continue (3)" - - set dgrid3d ,,16 - set xlabel " data style lines, dgrid3d ,,16" - set style data lines --splot "hemisphr.dat" -+splot "@@GNUPLOTDEMOPATH@@hemisphr.dat" - pause -1 "Hit return to continue (4)" - - set contour - set xlabel "data style lines, dgrid3d ,,16, contour" --splot "hemisphr.dat" -+splot "@@GNUPLOTDEMOPATH@@hemisphr.dat" - pause -1 "Hit return to continue (5)" - - unset dgrid3d - set style data points - set xlabel "data style points, nodgrid3d" --splot "scatter2.dat" -+splot "@@GNUPLOTDEMOPATH@@scatter2.dat" - pause -1 "Hit return to continue (6)" - - set key nobox - set dgrid3d ,,1 - set xlabel "data style lines, dgrid3d ,,1" - set style data lines --splot "scatter2.dat" -+splot "@@GNUPLOTDEMOPATH@@scatter2.dat" - pause -1 "Hit return to continue (7)" - - set dgrid3d ,,4 - set xlabel "data style lines, dgrid3d ,,4" - set style data lines --splot "scatter2.dat" -+splot "@@GNUPLOTDEMOPATH@@scatter2.dat" - pause -1 "Hit return to continue (8)" - reset -diff -U 3 -H -d -r -N -- demo/simple.dem demo/simple.dem ---- demo/simple.dem 2009-05-09 14:44:29.000000000 +0200 -+++ demo/simple.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -4,7 +4,7 @@ - # Requires data files "[123].dat" from this directory, - # so change current working directory to this directory before running. - # gnuplot> set term --# gnuplot> load 'simple.dem' -+# gnuplot> load '@@GNUPLOTDEMOPATH@@simple.dem' - # - set key left box - set samples 400 -@@ -37,10 +37,10 @@ - plot [-30:20] sin(x*20)*atan(x) - pause -1 "Hit return to continue" - --plot [-19:19] '1.dat'with impulses ,'2.dat' ,'3.dat' with lines -+plot [-19:19] '@@GNUPLOTDEMOPATH@@1.dat'with impulses ,'@@GNUPLOTDEMOPATH@@2.dat' ,'@@GNUPLOTDEMOPATH@@3.dat' with lines - pause -1 "Hit return to continue" - f(x) = x/100 --plot [-19:19] '1.dat'with impulses ,'2.dat' thru f(x) ,'3.dat' with lines -+plot [-19:19] '@@GNUPLOTDEMOPATH@@1.dat'with impulses ,'@@GNUPLOTDEMOPATH@@2.dat' thru f(x) ,'@@GNUPLOTDEMOPATH@@3.dat' with lines - pause -1 "Hit return to continue" - reset - -diff -U 3 -H -d -r -N -- demo/singulr.dem demo/singulr.dem ---- demo/singulr.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/singulr.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -163,14 +163,14 @@ - set ticslevel 0. - set view 50,15 #HBB: ,1,1.7 - set title "Klein bottle, glassblowers' version (look-through)" --splot "klein.dat" -+splot "@@GNUPLOTDEMOPATH@@klein.dat" - pause -1 "Hit return to continue (19)" - - - set hidden3d - set view 70,305 - set title "Klein bottle, glassblowers' version (solid)" --splot "klein.dat" -+splot "@@GNUPLOTDEMOPATH@@klein.dat" - pause -1 "Hit return to continue (20)" - - reset -diff -U 3 -H -d -r -N -- demo/starmap.dem demo/starmap.dem ---- demo/starmap.dem 2006-06-30 04:17:22.000000000 +0200 -+++ demo/starmap.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -14,7 +14,7 @@ - set title "Gliese star catalog - 7 parsec neighborhood centered on Earth" - set cblabel "Luminosity" offset 0,1 - # --splot 'nearmap.csv' using 5:6:7:11 with points pt 6 ps 2 pal notitle, \ -+splot '@@GNUPLOTDEMOPATH@@nearmap.csv' using 5:6:7:11 with points pt 6 ps 2 pal notitle, \ - '' using 5:6:7:11 with points pt 7 ps 1 pal notitle, \ - '' using 5:6:7:2 with labels font "Helvetica,9" left \ - point pt 0 offset 1,0 notitle -diff -U 3 -H -d -r -N -- demo/steps.dem demo/steps.dem ---- demo/steps.dem 2003-10-17 17:02:21.000000000 +0200 -+++ demo/steps.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -8,16 +8,16 @@ - # function. - - set title "Compare steps, fsteps and histeps" --plot [0:12][0:13] "steps.dat" notitle with points, \ -- "steps.dat" title 'steps' with steps, \ -- 'steps.dat' title 'fsteps' with fsteps, \ -- 'steps.dat' title 'histeps' with histeps -+plot [0:12][0:13] '@@GNUPLOTDEMOPATH@@steps.dat' notitle with points, \ -+ '@@GNUPLOTDEMOPATH@@steps.dat' title 'steps' with steps, \ -+ '@@GNUPLOTDEMOPATH@@steps.dat' title 'fsteps' with fsteps, \ -+ '@@GNUPLOTDEMOPATH@@steps.dat' title 'histeps' with histeps - - pause -1 "Hit return for demonstration of automatic histogram creation" - set title "Histogram built from unsorted data by 'smooth frequency'" - set ylabel 'counts per bin' - set xlabel 'bins' --plot 'hemisphr.dat' u (floor($1*20)):(1) smooth frequency with histeps -+plot '@@GNUPLOTDEMOPATH@@hemisphr.dat' u (floor($1*20)):(1) smooth frequency with histeps - unset xlabel - unset ylabel - -diff -U 3 -H -d -r -N -- demo/stringvar.dem demo/stringvar.dem ---- demo/stringvar.dem 2008-09-02 23:06:44.000000000 +0200 -+++ demo/stringvar.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -73,7 +73,7 @@ - # - set xrange [300:400] - set title "String-valued expression in using spec" --plot 'silver.dat' using 1:2 with linespoints notitle, \ -+plot '@@GNUPLOTDEMOPATH@@silver.dat' using 1:2 with linespoints notitle, \ - '' using 1:2:(sprintf("[%.0f,%.0f]",$1,$2)) with labels - # - pause -1 "Hit return to continue" -@@ -84,7 +84,7 @@ - set xrange [250:500] - set auto y - set style data lines --plot 'silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ -+plot '@@GNUPLOTDEMOPATH@@silver.dat' u 1:2:($3+$1/50.) w filledcurves above title 'Above', \ - '' u 1:2:($3+$1/50.) w filledcurves below title 'Below', \ - '' u 1:2 lt -1 lw 0.5 notitle, \ - '' u 1:($3+$1/50.) lt 3 lw 0.5 notitle, \ -@@ -93,7 +93,7 @@ - # - pause -1 "Hit return to continue" - # --plot 'silver.dat' \ -+plot '@@GNUPLOTDEMOPATH@@silver.dat' \ - u 1:2 lt -1 lw 0.5 notitle, \ - '' u 1:($3+$1/50.) lt 3 lw 0.5 notitle, \ - '' using 1:2:( ($2>($3+$1/50.)) ? "J" : "D" ) with labels font "WingDings,28"\ -diff -U 3 -H -d -r -N -- demo/surface1.dem demo/surface1.dem ---- demo/surface1.dem 2004-09-17 07:01:12.000000000 +0200 -+++ demo/surface1.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -171,34 +171,34 @@ - set style data lines - set title "Data grid plotting" +@@ -101,7 +102,7 @@ scale = (binwidth/(xhigh-xlow)) set parametric --splot "glass.dat" -+splot '@@GNUPLOTDEMOPATH@@glass.dat' - pause -1 "Hit return to continue (19)" --splot "glass.dat" using 3:2:1 -+splot '@@GNUPLOTDEMOPATH@@glass.dat' using 3:2:1 - pause -1 "Hit return to continue (20)" - set zrange [-1.2:1.2] - set ticslevel 0.5 + set samples nsamp + set format "%8.5g" +-set table "random.tmp" ++set table random + plot invnorm(rand(0)),(1.0*scale/nsamp) + unset table + unset format +@@ -115,7 +116,7 @@ set grid + set xrange [-3:3] + set yrange [0:0.45] + bin(x) = (1.0/scale)*floor(x*scale) +-plot "random.tmp" using (bin($1)):2 smooth frequency with steps \ ++plot random using (bin($1)):2 smooth frequency with steps \ + title "scaled bin frequency", \ + normal(x,0,1) with lines title "Gaussian p.d.f." + pause -1 "Hit return to continue" +@@ -136,7 +137,7 @@ set parametric + set samples nsamp + set isosamples 2,2 # Smallest possible + set format "%8.5g" +-set table "random.tmp" ++set table random + splot invnorm(rand(0)),invnorm(rand(0)),invnorm(rand(0)) + unset table + unset format +@@ -158,7 +159,7 @@ set zzeroaxis lt -1 + set view 68, 28, 1.4, 0.9 + tstring(n) = sprintf("Gaussian 3D cloud of %d random samples\n", n) + set title tstring(nsamp) offset graph 0.15, graph -0.33 +-splot "random.tmp" every :::::0 with dots ++splot random every :::::0 with dots + if (!oneplot) pause -1 "Hit return to continue" + unset parametric - set xlabel "line index within group" - set ylabel "group index" --splot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3 -+splot '@@GNUPLOTDEMOPATH@@glass.dat' using 1, '@@GNUPLOTDEMOPATH@@glass.dat' using 2, '@@GNUPLOTDEMOPATH@@glass.dat' using 3 - pause -1 "Hit return to continue (21)" - set title "splot of part of a data file" - set xlabel "X axis" offset -3,-2 - set ylabel "Y axis" offset 3,-2 - set hidden3d --splot 'glass.dat' every 2::0::12 with lines -+splot '@@GNUPLOTDEMOPATH@@glass.dat' every 2::0::12 with lines - pause -1 "Hit return to continue (22)" - set title "splot with \"set pm3d\" (implemented with some terminals)" - set pm3d - set hidden3d --splot 'glass.dat' every 2::0::12 with lines -+splot '@@GNUPLOTDEMOPATH@@glass.dat' every 2::0::12 with lines - pause -1 "Hit return to continue (23)" - unset hidden3d - unset pm3d - set param - set title "Test of spherical coordinates" - set mapping spherical --splot "glass.dat" -+splot '@@GNUPLOTDEMOPATH@@glass.dat' - pause -1 "Hit return to continue (24)" +@@ -178,7 +179,7 @@ scale = (binwidth/(xhigh-xlow)) + set xrange [0:xhigh] + set yrange [0:0.65] + bin(x) = (1.0/scale)*floor(x*scale) +-plot "random.tmp" using (bin(sqrt($1**2+$2**2+$3**2))):(1.0*scale/nsamp) every :::::0 smooth frequency with steps \ ++plot random using (bin(sqrt($1**2+$2**2+$3**2))):(1.0*scale/nsamp) every :::::0 smooth frequency with steps \ + title "scaled bin frequency", \ + maxwell(x, 1/sqrt(2)) with lines title "Maxwell p.d.f." + # +@@ -202,7 +203,7 @@ set format xy "%.0f" + set title 'Example of range-limited axes and tics' + + A = pi/9. +-plot 'random.tmp' using (1.5 + $1*cos(A)-2.*$2*sin(A)):(1.0 + $1*sin(A)+2.*$2*cos(A)) with dots ++plot random using (1.5 + $1*cos(A)-2.*$2*sin(A)):(1.0 + $1*sin(A)+2.*$2*cos(A)) with dots - # mandelbrot demo -diff -U 3 -H -d -r -N -- demo/timedat.dem demo/timedat.dem ---- demo/timedat.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/timedat.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -13,10 +13,10 @@ - set format x "%d/%m\n%H:%M" - set grid - set key left --plot 'timedat.dat' using 1:3 t '', \ -- 'timedat.dat' using 1:3 t 'Total P' with points, \ -- 'timedat.dat' using 1:4 t '', \ -- 'timedat.dat' using 1:4 t 'PO4' with points -+plot '@@GNUPLOTDEMOPATH@@timedat.dat' using 1:3 t '', \ -+ '@@GNUPLOTDEMOPATH@@timedat.dat' using 1:3 t 'Total P' with points, \ -+ '@@GNUPLOTDEMOPATH@@timedat.dat' using 1:4 t '', \ -+ '@@GNUPLOTDEMOPATH@@timedat.dat' using 1:4 t 'PO4' with points pause -1 "Hit return to continue" - reset -diff -U 3 -H -d -r -N -- demo/using.dem demo/using.dem ---- demo/using.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/using.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -1,15 +1,15 @@ +--- demo/stringvar.dem ++++ demo/stringvar.dem 2009-06-15 14:46:14.406401438 +0200 +@@ -1,7 +1,8 @@ # - # $Id: using.dem,v 1.6 2003/10/28 05:35:54 sfeam Exp $ - # --# Requires data file "using.dat" from this directory, -+# Requires data file "@@GNUPLOTDEMOPATH@@using.dat" from this directory, - # so change current working directory to this directory before running. + # Miscellaneous neat things you can do using the string variables code # +-set print "stringvar.tmp" ++stringvar="`mktemp /tmp/stringvar.XXXXXX`" ++set print stringvar + print "" + print "Exercise substring handling" + print "" +@@ -24,7 +25,7 @@ print "(foo.foo)[2:2]= ",(foo.foo)[2:2] + print "" + unset print - set title "Convex November 1-7 1989 Circadian" - set key left box - set xrange[-1:24] --plot 'using.dat' using 2:4 title "Logged in" with impulses,\ -- 'using.dat' using 2:4 title "Logged in" with points -+plot '@@GNUPLOTDEMOPATH@@using.dat' using 2:4 title "Logged in" with impulses,\ -+ '@@GNUPLOTDEMOPATH@@using.dat' using 2:4 title "Logged in" with points - pause -1 "Hit return to continue" - - set xrange [1:8] -@@ -17,9 +17,9 @@ - set title "Convex November 1-7 1989" - set key below - set label "(Weekend)" at 5,25 center --plot 'using.dat' using 3:4 title "Logged in" with impulses,\ -- 'using.dat' using 3:5 t "Load average" with points,\ -- 'using.dat' using 3:6 t "%CPU used" with lines -+plot '@@GNUPLOTDEMOPATH@@using.dat' using 3:4 title "Logged in" with impulses,\ -+ '@@GNUPLOTDEMOPATH@@using.dat' using 3:5 t "Load average" with points,\ -+ '@@GNUPLOTDEMOPATH@@using.dat' using 3:6 t "%CPU used" with lines - unset label - pause -1 "Hit return to continue" - reset -diff -U 3 -H -d -r -N -- demo/world.dem demo/world.dem ---- demo/world.dem 2004-09-28 08:06:10.000000000 +0200 -+++ demo/world.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -10,7 +10,7 @@ +-set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9 ++set label 1 system(sprintf("cat %s", stringvar)) at graph 0.1, graph 0.9 + unset xtics unset ytics + set yrange [0:1] +@@ -33,7 +34,7 @@ plot 0 + pause -1 "Hit return to continue" + + +-set print "stringvar.tmp" ++set print stringvar + print "Exercise string handling functions" + print "" + print "foo = ",foo +@@ -62,7 +63,7 @@ if (strlen(foo) != 245) print "sprintf o + print "" + + unset print +-set label 1 system("cat stringvar.tmp") at graph 0.1, graph 0.9 ++set label 1 system(sprintf("cat %s", stringvar)) at graph 0.1, graph 0.9 + unset xtics + unset ytics + set yrange [0:1] +--- demo/simple.dem ++++ demo/simple.dem 2009-05-09 13:32:24.000000000 +0200 +@@ -7,12 +7,11 @@ + # gnuplot> load 'simple.dem' # - # plot world map and correspondent locations as a + --plot 'world.dat' with lines lt 3 , 'world.cor' with points lt 1 pt 2 -+plot '@@GNUPLOTDEMOPATH@@world.dat' with lines lt 3 , '@@GNUPLOTDEMOPATH@@world.cor' with points lt 1 pt 2 - set title "" - set key on - set border -@@ -31,7 +31,7 @@ - set urange [-90:90] - set vrange [0:360] - splot cos(u)*cos(v),cos(u)*sin(v),sin(u) with lines lt 5 ,\ --'world.dat' with lines lt 3 , 'world.cor' with points lt 1 pt 2 -+'@@GNUPLOTDEMOPATH@@world.dat' with lines lt 3 , '@@GNUPLOTDEMOPATH@@world.cor' with points lt 1 pt 2 + set key left box +-set samples 50 ++set samples 400 + plot [-10:10] sin(x),atan(x),cos(atan(x)) pause -1 "Hit return to continue" - # HBB 20000715: new demo: -@@ -43,7 +43,7 @@ - set arrow from -1.2, 0, 0 to 1.2, 0, 0 nohead lt 5 lw 1 - set arrow from 0, -1.2, 0 to 0, 1.2, 0 nohead lt 5 lw 1 - splot cos(u)*cos(v),-cos(u)*sin(v),sin(u) with lines lt 5 ,\ --'world.dat' u 1:2:(1.001) with lines lt 3 , 'world.cor' with points lt 1 pt 2 -+'@@GNUPLOTDEMOPATH@@world.dat' u 1:2:(1.001) with lines lt 3 , '@@GNUPLOTDEMOPATH@@world.cor' with points lt 1 pt 2 + set key right nobox +-set samples 100 + plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) pause -1 "Hit return to continue" - unset arrow -@@ -61,6 +61,6 @@ - set urange [-180:180] - set vrange [-90:90] - splot cos(u),sin(u),v with lines lt 5 ,\ --'world.dat' with lines lt 3 , 'world.cor' with points lt 1 pt 2 -+'@@GNUPLOTDEMOPATH@@world.dat' with lines lt 3 , '@@GNUPLOTDEMOPATH@@world.cor' with points lt 1 pt 2 +--- demo/vector.dem ++++ demo/vector.dem 2009-06-15 14:24:23.430401839 +0200 +@@ -62,19 +62,21 @@ splot vtot(x,y) w l + print "Now create a file with equipotential lines" pause -1 "Hit return to continue" + +-set table "equipo2.tmp" ++equipo2="`mktemp /tmp/equipo2.XXXXXX`" ++set table equipo2 + replot + unset table reset -diff -U 3 -H -d -r -N -- demo/world2.dem demo/world2.dem ---- demo/world2.dem 2005-08-07 11:43:27.000000000 +0200 -+++ demo/world2.dem 2009-05-09 14:44:57.000000000 +0200 -@@ -22,8 +22,8 @@ - set colorb vert user size 0.02, 0.75 - unset hidden - splot cos(u)*cos(v),cos(u)*sin(v),sin(u) notitle with lines lt 5, \ -- 'world.dat' notitle with lines lt 2, \ -- 'srl.dat' using 3:2:(1):1:4 with labels notitle point pt 6 lw .1 left offset 1,0 font "Helvetica,7" tc pal -+ '@@GNUPLOTDEMOPATH@@world.dat' notitle with lines lt 2, \ -+ '@@GNUPLOTDEMOPATH@@srl.dat' using 3:2:(1):1:4 with labels notitle point pt 6 lw .1 left offset 1,0 font "Helvetica,7" tc pal - pause -1 "Same plot with hidden line removal" - set title "Labels with hidden line removal" - set hidden nooffset + pause 0 + +-plot "equipo2.tmp" w l ++plot equipo2 w l + print "Now create a x/y datafile for plotting with vectors " + print "and display vectors parallel to the electrostatic field" + pause -1 "Hit return to continue" + set isosam 31,31 + +-set table "field2xy.tmp" ++field2xy="`mktemp /tmp/field2xy.XXXXXX`" ++set table field2xy + splot vtot(x,y) w l + unset table + pause 0 +@@ -84,8 +86,8 @@ set xr [xmin:xmax] + set yr [ymin:ymax] + set isosam 31,31 + set key under Left reverse +-plot "field2xy.tmp" u 1:2:(coef*dx1($1,$2)):(coef*dy1($1,$2)) w vec, \ +- "equipo2.tmp" w l ++plot field2xy u 1:2:(coef*dx1($1,$2)):(coef*dy1($1,$2)) w vec, \ ++ equipo2 w l + pause -1 "Hit return to continue" + + reset +--- src/variable.c ++++ src/variable.c 2009-06-15 14:01:38.998402587 +0200 +@@ -94,6 +94,14 @@ loadpath_handler(int action, char *path) + if (!loadpath) + { + char *envlib = getenv("GNUPLOT_LIB"); ++#ifdef GNUPLOT_LIB_DEFAULT ++ char *defenvlib = (char*)0; ++ if (envlib) { ++ if (asprintf(&defenvlib, "%s:%s", envlib, GNUPLOT_LIB_DEFAULT) > 0) ++ envlib = defenvlib; ++ } else ++ envlib = GNUPLOT_LIB_DEFAULT; ++#endif /* GNUPLOT_LIB_DEFAULT */ + if (envlib) { + int len = strlen(envlib); + loadpath = gp_strdup(envlib); +@@ -102,6 +110,10 @@ loadpath_handler(int action, char *path) + /* convert all PATHSEPs to \0 */ + PATHSEP_TO_NUL(loadpath); + } /* else: NULL = empty */ ++#ifdef GNUPLOT_LIB_DEFAULT ++ if (defenvlib) ++ free(defenvlib); ++#endif /* GNUPLOT_LIB_DEFAULT */ + } /* else: already initialised; int_warn (?) */ + /* point to env portion of loadpath */ + envptr = loadpath; diff --git a/gnuplot-4.2.5-fix-format-errors.dif b/gnuplot-4.2.5-fix-format-errors.dif index a288e8c..0dd9580 100644 --- a/gnuplot-4.2.5-fix-format-errors.dif +++ b/gnuplot-4.2.5-fix-format-errors.dif @@ -1,6 +1,6 @@ ---- src/gplt_x11.c 2009-01-14 19:42:02.000000000 +0100 +--- src/gplt_x11.c +++ src/gplt_x11.c 2009-05-09 13:50:34.000000000 +0200 -@@ -2889,22 +2889,22 @@ +@@ -2903,22 +2903,22 @@ exec_cmd(plot_struct *plot, char *comman case PseudoColor: fprintf(stderr, ERROR_NOTICE("PseudoColor")); @@ -27,9 +27,9 @@ break; case DirectColor: ---- term/post.trm 2009-03-03 03:44:07.000000000 +0100 +--- term/post.trm +++ term/post.trm 2009-05-09 13:50:34.000000000 +0200 -@@ -1665,7 +1665,7 @@ +@@ -1748,7 +1748,7 @@ gnudict begin\ngsave\n\ (ps_params->psformat == PSTERM_EPS ? 0.5 : 1.0)/PS_SC); if (ps_params->psformat == PSTERM_LANDSCAPE) fprintf(gppsfile,"90 rotate\n0 %d translate\n", -(int)(term->ymax)); diff --git a/gnuplot-4.2.2-fonts.dif b/gnuplot-4.2.5-fonts.dif similarity index 87% rename from gnuplot-4.2.2-fonts.dif rename to gnuplot-4.2.5-fonts.dif index ee5b249..3a37b0e 100644 --- a/gnuplot-4.2.2-fonts.dif +++ b/gnuplot-4.2.5-fonts.dif @@ -1,5 +1,5 @@ --- src/gplt_x11.c -+++ src/gplt_x11.c 2008-03-14 15:26:15.789448595 +0100 ++++ src/gplt_x11.c 2008-03-14 15:26:16.000000000 +0100 @@ -104,6 +104,10 @@ static char *RCSid() { return RCSid("$Id * patches by Masahito Yamaga */ @@ -20,7 +20,7 @@ # include #endif -@@ -471,7 +477,7 @@ static double mouse_to_axis __PROTO((int +@@ -474,7 +480,7 @@ static double mouse_to_axis __PROTO((int static char *FallbackFont = "fixed"; #ifdef USE_X11_MULTIBYTE static char *FallbackFontMB = @@ -29,7 +29,7 @@ # define FontSetSep ';' static int usemultibyte = 0; static int multibyte_fonts_usable=1; -@@ -488,8 +494,8 @@ static char *gpFallbackFont __PROTO((voi +@@ -491,8 +497,8 @@ static char *gpFallbackFont __PROTO((voi static int gpXGetFontascent __PROTO((XFontStruct *cfont)); enum set_encoding_id encoding = S_ENC_DEFAULT; /* EAM - mirrored from core code by 'QE' */ @@ -40,7 +40,7 @@ #define Nwidths 10 static unsigned int widths[Nwidths] = { 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -@@ -2099,6 +2105,8 @@ exec_cmd(plot_struct *plot, char *comman +@@ -2116,6 +2122,8 @@ exec_cmd(plot_struct *plot, char *comman /* Save the request default font */ c = &(buffer[strlen(buffer)-1]); while (*c <= ' ') *c-- = '\0'; @@ -49,7 +49,7 @@ strncpy(default_font, &buffer[2], strlen(&buffer[2])+1); FPRINTF((stderr, "gnuplot_x11: exec_cmd() set default_font to \"%s\"\n", default_font)); break; -@@ -5397,7 +5405,7 @@ XFontStruct *gpXLoadQueryFont (Display * +@@ -5326,7 +5334,7 @@ XFontStruct *gpXLoadQueryFont (Display * } #else if (first_time) { @@ -58,7 +58,7 @@ first_time = FALSE; } while (n_miss-- > 0) -@@ -5490,6 +5498,18 @@ char *fontname; +@@ -5419,6 +5427,18 @@ char *fontname; } #ifdef USE_X11_MULTIBYTE @@ -78,7 +78,7 @@ if (multibyte_fonts_usable) { usemultibyte = 1; --- src/variable.c -+++ src/variable.c 2008-03-14 15:27:11.596615232 +0100 ++++ src/variable.c 2009-06-15 13:55:04.902957631 +0200 @@ -263,6 +263,8 @@ static const struct path_table fontpath_ { "$`kpsexpand '$TEXMFDIST'`/fonts/type1!" }, #endif diff --git a/gnuplot-4.2.5-utf8.dif b/gnuplot-4.2.5-utf8.dif index fcd83af..f403b11 100644 --- a/gnuplot-4.2.5-utf8.dif +++ b/gnuplot-4.2.5-utf8.dif @@ -1,6 +1,6 @@ ---- docs/gnuplot.doc 2009-02-19 22:16:05.000000000 +0100 +--- docs/gnuplot.doc +++ docs/gnuplot.doc 2009-05-09 13:53:00.000000000 +0200 -@@ -5871,6 +5871,7 @@ +@@ -5871,6 +5871,7 @@ C ... and restart the table: ?show encoding ?encoding ?encodings @@ -8,7 +8,7 @@ The `set encoding` command selects a character encoding. Syntax: set encoding {} -@@ -5881,6 +5882,7 @@ +@@ -5881,6 +5882,7 @@ C ... and restart the table: iso_8859_1 - the most common Western European font used by many Unix workstations and by MS-Windows. This encoding is known in the PostScript world as 'ISO-Latin1'. @@ -16,7 +16,7 @@ iso_8859_2 - used in Central and Eastern Europe iso_8859_15 - a variant of iso_8859_1 that includes the Euro symbol koi8r - popular Unix cyrillic encoding -@@ -5889,6 +5891,9 @@ +@@ -5889,6 +5891,9 @@ C ... and restart the table: cp850 - codepage for OS/2, Western Europe cp852 - codepage for OS/2, Central and Eastern Europe cp1250 - codepage for MS Windows, Central and Eastern Europe @@ -26,9 +26,9 @@ Generally you must set the encoding before setting the terminal type. Note that encoding is not supported by all terminal drivers and that ---- src/set.c 2009-03-28 22:22:54.000000000 +0100 +--- src/set.c +++ src/set.c 2009-05-09 13:53:00.000000000 +0200 -@@ -1211,7 +1211,7 @@ +@@ -1211,7 +1211,7 @@ set_encoding() temp = lookup_table(&set_encoding_tbl[0],c_token); if (temp == S_ENC_INVALID) @@ -37,9 +37,9 @@ c_token++; } encoding = temp; ---- src/term.c 2008-12-15 05:18:36.000000000 +0100 +--- src/term.c +++ src/term.c 2009-05-09 13:53:00.000000000 +0200 -@@ -134,19 +134,23 @@ +@@ -134,19 +134,23 @@ TBOOLEAN multiplot = FALSE; enum set_encoding_id encoding; /* table of encoding names, for output of the setting */ const char *encoding_names[] = { @@ -65,7 +65,7 @@ { "koi8$r", S_ENC_KOI8_R }, { "koi8$u", S_ENC_KOI8_U }, { NULL, S_ENC_INVALID } -@@ -945,7 +949,7 @@ +@@ -945,7 +949,7 @@ term_check_multiplot_okay(TBOOLEAN f_int void write_multiline( @@ -74,10 +74,9 @@ char *text, JUSTIFY hor, /* horizontal ... */ VERT_JUSTIFY vert, /* ... and vertical just - text in hor direction despite angle */ -diff -U 3 -H -d -r -N -- src/term_api.h src/term_api.h ---- src/term_api.h 2008-12-15 05:18:36.000000000 +0100 +--- src/term_api.h +++ src/term_api.h 2009-05-09 13:53:00.000000000 +0200 -@@ -124,7 +124,9 @@ +@@ -124,7 +124,9 @@ typedef enum termlayer { TERM_LAYER_RESET, TERM_LAYER_BACKTEXT, TERM_LAYER_FRONTTEXT, @@ -88,7 +87,7 @@ diff -U 3 -H -d -r -N -- src/term_api.h src/term_api.h } t_termlayer; typedef struct fill_style_type { -@@ -134,8 +136,9 @@ +@@ -134,8 +136,9 @@ typedef struct fill_style_type { int border_linetype; } fill_style_type; @@ -100,7 +99,7 @@ diff -U 3 -H -d -r -N -- src/term_api.h src/term_api.h #define FS_OPAQUE (FS_SOLID + (100<<4)) #ifdef WITH_IMAGE -@@ -159,6 +162,7 @@ +@@ -159,6 +162,7 @@ typedef enum t_imagecolor { IC_PALETTE, #define TERM_ENHANCED_TEXT 32 /* enhanced text mode is enabled */ #define TERM_NO_OUTPUTFILE 64 /* terminal doesnt write to a file */ #define TERM_CAN_CLIP 128 /* terminal does its own clipping */ @@ -108,7 +107,7 @@ diff -U 3 -H -d -r -N -- src/term_api.h src/term_api.h /* The terminal interface structure --- heart of the terminal layer. * -@@ -254,6 +258,11 @@ +@@ -254,6 +258,11 @@ typedef struct TERMENTRY { */ void (*path) __PROTO((int p)); @@ -120,7 +119,7 @@ diff -U 3 -H -d -r -N -- src/term_api.h src/term_api.h } TERMENTRY; #ifdef WIN16 -@@ -263,9 +272,10 @@ +@@ -263,9 +272,10 @@ typedef struct TERMENTRY { #endif enum set_encoding_id { @@ -134,10 +133,9 @@ diff -U 3 -H -d -r -N -- src/term_api.h src/term_api.h S_ENC_INVALID }; -diff -U 3 -H -d -r -N -- src/util.c src/util.c ---- src/util.c 2009-02-09 05:43:44.000000000 +0100 +--- src/util.c +++ src/util.c 2009-05-09 13:53:00.000000000 +0200 -@@ -1218,3 +1218,85 @@ +@@ -1218,3 +1218,85 @@ getusername () return fullname; } @@ -223,10 +221,9 @@ diff -U 3 -H -d -r -N -- src/util.c src/util.c + *wch = INVALID_UTF8; + return FALSE; +} -diff -U 3 -H -d -r -N -- term/Makefile.am.in term/Makefile.am.in ---- term/Makefile.am.in 2006-06-20 00:02:46.000000000 +0200 +--- term/Makefile.am.in +++ term/Makefile.am.in 2009-05-09 13:53:00.000000000 +0200 -@@ -13,7 +13,7 @@ +@@ -13,7 +13,7 @@ postscriptdir = $(pkgdatadir)/$(VERSION_ postscript_DATA = PostScript/8859-15.ps PostScript/8859-1.ps\ PostScript/8859-2.ps PostScript/cp1250.ps PostScript/cp437.ps\ PostScript/cp850.ps PostScript/cp852.ps PostScript/koi8r.ps PostScript/koi8u.ps\ @@ -235,8 +232,1238 @@ diff -U 3 -H -d -r -N -- term/Makefile.am.in term/Makefile.am.in Makefile.am: Makefile.am.in rm -f $@ $@t -diff -U 3 -H -d -r -N -- term/PostScript/8859-1.ps term/PostScript/8859-1.ps ---- term/PostScript/8859-1.ps 2006-03-24 22:48:47.000000000 +0100 +--- term/gd.trm ++++ term/gd.trm 2009-05-09 13:53:00.000000000 +0200 +@@ -1861,7 +1861,7 @@ ENHGD_FLUSH() + #ifdef gdFTEX_Adobe_Custom + /* libgd defaults to UTF-8 encodings. We have limited options for */ + /* over-riding this, but we can try */ +- if (ENHgd_font && !strcmp(ENHgd_font,"Symbol")) { ++ if (encoding != S_ENC_UTF8 && ENHgd_font && !strcmp(ENHgd_font,"Symbol")) { + PNG_FONT_INFO.flags |= gdFTEX_CHARMAP; + PNG_FONT_INFO.charmap = gdFTEX_Adobe_Custom; + } else { +--- term/post.trm ++++ term/post.trm 2009-05-09 13:53:00.000000000 +0200 +@@ -1,5 +1,5 @@ + /* Hello, Emacs: this is -*-C-*- ! +- * $Id: post.trm,v 1.203.2.17 2009/03/02 17:40:06 mikulik Exp $ ++ * $Id: post.trm,v 1.230 2008/03/13 18:01:27 sfeam Exp $ + */ + + /* GNUPLOT - post.trm */ +@@ -61,14 +61,18 @@ + * + * Dan Sebald, 7 March 2003: terminal entry for image functionality + * +- * Harald Harders (h.harders@tu-bs.de), 2004-12-02: +- * Moved all terminal settings into a single structure. ++ * Harald Harders (h.harders@tu-bs.de), 2004-12-02: ++ * Moved all terminal settings into a single structure. + * +- * Harald Harders (h.harders@tu-bs.de), 2005-02-08: +- * Merged functionality of postscript, pslatex, pstex, and epslatex terminals. ++ * Harald Harders (h.harders@tu-bs.de), 2005-02-08: ++ * Merged functionality of postscript, pslatex, pstex, and epslatex terminals. + * +- * Ethan Merritt Mar 2006: Break out prolog and character encodings into +- * separate files loaded at runtime ++ * Ethan Merritt Mar 2006: Break out prolog and character encodings into ++ * separate files loaded at runtime ++ * ++ * Thomas Henlich Sep 2007: Add support for UTF-8 encoding via the glyphshow ++ * operator. It supports PostScript Type1 fonts that use glyph names according ++ * to the Adobe Glyph List For New Fonts. + */ + + #include "driver.h" +@@ -106,7 +110,7 @@ TERM_PUBLIC void PS_previous_palette (vo + TERM_PUBLIC void PS_set_color (t_colorspec *); + TERM_PUBLIC void PS_filled_polygon (int, gpiPoint *); + #ifdef WITH_IMAGE +-TERM_PUBLIC void PS_image __PROTO((unsigned, unsigned, coordval *, gpiPoint *, t_imagecolor)); ++TERM_PUBLIC void PS_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); + #endif + + /* To support "set term post enhanced" */ +@@ -123,6 +127,9 @@ TERM_PUBLIC char *PS_escape_string __PRO + + TERM_PUBLIC void PS_path __PROTO((int p)); + static TBOOLEAN PS_newpath = FALSE; ++static TBOOLEAN ENHps_opened_string = FALSE; /* try to cut out empty ()'s */ ++ ++TERM_PUBLIC void PS_layer __PROTO((t_termlayer syncpoint)); + + #endif /* TERM_PROTO */ + +@@ -140,11 +147,12 @@ static TBOOLEAN PS_newpath = FALSE; + } \ + } while (0) + +-/* Datastructure implementing inclusion of font files */ ++/* Data structure implementing inclusion of font files */ + struct ps_fontfile_def { + struct ps_fontfile_def *next;/* pointer to next fontfile in linked list */ + char *fontfile_name; + char *fontfile_fullname; ++ char *fontname; + }; + + /* Terminal type of postscript dialect */ +@@ -181,13 +189,14 @@ typedef struct ps_params_t { + double palfunc_deviation; /* terminal option */ + TBOOLEAN oldstyle; + TBOOLEAN epslatex_standalone; ++ TBOOLEAN adobeglyphnames; /* Choice of output names for UTF8 */ + } ps_params_t; + + #define POST_PARAMS_DEFAULT { \ + PSTERM_POSTSCRIPT, 50, 50, \ + PSTERM_LANDSCAPE, FALSE, FALSE, FALSE, FALSE, 1.0, 1.0, FALSE, \ + FALSE, FALSE, NULL, "Helvetica", 14, FALSE, FALSE, 2000, 0.003, \ +- FALSE, FALSE \ ++ FALSE, TRUE \ + } + + static ps_params_t post_params = POST_PARAMS_DEFAULT; +@@ -261,7 +270,9 @@ static int eps_explicit_y = 0; + static char *pslatex_auxname = NULL; + + /* Routine to copy pre-existing prolog files into output stream */ ++static FILE *PS_open_prologue_file __PROTO((char *)); + static void PS_dump_prologue_file __PROTO((char *)); ++static void PS_load_glyphlist __PROTO((void)); + + static const char GPFAR * GPFAR OldEPSL_linetypes[] = { + /* Line Types */ +@@ -280,20 +291,21 @@ static const char GPFAR * GPFAR ENHPS_he + /* For MFshow and MFwidth the tos is an array with the string and font info: */ + /* [ ] */ + /* EAM Mar 2004 - Add in a special case overprint 3 = save, overprint 4 = restore */ ++/* EAM Nov 2007 - Accommodate UTF-8 support (Gshow) */ + + "/MFshow {\n", + " { dup 5 get 3 ge\n", /* EAM test for overprint 3 or 4 */ + " { 5 get 3 eq {gsave} {grestore} ifelse }\n", /* EAM */ + " {dup dup 0 get findfont exch 1 get scalefont setfont\n", + " [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6\n", +-" get exch 4 get {show} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq\n", ++" get exch 4 get {Gshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq\n", + " {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5\n", + " get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div\n", + " dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get\n", + " show 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop\n", + " pop aload pop M} ifelse }ifelse }ifelse }\n", + " ifelse }\n", /* EAM */ +-" forall} bind def\n", ++" forall} def\n", + + /* get the width of the text */ + /* HH 2005-07-24 - Add in a special case overprint 3 = save, 4 = restore +@@ -301,9 +313,12 @@ static const char GPFAR * GPFAR ENHPS_he + * additional value on the stack. between XYsave and XYrestore, + * this number is increased by the strings. By pop'ing this number, all + * strings between XYsave and XYrestore are ignored. */ ++/* EAM Nov 2007 - GSwidth is to allow the operator to work either with a string ++ * or with a glyph. Needed for UTF-8 support. Gwidth may do it better. */ ++"/Gswidth {dup type /stringtype eq {stringwidth} {pop (n) stringwidth} ifelse} def\n", + "/MFwidth {0 exch { dup 5 get 3 ge { 5 get 3 eq { 0 } { pop } ifelse }\n", + " {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont\n", +-" 6 get stringwidth pop add} {pop} ifelse} ifelse} forall} bind def\n", ++" 6 get Gswidth pop add} {pop} ifelse} ifelse} forall} def\n", + + /* flush left show */ + "/MLshow { currentpoint stroke M\n", +@@ -366,8 +381,11 @@ PS_RememberFont(char *fname, int can_ree + if (strcmp(fnp->name, myfname) == 0) + return NULL; + +- /* we did not find the name */ ++ /* Ignore it if illegal characters will corrupt the PostScript syntax */ ++ if (strpbrk(myfname, "{}[]() ")) ++ return NULL; + ++ /* we have not seen this font before; store name and apply encoding */ + fnp = (struct PS_FontName *)gp_alloc(sizeof(struct PS_FontName), + "PostScript Font record"); + fnp->name = gp_strdup(myfname); +@@ -376,12 +394,17 @@ PS_RememberFont(char *fname, int can_ree + + switch(encoding) { + case S_ENC_ISO8859_1: ++ case S_ENC_UTF8: + recode = "reencodeISO def\n"; + break; + case S_ENC_ISO8859_2: + recode = "reencodeISO2 def\n"; + break; +- case S_ENC_ISO8859_15: ++ case S_ENC_ISO8859_9: /* ISO8859-9 is Latin5 */ ++ case S_ENC_CP1254: ++ recode = "reencodeISO9 def\n"; ++ break; ++ case S_ENC_ISO8859_15: /* ISO8859-15 is Latin9 */ + recode = "reencodeISO15 def\n"; + break; + case S_ENC_CP437: +@@ -407,11 +430,13 @@ PS_RememberFont(char *fname, int can_ree + break; + } + +- if (can_reencode && recode) { +- fprintf(gppsfile,"/%s %s", myfname, recode); +- return NULL; +- } else +- return recode; ++ if (recode) { ++ if (ENHps_opened_string) ++ ENHPS_FLUSH(); ++ fprintf(gppsfile,"/%s %s", fnp->name, recode); ++ } ++ ++ return NULL; + } + + char * +@@ -454,6 +479,7 @@ enum PS_id { + PSLATEX_ROTATE, PSLATEX_NOROTATE, PSLATEX_AUXFILE, PSLATEX_NOAUXFILE, + PSLATEX_OLDSTYLE, PSLATEX_NEWSTYLE, EPSLATEX_HEADER, EPSLATEX_NOHEADER, + PS_SIZE, ++ PS_ADOBEGLYPHNAMES, PS_NOADOBEGLYPHNAMES, + PS_OTHER + }; + +@@ -499,6 +525,8 @@ static struct gen_table PS_opts[] = + { "noa$uxfile", PSLATEX_NOAUXFILE }, + { "old$style", PSLATEX_OLDSTYLE }, + { "new$style", PSLATEX_NEWSTYLE }, ++ { "adobe$glyphnames", PS_ADOBEGLYPHNAMES }, ++ { "noadobe$glyphnames", PS_NOADOBEGLYPHNAMES }, + { NULL, PS_OTHER } + }; + +@@ -848,35 +876,36 @@ PS_options() + break; + case PS_FONTFILE: { + TBOOLEAN deleteentry = FALSE; ++ char *fontfilename = NULL; + c_token++; + if (ps_params->terminal != PSTERM_POSTSCRIPT) + int_error(c_token, + "extraneous argument in set terminal %s",term->name); + +- if (!isstring(c_token)) { +- if (equals(c_token, "add")) +- c_token++; +- else if (almost_equals(c_token, "del$ete")) { +- deleteentry = TRUE; +- c_token++; +- } else +- int_error(c_token, "Font filename expected"); +- } +- if (isstring(c_token)) { +- TBOOLEAN filename_doubled = FALSE; +- struct ps_fontfile_def *curr_ps_fontfile = ++ if (equals(c_token, "add")) ++ c_token++; ++ else if (almost_equals(c_token, "del$ete")) { ++ deleteentry = TRUE; ++ c_token++; ++ } ++ ++ if (!(fontfilename = try_to_get_string())) { ++ int_error(c_token, "Font filename expected"); ++ } else { ++ TBOOLEAN filename_doubled = FALSE; ++ struct ps_fontfile_def *curr_ps_fontfile = + ps_params->first_fontfile; +- struct ps_fontfile_def *prev_ps_fontfile = NULL; +- struct ps_fontfile_def *new_ps_fontfile = +- gp_alloc(sizeof(struct ps_fontfile_def), +- "new_ps_fontfile"); +- +- new_ps_fontfile->fontfile_name = +- gp_alloc (token_len(c_token), +- "new_ps_fontfile->fontfile_name"); +- quote_str(new_ps_fontfile->fontfile_name, +- c_token, token_len(c_token)); +- gp_expand_tilde(&(new_ps_fontfile->fontfile_name)); ++ struct ps_fontfile_def *prev_ps_fontfile = NULL; ++ struct ps_fontfile_def *new_ps_fontfile = ++ gp_alloc(sizeof(struct ps_fontfile_def), ++ "new_ps_fontfile"); ++ ++ new_ps_fontfile->fontfile_name = ++ gp_alloc (token_len(c_token), ++ "new_ps_fontfile->fontfile_name"); ++ gp_expand_tilde(&fontfilename); ++ new_ps_fontfile->fontfile_name = fontfilename; ++ new_ps_fontfile->fontname = NULL; + if (!deleteentry) { + #if defined(PIPES) + if (*(new_ps_fontfile->fontfile_name) != '<') { +@@ -884,7 +913,7 @@ PS_options() + new_ps_fontfile->fontfile_fullname = + fontpath_fullname(new_ps_fontfile->fontfile_name); + if (!new_ps_fontfile->fontfile_fullname) +- int_error(c_token, "Font file '%s' not found", ++ int_error(c_token-1, "Font file '%s' not found", + new_ps_fontfile->fontfile_name); + #if defined(PIPES) + } else +@@ -901,45 +930,43 @@ PS_options() + lf=lf->prev; + } + if ((lf && lf->interactive) || interactive) +- /* if (interactive) { */ + PS_load_fontfile(new_ps_fontfile,FALSE); + } + +- if (ps_params->first_fontfile) { +- while (curr_ps_fontfile) { +- if (strcmp(curr_ps_fontfile->fontfile_name, +- new_ps_fontfile->fontfile_name) == 0) { +- filename_doubled = TRUE; +- if (deleteentry) { ++ if (ps_params->first_fontfile) { ++ while (curr_ps_fontfile) { ++ if (strcmp(curr_ps_fontfile->fontfile_name, ++ new_ps_fontfile->fontfile_name) == 0) { ++ filename_doubled = TRUE; ++ if (deleteentry) { + delete_ps_fontfile(prev_ps_fontfile, + curr_ps_fontfile); +- curr_ps_fontfile = NULL; +- break; +- } +- } +- prev_ps_fontfile = curr_ps_fontfile; +- curr_ps_fontfile = curr_ps_fontfile->next; +- } +- if (!filename_doubled) { +- if (!deleteentry) +- prev_ps_fontfile->next = new_ps_fontfile; +- else +- int_warn(c_token,"Can't delete Font filename '%s'", +- new_ps_fontfile->fontfile_name); +- } +- } else { +- if (!deleteentry) +- ps_params->first_fontfile = new_ps_fontfile; +- else +- int_warn(c_token, "Can't delete Font filename '%s'", +- new_ps_fontfile->fontfile_name); +- } +- c_token++; +- } else +- int_error(c_token, "Font filename expected"); +- break; +- } +- case PS_NOFONTFILES: ++ curr_ps_fontfile = NULL; ++ break; ++ } ++ } ++ prev_ps_fontfile = curr_ps_fontfile; ++ curr_ps_fontfile = curr_ps_fontfile->next; ++ } ++ if (!filename_doubled) { ++ if (!deleteentry) ++ prev_ps_fontfile->next = new_ps_fontfile; ++ else ++ int_warn(c_token,"Can't delete Font filename '%s'", ++ new_ps_fontfile->fontfile_name); ++ } ++ } else { ++ if (!deleteentry) ++ ps_params->first_fontfile = new_ps_fontfile; ++ else ++ int_warn(c_token, "Can't delete Font filename '%s'", ++ new_ps_fontfile->fontfile_name); ++ } ++ c_token++; ++ } ++ break; ++ } ++ case PS_NOFONTFILES: + if (ps_params->terminal != PSTERM_POSTSCRIPT) + int_error(c_token, + "extraneous argument in set terminal %s",term->name); +@@ -948,6 +975,14 @@ PS_options() + ps_params->first_fontfile); + ++c_token; + break; ++ case PS_ADOBEGLYPHNAMES: ++ ps_params->adobeglyphnames = TRUE; ++ ++c_token; ++ break; ++ case PS_NOADOBEGLYPHNAMES: ++ ps_params->adobeglyphnames = FALSE; ++ ++c_token; ++ break; + case PS_PALFUNCPARAM: + if (set_palfunc) + int_error(c_token, +@@ -999,8 +1034,16 @@ PS_options() + set_fontsize = TRUE; + *comma = '\0'; + } +- if (*s) ++ if (*s) { ++ /* Filter out characters that would confuse PostScript */ ++ if (strpbrk(s, "()[]{}| ")) { ++ int_warn(c_token-1,"Illegal characters in PostScript font name."); ++ int_warn(NO_CARET,"I will try to fix it but this may not work."); ++ while (strpbrk(s, "()[]{}| ")) ++ *(strpbrk(s, "()[]{}| ")) = '-'; ++ } + strncpy(ps_params->font, s, sizeof(ps_params->font)); ++ } + free(s); + } else + int_error(c_token-1, +@@ -1118,6 +1161,12 @@ PS_options() + } + #endif + ++ if ((encoding == S_ENC_UTF8) && (ps_params->terminal == PSTERM_POSTSCRIPT)) { ++ sprintf(tmp_term_options," %sadobeglyphnames \\\n ", ++ ps_params->adobeglyphnames ? "" : "no"); ++ strcat(term_options,tmp_term_options); ++ } ++ + if (ps_explicit_size) { + if (ps_explicit_units == CM) + sprintf(tmp_term_options,"size %.2fcm, %.2fcm ", +@@ -1152,6 +1201,29 @@ PS_options() + static TBOOLEAN ps_common_uses_fonts; + static unsigned int ps_common_xoff, ps_common_yoff; + ++/* The default UTF8 code will use glyph identifiers uniXXXX for all glyphs above 0x0100. ++ * If you define ADOBE_ENCODING_NAMES, then it will instead use the glyph names from the ++ * file aglfn.txt. Names in the range 0x0100 - 0x01FF correspond to those used by the ++ * Latin1 encoding scheme. This unicode code page deliberately uses the same character ++ * mapping as Latin1. Adobe also recommends names for many characters outside this ++ * range, but not all fonts adhere to this. You can substitute a different aglfn.txt ++ * file at run time if you want to use a different scheme. ++ */ ++#define ADOBE_ENCODING_NAMES 1 ++ ++#if (ADOBE_ENCODING_NAMES) ++ ++typedef struct ps_glyph { ++ unsigned long unicode; ++ char * glyphname; ++} ps_glyph; ++ ++static ps_glyph *aglist = NULL; ++static int aglist_alloc = 0; ++static int aglist_size = 0; ++static int psglyphs = 0; ++ ++#endif + + TERM_PUBLIC void + PS_load_fontfile(struct ps_fontfile_def *current_ps_fontfile, TBOOLEAN doload) +@@ -1206,7 +1278,7 @@ PS_load_fontfile(struct ps_fontfile_def + current_ps_fontfile->fontfile_name + 1); + #endif + } +- else if (strcmp(ext,"ttf") == 0) { ++ else if (!strcmp(ext,"ttf") || !strcmp(ext,"otf")) { + /* TrueType */ + #if defined(PIPES) + ispipe = TRUE; +@@ -1285,6 +1357,7 @@ PS_load_fontfile(struct ps_fontfile_def + strcpy(fontname,strstr(line+1,"/")+1); + fnende = strstr(fontname," "); + *fnende = '\0'; ++ current_ps_fontfile->fontname = gp_strdup(fontname); + /* Print font name */ + if (!doload) { + if (current_ps_fontfile->fontfile_fullname) +@@ -1365,6 +1438,8 @@ PS_load_fontfiles(TBOOLEAN doload) + + while (current_ps_fontfile) { + PS_load_fontfile(current_ps_fontfile,doload); ++ if (current_ps_fontfile->fontname) ++ PS_RememberFont(current_ps_fontfile->fontname, 1); + current_ps_fontfile = current_ps_fontfile->next; + } + } +@@ -1518,11 +1593,16 @@ end\n\ + free(outstr2); + } + ++ /* Dump the body of the prologue */ ++ PS_dump_prologue_file("prologue.ps"); ++ + /* insert font encoding vector */ + if (uses_fonts) { + switch (encoding) { + case S_ENC_ISO8859_1: PS_dump_prologue_file("8859-1.ps"); break; + case S_ENC_ISO8859_2: PS_dump_prologue_file("8859-2.ps"); break; ++ case S_ENC_CP1254: ++ case S_ENC_ISO8859_9: PS_dump_prologue_file("8859-9.ps"); break; + case S_ENC_ISO8859_15: PS_dump_prologue_file("8859-15.ps"); break; + case S_ENC_CP437: PS_dump_prologue_file("cp437.ps"); break; + case S_ENC_CP850: PS_dump_prologue_file("cp850.ps"); break; +@@ -1530,14 +1610,14 @@ end\n\ + case S_ENC_CP1250: PS_dump_prologue_file("cp1250.ps"); break; + case S_ENC_KOI8_R: PS_dump_prologue_file("koi8r.ps"); break; + case S_ENC_KOI8_U: PS_dump_prologue_file("koi8u.ps"); break; ++ case S_ENC_UTF8: PS_dump_prologue_file("utf-8.ps"); ++ if (!aglist) PS_load_glyphlist(); ++ break; + case S_ENC_DEFAULT: + default: break; + } + } + +- /* Dump the body of the prologue */ +- PS_dump_prologue_file("prologue.ps"); +- + /* Redefine old epslatex linetypes if requested */ + if ((ps_params->terminal == PSTERM_EPSLATEX) && ps_params->oldstyle) { + for (i = 0; OldEPSL_linetypes[i] != NULL; i++) +@@ -1582,6 +1662,7 @@ PS_init() + xmax_t = term->xmax * (xsize + xoffset) / (2*PS_SC); + ymin_t = term->ymax * yoffset / (2*PS_SC); + ymax_t = term->ymax * (ysize + yoffset) / (2*PS_SC); ++ term->tscale = PS_SC * 2; + break; + case PSTERM_PORTRAIT: + if (!ps_explicit_size) { +@@ -1592,6 +1673,7 @@ PS_init() + xmax_t = term->xmax * (xsize + xoffset) / PS_SC; + ymin_t = term->ymax * yoffset / PS_SC; + ymax_t = term->ymax * (ysize + yoffset) / PS_SC; ++ term->tscale = PS_SC; + break; + case PSTERM_LANDSCAPE: + if (!ps_explicit_size) { +@@ -1602,6 +1684,7 @@ PS_init() + ymax_t = term->xmax * (xsize+xoffset) / PS_SC; + xmin_t = term->ymax * (1-ysize-yoffset) / PS_SC; + xmax_t = term->ymax * (1-yoffset) / PS_SC; ++ term->tscale = PS_SC; + break; + default: + int_error(NO_CARET, "invalid postscript format used"); +@@ -1694,11 +1777,6 @@ PS_reset() + { + fputs("%%Trailer\n", gppsfile); + +- /* I think the following commands should be executed +- `if (ps_common_uses_fonts)`. So I changed the next line. +- Please see "PS_RememberFont", too. */ /* JFi */ +- +- /* if (!ps_common_uses_fonts) { */ /* JFi */ + if (ps_common_uses_fonts) { + fputs("%%DocumentFonts: ", gppsfile); + while (PS_DocFonts) { +@@ -1884,38 +1962,97 @@ PS_vector(unsigned int x, unsigned int y + TERM_PUBLIC void + PS_put_text(unsigned int x, unsigned int y, const char *str) + { +- char ch; ++#define PS_NONE 0 ++#define PS_TEXT 1 ++#define PS_GLYPH 2 ++ unsigned long ch; + + if (!str && !strlen(str)) + return; + PS_move(x,y); + if (ps_ang != 0) +- fprintf(gppsfile,"currentpoint gsave translate %d rotate 0 0 M\n", +- ps_ang); +- putc('(',gppsfile); +- ch = *str++; +- while(ch!='\0') { +- if ((ch=='(') || (ch==')') || (ch=='\\')) +- putc('\\', gppsfile); +- putc(ch, gppsfile); +- ch = *str++; +- } ++ fprintf(gppsfile,"currentpoint gsave translate %d rotate 0 0 M\n", ps_ang); + +- switch(ps_justify) { +- case LEFT : +- fputs(") Lshow\n", gppsfile); +- break; +- case CENTRE : +- fputs(") Cshow\n", gppsfile); +- break; +- case RIGHT : +- fputs(") Rshow\n", gppsfile); +- break; ++ if (encoding == S_ENC_UTF8 && contains8bit(str)) { ++ /* UTF-8 encoding with multibyte characters present */ ++ int mode = PS_NONE; ++ ++ putc('[', gppsfile); ++ ++ for (utf8toulong(&ch, &str); ch != '\0'; utf8toulong(&ch, &str)) { ++ if (ch < 0x100) { ++ if (mode != PS_TEXT) ++ putc('(', gppsfile); ++ if (ch == '(' || ch == ')' || ch == '\\') ++ putc('\\', gppsfile); ++ putc((char)ch, gppsfile); ++ mode = PS_TEXT; ++ } else { ++ int i; ++ if (mode == PS_TEXT) ++ putc(')', gppsfile); ++ putc('/', gppsfile); ++#if (ADOBE_ENCODING_NAMES) ++ for (i = 0; i < psglyphs; i++) { ++ if (aglist[i].unicode == ch) { ++ fputs(aglist[i].glyphname, gppsfile); ++ break; ++ } ++ } ++ if (i >= psglyphs) /* Must not have found a glyph name */ ++#endif ++ fprintf(gppsfile, (ch > 0xffff) ? "u%lX" : "uni%04lX", ch); ++ mode = PS_GLYPH; ++ } ++ } ++ ++ if (mode == PS_TEXT) ++ putc(')', gppsfile); ++ ++ switch(ps_justify) { ++ case LEFT : ++ fputs("] GLshow\n", gppsfile); ++ break; ++ case CENTRE : ++ fputs("] GCshow\n", gppsfile); ++ break; ++ case RIGHT : ++ fputs("] GRshow\n", gppsfile); ++ break; ++ } ++ ++ } else { ++ /* plain old 8-bit mode (not UTF-8), or UTF-8 string with only 7-bit characters */ ++ putc('(',gppsfile); ++ ch = (char) *str++; ++ while(ch!='\0') { ++ if ((ch=='(') || (ch==')') || (ch=='\\')) ++ putc('\\', gppsfile); ++ putc((char) ch, gppsfile); ++ ch = (char) *str++; ++ } ++ ++ switch(ps_justify) { ++ case LEFT : ++ fputs(") Lshow\n", gppsfile); ++ break; ++ case CENTRE : ++ fputs(") Cshow\n", gppsfile); ++ break; ++ case RIGHT : ++ fputs(") Rshow\n", gppsfile); ++ break; ++ } + } ++ + if (ps_ang != 0) + fputs("grestore\n", gppsfile); + ps_path_count = 0; + PS_relative_ok = FALSE; ++ ++#undef PS_NONE ++#undef PS_TEXT ++#undef PS_GLYPH + } + + +@@ -2034,6 +2171,7 @@ PS_fillbox( + switch(style & 0xf) { + + case FS_SOLID: ++ case FS_TRANSPARENT_SOLID: + /* style == 1 --> fill with intensity according to filldensity */ + filldens = (style >> 4) / 100.0; + if(filldens < 0.0) +@@ -2045,6 +2183,7 @@ PS_fillbox( + break; + + case FS_PATTERN: ++ case FS_TRANSPARENT_PATTERN: + /* style == 2 --> fill with pattern according to fillpattern */ + /* the upper 3 nibbles of 'style' contain pattern number */ + pattern = (style >> 4) % 8; +@@ -2097,8 +2236,6 @@ PS_fillbox( + + /* ENHPOST */ + +-static TBOOLEAN ENHps_opened_string; /* try to cut out empty ()'s */ +- + /* + * close a postscript string if it has been opened + */ +@@ -2111,6 +2248,8 @@ ENHPS_FLUSH() + } + } + ++static char *ENHps_opensequence = NULL; ++ + /* + * open a postscript string + */ +@@ -2134,22 +2273,92 @@ ENHPS_OPEN( + } + + if (!ENHps_opened_string) { +- fprintf(gppsfile, "[(%s) %.1f %.1f %s %s %d (", ++ int safelen = strlen(fontname) + 40; ++ free(ENHps_opensequence); ++ ENHps_opensequence = gp_alloc(safelen,"ENHPS_opensequence"); ++ /* EAM November 2007 - moved here from enhanced_recursion() */ ++ PS_RememberFont(fontname,1); ++#ifdef HAVE_SNPRINTF ++ snprintf(ENHps_opensequence, safelen, "[(%s) %.1f %.1f %s %s %d ", ++ fontname, fontsize, base, ++ widthflag ? "true" : "false", ++ showflag ? "true" : "false", ++ overprint); ++#else ++ sprintf(ENHps_opensequence, "[(%s) %.1f %.1f %s %s %d ", + fontname, fontsize, base, + widthflag ? "true" : "false", + showflag ? "true" : "false", + overprint); ++#endif ++ fprintf(gppsfile, "%s(", ENHps_opensequence); + ENHps_opened_string = TRUE; + } + } + + /* +- * write one or more characters from inside enhanced text processing ++ * Write one character from inside enhanced text processing. ++ * This is trivial except in the case of multi-byte encoding. + */ + TERM_PUBLIC void + ENHPS_WRITEC(int c) + { +- fputc(c, gppsfile); ++ static int in_utf8 = 0; /* nonzero means we are inside a multibyte sequence */ ++ static char utf8[6]; /* holds the multibyte sequence being accumulated */ ++ static int nbytes = 0; /* number of bytes expected in the sequence */ ++ ++ /* UTF-8 Encoding */ ++ if (encoding == S_ENC_UTF8 && (c & 0x80) != 0) { ++ if (in_utf8 == 0) { ++ nbytes = (c & 0xE0) == 0xC0 ? 2 ++ : (c & 0xF0) == 0xE0 ? 3 ++ : (c & 0xF8) == 0xF0 ? 4 ++ : 0; ++ if (!nbytes) /* Illegal UTF8 char; hope it's printable */ ++ fputc(c, gppsfile); ++ else ++ utf8[in_utf8++] = c; ++ } else { ++ utf8[in_utf8++] = c; ++ if (in_utf8 >= nbytes) { ++ unsigned long wch = '\0'; ++ const char *str = &utf8[0]; ++ int i; ++ ++ utf8[nbytes] = '\0'; ++ in_utf8 = 0; ++ utf8toulong(&wch, &str); ++ ++ if (wch < 0x100) { /* Single byte ISO8859-1 character */ ++ fputc(wch, gppsfile); ++ return; ++ } ++ ++ /* Finish off previous partial string, if any */ ++ ENHPS_FLUSH(); ++ ++ /* Write a new partial string for this glyph */ ++ fprintf(gppsfile, "%s/", ENHps_opensequence); ++#if (ADOBE_ENCODING_NAMES) ++ for (i = 0; i < psglyphs; i++) { ++ if (aglist[i].unicode == wch) { ++ fputs(aglist[i].glyphname, gppsfile); ++ break; ++ } ++ } ++ if (i >= psglyphs) /* Must not have found a glyph name */ ++#endif ++ fprintf(gppsfile, (wch > 0xffff) ? "u%lX" : "uni%04lX", wch); ++ fprintf(gppsfile, "]\n"); ++ ++ /* Mark string closed */ ++ ENHps_opened_string = FALSE; ++ } ++ } ++ } else ++ ++ /* Single byte character */ ++ fputc(c, gppsfile); + } + + /* a set-font routine for enhanced post : simply copies +@@ -2198,7 +2407,7 @@ ENHPS_put_text(unsigned int x, unsigned + + PS_FLUSH_PATH; + +- /* if there are no magic characters, we should just be able ++ /* FIXME: if there are no magic characters, we should just be able + * punt the string to PS_put_text(), which will give shorter + * ps output [eg tics and stuff rarely need extra processing], + * but we need to make sure that the current font is the +@@ -2574,7 +2783,7 @@ PS_make_header(t_sm_palette *palette) + TERM_PUBLIC int PS_make_palette (t_sm_palette *palette) + { + if (palette == NULL) { +- return 0; /* postscript can do continuous colors */ ++ return 0; /* postscript can do continuous colors */ + } + + PS_make_header(palette); +@@ -2647,6 +2856,9 @@ TERM_PUBLIC void PS_filled_polygon (int + /* General case for solid or pattern-filled polygons + * gsave N ... density PolyFill + */ ++ int fillpar = style >> 4; ++ style = style &0xf; ++ + fprintf(gppsfile, "gsave "); + fprintf(gppsfile, "%i %i N", corners[0].x, corners[0].y); + for (i = 1; i < points; i++) { +@@ -2662,6 +2874,8 @@ TERM_PUBLIC void PS_filled_polygon (int + + case FS_SOLID: + filldens = (style >> 4) / 100.0; ++ case FS_TRANSPARENT_SOLID: ++ filldens = (fillpar) / 100.0; + if(filldens < 0.0) + filldens = 0.0; + if(filldens >= 1.0) +@@ -2670,8 +2884,10 @@ TERM_PUBLIC void PS_filled_polygon (int + fprintf(gppsfile, " %.2f PolyFill\n", filldens); + break; + ++ case FS_TRANSPARENT_PATTERN: ++ fprintf(gppsfile," /TransparentPatterns true def\n"); + case FS_PATTERN: +- pattern = (style >> 4) % 8; ++ pattern = (fillpar) % 8; + if (pattern == 0) { + filldens = 0.5; + fprintf(gppsfile, " %.1f PolyFill\n", filldens); +@@ -2730,10 +2946,11 @@ delete_ps_fontfile(struct ps_fontfile_de + if (prev != NULL) /* there is a previous ps_fontfile */ + prev->next = this->next; + else /* this = ps_params->first_fontfile */ +- /* so change ps_params->first_fontfile */ ++ /* so change ps_params->first_fontfile */ + ps_params->first_fontfile = this->next; + free(this->fontfile_name); + free(this->fontfile_fullname); ++ free(this->fontname); + free(this); + this = NULL; + } +@@ -2770,15 +2987,15 @@ enum PS_ENCODING { + * routine. + */ + static char * +-PS_encode_image(unsigned M, unsigned N, coordval *image, t_imagecolor color_mode, ++PS_encode_image(unsigned int M, unsigned int N, coordval *image, t_imagecolor color_mode, + int bits_per_component, int max_colors, double cscale, + enum PS_ENCODING encoding, int *return_num_bytes) + { +- unsigned coord_remaining; ++ unsigned int coord_remaining; + coordval *coord_ptr; + unsigned short i_line; +- unsigned i_element; +- unsigned end_of_line; ++ unsigned int i_element; ++ unsigned int end_of_line; + unsigned short bits_remaining, bits_start; + + unsigned long tuple4; +@@ -2954,7 +3171,7 @@ PS_encode_image(unsigned M, unsigned N, + + + static void +-print_five_operand_image(unsigned M, unsigned N, gpiPoint *corner, t_imagecolor color_mode, unsigned short bits_per_component) ++print_five_operand_image(unsigned int M, unsigned int N, gpiPoint *corner, t_imagecolor color_mode, unsigned short bits_per_component) + { + char *space = ps_params->level1 ? "" : " "; + +@@ -2980,7 +3197,7 @@ print_five_operand_image(unsigned M, uns + + + TERM_PUBLIC void +-PS_image (unsigned M, unsigned N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) ++PS_image (unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) + { + char *encoded_image; + int num_encoded_bytes; +@@ -3163,13 +3380,12 @@ PS_image (unsigned M, unsigned N, coordv + * If unsuccessful, look for hardcoded absolute path on UNIX, + * or hardcoded relative path on Windows and OS2, + * or files included at compile time. */ +-static void +-PS_dump_prologue_file(char *name) ++static FILE * ++PS_open_prologue_file(char *name) + { + char *fullname; + char *ps_prologue_dir; + FILE *prologue_fd; +- char buf[256]; + + if ((ps_prologue_dir = getenv("GNUPLOT_PS_DIR")) == NULL) { + #ifdef GNUPLOT_PS_DIR +@@ -3221,6 +3437,8 @@ PS_dump_prologue_file(char *name) + dump = prologue_8859_1_ps; + else if (!strcmp(name,"8859-2.ps")) + dump = prologue_8859_2_ps; ++ else if (!strcmp(name,"8859-9.ps")) ++ dump = prologue_8859_9_ps; + else if (!strcmp(name,"cp1250.ps")) + dump = prologue_cp1250_ps; + else if (!strcmp(name,"cp437.ps")) +@@ -3233,16 +3451,18 @@ PS_dump_prologue_file(char *name) + dump = prologue_koi8r_ps; + else if (!strcmp(name,"koi8u.ps")) + dump = prologue_koi8u_ps; ++ else if (!strcmp(name,"utf-8.ps")) ++ dump = prologue_utf_8_ps; + else if (!strcmp(name,"prologue.ps")) + dump = prologue_prologue_ps; + else +- int_error(NO_CARET,"Requested Postscript prologue is not included"); ++ int_warn(NO_CARET,"Requested Postscript prologue %s not found",name); + + if (dump) { + for (i = 0; dump[i] != NULL; ++i) + fprintf(gppsfile, "%s", dump[i]); + } +- return; ++ return NULL; + #endif /* GNUPLOT_PS_DIR */ + } + +@@ -3273,8 +3493,62 @@ PS_dump_prologue_file(char *name) + int_error(NO_CARET,"Plot failed!"); + } + free(fullname); +- while (fgets(buf, sizeof(buf), prologue_fd)) +- fputs(buf, gppsfile); ++ return prologue_fd; ++} ++ ++static void ++PS_dump_prologue_file(char *name) ++{ ++ char buf[256]; ++ FILE *prologue_fd = PS_open_prologue_file(name); ++ ++ if (prologue_fd) { ++ while (fgets(buf, sizeof(buf), prologue_fd)) ++ fputs(buf, gppsfile); ++ fclose(prologue_fd); ++ } ++} ++ ++static void ++PS_load_glyphlist() ++{ ++ char buf[256]; ++ char *next = NULL; ++ unsigned int code; ++ int len; ++ char glyph_name[32]; ++ FILE *prologue_fd = PS_open_prologue_file("aglfn.txt"); ++ ++ if (!prologue_fd) ++ return; ++ ++ while (fgets(buf, sizeof(buf), prologue_fd)) { ++ if (*buf == '#' || *buf == '\n') ++ continue; ++ code = strtol(buf,&next,16); ++ ++ /* User control over whether Adobe glyph names are used for unicode */ ++ /* entries above 0x0100. I.e. when we see a UTF-8 alpha, do we write */ ++ /* /alpha rather than /uni03B1? Some fonts want one or the other. */ ++ /* This is controlled by 'set term post adobeglyphnames'. */ ++ if (code >= 0x0100 && !ps_params->adobeglyphnames) ++ continue; ++ ++ next++; ++ len = strchr(next,';') - next; ++ strncpy(glyph_name, next, len); ++ glyph_name[len] = '\0'; ++ FPRINTF((stderr, "%04X %s\n", code, glyph_name)); ++ if (aglist_size + sizeof(ps_glyph) > aglist_alloc) { ++ aglist_alloc += 2048; ++ aglist = gp_realloc(aglist, aglist_alloc, "aglist"); ++ } ++ aglist[psglyphs].unicode = code; ++ aglist[psglyphs].glyphname = gp_strdup(glyph_name); ++ aglist_size += sizeof(ps_glyph); ++ psglyphs++; ++ } ++ + fclose(prologue_fd); + } + +@@ -3295,6 +3569,32 @@ PS_path(int p) + + } + ++TERM_PUBLIC void ++PS_layer(t_termlayer syncpoint) ++{ ++ static int plotno = 0; ++ ++ /* We must ignore all syncpoints that we don't recognize */ ++ switch (syncpoint) { ++ ++ default: ++ break; ++ ++ case TERM_LAYER_BEFORE_PLOT: ++ fprintf(gppsfile, "%% Begin plot #%d\n", ++plotno); ++ break; ++ ++ case TERM_LAYER_AFTER_PLOT: ++ fprintf(gppsfile, "%% End plot #%d\n", plotno); ++ break; ++ ++ case TERM_LAYER_RESET: ++ plotno = 0; ++ break; ++ ++ } ++} ++ + #endif /* TERM_BODY */ + + #ifdef TERM_TABLE +@@ -3307,7 +3607,7 @@ TERM_TABLE_START(post_driver) + PS_text, null_scale, PS_graphics, PS_move, PS_vector, + PS_linetype, PS_put_text, PS_text_angle, + PS_justify_text, PS_point, PS_arrow, PS_set_font, PS_pointsize, +- TERM_BINARY|TERM_IS_POSTSCRIPT|TERM_CAN_CLIP /*flags*/, ++ TERM_BINARY|TERM_IS_POSTSCRIPT|TERM_CAN_CLIP|TERM_CAN_DASH /*flags*/, + 0 /*suspend*/, 0 /*resume*/, PS_fillbox, PS_linewidth + #ifdef USE_MOUSE + , 0, 0, 0, 0, 0 /* no mouse support for postscript */ +@@ -3320,8 +3620,9 @@ TERM_TABLE_START(post_driver) + , PS_image + #endif + , ENHPS_OPEN, ENHPS_FLUSH, ENHPS_WRITEC +- , 0 /* layer control */ ++ , PS_layer /* used only to insert comments */ + , PS_path ++ , PS_SC /* terminal to pixel coord scale factor */ + TERM_TABLE_END(post_driver) + + #undef LAST_TERM +@@ -3432,7 +3733,7 @@ PS_COMMON_OPTS2 + " but transfers the texts to LaTeX instead of including in the PostScript", + " code. Thus, many options are the same as in the `postscript terminal`.", + "", +-" From version 4.0 to 4.2, some changes have been invoked into the default ", ++" From version 4.0 to 4.1, some changes have been invoked into the default ", + " appearance of the epslatex terminal to reach better consistency with the", + " postscript terminal: The plot size has been changed from 5 x 3 inches to", + " 5 x 3.5 inches; the character width is now estimated to be 60% of the font", +@@ -3625,7 +3926,7 @@ PS_COMMON_DOC1 + " \\special{psfile=...} command. Remember to close the `output file` before", + " next plot unless in `multiplot` mode.", + "", +-" Gnuplot versions prior version 4.2 have generated plots of the size", ++" Gnuplot versions prior version 4.1 have generated plots of the size", + " 5 x 3 inches using the ps(la)tex terminal while the current version generates", + " 5 x 3.5 inches to be consistent with the postscript eps terminal. In", + " addition, the character width is now estimated to be 60% of the font size", +@@ -3678,7 +3979,7 @@ START_HELP(post) + " {enhanced | noenhanced}", + " {defaultplex | simplex | duplex}", + " {fontfile [add | delete] \"\"", +-" | nofontfiles}", ++" | nofontfiles} {{no}adobeglyphnames}", + PS_COMMON_OPTS1 + PS_COMMON_OPTS2 + PS_COMMON_PROLOG_INFO +@@ -3748,112 +4049,6 @@ PS_COMMON_DOC1 + " A PostScript file is editable, so once `gnuplot` has created one, you are", + " free to modify it to your heart's desire. See the `editing postscript`", + " section for some hints.", +-"2 enhanced postscript", +-"?commands set terminal postscript enhanced", +-"?set terminal postscript enhanced", +-"?set term postscript enhanced", +-"?terminal postscript enhanced", +-"?term postscript enhanced", +-"?enhanced_postscript", +-"?enhanced postscript", +-"?Enhanced postscript", +-"?enhanced text", +-"?Enhanced text", +-"?enhanced", +-" Several terminal types support an enhanced text mode in which ", +-" additional formatting information is embedded in the text string.", +-"", +-"@start table - first is interactive cleartext form", +-" Control Examples Explanation", +-" ^ a^x superscript", +-" _ a_x subscript", +-" @ @x or a@^b_c phantom box (occupies no width)", +-" & &{space} inserts space of specified length", +-" ~ ~a{.8-} overprints '-' on 'a', raised by .8", +-" times the current fontsize", +-"#\\begin{tabular}{|ccl|} \\hline", +-"#\\multicolumn{3}{|c|}{Enhanced Text Control Codes} \\\\ \\hline", +-"#Control & Examples & Explanation \\\\ \\hline", +-"#\\verb~^~ & \\verb~a^x~ & superscript\\\\", +-"#\\verb~_~ & \\verb~a_x~ & subscript\\\\", +-"#\\verb~@~ & \\verb~@x or a@^b_c~ & phantom box (occupies no width)\\\\", +-"#\\verb~&~ & \\verb~&{space}~ & inserts space of specified length\\\\", +-"#\\verb|~| & \\verb|~a{.8-}| & overprints '-' on 'a', raised by .8\\\\", +-"#\\verb~ ~ & \\verb~ ~ & times the current fontsize\\\\", +-"%c c l .", +-"%.TE", /* ugly - doc2ms uses @ for column separator, but here we */ +-"%.TS", /* need @ in table, so end and restart the table ! */ +-"%center box tab ($) ;", +-"%c c l .", +-"%Control$Examples$Explanation", +-"%_", +-"%^$a^x$superscript", +-"%\\&_$a\\&_x$subscript", +-"% @ $ @x or a\\&@^b\\&_c$phantom box (occupies no width)", +-"% & $ &{space}$inserts space of specified length", +-"% ~ $ ~a{.8-}$overprints '-' on 'a', raised by .8", +-"% $ $times the current fontsize", +-"@end table", +-"", +-" Braces can be used to place multiple-character text where a single character", +-" is expected (e.g., 2^{10}). To change the font and/or size, use the full", +-" form: {/[fontname][=fontsize | *fontscale] text}. Thus {/Symbol=20 G} is a", +-" 20-point GAMMA and {/*0.75 K} is a K at three-quarters of whatever fontsize", +-" is currently in effect. (The '/' character MUST be the first character after", +-" the '{'.)", +-"", +-" If the encoding vector has been changed by `set encoding`, the default", +-" encoding vector can be used instead by following the slash with a dash. This", +-" is unnecessary if you use the Symbol font, however---since /Symbol uses its", +-" own encoding vector, `gnuplot` will not apply any other encoding vector to", +-" it.", +-"", +-" The phantom box is useful for a@^b_c to align superscripts and subscripts", +-" but does not work well for overwriting an accent on a letter. (To do the", +-" latter, it is much better to use 'set encoding iso_8859_1' to change to the", +-" ISO Latin-1 encoding vector, which contains a large variety of letters with", +-" accents or other diacritical marks.) Since the box is non-spacing, it is", +-" sensible to put the shorter of the subscript or superscript in the box (that", +-" is, after the @).", +-"", +-" Space equal in length to a string can be inserted using the '&' character.", +-" Thus", +-" 'abc&{def}ghi'", +-" would produce", +-" 'abc ghi'.", +-"", +-" The '~' character causes the next character or bracketed text to be", +-" overprinted by the following character or bracketed text. The second text", +-" will be horizontally centered on the first. Thus '~a/' will result in an 'a'", +-" with a slash through it. You can also shift the second text vertically by", +-" preceding the second text with a number, which will define the fraction of the", +-" current fontsize by which the text will be raised or lowered. In this case", +-" the number and text must be enclosed in brackets because more than one", +-" character is necessary. If the overprinted text begins with a number, put a", +-" space between the vertical offset and the text ('~{abc}{.5 000}'); otherwise", +-" no space is needed ('~{abc}{.5---}'). You can change the font for one or", +-" both strings ('~a{.5 /*.2 o}'---an 'a' with a one-fifth-size 'o' on top---and", +-" the space between the number and the slash is necessary), but you can't", +-" change it after the beginning of the string. Neither can you use any other", +-" special syntax within either string. You can, of course, use control", +-" characters by escaping them (see below), such as '~a{\\^}'", +-"", +-" You can access special symbols numerically by specifying \\character-code (in", +-" octal), e.g., {/Symbol \\245} is the symbol for infinity.", +-"", +-" You can escape control characters using \\, e.g., \\\\, \\{, and so on.", +-"", +-" But be aware that strings in double-quotes are parsed differently than those", +-" enclosed in single-quotes. The major difference is that backslashes may need", +-" to be doubled when in double-quoted strings.", +-"", +-" Examples (these are hard to describe in words---try them!):", +-" set xlabel 'Time (10^6 {/Symbol m}s)'", +-" set title '{/Symbol=18 \\362@_{/=9.6 0}^{/=12 x}} \\", +-" {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}'", +-"", +-" The file \"ps_guide.ps\" in the /docs/psdoc subdirectory of the `gnuplot` source", +-" distribution contains more examples of the enhanced syntax.", + "2 editing postscript", + "?commands set terminal postscript editing", + "?set terminal postscript editing", +@@ -4009,6 +4204,26 @@ PS_COMMON_DOC1 + " controlled at the time gnuplot is built. However, you can control this", + " either by defining an environment variable GNUPLOT_PS_DIR or by using the", + " gnuplot command `set loadpath`. See `set loadpath`.", ++"2 postscript adobeglyphnames", ++"?commands set terminal postscript adobeglyphnames", ++"?set terminal postscript adobeglyphnames", ++"?terminal postscript adobeglyphnames", ++"?postscript adobeglyphnames", ++"?adobeglyphnames", ++"=UTF-8", ++" This setting is only relevant to PostScript output with UTF-8 encoding.", ++" It controls the names used to describe characters with Unicode entry points", ++" higher than 0x00FF. That is, all characters outside of the Latin1 set.", ++" In general unicode characters do not have a unique name; they have only a", ++" unicode identification code. However, Adobe have a recommended scheme for", ++" assigning names to certain ranges of characters (extended Latin, Greek, etc).", ++" Some fonts use this scheme, others do not. By default, gnuplot will use", ++" the Adobe glyph names. E.g. the lower case Greek letter alpha will be called", ++" /alpha. If you specific `noadobeglyphnames` then instead gnuplot will use", ++" /uni03B1 to describe this character. If you get this setting wrong, the", ++" character may not be found even if it is present in the font.", ++" It is probably always correct to use the default for Adobe fonts, but for", ++" other fonts you may have to try both settings. See also `fontfile`.", + "", + "" + END_HELP(post) +--- term/pslatex.trm ++++ term/pslatex.trm 2009-05-09 13:53:00.000000000 +0200 +@@ -1,5 +1,5 @@ + /* Hello, Emacs, this is -*-C-*- +- * $Id: pslatex.trm,v 1.69.2.1 2008/02/22 20:34:41 sfeam Exp $ ++ * $Id: pslatex.trm,v 1.72 2008/02/22 20:02:26 sfeam Exp $ + */ + + /* GNUPLOT - pslatex.trm */ +@@ -441,7 +441,10 @@ EPSLATEX_common_init() + case S_ENC_ISO8859_2: + inputenc = "latin2"; + break; +- case S_ENC_ISO8859_15: ++ case S_ENC_ISO8859_9: /* ISO8859-9 is Latin5 */ ++ inputenc = "latin5"; ++ break; ++ case S_ENC_ISO8859_15: /* ISO8859-15 is Latin9 */ + inputenc = "latin9"; + break; + case S_ENC_CP437: +--- term/PostScript/8859-1.ps +++ term/PostScript/8859-1.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,3 +1,6 @@ +% @@ -245,8 +1472,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/8859-1.ps term/PostScript/8859-1.ps /reencodeISO { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall -diff -U 3 -H -d -r -N -- term/PostScript/8859-15.ps term/PostScript/8859-15.ps ---- term/PostScript/8859-15.ps 2006-03-24 22:48:47.000000000 +0100 +--- term/PostScript/8859-15.ps +++ term/PostScript/8859-15.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,3 +1,6 @@ +% @@ -255,8 +1481,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/8859-15.ps term/PostScript/8859-15.ps /reencodeISO15 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall -diff -U 3 -H -d -r -N -- term/PostScript/8859-2.ps term/PostScript/8859-2.ps ---- term/PostScript/8859-2.ps 2006-08-12 00:35:05.000000000 +0200 +--- term/PostScript/8859-2.ps +++ term/PostScript/8859-2.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,4 +1,5 @@ -% Encoding for ISO-8859-2 (also called as Latin-2), with @@ -265,8 +1490,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/8859-2.ps term/PostScript/8859-2.ps % minor differences to "true" ISO-8859-2 (*commaaccent % instead of *cedilla for sStT -> incorrect in ISO-8859-2, % the standard will probably be modified in this respect) -diff -U 3 -H -d -r -N -- term/PostScript/8859-9.ps term/PostScript/8859-9.ps ---- term/PostScript/8859-9.ps 1970-01-01 01:00:00.000000000 +0100 +--- term/PostScript/8859-9.ps +++ term/PostScript/8859-9.ps 2009-05-09 13:53:00.000000000 +0200 @@ -0,0 +1,44 @@ +% @@ -313,14 +1537,12 @@ diff -U 3 -H -d -r -N -- term/PostScript/8859-9.ps term/PostScript/8859-9.ps +/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis +/dotlessi/scedilla/ydieresis +] def -diff -U 3 -H -d -r -N -- term/PostScript/NOTE.aglfn term/PostScript/NOTE.aglfn ---- term/PostScript/NOTE.aglfn 1970-01-01 01:00:00.000000000 +0100 +--- term/PostScript/NOTE.aglfn +++ term/PostScript/NOTE.aglfn 2009-05-09 13:53:00.000000000 +0200 @@ -0,0 +1,2 @@ +The document aglfn.txt was obtained from http://www.adobe.com/devnet/opentype/archives/aglfn.txt +Do never change this document as this is not allowed by the license found therein. -diff -U 3 -H -d -r -N -- term/PostScript/aglfn.txt term/PostScript/aglfn.txt ---- term/PostScript/aglfn.txt 1970-01-01 01:00:00.000000000 +0100 +--- term/PostScript/aglfn.txt +++ term/PostScript/aglfn.txt 2009-05-09 13:53:00.000000000 +0200 @@ -0,0 +1,932 @@ +# ################################################################################### @@ -1255,8 +2477,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/aglfn.txt term/PostScript/aglfn.txt +017C;zdotaccent;LATIN SMALL LETTER Z WITH DOT ABOVE +0030;zero;DIGIT ZERO +03B6;zeta;GREEK SMALL LETTER ZETA -diff -U 3 -H -d -r -N -- term/PostScript/cp1250.ps term/PostScript/cp1250.ps ---- term/PostScript/cp1250.ps 2006-03-24 22:48:47.000000000 +0100 +--- term/PostScript/cp1250.ps +++ term/PostScript/cp1250.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,3 +1,6 @@ +% @@ -1265,8 +2486,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/cp1250.ps term/PostScript/cp1250.ps /reencodeCP1250 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall -diff -U 3 -H -d -r -N -- term/PostScript/cp437.ps term/PostScript/cp437.ps ---- term/PostScript/cp437.ps 2006-08-12 00:35:05.000000000 +0200 +--- term/PostScript/cp437.ps +++ term/PostScript/cp437.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,4 +1,5 @@ -% encoding for code page 437 @@ -1275,8 +2495,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/cp437.ps term/PostScript/cp437.ps % version 1.0: - Mainly letters are mapped. The following positions % (JFi) are left blank (undefined): % -- first 32 positions, -diff -U 3 -H -d -r -N -- term/PostScript/cp850.ps term/PostScript/cp850.ps ---- term/PostScript/cp850.ps 2006-08-12 00:35:05.000000000 +0200 +--- term/PostScript/cp850.ps +++ term/PostScript/cp850.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,4 +1,5 @@ -% encoding for code page 850 @@ -1285,8 +2504,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/cp850.ps term/PostScript/cp850.ps % version 1.0: - Mainly letters are mapped. The following positions % (JFi) are left blank (undefined): % -- first 32 positions, -diff -U 3 -H -d -r -N -- term/PostScript/cp852.ps term/PostScript/cp852.ps ---- term/PostScript/cp852.ps 2006-08-12 00:22:05.000000000 +0200 +--- term/PostScript/cp852.ps +++ term/PostScript/cp852.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,4 +1,5 @@ -% encoding for code page 852 @@ -1295,8 +2513,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/cp852.ps term/PostScript/cp852.ps /reencodeCP852 { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall -diff -U 3 -H -d -r -N -- term/PostScript/koi8r.ps term/PostScript/koi8r.ps ---- term/PostScript/koi8r.ps 2006-08-12 00:35:05.000000000 +0200 +--- term/PostScript/koi8r.ps +++ term/PostScript/koi8r.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,4 +1,5 @@ -% encoding for code page koi8r @@ -1305,8 +2522,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/koi8r.ps term/PostScript/koi8r.ps % version 1.0: - Mainly letters are mapped. The following positions % (JFi) are left blank (undefined): % -- first 32 positions, -diff -U 3 -H -d -r -N -- term/PostScript/koi8u.ps term/PostScript/koi8u.ps ---- term/PostScript/koi8u.ps 2006-03-24 22:48:47.000000000 +0100 +--- term/PostScript/koi8u.ps +++ term/PostScript/koi8u.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,4 +1,5 @@ % @@ -1314,8 +2530,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/koi8u.ps term/PostScript/koi8u.ps /reencodeKOI8U { dup dup findfont dup length dict begin { 1 index /FID ne { def }{ pop pop } ifelse } forall -diff -U 3 -H -d -r -N -- term/PostScript/prologue.ps term/PostScript/prologue.ps ---- term/PostScript/prologue.ps 2007-10-01 22:49:08.000000000 +0200 +--- term/PostScript/prologue.ps +++ term/PostScript/prologue.ps 2009-05-09 13:53:00.000000000 +0200 @@ -1,5 +1,5 @@ % @@ -1332,8 +2547,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologue.ps term/PostScript/prologue.ps /vpt2 vpt 2 mul def /hpt2 hpt 2 mul def /Lshow {currentpoint stroke M 0 vshift R -diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h ---- term/PostScript/prologues.h 2006-11-20 20:06:01.000000000 +0100 +--- term/PostScript/prologues.h +++ term/PostScript/prologues.h 2009-05-09 13:53:00.000000000 +0200 @@ -2,6 +2,9 @@ * in a form suitable to inclusion in a C source code */ @@ -1345,7 +2559,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "/reencodeISO {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", -@@ -46,6 +49,9 @@ +@@ -46,6 +49,9 @@ NULL }; static const char *prologue_8859_15_ps[] = { @@ -1355,7 +2569,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "/reencodeISO15 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", -@@ -90,7 +96,8 @@ +@@ -90,7 +96,8 @@ NULL }; static const char *prologue_8859_2_ps[] = { @@ -1365,7 +2579,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "% minor differences to \"true\" ISO-8859-2 (*commaaccent \n", "% instead of *cedilla for sStT -> incorrect in ISO-8859-2,\n", "% the standard will probably be modified in this respect)\n", -@@ -138,7 +145,58 @@ +@@ -138,7 +145,58 @@ static const char *prologue_8859_2_ps[] NULL }; @@ -1424,7 +2638,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "/reencodeCP1250 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", -@@ -181,7 +239,8 @@ +@@ -181,7 +239,8 @@ NULL }; static const char *prologue_cp437_ps[] = { @@ -1434,7 +2648,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "% version 1.0:\t- Mainly letters are mapped. The following positions\n", "% (JFi)\t\t are left blank (undefined):\n", "%\t\t-- first 32 positions,\n", -@@ -233,7 +292,8 @@ +@@ -233,7 +292,8 @@ NULL }; static const char *prologue_cp850_ps[] = { @@ -1444,7 +2658,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "% version 1.0: - Mainly letters are mapped. The following positions\n", "% (JFi)\t\t are left blank (undefined):\n", "%\t\t-- first 32 positions,\n", -@@ -282,7 +342,8 @@ +@@ -282,7 +342,8 @@ NULL }; static const char *prologue_cp852_ps[] = { @@ -1454,7 +2668,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "/reencodeCP852 {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", -@@ -326,7 +387,8 @@ +@@ -326,7 +387,8 @@ NULL }; static const char *prologue_koi8r_ps[] = { @@ -1464,7 +2678,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "% version 1.0:\t- Mainly letters are mapped. The following positions\n", "% (JFi)\t\t are left blank (undefined):\n", "%\t\t-- first 32 positions,\n", -@@ -376,6 +438,7 @@ +@@ -376,6 +438,7 @@ NULL static const char *prologue_koi8u_ps[] = { "%\n", @@ -1472,7 +2686,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "/reencodeKOI8U {\n", "dup dup findfont dup length dict begin\n", "{ 1 index /FID ne { def }{ pop pop } ifelse } forall\n", -@@ -419,7 +482,7 @@ +@@ -419,7 +482,7 @@ NULL static const char *prologue_prologue_ps[] = { "%\n", @@ -1481,7 +2695,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "%\n", "/M {moveto} bind def\n", "/L {lineto} bind def\n", -@@ -429,6 +492,7 @@ +@@ -429,6 +492,7 @@ static const char *prologue_prologue_ps[ "/Z {closepath} bind def\n", "/C {setrgbcolor} bind def\n", "/f {rlineto fill} bind def\n", @@ -1489,7 +2703,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "/vpt2 vpt 2 mul def\n", "/hpt2 hpt 2 mul def\n", "/Lshow {currentpoint stroke M 0 vshift R \n", -@@ -669,7 +733,7 @@ +@@ -669,7 +733,7 @@ static const char *prologue_prologue_ps[ " ColR ColG ColB setrgbcolor} def\n", "/BoxColFill {gsave Rec PolyFill} def\n", "/PolyFill {gsave Density fill grestore grestore} def\n", @@ -1498,7 +2712,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h "%\n", "% PostScript Level 1 Pattern Fill routine for rectangles\n", "% Usage: x y w h s a XX PatternFill\n", -@@ -789,3 +853,65 @@ +@@ -789,3 +853,65 @@ static const char *prologue_prologue_ps[ NULL }; @@ -1564,8 +2778,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/prologues.h term/PostScript/prologues.h +NULL +}; + -diff -U 3 -H -d -r -N -- term/PostScript/unicode_big.map term/PostScript/unicode_big.map ---- term/PostScript/unicode_big.map 1970-01-01 01:00:00.000000000 +0100 +--- term/PostScript/unicode_big.map +++ term/PostScript/unicode_big.map 2009-05-09 13:53:00.000000000 +0200 @@ -0,0 +1,863 @@ +=00 U+0000 @@ -2431,8 +3644,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/unicode_big.map term/PostScript/unicode +!37f U+25C7 uni25C7 +!380 U+2297 uni2297 +!381 U+2299 uni2299 -diff -U 3 -H -d -r -N -- term/PostScript/unicode_maps.README term/PostScript/unicode_maps.README ---- term/PostScript/unicode_maps.README 1970-01-01 01:00:00.000000000 +0100 +--- term/PostScript/unicode_maps.README +++ term/PostScript/unicode_maps.README 2009-05-09 13:53:00.000000000 +0200 @@ -0,0 +1,75 @@ + unicode maps README @@ -2510,8 +3722,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/unicode_maps.README term/PostScript/uni +But if you need more, probably you would do better to use a different +gnuplot terminal that supports direct use of UTF-8 TTF fonts (pdf, png, svg). + -diff -U 3 -H -d -r -N -- term/PostScript/unicode_small.map term/PostScript/unicode_small.map ---- term/PostScript/unicode_small.map 1970-01-01 01:00:00.000000000 +0100 +--- term/PostScript/unicode_small.map +++ term/PostScript/unicode_small.map 2009-05-09 13:53:00.000000000 +0200 @@ -0,0 +1,462 @@ +=00 U+0000 @@ -2976,8 +4187,7 @@ diff -U 3 -H -d -r -N -- term/PostScript/unicode_small.map term/PostScript/unico +!362 U+25FB uni25FB +!363 U+25FC uni25FC +!365 U+2609 uni2609 -diff -U 3 -H -d -r -N -- term/PostScript/utf-8.ps term/PostScript/utf-8.ps ---- term/PostScript/utf-8.ps 1970-01-01 01:00:00.000000000 +0100 +--- term/PostScript/utf-8.ps +++ term/PostScript/utf-8.ps 2009-05-09 13:53:00.000000000 +0200 @@ -0,0 +1,58 @@ +% @@ -3038,1236 +4248,3 @@ diff -U 3 -H -d -r -N -- term/PostScript/utf-8.ps term/PostScript/utf-8.ps + Blacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def +/GCshow {currentpoint stroke M dup Gwidth 2 div vshift R + Blacktext {gsave 0 setgray Gsall grestore} {Gsall} ifelse} def -diff -U 3 -H -d -r -N -- term/gd.trm term/gd.trm ---- term/gd.trm 2009-03-03 03:43:52.000000000 +0100 -+++ term/gd.trm 2009-05-09 13:53:00.000000000 +0200 -@@ -1861,7 +1861,7 @@ - #ifdef gdFTEX_Adobe_Custom - /* libgd defaults to UTF-8 encodings. We have limited options for */ - /* over-riding this, but we can try */ -- if (ENHgd_font && !strcmp(ENHgd_font,"Symbol")) { -+ if (encoding != S_ENC_UTF8 && ENHgd_font && !strcmp(ENHgd_font,"Symbol")) { - PNG_FONT_INFO.flags |= gdFTEX_CHARMAP; - PNG_FONT_INFO.charmap = gdFTEX_Adobe_Custom; - } else { -diff -U 3 -H -d -r -N -- term/post.trm term/post.trm ---- term/post.trm 2009-03-03 03:44:07.000000000 +0100 -+++ term/post.trm 2009-05-09 13:53:00.000000000 +0200 -@@ -1,5 +1,5 @@ - /* Hello, Emacs: this is -*-C-*- ! -- * $Id: post.trm,v 1.203.2.17 2009/03/02 17:40:06 mikulik Exp $ -+ * $Id: post.trm,v 1.230 2008/03/13 18:01:27 sfeam Exp $ - */ - - /* GNUPLOT - post.trm */ -@@ -61,14 +61,18 @@ - * - * Dan Sebald, 7 March 2003: terminal entry for image functionality - * -- * Harald Harders (h.harders@tu-bs.de), 2004-12-02: -- * Moved all terminal settings into a single structure. -+ * Harald Harders (h.harders@tu-bs.de), 2004-12-02: -+ * Moved all terminal settings into a single structure. - * -- * Harald Harders (h.harders@tu-bs.de), 2005-02-08: -- * Merged functionality of postscript, pslatex, pstex, and epslatex terminals. -+ * Harald Harders (h.harders@tu-bs.de), 2005-02-08: -+ * Merged functionality of postscript, pslatex, pstex, and epslatex terminals. - * -- * Ethan Merritt Mar 2006: Break out prolog and character encodings into -- * separate files loaded at runtime -+ * Ethan Merritt Mar 2006: Break out prolog and character encodings into -+ * separate files loaded at runtime -+ * -+ * Thomas Henlich Sep 2007: Add support for UTF-8 encoding via the glyphshow -+ * operator. It supports PostScript Type1 fonts that use glyph names according -+ * to the Adobe Glyph List For New Fonts. - */ - - #include "driver.h" -@@ -106,7 +110,7 @@ - TERM_PUBLIC void PS_set_color (t_colorspec *); - TERM_PUBLIC void PS_filled_polygon (int, gpiPoint *); - #ifdef WITH_IMAGE --TERM_PUBLIC void PS_image __PROTO((unsigned, unsigned, coordval *, gpiPoint *, t_imagecolor)); -+TERM_PUBLIC void PS_image __PROTO((unsigned int, unsigned int, coordval *, gpiPoint *, t_imagecolor)); - #endif - - /* To support "set term post enhanced" */ -@@ -123,6 +127,9 @@ - - TERM_PUBLIC void PS_path __PROTO((int p)); - static TBOOLEAN PS_newpath = FALSE; -+static TBOOLEAN ENHps_opened_string = FALSE; /* try to cut out empty ()'s */ -+ -+TERM_PUBLIC void PS_layer __PROTO((t_termlayer syncpoint)); - - #endif /* TERM_PROTO */ - -@@ -140,11 +147,12 @@ - } \ - } while (0) - --/* Datastructure implementing inclusion of font files */ -+/* Data structure implementing inclusion of font files */ - struct ps_fontfile_def { - struct ps_fontfile_def *next;/* pointer to next fontfile in linked list */ - char *fontfile_name; - char *fontfile_fullname; -+ char *fontname; - }; - - /* Terminal type of postscript dialect */ -@@ -181,13 +189,14 @@ - double palfunc_deviation; /* terminal option */ - TBOOLEAN oldstyle; - TBOOLEAN epslatex_standalone; -+ TBOOLEAN adobeglyphnames; /* Choice of output names for UTF8 */ - } ps_params_t; - - #define POST_PARAMS_DEFAULT { \ - PSTERM_POSTSCRIPT, 50, 50, \ - PSTERM_LANDSCAPE, FALSE, FALSE, FALSE, FALSE, 1.0, 1.0, FALSE, \ - FALSE, FALSE, NULL, "Helvetica", 14, FALSE, FALSE, 2000, 0.003, \ -- FALSE, FALSE \ -+ FALSE, TRUE \ - } - - static ps_params_t post_params = POST_PARAMS_DEFAULT; -@@ -261,7 +270,9 @@ - static char *pslatex_auxname = NULL; - - /* Routine to copy pre-existing prolog files into output stream */ -+static FILE *PS_open_prologue_file __PROTO((char *)); - static void PS_dump_prologue_file __PROTO((char *)); -+static void PS_load_glyphlist __PROTO((void)); - - static const char GPFAR * GPFAR OldEPSL_linetypes[] = { - /* Line Types */ -@@ -280,20 +291,21 @@ - /* For MFshow and MFwidth the tos is an array with the string and font info: */ - /* [ ] */ - /* EAM Mar 2004 - Add in a special case overprint 3 = save, overprint 4 = restore */ -+/* EAM Nov 2007 - Accommodate UTF-8 support (Gshow) */ - - "/MFshow {\n", - " { dup 5 get 3 ge\n", /* EAM test for overprint 3 or 4 */ - " { 5 get 3 eq {gsave} {grestore} ifelse }\n", /* EAM */ - " {dup dup 0 get findfont exch 1 get scalefont setfont\n", - " [ currentpoint ] exch dup 2 get 0 exch R dup 5 get 2 ne {dup dup 6\n", --" get exch 4 get {show} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq\n", -+" get exch 4 get {Gshow} {stringwidth pop 0 R} ifelse }if dup 5 get 0 eq\n", - " {dup 3 get {2 get neg 0 exch R pop} {pop aload pop M} ifelse} {dup 5\n", - " get 1 eq {dup 2 get exch dup 3 get exch 6 get stringwidth pop -2 div\n", - " dup 0 R} {dup 6 get stringwidth pop -2 div 0 R 6 get\n", - " show 2 index {aload pop M neg 3 -1 roll neg R pop pop} {pop pop pop\n", - " pop aload pop M} ifelse }ifelse }ifelse }\n", - " ifelse }\n", /* EAM */ --" forall} bind def\n", -+" forall} def\n", - - /* get the width of the text */ - /* HH 2005-07-24 - Add in a special case overprint 3 = save, 4 = restore -@@ -301,9 +313,12 @@ - * additional value on the stack. between XYsave and XYrestore, - * this number is increased by the strings. By pop'ing this number, all - * strings between XYsave and XYrestore are ignored. */ -+/* EAM Nov 2007 - GSwidth is to allow the operator to work either with a string -+ * or with a glyph. Needed for UTF-8 support. Gwidth may do it better. */ -+"/Gswidth {dup type /stringtype eq {stringwidth} {pop (n) stringwidth} ifelse} def\n", - "/MFwidth {0 exch { dup 5 get 3 ge { 5 get 3 eq { 0 } { pop } ifelse }\n", - " {dup 3 get{dup dup 0 get findfont exch 1 get scalefont setfont\n", --" 6 get stringwidth pop add} {pop} ifelse} ifelse} forall} bind def\n", -+" 6 get Gswidth pop add} {pop} ifelse} ifelse} forall} def\n", - - /* flush left show */ - "/MLshow { currentpoint stroke M\n", -@@ -366,8 +381,11 @@ - if (strcmp(fnp->name, myfname) == 0) - return NULL; - -- /* we did not find the name */ -+ /* Ignore it if illegal characters will corrupt the PostScript syntax */ -+ if (strpbrk(myfname, "{}[]() ")) -+ return NULL; - -+ /* we have not seen this font before; store name and apply encoding */ - fnp = (struct PS_FontName *)gp_alloc(sizeof(struct PS_FontName), - "PostScript Font record"); - fnp->name = gp_strdup(myfname); -@@ -376,12 +394,17 @@ - - switch(encoding) { - case S_ENC_ISO8859_1: -+ case S_ENC_UTF8: - recode = "reencodeISO def\n"; - break; - case S_ENC_ISO8859_2: - recode = "reencodeISO2 def\n"; - break; -- case S_ENC_ISO8859_15: -+ case S_ENC_ISO8859_9: /* ISO8859-9 is Latin5 */ -+ case S_ENC_CP1254: -+ recode = "reencodeISO9 def\n"; -+ break; -+ case S_ENC_ISO8859_15: /* ISO8859-15 is Latin9 */ - recode = "reencodeISO15 def\n"; - break; - case S_ENC_CP437: -@@ -407,11 +430,13 @@ - break; - } - -- if (can_reencode && recode) { -- fprintf(gppsfile,"/%s %s", myfname, recode); -- return NULL; -- } else -- return recode; -+ if (recode) { -+ if (ENHps_opened_string) -+ ENHPS_FLUSH(); -+ fprintf(gppsfile,"/%s %s", fnp->name, recode); -+ } -+ -+ return NULL; - } - - char * -@@ -454,6 +479,7 @@ - PSLATEX_ROTATE, PSLATEX_NOROTATE, PSLATEX_AUXFILE, PSLATEX_NOAUXFILE, - PSLATEX_OLDSTYLE, PSLATEX_NEWSTYLE, EPSLATEX_HEADER, EPSLATEX_NOHEADER, - PS_SIZE, -+ PS_ADOBEGLYPHNAMES, PS_NOADOBEGLYPHNAMES, - PS_OTHER - }; - -@@ -499,6 +525,8 @@ - { "noa$uxfile", PSLATEX_NOAUXFILE }, - { "old$style", PSLATEX_OLDSTYLE }, - { "new$style", PSLATEX_NEWSTYLE }, -+ { "adobe$glyphnames", PS_ADOBEGLYPHNAMES }, -+ { "noadobe$glyphnames", PS_NOADOBEGLYPHNAMES }, - { NULL, PS_OTHER } - }; - -@@ -848,35 +876,36 @@ - break; - case PS_FONTFILE: { - TBOOLEAN deleteentry = FALSE; -+ char *fontfilename = NULL; - c_token++; - if (ps_params->terminal != PSTERM_POSTSCRIPT) - int_error(c_token, - "extraneous argument in set terminal %s",term->name); - -- if (!isstring(c_token)) { -- if (equals(c_token, "add")) -- c_token++; -- else if (almost_equals(c_token, "del$ete")) { -- deleteentry = TRUE; -- c_token++; -- } else -- int_error(c_token, "Font filename expected"); -- } -- if (isstring(c_token)) { -- TBOOLEAN filename_doubled = FALSE; -- struct ps_fontfile_def *curr_ps_fontfile = -+ if (equals(c_token, "add")) -+ c_token++; -+ else if (almost_equals(c_token, "del$ete")) { -+ deleteentry = TRUE; -+ c_token++; -+ } -+ -+ if (!(fontfilename = try_to_get_string())) { -+ int_error(c_token, "Font filename expected"); -+ } else { -+ TBOOLEAN filename_doubled = FALSE; -+ struct ps_fontfile_def *curr_ps_fontfile = - ps_params->first_fontfile; -- struct ps_fontfile_def *prev_ps_fontfile = NULL; -- struct ps_fontfile_def *new_ps_fontfile = -- gp_alloc(sizeof(struct ps_fontfile_def), -- "new_ps_fontfile"); -+ struct ps_fontfile_def *prev_ps_fontfile = NULL; -+ struct ps_fontfile_def *new_ps_fontfile = -+ gp_alloc(sizeof(struct ps_fontfile_def), -+ "new_ps_fontfile"); - -- new_ps_fontfile->fontfile_name = -- gp_alloc (token_len(c_token), -- "new_ps_fontfile->fontfile_name"); -- quote_str(new_ps_fontfile->fontfile_name, -- c_token, token_len(c_token)); -- gp_expand_tilde(&(new_ps_fontfile->fontfile_name)); -+ new_ps_fontfile->fontfile_name = -+ gp_alloc (token_len(c_token), -+ "new_ps_fontfile->fontfile_name"); -+ gp_expand_tilde(&fontfilename); -+ new_ps_fontfile->fontfile_name = fontfilename; -+ new_ps_fontfile->fontname = NULL; - if (!deleteentry) { - #if defined(PIPES) - if (*(new_ps_fontfile->fontfile_name) != '<') { -@@ -884,7 +913,7 @@ - new_ps_fontfile->fontfile_fullname = - fontpath_fullname(new_ps_fontfile->fontfile_name); - if (!new_ps_fontfile->fontfile_fullname) -- int_error(c_token, "Font file '%s' not found", -+ int_error(c_token-1, "Font file '%s' not found", - new_ps_fontfile->fontfile_name); - #if defined(PIPES) - } else -@@ -901,45 +930,43 @@ - lf=lf->prev; - } - if ((lf && lf->interactive) || interactive) -- /* if (interactive) { */ - PS_load_fontfile(new_ps_fontfile,FALSE); - } - -- if (ps_params->first_fontfile) { -- while (curr_ps_fontfile) { -- if (strcmp(curr_ps_fontfile->fontfile_name, -- new_ps_fontfile->fontfile_name) == 0) { -- filename_doubled = TRUE; -- if (deleteentry) { -+ if (ps_params->first_fontfile) { -+ while (curr_ps_fontfile) { -+ if (strcmp(curr_ps_fontfile->fontfile_name, -+ new_ps_fontfile->fontfile_name) == 0) { -+ filename_doubled = TRUE; -+ if (deleteentry) { - delete_ps_fontfile(prev_ps_fontfile, - curr_ps_fontfile); -- curr_ps_fontfile = NULL; -- break; -- } -- } -- prev_ps_fontfile = curr_ps_fontfile; -- curr_ps_fontfile = curr_ps_fontfile->next; -- } -- if (!filename_doubled) { -- if (!deleteentry) -- prev_ps_fontfile->next = new_ps_fontfile; -- else -- int_warn(c_token,"Can't delete Font filename '%s'", -- new_ps_fontfile->fontfile_name); -- } -- } else { -- if (!deleteentry) -- ps_params->first_fontfile = new_ps_fontfile; -- else -- int_warn(c_token, "Can't delete Font filename '%s'", -- new_ps_fontfile->fontfile_name); -- } -- c_token++; -- } else -- int_error(c_token, "Font filename expected"); -- break; -- } -- case PS_NOFONTFILES: -+ curr_ps_fontfile = NULL; -+ break; -+ } -+ } -+ prev_ps_fontfile = curr_ps_fontfile; -+ curr_ps_fontfile = curr_ps_fontfile->next; -+ } -+ if (!filename_doubled) { -+ if (!deleteentry) -+ prev_ps_fontfile->next = new_ps_fontfile; -+ else -+ int_warn(c_token,"Can't delete Font filename '%s'", -+ new_ps_fontfile->fontfile_name); -+ } -+ } else { -+ if (!deleteentry) -+ ps_params->first_fontfile = new_ps_fontfile; -+ else -+ int_warn(c_token, "Can't delete Font filename '%s'", -+ new_ps_fontfile->fontfile_name); -+ } -+ c_token++; -+ } -+ break; -+ } -+ case PS_NOFONTFILES: - if (ps_params->terminal != PSTERM_POSTSCRIPT) - int_error(c_token, - "extraneous argument in set terminal %s",term->name); -@@ -948,6 +975,14 @@ - ps_params->first_fontfile); - ++c_token; - break; -+ case PS_ADOBEGLYPHNAMES: -+ ps_params->adobeglyphnames = TRUE; -+ ++c_token; -+ break; -+ case PS_NOADOBEGLYPHNAMES: -+ ps_params->adobeglyphnames = FALSE; -+ ++c_token; -+ break; - case PS_PALFUNCPARAM: - if (set_palfunc) - int_error(c_token, -@@ -999,8 +1034,16 @@ - set_fontsize = TRUE; - *comma = '\0'; - } -- if (*s) -+ if (*s) { -+ /* Filter out characters that would confuse PostScript */ -+ if (strpbrk(s, "()[]{}| ")) { -+ int_warn(c_token-1,"Illegal characters in PostScript font name."); -+ int_warn(NO_CARET,"I will try to fix it but this may not work."); -+ while (strpbrk(s, "()[]{}| ")) -+ *(strpbrk(s, "()[]{}| ")) = '-'; -+ } - strncpy(ps_params->font, s, sizeof(ps_params->font)); -+ } - free(s); - } else - int_error(c_token-1, -@@ -1118,6 +1161,12 @@ - } - #endif - -+ if ((encoding == S_ENC_UTF8) && (ps_params->terminal == PSTERM_POSTSCRIPT)) { -+ sprintf(tmp_term_options," %sadobeglyphnames \\\n ", -+ ps_params->adobeglyphnames ? "" : "no"); -+ strcat(term_options,tmp_term_options); -+ } -+ - if (ps_explicit_size) { - if (ps_explicit_units == CM) - sprintf(tmp_term_options,"size %.2fcm, %.2fcm ", -@@ -1152,6 +1201,29 @@ - static TBOOLEAN ps_common_uses_fonts; - static unsigned int ps_common_xoff, ps_common_yoff; - -+/* The default UTF8 code will use glyph identifiers uniXXXX for all glyphs above 0x0100. -+ * If you define ADOBE_ENCODING_NAMES, then it will instead use the glyph names from the -+ * file aglfn.txt. Names in the range 0x0100 - 0x01FF correspond to those used by the -+ * Latin1 encoding scheme. This unicode code page deliberately uses the same character -+ * mapping as Latin1. Adobe also recommends names for many characters outside this -+ * range, but not all fonts adhere to this. You can substitute a different aglfn.txt -+ * file at run time if you want to use a different scheme. -+ */ -+#define ADOBE_ENCODING_NAMES 1 -+ -+#if (ADOBE_ENCODING_NAMES) -+ -+typedef struct ps_glyph { -+ unsigned long unicode; -+ char * glyphname; -+} ps_glyph; -+ -+static ps_glyph *aglist = NULL; -+static int aglist_alloc = 0; -+static int aglist_size = 0; -+static int psglyphs = 0; -+ -+#endif - - TERM_PUBLIC void - PS_load_fontfile(struct ps_fontfile_def *current_ps_fontfile, TBOOLEAN doload) -@@ -1206,7 +1278,7 @@ - current_ps_fontfile->fontfile_name + 1); - #endif - } -- else if (strcmp(ext,"ttf") == 0) { -+ else if (!strcmp(ext,"ttf") || !strcmp(ext,"otf")) { - /* TrueType */ - #if defined(PIPES) - ispipe = TRUE; -@@ -1285,6 +1357,7 @@ - strcpy(fontname,strstr(line+1,"/")+1); - fnende = strstr(fontname," "); - *fnende = '\0'; -+ current_ps_fontfile->fontname = gp_strdup(fontname); - /* Print font name */ - if (!doload) { - if (current_ps_fontfile->fontfile_fullname) -@@ -1365,6 +1438,8 @@ - - while (current_ps_fontfile) { - PS_load_fontfile(current_ps_fontfile,doload); -+ if (current_ps_fontfile->fontname) -+ PS_RememberFont(current_ps_fontfile->fontname, 1); - current_ps_fontfile = current_ps_fontfile->next; - } - } -@@ -1518,11 +1593,16 @@ - free(outstr2); - } - -+ /* Dump the body of the prologue */ -+ PS_dump_prologue_file("prologue.ps"); -+ - /* insert font encoding vector */ - if (uses_fonts) { - switch (encoding) { - case S_ENC_ISO8859_1: PS_dump_prologue_file("8859-1.ps"); break; - case S_ENC_ISO8859_2: PS_dump_prologue_file("8859-2.ps"); break; -+ case S_ENC_CP1254: -+ case S_ENC_ISO8859_9: PS_dump_prologue_file("8859-9.ps"); break; - case S_ENC_ISO8859_15: PS_dump_prologue_file("8859-15.ps"); break; - case S_ENC_CP437: PS_dump_prologue_file("cp437.ps"); break; - case S_ENC_CP850: PS_dump_prologue_file("cp850.ps"); break; -@@ -1530,14 +1610,14 @@ - case S_ENC_CP1250: PS_dump_prologue_file("cp1250.ps"); break; - case S_ENC_KOI8_R: PS_dump_prologue_file("koi8r.ps"); break; - case S_ENC_KOI8_U: PS_dump_prologue_file("koi8u.ps"); break; -+ case S_ENC_UTF8: PS_dump_prologue_file("utf-8.ps"); -+ if (!aglist) PS_load_glyphlist(); -+ break; - case S_ENC_DEFAULT: - default: break; - } - } - -- /* Dump the body of the prologue */ -- PS_dump_prologue_file("prologue.ps"); -- - /* Redefine old epslatex linetypes if requested */ - if ((ps_params->terminal == PSTERM_EPSLATEX) && ps_params->oldstyle) { - for (i = 0; OldEPSL_linetypes[i] != NULL; i++) -@@ -1582,6 +1662,7 @@ - xmax_t = term->xmax * (xsize + xoffset) / (2*PS_SC); - ymin_t = term->ymax * yoffset / (2*PS_SC); - ymax_t = term->ymax * (ysize + yoffset) / (2*PS_SC); -+ term->tscale = PS_SC * 2; - break; - case PSTERM_PORTRAIT: - if (!ps_explicit_size) { -@@ -1592,6 +1673,7 @@ - xmax_t = term->xmax * (xsize + xoffset) / PS_SC; - ymin_t = term->ymax * yoffset / PS_SC; - ymax_t = term->ymax * (ysize + yoffset) / PS_SC; -+ term->tscale = PS_SC; - break; - case PSTERM_LANDSCAPE: - if (!ps_explicit_size) { -@@ -1602,6 +1684,7 @@ - ymax_t = term->xmax * (xsize+xoffset) / PS_SC; - xmin_t = term->ymax * (1-ysize-yoffset) / PS_SC; - xmax_t = term->ymax * (1-yoffset) / PS_SC; -+ term->tscale = PS_SC; - break; - default: - int_error(NO_CARET, "invalid postscript format used"); -@@ -1694,11 +1777,6 @@ - { - fputs("%%Trailer\n", gppsfile); - -- /* I think the following commands should be executed -- `if (ps_common_uses_fonts)`. So I changed the next line. -- Please see "PS_RememberFont", too. */ /* JFi */ -- -- /* if (!ps_common_uses_fonts) { */ /* JFi */ - if (ps_common_uses_fonts) { - fputs("%%DocumentFonts: ", gppsfile); - while (PS_DocFonts) { -@@ -1884,38 +1962,97 @@ - TERM_PUBLIC void - PS_put_text(unsigned int x, unsigned int y, const char *str) - { -- char ch; -+#define PS_NONE 0 -+#define PS_TEXT 1 -+#define PS_GLYPH 2 -+ unsigned long ch; - - if (!str && !strlen(str)) - return; - PS_move(x,y); - if (ps_ang != 0) -- fprintf(gppsfile,"currentpoint gsave translate %d rotate 0 0 M\n", -- ps_ang); -- putc('(',gppsfile); -- ch = *str++; -- while(ch!='\0') { -- if ((ch=='(') || (ch==')') || (ch=='\\')) -- putc('\\', gppsfile); -- putc(ch, gppsfile); -- ch = *str++; -- } -+ fprintf(gppsfile,"currentpoint gsave translate %d rotate 0 0 M\n", ps_ang); - -- switch(ps_justify) { -- case LEFT : -- fputs(") Lshow\n", gppsfile); -- break; -- case CENTRE : -- fputs(") Cshow\n", gppsfile); -- break; -- case RIGHT : -- fputs(") Rshow\n", gppsfile); -- break; -+ if (encoding == S_ENC_UTF8 && contains8bit(str)) { -+ /* UTF-8 encoding with multibyte characters present */ -+ int mode = PS_NONE; -+ -+ putc('[', gppsfile); -+ -+ for (utf8toulong(&ch, &str); ch != '\0'; utf8toulong(&ch, &str)) { -+ if (ch < 0x100) { -+ if (mode != PS_TEXT) -+ putc('(', gppsfile); -+ if (ch == '(' || ch == ')' || ch == '\\') -+ putc('\\', gppsfile); -+ putc((char)ch, gppsfile); -+ mode = PS_TEXT; -+ } else { -+ int i; -+ if (mode == PS_TEXT) -+ putc(')', gppsfile); -+ putc('/', gppsfile); -+#if (ADOBE_ENCODING_NAMES) -+ for (i = 0; i < psglyphs; i++) { -+ if (aglist[i].unicode == ch) { -+ fputs(aglist[i].glyphname, gppsfile); -+ break; -+ } -+ } -+ if (i >= psglyphs) /* Must not have found a glyph name */ -+#endif -+ fprintf(gppsfile, (ch > 0xffff) ? "u%lX" : "uni%04lX", ch); -+ mode = PS_GLYPH; -+ } -+ } -+ -+ if (mode == PS_TEXT) -+ putc(')', gppsfile); -+ -+ switch(ps_justify) { -+ case LEFT : -+ fputs("] GLshow\n", gppsfile); -+ break; -+ case CENTRE : -+ fputs("] GCshow\n", gppsfile); -+ break; -+ case RIGHT : -+ fputs("] GRshow\n", gppsfile); -+ break; -+ } -+ -+ } else { -+ /* plain old 8-bit mode (not UTF-8), or UTF-8 string with only 7-bit characters */ -+ putc('(',gppsfile); -+ ch = (char) *str++; -+ while(ch!='\0') { -+ if ((ch=='(') || (ch==')') || (ch=='\\')) -+ putc('\\', gppsfile); -+ putc((char) ch, gppsfile); -+ ch = (char) *str++; -+ } -+ -+ switch(ps_justify) { -+ case LEFT : -+ fputs(") Lshow\n", gppsfile); -+ break; -+ case CENTRE : -+ fputs(") Cshow\n", gppsfile); -+ break; -+ case RIGHT : -+ fputs(") Rshow\n", gppsfile); -+ break; -+ } - } -+ - if (ps_ang != 0) - fputs("grestore\n", gppsfile); - ps_path_count = 0; - PS_relative_ok = FALSE; -+ -+#undef PS_NONE -+#undef PS_TEXT -+#undef PS_GLYPH - } - - -@@ -2034,6 +2171,7 @@ - switch(style & 0xf) { - - case FS_SOLID: -+ case FS_TRANSPARENT_SOLID: - /* style == 1 --> fill with intensity according to filldensity */ - filldens = (style >> 4) / 100.0; - if(filldens < 0.0) -@@ -2045,6 +2183,7 @@ - break; - - case FS_PATTERN: -+ case FS_TRANSPARENT_PATTERN: - /* style == 2 --> fill with pattern according to fillpattern */ - /* the upper 3 nibbles of 'style' contain pattern number */ - pattern = (style >> 4) % 8; -@@ -2097,8 +2236,6 @@ - - /* ENHPOST */ - --static TBOOLEAN ENHps_opened_string; /* try to cut out empty ()'s */ -- - /* - * close a postscript string if it has been opened - */ -@@ -2111,6 +2248,8 @@ - } - } - -+static char *ENHps_opensequence = NULL; -+ - /* - * open a postscript string - */ -@@ -2134,22 +2273,92 @@ - } - - if (!ENHps_opened_string) { -- fprintf(gppsfile, "[(%s) %.1f %.1f %s %s %d (", -+ int safelen = strlen(fontname) + 40; -+ free(ENHps_opensequence); -+ ENHps_opensequence = gp_alloc(safelen,"ENHPS_opensequence"); -+ /* EAM November 2007 - moved here from enhanced_recursion() */ -+ PS_RememberFont(fontname,1); -+#ifdef HAVE_SNPRINTF -+ snprintf(ENHps_opensequence, safelen, "[(%s) %.1f %.1f %s %s %d ", -+ fontname, fontsize, base, -+ widthflag ? "true" : "false", -+ showflag ? "true" : "false", -+ overprint); -+#else -+ sprintf(ENHps_opensequence, "[(%s) %.1f %.1f %s %s %d ", - fontname, fontsize, base, - widthflag ? "true" : "false", - showflag ? "true" : "false", - overprint); -+#endif -+ fprintf(gppsfile, "%s(", ENHps_opensequence); - ENHps_opened_string = TRUE; - } - } - - /* -- * write one or more characters from inside enhanced text processing -+ * Write one character from inside enhanced text processing. -+ * This is trivial except in the case of multi-byte encoding. - */ - TERM_PUBLIC void - ENHPS_WRITEC(int c) - { -- fputc(c, gppsfile); -+ static int in_utf8 = 0; /* nonzero means we are inside a multibyte sequence */ -+ static char utf8[6]; /* holds the multibyte sequence being accumulated */ -+ static int nbytes = 0; /* number of bytes expected in the sequence */ -+ -+ /* UTF-8 Encoding */ -+ if (encoding == S_ENC_UTF8 && (c & 0x80) != 0) { -+ if (in_utf8 == 0) { -+ nbytes = (c & 0xE0) == 0xC0 ? 2 -+ : (c & 0xF0) == 0xE0 ? 3 -+ : (c & 0xF8) == 0xF0 ? 4 -+ : 0; -+ if (!nbytes) /* Illegal UTF8 char; hope it's printable */ -+ fputc(c, gppsfile); -+ else -+ utf8[in_utf8++] = c; -+ } else { -+ utf8[in_utf8++] = c; -+ if (in_utf8 >= nbytes) { -+ unsigned long wch = '\0'; -+ const char *str = &utf8[0]; -+ int i; -+ -+ utf8[nbytes] = '\0'; -+ in_utf8 = 0; -+ utf8toulong(&wch, &str); -+ -+ if (wch < 0x100) { /* Single byte ISO8859-1 character */ -+ fputc(wch, gppsfile); -+ return; -+ } -+ -+ /* Finish off previous partial string, if any */ -+ ENHPS_FLUSH(); -+ -+ /* Write a new partial string for this glyph */ -+ fprintf(gppsfile, "%s/", ENHps_opensequence); -+#if (ADOBE_ENCODING_NAMES) -+ for (i = 0; i < psglyphs; i++) { -+ if (aglist[i].unicode == wch) { -+ fputs(aglist[i].glyphname, gppsfile); -+ break; -+ } -+ } -+ if (i >= psglyphs) /* Must not have found a glyph name */ -+#endif -+ fprintf(gppsfile, (wch > 0xffff) ? "u%lX" : "uni%04lX", wch); -+ fprintf(gppsfile, "]\n"); -+ -+ /* Mark string closed */ -+ ENHps_opened_string = FALSE; -+ } -+ } -+ } else -+ -+ /* Single byte character */ -+ fputc(c, gppsfile); - } - - /* a set-font routine for enhanced post : simply copies -@@ -2198,7 +2407,7 @@ - - PS_FLUSH_PATH; - -- /* if there are no magic characters, we should just be able -+ /* FIXME: if there are no magic characters, we should just be able - * punt the string to PS_put_text(), which will give shorter - * ps output [eg tics and stuff rarely need extra processing], - * but we need to make sure that the current font is the -@@ -2574,7 +2783,7 @@ - TERM_PUBLIC int PS_make_palette (t_sm_palette *palette) - { - if (palette == NULL) { -- return 0; /* postscript can do continuous colors */ -+ return 0; /* postscript can do continuous colors */ - } - - PS_make_header(palette); -@@ -2647,6 +2856,9 @@ - /* General case for solid or pattern-filled polygons - * gsave N ... density PolyFill - */ -+ int fillpar = style >> 4; -+ style = style &0xf; -+ - fprintf(gppsfile, "gsave "); - fprintf(gppsfile, "%i %i N", corners[0].x, corners[0].y); - for (i = 1; i < points; i++) { -@@ -2662,6 +2874,8 @@ - - case FS_SOLID: - filldens = (style >> 4) / 100.0; -+ case FS_TRANSPARENT_SOLID: -+ filldens = (fillpar) / 100.0; - if(filldens < 0.0) - filldens = 0.0; - if(filldens >= 1.0) -@@ -2670,8 +2884,10 @@ - fprintf(gppsfile, " %.2f PolyFill\n", filldens); - break; - -+ case FS_TRANSPARENT_PATTERN: -+ fprintf(gppsfile," /TransparentPatterns true def\n"); - case FS_PATTERN: -- pattern = (style >> 4) % 8; -+ pattern = (fillpar) % 8; - if (pattern == 0) { - filldens = 0.5; - fprintf(gppsfile, " %.1f PolyFill\n", filldens); -@@ -2730,10 +2946,11 @@ - if (prev != NULL) /* there is a previous ps_fontfile */ - prev->next = this->next; - else /* this = ps_params->first_fontfile */ -- /* so change ps_params->first_fontfile */ -+ /* so change ps_params->first_fontfile */ - ps_params->first_fontfile = this->next; - free(this->fontfile_name); - free(this->fontfile_fullname); -+ free(this->fontname); - free(this); - this = NULL; - } -@@ -2770,15 +2987,15 @@ - * routine. - */ - static char * --PS_encode_image(unsigned M, unsigned N, coordval *image, t_imagecolor color_mode, -+PS_encode_image(unsigned int M, unsigned int N, coordval *image, t_imagecolor color_mode, - int bits_per_component, int max_colors, double cscale, - enum PS_ENCODING encoding, int *return_num_bytes) - { -- unsigned coord_remaining; -+ unsigned int coord_remaining; - coordval *coord_ptr; - unsigned short i_line; -- unsigned i_element; -- unsigned end_of_line; -+ unsigned int i_element; -+ unsigned int end_of_line; - unsigned short bits_remaining, bits_start; - - unsigned long tuple4; -@@ -2954,7 +3171,7 @@ - - - static void --print_five_operand_image(unsigned M, unsigned N, gpiPoint *corner, t_imagecolor color_mode, unsigned short bits_per_component) -+print_five_operand_image(unsigned int M, unsigned int N, gpiPoint *corner, t_imagecolor color_mode, unsigned short bits_per_component) - { - char *space = ps_params->level1 ? "" : " "; - -@@ -2980,7 +3197,7 @@ - - - TERM_PUBLIC void --PS_image (unsigned M, unsigned N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) -+PS_image (unsigned int M, unsigned int N, coordval *image, gpiPoint *corner, t_imagecolor color_mode) - { - char *encoded_image; - int num_encoded_bytes; -@@ -3163,13 +3380,12 @@ - * If unsuccessful, look for hardcoded absolute path on UNIX, - * or hardcoded relative path on Windows and OS2, - * or files included at compile time. */ --static void --PS_dump_prologue_file(char *name) -+static FILE * -+PS_open_prologue_file(char *name) - { - char *fullname; - char *ps_prologue_dir; - FILE *prologue_fd; -- char buf[256]; - - if ((ps_prologue_dir = getenv("GNUPLOT_PS_DIR")) == NULL) { - #ifdef GNUPLOT_PS_DIR -@@ -3221,6 +3437,8 @@ - dump = prologue_8859_1_ps; - else if (!strcmp(name,"8859-2.ps")) - dump = prologue_8859_2_ps; -+ else if (!strcmp(name,"8859-9.ps")) -+ dump = prologue_8859_9_ps; - else if (!strcmp(name,"cp1250.ps")) - dump = prologue_cp1250_ps; - else if (!strcmp(name,"cp437.ps")) -@@ -3233,16 +3451,18 @@ - dump = prologue_koi8r_ps; - else if (!strcmp(name,"koi8u.ps")) - dump = prologue_koi8u_ps; -+ else if (!strcmp(name,"utf-8.ps")) -+ dump = prologue_utf_8_ps; - else if (!strcmp(name,"prologue.ps")) - dump = prologue_prologue_ps; - else -- int_error(NO_CARET,"Requested Postscript prologue is not included"); -+ int_warn(NO_CARET,"Requested Postscript prologue %s not found",name); - - if (dump) { - for (i = 0; dump[i] != NULL; ++i) - fprintf(gppsfile, "%s", dump[i]); - } -- return; -+ return NULL; - #endif /* GNUPLOT_PS_DIR */ - } - -@@ -3273,8 +3493,62 @@ - int_error(NO_CARET,"Plot failed!"); - } - free(fullname); -- while (fgets(buf, sizeof(buf), prologue_fd)) -- fputs(buf, gppsfile); -+ return prologue_fd; -+} -+ -+static void -+PS_dump_prologue_file(char *name) -+{ -+ char buf[256]; -+ FILE *prologue_fd = PS_open_prologue_file(name); -+ -+ if (prologue_fd) { -+ while (fgets(buf, sizeof(buf), prologue_fd)) -+ fputs(buf, gppsfile); -+ fclose(prologue_fd); -+ } -+} -+ -+static void -+PS_load_glyphlist() -+{ -+ char buf[256]; -+ char *next = NULL; -+ unsigned int code; -+ int len; -+ char glyph_name[32]; -+ FILE *prologue_fd = PS_open_prologue_file("aglfn.txt"); -+ -+ if (!prologue_fd) -+ return; -+ -+ while (fgets(buf, sizeof(buf), prologue_fd)) { -+ if (*buf == '#' || *buf == '\n') -+ continue; -+ code = strtol(buf,&next,16); -+ -+ /* User control over whether Adobe glyph names are used for unicode */ -+ /* entries above 0x0100. I.e. when we see a UTF-8 alpha, do we write */ -+ /* /alpha rather than /uni03B1? Some fonts want one or the other. */ -+ /* This is controlled by 'set term post adobeglyphnames'. */ -+ if (code >= 0x0100 && !ps_params->adobeglyphnames) -+ continue; -+ -+ next++; -+ len = strchr(next,';') - next; -+ strncpy(glyph_name, next, len); -+ glyph_name[len] = '\0'; -+ FPRINTF((stderr, "%04X %s\n", code, glyph_name)); -+ if (aglist_size + sizeof(ps_glyph) > aglist_alloc) { -+ aglist_alloc += 2048; -+ aglist = gp_realloc(aglist, aglist_alloc, "aglist"); -+ } -+ aglist[psglyphs].unicode = code; -+ aglist[psglyphs].glyphname = gp_strdup(glyph_name); -+ aglist_size += sizeof(ps_glyph); -+ psglyphs++; -+ } -+ - fclose(prologue_fd); - } - -@@ -3295,6 +3569,32 @@ - - } - -+TERM_PUBLIC void -+PS_layer(t_termlayer syncpoint) -+{ -+ static int plotno = 0; -+ -+ /* We must ignore all syncpoints that we don't recognize */ -+ switch (syncpoint) { -+ -+ default: -+ break; -+ -+ case TERM_LAYER_BEFORE_PLOT: -+ fprintf(gppsfile, "%% Begin plot #%d\n", ++plotno); -+ break; -+ -+ case TERM_LAYER_AFTER_PLOT: -+ fprintf(gppsfile, "%% End plot #%d\n", plotno); -+ break; -+ -+ case TERM_LAYER_RESET: -+ plotno = 0; -+ break; -+ -+ } -+} -+ - #endif /* TERM_BODY */ - - #ifdef TERM_TABLE -@@ -3307,7 +3607,7 @@ - PS_text, null_scale, PS_graphics, PS_move, PS_vector, - PS_linetype, PS_put_text, PS_text_angle, - PS_justify_text, PS_point, PS_arrow, PS_set_font, PS_pointsize, -- TERM_BINARY|TERM_IS_POSTSCRIPT|TERM_CAN_CLIP /*flags*/, -+ TERM_BINARY|TERM_IS_POSTSCRIPT|TERM_CAN_CLIP|TERM_CAN_DASH /*flags*/, - 0 /*suspend*/, 0 /*resume*/, PS_fillbox, PS_linewidth - #ifdef USE_MOUSE - , 0, 0, 0, 0, 0 /* no mouse support for postscript */ -@@ -3320,8 +3620,9 @@ - , PS_image - #endif - , ENHPS_OPEN, ENHPS_FLUSH, ENHPS_WRITEC -- , 0 /* layer control */ -+ , PS_layer /* used only to insert comments */ - , PS_path -+ , PS_SC /* terminal to pixel coord scale factor */ - TERM_TABLE_END(post_driver) - - #undef LAST_TERM -@@ -3432,7 +3733,7 @@ - " but transfers the texts to LaTeX instead of including in the PostScript", - " code. Thus, many options are the same as in the `postscript terminal`.", - "", --" From version 4.0 to 4.2, some changes have been invoked into the default ", -+" From version 4.0 to 4.1, some changes have been invoked into the default ", - " appearance of the epslatex terminal to reach better consistency with the", - " postscript terminal: The plot size has been changed from 5 x 3 inches to", - " 5 x 3.5 inches; the character width is now estimated to be 60% of the font", -@@ -3625,7 +3926,7 @@ - " \\special{psfile=...} command. Remember to close the `output file` before", - " next plot unless in `multiplot` mode.", - "", --" Gnuplot versions prior version 4.2 have generated plots of the size", -+" Gnuplot versions prior version 4.1 have generated plots of the size", - " 5 x 3 inches using the ps(la)tex terminal while the current version generates", - " 5 x 3.5 inches to be consistent with the postscript eps terminal. In", - " addition, the character width is now estimated to be 60% of the font size", -@@ -3678,7 +3979,7 @@ - " {enhanced | noenhanced}", - " {defaultplex | simplex | duplex}", - " {fontfile [add | delete] \"\"", --" | nofontfiles}", -+" | nofontfiles} {{no}adobeglyphnames}", - PS_COMMON_OPTS1 - PS_COMMON_OPTS2 - PS_COMMON_PROLOG_INFO -@@ -3748,112 +4049,6 @@ - " A PostScript file is editable, so once `gnuplot` has created one, you are", - " free to modify it to your heart's desire. See the `editing postscript`", - " section for some hints.", --"2 enhanced postscript", --"?commands set terminal postscript enhanced", --"?set terminal postscript enhanced", --"?set term postscript enhanced", --"?terminal postscript enhanced", --"?term postscript enhanced", --"?enhanced_postscript", --"?enhanced postscript", --"?Enhanced postscript", --"?enhanced text", --"?Enhanced text", --"?enhanced", --" Several terminal types support an enhanced text mode in which ", --" additional formatting information is embedded in the text string.", --"", --"@start table - first is interactive cleartext form", --" Control Examples Explanation", --" ^ a^x superscript", --" _ a_x subscript", --" @ @x or a@^b_c phantom box (occupies no width)", --" & &{space} inserts space of specified length", --" ~ ~a{.8-} overprints '-' on 'a', raised by .8", --" times the current fontsize", --"#\\begin{tabular}{|ccl|} \\hline", --"#\\multicolumn{3}{|c|}{Enhanced Text Control Codes} \\\\ \\hline", --"#Control & Examples & Explanation \\\\ \\hline", --"#\\verb~^~ & \\verb~a^x~ & superscript\\\\", --"#\\verb~_~ & \\verb~a_x~ & subscript\\\\", --"#\\verb~@~ & \\verb~@x or a@^b_c~ & phantom box (occupies no width)\\\\", --"#\\verb~&~ & \\verb~&{space}~ & inserts space of specified length\\\\", --"#\\verb|~| & \\verb|~a{.8-}| & overprints '-' on 'a', raised by .8\\\\", --"#\\verb~ ~ & \\verb~ ~ & times the current fontsize\\\\", --"%c c l .", --"%.TE", /* ugly - doc2ms uses @ for column separator, but here we */ --"%.TS", /* need @ in table, so end and restart the table ! */ --"%center box tab ($) ;", --"%c c l .", --"%Control$Examples$Explanation", --"%_", --"%^$a^x$superscript", --"%\\&_$a\\&_x$subscript", --"% @ $ @x or a\\&@^b\\&_c$phantom box (occupies no width)", --"% & $ &{space}$inserts space of specified length", --"% ~ $ ~a{.8-}$overprints '-' on 'a', raised by .8", --"% $ $times the current fontsize", --"@end table", --"", --" Braces can be used to place multiple-character text where a single character", --" is expected (e.g., 2^{10}). To change the font and/or size, use the full", --" form: {/[fontname][=fontsize | *fontscale] text}. Thus {/Symbol=20 G} is a", --" 20-point GAMMA and {/*0.75 K} is a K at three-quarters of whatever fontsize", --" is currently in effect. (The '/' character MUST be the first character after", --" the '{'.)", --"", --" If the encoding vector has been changed by `set encoding`, the default", --" encoding vector can be used instead by following the slash with a dash. This", --" is unnecessary if you use the Symbol font, however---since /Symbol uses its", --" own encoding vector, `gnuplot` will not apply any other encoding vector to", --" it.", --"", --" The phantom box is useful for a@^b_c to align superscripts and subscripts", --" but does not work well for overwriting an accent on a letter. (To do the", --" latter, it is much better to use 'set encoding iso_8859_1' to change to the", --" ISO Latin-1 encoding vector, which contains a large variety of letters with", --" accents or other diacritical marks.) Since the box is non-spacing, it is", --" sensible to put the shorter of the subscript or superscript in the box (that", --" is, after the @).", --"", --" Space equal in length to a string can be inserted using the '&' character.", --" Thus", --" 'abc&{def}ghi'", --" would produce", --" 'abc ghi'.", --"", --" The '~' character causes the next character or bracketed text to be", --" overprinted by the following character or bracketed text. The second text", --" will be horizontally centered on the first. Thus '~a/' will result in an 'a'", --" with a slash through it. You can also shift the second text vertically by", --" preceding the second text with a number, which will define the fraction of the", --" current fontsize by which the text will be raised or lowered. In this case", --" the number and text must be enclosed in brackets because more than one", --" character is necessary. If the overprinted text begins with a number, put a", --" space between the vertical offset and the text ('~{abc}{.5 000}'); otherwise", --" no space is needed ('~{abc}{.5---}'). You can change the font for one or", --" both strings ('~a{.5 /*.2 o}'---an 'a' with a one-fifth-size 'o' on top---and", --" the space between the number and the slash is necessary), but you can't", --" change it after the beginning of the string. Neither can you use any other", --" special syntax within either string. You can, of course, use control", --" characters by escaping them (see below), such as '~a{\\^}'", --"", --" You can access special symbols numerically by specifying \\character-code (in", --" octal), e.g., {/Symbol \\245} is the symbol for infinity.", --"", --" You can escape control characters using \\, e.g., \\\\, \\{, and so on.", --"", --" But be aware that strings in double-quotes are parsed differently than those", --" enclosed in single-quotes. The major difference is that backslashes may need", --" to be doubled when in double-quoted strings.", --"", --" Examples (these are hard to describe in words---try them!):", --" set xlabel 'Time (10^6 {/Symbol m}s)'", --" set title '{/Symbol=18 \\362@_{/=9.6 0}^{/=12 x}} \\", --" {/Helvetica e^{-{/Symbol m}^2/2} d}{/Symbol m}'", --"", --" The file \"ps_guide.ps\" in the /docs/psdoc subdirectory of the `gnuplot` source", --" distribution contains more examples of the enhanced syntax.", - "2 editing postscript", - "?commands set terminal postscript editing", - "?set terminal postscript editing", -@@ -4009,6 +4204,26 @@ - " controlled at the time gnuplot is built. However, you can control this", - " either by defining an environment variable GNUPLOT_PS_DIR or by using the", - " gnuplot command `set loadpath`. See `set loadpath`.", -+"2 postscript adobeglyphnames", -+"?commands set terminal postscript adobeglyphnames", -+"?set terminal postscript adobeglyphnames", -+"?terminal postscript adobeglyphnames", -+"?postscript adobeglyphnames", -+"?adobeglyphnames", -+"=UTF-8", -+" This setting is only relevant to PostScript output with UTF-8 encoding.", -+" It controls the names used to describe characters with Unicode entry points", -+" higher than 0x00FF. That is, all characters outside of the Latin1 set.", -+" In general unicode characters do not have a unique name; they have only a", -+" unicode identification code. However, Adobe have a recommended scheme for", -+" assigning names to certain ranges of characters (extended Latin, Greek, etc).", -+" Some fonts use this scheme, others do not. By default, gnuplot will use", -+" the Adobe glyph names. E.g. the lower case Greek letter alpha will be called", -+" /alpha. If you specific `noadobeglyphnames` then instead gnuplot will use", -+" /uni03B1 to describe this character. If you get this setting wrong, the", -+" character may not be found even if it is present in the font.", -+" It is probably always correct to use the default for Adobe fonts, but for", -+" other fonts you may have to try both settings. See also `fontfile`.", - "", - "" - END_HELP(post) -diff -U 3 -H -d -r -N -- term/pslatex.trm term/pslatex.trm ---- term/pslatex.trm 2008-02-23 10:10:23.000000000 +0100 -+++ term/pslatex.trm 2009-05-09 13:53:00.000000000 +0200 -@@ -1,5 +1,5 @@ - /* Hello, Emacs, this is -*-C-*- -- * $Id: pslatex.trm,v 1.69.2.1 2008/02/22 20:34:41 sfeam Exp $ -+ * $Id: pslatex.trm,v 1.72 2008/02/22 20:02:26 sfeam Exp $ - */ - - /* GNUPLOT - pslatex.trm */ -@@ -441,7 +441,10 @@ - case S_ENC_ISO8859_2: - inputenc = "latin2"; - break; -- case S_ENC_ISO8859_15: -+ case S_ENC_ISO8859_9: /* ISO8859-9 is Latin5 */ -+ inputenc = "latin5"; -+ break; -+ case S_ENC_ISO8859_15: /* ISO8859-15 is Latin9 */ - inputenc = "latin9"; - break; - case S_ENC_CP437: diff --git a/gnuplot-4.2.0-wxt.dif b/gnuplot-4.2.5-wxt.dif similarity index 85% rename from gnuplot-4.2.0-wxt.dif rename to gnuplot-4.2.5-wxt.dif index b457eba..12ba405 100644 --- a/gnuplot-4.2.0-wxt.dif +++ b/gnuplot-4.2.5-wxt.dif @@ -1,6 +1,6 @@ --- src/plot.c +++ src/plot.c 2007-04-24 12:21:32.000000000 +0200 -@@ -591,6 +591,8 @@ +@@ -610,6 +610,8 @@ main(int argc, char **argv) #endif /* GNUPLOT_HISTORY */ fprintf(stderr, "\nTerminal type set to '%s'\n", term->name); @@ -9,9 +9,9 @@ } /* if (interactive && term != 0) */ } else { /* come back here from int_error() */ ---- src/term.c 2006-10-06 01:52:18.000000000 +0200 +--- src/term.c +++ src/term.c 2007-04-24 12:21:51.000000000 +0200 -@@ -1555,6 +1555,8 @@ +@@ -1561,6 +1561,8 @@ change_term(const char *origname, int le } if (interactive) fprintf(stderr, "Terminal type set to '%s'\n", term->name); @@ -20,7 +20,7 @@ /* Invalidate any terminal-specific structures that may be active */ invalidate_palette(); -@@ -1620,11 +1622,6 @@ +@@ -1626,11 +1628,6 @@ init_terminal() term_name = "sun"; #endif /* SUN */ @@ -32,7 +32,7 @@ #ifdef _Windows /* let the wxWidgets terminal be the default when available */ if (term_name == (char *) NULL) -@@ -1660,6 +1657,11 @@ +@@ -1666,6 +1663,11 @@ init_terminal() term_name = "x11"; #endif /* x11 */ diff --git a/gnuplot-4.2.5-x11ovf.dif b/gnuplot-4.2.5-x11ovf.dif new file mode 100644 index 0000000..577fcb0 --- /dev/null +++ b/gnuplot-4.2.5-x11ovf.dif @@ -0,0 +1,35 @@ +--- src/gplt_x11.c ++++ src/gplt_x11.c 2009-06-15 13:17:19.021900688 +0200 +@@ -901,6 +901,8 @@ mainloop() + nfds = cn + 1; + + while (1) { ++ int ipc; ++ + XFlush(dpy); /* see above */ + + FD_ZERO(&tset); +@@ -938,7 +940,11 @@ mainloop() + process_event(&xe); + } + } +- if ((X11_ipc = fopen(X11_ipcpath, "r"))) { ++ ++ if ((ipc = open(X11_ipcpath, O_RDONLY|O_CREAT|O_CLOEXEC|O_EXCL)) < 0) ++ break; ++ ++ if ((X11_ipc = dfopen(ipc, "r"))) { + unlink(X11_ipcpath); + record(); + fclose(X11_ipc); +@@ -1176,8 +1182,8 @@ static int read_input __PROTO((void)); + static int + read_input() + { +- static int rdbuf_size = 10 * Nbuf; +- static char rdbuf[10 * Nbuf]; ++ const int rdbuf_size = 10 * Nbuf; ++ static char rdbuf[rdbuf_size+1]; + static int total_chars; + static int rdbuf_offset; + static int buf_offset; diff --git a/gnuplot-4.2.5.dif b/gnuplot-4.2.5.dif index 5041e64..b777174 100644 --- a/gnuplot-4.2.5.dif +++ b/gnuplot-4.2.5.dif @@ -1,10 +1,10 @@ ---- .pkgextract 1970-01-01 01:00:00.000000000 +0100 +--- .pkgextract +++ .pkgextract 2009-05-09 13:32:24.000000000 +0200 @@ -0,0 +1 @@ +bzcat ../gnuplot-fr.doc.bz2 > docs/gnuplot-fr.doc ---- configure.in 2009-03-15 04:39:15.000000000 +0100 +--- configure.in +++ configure.in 2009-05-09 13:32:24.000000000 +0200 -@@ -230,7 +230,7 @@ +@@ -230,7 +230,7 @@ if test "$with_linux_vga" = yes; then [AC_DEFINE(LINUXVGA,1, [ Define if this is a Linux system with SuperVGA library. ]) LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot' @@ -13,70 +13,7 @@ with_linux_vga=no) fi ---- demo/poldat.dem 2003-10-28 06:35:54.000000000 +0100 -+++ demo/poldat.dem 2009-05-09 13:32:24.000000000 +0200 -@@ -11,7 +11,7 @@ - unset polar - set title "Primitive Smith Chart" - unset key --set xlabel "Impedance or Admittance Coordinates" -+set xlabel "Impedance or Admittance Coordinates" 12,-1 - set para - set rrange [-0 : 10] - set trange [-pi : pi] ---- demo/simple.dem 2006-06-30 04:17:22.000000000 +0200 -+++ demo/simple.dem 2009-05-09 13:32:24.000000000 +0200 -@@ -7,12 +7,11 @@ - # gnuplot> load 'simple.dem' - # - set key left box --set samples 50 -+set samples 400 - plot [-10:10] sin(x),atan(x),cos(atan(x)) - pause -1 "Hit return to continue" - - set key right nobox --set samples 100 - plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) - pause -1 "Hit return to continue" - ---- demo/vector.dem 2006-07-12 19:21:14.000000000 +0200 -+++ demo/vector.dem 2009-05-09 13:32:24.000000000 +0200 -@@ -62,19 +62,19 @@ - print "Now create a file with equipotential lines" - pause -1 "Hit return to continue" - --set table "equipo2.tmp" -+set table "/tmp/equipo2.tmp" - replot - unset table - reset - pause 0 - --plot "equipo2.tmp" w l -+plot "/tmp/equipo2.tmp" w l - print "Now create a x/y datafile for plotting with vectors " - print "and display vectors parallel to the electrostatic field" - pause -1 "Hit return to continue" - set isosam 31,31 - --set table "field2xy.tmp" -+set table "/tmp/field2xy.tmp" - splot vtot(x,y) w l - unset table - pause 0 -@@ -84,8 +84,8 @@ - set yr [ymin:ymax] - set isosam 31,31 - set key under Left reverse --plot "field2xy.tmp" u 1:2:(coef*dx1($1,$2)):(coef*dy1($1,$2)) w vec, \ -- "equipo2.tmp" w l -+plot "/tmp/field2xy.tmp" u 1:2:(coef*dx1($1,$2)):(coef*dy1($1,$2)) w vec, \ -+ "/tmp/equipo2.tmp" w l - pause -1 "Hit return to continue" - - reset ---- docs/Makefile.in 2006-08-09 23:09:48.000000000 +0200 +--- docs/Makefile.in +++ docs/Makefile.in 2009-05-09 13:32:24.000000000 +0200 @@ -37,7 +37,7 @@ # @@ -87,7 +24,7 @@ # this tells GNU make not to export variables into the environment # But other makes dont understand its significance, so it must -@@ -239,6 +239,8 @@ +@@ -239,6 +239,8 @@ html: htmldocs/gnuplot.html # emacs around to do lisp pre-processing htmldocs/gnuplot.html: $(srcdir)/gnuplot.tex mkdir -p htmldocs @@ -96,7 +33,7 @@ latex2html -dir htmldocs -local_icons gnuplot ### PDF documentation -@@ -321,12 +323,16 @@ +@@ -321,12 +323,16 @@ doc2hlp: doc2hlp.o termdoc.o $(LINK) doc2hlp.o termdoc.o $(LIBS) ### gnuplot interactive help format @@ -114,7 +51,7 @@ doc2gih: doc2gih.o termdoc.o $(LINK) doc2gih.o termdoc.o $(LIBS) -@@ -415,6 +421,7 @@ +@@ -415,6 +421,7 @@ install: install-gih install-info install-gih: gnuplot.gih $(top_srcdir)/mkinstalldirs $(DESTDIR)$(GIHDIR) $(INSTALL_DATA) gnuplot.gih $(DESTDIR)$(GIHDIR)/gnuplot.gih @@ -122,7 +59,7 @@ install-info: gnuplot.info $(top_srcdir)/mkinstalldirs $(DESTDIR)$(infodir) -@@ -434,6 +441,7 @@ +@@ -434,6 +441,7 @@ uninstall: uninstall-gih uninstall-info uninstall-gih: rm -f $(DESTDIR)$(GIHDIR)/gnuplot.gih @@ -130,9 +67,9 @@ uninstall-info: $(PRE_UNINSTALL) ---- docs/gnuplot-fr.doc 2009-05-09 11:53:20.000000000 +0200 +--- docs/gnuplot-fr.doc +++ docs/gnuplot-fr.doc 2009-05-09 13:32:24.000000000 +0200 -@@ -436,8 +436,8 @@ +@@ -436,8 +436,8 @@ C #Home & same as \verb~^A~. \\ #Ctrl Home & same as \verb~^E~. \\ #Esc & same as \verb~^U~. \\ @@ -143,9 +80,9 @@ %c l . %Touche fléchée@Fonction %_ ---- src/command.c 2008-12-15 05:18:36.000000000 +0100 +--- src/command.c +++ src/command.c 2009-05-09 13:32:24.000000000 +0200 -@@ -1177,14 +1177,24 @@ +@@ -1177,14 +1177,24 @@ pause_command() (void) fgets(buf, strlen(buf), stdin); } } else if (strcmp(term->name, "atari") == 0) { @@ -172,7 +109,7 @@ if (line) free(line); } else -@@ -2696,6 +2706,13 @@ +@@ -2696,6 +2706,13 @@ read_line(const char *prompt) # endif /* no READLINE */ do { @@ -186,9 +123,9 @@ /* grab some input */ # if defined(READLINE) || defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) if (((interactive) ---- src/gplt_x11.c 2009-01-14 19:42:02.000000000 +0100 +--- src/gplt_x11.c +++ src/gplt_x11.c 2009-05-09 13:32:24.000000000 +0200 -@@ -2240,8 +2240,11 @@ +@@ -2254,8 +2254,11 @@ exec_cmd(plot_struct *plot, char *comman } } /* X11_justify_text(mode) - set text justification mode */ @@ -202,7 +139,7 @@ else if (*buffer == 'A') sscanf(buffer + 1, "%lf", &plot->angle); -@@ -4710,7 +4713,9 @@ +@@ -4724,7 +4727,9 @@ process_event(XEvent *event) */ #define On(v) ( !strncasecmp(v, "on", 2) || !strncasecmp(v, "true", 4) ) @@ -212,9 +149,9 @@ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif ---- src/plot.c 2008-12-15 05:18:36.000000000 +0100 +--- src/plot.c +++ src/plot.c 2009-05-09 13:32:24.000000000 +0200 -@@ -234,6 +234,7 @@ +@@ -234,6 +234,7 @@ static int asked_privi = 0; void drop_privilege() { @@ -222,7 +159,7 @@ if (!asked_privi) { euid = geteuid(); egid = getegid(); -@@ -247,11 +248,13 @@ +@@ -247,11 +248,13 @@ drop_privilege() if (seteuid(ruid) == -1) (void) fprintf(stderr, "seteuid(%d): %s\n", (int) ruid, strerror(errno)); @@ -236,7 +173,7 @@ if (!asked_privi) { euid = geteuid(); egid = getegid(); -@@ -265,6 +268,7 @@ +@@ -265,6 +268,7 @@ take_privilege() if (seteuid(euid) == -1) (void) fprintf(stderr, "seteuid(%d): %s\n", (int) euid, strerror(errno)); @@ -244,7 +181,7 @@ } #endif /* LINUXVGA */ -@@ -290,8 +294,8 @@ +@@ -290,8 +294,8 @@ main(int argc, char **argv) int i; #ifdef LINUXVGA @@ -254,7 +191,7 @@ #endif /* make sure that we really have revoked root access, this might happen if gnuplot is compiled without vga support but is installed suid by mistake */ -@@ -357,6 +361,23 @@ +@@ -357,6 +361,23 @@ main(int argc, char **argv) #if defined(HAVE_LIBEDITLINE) rl_getc_function = getc_wrapper; #endif @@ -278,7 +215,7 @@ #if defined(HAVE_LIBREADLINE) || defined(HAVE_LIBEDITLINE) using_history(); /* T.Walter 1999-06-24: 'rl_readline_name' must be this fix name. ---- src/term.h 2006-04-29 07:30:07.000000000 +0200 +--- src/term.h +++ src/term.h 2009-05-09 13:32:24.000000000 +0200 @@ -321,9 +321,9 @@ #include "emf.trm" @@ -310,9 +247,9 @@ /* wire printers */ /* Epson LX-800, Star NL-10, NX-1000 and lots of others */ ---- src/time.c 2008-09-02 23:12:59.000000000 +0200 +--- src/time.c +++ src/time.c 2009-05-09 13:32:24.000000000 +0200 -@@ -291,11 +291,12 @@ +@@ -291,11 +291,12 @@ gstrptime(char *s, char *fmt, struct tm case 's': #if 0 /* HBB 20040213: comment this out, but keep it around for now */ { @@ -329,9 +266,9 @@ tmwhen->tm_year += 1900; *tm = *tmwhen; break; ---- term/linux.trm 2006-07-21 04:35:47.000000000 +0200 +--- term/linux.trm +++ term/linux.trm 2009-05-09 13:32:24.000000000 +0200 -@@ -80,7 +80,7 @@ +@@ -80,7 +80,7 @@ TERM_PUBLIC void LINUX_linetype __PROTO( TERM_PUBLIC void LINUX_move __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC void LINUX_vector __PROTO((unsigned int x, unsigned int y)); TERM_PUBLIC int LINUX_text_angle __PROTO((int ang)); @@ -340,7 +277,7 @@ TERM_PUBLIC void LINUX_suspend __PROTO((void)); TERM_PUBLIC void LINUX_resume __PROTO((void)); -@@ -293,7 +293,7 @@ +@@ -293,7 +293,7 @@ LINUX_putc( } TERM_PUBLIC void diff --git a/gnuplot.changes b/gnuplot.changes index 427357d..361f239 100644 --- a/gnuplot.changes +++ b/gnuplot.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 15 15:12:38 CEST 2009 - werner@suse.de + +- Make demos more flexible (hint from dieter.jurzitza@t-online.de) +- Add netpbm and xorg-x11 to build requires or jpg's are zero + ------------------------------------------------------------------- Tue May 26 11:19:52 CEST 2009 - werner@suse.de diff --git a/gnuplot.spec b/gnuplot.spec index 3698adb..cf023b8 100644 --- a/gnuplot.spec +++ b/gnuplot.spec @@ -19,7 +19,7 @@ Name: gnuplot -BuildRequires: cairo-devel freetype2-devel gcc-c++ gd-devel gtk2-devel latex2html libjpeg-devel libpng-devel pango-devel readline-devel texlive-latex wxGTK-devel xorg-x11-devel +BuildRequires: cairo-devel freetype2-devel gcc-c++ gd-devel gtk2-devel latex2html libjpeg-devel libpng-devel netpbm pango-devel readline-devel texlive-latex wxGTK-devel xorg-x11 xorg-x11-devel %if 0%{?suse_version} > 1110 BuildRequires: plotutils-devel %else @@ -31,15 +31,15 @@ Group: Productivity/Graphics/Visualization/Graph AutoReqProv: on PreReq: %install_info_prereq Version: 4.2.5 -Release: 1 +Release: 2 Summary: GNUplot a Function Plotting Utility Source0: gnuplot-%{version}.tar.bz2 Source2: gnuplot-fr.doc.bz2 Source3: README.whynot Patch0: gnuplot-4.2.5.dif -Patch1: gnuplot-4.2.0-x11ovf.dif -Patch2: gnuplot-4.2.2-fonts.dif -Patch3: gnuplot-4.2.0-wxt.dif +Patch1: gnuplot-4.2.5-x11ovf.dif +Patch2: gnuplot-4.2.5-fonts.dif +Patch3: gnuplot-4.2.5-wxt.dif Patch4: gnuplot-4.2.5-demo.dif Patch5: gnuplot-4.2.5-utf8.dif Patch6: gnuplot-4.2.5-fix-format-errors.dif @@ -104,16 +104,17 @@ Authors: bunzip2 -dc %{_sourcedir}/gnuplot-fr.doc.bz2 > docs/gnuplot-fr.doc test $? -eq 0 || exit 1 %patch -P 1 -p 0 -b .x11ovf -%patch -P 3 -p 0 -%patch -P 0 -p 0 %patch -P 2 -p 0 +%patch -P 3 -p 0 %patch -P 4 -p 0 %patch -P 5 -p 0 %patch -P 6 -p 0 +%patch -P 0 -p 0 %build SECSVGA="-DSVGA_IS_SECURE=1" export CPPFLAGS="-I%{_x11inc} -I%{_includedir}/gd -DAppDefDir=\\\"%{_appdef}\\\"" + export CPPFLAGS="$CPPFLAGS -DGNUPLOT_LIB_DEFAULT=\\\"%{_docdir}/%{name}/demo\\\"" export CFLAGS="${RPM_OPT_FLAGS} -pipe ${SECSVGA}" export CXXFLAGS="$CFLAGS -fno-strict-aliasing" export LDFLAGS="-L%{_x11lib}" @@ -220,6 +221,9 @@ test $? -eq 0 || exit 1 %doc %{_mandir}/man1/gnuplot.1.gz %changelog +* Mon Jun 15 2009 werner@suse.de +- Make demos more flexible (hint from dieter.jurzitza@t-online.de) +- Add netpbm and xorg-x11 to build requires or jpg's are zero * Tue May 26 2009 werner@suse.de - Update changes file * Sat May 09 2009 nico.laus.2001@gmx.de