ncursesw 1.4.9 → 1.4.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fca9709dd82761c91ed68a7fa83f68447578ecae
4
- data.tar.gz: c70bb1b07d1d47a96ec380660f32cf2c8cbf4a47
2
+ SHA256:
3
+ metadata.gz: 2449dc12bd5aa4a1fd83323ad528ede0d71ae0632a9e1c61e18f298985d2ef1b
4
+ data.tar.gz: a2f3a6e4a289ade617c3a36e6929b31285ded7ed3cefbb91ef18c0b73010d873
5
5
  SHA512:
6
- metadata.gz: 4bec4cb14cf4cd128959ec2ac2571d4116ce2fc86a35912721d727b60de45f8384449428c5661c376c4c3b22a0d4960026ae967374ea274c4a6278bbe15d61a2
7
- data.tar.gz: 0bc200eb0ef8ffc80b9f0938296f72b228a892dd6db8d03515e78315040bda05a4c78f3f37cb466345482051a520cbce6ae5b6a79212a25c6aebdd091756ed9b
6
+ metadata.gz: fe5797d9be9b6b1086b785d1a8628cb7527ad4af4b3b92892ff66313f5a78244f2f88ae7d34e8f016cf76332b3d1a6772eb2c7d31badfa50bc1804fafff14231
7
+ data.tar.gz: b5e269223c5fa27cdbaa3c03a5ebf8491881bed52c8195960e932e9709c8106be1c336fd18ad6bb42424a07d11e4e6e62fd562f0dbcaf0d65352c422d61d2c16
data/COPYING CHANGED
@@ -1,9 +1,8 @@
1
-
2
1
  GNU LESSER GENERAL PUBLIC LICENSE
3
2
  Version 2.1, February 1999
4
3
 
5
4
  Copyright (C) 1991, 1999 Free Software Foundation, Inc.
6
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
7
6
  Everyone is permitted to copy and distribute verbatim copies
8
7
  of this license document, but changing it is not allowed.
9
8
 
@@ -23,8 +22,7 @@ specially designated software packages--typically libraries--of the
23
22
  Free Software Foundation and other authors who decide to use it. You
24
23
  can use it too, but we suggest you first think carefully about whether
25
24
  this license or the ordinary General Public License is the better
26
- strategy to use in any particular case, based on the explanations
27
- below.
25
+ strategy to use in any particular case, based on the explanations below.
28
26
 
29
27
  When we speak of free software, we are referring to freedom of use,
30
28
  not price. Our General Public Licenses are designed to make sure that
@@ -57,7 +55,7 @@ modified by someone else and passed on, the recipients should know
57
55
  that what they have is not the original version, so that the original
58
56
  author's reputation will not be affected by problems that might be
59
57
  introduced by others.
60
- ^L
58
+
61
59
  Finally, software patents pose a constant threat to the existence of
62
60
  any free program. We wish to make sure that a company cannot
63
61
  effectively restrict the users of a free program by obtaining a
@@ -89,8 +87,7 @@ libraries. However, the Lesser license provides advantages in certain
89
87
  special circumstances.
90
88
 
91
89
  For example, on rare occasions, there may be a special need to
92
- encourage the widest possible use of a certain library, so that it
93
- becomes
90
+ encourage the widest possible use of a certain library, so that it becomes
94
91
  a de-facto standard. To achieve this, non-free programs must be
95
92
  allowed to use the library. A more frequent case is that a free
96
93
  library does the same job as widely used non-free libraries. In this
@@ -114,7 +111,7 @@ modification follow. Pay close attention to the difference between a
114
111
  "work based on the library" and a "work that uses the library". The
115
112
  former contains code derived from the library, whereas the latter must
116
113
  be combined with the library in order to run.
117
- ^L
114
+
118
115
  GNU LESSER GENERAL PUBLIC LICENSE
119
116
  TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
120
117
 
@@ -139,8 +136,7 @@ included without limitation in the term "modification".)
139
136
  "Source code" for a work means the preferred form of the work for
140
137
  making modifications to it. For a library, complete source code means
141
138
  all the source code for all modules it contains, plus any associated
142
- interface definition files, plus the scripts used to control
143
- compilation
139
+ interface definition files, plus the scripts used to control compilation
144
140
  and installation of the library.
145
141
 
146
142
  Activities other than copying, distribution and modification are not
@@ -220,7 +216,7 @@ instead of to this License. (If a newer version than version 2 of the
220
216
  ordinary GNU General Public License has appeared, then you can specify
221
217
  that version instead if you wish.) Do not make any other change in
