зеркало из https://github.com/github/ruby.git
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
77e876615d
Коммит
7d87fac63a
|
@ -1,3 +1,7 @@
|
||||||
|
Sat Jul 29 21:57:30 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||||
|
|
||||||
|
* ruby.c (rubylib_mangle): provide another buffer for the result.
|
||||||
|
|
||||||
Wed Jul 26 10:09:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
Wed Jul 26 10:09:01 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
||||||
|
|
||||||
* configure.in: set SOLIBS to LIBS on Cygwin.
|
* configure.in: set SOLIBS to LIBS on Cygwin.
|
||||||
|
|
13
ruby.c
13
ruby.c
|
@ -115,7 +115,7 @@ rubylib_mangle(s, l)
|
||||||
{
|
{
|
||||||
static char *newp, *oldp;
|
static char *newp, *oldp;
|
||||||
static int newl, oldl, notfound;
|
static int newl, oldl, notfound;
|
||||||
static char ret[STATIC_FILE_LENGTH+1];
|
static char newsub[STATIC_FILE_LENGTH+1];
|
||||||
|
|
||||||
if (!newp && !notfound) {
|
if (!newp && !notfound) {
|
||||||
newp = getenv("RUBYLIB_PREFIX");
|
newp = getenv("RUBYLIB_PREFIX");
|
||||||
|
@ -133,8 +133,8 @@ rubylib_mangle(s, l)
|
||||||
if (newl == 0 || oldl == 0 || newl > STATIC_FILE_LENGTH) {
|
if (newl == 0 || oldl == 0 || newl > STATIC_FILE_LENGTH) {
|
||||||
rb_fatal("malformed RUBYLIB_PREFIX");
|
rb_fatal("malformed RUBYLIB_PREFIX");
|
||||||
}
|
}
|
||||||
strcpy(ret, newp);
|
strcpy(newsub, newp);
|
||||||
s = ret;
|
s = newsub;
|
||||||
while (*s) {
|
while (*s) {
|
||||||
if (*s == '\\') *s = '/';
|
if (*s == '\\') *s = '/';
|
||||||
s++;
|
s++;
|
||||||
|
@ -147,6 +147,7 @@ rubylib_mangle(s, l)
|
||||||
l = strlen(s);
|
l = strlen(s);
|
||||||
}
|
}
|
||||||
if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) {
|
if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) {
|
||||||
|
static char ret[STATIC_FILE_LENGTH+1];
|
||||||
strncpy(ret, s, l);
|
strncpy(ret, s, l);
|
||||||
ret[l] = 0;
|
ret[l] = 0;
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -154,9 +155,9 @@ rubylib_mangle(s, l)
|
||||||
if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {
|
if (l + newl - oldl > STATIC_FILE_LENGTH || newl > STATIC_FILE_LENGTH) {
|
||||||
rb_fatal("malformed RUBYLIB_PREFIX");
|
rb_fatal("malformed RUBYLIB_PREFIX");
|
||||||
}
|
}
|
||||||
strcpy(ret + newl, s + oldl);
|
strcpy(newsub + newl, s + oldl);
|
||||||
ret[l + newl - oldl] = 0;
|
newsub[l + newl - oldl] = 0;
|
||||||
return ret;
|
return newsub;
|
||||||
}
|
}
|
||||||
#define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
|
#define rubylib_mangled_path(s, l) rb_str_new2(rubylib_mangle((s), (l)))
|
||||||
#define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))
|
#define rubylib_mangled_path2(s) rb_str_new2(rubylib_mangle((s), 0))
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define RUBY_VERSION "1.5.5"
|
#define RUBY_VERSION "1.5.5"
|
||||||
#define RUBY_RELEASE_DATE "2000-07-27"
|
#define RUBY_RELEASE_DATE "2000-07-29"
|
||||||
#define RUBY_VERSION_CODE 155
|
#define RUBY_VERSION_CODE 155
|
||||||
#define RUBY_RELEASE_CODE 20000727
|
#define RUBY_RELEASE_CODE 20000729
|
||||||
|
|
Загрузка…
Ссылка в новой задаче