1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32/dir.h, win32/win32.c: fix patch miss.

* win32/Makefile.sub: fix file dependency.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2004-01-05 16:01:54 +00:00
parent 51826a7b81
commit 573b35d45e
4 changed files with 8 additions and 27 deletions

View file

@ -1,3 +1,9 @@
Tue Jan 6 01:01:04 2004 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/dir.h, win32/win32.c: fix patch miss.
* win32/Makefile.sub: fix file dependency.
Mon Jan 5 20:32:00 2004 Gavin Sinclair <gsinclair@soyabean.com.au>
* lib/logger.rb: enhanced documentation.

View file

@ -572,7 +572,7 @@ compar.obj: {$(srcdir)}compar.c {$(srcdir)}ruby.h config.h \
{$(srcdir)}/win32/win32.h
dir.obj: {$(srcdir)}dir.c {$(srcdir)}ruby.h config.h \
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h
{$(srcdir)}util.h {$(srcdir)}/win32/win32.h {$(srcdir)}/win32/dir.h
dln.obj: {$(srcdir)}dln.c {$(srcdir)}ruby.h config.h \
{$(srcdir)}defines.h {$(srcdir)}intern.h {$(srcdir)}missing.h \
{$(srcdir)}dln.h {$(srcdir)}/win32/win32.h

View file

@ -12,18 +12,15 @@ struct direct
char d_name[256];
char d_isdir; /* directory */
char d_isrep; /* reparse point */
char d_isdir;
};
typedef struct {
char *start;
char *curr;
long size;
long nfiles;
struct direct dirstr;
char *bits; /* used for d_isdir and d_isrep */
long bitpos; /* used for d_isdir and d_isrep */
struct direct dirstr;
char *bits;
long bitpos;
} DIR;

View file

@ -1393,8 +1393,6 @@ rb_w32_opendir(const char *filename)
SetBit(p->bits, 0);
if (fd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
SetBit(p->bits, 1);
p->bits = ALLOC_N(char, 1);
p->bits[0] = fd.attrib & _A_SUBDIR ? 1 : 0;
p->nfiles++;
//
@ -1431,18 +1429,6 @@ rb_w32_opendir(const char *filename)
if (fd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
SetBit(p->bits, p->nfiles * 2 + 1);
if (p->nfiles % 8 == 0) {
Renew (p->bits, p->nfiles / 8 + 1, char);
if (p->bits == NULL) {
rb_fatal ("opendir: malloc failed!\n");
}
p->bits[p->nfiles / 8] = 0;
}
if (fd.attrib & _A_SUBDIR) {
p->bits[p->nfiles / 8] |= (1 << p->nfiles % 8);
}
p->nfiles++;
idx += len+1;
}
@ -1479,12 +1465,6 @@ rb_w32_readdir(DIR *dirp)
//
dirp->dirstr.d_ino = dummy++;
//
// Directory flag
//
dirp->dirstr.d_isdir = dirp->bits[dirp->bitpos / 8] & (1 << dirp->bitpos % 8);
dirp->bitpos++;
//
// Attributes
//
@ -1537,7 +1517,6 @@ rb_w32_rewinddir(DIR *dirp)
{
dirp->curr = dirp->start;
dirp->bitpos = 0;
dirp->bitpos = 0;
}
//
@ -1547,7 +1526,6 @@ rb_w32_rewinddir(DIR *dirp)
void
rb_w32_closedir(DIR *dirp)
{
free(dirp->bits);
free(dirp->start);
free(dirp->bits);
free(dirp);