summaryrefslogtreecommitdiff
path: root/win32/include
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-10-15 04:49:09 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-10-15 04:49:09 +0000
commit95136addeff6f7c87c13a96a62f5eaafb9bafdcf (patch)
tree72519045f97e43ac9b79ed78140850bb6c82b486 /win32/include
parent54e82ce5cfd72fcdc60806373e0c4d6890b68a3c (diff)
downloadperl-95136addeff6f7c87c13a96a62f5eaafb9bafdcf.tar.gz
win32_*dir() cleanup; win32_readdir() iterates as necessary
rather than win32_opendir() reading all files up front (untested) p4raw-id: //depot/perl@4385
Diffstat (limited to 'win32/include')
-rw-r--r--win32/include/dirent.h43
1 files changed, 23 insertions, 20 deletions
diff --git a/win32/include/dirent.h b/win32/include/dirent.h
index d2ef6d54b7..d6eb7ea0d9 100644
--- a/win32/include/dirent.h
+++ b/win32/include/dirent.h
@@ -1,41 +1,44 @@
-// dirent.h
+/* dirent.h */
-// djl
-// Provide UNIX compatibility
+/* djl
+ * Provide UNIX compatibility
+ */
#ifndef _INC_DIRENT
#define _INC_DIRENT
-//
-// NT versions of readdir(), etc
-// From the MSDOS implementation
-//
+/*
+ * NT versions of readdir(), etc
+ * From the MSDOS implementation
+ */
-// Directory entry size
+/* Directory entry size */
#ifdef DIRSIZ
#undef DIRSIZ
#endif
#define DIRSIZ(rp) (sizeof(struct direct))
-// needed to compile directory stuff
+/* needed to compile directory stuff */
#define DIRENT direct
-// structure of a directory entry
+/* structure of a directory entry */
typedef struct direct
{
- long d_ino; // inode number (not used by MS-DOS)
- int d_namlen; // Name length
- char d_name[257]; // file name
+ long d_ino; /* inode number (not used by MS-DOS) */
+ long d_namlen; /* name length */
+ char *d_name; /* file name */
} _DIRECT;
-// structure for dir operations
+/* structure for dir operations */
typedef struct _dir_struc
{
- char *start; // Starting position
- char *curr; // Current position
- long size; // Size of string table
- long nfiles; // number if filenames in table
- struct direct dirstr; // Directory structure to return
+ char *start; /* starting position */
+ char *curr; /* current position */
+ long size; /* allocated size of string table */
+ long nfiles; /* number of filenames in table */
+ struct direct dirstr; /* directory structure to return */
+ void* handle; /* system handle */
+ char *end; /* position after last filename */
} DIR;
#if 0 /* these have moved to win32iop.h */
@@ -47,4 +50,4 @@ void win32_rewinddir(DIR *dirp);
int win32_closedir(DIR *dirp);
#endif
-#endif //_INC_DIRENT
+#endif /* _INC_DIRENT */