rexregex.h
Go to the documentation of this file.
00001 /*
00002  *  Regular Pattern Analyzer Toolkit (RPA/Tk)
00003  *  Copyright (c) 2009-2012 Martin Stoilov
00004  *
00005  *  This program is free software: you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation, either version 3 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License
00016  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  *  Martin Stoilov <martin@rpasearch.com>
00019  */
00020 
00030 #ifndef _REXREGEX_H_
00031 #define _REXREGEX_H_
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00040 typedef struct rexregex_s rexregex_t;
00041 
00042 #define REX_ENCODING_UTF8 0                     
00043 #define REX_ENCODING_BYTE 1                     
00051 rexregex_t *rex_regex_create(const char *str, unsigned int size);
00052 
00058 rexregex_t *rex_regex_create_s(const char *str);
00059 
00070 int rex_regex_match(rexregex_t *regex, unsigned int encoding, const char *start, const char *end);
00071 
00084 int rex_regex_scan(rexregex_t *regex, unsigned int encoding, const char *start, const char *end, const char **where);
00085 
00090 void rex_regex_destroy(rexregex_t *regex);
00091 
00092 
00093 #ifdef __cplusplus
00094 }
00095 #endif
00096 
00097 #endif