[PATCH 1/4] fb: Rename READ/WRITE macros to FB_READ/FB_WRITE

Alex Deucher alexdeucher at gmail.com
Tue Jan 14 06:04:49 PST 2014


On Mon, Jan 13, 2014 at 9:00 PM, Keith Packard <keithp at keithp.com> wrote:
> Avoid conflicts with external macros
>
> Signed-off-by: Keith Packard <keithp at keithp.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  fb/fb.h        |  26 ++++++-----
>  fb/fb24_32.c   |  60 +++++++++++++-------------
>  fb/fbbits.c    |  16 +++----
>  fb/fbbits.h    |  98 ++++++++++++++++++++---------------------
>  fb/fbblt.c     | 134 ++++++++++++++++++++++++++++-----------------------------
>  fb/fbbltone.c  |  46 ++++++++++----------
>  fb/fbgc.c      |   6 +--
>  fb/fbglyph.c   |  96 ++++++++++++++++++++---------------------
>  fb/fbpixmap.c  |   6 +--
>  fb/fbpoint.c   |   6 +--
>  fb/fbpush.c    |   6 +--
>  fb/fbseg.c     |  20 ++++-----
>  fb/fbsolid.c   |  28 ++++++------
>  fb/fbstipple.c |   6 +--
>  fb/fbtile.c    |   6 +--
>  15 files changed, 279 insertions(+), 281 deletions(-)
>
> diff --git a/fb/fb.h b/fb/fb.h
> index 9057767..f5eb1e1 100644
> --- a/fb/fb.h
> +++ b/fb/fb.h
> @@ -45,14 +45,14 @@
>
>  #include "wfbrename.h"
>  #define FBPREFIX(x) wfb##x
> -#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
> -#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
> +#define FB_WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr))))
> +#define FB_READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr))))
>
>  #define MEMCPY_WRAPPED(dst, src, size) do {                       \
>      size_t _i;                                                    \
>      CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src);           \
>      for(_i = 0; _i < size; _i++) {                                \
> -        WRITE(_dst +_i, READ(_src + _i));                         \
> +        FB_WRITE(_dst +_i, FB_READ(_src + _i));                   \
>      }                                                             \
>  } while(0)
>
> @@ -60,15 +60,15 @@
>      size_t _i;                                                    \
>      CARD8 *_dst = (CARD8*)(dst);                                  \
>      for(_i = 0; _i < size; _i++) {                                \
> -        WRITE(_dst +_i, (val));                                   \
> +        FB_WRITE(_dst +_i, (val));                                \
>      }                                                             \
>  } while(0)
>
>  #else
>
>  #define FBPREFIX(x) fb##x
> -#define WRITE(ptr, val) (*(ptr) = (val))
> -#define READ(ptr) (*(ptr))
> +#define FB_WRITE(ptr, val) (*(ptr) = (val))
> +#define FB_READ(ptr) (*(ptr))
>  #define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size))
>  #define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size))
>
> @@ -218,7 +218,7 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
>
>  #define FbPtrOffset(p,o,t)             ((t *) ((CARD8 *) (p) + (o)))
>  #define FbSelectPatternPart(xor,o,t)   ((xor) >> (FbPatternOffset (o,t) << 3))
> -#define FbStorePart(dst,off,t,xor)     (WRITE(FbPtrOffset(dst,off,t), \
> +#define FbStorePart(dst,off,t,xor)     (FB_WRITE(FbPtrOffset(dst,off,t), \
>                                          FbSelectPart(xor,off,t)))
>  #ifndef FbSelectPart
>  #define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
> @@ -399,7 +399,7 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
>         FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
>         break; \
>      default: \
> -       WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \
> +       FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), and, xor, l)); \
>         break; \
>      } \
>  }
> @@ -418,7 +418,7 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
>         break; \
>      FbDoRightMaskByteRRop6Cases(dst,xor) \
>      default: \
> -       WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \
> +       FB_WRITE(dst, FbDoMaskRRop (FB_READ(dst), and, xor, r)); \
>      } \
>  }
>
> @@ -451,12 +451,12 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
>
>  #define FbLaneCase1(n,a,o)                                             \
>      if ((n) == 0x01) {                                                 \
> -       WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor);         \
> +       FB_WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor);              \
>      }
>
>  #define FbLaneCase2(n,a,o)                                             \
>      if ((n) == 0x03) {                                                 \
> -       WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor);       \
> +       FB_WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor);    \
>      } else {                                                           \
>         FbLaneCase1((n)&1,a,o)                                          \
>         FbLaneCase1((n)>>1,a,(o)+1)                                     \
> @@ -464,7 +464,7 @@ extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data);
>
>  #define FbLaneCase4(n,a,o)                                             \
>      if ((n) == 0x0f) {                                                 \
> -       WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor);       \
> +       FB_WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor);    \
>      } else {                                                           \
>         FbLaneCase2((n)&3,a,o)                                          \
>         FbLaneCase2((n)>>2,a,(o)+2)                                     \
> @@ -989,7 +989,6 @@ extern _X_EXPORT void
>   * fbblt.c
>   */
>  extern _X_EXPORT void
> -
>  fbBlt(FbBits * src,
>        FbStride srcStride,
>        int srcX,
> @@ -1000,7 +999,6 @@ fbBlt(FbBits * src,
>        int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown);
>
>  extern _X_EXPORT void
> -
>  fbBlt24(FbBits * srcLine,
>          FbStride srcStride,
>          int srcX,
> diff --git a/fb/fb24_32.c b/fb/fb24_32.c
> index ecb3951..3ef0373 100644
> --- a/fb/fb24_32.c
> +++ b/fb/fb24_32.c
> @@ -37,18 +37,18 @@
>   * by reading/writing aligned CARD32s where it's easy
>   */
>
> -#define Get8(a)        ((CARD32) READ(a))
> +#define Get8(a)        ((CARD32) FB_READ(a))
>
>  #if BITMAP_BIT_ORDER == MSBFirst
>  #define Get24(a)    ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2))
> -#define Put24(a,p)  ((WRITE((a+0), (CARD8) ((p) >> 16))), \
> -                    (WRITE((a+1), (CARD8) ((p) >> 8))), \
> -                    (WRITE((a+2), (CARD8) (p))))
> +#define Put24(a,p)  ((FB_WRITE((a+0), (CARD8) ((p) >> 16))), \
> +                    (FB_WRITE((a+1), (CARD8) ((p) >> 8))), \
> +                    (FB_WRITE((a+2), (CARD8) (p))))
>  #else
>  #define Get24(a)    (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16))
> -#define Put24(a,p)  ((WRITE((a+0), (CARD8) (p))), \
> -                    (WRITE((a+1), (CARD8) ((p) >> 8))), \
> -                    (WRITE((a+2), (CARD8) ((p) >> 16))))
> +#define Put24(a,p)  ((FB_WRITE((a+0), (CARD8) (p))), \
> +                    (FB_WRITE((a+1), (CARD8) ((p) >> 8))), \
> +                    (FB_WRITE((a+2), (CARD8) ((p) >> 16))))
>  #endif
>
>  typedef void (*fb24_32BltFunc) (CARD8 *srcLine,
> @@ -90,7 +90,7 @@ fb24_32BltDown(CARD8 *srcLine,
>          if (destInvarient) {
>              while (((long) dst & 3) && w) {
>                  w--;
> -                pixel = READ(src++);
> +                pixel = FB_READ(src++);
>                  pixel = FbDoDestInvarientMergeRop(pixel);
>                  Put24(dst, pixel);
>                  dst += 3;
> @@ -99,37 +99,37 @@ fb24_32BltDown(CARD8 *srcLine,
>              while (w >= 4) {
>                  CARD32 s0, s1;
>
> -                s0 = READ(src++);
> +                s0 = FB_READ(src++);
>                  s0 = FbDoDestInvarientMergeRop(s0);
> -                s1 = READ(src++);
> +                s1 = FB_READ(src++);
>                  s1 = FbDoDestInvarientMergeRop(s1);
>  #if BITMAP_BIT_ORDER == LSBFirst
> -                WRITE((CARD32 *) dst, (s0 & 0xffffff) | (s1 << 24));
> +                FB_WRITE((CARD32 *) dst, (s0 & 0xffffff) | (s1 << 24));
>  #else
> -                WRITE((CARD32 *) dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
> +                FB_WRITE((CARD32 *) dst, (s0 << 8) | ((s1 & 0xffffff) >> 16));
>  #endif
> -                s0 = READ(src++);
> +                s0 = FB_READ(src++);
>                  s0 = FbDoDestInvarientMergeRop(s0);
>  #if BITMAP_BIT_ORDER == LSBFirst
> -                WRITE((CARD32 *) (dst + 4),
> +                FB_WRITE((CARD32 *) (dst + 4),
>                        ((s1 & 0xffffff) >> 8) | (s0 << 16));
>  #else
> -                WRITE((CARD32 *) (dst + 4),
> +                FB_WRITE((CARD32 *) (dst + 4),
>                        (s1 << 16) | ((s0 & 0xffffff) >> 8));
>  #endif
> -                s1 = READ(src++);
> +                s1 = FB_READ(src++);
>                  s1 = FbDoDestInvarientMergeRop(s1);
>  #if BITMAP_BIT_ORDER == LSBFirst
> -                WRITE((CARD32 *) (dst + 8),
> +                FB_WRITE((CARD32 *) (dst + 8),
>                        ((s0 & 0xffffff) >> 16) | (s1 << 8));
>  #else
> -                WRITE((CARD32 *) (dst + 8), (s0 << 24) | (s1 & 0xffffff));
> +                FB_WRITE((CARD32 *) (dst + 8), (s0 << 24) | (s1 & 0xffffff));
>  #endif
>                  dst += 12;
>                  w -= 4;
>              }
>              while (w--) {
> -                pixel = READ(src++);
> +                pixel = FB_READ(src++);
>                  pixel = FbDoDestInvarientMergeRop(pixel);
>                  Put24(dst, pixel);
>                  dst += 3;
> @@ -137,7 +137,7 @@ fb24_32BltDown(CARD8 *srcLine,
>          }
>          else {
>              while (w--) {
> -                pixel = READ(src++);
> +                pixel = FB_READ(src++);
>                  dpixel = Get24(dst);
>                  pixel = FbDoMergeRop(pixel, dpixel);
>                  Put24(dst, pixel);
> @@ -180,39 +180,39 @@ fb24_32BltUp(CARD8 *srcLine,
>                  w--;
>                  pixel = Get24(src);
>                  src += 3;
> -                WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> +                FB_WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
>              }
>              /* Do four aligned pixels at a time */
>              while (w >= 4) {
>                  CARD32 s0, s1;
>
> -                s0 = READ((CARD32 *) src);
> +                s0 = FB_READ((CARD32 *) src);
>  #if BITMAP_BIT_ORDER == LSBFirst
>                  pixel = s0 & 0xffffff;
>  #else
>                  pixel = s0 >> 8;
>  #endif
> -                WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> -                s1 = READ((CARD32 *) (src + 4));
> +                FB_WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> +                s1 = FB_READ((CARD32 *) (src + 4));
>  #if BITMAP_BIT_ORDER == LSBFirst
>                  pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff);
>  #else
>                  pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16);
>  #endif
> -                WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> -                s0 = READ((CARD32 *) (src + 8));
> +                FB_WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> +                s0 = FB_READ((CARD32 *) (src + 8));
>  #if BITMAP_BIT_ORDER == LSBFirst
>                  pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff);
>  #else
>                  pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24);
>  #endif
> -                WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> +                FB_WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
>  #if BITMAP_BIT_ORDER == LSBFirst
>                  pixel = s0 >> 8;
>  #else
>                  pixel = s0 & 0xffffff;
>  #endif
> -                WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> +                FB_WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
>                  src += 12;
>                  w -= 4;
>              }
> @@ -220,14 +220,14 @@ fb24_32BltUp(CARD8 *srcLine,
>                  w--;
>                  pixel = Get24(src);
>                  src += 3;
> -                WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
> +                FB_WRITE(dst++, FbDoDestInvarientMergeRop(pixel));
>              }
>          }
>          else {
>              while (w--) {
>                  pixel = Get24(src);
>                  src += 3;
> -                WRITE(dst, FbDoMergeRop(pixel, READ(dst)));
> +                FB_WRITE(dst, FbDoMergeRop(pixel, FB_READ(dst)));
>                  dst++;
>              }
>          }
> diff --git a/fb/fbbits.c b/fb/fbbits.c
> index ac44f3e..3b20fec 100644
> --- a/fb/fbbits.c
> +++ b/fb/fbbits.c
> @@ -100,14 +100,14 @@
>  #define BITSUNIT    BYTE
>  #define BITSMUL            3
>
> -#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s))
> -#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\
> -                                                         (a) >> (s), \
> -                                                         (x) >> (s)))
> -#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\
> -                                                                   (a) >> (s), \
> -                                                                   (x) >> (s), \
> -                                                                   (m) >> (s)))
> +#define FbDoTypeStore(b,t,x,s) FB_WRITE(((t *) (b)), (x) >> (s))
> +#define FbDoTypeRRop(b,t,a,x,s) FB_WRITE((t *) (b), FbDoRRop(FB_READ((t *) (b)),\
> +                                                             (a) >> (s), \
> +                                                             (x) >> (s)))
> +#define FbDoTypeMaskRRop(b,t,a,x,m,s) FB_WRITE((t *) (b), FbDoMaskRRop(FB_READ((t *) (b)), \
> +                                                                       (a) >> (s), \
> +                                                                       (x) >> (s), \
> +                                                                       (m) >> (s)))
>  #if BITMAP_BIT_ORDER == LSBFirst
>  #define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \
>                          (FbDoTypeStore (b, CARD8, x, 0), \
> diff --git a/fb/fbbits.h b/fb/fbbits.h
> index be32d8c..d238266 100644
> --- a/fb/fbbits.h
> +++ b/fb/fbbits.h
> @@ -40,13 +40,13 @@
>  #ifdef BITSSTORE
>  #define STORE(b,x)  BITSSTORE(b,x)
>  #else
> -#define STORE(b,x)  WRITE((b), (x))
> +#define STORE(b,x)  FB_WRITE((b), (x))
>  #endif
>
>  #ifdef BITSRROP
>  #define RROP(b,a,x)    BITSRROP(b,a,x)
>  #else
> -#define RROP(b,a,x)    WRITE((b), FbDoRRop (READ(b), (a), (x)))
> +#define RROP(b,a,x)    FB_WRITE((b), FbDoRRop (FB_READ(b), (a), (x)))
>  #endif
>
>  #ifdef BITSUNIT
> @@ -472,27 +472,27 @@ ARC(FbBits * dst,
>
>  #ifdef GLYPH
>  #if BITMAP_BIT_ORDER == LSBFirst
> -#define WRITE_ADDR1(n)     (n)
> -#define WRITE_ADDR2(n)     (n)
> -#define WRITE_ADDR4(n)     (n)
> +#define FB_WRITE_ADDR1(n)          (n)
> +#define FB_WRITE_ADDR2(n)          (n)
> +#define FB_WRITE_ADDR4(n)          (n)
>  #else
> -#define WRITE_ADDR1(n)     ((n) ^ 3)
> -#define WRITE_ADDR2(n)     ((n) ^ 2)
> -#define WRITE_ADDR4(n)     ((n))
> +#define FB_WRITE_ADDR1(n)          ((n) ^ 3)
> +#define FB_WRITE_ADDR2(n)          ((n) ^ 2)
> +#define FB_WRITE_ADDR4(n)          ((n))
>  #endif
>
> -#define WRITE1(d,n,fg)     WRITE(d + WRITE_ADDR1(n), (BITS) (fg))
> +#define FB_WRITE1(d,n,fg)          FB_WRITE(d + FB_WRITE_ADDR1(n), (BITS) (fg))
>
>  #ifdef BITS2
> -#define WRITE2(d,n,fg)     WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg))
> +#define FB_WRITE2(d,n,fg)          FB_WRITE((BITS2 *) &((d)[FB_WRITE_ADDR2(n)]), (BITS2) (fg))
>  #else
> -#define WRITE2(d,n,fg)     (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg))
> +#define FB_WRITE2(d,n,fg)          (FB_WRITE1(d,n,fg), FB_WRITE1(d,(n)+1,fg))
>  #endif
>
>  #ifdef BITS4
> -#define WRITE4(d,n,fg)     WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg))
> +#define FB_WRITE4(d,n,fg)          FB_WRITE((BITS4 *) &((d)[FB_WRITE_ADDR4(n)]), (BITS4) (fg))
>  #else
> -#define WRITE4(d,n,fg)     (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg))
> +#define FB_WRITE4(d,n,fg)          (FB_WRITE2(d,n,fg), FB_WRITE2(d,(n)+2,fg))
>  #endif
>
>  void
> @@ -521,57 +521,57 @@ GLYPH(FbBits * dstBits,
>              case 0:
>                  break;
>              case 1:
> -                WRITE1(dst, 0, fg);
> +                FB_WRITE1(dst, 0, fg);
>                  break;
>              case 2:
> -                WRITE1(dst, 1, fg);
> +                FB_WRITE1(dst, 1, fg);
>                  break;
>              case 3:
> -                WRITE2(dst, 0, fg);
> +                FB_WRITE2(dst, 0, fg);
>                  break;
>              case 4:
> -                WRITE1(dst, 2, fg);
> +                FB_WRITE1(dst, 2, fg);
>                  break;
>              case 5:
> -                WRITE1(dst, 0, fg);
> -                WRITE1(dst, 2, fg);
> +                FB_WRITE1(dst, 0, fg);
> +                FB_WRITE1(dst, 2, fg);
>                  break;
>              case 6:
> -                WRITE1(dst, 1, fg);
> -                WRITE1(dst, 2, fg);
> +                FB_WRITE1(dst, 1, fg);
> +                FB_WRITE1(dst, 2, fg);
>                  break;
>              case 7:
> -                WRITE2(dst, 0, fg);
> -                WRITE1(dst, 2, fg);
> +                FB_WRITE2(dst, 0, fg);
> +                FB_WRITE1(dst, 2, fg);
>                  break;
>              case 8:
> -                WRITE1(dst, 3, fg);
> +                FB_WRITE1(dst, 3, fg);
>                  break;
>              case 9:
> -                WRITE1(dst, 0, fg);
> -                WRITE1(dst, 3, fg);
> +                FB_WRITE1(dst, 0, fg);
> +                FB_WRITE1(dst, 3, fg);
>                  break;
>              case 10:
> -                WRITE1(dst, 1, fg);
> -                WRITE1(dst, 3, fg);
> +                FB_WRITE1(dst, 1, fg);
> +                FB_WRITE1(dst, 3, fg);
>                  break;
>              case 11:
> -                WRITE2(dst, 0, fg);
> -                WRITE1(dst, 3, fg);
> +                FB_WRITE2(dst, 0, fg);
> +                FB_WRITE1(dst, 3, fg);
>                  break;
>              case 12:
> -                WRITE2(dst, 2, fg);
> +                FB_WRITE2(dst, 2, fg);
>                  break;
>              case 13:
> -                WRITE1(dst, 0, fg);
> -                WRITE2(dst, 2, fg);
> +                FB_WRITE1(dst, 0, fg);
> +                FB_WRITE2(dst, 2, fg);
>                  break;
>              case 14:
> -                WRITE1(dst, 1, fg);
> -                WRITE2(dst, 2, fg);
> +                FB_WRITE1(dst, 1, fg);
> +                FB_WRITE2(dst, 2, fg);
>                  break;
>              case 15:
> -                WRITE4(dst, 0, fg);
> +                FB_WRITE4(dst, 0, fg);
>                  break;
>              }
>              bits = FbStipLeft(bits, n);
> @@ -582,12 +582,12 @@ GLYPH(FbBits * dstBits,
>      }
>  }
>
> -#undef WRITE_ADDR1
> -#undef WRITE_ADDR2
> -#undef WRITE_ADDR4
> -#undef WRITE1
> -#undef WRITE2
> -#undef WRITE4
> +#undef FB_WRITE_ADDR1
> +#undef FB_WRITE_ADDR2
> +#undef FB_WRITE_ADDR4
> +#undef FB_WRITE1
> +#undef FB_WRITE2
> +#undef FB_WRITE4
>
>  #endif
>
> @@ -798,23 +798,23 @@ POLYSEGMENT(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg)
>                  dstX &= FB_MASK;
>                  FbMaskBits(dstX, width, startmask, nmiddle, endmask);
>                  if (startmask) {
> -                    WRITE(dstLine,
> -                          FbDoMaskRRop(READ(dstLine), andBits, xorBits,
> +                    FB_WRITE(dstLine,
> +                          FbDoMaskRRop(FB_READ(dstLine), andBits, xorBits,
>                                         startmask));
>                      dstLine++;
>                  }
>                  if (!andBits)
>                      while (nmiddle--)
> -                        WRITE(dstLine++, xorBits);
> +                        FB_WRITE(dstLine++, xorBits);
>                  else
>                      while (nmiddle--) {
> -                        WRITE(dstLine,
> -                              FbDoRRop(READ(dstLine), andBits, xorBits));
> +                        FB_WRITE(dstLine,
> +                              FbDoRRop(FB_READ(dstLine), andBits, xorBits));
>                          dstLine++;
>                      }
>                  if (endmask)
> -                    WRITE(dstLine,
> -                          FbDoMaskRRop(READ(dstLine), andBits, xorBits,
> +                    FB_WRITE(dstLine,
> +                          FbDoMaskRRop(FB_READ(dstLine), andBits, xorBits,
>                                         endmask));
>              }
>              else {
> diff --git a/fb/fbblt.c b/fb/fbblt.c
> index 72a05f6..e017aef 100644
> --- a/fb/fbblt.c
> +++ b/fb/fbblt.c
> @@ -122,31 +122,31 @@ fbBlt(FbBits * srcLine,
>              dstLine += dstStride;
>              if (reverse) {
>                  if (endmask) {
> -                    bits = READ(--src);
> +                    bits = FB_READ(--src);
>                      --dst;
>                      FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
>                  }
>                  n = nmiddle;
>                  if (destInvarient) {
>                      while (n--)
> -                        WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src)));
> +                        FB_WRITE(--dst, FbDoDestInvarientMergeRop(FB_READ(--src)));
>                  }
>                  else {
>                      while (n--) {
> -                        bits = READ(--src);
> +                        bits = FB_READ(--src);
>                          --dst;
> -                        WRITE(dst, FbDoMergeRop(bits, READ(dst)));
> +                        FB_WRITE(dst, FbDoMergeRop(bits, FB_READ(dst)));
>                      }
>                  }
>                  if (startmask) {
> -                    bits = READ(--src);
> +                    bits = FB_READ(--src);
>                      --dst;
>                      FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
>                  }
>              }
>              else {
>                  if (startmask) {
> -                    bits = READ(src++);
> +                    bits = FB_READ(src++);
>                      FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
>                      dst++;
>                  }
> @@ -175,17 +175,17 @@ fbBlt(FbBits * srcLine,
>                      }
>  #endif
>                      while (n--)
> -                        WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++)));
> +                        FB_WRITE(dst++, FbDoDestInvarientMergeRop(FB_READ(src++)));
>                  }
>                  else {
>                      while (n--) {
> -                        bits = READ(src++);
> -                        WRITE(dst, FbDoMergeRop(bits, READ(dst)));
> +                        bits = FB_READ(src++);
> +                        FB_WRITE(dst, FbDoMergeRop(bits, FB_READ(dst)));
>                          dst++;
>                      }
>                  }
>                  if (endmask) {
> -                    bits = READ(src);
> +                    bits = FB_READ(src);
>                      FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
>                  }
>              }
> @@ -209,11 +209,11 @@ fbBlt(FbBits * srcLine,
>              bits1 = 0;
>              if (reverse) {
>                  if (srcX < dstX)
> -                    bits1 = READ(--src);
> +                    bits1 = FB_READ(--src);
>                  if (endmask) {
>                      bits = FbScrRight(bits1, rightShift);
>                      if (FbScrRight(endmask, leftShift)) {
> -                        bits1 = READ(--src);
> +                        bits1 = FB_READ(--src);
>                          bits |= FbScrLeft(bits1, leftShift);
>                      }
>                      --dst;
> @@ -223,25 +223,25 @@ fbBlt(FbBits * srcLine,
>                  if (destInvarient) {
>                      while (n--) {
>                          bits = FbScrRight(bits1, rightShift);
> -                        bits1 = READ(--src);
> +                        bits1 = FB_READ(--src);
>                          bits |= FbScrLeft(bits1, leftShift);
>                          --dst;
> -                        WRITE(dst, FbDoDestInvarientMergeRop(bits));
> +                        FB_WRITE(dst, FbDoDestInvarientMergeRop(bits));
>                      }
>                  }
>                  else {
>                      while (n--) {
>                          bits = FbScrRight(bits1, rightShift);
> -                        bits1 = READ(--src);
> +                        bits1 = FB_READ(--src);
>                          bits |= FbScrLeft(bits1, leftShift);
>                          --dst;
> -                        WRITE(dst, FbDoMergeRop(bits, READ(dst)));
> +                        FB_WRITE(dst, FbDoMergeRop(bits, FB_READ(dst)));
>                      }
>                  }
>                  if (startmask) {
>                      bits = FbScrRight(bits1, rightShift);
>                      if (FbScrRight(startmask, leftShift)) {
> -                        bits1 = READ(--src);
> +                        bits1 = FB_READ(--src);
>                          bits |= FbScrLeft(bits1, leftShift);
>                      }
>                      --dst;
> @@ -250,11 +250,11 @@ fbBlt(FbBits * srcLine,
>              }
>              else {
>                  if (srcX > dstX)
> -                    bits1 = READ(src++);
> +                    bits1 = FB_READ(src++);
>                  if (startmask) {
>                      bits = FbScrLeft(bits1, leftShift);
>                      if (FbScrLeft(startmask, rightShift)) {
> -                        bits1 = READ(src++);
> +                        bits1 = FB_READ(src++);
>                          bits |= FbScrRight(bits1, rightShift);
>                      }
>                      FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask);
> @@ -264,25 +264,25 @@ fbBlt(FbBits * srcLine,
>                  if (destInvarient) {
>                      while (n--) {
>                          bits = FbScrLeft(bits1, leftShift);
> -                        bits1 = READ(src++);
> +                        bits1 = FB_READ(src++);
>                          bits |= FbScrRight(bits1, rightShift);
> -                        WRITE(dst, FbDoDestInvarientMergeRop(bits));
> +                        FB_WRITE(dst, FbDoDestInvarientMergeRop(bits));
>                          dst++;
>                      }
>                  }
>                  else {
>                      while (n--) {
>                          bits = FbScrLeft(bits1, leftShift);
> -                        bits1 = READ(src++);
> +                        bits1 = FB_READ(src++);
>                          bits |= FbScrRight(bits1, rightShift);
> -                        WRITE(dst, FbDoMergeRop(bits, READ(dst)));
> +                        FB_WRITE(dst, FbDoMergeRop(bits, FB_READ(dst)));
>                          dst++;
>                      }
>                  }
>                  if (endmask) {
>                      bits = FbScrLeft(bits1, leftShift);
>                      if (FbScrLeft(endmask, rightShift)) {
> -                        bits1 = READ(src);
> +                        bits1 = FB_READ(src);
>                          bits |= FbScrRight(bits1, rightShift);
>                      }
>                      FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask);
> @@ -363,39 +363,39 @@ fbBlt24Line(FbBits * src,
>      if (srcX == dstX) {
>          if (reverse) {
>              if (endmask) {
> -                bits = READ(--src);
> +                bits = FB_READ(--src);
>                  --dst;
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & endmask));
>                  mask = FbPrev24Pix(mask);
>              }
>              while (n--) {
> -                bits = READ(--src);
> +                bits = FB_READ(--src);
>                  --dst;
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask));
>                  mask = FbPrev24Pix(mask);
>              }
>              if (startmask) {
> -                bits = READ(--src);
> +                bits = FB_READ(--src);
>                  --dst;
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & startmask));
>              }
>          }
>          else {
>              if (startmask) {
> -                bits = READ(src++);
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
> +                bits = FB_READ(src++);
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & startmask));
>                  dst++;
>                  mask = FbNext24Pix(mask);
>              }
>              while (n--) {
> -                bits = READ(src++);
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
> +                bits = FB_READ(src++);
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask));
>                  dst++;
>                  mask = FbNext24Pix(mask);
>              }
>              if (endmask) {
> -                bits = READ(src);
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
> +                bits = FB_READ(src);
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & endmask));
>              }
>          }
>      }
> @@ -412,61 +412,61 @@ fbBlt24Line(FbBits * src,
>          bits1 = 0;
>          if (reverse) {
>              if (srcX < dstX)
> -                bits1 = READ(--src);
> +                bits1 = FB_READ(--src);
>              if (endmask) {
>                  bits = FbScrRight(bits1, rightShift);
>                  if (FbScrRight(endmask, leftShift)) {
> -                    bits1 = READ(--src);
> +                    bits1 = FB_READ(--src);
>                      bits |= FbScrLeft(bits1, leftShift);
>                  }
>                  --dst;
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & endmask));
>                  mask = FbPrev24Pix(mask);
>              }
>              while (n--) {
>                  bits = FbScrRight(bits1, rightShift);
> -                bits1 = READ(--src);
> +                bits1 = FB_READ(--src);
>                  bits |= FbScrLeft(bits1, leftShift);
>                  --dst;
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask));
>                  mask = FbPrev24Pix(mask);
>              }
>              if (startmask) {
>                  bits = FbScrRight(bits1, rightShift);
>                  if (FbScrRight(startmask, leftShift)) {
> -                    bits1 = READ(--src);
> +                    bits1 = FB_READ(--src);
>                      bits |= FbScrLeft(bits1, leftShift);
>                  }
>                  --dst;
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & startmask));
>              }
>          }
>          else {
>              if (srcX > dstX)
> -                bits1 = READ(src++);
> +                bits1 = FB_READ(src++);
>              if (startmask) {
>                  bits = FbScrLeft(bits1, leftShift);
> -                bits1 = READ(src++);
> +                bits1 = FB_READ(src++);
>                  bits |= FbScrRight(bits1, rightShift);
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & startmask));
>                  dst++;
>                  mask = FbNext24Pix(mask);
>              }
>              while (n--) {
>                  bits = FbScrLeft(bits1, leftShift);
> -                bits1 = READ(src++);
> +                bits1 = FB_READ(src++);
>                  bits |= FbScrRight(bits1, rightShift);
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask));
>                  dst++;
>                  mask = FbNext24Pix(mask);
>              }
>              if (endmask) {
>                  bits = FbScrLeft(bits1, leftShift);
>                  if (FbScrLeft(endmask, rightShift)) {
> -                    bits1 = READ(src);
> +                    bits1 = FB_READ(src);
>                      bits |= FbScrRight(bits1, rightShift);
>                  }
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), mask & endmask));
>              }
>          }
>      }
> @@ -602,67 +602,67 @@ fbBltOdd(FbBits * srcLine,
>          }
>          if (srcX == dstX) {
>              if (startmask) {
> -                bits = READ(src++);
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), startmask));
> +                bits = FB_READ(src++);
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), startmask));
>                  dst++;
>              }
>              n = nmiddle;
>              if (destInvarient) {
>                  while (n--) {
> -                    bits = READ(src++);
> -                    WRITE(dst, FbDoDestInvarientMergeRop(bits));
> +                    bits = FB_READ(src++);
> +                    FB_WRITE(dst, FbDoDestInvarientMergeRop(bits));
>                      dst++;
>                  }
>              }
>              else {
>                  while (n--) {
> -                    bits = READ(src++);
> -                    WRITE(dst, FbDoMergeRop(bits, READ(dst)));
> +                    bits = FB_READ(src++);
> +                    FB_WRITE(dst, FbDoMergeRop(bits, FB_READ(dst)));
>                      dst++;
>                  }
>              }
>              if (endmask) {
> -                bits = READ(src);
> -                WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask));
> +                bits = FB_READ(src);
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits, FB_READ(dst), endmask));
>              }
>          }
>          else {
>              bits = 0;
>              if (srcX > dstX)
> -                bits = READ(src++);
> +                bits = FB_READ(src++);
>              if (startmask) {
>                  bits1 = FbScrLeft(bits, leftShift);
> -                bits = READ(src++);
> +                bits = FB_READ(src++);
>                  bits1 |= FbScrRight(bits, rightShift);
> -                WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), startmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits1, FB_READ(dst), startmask));
>                  dst++;
>              }
>              n = nmiddle;
>              if (destInvarient) {
>                  while (n--) {
>                      bits1 = FbScrLeft(bits, leftShift);
> -                    bits = READ(src++);
> +                    bits = FB_READ(src++);
>                      bits1 |= FbScrRight(bits, rightShift);
> -                    WRITE(dst, FbDoDestInvarientMergeRop(bits1));
> +                    FB_WRITE(dst, FbDoDestInvarientMergeRop(bits1));
>                      dst++;
>                  }
>              }
>              else {
>                  while (n--) {
>                      bits1 = FbScrLeft(bits, leftShift);
> -                    bits = READ(src++);
> +                    bits = FB_READ(src++);
>                      bits1 |= FbScrRight(bits, rightShift);
> -                    WRITE(dst, FbDoMergeRop(bits1, READ(dst)));
> +                    FB_WRITE(dst, FbDoMergeRop(bits1, FB_READ(dst)));
>                      dst++;
>                  }
>              }
>              if (endmask) {
>                  bits1 = FbScrLeft(bits, leftShift);
>                  if (FbScrLeft(endmask, rightShift)) {
> -                    bits = READ(src);
> +                    bits = FB_READ(src);
>                      bits1 |= FbScrRight(bits, rightShift);
>                  }
> -                WRITE(dst, FbDoMaskMergeRop(bits1, READ(dst), endmask));
> +                FB_WRITE(dst, FbDoMaskMergeRop(bits1, FB_READ(dst), endmask));
>              }
>          }
>      }
> diff --git a/fb/fbbltone.c b/fb/fbbltone.c
> index bfcb5a2..4ef87c6 100644
> --- a/fb/fbbltone.c
> +++ b/fb/fbbltone.c
> @@ -54,12 +54,12 @@
>
>  #define LoadBits {\
>      if (leftShift) { \
> -       bitsRight = (src < srcEnd ? READ(src++) : 0); \
> +       bitsRight = (src < srcEnd ? FB_READ(src++) : 0); \
>         bits = (FbStipLeft (bitsLeft, leftShift) | \
>                 FbStipRight(bitsRight, rightShift)); \
>         bitsLeft = bitsRight; \
>      } else \
> -       bits = (src < srcEnd ? READ(src++) : 0); \
> +       bits = (src < srcEnd ? FB_READ(src++) : 0); \
>  }
>
>  #define LaneCases1(n,a)            case n: FbLaneCase(n,a); break
> @@ -276,7 +276,7 @@ fbBltOne(FbStip * src, FbStride srcStride,      /* FbStip units per scanline */
>
>          bitsLeft = 0;
>          if (srcX > dstS)
> -            bitsLeft = READ(src++);
> +            bitsLeft = FB_READ(src++);
>          if (n) {
>              /*
>               * Load first set of stipple bits
> @@ -320,7 +320,7 @@ fbBltOne(FbStip * src, FbStride srcStride,      /* FbStip units per scanline */
>                          else
>  #endif
>                              mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)];
> -                        WRITE(dst, FbOpaqueStipple(mask, fgxor, bgxor));
> +                        FB_WRITE(dst, FbOpaqueStipple(mask, fgxor, bgxor));
>                          dst++;
>                          bits = FbStipLeft(bits, pixelsPerDst);
>                      }
> @@ -342,7 +342,7 @@ fbBltOne(FbStip * src, FbStride srcStride,      /* FbStip units per scanline */
>                              left = FbLeftStipBits(bits, pixelsPerDst);
>                              if (left || !transparent) {
>                                  mask = fbBits[left];
> -                                WRITE(dst, FbStippleRRop(READ(dst), mask,
> +                                FB_WRITE(dst, FbStippleRRop(FB_READ(dst), mask,
>                                                           fgand, fgxor, bgand,
>                                                           bgxor));
>                              }
> @@ -504,7 +504,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
>         stip = FbLeftStipBits(bits, len); \
>      } else { \
>         stip = FbLeftStipBits(bits, remain); \
> -       bits = (src < srcEnd ? READ(src++) : 0); \
> +       bits = (src < srcEnd ? FB_READ(src++) : 0); \
>         __len = (len) - remain; \
>         stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \
>                                      remain, __len); \
> @@ -515,7 +515,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = {
>  }
>
>  #define fbInitStipBits(offset,len,stip) {\
> -    bits = FbStipLeft (READ(src++),offset); \
> +    bits = FbStipLeft (FB_READ(src++),offset); \
>      remain = FB_STIP_UNIT - offset; \
>      fbFirstStipBits(len,stip); \
>      stip = FbMergeStip24Bits (0, stip, len); \
> @@ -589,7 +589,7 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              fbInitStipBits(srcX, firstlen, stip);
>              if (leftMask) {
>                  mask = fbStipple24Bits[rot >> 3][stip];
> -                WRITE(dst, (READ(dst) & ~leftMask) |
> +                FB_WRITE(dst, (FB_READ(dst) & ~leftMask) |
>                        (FbOpaqueStipple(mask,
>                                         FbRot24(fgxor, rot), FbRot24(bgxor, rot))
>                         & leftMask));
> @@ -599,7 +599,7 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              nl = nlMiddle;
>              while (nl--) {
>                  mask = fbStipple24Bits[rot >> 3][stip];
> -                WRITE(dst, FbOpaqueStipple(mask,
> +                FB_WRITE(dst, FbOpaqueStipple(mask,
>                                             FbRot24(fgxor, rot),
>                                             FbRot24(bgxor, rot)));
>                  dst++;
> @@ -607,7 +607,7 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              }
>              if (rightMask) {
>                  mask = fbStipple24Bits[rot >> 3][stip];
> -                WRITE(dst, (READ(dst) & ~rightMask) |
> +                FB_WRITE(dst, (FB_READ(dst) & ~rightMask) |
>                        (FbOpaqueStipple(mask,
>                                         FbRot24(fgxor, rot), FbRot24(bgxor, rot))
>                         & rightMask));
> @@ -626,8 +626,8 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              if (leftMask) {
>                  if (stip) {
>                      mask = fbStipple24Bits[rot >> 3][stip] & leftMask;
> -                    WRITE(dst,
> -                          (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
> +                    FB_WRITE(dst,
> +                          (FB_READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
>                  }
>                  dst++;
>                  fbNextStipBits(rot, stip);
> @@ -636,8 +636,8 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              while (nl--) {
>                  if (stip) {
>                      mask = fbStipple24Bits[rot >> 3][stip];
> -                    WRITE(dst,
> -                          (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
> +                    FB_WRITE(dst,
> +                          (FB_READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
>                  }
>                  dst++;
>                  fbNextStipBits(rot, stip);
> @@ -645,8 +645,8 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              if (rightMask) {
>                  if (stip) {
>                      mask = fbStipple24Bits[rot >> 3][stip] & rightMask;
> -                    WRITE(dst,
> -                          (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
> +                    FB_WRITE(dst,
> +                          (FB_READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask));
>                  }
>              }
>              dst += dstStride;
> @@ -660,7 +660,7 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              fbInitStipBits(srcX, firstlen, stip);
>              if (leftMask) {
>                  mask = fbStipple24Bits[rot >> 3][stip];
> -                WRITE(dst, FbStippleRRopMask(READ(dst), mask,
> +                FB_WRITE(dst, FbStippleRRopMask(FB_READ(dst), mask,
>                                               FbRot24(fgand, rot),
>                                               FbRot24(fgxor, rot),
>                                               FbRot24(bgand, rot),
> @@ -671,7 +671,7 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              nl = nlMiddle;
>              while (nl--) {
>                  mask = fbStipple24Bits[rot >> 3][stip];
> -                WRITE(dst, FbStippleRRop(READ(dst), mask,
> +                FB_WRITE(dst, FbStippleRRop(FB_READ(dst), mask,
>                                           FbRot24(fgand, rot),
>                                           FbRot24(fgxor, rot),
>                                           FbRot24(bgand, rot),
> @@ -681,7 +681,7 @@ fbBltOne24(FbStip * srcLine, FbStride srcStride,        /* FbStip units per scan
>              }
>              if (rightMask) {
>                  mask = fbStipple24Bits[rot >> 3][stip];
> -                WRITE(dst, FbStippleRRopMask(READ(dst), mask,
> +                FB_WRITE(dst, FbStippleRRopMask(FB_READ(dst), mask,
>                                               FbRot24(fgand, rot),
>                                               FbRot24(fgxor, rot),
>                                               FbRot24(bgand, rot),
> @@ -762,7 +762,7 @@ fbBltPlane(FbBits * src,
>          srcMask = srcMaskFirst;
>          if (srcBpp == 24)
>              srcMask0 = FbRot24(pm, rot0) & FbBitsMask(0, srcBpp);
> -        srcBits = READ(s++);
> +        srcBits = FB_READ(s++);
>
>          dstMask = dstMaskFirst;
>          dstUnion = 0;
> @@ -772,13 +772,13 @@ fbBltPlane(FbBits * src,
>
>          while (wt--) {
>              if (!srcMask) {
> -                srcBits = READ(s++);
> +                srcBits = FB_READ(s++);
>                  if (srcBpp == 24)
>                      srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0, 24);
>                  srcMask = srcMask0;
>              }
>              if (!dstMask) {
> -                WRITE(d, FbStippleRRopMask(READ(d), dstBits,
> +                FB_WRITE(d, FbStippleRRopMask(FB_READ(d), dstBits,
>                                             fgand, fgxor, bgand, bgxor,
>                                             dstUnion));
>                  d++;
> @@ -796,7 +796,7 @@ fbBltPlane(FbBits * src,
>              dstMask = FbStipRight(dstMask, 1);
>          }
>          if (dstUnion)
> -            WRITE(d, FbStippleRRopMask(READ(d), dstBits,
> +            FB_WRITE(d, FbStippleRRopMask(FB_READ(d), dstBits,
>                                         fgand, fgxor, bgand, bgxor, dstUnion));
>      }
>  }
> diff --git a/fb/fbgc.c b/fb/fbgc.c
> index f4d7f3a..0e3d498 100644
> --- a/fb/fbgc.c
> +++ b/fb/fbgc.c
> @@ -97,13 +97,13 @@ fbPadPixmap(PixmapPtr pPixmap)
>      height = pPixmap->drawable.height;
>      mask = FbBitsMask(0, width);
>      while (height--) {
> -        b = READ(bits) & mask;
> +        b = FB_READ(bits) & mask;
>          w = width;
>          while (w < FB_UNIT) {
>              b = b | FbScrRight(b, w);
>              w <<= 1;
>          }
> -        WRITE(bits, b);
> +        FB_WRITE(bits, b);
>          bits += stride;
>      }
>
> @@ -144,7 +144,7 @@ fbLineRepeat(FbBits * bits, int len, int width)
>      width = (width + FB_UNIT - 1) >> FB_SHIFT;
>      bits++;
>      while (--width)
> -        if (READ(bits) != first)
> +        if (FB_READ(bits) != first)
>              return FALSE;
>      return TRUE;
>  }
> diff --git a/fb/fbglyph.c b/fb/fbglyph.c
> index 4f2904c..1520890 100644
> --- a/fb/fbglyph.c
> +++ b/fb/fbglyph.c
> @@ -53,13 +53,13 @@ fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height)
>      return RegionContainsRect(pRegion, &box) == rgnIN;
>  }
>
> -#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg)
> -#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg)
> -#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg)
> +#define FB_WRITE1(d,n,fg)      FB_WRITE((d) + (n), (CARD8) fg)
> +#define FB_WRITE2(d,n,fg)      FB_WRITE((CARD16 *) &(d[n]), (CARD16) fg)
> +#define FB_WRITE4(d,n,fg)      FB_WRITE((CARD32 *) &(d[n]), (CARD32) fg)
>  #if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst
> -#define WRITE8(d)      WRITE((FbBits *) &(d[0]), fg)
> +#define FB_WRITE8(d)   FB_WRITE((FbBits *) &(d[0]), fg)
>  #else
> -#define WRITE8(d)      WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB)
> +#define FB_WRITE8(d)   FB_WRITE4(d,0,_ABCA), FB_WRITE4(d,4,_BCAB)
>  #endif
>
>  /*
> @@ -143,7 +143,7 @@ fbGlyph24(FbBits * dstBits,
>      shift = x & 3;
>      lshift = 4 - shift;
>      while (height--) {
> -        bits = READ(stipple++);
> +        bits = FB_READ(stipple++);
>          n = lshift;
>          dst = dstLine;
>          while (bits) {
> @@ -151,81 +151,81 @@ fbGlyph24(FbBits * dstBits,
>              case CASE(0, 0, 0, 0):
>                  break;
>              case CASE(1, 0, 0, 0):
> -                WRITE2(dst, 0, _AB);
> -                WRITE1(dst, 2, _C);
> +                FB_WRITE2(dst, 0, _AB);
> +                FB_WRITE1(dst, 2, _C);
>                  break;
>              case CASE(0, 1, 0, 0):
> -                WRITE1(dst, 3, _A);
> -                WRITE2(dst, 4, _BC);
> +                FB_WRITE1(dst, 3, _A);
> +                FB_WRITE2(dst, 4, _BC);
>                  break;
>              case CASE(1, 1, 0, 0):
> -                WRITE4(dst, 0, _ABCA);
> -                WRITE2(dst, 4, _BC);
> +                FB_WRITE4(dst, 0, _ABCA);
> +                FB_WRITE2(dst, 4, _BC);
>                  break;
>              case CASE(0, 0, 1, 0):
> -                WRITE2(dst, 6, _AB);
> -                WRITE1(dst, 8, _C);
> +                FB_WRITE2(dst, 6, _AB);
> +                FB_WRITE1(dst, 8, _C);
>                  break;
>              case CASE(1, 0, 1, 0):
> -                WRITE2(dst, 0, _AB);
> -                WRITE1(dst, 2, _C);
> +                FB_WRITE2(dst, 0, _AB);
> +                FB_WRITE1(dst, 2, _C);
>
> -                WRITE2(dst, 6, _AB);
> -                WRITE1(dst, 8, _C);
> +                FB_WRITE2(dst, 6, _AB);
> +                FB_WRITE1(dst, 8, _C);
>                  break;
>              case CASE(0, 1, 1, 0):
> -                WRITE1(dst, 3, _A);
> -                WRITE4(dst, 4, _BCAB);
> -                WRITE1(dst, 8, _C);
> +                FB_WRITE1(dst, 3, _A);
> +                FB_WRITE4(dst, 4, _BCAB);
> +                FB_WRITE1(dst, 8, _C);
>                  break;
>              case CASE(1, 1, 1, 0):
> -                WRITE8(dst);
> -                WRITE1(dst, 8, _C);
> +                FB_WRITE8(dst);
> +                FB_WRITE1(dst, 8, _C);
>                  break;
>              case CASE(0, 0, 0, 1):
> -                WRITE1(dst, 9, _A);
> -                WRITE2(dst, 10, _BC);
> +                FB_WRITE1(dst, 9, _A);
> +                FB_WRITE2(dst, 10, _BC);
>                  break;
>              case CASE(1, 0, 0, 1):
> -                WRITE2(dst, 0, _AB);
> -                WRITE1(dst, 2, _C);
> +                FB_WRITE2(dst, 0, _AB);
> +                FB_WRITE1(dst, 2, _C);
>
> -                WRITE1(dst, 9, _A);
> -                WRITE2(dst, 10, _BC);
> +                FB_WRITE1(dst, 9, _A);
> +                FB_WRITE2(dst, 10, _BC);
>                  break;
>              case CASE(0, 1, 0, 1):
> -                WRITE1(dst, 3, _A);
> -                WRITE2(dst, 4, _BC);
> +                FB_WRITE1(dst, 3, _A);
> +                FB_WRITE2(dst, 4, _BC);
>
> -                WRITE1(dst, 9, _A);
> -                WRITE2(dst, 10, _BC);
> +                FB_WRITE1(dst, 9, _A);
> +                FB_WRITE2(dst, 10, _BC);
>                  break;
>              case CASE(1, 1, 0, 1):
> -                WRITE4(dst, 0, _ABCA);
> -                WRITE2(dst, 4, _BC);
> +                FB_WRITE4(dst, 0, _ABCA);
> +                FB_WRITE2(dst, 4, _BC);
>
> -                WRITE1(dst, 9, _A);
> -                WRITE2(dst, 10, _BC);
> +                FB_WRITE1(dst, 9, _A);
> +                FB_WRITE2(dst, 10, _BC);
>                  break;
>              case CASE(0, 0, 1, 1):
> -                WRITE2(dst, 6, _AB);
> -                WRITE4(dst, 8, _CABC);
> +                FB_WRITE2(dst, 6, _AB);
> +                FB_WRITE4(dst, 8, _CABC);
>                  break;
>              case CASE(1, 0, 1, 1):
> -                WRITE2(dst, 0, _AB);
> -                WRITE1(dst, 2, _C);
> +                FB_WRITE2(dst, 0, _AB);
> +                FB_WRITE1(dst, 2, _C);
>
> -                WRITE2(dst, 6, _AB);
> -                WRITE4(dst, 8, _CABC);
> +                FB_WRITE2(dst, 6, _AB);
> +                FB_WRITE4(dst, 8, _CABC);
>                  break;
>              case CASE(0, 1, 1, 1):
> -                WRITE1(dst, 3, _A);
> -                WRITE4(dst, 4, _BCAB);
> -                WRITE4(dst, 8, _CABC);
> +                FB_WRITE1(dst, 3, _A);
> +                FB_WRITE4(dst, 4, _BCAB);
> +                FB_WRITE4(dst, 8, _CABC);
>                  break;
>              case CASE(1, 1, 1, 1):
> -                WRITE8(dst);
> -                WRITE4(dst, 8, _CABC);
> +                FB_WRITE8(dst);
> +                FB_WRITE4(dst, 8, _CABC);
>                  break;
>              }
>              bits = FbStipLeft(bits, n);
> diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
> index 677f28a..9e8ab52 100644
> --- a/fb/fbpixmap.c
> +++ b/fb/fbpixmap.c
> @@ -175,7 +175,7 @@ fbPixmapToRegion(PixmapPtr pPix)
>          irectLineStart = rects - FirstRect;
>          /* If the Screen left most bit of the word is set, we're starting in
>           * a box */
> -        if (READ(pw) & mask0) {
> +        if (FB_READ(pw) & mask0) {
>              fInBox = TRUE;
>              rx1 = 0;
>          }
> @@ -184,7 +184,7 @@ fbPixmapToRegion(PixmapPtr pPix)
>          /* Process all words which are fully in the pixmap */
>          pwLineEnd = pw + (width >> FB_SHIFT);
>          for (base = 0; pw < pwLineEnd; base += FB_UNIT) {
> -            w = READ(pw++);
> +            w = FB_READ(pw++);
>              if (fInBox) {
>                  if (!~w)
>                      continue;
> @@ -217,7 +217,7 @@ fbPixmapToRegion(PixmapPtr pPix)
>          }
>          if (width & FB_MASK) {
>              /* Process final partial word on line */
> -            w = READ(pw++);
> +            w = FB_READ(pw++);
>              for (ib = 0; ib < (width & FB_MASK); ib++) {
>                  /* If the Screen left most bit of the word is set, we're
>                   * starting a box */
> diff --git a/fb/fbpoint.c b/fb/fbpoint.c
> index d5129d7..9117613 100644
> --- a/fb/fbpoint.c
> +++ b/fb/fbpoint.c
> @@ -74,19 +74,19 @@ fbDots(FbBits * dstOrig,
>                  xorT = FbRot24Stip(xor, rot);
>                  FbMaskStip(x, 24, leftMask, n, rightMask);
>                  if (leftMask) {
> -                    WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, leftMask));
> +                    FB_WRITE(d, FbDoMaskRRop(FB_READ(d), andT, xorT, leftMask));
>                      andT = FbNext24Stip(andT);
>                      xorT = FbNext24Stip(xorT);
>                      d++;
>                  }
>                  if (rightMask)
> -                    WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
> +                    FB_WRITE(d, FbDoMaskRRop(FB_READ(d), andT, xorT, rightMask));
>              }
>              else {
>                  FbStip mask;
>
>                  mask = FbStipMask(x, dstBpp);
> -                WRITE(d, FbDoMaskRRop(READ(d), and, xor, mask));
> +                FB_WRITE(d, FbDoMaskRRop(FB_READ(d), and, xor, mask));
>              }
>          }
>      }
> diff --git a/fb/fbpush.c b/fb/fbpush.c
> index f0a861c..28add03 100644
> --- a/fb/fbpush.c
> +++ b/fb/fbpush.c
> @@ -47,7 +47,7 @@ fbPushPattern(DrawablePtr pDrawable,
>          w = width;
>          s = src;
>          src += srcStride;
> -        bits = READ(s++);
> +        bits = FB_READ(s++);
>          xspan = x;
>          while (w) {
>              if (bits & bitsMask) {
> @@ -58,7 +58,7 @@ fbPushPattern(DrawablePtr pDrawable,
>                          break;
>                      bitsMask = FbStipRight(bitsMask, 1);
>                      if (!bitsMask) {
> -                        bits = READ(s++);
> +                        bits = FB_READ(s++);
>                          bitsMask = FbBitsMask(0, 1);
>                      }
>                  } while (bits & bitsMask);
> @@ -74,7 +74,7 @@ fbPushPattern(DrawablePtr pDrawable,
>                          break;
>                      bitsMask = FbStipRight(bitsMask, 1);
>                      if (!bitsMask) {
> -                        bits = READ(s++);
> +                        bits = FB_READ(s++);
>                          bitsMask = FbBitsMask(0, 1);
>                      }
>                  } while (!(bits & bitsMask));
> diff --git a/fb/fbseg.c b/fb/fbseg.c
> index 1848387..5d6f723 100644
> --- a/fb/fbseg.c
> +++ b/fb/fbseg.c
> @@ -66,7 +66,7 @@ fbBresSolid(DrawablePtr pDrawable,
>          bits = 0;
>          while (len--) {
>              if (e >= 0) {
> -                WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits));
> +                FB_WRITE(dst, FbDoMaskRRop (FB_READ(dst), and, xor, bits));
>                  bits = 0;
>                  dst += dstStride;
>                  e += e3;
> @@ -74,7 +74,7 @@ fbBresSolid(DrawablePtr pDrawable,
>              bits |= mask;
>              mask = fbBresShiftMask(mask, signdx, dstBpp);
>              if (!mask) {
> -                WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
> +                FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), and, xor, bits));
>                  bits = 0;
>                  dst += signdx;
>                  mask = mask0;
> @@ -82,7 +82,7 @@ fbBresSolid(DrawablePtr pDrawable,
>              e += e1;
>          }
>          if (bits)
> -            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits));
> +            FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), and, xor, bits));
>      }
>      else {
>          while (len--) {
> @@ -94,7 +94,7 @@ fbBresSolid(DrawablePtr pDrawable,
>                      mask = mask0;
>                  }
>              }
> -            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
> +            FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), and, xor, mask));
>              dst += dstStride;
>              e += e1;
>          }
> @@ -143,9 +143,9 @@ fbBresDash(DrawablePtr pDrawable,
>          dstStride = -dstStride;
>      while (len--) {
>          if (even)
> -            WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask));
> +            FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), and, xor, mask));
>          else if (doOdd)
> -            WRITE(dst, FbDoMaskRRop(READ(dst), bgand, bgxor, mask));
> +            FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), bgand, bgxor, mask));
>          if (axis == X_AXIS) {
>              mask = fbBresShiftMask(mask, signdx, dstBpp);
>              if (!mask) {
> @@ -313,13 +313,13 @@ fbBresSolid24RRop(DrawablePtr pDrawable,
>          xorT = FbRot24Stip(xor, rot);
>          FbMaskStip(x, 24, leftMask, nl, rightMask);
>          if (leftMask) {
> -            WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, leftMask));
> +            FB_WRITE(d, FbDoMaskRRop(FB_READ(d), andT, xorT, leftMask));
>              d++;
>              andT = FbNext24Stip(andT);
>              xorT = FbNext24Stip(xorT);
>          }
>          if (rightMask)
> -            WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
> +            FB_WRITE(d, FbDoMaskRRop(FB_READ(d), andT, xorT, rightMask));
>          if (axis == X_AXIS) {
>              x1 += signdx;
>              e += e1;
> @@ -398,13 +398,13 @@ fbBresDash24RRop(DrawablePtr pDrawable,
>              xorT = FbRot24Stip(xorT, rot);
>              FbMaskStip(x, 24, leftMask, nl, rightMask);
>              if (leftMask) {
> -                WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, leftMask));
> +                FB_WRITE(d, FbDoMaskRRop(FB_READ(d), andT, xorT, leftMask));
>                  d++;
>                  andT = FbNext24Stip(andT);
>                  xorT = FbNext24Stip(xorT);
>              }
>              if (rightMask)
> -                WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask));
> +                FB_WRITE(d, FbDoMaskRRop(FB_READ(d), andT, xorT, rightMask));
>          }
>          if (axis == X_AXIS) {
>              x1 += signdx;
> diff --git a/fb/fbsolid.c b/fb/fbsolid.c
> index cad286a..ac65398 100644
> --- a/fb/fbsolid.c
> +++ b/fb/fbsolid.c
> @@ -56,10 +56,10 @@ fbSolid(FbBits * dst,
>          n = nmiddle;
>          if (!and)
>              while (n--)
> -                WRITE(dst++, xor);
> +                FB_WRITE(dst++, xor);
>          else
>              while (n--) {
> -                WRITE(dst, FbDoRRop(READ(dst), and, xor));
> +                FB_WRITE(dst, FbDoRRop(FB_READ(dst), and, xor));
>                  dst++;
>              }
>          if (endmask)
> @@ -133,47 +133,47 @@ fbSolid24(FbBits * dst,
>
>      while (height--) {
>          if (startmask) {
> -            WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask));
> +            FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), andS, xorS, startmask));
>              dst++;
>          }
>          n = nmiddle;
>          if (!and0) {
>              while (n >= 3) {
> -                WRITE(dst++, xor0);
> -                WRITE(dst++, xor1);
> -                WRITE(dst++, xor2);
> +                FB_WRITE(dst++, xor0);
> +                FB_WRITE(dst++, xor1);
> +                FB_WRITE(dst++, xor2);
>                  n -= 3;
>              }
>              if (n) {
> -                WRITE(dst++, xor0);
> +                FB_WRITE(dst++, xor0);
>                  n--;
>                  if (n) {
> -                    WRITE(dst++, xor1);
> +                    FB_WRITE(dst++, xor1);
>                  }
>              }
>          }
>          else {
>              while (n >= 3) {
> -                WRITE(dst, FbDoRRop(READ(dst), and0, xor0));
> +                FB_WRITE(dst, FbDoRRop(FB_READ(dst), and0, xor0));
>                  dst++;
> -                WRITE(dst, FbDoRRop(READ(dst), and1, xor1));
> +                FB_WRITE(dst, FbDoRRop(FB_READ(dst), and1, xor1));
>                  dst++;
> -                WRITE(dst, FbDoRRop(READ(dst), and2, xor2));
> +                FB_WRITE(dst, FbDoRRop(FB_READ(dst), and2, xor2));
>                  dst++;
>                  n -= 3;
>              }
>              if (n) {
> -                WRITE(dst, FbDoRRop(READ(dst), and0, xor0));
> +                FB_WRITE(dst, FbDoRRop(FB_READ(dst), and0, xor0));
>                  dst++;
>                  n--;
>                  if (n) {
> -                    WRITE(dst, FbDoRRop(READ(dst), and1, xor1));
> +                    FB_WRITE(dst, FbDoRRop(FB_READ(dst), and1, xor1));
>                      dst++;
>                  }
>              }
>          }
>          if (endmask)
> -            WRITE(dst, FbDoMaskRRop(READ(dst), andE, xorE, endmask));
> +            FB_WRITE(dst, FbDoMaskRRop(FB_READ(dst), andE, xorE, endmask));
>          dst += dstStride;
>      }
>  }
> diff --git a/fb/fbstipple.c b/fb/fbstipple.c
> index f6c84a2..41ce5ef 100644
> --- a/fb/fbstipple.c
> +++ b/fb/fbstipple.c
> @@ -138,7 +138,7 @@ fbEvenStipple(FbBits * dst,
>          /*
>           * Extract stipple bits for this scanline;
>           */
> -        bits = READ(s);
> +        bits = FB_READ(s);
>          s += stipStride;
>          if (s == stipEnd)
>              s = stip;
> @@ -176,10 +176,10 @@ fbEvenStipple(FbBits * dst,
>              n = nmiddle;
>              if (!and)
>                  while (n--)
> -                    WRITE(dst++, xor);
> +                    FB_WRITE(dst++, xor);
>              else {
>                  while (n--) {
> -                    WRITE(dst, FbDoRRop(READ(dst), and, xor));
> +                    FB_WRITE(dst, FbDoRRop(FB_READ(dst), and, xor));
>                      dst++;
>                  }
>              }
> diff --git a/fb/fbtile.c b/fb/fbtile.c
> index 785c5f0..2d7d78e 100644
> --- a/fb/fbtile.c
> +++ b/fb/fbtile.c
> @@ -71,7 +71,7 @@ fbEvenTile(FbBits * dst,
>          /*
>           * Pick up bits for this scanline
>           */
> -        bits = READ(t);
> +        bits = FB_READ(t);
>          t += tileStride;
>          if (t >= tileEnd)
>              t = tile;
> @@ -86,10 +86,10 @@ fbEvenTile(FbBits * dst,
>          n = nmiddle;
>          if (!and)
>              while (n--)
> -                WRITE(dst++, xor);
> +                FB_WRITE(dst++, xor);
>          else
>              while (n--) {
> -                WRITE(dst, FbDoRRop(READ(dst), and, xor));
> +                FB_WRITE(dst, FbDoRRop(FB_READ(dst), and, xor));
>                  dst++;
>              }
>          if (endmask)
> --
> 1.8.5.2
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list