[DRE-commits] [SCM] ruby-ncurses.git branch, master, updated. upstream/1.2.4-16-gd699268

Per Andersson avtobiff at gmail.com
Thu May 3 22:52:34 UTC 2012


The following commit has been merged in the master branch:
commit ababfd9924b5593c10939d180f50ebaf4a1183a3
Author: Per Andersson <avtobiff at gmail.com>
Date:   Thu May 3 23:50:06 2012 +0200

    Imported Upstream version 1.3.1

diff --git a/MANIFEST b/MANIFEST
deleted file mode 100644
index 8e1ca07..0000000
--- a/MANIFEST
+++ /dev/null
@@ -1,28 +0,0 @@
-Changes
-COPYING
-MANIFEST
-README
-THANKS
-TODO
-VERSION
-examples/example.rb
-examples/form.rb
-examples/form2.rb
-examples/hello_ncurses.rb
-examples/LICENSES_for_examples
-examples/rain.rb
-examples/tclock.rb
-examples/read_line.rb
-examples/test_scanw.rb
-extconf.rb
-form_wrap.c
-form_wrap.h
-make_dist.rb
-ncurses_wrap.c
-ncurses_wrap.h
-lib/ncurses.rb
-panel_wrap.c
-panel_wrap.h
-menu_wrap.c
-menu_wrap.h
-
diff --git a/README b/README
index 531c782..ac104cc 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-$Id: README,v 1.16 2009/05/03 14:13:27 t-peters Exp $
+$Id: README,v 1.16 2009-05-03 14:13:27 t-peters Exp $
 ------------------------------------------------------------------------
 This directory contains a ruby module for accessing the FSF's ncurses
 library.
diff --git a/THANKS b/THANKS
index ae0fdfd..e2b7ed9 100644
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.9 2009/05/03 10:37:54 t-peters Exp $
+$Id: THANKS,v 1.10 2011-05-30 23:36:12 t-peters Exp $
 
 A list of people that helped me with ncurses-ruby
 
@@ -13,3 +13,4 @@ Simon Strandgaard
 Paul Duncan
 Tim Sutherland
 Earle Clubb
+graaf           (Berlios user)
\ No newline at end of file
diff --git a/TODO b/TODO
index 0fbebbe..1d652cd 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.6 2003/03/22 22:55:27 t-peters Exp $
+$Id: TODO,v 1.6 2003-03-22 22:55:27 t-peters Exp $
 
 This is the complete list of functions present in ncurses that have not yet
 been wrapped by ncurses-ruby:
diff --git a/VERSION b/VERSION
index e8ea05d..3a3cd8c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.4
+1.3.1
diff --git a/examples/LICENSES_for_examples b/examples/LICENSES_for_examples
index 9725ec3..ca4a9e2 100644
--- a/examples/LICENSES_for_examples
+++ b/examples/LICENSES_for_examples
@@ -1,4 +1,4 @@
-$Id: LICENSES_for_examples,v 1.6 2004/05/13 21:55:17 t-peters Exp $
+$Id: LICENSES_for_examples,v 1.6 2004-05-13 21:55:17 t-peters Exp $
 
 Ideally, an example program on how to use a library should be in the public
 domain.
diff --git a/examples/example.rb b/examples/example.rb
old mode 100755
new mode 100644
index e49b9d9..02a0931
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
-# $Id: example.rb,v 1.4 2002/03/04 13:24:29 t-peters Exp $
+# $Id: example.rb,v 1.4 2002-03-04 13:24:29 t-peters Exp $
 
 # This file provides an example for the usage of the ncurses-ruby module.
 # Copyright (C) 2002 Tobias Peters <t-peters at users.berlios.de>
@@ -59,7 +59,7 @@
 
 
 
-require "ncurses"
+require "ncursesw"
 
 def moving(scr)
   scr.clear() # clear screen
diff --git a/examples/form.rb b/examples/form.rb
old mode 100755
new mode 100644
index 1526741..88c1d81
--- a/examples/form.rb
+++ b/examples/form.rb
@@ -8,7 +8,7 @@
 # Copyright (c) 2001 by Pradeep Padala. This document may be distributed 
 # under the terms set forth in the LDP license at linuxdoc.org/COPYRIGHT.html.
  
