sup-heliotrope / ncursesw-ruby

Ruby bindings to the ncursesw library (modified from: http://ncurses-ruby.berlios.de/)
GNU Lesser General Public License v2.1
22 stars 13 forks source link

Initial stab at using version 1.3.0 #3

Closed gauteh closed 11 years ago

gauteh commented 11 years ago

A bit messy possibly, tested on ruby 1.9.3 @ arch linux, needs quite some testing before merge.

Ref to #1.

gauteh commented 11 years ago

and tested successfully on: ruby 1.9.1 / arch linux, might be that the change of the problematic line:

diff --git a/form_wrap.c b/form_wrap.c
index c1a9e47..e59d423 100644
--- a/form_wrap.c
+++ b/form_wrap.c
@@ -1130,7 +1128,7 @@ static void* make_arg(va_list* ap) {
         if (args != Qnil) {            
                if (NUM2INT(argc)-1 != rbncurs_array_length(args)) {    
                  char msg[500];
+                snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",(int)(NUM2INT(argc)-1));
-                 snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",NUM2INT(argc)-1);
                  msg[499]=0;
                  rb_raise(rb_eArgError, msg);  
                }

does the trick.

5long commented 11 years ago

My apology, it actually compiles successfully on Arch, just printing lots of warning messages. On Ubuntu it still fails due to some warnings are treated as errors.

I really need to keep my head clear when debugging.

gauteh commented 11 years ago

Fixed up on compat.h and ncurses_wrap.c so that there should be no warnings, seems to work for me. Needs some testing.