io-console 0.4.6 → 0.4.7

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: f8d3fd4be9c651e29db2894938f1b5f0ed2708b4
4
- data.tar.gz: 1f72c3a0495569b56be0e7aefe1a0316fbd36e05
2
+ SHA256:
3
+ metadata.gz: 3bcc364c8c5ccc946b18420717d8b1516fd99d65a04333ca745d85349297b51e
4
+ data.tar.gz: e746cfec2f03dbda72846ec5466ada582ee9d5f2d691fb427a1bab9ffbab9861
5
5
  SHA512:
6
- metadata.gz: b60d56f813d8e18fba029a14daa433077529c9fe9abf61993ab11919de7df35d2ef028ba22c7aca43cecece9f931e93983e5f4ab9d31d30ebb10bb4897a053e3
7
- data.tar.gz: 7076dc9ecb5b769995807fc7a9e583432c76bd8690aabd4ee93691e4a0f1d9d02f6b288594e4fde59d9fc3c5611b3b6b0e77f87c9bf2accaabe5fb8796e7caa7
6
+ metadata.gz: da1168659b34577a003b6fbf40ee6acb33fedf5d0024a2f03b7d89f420d01adbc91dc6f5d62a71b018de4c6219748c8534d685de680b69863b9e83378255cee2
7
+ data.tar.gz: 4d9cb56ad7f495c20682210c3ee70c52649568907392a74fbd1e8b6c29990e5cfafc764eff9e6693a6ee5945d247046ee410d51526fbbc7e5cdfad5703921977
@@ -0,0 +1,22 @@
1
+ Copyright (C) 1993-2013 Yukihiro Matsumoto. All rights reserved.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions
5
+ are met:
6
+ 1. Redistributions of source code must retain the above copyright
7
+ notice, this list of conditions and the following disclaimer.
8
+ 2. Redistributions in binary form must reproduce the above copyright
9
+ notice, this list of conditions and the following disclaimer in the
10
+ documentation and/or other materials provided with the distribution.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22
+ SUCH DAMAGE.
@@ -0,0 +1,46 @@
1
+ # IO.console
2
+
3
+ Add console capabilities to IO instances.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'io-console'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install io-console
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ require 'io/console'
25
+
26
+ IO.console -> #<File:/dev/tty>
27
+ IO.console(sym, *args)
28
+ ```
29
+
30
+ Returns an File instance opened console.
31
+
32
+ If `sym` is given, it will be sent to the opened console with `args` and the result will be returned instead of the console IO itself.
33
+
34
+ ## Development
35
+
36
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
37
+
38
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
39
+
40
+ ## Contributing
41
+
42
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ruby/io-console.
43
+
44
+ ## License
45
+
46
+ The gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).
@@ -14,12 +14,6 @@
14
14
  #ifdef HAVE_SYS_IOCTL_H
15
15
  #include <sys/ioctl.h>
16
16
  #endif
17
- #ifndef RARRAY_CONST_PTR
18
- # define RARRAY_CONST_PTR(ary) RARRAY_PTR(ary)
19
- #endif
20
- #ifndef HAVE_RB_FUNCALLV
21
- # define rb_funcallv rb_funcall2
22
- #endif
23
17
 
24
18
  #if defined HAVE_TERMIOS_H
25
19
  # include <termios.h>
@@ -103,10 +97,6 @@ rb_f_send(int argc, VALUE *argv, VALUE recv)
103
97
  }
104
98
  #endif
105
99
 
106
- #ifndef HAVE_RB_SYM2STR
107
- # define rb_sym2str(sym) rb_id2str(SYM2ID(sym))
108
- #endif
109
-
110
100
  typedef struct {
111
101
  int vmin;
112
102
  int vtime;
@@ -307,6 +297,14 @@ ttymode(VALUE io, VALUE (*func)(VALUE), void (*setter)(conmode *, void *), void
307
297
  *
308
298
  * will read and return a line without echo back and line editing.
309
299
  *
300
+ * The parameter +min+ specifies the minimum number of bytes that
301
+ * should be received when a read operation is performed. (default: 1)
302
+ *
303
+ * The parameter +time+ specifies the timeout in _seconds_ with a
304
+ * precision of 1/10 of a second. (default: 0)
305
+ *
306
+ * Refer to the manual page of termios for further details.
307
+ *
310
308
  * You must require 'io/console' to use this method.
311
309
  */
312
310
  static VALUE
@@ -324,6 +322,8 @@ console_raw(int argc, VALUE *argv, VALUE io)
324
322
  *
325
323
  * If the terminal mode needs to be back, use io.raw { ... }.
326
324
  *
325
+ * See IO#raw for details on the parameters.
326
+ *
327
327
  * You must require 'io/console' to use this method.
328
328
  */
329
329
  static VALUE
@@ -397,6 +397,8 @@ getc_call(VALUE io)
397
397
  *
398
398
  * Reads and returns a character in raw mode.
399
399
  *
400
+ * See IO#raw for details on the parameters.
401
+ *
400
402
  * You must require 'io/console' to use this method.
401
403
  */
402
404
  static VALUE
@@ -531,16 +533,23 @@ console_set_winsize(VALUE io, VALUE size)
531
533
  #if defined _WIN32
532
534
  HANDLE wh;
533
535
  int newrow, newcol;
536
+ BOOL ret;
534
537
  #endif
535
538
  VALUE row, col, xpixel, ypixel;
536
539
  const VALUE *sz;
537
540
  int fd;
541
+ long sizelen;
538
542
 
539
543
  GetOpenFile(io, fptr);
540
544
  size = rb_Array(size);
541
- rb_check_arity(RARRAY_LENINT(size), 2, 4);
545
+ if ((sizelen = RARRAY_LEN(size)) != 2 && sizelen != 4) {
546
+ rb_raise(rb_eArgError,
547
+ "wrong number of arguments (given %ld, expected 2 or 4)",
548
+ sizelen);
549
+ }
542
550
  sz = RARRAY_CONST_PTR(size);
543
- row = sz[0], col = sz[1], xpixel = sz[2], ypixel = sz[3];
551
+ row = sz[0], col = sz[1], xpixel = ypixel = Qnil;
552
+ if (sizelen == 4) xpixel = sz[2], ypixel = sz[3];
544
553
  fd = GetWriteFD(fptr);
545
554
  #if defined TIOCSWINSZ
546
555
  ws.ws_row = ws.ws_col = ws.ws_xpixel = ws.ws_ypixel = 0;
@@ -562,17 +571,21 @@ console_set_winsize(VALUE io, VALUE size)
562
571
  if (!GetConsoleScreenBufferInfo(wh, &ws)) {
563
572
  rb_syserr_fail(LAST_ERROR, "GetConsoleScreenBufferInfo");
564
573
  }
565
- if ((ws.dwSize.X < newcol && (ws.dwSize.X = newcol, 1)) ||
566
- (ws.dwSize.Y < newrow && (ws.dwSize.Y = newrow, 1))) {
567
- if (!SetConsoleScreenBufferSize(wh, ws.dwSize)) {
568
- rb_syserr_fail(LAST_ERROR, "SetConsoleScreenBufferInfo");
569
- }
570
- }
574
+ ws.dwSize.X = newcol;
575
+ ret = SetConsoleScreenBufferSize(wh, ws.dwSize);
571
576
  ws.srWindow.Left = 0;
572
577
  ws.srWindow.Top = 0;
573
- ws.srWindow.Right = newcol;
574
- ws.srWindow.Bottom = newrow;
575
- if (!SetConsoleWindowInfo(wh, FALSE, &ws.srWindow)) {
578
+ ws.srWindow.Right = newcol-1;
579
+ ws.srWindow.Bottom = newrow-1;
580
+ if (!SetConsoleWindowInfo(wh, TRUE, &ws.srWindow)) {
581
+ rb_syserr_fail(LAST_ERROR, "SetConsoleWindowInfo");
582
+ }
583
+ /* retry when shrinking buffer after shrunk window */
584
+ if (!ret && !SetConsoleScreenBufferSize(wh, ws.dwSize)) {
585
+ rb_syserr_fail(LAST_ERROR, "SetConsoleScreenBufferInfo");
586
+ }
587
+ /* remove scrollbar if possible */
588
+ if (!SetConsoleWindowInfo(wh, TRUE, &ws.srWindow)) {
576
589
  rb_syserr_fail(LAST_ERROR, "SetConsoleWindowInfo");
577
590
  }
578
591
  #endif
@@ -17,11 +17,12 @@ else
17
17
  end
18
18
  if ok
19
19
  have_header("sys/ioctl.h") if hdr
20
- have_func("rb_funcallv")
21
- have_func("rb_sym2str")
22
20
  # rb_check_hash_type: 1.9.3
23
21
  # rb_io_get_write_io: 1.9.1
24
22
  # rb_cloexec_open: 2.0.0
23
+ # rb_funcallv: 2.1.0
24
+ # RARRAY_CONST_PTR: 2.1.0
25
+ # rb_sym2str: 2.2.0
25
26
  $defs << "-D""ENABLE_IO_GETPASS=1"
26
27
  create_makefile("io/console") {|conf|
27
28
  conf << "\n""VK_HEADER = #{vk_header}\n"
@@ -479,7 +479,7 @@
479
479
  #ifndef VK_OEM_CLEAR
480
480
  # define VK_OEM_CLEAR UNDEFINED_VK
481
481
  #endif
482
- /* C code produced by gperf version 3.0.4 */
482
+ /* ANSI-C code produced by gperf version 3.1 */
483
483
  /* Command-line: gperf --ignore-case -E -C -P -p -j1 -i 1 -g -o -t -K ofs -N console_win32_vk -k'*' win32_vk.list */
484
484
 
485
485
  #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
@@ -506,13 +506,14 @@
506
506
  && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
507
507
  && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
508
508
  /* The character set is not based on ISO-646. */
509
- error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
509
+ #error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gperf@gnu.org>."
510
510
  #endif
511
511
 
512
+ #define gperf_offsetof(s, n) (short)offsetof(struct s##_t, s##_str##n)
512
513
  #line 1 "win32_vk.list"
513
514
 
514
515
  struct vktable {short ofs; unsigned short vk;};
515
- static const struct vktable *console_win32_vk(const char *, unsigned int);
516
+ static const struct vktable *console_win32_vk(/*const char *, unsigned int*/);
516
517
  #line 5 "win32_vk.list"
517
518
  struct vktable;
518
519
  /* maximum key range = 245, duplicates = 0 */
@@ -545,9 +546,7 @@ static unsigned char gperf_downcase[256] =
545
546
  #ifndef GPERF_CASE_STRCMP
546
547
  #define GPERF_CASE_STRCMP 1
547
548
  static int
548
- gperf_case_strcmp (s1, s2)
549
- register const char *s1;
550
- register const char *s2;
549
+ gperf_case_strcmp (register const char *s1, register const char *s2)
551
550
  {
552
551
  for (;;)
553
552
  {
@@ -560,15 +559,15 @@ gperf_case_strcmp (s1, s2)
560
559
  }
561
560
  #endif
562
561
 
563
- #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
564
- inline
565
- #elif defined(__GNUC__)
562
+ #ifdef __GNUC__
566
563
  __inline
564
+ #else
565
+ #ifdef __cplusplus
566
+ inline
567
+ #endif
567
568
  #endif
568
569
  static unsigned int
569
- hash (str, len)
570
- register const char *str;
571
- register unsigned int len;
570
+ hash (register const char *str, register size_t len)
572
571
  {
573
572
  static const unsigned short asso_values[] =
574
573
  {
@@ -599,7 +598,7 @@ hash (str, len)
599
598
  257, 257, 257, 257, 257, 257, 257, 257, 257, 257,
600
599
  257, 257, 257, 257, 257, 257, 257, 257
601
600
  };
602
- register int hval = len;
601
+ register unsigned int hval = (unsigned int)len;
603
602
 
604
603
  switch (hval)
605
604
  {
@@ -661,7 +660,7 @@ hash (str, len)
661
660
  hval += asso_values[(unsigned char)str[0]];
662
661
  break;
663
662
  }
664
- return hval;
663
+ return (unsigned int)hval;
665
664
  }
666
665
 
667
666
  struct stringpool_t
@@ -991,16 +990,8 @@ static const struct stringpool_t stringpool_contents =
991
990
  "DIVIDE"
992
991
  };
993
992
  #define stringpool ((const char *) &stringpool_contents)
994
- #ifdef __GNUC__
995
- __inline
996
- #if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
997
- __attribute__ ((__gnu_inline__))
998
- #endif
999
- #endif
1000
993
  const struct vktable *
1001
- console_win32_vk (str, len)
1002
- register const char *str;
1003
- register unsigned int len;
994
+ console_win32_vk (register const char *str, register size_t len)
1004
995
  {
1005
996
  enum
1006
997
  {
@@ -1016,375 +1007,375 @@ console_win32_vk (str, len)
1016
1007
  {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
1017
1008
  {-1}, {-1}, {-1},
1018
1009
  #line 40 "win32_vk.list"
1019
- {offsetof(struct stringpool_t, stringpool_str12), VK_UP},
1010
+ {gperf_offsetof(stringpool, 12), VK_UP},
1020
1011
  #line 52 "win32_vk.list"
1021
- {offsetof(struct stringpool_t, stringpool_str13), VK_APPS},
1012
+ {gperf_offsetof(stringpool, 13), VK_APPS},
1022
1013
  #line 159 "win32_vk.list"
1023
- {offsetof(struct stringpool_t, stringpool_str14), VK_CRSEL},
1014
+ {gperf_offsetof(stringpool, 14), VK_CRSEL},
1024
1015
  #line 34 "win32_vk.list"
1025
- {offsetof(struct stringpool_t, stringpool_str15), VK_SPACE},
1016
+ {gperf_offsetof(stringpool, 15), VK_SPACE},
1026
1017
  #line 95 "win32_vk.list"
1027
- {offsetof(struct stringpool_t, stringpool_str16), VK_SCROLL},
1018
+ {gperf_offsetof(stringpool, 16), VK_SCROLL},
1028
1019
  #line 29 "win32_vk.list"
1029
- {offsetof(struct stringpool_t, stringpool_str17), VK_ESCAPE},
1020
+ {gperf_offsetof(stringpool, 17), VK_ESCAPE},
1030
1021
  #line 9 "win32_vk.list"
1031
- {offsetof(struct stringpool_t, stringpool_str18), VK_CANCEL},
1022
+ {gperf_offsetof(stringpool, 18), VK_CANCEL},
1032
1023
  #line 32 "win32_vk.list"
1033
- {offsetof(struct stringpool_t, stringpool_str19), VK_ACCEPT},
1024
+ {gperf_offsetof(stringpool, 19), VK_ACCEPT},
1034
1025
  #line 66 "win32_vk.list"
1035
- {offsetof(struct stringpool_t, stringpool_str20), VK_SEPARATOR},
1026
+ {gperf_offsetof(stringpool, 20), VK_SEPARATOR},
1036
1027
  #line 43 "win32_vk.list"
1037
- {offsetof(struct stringpool_t, stringpool_str21), VK_SELECT},
1028
+ {gperf_offsetof(stringpool, 21), VK_SELECT},
1038
1029
  #line 18 "win32_vk.list"
1039
- {offsetof(struct stringpool_t, stringpool_str22), VK_CONTROL},
1030
+ {gperf_offsetof(stringpool, 22), VK_CONTROL},
1040
1031
  #line 166 "win32_vk.list"
1041
- {offsetof(struct stringpool_t, stringpool_str23), VK_OEM_CLEAR},
1032
+ {gperf_offsetof(stringpool, 23), VK_OEM_CLEAR},
1042
1033
  #line 145 "win32_vk.list"
1043
- {offsetof(struct stringpool_t, stringpool_str24), VK_OEM_RESET},
1034
+ {gperf_offsetof(stringpool, 24), VK_OEM_RESET},
1044
1035
  #line 155 "win32_vk.list"
1045
- {offsetof(struct stringpool_t, stringpool_str25), VK_OEM_AUTO},
1036
+ {gperf_offsetof(stringpool, 25), VK_OEM_AUTO},
1046
1037
  #line 151 "win32_vk.list"
1047
- {offsetof(struct stringpool_t, stringpool_str26), VK_OEM_CUSEL},
1038
+ {gperf_offsetof(stringpool, 26), VK_OEM_CUSEL},
1048
1039
  {-1},
1049
1040
  #line 22 "win32_vk.list"
1050
- {offsetof(struct stringpool_t, stringpool_str28), VK_KANA},
1041
+ {gperf_offsetof(stringpool, 28), VK_KANA},
1051
1042
  #line 127 "win32_vk.list"
1052
- {offsetof(struct stringpool_t, stringpool_str29), VK_OEM_PLUS},
1043
+ {gperf_offsetof(stringpool, 29), VK_OEM_PLUS},
1053
1044
  #line 35 "win32_vk.list"
1054
- {offsetof(struct stringpool_t, stringpool_str30), VK_PRIOR},
1045
+ {gperf_offsetof(stringpool, 30), VK_PRIOR},
1055
1046
  #line 152 "win32_vk.list"
1056
- {offsetof(struct stringpool_t, stringpool_str31), VK_OEM_ATTN},
1047
+ {gperf_offsetof(stringpool, 31), VK_OEM_ATTN},
1057
1048
  #line 20 "win32_vk.list"
1058
- {offsetof(struct stringpool_t, stringpool_str32), VK_PAUSE},
1049
+ {gperf_offsetof(stringpool, 32), VK_PAUSE},
1059
1050
  #line 13 "win32_vk.list"
1060
- {offsetof(struct stringpool_t, stringpool_str33), VK_BACK},
1051
+ {gperf_offsetof(stringpool, 33), VK_BACK},
1061
1052
  #line 144 "win32_vk.list"
1062
- {offsetof(struct stringpool_t, stringpool_str34), VK_PACKET},
1053
+ {gperf_offsetof(stringpool, 34), VK_PACKET},
1063
1054
  #line 105 "win32_vk.list"
1064
- {offsetof(struct stringpool_t, stringpool_str35), VK_RCONTROL},
1055
+ {gperf_offsetof(stringpool, 35), VK_RCONTROL},
1065
1056
  #line 104 "win32_vk.list"
1066
- {offsetof(struct stringpool_t, stringpool_str36), VK_LCONTROL},
1057
+ {gperf_offsetof(stringpool, 36), VK_LCONTROL},
1067
1058
  #line 37 "win32_vk.list"
1068
- {offsetof(struct stringpool_t, stringpool_str37), VK_END},
1059
+ {gperf_offsetof(stringpool, 37), VK_END},
1069
1060
  #line 38 "win32_vk.list"
1070
- {offsetof(struct stringpool_t, stringpool_str38), VK_HOME},
1061
+ {gperf_offsetof(stringpool, 38), VK_HOME},
1071
1062
  #line 44 "win32_vk.list"
1072
- {offsetof(struct stringpool_t, stringpool_str39), VK_PRINT},
1063
+ {gperf_offsetof(stringpool, 39), VK_PRINT},
1073
1064
  #line 94 "win32_vk.list"
1074
- {offsetof(struct stringpool_t, stringpool_str40), VK_NUMLOCK},
1065
+ {gperf_offsetof(stringpool, 40), VK_NUMLOCK},
1075
1066
  #line 39 "win32_vk.list"
1076
- {offsetof(struct stringpool_t, stringpool_str41), VK_LEFT},
1067
+ {gperf_offsetof(stringpool, 41), VK_LEFT},
1077
1068
  #line 25 "win32_vk.list"
1078
- {offsetof(struct stringpool_t, stringpool_str42), VK_JUNJA},
1069
+ {gperf_offsetof(stringpool, 42), VK_JUNJA},
1079
1070
  #line 19 "win32_vk.list"
1080
- {offsetof(struct stringpool_t, stringpool_str43), VK_MENU},
1071
+ {gperf_offsetof(stringpool, 43), VK_MENU},
1081
1072
  #line 150 "win32_vk.list"
1082
- {offsetof(struct stringpool_t, stringpool_str44), VK_OEM_WSCTRL},
1073
+ {gperf_offsetof(stringpool, 44), VK_OEM_WSCTRL},
1083
1074
  #line 156 "win32_vk.list"
1084
- {offsetof(struct stringpool_t, stringpool_str45), VK_OEM_ENLW},
1075
+ {gperf_offsetof(stringpool, 45), VK_OEM_ENLW},
1085
1076
  #line 36 "win32_vk.list"
1086
- {offsetof(struct stringpool_t, stringpool_str46), VK_NEXT},
1077
+ {gperf_offsetof(stringpool, 46), VK_NEXT},
1087
1078
  #line 51 "win32_vk.list"
1088
- {offsetof(struct stringpool_t, stringpool_str47), VK_RWIN},
1079
+ {gperf_offsetof(stringpool, 47), VK_RWIN},
1089
1080
  #line 50 "win32_vk.list"
1090
- {offsetof(struct stringpool_t, stringpool_str48), VK_LWIN},
1081
+ {gperf_offsetof(stringpool, 48), VK_LWIN},
1091
1082
  #line 21 "win32_vk.list"
1092
- {offsetof(struct stringpool_t, stringpool_str49), VK_CAPITAL},
1083
+ {gperf_offsetof(stringpool, 49), VK_CAPITAL},
1093
1084
  #line 49 "win32_vk.list"
1094
- {offsetof(struct stringpool_t, stringpool_str50), VK_HELP},
1085
+ {gperf_offsetof(stringpool, 50), VK_HELP},
1095
1086
  #line 164 "win32_vk.list"
1096
- {offsetof(struct stringpool_t, stringpool_str51), VK_NONAME},
1087
+ {gperf_offsetof(stringpool, 51), VK_NONAME},
1097
1088
  #line 8 "win32_vk.list"
1098
- {offsetof(struct stringpool_t, stringpool_str52), VK_RBUTTON},
1089
+ {gperf_offsetof(stringpool, 52), VK_RBUTTON},
1099
1090
  #line 7 "win32_vk.list"
1100
- {offsetof(struct stringpool_t, stringpool_str53), VK_LBUTTON},
1091
+ {gperf_offsetof(stringpool, 53), VK_LBUTTON},
1101
1092
  #line 96 "win32_vk.list"
1102
- {offsetof(struct stringpool_t, stringpool_str54), VK_OEM_NEC_EQUAL},
1093
+ {gperf_offsetof(stringpool, 54), VK_OEM_NEC_EQUAL},
1103
1094
  {-1},
1104
1095
  #line 47 "win32_vk.list"
1105
- {offsetof(struct stringpool_t, stringpool_str56), VK_INSERT},
1096
+ {gperf_offsetof(stringpool, 56), VK_INSERT},
1106
1097
  #line 27 "win32_vk.list"
1107
- {offsetof(struct stringpool_t, stringpool_str57), VK_HANJA},
1098
+ {gperf_offsetof(stringpool, 57), VK_HANJA},
1108
1099
  {-1}, {-1},
1109
1100
  #line 46 "win32_vk.list"
1110
- {offsetof(struct stringpool_t, stringpool_str60), VK_SNAPSHOT},
1101
+ {gperf_offsetof(stringpool, 60), VK_SNAPSHOT},
1111
1102
  #line 158 "win32_vk.list"
1112
- {offsetof(struct stringpool_t, stringpool_str61), VK_ATTN},
1103
+ {gperf_offsetof(stringpool, 61), VK_ATTN},
1113
1104
  #line 14 "win32_vk.list"
1114
- {offsetof(struct stringpool_t, stringpool_str62), VK_TAB},
1105
+ {gperf_offsetof(stringpool, 62), VK_TAB},
1115
1106
  #line 157 "win32_vk.list"
1116
- {offsetof(struct stringpool_t, stringpool_str63), VK_OEM_BACKTAB},
1107
+ {gperf_offsetof(stringpool, 63), VK_OEM_BACKTAB},
1117
1108
  #line 143 "win32_vk.list"
1118
- {offsetof(struct stringpool_t, stringpool_str64), VK_ICO_CLEAR},
1109
+ {gperf_offsetof(stringpool, 64), VK_ICO_CLEAR},
1119
1110
  #line 30 "win32_vk.list"
1120
- {offsetof(struct stringpool_t, stringpool_str65), VK_CONVERT},
1111
+ {gperf_offsetof(stringpool, 65), VK_CONVERT},
1121
1112
  #line 16 "win32_vk.list"
1122
- {offsetof(struct stringpool_t, stringpool_str66), VK_RETURN},
1113
+ {gperf_offsetof(stringpool, 66), VK_RETURN},
1123
1114
  #line 146 "win32_vk.list"
1124
- {offsetof(struct stringpool_t, stringpool_str67), VK_OEM_JUMP},
1115
+ {gperf_offsetof(stringpool, 67), VK_OEM_JUMP},
1125
1116
  {-1}, {-1}, {-1},
1126
1117
  #line 111 "win32_vk.list"
1127
- {offsetof(struct stringpool_t, stringpool_str71), VK_BROWSER_STOP},
1118
+ {gperf_offsetof(stringpool, 71), VK_BROWSER_STOP},
1128
1119
  #line 26 "win32_vk.list"
1129
- {offsetof(struct stringpool_t, stringpool_str72), VK_FINAL},
1120
+ {gperf_offsetof(stringpool, 72), VK_FINAL},
1130
1121
  #line 163 "win32_vk.list"
1131
- {offsetof(struct stringpool_t, stringpool_str73), VK_ZOOM},
1122
+ {gperf_offsetof(stringpool, 73), VK_ZOOM},
1132
1123
  #line 28 "win32_vk.list"
1133
- {offsetof(struct stringpool_t, stringpool_str74), VK_KANJI},
1124
+ {gperf_offsetof(stringpool, 74), VK_KANJI},
1134
1125
  #line 48 "win32_vk.list"
1135
- {offsetof(struct stringpool_t, stringpool_str75), VK_DELETE},
1126
+ {gperf_offsetof(stringpool, 75), VK_DELETE},
1136
1127
  #line 128 "win32_vk.list"
1137
- {offsetof(struct stringpool_t, stringpool_str76), VK_OEM_COMMA},
1128
+ {gperf_offsetof(stringpool, 76), VK_OEM_COMMA},
1138
1129
  #line 67 "win32_vk.list"
1139
- {offsetof(struct stringpool_t, stringpool_str77), VK_SUBTRACT},
1130
+ {gperf_offsetof(stringpool, 77), VK_SUBTRACT},
1140
1131
  {-1},
1141
1132
  #line 10 "win32_vk.list"
1142
- {offsetof(struct stringpool_t, stringpool_str79), VK_MBUTTON},
1133
+ {gperf_offsetof(stringpool, 79), VK_MBUTTON},
1143
1134
  #line 78 "win32_vk.list"
1144
- {offsetof(struct stringpool_t, stringpool_str80), VK_F9},
1135
+ {gperf_offsetof(stringpool, 80), VK_F9},
1145
1136
  #line 17 "win32_vk.list"
1146
- {offsetof(struct stringpool_t, stringpool_str81), VK_SHIFT},
1137
+ {gperf_offsetof(stringpool, 81), VK_SHIFT},
1147
1138
  #line 103 "win32_vk.list"
1148
- {offsetof(struct stringpool_t, stringpool_str82), VK_RSHIFT},
1139
+ {gperf_offsetof(stringpool, 82), VK_RSHIFT},
1149
1140
  #line 102 "win32_vk.list"
1150
- {offsetof(struct stringpool_t, stringpool_str83), VK_LSHIFT},
1141
+ {gperf_offsetof(stringpool, 83), VK_LSHIFT},
1151
1142
  #line 65 "win32_vk.list"
1152
- {offsetof(struct stringpool_t, stringpool_str84), VK_ADD},
1143
+ {gperf_offsetof(stringpool, 84), VK_ADD},
1153
1144
  #line 31 "win32_vk.list"
1154
- {offsetof(struct stringpool_t, stringpool_str85), VK_NONCONVERT},
1145
+ {gperf_offsetof(stringpool, 85), VK_NONCONVERT},
1155
1146
  #line 160 "win32_vk.list"
1156
- {offsetof(struct stringpool_t, stringpool_str86), VK_EXSEL},
1147
+ {gperf_offsetof(stringpool, 86), VK_EXSEL},
1157
1148
  #line 126 "win32_vk.list"
1158
- {offsetof(struct stringpool_t, stringpool_str87), VK_OEM_1},
1149
+ {gperf_offsetof(stringpool, 87), VK_OEM_1},
1159
1150
  #line 138 "win32_vk.list"
1160
- {offsetof(struct stringpool_t, stringpool_str88), VK_OEM_AX},
1151
+ {gperf_offsetof(stringpool, 88), VK_OEM_AX},
1161
1152
  #line 108 "win32_vk.list"
1162
- {offsetof(struct stringpool_t, stringpool_str89), VK_BROWSER_BACK},
1153
+ {gperf_offsetof(stringpool, 89), VK_BROWSER_BACK},
1163
1154
  #line 137 "win32_vk.list"
1164
- {offsetof(struct stringpool_t, stringpool_str90), VK_OEM_8},
1155
+ {gperf_offsetof(stringpool, 90), VK_OEM_8},
1165
1156
  #line 129 "win32_vk.list"
1166
- {offsetof(struct stringpool_t, stringpool_str91), VK_OEM_MINUS},
1157
+ {gperf_offsetof(stringpool, 91), VK_OEM_MINUS},
1167
1158
  #line 162 "win32_vk.list"
1168
- {offsetof(struct stringpool_t, stringpool_str92), VK_PLAY},
1159
+ {gperf_offsetof(stringpool, 92), VK_PLAY},
1169
1160
  #line 131 "win32_vk.list"
1170
- {offsetof(struct stringpool_t, stringpool_str93), VK_OEM_2},
1161
+ {gperf_offsetof(stringpool, 93), VK_OEM_2},
1171
1162
  #line 15 "win32_vk.list"
1172
- {offsetof(struct stringpool_t, stringpool_str94), VK_CLEAR},
1163
+ {gperf_offsetof(stringpool, 94), VK_CLEAR},
1173
1164
  #line 99 "win32_vk.list"
1174
- {offsetof(struct stringpool_t, stringpool_str95), VK_OEM_FJ_TOUROKU},
1165
+ {gperf_offsetof(stringpool, 95), VK_OEM_FJ_TOUROKU},
1175
1166
  #line 147 "win32_vk.list"
1176
- {offsetof(struct stringpool_t, stringpool_str96), VK_OEM_PA1},
1167
+ {gperf_offsetof(stringpool, 96), VK_OEM_PA1},
1177
1168
  #line 140 "win32_vk.list"
1178
- {offsetof(struct stringpool_t, stringpool_str97), VK_ICO_HELP},
1169
+ {gperf_offsetof(stringpool, 97), VK_ICO_HELP},
1179
1170
  #line 112 "win32_vk.list"
1180
- {offsetof(struct stringpool_t, stringpool_str98), VK_BROWSER_SEARCH},
1171
+ {gperf_offsetof(stringpool, 98), VK_BROWSER_SEARCH},
1181
1172
  #line 53 "win32_vk.list"
1182
- {offsetof(struct stringpool_t, stringpool_str99), VK_SLEEP},
1173
+ {gperf_offsetof(stringpool, 99), VK_SLEEP},
1183
1174
  {-1},
1184
1175
  #line 70 "win32_vk.list"
1185
- {offsetof(struct stringpool_t, stringpool_str101), VK_F1},
1176
+ {gperf_offsetof(stringpool, 101), VK_F1},
1186
1177
  #line 148 "win32_vk.list"
1187
- {offsetof(struct stringpool_t, stringpool_str102), VK_OEM_PA2},
1178
+ {gperf_offsetof(stringpool, 102), VK_OEM_PA2},
1188
1179
  #line 154 "win32_vk.list"
1189
- {offsetof(struct stringpool_t, stringpool_str103), VK_OEM_COPY},
1180
+ {gperf_offsetof(stringpool, 103), VK_OEM_COPY},
1190
1181
  #line 77 "win32_vk.list"
1191
- {offsetof(struct stringpool_t, stringpool_str104), VK_F8},
1182
+ {gperf_offsetof(stringpool, 104), VK_F8},
1192
1183
  #line 88 "win32_vk.list"
1193
- {offsetof(struct stringpool_t, stringpool_str105), VK_F19},
1184
+ {gperf_offsetof(stringpool, 105), VK_F19},
1194
1185
  #line 41 "win32_vk.list"
1195
- {offsetof(struct stringpool_t, stringpool_str106), VK_RIGHT},
1186
+ {gperf_offsetof(stringpool, 106), VK_RIGHT},
1196
1187
  #line 71 "win32_vk.list"
1197
- {offsetof(struct stringpool_t, stringpool_str107), VK_F2},
1188
+ {gperf_offsetof(stringpool, 107), VK_F2},
1198
1189
  #line 135 "win32_vk.list"
1199
- {offsetof(struct stringpool_t, stringpool_str108), VK_OEM_6},
1190
+ {gperf_offsetof(stringpool, 108), VK_OEM_6},
1200
1191
  #line 87 "win32_vk.list"
1201
- {offsetof(struct stringpool_t, stringpool_str109), VK_F18},
1192
+ {gperf_offsetof(stringpool, 109), VK_F18},
1202
1193
  {-1},
1203
1194
  #line 117 "win32_vk.list"
1204
- {offsetof(struct stringpool_t, stringpool_str111), VK_VOLUME_UP},
1195
+ {gperf_offsetof(stringpool, 111), VK_VOLUME_UP},
1205
1196
  {-1}, {-1},
1206
1197
  #line 120 "win32_vk.list"
1207
- {offsetof(struct stringpool_t, stringpool_str114), VK_MEDIA_STOP},
1198
+ {gperf_offsetof(stringpool, 114), VK_MEDIA_STOP},
1208
1199
  #line 130 "win32_vk.list"
1209
- {offsetof(struct stringpool_t, stringpool_str115), VK_OEM_PERIOD},
1200
+ {gperf_offsetof(stringpool, 115), VK_OEM_PERIOD},
1210
1201
  {-1},
1211
1202
  #line 161 "win32_vk.list"
1212
- {offsetof(struct stringpool_t, stringpool_str117), VK_EREOF},
1203
+ {gperf_offsetof(stringpool, 117), VK_EREOF},
1213
1204
  {-1}, {-1}, {-1},
1214
1205
  #line 114 "win32_vk.list"
1215
- {offsetof(struct stringpool_t, stringpool_str121), VK_BROWSER_HOME},
1206
+ {gperf_offsetof(stringpool, 121), VK_BROWSER_HOME},
1216
1207
  #line 75 "win32_vk.list"
1217
- {offsetof(struct stringpool_t, stringpool_str122), VK_F6},
1208
+ {gperf_offsetof(stringpool, 122), VK_F6},
1218
1209
  {-1},
1219
1210
  #line 110 "win32_vk.list"
1220
- {offsetof(struct stringpool_t, stringpool_str124), VK_BROWSER_REFRESH},
1211
+ {gperf_offsetof(stringpool, 124), VK_BROWSER_REFRESH},
1221
1212
  {-1},
1222
1213
  #line 165 "win32_vk.list"
1223
- {offsetof(struct stringpool_t, stringpool_str126), VK_PA1},
1214
+ {gperf_offsetof(stringpool, 126), VK_PA1},
1224
1215
  #line 142 "win32_vk.list"
1225
- {offsetof(struct stringpool_t, stringpool_str127), VK_PROCESSKEY},
1216
+ {gperf_offsetof(stringpool, 127), VK_PROCESSKEY},
1226
1217
  #line 68 "win32_vk.list"
1227
- {offsetof(struct stringpool_t, stringpool_str128), VK_DECIMAL},
1218
+ {gperf_offsetof(stringpool, 128), VK_DECIMAL},
1228
1219
  #line 132 "win32_vk.list"
1229
- {offsetof(struct stringpool_t, stringpool_str129), VK_OEM_3},
1220
+ {gperf_offsetof(stringpool, 129), VK_OEM_3},
1230
1221
  #line 107 "win32_vk.list"
1231
- {offsetof(struct stringpool_t, stringpool_str130), VK_RMENU},
1222
+ {gperf_offsetof(stringpool, 130), VK_RMENU},
1232
1223
  #line 106 "win32_vk.list"
1233
- {offsetof(struct stringpool_t, stringpool_str131), VK_LMENU},
1224
+ {gperf_offsetof(stringpool, 131), VK_LMENU},
1234
1225
  #line 98 "win32_vk.list"
1235
- {offsetof(struct stringpool_t, stringpool_str132), VK_OEM_FJ_MASSHOU},
1226
+ {gperf_offsetof(stringpool, 132), VK_OEM_FJ_MASSHOU},
1236
1227
  #line 54 "win32_vk.list"
1237
- {offsetof(struct stringpool_t, stringpool_str133), VK_NUMPAD0},
1228
+ {gperf_offsetof(stringpool, 133), VK_NUMPAD0},
1238
1229
  #line 24 "win32_vk.list"
1239
- {offsetof(struct stringpool_t, stringpool_str134), VK_HANGUL},
1230
+ {gperf_offsetof(stringpool, 134), VK_HANGUL},
1240
1231
  #line 63 "win32_vk.list"
1241
- {offsetof(struct stringpool_t, stringpool_str135), VK_NUMPAD9},
1232
+ {gperf_offsetof(stringpool, 135), VK_NUMPAD9},
1242
1233
  #line 23 "win32_vk.list"
1243
- {offsetof(struct stringpool_t, stringpool_str136), VK_HANGEUL},
1234
+ {gperf_offsetof(stringpool, 136), VK_HANGEUL},
1244
1235
  #line 134 "win32_vk.list"
1245
- {offsetof(struct stringpool_t, stringpool_str137), VK_OEM_5},
1236
+ {gperf_offsetof(stringpool, 137), VK_OEM_5},
1246
1237
  #line 149 "win32_vk.list"
1247
- {offsetof(struct stringpool_t, stringpool_str138), VK_OEM_PA3},
1238
+ {gperf_offsetof(stringpool, 138), VK_OEM_PA3},
1248
1239
  #line 115 "win32_vk.list"
1249
- {offsetof(struct stringpool_t, stringpool_str139), VK_VOLUME_MUTE},
1240
+ {gperf_offsetof(stringpool, 139), VK_VOLUME_MUTE},
1250
1241
  #line 133 "win32_vk.list"
1251
- {offsetof(struct stringpool_t, stringpool_str140), VK_OEM_4},
1242
+ {gperf_offsetof(stringpool, 140), VK_OEM_4},
1252
1243
  #line 122 "win32_vk.list"
1253
- {offsetof(struct stringpool_t, stringpool_str141), VK_LAUNCH_MAIL},
1244
+ {gperf_offsetof(stringpool, 141), VK_LAUNCH_MAIL},
1254
1245
  #line 97 "win32_vk.list"
1255
- {offsetof(struct stringpool_t, stringpool_str142), VK_OEM_FJ_JISHO},
1246
+ {gperf_offsetof(stringpool, 142), VK_OEM_FJ_JISHO},
1256
1247
  #line 72 "win32_vk.list"
1257
- {offsetof(struct stringpool_t, stringpool_str143), VK_F3},
1248
+ {gperf_offsetof(stringpool, 143), VK_F3},
1258
1249
  #line 101 "win32_vk.list"
1259
- {offsetof(struct stringpool_t, stringpool_str144), VK_OEM_FJ_ROYA},
1250
+ {gperf_offsetof(stringpool, 144), VK_OEM_FJ_ROYA},
1260
1251
  #line 100 "win32_vk.list"
1261
- {offsetof(struct stringpool_t, stringpool_str145), VK_OEM_FJ_LOYA},
1252
+ {gperf_offsetof(stringpool, 145), VK_OEM_FJ_LOYA},
1262
1253
  {-1},
1263
1254
  #line 42 "win32_vk.list"
1264
- {offsetof(struct stringpool_t, stringpool_str147), VK_DOWN},
1255
+ {gperf_offsetof(stringpool, 147), VK_DOWN},
1265
1256
  {-1},
1266
1257
  #line 153 "win32_vk.list"
1267
- {offsetof(struct stringpool_t, stringpool_str149), VK_OEM_FINISH},
1258
+ {gperf_offsetof(stringpool, 149), VK_OEM_FINISH},
1268
1259
  {-1},
1269
1260
  #line 74 "win32_vk.list"
1270
- {offsetof(struct stringpool_t, stringpool_str151), VK_F5},
1261
+ {gperf_offsetof(stringpool, 151), VK_F5},
1271
1262
  {-1},
1272
1263
  #line 136 "win32_vk.list"
1273
- {offsetof(struct stringpool_t, stringpool_str153), VK_OEM_7},
1264
+ {gperf_offsetof(stringpool, 153), VK_OEM_7},
1274
1265
  #line 73 "win32_vk.list"
1275
- {offsetof(struct stringpool_t, stringpool_str154), VK_F4},
1266
+ {gperf_offsetof(stringpool, 154), VK_F4},
1276
1267
  #line 86 "win32_vk.list"
1277
- {offsetof(struct stringpool_t, stringpool_str155), VK_F17},
1268
+ {gperf_offsetof(stringpool, 155), VK_F17},
1278
1269
  #line 55 "win32_vk.list"
1279
- {offsetof(struct stringpool_t, stringpool_str156), VK_NUMPAD1},
1270
+ {gperf_offsetof(stringpool, 156), VK_NUMPAD1},
1280
1271
  #line 141 "win32_vk.list"
1281
- {offsetof(struct stringpool_t, stringpool_str157), VK_ICO_00},
1272
+ {gperf_offsetof(stringpool, 157), VK_ICO_00},
1282
1273
  {-1},
1283
1274
  #line 62 "win32_vk.list"
1284
- {offsetof(struct stringpool_t, stringpool_str159), VK_NUMPAD8},
1275
+ {gperf_offsetof(stringpool, 159), VK_NUMPAD8},
1285
1276
  {-1}, {-1},
1286
1277
  #line 56 "win32_vk.list"
1287
- {offsetof(struct stringpool_t, stringpool_str162), VK_NUMPAD2},
1278
+ {gperf_offsetof(stringpool, 162), VK_NUMPAD2},
1288
1279
  {-1},
1289
1280
  #line 124 "win32_vk.list"
1290
- {offsetof(struct stringpool_t, stringpool_str164), VK_LAUNCH_APP1},
1281
+ {gperf_offsetof(stringpool, 164), VK_LAUNCH_APP1},
1291
1282
  #line 109 "win32_vk.list"
1292
- {offsetof(struct stringpool_t, stringpool_str165), VK_BROWSER_FORWARD},
1283
+ {gperf_offsetof(stringpool, 165), VK_BROWSER_FORWARD},
1293
1284
  {-1},
1294
1285
  #line 76 "win32_vk.list"
1295
- {offsetof(struct stringpool_t, stringpool_str167), VK_F7},
1286
+ {gperf_offsetof(stringpool, 167), VK_F7},
1296
1287
  {-1}, {-1},
1297
1288
  #line 125 "win32_vk.list"
1298
- {offsetof(struct stringpool_t, stringpool_str170), VK_LAUNCH_APP2},
1289
+ {gperf_offsetof(stringpool, 170), VK_LAUNCH_APP2},
1299
1290
  #line 64 "win32_vk.list"
1300
- {offsetof(struct stringpool_t, stringpool_str171), VK_MULTIPLY},
1291
+ {gperf_offsetof(stringpool, 171), VK_MULTIPLY},
1301
1292
  {-1}, {-1},
1302
1293
  #line 45 "win32_vk.list"
1303
- {offsetof(struct stringpool_t, stringpool_str174), VK_EXECUTE},
1294
+ {gperf_offsetof(stringpool, 174), VK_EXECUTE},
1304
1295
  {-1},
1305
1296
  #line 113 "win32_vk.list"
1306
- {offsetof(struct stringpool_t, stringpool_str176), VK_BROWSER_FAVORITES},
1297
+ {gperf_offsetof(stringpool, 176), VK_BROWSER_FAVORITES},
1307
1298
  #line 60 "win32_vk.list"
1308
- {offsetof(struct stringpool_t, stringpool_str177), VK_NUMPAD6},
1299
+ {gperf_offsetof(stringpool, 177), VK_NUMPAD6},
1309
1300
  {-1},
1310
1301
  #line 85 "win32_vk.list"
1311
- {offsetof(struct stringpool_t, stringpool_str179), VK_F16},
1302
+ {gperf_offsetof(stringpool, 179), VK_F16},
1312
1303
  {-1}, {-1},
1313
1304
  #line 79 "win32_vk.list"
1314
- {offsetof(struct stringpool_t, stringpool_str182), VK_F10},
1305
+ {gperf_offsetof(stringpool, 182), VK_F10},
1315
1306
  {-1}, {-1},
1316
1307
  #line 116 "win32_vk.list"
1317
- {offsetof(struct stringpool_t, stringpool_str185), VK_VOLUME_DOWN},
1308
+ {gperf_offsetof(stringpool, 185), VK_VOLUME_DOWN},
1318
1309
  {-1}, {-1},
1319
1310
  #line 89 "win32_vk.list"
1320
- {offsetof(struct stringpool_t, stringpool_str188), VK_F20},
1311
+ {gperf_offsetof(stringpool, 188), VK_F20},
1321
1312
  #line 119 "win32_vk.list"
1322
- {offsetof(struct stringpool_t, stringpool_str189), VK_MEDIA_PREV_TRACK},
1313
+ {gperf_offsetof(stringpool, 189), VK_MEDIA_PREV_TRACK},
1323
1314
  {-1},
1324
1315
  #line 33 "win32_vk.list"
1325
- {offsetof(struct stringpool_t, stringpool_str191), VK_MODECHANGE},
1316
+ {gperf_offsetof(stringpool, 191), VK_MODECHANGE},
1326
1317
  {-1}, {-1}, {-1}, {-1}, {-1},
1327
1318
  #line 83 "win32_vk.list"
1328
- {offsetof(struct stringpool_t, stringpool_str197), VK_F14},
1319
+ {gperf_offsetof(stringpool, 197), VK_F14},
1329
1320
  #line 57 "win32_vk.list"
1330
- {offsetof(struct stringpool_t, stringpool_str198), VK_NUMPAD3},
1321
+ {gperf_offsetof(stringpool, 198), VK_NUMPAD3},
1331
1322
  #line 11 "win32_vk.list"
1332
- {offsetof(struct stringpool_t, stringpool_str199), VK_XBUTTON1},
1323
+ {gperf_offsetof(stringpool, 199), VK_XBUTTON1},
1333
1324
  {-1}, {-1}, {-1},
1334
1325
  #line 93 "win32_vk.list"
1335
- {offsetof(struct stringpool_t, stringpool_str203), VK_F24},
1326
+ {gperf_offsetof(stringpool, 203), VK_F24},
1336
1327
  {-1},
1337
1328
  #line 12 "win32_vk.list"
1338
- {offsetof(struct stringpool_t, stringpool_str205), VK_XBUTTON2},
1329
+ {gperf_offsetof(stringpool, 205), VK_XBUTTON2},
1339
1330
  #line 59 "win32_vk.list"
1340
- {offsetof(struct stringpool_t, stringpool_str206), VK_NUMPAD5},
1331
+ {gperf_offsetof(stringpool, 206), VK_NUMPAD5},
1341
1332
  {-1}, {-1},
1342
1333
  #line 58 "win32_vk.list"
1343
- {offsetof(struct stringpool_t, stringpool_str209), VK_NUMPAD4},
1334
+ {gperf_offsetof(stringpool, 209), VK_NUMPAD4},
1344
1335
  {-1}, {-1}, {-1}, {-1}, {-1},
1345
1336
  #line 121 "win32_vk.list"
1346
- {offsetof(struct stringpool_t, stringpool_str215), VK_MEDIA_PLAY_PAUSE},
1337
+ {gperf_offsetof(stringpool, 215), VK_MEDIA_PLAY_PAUSE},
1347
1338
  {-1},
1348
1339
  #line 123 "win32_vk.list"
1349
- {offsetof(struct stringpool_t, stringpool_str217), VK_LAUNCH_MEDIA_SELECT},
1340
+ {gperf_offsetof(stringpool, 217), VK_LAUNCH_MEDIA_SELECT},
1350
1341
  #line 80 "win32_vk.list"
1351
- {offsetof(struct stringpool_t, stringpool_str218), VK_F11},
1342
+ {gperf_offsetof(stringpool, 218), VK_F11},
1352
1343
  {-1},
1353
1344
  #line 139 "win32_vk.list"
1354
- {offsetof(struct stringpool_t, stringpool_str220), VK_OEM_102},
1345
+ {gperf_offsetof(stringpool, 220), VK_OEM_102},
1355
1346
  #line 118 "win32_vk.list"
1356
- {offsetof(struct stringpool_t, stringpool_str221), VK_MEDIA_NEXT_TRACK},
1347
+ {gperf_offsetof(stringpool, 221), VK_MEDIA_NEXT_TRACK},
1357
1348
  #line 61 "win32_vk.list"
1358
- {offsetof(struct stringpool_t, stringpool_str222), VK_NUMPAD7},
1349
+ {gperf_offsetof(stringpool, 222), VK_NUMPAD7},
1359
1350
  {-1},
1360
1351
  #line 90 "win32_vk.list"
1361
- {offsetof(struct stringpool_t, stringpool_str224), VK_F21},
1352
+ {gperf_offsetof(stringpool, 224), VK_F21},
1362
1353
  {-1},
1363
1354
  #line 82 "win32_vk.list"
1364
- {offsetof(struct stringpool_t, stringpool_str226), VK_F13},
1355
+ {gperf_offsetof(stringpool, 226), VK_F13},
1365
1356
  {-1}, {-1},
1366
1357
  #line 81 "win32_vk.list"
1367
- {offsetof(struct stringpool_t, stringpool_str229), VK_F12},
1358
+ {gperf_offsetof(stringpool, 229), VK_F12},
1368
1359
  {-1}, {-1},
1369
1360
  #line 92 "win32_vk.list"
1370
- {offsetof(struct stringpool_t, stringpool_str232), VK_F23},
1361
+ {gperf_offsetof(stringpool, 232), VK_F23},
1371
1362
  {-1}, {-1},
1372
1363
  #line 91 "win32_vk.list"
1373
- {offsetof(struct stringpool_t, stringpool_str235), VK_F22},
1364
+ {gperf_offsetof(stringpool, 235), VK_F22},
1374
1365
  {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
1375
1366
  #line 84 "win32_vk.list"
1376
- {offsetof(struct stringpool_t, stringpool_str242), VK_F15},
1367
+ {gperf_offsetof(stringpool, 242), VK_F15},
1377
1368
  {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1},
1378
1369
  {-1}, {-1}, {-1}, {-1},
1379
1370
  #line 69 "win32_vk.list"
1380
- {offsetof(struct stringpool_t, stringpool_str256), VK_DIVIDE}
1371
+ {gperf_offsetof(stringpool, 256), VK_DIVIDE}
1381
1372
  };
1382
1373
 
1383
1374
  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
1384
1375
  {
1385
- register int key = hash (str, len);
1376
+ register unsigned int key = hash (str, len);
1386
1377
 
1387
- if (key <= MAX_HASH_VALUE && key >= 0)
1378
+ if (key <= MAX_HASH_VALUE)
1388
1379
  {
1389
1380
  register int o = wordlist[key].ofs;
1390
1381
  if (o >= 0)
@@ -0,0 +1,5 @@
1
+ begin
2
+ require "#{RUBY_VERSION[/\d+\.\d+/]}/io/console.so"
3
+ rescue LoadError
4
+ require 'io/console.so'
5
+ end
@@ -10,7 +10,7 @@ end
10
10
  begin
11
11
  require 'io/console'
12
12
  rescue LoadError
13
- class IO
13
+ class << IO
14
14
  alias console_size default_console_size
15
15
  end
16
16
  else
metadata CHANGED
@@ -1,53 +1,62 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: io-console
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.4.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nobu Nakada
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain:
11
- - |
12
- -----BEGIN CERTIFICATE-----
13
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ0wCwYDVQQDDARub2J1
14
- MRkwFwYKCZImiZPyLGQBGRYJcnVieS1sYW5nMRMwEQYKCZImiZPyLGQBGRYDb3Jn
15
- MB4XDTE1MTIyMjEzNDAyOFoXDTE2MTIyMTEzNDAyOFowPzENMAsGA1UEAwwEbm9i
16
- dTEZMBcGCgmSJomT8ixkARkWCXJ1YnktbGFuZzETMBEGCgmSJomT8ixkARkWA29y
17
- ZzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANduwQ8upTFS4aOBPQQ0
18
- 2aRqo8otV3QgKRNy3DYwL2ugeZ4F/wAk3KdVeXnDW2Hkj9Yv33FLUKytq9QuhaG4
19
- 3LmKnVWVbr+G0w/qtv8BIH5w9ajq89YI4X6+fOLasfHXHe/GzPW8siEszFqfEVLi
20
- LrwipHxurRmiKR4/CyeMTbIaeS2guK1Srj1UCM71OuA18PdbPx+nnZGDRJj6satU
21
- f3cRPJZdGntrl8ZddzYmkhDK+i7GxbnxMCxw1j3GOhkPXdwy95l3nkuU18kv/Cqn
22
- QJvmgWgwPtH7ytuhnkIa9cgB44SKGYPvMoWrYaEPjv3v33TPk72vK6WQG1MiykxK
23
- pHMCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFNNR
24
- 10GwXP4sPVZBhDQwl+J5msFjMB0GA1UdEQQWMBSBEm5vYnVAcnVieS1sYW5nLm9y
25
- ZzAdBgNVHRIEFjAUgRJub2J1QHJ1YnktbGFuZy5vcmcwDQYJKoZIhvcNAQEFBQAD
26
- ggEBAAOTOY2YqMGNEBl3EJGymZKYjhSrP7m9g7WreCGRIAPvhc1Ad5nCaU3rhytF
27
- 9ayF2X6/RGfO0JqLK0ibMS4AXDoSmzngs1YavbpgrFvDr/GDklDn0PeYwvnIjqHF
28
- 3edYnfvOwpPshdIcSGB++HR1k+MsVQ+thJBg90qvEBXB240paJBebo66AwtnRMtl
29
- 2s+U8KA5K21h0B3oZO7MPplyoBnkKIi2wM2vXd+bwy2vdDjCm4TmGE3s4tChPqJl
30
- ZgehHiYUmHxhsoXmVbst3GP52kHNAhVA7+pMpYuYT7glqpuM0sPxtXCucBCBc8Fw
31
- dUVKuhl19UL3hBtgLSctsrsoXuo=
32
- -----END CERTIFICATE-----
33
- date: 2015-12-23 00:00:00.000000000 Z
34
- dependencies: []
10
+ cert_chain: []
11
+ date: 2018-12-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake-compiler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake-compiler-dock
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 0.6.1
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 0.6.1
35
41
  description: add console capabilities to IO instances.
36
42
  email: nobu@ruby-lang.org
37
43
  executables: []
38
44
  extensions:
39
- - extconf.rb
45
+ - ext/io/console/extconf.rb
40
46
  extra_rdoc_files: []
41
47
  files:
42
- - console.c
43
- - depend
44
- - extconf.rb
45
- - lib/console/size.rb
46
- - win32_vk.inc
47
- homepage: http://www.ruby-lang.org
48
+ - LICENSE.txt
49
+ - README.md
50
+ - ext/io/console/console.c
51
+ - ext/io/console/extconf.rb
52
+ - ext/io/console/win32_vk.inc
53
+ - lib/io/console.rb
54
+ - lib/io/console/size.rb
55
+ homepage: https://github.com/ruby/io-console
48
56
  licenses:
49
57
  - BSD-2-Clause
50
- metadata: {}
58
+ metadata:
59
+ source_code_url: https://github.com/ruby/io-console
51
60
  post_install_message:
52
61
  rdoc_options: []
53
62
  require_paths:
@@ -56,15 +65,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
65
  requirements:
57
66
  - - ">="
58
67
  - !ruby/object:Gem::Version
59
- version: 2.0.0
68
+ version: 2.2.0
60
69
  required_rubygems_version: !ruby/object:Gem::Requirement
61
70
  requirements:
62
71
  - - ">="
63
72
  - !ruby/object:Gem::Version
64
73
  version: '0'
65
74
  requirements: []
66
- rubyforge_project:
67
- rubygems_version: 2.6.3
75
+ rubygems_version: 3.0.0
68
76
  signing_key:
69
77
  specification_version: 4
70
78
  summary: Console interface
Binary file
data.tar.gz.sig DELETED
Binary file
data/depend DELETED
@@ -1,6 +0,0 @@
1
- $(OBJS): $(HDRS) $(ruby_headers) \
2
- $(VK_HEADER) \
3
- $(hdrdir)/ruby/io.h \
4
- $(hdrdir)/ruby/encoding.h \
5
- $(hdrdir)/ruby/oniguruma.h
6
-
metadata.gz.sig DELETED
Binary file