Const-ify the world (or at least a good part of it)

This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2009-05-21 21:13:09 +00:00
parent 88bda581ec
commit e6b2e9a750
145 changed files with 802 additions and 806 deletions

View File

@@ -283,24 +283,17 @@ typedef struct
} td;
} digit_detect_state_t;
static float dtmf_row[] =
{
static const float dtmf_row[] = {
697.0, 770.0, 852.0, 941.0
};
static float dtmf_col[] =
{
static const float dtmf_col[] = {
1209.0, 1336.0, 1477.0, 1633.0
};
static float mf_tones[] =
{
static const float mf_tones[] = {
700.0, 900.0, 1100.0, 1300.0, 1500.0, 1700.0
};
static char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
static char bell_mf_positions[] = "1247C-358A--69*---0B----#";
static const char dtmf_positions[] = "123A" "456B" "789C" "*0#D";
static const char bell_mf_positions[] = "1247C-358A--69*---0B----#";
static int thresholds[THRESHOLD_MAX];
static inline void goertzel_sample(goertzel_state_t *s, short sample)