diff --git a/lib/libesp32/re1.5/main.c b/lib/libesp32/re1.5/main.c index 7d688adf1..f5ad6ae1d 100644 --- a/lib/libesp32/re1.5/main.c +++ b/lib/libesp32/re1.5/main.c @@ -5,7 +5,7 @@ #include "re1.5.h" struct { - char *name; + const char *name; int (*fn)(ByteProg*, Subject*, const char**, int, int); } tab[] = { {"recursive", re1_5_recursiveprog}, diff --git a/lib/libesp32/re1.5/re1.5.h b/lib/libesp32/re1.5/re1.5.h index a9f255d03..1a7a94554 100644 --- a/lib/libesp32/re1.5/re1.5.h +++ b/lib/libesp32/re1.5/re1.5.h @@ -46,7 +46,7 @@ Regexp *parse(char*); Regexp *reg(int type, Regexp *left, Regexp *right); void printre(Regexp*); #ifndef re1_5_fatal -void re1_5_fatal(char*); +void re1_5_fatal(const char*); #endif #ifndef re1_5_stack_chk #define re1_5_stack_chk() diff --git a/lib/libesp32/re1.5/util.c b/lib/libesp32/re1.5/util.c index 5b72b662a..9cab94131 100644 --- a/lib/libesp32/re1.5/util.c +++ b/lib/libesp32/re1.5/util.c @@ -4,10 +4,13 @@ #include "re1.5.h" +extern void berry_log_C(const char * berry_buf, ...); + void -re1_5_fatal(char *msg) +re1_5_fatal(const char *msg) { - fprintf(stderr, "fatal error: %s\n", msg); + berry_log_C("BRY: regex fatal error: %s", msg); + // fprintf(stderr, "fatal error: %s\n", msg); exit(2); }