|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sflconv.h"
char *
conv_bool_str (
Bool boolean,
int format)
Converts a Bool value to a string according to the specified format: 0 = Yes|No; 1 = Y|N, 2 = True|False, 3 = T|F, 4 = 1|0. Returns a pointer to a static string that is overwritten by each call.
{
static char *bool_name [] =
{
"Yes", "No",
"Y", "N",
"True", "False",
"T", "F",
"1", "0"
};
conv_reason = 0; /* No conversion errors so far */
return (bool_name [format * 2 + (boolean? 0: 1)]);
}
| | << | < | > | >> |
|