diff -r 000000000000 -r e4d67989cc36 genericopenlibs/cstdlib/LINCSYS/DIRENT.H --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/genericopenlibs/cstdlib/LINCSYS/DIRENT.H Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,78 @@ +/* +* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef _SYS_DIRENT_H_ +#define _SYS_DIRENT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef struct __EPOC32_DIR DIR; +typedef struct __EPOC32_WDIR WDIR; + +IMPORT_C DIR *opendir (const char *); +IMPORT_C WDIR *wopendir (const wchar_t *); +IMPORT_C struct dirent *readdir (DIR *); +IMPORT_C struct wdirent *wreaddir (WDIR *); +IMPORT_C void rewinddir (DIR *); +IMPORT_C int closedir (DIR *); +IMPORT_C void wrewinddir (WDIR *); +IMPORT_C int wclosedir (WDIR *); + +/** +telldir and seekdir aren't required by POSIX +*/ +IMPORT_C off_t telldir(const DIR *); +IMPORT_C void seekdir(DIR *,off_t); +IMPORT_C off_t wtelldir(const WDIR *); +IMPORT_C void wseekdir(WDIR *,off_t); + +#define __MAXNAMLEN 255 + +#define d_ino d_fileno /* compatibility */ + +struct dirent { + unsigned long d_fileno; + unsigned short d_namlen; + char* d_name; +}; + +struct wdirent { + unsigned long d_fileno; + unsigned short d_namlen; + wchar_t* d_name; +}; + +#include +IMPORT_C DIR *_opendir_r (struct _reent*, const char *); +IMPORT_C WDIR *_wopendir_r (struct _reent*, const wchar_t *); +IMPORT_C struct dirent *_readdir_r(struct _reent*, DIR *); +#ifdef __cplusplus +} +#endif +#endif /* !_SYS_DIRENT_H_ */