string variables for font name of set (title|xlabel)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

string variables for font name of set (title|xlabel)

Shigeharu TAKENO
shige 06/19 2005
----------------

To use strings variables for the font name of "set title" or "set
(x|y|z)label", to apply the following patch:

----- From here -----
--- src/set.c.ORG Sun Jun 19 20:57:17 2005
+++ src/set.c Sun Jun 19 20:45:15 2005
@@ -3832,9 +3832,22 @@
 
  if (almost_equals(c_token, "f$ont"))  {
     ++c_token;
+#ifdef GP_STRING_VARS
+    if (isstring(c_token) || isstringvar(c_token)) {  
+ struct value a;
+ STRING_RESULT_ONLY = TRUE;
+ (void) const_express(&a);
+ STRING_RESULT_ONLY = FALSE;
+ if (a.type == STRING) {
+    strncpy(label->font, a.v.string_val, MAX_LINE_LEN);
+    gpfree_string(&a);
+ } else
+  int_error(c_token,"expecting font");
+#else
     if (isstring(c_token)) {
  quote_str(label->font, c_token, MAX_LINE_LEN);
  c_token++;
+#endif
     } else
  int_error(c_token,"expecting font");
     continue;
----- To here -----

I wish it will be included in CVS tree and I hope the font name
of "set label" would be allowed to be specified by string
variables.

+========================================================+
 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 [hidden email]   TEL(&FAX): +81-257-22-8161
+========================================================+


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
gnuplot-beta mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gnuplot-beta