From 1d1e3e95270bec21860c503afca2cc448bcf9d07 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Thu, 12 Nov 2020 10:54:11 +0100 Subject: [PATCH] calc backward compatibility: allow incomplete conditional --- modules/libcom/src/calc/postfix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/libcom/src/calc/postfix.c b/modules/libcom/src/calc/postfix.c index d96b1b5a6..d141e514b 100644 --- a/modules/libcom/src/calc/postfix.c +++ b/modules/libcom/src/calc/postfix.c @@ -216,6 +216,7 @@ LIBCOM_API long int cond_count = 0; char * const pdest = pout; char *pnext; + const char* psrc_orig = psrc; if (psrc == NULL || *psrc == '\0' || pout == NULL || perror == NULL) { @@ -470,8 +471,12 @@ LIBCOM_API long *pout = END_EXPRESSION; if (cond_count != 0) { + fprintf(stderr, "Deprecated CALC \"%s\": %s\n", + psrc_orig, calcErrorStr(CALC_ERR_CONDITIONAL)); +/* *perror = CALC_ERR_CONDITIONAL; goto bad; +*/ } if (operand_needed || runtime_depth != 1) { *perror = CALC_ERR_INCOMPLETE;