summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Makefile.in2
-rw-r--r--eval.c3
-rw-r--r--ext/Setup2
-rw-r--r--lib/delegate.rb4
-rw-r--r--lib/jcode.rb10
-rw-r--r--missing/dir.h15
-rw-r--r--missing/file.h1
-rw-r--r--regex.h4
-rw-r--r--string.c6
10 files changed, 32 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index b7827bc5e1..71c28746cd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@ Thu Mar 26 11:51:09 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (block_pass): block argument can be nil, which means no
block is supplied for the method.
+Wed Mar 25 21:20:13 1998 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+
+ * string.c (str_reverse_bang): string copied to wrong place.
+
Wed Mar 25 08:12:07 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
* numeric.c (flo_modulo): caused SEGV if left operand is not a
@@ -29,7 +33,7 @@ Tue Mar 24 12:50:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
Mon Mar 23 12:44:12 1998 Yukihiro Matsumoto <matz@netlab.co.jp>
- * string.c (str_chomp_bang): now takes rs as an argument.
+ * string.c (str_chomp_bang): now takes `rs' as an argument.
* eval.c (thread_free): main_thread should not be freed.
diff --git a/Makefile.in b/Makefile.in
index d64875ef44..a237ef149d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -42,8 +42,8 @@ OBJS = array.o \
hash.o \
inits.o \
io.o \
- math.o \
marshal.o \
+ math.o \
numeric.o \
object.o \
pack.o \
diff --git a/eval.c b/eval.c
index 1fe013ffe7..50f288acdf 100644
--- a/eval.c
+++ b/eval.c
@@ -4784,7 +4784,8 @@ struct METHOD {
};
static void
-bm_mark(struct METHOD *data)
+bm_mark(data)
+ struct METHOD *data;
{
gc_mark(data->oklass);
gc_mark(data->klass);
diff --git a/ext/Setup b/ext/Setup
index 9e3a2474c3..4258bd4873 100644
--- a/ext/Setup
+++ b/ext/Setup
@@ -1,7 +1,7 @@
#option nodynamic
#GD
-#curses
+curses
#dbm
#etc
#fcntl
diff --git a/lib/delegate.rb b/lib/delegate.rb
index 04c824401a..90d1d1abb0 100644
--- a/lib/delegate.rb
+++ b/lib/delegate.rb
@@ -1,8 +1,8 @@
# Delegation class that delegates even methods defined in super class,
# which can not be covered with normal method_missing hack.
#
-# Delegater is the abstract delegation class. Need to redefine
-# `__getobj__' method in the subclass. SimpleDelegater is the
+# Delegator is the abstract delegation class. Need to redefine
+# `__getobj__' method in the subclass. SimpleDelegator is the
# concrete subclass for simple delegation.
#
# Usage:
diff --git a/lib/jcode.rb b/lib/jcode.rb
index 34d3ebb453..d7c16a173c 100644
--- a/lib/jcode.rb
+++ b/lib/jcode.rb
@@ -11,11 +11,11 @@ class String
alias original_succ succ
private :original_succ
- def mbchar?(c)
+ def mbchar?
if $KCODE =~ /^s/i
- c =~ /[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc]/n
+ self =~ /[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc]/n
elsif $KCODE =~ /^e/i
- c =~ /[\xa1-\xfe][\xa1-\xfe]/n
+ self =~ /[\xa1-\xfe][\xa1-\xfe]/n
else
FALSE
end
@@ -25,7 +25,7 @@ class String
if self[-2] && self[-2] & 0x80 != 0
s = self.dup
s[-1] += 1
- s[-1] += 1 if !mbchar?(s)
+ s[-1] += 1 if !s.mbchar?
return s
else
original_succ
@@ -42,7 +42,7 @@ class String
if self[0..-2] == to[0..-2]
first = self[-2].chr
for c in self[-1] .. to[-1]
- if mbchar?(first+c.chr)
+ if first+c.chr.mbchar?
yield self[0..-2]+c.chr
end
end
diff --git a/missing/dir.h b/missing/dir.h
index 6cf5318fa9..8c29869590 100644
--- a/missing/dir.h
+++ b/missing/dir.h
@@ -1,4 +1,4 @@
-/* $RCSfile: dir.h,v $$Revision: 1.1.1.2 $$Date: 1998/01/16 04:14:54 $
+/* $RCSfile: dir.h,v $$Revision: 4.0.1.1 $$Date: 91/06/07 11:22:10 $
*
* (C) Copyright 1987, 1990 Diomidis Spinellis.
*
@@ -6,9 +6,6 @@
* License or the Artistic License, as specified in the README file.
*
* $Log: dir.h,v $
- * Revision 1.1.1.2 1998/01/16 04:14:54 matz
- * *** empty log message ***
- *
* Revision 4.0.1.1 91/06/07 11:22:10 lwall
* patch4: new copyright notice
*
@@ -64,7 +61,7 @@ void rewinddir(DIR *dirp);
void closedir(DIR *dirp);
#endif /* __DIR_INCLUDED */
-/* $RCSfile: dir.h,v $$Revision: 1.1.1.2 $$Date: 1998/01/16 04:14:54 $
+/* $RCSfile: dir.h,v $$Revision: 1.1.1.2.2.1 $$Date: 1998/01/16 12:36:08 $
*
* (C) Copyright 1987, 1990 Diomidis Spinellis.
*
@@ -72,6 +69,9 @@ void closedir(DIR *dirp);
* License or the Artistic License, as specified in the README file.
*
* $Log: dir.h,v $
+ * Revision 1.1.1.2.2.1 1998/01/16 12:36:08 matz
+ * *** empty log message ***
+ *
* Revision 1.1.1.2 1998/01/16 04:14:54 matz
* *** empty log message ***
*
@@ -128,7 +128,7 @@ void rewinddir(DIR *dirp);
void closedir(DIR *dirp);
#endif /* __DIR_INCLUDED */
-/* $RCSfile: dir.h,v $$Revision: 1.1.1.2 $$Date: 1998/01/16 04:14:54 $
+/* $RCSfile: dir.h,v $$Revision: 1.1.1.2.2.1 $$Date: 1998/01/16 12:36:08 $
*
* (C) Copyright 1987, 1990 Diomidis Spinellis.
*
@@ -136,6 +136,9 @@ void closedir(DIR *dirp);
* License or the Artistic License, as specified in the README file.
*
* $Log: dir.h,v $
+ * Revision 1.1.1.2.2.1 1998/01/16 12:36:08 matz
+ * *** empty log message ***
+ *
* Revision 1.1.1.2 1998/01/16 04:14:54 matz
* *** empty log message ***
*
diff --git a/missing/file.h b/missing/file.h
index 0207dddb3a..79f5f65f5d 100644
--- a/missing/file.h
+++ b/missing/file.h
@@ -24,7 +24,6 @@
#define F_OK 0 /* does file exist */
-
#define X_OK 1 /* is it executable by caller */
#define W_OK 2 /* is it writable by caller */
#define R_OK 4 /* is it readable by caller */
diff --git a/regex.h b/regex.h
index 1bca032024..1d25ea62e1 100644
--- a/regex.h
+++ b/regex.h
@@ -172,7 +172,11 @@ extern long re_syntax_options;
extern const unsigned char *mbctab;
extern int current_mbctype;
+#ifdef __STDC__
void mbcinit (int);
+#else
+void mbcinit ();
+#endif
#undef ismbchar
#define ismbchar(c) mbctab[(unsigned char)(c)]
diff --git a/string.c b/string.c
index 6a1165ce1e..e8a87fd2a4 100644
--- a/string.c
+++ b/string.c
@@ -1270,16 +1270,16 @@ static VALUE
str_reverse_bang(str)
VALUE str;
{
- UCHAR *s, *e, *p;
+ UCHAR *s, *e, *p, *q;
s = RSTRING(str)->ptr;
e = s + RSTRING(str)->len - 1;
- p = ALLOCA_N(char, RSTRING(str)->len);
+ p = q = ALLOCA_N(char, RSTRING(str)->len);
while (e >= s) {
*p++ = *e--;
}
- MEMCPY(RSTRING(str)->ptr, p, char, RSTRING(str)->len);
+ MEMCPY(RSTRING(str)->ptr, q, char, RSTRING(str)->len);
return str;
}