os/ossrv/genericopenlibs/openenvcore/include/glob.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/ossrv/genericopenlibs/openenvcore/include/glob.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,114 @@
     1.4 +// glob.h
     1.5 +
     1.6 +
     1.7 +/*
     1.8 + * Copyright (c) 1989, 1993
     1.9 + *	The Regents of the University of California.  All rights reserved.
    1.10 + *
    1.11 + * This code is derived from software contributed to Berkeley by
    1.12 + * Guido van Rossum.
    1.13 + *
    1.14 + * Redistribution and use in source and binary forms, with or without
    1.15 + * modification, are permitted provided that the following conditions
    1.16 + * are met:
    1.17 + * 1. Redistributions of source code must retain the above copyright
    1.18 + *    notice, this list of conditions and the following disclaimer.
    1.19 + * 2. Redistributions in binary form must reproduce the above copyright
    1.20 + *    notice, this list of conditions and the following disclaimer in the
    1.21 + *    documentation and/or other materials provided with the distribution.
    1.22 + * 4. Neither the name of the University nor the names of its contributors
    1.23 + *    may be used to endorse or promote products derived from this software
    1.24 + *    without specific prior written permission.
    1.25 + *
    1.26 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
    1.27 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1.28 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    1.29 + * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
    1.30 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    1.31 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
    1.32 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    1.33 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    1.34 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
    1.35 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    1.36 + * SUCH DAMAGE.
    1.37 + *
    1.38 + *	@(#)glob.h	8.1 (Berkeley) 6/2/93
    1.39 + * $FreeBSD: src/include/glob.h,v 1.7 2002/07/17 04:58:09 mikeh Exp $
    1.40 + */
    1.41 +/* Portions Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. */
    1.42 +
    1.43 +#ifndef _GLOB_H_
    1.44 +#define	_GLOB_H_
    1.45 +
    1.46 +#include <sys/cdefs.h>
    1.47 +
    1.48 +struct stat;
    1.49 +typedef struct {
    1.50 +	int gl_pathc;		/* Count of total paths so far. */
    1.51 +	int gl_matchc;		/* Count of paths matching pattern. */
    1.52 +	int gl_offs;		/* Reserved at beginning of gl_pathv. */
    1.53 +	int gl_flags;		/* Copy of flags parameter to glob. */
    1.54 +	char **gl_pathv;	/* List of paths matching pattern. */
    1.55 +				/* Copy of errfunc parameter to glob. */
    1.56 +	int (*gl_errfunc)(const char *, int);
    1.57 +
    1.58 +	/*
    1.59 +	 * Alternate filesystem access methods for glob; replacement
    1.60 +	 * versions of closedir(3), readdir(3), opendir(3), stat(2)
    1.61 +	 * and lstat(2).
    1.62 +	 */
    1.63 +	void (*gl_closedir)(void *);
    1.64 +	struct dirent *(*gl_readdir)(void *);
    1.65 +	void *(*gl_opendir)(const char *);
    1.66 +	int (*gl_lstat)(const char *, struct stat *);
    1.67 +	int (*gl_stat)(const char *, struct stat *);
    1.68 +} glob_t;
    1.69 +
    1.70 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
    1.71 +#define glob64_t	glob_t
    1.72 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
    1.73 +
    1.74 +#if __POSIX_VISIBLE >= 199209
    1.75 +/* Believed to have been introduced in 1003.2-1992 */
    1.76 +#define	GLOB_APPEND	0x0001	/* Append to output from previous call. */
    1.77 +#define	GLOB_DOOFFS	0x0002	/* Use gl_offs. */
    1.78 +#define	GLOB_ERR	0x0004	/* Return on error. */
    1.79 +#define	GLOB_MARK	0x0008	/* Append / to matching directories. */
    1.80 +#define	GLOB_NOCHECK	0x0010	/* Return pattern itself if nothing matches. */
    1.81 +#define	GLOB_NOSORT	0x0020	/* Don't sort. */
    1.82 +#define	GLOB_NOESCAPE	0x2000	/* Disable backslash escaping. */
    1.83 +
    1.84 +/* Error values returned by glob(3) */
    1.85 +#define	GLOB_NOSPACE	(-1)	/* Malloc call failed. */
    1.86 +#define	GLOB_ABORTED	(-2)	/* Unignored error. */
    1.87 +#define	GLOB_NOMATCH	(-3)	/* No match and GLOB_NOCHECK was not set. */
    1.88 +#define	GLOB_NOSYS	(-4)	/* Obsolete: source comptability only. */
    1.89 +#endif /* __POSIX_VISIBLE >= 199209 */
    1.90 +
    1.91 +#if __BSD_VISIBLE
    1.92 +#define	GLOB_ALTDIRFUNC	0x0040	/* Use alternately specified directory funcs. */
    1.93 +#define	GLOB_BRACE	0x0080	/* Expand braces ala csh. */
    1.94 +#define	GLOB_MAGCHAR	0x0100	/* Pattern had globbing characters. */
    1.95 +#define	GLOB_NOMAGIC	0x0200	/* GLOB_NOCHECK without magic chars (csh). */
    1.96 +#define	GLOB_QUOTE	0x0400	/* Quote special chars with \. */
    1.97 +#define	GLOB_TILDE	0x0800	/* Expand tilde names from the passwd file. */
    1.98 +#define	GLOB_LIMIT	0x1000	/* limit number of returned paths */
    1.99 +
   1.100 +/* source compatibility, these are the old names */
   1.101 +#define GLOB_MAXPATH	GLOB_LIMIT
   1.102 +#define	GLOB_ABEND	GLOB_ABORTED
   1.103 +#endif /* __BSD_VISIBLE */
   1.104 +
   1.105 +__BEGIN_DECLS
   1.106 +
   1.107 +IMPORT_C int	glob(const char *, int, int (*)(const char *, int), glob_t *);
   1.108 +IMPORT_C void	globfree(glob_t *);
   1.109 +
   1.110 +#if defined(SYMBIAN_OE_LARGE_FILE_SUPPORT) && !defined(SYMBIAN_OE_NO_LFS)
   1.111 +#define glob64	glob
   1.112 +#define globfree64	globfree
   1.113 +#endif /* SYMBIAN_OE_LARGE_FILE_SUPPORT && !SYMBIAN_OE_NO_LFS */
   1.114 +
   1.115 +__END_DECLS
   1.116 +
   1.117 +#endif /* !_GLOB_H_ */