From c06d9da5b669fd0f3aa81f5353df7cef5ada6eb4 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 22 Apr 2024 18:53:04 +0200 Subject: [PATCH] mi: miline.h: unexport only locally used macros These macros are only used in one source file, so move them there. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- mi/miline.h | 13 ------------- mi/mizerclip.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mi/miline.h b/mi/miline.h index 4eb4a03d5..5e70e73e1 100644 --- a/mi/miline.h +++ b/mi/miline.h @@ -106,14 +106,6 @@ extern _X_EXPORT void miSetZeroLineBias(ScreenPtr /* pScreen */ , if (y > ymax) outcode |= OUT_BELOW;\ } -#define SWAPINT(i, j) \ -{ int _t = i; i = j; j = _t; } - -#define SWAPINT_PAIR(x1, y1, x2, y2)\ -{ int t = x1; x1 = x2; x2 = t;\ - t = y1; y1 = y2; y2 = t;\ -} - #define miGetZeroLineBias(_pScreen) ((unsigned long) (unsigned long*)\ dixLookupPrivate(&(_pScreen)->devPrivates, miZeroLineScreenKey)) @@ -137,11 +129,6 @@ extern _X_EXPORT void miSetZeroLineBias(ScreenPtr /* pScreen */ , #define FIXUP_ERROR(_e, _octant, _bias) \ (_e) -= (((_bias) >> (_octant)) & 1) -#define IsXMajorOctant(_octant) (!((_octant) & YMAJOR)) -#define IsYMajorOctant(_octant) ((_octant) & YMAJOR) -#define IsXDecreasingOctant(_octant) ((_octant) & XDECREASING) -#define IsYDecreasingOctant(_octant) ((_octant) & YDECREASING) - extern _X_EXPORT DevPrivateKeyRec miZeroLineScreenKeyRec; #define miZeroLineScreenKey (&miZeroLineScreenKeyRec) diff --git a/mi/mizerclip.c b/mi/mizerclip.c index e3e2b9616..75c6f70db 100644 --- a/mi/mizerclip.c +++ b/mi/mizerclip.c @@ -395,6 +395,19 @@ the numerator is therefore (2^32 - 1), which does not overflow an unsigned #define EQN8 (T_2NDX | T_ADDDY | T_BIASSUBONE | T_DIV2DY) #define EQN8B (T_2NDX | T_ADDDY | T_BIASSUBONE | T_DIV2DY) +#define SWAPINT(i, j) \ +{ int _t = i; i = j; j = _t; } + +#define SWAPINT_PAIR(x1, y1, x2, y2)\ +{ int t = x1; x1 = x2; x2 = t;\ + t = y1; y1 = y2; y2 = t;\ +} + +#define IsXMajorOctant(_octant) (!((_octant) & YMAJOR)) +#define IsYMajorOctant(_octant) ((_octant) & YMAJOR) +#define IsXDecreasingOctant(_octant) ((_octant) & XDECREASING) +#define IsYDecreasingOctant(_octant) ((_octant) & YDECREASING) + /* miZeroClipLine * * returns: 1 for partially clipped line