-require 'ncurses.rb'
+require 'ncursesw.rb'
 
 begin
   scr = Ncurses.initscr()
diff --git a/examples/form2.rb b/examples/form2.rb
old mode 100755
new mode 100644
index 140a5a7..2bea254
--- a/examples/form2.rb
+++ b/examples/form2.rb
@@ -11,7 +11,7 @@
 # Copyright (c) 2001 by Pradeep Padala. This document may be distributed 
 # under the terms set forth in the LDP license at linuxdoc.org/COPYRIGHT.html.
 
-require 'ncurses'
+require 'ncursesw'
 
 include Ncurses
 include Ncurses::Form
diff --git a/examples/hello_ncurses.rb b/examples/hello_ncurses.rb
old mode 100755
new mode 100644
index c6727d3..314e531
--- a/examples/hello_ncurses.rb
+++ b/examples/hello_ncurses.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
-# $Id: hello_ncurses.rb,v 1.3 2002/02/28 13:50:03 t-peters Exp $
+# $Id: hello_ncurses.rb,v 1.3 2002-02-28 13:50:03 t-peters Exp $
 
 # this ncurses-ruby program follows an ancient tradition of example
 # computer programs: When invoked, it prints a friendly greeting on the
@@ -14,7 +14,7 @@
 
 # First, we have to tell Ruby to use the Ncurses extension module:
 
-require "ncurses"
+require "ncursesw"
 
 
 
diff --git a/examples/rain.rb b/examples/rain.rb
old mode 100755
new mode 100644
index fa91b6c..1bf7297
--- a/examples/rain.rb
+++ b/examples/rain.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
-# $Id: rain.rb,v 1.6 2005/08/22 21:41:49 t-peters Exp $
+# $Id: rain.rb,v 1.6 2005-08-22 21:41:49 t-peters Exp $
 
 # This program is a translation of the popular rain.c demo program from the
 # ncurses library distribution.
@@ -40,7 +40,7 @@
 
 
 
-require "ncurses"
+require "ncursesw"
 
 
 # A class responsible for raindrop drawing
diff --git a/examples/read_line.rb b/examples/read_line.rb
old mode 100755
new mode 100644
index 8ac9bdc..08eac3f
--- a/examples/read_line.rb
+++ b/examples/read_line.rb
@@ -7,7 +7,7 @@
 # No warranties
 # Share and enjoy!
 
-require "ncurses"
+require "ncursesw"
 
 # read_line returns an array
 # [string, last_cursor_position_in_string, keycode_of_terminating_enter_key].
diff --git a/examples/tclock.rb b/examples/tclock.rb
old mode 100755
new mode 100644
index a5a8f2e..6ad165e
--- a/examples/tclock.rb
+++ b/examples/tclock.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
-# $Id: tclock.rb,v 1.6 2002/02/28 13:50:10 t-peters Exp $
+# $Id: tclock.rb,v 1.6 2002-02-28 13:50:10 t-peters Exp $
 
 # tclock - analog/digital clock for curses, translated to ruby
 # Copyright (C) 2002 Tobias Peters <t-peters at users.berlios.de>
@@ -30,7 +30,7 @@
 # clearly marked as such.                                                 #
 ###########################################################################
 
-require "ncurses"
+require "ncursesw"
 PI = Math::PI
 
 def sign(_x)
diff --git a/examples/test_scanw.rb b/examples/test_scanw.rb
old mode 100755
new mode 100644
index de1ed82..39bf2e9
--- a/examples/test_scanw.rb
+++ b/examples/test_scanw.rb
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
-# $Id: test_scanw.rb,v 1.1 2003/03/22 22:55:00 t-peters Exp $
+# $Id: test_scanw.rb,v 1.1 2003-03-22 22:55:00 t-peters Exp $
 #
 # Test of the scanw function. Should really not be used in any serious curses
 # program. To use it, install scanf for ruby.
@@ -9,7 +9,7 @@
 #
 # No warranties. Share and enjoy.
 
-require "ncurses"
+require "ncursesw"
 begin
   Ncurses.initscr
   Ncurses.mvaddstr(4, 19, "Give me a number: ")
diff --git a/extconf.rb b/extconf.rb
old mode 100755
new mode 100644
index 7c55025..0b4203f
--- a/extconf.rb
+++ b/extconf.rb
@@ -2,7 +2,7 @@
 
 # ncurses-ruby is a ruby module for accessing the FSF's ncurses library
 # (C) 2002, 2004 Tobias Peters <t-peters at users.berlios.de>
