![]() |
|||||
|
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: 28th June 2004 00009 * 00010 * Home: http://synesis.com.au/software/ 00011 * 00012 * Copyright (c) 2002-2004, 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_INCL_H_GLOB 00048 #define _SYNSOFT_INCL_H_GLOB 00049 00050 #ifndef _SYNSOFT_DOCUMENTATION_SKIP_SECTION 00051 # define _SYNSOFT_VER_H_GLOB_MAJOR 2 00052 # define _SYNSOFT_VER_H_GLOB_MINOR 0 00053 # define _SYNSOFT_VER_H_GLOB_REVISION 1 00054 # define _SYNSOFT_VER_H_GLOB_EDIT 19 00055 #endif /* !_SYNSOFT_DOCUMENTATION_SKIP_SECTION */ 00056 00057 /* 00058 00069 /* 00070 00071 #ifndef WIN32 00072 # error This file is only currently defined for Win32 compilation units 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 00094 #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 00104 /* 00105 * Typedefs 00106 */ 00107 00112 typedef struct 00113 { 00114 int gl_pathc; 00115 int gl_matchc; 00116 int gl_offs; 00117 int gl_flags; 00118 char **gl_pathv; 00119 } glob_t; 00120 00121 /* 00122 * API functions 00123 */ 00124 00125 #ifdef __cplusplus 00126 extern "C" { 00127 #endif /* __cplusplus */ 00128 00140 int glob( 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 00156 void globfree(glob_t *pglob); 00157 00158 #ifdef __cplusplus 00159 } 00160 #endif /* __cplusplus */ 00161 00162 /* 00163 00166 /* 00167 00168 #endif /* _SYNSOFT_INCL_H_GLOB */ 00169 00170 /*
|
UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2001-2003 |