summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-24 09:58:10 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-24 09:58:10 +0000
commit263e95ed7d220839f897533f1e642081a0be1e84 (patch)
tree98ece843e1b05a4b48bcc65ed83548cf99ff1282
parent491cfd93f758330b1c36e6797129006b776532e8 (diff)
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--ruby.c14
-rw-r--r--version.h4
-rw-r--r--win32/win32.c11
4 files changed, 21 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index fa0339fd4e..464dea91ab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
+Mon Jul 24 18:52:55 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * win32/win32.c (win32_getenv): should remove `static'.
+
+ * ruby.c (rubylib_mangle): support "/hoge;/foo"
+
Sun Jul 23 12:55:04 2000 Dave Thomas <Dave@Thomases.com>
- * string.c (rb_str_rindex): Support negative end position.
+ * string.c (rb_str_rindex): Support negative end position.
Fri Jul 21 17:35:01 2000 Yukihiro Matsumoto <matz@netlab.co.jp>
diff --git a/ruby.c b/ruby.c
index 6fefa829fc..e188c2140b 100644
--- a/ruby.c
+++ b/ruby.c
@@ -128,12 +128,12 @@ rubylib_mangle(s, l)
static char *newp, *oldp;
static int newl, oldl, notfound;
static char ret[STATIC_FILE_LENGTH+1];
-
+
if (!newp && !notfound) {
newp = getenv("RUBYLIB_PREFIX");
if (newp) {
char *s;
-
+
oldp = newp;
while (*newp && !ISSPACE(*newp) && *newp != ';') {
newp++; oldl++; /* Skip digits. */
@@ -155,19 +155,19 @@ rubylib_mangle(s, l)
notfound = 1;
}
}
- if (!newp) {
- return s;
- }
if (l == 0) {
l = strlen(s);
}
- if (l < oldl || strncasecmp(oldp, s, oldl) != 0) {
- return s;
+ if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) {
+ strncpy(ret, s, l);
+ ret[l] = 0;
+ return ret;
}
if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {
rb_fatal("malformed RUBYLIB_PREFIX");
}
strcpy(ret + newl, s + oldl);
+ ret[l + newl - oldl] = 0;
return ret;
}
#define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
diff --git a/version.h b/version.h
index ae878ce6ac..f52ad490bb 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.4.6"
-#define RUBY_RELEASE_DATE "2000-07-21"
+#define RUBY_RELEASE_DATE "2000-07-24"
#define RUBY_VERSION_CODE 146
-#define RUBY_RELEASE_CODE 20000721
+#define RUBY_RELEASE_CODE 20000724
diff --git a/win32/win32.c b/win32/win32.c
index e186e2af12..0b2b3a97d4 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2350,13 +2350,12 @@ wait()
char *
win32_getenv(const char *name)
{
- static char *curitem = NULL; /* XXX threadead */
- static DWORD curlen = 0; /* XXX threadead */
+ char *curitem = NULL; /* XXX threadead */
+ DWORD curlen = 0; /* XXX threadead */
DWORD needlen;
- if (!curitem) {
- curlen = 512;
- curitem = ALLOC_N(char, curlen);
- }
+
+ curlen = 512;
+ curitem = ALLOC_N(char, curlen);
needlen = GetEnvironmentVariable(name,curitem,curlen);
if (needlen != 0) {