[asterisk-commits] trunk r36543 - /trunk/funcs/func_strings.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jul 1 09:03:52 MST 2006


Author: tilghman
Date: Sat Jul  1 11:03:51 2006
New Revision: 36543

URL: http://svn.digium.com/view/asterisk?rev=36543&view=rev
Log:
Revert the previous change to FILTER and fix the embedded documentation instead.

Modified:
    trunk/funcs/func_strings.c

Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?rev=36543&r1=36542&r2=36543&view=diff
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Sat Jul  1 11:03:51 2006
@@ -68,7 +68,7 @@
 static struct ast_custom_function fieldqty_function = {
 	.name = "FIELDQTY",
 	.synopsis = "Count the fields, with an arbitrary delimiter",
-	.syntax = "FIELDQTY(<varname>,<delim>)",
+	.syntax = "FIELDQTY(<varname>|<delim>)",
 	.read = function_fieldqty,
 };
 
@@ -81,10 +81,10 @@
 	);
 	char *outbuf = buf;
 
-	AST_NONSTANDARD_APP_ARGS(args, parse, ',');
+	AST_STANDARD_APP_ARGS(args, parse);
 
 	if (!args.string) {
-		ast_log(LOG_ERROR, "Usage: FILTER(<allowed-chars>,<string>)\n");
+		ast_log(LOG_ERROR, "Usage: FILTER(<allowed-chars>|<string>)\n");
 		return -1;
 	}
 
@@ -100,7 +100,7 @@
 static struct ast_custom_function filter_function = {
 	.name = "FILTER",
 	.synopsis = "Filter the string to include only the allowed characters",
-	.syntax = "FILTER(<allowed-chars>,<string>)",
+	.syntax = "FILTER(<allowed-chars>|<string>)",
 	.read = filter,
 };
 
@@ -193,13 +193,13 @@
 static struct ast_custom_function array_function = {
 	.name = "ARRAY",
 	.synopsis = "Allows setting multiple variables at once",
-	.syntax = "ARRAY(var1[,var2[...][,varN]])",
+	.syntax = "ARRAY(var1[|var2[...][|varN]])",
 	.write = array,
 	.desc =
 		"The comma-separated list passed as a value to which the function is set will\n"
 		"be interpreted as a set of values to which the comma-separated list of\n"
 		"variable names in the argument should be set.\n"
-		"Hence, Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2\n"
+		"Hence, Set(ARRAY(var1|var2)=1\\,2) will set var1 to 1 and var2 to 2\n"
 		"Note: remember to either backslash your commas in extensions.conf or quote the\n"
 		"entire argument, since Set can take multiple arguments itself.\n",
 };
@@ -339,7 +339,7 @@
 static struct ast_custom_function sprintf_function = {
 	.name = "SPRINTF",
 	.synopsis = "Format a variable according to a format string",
-	.syntax = "SPRINTF(<format>,<arg1>[,...<argN>])",
+	.syntax = "SPRINTF(<format>|<arg1>[|...<argN>])",
 	.read = acf_sprintf,
 	.desc =
 "Parses the format string specified and returns a string matching that format.\n"
@@ -435,7 +435,7 @@
 static struct ast_custom_function strftime_function = {
 	.name = "STRFTIME",
 	.synopsis = "Returns the current date/time in a specified format.",
-	.syntax = "STRFTIME([<epoch>][,[timezone][,format]])",
+	.syntax = "STRFTIME([<epoch>][|[timezone][|format]])",
 	.read = acf_strftime,
 };
 



More information about the asterisk-commits mailing list