diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/macro.h | 9 | ||||
-rw-r--r-- | src/basic/util.h | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index 02f34cedad..01916bd788 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -362,6 +362,15 @@ do { \ sizeof(type) <= 4 ? 10 : \ sizeof(type) <= 8 ? 20 : sizeof(int[-2*(sizeof(type) > 8)]))) +#define DECIMAL_STR_WIDTH(x) \ + ({ \ + typeof(x) _x_ = (x); \ + unsigned ans = 1; \ + while (_x_ /= 10) \ + ans++; \ + ans; \ + }) + #define SET_FLAG(v, flag, b) \ (v) = (b) ? ((v) | (flag)) : ((v) & ~(flag)) diff --git a/src/basic/util.h b/src/basic/util.h index 078c4313b5..fc73e13fe4 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -237,15 +237,6 @@ static inline unsigned log2u_round_up(unsigned x) { return log2u(x - 1) + 1; } -#define DECIMAL_STR_WIDTH(x) \ - ({ \ - typeof(x) _x_ = (x); \ - unsigned ans = 1; \ - while (_x_ /= 10) \ - ans++; \ - ans; \ - }) - #define alloca0(n) \ ({ \ char *_new_; \ |