pub unsafe fn _get_bool_env(sz_setting: *const c_char) -> SettingBool {
    let mut setting: SettingBool = SettingBool {
        value: false,
        source: SettingSource::Default,
    };

    let sz_name = CString::new(format!(
        "YUBIKEY_PIV_{}",
        CStr::from_ptr(sz_setting).to_string_lossy()
    ))
    .unwrap();

    let psz_value = getenv(sz_name.as_ptr());

    if !psz_value.is_null() {
        setting.source = SettingSource::User;
        setting.value = strcmp(psz_value, b"1\0".as_ptr() as *const c_char) == 0
            || strcasecmp(psz_value, b"true\0".as_ptr() as *const c_char) == 0;
    }

    setting
}
/// Get a setting boolean from an environment variable
Get a setting boolean from an environment variable
Get a setting boolean from an environment variable
pub unsafe fn _get_bool_env(sz_setting: *const c_char) -> SettingBool {
    let mut setting: SettingBool = SettingBool {
        value: false,
        source: SettingSource::Default,
    };
    let sz_name = CString::new(format!(
        "YUBIKEY_PIV_{}",
        CStr::from_ptr(sz_setting).to_string_lossy()
    ))
    .unwrap();
    let psz_value = getenv(sz_name.as_ptr());
    if !psz_value.is_null() {
        setting.source = SettingSource::User;
        setting.value = strcmp(psz_value, b"1\0".as_ptr() as *const c_char) == 0
            || strcasecmp(psz_value, b"true\0".as_ptr() as *const c_char) == 0;
    }
    setting
}
pub unsafe fn _get_bool_env ( sz_setting : * const c_char ) -> SettingBool { let mut setting : SettingBool = SettingBool { value : false , source : SettingSource :: Default , } ; let sz_name = CString :: new ( format ! ( " " CStr from_ptr ( sz_setting ) to_string_lossy ( ) ) ) . unwrap ( ) ; let psz_value = getenv ( sz_name . as_ptr ( ) ) ; if ! psz_value . is_null ( ) { setting . source = SettingSource :: User ; setting . value = strcmp ( psz_value , b" \0 " . as_ptr ( ) as * const c_char ) == 0 || strcasecmp ( psz_value , b" \0 " . as_ptr ( ) as * const c_char ) == 0 ; } setting }
Get a setting boolean from an environment variable
Get a setting boolean from an environment variable
sz_setting
*const c_char