curses 1.1.3-x86-mingw32 → 1.2.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +13 -0
- data/README.md +1 -0
- data/curses.gemspec +1 -1
- data/ext/curses/curses.c +37 -11
- data/ext/curses/extconf.rb +2 -2
- data/lib/2.2/curses.so +0 -0
- data/lib/2.3/curses.so +0 -0
- data/lib/2.4/curses.so +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed6a99bc0bc081a4d7023f5c2e487aa31b2736b8
|
4
|
+
data.tar.gz: 9a9181fca6c0f623277ec99f20f821abf37a5e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a898b5e027249f722b713d88264fd8d6c954c4bf158e434c387b709b83ae9c897037445658a608e90ea0a6dd7f069522dcaf90f15dc88e793681811034d1f56c
|
7
|
+
data.tar.gz: 80759911360084014eba6f71abb2b4e57964afc5d56a560df65352e79f87a35d28d5da21eb5f7ebb457d54da3a37af880dd0db3b16cb58b354a327144c7ecfbf
|
data/History.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 1.2.0 / 2017-02-19
|
2
|
+
|
3
|
+
New features:
|
4
|
+
|
5
|
+
* Add Curses.assume_default_colors.
|
6
|
+
|
7
|
+
Bug fixes:
|
8
|
+
|
9
|
+
* Curses.unget_char should use String#ord even if unget_wch() is not available.
|
10
|
+
* The default value of keyboard_encoding should be ASCII-8BIT if get_wch() is
|
11
|
+
not available.
|
12
|
+
* NUM2ULONG() should be used in Window#bkgd etc.
|
13
|
+
|
1
14
|
### 1.1.3 / 2017-02-08
|
2
15
|
|
3
16
|
Bug fixes:
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# curses
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/curses.svg)](https://badge.fury.io/rb/curses)
|
3
4
|
[![Build Status](https://travis-ci.org/ruby/curses.svg?branch=master)](https://travis-ci.org/ruby/curses)
|
4
5
|
[![Build status](https://ci.appveyor.com/api/projects/status/kdvksgjo4fyd3c4m/branch/master?svg=true)](https://ci.appveyor.com/project/ruby/curses/branch/master)
|
5
6
|
|
data/curses.gemspec
CHANGED
data/ext/curses/curses.c
CHANGED
@@ -954,7 +954,7 @@ curses_bkgdset(VALUE obj, VALUE ch)
|
|
954
954
|
{
|
955
955
|
#ifdef HAVE_BKGDSET
|
956
956
|
curses_stdscr();
|
957
|
-
bkgdset(
|
957
|
+
bkgdset(NUM2ULONG(ch));
|
958
958
|
#endif
|
959
959
|
return Qnil;
|
960
960
|
}
|
@@ -975,7 +975,7 @@ curses_bkgd(VALUE obj, VALUE ch)
|
|
975
975
|
{
|
976
976
|
#ifdef HAVE_BKGD
|
977
977
|
curses_stdscr();
|
978
|
-
return (bkgd(
|
978
|
+
return (bkgd(NUM2ULONG(ch)) == OK) ? Qtrue : Qfalse;
|
979
979
|
#else
|
980
980
|
return Qfalse;
|
981
981
|
#endif
|
@@ -998,6 +998,23 @@ curses_use_default_colors(VALUE obj)
|
|
998
998
|
#define curses_use_default_colors rb_f_notimplement
|
999
999
|
#endif
|
1000
1000
|
|
1001
|
+
#if defined(HAVE_ASSUME_DEFAULT_COLORS)
|
1002
|
+
/*
|
1003
|
+
* tells which colors to paint for color pair 0.
|
1004
|
+
*
|
1005
|
+
* see also the system manual for default_colors(3)
|
1006
|
+
*/
|
1007
|
+
static VALUE
|
1008
|
+
curses_assume_default_colors(VALUE obj, VALUE fg, VALUE bg)
|
1009
|
+
{
|
1010
|
+
curses_stdscr();
|
1011
|
+
assume_default_colors(NUM2INT(fg), NUM2INT(bg));
|
1012
|
+
return Qnil;
|
1013
|
+
}
|
1014
|
+
#else
|
1015
|
+
#define curses_assume_default_colors rb_f_notimplement
|
1016
|
+
#endif
|
1017
|
+
|
1001
1018
|
#if defined(HAVE_TABSIZE)
|
1002
1019
|
/*
|
1003
1020
|
* Document-method: Curses.TABSIZE=
|
@@ -2385,7 +2402,7 @@ window_bkgdset(VALUE obj, VALUE ch)
|
|
2385
2402
|
struct windata *winp;
|
2386
2403
|
|
2387
2404
|
GetWINDOW(obj,winp);
|
2388
|
-
wbkgdset(winp->window,
|
2405
|
+
wbkgdset(winp->window, NUM2ULONG(ch));
|
2389
2406
|
#endif
|
2390
2407
|
return Qnil;
|
2391
2408
|
}
|
@@ -2406,7 +2423,7 @@ window_bkgd(VALUE obj, VALUE ch)
|
|
2406
2423
|
struct windata *winp;
|
2407
2424
|
|
2408
2425
|
GetWINDOW(obj,winp);
|
2409
|
-
return (wbkgd(winp->window,
|
2426
|
+
return (wbkgd(winp->window, NUM2ULONG(ch)) == OK) ? Qtrue : Qfalse;
|
2410
2427
|
#else
|
2411
2428
|
return Qfalse;
|
2412
2429
|
#endif
|
@@ -2425,7 +2442,7 @@ window_getbkgd(VALUE obj)
|
|
2425
2442
|
struct windata *winp;
|
2426
2443
|
|
2427
2444
|
GetWINDOW(obj,winp);
|
2428
|
-
return (c = getbkgd(winp->window) != ERR) ?
|
2445
|
+
return (c = getbkgd(winp->window) != ERR) ? ULONG2NUM(c) : Qnil;
|
2429
2446
|
#else
|
2430
2447
|
return Qnil;
|
2431
2448
|
#endif
|
@@ -2747,9 +2764,8 @@ curses_set_terminal_encoding(VALUE obj, VALUE enc)
|
|
2747
2764
|
static VALUE
|
2748
2765
|
curses_unget_char(VALUE obj, VALUE ch)
|
2749
2766
|
{
|
2750
|
-
#ifdef HAVE_UNGET_WCH
|
2751
2767
|
ID id_ord;
|
2752
|
-
|
2768
|
+
unsigned int c;
|
2753
2769
|
|
2754
2770
|
curses_stdscr();
|
2755
2771
|
if (FIXNUM_P(ch)) {
|
@@ -2757,11 +2773,15 @@ curses_unget_char(VALUE obj, VALUE ch)
|
|
2757
2773
|
}
|
2758
2774
|
else {
|
2759
2775
|
StringValue(ch);
|
2760
|
-
#ifdef HAVE_UNGET_WCH
|
2761
2776
|
CONST_ID(id_ord, "ord");
|
2762
|
-
|
2777
|
+
c = NUM2UINT(rb_funcall(ch, id_ord, 0));
|
2778
|
+
#ifdef HAVE_UNGET_WCH
|
2779
|
+
unget_wch(c);
|
2763
2780
|
#else
|
2764
|
-
|
2781
|
+
if (c > 0xff) {
|
2782
|
+
rb_raise(rb_eRangeError, "Out of range: %u", c);
|
2783
|
+
}
|
2784
|
+
ungetch(c);
|
2765
2785
|
#endif
|
2766
2786
|
}
|
2767
2787
|
return Qnil;
|
@@ -2929,7 +2949,12 @@ window_get_char(VALUE obj)
|
|
2929
2949
|
void
|
2930
2950
|
Init_curses(void)
|
2931
2951
|
{
|
2932
|
-
|
2952
|
+
#ifdef HAVE_GET_WCH
|
2953
|
+
keyboard_encoding = rb_locale_encoding();
|
2954
|
+
#else
|
2955
|
+
keyboard_encoding = rb_ascii8bit_encoding();
|
2956
|
+
#endif
|
2957
|
+
terminal_encoding = rb_locale_encoding();
|
2933
2958
|
|
2934
2959
|
mCurses = rb_define_module("Curses");
|
2935
2960
|
|
@@ -2975,6 +3000,7 @@ Init_curses(void)
|
|
2975
3000
|
rb_define_module_function(mCurses, "TABSIZE=", curses_tabsize_set, 1);
|
2976
3001
|
|
2977
3002
|
rb_define_module_function(mCurses, "use_default_colors", curses_use_default_colors, 0);
|
3003
|
+
rb_define_module_function(mCurses, "assume_default_colors", curses_assume_default_colors, 2);
|
2978
3004
|
rb_define_module_function(mCurses, "init_screen", curses_init_screen, 0);
|
2979
3005
|
rb_define_module_function(mCurses, "close_screen", curses_close_screen, 0);
|
2980
3006
|
rb_define_module_function(mCurses, "closed?", curses_closed, 0);
|
data/ext/curses/extconf.rb
CHANGED
@@ -61,8 +61,8 @@ if header_library
|
|
61
61
|
wattroff wattron wattrset wbkgd wbkgdset wdeleteln wgetnstr
|
62
62
|
wresize wscrl wsetscrreg werase redrawwin
|
63
63
|
def_prog_mode reset_prog_mode timeout wtimeout nodelay
|
64
|
-
init_color wcolor_set use_default_colors
|
65
|
-
unget_wch get_wch wget_wch)
|
64
|
+
init_color wcolor_set use_default_colors assume_default_colors
|
65
|
+
newpad unget_wch get_wch wget_wch)
|
66
66
|
have_func(f) || (have_macro(f, curses) && $defs.push(format("-DHAVE_%s", f.upcase)))
|
67
67
|
end
|
68
68
|
flag = "-D_XOPEN_SOURCE_EXTENDED"
|
data/lib/2.2/curses.so
CHANGED
Binary file
|
data/lib/2.3/curses.so
CHANGED
Binary file
|
data/lib/2.4/curses.so
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: curses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Shugo Maeda
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-02-
|
12
|
+
date: 2017-02-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.6.
|
112
|
+
rubygems_version: 2.6.10
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: A Ruby binding for curses, ncurses, and PDCurses. curses is an extension
|