diff -urNP gnuplot/configure.in gnuplot-cvs/configure.in
--- gnuplot/configure.in	2004-03-31 16:40:41.000000000 -0800
+++ gnuplot-cvs/configure.in	2004-04-16 17:37:12.000000000 -0700
@@ -735,6 +735,14 @@
                [ Define to use thin plate spines. ])
    fi])
 
+dnl string variables
+AC_ARG_ENABLE(datastrings,dnl
+[  --enable-datastrings    enable string-handling in datafiles (EXPERIMENTAL)],
+  [if test "$enableval" = yes; then
+     AC_DEFINE(EAM_DATASTRINGS, 1,
+               [ Define to allow string-handling in datafiles. EXPERIMENTAL ])
+   fi])
+
 dnl IRIS terminal on IRIS4D series computer
 AC_ARG_ENABLE(iris,dnl
 [  --enable-iris           enable IRIS terminal (IRIS4D only)],
@@ -957,6 +965,10 @@
   AC_MSG_RESULT([  Enable thin plate splines])
 fi
 
+if test "$enable_datastrings" = yes; then
+  AC_MSG_RESULT([  Enable string-handling in datafiles (EXPERIMENTAL)])
+fi
+
 if test "$enable_iris" = yes; then
   AC_MSG_RESULT([  Enable IRIS terminal])
 fi
diff -urNP gnuplot/demo/ctg-y2.dat gnuplot-cvs/demo/ctg-y2.dat
--- gnuplot/demo/ctg-y2.dat	1969-12-31 16:00:00.000000000 -0800
+++ gnuplot-cvs/demo/ctg-y2.dat	2004-04-16 17:37:12.000000000 -0700
@@ -0,0 +1,58 @@
+MONTH	"precipitation 1992-2000"
+mai 	61
+jun 	57.7
+jul 	61.7
+aug 	74.9
+sep 	103.1
+okt 	66.1
+nov 	47.3
+des 	48.8
+jan 	55.7
+feb 	36.1
+mar 	39.1
+apr 	41
+
+
+MONTH	"precipitation 2001-2002"
+mai 	42.2
+jun 	69.2
+jul 	68.4
+aug 	68.4
+sep 	26.1
+okt 	144.7
+nov 	166.5
+des 	52.9
+jan 	43.4
+feb 	22.9
+mar 	37.5
+apr 	42.1
+
+
+MONTH	"runoff 1992-2000"
+mai 	15.8
+jun 	10.4
+jul 	3.2
+aug 	3
+sep 	6.6
+okt 	21.3
+nov 	17.7
+des 	17.3
+jan 	8.3
+feb 	1.8
+mar 	10.8
+apr 	56.1
+
+
+MONTH	"runoff 2001-2002"
+mai 	5.7
+jun 	1.2
+jul 	5.7
+aug 	1.6
+sep 	1.1
+okt 	93.6
+nov 	145.9
+des 	51.6
+jan 	0.9
+feb 	0
+mar 	5.4
+apr 	61.7
diff -urNP gnuplot/demo/datastrings.dem gnuplot-cvs/demo/datastrings.dem
--- gnuplot/demo/datastrings.dem	1969-12-31 16:00:00.000000000 -0800
+++ gnuplot-cvs/demo/datastrings.dem	2004-04-16 17:37:12.000000000 -0700
@@ -0,0 +1,99 @@
+#
+# Demonstrate features of datastrings patch
+# Ethan A Merritt <merritt@u.washington.edu>
+# 08-Mar-2003
+#
+reset
+#
+# Illustrate reading plot labels from column head in datafile
+#
+set title "Auto-labeling plots from text fields in datafile"
+set label 1 "Generate plot labels from first row in each column"
+set label 1 at graph 0.02, 0.85 tc lt 3
+set label 2 "Generate x-axis labels from first column in each row"
+set label 2 at graph 0.02, 0.80 tc lt 3
+set style data linespoints
+set ylabel "mm"
+set yrange [0:200]
+#
+set key autotitle columnhead
+plot 'ctg-y2.dat' using 2:xticlabel(1) index 2, \
+     ''           using 2 index 3 
+#
+pause -1 "<cr> to plot again using x2ticlabels"
+#
+# Illustrate reading xtic axis labels from the datafile
+#
+reset
+set title "Read tic labels from a datafile column\nAn approximation of Hans Olav Eggestad's categoric plot patch\nusing 'using ($0):2:xticlabels(1)' and 'set style fill solid border -1'"
+set boxwidth 0.3
+set style fill solid 1.000000 border -1
+set bmargin 3
+set pointsize 2
+set yrange [0:180]
+set xrange [-0.5:11.5]
+set ylabel "mm"
+set ticscale 0.0
+set grid y
+set xtics
+#
+set key autotitle columnhead
+plot '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"
+#
+pause -1 "<cr> to plot again using x2ticlabels"
+#
+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", \
+     ''           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"
+#
+pause -1 "<cr> 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 2 with boxes, \
+     ''          using ($0+0.2):3 title 3 with boxes, \
+     ''          using ($0):4     title 4 with linespoints, \
+     ''          using ($0):5:xtic(1) title 5 with linespoints
+#
+pause -1 "<cr> continue"
+#
+# Now show the plot with labels options
+#
+reset
+
+set title "Read labels from a datafile column\nHere the 'plot with labels' command generates a\nC-alpha trace of retro-GCN4 peptide"
+set size square
+unset xtics
+unset ytics
+set border 3
+set xlabel "X--->"
+set ylabel "Z--->"
+set key bottom right
+#
+plot 'labelplot.pdb' using 7:9 with lines notitle, \
+      '' using 7:9:4 with labels tc lt 3 font "arial,10" notitle
+#     '' using 7:9 with points notitle ps 5 lt -1 
+#
+pause -1 "<cr> to try a 3D version using splot"
+#
+reset
+
+set title "3D version generated by splot\n(sorry, the axis scales are distorted)"
+set zrange [-15:15]
+
+set view 70,210, 1.0,1.7
+set ticslevel 0.0
+
+splot 'labelplot.pdb' using 7:8:9 with lines notitle, \
+      '' using 7:8:9:4 with labels left offset 4,0 point ps 2 pt 1 tc lt 3 font "arial,10" notitle
+pause -1 "<cr> to view star map"
+#
+reset
+load "starmap.dem"
+#
+pause -1 "<cr> to end demo"
diff -urNP gnuplot/demo/labelplot.pdb gnuplot-cvs/demo/labelplot.pdb
--- gnuplot/demo/labelplot.pdb	1969-12-31 16:00:00.000000000 -0800
+++ gnuplot-cvs/demo/labelplot.pdb	2004-04-16 17:37:12.000000000 -0700
@@ -0,0 +1,37 @@
+ATOM      2  CA  Gly A   2      15.650   4.729 -25.837  1.00100.53           C  
+ATOM      6  CA  Gly A   3      19.008   6.213 -26.458  1.00 97.90           C  
+ATOM     10  CA  Arg A   4      19.415   8.236 -23.277  1.00 88.77           C  
+ATOM     21  CA  Glu A   5      18.790   7.506 -19.627  1.00 63.87           C  
+ATOM     30  CA  Gly A   6      16.256   9.024 -17.278  1.00 45.64           C  
+ATOM     34  CA  Val A   7      16.714   5.511 -15.945  1.00 39.94           C  
+ATOM     41  CA  Leu A   8      20.247   6.236 -14.817  1.00 36.86           C  
+ATOM     49  CA  Lys A   9      19.079   9.370 -13.209  1.00 29.25           C  
+ATOM     58  CA  Lys A  10      16.415   7.489 -11.262  1.00 24.12           C  
+ATOM     67  CA  Leu A  11      18.939   4.806 -10.235  1.00 22.47           C  
+ATOM     75  CA  Arg A  12      21.338   7.510  -9.023  1.00 22.83           C  
+ATOM     86  CA  Ala A  13      18.650   9.041  -6.747  1.00 25.77           C  
+ATOM     91  CA  Val A  14      17.926   5.440  -5.567  1.00 21.59           C  
+ATOM     98  CA  Glu A  15      21.519   4.709  -4.741  1.00 12.47           C  
+ATOM    107  CA  Asn A  16      21.923   8.103  -2.969  1.00 19.28           C  
+ATOM    115  CA  Glu A  17      18.738   7.381  -0.911  1.00 17.58           C  
+ATOM    124  CA  Leu A  18      20.141   3.970   0.025  1.00 17.14           C  
+ATOM    132  CA  His A  19      23.404   5.538   1.185  1.00 20.10           C  
+ATOM    142  CA  Tyr A  20      21.340   7.966   3.385  1.00 15.07           C  
+ATOM    154  CA  Asn A  21      19.556   4.954   5.039  1.00 14.35           C  
+ATOM    162  CA  Lys A  22      22.883   3.311   5.413  1.00 19.97           C  
+ATOM    171  CA  Ser A  23      24.367   6.240   7.511  1.00 24.61           C  
+ATOM    177  CA  Leu A  24      21.211   6.393   9.572  1.00 15.71           C  
+ATOM    185  CA  Leu A  25      21.318   2.629  10.239  1.00 22.57           C  
+ATOM    193  CA  Glu A  26      24.936   3.013  11.365  1.00 22.56           C  
+ATOM    202  CA  Glu A  27      23.865   5.921  13.590  1.00 26.90           C  
+ATOM    211  CA  Val A  28      21.168   3.526  15.092  1.00 17.85           C  
+ATOM    218  CA  Lys A  29      23.639   0.750  15.593  1.00 27.01           C  
+ATOM    227  CA  Asp A  30      26.212   3.212  17.131  1.00 37.89           C  
+ATOM    235  CA  Glu A  31      23.505   4.530  19.408  1.00 33.37           C  
+ATOM    244  CA  Leu A  32      22.580   1.043  20.447  1.00 34.71           C  
+ATOM    252  CA  Gln A  33      26.070  -0.210  21.091  1.00 51.93           C  
+ATOM    261  CA  Lys A  34      26.216   2.835  23.225  1.00 67.83           C  
+ATOM    270  CA  Met A  35      23.323   2.341  25.600  1.00 80.81           C  
+ATOM    278  CA  Arg A  36      24.734  -1.205  26.107  1.00 84.23           C  
+ATOM    289  CA  Gln A  37      26.891  -3.324  28.634  1.00 91.87           C  
+ATOM    298  CA  Leu A  38      29.958  -1.118  28.262  1.00 93.98           C  
diff -urNP gnuplot/demo/nearmap.csv gnuplot-cvs/demo/nearmap.csv
--- gnuplot/demo/nearmap.csv	1969-12-31 16:00:00.000000000 -0800
+++ gnuplot-cvs/demo/nearmap.csv	2004-04-16 17:37:12.000000000 -0700
@@ -0,0 +1,117 @@
+# Stars farther than  0.00pc and closer than  7.00pc
+# Lum between 0.0 and 100.0
+#Gliese	StarName    	Spec 	DistPC	  X	  Y	  Z 	 Xg	 Yg	 Zg	  Lum
+  1   	DM-37 15492 	M4V   	 4.44	  3.52	  0.04	 -2.71	  1.04	 -0.30	 -4.31	 0.01
+ 15A  	DM+43 44    	M1Ve  	 3.55	  2.56	  0.17	  2.45	 -1.51	  3.01	 -1.12	 0.01
+ 15B  	    	M6Ve  	 3.55	  2.56	  0.17	  2.45	 -1.51	  3.01	 -1.12	 0.00
+ 19   	BET HYI     	G1IV  	 6.29	  1.35	  0.14	 -6.14	  2.76	 -3.97	 -4.02	 2.75
+ 33   	DM+04 123   	K2V   	 6.94	  6.78	  1.37	  0.61	 -1.95	  3.18	 -5.86	 0.22
+ 34A  	ETA CAS     	G0V   	 5.88	  3.09	  0.63	  4.96	 -3.16	  4.94	 -0.52	 1.32
+ 34B  	    	M0V   	 5.88	  3.09	  0.63	  4.96	 -3.16	  4.94	 -0.52	 0.03
+ 35   	VAN MAANEN 2	G wD  	 4.18	  4.08	  0.84	  0.38	 -1.19	  1.91	 -3.53	 0.00
+ 54.1 	L 725-32    	M5de  	 6.90	  6.28	  1.99	 -2.05	 -1.17	  0.67	 -6.76	 0.00
+ 65A  	L 726-8     	M5de  	 2.72	  2.36	  1.06	 -0.85	 -0.67	  0.05	 -2.64	 0.00
+ 65B  	UV CET      	M5de  	 2.72	  2.36	  1.06	 -0.85	 -0.67	  0.05	 -2.64	 0.00
+ 66A  	P ERI       	K2V   	 6.54	  3.29	  1.50	 -5.45	  1.11	 -3.11	 -5.64	 0.20
+ 66B  	DM-56 328   	K5Ve  	 6.54	  3.29	  1.50	 -5.45	  1.11	 -3.11	 -5.64	 0.17
+ 71   	TAU CET     	G8Vp  	 3.61	  3.13	  1.49	 -1.01	 -1.02	  0.12	 -3.46	 0.47
+ 83.1 	L 1159-16   	M8de  	 4.69	  3.99	  2.24	  1.04	 -2.73	  1.73	 -3.40	 0.00
+139   	82 ERI      	G5V   	 6.21	  2.94	  3.44	 -4.26	 -1.14	 -3.27	 -5.16	 0.70
+144   	EPS ERI     	K2Ve  	 3.31	  1.98	  2.59	 -0.55	 -2.13	 -0.60	 -2.46	 0.32
+166A  	OMI(2) ERI  	K1Ve  	 4.88	  2.18	  4.32	 -0.66	 -3.60	 -1.36	 -3.00	 0.37
+166B  	DM-07 781   	A wD  	 4.88	  2.17	  4.32	 -0.66	 -3.60	 -1.36	 -3.00	 0.00
+166C  	    	M4de  	 4.88	  2.17	  4.32	 -0.66	 -3.60	 -1.36	 -3.00	 0.00
+169.1A	AC+58 25001 	M4d   	 5.21	  1.06	  2.47	  4.46	 -4.38	  2.73	  0.66	 0.00
+169.1B	AC+58 25002 	C wD  	 5.21	  1.06	  2.47	  4.46	 -4.38	  2.73	  0.66	 0.00
+191   	DM-45 1841  	M0V   	 3.91	  0.60	  2.70	 -2.76	 -1.06	 -2.97	 -2.30	 0.00
+205   	DM-03 1123  	M1Ve  	 5.88	  0.79	  5.82	 -0.38	 -4.95	 -2.51	 -1.96	 0.02
+213   	AC+12 1800-2	M5d   	 5.95	  0.53	  5.79	  1.29	 -5.71	 -1.39	 -0.95	 0.00
+223.2 	LP 658-2    	K wDe 	 6.02	  0.19	  6.01	 -0.44	 -5.04	 -2.93	 -1.50	 0.00
+229   	DM-21 1377  	M1Ve  	 5.75	 -0.20	  5.33	 -2.14	 -3.61	 -4.09	 -1.82	 0.02
+234A  	ROSS 614    	M7de  	 3.97	 -0.46	  3.94	 -0.19	 -3.31	 -2.14	 -0.43	 0.00
+234B  	    	      	 3.97	 -0.46	  3.94	 -0.19	 -3.31	 -2.14	 -0.43	 91.20
+244A  	ALF CMA     	A1V   	 2.65	 -0.47	  2.50	 -0.76	 -1.78	 -1.92	 -0.41	 24.66
+244B  	    	A wD  	 2.65	 -0.47	  2.50	 -0.76	 -1.78	 -1.92	 -0.41	 0.00
+251   	AC+33 25644 	M4d   	 5.95	 -1.11	  4.85	  3.27	 -5.74	 -0.29	  1.56	 0.00
+268   	AC+38 23616 	M5de  	 5.92	 -1.33	  4.43	  3.69	 -5.56	  0.10	  2.02	 0.00
+273   	DM+05 1668  	M5d   	 3.70	 -1.33	  3.44	  0.35	 -3.08	 -1.95	  0.67	 0.00
+280A  	ALF CMI     	F5IV+ 	 3.51	 -1.43	  3.19	  0.33	 -2.84	 -1.90	  0.79	 8.02
+280B  	    	F wD  	 3.51	 -1.43	  3.19	  0.33	 -2.84	 -1.90	  0.79	 0.00
+285   	YZ CMI      	M4de  	 6.06	 -2.61	  5.46	  0.39	 -4.78	 -3.45	  1.41	 0.00
+293   	L 97-12     	C wD  	 5.78	 -1.04	  1.94	 -5.35	  0.97	 -5.37	 -1.92	 0.00
+299   	ROSS 619    	M5d   	 6.62	 -3.49	  5.53	  1.04	 -5.09	 -3.44	  2.47	 0.00
+300   	L 674-15    	 M    	 5.85	 -2.94	  4.59	 -2.13	 -2.77	 -5.10	  0.70	 0.00
+338A  	DM+53 1320  	M0Ve  	 6.02	 -2.69	  2.44	  4.80	 -4.27	  1.15	  4.08	 0.03
+338B  	DM+53 1321  	M0Ve  	 6.02	 -2.69	  2.44	  4.80	 -4.27	  1.15	  4.08	 0.03
+380   	DM+50 1725  	K7Ve  	 4.50	 -2.57	  1.36	  3.44	 -2.68	  0.68	  3.56	 0.04
+388   	DM+20 2465  	M4Ve  	 4.90	 -4.14	  2.00	  1.69	 -2.28	 -1.69	  4.00	 0.00
+406   	WOLF 359    	M8de  	 2.35	 -2.23	  0.66	  0.30	 -0.57	 -1.17	  1.95	 0.00
+408   	AC+23 468-46	M3d   	 6.62	 -5.87	  1.64	  2.60	 -2.30	 -1.70	  5.98	 0.00
+411   	DM+36 2147  	M2Ve  	 2.52	 -1.96	  0.52	  1.49	 -1.04	 -0.09	  2.29	 0.01
+412A  	DM+44 2051  	M2Ve  	 5.38	 -3.76	  0.96	  3.72	 -2.38	  0.49	  4.80	 0.01
+412B  	WX UMA      	M8de  	 5.38	 -3.76	  0.95	  3.72	 -2.38	  0.49	  4.80	 0.00
+440   	L 145-141   	C wD  	 4.85	 -2.08	  0.15	 -4.38	  2.12	 -4.36	 -0.24	 0.00
+445   	AC+79 3888  	M4sd  	 5.10	 -0.97	  0.07	  5.01	 -2.41	  3.22	  3.14	 0.00
+447   	ROSS 128    	M5d   	 3.32	 -3.31	  0.22	  0.06	  0.00	 -1.68	  2.86	 0.00
+473A  	WOLF 424    	M5de  	 4.33	 -4.23	 -0.57	  0.70	  0.45	 -1.31	  4.10	 0.00
+473B  	    	      	 4.33	 -4.23	 -0.57	  0.70	  0.45	 -1.31	  4.10	 0.00
+477.1 	DM+46 1797  	K4V   	 6.10	 -4.19	 -0.62	  4.39	 -1.30	  1.48	  5.77	 0.05
+526   	DM+15 2620  	M4Ve  	 4.98	 -4.32	 -2.09	  1.30	  1.49	 -0.22	  4.74	 0.01
+551   	PROXIMA CEN 	M5de  	 1.31	 -0.49	 -0.36	 -1.17	  0.91	 -0.94	 -0.04	 0.00
+555   	DM-11 3759  	M4d   	 6.25	 -4.82	 -3.75	 -1.33	  4.24	 -1.68	  4.27	 0.00
+559A  	ALF CEN     	G2V   	 1.35	 -0.51	 -0.42	 -1.17	  0.96	 -0.94	 -0.02	 1.66
+559B  	    	K0V   	 1.35	 -0.51	 -0.42	 -1.17	  0.96	 -0.94	 -0.02	 0.48
+566A  	XI BOO      	G8Ve  	 6.76	 -4.72	 -4.29	  2.23	  2.98	  1.27	  5.93	 0.56
+566B  	    	K4Ve  	 6.76	 -4.72	 -4.29	  2.23	  2.98	  1.27	  5.93	 0.08
+570A  	DM-20 4125  	K5Ve  	 5.56	 -3.75	 -3.57	 -2.01	  4.34	 -1.73	  3.00	 0.14
+570B  	DM-20 4123  	M2V   	 5.56	 -3.75	 -3.57	 -2.01	  4.34	 -1.73	  3.00	 0.02
+581   	DM-07 4003  	M5d   	 6.54	 -4.23	 -4.91	 -0.86	  4.98	 -0.51	  4.20	 0.00
+588   	DM-40 9712  	M4    	 5.92	 -2.73	 -3.53	 -3.89	  5.14	 -2.65	  1.24	 0.00
+628   	DM-12 4523  	M5d   	 4.02	 -1.54	 -3.61	 -0.87	  3.67	  0.22	  1.61	 0.00
+643   	WOLF 629    	M4sd  	 6.21	 -1.78	 -5.88	 -0.89	  5.68	  1.11	  2.24	 0.00
+644A  	DM-08 4352  	M4de  	 6.21	 -1.78	 -5.88	 -0.89	  5.69	  1.11	  2.24	 0.00
+644B  	    	M4d   	 6.21	 -1.78	 -5.88	 -0.89	  5.69	  1.11	  2.24	 0.00
+644C  	VB 8        	    	 6.21	 -1.77	 -5.88	 -0.90	  5.69	  1.11	  2.23	 0.00
+661A  	DM+45 2505  	M3d   	 6.45	 -0.96	 -4.40	  4.62	  1.67	  4.95	  3.79	 0.00
+661B  	    	M3    	 6.45	 -0.96	 -4.40	  4.62	  1.67	  4.95	  3.79	 0.00
+663A  	DM-26 12026 	K1Ve  	 5.43	 -1.01	 -4.76	 -2.43	  5.39	 -0.16	  0.65	 0.26
+663B  	    	K1Ve  	 5.43	 -1.01	 -4.76	 -2.43	  5.39	 -0.16	  0.65	 0.25
+664   	DM-26 12036 	K5Ve  	 5.43	 -0.99	 -4.76	 -2.42	  5.39	 -0.15	  0.64	 0.08
+674   	DM-46 11540 	M4    	 4.63	 -0.48	 -3.13	 -3.38	  4.40	 -1.34	 -0.55	 0.00
+682   	DM-44 11909 	M5    	 4.69	 -0.39	 -3.34	 -3.28	  4.52	 -1.13	 -0.54	 0.00
+687   	DM+68 946   	M3V   	 4.69	 -0.18	 -1.72	  4.36	 -0.60	  3.94	  2.49	 0.00
+693   	L 205-128   	 M    	 5.88	 -0.24	 -3.17	 -4.95	  5.18	 -2.38	 -1.47	 0.00
+699   	BARNARD'S ST	M5V   	 1.81	 -0.04	 -1.81	  0.14	  1.51	  0.90	  0.44	 0.00
+702A  	DM+02 3482  	K0Ve  	 5.13	  0.07	 -5.12	  0.22	  4.36	  2.51	  1.01	 0.49
+702B  	    	K5Ve  	 5.13	  0.07	 -5.12	  0.22	  4.36	  2.51	  1.01	 0.10
+725A  	DM+59 1915  	M4d   	 3.55	  0.33	 -1.77	  3.06	  0.04	  3.23	  1.45	 0.00
+725B  	    	M5d   	 3.55	  0.33	 -1.77	  3.06	  0.04	  3.23	  1.45	 0.00
+729   	AC-24 2833-1	M4de  	 2.90	  0.54	 -2.60	 -1.17	  2.80	  0.56	 -0.52	 0.00
+752A  	DM+04 4048  	M3Ve  	 5.78	  1.84	 -5.46	  0.51	  4.39	  3.75	 -0.33	 0.01
+752B  	VB 10       	M5de  	 5.78	  1.84	 -5.46	  0.51	  4.39	  3.74	 -0.33	 0.00
+754   	L 347-14    	M7    	 5.71	  1.32	 -3.77	 -4.08	  5.18	 -0.69	 -2.31	 0.00
+764   	SIG DRA     	K0V   	 5.68	  0.78	 -1.82	  5.32	 -1.04	  5.17	  2.12	 0.39
+768   	ALF AQL     	A7IV  	 5.05	  2.27	 -4.44	  0.77	  3.36	  3.69	 -0.78	 11.59
+780   	DEL PAV     	G8V   	 5.71	  1.18	 -1.97	 -5.23	  4.17	 -2.43	 -3.06	 1.14
+783A  	DM-36 13940 	K3V   	 5.65	  2.41	 -3.87	 -3.34	  4.83	  0.44	 -2.90	 0.22
+783B  	    	M5d   	 5.65	  2.41	 -3.87	 -3.34	  4.83	  0.44	 -2.90	 0.00
+784   	DM-45 13677 	M0V   	 6.10	  2.31	 -3.61	 -4.34	  5.09	 -0.46	 -3.32	 0.02
+820A  	61 CYG      	K5Ve  	 3.38	  1.91	 -1.83	  2.10	  0.45	  3.33	 -0.34	 0.08
+820B  	    	K7Ve  	 3.38	  1.91	 -1.83	  2.10	  0.45	  3.33	 -0.34	 0.04
+825   	DM-39 14192 	M0Ve  	 3.85	  2.24	 -1.98	 -2.42	  2.75	  0.19	 -2.69	 0.03
+829   	AC+17 534-10	M4de  	 6.54	  4.90	 -3.86	  1.96	  2.09	  5.61	 -2.62	 0.00
+832   	DM-49 13515 	M1V   	 4.67	  2.42	 -1.86	 -3.54	  3.17	 -0.60	 -3.38	 0.01
+845   	EPS IND     	K5Ve  	 3.44	  1.62	 -0.94	 -2.88	  2.10	 -0.92	 -2.55	 0.14
+860A  	DM+56 2783  	M3d   	 3.95	  1.95	 -0.85	  3.33	 -1.00	  3.82	 -0.00	 0.00
+860B  	DO CEP      	M4de  	 3.95	  1.95	 -0.85	  3.33	 -1.00	  3.82	 -0.00	 0.00
+866   	L 789-6     	M7de  	 3.28	  2.95	 -1.13	 -0.88	  1.22	  1.31	 -2.75	 0.00
+873   	DM+43 4305  	M4de  	 5.13	  3.49	 -1.19	  3.57	 -0.92	  4.91	 -1.16	 0.00
+876   	DM-15 6290  	M5d   	 4.78	  4.42	 -1.38	 -1.20	  1.49	  1.91	 -4.13	 0.00
+880   	DM+15 4733  	M2de  	 6.85	  6.30	 -1.86	  1.92	  0.27	  5.38	 -4.24	 0.01
+881   	ALF PSA     	A3V   	 6.71	  5.59	 -1.63	 -3.34	  2.66	  1.00	 -6.08	 14.06
+887   	DM-36 15693 	M2Ve  	 3.58	  2.80	 -0.72	 -2.11	  1.46	  0.13	 -3.27	 0.01
+892   	DM+56 2966  	K3V   	 6.80	  3.63	 -0.79	  5.70	 -2.31	  6.39	 -0.38	 0.25
+896A  	DM+19 5116  	M4de  	 6.45	  6.02	 -0.81	  2.17	 -0.75	  4.95	 -4.07	 0.00
+896B  	    	M6de  	 6.45	  6.02	 -0.81	  2.17	 -0.75	  4.95	 -4.07	 0.00
+905   	ROSS 248    	M6de  	 3.14	  2.26	 -0.20	  2.18	 -1.03	  2.83	 -0.92	 0.00
+908   	DM+01 4774  	M2Ve  	 5.71	  5.70	 -0.33	  0.21	 -0.19	  3.12	 -4.78	 0.01
diff -urNP gnuplot/demo/starmap.dem gnuplot-cvs/demo/starmap.dem
--- gnuplot/demo/starmap.dem	1969-12-31 16:00:00.000000000 -0800
+++ gnuplot-cvs/demo/starmap.dem	2004-04-16 17:37:12.000000000 -0700
@@ -0,0 +1,21 @@
+reset
+set pm3d
+set datafile separator '\t'
+set border 0
+unset xtics
+unset ytics
+unset ztics
+set cbrange [0:100]
+set view 42,100, 1.3
+set colorbox horiz user origin .1,.1 size .8,.04
+#
+# set palette color rgbformula -33,-13,-10
+#
+set title "Gliese star catalog - 7 parsec neighborhood centered on Earth"
+set cblabel "Luminosity" 0,1
+#
+splot 'nearmap.csv' using 5:6:7:11 with points pt 6 ps 3 pal notitle, \
+      ''            using 5:6:7:11 with points pt 7 ps 2 pal notitle, \
+      '' using 5:6:7:2 with labels font "arial,9" left point pt 0 offset 4,0 notitle
+#
+pause -1
diff -urNP gnuplot/demo/table.dat gnuplot-cvs/demo/table.dat
--- gnuplot/demo/table.dat	1969-12-31 16:00:00.000000000 -0800
+++ gnuplot-cvs/demo/table.dat	2004-04-16 17:37:12.000000000 -0700
@@ -0,0 +1,15 @@
+Month	ppt(1992-2000)	ppt(2000-2001)	runoff(1992-2000) runoff(2000-2001)
+#####	###########	###########	############	############
+mai 	61		42.2	 	15.8	 	5.7
+jun 	57.7            69.2     	10.4     	1.2
+jul 	61.7            68.4     	3.2      	5.7
+aug 	74.9            68.4     	3        	1.6
+sep 	103.1           26.1     	6.6      	1.1
+okt 	66.1            144.7    	21.3     	93.6
+nov 	47.3            166.5    	17.7     	145.9
+des 	48.8            52.9     	17.3     	51.6
+jan 	55.7            43.4     	8.3      	0.9
+feb 	36.1            22.9     	1.8      	0
+mar 	39.1            37.5     	10.8     	5.4
+apr 	41              42.1     	56.1     	61.7
+
diff -urNP gnuplot/docs/gnuplot.doc gnuplot-cvs/docs/gnuplot.doc
--- gnuplot/docs/gnuplot.doc	2004-04-16 09:48:04.000000000 -0700
+++ gnuplot-cvs/docs/gnuplot.doc	2004-04-16 17:37:12.000000000 -0700
@@ -564,6 +564,42 @@
  be given as a quoted time string according to the `timefmt` format string.
  See `set xdata` and `set timefmt`.  `gnuplot` will also accept an integer
  expression, which will be interpreted as seconds from 1 January 2000.
+2 Datastrings
+?datastrings
+ The configuration option --enable-datastrings (currently EXPERIMENTAL) allows
+ gnuplot to read and process text fields in datafiles. A text field consists 
+ of either an arbitrary string of printable characters containing no whitespace
+ or an arbitrary string of characters, possibly including whitespace, delimited
+ by double quotes. The following sample line from a datafile is interpreted to
+ contain four columns, with a text field in column 3:
+
+   1.000 2.000 "Third column is all of this text" 4.00
+ 
+ Text fields can be positioned within a 2-D or 3-D plot using the commands:
+   
+   plot 'datafile' using 1:2:4 with labels
+   splot 'datafile using 1:2:3:4 with labels
+
+ A column of text data can also be used to label the ticmarks along one or more
+ of the plot axes. The example below plots a line through a series of points
+ with (X,Y) coordinates taken from columns 3 and 4 of the input datafile.
+ However, rather than generating regularly spaced tics along the x axis
+ labeled numerically, gnuplot will position a tic mark along the x axis at the
+ X coordinate of each point and label the tic mark with text taken from column
+ 1 of the input datafile.
+
+   set xtics
+   plot 'datafile' using 3:4:xticlabels(1) with linespoints
+
+ There is also an option that will interpret the first entry in a column of
+ input data as a text field, and use it as the key title for data plotted from
+ that column. The example given below will use the first entry in column 2 to
+ generate a title in the key box, while processing the remainder of columns 
+ 2 and 4 to draw the required line:
+
+   plot 'datafile' using 1:(f($2)/$4) title 2 with lines
+
+ See `set style labels`, `using xticlabels`, `plot title`, `using`.
 2 Environment
 ?environment
  A number of shell environment variables are understood by `gnuplot`.  None of
@@ -2963,6 +2999,40 @@
 ^ <a href="http://www.gnuplot.info/demo/using.html">
  Feeble using demos.
 ^ </a>
+
+ If gnuplot is built with configuration option --enable-datastrings, then
+ additional modifiers to `using` can specify handling of text fields in the 
+ datafile. See `datastrings`, `using xticlabels`, `using title`.
+5 xticlabels
+?using xticlabels
+?plot using xticlabels
+ If gnuplot is built with configuration option --enable-datastrings, then
+ a column of the input data file can be used to label axis tic marks in a 2-D
+ plot command. The format of such a plot command is
+
+   plot 'datafile' using <xcol>:<ycol>:xticlabels(<labelcol>) with <plotstyle>
+
+ The `xticlabels(<val>)` option must be the final entry of the `using` column 
+ specifications. For each point which has a valid pair of X,Y coordinates,
+ the text field found in column <labelcol> is added to the list of xtic labels
+ at the same X coordinate as the point it belongs to. `xticlabels(<labelcol>)`
+ may be shortened to `xtic(<labelcol>)`.
+5 x2ticlabels
+?using x2ticlabels
+?plot using x2ticlabels
+ See plot using xticlabels.
+5 yticlabels
+?using yticlabels
+?plot using yticlabels
+ See plot using xticlabels.
+5 y2ticlabels
+?using y2ticlabels
+?plot using y2ticlabels
+ See plot using xticlabels.
+5 zticlabels
+?using zticlabels
+?plot using zticlabels
+ See plot using xticlabels.
 3 errorbars
 ?commands plot errorbars
 ?commands splot errorbars
@@ -3228,7 +3298,7 @@
                     }
 
  where <style> is either `lines`, `points`, `linespoints`, `impulses`,