-# (C) 2005, 2009 Tobias Herzke
+# (C) 2005, 2009, 2011 Tobias Herzke
 #
 # This module is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,7 @@
 # License along with this module; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
-# $Id: extconf.rb,v 1.14 2009/05/03 14:13:27 t-peters Exp $
+# $Id: extconf_ncursesw.rb,v 1.1 2011-05-30 23:05:50 t-peters Exp $
 
 require "mkmf"
 
@@ -28,22 +28,16 @@ $CXXFLAGS  = $CFLAGS
 have_header("unistd.h")
 have_header("locale.h")
 
-if have_header("ncurses.h")
-  curses_header = "ncurses.h"
-elsif have_header("ncurses/curses.h")
-  curses_header = "ncurses/curses.h"
-elsif have_header("curses.h")
-  curses_header = "curses.h"
+if have_header("ncursesw/curses.h")
+  curses_header = "ncursesw/curses.h"
 else
-  raise "ncurses header file not found"
+  raise "ncursesw header file not found"
 end
 
-if have_library("ncurses", "wmove")
-  curses_lib = "ncurses"
-elsif have_library("pdcurses", "wmove")
-  curses_lib = "pdcurses"
+if have_library("ncursesw", "wmove")
+  curses_lib = "ncursesw"
 else
-  raise "ncurses library not found"
+  raise "ncursesw library not found"
 end
 
 have_func("newscr")
@@ -122,16 +116,16 @@ have_func("assume_default_colors")
 have_func("attr_get")
 
 puts "checking for the panel library..."
-if have_header("panel.h")
-  have_library("panel", "panel_hidden")
+if have_header("ncursesw/panel.h")
+  have_library("panelw", "panel_hidden")
 end
 puts "checking for the form library..."
-if have_header("form.h")
-  have_library("form", "new_form")
+if have_header("ncursesw/form.h")
+  have_library("formw", "new_form")
 end
 puts "checking for the menu library..."
-if have_header("menu.h")
-  have_library("menu", "new_menu")
+if have_header("ncursesw/menu.h")
+  have_library("menuw", "new_menu")
 end
 
-create_makefile('ncurses_bin')
+create_makefile('ncursesw_bin')
diff --git a/form_wrap.c b/form_wrap.c
index e285b31..346d443 100644
--- a/form_wrap.c
+++ b/form_wrap.c
@@ -22,10 +22,12 @@
  *  License along with this module; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
+ * Changes
+ * (C) 2011 Tobias Herzke
  */
 
 
-#ifdef HAVE_FORM_H
+#if defined(HAVE_FORM_H) || defined(HAVE_NCURSESW_FORM_H)
 
 #include "form_wrap.h"
 #include "ncurses_wrap.h"
@@ -1127,7 +1129,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.",NUM2INT(argc)-1);
+		  snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",(int)(NUM2INT(argc)-1));
 		  msg[499]=0;
 		  rb_raise(rb_eArgError, msg);	
 		}
diff --git a/form_wrap.h b/form_wrap.h
index 4f92c22..f8a015c 100644
--- a/form_wrap.h
+++ b/form_wrap.h
@@ -18,12 +18,19 @@
  *  License along with this module; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
+ * Changes
+ * (C) 2011 Tobias Herzke
  */
 
-#if !defined(FORM_HH) && defined(HAVE_FORM_H)
+#if !defined(FORM_HH) && (defined(HAVE_FORM_H) || defined(HAVE_NCURSESW_FORM_H))
 #define FORM_HH
 
+#ifdef HAVE_FORM_H
 #include <form.h>
+#else
+#include <ncursesw/form.h>
+#endif
+
 #include <ruby.h>
 
 extern VALUE mForm;
diff --git a/lib/ncurses.rb b/lib/ncurses_sugar.rb
similarity index 98%
rename from lib/ncurses.rb
rename to lib/ncurses_sugar.rb
index 954e006..b0e462b 100644
--- a/lib/ncurses.rb
+++ b/lib/ncurses_sugar.rb
@@ -1,7 +1,7 @@
 # ncurses-ruby is a ruby module for accessing the FSF's ncurses library
 # (C) 2002, 2003, 2004 Tobias Peters <t-peters at users.berlios.de>
 # (C) 2004 Simon Kaczor <skaczor at cox.net>
