summaryrefslogtreecommitdiff
path: root/src/onigposix.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2021-04-26 17:34:16 +0200
committerJörg Frings-Fürst <debian@jff.email>2021-04-26 17:34:16 +0200
commiteac65ba44805c402f894b700b602c2e891f92a84 (patch)
tree8c74372bd97a480de440013af1dda4958189e24e /src/onigposix.h
parent7ce72ba4d420fde9672c2fb2dd7a6f5a26815e26 (diff)
parentdbedac4783f09292abb187d0c59d4032594038b6 (diff)
Merge branch 'release/debian/6.9.6-1'debian/6.9.6-1
Diffstat (limited to 'src/onigposix.h')
-rw-r--r--src/onigposix.h41
1 files changed, 28 insertions, 13 deletions
diff --git a/src/onigposix.h b/src/onigposix.h
index 37e09ea..3514f80 100644
--- a/src/onigposix.h
+++ b/src/onigposix.h
@@ -74,19 +74,19 @@ extern "C" {
#define REG_POSIX_ENCODING_UTF16_LE 5
-typedef int regoff_t;
+typedef int onig_posix_regoff_t;
typedef struct {
- regoff_t rm_so;
- regoff_t rm_eo;
-} regmatch_t;
+ onig_posix_regoff_t rm_so;
+ onig_posix_regoff_t rm_eo;
+} onig_posix_regmatch_t;
/* POSIX regex_t */
typedef struct {
void* onig; /* Oniguruma regex_t* */
size_t re_nsub;
int comp_options;
-} regex_t;
+} onig_posix_regex_t;
#ifndef P_
@@ -160,16 +160,31 @@ ONIG_EXTERN int onig_end P_((void));
#endif /* ONIGURUMA_H */
-ONIG_EXTERN int regcomp P_((regex_t* reg, const char* pat, int options));
-ONIG_EXTERN int regexec P_((regex_t* reg, const char* str, size_t nmatch, regmatch_t* matches, int options));
-ONIG_EXTERN void regfree P_((regex_t* reg));
-ONIG_EXTERN size_t regerror P_((int code, const regex_t* reg, char* buf, size_t size));
+ONIG_EXTERN int onig_posix_regcomp P_((onig_posix_regex_t* reg, const char* pat, int options));
+ONIG_EXTERN int onig_posix_regexec P_((onig_posix_regex_t* reg, const char* str, size_t nmatch, onig_posix_regmatch_t* matches, int options));
+ONIG_EXTERN void onig_posix_regfree P_((onig_posix_regex_t* reg));
+ONIG_EXTERN size_t onig_posix_regerror P_((int code, const onig_posix_regex_t* reg, char* buf, size_t size));
/* extended API */
-ONIG_EXTERN void reg_set_encoding P_((int enc));
-ONIG_EXTERN int reg_name_to_group_numbers P_((regex_t* reg, const unsigned char* name, const unsigned char* name_end, int** nums));
-ONIG_EXTERN int reg_foreach_name P_((regex_t* reg, int (*func)(const unsigned char*, const unsigned char*,int,int*,regex_t*,void*), void* arg));
-ONIG_EXTERN int reg_number_of_names P_((regex_t* reg));
+ONIG_EXTERN void onig_posix_reg_set_encoding P_((int enc));
+ONIG_EXTERN int onig_posix_reg_name_to_group_numbers P_((onig_posix_regex_t* reg, const unsigned char* name, const unsigned char* name_end, int** nums));
+ONIG_EXTERN int onig_posix_reg_foreach_name P_((onig_posix_regex_t* reg, int (*func)(const unsigned char*, const unsigned char*,int,int*,onig_posix_regex_t*,void*), void* arg));
+ONIG_EXTERN int onig_posix_reg_number_of_names P_((onig_posix_regex_t* reg));
+
+
+/* aliases */
+#define regex_t onig_posix_regex_t
+#define regmatch_t onig_posix_regmatch_t
+#define regoff_t onig_posix_regoff_t
+
+#define regcomp onig_posix_regcomp
+#define regexec onig_posix_regexec
+#define regfree onig_posix_regfree
+#define regerror onig_posix_regerror
+#define reg_set_encoding onig_posix_reg_set_encoding
+#define reg_name_to_group_numbers onig_posix_reg_name_to_group_numbers
+#define reg_foreach_name onig_posix_reg_foreach_name
+#define reg_number_of_names onig_posix_reg_number_of_names
#ifdef __cplusplus
}