[#15828] Ruby/Gtk for cygwin インストールについて — otokita@...

Ruby, 本 ML には大変お世話になっております.

15 messages 1999/08/02

[#15839] Windows95 で Tk — H サイトウ <HiroshiSaito@...>

17 messages 1999/08/02

[#15944] Ruby 1.3.7 — Yukihiro Matsumoto <matz@...>

Ruby 1.3.7 is repacked, check out:

19 messages 1999/08/06

[#16002] how to know binary file — kikutani@...

あるファイルがバイナリファイルかどうか知る方法というのはたしか

38 messages 1999/08/09
[#16010] Re: how to know binary file — WATANABE Hirofumi <watanabe@...> 1999/08/10

わたなべです.

[#16013] Re: how to know binary file — kikutani@... 1999/08/10

On Tue, 10 Aug 1999 11:06:25 +0900,

[#16016] Re: how to know binary file — Yamada Kenji <kyamada@...> 1999/08/10

[#16021] Re: how to know binary file — kikutani@... 1999/08/10

On Tue, 10 Aug 1999 11:56:55 +0900,

[#16026] Re: how to know binary file — Yamada Kenji <kyamada@...> 1999/08/10

[#16040] Re: how to know binary file — kikutani@... 1999/08/10

On Tue, 10 Aug 1999 13:55:59 +0900,

[#16095] rd2html — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp>

はじめまして、Toshと申します。

32 messages 1999/08/12
[#16098] Re: rd2html — matz@... (Yukihiro Matsumoto) 1999/08/12

まつもと ゆきひろです

[#16104] Re: rd2html — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/13

Toshです。

[#16106] Re: rd2html — gotoken@... (GOTO Kentaro) 1999/08/13

ごとけんです

[#16111] Re: rd2html — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/13

Toshです。

[#16112] Re: rd2html — gotoken@... (GOTO Kentaro) 1999/08/13

ごとけんです

[#16115] Re: rd2html — Toshiro Kuwabara <toshirok@...3.so-net.ne.jp> 1999/08/13

Toshです。

[#16118] Ruby 1.4.0 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

50 messages 1999/08/13
[#16120] Re: Ruby 1.4.0 — Katsuyuki Komatsu <komatsu@...> 1999/08/13

小松です。

[#16124] Re: Ruby 1.4.0 — matz@... (Yukihiro Matsumoto) 1999/08/13

まつもと ゆきひろです

[#16397] Re: Ruby 1.4.0 — wakou@... 1999/09/01

青山です。

[#16404] Re: Ruby 1.4.0 — hisanori@... 1999/09/01

松尾です。

[#16426] Re: Ruby 1.4.0 — matz@... (Yukihiro Matsumoto) 1999/09/01

まつもと ゆきひろです

[#16427] Re: Ruby 1.4.0 — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/09/01

なひです.

[#16158] maillib? 0.5.0 — Minero Aoki <aamine@...>

あおきです。

57 messages 1999/08/15
[#16173] Re: maillib? 0.5.0 — matz@... (Yukihiro Matsumoto) 1999/08/16

まつもと ゆきひろです

[#16225] Re: maillib? 0.5.0 — Minero Aoki <aamine@...> 1999/08/19

あおきです。とりあえずlistに送ります。

[#16254] Re: maillib? 0.5.0 — matz@... (Yukihiro Matsumoto) 1999/08/22

まつもと ゆきひろです

[#16282] Re: maillib? 0.5.0 — Minero Aoki <aamine@...> 1999/08/24

あおきです。

[#16285] Re: maillib? 0.5.0 — matz@... (Yukihiro Matsumoto) 1999/08/24

まつもと ゆきひろです

[#16338] Re: maillib? 0.5.0 — Minero Aoki <aamine@...> 1999/08/27

あおきです。返事遅くなってすみません。

[#16344] Re: maillib? 0.5.0 — Minero Aoki <aamine@...> 1999/08/28

あおきです。

[#16363] Re: maillib? 0.5.0 — matz@... (Yukihiro Matsumoto) 1999/08/30

まつもと ゆきひろです

[#16440] Re: maillib? 0.5.0 — Minero Aoki <aamine@...> 1999/09/02

あおきです。

[#16545] Re: maillib? 0.5.0 — matz@... (Yukihiro Matsumoto) 1999/09/06

まつもと ゆきひろです

[#16632] Re: maillib? 0.5.0 — Minero Aoki <aamine@...> 1999/09/08

あおきです。

[#16646] Re: maillib? 0.5.0 — wakou@... 1999/09/08

青山です。

[#16648] RD and internationalization — wakou@... 1999/09/08

青山です。

[#16663] Re: RD and internationalization — Minero Aoki <aamine@...> 1999/09/09

あおきです。

[#16679] Re: RD and internationalization — wakou@... 1999/09/09

青山です。

[#16302] printf の $ について — "HIRATA Naoto" <hirata-naoto@...>

平田です.

18 messages 1999/08/24
[#16307] Re: printf の $ について — WATANABE Hirofumi <watanabe@...> 1999/08/25

わたなべです.

[#16313] Re: printf の $ について — matz@... (Yukihiro Matsumoto) 1999/08/25

まつもと ゆきひろです

[#16359] ruby1.4.0 on BSD/OS 4.0 — Yamada Kenji <kyamada@...>

16 messages 1999/08/29

[ruby-list:15969] Re: termios

From: gotoken@... (GOTO Kentaro)
Date: 1999-08-08 23:25:56 UTC
List: ruby-list #15969
ごとけんです

In message "[ruby-list:15968] Re: termios"
    on 99/08/08, WATANABE Hirofumi <eban@os.rim.or.jp> writes:

>termios とはやまだあきらさんの ruby-termios-module のことですか?

そうです。

>:それはともかく、termios がmakeできません。rename.rbしないと
>:いけないのは別にしても、struct termios が違うようです。
>
>普通 termios には c_line はなくて termio にはあるから
>4.4BSD系 は POSIX に忠実ってことかな.

なるほど。

>というわけで termios ってことなら c_line は外しちゃったほうがいいと
>思います.

外してみました。どなたかテストお願いします。
test3.rbがわたなべさんの書かれた stty -echo 相当の
もの[ruby-list:15968]です。

-- gotoken

ftp://ftp.arika.org/pub/Tools/Ruby/ruby-termios-module-0.0.3.tar.gz
からのパッチです。


Attachments (1)

ruby-termios-module-0.0.3-patch (6.16 KB, text/x-diff)
diff -u1rN ruby-termios-module.orig/MANIFEST ruby-termios-module/MANIFEST
--- ruby-termios-module.orig/MANIFEST	Mon Aug  9 08:12:36 1999
+++ ruby-termios-module/MANIFEST	Mon Aug  9 08:02:54 1999
@@ -7 +7,2 @@
 test2.rb
+test3.rb
diff -u1rN ruby-termios-module.orig/termios.c ruby-termios-module/termios.c
--- ruby-termios-module.orig/termios.c	Fri Feb 19 00:09:16 1999
+++ ruby-termios-module/termios.c	Mon Aug  9 07:53:27 1999
@@ -25,9 +25,9 @@
   int i;
-  c_cc = ary_new2(NCCS);
+  c_cc = rb_ary_new2(NCCS);
 
   for (i = 0; i < NCCS; i++) {
-    ary_push(c_cc, INT2FIX(t->c_cc[i]));
+    rb_ary_push(c_cc, INT2FIX(t->c_cc[i]));
   }
 
-  return struct_new(sTermios,
+  return rb_struct_new(sTermios,
 		    INT2FIX(t->c_iflag),
@@ -36,3 +36,2 @@
 		    INT2FIX(t->c_lflag),
-		    INT2FIX(t->c_line),
 		    c_cc,
@@ -55,3 +54,3 @@
   } else {
-    TypeError("wrong structure value %s (expected Fixnum or Nil)", 
+    rb_raise(rb_eTypeError, "wrong structure value %s (expected Fixnum or Nil)", 
 	      name);
@@ -72,10 +71,9 @@
   t->c_lflag  = rb_Termios_to_termios0(RSTRUCT(rt)->ptr[3], "c_lflag");
-  t->c_line   = rb_Termios_to_termios0(RSTRUCT(rt)->ptr[4], "c_line");
-  for (i = 0; i < RARRAY(RSTRUCT(rt)->ptr[5])->len; i++) {
+  for (i = 0; i < RARRAY(RSTRUCT(rt)->ptr[4])->len; i++) {
     sprintf(c_cc, "c_cc[%d]", i);
-    t->c_cc[i] = rb_Termios_to_termios0(RARRAY(RSTRUCT(rt)->ptr[5])->ptr[i],
+    t->c_cc[i] = rb_Termios_to_termios0(RARRAY(RSTRUCT(rt)->ptr[4])->ptr[i],
 					c_cc);
   }
-  cfsetispeed(t, rb_Termios_to_termios0(RSTRUCT(rt)->ptr[6], "c_ispeed"));
-  cfsetospeed(t, rb_Termios_to_termios0(RSTRUCT(rt)->ptr[7], "c_ospeed"));
+  cfsetispeed(t, rb_Termios_to_termios0(RSTRUCT(rt)->ptr[5], "c_ispeed"));
+  cfsetospeed(t, rb_Termios_to_termios0(RSTRUCT(rt)->ptr[6], "c_ospeed"));
 
@@ -105,3 +103,3 @@
   if (tcgetattr(fileno(fptr->f), &t) < 0) {
-    Fail("can't get terminal parameters (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't get terminal parameters (%s)", strerror(errno));
   }
@@ -132,3 +130,3 @@
   if (strcmp(type, "Struct::Termios") != 0) {
-    TypeError("wrong argument type %s (expected Struct::Termios)", 
+    rb_raise(rb_eTypeError, "wrong argument type %s (expected Struct::Termios)", 
 	      type);
@@ -140,3 +138,3 @@
   if (tcsetattr(fileno(fptr->f), FIX2INT(opt), &t) < 0) {
-    Fail("can't set terminal parameters (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't set terminal parameters (%s)", strerror(errno));
   }
@@ -157,3 +155,3 @@
   if (tcsendbreak(fileno(fptr->f), FIX2INT(duration)) < 0) {
-    Fail("can't transmits break (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't transmits break (%s)", strerror(errno));
   }
@@ -173,3 +171,3 @@
   if (tcdrain(fileno(fptr->f)) < 0) {
-    Fail("can't drain (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't drain (%s)", strerror(errno));
   }
@@ -193,3 +191,3 @@
       queue_selector != TCIOFLUSH) {
-    TypeError("wrong argument value %s (expected Termios::TCIFLUSH, Termios::TCOFLUSH or Termios::TCIOFLUSH)", 
+    rb_raise(rb_eTypeError, "wrong argument value %s (expected Termios::TCIFLUSH, Termios::TCOFLUSH or Termios::TCIOFLUSH)", 
 	      queue_selector);
@@ -199,3 +197,3 @@
   if (tcflush(fileno(fptr->f), queue_selector) < 0) {
-    Fail("can't flush (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't flush (%s)", strerror(errno));
   }
@@ -220,3 +218,3 @@
       action != TCION) {
-    TypeError("wrong argument value %s (expected Termios::TCOOFF, Termios::TCOON, Termios::TCIOFF or Termios::TCION)", 
+    rb_raise(rb_eTypeError, "wrong argument value %s (expected Termios::TCOOFF, Termios::TCOON, Termios::TCIOFF or Termios::TCION)", 
 	      action);
@@ -226,3 +224,3 @@
   if (tcflow(fileno(fptr->f), action) < 0) {
-    Fail("can't control transmitting data flow (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't control transmitting data flow (%s)", strerror(errno));
   }
@@ -243,3 +241,3 @@
   if (pid = tcgetpgrp(fileno(fptr->f)) < 0) {
-    Fail("can't get process group id (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't get process group id (%s)", strerror(errno));
   }
@@ -261,3 +259,3 @@
   if (tcsetpgrp(fileno(fptr->f), FIX2INT(pgrpid)) < 0) {
-    Fail("can't set process group id (%s)", strerror(errno));
+    rb_raise(rb_eRuntimeError, "can't set process group id (%s)", strerror(errno));
   }
@@ -275,12 +273,12 @@
   VALUE c_iflag, c_oflag, c_cflag, c_lflag, 
-    c_line, c_cc, c_ispeed, c_ospeed;
+    c_cc, c_ispeed, c_ospeed;
   int i;
 
-  rb_scan_args(argc, argv, "08", 
+  rb_scan_args(argc, argv, "07", 
 	       &c_iflag, &c_oflag, &c_cflag, &c_lflag, 
-	       &c_line, &c_cc, &c_ispeed, &c_ospeed);
+	       &c_cc, &c_ispeed, &c_ospeed);
   if (NIL_P(c_cc)) {
-    c_cc = ary_new2(NCCS);
+    c_cc = rb_ary_new2(NCCS);
     for (i = 0; i < NCCS; i++) {
-      ary_push(c_cc, Qnil);
+      rb_ary_push(c_cc, Qnil);
     }
@@ -290,5 +288,5 @@
 
-  return struct_new(sTermios,
+  return rb_struct_new(sTermios,
 		    c_iflag, c_oflag, c_cflag, c_lflag,
-		    c_line, c_cc, c_ispeed, c_ospeed);
+		    c_cc, c_ispeed, c_ospeed);
 }
@@ -312,3 +310,3 @@
 
-  sTermios = struct_define("Termios",
+  sTermios = rb_struct_define("Termios",
 			   "c_iflag",	/* input modes */
@@ -317,3 +315,2 @@
 			   "c_lflag",	/* local modes */
-			   "c_line",	/* line discipline */
 			   "c_cc",	/* control chars */
diff -u1rN ruby-termios-module.orig/test1.rb ruby-termios-module/test1.rb
--- ruby-termios-module.orig/test1.rb	Thu Feb 18 02:24:21 1999
+++ ruby-termios-module/test1.rb	Mon Aug  9 07:58:41 1999
@@ -6,3 +6,3 @@
 
-RESCUE = Termios::new_termios(1280, 5, 3261, 35387, 0,
+RESCUE = Termios::new_termios(1280, 5, 3261, 35387, 
 			      [3, 28, 127, 21, 4, 0, 1, 0, 17, 
diff -u1rN ruby-termios-module.orig/test3.rb ruby-termios-module/test3.rb
--- ruby-termios-module.orig/test3.rb	Thu Jan  1 09:00:00 1970
+++ ruby-termios-module/test3.rb	Mon Aug  9 08:15:26 1999
@@ -0,0 +1,13 @@
+# shadows input then reports [ruby-list:15968]
+require 'termios'
+include Termios
+
+oldt = getattr($stdin)
+newt = oldt.dup
+newt.c_lflag &= ~ECHO
+setattr($stdin, TCSANOW, newt)
+print "noecho> "
+a = $stdin.gets
+setattr($stdin, TCSANOW, oldt)
+print "\n"
+p a

In This Thread