regex.h revision da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968
/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2007 AT&T Knowledge Ventures *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Knowledge Ventures *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* regex library interface
*/
#ifdef _AST_STD_I
#define _REGEX_H -1
#define regex_t int
#define regmatch_t int
#endif
#ifndef _REGEX_H
#define _REGEX_H 1
#include <ast_common.h>
#define REG_VERSION 20030916L
/* regcomp flags */
/* nonstandard regcomp flags */
/* regexec flags */
/* nonstandard regexec flags */
/* regalloc flags */
/* regsub flags */
/* regex error codes */
typedef int (*regclass_t)(int);
typedef int32_t regflags_t;
typedef int regoff_t;
typedef int (*regexec_t)(const regex_t*, void*, const char*, size_t, const char*, size_t, char**, regdisc_t*);
typedef void* (*regresize_t)(void*, void*, size_t);
typedef int (*regrecord_t)(void*, const char*, size_t);
typedef struct regmatch_s
{
} regmatch_t;
typedef struct regsub_s
{
char* re_buf; /* regsubexec() output buffer */
int re_min; /* regsubcomp() min matches */
#ifdef _REG_SUB_PRIVATE_
#endif
} regsub_t;
struct regdisc_s
{
unsigned long re_version; /* discipline version */
int re_errorlevel; /* errorf level */
void* re_resizehandle;/* resizef handle */
unsigned char* re_map; /* external to native ccode map */
};
typedef struct regstat_s
{
} regstat_t;
struct regex_s
{
};
#if _BLD_ast && defined(__EXPORT__)
#define extern __EXPORT__
#endif
/* nonstandard hooks */
extern regclass_t regclass(const char*, char**);
extern int regaddclass(const char*, regclass_t);
extern int regcollate(const char*, char**, char*, int);
extern void regfatalpat(regex_t*, int, int, const char*);
extern int regrexec(const regex_t*, const char*, size_t, size_t, regmatch_t*, regflags_t, int, void*, regrecord_t);
extern void regsubfree(regex_t*);
/* obsolete hooks */
#ifndef _SFIO_H
struct _sfio_s;
#endif
extern int regsub(const regex_t*, struct _sfio_s*, const char*, const char*, size_t, regmatch_t*, regflags_t);
#undef extern
#endif