- `dots`, `steps`, `fsteps`, `histeps`, `errorbars`, `xerrorbars`,
+ `dots`, `steps`, `fsteps`, `histeps`, `errorbars`, `labels`, `xerrorbars`,
  `yerrorbars`, `xyerrorbars`, `errorlines`, `xerrorlines`, `yerrorlines`,
  `xyerrorlines`, `boxes`, `filledcurves`, `boxerrorbars`,
  `boxxyerrorbars`, `financebars`, `candlesticks`, `vectors` or `pm3d`. Some
@@ -5126,7 +5196,7 @@
                {samplen <sample_length>} {spacing <vertical_spacing>}
                {width <width_increment>}
                {height <height_increment>}
-               {{no}autotitles}
+               {{no}autotitle {columnheader}}
                {title "<text>"} {{no}enhanced}
                {{no}box { {linestyle | ls <line_style>}
                           | {linetype | lt <line_type>}
@@ -5175,6 +5245,14 @@
  suppressed by `noautotitles`; then only those titles explicitly defined
  by `(s)plot ... title ...` will be drawn.
 
+ The `set key autotitle columnheader` option is available if gnuplot was built
+ with --enable-datastrings. This command causes the first entry in each column
+ of plotted data to be interpreted as a text string and used as a title for
+ the corresponding plot. If the quantity being plotted is a function of data
+ from several columns, gnuplot may be confused as to which column to draw the
+ title from. In this case it is necessary to specify the column explicitly in
+ the plot command, e.g. `plot "datafile" using (($2+$3)/$4) title 3 with lines`.
+
  A title can be put on the key (`title "<text>"`)---see also `syntax` for the
  distinction between text in single- or double-quotes.  The key title uses the
  same justification as do the plot titles.
@@ -6948,6 +7026,10 @@
  of the `steps` styles can be used with `splot`s. If an inappropriate style
  is specified, it will be changed to `points`.
 
+ The above caveat does not apply to `plot with labels`, for which the third
+ column specifies a data source rather than coordinate information.
+ See `set style labels`.
+
  For 2-d data with more than two columns, `gnuplot` is picky about the
  allowed `errorbars` and `errorlines` styles. The `using` option on the
  `plot` command can be used to set up the correct columns for the style
@@ -7221,6 +7303,29 @@
 ?impulses
  The `impulses` style displays a vertical line from the x axis (not the graph
  border), or from the grid base for `splot`, to each point.
+5 labels
+?commands set style labels
+?set style labels
+?plotting styles labels
+?style labels
+?labels
+ The `labels` style is available only if gnuplot is built with configuration 
+ option --enable-datastrings. For a 2-D plot with labels you must specify
+ 3 input data columns; the text string found in the third column is printed at
+ the X and Y coordinates generated by the first two column specifiers. The 
+ font, color, rotation angle and other properties of the printed text may be
+ specified as additional command options (see `set label`). The example below
+ will generate a 2-D plot with text labels taken from column 4 of the input
+ file (`tc lt 2` is shorthand for `textcolor linetype 2`, which is green).
+
+   plot 'datafile' using 1:(0.5 * $2):4 with labels font "arial,11" tc lt 2
+
+ The `labels` style can also be used in 3-D plots. In this case four input
+ column specifiers are required, corresponding to X Y Z and text.
+
+   splot 'datafile' using 1:2:3:4 with labels
+
+ See also `datastrings`, `set style data`.
 5 lines
 ?commands set style lines
 ?set style lines
diff -urNP gnuplot/src/axis.c gnuplot-cvs/src/axis.c
--- gnuplot/src/axis.c	2004-04-13 23:08:26.000000000 -0700
+++ gnuplot-cvs/src/axis.c	2004-04-16 17:37:12.000000000 -0700
@@ -45,6 +45,9 @@
 /*  #include "setshow.h" */
 #include "term_api.h"
 #include "variable.h"
+#ifdef EAM_DATASTRINGS
+#include "alloc.h"
+#endif
 
 /* HBB 20000416: this is the start of my try to centralize everything
  * related to axes, once and for all. It'll probably end up as a
@@ -1614,3 +1617,66 @@
 	pos->scalez = type;	/* same as y */
     }
 }
