aboutsummaryrefslogtreecommitdiffstats
path: root/main/manager.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 /main/manager.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 'main/manager.c')
-rw-r--r--main/manager.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/main/manager.c b/main/manager.c
index d1a52ba04..9ad09a906 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -491,73 +491,6 @@ static int manager_displayconnects (struct mansession *s)
return ret;
}
-#ifdef AST_DEVMODE
-static char *handle_manager_dump_actiondocs(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
-{
- struct manager_action *action;
- FILE *f;
- char *action_name = NULL;
- const char *fn = "/tmp/ast_manager_actiondocs.tex";
- struct ast_str *authority = ast_str_alloca(80);
-
- switch (cmd) {
- case CLI_INIT:
- e->command = "manager dump actiondocs";
- e->usage =
- "Usage: manager dump actiondocs [action]\n"
- " Dump manager action documentation to /tmp/ast_manager_actiondocs.tex.\n";
- return NULL;
- case CLI_GENERATE:
- return NULL;
- }
-
- if (a->argc == e->args + 1)
- action_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");
-
- ast_rwlock_rdlock(&actionlock);
- for (action = first_action; action; action = action->next) {
- if (action_name && strcasecmp(action->action, action_name))
- continue;
-
- fprintf(f, "\\section{%s}\n"
- "\\subsection{Synopsis}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Authority}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n"
- "\\subsection{Description}\n"
- "\\begin{verbatim}\n"
- "%s\n"
- "\\end{verbatim}\n\n\n",
- action->action, action->synopsis,
- authority_to_str(action->authority, &authority),
- action->description);
-
- if (action_name)
- break;
- }
- ast_rwlock_unlock(&actionlock);
-
- fclose(f);
-
- ast_cli(a->fd, "Documentation has been dumped to %s\n", fn);
-
- return CLI_SUCCESS;
-}
-#endif /* AST_DEVMODE */
-
static int handle_showmancmd(int fd, int argc, char *argv[])
{
struct manager_action *cur;
@@ -775,10 +708,6 @@ static struct ast_cli_entry cli_manager[] = {
{ { "manager", "debug", NULL },
handle_mandebug, "Show, enable, disable debugging of the manager code",
"Usage: manager debug [on|off]\n Show, enable, disable debugging of the manager code.\n", NULL, NULL },
-
-#ifdef AST_DEVMODE
- NEW_CLI(handle_manager_dump_actiondocs, "Dump manager action documentation in LaTeX format"),
-#endif
};
/*