mdbx: add float-point-free mdbx_ratio2percents() and mdbx_ratio2digits() to API for tools.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2025-10-28 23:46:07 +03:00
parent 8b2aa9fb65
commit dccc807aff
2 changed files with 30 additions and 0 deletions

4
mdbx.h
View File

@@ -6675,6 +6675,10 @@ LIBMDBX_API int mdbx_env_chk(MDBX_env *env, const MDBX_chk_callbacks_t *cb, MDBX
* \returns Нулевое значение в случае успеха, иначе код ошибки. */
LIBMDBX_API int mdbx_env_chk_encount_problem(MDBX_chk_context_t *ctx);
LIBMDBX_API const char *mdbx_ratio2digits(uint64_t numerator, uint64_t denominator, int precision, char* buffer, size_t buffer_size);
LIBMDBX_API const char *mdbx_ratio2percents(uint64_t value, uint64_t whole, char *buffer, size_t buffer_size);
/** end of chk @} */
/** end of c_api @} */