+
+/*
+ * Add a single tic mark, with label, to the list for this axis.
+ * To avoid duplications and overprints, sort the list and allow
+ * only one label per position.
+ * EAM - called from set.c during `set xtics`
+ *       called from datafile.c during `plot using ::xtic()`
+ */
+void
+add_tic_user(axis,label,position,level)
+    AXIS_INDEX axis;
+    char *label;
+    double position;
+    int level;
+{
+    struct ticmark *tic, *newtic;
+    struct ticmark listhead;
+
+    /* Make sure this axis is marked as having user tics */
+    if (axis_array[axis].ticdef.type != TIC_USER) {
+	axis_array[axis].ticdef.type = TIC_USER;
+	axis_array[axis].ticdef.def.user = NULL;
+    }
+
+    /* Walk along list to sorted positional order */
+    listhead.next = axis_array[axis].ticdef.def.user;
+    listhead.position = -DBL_MAX;
+    for (tic = &listhead; 
+	 tic->next && (position > tic->next->position); 
+	 tic = tic->next) {
+    }
+
+    if ((tic->next == NULL) || (position < tic->next->position)) {
+	/* Make a new ticmark */
+	newtic = (struct ticmark *) gp_alloc(sizeof(struct ticmark), (char *) NULL);
+	newtic->position = position;
+	newtic->level = level;
+	/* Insert it in the list */
+	newtic->next = tic->next;
+	tic->next = newtic;
+    } else {
+	/* The new tic must duplicate position of tic->next */
+	if (position != tic->next->position) 
+	    fprintf(stderr,"add_tic_user: list sort error\n");
+	newtic = tic->next;
+	/* Don't over-write a major tic with a minor tic */
+	if (newtic->level < level)
+	    return;
+	if (newtic->label) {
+	    free(newtic->label);
+	    newtic->label = NULL;
+	}
+    }
+
+    if (label)
+	newtic->label = gp_strdup(label);
+    else
+	newtic->label = NULL;
+
+    /* Make sure the listhead is kept */
+    axis_array[axis].ticdef.def.user = listhead.next;
+}
+
diff -urNP gnuplot/src/axis.h gnuplot-cvs/src/axis.h
--- gnuplot/src/axis.h	2004-04-13 23:08:26.000000000 -0700
+++ gnuplot-cvs/src/axis.h	2004-04-16 17:37:12.000000000 -0700
@@ -639,6 +639,7 @@
 void axis_set_graphical_range __PROTO((AXIS_INDEX, unsigned int lower, unsigned int upper));
 void axis_draw_2d_zeroaxis __PROTO((AXIS_INDEX, AXIS_INDEX));
 TBOOLEAN some_grid_selected __PROTO((void));
