From b20e2a9d34ce6f062b502631507286e2227e97eb Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sun, 1 Dec 2013 10:30:24 -0500 Subject: [PATCH] User supplied math constants take precedence --- ftepp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ftepp.c b/ftepp.c index fc6732e..82495b4 100644 --- a/ftepp.c +++ b/ftepp.c @@ -539,9 +539,11 @@ static bool ftepp_define(ftepp_t *ftepp) macro = ftepp_macro_find(ftepp, ftepp_tokval(ftepp)); - /* ignore creating a math macro if one is already present */ - if (macro && mathconstant) - break; + /* user defined ones take precedence */ + if (macro && mathconstant) { + ftepp_macro_delete(ftepp, ftepp_tokval(ftepp)); + macro = NULL; + } if (macro && ftepp->output_on) { if (ftepp_warn(ftepp, WARN_CPP, "redefining `%s`", ftepp_tokval(ftepp))) -- 2.39.2