summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEliel C. Sardanons <eliels@gmail.com>2008-11-06 18:19:00 +0000
committerEliel C. Sardanons <eliels@gmail.com>2008-11-06 18:19:00 +0000
commite771f08f60098ae03b206e92f62a47a8f969185d (patch)
tree57d603b636b2e05fe48b7e797e011d24ac96b4ff
parent8a25d59bf87960d09b6ea4dd5aad0584d9166eb9 (diff)
Simplify the output of [See Also].
Functions are printed without parenthesis like: FUNTION Applications are printed with parenthesis like: AppName() Cli commands are printed like: 'core show application' The other type of references are printed as they are inside the <ref> tag. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@154967 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--main/pbx.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 16f9f6889..39d083f47 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -4269,6 +4269,7 @@ static char *xmldoc_build_seealso(const char *type, const char *name)
struct ast_xml_node *node;
const char *typename;
const char *content;
+ int first = 1;
if (ast_strlen_zero(type) || ast_strlen_zero(name)) {
return NULL;
@@ -4314,18 +4315,16 @@ static char *xmldoc_build_seealso(const char *type, const char *name)
ast_xml_free_attr(typename);
continue;
}
- if (!strcasecmp(typename, "application") || !strcasecmp(typename, "function")) {
- ast_str_append(&outputstr, 0, "%s: Type <astcli>core show %s %s</astcli> for more info.\n",
- content, typename, content);
+ if (!strcasecmp(typename, "application")) {
+ ast_str_append(&outputstr, 0, "%s%s()", (first ? "" : ", "), content);
+ } else if (!strcasecmp(typename, "function")) {
+ ast_str_append(&outputstr, 0, "%s%s", (first ? "" : ", "), content);
} else if (!strcasecmp(typename, "astcli")) {
- ast_str_append(&outputstr, 0, "%s: Type <astcli>help %s</astcli> for more info.\n", content, content);
- } else if (!strcasecmp(typename, "link")) {
- ast_str_append(&outputstr, 0, "%s\n", content);
- } else if (!strcasecmp(typename, "manpage")) {
- ast_str_append(&outputstr, 0, "ManPage: %s\n", content);
- } else if (!strcasecmp(typename, "filename")) {
- ast_str_append(&outputstr, 0, "File: %s\n", content);
+ ast_str_append(&outputstr, 0, "%s<astcli>%s</astcli>", (first ? "" : ", "), content);
+ } else {
+ ast_str_append(&outputstr, 0, "%s%s", (first ? "" : ", "), content);
}
+ first = 0;
ast_xml_free_text(content);
}