curses 1.2.1-x86-mingw32 → 1.2.2-x86-mingw32

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
2
  SHA1:
3
- metadata.gz: cb99c35ac3745ca7c0ad7d263a17a5b1e4ba062e
4
- data.tar.gz: bfe75799c36d3d7d7cce20fc74c3f71a5c8538c5
3
+ metadata.gz: 1f3d8d7657551aeedc577c13b92d6999c3955d12
4
+ data.tar.gz: 2494cab8da17cf5d9e9a358b86ab98c6cc7934fd
5
5
  SHA512:
6
- metadata.gz: 8c7d056f6d65d971112ade3799b6788255da86c9141f3c31a032fe4428e7e7893c397c418ba5612b2a706bf7401f02cc7b3e77a9a8bf796b4d23c45b97cbb855
7
- data.tar.gz: c10992c9292f16fca86d66173e0f78367c31c35f785e27b6fb77029c36fe71a9e1422cbc7a5f5f4da82008dab5a1057eb34285d42e7390bdc9e168863b3dbd44
6
+ metadata.gz: 441ebd565fec09af89f27c002eb84804e51c8c94f9684c77c24eae946a51c7e89e54e41f641f59401d6be0cdf1cb5bbe8c9cf90ac55b16f42acf5188b54f7171
7
+ data.tar.gz: 8c4f11f6099263db5c00af27cf66bca483d271476578890ef17e9052b44595173ff17c58fea9cf75aa45348bce960f25a9526ac93b1091ae8e49be9a8b68f42b
data/.gitignore CHANGED
@@ -10,5 +10,6 @@
10
10
  /Gemfile.lock
11
11
  /vendor/x86-mingw32
12
12
  /vendor/x64-mingw32
13
+ /vendor/x64-mswin64*
13
14
  /ext/curses/Makefile
14
15
  .ruby-version
data/.travis.yml CHANGED
@@ -6,9 +6,8 @@ notifications:
6
6
  - drbrain@segment7.net
7
7
  - shugo@ruby-lang.org
8
8
  rvm:
9
- - 2.1.10
10
- - 2.2.6
11
- - 2.3.3
12
- - 2.4.0
9
+ - 2.2.7
10
+ - 2.3.4
11
+ - 2.4.1
13
12
  - ruby-head
14
13
  script: rake compile
data/History.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 1.2.2 / 2017-04-22
2
+
3
+ New features:
4
+
5
+ * Add Curses.get_key_modifiers, Curses.return_key_modifiers, and
6
+ Curses.save_key_modifiers.
7
+ * Support mswin native build. Pull request #29 by usa.
8
+
1
9
  ### 1.2.1 / 2017-03-27
2
10
 
3
11
  New features:
data/Rakefile CHANGED
@@ -9,6 +9,9 @@ rescue LoadError => e
9
9
  warn "run: bundle install\n\n"
10
10
  end
11
11
 
12
+ $mswin = /mswin/ =~ RUBY_PLATFORM
13
+
14
+ CLOBBER.include("vendor/#{RUBY_PLATFORM}") if $mswin
12
15
  CLOBBER.include("vendor/x86-mingw32")
13
16
  CLOBBER.include("vendor/x64-mingw32")
14
17
  CLOBBER.include("lib/2.*")
@@ -17,11 +20,18 @@ CLOBBER.include("pkg")
17
20
  namespace :build do
18
21
  desc "Build PDCurses"
19
22
  task :pdcurses do
23
+ mkdir_p "vendor/#{RUBY_PLATFORM}/PDCurses" if $mswin
20
24
  mkdir_p "vendor/x86-mingw32/PDCurses"
21
25
  mkdir_p "vendor/x64-mingw32/PDCurses"
22
26
  chdir "vendor/PDCurses/win32" do
27
+ if $mswin
28
+ sh "nmake -f vcwin32.mak clean all WIDE=Y"
29
+ cp "pdcurses.lib", "../../#{RUBY_PLATFORM}/PDCurses"
30
+ end
31
+
23
32
  sh "make -f mingwin32.mak clean all _linux_w32=1 WIDE=Y DLL=Y"
24
33
  cp "pdcurses.dll", "../../x86-mingw32/PDCurses"