+void add_tic_user __PROTO((AXIS_INDEX, char *, double, int));
 
 double get_writeback_min __PROTO((AXIS_INDEX));
 double get_writeback_max __PROTO((AXIS_INDEX));
diff -urNP gnuplot/src/datafile.c gnuplot-cvs/src/datafile.c
--- gnuplot/src/datafile.c	2004-04-13 23:08:26.000000000 -0700
+++ gnuplot-cvs/src/datafile.c	2004-04-16 17:37:12.000000000 -0700
@@ -74,6 +74,7 @@
  *
  * public variables declared in this file.
  *    int df_no_use_specs - number of columns specified with 'using'
+ *    int df_no_tic_specs - count of additional ticlabel columns
  *    int df_line_number  - for error reporting
  *    int df_datum        - increases with each data point
  *    TBOOLEAN df_binary  - it's a binary file
@@ -153,9 +154,6 @@
 #include "plot.h"
 #include "util.h"
 
-/* if you change this, change the scanf in readline */
-#define NCOL   7		/* max using specs     */
-
 /* test to see if the end of an inline datafile is reached */
 #define is_EOF(c) ((c) == 'e' || (c) == 'E')
 
@@ -176,23 +174,39 @@
 static void plot_option_thru __PROTO((void));
 static void plot_option_using __PROTO((int));
 static TBOOLEAN valid_format __PROTO((const char *));
+#ifdef EAM_DATASTRINGS
+static void plot_ticlabel_using __PROTO((int));
+static void df_parse_string_field __PROTO((char *, char *));
+#endif
 
 /*}}} */
 
 /*{{{  variables */
 struct use_spec_s {
     int column;
+#ifdef EAM_DATASTRINGS
+    int expected_type;
+#endif
     struct at_type *at;
 };
 
+#ifdef EAM_DATASTRINGS
+enum COLUMN_TYPE { CT_DEFAULT, CT_STRING, 
+		CT_XTICLABEL, CT_X2TICLABEL, CT_YTICLABEL, CT_Y2TICLABEL,
+		CT_ZTICLABEL, CT_CBTICLABEL };
+#endif
+
 /* public variables client might access */
 
 int df_no_use_specs;		/* how many using columns were specified */
+#ifdef EAM_DATASTRINGS
+int df_no_tic_specs;		/* except ticlabel columns are counted here */
+#endif
 int df_line_number;
 int df_datum;			/* suggested x value if none given */
 TBOOLEAN df_matrix = FALSE;	/* is this a matrix splot */
 int df_eof = 0;
-AXIS_INDEX df_axis[NCOL];
+AXIS_INDEX df_axis[MAXDATACOLS];
 TBOOLEAN df_binary = FALSE;	/* this is a binary file */
 
 /* jev -- the 'thru' function --- NULL means no dummy vars active */
@@ -253,7 +267,7 @@
 static int line_count = 0;	/* line counter */
 
 /* parsing stuff */
-static struct use_spec_s use_spec[NCOL];
+static struct use_spec_s use_spec[MAXDATACOLS];
 static char df_format[MAX_LINE_LEN + 1];
 
 /* rather than three arrays which all grow dynamically, make one
@@ -268,11 +282,18 @@
     char *position;
 } df_column_struct;
 
-static df_column_struct *df_column = NULL;	/* we'll allocate space as needed */
+       df_column_struct *df_column = NULL;	/* we'll allocate space as needed */
 static int df_max_cols = 0;	/* space allocated */
 static int df_no_cols;		/* cols read */
 static int fast_columns;	/* corey@cac optimization */
 
+#ifdef EAM_DATASTRINGS
+char *df_tokens[MAXDATACOLS];		/* filled in by df_tokenise */
+#define NO_COLUMN_HEADER (-99)	/* some value that can never be a real column */
+static int column_for_key_title = NO_COLUMN_HEADER;
+static char df_key_title[64];	/* filled in from <col> in 1st row by df_tokenise */
+#endif
+
 /* columns needing timefmt are passed in df_timecol[] after df_open */
 
 /*}}} */
@@ -331,8 +352,14 @@
     /* implement our own sscanf that takes 'missing' into account,
      * and can understand fortran quad format
      */
-
     TBOOLEAN in_string;
+#ifdef EAM_DATASTRINGS
+    int i;
+
+	for (i=0; i<MAXDATACOLS; i++)
+		df_tokens[i] = NULL;
+#endif
+
 
 #define NOTSEP (*s != df_separator)
 
@@ -349,6 +376,24 @@
 	df_column[df_no_cols].position = s;
 	in_string = FALSE;
 
+#ifdef EAM_DATASTRINGS
+	/* Keep pointer to start of this token if user wanted it for anything */
+	for (i=0; i<MAXDATACOLS; i++) {
+	    if (df_no_cols == use_spec[i].column-1) {
+		df_tokens[i] = s;
+		if (use_spec[i].expected_type == CT_STRING)
+		    df_column[df_no_cols].good = DF_GOOD;
+	    }
+	}
+	/* Particularly if it is supposed to be a key title */
+	if (df_no_cols == column_for_key_title-1)
+	    strncpy(df_key_title,s,sizeof(df_key_title)-1);
+	/* Trap string-value columns before trying to interpret them as numeric */
+	/* FIXME EAM - At this point we've marked the column DF_GOOD if anyone  */
+	/* wanted it as a string, but it will get marked DF_BAD below if it     */
+	/* doesn't also parse as a number. Is this a problem???                 */
+#endif
+
 	/* CSV files must accept numbers inside quotes also, so */
 	/* we step past the quote and any following whitespace. */
 	if (*s == '"' && df_separator != '\0') {
@@ -356,6 +401,7 @@
 	    do ++s; while (isspace((unsigned char) *s));
 	    df_column[df_no_cols].position = s;
 	}
+
 	/* EAM - 19-Aug-2002 treat contents of a quoted string as single column */
 	if (*s == '"') {
 	    in_string = !in_string;
@@ -586,16 +632,19 @@
     df_format[0] = NUL;		/* no format string */
 
     df_no_use_specs = 0;
+#ifdef EAM_DATASTRINGS
+    df_no_tic_specs = 0;
+#endif
 
-    for (i = 0; i < NCOL; ++i) {
+    for (i = 0; i < MAXDATACOLS; ++i) {
 	use_spec[i].column = i + 1; /* default column */
+#ifdef EAM_DATASTRINGS
+	use_spec[i].expected_type = CT_DEFAULT; /* no particular expectation */
+#endif
 	use_spec[i].at = NULL;	/* no expression */
 	df_axis[i] = -1;	/* no timefmt for this output column */
     }
 
-    if (max_using > NCOL)
-	max_using = NCOL;
-
     df_datum = -1;		/* it will be preincremented before use */
     df_line_number = 0;		/* ditto */
 
@@ -614,9 +663,13 @@
     df_eof = 0;
 
     df_binary = 1;
+
+#ifdef EAM_DATASTRINGS
+    column_for_key_title = NO_COLUMN_HEADER;
+#endif
     /*}}} */
 
-    assert(max_using <= NCOL);
+    assert(max_using <= MAXDATACOLS);
 
     if (END_OF_COMMAND)
 	int_error(c_token,"missing filename");
@@ -693,6 +746,26 @@
 	    continue;
     }
 
+#ifdef EAM_DATASTRINGS
+	/* Take key title from column head? */
+    if (almost_equals(c_token, "t$itle")) {
+	c_token++;
+	if (almost_equals(c_token, "col$umn")) {
+	    if (df_no_use_specs == 1)
+		column_for_key_title = use_spec[0].column;
+	    else
+		column_for_key_title = use_spec[1].column;
+	    c_token++;
+	} else
+	if (!END_OF_COMMAND && isanumber(c_token)) {
+	    struct value a;
+	    column_for_key_title = (int)real(const_express(&a));
+	} else
+	    c_token--;
+	break;
+    }
+#endif
+
 	break; /* unknown option */
 
     } /* while (!END_OF_COMMAND) */
@@ -700,6 +773,19 @@
     if (duplication)
 	int_error(c_token, "duplicated or contradicting arguments in datafile options");
 
+#ifdef EAM_DATASTRINGS
+    /* Check for auto-generation of key title from column header  */
+    if (column_for_key_title == NO_COLUMN_HEADER) {
+	legend_key *key = &keyT;
+	if (key->auto_titles == COLUMNHEAD_KEYTITLES) {
+	    if (df_no_use_specs == 1)
+		column_for_key_title = use_spec[0].column;
+	    else
+		column_for_key_title = use_spec[1].column;
+	}
+    }
+#endif
+    
     /*{{{  more variable inits */
     point_count = -1;		/* we preincrement */
     line_count = 0;
@@ -768,7 +854,7 @@
 	ydata_func.at = NULL;
     }
     /*{{{  free any use expression storage */
