os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/compat/dirent2.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/compat/dirent2.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,59 @@
1.4 +/*
1.5 + * dirent.h --
1.6 + *
1.7 + * Declarations of a library of directory-reading procedures
1.8 + * in the POSIX style ("struct dirent").
1.9 + *
1.10 + * Copyright (c) 1991 The Regents of the University of California.
1.11 + * Copyright (c) 1994 Sun Microsystems, Inc.
1.12 + *
1.13 + * See the file "license.terms" for information on usage and redistribution
1.14 + * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1.15 + *
1.16 + * RCS: @(#) $Id: dirent2.h,v 1.2 1998/09/14 18:39:44 stanton Exp $
1.17 + */
1.18 +
1.19 +#ifndef _DIRENT
1.20 +#define _DIRENT
1.21 +
1.22 +#ifndef _TCL
1.23 +#include "tcl.h"
1.24 +#endif
1.25 +
1.26 +/*
1.27 + * Dirent structure, which holds information about a single
1.28 + * directory entry.
1.29 + */
1.30 +
1.31 +#define MAXNAMLEN 255
1.32 +#define DIRBLKSIZ 512
1.33 +
1.34 +struct dirent {
1.35 + long d_ino; /* Inode number of entry */
1.36 + short d_reclen; /* Length of this record */
1.37 + short d_namlen; /* Length of string in d_name */
1.38 + char d_name[MAXNAMLEN + 1]; /* Name must be no longer than this */
1.39 +};
1.40 +
1.41 +/*
1.42 + * State that keeps track of the reading of a directory (clients
1.43 + * should never look inside this structure; the fields should
1.44 + * only be accessed by the library procedures).
1.45 + */
1.46 +
1.47 +typedef struct _dirdesc {
1.48 + int dd_fd;
1.49 + long dd_loc;
1.50 + long dd_size;
1.51 + char dd_buf[DIRBLKSIZ];
1.52 +} DIR;
1.53 +
1.54 +/*
1.55 + * Procedures defined for reading directories:
1.56 + */
1.57 +
1.58 +extern void closedir _ANSI_ARGS_((DIR *dirp));
1.59 +extern DIR * opendir _ANSI_ARGS_((char *name));
1.60 +extern struct dirent * readdir _ANSI_ARGS_((DIR *dirp));
1.61 +
1.62 +#endif /* _DIRENT */