home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
uccs
/
root.14
/
udk
/
usr
/
include
/
fnmatch.h
< prev
next >
Wrap
C/C++ Source or Header
|
1998-08-19
|
3KB
|
90 lines
/*
* Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
* SANTA CRUZ OPERATION INC.
*
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
*/
#ifndef _FNMATCH_H
#define _FNMATCH_H
#ident "@(#)sgs-head:common/head/fnmatch.h 1.6"
#ifndef _SIZE_T
# define _SIZE_T
typedef unsigned int size_t;
#endif
#ifndef _SSIZE_T
# define _SSIZE_T
typedef int ssize_t;
#endif
#define FNM_PATHNAME 0x001
#define FNM_PERIOD 0x002
#define FNM_NOESCAPE 0x004
#define FNM_BADRANGE 0x008 /* accept [m-a] ranges as [ma] */
#define FNM_BKTESCAPE 0x010 /* allow \ in []s to quote next anything */
#define FNM_EXTENDED 0x020 /* use full ksh-style patterns */
#define FNM_RETMIN 0x040 /* return length of minimum match */
#define FNM_RETMAX 0x080 /* return length of maximum match */
#define FNM_REUSE 0x100 /* reusing this FNM */
#define FNM_COMPONENT 0x200 /* only matching a component */
#define FNM_SUBEXPR 0x400 /* fill fnm_nsub, fnm_so[], fnm_eo[] */
#define FNM_UNANCHORED 0x800 /* match need not include string start */
#define FNM_NSUBEXPR 10 /* length of fnm_so[] and fnm_eo[] */
#define FNM_NOSYS (-1)
#define FNM_NOMATCH (-2)
#define FNM_BADPAT (-3)
#define FNM_ERROR (-4) /* internal error; probably allocation failure */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct /* compiled information */
{
const unsigned char *__fnmstr;
struct __fnm_collate *__fnmcol;
struct __fnm_ptrn *__fnmpatfree;
struct __fnm_ptrn *__fnmbktfree;
struct __fnm_ptrn *__fnmpat;
int __fnmflags;
int __fnmtoken;
#ifdef fnm_nsub
size_t __fnmnsub;
#else
size_t fnm_nsub; /* number of subexpressions */
#endif
#ifdef fnm_so
ssize_t __fnmso[FNM_NSUBEXPR];
#else
ssize_t fnm_so[FNM_NSUBEXPR]; /* start offsets */
#endif
#ifdef fnm_eo
ssize_t __fnmeo[FNM_NSUBEXPR];
#else
ssize_t fnm_eo[FNM_NSUBEXPR]; /* end offsets */
#endif
} fnm_t;
#ifdef __STDC__
extern int fnmatch(const char *, const char *, int);
extern void _fnmfree(fnm_t *);
extern int _fnmcomp(fnm_t *, const unsigned char *, int);
extern int _fnmexec(fnm_t *, const unsigned char *);
#else
extern int fnmatch(), _fnmcomp(), _fnmexec();
extern void _fnmfree();
#endif
#ifdef __cplusplus
}
#endif
#endif /*_FNMATCH_H*/