1 --- libcaca-0.99.beta18/ruby/caca-display.c.orig 2012-04-06 22:36:17.000000000 +0200
2 +++ libcaca-0.99.beta18/ruby/caca-display.c 2012-12-04 20:28:37.435444821 +0100
7 - rb_raise(rb_eRuntimeError, strerror(errno));
8 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
14 if(caca_set_display_title(_SELF, StringValuePtr(t))<0)
16 - rb_raise(rb_eRuntimeError, strerror(errno));
17 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
23 if(caca_set_display_driver(_SELF, StringValuePtr(driver))<0)
25 - rb_raise(rb_eRuntimeError, strerror(errno));
26 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
32 if(caca_set_cursor(_SELF, flag)<0)
34 - rb_raise(rb_eRuntimeError, strerror(errno));
35 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
39 --- libcaca-0.99.beta18/ruby/caca-canvas.c.orig 2012-12-04 19:55:24.012153037 +0100
40 +++ libcaca-0.99.beta18/ruby/caca-canvas.c 2012-12-04 21:28:19.848703487 +0100
42 static VALUE x (VALUE self) \
44 if( caca_##x (_SELF) <0) \
45 - rb_raise(rb_eRuntimeError, strerror(errno)); \
46 + rb_raise(rb_eRuntimeError, "%s", strerror(errno)); \
54 - rb_raise(rb_eRuntimeError, strerror(errno));
55 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
60 static VALUE gotoxy(VALUE self, VALUE x, VALUE y)
62 if( caca_gotoxy(_SELF, NUM2INT(x), NUM2INT(y)) <0) {
63 - rb_raise(rb_eRuntimeError, strerror(errno));
64 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
69 static VALUE set_attr(VALUE self, VALUE attr)
71 if(caca_set_attr(_SELF, NUM2ULONG(attr)) <0)
72 - rb_raise(rb_eRuntimeError, strerror(errno));
73 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
78 static VALUE put_attr(VALUE self, VALUE x, VALUE y, VALUE attr)
80 if(caca_put_attr(_SELF, NUM2INT(x), NUM2INT(y), NUM2ULONG(attr)) <0)
81 - rb_raise(rb_eRuntimeError, strerror(errno));
82 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
87 static VALUE set_color_ansi(VALUE self, VALUE fg, VALUE bg)
89 if(caca_set_color_ansi(_SELF, NUM2INT(fg), NUM2INT(bg)) <0)
90 - rb_raise(rb_eRuntimeError, strerror(errno));
91 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
96 static VALUE set_color_argb(VALUE self, VALUE fg, VALUE bg)
98 if(caca_set_color_argb(_SELF, NUM2UINT(fg), NUM2UINT(bg)) <0) {
99 - rb_raise(rb_eRuntimeError, strerror(errno));
100 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
107 if(caca_blit(_SELF, NUM2INT(x), NUM2INT(y), csrc, cmask)<0)
108 - rb_raise(rb_eRuntimeError, strerror(errno));
109 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
115 if(caca_set_canvas_boundaries(_SELF, NUM2INT(x), NUM2INT(y), NUM2UINT(w), NUM2UINT(h))<0)
117 - rb_raise(rb_eRuntimeError, strerror(errno));
118 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
123 static VALUE set_frame(VALUE self, VALUE id)
125 if(caca_set_frame(_SELF, NUM2INT(id))<0)
126 - rb_raise(rb_eArgError, strerror(errno));
127 + rb_raise(rb_eArgError, "%s", strerror(errno));
132 static VALUE set_frame_name(VALUE self, VALUE name)
134 if(caca_set_frame_name(_SELF, StringValuePtr(name))<0)
135 - rb_raise(rb_eRuntimeError, strerror(errno));
136 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
141 static VALUE create_frame(VALUE self, VALUE id)
143 if(caca_create_frame(_SELF, NUM2INT(id))<0) {
144 - rb_raise(rb_eRuntimeError, strerror(errno));
145 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
150 static VALUE free_frame(VALUE self, VALUE id)
152 if(caca_free_frame(_SELF, NUM2INT(id))<0) {
153 - rb_raise(rb_eArgError, strerror(errno));
154 + rb_raise(rb_eArgError, "%s", strerror(errno));
160 bytes = caca_import_canvas_from_memory (_SELF, StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format));
162 - rb_raise(rb_eRuntimeError, strerror(errno));
163 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
169 bytes = caca_import_area_from_memory (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(data), RSTRING_LEN(StringValue(data)), StringValuePtr(format));
171 - rb_raise(rb_eRuntimeError, strerror(errno));
172 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
178 bytes = caca_import_canvas_from_file (_SELF, StringValuePtr(filename), StringValuePtr(format));
180 - rb_raise(rb_eRuntimeError, strerror(errno));
181 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
187 bytes = caca_import_area_from_file (_SELF, NUM2INT(x), NUM2INT(y), StringValuePtr(filename), StringValuePtr(format));
189 - rb_raise(rb_eRuntimeError, strerror(errno));
190 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
194 --- libcaca-0.99.beta18/ruby/caca-dither.c.orig 2012-12-04 19:55:24.012153037 +0100
195 +++ libcaca-0.99.beta18/ruby/caca-dither.c 2012-12-04 21:29:14.038702358 +0100
197 dither = caca_create_dither(NUM2UINT(bpp), NUM2UINT(w), NUM2UINT(h), NUM2UINT(pitch), NUM2ULONG(rmask), NUM2ULONG(gmask), NUM2ULONG(bmask), NUM2ULONG(amask));
200 - rb_raise(rb_eRuntimeError, strerror(errno));
201 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
209 - rb_raise(rb_eRuntimeError, strerror(errno));
210 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));
215 static VALUE set_##x(VALUE self, VALUE x) \
217 if(caca_set_dither_##x(_SELF, (float)NUM2DBL(x))<0) \
218 - rb_raise(rb_eRuntimeError, strerror(errno)); \
219 + rb_raise(rb_eRuntimeError, "%s", strerror(errno)); \
225 if(caca_set_dither_##x(_SELF, StringValuePtr(x))<0) \
227 - rb_raise(rb_eRuntimeError, strerror(errno)); \
228 + rb_raise(rb_eRuntimeError, "%s", strerror(errno)); \
232 --- libcaca-0.99.beta18/ruby/caca-font.c.orig 2010-02-16 00:49:54.000000000 +0100
233 +++ libcaca-0.99.beta18/ruby/caca-font.c 2012-12-04 21:33:34.698696928 +0100
235 font = caca_load_font(StringValuePtr(name), 0);
238 - rb_raise(rb_eRuntimeError, strerror(errno));
239 + rb_raise(rb_eRuntimeError, "%s", strerror(errno));