[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/include il_sysio.h,1.8,1.9
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/include il_sysio.h,1.8,1.9 |
Date: |
Tue, 05 Nov 2002 22:55:09 -0500 |
Update of /cvsroot/dotgnu-pnet/pnet/include
In directory subversions:/tmp/cvs-serv7101/include
Modified Files:
il_sysio.h
Log Message:
Make the directory scanning routines more opaque and handle
platforms that don't have "d_type".
Index: il_sysio.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/include/il_sysio.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** il_sysio.h 2 Nov 2002 17:56:31 -0000 1.8
--- il_sysio.h 6 Nov 2002 03:55:06 -0000 1.9
***************
*** 24,30 ****
#include "il_system.h"
#include "il_config.h"
- #ifdef HAVE_DIRENT_H
- #include <dirent.h>
- #endif
#include <errno.h>
--- 24,27 ----
***************
*** 266,288 ****
! /* dir.c */
! #ifdef HAVE_DIRENT_H
! typedef DIR ILDir;
! #else
! /* If your system doesn't use DIRENT, notably windows, you need to typedef
! * it's equivalent here. I explicitly do NOT want to typedef a catchall
! * void*, as this breaks compile time warnings on other systems */
! #endif
!
! #ifdef HAVE_DIRENT_H
! typedef struct dirent ILDirEnt;
! #else
! /* See above note */
! #endif
ILInt32 ILDeleteDir(const char *path);
ILDir *ILOpenDir(char *path);
ILDirEnt *ILReadDir(ILDir *directory);
int ILCloseDir(ILDir *directory);
#ifdef __cplusplus
--- 263,294 ----
! /*
! * Opaque type that is used to represent an open directory and an entry.
! */
! typedef struct _tagILDir ILDir;
! typedef struct _tagILDirEnt ILDirEnt;
+ /*
+ * Values returned from "ILDirEntType".
+ */
+ #define ILFileType_Unknown 0
+ #define ILFileType_FIFO 1
+ #define ILFileType_CHR 2
+ #define ILFileType_DIR 4
+ #define ILFileType_BLK 6
+ #define ILFileType_REG 8
+ #define ILFileType_LNK 10
+ #define ILFileType_SOCK 12
+ #define ILFileType_WHT 14
+
+ /*
+ * Directory access functions.
+ */
ILInt32 ILDeleteDir(const char *path);
ILDir *ILOpenDir(char *path);
ILDirEnt *ILReadDir(ILDir *directory);
int ILCloseDir(ILDir *directory);
+ const char *ILDirEntName(ILDirEnt *entry);
+ int ILDirEntType(ILDirEnt *entry);
#ifdef __cplusplus
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/include il_sysio.h,1.8,1.9,
Rhys Weatherley <address@hidden> <=