-# (C) 2005 Tobias Herzke
+# (C) 2005 2011 Tobias Herzke
 #
 # This module is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -17,10 +17,7 @@
 # License along with this module; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
-# $Id: ncurses.rb,v 1.8 2009/05/03 10:37:54 t-peters Exp $
-
-require "ncurses_bin.so"
-
+# $Id: ncurses_sugar.rb,v 1.1 2011-05-30 23:05:50 t-peters Exp $
 
 # Ncurses constants with leading underscore
 def Ncurses._XOPEN_CURSES
diff --git a/lib/ncursesw.rb b/lib/ncursesw.rb
new file mode 100644
index 0000000..e84b65b
--- /dev/null
+++ b/lib/ncursesw.rb
@@ -0,0 +1,23 @@
+# ncurses-ruby is a ruby module for accessing the FSF's ncurses library
+# (C) 2002, 2003, 2004 Tobias Peters <t-peters at users.berlios.de>
+# (C) 2004 Simon Kaczor <skaczor at cox.net>
+# (C) 2005 2011 Tobias Herzke
+#
+# This module is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This module is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this module; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+
+# $Id: ncursesw.rb,v 1.1 2011-05-30 23:05:51 t-peters Exp $
+
+require "ncursesw_bin.so"
+require "ncurses_sugar.rb"
diff --git a/make_dist.rb b/make_dist.rb
index 79988a6..11e08f8 100755
--- a/make_dist.rb
+++ b/make_dist.rb
@@ -1,6 +1,7 @@
 #!/usr/bin/env ruby
-
-# $Id: make_dist.rb,v 1.6 2003/08/29 22:50:12 t-peters Exp $
+# (C) 2002-2011 Tobias Herzke
+# License: LGPL v2.1
+# $Id: make_dist.rb,v 1.8 2011-05-30 23:05:50 t-peters Exp $
 
 require "fileutils"
 
@@ -10,36 +11,28 @@ def sys(i)
 end
 
 dir  = File.dirname(__FILE__)
-base = File.basename(dir)
-base = "ncurses-ruby" if base == "."
 
-files = IO.readlines(dir + "/MANIFEST").collect{|filename|filename.chomp}
+%w(ncurses ncursesw).each{|flavor|
+
+base = flavor+"-ruby"
 
-Version = File.new("#{dir}/VERSION").readline.chomp!
+files = IO.readlines(dir + "/MANIFEST_"+flavor).collect{|filename|filename.chomp}
+
+Version = File.new("#{dir}/VERSION").readline.chomp
 
 FileUtils.mkdir "#{base}-#{Version}"
 files.each{|filename|
   if filename.index "/"
     FileUtils.mkdir_p "#{base}-#{Version}/#{File.dirname(filename)}"
   end
-  sys "cp #{dir}/#{filename} #{base}-#{Version}/#{filename}"
+  if filename.index("example") 
+    sys "sed -e '/require/ s/ncurses/#{flavor}/' <#{dir}/#{filename} >#{base}-#{Version}/#{filename}"
+  else
+    sys "cp #{dir}/#{filename} #{base}-#{Version}/#{filename}"
+  end
 }
+sys "cp #{dir}/extconf_#{flavor}.rb #{base}-#{Version}/extconf.rb"
 sys "tar cjf #{base}-#{Version}.tar.bz2 --owner=0 --group=0 #{base}-#{Version}"
 
-# check if we create a binary distribution for a mingw extension
-binary_description = `file ncurses.so`
-
-if ((binary_description =~ /\s(windows)\s/i)                  &&
-    (binary_description =~ /\s(pe)|(portable executable)\s/i) &&
-    (binary_description =~ /\s(dll)\s/i))
-  sys "cp ncurses.so README.binary #{base}-#{Version}"
-  Dir.glob("#{base}-#{Version}/README*").each{|textfile|
-    text = IO.readlines(textfile).map{|line|line.chomp + "\r\n"}
-    File.open(textfile + ".txt", "wb"){|outfd| outfd.write(text.join)}
-    sys "rm #{textfile}"
-  }
-  sys "rm #{base}-#{Version}/{MANIFEST,make_dist.rb}"
-  sys "zip -9 -r #{base}-#{Version}-i386-mswin32.zip #{base}-#{Version}"
-end
-
 sys "rm -r #{base}-#{Version}/"
+}
diff --git a/menu_wrap.c b/menu_wrap.c
index e796a40..f76582f 100644
--- a/menu_wrap.c
+++ b/menu_wrap.c
@@ -22,9 +22,11 @@
  *  License along with this module; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
