Experimental Physics and Industrial Control System
Hi,
while playing with the most recent edm (edm-1-11-1r) on my Linux-box, I
discovered a naming-collision that may concern more than just me...
I was wondering, why edm suddenly complained about one of the
expressions in our $EDMFILES/calc.list and quickly tracked it down to
the expression-length - once it reached 100 chars, edm complained about
CALC:'escale': error in expression '...<our long expression>...'
I couldn't find any 100-chars limit in edm (especially calcPv/*), so I
put some printf-statements into postfix.c:postfix() - and never saw any
of them!
To make it short: in base/src/libCom/calc/postfix.c there is a function
postfix() with the very same signature (but maybe a slightly different
implementation).
And this one seems to hide the function defined in edm/calcPv.
We're using 3.14.8, where libCom/calc/postfix.c contains a '#define
MAX_POSTFIX_SIZE 100' - this is why I stumbled upon this.
3.14.9 does not have this MAX_POSTFIX_SIZE anymore, so I wouldn't even
have recognized the collision with 3.14.9.
If edm is to definitely use its own implementation of postfix(), we
should remove this naming-collision and make sure, there are no others...
I just renamed it to edm_postfix() in my build-tree and everything works
fine now.
The patch is trivial, but I attached it anyway...
Regards,
Thomas
diff -ur edm-1-11-1r-ORIG/calcPv/calc_pv_factory.cc edm-1-11-1r/calcPv/calc_pv_factory.cc
--- edm-1-11-1r-ORIG/calcPv/calc_pv_factory.cc 2008-02-27 21:52:27.000000000 +0100
+++ edm-1-11-1r/calcPv/calc_pv_factory.cc 2008-10-29 13:50:06.000000000 +0100
@@ -56,7 +56,7 @@
if ( rewriteString ) {
expStr.setRaw( rewriteString );
}
- if (postfix(formula, this->compiled, &error) != 0)
+ if (edm_postfix(formula, this->compiled, &error) != 0)
{
fprintf(stderr, "CALC '%s': error in expression '%s'\n",
name, formula);
diff -ur edm-1-11-1r-ORIG/calcPv/postfix.c edm-1-11-1r/calcPv/postfix.c
--- edm-1-11-1r-ORIG/calcPv/postfix.c 2008-02-27 21:52:32.000000000 +0100
+++ edm-1-11-1r/calcPv/postfix.c 2008-10-29 13:46:51.000000000 +0100
@@ -307,7 +307,7 @@
*
* convert an infix expression to a postfix expression
*/
-long postfix(char *pinfix,char *ppostfix, short *perror)
+long edm_postfix(char *pinfix,char *ppostfix, short *perror)
{
short no_bytes;
register short operand_needed;
diff -ur edm-1-11-1r-ORIG/calcPv/postfix.h edm-1-11-1r/calcPv/postfix.h
--- edm-1-11-1r-ORIG/calcPv/postfix.h 2008-02-27 21:52:32.000000000 +0100
+++ edm-1-11-1r/calcPv/postfix.h 2008-10-29 13:46:51.000000000 +0100
@@ -42,7 +42,7 @@
{
#endif
-long postfix (char *pinfix, char *ppostfix, short *perror);
+long edm_postfix (char *pinfix, char *ppostfix, short *perror);
long calcPerform(const double *parg, double *presult, const char *post);
- Navigate by Date:
- Prev:
Re: R3.14.10-RC2 Build Problem Janet Anderson
- Next:
Tornado-2.0.x cross compiler Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Problem with LabVIEW Shared Memory Interface to EPICS IOC Brand, Holger
- Next:
Tornado-2.0.x cross compiler Benjamin Franksen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024