Commit graph

455 commits

Author SHA1 Message Date
Luigi Rizzo
e2e92e49a6 switch statement in one place
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:08:35 +00:00
Luigi Rizzo
7cc4511fa2 common syntax for context name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-03 16:00:49 +00:00
Luigi Rizzo
34dcc89e24 another instance of context name
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:50:18 +00:00
Luigi Rizzo
7a625b894d fix a bug previously introduced in the handling of timespec.
Fortunately we have regression tests!



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:44:56 +00:00
Luigi Rizzo
0cf25becb9 simplify case statements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:18:02 +00:00
Luigi Rizzo
05d2b78132 one more instance of assignment
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:13:58 +00:00
Luigi Rizzo
0e8e343e1f global_statement is really an assignment statement
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 20:11:24 +00:00
Luigi Rizzo
b222d1247f expressions used in if, while, switch are all of the same kind
(it remains to see why 'random' gives 16 shift/reduce conflicts...)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 19:17:49 +00:00
Luigi Rizzo
99dec41a4c macro statements can be empty
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:51:33 +00:00
Luigi Rizzo
65b8f8365e empty arglists are valid
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24257 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:48:47 +00:00
Luigi Rizzo
3173305448 rename the rule for context names properly
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:45:18 +00:00
Luigi Rizzo
9eaa57bebc simplify handling of 'include' lists
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:41:57 +00:00
Luigi Rizzo
827abbf46e ... and use a single rule for timespec
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:33:15 +00:00
Luigi Rizzo
7b10b81a58 use a single rule to parse timeranges hh:mm-hh:mm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24252 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:23:41 +00:00
Luigi Rizzo
5c940c74a6 if/ifTime/random statements are all the same thing
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 18:08:27 +00:00
Luigi Rizzo
16f94523ad includedname is just a regular word_or_default name,
no need for a separate nonterminal


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 17:58:57 +00:00
Luigi Rizzo
df3f8aa2b9 remove useless 'extern' declaration
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 17:37:33 +00:00
Luigi Rizzo
5cbf333fee remove some unneeded local variables.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24178 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:27:19 +00:00
Luigi Rizzo
f262d06975 more usage of nword(). I think the references to source
line/columns are also correct now.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:25:01 +00:00
Luigi Rizzo
d8e1ad052a more simplifications involving linku1
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:12:01 +00:00
Luigi Rizzo
182a536722 correct linku1() to handle the case tail = NULL correctly.
Now the function can be used to simplify other conditional blocks.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 14:08:18 +00:00
Russell Bryant
0765f065ca staticize the list heads from my recent conversions to list macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 04:40:09 +00:00
Russell Bryant
34e0ae0e6a The build of aelparse was still broken in some cases, so instead of having to
keep figuring out workarounds for build issues on various platforms, just go
ahead and remove what started all of this.  Two instances of ast_calloc have
been changed to calloc in pbx/ael/ael.y.

ast_copy_string isn't actually needed here because the only place it is used is
in ast_expr2f.c.  However, the utils Makefile already builds its own
ast_expr2f.o with -DSTANDALONE, which makes it use strncpy instead of
ast_copy_string.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 03:03:27 +00:00
Tilghman Lesher
9be0f34a3e Bug 7062 - Rename ael2 CLI commands to ael
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24075 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 22:07:18 +00:00
Russell Bryant
02eda146ac - convert permission lists to use list macros
- remove unused precachesend and precachereceive variables from dundi_peer

