Revert the previous change to FILTER and fix the embedded documentation instead.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36543 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2006-07-01 16:03:51 +00:00
parent 5a74ed4fef
commit 2465fd611c

View File

@@ -68,7 +68,7 @@ static int function_fieldqty(struct ast_channel *chan, char *cmd,
static struct ast_custom_function fieldqty_function = { static struct ast_custom_function fieldqty_function = {
.name = "FIELDQTY", .name = "FIELDQTY",
.synopsis = "Count the fields, with an arbitrary delimiter", .synopsis = "Count the fields, with an arbitrary delimiter",
.syntax = "FIELDQTY(<varname>,<delim>)", .syntax = "FIELDQTY(<varname>|<delim>)",
.read = function_fieldqty, .read = function_fieldqty,
}; };
@@ -81,10 +81,10 @@ static int filter(struct ast_channel *chan, char *cmd, char *parse, char *buf,
); );
char *outbuf = buf; char *outbuf = buf;
AST_NONSTANDARD_APP_ARGS(args, parse, ','); AST_STANDARD_APP_ARGS(args, parse);
if (!args.string) { 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; return -1;
} }
@@ -100,7 +100,7 @@ static int filter(struct ast_channel *chan, char *cmd, char *parse, char *buf,
static struct ast_custom_function filter_function = { static struct ast_custom_function filter_function = {
.name = "FILTER", .name = "FILTER",
.synopsis = "Filter the string to include only the allowed characters", .synopsis = "Filter the string to include only the allowed characters",
.syntax = "FILTER(<allowed-chars>,<string>)", .syntax = "FILTER(<allowed-chars>|<string>)",
.read = filter, .read = filter,
}; };
@@ -193,13 +193,13 @@ static int array(struct ast_channel *chan, char *cmd, char *var,
static struct ast_custom_function array_function = { static struct ast_custom_function array_function = {
.name = "ARRAY", .name = "ARRAY",
.synopsis = "Allows setting multiple variables at once", .synopsis = "Allows setting multiple variables at once",
.syntax = "ARRAY(var1[,var2[...][,varN]])", .syntax = "ARRAY(var1[|var2[...][|varN]])",
.write = array, .write = array,
.desc = .desc =
"The comma-separated list passed as a value to which the function is set will\n" "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" "be interpreted as a set of values to which the comma-separated list of\n"
"variable names in the argument should be set.\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" "Note: remember to either backslash your commas in extensions.conf or quote the\n"
"entire argument, since Set can take multiple arguments itself.\n", "entire argument, since Set can take multiple arguments itself.\n",
}; };
@@ -339,7 +339,7 @@ sprintf_fail:
static struct ast_custom_function sprintf_function = { static struct ast_custom_function sprintf_function = {
.name = "SPRINTF", .name = "SPRINTF",
.synopsis = "Format a variable according to a format string", .synopsis = "Format a variable according to a format string",
.syntax = "SPRINTF(<format>,<arg1>[,...<argN>])", .syntax = "SPRINTF(<format>|<arg1>[|...<argN>])",
.read = acf_sprintf, .read = acf_sprintf,
.desc = .desc =
"Parses the format string specified and returns a string matching that format.\n" "Parses the format string specified and returns a string matching that format.\n"
@@ -435,7 +435,7 @@ static int acf_strftime(struct ast_channel *chan, char *cmd, char *parse,
static struct ast_custom_function strftime_function = { static struct ast_custom_function strftime_function = {
.name = "STRFTIME", .name = "STRFTIME",
.synopsis = "Returns the current date/time in a specified format.", .synopsis = "Returns the current date/time in a specified format.",
.syntax = "STRFTIME([<epoch>][,[timezone][,format]])", .syntax = "STRFTIME([<epoch>][|[timezone][|format]])",
.read = acf_strftime, .read = acf_strftime,
}; };