Staticize one, and Constify a bunch of usage strings for CLI commands.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant 2006-12-06 07:28:56 +00:00
parent a44e55a3f3
commit 17a2888d2e
8 changed files with 37 additions and 37 deletions

View File

@ -289,11 +289,11 @@ static char *complete_channeltypes(const char *line, const char *word, int pos,
return ret; return ret;
} }
static char show_channeltypes_usage[] = static const char show_channeltypes_usage[] =
"Usage: core show channeltypes\n" "Usage: core show channeltypes\n"
" Lists available channel types registered in your Asterisk server.\n"; " Lists available channel types registered in your Asterisk server.\n";
static char show_channeltype_usage[] = static const char show_channeltype_usage[] =
"Usage: core show channeltype <name>\n" "Usage: core show channeltype <name>\n"
" Show details about the specified channel type, <name>.\n"; " Show details about the specified channel type, <name>.\n";

View File

@ -467,31 +467,31 @@ void ast_db_freetree(struct ast_db_entry *dbe)
} }
} }
static char database_show_usage[] = static const char database_show_usage[] =
"Usage: database show [family [keytree]]\n" "Usage: database show [family [keytree]]\n"
" Shows Asterisk database contents, optionally restricted\n" " Shows Asterisk database contents, optionally restricted\n"
"to a given family, or family and keytree.\n"; "to a given family, or family and keytree.\n";
static char database_showkey_usage[] = static const char database_showkey_usage[] =
"Usage: database showkey <keytree>\n" "Usage: database showkey <keytree>\n"
" Shows Asterisk database contents, restricted to a given key.\n"; " Shows Asterisk database contents, restricted to a given key.\n";
static char database_put_usage[] = static const char database_put_usage[] =
"Usage: database put <family> <key> <value>\n" "Usage: database put <family> <key> <value>\n"
" Adds or updates an entry in the Asterisk database for\n" " Adds or updates an entry in the Asterisk database for\n"
"a given family, key, and value.\n"; "a given family, key, and value.\n";
static char database_get_usage[] = static const char database_get_usage[] =
"Usage: database get <family> <key>\n" "Usage: database get <family> <key>\n"
" Retrieves an entry in the Asterisk database for a given\n" " Retrieves an entry in the Asterisk database for a given\n"
"family and key.\n"; "family and key.\n";
static char database_del_usage[] = static const char database_del_usage[] =
"Usage: database del <family> <key>\n" "Usage: database del <family> <key>\n"
" Deletes an entry in the Asterisk database for a given\n" " Deletes an entry in the Asterisk database for a given\n"
"family and key.\n"; "family and key.\n";
static char database_deltree_usage[] = static const char database_deltree_usage[] =
"Usage: database deltree <family> [keytree]\n" "Usage: database deltree <family> [keytree]\n"
" Deletes a family or specific keytree within a family\n" " Deletes a family or specific keytree within a family\n"
"in the Asterisk database.\n"; "in the Asterisk database.\n";

View File

@ -1156,7 +1156,7 @@ static int show_file_formats(int fd, int argc, char *argv[])
#undef FORMAT2 #undef FORMAT2
} }
char show_file_formats_usage[] = static const char show_file_formats_usage[] =
"Usage: core show file formats\n" "Usage: core show file formats\n"
" Displays currently registered file formats (if any)\n"; " Displays currently registered file formats (if any)\n";

View File

