summaryrefslogtreecommitdiff
path: root/src/regerror.c
diff options
context:
space:
mode:
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;