зеркало из https://github.com/github/ruby.git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a4fe713cb1
Коммит
b9373b7aea
|
@ -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>
|
||||
|
||||
|
|
14
ruby.c
14
ruby.c
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче