asterisk/include/asterisk
Luigi Rizzo b7adaa023c add some macros to simplify parsing the config file,
see description in config.h .

They are a variant of the set of macros i used in chan_oss.c,
structured in a way to be more robust to the presence of
spurious ';' - basically, they define wrappers for 'do {'
and '} while (0)', plus some helper functions to deal with simple
cases such as ast_copy_string, ast_malloc, strtoul, ast_true ...

The prefix (CV_ as 'Config Variable') tries to be easy to remember
and has been chosen to not conflict with other existing macros in the tree.

For the time being, I have only updated the three source files in the
tree that used the old M_* macros. Hopefully, more files will be
converted.

NOTE:

    I understand that inventing my own dialect of C is generally wrong;
    however, the lack of adequate support in the language encourages
    lazy programming practices (such as ignoring errors, bounds, etc.)
    and this increases the chance of vulnerability in the code, especially
    because we are parsing user input here.
    Hopefully, these macros and the use of ast_parse_arg (in config.h)
    should encourage the programmer to write more robust code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 12:56:07 +00:00
..
_private.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
abstract_jb.h move the declaration of struct ast_channel ast_frame and ast_module 2007-11-19 19:36:32 +00:00
acl.h start using asterisk/network.h for network related headers. 2007-11-17 14:11:53 +00:00
adsi.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
ael_structs.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
aes.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
aes_internal.h use the OpenSSL AES implementation if it's available (unless configured not to) 2007-05-24 22:07:50 +00:00
agi.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
alaw.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
app.h Move usage of the old LOCAL_USER_* macros to the new ast_module_user_* functions in a few documentation places. 2007-12-13 20:23:48 +00:00
ast_expr.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
astdb.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
astmm.h Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
astobj.h remove redundant #include "asterisk/compat.h", 2007-11-16 21:08:28 +00:00
astobj2.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
astosp.h 1. Re-format the code. 2006-11-15 20:55:17 +00:00
audiohook.h Adding support for the "automixmonitor" dial and queue options. 2007-11-30 21:19:57 +00:00
autoconfig.h.in Merged revisions 94077 via svnmerge from 2007-12-19 22:51:03 +00:00
callerid.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
causes.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
cdr.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
channel.h Merged revisions 90735 via svnmerge from 2007-12-04 17:08:36 +00:00
chanvars.h Bug 5858 - Make the chanvars.c functions return a 'const char *' 2005-12-03 19:25:33 +00:00
cli.h Remove "old"-style CLI handler, since nothing uses it anymore. 2007-11-28 20:27:40 +00:00
compat.h Merged revisions 90753 via svnmerge from 2007-12-03 23:52:23 +00:00
compiler.h Merged revisions 43861-43862 via svnmerge from 2006-09-28 13:02:30 +00:00
config.h add some macros to simplify parsing the config file, 2007-12-20 12:56:07 +00:00
crypto.h Merge a bunch of doxygen updates to header files. This includes changes to 2007-07-16 02:51:56 +00:00
devicestate.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
dial.h Add support for call forwarding and timeouts to the dialing API. 2007-07-30 20:42:28 +00:00
dlfcn-compat.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
dns.h merge new_loader_completion branch, including (at least): 2006-08-21 02:11:39 +00:00
dnsmgr.h start using asterisk/network.h for network related headers. 2007-11-17 14:11:53 +00:00
doxyref.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
dsp.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
dundi.h After some study, thought, comparing, etc. I've backed out the previous universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort. 2007-07-19 23:24:27 +00:00
endian.h provide definitions for __LITTLE_ENDIAN and __BIG_ENDIAN if not present. 2007-11-17 03:28:31 +00:00
enum.h Merge a bunch of doxygen updates to header files. This includes changes to 2007-07-16 02:51:56 +00:00
event.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
event_defs.h Add API calls for iterating through an event. This should allow events to have multiple information elements (while there was nothing preventing it before you could not actually access any except the first one). 2007-08-29 15:19:11 +00:00
extconf.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
features.h Doxygen cleanups/fixes. 2007-09-05 16:31:39 +00:00
file.h Typo fixed earlier, that wasn't a typo after all. 2007-12-15 11:34:33 +00:00
frame.h Doxygen updates 2007-12-11 09:26:25 +00:00
fskmodem.h Change the fsk filter used in CID and TDD decode to an integer based implementation 2007-08-06 19:52:40 +00:00
global_datastores.h Merged revisions 90735 via svnmerge from 2007-12-04 17:08:36 +00:00
hashtab.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
http.h Merge changes from team/russell/http_filetxfer 2007-06-29 20:35:09 +00:00
image.h formatting cleanup on the header, 2007-11-23 09:03:33 +00:00
indications.h Doxygen documentationification 2007-01-01 20:08:47 +00:00
inline_api.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
io.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
jabber.h Allow gtalk and jingle to use TLS connections again. 2007-11-06 18:44:19 +00:00
jingle.h Comply with latest XEP-0166, XEP-0167, XEP-0176. 2007-09-25 09:07:30 +00:00
linkedlists.h improve linked-list macros in two ways: 2007-11-08 05:28:47 +00:00
localtime.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
lock.h Merged revisions 92875 via svnmerge from 2007-12-14 01:25:36 +00:00
logger.h Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate. 2007-12-14 18:54:48 +00:00
manager.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
md5.h Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
mod_format.h A lot of doxygen updates 2007-12-11 14:17:29 +00:00
module.h Move usage of the old LOCAL_USER_* macros to the new ast_module_user_* functions in a few documentation places. 2007-12-13 20:23:48 +00:00
monitor.h Fix building that was broken by recent monitor.h changes. Thanks Russell for pointing this out (and pointing out what I probably did to prevent gcc from fixing it - don't ctrl-C builds) 2007-07-10 15:07:25 +00:00
musiconhold.h Merge a bunch of doxygen updates to header files. This includes changes to 2007-07-16 02:51:56 +00:00
netsock.h HUGE improvements to QoS/CoS handling by IgorG 2007-12-16 10:51:53 +00:00
network.h some platforms (e.g. FreeBSD4) need netinet/in.h to be included 2007-12-08 03:26:09 +00:00
options.h (closes issue #10192) 2007-07-23 14:21:41 +00:00
paths.h modify http://svn.digium.com/view/asterisk?view=rev&rev=93603 2007-12-20 09:55:05 +00:00
pbx.h Add count of total number of calls processed by asterisk during it's lifetime. 2007-12-07 16:11:05 +00:00
plc.h Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
poll-compat.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
privacy.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
pval.h Merged revisions 87168 via svnmerge from 2007-10-26 17:39:39 +00:00
res_odbc.h Merged revisions 89559 via svnmerge from 2007-11-25 17:50:07 +00:00
rtp.h HUGE improvements to QoS/CoS handling by IgorG 2007-12-16 10:51:53 +00:00
say.h Merge a bunch of doxygen updates to header files. This includes changes to 2007-07-16 02:51:56 +00:00
sched.h Merged revisions 83432 via svnmerge from 2007-09-21 14:40:10 +00:00
sha1.h Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
slinfactory.h Start untangling header inclusion in a way that does not affect 2007-11-16 20:04:58 +00:00
smdi.h Fix a spelling mistake in a comment. 2006-12-29 06:26:53 +00:00
speech.h Merged revisions 79334 via svnmerge from 2007-08-13 21:59:15 +00:00
srv.h Merged revisions 88862 via svnmerge from 2007-11-06 02:53:13 +00:00
stringfields.h remove redundant #include "asterisk/compat.h", 2007-11-16 21:08:28 +00:00
strings.h Add a new API function, written at least twice in app_voicemail.c 2007-12-19 17:09:01 +00:00
tdd.h Additional TDD changes (preparing for SIP changes - adding TDD support to SIP) 2007-11-06 19:10:26 +00:00
term.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
threadstorage.h minor cleanups 2007-12-18 02:42:44 +00:00
time.h Add a couple of new time API calls - ast_tvdiff_sec and ast_tvdiff_usec 2007-12-19 19:29:14 +00:00
transcap.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
translate.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
udptl.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
ulaw.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00
unaligned.h * In unaligned.h, remove some unnecessary casts and mark the arg of the 2007-12-11 16:29:29 +00:00
utils.h move asterisk/paths.h outside asterisk.h and into those files 2007-11-20 23:16:15 +00:00
zapata.h Doxygen updates, formatting. 2007-12-11 22:20:22 +00:00