This concludes the visit to pbx_dundi ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 01:26:37 +00:00
Russell Bryant
5a60431c29 conver the lists of dundi packets to use the list macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:56:04 +00:00
Russell Bryant
7ce2726c09 - convert the dundi precache list to use the list macros
- change an instance of malloc+memset to ast_calloc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:33:24 +00:00
Luigi Rizzo
c305fb082d more simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:31:47 +00:00
Luigi Rizzo
01360f6440 always trim the trailing ';'
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:27:27 +00:00
Luigi Rizzo
33167fc41c comment usage of contexts
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:20:11 +00:00
Luigi Rizzo
2c2f7e817b fix dereferencing freed memory
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 00:02:12 +00:00
Luigi Rizzo
595955ea98 switch a couple of operands.
This gives slightly different results from the previous code
on syntax errors, but it actually makes fewer mistakes so
i think it is an improvement. Additionally, it makes the
code more uniform (the other call of reset_argcount
occurs after LP and not before).
 


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:53:22 +00:00
Luigi Rizzo
8faa2e7d44 put back some simplifications, this time really tested
(ael_lex.c manually deleted, runtest passed)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:31:43 +00:00
Luigi Rizzo
db14f6b107 revert ael.flex to the last correct version.
For some reason the makefile did not regenerate the
ael_lex.c file correctly so i was not testing the changes.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:21:49 +00:00
Luigi Rizzo
44f43f9eb1 another small set of simplifications
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:04:58 +00:00
Russell Bryant
b992d92742 - convert the lists of dundi_transactions to the list macros
- remove an unused variable, keypending, from the dundi_peer struct


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 23:01:50 +00:00
Luigi Rizzo
c22ef69d1f simplify logic (runtest passed).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23758 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 22:56:41 +00:00
Luigi Rizzo
85480376f7 more nword() usages, and mark some dubious places.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23669 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 14:06:04 +00:00
Luigi Rizzo
f239ec2080 introduce a new frontend to npval for the very common case
of creating an object for a tring value PV_WORD.
Start using it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 13:57:08 +00:00
Luigi Rizzo
5e746bf38f another client for switchlist_block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:46:15 +00:00
Luigi Rizzo
813f565de7 more merge of common blocks through intermediate rules.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:44:54 +00:00
Luigi Rizzo
f4b05f86cc make destroy_pval able to handle a NULL value
(the warning should be removed);
define a 'elements_block' rule to simplify some other rules
removing duplicated code - runtests seems happy with this.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:30:08 +00:00
Luigi Rizzo
ce05a548c3 remove some commented-out code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:14:33 +00:00
Luigi Rizzo
36a26a9197 simplify updating the token position markers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23611 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 12:12:39 +00:00
Kevin P. Fleming
7343d311f1 simplify CFLAGS handling for subdirectories
don't put paths into the include search path when they are not needed
don't auto-rebuild the AEL bison/flex output based on make dependencies (the generated files are already checked in, and the timestamps generated by a checkout will usually cause them to be overwritten)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 11:40:06 +00:00
Luigi Rizzo
c5f779d0a0 more comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 09:24:04 +00:00
Luigi Rizzo
9a8a037250 comment some code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 09:06:28 +00:00
Luigi Rizzo
6eb6343d9a more simplifications in the bison sources,
more annotation with XXX of dubious code.
(The code still passes tests)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 08:21:46 +00:00
Russell Bryant
31cd56f76e remove unneeded define - it is already in asterisk.h
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23494 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:27:57 +00:00
Russell Bryant
03d005e472 convert the dundi_request list to use the list macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:24:10 +00:00
Russell Bryant
dbbe944da8 convert existing comments to doxygen format
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:15:53 +00:00
Russell Bryant
149e45924a fix indentation for this function
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:09:34 +00:00
Russell Bryant
fcb2809e45 immediately handle ast_strdupa result so that one more level of indentation
can be removed from this function


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23490 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:07:52 +00:00
Russell Bryant
ef775bbd66 fix the indentation of a large block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:06:14 +00:00
Russell Bryant
ed320702d9 handle a memory allocation failure immediately so the following large block
does not have to be indented


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 05:02:07 +00:00
Russell Bryant
4cfcacf6c9 - convert the list of dundi mappings to use the list macros
- change an instance of malloc+memset to use ast_calloc, instead


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:59:36 +00:00
Russell Bryant
d9fa5f3c89 change a list traversal to use a for loop
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:28:47 +00:00
Russell Bryant
c7fea723a3 fix the indentation of a large block of code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:26:11 +00:00
Russell Bryant
059f0bd108 immediately handle a memory allocation failure so the rest of the function
doesn't have to be indented (indentation still to be fixed)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:23:09 +00:00
Russell Bryant
d66de679d9 - convert some comments to doxygen format
- convert the list of dundi peers to use the list macros
- convert a use of malloc+memset to use ast_calloc


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-30 04:20:20 +00:00
Russell Bryant
8682a7378d add a small optimization for deleting all the members of a list
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 04:13:07 +00:00
Luigi Rizzo
c7a892d5f9 make the 'runtest' filter less strict on line numbers.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:51:31 +00:00
Luigi Rizzo
d30ead1474 simplify handling of line numbers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:42:13 +00:00
Luigi Rizzo
dad2812867 fix last known bug in computing columb numbers in error messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:33:05 +00:00
Luigi Rizzo
c1366df3d5 fix a bug in computing line numbers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 15:24:30 +00:00
Luigi Rizzo
799126216e - fix miscalculation in column numbers when multiple tabs
or empty lines are involved;
- change linku1() to return the head of the list (unused at the moment);
- ignore the source line number in runtests as they change with the
  source and cause mismatches in the comparison with the reference output.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 14:17:03 +00:00
