summaryrefslogtreecommitdiff
path: root/graphics/ruby-gdchart/files/patch-gdchart.c
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2001-07-17 07:27:23 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2001-07-17 07:27:23 +0000
commitec7701ec442cfdbf5aeeae8b715e8333b9c80f4c (patch)
tree2e50e676a0d86d019c8e3d37c4f59fd5320a2096 /graphics/ruby-gdchart/files/patch-gdchart.c
parentEnable JPEG support. (diff)
Add ruby-gdchart, a Ruby extension to use the GDCHART library.
Notes
Notes: svn path=/head/; revision=45192
Diffstat (limited to 'graphics/ruby-gdchart/files/patch-gdchart.c')
-rw-r--r--graphics/ruby-gdchart/files/patch-gdchart.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/graphics/ruby-gdchart/files/patch-gdchart.c b/graphics/ruby-gdchart/files/patch-gdchart.c
new file mode 100644
index 000000000000..fe12eeda2968
--- /dev/null
+++ b/graphics/ruby-gdchart/files/patch-gdchart.c
@@ -0,0 +1,23 @@
+--- gdchart.c.orig Mon Nov 27 00:47:58 2000
++++ gdchart.c Mon Jul 16 17:23:54 2001
+@@ -16,6 +16,11 @@
+ #include "rubyio.h"
+
+ VALUE
++mgdc_get_image_type(VALUE obj) { return INT2FIX(GDC_image_type); }
++VALUE
++mgdc_set_image_type(VALUE obj, VALUE arg) { GDC_image_type = FIX2INT(arg); }
++
++VALUE
+ mgdc_get_ytitle(VALUE obj) { return rb_str_new2(GDC_ytitle); }
+ VALUE
+ mgdc_set_ytitle(VALUE obj, VALUE arg) { GDC_ytitle = STR2CSTR(arg); }
+@@ -443,6 +448,8 @@
+ #endif
+ rb_define_module_function(mGDChart, "out_graph", mgdc_out_graph, 8);
+
++ rb_define_module_function(mGDChart, "image_type", mgdc_get_image_type, 0);
++ rb_define_module_function(mGDChart, "image_type=", mgdc_set_image_type, 1);
+ rb_define_module_function(mGDChart, "ytitle", mgdc_get_ytitle, 0);
+ rb_define_module_function(mGDChart, "ytitle=", mgdc_set_ytitle, 1);
+ rb_define_module_function(mGDChart, "xtitle", mgdc_get_xtitle, 0);