diff options
| author | Tyge Løvset <[email protected]> | 2022-10-14 10:25:55 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-10-14 10:25:55 +0200 |
| commit | 54c08dc031c622e78dc134353690ed359b9173d8 (patch) | |
| tree | 38d827af29aa30350099a71d84d0caf0510b05ed /docs/cregex_api.md | |
| parent | b2103dc2084f2f0b05645acc7879c9ff5ad84a05 (diff) | |
| download | STC-modified-54c08dc031c622e78dc134353690ed359b9173d8.tar.gz STC-modified-54c08dc031c622e78dc134353690ed359b9173d8.zip | |
Update sso_bench.cpp benchmark, and some internal improvements.
Diffstat (limited to 'docs/cregex_api.md')
| -rw-r--r-- | docs/cregex_api.md | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/docs/cregex_api.md b/docs/cregex_api.md index 66b97834..b715791d 100644 --- a/docs/cregex_api.md +++ b/docs/cregex_api.md @@ -25,13 +25,13 @@ enum { cregex cregex_init(void); cregex cregex_from(const char* pattern, int cflags); - // return 1 = success, negative = error. + // return cre_success, or negative error code on failure. int cregex_compile(cregex *self, const char* pattern, int cflags); // num. of capture groups in regex. 0 if RE is invalid. First group is the full match. int cregex_captures(const cregex* self); - // return 1=match, 0=nomatch, -1=error. match array size: at least num groups in RE (1+). + // return cre_success, cre_nomatch, or cre_matcherror. int cregex_find(const cregex* re, const char* input, csview match[], int mflags); int cregex_find_sv(const cregex* re, csview input, csview match[]); int cregex_find_pattern(const char* pattern, const char* input, csview match[], int cmflags); @@ -48,20 +48,20 @@ void cregex_drop(cregex* self); // destroy ``` ### Error codes -- cre_success = 1 -- cre_nomatch = 0 -- cre_matcherror = -1 -- cre_outofmemory = -2 -- cre_unmatchedleftparenthesis = -3 -- cre_unmatchedrightparenthesis = -4 -- cre_toomanysubexpressions = -5 -- cre_toomanycharacterclasses = -6 -- cre_malformedcharacterclass = -7 -- cre_missingoperand = -8 -- cre_unknownoperator = -9 -- cre_operandstackoverflow = -10 -- cre_operatorstackoverflow = -11 -- cre_operatorstackunderflow = -12 +- cre_success = 0 +- cre_nomatch = -1 +- cre_matcherror = -2 +- cre_outofmemory = -3 +- cre_unmatchedleftparenthesis = -4 +- cre_unmatchedrightparenthesis = -5 +- cre_toomanysubexpressions = -6 +- cre_toomanycharacterclasses = -7 +- cre_malformedcharacterclass = -8 +- cre_missingoperand = -9 +- cre_unknownoperator = -10 +- cre_operandstackoverflow = -11 +- cre_operatorstackoverflow = -12 +- cre_operatorstackunderflow = -13 ### Limits - cre_MAXCLASSES |
