[asterisk-commits] eliel: trunk r154967 - /trunk/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 6 12:19:01 CST 2008


Author: eliel
Date: Thu Nov  6 12:19:00 2008
New Revision: 154967

URL: http://svn.digium.com/view/asterisk?view=rev&rev=154967
Log:
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.

Modified:
    trunk/main/pbx.c

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=154967&r1=154966&r2=154967
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Thu Nov  6 12:19:00 2008
@@ -4269,6 +4269,7 @@
 	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 @@
 			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);
 	}
 




More information about the asterisk-commits mailing list