summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1996-12-25 00:33:19 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 22:09:32 +0900
commitce930d042913722f209bbd3209b6c90a3c71325f (patch)
tree7233482f90335a8247ef426607622a8cad067a97
parent554b989ba1623b9f6a0b76f00824c83a23fbcbc1 (diff)
version 1.0-961225v1_0_961225
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-961225.tar.gz Wed Dec 25 00:33:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp> * version 1.0-961225 * io.c (Init_IO): newを無効化 * lib/tkthcore.rb: tk_call "global $foo; set foo 5"などもできるように * eval.c (thread_restore_context): $~, $_でスタックを壊していた * process.c (rb_waitpid): threadに一応対応
-rw-r--r--ChangeLog12
-rw-r--r--ToDo2
-rw-r--r--array.c2
-rw-r--r--bignum.c2
-rw-r--r--class.c2
-rw-r--r--compar.c2
-rw-r--r--defines.h2
-rw-r--r--dir.c2
-rw-r--r--dln.c2
-rw-r--r--dln.h2
-rw-r--r--enum.c2
-rw-r--r--env.h2
-rw-r--r--error.c2
-rw-r--r--eval.c8
-rw-r--r--ext/kconv/kconv.c222
-rw-r--r--file.c2
-rw-r--r--gc.c2
-rw-r--r--hash.c2
-rw-r--r--inits.c2
-rw-r--r--io.c9
-rw-r--r--io.h6
-rw-r--r--lib/tk.rb18
-rw-r--r--lib/tkcore.rb5
-rw-r--r--lib/tkthcore.rb5
-rw-r--r--main.c2
-rw-r--r--math.c2
-rw-r--r--node.h2
-rw-r--r--numeric.c2
-rw-r--r--object.c2
-rw-r--r--pack.c2
-rw-r--r--parse.y7
-rw-r--r--process.c57
-rw-r--r--random.c2
-rw-r--r--range.c2
-rw-r--r--re.c2
-rw-r--r--re.h2
-rw-r--r--ruby.c2
-rw-r--r--ruby.h2
-rw-r--r--sample/tktimer.rb1
-rw-r--r--signal.c2
-rw-r--r--sprintf.c2
-rw-r--r--string.c2
-rw-r--r--struct.c2
-rw-r--r--time.c2
-rw-r--r--variable.c2
-rw-r--r--version.c2
-rw-r--r--version.h4
47 files changed, 235 insertions, 189 deletions
diff --git a/ChangeLog b/ChangeLog
index 78867f67d9..9281697f25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Wed Dec 25 00:33:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
+
+ * version 1.0-961225
+
+ * io.c (Init_IO): new̵
+
+ * lib/tkthcore.rb: tk_call "global $foo; set foo 5"ʤɤǤ褦
+
+ * eval.c (thread_restore_context): $~, $_ǥåƤ
+
+ * process.c (rb_waitpid): thread˰б
+
Tue Dec 24 15:20:58 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
* version 0.99.4-961224
diff --git a/ToDo b/ToDo
index c39e13625d..cfac8981fd 100644
--- a/ToDo
+++ b/ToDo
@@ -1,7 +1,5 @@
-* """..."""%Q#...#ΤɤĤ뤤ξ褫
* ѥåޤѿΥ
* formatǽ
-* here document
* perlΤ褦setuid check
* write debugger for ruby
* re-write regex code for speed and copyright
diff --git a/array.c b/array.c
index 040a18403c..741f09b9b1 100644
--- a/array.c
+++ b/array.c
@@ -3,7 +3,7 @@
array.c -
$Author: matz $
- $Date: 1995/01/10 10:42:18 $
+ $Date: 1996/12/25 10:42:18 $
created at: Fri Aug 6 09:46:12 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/bignum.c b/bignum.c
index 73316de894..e3bd528e72 100644
--- a/bignum.c
+++ b/bignum.c
@@ -3,7 +3,7 @@
bignum.c -
$Author: matz $
- $Date: 1995/01/10 10:42:19 $
+ $Date: 1996/12/25 10:42:19 $
created at: Fri Jun 10 00:48:55 JST 1994
************************************************/
diff --git a/class.c b/class.c
index 3e8ce517a6..645d295c19 100644
--- a/class.c
+++ b/class.c
@@ -3,7 +3,7 @@
class.c -
$Author: matz $
- $Date: 1995/01/12 08:54:44 $
+ $Date: 1996/12/25 08:54:44 $
created at: Tue Aug 10 15:05:44 JST 1993
Copyright (C) 1993-1995 Yukihiro Matsumoto
diff --git a/compar.c b/compar.c
index e406a0f0fe..1301121f14 100644
--- a/compar.c
+++ b/compar.c
@@ -3,7 +3,7 @@
compar.c -
$Author: matz $
- $Date: 1994/10/14 06:19:05 $
+ $Date: 1996/12/25 09:19:05 $
created at: Thu Aug 26 14:39:48 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/defines.h b/defines.h
index bef61b00fa..70e010aac9 100644
--- a/defines.h
+++ b/defines.h
@@ -3,7 +3,7 @@
defines.h -
$Author: matz $
- $Date: 1995/01/10 10:42:25 $
+ $Date: 1996/12/25 10:42:25 $
created at: Wed May 18 00:21:44 JST 1994
************************************************/
diff --git a/dir.c b/dir.c
index a1a6114406..fe4910b3a9 100644
--- a/dir.c
+++ b/dir.c
@@ -3,7 +3,7 @@
dir.c -
$Author: matz $
- $Date: 1995/01/10 10:42:28 $
+ $Date: 1996/12/25 10:42:28 $
created at: Wed Jan 5 09:51:01 JST 1994
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/dln.c b/dln.c
index b4005e973c..e5193a7ed7 100644
--- a/dln.c
+++ b/dln.c
@@ -3,7 +3,7 @@
dln.c -
$Author: matz $
- $Date: 1994/12/09 01:28:23 $
+ $Date: 1996/12/25 01:28:23 $
created at: Tue Jan 18 17:05:06 JST 1994
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/dln.h b/dln.h
index 79d99e74c1..6cfbc6aff6 100644
--- a/dln.h
+++ b/dln.h
@@ -4,7 +4,7 @@
$Author: matz $
$Revision: 1.2 $
- $Date: 1994/08/12 04:47:17 $
+ $Date: 1996/12/25 04:47:17 $
created at: Wed Jan 19 16:53:09 JST 1994
************************************************/
diff --git a/enum.c b/enum.c
index 39c09dbec8..5ec71bce42 100644
--- a/enum.c
+++ b/enum.c
@@ -3,7 +3,7 @@
enum.c -
$Author: matz $
- $Date: 1995/01/10 10:42:29 $
+ $Date: 1996/12/25 10:42:29 $
created at: Fri Oct 1 15:15:19 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/env.h b/env.h
index ff53def099..20838fd8da 100644
--- a/env.h
+++ b/env.h
@@ -4,7 +4,7 @@
$Author: matz $
$Revision: 1.8 $
- $Date: 1995/01/10 10:42:30 $
+ $Date: 1996/12/25 10:42:30 $
created at: Mon Jul 11 11:53:03 JST 1994
************************************************/
diff --git a/error.c b/error.c
index 61d5468c0d..d1c465b78f 100644
--- a/error.c
+++ b/error.c
@@ -3,7 +3,7 @@
error.c -
$Author: matz $
- $Date: 1995/01/10 10:42:31 $
+ $Date: 1996/12/25 10:42:31 $
created at: Mon Aug 9 16:11:34 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/eval.c b/eval.c
index 43a4bf07f6..2f2ee5923a 100644
--- a/eval.c
+++ b/eval.c
@@ -3,7 +3,7 @@
eval.c -
$Author: matz $
- $Date: 1995/01/12 08:54:45 $
+ $Date: 1996/12/25 08:54:45 $
created at: Thu Jun 10 14:22:17 JST 1993
Copyright (C) 1993-1995 Yukihiro Matsumoto
@@ -3858,9 +3858,6 @@ thread_restore_context(th, exit)
errinfo = th->errinfo;
last_status = th->last_status;
- lastline_set(th->last_line);
- backref_set(th->last_match);
-
sourcefile = th->file;
sourceline = th->line;
@@ -3869,6 +3866,9 @@ thread_restore_context(th, exit)
FLUSH_REGISTER_WINDOWS;
MEMCPY(tmp->stk_pos, tmp->stk_ptr, VALUE, tmp->stk_len);
+ lastline_set(tmp->last_line);
+ backref_set(tmp->last_match);
+
switch (ex) {
case 1:
JUMP_TAG2(TAG_FATAL, INT2FIX(0));
diff --git a/ext/kconv/kconv.c b/ext/kconv/kconv.c
index fd6c3bed0a..791b34b26b 100644
--- a/ext/kconv/kconv.c
+++ b/ext/kconv/kconv.c
@@ -33,6 +33,8 @@ static char *Version =
static char *Patchlevel =
"5/9612/Shinji Kono, COW matz";
+#include "ruby.h"
+
/*
**
**
@@ -128,8 +130,10 @@ static char *Patchlevel =
#include <windows.h>
#endif
+#ifndef FALSE
#define FALSE 0
#define TRUE 1
+#endif
/* state of output_mode and input_mode */
@@ -242,8 +246,104 @@ static int output_mode = ASCII, /* output kanji mode */
static int mime_mode = FALSE; /* MIME mode B base64, Q hex */
/* X0208 -> ASCII translation table */
+/* X0201 / X0208 conversion tables */
+
+/* X0201 kana conversion table */
+/* 90-9F A0-DF */
+static unsigned char cv[]= {
+0x21,0x21,0x21,0x23,0x21,0x56,0x21,0x57,
+0x21,0x22,0x21,0x26,0x25,0x72,0x25,0x21,
+0x25,0x23,0x25,0x25,0x25,0x27,0x25,0x29,
+0x25,0x63,0x25,0x65,0x25,0x67,0x25,0x43,
+0x21,0x3c,0x25,0x22,0x25,0x24,0x25,0x26,
+0x25,0x28,0x25,0x2a,0x25,0x2b,0x25,0x2d,
+0x25,0x2f,0x25,0x31,0x25,0x33,0x25,0x35,
+0x25,0x37,0x25,0x39,0x25,0x3b,0x25,0x3d,
+0x25,0x3f,0x25,0x41,0x25,0x44,0x25,0x46,
+0x25,0x48,0x25,0x4a,0x25,0x4b,0x25,0x4c,
+0x25,0x4d,0x25,0x4e,0x25,0x4f,0x25,0x52,
+0x25,0x55,0x25,0x58,0x25,0x5b,0x25,0x5e,
+0x25,0x5f,0x25,0x60,0x25,0x61,0x25,0x62,
+0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,
+0x25,0x6a,0x25,0x6b,0x25,0x6c,0x25,0x6d,
+0x25,0x6f,0x25,0x73,0x21,0x2b,0x21,0x2c,
+0x00,0x00};
+
-static unsigned char cv[],dv[],ev[],fv[];
+/* X0201 kana conversion table for daguten */
+/* 90-9F A0-DF */
+static unsigned char dv[]= {
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x25,0x2c,0x25,0x2e,
+0x25,0x30,0x25,0x32,0x25,0x34,0x25,0x36,
+0x25,0x38,0x25,0x3a,0x25,0x3c,0x25,0x3e,
+0x25,0x40,0x25,0x42,0x25,0x45,0x25,0x47,
+0x25,0x49,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x25,0x50,0x25,0x53,
+0x25,0x56,0x25,0x59,0x25,0x5c,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00};
+
+/* X0201 kana conversion table for han-daguten */
+/* 90-9F A0-DF */
+static unsigned char ev[]= {
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x25,0x51,0x25,0x54,
+0x25,0x57,0x25,0x5a,0x25,0x5d,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00};
+
+
+/* X0208 kigou conversion table */
+/* 0x8140 - 0x819e */
+static unsigned char fv[] = {
+0x00,0x00,0x00,0x00,0x2c,0x2e,0x00,0x3a,
+0x3b,0x3f,0x21,0x00,0x00,0x27,0x60,0x00,
+0x5e,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x2f,
+0x5c,0x00,0x00,0x7c,0x00,0x00,0x60,0x27,
+0x22,0x22,0x28,0x29,0x00,0x00,0x5b,0x5d,
+0x7b,0x7d,0x3c,0x3e,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x2b,0x2d,0x00,0x00,
+0x00,0x3d,0x00,0x3c,0x3e,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x24,0x00,0x00,0x25,0x23,0x26,0x2a,0x40,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
+} ;
+
+
+/* This converts =?ISO-2022-JP?B?HOGE HOGE?= */
+
+static unsigned char *mime_pattern[] = {
+ (unsigned char *)"\075?ISO-8859-1?Q?",
+ (unsigned char *)"\075?ISO-2022-JP?B?",
+ (unsigned char *)"\075?ISO-2022-JP?Q?",
+ NULL
+};
+
+static int mime_encode[] = {
+ 'Q', 'B', 'Q',
+ 0
+};
#ifdef notdef
static int file_out = FALSE;
@@ -1002,7 +1102,7 @@ h_conv (c2, c1)
-int
+static int
push_hold_buf (c2, c1)
int c2,
c1;
@@ -1274,7 +1374,7 @@ j_oconv (c2, c1)
This is the main difference from fmt.
*/
-int
+static int
fold(c2,c1)
register int c2,c1;
{
@@ -1397,7 +1497,7 @@ register int c2,c1;
}
}
-int
+static int
pre_convert(c1,c2)
register int c1,c2;
{
@@ -1438,112 +1538,12 @@ register int c1,c2;
}
-/* X0201 / X0208 conversion tables */
-
-/* X0201 kana conversion table */
-/* 90-9F A0-DF */
-unsigned char cv[]= {
-0x21,0x21,0x21,0x23,0x21,0x56,0x21,0x57,
-0x21,0x22,0x21,0x26,0x25,0x72,0x25,0x21,
-0x25,0x23,0x25,0x25,0x25,0x27,0x25,0x29,
-0x25,0x63,0x25,0x65,0x25,0x67,0x25,0x43,
-0x21,0x3c,0x25,0x22,0x25,0x24,0x25,0x26,
-0x25,0x28,0x25,0x2a,0x25,0x2b,0x25,0x2d,
-0x25,0x2f,0x25,0x31,0x25,0x33,0x25,0x35,
-0x25,0x37,0x25,0x39,0x25,0x3b,0x25,0x3d,
-0x25,0x3f,0x25,0x41,0x25,0x44,0x25,0x46,
-0x25,0x48,0x25,0x4a,0x25,0x4b,0x25,0x4c,
-0x25,0x4d,0x25,0x4e,0x25,0x4f,0x25,0x52,
-0x25,0x55,0x25,0x58,0x25,0x5b,0x25,0x5e,
-0x25,0x5f,0x25,0x60,0x25,0x61,0x25,0x62,
-0x25,0x64,0x25,0x66,0x25,0x68,0x25,0x69,
-0x25,0x6a,0x25,0x6b,0x25,0x6c,0x25,0x6d,
-0x25,0x6f,0x25,0x73,0x21,0x2b,0x21,0x2c,
-0x00,0x00};
-
-
-/* X0201 kana conversion table for daguten */
-/* 90-9F A0-DF */
-unsigned char dv[]= {
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x25,0x2c,0x25,0x2e,
-0x25,0x30,0x25,0x32,0x25,0x34,0x25,0x36,
-0x25,0x38,0x25,0x3a,0x25,0x3c,0x25,0x3e,
-0x25,0x40,0x25,0x42,0x25,0x45,0x25,0x47,
-0x25,0x49,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x25,0x50,0x25,0x53,
-0x25,0x56,0x25,0x59,0x25,0x5c,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00};
-
-/* X0201 kana conversion table for han-daguten */
-/* 90-9F A0-DF */
-unsigned char ev[]= {
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x25,0x51,0x25,0x54,
-0x25,0x57,0x25,0x5a,0x25,0x5d,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00};
-
-
-/* X0208 kigou conversion table */
-/* 0x8140 - 0x819e */
-unsigned char fv[] = {
-
-0x00,0x00,0x00,0x00,0x2c,0x2e,0x00,0x3a,
-0x3b,0x3f,0x21,0x00,0x00,0x27,0x60,0x00,
-0x5e,0x00,0x5f,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x2d,0x00,0x2f,
-0x5c,0x00,0x00,0x7c,0x00,0x00,0x60,0x27,
-0x22,0x22,0x28,0x29,0x00,0x00,0x5b,0x5d,
-0x7b,0x7d,0x3c,0x3e,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x2b,0x2d,0x00,0x00,
-0x00,0x3d,0x00,0x3c,0x3e,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x24,0x00,0x00,0x25,0x23,0x26,0x2a,0x40,
-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
-} ;
-
-
-/* This converts =?ISO-2022-JP?B?HOGE HOGE?= */
-
-unsigned char *mime_pattern[] = {
- (unsigned char *)"\075?ISO-8859-1?Q?",
- (unsigned char *)"\075?ISO-2022-JP?B?",
- (unsigned char *)"\075?ISO-2022-JP?Q?",
- NULL
-};
-
-int mime_encode[] = {
- 'Q', 'B', 'Q',
- 0
-};
-
-int iso8859_f_save;
+static int iso8859_f_save;
#define nkf_toupper(c) (('a'<=c && c<='z')?(c-('a'-'A')):c)
/* I don't trust portablity of toupper */
-int
+static int
mime_begin()
{
int c1;
@@ -1594,7 +1594,7 @@ mime_begin()
#define mime_getc0() (mimebuf_f?_GETC():Fifo(mime_input++))
#define mime_ungetc0(c) (mimebuf_f?_UNGETC(c):mime_input--)
-int
+static int
mime_getc()
{
int c1, c2, c3, c4, cc;
@@ -1705,7 +1705,7 @@ mime_getc()
return Fifo(mime_top++);
}
-int
+static int
mime_ungetc(c)
unsigned int c;
{
@@ -1714,7 +1714,7 @@ unsigned int c;
}
-int
+static int
mime_integrity(p)
unsigned char *p;
{
@@ -1749,7 +1749,7 @@ unsigned char *p;
return 1;
}
-int
+static int
base64decode(c)
int c;
{
@@ -1820,8 +1820,6 @@ usage()
}
#endif /* notdef */
-#include "ruby.h"
-
static VALUE
kconv_kconv(argc, argv)
int argc;
diff --git a/file.c b/file.c
index 447cba5b52..656650b11b 100644
--- a/file.c
+++ b/file.c
@@ -3,7 +3,7 @@
file.c -
$Author: matz $
- $Date: 1995/01/10 10:42:36 $
+ $Date: 1996/12/25 10:42:36 $
created at: Mon Nov 15 12:24:34 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/gc.c b/gc.c
index c1817b7cd0..21d09809be 100644
--- a/gc.c
+++ b/gc.c
@@ -3,7 +3,7 @@
gc.c -
$Author: matz $
- $Date: 1995/01/12 08:54:47 $
+ $Date: 1996/12/25 09:54:47 $
created at: Tue Oct 5 09:44:46 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/hash.c b/hash.c
index d2ee598869..c6af916559 100644
--- a/hash.c
+++ b/hash.c
@@ -3,7 +3,7 @@
hash.c -
$Author: matz $
- $Date: 1995/01/10 10:42:26 $
+ $Date: 1996/12/25 10:42:26 $
created at: Mon Nov 22 18:51:18 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/inits.c b/inits.c
index a6eb7f5150..e3456814e8 100644
--- a/inits.c
+++ b/inits.c
@@ -3,7 +3,7 @@
inits.c -
$Author: matz $
- $Date: 1995/01/10 10:42:38 $
+ $Date: 1996/12/25 10:42:38 $
created at: Tue Dec 28 16:01:58 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/io.c b/io.c
index 43e2458668..7c0fbd8d2b 100644
--- a/io.c
+++ b/io.c
@@ -3,7 +3,7 @@
io.c -
$Author: matz $
- $Date: 1995/01/10 10:42:39 $
+ $Date: 1996/12/25 10:42:39 $
created at: Fri Oct 15 18:08:59 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
@@ -116,6 +116,11 @@ closed()
Raise(eIOError, "closed stream");
}
+void
+io_wrong_type()
+{
+}
+
/* writing functions */
VALUE
io_write(io, str)
@@ -1738,6 +1743,8 @@ Init_IO()
cIO = rb_define_class("IO", cObject);
rb_include_module(cIO, mEnumerable);
+ rb_undef_method(CLASS_OF(cIO), "new");
+
rb_define_singleton_method(cIO, "popen", io_popen, -1);
rb_define_singleton_method(cIO, "foreach", io_foreach, 1);
rb_define_singleton_method(cIO, "select", f_select, -1);
diff --git a/io.h b/io.h
index 2817835ef3..bc15d46e0e 100644
--- a/io.h
+++ b/io.h
@@ -4,7 +4,7 @@
$Author: matz $
$Revision: 1.3 $
- $Date: 1994/08/12 11:06:42 $
+ $Date: 1996/12/25 11:06:42 $
created at: Fri Nov 12 16:47:09 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
@@ -33,7 +33,9 @@ typedef struct OpenFile {
#define FMODE_READWRITE 3
#define FMODE_SYNC 4
-#define GetOpenFile(obj,fp) fp = RFILE(obj)->fptr
+void io_wrong_type();
+
+#define GetOpenFile(obj,fp) ((fp) = RFILE(obj)->fptr)
#define MakeOpenFile(obj, fp) do {\
fp = RFILE(obj)->fptr = ALLOC(OpenFile);\
diff --git a/lib/tk.rb b/lib/tk.rb
index 5a725aac11..237408a77a 100644
--- a/lib/tk.rb
+++ b/lib/tk.rb
@@ -486,12 +486,12 @@ class TkLabel<TkWindow
tk_call 'label', @path
end
def textvariable(v)
- v = v.id2name unless v.kind_of "String"
+ v = v.id2name unless v.kind_of? String
vn = @path + v
- vset = format("global {%s}; set {%s}", vn, vn)
- tk_call vset, eval(v).inspect
+ vset = format("global {%s}; set {%s} %%s", vn, vn)
+ tk_write vset, eval(v).inspect
trace_var v, proc{|val|
- tk_call vset, val.inspect
+ tk_write vset, val.inspect
}
configure 'textvariable', vn
end
@@ -520,7 +520,7 @@ class TkRadioButton<TkButton
tk_send 'select'
end
def variable(v)
- v = v.id2name unless v.kind_of "String"
+ v = v.id2name unless v.kind_of? String
if v =~ /^\$/
v = $'
else
@@ -528,13 +528,13 @@ class TkRadioButton<TkButton
end
vn = 'btns_selected_' + v
trace_var v, proc{|val|
- tk_call 'set', vn, val
+ tk_write 'global %s; set %s %s', vn, val
}
@var_id = install_cmd(proc{|name1,|
- val = tk_call('set', name1)
+ val = tk_call(format('global %s; set', name1), name1)
eval(format("%s = '%s'", v.id2name, val))
})
- tk_call 'trace variable', vn, 'w', @var_id
+ tk_call 'trace', 'variable', vn, 'w', @var_id
configure 'variable', vn
end
def destroy
@@ -732,7 +732,7 @@ module TkComposite
def delegate(option, *wins)
@delegates = {} if not @delegates
@delegates['DEFAULT'] = @frame
- if option.kind_of? String
+ if option.kind_of?(String)
@delegates[option] = wins
else
for i in option
diff --git a/lib/tkcore.rb b/lib/tkcore.rb
index df4af669ba..018e140ef0 100644
--- a/lib/tkcore.rb
+++ b/lib/tkcore.rb
@@ -185,7 +185,7 @@ after 120000 keepalive'
end
$tk_event_queue = []
- def tk_call(*args)
+ def tk_call(str, *args)
args = args.collect{|s|
next if s == None
if s.kind_of?(Hash)
@@ -204,7 +204,8 @@ after 120000 keepalive'
"{#{s}}"
end
}
- str = args.join(" ")
+ str += " "
+ str += args.join(" ")
print str, "\n" if $DEBUG
tk_write 'rb_ans %s', str
while PORT.gets
diff --git a/lib/tkthcore.rb b/lib/tkthcore.rb
index adbad775d0..5e0abd72c5 100644
--- a/lib/tkthcore.rb
+++ b/lib/tkthcore.rb
@@ -109,7 +109,7 @@ module Tk
val
end
- def tk_call(*args)
+ def tk_call(str, *args)
Tk.init if $tk_not_init
args = args.collect{|s|
next if s == None
@@ -129,7 +129,8 @@ module Tk
"{#{s}}"
end
}
- str = args.join(" ")
+ str += " "
+ str += args.join(" ")
Qin.push str
return Qout.pop
end
diff --git a/main.c b/main.c
index 5bc0ecf62f..c42656e61b 100644
--- a/main.c
+++ b/main.c
@@ -3,7 +3,7 @@
main.c -
$Author: matz $
- $Date: 1994/08/19 09:32:03 $
+ $Date: 1996/12/25 09:32:03 $
created at: Fri Aug 19 13:19:58 JST 1994
************************************************/
diff --git a/math.c b/math.c
index db4e4afc7e..287b94d595 100644
--- a/math.c
+++ b/math.c
@@ -3,7 +3,7 @@
math.c -
$Author: matz $
- $Date: 1994/11/01 08:28:03 $
+ $Date: 1996/12/25 09:28:03 $
created at: Tue Jan 25 14:12:56 JST 1994
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/node.h b/node.h
index eb91c01196..d6f5c21b97 100644
--- a/node.h
+++ b/node.h
@@ -3,7 +3,7 @@
node.h -
$Author: matz $
- $Date: 1995/01/10 10:42:41 $
+ $Date: 1996/12/25 10:42:41 $
created at: Fri May 28 15:14:02 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/numeric.c b/numeric.c
index 0ff94dc046..61575834db 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3,7 +3,7 @@
numeric.c -
$Author: matz $
- $Date: 1995/01/10 10:42:42 $
+ $Date: 1996/12/25 10:42:42 $
created at: Fri Aug 13 18:33:09 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/object.c b/object.c
index 5b18835613..6feca1bdad 100644
--- a/object.c
+++ b/object.c
@@ -3,7 +3,7 @@
object.c -
$Author: matz $
- $Date: 1995/01/12 08:54:49 $
+ $Date: 1996/12/25 08:54:49 $
created at: Thu Jul 15 12:01:24 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/pack.c b/pack.c
index 3e54b2ba3a..a0f96aa262 100644
--- a/pack.c
+++ b/pack.c
@@ -3,7 +3,7 @@
pack.c -
$Author: matz $
- $Date: 1994/12/09 09:40:22 $
+ $Date: 1996/12/25 09:40:22 $
created at: Thu Feb 10 15:17:05 JST 1994
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/parse.y b/parse.y
index 741dd2573b..350c83a7ca 100644
--- a/parse.y
+++ b/parse.y
@@ -3,7 +3,7 @@
parse.y -
$Author: matz $
- $Date: 1995/01/12 08:54:50 $
+ $Date: 1996/12/25 08:54:50 $
created at: Fri May 28 18:02:42 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
@@ -3093,7 +3093,10 @@ top_local_init()
else {
lvtbl->tbl = 0;
}
- lvtbl->dlev = (the_dyna_vars?1:0);
+ if (the_dyna_vars && the_dyna_vars->id)
+ lvtbl->dlev = 1;
+ else
+ lvtbl->dlev = 0;
}
static void
diff --git a/process.c b/process.c
index 29f61ddd42..c3e7bffa54 100644
--- a/process.c
+++ b/process.c
@@ -3,7 +3,7 @@
process.c -
$Author: matz $
- $Date: 1995/01/10 10:42:47 $
+ $Date: 1996/12/25 10:42:47 $
created at: Tue Aug 10 14:30:50 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
@@ -76,7 +76,12 @@ rb_waitpid(pid, flags, st)
retry:
result = waitpid(pid, st, flags);
if (result < 0) {
- if (errno == EINTR) goto retry;
+ if (errno == EINTR) {
+#ifdef THREAD
+ thread_schedule();
+#endif
+ goto retry;
+ }
return -1;
}
#else
@@ -84,7 +89,12 @@ rb_waitpid(pid, flags, st)
retry:
result = wait4(pid, st, flags, NULL);
if (result < 0) {
- if (errno == EINTR) goto retry;
+ if (errno == EINTR) {
+#ifdef THREAD
+ thread_schedule();
+#endif
+ goto retry;
+ }
return -1;
}
#else
@@ -94,13 +104,19 @@ rb_waitpid(pid, flags, st)
return pid;
}
- if (flags)
- Fatal("Can't do waitpid with flags");
+ if (flags) {
+ ArgError("Can't do waitpid with flags");
+ }
for (;;) {
result = wait(st);
if (result < 0) {
- if (errno != EINTR) continue;
+ if (errno == EINTR) {
+#ifdef THREAD
+ thread_schedule();
+#endif
+ continue;
+ }
return -1;
}
if (result == pid) {
@@ -122,7 +138,8 @@ struct wait_data {
int status;
}
-static wait_each(key, value, data)
+static int
+wait_each(key, value, data)
int key, value;
struct wait_data *data;
{
@@ -149,7 +166,13 @@ f_wait()
}
#endif
- if ((pid = wait(&state)) < 0) {
+ while ((pid = wait(&state)) < 0) {
+ if (errno == EINTR) {
+#ifdef THREAD
+ thread_schedule();
+#endif
+ continue;
+ }
if (errno == ECHILD) return Qnil;
rb_sys_fail(0);
}
@@ -252,13 +275,13 @@ rb_proc_exec(str)
for (s=str; *s; s++) {
if (*s != ' ' && !isalpha(*s) && strchr("*?{}[]<>()~&|\\$;'`\"\n",*s)) {
- before_exec();
#if defined(MSDOS)
system(str);
#else
+ before_exec();
execl("/bin/sh", "sh", "-c", str, (char *)NULL);
-#endif
after_exec();
+#endif
return -1;
}
}
@@ -529,7 +552,7 @@ proc_setpgid(obj, pid, pgrp)
ipid = NUM2INT(pid);
ipgrp = NUM2INT(pgrp);
- if (setpgid(ipid, ipgrp) == -1) rb_sys_fail(0);
+ if (setpgid(ipid, ipgrp) < 0) rb_sys_fail(0);
return Qnil;
}
#endif
@@ -545,7 +568,7 @@ proc_getpriority(obj, which, who)
iwho = NUM2INT(who);
prio = getpriority(iwhich, iwho);
- if (prio == -1) rb_sys_fail(0);
+ if (prio < 0) rb_sys_fail(0);
return INT2FIX(prio);
#else
rb_notimplement();
@@ -563,7 +586,7 @@ proc_setpriority(obj, which, who, prio)
iwho = NUM2INT(who);
iprio = NUM2INT(prio);
- if (setpriority(iwhich, iwho, iprio) == -1)
+ if (setpriority(iwhich, iwho, iprio) < 0)
rb_sys_fail(0);
return INT2FIX(0);
#else
@@ -649,10 +672,10 @@ proc_seteuid(obj, euid)
VALUE obj, euid;
{
#ifdef HAVE_SETEUID
- if (seteuid(NUM2INT(euid)) == -1) rb_sys_fail(0);
+ if (seteuid(NUM2INT(euid)) < 0) rb_sys_fail(0);
#else
#ifdef HAVE_SETREUID
- if (setreuid(-1, NUM2INT(euid)) == -1) rb_sys_fail(0);
+ if (setreuid(-1, NUM2INT(euid)) < 0) rb_sys_fail(0);
#else
euid = NUM2INT(euid);
if (euid == getuid())
@@ -677,10 +700,10 @@ proc_setegid(obj, egid)
VALUE obj, egid;
{
#ifdef HAVE_SETEGID
- if (setegid(NUM2INT(egid)) == -1) rb_sys_fail(0);
+ if (setegid(NUM2INT(egid)) < 0) rb_sys_fail(0);
#else
#ifdef HAVE_SETREGID
- if (setregid(-1, NUM2INT(egid)) == -1) rb_sys_fail(0);
+ if (setregid(-1, NUM2INT(egid)) < 0) rb_sys_fail(0);
#else
egid = NUM2INT(egid);
if (egid == getgid())
diff --git a/random.c b/random.c
index ebe5a35dee..c9f4004ebb 100644
--- a/random.c
+++ b/random.c
@@ -3,7 +3,7 @@
random.c -
$Author: matz $
- $Date: 1995/01/10 10:42:48 $
+ $Date: 1996/12/25 10:42:48 $
created at: Fri Dec 24 16:39:21 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/range.c b/range.c
index b7d2f3b75e..da0e6a2d83 100644
--- a/range.c
+++ b/range.c
@@ -3,7 +3,7 @@
range.c -
$Author: matz $
- $Date: 1994/12/06 09:30:12 $
+ $Date: 1996/12/25 09:30:12 $
created at: Thu Aug 19 17:46:47 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/re.c b/re.c
index bd6c2fb9b8..673306e0f7 100644
--- a/re.c
+++ b/re.c
@@ -3,7 +3,7 @@
re.c -
$Author: matz $
- $Date: 1995/01/10 10:42:49 $
+ $Date: 1996/12/25 10:42:49 $
created at: Mon Aug 9 18:24:49 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/re.h b/re.h
index ebbe0673f5..17e0d9545c 100644
--- a/re.h
+++ b/re.h
@@ -4,7 +4,7 @@
$Author: matz $
$Revision: 1.2 $
- $Date: 1994/08/12 04:47:52 $
+ $Date: 1996/12/25 09:47:52 $
created at: Thu Sep 30 14:18:32 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/ruby.c b/ruby.c
index 8e4ab30148..b61b72eb9a 100644
--- a/ruby.c
+++ b/ruby.c
@@ -3,7 +3,7 @@
ruby.c -
$Author: matz $
- $Date: 1995/01/10 10:42:51 $
+ $Date: 1996/12/25 10:42:51 $
created at: Tue Aug 10 12:47:31 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/ruby.h b/ruby.h
index 13c96e1a73..f9d0c6833b 100644
--- a/ruby.h
+++ b/ruby.h
@@ -3,7 +3,7 @@
ruby.h -
$Author: matz $
- $Date: 1995/01/12 08:54:52 $
+ $Date: 1996/12/25 08:54:52 $
created at: Thu Jun 10 14:26:32 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/sample/tktimer.rb b/sample/tktimer.rb
index b8b3617646..34377e2f39 100644
--- a/sample/tktimer.rb
+++ b/sample/tktimer.rb
@@ -22,6 +22,7 @@ TkButton.new {
TkButton.new {
text 'Stop'
command proc{
+ exit if $stopped
$stopped = TRUE
}
pack('side'=>'right','fill'=>'both','expand'=>'yes')
diff --git a/signal.c b/signal.c
index a7a35f0a90..f36d9abac5 100644
--- a/signal.c
+++ b/signal.c
@@ -3,7 +3,7 @@
signal.c -
$Author: matz $
- $Date: 1995/01/10 10:42:53 $
+ $Date: 1996/12/25 10:42:53 $
created at: Tue Dec 20 10:13:44 JST 1994
************************************************/
diff --git a/sprintf.c b/sprintf.c
index c845ecc0f4..df0ecba376 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -3,7 +3,7 @@
sprintf.c -
$Author: matz $
- $Date: 1995/01/10 10:42:59 $
+ $Date: 1996/12/25 10:42:59 $
created at: Fri Oct 15 10:39:26 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/string.c b/string.c
index 73a57726fb..4d4867f37a 100644
--- a/string.c
+++ b/string.c
@@ -3,7 +3,7 @@
string.c -
$Author: matz $
- $Date: 1995/01/10 10:43:01 $
+ $Date: 1996/12/25 10:43:01 $
created at: Mon Aug 9 17:12:58 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/struct.c b/struct.c
index bf8a468787..e9980d145b 100644
--- a/struct.c
+++ b/struct.c
@@ -3,7 +3,7 @@
struct.c -
$Author: matz $
- $Date: 1995/01/10 10:43:02 $
+ $Date: 1996/12/25 10:43:02 $
created at: Tue Mar 22 18:44:30 JST 1995
************************************************/
diff --git a/time.c b/time.c
index 1cfac22160..17e5497b22 100644
--- a/time.c
+++ b/time.c
@@ -3,7 +3,7 @@
time.c -
$Author: matz $
- $Date: 1994/12/06 09:30:28 $
+ $Date: 1996/12/25 09:30:28 $
created at: Tue Dec 28 14:31:59 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/variable.c b/variable.c
index 1d6449bcab..668385f18a 100644
--- a/variable.c
+++ b/variable.c
@@ -3,7 +3,7 @@
variable.c -
$Author: matz $
- $Date: 1995/01/12 08:54:53 $
+ $Date: 1996/12/25 08:54:53 $
created at: Tue Apr 19 23:55:15 JST 1994
************************************************/
diff --git a/version.c b/version.c
index 26ef8d054f..440cba4c61 100644
--- a/version.c
+++ b/version.c
@@ -4,7 +4,7 @@
$Author: matz $
$Revision: 1.5 $
- $Date: 1995/01/12 08:54:54 $
+ $Date: 1996/12/25 08:54:54 $
created at: Thu Sep 30 20:08:01 JST 1993
Copyright (C) 1993-1996 Yukihiro Matsumoto
diff --git a/version.h b/version.h
index 3ed36e70e2..8e8b66cb32 100644
--- a/version.h
+++ b/version.h
@@ -1,2 +1,2 @@
-#define RUBY_VERSION "0.99.4-961224"
-#define VERSION_DATE "96/12/24"
+#define RUBY_VERSION "1.0-961225"
+#define VERSION_DATE "96/12/25"