summaryrefslogtreecommitdiff
path: root/src/regerror.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-04-20 20:33:51 +0200
committerJörg Frings-Fürst <debian@jff.email>2020-04-20 20:33:51 +0200
commit6b986090d954dbac91bbb3c43ce7c3328c91a780 (patch)
tree34b34e41a3f7b7f4794c75be4482bb14695f36a9 /src/regerror.c
parent4216de6a3336cbc6dddb572cb7e6ab6193bf3729 (diff)
New upstream version 6.9.5upstream/6.9.5
Diffstat (limited to 'src/regerror.c')
-rw-r--r--src/regerror.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/regerror.c b/src/regerror.c
index b57a276..58bc7fd 100644
--- a/src/regerror.c
+++ b/src/regerror.c
@@ -2,7 +2,7 @@
regerror.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2019 K.Kosako
+ * Copyright (c) 2002-2020 K.Kosako
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,10 +27,12 @@
* SUCH DAMAGE.
*/
-#include "regint.h"
-#include <stdio.h> /* for vsnprintf() */
+#ifndef NEED_TO_INCLUDE_STDIO
+/* for vsnprintf() */
+#define NEED_TO_INCLUDE_STDIO
+#endif
-#include <stdarg.h>
+#include "regint.h"
extern UChar*
onig_error_code_to_format(int code)
@@ -52,6 +54,8 @@ onig_error_code_to_format(int code)
p = "parse depth limit over"; break;
case ONIGERR_RETRY_LIMIT_IN_MATCH_OVER:
p = "retry-limit-in-match over"; break;
+ case ONIGERR_RETRY_LIMIT_IN_SEARCH_OVER:
+ p = "retry-limit-in-search over"; break;
case ONIGERR_TYPE_BUG:
p = "undefined type (bug)"; break;
case ONIGERR_PARSER_BUG:
@@ -277,7 +281,8 @@ onig_is_error_code_needs_param(int code)
/* for ONIG_MAX_ERROR_MESSAGE_LEN */
#define MAX_ERROR_PAR_LEN 30
-extern int onig_error_code_to_str(UChar* s, int code, ...)
+extern int ONIG_VARIADIC_FUNC_ATTR
+onig_error_code_to_str(UChar* s, int code, ...)
{
UChar *p, *q;
OnigErrorInfo* einfo;
@@ -337,8 +342,9 @@ extern int onig_error_code_to_str(UChar* s, int code, ...)
}
-void onig_snprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
- UChar* pat, UChar* pat_end, const UChar *fmt, ...)
+void ONIG_VARIADIC_FUNC_ATTR
+onig_snprintf_with_pattern(UChar buf[], int bufsize, OnigEncoding enc,
+ UChar* pat, UChar* pat_end, const UChar *fmt, ...)
{
int n, need, len;
UChar *p, *s, *bp;