billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=836baf5d63e74a46d2d0fb028cd8457c4467587c
commit 836baf5d63e74a46d2d0fb028cd8457c4467587c Author: Boris Faure <bill...@gmail.com> Date: Sun Dec 18 18:46:41 2016 +0100 private: add macros ROUND_UP and DIV_ROUND_UP --- src/bin/private.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/bin/private.h b/src/bin/private.h index c797499..0e7eb90 100644 --- a/src/bin/private.h +++ b/src/bin/private.h @@ -28,4 +28,14 @@ extern int _log_domain; # define MAX(x, y) (((x) > (y)) ? (x) : (y)) #endif +#ifndef DIV_ROUND_UP +# define DIV_ROUND_UP(_v, _n) \ + (((_v) + (_n) - 1) / (_n)) +#endif + +#ifndef ROUND_UP +# define ROUND_UP(_v, _n) \ + (DIV_ROUND_UP((_v), (_n)) * (_n)) +#endif + #endif --