diff options
author | Wen Heping <wen@FreeBSD.org> | 2016-03-06 10:53:58 +0000 |
---|---|---|
committer | Wen Heping <wen@FreeBSD.org> | 2016-03-06 10:53:58 +0000 |
commit | a6848ff6a376e87f7e4ea0326bfabf82a5f480f3 (patch) | |
tree | 55ca93b5c9a316fe6d9ca2d19868ebaa690c7e63 /math/fityk/files/patch-fityk__eparser.cpp | |
parent | Update to 1.7 (diff) |
- Update to 1.3.0
PR: 205894
Submitted by: tkato432@yahoo.com
Diffstat (limited to 'math/fityk/files/patch-fityk__eparser.cpp')
-rw-r--r-- | math/fityk/files/patch-fityk__eparser.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/math/fityk/files/patch-fityk__eparser.cpp b/math/fityk/files/patch-fityk__eparser.cpp new file mode 100644 index 000000000000..6a07e37aed83 --- /dev/null +++ b/math/fityk/files/patch-fityk__eparser.cpp @@ -0,0 +1,29 @@ +--- fityk/eparser.cpp.orig 2015-05-25 17:42:29 UTC ++++ fityk/eparser.cpp +@@ -154,7 +154,7 @@ int get_function_narg(int op) + } + } + +-bool is_function(int op) ++bool my_is_funcion(int op) + { + return get_function_narg(op) != 0; + } +@@ -878,7 +878,7 @@ void ExpressionParser::parse_expr(Lexer& + // check if this is closing bracket of func() + if (!opstack_.empty()) { + int top = opstack_.back(); +- if (is_function(top)) { ++ if (my_is_funcion(top)) { + pop_onto_que(); + int n = opstack_.back() + 1; + opstack_.pop_back(); +@@ -911,7 +911,7 @@ void ExpressionParser::parse_expr(Lexer& + lex.throw_syntax_error("unexpected ',' after '?'"); + // if we are here, opstack_.back() == OP_OPEN_ROUND + else if (opstack_.size() < 3 || +- !is_function(*(opstack_.end() - 2))) ++ !my_is_funcion(*(opstack_.end() - 2))) + lex.throw_syntax_error("',' outside of function"); + else + // don't pop OP_OPEN_ROUND from the stack |