TutOptionSetStrList set the value of a string list option
option
option to set
str_list_val
string list value to set option to
TRUE
if value is set successfully, FALSE
otherwise.
If TutOptionSetStrList fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TutOptionSetStrList sets the string list value of option
. The argument str_list_val
is a linked list of strings. The string list values are copied to internal storage, so the caller does not need to maintain storage for them.
None
This example sets the value of the option named str_list_opt
to contain a list of two string values:
T_OPTION str_list_opt; T_STR_LIST str_list_val, node; T_STR_LIST_STRUCT node1, node2; str_list_opt = TutOptionLookup("str_list_opt"); if (str_list_opt == NULL) {/* error */
} node1.string = "string of first node"; node2.string = "string of second node"; node1.next = &node2; node2.next = NULL; if (!TutOptionSetStrList(str_list_opt, &node1)) {/* error */
}/* Dump the string values */
if (!TutOptionGetStrList(str_list_opt, &str_list_val)) {/* error */
} for (node = str_list_val; node != NULL; node = node->next) { TutOut("%s\n", node->string); }
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |