Back to index

php5  5.3.10
oniggnu.h
Go to the documentation of this file.
00001 #ifndef ONIGGNU_H
00002 #define ONIGGNU_H
00003 /**********************************************************************
00004   oniggnu.h - Oniguruma (regular expression library)
00005 **********************************************************************/
00006 /*-
00007  * Copyright (c) 2002-2005  K.Kosako  <sndgk393 AT ybb DOT ne DOT jp>
00008  * All rights reserved.
00009  *
00010  * Redistribution and use in source and binary forms, with or without
00011  * modification, are permitted provided that the following conditions
00012  * are met:
00013  * 1. Redistributions of source code must retain the above copyright
00014  *    notice, this list of conditions and the following disclaimer.
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in the
00017  *    documentation and/or other materials provided with the distribution.
00018  *
00019  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
00020  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00021  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00022  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
00023  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00024  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
00025  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
00026  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00027  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
00028  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00029  * SUCH DAMAGE.
00030  */
00031 
00032 #include "oniguruma.h"
00033 
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 #define RE_MBCTYPE_ASCII         0
00039 #define RE_MBCTYPE_EUC           1
00040 #define RE_MBCTYPE_SJIS          2
00041 #define RE_MBCTYPE_UTF8          3
00042 
00043 /* GNU regex options */
00044 #ifndef RE_NREGS
00045 #define RE_NREGS                ONIG_NREGION
00046 #endif
00047 
00048 #define RE_OPTION_IGNORECASE         ONIG_OPTION_IGNORECASE
00049 #define RE_OPTION_EXTENDED           ONIG_OPTION_EXTEND
00050 #define RE_OPTION_MULTILINE          ONIG_OPTION_MULTILINE
00051 #define RE_OPTION_SINGLELINE         ONIG_OPTION_SINGLELINE
00052 #define RE_OPTION_LONGEST            ONIG_OPTION_FIND_LONGEST
00053 #define RE_OPTION_POSIXLINE         (RE_OPTION_MULTILINE|RE_OPTION_SINGLELINE)
00054 #define RE_OPTION_FIND_NOT_EMPTY     ONIG_OPTION_FIND_NOT_EMPTY
00055 #define RE_OPTION_NEGATE_SINGLELINE  ONIG_OPTION_NEGATE_SINGLELINE
00056 #define RE_OPTION_DONT_CAPTURE_GROUP ONIG_OPTION_DONT_CAPTURE_GROUP
00057 #define RE_OPTION_CAPTURE_GROUP      ONIG_OPTION_CAPTURE_GROUP
00058 
00059 
00060 ONIG_EXTERN
00061 void re_mbcinit P_((int));
00062 ONIG_EXTERN
00063 int re_compile_pattern P_((const char*, int, struct re_pattern_buffer*, char* err_buf));
00064 ONIG_EXTERN
00065 int re_recompile_pattern P_((const char*, int, struct re_pattern_buffer*, char* err_buf));
00066 ONIG_EXTERN
00067 void re_free_pattern P_((struct re_pattern_buffer*));
00068 ONIG_EXTERN
00069 int re_adjust_startpos P_((struct re_pattern_buffer*, const char*, int, int, int));
00070 ONIG_EXTERN
00071 int re_search P_((struct re_pattern_buffer*, const char*, int, int, int, struct re_registers*));
00072 ONIG_EXTERN
00073 int re_match P_((struct re_pattern_buffer*, const char *, int, int, struct re_registers*));
00074 ONIG_EXTERN
00075 void re_set_casetable P_((const char*));
00076 ONIG_EXTERN
00077 void re_free_registers P_((struct re_registers*));
00078 ONIG_EXTERN
00079 int re_alloc_pattern P_((struct re_pattern_buffer**));  /* added */
00080 
00081 #ifdef __cplusplus
00082 }
00083 #endif
00084 
00085 #endif /* ONIGGNU_H */