@ -648,7 +648,7 @@ static int show_codecs(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
static char frame_show_codecs_usage[] = static const char frame_show_codecs_usage[] =
"Usage: core show codecs [audio|video|image]\n" "Usage: core show codecs [audio|video|image]\n"
" Displays codec mapping\n"; " Displays codec mapping\n";
@ -877,7 +877,7 @@ static int show_frame_stats(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
static char frame_stats_usage[] = static const char frame_stats_usage[] =
"Usage: core show frame stats\n" "Usage: core show frame stats\n"
" Displays debugging statistics from framer\n"; " Displays debugging statistics from framer\n";
#endif #endif

View File

@ -3412,35 +3412,35 @@ static int stun_no_debug(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
static char debug_usage[] = static const char debug_usage[] =
"Usage: rtp debug [ip host[:port]]\n" "Usage: rtp debug [ip host[:port]]\n"
" Enable dumping of all RTP packets to and from host.\n"; " Enable dumping of all RTP packets to and from host.\n";
static char no_debug_usage[] = static const char no_debug_usage[] =
"Usage: rtp debug off\n" "Usage: rtp debug off\n"
" Disable all RTP debugging\n"; " Disable all RTP debugging\n";
static char stun_debug_usage[] = static const char stun_debug_usage[] =
"Usage: stun debug\n" "Usage: stun debug\n"
" Enable STUN (Simple Traversal of UDP through NATs) debugging\n"; " Enable STUN (Simple Traversal of UDP through NATs) debugging\n";
static char stun_no_debug_usage[] = static const char stun_no_debug_usage[] =
"Usage: stun debug off\n" "Usage: stun debug off\n"
" Disable STUN debugging\n"; " Disable STUN debugging\n";
static char rtcp_debug_usage[] = static const char rtcp_debug_usage[] =
"Usage: rtcp debug [ip host[:port]]\n" "Usage: rtcp debug [ip host[:port]]\n"
" Enable dumping of all RTCP packets to and from host.\n"; " Enable dumping of all RTCP packets to and from host.\n";
static char rtcp_no_debug_usage[] = static const char rtcp_no_debug_usage[] =
"Usage: rtcp debug off\n" "Usage: rtcp debug off\n"
" Disable all RTCP debugging\n"; " Disable all RTCP debugging\n";
static char rtcp_stats_usage[] = static const char rtcp_stats_usage[] =
"Usage: rtcp stats\n" "Usage: rtcp stats\n"
" Enable dumping of RTCP stats.\n"; " Enable dumping of RTCP stats.\n";
static char rtcp_no_stats_usage[] = static const char rtcp_no_stats_usage[] =
"Usage: rtcp stats off\n" "Usage: rtcp stats off\n"
" Disable all RTCP stats\n"; " Disable all RTCP stats\n";

View File

@ -558,7 +558,7 @@ static int show_translation(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
static char show_trans_usage[] = static const char show_trans_usage[] =
"Usage: core show translation [recalc] [<recalc seconds>]\n" "Usage: core show translation [recalc] [<recalc seconds>]\n"
" Displays known codec translators and the cost associated\n" " Displays known codec translators and the cost associated\n"
"with each conversion. If the argument 'recalc' is supplied along\n" "with each conversion. If the argument 'recalc' is supplied along\n"

View File

@ -1153,11 +1153,11 @@ static int udptl_nodebug(int fd, int argc, char *argv[])
return RESULT_SUCCESS; return RESULT_SUCCESS;
} }
static char debug_usage[] = static const char debug_usage[] =
"Usage: udptl debug [ip host[:port]]\n" "Usage: udptl debug [ip host[:port]]\n"
" Enable dumping of all UDPTL packets to and from host.\n"; " Enable dumping of all UDPTL packets to and from host.\n";
static char nodebug_usage[] = static const char nodebug_usage[] =
"Usage: udptl debug off\n" "Usage: udptl debug off\n"
" Disable all UDPTL debugging\n"; " Disable all UDPTL debugging\n";

View File

@ -2631,71 +2631,71 @@ static int dundi_show_precache(int fd, int argc, char *argv[])
#undef FORMAT2 #undef FORMAT2
} }
static char debug_usage[] = static const char debug_usage[] =
"Usage: dundi debug\n" "Usage: dundi debug\n"
" Enables dumping of DUNDi packets for debugging purposes\n"; " Enables dumping of DUNDi packets for debugging purposes\n";
static char no_debug_usage[] = static const char no_debug_usage[] =
"Usage: dundi no debug\n" "Usage: dundi no debug\n"
" Disables dumping of DUNDi packets for debugging purposes\n"; " Disables dumping of DUNDi packets for debugging purposes\n";
static char store_history_usage[] = static const char store_history_usage[] =
"Usage: dundi store history\n" "Usage: dundi store history\n"
" Enables storing of DUNDi requests and times for debugging\n" " Enables storing of DUNDi requests and times for debugging\n"
"purposes\n"; "purposes\n";
static char no_store_history_usage[] = static const char no_store_history_usage[] =
"Usage: dundi no store history\n" "Usage: dundi no store history\n"
" Disables storing of DUNDi requests and times for debugging\n" " Disables storing of DUNDi requests and times for debugging\n"
"purposes\n"; "purposes\n";
static char show_peers_usage[] = static const char show_peers_usage[] =
"Usage: dundi show peers\n" "Usage: dundi show peers\n"
" Lists all known DUNDi peers.\n"; " Lists all known DUNDi peers.\n";
static char show_trans_usage[] = static const char show_trans_usage[] =
"Usage: dundi show trans\n" "Usage: dundi show trans\n"
" Lists all known DUNDi transactions.\n"; " Lists all known DUNDi transactions.\n";
static char show_mappings_usage[] = static const char show_mappings_usage[] =
"Usage: dundi show mappings\n" "Usage: dundi show mappings\n"
" Lists all known DUNDi mappings.\n"; " Lists all known DUNDi mappings.\n";
static char show_precache_usage[] = static const char show_precache_usage[] =
"Usage: dundi show precache\n" "Usage: dundi show precache\n"
" Lists all known DUNDi scheduled precache updates.\n"; " Lists all known DUNDi scheduled precache updates.\n";
static char show_entityid_usage[] = static const char show_entityid_usage[] =
"Usage: dundi show entityid\n" "Usage: dundi show entityid\n"
" Displays the global entityid for this host.\n"; " Displays the global entityid for this host.\n";
static char show_peer_usage[] = static const char show_peer_usage[] =
"Usage: dundi show peer [peer]\n" "Usage: dundi show peer [peer]\n"
" Provide a detailed description of a specifid DUNDi peer.\n"; " Provide a detailed description of a specifid DUNDi peer.\n";
static char show_requests_usage[] = static const char show_requests_usage[] =
"Usage: dundi show requests\n" "Usage: dundi show requests\n"
" Lists all known pending DUNDi requests.\n"; " Lists all known pending DUNDi requests.\n";
static char lookup_usage[] = static const char lookup_usage[] =
"Usage: dundi lookup <number>[@context] [bypass]\n" "Usage: dundi lookup <number>[@context] [bypass]\n"
" Lookup the given number within the given DUNDi context\n" " Lookup the given number within the given DUNDi context\n"
"(or e164 if none is specified). Bypasses cache if 'bypass'\n" "(or e164 if none is specified). Bypasses cache if 'bypass'\n"
"keyword is specified.\n"; "keyword is specified.\n";
static char precache_usage[] = static const char precache_usage[] =
"Usage: dundi precache <number>[@context]\n" "Usage: dundi precache <number>[@context]\n"
" Lookup the given number within the given DUNDi context\n" " Lookup the given number within the given DUNDi context\n"
"(or e164 if none is specified) and precaches the results to any\n" "(or e164 if none is specified) and precaches the results to any\n"
"upstream DUNDi push servers.\n"; "upstream DUNDi push servers.\n";
static char query_usage[] = static const char query_usage[] =
"Usage: dundi query <entity>[@context]\n" "Usage: dundi query <entity>[@context]\n"
" Attempts to retrieve contact information for a specific\n" " Attempts to retrieve contact information for a specific\n"
"DUNDi entity identifier (EID) within a given DUNDi context (or\n" "DUNDi entity identifier (EID) within a given DUNDi context (or\n"
"e164 if none is specified).\n"; "e164 if none is specified).\n";
static char flush_usage[] = static const char flush_usage[] =
"Usage: dundi flush [stats]\n" "Usage: dundi flush [stats]\n"
" Flushes DUNDi answer cache, used primarily for debug. If\n" " Flushes DUNDi answer cache, used primarily for debug. If\n"
"'stats' is present, clears timer statistics instead of normal\n" "'stats' is present, clears timer statistics instead of normal\n"