-    for (i = 0; i < df_no_use_specs; ++i)
+    for (i = 0; i < MAXDATACOLS; ++i)
 	if (use_spec[i].at) {
 	    free(use_spec[i].at);
 	    use_spec[i].at = NULL;
@@ -915,11 +1001,29 @@
 		/* empty specification - use default */
 		use_spec[df_no_use_specs].column = df_no_use_specs;
 		++df_no_use_specs;
-		/* do not increment c+token ; let while() find the : */
+		/* do not increment c_token ; let while() find the : */
 	    } else if (equals(c_token, "(")) {
 		fast_columns = 0;	/* corey@cac */
 		dummy_func = NULL;	/* no dummy variables active */
 		use_spec[df_no_use_specs++].at = perm_at();	/* it will match ()'s */
+#ifdef EAM_DATASTRINGS
+	    /* FIXME EAM - It would be nice to handle these like any other */
+	    /* internal function via perm_at() but there are problems.     */
+	    } else if (almost_equals(c_token, "xtic$labels")) {
+		plot_ticlabel_using(CT_XTICLABEL);
+	    } else if (almost_equals(c_token, "x2tic$labels")) {
+		plot_ticlabel_using(CT_X2TICLABEL);
+	    } else if (almost_equals(c_token, "ytic$labels")) {
+		plot_ticlabel_using(CT_YTICLABEL);
+	    } else if (almost_equals(c_token, "y2tic$labels")) {
+		plot_ticlabel_using(CT_Y2TICLABEL);
+	    } else if (almost_equals(c_token, "ztic$labels")) {
+		plot_ticlabel_using(CT_ZTICLABEL);
+#ifdef PM3D
+	    } else if (almost_equals(c_token, "cbtic$labels")) {
+		plot_ticlabel_using(CT_CBTICLABEL);
+#endif
+#endif
 	    } else {
 		int col = (int) real(const_express(&a));
 		if (col < -2)
@@ -940,6 +1044,23 @@
     }
 }
 
+#ifdef EAM_DATASTRINGS
+static
+void plot_ticlabel_using( axis )
+int axis;
+{
+    struct value a;
+    int col;
+    c_token += 2;
+    col = (int) real(const_express(&a));
+    if (col < 1)
+        int_error(c_token, "ticlabels must come from a real column");
+    c_token++;
+    use_spec[df_no_use_specs+df_no_tic_specs].expected_type = axis;
+    use_spec[df_no_use_specs+df_no_tic_specs].column = col;
+    df_no_tic_specs++;
+}
+#endif
 
 /*{{{  int df_readline(v, max) */
 /* do the hard work... read lines from file,
@@ -958,7 +1079,7 @@
     assert(data_fp != NULL);
     assert(!df_binary);
     assert(max_line_len);	/* alloc-ed in df_open() */
-    assert(max <= NCOL);
+    assert(max <= MAXDATACOLS);
 
     /* catch attempt to read past EOF on mixed-input */
     if (df_eof)
@@ -1081,7 +1202,7 @@
 	if (*df_format) {
 	    int i;
 
-	    assert(NCOL == 7);
+	    assert(MAXDATACOLS == 7);
 
 	    /* check we have room for at least 7 columns */
 	    if (df_max_cols < 7) {
@@ -1112,16 +1233,71 @@
 	else
 	    df_tokenise(s);
 
+#ifdef EAM_DATASTRINGS
+	/*
+	 * If we are supposed to read plot or key titles from the first line
+	 * of the data then do that and nothing else.
+	 */
+	    if (column_for_key_title != NO_COLUMN_HEADER) {
+		df_datum--;
+		if (!(*df_key_title)) {
+		    FPRINTF((stderr,"df_readline: missing column head for key title\n"));
+		    return(DF_KEY_TITLE_MISSING);
+		}
+		df_parse_string_field(df_key_title,df_key_title);
+		FPRINTF((stderr,"df_readline: Found key title in col %d %s\n",
+			column_for_key_title, df_key_title));
+		column_for_key_title = NO_COLUMN_HEADER;
+		return(DF_FOUND_KEY_TITLE);
+	    }
+#endif
+
 	/*{{{  copy column[] to v[] via use[] */
 	{
-	    int limit = (df_no_use_specs ? df_no_use_specs : NCOL);
+#ifdef EAM_DATASTRINGS
+	    int limit = (df_no_use_specs ? df_no_use_specs + df_no_tic_specs : MAXDATACOLS);
+ 	    if (limit > max + df_no_tic_specs)
+ 		limit = max + df_no_tic_specs;
+#else
+	    int limit = (df_no_use_specs ? df_no_use_specs : MAXDATACOLS);
 	    if (limit > max)
 		limit = max;
+#endif
 
 	    for (output = 0; output < limit; ++output) {
 		/* if there was no using spec, column is output+1 and at=NULL */
 		int column = use_spec[output].column;
 
+#ifdef EAM_DATASTRINGS
+		/* Handle cases where column holds a meta-data string */
+		/* Axis labels, plot titles, etc.                     */
+		if (use_spec[output].expected_type >= CT_XTICLABEL) {
+		    char temp_string[64];
+		    int axis, axcol;
+		    float xpos;
+		    switch (use_spec[output].expected_type) {
+			default:
+			case CT_XTICLABEL:	axis = FIRST_X_AXIS;  axcol = 0; break;
+			case CT_X2TICLABEL:	axis = SECOND_X_AXIS; axcol = 0; break;
+			case CT_YTICLABEL:	axis = FIRST_Y_AXIS;  axcol = 1; break;
+			case CT_Y2TICLABEL:	axis = SECOND_Y_AXIS; axcol = 1; break;
+			case CT_ZTICLABEL:	axis = FIRST_Z_AXIS;  axcol = 2; break;
+#ifdef PM3D
+			/* EAM FIXME - I have no idea which column to set for cbtic */
+			case CT_CBTICLABEL:	axis = COLOR_AXIS; break;
+#endif
+		    }
+		    /* FIXME EAM - Trap special case of only a single 'using' column. */
+		    /* But really we need to handle general case of implicit column 0 */
+		    if (output == 1)
+			xpos = (axcol == 0) ? df_datum : v[axcol-1];
+		    else
+			xpos = v[axcol];
+
+		    df_parse_string_field(temp_string,df_tokens[output]);
+		    add_tic_user(axis,temp_string,xpos,0);
+		} else
+#endif
 		if (use_spec[output].at) {
 		    struct value a;
 		    /* no dummy values to set up prior to... */
@@ -1155,6 +1331,10 @@
 			break;
 		    }
 		    v[output] = (double) gtimegm(&tm);
+#ifdef EAM_DATASTRINGS
+		} else if (use_spec[output].expected_type == CT_STRING) {
+		    /* Do nothing. String tokens were loaded into df_tokens already */
+#endif
 		} else {	/* column > 0 */
 		    if ((column <= df_no_cols) && df_column[column - 1].good == DF_GOOD)
 			v[output] = df_column[column - 1].datum;
@@ -1183,6 +1363,12 @@
 	/* output == df_no_use_specs if using was specified
 	 * - actually, smaller of df_no_use_specs and max
 	 */
+#ifdef EAM_DATASTRINGS
+	/* FIXME EAM - In theory it might be useful for the caller to know    */
+	/* whether or not tic specs were read from this line, but all callers */
+	/* would have to be modified to deal with it one way or the other.    */
+	output -= df_no_tic_specs;
+#endif
 	assert(df_no_use_specs == 0 || output == df_no_use_specs || output == max);
 
 	return output;
@@ -1500,7 +1686,7 @@
     struct value a;
     int column, output;
     struct tm tm;
-    int limit = (df_no_use_specs ? df_no_use_specs : NCOL);
+    int limit = (df_no_use_specs ? df_no_use_specs : MAXDATACOLS);
 
     (void) arg;			/* avoid -Wunused warning */
     (void) pop(&a);
@@ -1564,7 +1750,7 @@
 {
     int i;
 
-    for (i = specno + 1; i < NCOL; ++i)
+    for (i = specno + 1; i < MAXDATACOLS; ++i)
 	use_spec[i].column += jump;	/* add no of columns in time to the rest */
     df_no_use_specs = 0;
 }
@@ -1617,3 +1803,62 @@
 	}
     }
 }
+
+#ifdef EAM_DATASTRINGS
+/* 
+ * Plotting routines can call this prior to invoking df_readline() to indicate
+ * that they expect a certain column to contain an ascii string rather than a
+ * number.
+ */
+int
+expect_string( column )
+const char column;
+{
+    if (!use_spec) 
+    	int_error(NO_CARET,"use_spec not yet initialized");
+    use_spec[column-1].expected_type = CT_STRING;
+    FPRINTF((stderr,"expecting to find string in input column %d\n",use_spec[column-1].column));
+    return(use_spec[column-1].column);
+}
+
+/*
+ * Load plot title for key box from the string found earlier by df_readline.
+ * Called from get_data().
+ */
+void
+df_set_key_title( plot )
+struct curve_points *plot;
+{
+    /* What if there was already a title specified? */
+    if (plot->title && !plot->title_is_filename)
+	return;
+    if (plot->title)
+	free(plot->title);
+
+    plot->title = gp_strdup(df_key_title);
+}
+
+void
+df_parse_string_field( string, field )
+char *string;
+char *field;
+{
+    char temp_string[64];
+    temp_string[sizeof(temp_string)-1] = '\0';
+
+    if (*field == '"') {
+	strncpy(temp_string,&(field[1]),sizeof(temp_string)-1);
+	temp_string[strcspn(temp_string,"\"")] = '\0';
+    } else if (df_separator != '\0') {
+	char eor[2];
+	eor[0] = df_separator; eor[1] = '\0';
+	strncpy(temp_string,field,sizeof(temp_string)-1);
+	temp_string[strcspn(temp_string,eor)] = '\0';
+    } else {
+	strncpy(temp_string,field,sizeof(temp_string)-1);
+	temp_string[strcspn(temp_string," 	")] = '\0';
+    }
+    parse_esc(temp_string);
+    strcpy(string,temp_string);
+}
+#endif /* EAM_DATASTRINGS */
diff -urNP gnuplot/src/datafile.h gnuplot-cvs/src/datafile.h
--- gnuplot/src/datafile.h	2004-04-13 23:08:26.000000000 -0700
+++ gnuplot-cvs/src/datafile.h	2004-04-16 17:37:12.000000000 -0700
@@ -49,6 +49,10 @@
 #define DF_UNDEFINED    (-2)
 #define DF_FIRST_BLANK  (-3)
 #define DF_SECOND_BLANK (-4)
+#ifdef EAM_DATASTRINGS
+#define DF_FOUND_KEY_TITLE   (-5)
+#define DF_KEY_TITLE_MISSING (-6)
+#endif
 
 #ifndef MAXINT			/* should there be one already defined ? */
 # ifdef INT_MAX			/* in limits.h ? */
@@ -60,8 +64,9 @@
 
 /* Variables of datafile.c needed by other modules: */
 
-/* how many using columns were specified */
+/* how many using columns were specified, and max possible */
 extern int df_no_use_specs;
+#define MAXDATACOLS 7
 
 /* suggested x value if none given */
 extern int df_datum;
@@ -77,6 +82,11 @@
 extern AXIS_INDEX df_axis[];
 extern struct udft_entry ydata_func; /* HBB 990829: moved from command.h */
 
+#ifdef EAM_DATASTRINGS
+/* Returned to caller by df_readline() */
+extern char *df_tokens[];
+#endif
+
 /* string representing missing values, ascii datafiles */
 extern char *missing_val;
 
@@ -98,6 +108,10 @@
 void df_showdata __PROTO((void));
 int df_2dbinary __PROTO((struct curve_points *));
 int df_3dmatrix __PROTO((struct surface_points *, int));
+#ifdef EAM_DATASTRINGS
+void df_set_key_title __PROTO((struct curve_points *));
+int expect_string __PROTO((const char column ));
+#endif
 
 void f_dollars __PROTO((union argument *x));
 void f_column  __PROTO((union argument *x));
diff -urNP gnuplot/src/gadgets.c gnuplot-cvs/src/gadgets.c
--- gnuplot/src/gadgets.c	2004-04-13 23:08:27.000000000 -0700
+++ gnuplot-cvs/src/gadgets.c	2004-04-16 17:37:12.000000000 -0700
@@ -423,3 +423,27 @@
     arrow->head_backangle = 90.0;
     arrow->head_filled = 0;
 }
+
+#ifdef EAM_DATASTRINGS
+void
+free_labels(struct text_label *label)
+{
+struct text_label *temp;
+char *master_font = label->font;
+
+    /* Labels generated by 'plot with labels' all use the same font */
+    if (master_font)
+    	free(master_font);
+
+    while (label) {
+	if (label->text)
+	    free(label->text);
+	if (label->font && label->font != master_font)
+	    free(label->font);
+	temp=label->next;
+	free(label);
+	label = temp;
+    }
+
+}
+#endif
diff -urNP gnuplot/src/gadgets.h gnuplot-cvs/src/gadgets.h
--- gnuplot/src/gadgets.h	2004-04-13 23:08:27.000000000 -0700
+++ gnuplot-cvs/src/gadgets.h	2004-04-16 17:37:12.000000000 -0700
@@ -187,6 +187,9 @@
 /* EAM Feb 2003 - Move all global variables related to key into a */
 /* single structure. Eventually this will allow multiple keys.    */
 
