summaryrefslogtreecommitdiff
path: root/main/cli.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-07-02 23:02:16 +0000
committerRussell Bryant <russell@russellbryant.com>2007-07-02 23:02:16 +0000
commitd2a85e5f64512f1d8c77b68990f2fb1310be5520 (patch)
tree82dd78f16f0ed32be0051ba2c428f89fd67e74df /main/cli.c
parentdf1a340774efc74f80ab4d99fb01da958d3f18e2 (diff)
After some discussion on the asterisk-dev list, we determined that this approach
for extracting application, function, manager, and agi documentation is the wrong one to take. The most severe problem is that the output depends on which modules are loaded as well as compile time options, which both determine which parts are available. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/cli.c')
-rw-r--r--main/cli.c67
1 files changed, 0 insertions, 67 deletions
diff --git a/main/cli.c b/main/cli.c
index cefee0e7e..7607793ae 100644
--- a/main/cli.c
+++ b/main/cli.c
@@ -972,10 +972,6 @@ static struct ast_cli_entry cli_module_unload_deprecated = NEW_CLI(handle_unload
static char *handle_help(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
-#ifdef AST_DEVMODE
-static char *handle_core_dump_clidocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a);
-#endif
-
static struct ast_cli_entry cli_cli[] = {
/* Deprecated, but preferred command is now consolidated (and already has a deprecated command for it). */
NEW_CLI(handle_nodebugchan_deprecated, "Disable debugging on channel(s)"),
@@ -1014,10 +1010,6 @@ static struct ast_cli_entry cli_cli[] = {
{ { "soft", "hangup", NULL },
handle_softhangup, "Request a hangup on a given channel",
softhangup_help, complete_ch_3 },
-
-#ifdef AST_DEVMODE
- NEW_CLI(handle_core_dump_clidocs, "Dump CLI command documentation in LaTeX format"),
-#endif
};
/*!
@@ -1458,65 +1450,6 @@ static char *handle_help(struct ast_cli_entry *e, int cmd, struct ast_cli_args *
return RESULT_SUCCESS;
}
-#ifdef AST_DEVMODE
-static char *handle_core_dump_clidocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- struct ast_cli_entry *cli;
- FILE *f;
- const char *fn = "/tmp/ast_cli_commands.tex";
- struct cli_iterator i = { NULL, NULL};
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "core dump clidocs";
- e->usage =
- "Usage: core dump clidocs\n"
- " Dump CLI command documentation to /tmp/ast_cli_commands.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc != e->args)
- return CLI_SHOWUSAGE;
-
- if (!(f = fopen(fn, "w+"))) {
- ast_cli(a->fd, "Unable to open %s for writing!\n", fn);
- return CLI_FAILURE;
- }
-
- fprintf(f, "%% This file is automatically generated by the \"core dump clidocs\" CLI command. Any manual edits will be lost.\n");
-
- AST_LIST_LOCK(&helpers);
- while ((cli = cli_next(&i))) {
- /* Hide commands that start with '_' */
- if (cli->_full_cmd[0] == '_')
- continue;
- /* Hide commands that are marked as deprecated. */
- if (cli->deprecated)
- continue;
-
- fprintf(f, "\\section{%s}\n"
- "\\subsection{Summary}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Usage}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n\n\n",
- cli->_full_cmd, cli->summary, cli->usage);
- }
- AST_LIST_UNLOCK(&helpers);
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-#endif /* AST_DEVMODE */
-
static char *parse_args(const char *s, int *argc, char *argv[], int max, int *trailingwhitespace)
{
char *dup, *cur;