2011-08-29 14:37:47 +10:00
|
|
|
/*
|
2018-08-04 15:14:06 +10:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2011-08-29 14:37:47 +10:00
|
|
|
*
|
2012-04-23 13:06:41 +10:00
|
|
|
* Copyright 2011 Danny Robson <danny@nerdcruft.net>
|
2011-08-29 14:37:47 +10:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __UTIL_SI_HPP
|
|
|
|
#define __UTIL_SI_HPP
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
uintmax_t to_KiB (uintmax_t bytes);
|
|
|
|
uintmax_t to_MiB (uintmax_t bytes);
|
|
|
|
uintmax_t to_GiB (uintmax_t bytes);
|
|
|
|
|
|
|
|
uintmax_t from_KiB (uintmax_t bytes);
|
|
|
|
uintmax_t from_MiB (uintmax_t bytes);
|
|
|
|
uintmax_t from_GiB (uintmax_t bytes);
|
|
|
|
|
2015-04-13 18:06:08 +10:00
|
|
|
#endif
|