OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc2/] [newlib/] [libc/] [sys/] [rtems/] [sys/] [dirent.h] - Diff between revs 207 and 520

Only display areas with differences | Details | Blame | View Log

Rev 207 Rev 520
#ifndef _SYS_DIRENT_H
#ifndef _SYS_DIRENT_H
# define _SYS_DIRENT_H
# define _SYS_DIRENT_H
 
 
#ifdef __cplusplus
#ifdef __cplusplus
extern "C" {
extern "C" {
#endif
#endif
 
 
/*
/*
 * This file was written to be compatible with the BSD directory
 * This file was written to be compatible with the BSD directory
 * routines, so it looks like it.  But it was written from scratch.
 * routines, so it looks like it.  But it was written from scratch.
 * Sean Eric Fagan, sef@Kithrup.COM
 * Sean Eric Fagan, sef@Kithrup.COM
 *
 *
 *  Copied to RTEMS configuration without modification.
 *  Copied to RTEMS configuration without modification.
 */
 */
 
 
typedef struct _dirdesc {
typedef struct _dirdesc {
        int     dd_fd;
        int     dd_fd;
        long    dd_loc;
        long    dd_loc;
        long    dd_size;
        long    dd_size;
        char    *dd_buf;
        char    *dd_buf;
        int     dd_len;
        int     dd_len;
        long    dd_seek;
        long    dd_seek;
} DIR;
} DIR;
 
 
# define __dirfd(dp)    ((dp)->dd_fd)
# define __dirfd(dp)    ((dp)->dd_fd)
 
 
DIR *opendir(const char *);
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
struct dirent *readdir(DIR *);
void rewinddir(DIR *);
void rewinddir(DIR *);
int closedir(DIR *);
int closedir(DIR *);
void seekdir(DIR *dir, long loc);
void seekdir(DIR *dir, long loc);
long telldir(DIR *dir);
long telldir(DIR *dir);
 
 
#include <sys/types.h>
#include <sys/types.h>
 
 
#include <limits.h>
#include <limits.h>
 
 
struct dirent {
struct dirent {
        long    d_ino;
        long    d_ino;
        off_t   d_off;
        off_t   d_off;
        unsigned short  d_reclen;
        unsigned short  d_reclen;
        /* we need better syntax for variable-sized arrays */
        /* we need better syntax for variable-sized arrays */
        unsigned short  d_namlen;
        unsigned short  d_namlen;
        char            d_name[NAME_MAX + 1];
        char            d_name[NAME_MAX + 1];
};
};
 
 
int scandir ( const char *dirname,
int scandir ( const char *dirname,
   struct dirent *** namelist,
   struct dirent *** namelist,
   int (*select)(struct dirent *),
   int (*select)(struct dirent *),
   int (*dcomp)(const struct dirent **, const struct dirent **)
   int (*dcomp)(const struct dirent **, const struct dirent **)
);
);
 
 
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif 
#endif 
 
 
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.