aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_agi.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-02 23:02:16 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-02 23:02:16 +0000
commit7861ca021d11b59ce765d3c00bee30e89842de38 (patch)
tree82dd78f16f0ed32be0051ba2c428f89fd67e74df /res/res_agi.c
parent3357366474ad27c72b2f26c759f85c5d34dbdc84 (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: http://svn.digium.com/svn/asterisk/trunk@72986 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_agi.c')
-rw-r--r--res/res_agi.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index dad82d454..cd7e0a928 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -1673,74 +1673,6 @@ static int help_workhorse(int fd, char *match[])
return 0;
}
-#ifdef AST_DEVMODE
-static char *handle_agi_dump_commanddocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- FILE *f;
- char *command_name = NULL;
- const char *fn = "/tmp/ast_agi_commands.tex";
- int i;
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "agi dump commanddocs";
- e->usage =
- "Usage: agi dump commanddocs [command]\n"
- " Dump manager action documentation to /tmp/ast_agi_commands.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc == e->args + 1)
- command_name = a->argv[e->args];
- else 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 \"manager dump actiondocs\" CLI command. Any manual edits will be lost.\n");
-
- /* XXX Not thread safe :( */
- for (i = 0; i < ARRAY_LEN(commands); i++) {
- struct agi_command *command;
- char fullcmd[80];
-
- command = &commands[i];
- if (!command->cmda[0])
- break;
-
- ast_join(fullcmd, sizeof(fullcmd), command->cmda);
-
- if (command_name && strcasecmp(fullcmd, command_name))
- 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",
- fullcmd, command->summary, command->usage);
-
- if (command_name)
- break;
- }
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-#endif /* AST_DEVMODE */
-
int ast_agi_register(agi_command *agi)
{
int x;
@@ -2232,10 +2164,6 @@ static struct ast_cli_entry cli_agi[] = {
{ { "agi", "dumphtml", NULL },
handle_agidumphtml, "Dumps a list of agi commands in html format",
dumpagihtml_help },
-
-#ifdef AST_DEVMODE
- NEW_CLI(handle_agi_dump_commanddocs, "Dump agi command documentation in LaTeX format"),
-#endif
};
static int unload_module(void)