+ * Changes
+ * (C) 2011 Tobias Herzke
  */
 
-#ifdef HAVE_MENU_H
+#if defined(HAVE_MENU_H) || defined(HAVE_NCURSESW_MENU_H)
 
 #include "menu_wrap.h"
 #include "ncurses_wrap.h"
diff --git a/menu_wrap.h b/menu_wrap.h
index 198c42b..c2081c8 100644
--- a/menu_wrap.h
+++ b/menu_wrap.h
@@ -19,12 +19,18 @@
  *  License along with this module; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
+ * Changes
+ * (C) 2011 Tobias Herzke
  */
 
-#if !defined(MENU_HH) && defined(HAVE_MENU_H)
+#if !defined(MENU_HH) && (defined(HAVE_MENU_H) || defined(HAVE_NCURSESW_MENU_H))
 #define MENU_HH
 
+#ifdef HAVE_MENU_H
 #include <menu.h>
+#else
+#include <ncursesw/menu.h>
+#endif
 #include <ruby.h>
 
 extern VALUE mMenu;
diff --git a/ncurses_wrap.c b/ncurses_wrap.c
index ad66721..09609d1 100755
--- a/ncurses_wrap.c
+++ b/ncurses_wrap.c
@@ -2,7 +2,7 @@
  * ncurses-ruby is a ruby module for accessing the FSF's ncurses library
  * (C) 2002, 2003, 2004 Tobias Peters <t-peters at berlios.de>
  * (C) 2004 Simon Kaczor <skaczor at cox.net>
- * (C) 2005 2006 2009 Tobias Herzke
+ * (C) 2005 2006 2009 2011 Tobias Herzke
  *
  *  This module is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,7 @@
  *  License along with this module; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * $Id: ncurses_wrap.c,v 1.18 2009/07/31 10:49:24 t-peters Exp $
+ * $Id: ncurses_wrap.c,v 1.20 2011-05-30 23:28:23 t-peters Exp $
  *
  * This file was adapted from the original ncurses header file which
  * has the following copyright statements:
@@ -335,15 +335,15 @@ static VALUE rbncurs_winnstr(VALUE dummy, VALUE rb_win, VALUE rb_chstr, VALUE rb
     return INT2NUM(return_value);
 }
 
-#ifdef HAVE_PANEL_H
+#if defined(HAVE_PANEL_H) || defined(HAVE_NCURSESW_PANEL_H)
 #include "panel_wrap.h" /* needs access to mNcurses, wrap_window, get_window */
 #endif
 
-#ifdef HAVE_FORM_H
+#if defined(HAVE_FORM_H) || defined(HAVE_NCURSESW_FORM_H)
 #include "form_wrap.h" /* needs init_form */
 #endif
 
-#ifdef HAVE_MENU_H
+#if defined(HAVE_MENU_H) || defined(HAVE_NCURSESW_MENU_H)
 #include "menu_wrap.h" /* needs init_menu */
 #endif
 
@@ -2394,7 +2394,7 @@ static VALUE rbncurs_tracef(int argc, VALUE * argv, VALUE dummy)
         return Qnil;
     }
     _tracef("%s",
-            STR2CSTR(funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv)));
+            STR2CSTR(rb_funcall3(rb_mKernel, rb_intern("sprintf"), argc, argv)));
     return Qnil;
 }
 #endif /* HAVE__TRACEF */
@@ -2724,7 +2724,11 @@ static void init_safe_functions(void)
     NCFUNC(setlocale, 2);
 #endif
 }
+#ifdef HAVE_NCURSESW_CURSES_H
+void Init_ncursesw_bin(void)
+#else
 void Init_ncurses_bin(void)
