New versions from Tim Mooney
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* 03-18-98 tmm Essentially rewritten to support string operators
|
||||
* 5/21/98 fixed ?: operator
|
||||
*/
|
||||
|
||||
/* This module contains the code for processing the arithmetic
|
||||
@@ -98,6 +99,7 @@ struct stackElement {
|
||||
char *s;
|
||||
};
|
||||
|
||||
#define OVERRIDESTDCALC 0
|
||||
#define DEBUG 0
|
||||
volatile int sCalcPerformDebug = 0;
|
||||
#if DEBUG
|
||||
@@ -244,7 +246,7 @@ static char *findConversionIndicator(char *s)
|
||||
return(retval);
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if OVERRIDESTDCALC
|
||||
/* Override standard EPICS expression evaluator (if we're loaded after it) */
|
||||
epicsShareFunc long epicsShareAPI
|
||||
calcPerform(double *parg, double *presult, char *post)
|
||||
@@ -405,7 +407,7 @@ epicsShareFunc long epicsShareAPI
|
||||
switch(post[1]) {
|
||||
case LITERAL: post+=8; break;
|
||||
case COND_IF: got_if++; break;
|
||||
case COND_ELSE: got_if--; break;
|
||||
case COND_END: got_if--; break;
|
||||
case FETCH: post++; break;
|
||||
}
|
||||
}
|
||||
@@ -806,7 +808,7 @@ printf(") \n");
|
||||
case LITERAL: post+=8; break;
|
||||
case SLITERAL: post++; while (post[1]) post++; break;
|
||||
case COND_IF: got_if++; break;
|
||||
case COND_ELSE: got_if--; break;
|
||||
case COND_END: got_if--; break;
|
||||
case FETCH: case SFETCH: post++; break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
#include "sCalcPostfixPvt.h"
|
||||
|
||||
|
||||
#define OVERRIDESTDCALC 0
|
||||
#define DEBUG 0
|
||||
volatile int sCalcPostfixDebug=0;
|
||||
|
||||
@@ -161,7 +162,8 @@ struct expression_element{
|
||||
* then try to find BS therefore ABS must be first in this list
|
||||
*/
|
||||
static struct expression_element elements[] = {
|
||||
/* element i_s_p i_c_p type_element internal_rep */
|
||||
/*
|
||||
element i_s_p i_c_p type_element internal_rep */
|
||||
"ABS", 7, 8, UNARY_OPERATOR, ABS_VAL, /* absolute value */
|
||||
"NOT", 7, 8, UNARY_OPERATOR, UNARY_NEG, /* unary negate */
|
||||
"-", 7, 8, MINUS_OPERATOR, UNARY_NEG, /* unary negate (or binary op) */
|
||||
@@ -341,7 +343,7 @@ register short *pno_bytes, *parg;
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if OVERRIDESTDCALC
|
||||
/* Override standard EPICS expression evaluator (if we're loaded after it). */
|
||||
long epicsShareAPI postfix(char *pinfix,char *ppostfix,short *perror)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
#ifndef INCpostfixh
|
||||
#define INCpostfixh
|
||||
|
||||
#include "shareLib.h"
|
||||
#define BAD_EXPRESSION 0
|
||||
#define END_STACK 127
|
||||
|
||||
long epicsShareAPI sCalcPostfix(char *pinfix, char **pp_postfix, short *perror);
|
||||
epicsShareFunc long epicsShareAPI
|
||||
|
||||
@@ -29,11 +29,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef INCpostfixh
|
||||
#include <sCalcPostfix.h>
|
||||
#endif
|
||||
#ifndef INCpostfixPvth
|
||||
#define INCpostfixPvth
|
||||
|
||||
/* #define BAD_EXPRESSION 0 */
|
||||
|
||||
/* defines for element table */
|
||||
#define BAD_EXPRESSION 0
|
||||
/* elements that define a value */
|
||||
#define FETCH 1
|
||||
#define SFETCH 2
|
||||
@@ -104,7 +108,7 @@
|
||||
#define SUBRANGE 63
|
||||
#define TO_STRING 64
|
||||
#define REPLACE 65
|
||||
#define END_STACK 127
|
||||
/* #define END_STACK 127 */
|
||||
|
||||
#define USES_STRING 126
|
||||
#define NO_STRING 125
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* 03-18-98 tmm Essentially rewritten to support string operators
|
||||
* 5/21/98 fixed ?: operator
|
||||
*/
|
||||
|
||||
/* This module contains the code for processing the arithmetic
|
||||
@@ -98,6 +99,7 @@ struct stackElement {
|
||||
char *s;
|
||||
};
|
||||
|
||||
#define OVERRIDESTDCALC 0
|
||||
#define DEBUG 0
|
||||
volatile int sCalcPerformDebug = 0;
|
||||
#if DEBUG
|
||||
@@ -244,7 +246,7 @@ static char *findConversionIndicator(char *s)
|
||||
return(retval);
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if OVERRIDESTDCALC
|
||||
/* Override standard EPICS expression evaluator (if we're loaded after it) */
|
||||
epicsShareFunc long epicsShareAPI
|
||||
calcPerform(double *parg, double *presult, char *post)
|
||||
@@ -405,7 +407,7 @@ epicsShareFunc long epicsShareAPI
|
||||
switch(post[1]) {
|
||||
case LITERAL: post+=8; break;
|
||||
case COND_IF: got_if++; break;
|
||||
case COND_ELSE: got_if--; break;
|
||||
case COND_END: got_if--; break;
|
||||
case FETCH: post++; break;
|
||||
}
|
||||
}
|
||||
@@ -806,7 +808,7 @@ printf(") \n");
|
||||
case LITERAL: post+=8; break;
|
||||
case SLITERAL: post++; while (post[1]) post++; break;
|
||||
case COND_IF: got_if++; break;
|
||||
case COND_ELSE: got_if--; break;
|
||||
case COND_END: got_if--; break;
|
||||
case FETCH: case SFETCH: post++; break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
#include "sCalcPostfixPvt.h"
|
||||
|
||||
|
||||
#define OVERRIDESTDCALC 0
|
||||
#define DEBUG 0
|
||||
volatile int sCalcPostfixDebug=0;
|
||||
|
||||
@@ -161,7 +162,8 @@ struct expression_element{
|
||||
* then try to find BS therefore ABS must be first in this list
|
||||
*/
|
||||
static struct expression_element elements[] = {
|
||||
/* element i_s_p i_c_p type_element internal_rep */
|
||||
/*
|
||||
element i_s_p i_c_p type_element internal_rep */
|
||||
"ABS", 7, 8, UNARY_OPERATOR, ABS_VAL, /* absolute value */
|
||||
"NOT", 7, 8, UNARY_OPERATOR, UNARY_NEG, /* unary negate */
|
||||
"-", 7, 8, MINUS_OPERATOR, UNARY_NEG, /* unary negate (or binary op) */
|
||||
@@ -341,7 +343,7 @@ register short *pno_bytes, *parg;
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
#if OVERRIDESTDCALC
|
||||
/* Override standard EPICS expression evaluator (if we're loaded after it). */
|
||||
long epicsShareAPI postfix(char *pinfix,char *ppostfix,short *perror)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
#ifndef INCpostfixh
|
||||
#define INCpostfixh
|
||||
|
||||
#include "shareLib.h"
|
||||
#define BAD_EXPRESSION 0
|
||||
#define END_STACK 127
|
||||
|
||||
long epicsShareAPI sCalcPostfix(char *pinfix, char **pp_postfix, short *perror);
|
||||
epicsShareFunc long epicsShareAPI
|
||||
|
||||
@@ -29,11 +29,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef INCpostfixh
|
||||
#include <sCalcPostfix.h>
|
||||
#endif
|
||||
#ifndef INCpostfixPvth
|
||||
#define INCpostfixPvth
|
||||
|
||||
/* #define BAD_EXPRESSION 0 */
|
||||
|
||||
/* defines for element table */
|
||||
#define BAD_EXPRESSION 0
|
||||
/* elements that define a value */
|
||||
#define FETCH 1
|
||||
#define SFETCH 2
|
||||
@@ -104,7 +108,7 @@
|
||||
#define SUBRANGE 63
|
||||
#define TO_STRING 64
|
||||
#define REPLACE 65
|
||||
#define END_STACK 127
|
||||
/* #define END_STACK 127 */
|
||||
|
||||
#define USES_STRING 126
|
||||
#define NO_STRING 125
|
||||
|
||||
Reference in New Issue
Block a user