222
218
  these notices.
223
- ^L
219
+
224
220
  Once this change is made in a given copy, it is irreversible for
225
221
  that copy, so the ordinary GNU General Public License applies to all
226
222
  subsequent copies and derivative works made from that copy.
@@ -271,7 +267,7 @@ Library will still fall under Section 6.)
271
267
  distribute the object code for the work under the terms of Section 6.
272
268
  Any executables containing that work also fall under Section 6,
273
269
  whether or not they are linked directly with the Library itself.
274
- ^L
270
+
275
271
  6. As an exception to the Sections above, you may also combine or
276
272
  link a "work that uses the Library" with the Library to produce a
277
273
  work containing portions of the Library, and distribute that work
@@ -333,7 +329,7 @@ restrictions of other proprietary libraries that do not normally
333
329
  accompany the operating system. Such a contradiction means you cannot
334
330
  use both them and the Library together in an executable that you
335
331
  distribute.
336
- ^L
332
+
337
333
  7. You may place library facilities that are a work based on the
338
334
  Library side-by-side in a single library together with other library
339
335
  facilities not covered by this License, and distribute such a combined
@@ -374,7 +370,7 @@ subject to these terms and conditions. You may not impose any further
374
370
  restrictions on the recipients' exercise of the rights granted herein.
375
371
  You are not responsible for enforcing compliance by third parties with
376
372
  this License.
377
- ^L
373
+
378
374
  11. If, as a consequence of a court judgment or allegation of patent
379
375
  infringement or for any other reason (not limited to patent issues),