+#endif
 {
     mNcurses = rb_define_module("Ncurses");
     eNcurses = rb_define_class_under(mNcurses, "Exception", rb_eRuntimeError);
@@ -2756,13 +2760,13 @@ static void Init_ncurses_full(void)
     init_functions_3();
 
     init_SCREEN_methods();
-#ifdef HAVE_PANEL_H
+#if defined(HAVE_PANEL_H) || defined(HAVE_NCURSESW_PANEL_H)
     init_panel();
 #endif
-#ifdef HAVE_FORM_H
+#if defined(HAVE_FORM_H) || defined(HAVE_NCURSESW_FORM_H)
     init_form();
 #endif
-#ifdef HAVE_MENU_H
+#if defined(HAVE_MENU_H) || defined(HAVE_NCURSESW_MENU_H)
     init_menu();
 #endif
 }
diff --git a/ncurses_wrap.h b/ncurses_wrap.h
index 85551a8..97cc61a 100644
--- a/ncurses_wrap.h
+++ b/ncurses_wrap.h
@@ -2,7 +2,7 @@
  * ncurses-ruby is a ruby module for accessing the FSF's ncurses library
  * (C) 2002, 2003 Tobias Peters <t-peters at berlios.de>
  * (C) 2004 Simon Kaczor <skaczor at cox.net>
- * (C) 2009 Tobias Herzke
+ * (C) 2009 2011 Tobias Herzke
  *
  *  This module is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -18,7 +18,7 @@
  *  License along with this module; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  *
- * $Id: ncurses_wrap.h,v 1.3 2009/05/03 20:37:26 t-peters Exp $
+ * $Id: ncurses_wrap.h,v 1.4 2011-05-30 23:05:50 t-peters Exp $
  *
  * This file was adapted from the original ncurses header file which
  * has the following copyright statements:
@@ -79,7 +79,9 @@ int close(int);
 #  ifdef HAVE_NCURSES_CURSES_H
 #    include <ncurses/curses.h>
 #  else
-#    include <curses.h>
+#    ifdef HAVE_NCURSESW_CURSES_H
+#      include <ncursesw/curses.h>
+#    endif
 #  endif
 #endif
 
diff --git a/panel_wrap.c b/panel_wrap.c
index aafd6f0..9680b25 100644
--- a/panel_wrap.c
+++ b/panel_wrap.c
@@ -1,6 +1,7 @@
 /*
  * ncurses-ruby is a ruby module for accessing the FSF's ncurses library
  * (C) 2002 Tobias Peters <t-peters at berlios.de>
+ * (C) 2011 Tobias Herzke
  * 
  *  This module is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -17,9 +18,9 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  */
 
-/* $Id: panel_wrap.c,v 1.2 2004/07/31 08:35:13 t-peters Exp $ */
+/* $Id: panel_wrap.c,v 1.3 2011-05-30 23:05:50 t-peters Exp $ */
 
-#ifdef HAVE_PANEL_H
+#if defined(HAVE_PANEL_H) || defined(HAVE_NCURSESW_PANEL_H)
 
 #include "panel_wrap.h"
 #include "ncurses_wrap.h"
diff --git a/panel_wrap.h b/panel_wrap.h
index 39d7968..9cd46fd 100755
--- a/panel_wrap.h
+++ b/panel_wrap.h
@@ -1,6 +1,7 @@
 /*
  * ncurses-ruby is a ruby module for accessing the FSF's ncurses library
  * (C) 2002 Tobias Peters <t-peters at berlios.de>
+ * (C) 2011 Tobias Herzke
  * 
  *  This module is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Lesser General Public
@@ -17,11 +18,15 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  */
 
-/* $Id: panel_wrap.h,v 1.5 2004/07/31 08:35:13 t-peters Exp $ */
+/* $Id: panel_wrap.h,v 1.6 2011-05-30 23:05:50 t-peters Exp $ */
 
-#if !defined(PANEL_HH) && defined(HAVE_PANEL_H)
+#if !defined(PANEL_HH) && (defined(HAVE_PANEL_H) || defined(HAVE_NCURSESW_PANEL_H))
 #define PANEL_HH
+#ifdef HAVE_PANEL_H
 #include <panel.h>
+#else
+#include <ncursesw/panel.h>
+#endif
 #include <ruby.h>
 
 extern VALUE mPanel;

-- 
ruby-ncurses.git



More information about the Pkg-ruby-extras-commits mailing list