summaryrefslogtreecommitdiff
path: root/src/regerror.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-08-07 09:32:54 +0200
committerJörg Frings-Fürst <debian@jff.email>2019-08-07 09:32:54 +0200
commit1fb4b2b100d76cfa362cd021760b7cc0038cf55d (patch)
tree2443bfdda69965757d8ce335cda1a28bb7327834 /src/regerror.c
parentb134093d75235a90f09ff591137aed9dbdad6e89 (diff)
parent40f3d0030e6e98bcb02d6523e5ee48497dec49a6 (diff)
Update upstream source from tag 'upstream/6.9.3'
Update to upstream version '6.9.3' with Debian dir 0b54db06b48ebf22a6090f21e4dcc045a1085e11
Diffstat (limited to 'src/regerror.c')
-rw-r--r--src/regerror.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/regerror.c b/src/regerror.c
index 7564827..e6d1806 100644
--- a/src/regerror.c
+++ b/src/regerror.c
@@ -257,6 +257,23 @@ static int to_ascii(OnigEncoding enc, UChar *s, UChar *end,
}
+extern int
+onig_is_error_code_needs_param(int code)
+{
+ switch (code) {
+ case ONIGERR_UNDEFINED_NAME_REFERENCE:
+ case ONIGERR_UNDEFINED_GROUP_REFERENCE:
+ case ONIGERR_MULTIPLEX_DEFINED_NAME:
+ case ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL:
+ case ONIGERR_INVALID_GROUP_NAME:
+ case ONIGERR_INVALID_CHAR_IN_GROUP_NAME:
+ case ONIGERR_INVALID_CHAR_PROPERTY_NAME:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
/* for ONIG_MAX_ERROR_MESSAGE_LEN */
#define MAX_ERROR_PAR_LEN 30