calc backward compatibility: allow incomplete conditional
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user