![]() |
|||||
|
00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: unixem/glob.h 00003 * 00004 * Purpose: Declaration of the glob() API functions and types for the 00005 * Win32 platform. 00006 * 00007 * Created: 13th November 2002 00008 * Updated: 13th August 2010 00009 * 00010 * Home: http://synesis.com.au/software/ 00011 * 00012 * Copyright (c) 2002-2010, Matthew Wilson and Synesis Software 00013 * All rights reserved. 00014 * 00015 * Redistribution and use in source and binary forms, with or without 00016 * modification, are permitted provided that the following conditions are 00017 * met: 00018 * 00019 * - Redistributions of source code must retain the above copyright notice, 00020 * this list of conditions and the following disclaimer. 00021 * - Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in the 00023 * documentation and/or other materials provided with the distribution. 00024 * - Neither the name(s) of Matthew Wilson and Synesis Software nor the 00025 * names of any contributors may be used to endorse or promote products 00026 * derived from this software without specific prior written permission. 00027 * 00028 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 00029 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 00030 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00031 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 00032 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00033 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00034 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00035 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00036 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00037 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00038 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00039 * 00040 * ////////////////////////////////////////////////////////////////////// */ 00041 00042 00048 #ifndef SYNSOFT_UNIXEM_INCL_UNIXEM_H_GLOB 00049 #define SYNSOFT_UNIXEM_INCL_UNIXEM_H_GLOB 00050 00051 #ifndef UNIXEM_DOCUMENTATION_SKIP_SECTION 00052 # define SYNSOFT_UNIXEM_VER_UNIXEM_H_UNIXEM_GLOB_MAJOR 3 00053 # define SYNSOFT_UNIXEM_VER_UNIXEM_H_UNIXEM_GLOB_MINOR 0 00054 # define SYNSOFT_UNIXEM_VER_UNIXEM_H_UNIXEM_GLOB_REVISION 1 00055 # define SYNSOFT_UNIXEM_VER_UNIXEM_H_UNIXEM_GLOB_EDIT 36 00056 #endif /* !UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00057 00058 /* ///////////////////////////////////////////////////////////////////////// 00059 * Includes 00060 */ 00061 00062 #include <unixem/unixem.h> 00063 00064 /* ////////////////////////////////////////////////////////////////////// */ 00065 00076 /* ////////////////////////////////////////////////////////////////////// */ 00077 00078 #ifndef _WIN32 00079 # error This file is only currently defined for compilation on Win32 systems 00080 #endif /* _WIN32 */ 00081 00082 /* ///////////////////////////////////////////////////////////////////////// 00083 * Constants and definitions 00084 */ 00085 00086 /* Error codes */ 00087 #define UNIXEM_GLOB_NOSPACE (1) 00088 #define UNIXEM_GLOB_ABORTED (2) 00089 #define UNIXEM_GLOB_NOMATCH (3) 00090 #define UNIXEM_GLOB_NOSYS (4) 00091 #define UNIXEM_GLOB_ABEND UNIXEM_GLOB_ABORTED 00093 /* Flags */ 00094 #define UNIXEM_GLOB_ERR 0x00000001 00095 #define UNIXEM_GLOB_MARK 0x00000002 00096 #define UNIXEM_GLOB_NOSORT 0x00000004 00097 #define UNIXEM_GLOB_DOOFFS 0x00000008 00098 #define UNIXEM_GLOB_NOCHECK 0x00000010 00099 #define UNIXEM_GLOB_APPEND 0x00000020 00100 #define UNIXEM_GLOB_NOESCAPE 0x00000040 00102 #define UNIXEM_GLOB_PERIOD 0x00000080 00103 #define UNIXEM_GLOB_MAGCHAR 0x00000100 00104 /* #define UNIXEM_GLOB_ALTDIRFUNC 0x00000200 */ 00105 /* #define UNIXEM_GLOB_BRACE 0x00000400 */ 00106 #define UNIXEM_GLOB_NOMAGIC 0x00000800 00107 #define UNIXEM_GLOB_TILDE 0x00001000 00108 #define UNIXEM_GLOB_ONLYDIR 0x00002000 00109 #define UNIXEM_GLOB_TILDE_CHECK 0x00004000 00110 #define UNIXEM_GLOB_ONLYFILE 0x00008000 00111 #define UNIXEM_GLOB_NODOTSDIRS 0x00010000 00112 #define UNIXEM_GLOB_LIMIT 0x00020000 00114 /* ///////////////////////////////////////////////////////////////////////// 00115 * Typedefs 00116 */ 00117 00123 typedef struct 00124 { 00125 int gl_pathc; 00126 int gl_matchc; 00127 int gl_offs; 00128 int gl_flags; 00129 char** gl_pathv; 00130 } unixem_glob_t; 00131 00132 /* ///////////////////////////////////////////////////////////////////////// 00133 * API functions 00134 */ 00135 00136 #ifdef __cplusplus 00137 extern "C" { 00138 #endif /* __cplusplus */ 00139 00151 int unixem_glob( 00152 char const* pattern 00153 , int flags 00154 #if defined(__COMO__) 00155 , int (*errfunc)(char const*, int) 00156 #else /* ? compiler */ 00157 , const int (*errfunc)(char const*, int) 00158 #endif /* compiler */ 00159 , unixem_glob_t* pglob 00160 ); 00161 00169 void unixem_globfree(unixem_glob_t* pglob); 00170 00171 #ifdef __cplusplus 00172 } 00173 #endif /* __cplusplus */ 00174 00175 /* ////////////////////////////////////////////////////////////////////// */ 00176 00179 /* ////////////////////////////////////////////////////////////////////// */ 00180 00181 #endif /* SYNSOFT_UNIXEM_INCL_UNIXEM_H_GLOB */ 00182 00183 /* ///////////////////////////// end of file //////////////////////////// */
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2010 |