![]() |
|||||
|
00001 /* ///////////////////////////////////////////////////////////////////////// 00002 * File: 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 met: 00017 * 00018 * - Redistributions of source code must retain the above copyright notice, this 00019 * list of conditions and the following disclaimer. 00020 * - Redistributions in binary form must reproduce the above copyright notice, 00021 * this list of conditions and the following disclaimer in the documentation 00022 * and/or other materials provided with the distribution. 00023 * - Neither the names of Matthew Wilson and Synesis Software nor the names of 00024 * any contributors may be used to endorse or promote products derived from 00025 * this software without specific prior written permission. 00026 * 00027 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00028 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00029 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00030 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00031 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00032 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00033 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00034 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00035 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00036 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00037 * POSSIBILITY OF SUCH DAMAGE. 00038 * 00039 * ////////////////////////////////////////////////////////////////////// */ 00040 00041 00047 #ifndef SYNSOFT_UNIXEM_INCL_H_GLOB 00048 #define SYNSOFT_UNIXEM_INCL_H_GLOB 00049 00050 #ifndef UNIXEM_DOCUMENTATION_SKIP_SECTION 00051 # define SYNSOFT_UNIXEM_VER_H_GLOB_MAJOR 3 00052 # define SYNSOFT_UNIXEM_VER_H_GLOB_MINOR 0 00053 # define SYNSOFT_UNIXEM_VER_H_GLOB_REVISION 1 00054 # define SYNSOFT_UNIXEM_VER_H_GLOB_EDIT 36 00055 #endif /* !UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00056 00057 /* ////////////////////////////////////////////////////////////////////// */ 00058 00069 /* ////////////////////////////////////////////////////////////////////// */ 00070 00071 #ifndef _WIN32 00072 # error This file is only currently defined for compilation on Win32 systems 00073 #endif /* _WIN32 */ 00074 00075 /* ///////////////////////////////////////////////////////////////////////// 00076 * Constants and definitions 00077 */ 00078 00079 /* Error codes */ 00080 #define GLOB_NOSPACE (UNIXEM_GLOB_NOSPACE) 00081 #define GLOB_ABORTED (UNIXEM_GLOB_ABORTED) 00082 #define GLOB_NOMATCH (UNIXEM_GLOB_NOMATCH) 00083 #define GLOB_NOSYS (UNIXEM_GLOB_NOSYS) 00084 #define GLOB_ABEND (UNIXEM_GLOB_ABEND) 00086 /* Flags */ */ 00087 #define GLOB_ERR (UNIXEM_GLOB_ERR) 00088 #define GLOB_MARK (UNIXEM_GLOB_MARK) 00089 #define GLOB_NOSORT (UNIXEM_GLOB_NOSORT) 00090 #define GLOB_DOOFFS (UNIXEM_GLOB_DOOFFS) 00091 #define GLOB_NOCHECK (UNIXEM_GLOB_NOCHECK) 00092 #define GLOB_APPEND (UNIXEM_GLOB_APPEND) 00093 #define GLOB_NOESCAPE (UNIXEM_GLOB_NOESCAPE) 00094 ( 00095 #define GLOB_PERIOD (UNIXEM_GLOB_PERIOD) 00096 #define GLOB_MAGCHAR (UNIXEM_GLOB_MAGCHAR) 00097 /* #define GLOB_ALTDIRFUNC (UNIXEM_GLOB_ALTDIRFUNC) */ 00098 /* #define GLOB_BRACE (UNIXEM_GLOB_BRACE) */ 00099 #define GLOB_NOMAGIC (UNIXEM_GLOB_NOMAGIC) 00100 #define GLOB_TILDE (UNIXEM_GLOB_TILDE) 00101 #define GLOB_ONLYDIR (UNIXEM_GLOB_ONLYDIR) 00102 #define GLOB_TILDE_CHECK (UNIXEM_GLOB_TILDE_CHECK) 00103 #define GLOB_ONLYFILE (UNIXEM_GLOB_ONLYFILE) 00104 #define GLOB_NODOTSDIRS (UNIXEM_GLOB_NODOTSDIRS) 00105 #define GLOB_LIMIT (UNIXEM_GLOB_LIMIT) 00107 /* ///////////////////////////////////////////////////////////////////////// 00108 * Typedefs 00109 */ 00110 00115 typedef unixem_glob_t glob_t; 00116 00117 /* ///////////////////////////////////////////////////////////////////////// 00118 * API functions 00119 */ 00120 00121 #ifdef __cplusplus 00122 extern "C" { 00123 #endif /* __cplusplus */ 00124 00138 #ifdef UNIXEM_DOCUMENTATION_SKIP_SECTION 00139 int glob( 00140 char const* pattern 00141 , int flags 00142 #if defined(__COMO__) 00143 , int (*errfunc)(char const*, int) 00144 #else /* ? compiler */ 00145 , const int (*errfunc)(char const*, int) 00146 #endif /* compiler */ 00147 , glob_t* pglob 00148 ); 00149 #else /* ? UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00150 # define glob unixem_glob 00151 #endif /* UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00152 00162 #ifdef UNIXEM_DOCUMENTATION_SKIP_SECTION 00163 void globfree(glob_t* pglob); 00164 #else /* ? UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00165 # define globfree unixem_globfree 00166 #endif /* UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00167 00168 #ifndef UNIXEM_DOCUMENTATION_SKIP_SECTION 00169 00170 #endif /* !UNIXEM_DOCUMENTATION_SKIP_SECTION */ 00171 00172 #ifdef __cplusplus 00173 } 00174 #endif /* __cplusplus */ 00175 00176 /* ////////////////////////////////////////////////////////////////////// */ 00177 00180 /* ////////////////////////////////////////////////////////////////////// */ 00181 00182 #endif /* SYNSOFT_UNIXEM_INCL_H_GLOB */ 00183 00184 /* ///////////////////////////// end of file //////////////////////////// */
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2010 |