From 737f916a8cd36b573560365a18c70b29f422a6b7 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 17 Nov 2013 17:23:13 +0900 Subject: [PATCH] add pic_errorf --- include/picrin.h | 1 + src/error.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/picrin.h b/include/picrin.h index 75754923..f2c6db1a 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -120,6 +120,7 @@ pic_value pic_expand(pic_state *, pic_value); void pic_abort(pic_state *, const char *); void pic_raise(pic_state *, pic_value); void pic_error(pic_state *, const char *); +void pic_errorf(pic_state *, const char *, size_t, ...); void pic_warn(pic_state *, const char *); void pic_debug(pic_state *, pic_value); diff --git a/src/error.c b/src/error.c index fde4cf95..517a4089 100644 --- a/src/error.c +++ b/src/error.c @@ -14,6 +14,12 @@ pic_error(pic_state *pic, const char *msg) longjmp(*pic->jmp, 1); } +void +pic_errorf(pic_state *pic, const char *msg, size_t n, ...) +{ + pic_error(pic, msg); +} + void pic_abort(pic_state *pic, const char *msg) {