Rev | Line | |
---|
[1] | 1 | /* |
---|
| 2 | This file is part of MutekP. |
---|
| 3 | |
---|
| 4 | MutekP is free software; you can redistribute it and/or modify it |
---|
| 5 | under the terms of the GNU General Public License as published by |
---|
| 6 | the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | (at your option) any later version. |
---|
| 8 | |
---|
| 9 | MutekP is distributed in the hope that it will be useful, but |
---|
| 10 | WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
| 12 | General Public License for more details. |
---|
| 13 | |
---|
| 14 | You should have received a copy of the GNU General Public License |
---|
| 15 | along with MutekP; if not, write to the Free Software Foundation, |
---|
| 16 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
---|
| 17 | |
---|
| 18 | UPMC / LIP6 / SOC (c) 2008 |
---|
| 19 | Copyright Ghassan Almaless <ghassan.almaless@gmail.com> |
---|
| 20 | */ |
---|
| 21 | |
---|
| 22 | #ifndef _DIRENT_H_ |
---|
| 23 | #define _DIRENT_H_ |
---|
| 24 | |
---|
| 25 | #include <limits.h> |
---|
| 26 | #include <sys/types.h> |
---|
| 27 | |
---|
| 28 | #define _DIRENT_HAVE_D_TYPE |
---|
| 29 | //#define _DIRENT_HAVE_D_SIZE |
---|
| 30 | |
---|
| 31 | #ifndef _BSD_SOURCE |
---|
| 32 | #define _BSD_SOURCE |
---|
| 33 | #endif |
---|
| 34 | |
---|
| 35 | #define DT_REG 0x000 |
---|
| 36 | #define DT_DIR 0x001 |
---|
| 37 | #define DT_FIFO 0x002 |
---|
| 38 | #define DT_CHR 0x004 |
---|
| 39 | #define DT_BLK 0x008 |
---|
| 40 | #define DT_SOCK 0x010 |
---|
| 41 | #define DT_LNK 0x020 |
---|
| 42 | #define DT_UNKNOWN 0x040 |
---|
| 43 | |
---|
| 44 | struct dirent { |
---|
| 45 | ino_t d_ino; /* inode number if any */ |
---|
| 46 | unsigned char d_type; |
---|
| 47 | char d_name[NAME_MAX]; |
---|
| 48 | }; |
---|
| 49 | |
---|
| 50 | typedef struct libc_dir_s |
---|
| 51 | { |
---|
| 52 | int fd; |
---|
| 53 | struct dirent entry; |
---|
| 54 | } DIR; |
---|
| 55 | |
---|
| 56 | DIR *opendir(const char *nom); |
---|
| 57 | struct dirent *readdir(DIR *dir); |
---|
| 58 | int closedir(DIR *dir); |
---|
| 59 | |
---|
| 60 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.