flx_glob.hpp

00001 #line 635 "./lpsrc/flx_glob.pak"
00002 #ifndef __FLX_GLOB_H__
00003 #define __FLX_GLOB_H__
00004 #include <flx_glob_config.hpp>
00005 
00006 #if !FLX_WIN32
00007 #include <glob.h>
00008 #else
00009 
00010 /* Error codes */
00011 #define GLOB_NOSPACE    (1)             /*!< \brief (Error result code:) An attempt to allocate memory failed, or if errno was 0 GLOB_LIMIT was specified in the flags and ARG_MAX patterns were matched. */
00012 #define GLOB_ABORTED    (2)             /*!< \brief (Error result code:) The scan was stopped because an error was encountered and either GLOB_ERR was set or (*errfunc)() returned non-zero. */
00013 #define GLOB_NOMATCH    (3)             /*!< \brief (Error result code:) The pattern does not match any existing pathname, and GLOB_NOCHECK was not set int flags. */
00014 #define GLOB_NOSYS      (4)             /*!< \brief (Error result code:) . */
00015 #define GLOB_ABEND      GLOB_ABORTED    /*!< \brief (Error result code:) . */
00016 
00017 /* Flags */
00018 #define GLOB_ERR            0x00000001  /*!< \brief Return on read errors. */
00019 #define GLOB_MARK           0x00000002  /*!< \brief Append a slash to each name. */
00020 #define GLOB_NOSORT         0x00000004  /*!< \brief Don't sort the names. */
00021 #define GLOB_DOOFFS         0x00000008  /*!< \brief Insert PGLOB->gl_offs NULLs. Supported from version 1.6 of UNIXEm. */
00022 #define GLOB_NOCHECK        0x00000010  /*!< \brief If nothing matches, return the pattern. Supported from version 1.6 of UNIXEm. */
00023 #define GLOB_APPEND         0x00000020  /*!< \brief Append to results of a previous call. Not currently supported in this implementation. */
00024 #define GLOB_NOESCAPE       0x00000040  /*!< \brief Backslashes don't quote metacharacters. Has no effect in this implementation, since escaping is not supported. */
00025 
00026 #define GLOB_PERIOD         0x00000080  /*!< \brief Leading `.' can be matched by metachars. Supported from version 1.6 of UNIXEm. */
00027 #define GLOB_MAGCHAR        0x00000100  /*!< \brief Set in gl_flags if any metachars seen. Supported from version 1.6 of UNIXEm. */
00028 /* #define GLOB_ALTDIRFUNC     0x00000200 */  /*!< \brief Use gl_opendir et al functions. Not currently supported in this implementation. */
00029 /* #define GLOB_BRACE          0x00000400 */  /*!< \brief Expand "{a,b}" to "a" "b". Not currently supported in this implementation. */
00030 #define GLOB_NOMAGIC        0x00000800  /*!< \brief If no magic chars, return the pattern. Supported from version 1.6 of UNIXEm. */
00031 #define GLOB_TILDE          0x00001000  /*!< \brief Expand ~user and ~ to home directories. Partially supported from version 1.6 of UNIXEm: leading ~ is expanded to %HOMEDRIVE%%HOMEPATH%. */
00032 #define GLOB_ONLYDIR        0x00002000  /*!< \brief Match only directories. This implementation guarantees to only return directories when this flag is specified. */
00033 #define GLOB_TILDE_CHECK    0x00004000  /*!< \brief Like GLOB_TILDE but return an GLOB_NOMATCH even if GLOB_NOCHECK specified. Supported from version 1.6 of UNIXEm. */
00034 #define GLOB_ONLYFILE       0x00008000  /*!< \brief Match only files. Supported from version 1.6 of UNIXEm. */
00035 #define GLOB_NODOTSDIRS     0x00010000  /*!< \brief Elide "." and ".." directories from wildcard searches. Supported from version 1.6 of UNIXEm. */
00036 #define GLOB_LIMIT          0x00020000  /*!< \brief Limits the search to the number specified by the caller in gl_matchc. Supported from version 1.6 of UNIXEm. */
00037 
00038 typedef struct
00039 {
00040   int   gl_pathc;   /*!< count of total paths so far */
00041   int   gl_matchc;  /*!< count of paths matching pattern */
00042   int   gl_offs;    /*!< reserved at beginning of gl_pathv */
00043   int   gl_flags;   /*!< returned flags */
00044   char  **gl_pathv; /*!< list of paths matching pattern */
00045 } glob_t;
00046 
00047 int GLOB_EXTERN glob( char const  *pattern
00048         , int         flags
00049         , int       (*errfunc)(char const *, int)
00050         , glob_t      *pglob);
00051 
00052 void GLOB_EXTERN globfree(glob_t *pglob);
00053 
00054 #endif
00055 #endif
00056 

Generated on Thu May 29 14:05:03 2008 for Felix by  doxygen 1.5.5