34
+
25
35
  sh "make -f mingwin32.mak clean all _linux_w64=1 WIDE=Y DLL=Y"
26
36
  cp "pdcurses.dll", "../../x64-mingw32/PDCurses"
27
37
  end
@@ -32,6 +42,7 @@ namespace :clean do
32
42
  desc "Clean PDCurses"
33
43
  task :pdcurses do
34
44
  chdir "vendor/PDCurses/win32" do
45
+ sh "nmake -f vcwin32.mak clean" if $mswin
35
46
  sh "make -f mingwin32.mak clean _linux_w64=1"
36
47
  end
37
48
  end
@@ -39,6 +50,14 @@ end
39
50
 
40
51
  spec = eval(File.read(File.expand_path("curses.gemspec", __dir__)))
41
52
  Rake::ExtensionTask.new(spec.name, spec) do |ext|
53
+ if $mswin
54
+ ext.config_options << '--with-curses-include=' +
55
+ File.expand_path("vendor/PDCurses", __dir__) +
56
+ ' --with-curses-version=function --enable-pdcurses-wide' +
57
+ ' --with-curses-lib=' +
58
+ File.expand_path("vendor/#{RUBY_PLATFORM}/PDCurses", __dir__)
59
+ end
60
+
42
61
  ext.cross_compile = true
43
62
  ext.cross_platform = ["x86-mingw32", "x64-mingw32"]
44
63
  ext.cross_config_options << '--with-curses-include=' +
data/appveyor.yml CHANGED
@@ -12,6 +12,5 @@ test: off
12
12
  deploy: off
13
13
  environment:
14
14
  matrix:
15
- - ruby_version: "21-x64"
16
15
  - ruby_version: "22-x64"
17
16
  - ruby_version: "23-x64"
data/curses.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new { |s|
2
2
  s.name = "curses"
3
- s.version = "1.2.1"
3
+ s.version = "1.2.2"
4
4
  s.author = ["Shugo Maeda", 'Eric Hodel']
5
5
  s.email = ["shugo@ruby-lang.org", 'drbrain@segment7.net']
6
6
  s.homepage = "https://github.com/ruby/curses"
data/ext/curses/curses.c CHANGED
@@ -3030,6 +3030,26 @@ window_get_char(VALUE obj)
3030
3030
  #endif
3031
3031
  }
3032
3032
 
3033
+ #ifdef HAVE_PDC_GET_KEY_MODIFIERS
3034
+ static VALUE
3035
+ curses_get_key_modifiers(VALUE obj)
3036
+ {
3037
+ return ULONG2NUM(PDC_get_key_modifiers());
3038
+ }
3039
+
3040
+ static VALUE
3041
+ curses_return_key_modifiers(VALUE obj, VALUE flag)
3042
+ {
3043
+ return INT2NUM(PDC_return_key_modifiers(RTEST(flag)));
3044
+ }
3045
+
3046
+ static VALUE
3047
+ curses_save_key_modifiers(VALUE obj, VALUE flag)
3048
+ {
3049
+ return INT2NUM(PDC_save_key_modifiers(RTEST(flag)));
3050
+ }
3051
+ #endif
3052
+
3033
3053
  /*------------------------- Initialization -------------------------*/
3034
3054
 
