diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-24 09:58:10 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-07-24 09:58:10 +0000 |
commit | b9373b7aeaf51441cd36334635022bd4f9523a4b (patch) | |
tree | d0155ef14afb8fb0e930b3ccbe795222586ae989 | |
parent | a4fe713cb199934e8b7870850c50fcc24fb5685f (diff) | |
download | ruby-b9373b7aeaf51441cd36334635022bd4f9523a4b.tar.gz |
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ruby.c | 14 | ||||
-rw-r--r-- | version.h | 4 | ||||
-rw-r--r-- | win32/win32.c | 11 |
4 files changed, 21 insertions, 16 deletions
@@ -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> @@ -119,12 +119,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. */ @@ -146,19 +146,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))) @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.5.4" -#define RUBY_RELEASE_DATE "2000-07-21" +#define RUBY_RELEASE_DATE "2000-07-24" #define RUBY_VERSION_CODE 154 -#define RUBY_RELEASE_CODE 20000721 +#define RUBY_RELEASE_CODE 20000724 diff --git a/win32/win32.c b/win32/win32.c index e7721178bd..7d589ec593 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2411,13 +2411,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) { |