TutOptionGetBool


Name

TutOptionGetBool — get the value of a boolean option

Synopsis

T_BOOL TutOptionGetBool(option, bool_val_return) 
T_OPTION option; 
T_BOOL *bool_val_return;  

Arguments

option — option that contains a boolean value

bool_val_return — pointer to a T_BOOL into which TutOptionGetBool copies the value of the option

Return Values

TRUE if the value is retrieved successfully, FALSE otherwise.

Diagnostics

If TutOptionGetBool fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TutOptionGetBool gets the boolean value of option. A T_BOOL value (TRUE or FALSE) is copied into the storage pointed to by bool_val_return.

The caller must manage the storage pointed to by bool_val_return.

Caution

None

See Also

TutOptionSetBool

Examples

This example gets the value of the option named bool_opt:

T_OPTION bool_opt; 
T_BOOL bool_val; 
 
bool_opt = TutOptionLookup("bool_opt"); 
if (bool_opt == NULL) { 
  /* error */ 
} 
if (!TutOptionGetBool(bool_opt, &bool_val)) { 
  /* error */ 
} 

TIBCO SmartSockets™ Utilities
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com