3035
3055
  /*
@@ -3193,6 +3213,11 @@ Init_curses(void)
3193
3213
  rb_define_module_function(mCurses, "terminal_encoding=", curses_set_terminal_encoding, 1);
3194
3214
  rb_define_module_function(mCurses, "unget_char", curses_unget_char, 1);
3195
3215
  rb_define_module_function(mCurses, "get_char", curses_get_char, 0);
3216
+ #ifdef HAVE_PDC_GET_KEY_MODIFIERS
3217
+ rb_define_module_function(mCurses, "get_key_modifiers", curses_get_key_modifiers, 0);
3218
+ rb_define_module_function(mCurses, "return_key_modifiers", curses_return_key_modifiers, 1);
3219
+ rb_define_module_function(mCurses, "save_key_modifiers", curses_save_key_modifiers, 1);
3220
+ #endif
3196
3221
 
3197
3222
  {
3198
3223
  VALUE version;
@@ -3335,7 +3360,7 @@ Init_curses(void)
3335
3360
  rb_undef_method(cPad, "subwin");
3336
3361
  #endif
3337
3362
 
3338
- #define rb_curses_define_const(c) rb_define_const(mCurses,#c,UINT2NUM(c))
3363
+ #define rb_curses_define_const(c) rb_define_const(mCurses,#c,CHTYPE2NUM(c))
3339
3364
 
3340
3365
  #ifdef USE_COLOR
3341
3366
  /* Document-const: A_ATTRIBUTES
@@ -4758,6 +4783,49 @@ Init_curses(void)
4758
4783
  rb_define_const(mCurses, name, INT2FIX(c - 'A' + 1));
4759
4784
  }
4760
4785
  }
4786
+ #ifdef PDC_KEY_MODIFIER_SHIFT
4787
+ /* PDCurses-specific keys */
4788
+ rb_curses_define_const(ALT_0);
4789
+ rb_curses_define_const(ALT_1);
4790
+ rb_curses_define_const(ALT_2);
4791
+ rb_curses_define_const(ALT_3);
4792
+ rb_curses_define_const(ALT_4);
4793
+ rb_curses_define_const(ALT_5);
4794
+ rb_curses_define_const(ALT_6);
4795
+ rb_curses_define_const(ALT_7);
4796
+ rb_curses_define_const(ALT_8);
4797
+ rb_curses_define_const(ALT_9);
4798
+ rb_curses_define_const(ALT_A);
4799
+ rb_curses_define_const(ALT_B);
4800
+ rb_curses_define_const(ALT_C);
4801
+ rb_curses_define_const(ALT_D);
4802
+ rb_curses_define_const(ALT_E);
4803
+ rb_curses_define_const(ALT_F);
4804
+ rb_curses_define_const(ALT_G);
4805
+ rb_curses_define_const(ALT_H);
4806
+ rb_curses_define_const(ALT_I);
4807
+ rb_curses_define_const(ALT_J);
4808
+ rb_curses_define_const(ALT_K);
4809
+ rb_curses_define_const(ALT_L);
4810
+ rb_curses_define_const(ALT_M);
4811
+ rb_curses_define_const(ALT_N);
4812
+ rb_curses_define_const(ALT_O);
4813
+ rb_curses_define_const(ALT_P);
4814
+ rb_curses_define_const(ALT_Q);
4815
+ rb_curses_define_const(ALT_R);
4816
+ rb_curses_define_const(ALT_S);
4817
+ rb_curses_define_const(ALT_T);
4818
+ rb_curses_define_const(ALT_U);
4819
+ rb_curses_define_const(ALT_V);
4820
+ rb_curses_define_const(ALT_W);
4821
+ rb_curses_define_const(ALT_X);
4822
+ rb_curses_define_const(ALT_Y);
4823
+ rb_curses_define_const(ALT_Z);
4824
+ rb_curses_define_const(PDC_KEY_MODIFIER_SHIFT);
4825
+ rb_curses_define_const(PDC_KEY_MODIFIER_CONTROL);
4826
+ rb_curses_define_const(PDC_KEY_MODIFIER_ALT);
4827
+ rb_curses_define_const(PDC_KEY_MODIFIER_NUMLOCK);
4828
+ #endif
4761
4829
  #undef rb_curses_define_const
4762
4830
 
4763
4831
  rb_set_end_proc(curses_finalize, 0);
@@ -63,7 +63,7 @@ if header_library
63
63
  touchwin untouchwin wtouchln is_linetouched is_wintouched
64
64
  def_prog_mode reset_prog_mode timeout wtimeout nodelay
65
65
  init_color wcolor_set use_default_colors assume_default_colors
66
- newpad unget_wch get_wch wget_wch)
66
+ newpad unget_wch get_wch wget_wch PDC_get_key_modifiers)
67
67
  have_func(f) || (have_macro(f, curses) && $defs.push(format("-DHAVE_%s", f.upcase)))
68
68
  end
69
69
  convertible_int('chtype', [["#undef MOUSE_MOVED\n"]]+curses) or abort
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.2.1
4
+ version: 1.2.2
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-03-27 00:00:00.000000000 Z
12
+ date: 2017-04-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler