llvm/llvm/lib/Support/regex_impl.h

/*-
 * This code is derived from OpenBSD's libc/regex, original license follows:
 *
 * Copyright (c) 1992 Henry Spencer.
 * Copyright (c) 1992, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Henry Spencer of the University of Toronto.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@(#)regex.h	8.1 (Berkeley) 6/2/93
 */

#ifndef LLVM_SUPPORT_REGEX_IMPL_H
#define LLVM_SUPPORT_REGEX_IMPL_H

#include <sys/types.h>
llvm_regoff_t;
llvm_regmatch_t;

llvm_regex_t;

/* llvm_regcomp() flags */
#define REG_BASIC
#define REG_EXTENDED
#define REG_ICASE
#define REG_NOSUB
#define REG_NEWLINE
#define REG_NOSPEC
#define REG_PEND
#define REG_DUMP

/* llvm_regerror() flags */
#define REG_NOMATCH
#define REG_BADPAT
#define REG_ECOLLATE
#define REG_ECTYPE
#define REG_EESCAPE
#define REG_ESUBREG
#define REG_EBRACK
#define REG_EPAREN
#define REG_EBRACE
#define REG_BADBR
#define REG_ERANGE
#define REG_ESPACE
#define REG_BADRPT
#define REG_EMPTY
#define REG_ASSERT
#define REG_INVARG
#define REG_ATOI
#define REG_ITOA

/* llvm_regexec() flags */
#define REG_NOTBOL
#define REG_NOTEOL
#define REG_STARTEND
#define REG_TRACE
#define REG_LARGE
#define REG_BACKR

#ifdef __cplusplus
extern "C" {
#endif

int	llvm_regcomp(llvm_regex_t *, const char *, int);
size_t	llvm_regerror(int, const llvm_regex_t *, char *, size_t);
int	llvm_regexec(const llvm_regex_t *, const char *, size_t,
                     llvm_regmatch_t [], int);
void	llvm_regfree(llvm_regex_t *);
size_t  llvm_strlcpy(char *dst, const char *src, size_t siz);

#ifdef __cplusplus
}
#endif

#endif /* LLVM_SUPPORT_REGEX_IMPL_H */