[331] | 1 | #ifndef ONIGMOGNU_H
|
---|
| 2 | #define ONIGMOGNU_H
|
---|
[279] | 3 | /**********************************************************************
|
---|
[331] | 4 | onigmognu.h - Onigmo (Oniguruma-mod) (regular expression library)
|
---|
[279] | 5 | **********************************************************************/
|
---|
| 6 | /*-
|
---|
| 7 | * Copyright (c) 2002-2005 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
|
---|
[331] | 8 | * Copyright (c) 2011-2016 K.Takata <kentkt AT csc DOT jp>
|
---|
[279] | 9 | * All rights reserved.
|
---|
| 10 | *
|
---|
| 11 | * Redistribution and use in source and binary forms, with or without
|
---|
| 12 | * modification, are permitted provided that the following conditions
|
---|
| 13 | * are met:
|
---|
| 14 | * 1. Redistributions of source code must retain the above copyright
|
---|
| 15 | * notice, this list of conditions and the following disclaimer.
|
---|
| 16 | * 2. Redistributions in binary form must reproduce the above copyright
|
---|
| 17 | * notice, this list of conditions and the following disclaimer in the
|
---|
| 18 | * documentation and/or other materials provided with the distribution.
|
---|
| 19 | *
|
---|
| 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
---|
| 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
---|
| 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
---|
| 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
---|
| 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
---|
| 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
---|
| 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
---|
| 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
---|
| 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
---|
| 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
---|
| 30 | * SUCH DAMAGE.
|
---|
| 31 | */
|
---|
| 32 |
|
---|
[331] | 33 | #include "onigmo.h"
|
---|
[279] | 34 |
|
---|
| 35 | #ifdef __cplusplus
|
---|
| 36 | extern "C" {
|
---|
| 37 | #endif
|
---|
| 38 |
|
---|
| 39 | #define RE_MBCTYPE_ASCII 0
|
---|
| 40 | #define RE_MBCTYPE_EUC 1
|
---|
| 41 | #define RE_MBCTYPE_SJIS 2
|
---|
| 42 | #define RE_MBCTYPE_UTF8 3
|
---|
| 43 |
|
---|
| 44 | /* GNU regex options */
|
---|
| 45 | #ifndef RE_NREGS
|
---|
| 46 | #define RE_NREGS ONIG_NREGION
|
---|
| 47 | #endif
|
---|
| 48 |
|
---|
| 49 | #define RE_OPTION_IGNORECASE ONIG_OPTION_IGNORECASE
|
---|
| 50 | #define RE_OPTION_EXTENDED ONIG_OPTION_EXTEND
|
---|
| 51 | #define RE_OPTION_MULTILINE ONIG_OPTION_MULTILINE
|
---|
| 52 | #define RE_OPTION_SINGLELINE ONIG_OPTION_SINGLELINE
|
---|
| 53 | #define RE_OPTION_LONGEST ONIG_OPTION_FIND_LONGEST
|
---|
| 54 | #define RE_OPTION_POSIXLINE (RE_OPTION_MULTILINE|RE_OPTION_SINGLELINE)
|
---|
| 55 | #define RE_OPTION_FIND_NOT_EMPTY ONIG_OPTION_FIND_NOT_EMPTY
|
---|
| 56 | #define RE_OPTION_NEGATE_SINGLELINE ONIG_OPTION_NEGATE_SINGLELINE
|
---|
| 57 | #define RE_OPTION_DONT_CAPTURE_GROUP ONIG_OPTION_DONT_CAPTURE_GROUP
|
---|
| 58 | #define RE_OPTION_CAPTURE_GROUP ONIG_OPTION_CAPTURE_GROUP
|
---|
| 59 |
|
---|
| 60 |
|
---|
| 61 | ONIG_EXTERN
|
---|
[331] | 62 | void re_mbcinit(int);
|
---|
[279] | 63 | ONIG_EXTERN
|
---|
[331] | 64 | int re_compile_pattern(const char*, int, struct re_pattern_buffer*, char* err_buf);
|
---|
[279] | 65 | ONIG_EXTERN
|
---|
[331] | 66 | int re_recompile_pattern(const char*, int, struct re_pattern_buffer*, char* err_buf);
|
---|
[279] | 67 | ONIG_EXTERN
|
---|
[331] | 68 | void re_free_pattern(struct re_pattern_buffer*);
|
---|
[279] | 69 | ONIG_EXTERN
|
---|
[331] | 70 | int re_adjust_startpos(struct re_pattern_buffer*, const char*, int, int, int);
|
---|
[279] | 71 | ONIG_EXTERN
|
---|
[331] | 72 | int re_search(struct re_pattern_buffer*, const char*, int, int, int, struct re_registers*);
|
---|
[279] | 73 | ONIG_EXTERN
|
---|
[331] | 74 | int re_match(struct re_pattern_buffer*, const char *, int, int, struct re_registers*);
|
---|
[279] | 75 | ONIG_EXTERN
|
---|
[331] | 76 | void re_set_casetable(const char*);
|
---|
[279] | 77 | ONIG_EXTERN
|
---|
[331] | 78 | void re_free_registers(struct re_registers*);
|
---|
[279] | 79 | ONIG_EXTERN
|
---|
[331] | 80 | int re_alloc_pattern(struct re_pattern_buffer**); /* added */
|
---|
[279] | 81 |
|
---|
| 82 | #ifdef __cplusplus
|
---|
| 83 | }
|
---|
| 84 | #endif
|
---|
| 85 |
|
---|
[331] | 86 | #endif /* ONIGMOGNU_H */
|
---|