Synesis Software

Main Page   Modules   Compound List   File List   Compound Members   File Members  

/freelibs/unixem/include/glob.h

Go to the documentation of this file.
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:     16th June 2004
00009  *
00010  * Author:      Matthew Wilson, Synesis Software Pty Ltd.
00011  *
00012  * License:     (Licensed under the Synesis Software Standard Source License)
00013  *
00014  *              Copyright (C) 2002-2004, Synesis Software Pty Ltd.
00015  *
00016  *              All rights reserved.
00017  *
00018  *              www:        http://www.synesis.com.au/
00019  *                          http://www.synesis.com.au/software/
00020  *
00021  *              email:      software@synesis.com.au
00022  *                          software@synesis-group.com
00023  *
00024  *              Redistribution and use in source and binary forms, with or
00025  *              without modification, are permitted provided that the following
00026  *              conditions are met:
00027  *
00028  *              (i) Redistributions of source code must retain the above
00029  *              copyright notice and contact information, this list of
00030  *              conditions and the following disclaimer.
00031  *
00032  *              (ii) Any derived versions of this software (howsoever modified)
00033  *              remain the sole property of Synesis Software.
00034  *
00035  *              (iii) Any derived versions of this software (howsoever modified)
00036  *              remain subject to all these conditions.
00037  *
00038  *              (iv) Neither the name of Synesis Software nor the names of any
00039  *              subdivisions, employees or agents of Synesis Software, nor the
00040  *              names of any other contributors to this software may be used to
00041  *              endorse or promote products derived from this software without
00042  *              specific prior written permission.
00043  *
00044  *              This source code is provided by Synesis Software "as is" and any
00045  *              warranties, whether expressed or implied, including, but not
00046  *              limited to, the implied warranties of merchantability and
00047  *              fitness for a particular purpose are disclaimed. In no event
00048  *              shall the Synesis Software be liable for any direct, indirect,
00049  *              incidental, special, exemplary, or consequential damages
00050  *              (including, but not limited to, procurement of substitute goods
00051  *              or services; loss of use, data, or profits; or business
00052  *              interruption) however caused and on any theory of liability,
00053  *              whether in contract, strict liability, or tort (including
00054  *              negligence or otherwise) arising in any way out of the use of
00055  *              this software, even if advised of the possibility of such
00056  *              damage.
00057  *
00058  * 
00059 
00060 
00066 #ifndef _SYNSOFT_INCL_H_GLOB
00067 #define _SYNSOFT_INCL_H_GLOB
00068 
00069 #ifndef _SYNSOFT_DOCUMENTATION_SKIP_SECTION
00070 # define _SYNSOFT_VER_H_GLOB_MAJOR      1
00071 # define _SYNSOFT_VER_H_GLOB_MINOR      0
00072 # define _SYNSOFT_VER_H_GLOB_REVISION   6
00073 # define _SYNSOFT_VER_H_GLOB_EDIT       18
00074 #endif /* !_SYNSOFT_DOCUMENTATION_SKIP_SECTION */
00075 
00076 /* 
00077 
00088 /* 
00089 
00090 #ifndef WIN32
00091 # error This file is only currently defined for Win32 compilation units
00092 #endif /* WIN32 */
00093 
00094 /* 
00095  * Constants and definitions
00096  */
00097 
00098 /* Error codes */
00099 #define GLOB_NOSPACE    (1)             
00100 #define GLOB_ABORTED    (2)             
00101 #define GLOB_NOMATCH    (3)             
00102 #define GLOB_NOSYS      (4)             
00103 #define GLOB_ABEND      GLOB_ABORTED    
00105 /* Flags */
00106 #define GLOB_ERR            0x00000001  
00107 #define GLOB_MARK           0x00000002  
00108 #define GLOB_NOSORT         0x00000004  
00109 #define GLOB_DOOFFS         0x00000008  
00110 #define GLOB_NOCHECK        0x00000010  
00111 #define GLOB_APPEND         0x00000020  
00112 #define GLOB_NOESCAPE       0x00000040  
00113 #define GLOB_PERIOD         0x00000080  
00115 # define GLOB_MAGCHAR       0x00000100  
00116 # define GLOB_ALTDIRFUNC    0x00000200  
00117 # define GLOB_BRACE         0x00000400  
00118 # define GLOB_NOMAGIC       0x00000800  
00119 # define GLOB_TILDE         0x00001000  
00120 # define GLOB_ONLYDIR       0x00002000  
00121 # define GLOB_TILDE_CHECK   0x00004000  
00123 /* 
00124  * Typedefs
00125  */
00126 
00131 typedef struct
00132 {
00133   int   gl_pathc;   
00134   int   gl_matchc;  
00135   int   gl_offs;    
00136   int   gl_flags;   
00137   char  **gl_pathv; 
00138 } glob_t;
00139 
00140 /* 
00141  * API functions
00142  */
00143 
00144 #ifdef __cplusplus
00145 extern "C" {
00146 #endif /* __cplusplus */
00147 
00159 int glob( char const  *pattern
00160         , int         flags
00161 #if defined(__COMO__)
00162         , int       (*errfunc)(char const *, int)
00163 #else /* ? compiler */
00164         , const int (*errfunc)(char const *, int)
00165 #endif /* compiler */
00166         , glob_t      *pglob);
00167 
00175 void globfree(glob_t *pglob);
00176 
00177 #ifdef __cplusplus
00178 }
00179 #endif /* __cplusplus */
00180 
00181 /* 
00182 
00185 /* 
00186 
00187 #endif /* _SYNSOFT_INCL_H_GLOB */
00188 
00189 /* 

UNIX Emulation for Win32 Libraries documentation © Synesis Software Pty Ltd, 2001-2003