curses 1.2.1-x64-mingw32 → 1.2.2-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82231897ac848825d5081e63cfcea69dcf011eec
4
- data.tar.gz: ae9ccc6ea7cb7e7d5d4ccad71bb104efbcfd1674
3
+ metadata.gz: 4b6f5057f0c8b4d5c649aea752ee2bb6a6fd98a7
4
+ data.tar.gz: 662d14344e906088dc94be6e5d3b4659fa5b4dae
5
5
  SHA512:
6
- metadata.gz: 9b58bdf24bedf166f9bdde909a7954caff481f3efcbf20a7928de6e7443d97b50917dea52f7c0e545c43dd7f66ddee3eee29cd447dc73d0e8055c9b9cd6268ed
7
- data.tar.gz: 16eafd28f2e89ac9128b03d082ed644b52899568186d5e69e75b9076d09c370d31b5f2a9400067bf3c0bad35e43a20ecfe226a9899e2d32fd5ba4799c0fb5832
6
+ metadata.gz: 44a9b0edc65ba8663259fcd24cb79e4b97d172fb1352cb3ecd5b24f517686ac157166949a3144770f16c38533fc20cfd1e90bef6dbce7a67ed7cdd167249beba
7
+ data.tar.gz: d4b62529329c95184908e5a8ddb4e17e9e760c4fb96b643d19c8ca109d1efef20fa9f806f4784054c61cd10b8b53ad38b0d7e5dd31b38d03e2802a9a529c87aa
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
@@ -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=' +
@@ -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"
@@ -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"
@@ -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
Binary file
Binary file
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: x64-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