| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflenv.h" Bool env_get_boolean ( const char *name, Bool default_value)
Translates the specified environment variable and returns the Boolean value of the string. If the variable is not defined in the environment, returns the specified default value. The environment variable name is always translated into upper case. The environment variable value is interpreted irrespective to upper/lower case, and looking at the first letter only. T/Y/1 are TRUE, everything else is FALSE. See conv str bool() for the conversion rules.
enforce_security = env_get_number ("security", FALSE);
{ char *variable_value; variable_value = env get string (name, NULL); return (variable_value? (conv str bool (variable_value) != 0): default_value); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |