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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 20 10:19:46 CDT 2008


Author: eliel
Date: Mon Oct 20 10:19:46 2008
New Revision: 151315

URL: http://svn.digium.com/view/asterisk?view=rev&rev=151315
Log:
Remove trailing spaces.

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=151315&r1=151314&r2=151315
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Mon Oct 20 10:19:46 2008
@@ -3180,9 +3180,9 @@
 }
 
 /*! \internal
- *  \brief Setup postbr to be used while wrapping the text. 
+ *  \brief Setup postbr to be used while wrapping the text.
  *         Add to postbr array all the spaces and tabs at the beginning of text.
- *  \param postbr output array. 
+ *  \param postbr output array.
  *  \param len array length.
  *  \param text Text with format string before the actual string.
  */
@@ -3202,7 +3202,7 @@
 }
 
 /*! \internal
- *  \brief Justify a text to a number of columns. 
+ *  \brief Justify a text to a number of columns.
  *  \param text Input text to be justified.
  *  \param columns Number of columns to preserve in the text.
  *  \param maxdiff Try to not cut a word when goinf down.
@@ -3216,7 +3216,7 @@
 	int count = 1, tmplen = 0, i, postbrreallen = 0;
 	char postbr[160];
 	int sep, needtobreak = 0, colmax;
-	
+
 	if (!text || columns <= 0 || maxdiff < 0) {
 		return NULL;
 	}
@@ -3229,10 +3229,10 @@
 	}
 
 	/* Check for blanks and tabs and put them in postbr. */
-	xmldoc_setpostbr(postbr, sizeof(postbr), text);	
+	xmldoc_setpostbr(postbr, sizeof(postbr), text);
 	postbrreallen = xmldoc_postbrlen(postbr);
 	colmax = columns - postbrreallen;
-	
+
 	while (*in) {
 		if (needtobreak || !(count % colmax)) {
 			if (*in == ' ') {
@@ -3289,12 +3289,11 @@
 					needtobreak = 0;
 					count = 1;
 				}
-
 			}
 			/* skip blanks after a \n */
 			while (*in == ' ') {
 				in++;
-			}	
+			}
 		}
 		if (*in == '\n') {
 			xmldoc_setpostbr(postbr, sizeof(postbr), in + 1);
@@ -3321,7 +3320,7 @@
 	ast_free(tmp);
 
 	return ret;
-}	
+}
 
 /*! \internal
  *  \brief Colorize the xmldoc output.
@@ -3377,10 +3376,10 @@
 					ast_copy_string(colorized + strlen(colorized), colorized_tags[c].init, strlen(colorized_tags[c].init) + 1);
 
 					ast_copy_string(colorized + strlen(colorized), bwinput + i + strlen(colorized_tags[c].inittag), len + 1);
-					
+
 					/* copy the ending string replace */
 					ast_copy_string(colorized + strlen(colorized), colorized_tags[c].end, strlen(colorized_tags[c].end) + 1);
-				
+
 					/* Continue with the last color. */
 					term_color_code(colorized + strlen(colorized), base_fg, base_bg, 23);
 
@@ -3416,7 +3415,7 @@
 static void xmldoc_string_cleanup(const char *text, struct ast_str **output, int lastspaces)
 {
 	char *tmp;
-	
+
 	*output = ast_str_create(1);
 	if (!(*output)) {
 		ast_log(LOG_ERROR, "Problem allocating output buffer\n");
@@ -3633,7 +3632,7 @@
 			/* first parameter node */
 			firstparam = node;
 			reqfinode = required;
-		}	
+		}
 		node = node->AST_XML_NEXT;
 	}
 
@@ -3815,7 +3814,7 @@
 		}
 		node = node->AST_XML_NEXT;
 	}
-	
+
 	if (node) {
 		syntax = xmldoc_build_syntax(node, name, "parameter", 1, 1);
 	}
@@ -3884,7 +3883,7 @@
  *  \param fixnode special tag node pointer.
  *  \param tabs put tabs before printing the node content.
  *  \param posttabs put posttabs after printing node content.
- *  \param buffer Output buffer, the special tags will be appended here. 
+ *  \param buffer Output buffer, the special tags will be appended here.
  *  \retval 0 if no special element is parsed.
  *  \retval 1 if a special element is parsed (data is appended to buffer).
  *  \retval 2 if a special element is parsed and also a <para> element is parsed inside the specialtag.
@@ -3907,7 +3906,7 @@
 			if (strlen(special_tags[i].init) > 0) {
 				ast_str_append(buffer, 0, "%s%s", tabs, special_tags[i].init);
 			}
-	
+
 			/* parse <para> elements inside special tags. */
 			node = node->AST_XML_CHILD;
 			while (node) {
@@ -3920,8 +3919,7 @@
 
 			if (strlen(special_tags[i].end) > 0) {
 				ast_str_append(buffer, 0, "%s%s", special_tags[i].end, posttabs);
-			}			
-
+			}
 			break;
 		}
 	}
@@ -3972,7 +3970,7 @@
 }
 
 /*! \internal
- *  \brief Parse a <variable> node inside a <variablelist> node. 
+ *  \brief Parse a <variable> node inside a <variablelist> node.
  *  \param node The variable node to parse.
  *  \param tabs A string to be appended at the begining of the output that will be stored
  *         in buffer.
@@ -4112,7 +4110,7 @@
 	}
 
 	/* get the application/function root node. */
-	node = xmldoc_get_node(type, name, documentation_language);	
+	node = xmldoc_get_node(type, name, documentation_language);
 	if (!node || !node->AST_XML_CHILD) {
 		return NULL;
 	}
@@ -4151,7 +4149,7 @@
 			content = ast_xml_get_text(node);
 			if (content) {
 				if (!strcasecmp(typename, "application") || !strcasecmp(typename, "function")) {
-					ast_str_append(&outputstr, 0, "%s: Type <astcli>core show %s %s</astcli> for more info.\n", 
+					ast_str_append(&outputstr, 0, "%s: Type <astcli>core show %s %s</astcli> for more info.\n",
 						content, typename, content);
 				} else if (!strcasecmp(typename, "astcli")) {
 					ast_str_append(&outputstr, 0, "%s: Type <astcli>help %s</astcli> for more info.\n", content, content);
@@ -4175,7 +4173,7 @@
 
 /*! \internal
  *  \brief Parse a <enum> node.
- *  \brief fixnode An ast_xml_node pointer to the <enum> node. 
+ *  \brief fixnode An ast_xml_node pointer to the <enum> node.
  *  \bried buffer The output buffer.
  *  \retval 0 if content is not found inside the enum element (data is not appended to buffer).
  *  \retval 1 if content is found and data is appended to buffer.
@@ -4199,7 +4197,7 @@
 
 /*! \internal
  *  \brief Parse a <enumlist> node.
- *  \param fixnode As ast_xml pointer to the <enumlist> node. 
+ *  \param fixnode As ast_xml pointer to the <enumlist> node.
  *  \param buffer The ast_str output buffer.
  *  \retval 0 if no <enumlist> node was parsed.
  *  \retval 1 if a <enumlist> node was parsed.
@@ -4222,7 +4220,7 @@
 			ast_str_append(buffer, 0, "%s<enum>%s</enum>", tabs, enumname);
 			ast_xml_free_attr(enumname);
 
-			/* parse only enum elements inside a enumlist node. */	
+			/* parse only enum elements inside a enumlist node. */
 			if ((xmldoc_parse_enum(node, tabs, buffer))) {
 				ret = 1;
 			} else {
@@ -4238,7 +4236,7 @@
  *  \brief Parse an <option> node.
  *  \param fixnode An ast_xml pointer to the <option> node.
  *  \param tabs A string to be appended at the begining of each line being added to the
- *              buffer string. 
+ *              buffer string.
  *  \param buffer The output buffer.
  *  \retval 0 if no option node is parsed.
  *  \retval 1 if an option node is parsed.
@@ -4287,7 +4285,7 @@
  *  \brief Parse an <optionlist> element from the xml documentation.
  *  \param fixnode Pointer to the optionlist xml node.
  *  \param tabs A string to be appended at the begining of each line being added to the
- *              buffer string. 
+ *              buffer string.
  *  \param buffer Output buffer to put what is inside the optionlist tag.
  */
 static void xmldoc_parse_optionlist(ast_xml_node *fixnode, const char *tabs, struct ast_str **buffer)
@@ -4340,7 +4338,7 @@
 	ast_xml_node *node = fixnode;
 	int hasarguments, printed = 0;
 	char *internaltabs;
-	
+
 	if (strcasecmp((char *)node->AST_XML_NAME, "parameter")) {
 		return;
 	}
@@ -4372,7 +4370,7 @@
 				ast_str_append(buffer, 0, "%s\n", paramname);
 				ast_xml_free_attr(paramname);
 				printed = 1;
-			}	
+			}
 			xmldoc_parse_para(node, internaltabs, "\n", buffer);
 			node = node->AST_XML_NEXT;
 			continue;
@@ -4388,7 +4386,7 @@
 /*! \internal
  *  \brief Generate the [arguments] tag based on type of node 'application' or
  *         'function' and name.
- *  \param type 'application' or 'function' ? 
+ *  \param type 'application' or 'function' ?
  *  \param name Name of the application or function to build the 'arguments' tag.
  *  \retval NULL on error.
  *  \retval Output buffer with the [arguments] tag content.
@@ -4398,13 +4396,13 @@
 	ast_xml_node *node;
 	struct ast_str *ret = ast_str_create(1);
 	char *retstr = NULL;
-	
+
 	if (ast_strlen_zero(type) || ast_strlen_zero(name)) {
 		return NULL;
 	}
 
 	node = xmldoc_get_node(type, name, documentation_language);
-	
+
 	if (!node || !node->AST_XML_CHILD) {
 		return NULL;
 	}
@@ -4417,7 +4415,7 @@
 		}
 		node = node->AST_XML_NEXT;
 	}
-	
+
 	if (!node || !node->AST_XML_CHILD) {
 		/* We couldn't find the syntax node. */
 		return NULL;
@@ -4443,8 +4441,8 @@
 }
 
 /*! \internal
- *  \brief Return the string within a node formatted with 
- * 	   <para> and <variablelist> elements. 
+ *  \brief Return the string within a node formatted with
+ * 	   <para> and <variablelist> elements.
  *  \param node Parent node where content resides.
  *  \param raw If set, return the node's content without further processing.
  *  \param raw_wrap Wrap raw text.
@@ -4492,7 +4490,7 @@
  *  \param type Type of element (application, function, ...).
  *  \param name Name of element (Dial, Echo, Playback, ...).
  *  \param var Name of field to return (synopsis, description, etc).
- *  \param raw Field only contains text, no other elements inside it. 
+ *  \param raw Field only contains text, no other elements inside it.
  *  \retval NULL On error.
  *  \retval Field text content on success.
  */
@@ -4508,7 +4506,7 @@
 	}
 
 	node = xmldoc_get_node(type, name, documentation_language);
-		
+
 	if (!node) {
 		ast_log(LOG_WARNING, "Counldn't find %s %s in XML documentation\n", type, name);
 		return ret;




More information about the asterisk-commits mailing list