Browse code

core: cfg.lex - overwrite yy_fatal_error() to use ksr_exit() macro

Daniel-Constantin Mierla authored on 09/02/2021 11:57:57
Showing 1 changed files
... ...
@@ -42,6 +42,9 @@
42 42
 	#include "daemonize.h"
43 43
 	#include "ppcfg.h"
44 44
 
45
+	static void yynoreturn ksr_yy_fatal_error(const char* msg);
46
+	#define YY_FATAL_ERROR(msg) ksr_yy_fatal_error(msg);
47
+
45 48
 	/* states */
46 49
 	#define INITIAL_S		0
47 50
 	#define COMMENT_S		1
... ...
@@ -2164,3 +2167,8 @@ static void pp_endif()
2164 2167
 	pp_update_state();
2165 2168
 }
2166 2169
 
2170
+static void yynoreturn ksr_yy_fatal_error(const char* msg)
2171
+{
2172
+	fprintf( stderr, "%s\n", msg );
2173
+	ksr_exit( YY_EXIT_FAILURE );
2174
+}