aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_math.c
AgeCommit message (Collapse)AuthorFilesLines
2011-07-14Merged revisions 328247 via svnmerge from lmadsen1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@328259 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-09Kill some startup warnings and errors and make some messages more helpful in ↵tilghman1-1/+1
tracking down the source. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275105 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-09Various updates to the unit test API.russell1-4/+5
1) It occurred to me that the difference in usage between the error ast_str and the ast_test_update_status() usage has turned out to be a bit ambiguous in practice. In a lot of cases, the same message was being sent to both. In other cases, it was only sent to one or the other. My opinion now is that in every case, I think it makes sense to do both; we should output it to the CLI as well as save it off for logging purposes. This change results in most of the changes in this diff, since it required changes to all existing unit tests. It also allowed for some simplifications of unit test API implementation code. 2) Update ast_test_status_update() to include the file, function, and line number for the code providing the update. 3) There are some formatting tweaks here and there. Hopefully they aren't too distracting for code review purposes. Reviewboard's diff viewer seems to do a pretty good job of pointing out when something is a whitespace change. 4) I moved the md5_test and sha1_test into the test_utils module. It seemed like a better approach since these tests are so tiny. 5) I changed the number of nodes used in heap_test_2 from 1 million to 100 thousand. The only reason for this was to reduce the time it took for this test to run. 6) Remove an unused function prototype that was at the bottom of utils.h. 7) Simplify test_insert() using the LIST_INSERT_SORTALPHA() macro. The one minor difference in behavior is that it no longer checks for a test registered with the same name. 8) Expand the code in test_alloc() to provide specific error messages for each failure case, to clearly inform developers if they forget to set the name, summary, description, etc. 9) Tweak the output of the "test show registered" CLI command. I swapped the name and category to have the category first. It seemed more natural since that is the sort key. 10) Don't output the status ast_str in the "test show results" CLI command. This is going to tend to be pretty verbose, so just leave that for the detailed test logs (test generate results). Review: https://reviewboard.asterisk.org/r/493/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@245864 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-02Correct some off-by-one errors, especially when expressions don't contain ↵tilghman1-9/+61
expected spaces. Also include the tests provided by the reporter, as regression tests. (closes issue #16667) Reported by: wdoekes Patches: astsvn-func_match-off-by-one.diff uploaded by wdoekes (license 717) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@244331 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-21Merged revisions 241765 via svnmerge from tilghman1-1/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r241765 | tilghman | 2010-01-20 23:53:17 -0600 (Wed, 20 Jan 2010) | 2 lines Guard against division by zero. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@241766 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@211539 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-30Fixes numerous spelling errors. Patch submitted by alecdavis.dbrooks1-1/+1
(closes issue #15595) Reported by: alecdavis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@209554 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-01Add INCrement and DECrement functionstilghman1-3/+127
(closes issue #15025) Reported by: greenfieldtech Patches: func_math.c.patch_v4 uploaded by greenfieldtech (license 369) slightly modified by me Tested by: greenfieldtech, lmadsen git-svn-id: http://svn.digium.com/svn/asterisk/trunk@198725 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02Fix various spelling and grammatical issues in documentationrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153468 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01Merge changes from team/group/appdocsxmlrussell1-11/+29
This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Merged revisions 146799 via svnmerge from tilghman1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines Dialplan functions should not actually return 0, unless they have modified the workspace. To signal an error (and no change to the workspace), -1 should be returned instead. (closes issue #13340) Reported by: kryptolus Patches: 20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146802 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-4/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-28Added AND, OR, and XOR bitwise operations to MATH for issue 9891, thanks jcmooredhubbard1-1/+37
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72524 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-04Merged revisions 67162 via svnmerge from tilghman1-5/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r67162 | tilghman | 2007-06-04 18:43:01 -0500 (Mon, 04 Jun 2007) | 10 lines Merged revisions 67161 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r67161 | tilghman | 2007-06-04 18:41:49 -0500 (Mon, 04 Jun 2007) | 2 lines According to MATH, 0+1181000386 = 1181000448. Oops. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67164 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Merged revisions 65866 via svnmerge from dhubbard1-7/+16
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r65866 | dhubbard | 2007-05-24 10:08:56 -0500 (Thu, 24 May 2007) | 1 line merged qwell's func_math patch for issue 9507 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65906 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-24Doxygen updateoej1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51920 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-06finish const-ifying ast_func_read()kpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49741 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-02Tweak description text to match new functionality (Issue 7959)tilghman1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49187 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-31Add power and right/left shift functions (Issue 7959)tilghman1-0/+32
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49076 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-25Merged revisions 48956 via svnmerge from russell1-1/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r48956 | russell | 2006-12-25 00:21:20 -0500 (Mon, 25 Dec 2006) | 14 lines Merged revisions 48955 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r48955 | russell | 2006-12-25 00:19:48 -0500 (Mon, 25 Dec 2006) | 6 lines Fix an error introduced by copying and pasting the handling of the >= operator for the MATH function. If a single equal sign was used as an operator, the function would treat it is as if it were the >= operator. Now, it properly handles it as an invalid operator. (issue #8665, patch by tempest1) ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48957 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-16/+3
- 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: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-9/+7
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-2/+2
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-12major dialplan functions updatekpfleming1-108/+102
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9674 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-11build function modules independently (no more pbx_functions.so)kpfleming1-8/+32
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9469 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21on this pass, only remove duplicate log messagesrussell1-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8403 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21revert my pass through the tree to remove checks of the result of ast_strduparussell1-0/+4
(revisions 8378 through 8381) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8387 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21remove useless checks of the result of ast_strduparussell1-4/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8380 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-106186 amd 6187 with minor revisions. added argmogorman1-10/+17
parsing from macro. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7945 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-30update doxygen docs to specify authorsrussell1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7682 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08make app_queue 1.2 jump compliant (issue #5580)russell1-0/+1
add missing includes of stdio.h remove some unused and duplicate headers git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7026 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08issue #5648kpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7011 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-03major update to arg/option parsing APIs and documentationkpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6953 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24Doxygen documentation update from oej (issue #5505)russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)kpfleming1-3/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6596 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-09add MATH() dialplan function (bug #4473, with mods)kpfleming1-0/+237
deprecate the Math() application git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5895 f38db490-d61c-443f-a65b-d21fe96a405b