+typedef enum keytitle_type {
+    NOAUTO_KEYTITLES, FILENAME_KEYTITLES, COLUMNHEAD_KEYTITLES
+} keytitle_type; 
 
 typedef struct { 
     TBOOLEAN visible;		/* Do we show this key at all? */
@@ -199,7 +202,7 @@
     double vert_factor;		/* user specified vertical spacing multiplier */
     double width_fix;		/* user specified additional (+/-) width of key titles */
     double height_fix;
-    TBOOLEAN auto_titles;	/* auto title curves unless plotted 'with notitle' */
+    keytitle_type auto_titles;	/* auto title curves unless plotted 'with notitle' */
     TBOOLEAN reverse;		/* key back to front */ 
     TBOOLEAN enhanced;		/* enable/disable enhanced text of key titles */ 
     struct lp_style_type default_keybox_lp; /* linetype of box around key:  */
@@ -223,7 +226,7 @@
 		DEFAULT_KEY_POSITION, \
 		TTOP, TRIGHT, JRIGHT,  \
 		4.0, 1.0, 0.0, 0.0, \
-		TRUE, FALSE, TRUE,  \
+		FILENAME_KEYTITLES, FALSE, TRUE,  \
 		DEFAULT_KEYBOX_LP, \
 		DEFAULT_KEYBOX_LP, \
 		"" }
@@ -326,4 +329,8 @@
 
 void default_arrow_style __PROTO((struct arrow_style_type *arrow));
 
+#ifdef EAM_DATASTRINGS
+void free_labels __PROTO((struct text_label *tl));
+#endif
+
 #endif /* GNUPLOT_GADGETS_H */
diff -urNP gnuplot/src/gp_types.h gnuplot-cvs/src/gp_types.h
--- gnuplot/src/gp_types.h	2004-04-13 23:08:27.000000000 -0700
+++ gnuplot-cvs/src/gp_types.h	2004-04-16 17:37:12.000000000 -0700
@@ -99,6 +99,9 @@
     , FILLEDCURVES = 21*PLOT_STYLE_BITS + PLOT_STYLE_HAS_LINE
     , PM3DSURFACE  = 22*PLOT_STYLE_BITS + 0
 #endif
+#ifdef EAM_DATASTRINGS
+    , LABELPOINTS  = 23*PLOT_STYLE_BITS + 0
+#endif
 } PLOT_STYLE;
 
 typedef enum PLOT_SMOOTH { 
diff -urNP gnuplot/src/graph3d.c gnuplot-cvs/src/graph3d.c
--- gnuplot/src/graph3d.c	2004-04-13 23:08:27.000000000 -0700
+++ gnuplot-cvs/src/graph3d.c	2004-04-16 17:37:12.000000000 -0700
@@ -1059,6 +1059,12 @@
 		break;
 #endif
 
+#ifdef EAM_DATASTRINGS
+	    case LABELPOINTS:
+		if (!(hidden3d && draw_surface))
+		    place_labels3d(this_plot->labels->next, 1);
+		break;
+#endif
 	    }			/* switch(plot-style) */
 
 		/* move key on a line */
@@ -1135,6 +1141,10 @@
 		    case PM3DSURFACE: /* ignored */
 			break;
 #endif
+#ifdef EAM_DATASTRINGS
+		    case LABELPOINTS: /* Already handled above */
+			break;
+#endif
 		    }
 		    NEXT_KEY_LINE();
 		}
@@ -1197,6 +1207,10 @@
 			    case PM3DSURFACE: /* ignored */
 				break;
 #endif
+#ifdef EAM_DATASTRINGS
+			    case LABELPOINTS: /* Already handled above */
+				break;
+#endif
 			    }	/* switch */
 
 			    NEXT_KEY_LINE();
@@ -1248,6 +1262,10 @@
 		    case PM3DSURFACE: /* ignored */
 			break;
 #endif
+#ifdef EAM_DATASTRINGS
+		    case LABELPOINTS: /* Already handled above */
+			break;
+#endif
 		    } /*switch */
 
 		    cntrs = cntrs->next;
diff -urNP gnuplot/src/graph3d.h gnuplot-cvs/src/graph3d.h
--- gnuplot/src/graph3d.h	2004-04-13 23:08:27.000000000 -0700
+++ gnuplot-cvs/src/graph3d.h	2004-04-16 17:37:12.000000000 -0700
@@ -96,7 +96,9 @@
     int num_iso_read;		
     struct gnuplot_contours *contours; /* NULL if not doing contours. */
     struct iso_curve *iso_crvs;	/* the actual data */
-
+#ifdef EAM_DATASTRINGS
+    struct text_label *labels;	/* Only used if plot_style == LABELPOINTS */
+#endif
 #ifdef PM3D
     TBOOLEAN pm3d_color_from_column;
     char pm3d_where[7];		/* explicitly given base, top, surface */
diff -urNP gnuplot/src/graphics.c gnuplot-cvs/src/graphics.c
--- gnuplot/src/graphics.c	2004-04-13 23:08:27.000000000 -0700
+++ gnuplot-cvs/src/graphics.c	2004-04-16 17:37:12.000000000 -0700
@@ -1521,6 +1521,12 @@
 	    fprintf(stderr, "** warning: can't use pm3d for 2d plots\n");
 	    break;
 #endif
+
+#ifdef EAM_DATASTRINGS
+	case LABELPOINTS:
+	    place_labels( this_plot->labels->next, 1);
+	    break;
+#endif
 	}
 
 
diff -urNP gnuplot/src/graphics.h gnuplot-cvs/src/graphics.h
--- gnuplot/src/graphics.h	2004-04-13 23:08:27.000000000 -0700
+++ gnuplot-cvs/src/graphics.h	2004-04-16 17:37:12.000000000 -0700
@@ -53,6 +53,7 @@
     enum PLOT_SMOOTH plot_smooth; /* which "smooth" method to be used? */
     char *title;		/* plot title, a.k.a. key entry */
     int title_no_enhanced;	/* don't typeset title in enhanced mode */
+    TBOOLEAN title_is_filename;	/* TRUE if title was auto-generated from filename */
     struct lp_style_type lp_properties;
     struct arrow_style_type arrow_properties;
     struct fill_style_type fill_properties;
@@ -67,6 +68,9 @@
     filledcurves_opts filledcurves_options;
 #endif
     struct coordinate GPHUGE *points;
+#ifdef EAM_DATASTRINGS
+    struct text_label *labels;	/* Only used if plot_style == LABELPOINTS */
+#endif
 } curve_points;
 
 /* From ESR's "Actual code patch" :) */
diff -urNP gnuplot/src/misc.c gnuplot-cvs/src/misc.c
--- gnuplot/src/misc.c	2004-04-13 23:08:28.000000000 -0700
+++ gnuplot-cvs/src/misc.c	2004-04-16 17:37:12.000000000 -0700
@@ -1065,3 +1065,66 @@
     }
 }
 
+
+/*
+ * EAM - July 2002
+ * Parse the sub-options of text color specification
+ *   { def$ault | lt <linetype> | pal$ette { cb <val> | frac$tion <val> | z }
+ * The ordering of alternatives shown in the line above is kept in the symbol definitions
+ * TC_DEFAULT TC_LT TC_CB TC_FRAC TC_Z  (0 1 2 3 4)
+ * and the "options" parameter to parse_colorspec limits legal input to the
+ * corresponding point in the series. So TC_LT allows only default or linetype
+ * coloring, while TC_Z allows all coloring options up to and including pal z
+ */
+void
+parse_colorspec( struct t_colorspec *tc, int options )
+{
+    struct value a;
+
+    c_token++;
+    if (END_OF_COMMAND)
+    	int_error(c_token, "expected colorspec");
+    if (almost_equals(c_token,"def$ault")) {
+	c_token++;
+	tc->type = TC_DEFAULT;
+    } else if (equals(c_token,"lt")) {
+    	c_token++;
+    	if (END_OF_COMMAND)
+    	    int_error(c_token, "expected linetype");
+	tc->type = TC_LT;
+    	tc->lt = (int)real(const_express(&a))-1;
+    } else if (options <= TC_LT) {
+        tc->type = TC_DEFAULT;
+	int_error(c_token, "only tc lt <n> possible here");
+    } else if (almost_equals(c_token,"pal$ette")) {
+    	c_token++;
+    	if (END_OF_COMMAND)
+    	    int_error(c_token, "expected colorspec");
+	if (equals(c_token,"cb")) {
+	    tc->type = TC_CB;
+    	    c_token++;
+    	    if (END_OF_COMMAND)
+    		int_error(c_token, "expected cb value");
+    	    tc->value = real(const_express(&a));
+	} else if (almost_equals(c_token,"frac$tion")) {
+	    tc->type = TC_FRAC;
+    	    c_token++;
+    	    if (END_OF_COMMAND)
+    		int_error(c_token, "expected palette fraction");
+    	    tc->value = real(const_express(&a));
+	    if (tc->value < 0. || tc->value > 1.0) 
+    		int_error(c_token, "palette fraction out of range");
+	} else if (equals(c_token,"z")) {
+	    /* The actual z value is not yet known, fill it in later */
+	    if (options >= TC_Z) {
+		tc->type = TC_Z;
+	    } else {
+		tc->type = TC_DEFAULT;
+		int_error(c_token, "palette z not possible here");
+	    }
+    	    c_token++;
+	}
+    } else {
+    	int_error(c_token, "textcolor colorspec not recognized");
+    }
+}
diff -urNP gnuplot/src/plot2d.c gnuplot-cvs/src/plot2d.c
--- gnuplot/src/plot2d.c	2004-04-13 23:08:28.000000000 -0700
+++ gnuplot-cvs/src/plot2d.c	2004-04-16 17:37:12.000000000 -0700
@@ -34,8 +34,8 @@
  * to the extent permitted by applicable law.
 ]*/
 
-#include "plot2d.h"
 #include "gp_types.h"
+#include "plot2d.h"
 
 #include "alloc.h"
 #include "axis.h"
@@ -48,6 +48,7 @@
 #include "interpol.h"
 #include "misc.h"
 #include "parse.h"
+#include "setshow.h"
 #include "tables.h"
 #include "term_api.h"
 #include "util.h"
@@ -108,6 +109,9 @@
 	cp->points = (struct coordinate GPHUGE *) NULL;
     cp->next = NULL;
     cp->title = NULL;
+#ifdef EAM_DATASTRINGS
+    cp->labels = NULL;	/* Will be allocated later if plot_style == LABELPOINTS */
+#endif
     return (cp);
 }
 
@@ -168,6 +172,12 @@
 	    free(cp->title);
 	if (cp->points)
 	    free(cp->points);
+#ifdef EAM_DATASTRINGS
+	if (cp->labels) {
+	    free_labels(cp->labels);
+	    cp->labels = (struct text_label *)NULL;
+	}
+#endif
 	free((char *) cp);
 	cp = next;
     }
@@ -230,10 +240,6 @@
     eval_plots();
 }
 
-/* Use up to 7 columns in data file at once -- originally it was 5 */
-#define NCOL 7
-
-
 /* A quick note about boxes style. For boxwidth auto, we cannot
  * calculate widths yet, since it may be sorted, etc. But if
  * width is set, we must do it now, before logs of xmin/xmax
@@ -250,7 +256,7 @@
 {
     int i /* num. points ! */ , j;
     int max_cols, min_cols;    /* allowed range of column numbers */
-    double v[NCOL];
+    double v[MAXDATACOLS];
     int storetoken = current_plot->token;
 
     /* eval_plots has already opened file */
@@ -304,6 +310,15 @@
 	/* current_plot->z_axis = current_plot->x_axis; */
 	break;
 
+#ifdef EAM_DATASTRINGS
+    case LABELPOINTS:
+	/* 3 column data: X Y Label */
+    	min_cols = 3;
+	max_cols = 3;
+	expect_string( 3 );
+	break;
+#endif
+
     default:
 	min_cols = 1;
 	max_cols = 2;
@@ -359,6 +374,14 @@
 	     */
 	    continue;
 
+#ifdef EAM_DATASTRINGS
+	case DF_FOUND_KEY_TITLE:
+	    df_set_key_title(current_plot);
+	    continue;
+	case DF_KEY_TITLE_MISSING:
+	    fprintf(stderr,"get_data: key title not found in requested column\n");
+	    continue;
+#endif
 	case 0:		/* not blank line, but df_readline couldn't parse it */
 	    {
 		df_close();
@@ -436,6 +459,21 @@
 				  v[1], v[1], 0.0);
 		    break;
 
