Mercurial > libavcodec.hg
diff eval.c @ 2967:ef2149182f1c libavcodec
COSMETICS: Remove all trailing whitespace.
author | diego |
---|---|
date | Sat, 17 Dec 2005 18:14:38 +0000 |
parents | 86d14aebd527 |
children | 0b546eab515d |
line wrap: on
line diff
--- a/eval.c Sat Dec 17 11:31:56 2005 +0000 +++ b/eval.c Sat Dec 17 18:14:38 2005 +0000 @@ -75,7 +75,7 @@ p->s= next; return d; } - + /* named constants */ for(i=0; p->const_name && p->const_name[i]; i++){ if(strmatch(p->s, p->const_name[i])){ @@ -83,7 +83,7 @@ return p->const_value[i]; } } - + p->s= strchr(p->s, '('); if(p->s==NULL){ av_log(NULL, AV_LOG_ERROR, "Parser: missing ( in \"%s\"\n", next); @@ -100,7 +100,7 @@ return NAN; } p->s++; // ")" - + if( strmatch(next, "sinh" ) ) d= sinh(d); else if( strmatch(next, "cosh" ) ) d= cosh(d); else if( strmatch(next, "tanh" ) ) d= tanh(d); @@ -140,7 +140,7 @@ } return d; -} +} static double evalPow(Parser *p){ int sign= (*p->s == '+') - (*p->s == '-'); @@ -187,7 +187,7 @@ double (**func2)(void *, double, double), char **func2_name, void *opaque){ Parser p; - + p.stack_index=100; p.s= s; p.const_value= const_value; @@ -197,12 +197,12 @@ p.func2 = func2; p.func2_name = func2_name; p.opaque = opaque; - + return evalExpression(&p); } #ifdef TEST -#undef printf +#undef printf static double const_values[]={ M_PI, M_E, @@ -216,7 +216,7 @@ main(){ int i; printf("%f == 12.7\n", ff_eval("1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)", const_values, const_names, NULL, NULL, NULL, NULL, NULL)); - + for(i=0; i<1050; i++){ START_TIMER ff_eval("1+(5-2)^(3-1)+1/2+sin(PI)-max(-2.2,-3.1)", const_values, const_names, NULL, NULL, NULL, NULL, NULL);