Luigi Rizzo
43bfe82828 last batch of npval -> npval2 changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23109 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 11:20:21 +00:00
Luigi Rizzo
5291b89f30 more npval -> npval2 changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 10:06:10 +00:00
Luigi Rizzo
c9816d135d more npval -> npval2 conversions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-28 06:26:27 +00:00
Luigi Rizzo
304fbbd1b6 fix destructor for pval objects (thanks to Steve Murphy);
rearrange initial part of ael.flex for flexibility.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 21:09:52 +00:00
Luigi Rizzo
85ea0974f8 always call the destructor
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 20:23:49 +00:00
Luigi Rizzo
456e27b453 document variable and options used.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 20:08:42 +00:00
Luigi Rizzo
810e701b1e document options, move objects of the same type close to
each other so it is evident what they are.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:51:59 +00:00
Luigi Rizzo
9033ecfaa2 slightly restructure a block to reduce nesting,
mark some missing error checks



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:29:14 +00:00
Luigi Rizzo
f0d3175793 imore npval -> npval2 conversions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 19:14:07 +00:00
Luigi Rizzo
cbbcc2047c more npval2 replacement, mark XXX dubious arguments
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:26:37 +00:00
Luigi Rizzo
5c34366afc more npval -> npval2 replacement, and a fix for a likely
bug (marked XXX)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:18:12 +00:00
Luigi Rizzo
dadafb65cf introduce a simplified interface for npval and start using it
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 18:09:20 +00:00
Luigi Rizzo
54616839d7 formatting fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:59:09 +00:00
Luigi Rizzo
776a3da1a7 use ast_calloc for memory allocations
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:43:49 +00:00
Luigi Rizzo
73ea5316b5 fix a couple of bugs in arguments to npval
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:39:55 +00:00
Luigi Rizzo
b37af2f16c remove some commented-out code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:16:41 +00:00
Luigi Rizzo
a5fdd0d6b0 finish packing yylloc into macros
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:10:15 +00:00
Luigi Rizzo
e51725d6d4 add some comments to the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 17:00:09 +00:00
Luigi Rizzo
7422c5495b more formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 16:40:25 +00:00
Luigi Rizzo
5591294c5e more dup removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 11:43:34 +00:00
Luigi Rizzo
98d769c7c0 more duplicate removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 11:34:44 +00:00
Luigi Rizzo
ef8f9a28a3 remove duplicated code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 11:20:26 +00:00
Luigi Rizzo
53715e59cf staticize c_prevword()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 10:13:39 +00:00
Luigi Rizzo
073391cc63 more indentation fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 08:37:40 +00:00
Luigi Rizzo
20314914e8 use asprintf instead of malloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22797 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 08:31:18 +00:00
Luigi Rizzo
f7e55f9a47 more formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22796 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 08:24:00 +00:00
Luigi Rizzo
c740982bef more indentation fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 06:44:38 +00:00
Luigi Rizzo
6c8c83c106 more formatting cleanup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 02:29:32 +00:00
Luigi Rizzo
c081c8bdf7 cleanup formatting to emphsize common code blocks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22730 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 02:00:35 +00:00
Luigi Rizzo
a8995c0bfd move similar blocks close to each other to make similarities
more evident



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 01:35:52 +00:00
Luigi Rizzo
e7d6df39d0 normalize and simplify the code for keeping track of line and column number.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 01:27:07 +00:00
Luigi Rizzo
2d33128385 define some flex constants for character sets.
partly fix indentation and normalize code layout.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 01:07:24 +00:00
Luigi Rizzo
d19f767c3c uncomment some functions in the flex code that were actually
used in the bison code - detected by making aelparse compile
again.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22702 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-27 00:05:05 +00:00
Luigi Rizzo
a857016551 use \t to indicate a tab, and fix indentation for
the whitespace-handling rules



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 23:36:05 +00:00
Luigi Rizzo
f52022fc6f remove common blocks of code with a macro (waiting for a better
solution).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 23:18:03 +00:00
Luigi Rizzo
df5635d844 staticize some variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22678 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 23:08:47 +00:00
Luigi Rizzo
e141352fd9 comment behaviour of pbcwhere in preparation for its use
in more places.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 22:56:18 +00:00
Luigi Rizzo
aaf99191c8 include/asterisk/ael_structs.h:
- protect against multiple includes of ael_structs.h
  - remove prototypes for unused or undeclared functions