380
376
  conditions are imposed on you (whether by court order, agreement or
@@ -388,10 +384,9 @@ all those who receive copies directly or indirectly through you, then
388
384
  the only way you could satisfy both it and this License would be to
389
385
  refrain entirely from distribution of the Library.
390
386
 
391
- If any portion of this section is held invalid or unenforceable under
392
- any particular circumstance, the balance of the section is intended to
393
- apply, and the section as a whole is intended to apply in other
394
- circumstances.
387
+ If any portion of this section is held invalid or unenforceable under any
388
+ particular circumstance, the balance of the section is intended to apply,
389
+ and the section as a whole is intended to apply in other circumstances.
395
390
 
396
391
  It is not the purpose of this section to induce you to infringe any
397
392
  patents or other property right claims or to contest validity of any
@@ -409,11 +404,11 @@ be a consequence of the rest of this License.
409
404
 
410
405
  12. If the distribution and/or use of the Library is restricted in
411
406
  certain countries either by patents or by copyrighted interfaces, the
412
- original copyright holder who places the Library under this License
413
- may add an explicit geographical distribution limitation excluding those
414
- countries, so that distribution is permitted only in or among
415
- countries not thus excluded. In such case, this License incorporates
416
- the limitation as if written in the body of this License.
407
+ original copyright holder who places the Library under this License may add
408
+ an explicit geographical distribution limitation excluding those countries,
409
+ so that distribution is permitted only in or among countries not thus
410
+ excluded. In such case, this License incorporates the limitation as if
411
+ written in the body of this License.
417
412
 
418
413
  13. The Free Software Foundation may publish revised and/or new
419
414
  versions of the Lesser General Public License from time to time.
@@ -427,7 +422,7 @@ conditions either of that version or of any later version published by
427
422
  the Free Software Foundation. If the Library does not specify a
428
423
  license version number, you may choose any version ever published by
429
424
  the Free Software Foundation.
430
- ^L
425
+
431
426
  14. If you wish to incorporate parts of the Library into other free
432
427
  programs whose distribution conditions are incompatible with these,
433
428
  write to the author to ask for permission. For software which is
@@ -461,30 +456,27 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
461
456
  DAMAGES.
462
457
 
463
458
  END OF TERMS AND CONDITIONS
464
- ^L
459
+
465
460
  How to Apply These Terms to Your New Libraries
466
461
 
467
462
  If you develop a new library, and you want it to be of the greatest
468
463
  possible use to the public, we recommend making it free software that
469
464
  everyone can redistribute and change. You can do so by permitting
470
- redistribution under these terms (or, alternatively, under the terms
471
- of the ordinary General Public License).
465
+ redistribution under these terms (or, alternatively, under the terms of the
466
+ ordinary General Public License).
472
467
 
473
- To apply these terms, attach the following notices to the library.
474
- It is safest to attach them to the start of each source file to most
475
- effectively convey the exclusion of warranty; and each file should
476
- have at least the "copyright" line and a pointer to where the full
477
- notice is found.
468
+ To apply these terms, attach the following notices to the library. It is
469
+ safest to attach them to the start of each source file to most effectively
470
+ convey the exclusion of warranty; and each file should have at least the
471
+ "copyright" line and a pointer to where the full notice is found.
478
472
 
479
-
480
- <one line to give the library's name and a brief idea of what it
481
- does.>
473
+ <one line to give the library's name and a brief idea of what it does.>
482
474
  Copyright (C) <year> <name of author>
483
475
 
484
476
  This library is free software; you can redistribute it and/or
485
477
  modify it under the terms of the GNU Lesser General Public
486
478
  License as published by the Free Software Foundation; either
487
- version 2 of the License, or (at your option) any later version.
479
+ version 2.1 of the License, or (at your option) any later version.
488
480
 
489
481
  This library is distributed in the hope that it will be useful,
490
482
  but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -493,23 +485,18 @@ does.>
493
485
 
494
486
  You should have received a copy of the GNU Lesser General Public
495
487
  License along with this library; if not, write to the Free Software
496
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
488
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
497
489
 
498
- Also add information on how to contact you by electronic and paper
499
- mail.
490
+ Also add information on how to contact you by electronic and paper mail.
500
491
 
501
- You should also get your employer (if you work as a programmer) or
502
- your
492
+ You should also get your employer (if you work as a programmer) or your
503
493
  school, if any, to sign a "copyright disclaimer" for the library, if
504
494
  necessary. Here is a sample; alter the names:
505
495
 
506
496
  Yoyodyne, Inc., hereby disclaims all copyright interest in the
507
- library `Frob' (a library for tweaking knobs) written by James
508
- Random Hacker.
497
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
509
498
 
510
499
  <signature of Ty Coon>, 1 April 1990
511
500
  Ty Coon, President of Vice
512
501
 
513
502
  That's all there is to it!
514
-
515
-
data/Changes CHANGED
@@ -1,11 +1,31 @@
1
+ ncurses-ruby-1.4.11
2
+ * Fixed some incorrectly declared method arguments.
3
+ * Fixed warnings about "undefining the allocator of T_DATA class".
4
+
5
+ ncurses-ruby-1.4.10
6
+ * Auto detection of ncurses vs ncursesw installation.
7
+ * Added --with-ncurses-dir={path} option to specify location for libs and
8
+ include files.
9
+
10
+ ncurses-ruby-1.4.9
11
+ * (Updated readme, mailing list, etc.)
12
+
13
+ ncurses-ruby-1.4.8
14
+ * (bug fixes)
15
+
16
+ ncurses-ruby-1.4.7
17
+ * (bug fixes)
18
+
19
+ --- (Change log was not maintained for a while here) ---
20
+
1
21
  ncurses-ruby-1.1
2
- * Bugfixes by T. Sutherland in _tracef and _tracedump.
22
+ * Bugfixes by T. Sutherland in _tracef and _tracedump.
3
23
 
4
24
  ncurses-ruby-1.0
5
- * Mousemask bugfix from P.Duncan.
6
- * Solved timing problems that affected visual smoothness of reactions
7
- to user input
8
- * Each SCREEN got back its own "halfdelay" and "cbreak" settings
25
+ * Mousemask bugfix from P.Duncan.
26
+ * Solved timing problems that affected visual smoothness of reactions
27
+ to user input
28
+ * Each SCREEN got back its own "halfdelay" and "cbreak" settings
9
29
 
10
30
  ncurses-ruby-0.9.2
11
31
  * Preventing getch and wgetch functions from blocking other ruby threads.
data/examples/example.rb CHANGED
@@ -6,8 +6,8 @@
6
6
  # Copyright (C) 2002 Tobias Peters <t-peters@users.berlios.de>
7
7
  #
8
8
  # The following license applys only to this file. It is less restrictive
9
- # than the license for the rest of the ncurses-ruby distribution.
10
- # I've adapted this file from someone else, see below.
9
+ # than the license for the rest of the ncurses-ruby distribution.
10
+ # I've adapted this file from someone else, see below.
11
11
  #
12
12
  # Permission is hereby granted, free of charge, to any person
13
13
  # obtaining a copy of this file
@@ -16,10 +16,10 @@
16
16
  # publish, distribute, sublicense, and/or sell copies of the Software,
17
17
  # and to permit persons to whom the Software is furnished to do so,
18
18
  # subject to the following conditions:
19
- #
19
+ #
20
20
  # The above copyright notice and this permission notice shall be
21
21
  # included in all copies or substantial portions of the Software.
22
- #
22
+ #
23
23
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
24
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
25
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -36,7 +36,7 @@
36
36
  # statement:
37
37
 
38
38
  # Copyright (c) 2000 by Harry Henry Gebel
39
- #
39
+ #
40
40
  # Permission is hereby granted, free of charge, to any person
41
41
  # obtaining a copy of this software and associated documentation files
42
42
  # (the "Software"), to deal in the Software without restriction,
@@ -44,10 +44,10 @@
44
44
  # publish, distribute, sublicense, and/or sell copies of the Software,
45
45
  # and to permit persons to whom the Software is furnished to do so,
46
46
  # subject to the following conditions:
47
- #
47
+ #
48
48
  # The above copyright notice and this permission notice shall be
49
49
  # included in all copies or substantial portions of the Software.
50
- #
50
+ #
51
51
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
52
52
  # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53
53
  # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
data/examples/form.rb CHANGED
@@ -5,9 +5,9 @@
5
5
  # For a more rubyish approach that uses Ruby objects see form2.rb
6
6
  #
7
7
  # The original example contained the following copyright:
8
- # Copyright (c) 2001 by Pradeep Padala. This document may be distributed
8
+ # Copyright (c) 2001 by Pradeep Padala. This document may be distributed
9
9
  # under the terms set forth in the LDP license at linuxdoc.org/COPYRIGHT.html.
10
-
10
+
11
11
  require 'ncursesw.rb'
12
12
 
13
13
  begin
@@ -20,7 +20,7 @@ begin
20
20
  fields = Array.new
21
21
  fields.push(Ncurses::Form.new_field(1,10,4,18,0,0))
22
22
  fields.push(Ncurses::Form.new_field(1,10,6,18,0,0))
23
-
23
+
24
24
  # set field options
25
25
  Ncurses::Form.set_field_back(fields[0], Ncurses::A_UNDERLINE)
26
26
  Ncurses::Form.field_opts_off(fields[0], Ncurses::Form::O_AUTOSKIP)
@@ -29,7 +29,7 @@ begin
29
29
  Ncurses::Form.field_opts_off(fields[1], Ncurses::Form::O_AUTOSKIP)
30
30
 
31
31
 
32
- # create a form
32
+ # create a form
33
33
  form = Ncurses::Form.new_form(fields)
34
34
 
35
35
  # post the form and refresh the screen
@@ -49,24 +49,24 @@ begin
49
49
  # Go to the end of the present buffer
50
50
  # Leaves nicely at the last character
51
51
  Ncurses::Form.form_driver(form, Ncurses::Form::REQ_END_LINE)
52
-
52
+
53
53
  when Ncurses::KEY_UP
54
54
  #Go to previous field
55
55
  Ncurses::Form.form_driver(form, Ncurses::Form::REQ_PREV_FIELD)
56
56
  Ncurses::Form.form_driver(form, Ncurses::Form::REQ_END_LINE);
57
- else
57
+ else
58
58
  # If this is a normal character, it gets Printed
59
59
  Ncurses::Form.form_driver(form, ch)
60
60
  end
61
61
  end
62
-
62
+
63
63
  # unpost and free form
64
64
  Ncurses::Form.unpost_form(form);
65
65
  Ncurses::Form.free_form(form)
66
66
  Ncurses::Form.free_field(fields[0]);
67
67
  Ncurses::Form.free_field(fields[1]);
68
68
 
69
-
69
+
70
70
  #using class methods this time
71
71
  # form = Ncurses::Form::FORM.new(fields)
72
72
  # puts "Created form: #{form.inspect}\n"
data/examples/form2.rb CHANGED
@@ -3,12 +3,12 @@
3
3
  # Simple example of a form in action, based on the NCURSES Programming HOWTO:
4
4
  # http://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/
5
5
  #
6
- # All standard field types are created in the form.
7
- # Additionnally a custom field is created to illustrate
6
+ # All standard field types are created in the form.
7
+ # Additionnally a custom field is created to illustrate
8
8
  # custom field validation using Ruby Proc objects, as shown in the example.
9
9
  #
10
10
  # The original example contained the following copyright:
11
- # Copyright (c) 2001 by Pradeep Padala. This document may be distributed
11
+ # Copyright (c) 2001 by Pradeep Padala. This document may be distributed
12
12
  # under the terms set forth in the LDP license at linuxdoc.org/COPYRIGHT.html.
13
13
 
14
14
  require 'ncursesw'
@@ -44,20 +44,20 @@ end
44
44
 
45
45
  fields = Array.new
46
46
 
47
- states = {"MI" => "Michigan",
48
- "VA" => "Virginia",
47
+ states = {"MI" => "Michigan",
48
+ "VA" => "Virginia",
49
49
  "VE" => "Vermont"}
50
- fieldcheck = proc { |afield|
50
+ fieldcheck = proc { |afield|
51
51
  val = afield.field_buffer(0)
52
52
  val.strip!
53
- if (states[val] != nil)
53
+ if (states[val] != nil)
54
54
  afield.set_field_buffer(0,states[val])
55
55
  return true
56
56
  else
57
57
  return false
58
58
  end
59
59
  }
60
- charcheck = proc { |ch|
60
+ charcheck = proc { |ch|
61
61
  if (('A'..'Z').include?(ch))
62
62
  return true
63
63
  else
@@ -73,7 +73,7 @@ begin
73
73
  Ncurses.noecho();
74
74
  Ncurses.keypad(stdscr, true);
75
75
 
76
- # Initialize few color pairs
76
+ # Initialize few color pairs
77
77
  Ncurses.init_pair(1, COLOR_RED, COLOR_BLACK);
78
78
  Ncurses.init_pair(2, COLOR_BLACK, COLOR_WHITE);
79
79
  Ncurses.init_pair(3, COLOR_BLACK, COLOR_BLUE);
@@ -108,7 +108,7 @@ begin
108
108
  cols = Array.new()
109
109
  my_form.scale_form(rows, cols);
110
110
 
111
- # Create the window to be associated with the form
111
+ # Create the window to be associated with the form
112
112
  my_form_win = WINDOW.new(rows[0] + 3, cols[0] + 14, 1, 1);
113
113
  my_form_win.bkgd(Ncurses.COLOR_PAIR(3));
114
114
  my_form_win.keypad(TRUE);
@@ -133,7 +133,7 @@ begin
133
133
  my_form_win.mvaddstr(16, 2, "Regexp")
134
134
  my_form_win.mvaddstr(18, 2, "IP")
135
135
  my_form_win.mvaddstr(20, 2, "Custom")
136
-
136
+
137
137
  my_form_win.wrefresh();
138
138
 
139
139
  stdscr.mvprintw(Ncurses.LINES - 2, 28, "Use UP, DOWN arrow keys to switch between fields");
@@ -150,7 +150,7 @@ begin
150
150
  # Go to the end of the present buffer
151
151
  # Leaves nicely at the last character
152
152
  my_form.form_driver(REQ_END_LINE);
153
-
153
+
154
154
  when KEY_UP
155
155
  # Go to previous field
156
156
  my_form.form_driver(REQ_VALIDATION);
@@ -168,7 +168,7 @@ begin
168
168
  when KEY_BACKSPACE
169
169
  my_form.form_driver(REQ_DEL_PREV);
170
170
  else
171
- # If this is a normal character, it gets Printed
171
+ # If this is a normal character, it gets Printed
172
172
  my_form.form_driver(ch);
173
173
  end
174
174
  end
data/extconf.rb CHANGED
@@ -25,6 +25,13 @@ require "mkmf"
25
25
 
26
26
  $CFLAGS += " -g -Wformat -Werror=format-security -Waddress"
27
27
 
28
+ if find_executable('pkg-config')
29
+ $CFLAGS += ' ' + `pkg-config --cflags ncursesw`.strip
30
+ $LDFLAGS += ' ' + `pkg-config --libs ncursesw`.strip
31
+ end
32
+
33
+ dir_config("ncurses")
34
+
28
35
  have_header("unistd.h")
29
36
  have_header("locale.h")
30
37
 
@@ -42,6 +49,9 @@ end
42
49
 
43
50
  if have_library("ncursesw", "wmove")
44
51
  curses_lib = "ncursesw"
52
+ elsif have_library("ncurses", "add_wch")
53
+ curses_lib = "ncurses"
54
+ curses_is_wide = true
45
55
  elsif have_library("pdcurses", "wmove")
46
56
  curses_lib = "pdcurses"
47
57
  else
@@ -140,7 +150,8 @@ end
140
150
 
141
151
  puts "checking for the form library..."
142
152
  if have_header("form.h") or have_header("ncursesw/form.h")
143
- if not have_library("formw", "new_form")
153
+ if not have_library("formw", "new_form") ||
154
+ (curses_is_wide && have_library("form", "new_form"))
144
155
  raise "formw library not found"
145
156
  end
146
157
  else
@@ -183,4 +194,3 @@ have_header("sys/time.h")
183
194
  $CXXFLAGS = $CFLAGS
184
195
 
185
196
  create_makefile('ncursesw_bin')
186
-
data/form_wrap.c CHANGED
@@ -1367,6 +1367,7 @@ void init_form(void)
1367
1367
  /* Forms */
1368
1368
  rb_iv_set(mForm, "@forms_hash", rb_hash_new());
1369
1369
  cFORM = rb_define_class_under(mForm, "FORM", rb_cObject);
1370
+ rb_undef_alloc_func(cFORM);
1370
1371
  rb_define_singleton_method(cFORM, "new",
1371
1372
  (&rbncurs_m_new_form),
1372
1373
  1);
@@ -1413,22 +1414,23 @@ void init_form(void)
1413
1414
  /* Fields */
1414
1415
  rb_iv_set(mForm, "@fields_hash", rb_hash_new());
1415
1416
  cFIELD = rb_define_class_under(mForm, "FIELD", rb_cObject);
1417
+ rb_undef_alloc_func(cFIELD);
1416
1418
  rb_define_singleton_method(cFIELD, "new",
1417
1419
  (&rbncurs_m_new_field),
1418
1420
  6);
1419
1421
  RB_CLASS_METH(cFIELD, "dup", dup_field,2);
1420
1422
  RB_CLASS_METH(cFIELD, "dynamic_info", dynamic_field_info,3);
1421
1423
  RB_CLASS_METH(cFIELD, "arg", field_arg,0);
1422
- RB_CLASS_METH(cFIELD, "back", field_back,1);
1424
+ RB_CLASS_METH(cFIELD, "back", field_back,0);
1423
1425
  RB_CLASS_METH(cFIELD, "buffer", field_buffer,1);
1424
- RB_CLASS_METH(cFIELD, "fore", field_fore,1);
1426
+ RB_CLASS_METH(cFIELD, "fore", field_fore,0);
1425
1427
  RB_CLASS_METH(cFIELD, "index", field_index,0);
1426
1428
  RB_CLASS_METH(cFIELD, "info", field_info,6);
1427
1429
  RB_CLASS_METH(cFIELD, "just", field_just,0);
1428
1430
  RB_CLASS_METH(cFIELD, "opts", field_opts,0);
1429
1431
  RB_CLASS_METH(cFIELD, "opts_off", field_opts_off,1);
1430
1432
  RB_CLASS_METH(cFIELD, "opts_on", field_opts_on,1);
1431
- RB_CLASS_METH(cFIELD, "pad", field_pad,1);
1433
+ RB_CLASS_METH(cFIELD, "pad", field_pad,0);
1432
1434
  RB_CLASS_METH(cFIELD, "status", field_status,0);
1433
1435
  RB_CLASS_METH(cFIELD, "type", field_type,0);
1434
1436
  /* RB_CLASS_METH(cFIELD, "userptr", field_userptr,0); */
@@ -1454,6 +1456,7 @@ void init_form(void)
1454
1456
  /* Field types */
1455
1457
  rb_iv_set(mForm, "@fieldtypes_hash", rb_hash_new());
1456
1458
  cFIELDTYPE = rb_define_class_under(mForm, "FIELDTYPE", rb_cObject);
1459
+ rb_undef_alloc_func(cFIELDTYPE);
1457
1460
  rb_define_singleton_method(cFIELDTYPE, "new",
1458
1461
  (&rbncurs_m_new_fieldtype),
1459
1462
  2);
data/menu_wrap.c CHANGED
@@ -1074,6 +1074,7 @@ void init_menu(void)
1074
1074
  /* Menus */
1075
1075
  rb_iv_set(mMenu, "@menus_hash", rb_hash_new());
1076
1076
  cMENU = rb_define_class_under(mMenu, "MENU", rb_cObject);
1077
+ rb_undef_alloc_func(cMENU);
1077
1078
  rb_define_singleton_method(cMENU, "new", (&rbncurs_m_new_menu), 1);
1078
1079
 
1079
1080
  RB_CLASS_METH(cMENU, NULL, current_item, 0);
@@ -1127,6 +1128,7 @@ void init_menu(void)
1127
1128
  /* Items */
1128
1129
  rb_iv_set(mMenu, "@items_hash", rb_hash_new());
1129
1130
  cITEM = rb_define_class_under(mMenu, "ITEM", rb_cObject);
1131
+ rb_undef_alloc_func(cITEM);
1130
1132
  rb_define_singleton_method(cITEM, "new", (&rbncurs_m_new_item), 2);
1131
1133
 
1132
1134
  RB_CLASS_METH(cITEM, "free", free_item, 0);
data/menu_wrap.h CHANGED
@@ -1,10 +1,10 @@
1
1
  /*
2
2
  * This is a curses menu wrapper as part of ncurses-ruby.
3
- * It borrows heavily from form_wrap.h.
3
+ * It borrows heavily from form_wrap.h.
4
4
  * Contributed by Earle Clubb <eclubb@valcom.com>
5
5
  * Valcom Inc. <http://www.valcom.com>
6
6
  * Copyright 2007
7
- *
7
+ *
8
8
  * This module is free software; you can redistribute it and/or
9
9
  * modify it under the terms of the GNU Lesser General Public
10
10
  * License as published by the Free Software Foundation; either
data/ncurses_wrap.c CHANGED
@@ -2592,7 +2592,7 @@ static void init_functions_3(void)
2592
2592
  #ifdef HAVE_WENCLOSE
2593
2593
  rb_define_module_function(mNcurses, "wenclose?",
2594
2594
  (&rbncurs_wenclose),
2595
- 1);
2595
+ 3);
2596
2596
  #endif
2597
2597
  #ifdef HAVE_MOUSEINTERVAL
2598
2598
  NCFUNC(mouseinterval, 1);
@@ -2606,7 +2606,7 @@ static void init_functions_3(void)
2606
2606
  #ifdef HAVE_HAS_KEY
2607
2607
  rb_define_module_function(mNcurses, "has_key?",
2608
2608
  (&rbncurs_has_key),
2609
- 2);
2609
+ 1);
2610
2610
  #endif
2611
2611
  NCFUNC(getyx, 3);
2612
2612
  NCFUNC(getbegyx, 3);
@@ -2865,7 +2865,9 @@ void Init_ncursesw_bin(void)
2865
2865
  rb_iv_set(mNcurses, "@infd", Qnil);
2866
2866
 
2867
2867
  cWINDOW = rb_define_class_under(mNcurses, "WINDOW", rb_cObject);
2868
+ rb_undef_alloc_func(cWINDOW);
2868
2869
  cSCREEN = rb_define_class_under(mNcurses, "SCREEN", rb_cObject);
2870
+ rb_undef_alloc_func(cSCREEN);
2869
2871
  init_constants_1();
2870
2872
  init_constants_2();
2871
2873
  init_constants_3();
data/panel_wrap.c CHANGED
@@ -2,7 +2,7 @@
2
2
  * ncurses-ruby is a ruby module for accessing the FSF's ncurses library
3
3
  * (C) 2002 Tobias Peters <t-peters@berlios.de>
4
4
  * (C) 2011 Tobias Herzke
5
- *
5
+ *
6
6
  * This module is free software; you can redistribute it and/or
7
7
  * modify it under the terms of the GNU Lesser General Public
8
8
  * License as published by the Free Software Foundation; either
@@ -100,11 +100,11 @@ static VALUE rbncurs_m_new_panel(VALUE dummy, VALUE rb_window)
100
100
  { return rbncurs_c_new_panel(rb_window); }
101
101
  static VALUE rbncurs_c_panel_above(VALUE rb_panel)
102
102
  { return wrap_panel(panel_above(get_panel(rb_panel))); }
103
- static VALUE rbncurs_m_panel_above(VALUE rb_panel)
103
+ static VALUE rbncurs_m_panel_above(VALUE dummy, VALUE rb_panel)
104
104
  { return rbncurs_c_panel_above(rb_panel); }
105
105
  static VALUE rbncurs_c_panel_below(VALUE rb_panel)
106
106
  { return wrap_panel(panel_below(get_panel(rb_panel))); }
107
- static VALUE rbncurs_m_panel_below(VALUE rb_panel)
107
+ static VALUE rbncurs_m_panel_below(VALUE dummy, VALUE rb_panel)
108
108
  { return rbncurs_c_panel_below(rb_panel); }
109
109
  static VALUE rbncurs_c_set_panel_userptr(VALUE rb_panel, VALUE userptr)
110
110
  { return INT2NUM(set_panel_userptr(get_panel(rb_panel),
@@ -135,6 +135,7 @@ void init_panel(void)
135
135
  mPanel = rb_define_module_under(mNcurses, "Panel");
136
136
  rb_iv_set(mPanel, "@panels_hash", rb_hash_new());
137
137
  cPANEL = rb_define_class_under(mPanel, "PANEL", rb_cObject);
138
+ rb_undef_alloc_func(cPANEL);
138
139
  rb_define_singleton_method(mPanel, "del_panel",
139
140
  (&rbncurs_m_del_panel),
140
141
  1);
@@ -163,7 +164,7 @@ void init_panel(void)
163
164
  1);
164
165
  rb_define_method(cPANEL, "hide_panel",
165
166
  (&rbncurs_c_hide_panel), 0);
166
-
167
+
167
168
  rb_define_method(cPANEL, "hide",
168
169
  (&rbncurs_c_hide_panel), 0);
169
170
  rb_define_singleton_method(mPanel, "show_panel",
@@ -171,14 +172,14 @@ void init_panel(void)
171
172
  1);
172
173
  rb_define_method(cPANEL, "show_panel",
173
174
  (&rbncurs_c_show_panel), 0);
174
-
175
+
175
176
  rb_define_method(cPANEL, "show",
176
177
  (&rbncurs_c_show_panel), 0);
177
178
  rb_define_singleton_method(mPanel, "top_panel",
178
179
  (&rbncurs_m_top_panel), 1);
179
180
  rb_define_method(cPANEL, "top_panel",
180
181
  (&rbncurs_c_top_panel), 0);
181
-
182
+
182
183
  rb_define_method(cPANEL, "top",
183
184
  (&rbncurs_c_top_panel), 0);
184
185
  rb_define_singleton_method(mPanel, "bottom_panel",
@@ -186,7 +187,7 @@ void init_panel(void)
186
187
  1);
187
188
  rb_define_method(cPANEL, "bottom_panel",
188
189
  (&rbncurs_c_bottom_panel), 0);
189
-
190
+
190
191
  rb_define_method(cPANEL, "bottom",
191
192
  (&rbncurs_c_bottom_panel), 0);
192
193
  rb_define_singleton_method(mPanel, "new_panel",
@@ -229,7 +230,7 @@ void init_panel(void)
229
230
  rb_define_method(cPANEL, "panel_userptr",
230
231
  (&rbncurs_c_panel_userptr),
231
232
  0);
232
- rb_define_method(cPANEL, "userptr",
233
+ rb_define_method(cPANEL, "userptr",
233
234
  (&rbncurs_c_panel_userptr),
234
235
  0);
235
236
  rb_define_singleton_method(mPanel, "move_panel",
data/panel_wrap.h CHANGED
@@ -2,7 +2,7 @@
2
2
  * ncurses-ruby is a ruby module for accessing the FSF's ncurses library
3
3
  * (C) 2002 Tobias Peters <t-peters@berlios.de>
4
4
  * (C) 2011 Tobias Herzke
5
- *
5
+ *
6
6
  * This module is free software; you can redistribute it and/or
7
7
  * modify it under the terms of the GNU Lesser General Public
8
8
  * License as published by the Free Software Foundation; either
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ncursesw
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.9
4
+ version: 1.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Herzke
8
8
  - Sup developers
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-05 00:00:00.000000000 Z
12
+ date: 1980-01-01 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Tweaked version of ncursesw from http://ncurses-ruby.berlios.de/.
15
15
  email:
@@ -50,7 +50,7 @@ homepage: http://github.com/sup-heliotrope/ncursesw-ruby
50
50
  licenses:
51
51
  - LGPL-2.1
52
52
  metadata: {}
53
- post_install_message:
53
+ post_install_message:
54
54
  rdoc_options: []
55
55
  require_paths:
56
56
  - lib
@@ -65,9 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  requirements: []
68
- rubyforge_project:
69
- rubygems_version: 2.2.2
70
- signing_key:
68
+ rubygems_version: 3.4.22
69
+ signing_key:
71
70
  specification_version: 4
72
71
  summary: 'This wrapper provides access to the functions, macros, global variables
73
72
  and constants of the ncurses library. These are mapped to a Ruby Module named "Ncurses": Functions