+#ifdef EAM_DATASTRINGS
+		case LABELPOINTS:
+		    /* Load the coords just as we would have for a point plot */
+		    store2d_point(current_plot, i, v[0], v[1], v[0], v[0], v[1],
+			      v[1], -1.0);
+		    /* Allocate and fill in a text_label structure to match it */
+		    if (df_tokens[2])
+			store_label(current_plot->labels, 
+		    		  &(current_plot->points[i]), i, df_tokens[2]);
+		    else
+			current_plot->points[i].type = UNDEFINED;
+		    i++;
+		    break;
+#endif
+			      
 		}		/*inner switch */
 
 	    break;
@@ -648,7 +686,70 @@
 	cp->z = width;
 }				/* store2d_point */
 
+#ifdef EAM_DATASTRINGS
+/* store_label() is called by get_data for each point */
+/* This routine is exported so it can be shared by plot3d */
+void
+store_label(listhead, cp, i, string)
+    struct text_label *listhead;
+    struct coordinate *cp;
+    int i;			/* point number */
+    char *string;		/* start of label string */
+{
+    register struct text_label *tl = listhead;
+    int textlen;
 
+    /* Walk through list to get to the end. Yes I know this is inefficient */
+    /* but is anyone really going to plot so many labels that it matters?  */
+    if (!tl) int_error(NO_CARET,"text_label list was not initialized");
+    while (tl->next) tl = tl->next;
+
+    /* Allocate a new label structure and fill it in */
+    tl->next = gp_alloc(sizeof(struct text_label),"labelpoint label");
+    memcpy(tl->next,tl,sizeof(text_label));
+    tl = tl->next;
+    tl->next = (text_label *)NULL;
+    tl->tag = i;
+    tl->place.x = cp->x;
+    tl->place.y = cp->y;
+    tl->place.z = cp->z;
+
+    textlen = 0;
+    /* FIXME EAM - this code is ugly but seems to work */
+    /* We need to handle quoted separators and quoted quotes */
+    if (df_separator) {
+	TBOOLEAN in_quote = FALSE;
+	while (string[textlen]) {
+	    if (string[textlen] == '"')
+		in_quote = !in_quote;
+	    else if (string[textlen] == df_separator && !in_quote)
+		break;
+	    textlen++;
+	}
+	while (textlen > 0 && isspace(string[textlen-1]))
+	    textlen--;
+    } else {
+    /* This is the normal case (no special separator character) */
+	if (*string == '"') {
+	    for (textlen=1; string[textlen] && string[textlen] != '"'; textlen++);
+	}
+	while (string[textlen] && !isspace(string[textlen]))
+	    textlen++;
+    }
+
+    /* Strip double quote from both ends */
+    if (string[0] == '"' && string[textlen-1] == '"')
+	textlen -= 2, string++;
+
+    tl->text = gp_alloc(textlen+1,"labelpoint text");
+    strncpy( tl->text, string, textlen );
+    tl->text[textlen] = '\0';
+    parse_esc(tl->text);
+    
+    FPRINTF((stderr,"LABELPOINT %f %f \"%s\" \n", tl->place.x, tl->place.y, tl->text));
+}
+
+#endif
 
 /*
  * print_points: a debugging routine to print out the points of a curve, and
@@ -906,6 +1007,9 @@
 	    TBOOLEAN set_smooth = FALSE, set_axes = FALSE, set_title = FALSE;
 	    TBOOLEAN set_with = FALSE, set_lpstyle = FALSE;
 	    TBOOLEAN set_fillstyle = FALSE;
+#ifdef EAM_DATASTRINGS
+	    TBOOLEAN set_labelstyle = FALSE;
+#endif
 
 	    plot_num++;
 
@@ -927,7 +1031,7 @@
 		this_plot->filledcurves_options.opt_given = 0;
 #endif
 
-		specs = df_open(NCOL);	/* up to NCOL cols */
+		specs = df_open(MAXDATACOLS);	/* up to MAXDATACOLS cols */
 		/* this parses data-file-specific modifiers only */
 		/* we'll sort points when we know style, if necessary */
 		if (df_binary)
@@ -1091,8 +1195,12 @@
 			/* read a possible option for 'with filledcurves' */
 			get_filledcurves_style_options(&this_plot->filledcurves_options);
 #endif
-		    if ((this_plot->plot_type == FUNC)
-			&& (this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR))
+		    if ((this_plot->plot_type == FUNC) &&
+			((this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR)
+#ifdef EAM_DATASTRINGS
+			|| (this_plot->plot_style == LABELPOINTS)
+#endif
+			))
 			{
 			    int_warn(c_token, "This plot style is only for datafiles, reverting to \"points\"");
 			    this_plot->plot_style = POINTSTYLE;
@@ -1101,6 +1209,30 @@
 		    continue;
 		}
 
+#ifdef EAM_DATASTRINGS
+		/* Labels can have font and text property info as plot options */
+		/* In any case we must allocate one instance of the text style */
+		/* that all labels in the plot will share.                     */
+		if (this_plot->plot_style == LABELPOINTS) {
+		    int stored_token = c_token;
+		    if (this_plot->labels == NULL) {
+			this_plot->labels = new_text_label(-1);
+			this_plot->labels->pos = JUST_CENTRE;
+			this_plot->labels->layer = 1;
+		    }
+		    parse_label_options(this_plot->labels);
+		    if (stored_token != c_token) {
+			if (set_labelstyle) {
+			    duplication = TRUE;
+			    break;
+			} else {
+			    set_labelstyle = TRUE;
+			    continue;
+			}
+		    }
+		}
+#endif
+
 		/* pick up line/point specs
 		 * - point spec allowed if style uses points, ie style&2 != 0
 		 * - keywords for lt and pt are optional
@@ -1162,12 +1294,14 @@
 		int_error(c_token, "duplicated or contradicting arguments in plot options");
 
 	    /* set default values for title if this has not been specified */
+	    this_plot->title_is_filename = FALSE;
 	    if (!set_title) {
 		this_plot->title_no_enhanced = 1; /* filename or function cannot be enhanced */
-		if (key->auto_titles) {
+		if (key->auto_titles == FILENAME_KEYTITLES) {
   		    m_capture(&(this_plot->title), start_token, end_token);
 		    if (xparam)
 		        xtitle = this_plot->title;
+		    this_plot->title_is_filename = TRUE;
 		} else if (xtitle != NULL)
 		    xtitle[0] = '\0';
 	    }
diff -urNP gnuplot/src/plot2d.h gnuplot-cvs/src/plot2d.h
--- gnuplot/src/plot2d.h	2004-04-13 23:08:28.000000000 -0700
+++ gnuplot-cvs/src/plot2d.h	2004-04-16 17:37:12.000000000 -0700
@@ -54,4 +54,10 @@
 void cp_free __PROTO((struct curve_points *cp));
 void cp_extend __PROTO((struct curve_points *cp, int num));
 
+#ifdef EAM_DATASTRINGS
+#include "gp_types.h"
+#include "gadgets.h"
+void store_label __PROTO((struct text_label *, struct coordinate *, int i, char * string));
+#endif
+
 #endif /* GNUPLOT_PLOT2D_H */
diff -urNP gnuplot/src/plot3d.c gnuplot-cvs/src/plot3d.c
--- gnuplot/src/plot3d.c	2004-04-13 23:08:28.000000000 -0700
+++ gnuplot-cvs/src/plot3d.c	2004-04-16 17:37:12.000000000 -0700
@@ -47,8 +47,12 @@
 #include "graph3d.h"
 #include "misc.h"
 #include "parse.h"
+#include "setshow.h"
 #include "term_api.h"
 #include "util.h"
+#ifdef EAM_DATASTRINGS
+#include "plot2d.h"
+#endif
 #ifdef PM3D
 # include "pm3d.h"
 #endif
@@ -142,6 +146,10 @@
     } else
 	sp->iso_crvs = (struct iso_curve *) NULL;
 
+#ifdef EAM_DATASTRINGS
+    sp->labels = NULL; /* Will be allocated later if plot_style === LABELPOINTS */
+#endif
+
     return (sp);
 }
 
@@ -211,6 +219,13 @@
 	    sp->iso_crvs = next_icrvs;
 	}
 
+#ifdef EAM_DATASTRINGS
+	if (sp->labels) {
+	    free_labels(sp->labels);
+	    sp->labels = (struct text_label *)NULL;
+	}
+#endif
+
 	free(sp);
 	sp = next;
     }
@@ -607,11 +622,7 @@
     int xdatum = 0;
     int ydatum = 0;
     int j;
-#ifdef PM3D
-    double v[4];
-#else
-    double v[3];
-#endif
+    double v[MAXDATACOLS];
     int pt_in_iso_crv = 0;
     struct iso_curve *this_iso;
 
@@ -659,17 +670,12 @@
 	double color = VERYLARGE;
 	int pm3d_color_from_column = FALSE;
 #endif
-
-	while ((j = df_readline(v,
-#ifdef PM3D
-		    /* currently pm3d mapping is only implemented for
-		     * MAP3D_CARTESIAN; and it is used if the 4th column is 
-		     * explicitly given */
-		    (MAP3D_CARTESIAN == mapping3d && df_no_use_specs==4) ? 4 : 3
-#else
-		    3
+#ifdef EAM_DATASTRINGS
+	if (this_plot->plot_style == LABELPOINTS)
+	    expect_string( 4 );
 #endif
-		    )) != DF_EOF) {
+
+	while ((j = df_readline(v,MAXDATACOLS)) != DF_EOF) {
 	    if (j == DF_SECOND_BLANK)
 		break;		/* two blank lines */
 	    if (j == DF_FIRST_BLANK) {
@@ -734,8 +740,21 @@
 		    y = ydatum;
 		    z = v[0];
 		    break;
-#ifdef PM3D
 		case 4:
+#ifdef EAM_DATASTRINGS
+		    if (this_plot->plot_style == LABELPOINTS) {
+		    /* FIXME EAM - as it stands we cannot have LABELPOINTS   */
+		    /* with pm3d colors, because they don't agree on columns */
+			/* 4th column holds label text */
+			pm3d_color_from_column = FALSE;
+			x = v[0];
+			y = v[1];
+			z = v[2];
+			/* text = df_tokens[3]; */
+			break;
+		    }
+#endif
+#ifdef PM3D
 		    if (df_no_use_specs==4) {
 			/* getting color from an explicitly given 4th column */
 			pm3d_color_from_column = TRUE;
@@ -822,6 +841,17 @@
 #endif
 	    }
 
+#ifdef EAM_DATASTRINGS
+	    /* At this point we have stored the point coordinates. Now we need to copy */
+	    /* x,y,z into the text_label structure and add the actual text string.     */
+	    if (this_plot->plot_style == LABELPOINTS) {
+		if (df_tokens[3])
+		    store_label(this_plot->labels, cp, xdatum, df_tokens[3]);
+		else
+		    this_plot->iso_crvs->points[xdatum].type = UNDEFINED;
+	    }
+#endif
+
 	    /* some may complain, but I regard this as the correct use
 	     * of goto
 	     */
@@ -889,7 +919,6 @@
     }
 }
 
-
 static void
 print_3dtable(pcount)
     int pcount;
@@ -1110,6 +1139,10 @@
 	    TBOOLEAN duplication = FALSE;
 	    TBOOLEAN set_title = FALSE, set_with = FALSE;
 	    TBOOLEAN set_lpstyle = FALSE;
+	    TBOOLEAN checked_once = FALSE;
+#ifdef EAM_DATASTRINGS
+	    TBOOLEAN set_labelstyle = FALSE;
+#endif
 
 	    if (isstring(c_token)) {	/* data file to plot */
 
@@ -1143,18 +1176,8 @@
 		this_plot->plot_type = DATA3D;
 		this_plot->plot_style = data_style;
 
-#ifdef PM3D
-		specs = df_open(4);
-#if 0
-		/* PM 3.7.2002: this fallback is no more necessary */
-		if ((2 == specs || 4 == specs) && MAP3D_CARTESIAN == mapping3d) {
-		    /* switch default to pm3d */
-		    this_plot->plot_style = PM3DSURFACE;
-		}
-#endif
-#else
-		specs = df_open(3);
-#endif
+		specs = df_open(MAXDATACOLS);
+
 		/* parses all datafile-specific modifiers */
 		/* we will load the data after parsing title,with,... */
 
@@ -1234,9 +1257,8 @@
 	    this_plot->lp_properties.l_type = line_num;
 	    this_plot->lp_properties.p_type = point_num;
 
-
 	    /* pm 25.11.2001 allow any order of options */
-	    while (!END_OF_COMMAND) {
+	    while (!END_OF_COMMAND || !checked_once) {
 
 		/* deal with title */
 		if (almost_equals(c_token, "t$itle")) {
@@ -1288,8 +1310,12 @@
 			break;
 		    }
 		    this_plot->plot_style = get_style();
-		    if ((this_plot->plot_type == FUNC3D)
-			&& (this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR))
+		    if ((this_plot->plot_type == FUNC3D) &&
+			((this_plot->plot_style & PLOT_STYLE_HAS_ERRORBAR)
+#ifdef EAM_DATASTRINGS
+			|| (this_plot->plot_style == LABELPOINTS)
+#endif
+			))
 			{
 			    int_warn(c_token, "This plot style is only for datafiles , reverting to \"points\"");
 			    this_plot->plot_style = POINTSTYLE;
@@ -1304,10 +1330,36 @@
 			}
 		    }
 #endif
+
 		    set_with = TRUE;
 		    continue;
 		}
 
+#ifdef EAM_DATASTRINGS
+		/* Labels can have font and text property info as plot options */
+		/* In any case we must allocate one instance of the text style */
+		/* that all labels in the plot will share.                     */
+		if (this_plot->plot_style == LABELPOINTS)  {
+		    int stored_token = c_token;
+		    if (this_plot->labels == NULL) {
+			this_plot->labels = new_text_label(-1);
+			this_plot->labels->pos = JUST_CENTRE;
+			this_plot->labels->layer = 1;
+		    }
+		    parse_label_options(this_plot->labels);
+		    checked_once = TRUE;
+		    if (stored_token != c_token) {
+			if (set_labelstyle) {
+			    duplication = TRUE;
+			    break;
+			} else {
+			    set_labelstyle = TRUE;
+			    continue;
+			}
+		    }
+		}
+#endif
+
 		/* pick up line/point specs
 		 * - point spec allowed if style uses points, ie style&2 != 0
 		 * - keywords are optional
@@ -1319,6 +1371,7 @@
  		    lp_parse(&lp, 1,
 			     this_plot->plot_style & PLOT_STYLE_HAS_POINT,
 			     line_num, point_num);
+		    checked_once = TRUE;
 		    if (stored_token != c_token) {
 			if (set_lpstyle) {
 			    duplication=TRUE;
@@ -1330,10 +1383,10 @@
 			}
 		    }		
 		}
-
+		
 		break; /* unknown option */
 
-	    } /* while (!END_OF_COMMAND) */
+	    }  /* while (!END_OF_COMMAND)*/
 
 	    if (duplication)
 		int_error(c_token, "duplicated or contradicting arguments in plot options");