pbx/ael/ael.y
  - staticize functions as appropriate
  - constify arguments
  - remove useless extern

pbx/ael/ael.flex
  - ifdef out unused functions

pbx/pbx_ael.c
  - constify some variables and arguments
  - ifdef out unused functions
  - staticize functions as appropriate

update generated files accordingly 



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 22:41:16 +00:00
Luigi Rizzo
55a24ef8cc whitespace-only change:
partly fix indentation/formatting of the bison source,
and of the generated file



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 18:43:29 +00:00
Luigi Rizzo
2de9dcb345 whitespace-only change:
fix formatting and indentation of the flex file,
and regenerate the ael_lex.c



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-26 18:40:09 +00:00
Kevin P. Fleming
dcccc2ed71 don't rely on default search paths for finding local include files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 18:29:02 +00:00
Luigi Rizzo
36807ad092 wrong path in include file.
Maybe it compiled on some platform because of extra -I
statements in the Makefiles.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 17:08:41 +00:00
Luigi Rizzo
d85048d692 fix variable declaration in the middle of a block
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-25 17:06:37 +00:00
Kevin P. Fleming
5f58cc8770 Merge Steve Murphy's (murf) complete re-implementation of AEL, which is now no longer considered experimental :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:41:27 +00:00
Kevin P. Fleming
574e14cbea Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:11:45 +00:00
Luigi Rizzo
e43bc6634d This rather large commit changes the way modules are loaded.
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: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 14:08:19 +00:00
Kevin P. Fleming
f515078c53 Merged revisions 19345 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r19345 | kpfleming | 2006-04-11 16:14:42 -0500 (Tue, 11 Apr 2006) | 2 lines

don't destroy the entire dialplan during 'reload', just atomically replace it like 'extensions reload' does (issue #6047)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 21:18:27 +00:00
Kevin P. Fleming
f10f427d49 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18552 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:01:19 +00:00
Luigi Rizzo
08dfc15553 whitespace and formatting fix postponed from last commit:
fix indentation of a large function, localize some variables
and add/remove whitespace where needed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17827 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 14:40:47 +00:00
Luigi Rizzo
25a61b9e08 split pbx_load_module so we can reduce the indentation depth.
Also convert to MOD_1 style.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17825 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 14:23:37 +00:00
Luigi Rizzo
38f14cbca7 use FREE instead of free as pointer to the destructor function.
This way the MALLOC_DEBUG code will always get the correct argument.

(bug introduced in SVN15818)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 14:02:19 +00:00
Tilghman Lesher
756c7cbb12 Bug 6873 - Finish moving from the non-threadsafe (and poor randomness) rand() to threadsafe ast_random()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17627 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 17:44:44 +00:00
Luigi Rizzo
94b886650c fix formatting
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 09:53:05 +00:00
Luigi Rizzo
ad47951739 minor code simplifications - no need to use temporary
variables.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16639 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 09:50:54 +00:00
Luigi Rizzo
6c232811c0 as discussed with Mark a few weeks ago, the 'newstack' argument
in pbx_exec is always 1 so it can be removed.

This change also takes away ast_exec_extension(), and lets all
switch functions (exists, canmatch, exec, matchmore) all use the same
prototype, which makes the code a bit cleaner.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:29:39 +00:00
Olle Johansson
16728da6a7 Whitespace fix forgotten by someone who added a note about needing to fix this...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 20:08:14 +00:00
Luigi Rizzo
4ca73f8ae4 as reported in mantis #6066, fix a bunch of cli bugs and
inconsistencies.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:44:55 +00:00
Russell Bryant
7298d3feb3 Merged revisions 15658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15658 | russell | 2006-03-28 13:09:05 -0500 (Tue, 28 Mar 2006) | 2 lines

