summaryrefslogtreecommitdiff
path: root/main/ast_expr2.h
AgeCommit message (Collapse)Author
2012-07-11Allow the REALTIME() function to report errors back to the caller.Tilghman Lesher
Also, do more error checking on the arguments specified to the REALTIME() function and clarify the documentation. While I was editing the file, a few coding guidelines fixups, as well. Review: https://reviewboard.asterisk.org/r/2031/ ........ Merged revisions 369937 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369938 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-24Multiple revisions 360356-360357Russell Bryant
........ r360356 | russell | 2012-03-23 22:33:36 -0400 (Fri, 23 Mar 2012) | 6 lines expression parser: Fix (theoretical) memory leak. Fix a memory leak that is very unlikely to actually happen. If a malloc() succeeded, but the following strdup() failed, the memory from the original malloc() would be leaked. ........ r360357 | russell | 2012-03-23 22:34:39 -0400 (Fri, 23 Mar 2012) | 6 lines Rebuild parsers. This is needed to include the last fix to main/ast_expr2.y. The changes look much bigger as this regeneration of the code was done with newer versions of flex and bison. ........ Merged revisions 360356-360357 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 360358 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-10-28Merged revisions 293197 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r293197 | tilghman | 2010-10-28 15:00:06 -0500 (Thu, 28 Oct 2010) | 33 lines Merged revisions 293195-293196 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r293195 | tilghman | 2010-10-28 14:52:52 -0500 (Thu, 28 Oct 2010) | 12 lines Merged revisions 293194 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r293194 | tilghman | 2010-10-28 14:44:37 -0500 (Thu, 28 Oct 2010) | 5 lines "!00" evaluated as false, which is incorrect. Fixing. Reported (though the reporter did not understand he was reporting a bug) on the asterisk-users list: http://lists.digium.com/pipermail/asterisk-users/2010-October/255505.html ........ ................ r293196 | tilghman | 2010-10-28 14:54:34 -0500 (Thu, 28 Oct 2010) | 12 lines Merged revisions 293194 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r293194 | tilghman | 2010-10-28 14:44:37 -0500 (Thu, 28 Oct 2010) | 5 lines "!00" evaluated as false, which is incorrect. Fixing. Reported (though the reporter did not understand he was reporting a bug) on the asterisk-users list: http://lists.digium.com/pipermail/asterisk-users/2010-October/255505.html ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@293198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03Merged revisions 179807 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 I had some work to do to port these changes to trunk; the check_expr stuff hasn't been updated here for quite some time, it appears. I added some more tests to the check_expr2 suite. I had to play around with the makefile a bit, etc. I added STANDALONE2 #ifdefs to ast_expr2.y so as not to conflict structure with aelparse. ........ r179807 | murf | 2009-03-03 11:11:34 -0700 (Tue, 03 Mar 2009) | 19 lines These changes allow AEL to better check ${} constructs within $[...], that are concatenated with text. I modified and added rules in ast_expr2.fl to better handle the concatenations. I added some default routines to ast_expr2.y so the standalone would compile. It also looks like I haven't run this thru bison since 2.1, so it's good to get this updated. The Makefile has comments added now for check_expr2 and check_expr to explain what they are for, and how to run them. The testexpr2s stuff has been removed, in favor of check_expr2. expr2.testinput has been updated to include the two expressions that inspired these changes (from mcnobody on #asterisk this morning) The regression has been run and all looks well. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15This patch allows null args in ast_expr2 func calls, and fixes commas being ↵Steve Murphy
converted to pipes, which was 1.4 type stuff. If the user says count=ENUMLOOKUP(${EXTEN},ALL,c,,enum.mydomain.tld); then it won't complain about the empty arg (c,,...) and fabled's patch won't let it swap the commas for pipes. Ran it thru my dialplan and no complaints. (closes issue #14169) Reported by: fabled Patches: function-argument-separator-fix.diff uploaded by fabled (license 448) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@168737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31That was weird...Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31Merged revisions 166953 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r166953 | tilghman | 2008-12-31 13:20:35 -0600 (Wed, 31 Dec 2008) | 5 lines Also inherit the musiconhold class. (Closes #14153) Reported by: Jerry Geis, via the users list. Patch by: me (license 14) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@166954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-21(closes issue #12467)Steve Murphy
Reported by: atis Tested by: murf This upgrade adds the ~~ (concatenation) string operator to expr2. While not needed in normal runtime pbx operation, it is needed when raw exprs are being syntax checked. This plays into future syntax- unification plans. By permission of atis, this addition in trunk and the reason of why things are as they are will suffice to close this bug. I also added a short note about the previous addition of "sip show sched" to the CLI in CHANGES, which I discovered I forgot in a previous commit. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16Terry found this problem with running the expr2 parser on OSX. Make the ↵Steve Murphy
#defines come out the same between the parser & lexer. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-17Simplify some preprocessor logic by using #elifTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22Fixes for FreeBSD... testing for every conceivable math function nowTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83517 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21Check for the presence of trunc and round, and make the ISOC99 detection a ↵Tilghman Lesher
little more sane (closes issue #10776) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83431 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-08Restore EXP2 and LOG2 functions, by providing mathematical identify ↵Tilghman Lesher
functions, when the underlying C functions are not available. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05In regards to changes for 9508, expr2 system choking on floating point ↵Steve Murphy
numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-02Merged revisions 72933 via svnmerge from Steve Murphy
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r72933 | murf | 2007-07-02 14:16:31 -0600 (Mon, 02 Jul 2007) | 1 line support for floating point numbers added to ast_expr2 $\[...\] exprs. Fixes bug 9508, where the expr code fails with fp numbers. The MATH function returns fp numbers by default, so this fix is considered necessary. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3