@@ -1348,7 +1401,7 @@
 	    /* set default values for title if this has not been specified */
 	    if (!set_title) {
 		this_plot->title_no_enhanced = 1; /* filename or function cannot be enhanced */
-		if (key->auto_titles) {
+		if (key->auto_titles == FILENAME_KEYTITLES) {
 		    if (this_plot->plot_type == DATA3D && df_binary==TRUE && end_token==start_token+1)
 			/* let default title for  splot 'a.dat' binary  is 'a.dat'
 			 * while for  'a.dat' binary using 2:1:3  will be all 4 words */ 
diff -urNP gnuplot/src/save.c gnuplot-cvs/src/save.c
--- gnuplot/src/save.c	2004-04-13 23:08:29.000000000 -0700
+++ gnuplot-cvs/src/save.c	2004-04-16 17:37:12.000000000 -0700
@@ -366,13 +366,15 @@
 	    save_position(fp, &key->user_pos);
 	    break;
 	}
-	fprintf(fp, " %s %sreverse %senhanced box linetype %d linewidth %.3f samplen %g spacing %g width %g height %g %sautotitles\n",
+	fprintf(fp, " %s %sreverse %senhanced box linetype %d linewidth %.3f samplen %g spacing %g width %g height %g %s\n",
 		key->just == JLEFT ? "Left" : "Right",
 		key->reverse ? "" : "no",
 		key->enhanced ? "" : "no",
 		key->box.l_type + 1, key->box.l_width,
 		key->swidth, key->vert_factor, key->width_fix, key->height_fix,
-		key->auto_titles ? "" : "no" );
+		key->auto_titles == COLUMNHEAD_KEYTITLES ? "autotitles columnhead"
+		: key->auto_titles == FILENAME_KEYTITLES ? "autotitles"
+		: "noautotitles" );
     }
 
     fputs("unset label\n", fp);
@@ -1084,6 +1086,11 @@
 	fputs("pm3d\n", fp);
 	break;
 #endif
+#ifdef EAM_DATASTRINGS
+    case LABELPOINTS:
+	fputs("labels\n", fp);
+	break;
+#endif
     default:
 	fputs("---error!---\n", fp);
     }
diff -urNP gnuplot/src/set.c gnuplot-cvs/src/set.c
--- gnuplot/src/set.c	2004-04-13 23:08:29.000000000 -0700
+++ gnuplot-cvs/src/set.c	2004-04-16 17:37:12.000000000 -0700
@@ -147,8 +147,6 @@
 static void set_xyzlabel __PROTO((label_struct * label));
 static void load_tics __PROTO((AXIS_INDEX axis));
 static void load_tic_user __PROTO((AXIS_INDEX axis));
-static void add_tic_user __PROTO((AXIS_INDEX, char * label, double position,
-				  int level)); 
 static void load_tic_series __PROTO((AXIS_INDEX axis));
 static void load_offsets __PROTO((double *a, double *b, double *c, double *d));
 static void parse_colorspec __PROTO((struct t_colorspec *tc, int option));
@@ -160,8 +158,6 @@
 static int looks_like_numeric __PROTO((char *));
 static int set_tic_prop __PROTO((AXIS_INDEX));
 static char *fill_numbers_into_string __PROTO((char *pattern));
-static struct text_label * new_text_label __PROTO((int tag));
-static void parse_label_options __PROTO((struct text_label *this_label));
 
 #ifdef PM3D
 static void check_palette_grayscale __PROTO((void));
@@ -1577,10 +1573,15 @@
 		c_token--; /* it is incremented after loop */
 		break;
 	    case S_KEY_AUTOTITLES:
-		key->auto_titles = TRUE;
+		if (almost_equals(++c_token, "col$umnheader"))
+		    key->auto_titles = COLUMNHEAD_KEYTITLES;
+		else {
+		    key->auto_titles = FILENAME_KEYTITLES;
+		    c_token--;
+		}
 		break;
 	    case S_KEY_NOAUTOTITLES:
-		key->auto_titles = FALSE;
+		key->auto_titles = NOAUTO_KEYTITLES;
 		break;
 	    case S_KEY_TITLE:
 		if (isstring(c_token+1)) {
@@ -3042,7 +3043,11 @@
 	{
 	    enum PLOT_STYLE temp_style = get_style();
 
-	    if (temp_style & PLOT_STYLE_HAS_ERRORBAR)
+	    if (temp_style & PLOT_STYLE_HAS_ERRORBAR
+#ifdef EAM_DATASTRINGS
+	       || (temp_style == LABELPOINTS)
+#endif
+	        )
 		int_error(c_token, "style not usable for function plots, left unchanged");
 	    else 
 		func_style = temp_style;
@@ -3948,34 +3953,6 @@
     c_token++;
 }
 
-/*
- * Add a single tic mark, with label, to the list for this axis.
- */
-/* HBB 20020911: added 'static' */
-static void
-add_tic_user(axis,label,position,level)
-    AXIS_INDEX axis;
-    double position;
-    char *label;
-    int level;
-{
-    struct ticmark *tic;		/* new ticmark */
-
-    /* Make a new ticmark */
-    tic = gp_alloc(sizeof(struct ticmark), "add_tic_user: ticmark");
-    if (label) {
-	tic->label = gp_alloc(strlen(label) + 1, "tic label");
-	(void) strcpy(tic->label, label);
-    } else
-	tic->label = NULL;
-    tic->position = position;
-    tic->level = level;
-
-    /* Insert this tic at head of tic list for this axis */
-    tic->next = axis_array[axis].ticdef.def.user;
-    axis_array[axis].ticdef.def.user = tic;
-}
-
 void
 free_marklist(list)
     struct ticmark *list;
@@ -4265,7 +4242,6 @@
  * This routine will eventually be exported so it can be shared by the
  * plot and splot with labels commands.
  */
-static
 struct text_label *
 new_text_label(int tag)
 {
@@ -4298,7 +4274,7 @@
  * This is called from set_label, and will eventually be called from
  * plot2d and plot3d to handle options for 'plot with labels' 
  */
-static void
+void
 parse_label_options( struct text_label *this_label )
 {
     struct value a;
@@ -4443,8 +4419,13 @@
 
 	/* Coming here means that none of the previous 'if's struck
 	 * its "continue" statement, i.e.  whatever is in the command
-	 * line is forbidden by the command syntax. */
-	int_error(c_token, "extraneous or contradicting arguments in label options");
+	 * line is forbidden by the 'set label' command syntax. 
+	 * On the other hand, 'plot with labels' may have additional stuff coming up.
+	 */
+	if (this_label->tag == -1)
+	    break;
+	else
+	    int_error(c_token, "extraneous or contradicting arguments in label options");
 
     } /* while(!END_OF_COMMAND) */
 
diff -urNP gnuplot/src/setshow.h gnuplot-cvs/src/setshow.h
--- gnuplot/src/setshow.h	2004-04-13 23:08:29.000000000 -0700
+++ gnuplot-cvs/src/setshow.h	2004-04-16 17:37:12.000000000 -0700
@@ -82,4 +82,8 @@
 void reset_palette __PROTO((void));
 #endif
 
+/* Called from set_label(), plot2d.c and plot3d.c */
+extern void parse_label_options __PROTO((struct text_label *this_label));
+extern struct text_label * new_text_label __PROTO((int tag));
+
 #endif /* GNUPLOT_SETSHOW_H */
diff -urNP gnuplot/src/show.c gnuplot-cvs/src/show.c
--- gnuplot/src/show.c	2004-04-15 10:04:50.000000000 -0700
+++ gnuplot-cvs/src/show.c	2004-04-16 17:37:12.000000000 -0700
@@ -1711,13 +1711,15 @@
 \tvertical spacing is %g characters\n\
 \twidth adjustment is %g characters\n\
 \theight adjustment is %g characters\n\
-\tcurves are%s automatically titled\n\
+\tcurves are%s automatically titled %s\n\
 \tkey title is \"%s\"\n",
 		    key->swidth,
 		    key->vert_factor,
 		    key->width_fix,
 		    key->height_fix,
                     key->auto_titles ? "" : " not",
+		    key->auto_titles == FILENAME_KEYTITLES ? "with filename" :
+		    key->auto_titles == COLUMNHEAD_KEYTITLES ? "with column header" : "",
 		    key->title);
 
 }
diff -urNP gnuplot/src/tables.c gnuplot-cvs/src/tables.c
--- gnuplot/src/tables.c	2004-04-13 23:08:29.000000000 -0700
+++ gnuplot-cvs/src/tables.c	2004-04-16 17:37:12.000000000 -0700
@@ -594,6 +594,9 @@
 #ifdef PM3D
     { "pm$3d", PM3DSURFACE },
 #endif
+#ifdef EAM_DATASTRINGS
+    { "labels", LABELPOINTS },
+#endif
     { NULL, -1 }
 };
 
diff -urNP gnuplot/src/util.c gnuplot-cvs/src/util.c
--- gnuplot/src/util.c	2004-04-13 23:08:30.000000000 -0700
+++ gnuplot-cvs/src/util.c	2004-04-16 17:37:12.000000000 -0700
@@ -59,7 +59,6 @@
 
 /* internal prototypes */
 
-static void parse_esc __PROTO((char *instr));
 static void mant_exp __PROTO((double, double, TBOOLEAN, double *, int *, const char *));
 
 /*
@@ -979,7 +978,7 @@
 }
 
 
-static void
+void
 parse_esc(instr)
 char *instr;
 {
@@ -1018,6 +1017,9 @@
 		    *t++ = *s++;
 		}
 	    }
+	} else if (df_separator && *s == '\"' && *(s+1) == '\"') {
+	/* EAM Mar 2003 - For parsing CSV strings with quoted quotes */
+	    *t++ = *s++; s++;
 	} else {
 	    *t++ = *s++;
 	}
diff -urNP gnuplot/src/util.h gnuplot-cvs/src/util.h
--- gnuplot/src/util.h	2004-04-13 23:08:30.000000000 -0700
+++ gnuplot-cvs/src/util.h	2004-04-16 17:37:12.000000000 -0700
@@ -73,6 +73,7 @@
 void capture __PROTO((char *, int, int, int));
 void m_capture __PROTO((char **, int, int));
 void m_quote_capture __PROTO((char **, int, int));
+void parse_esc __PROTO((char *));
 
 /* HBB 20010726: IMHO this one belongs into alloc.c: */
 char *gp_strdup __PROTO((const char *));
