[asterisk-commits] eliel: branch group/appdocsxml r149591 - /team/group/appdocsxml/main/pbx.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Oct 15 10:36:52 CDT 2008


Author: eliel
Date: Wed Oct 15 10:36:52 2008
New Revision: 149591

URL: http://svn.digium.com/view/asterisk?view=rev&rev=149591
Log:
Remove the last '\n' inside the [Description] and [Arguments].
I don't like the need to remove the last '\n' but is the clean solution to this issue.
This is just to fix the formatting look of the documentation.

Modified:
    team/group/appdocsxml/main/pbx.c

Modified: team/group/appdocsxml/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/pbx.c?view=diff&rev=149591&r1=149590&r2=149591
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Wed Oct 15 10:36:52 2008
@@ -4439,6 +4439,11 @@
 	}
 
 	if (ret->used > 0) {
+		/* remove last '\n' */
+		if (ret->str[ret->used - 1] == '\n') {
+			ret->str[ret->used - 1] = '\0';
+			ret->used--;
+		}
 		retstr = ast_strdup(ret->str);
 	}
 	ast_free(ret);
@@ -4485,6 +4490,11 @@
 			xmldoc_parse_variablelist(tmp, "", &ret);
 			xmldoc_parse_enumlist(tmp, "    ", &ret);
 			tmp = tmp->AST_XML_NEXT;
+		}
+		/* remove last '\n' */
+		if (ret->str[ret->used-1] == '\n') {
+			ret->str[ret->used-1] = '\0';
+			ret->used--;
 		}
 	}
 	return ret;




More information about the asterisk-commits mailing list