fix the order in which for loops are expanded (issue #6810)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 18:13:53 +00:00
Luigi Rizzo
d0bc6c20a7 - remove an unnecessary cast and recomputation of (timeout - now);
- remove useless recomputations of strlen(word) in a loop, and
  normalize the form of complete_peer_helper();
- move LOCAL_USER_ADD() to after the verification of arguments,
  thus removing the need for one LOCAL_USER_REMOVE() call.

The three chunks of the patch are fully disjoint.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 15:19:32 +00:00
Olle Johansson
acfc219733 Reverting revision 10998 that was accidentaly committed to trunk. My apologies.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-24 10:50:43 +00:00
Olle Johansson
dd5222fd30 Update to trunk
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-24 10:17:40 +00:00
Kevin P. Fleming
302c943001 add 'consumed' argument to ast_get_time_t, so callers can know how many characters were used in the parser
update pbx_dundi to use ast_get_time_t
eliminate some compiler warnings


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 17:13:57 +00:00
Mark Spencer
c3447c7cce Fix a few compile warnings (turned errors) and disable -Werror on the
normal build.  If people want this they can turn it on, and don't anyone 
turn it on by default until you fix building on GCC 4.x


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-23 04:38:38 +00:00
Russell Bryant
a0d438fb6c remove the uses of the deprecated STANDARD_LOCAL_USER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 20:11:56 +00:00
Russell Bryant
2f2530b8e6 remove LOCAL_USER_ACF_ADD since it is now the same as LOCAL_USER_ADD
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9800 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-13 20:12:50 +00:00
Kevin P. Fleming
e7c198453d ensure that dependencies are rebuilt after 'make update' so that builds don't break when files are removed/renamed
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 16:52:42 +00:00
Kevin P. Fleming
96bf384e7d major dialplan functions update
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL()


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12 04:28:58 +00:00
Russell Bryant
452f87a465 Merged revisions 9609 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9609 | russell | 2006-02-11 14:23:20 -0500 (Sat, 11 Feb 2006) | 2 lines

fix memory leak from not destroying the scheduler context on module unload

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 19:31:11 +00:00
Russell Bryant
95151cead2 Merged revisions 9581 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r9581 | russell | 2006-02-11 13:15:00 -0500 (Sat, 11 Feb 2006) | 2 lines

now that CDR is a loadable module, don't depend on it elsewhere (issue #6460)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 18:31:59 +00:00
Kevin P. Fleming
407d3c289c use auto-build for pbx modules
correct install variable for format modules


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-11 17:48:44 +00:00
Matt O'Gorman
7d03c33e0a Allows for user to uninstall asterisk binaries
bug 6177


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-01 18:39:41 +00:00
Russell Bryant
6f71e1178e constify arguments in more places where strings should not be modified (issue #6286)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-18 22:17:31 +00:00
Kevin P. Fleming
065a368463 remove some more deprecated (pre-1.2) stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-17 23:45:05 +00:00
Russell Bryant
4a7cec937d remove redundant CFLAGS for BSD which are already set in the main Makefile (issue #6250)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-16 17:51:35 +00:00
Tilghman Lesher
335cd7d3a2 Merged revisions 7908 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7909 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-09 20:12:07 +00:00
Tilghman Lesher
32f05bfa95 Merged revisions 7848 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-07 07:31:08 +00:00
Tilghman Lesher
a84633ba26 Merged revisions 7831 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-01-06 00:36:12 +00:00
Russell Bryant
ef1ce7aec9 Merged revisions 7634 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r7634 | russell | 2005-12-26 13:19:12 -0500 (Mon, 26 Dec 2005) | 2 lines

cast time_t to an int in printf/scanf (issue #5635)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-26 18:35:28 +00:00
Tilghman Lesher
84d98f6b84 Merged revisions 7577 via svnmerge from
/branches/1.2


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-21 19:24:56 +00:00
Russell Bryant
ec05153ac4 convert most of the option_*'s to a single ast_flags structure. Also, fix some
formatting, remove some unnecessary casts, and other little code cleanups.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-04 20:40:46 +00:00
Kevin P. Fleming
2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Kevin P. Fleming
c14588af86 remove remaining .cvsignore files
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7220 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:09:49 +00:00
Josh Roberson
c203681525 Make conform to coding guidelines... thanks drumkilla :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7145 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 10:32:28 +00:00
Josh Roberson
39407c4366 issue #5806
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-20 06:59:42 +00:00