summaryrefslogtreecommitdiff
path: root/doc/API
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-12-23 07:44:50 +0100
committerJörg Frings-Fürst <debian@jff.email>2019-12-23 07:44:50 +0100
commit9e629c8f43b43617fa5b7d3654f7d81e81b8a427 (patch)
tree581dcb2708a7eac0bcc7bbfa6478cfa50dfcf5a8 /doc/API
parent7bbf4ae1401bc6e40f71a32d3f97952796d85690 (diff)
parent091456e1a135d4674701a264495bd34918779391 (diff)
Merge branch 'release/debian/6.9.4-1'debian/6.9.4-1
Diffstat (limited to 'doc/API')
-rw-r--r--doc/API160
1 files changed, 155 insertions, 5 deletions
diff --git a/doc/API b/doc/API
index 2309e5e..43d5338 100644
--- a/doc/API
+++ b/doc/API
@@ -1,4 +1,4 @@
-Oniguruma API Version 6.9.2 2019/03/25
+Oniguruma API Version 6.9.4 2019/09/30
#include <oniguruma.h>
@@ -168,6 +168,9 @@ Oniguruma API Version 6.9.2 2019/03/25
# int onig_new_deluxe(regex_t** reg, const UChar* pattern, const UChar* pattern_end,
OnigCompileInfo* ci, OnigErrorInfo* einfo)
+ This function is deprecated, and it does not allow the case where
+ the encoding of pattern and target is different.
+
Create a regex object.
This function is deluxe version of onig_new().
@@ -299,9 +302,11 @@ Oniguruma API Version 6.9.2 2019/03/25
const UChar* range, OnigRegion* region, OnigOptionType option)
Search string and return search result and matching region.
+ Do not pass invalid byte string in the regex character encoding.
normal return: match position offset (i.e. p - str >= 0)
not found: ONIG_MISMATCH (< 0)
+ error: error code (< 0)
arguments
1 reg: regex object
@@ -323,18 +328,23 @@ Oniguruma API Version 6.9.2 2019/03/25
const UChar* start, const UChar* range, OnigRegion* region,
OnigOptionType option, OnigMatchParam* mp)
- arguments
- 1-7: same as onig_search()
- 8 mp: match parameter values (match_stack_limit, retry_limit_in_match)
+ Search string and return search result and matching region.
+ Do not pass invalid byte string in the regex character encoding.
+
+ arguments
+ 1-7: same as onig_search()
+ 8 mp: match parameter values (match_stack_limit, retry_limit_in_match)
# int onig_match(regex_t* reg, const UChar* str, const UChar* end, const UChar* at,
OnigRegion* region, OnigOptionType option)
Match string and return result and matching region.
+ Do not pass invalid byte string in the regex character encoding.
normal return: match length (>= 0)
- not match: ONIG_MISMATCH ( < 0)
+ not match: ONIG_MISMATCH (< 0)
+ error: error code (< 0)
arguments
1 reg: regex object
@@ -353,6 +363,9 @@ Oniguruma API Version 6.9.2 2019/03/25
const UChar* at, OnigRegion* region,
OnigOptionType option, OnigMatchParam* mp)
+ Match string and return result and matching region.
+ Do not pass invalid byte string in the regex character encoding.
+
arguments
1-6: same as onig_match()
7 mp: match parameter values (match_stack_limit, retry_limit_in_match)
@@ -364,6 +377,7 @@ Oniguruma API Version 6.9.2 2019/03/25
void* callback_arg)
Scan string and callback with matching region.
+ Do not pass invalid byte string in the regex character encoding.
normal return: number of matching times
error: error code
@@ -379,6 +393,136 @@ Oniguruma API Version 6.9.2 2019/03/25
7 callback_arg: optional argument passed to callback
+# int onig_regset_new(OnigRegSet** rset, int n, regex_t* regs[])
+
+ Create a regset object.
+ All regex objects must have the same character encoding.
+ All regex objects are prohibited from having the ONIG_OPTION_FIND_LONGEST option.
+
+ arguments
+ 1 rset: return address of regset object
+ 2 n: number of regex in regs
+ 3 regs: array of regex
+
+ normal return: ONIG_NORMAL
+
+
+# int onig_regset_add(OnigRegSet* set, regex_t* reg)
+
+ Add a regex into regset.
+ The regex object must have the same character encoding with the regset.
+ The regex object is prohibited from having the ONIG_OPTION_FIND_LONGEST option.
+
+ arguments
+ 1 set: regset object
+ 2 reg: regex object
+
+ normal return: ONIG_NORMAL
+
+
+# int onig_regset_replace(OnigRegSet* set, int at, regex_t* reg)
+
+ Replace a regex in regset with another one.
+ If the reg argument value is NULL, then remove at-th regex. (and indexes of other regexes are changed)
+
+ arguments
+ 1 set: regset object
+ 2 at: index of regex (zero origin)
+ 3 reg: regex object
+
+ normal return: ONIG_NORMAL
+
+
+# void onig_regset_free(OnigRegSet* set)
+
+ Free memory used by regset object and regex objects in the regset.
+ If the same regex object is registered twice, the situation becomes destructive.
+
+ arguments
+ 1 set: regset object
+
+
+# int onig_regset_number_of_regex(OnigRegSet* set)
+
+ Returns number of regex objects in the regset.
+
+ arguments
+ 1 set: regset object
+
+
+# regex_t* onig_regset_get_regex(OnigRegSet* set, int at)
+
+ Returns the regex object corresponding to the at-th regex.
+
+ arguments
+ 1 set: regset object
+ 2 at: index of regex array (zero origin)
+
+
+# OnigRegion* onig_regset_get_region(OnigRegSet* set, int at)
+
+ Returns the region object corresponding to the at-th regex.
+
+ arguments
+ 1 set: regset object
+ 2 at: index of regex array (zero origin)
+
+
+# int onig_regset_search(OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, int* rmatch_pos)
+
+ Perform a search with regset.
+
+ return value:
+ normal return: index of match regex (zero origin)
+ not found: ONIG_MISMATCH (< 0)
+ error: error code (< 0)
+
+ arguments
+ 1 set: regset object
+ 2 str: target string
+ 3 end: terminate address of target string
+ 4 start: search start address of target string
+ 5 range: search terminate address of target string
+ 6 lead: outer loop element
+ ONIG_REGSET_POSITION_LEAD (returns most left position)
+ ONIG_REGSET_REGEX_LEAD (returns most left position)
+ ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (returns first match regex)
+ 7 option: search time option
+ ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
+ ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
+ 8 rmatch_pos: return address of match position (match_address - str)
+
+ * ONIG_REGSET_POSITION_LEAD and ONIG_REGSET_REGEX_LEAD return the same result.
+ These differences only appear in search time.
+ In most cases, ONIG_REGSET_POSITION_LEAD seems to be faster.
+
+
+# int onig_regset_search_with_param(OnigRegSet* set, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegSetLead lead, OnigOptionType option, OnigMatchParam* mps[], int* rmatch_pos)
+
+ Perform a search with regset and match-params.
+
+ return value:
+ normal return: index of match regex (zero origin)
+ not found: ONIG_MISMATCH (< 0)
+ error: error code (< 0)
+
+ arguments
+ 1 set: regset object
+ 2 str: target string
+ 3 end: terminate address of target string
+ 4 start: search start address of target string
+ 5 range: search terminate address of target string
+ 6 lead: outer loop element
+ ONIG_REGSET_POSITION_LEAD (returns most left position)
+ ONIG_REGSET_REGEX_LEAD (returns most left position)
+ ONIG_REGSET_PRIORITY_TO_REGEX_ORDER (returns first match regex)
+ 7 option: search time option
+ ONIG_OPTION_NOTBOL string head(str) isn't considered as begin of line
+ ONIG_OPTION_NOTEOL string end (end) isn't considered as end of line
+ 8 mps: array of match-params
+ 9 rmatch_pos: return address of match position (match_address - str)
+
+
# OnigRegion* onig_region_new(void)
Create a region.
@@ -611,14 +755,20 @@ Oniguruma API Version 6.9.2 2019/03/25
# int onigenc_strlen(OnigEncoding enc, const UChar* s, const UChar* end)
+
+ Return number of characters in the string.
+
+
# int onigenc_strlen_null(OnigEncoding enc, const UChar* s)
Return number of characters in the string.
+ Do not pass invalid byte string in the character encoding.
# int onigenc_str_bytelen_null(OnigEncoding enc, const UChar* s)
Return number of bytes in the string.
+ Do not pass invalid byte string in the character encoding.
# int onig_set_default_syntax(OnigSyntaxType* syntax)