* file.c (file_load_ok): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
03d1c9cd82
commit
affcf615dc
@ -1,3 +1,7 @@
|
|||||||
|
Man Jul 16 13:21:30 2001 Usaku Nakamura <usa@osb.att.ne.jp>
|
||||||
|
|
||||||
|
* file.c (file_load_ok): fix typo.
|
||||||
|
|
||||||
Sat Jul 14 12:26:30 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
Sat Jul 14 12:26:30 2001 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
|
||||||
|
|
||||||
* ext/digest/*/extconf.rb: fix so that they build from any
|
* ext/digest/*/extconf.rb: fix so that they build from any
|
||||||
|
18
file.c
18
file.c
@ -69,7 +69,7 @@ char *strrchr _((const char*,const char));
|
|||||||
#ifndef HAVE_LSTAT
|
#ifndef HAVE_LSTAT
|
||||||
#define lstat(path,st) stat(path,st)
|
#define lstat(path,st) stat(path,st)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VALUE rb_cFile;
|
VALUE rb_cFile;
|
||||||
VALUE rb_mFileTest;
|
VALUE rb_mFileTest;
|
||||||
static VALUE rb_cStat;
|
static VALUE rb_cStat;
|
||||||
@ -1384,7 +1384,7 @@ rb_file_s_expand_path(argc, argv)
|
|||||||
if (*(s+1)) {
|
if (*(s+1)) {
|
||||||
switch (*++s) {
|
switch (*++s) {
|
||||||
case '.':
|
case '.':
|
||||||
if (*(s+1) == '\0' || isdirsep(*(s+1))) {
|
if (*(s+1) == '\0' || isdirsep(*(s+1))) {
|
||||||
/* We must go back to the parent */
|
/* We must go back to the parent */
|
||||||
if (isdirsep(*p) && p > buf) p--;
|
if (isdirsep(*p) && p > buf) p--;
|
||||||
while (p > buf && !isdirsep(*p)) p--;
|
while (p > buf && !isdirsep(*p)) p--;
|
||||||
@ -1399,7 +1399,7 @@ rb_file_s_expand_path(argc, argv)
|
|||||||
#if defined DOSISH
|
#if defined DOSISH
|
||||||
case '\\':
|
case '\\':
|
||||||
#endif
|
#endif
|
||||||
if (!isdirsep(*p)) *++p = '/';
|
if (!isdirsep(*p)) *++p = '/';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*++p = '.'; *++p = *s; break;
|
*++p = '.'; *++p = *s; break;
|
||||||
@ -1415,7 +1415,7 @@ rb_file_s_expand_path(argc, argv)
|
|||||||
*++p = *s;
|
*++p = *s;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Place a \0 at end. If path ends with a "/", delete it */
|
/* Place a \0 at end. If path ends with a "/", delete it */
|
||||||
if (p == buf || !isdirsep(*p)) p++;
|
if (p == buf || !isdirsep(*p)) p++;
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
@ -1795,15 +1795,15 @@ rb_f_test(argc, argv)
|
|||||||
if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino)
|
if (st1.st_dev == st2.st_dev && st1.st_ino == st2.st_ino)
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
|
|
||||||
case '=':
|
case '=':
|
||||||
if (st1.st_mtime == st2.st_mtime) return Qtrue;
|
if (st1.st_mtime == st2.st_mtime) return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
|
|
||||||
case '>':
|
case '>':
|
||||||
if (st1.st_mtime > st2.st_mtime) return Qtrue;
|
if (st1.st_mtime > st2.st_mtime) return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
|
|
||||||
case '<':
|
case '<':
|
||||||
if (st1.st_mtime < st2.st_mtime) return Qtrue;
|
if (st1.st_mtime < st2.st_mtime) return Qtrue;
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
@ -2174,7 +2174,7 @@ rb_path_check(path)
|
|||||||
|
|
||||||
p = path;
|
p = path;
|
||||||
pend = strchr(path, sep);
|
pend = strchr(path, sep);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
int safe;
|
int safe;
|
||||||
|
|
||||||
@ -2208,7 +2208,7 @@ file_load_ok(file)
|
|||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
if (!f) return 0;
|
if (!file) return 0;
|
||||||
f = fopen(file, "r");
|
f = fopen(file, "r");
|
||||||
if (f == NULL) return 0;
|
if (f == NULL) return 0;
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user