diff --git a/logic.c b/logic.c index 47ac14a..1bd09c3 100644 --- a/logic.c +++ b/logic.c @@ -17,14 +17,7 @@ * along with this program. If not, see . */ #include "logic.h" - -static int top( const int a, const int b ){ - return a < b ? b : a; -} - -static int bottom( const int a, const int b ){ - return a < b ? a : b; -} +#include "macros.h" static int heightMask( const int a ){ return ( 1 << a ) - 1; diff --git a/macros.h b/macros.h index a364109..0326c6c 100644 --- a/macros.h +++ b/macros.h @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #pragma once +#define top( a, b ) ( a < b ? b : a ) +#define bottom( a, b ) ( a < b ? a : b ) + #define XSTR(s) STR(s) #define STR(s) #s