![]() |
|||||
|
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: 12th September 2006 00009 * 00010 * Home: http://synesis.com.au/software/ 00011 * 00012 * Copyright (c) 2002-2006, 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 2 00052 # define SYNSOFT_UNIXEM_VER_H_GLOB_MINOR 2 00053 # define SYNSOFT_UNIXEM_VER_H_GLOB_REVISION 1 00054 # define SYNSOFT_UNIXEM_VER_H_GLOB_EDIT 31 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 (1) 00081 #define GLOB_ABORTED (2) 00082 #define GLOB_NOMATCH (3) 00083 #define GLOB_NOSYS (4) 00084 #define GLOB_ABEND GLOB_ABORTED 00086 /* Flags */ 00087 #define GLOB_ERR 0x00000001 00088 #define GLOB_MARK 0x00000002 00089 #define GLOB_NOSORT 0x00000004 00090 #define GLOB_DOOFFS 0x00000008 00091 #define GLOB_NOCHECK 0x00000010 00092 #define GLOB_APPEND 0x00000020 00093 #define GLOB_NOESCAPE 0x00000040 00095 #define GLOB_PERIOD 0x00000080 00096 #define GLOB_MAGCHAR 0x00000100 00097 /* #define GLOB_ALTDIRFUNC 0x00000200 */ 00098 /* #define GLOB_BRACE 0x00000400 */ 00099 #define GLOB_NOMAGIC 0x00000800 00100 #define GLOB_TILDE 0x00001000 00101 #define GLOB_ONLYDIR 0x00002000 00102 #define GLOB_TILDE_CHECK 0x00004000 00103 #define GLOB_ONLYFILE 0x00008000 00104 #define GLOB_NODOTSDIRS 0x00010000 00105 #define GLOB_LIMIT 0x00020000 00107 /* ///////////////////////////////////////////////////////////////////////////// 00108 * Typedefs 00109 */ 00110 00115 typedef struct 00116 { 00117 int gl_pathc; 00118 int gl_matchc; 00119 int gl_offs; 00120 int gl_flags; 00121 char **gl_pathv; 00122 } glob_t; 00123 00124 /* ///////////////////////////////////////////////////////////////////////////// 00125 * API functions 00126 */ 00127 00128 #ifdef __cplusplus 00129 extern "C" { 00130 #endif /* __cplusplus */ 00131 00143 int glob( char const *pattern 00144 , int flags 00145 #if defined(__COMO__) 00146 , int (*errfunc)(char const *, int) 00147 #else /* ? compiler */ 00148 , const int (*errfunc)(char const *, int) 00149 #endif /* compiler */ 00150 , glob_t *pglob); 00151 00159 void globfree(glob_t *pglob); 00160 00161 #ifdef __cplusplus 00162 } 00163 #endif /* __cplusplus */ 00164 00165 /* ////////////////////////////////////////////////////////////////////////// */ 00166 00169 /* ////////////////////////////////////////////////////////////////////////// */ 00170 00171 #endif /* SYNSOFT_UNIXEM_INCL_H_GLOB */ 00172 00173 /* ////////////////////////////////////////////////////////////////////////// */
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2002-2005 |