use crate::{
sys::{SIM_copyright, SIM_version, SIM_version_base, SIM_version_major, SIM_vmxmon_version},
Result,
};
use std::ffi::CStr;
pub fn version() -> Result<String> {
Ok(unsafe { CStr::from_ptr(SIM_version()) }
.to_str()?
.to_string())
}
pub fn version_base() -> Result<String> {
Ok(unsafe { CStr::from_ptr(SIM_version_base()) }
.to_str()?
.to_string())
}
pub fn version_major() -> Result<String> {
Ok(unsafe { CStr::from_ptr(SIM_version_major()) }
.to_str()?
.to_string())
}
pub fn vmxmon_version() -> Result<String> {
Ok(unsafe { CStr::from_ptr(SIM_vmxmon_version()) }
.to_str()?
.to_string())
}
pub fn copyright() -> Result<String> {
Ok(unsafe { CStr::from_ptr(SIM_copyright()) }
.to_str()?
.to_string())
}