os/ossrv/genericopenlibs/cstdlib/LINCSYS/DIRENT.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description:
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
/**
sl@0
    21
 @file
sl@0
    22
 @publishedAll
sl@0
    23
 @released
sl@0
    24
*/
sl@0
    25
sl@0
    26
#ifndef _SYS_DIRENT_H_
sl@0
    27
#define _SYS_DIRENT_H_
sl@0
    28
sl@0
    29
#ifdef __cplusplus
sl@0
    30
extern "C" {
sl@0
    31
#endif
sl@0
    32
sl@0
    33
#include <sys/types.h>
sl@0
    34
sl@0
    35
typedef struct __EPOC32_DIR DIR;
sl@0
    36
typedef struct __EPOC32_WDIR WDIR;
sl@0
    37
sl@0
    38
IMPORT_C DIR *opendir (const char *);
sl@0
    39
IMPORT_C WDIR *wopendir (const wchar_t *);
sl@0
    40
IMPORT_C struct dirent *readdir (DIR *);
sl@0
    41
IMPORT_C struct wdirent *wreaddir (WDIR *);
sl@0
    42
IMPORT_C void rewinddir (DIR *);
sl@0
    43
IMPORT_C int closedir (DIR *);
sl@0
    44
IMPORT_C void wrewinddir (WDIR *);
sl@0
    45
IMPORT_C int wclosedir (WDIR *);
sl@0
    46
sl@0
    47
/** 
sl@0
    48
telldir and seekdir aren't required by POSIX 
sl@0
    49
*/
sl@0
    50
IMPORT_C off_t telldir(const DIR *);
sl@0
    51
IMPORT_C void seekdir(DIR *,off_t);
sl@0
    52
IMPORT_C off_t wtelldir(const WDIR *);
sl@0
    53
IMPORT_C void wseekdir(WDIR *,off_t);
sl@0
    54
sl@0
    55
#define __MAXNAMLEN	255
sl@0
    56
sl@0
    57
#define d_ino	d_fileno	/* compatibility */
sl@0
    58
sl@0
    59
struct dirent {
sl@0
    60
	unsigned long	d_fileno;
sl@0
    61
	unsigned short	d_namlen;
sl@0
    62
	char*		d_name;
sl@0
    63
};
sl@0
    64
sl@0
    65
struct wdirent {
sl@0
    66
	unsigned long	d_fileno;
sl@0
    67
	unsigned short	d_namlen;
sl@0
    68
	wchar_t*		d_name;
sl@0
    69
};
sl@0
    70
sl@0
    71
#include <sys/reent.h>
sl@0
    72
IMPORT_C DIR *_opendir_r (struct _reent*, const char *);
sl@0
    73
IMPORT_C WDIR *_wopendir_r (struct _reent*, const wchar_t *);
sl@0
    74
IMPORT_C struct dirent *_readdir_r(struct _reent*, DIR *);
sl@0
    75
#ifdef __cplusplus
sl@0
    76
}
sl@0
    77
#endif
sl@0
    78
#endif /* !_SYS_DIRENT_H_ */