From 02227e6829298c803c191dfe0d8a7893208e7965 Mon Sep 17 00:00:00 2001 From: erg Date: Tue, 17 Jul 2007 21:47:46 +0000 Subject: [PATCH] For Windows dlls, allow extern data structure error_info to be accessed by functions. --- lib/ast/error.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/ast/error.c b/lib/ast/error.c index 6d3903db9..9c5a042bf 100644 --- a/lib/ast/error.c +++ b/lib/ast/error.c @@ -18,6 +18,14 @@ * standalone mini error implementation */ +#ifdef WIN32 +#include + +#ifdef GVDLL +#define _BLD_sfio 1 +#endif +#endif + #include #include #include @@ -25,6 +33,15 @@ Error_info_t error_info; +void setErrorLine (int line) { error_info.line = line; } +void setErrorFileLine (char* src, int line) { + error_info.file = src; + error_info.line = line; +} +void setErrorId (char* id) { error_info.id = id; } +void setErrorErrors (int errors) { error_info.errors = errors; } +int getErrorErrors () { return error_info.errors; } + void errorv(const char *id, int level, va_list ap) { char *s; -- 2.40.0