summaryrefslogtreecommitdiff
path: root/mfb
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2005-01-14 08:37:30 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2005-01-14 08:37:30 +0000
commit2137bc6eb9f36f4ba999023d83c637024f3a6e4c (patch)
treef69d77a91fc5a74cac78c5fdfccdf473e48b4263 /mfb
parent61b3c3aef5437f14d413a60da792257b01e9f8fa (diff)
xc/programs/Xserver/afb/afbbres.c
xc/programs/Xserver/afb/afbbresd.c xc/programs/Xserver/afb/afbclip.c xc/programs/Xserver/afb/afbhrzvert.c xc/programs/Xserver/afb/afbline.c xc/programs/Xserver/afb/afbmodule.c xc/programs/Xserver/afb/afbpixmap.c xc/programs/Xserver/afb/afbpolypnt.c xc/programs/Xserver/afb/afbpushpxl.c xc/programs/Xserver/afb/afbtegblt.c xc/programs/Xserver/cfb/Imakefile.inc xc/programs/Xserver/cfb/cfballpriv.c xc/programs/Xserver/cfb/cfbbitblt.c xc/programs/Xserver/cfb/cfbcppl.c xc/programs/Xserver/cfb/cfbgc.c xc/programs/Xserver/cfb/cfbglblt8.c xc/programs/Xserver/cfb/cfbmap.h xc/programs/Xserver/cfb/cfbpixmap.c xc/programs/Xserver/cfb/cfbscrinit.c xc/programs/Xserver/cfb/cfbtab.h xc/programs/Xserver/cfb/cfbteblt8.c xc/programs/Xserver/cfb/cfbunmap.h xc/programs/Xserver/mfb/maskbits.c xc/programs/Xserver/mfb/maskbits.h xc/programs/Xserver/mfb/mergerop.h xc/programs/Xserver/mfb/mfb.h xc/programs/Xserver/mfb/mfbclip.c xc/programs/Xserver/mfb/mfbfont.c xc/programs/Xserver/mfb/mfbgc.c xc/programs/Xserver/mfb/mfbmisc.c xc/programs/Xserver/mfb/mfbpushpxl.c //bugs.freedesktop.org/show_bug.cgi?id=1114) attachment #667 (https://bugs.freedesktop.org/attachment.cgi?id=667): Convert afb and cfb{,16,24,32} to be dlloader-friendly. Patch by Adam Jackson <ajax@freedesktop.org>.
Diffstat (limited to 'mfb')
-rw-r--r--mfb/maskbits.c4
-rw-r--r--mfb/maskbits.h2
-rw-r--r--mfb/mergerop.h11
-rw-r--r--mfb/mfb.h34
-rw-r--r--mfb/mfbclip.c6
-rw-r--r--mfb/mfbfont.c12
-rw-r--r--mfb/mfbgc.c6
-rw-r--r--mfb/mfbmisc.c5
-rw-r--r--mfb/mfbpushpxl.c5
9 files changed, 78 insertions, 7 deletions
diff --git a/mfb/maskbits.c b/mfb/maskbits.c
index 4cd2d493b..8f99f2026 100644
--- a/mfb/maskbits.c
+++ b/mfb/maskbits.c
@@ -1053,5 +1053,9 @@ mergeRopRec mergeRopBits[16] = {
{ O,O,O,I, }, /* set 0xf 1 */
};
+mergeRopPtr mergeGetRopBits(int i) {
+ return &mergeRopBits[i];
+}
+
#undef O
#undef I
diff --git a/mfb/maskbits.h b/mfb/maskbits.h
index 5ca79c929..654ab3d0e 100644
--- a/mfb/maskbits.h
+++ b/mfb/maskbits.h
@@ -396,7 +396,7 @@ extern PixelType mfbGetmask(int);
else \
{ \
register int d = PPW-(x); \
- *(pdst) = (*(pdst) & endtab[x]) | (SCRRIGHT((src), x)); \
+ *(pdst) = (*(pdst) & mfbGetendtab(x)) | (SCRRIGHT((src), x)); \
(pdst)[1] = ((pdst)[1] & mfbGetstarttab(n)) | \
(SCRLEFT(src, d) & mfbGetendtab(n)); \
} \
diff --git a/mfb/mergerop.h b/mfb/mergerop.h
index e54e1f906..6b5548b12 100644
--- a/mfb/mergerop.h
+++ b/mfb/mergerop.h
@@ -39,6 +39,7 @@ typedef struct _mergeRopBits {
} mergeRopRec, *mergeRopPtr;
extern mergeRopRec mergeRopBits[16];
+extern mergeRopPtr mergeGetRopBits(int i);
#if defined(PPW) && defined(PGSZ) && (PPW != PGSZ) /* cfb */
#define DeclareMergeRop() MfbBits _ca1 = 0, _cx1 = 0, _ca2 = 0, _cx2 = 0;
@@ -59,7 +60,7 @@ extern mergeRopRec mergeRopBits[16];
MfbBits _pm; \
mergeRopPtr _bits; \
_pm = PFILL(pm); \
- _bits = &mergeRopBits[alu]; \
+ _bits = mergeGetRopBits(alu); \
_ca1 = _bits->ca1 & _pm; \
_cx1 = _bits->cx1 | ~_pm; \
_ca2 = _bits->ca2 & _pm; \
@@ -70,7 +71,7 @@ extern mergeRopRec mergeRopBits[16];
#define InitializeMergeRop24(alu,pm) {\
register int i; \
register MfbBits _pm = (pm) & 0xFFFFFF; \
- mergeRopPtr _bits = &mergeRopBits[alu]; \
+ mergeRopPtr _bits = mergeGetRopBits(alu); \
MfbBits _bits_ca1 = _bits->ca1; \
MfbBits _bits_cx1 = _bits->cx1; \
MfbBits _bits_ca2 = _bits->ca2; \
@@ -88,7 +89,7 @@ extern mergeRopRec mergeRopBits[16];
#define InitializeMergeRop24(alu,pm) {\
register int i; \
register MfbBits _pm = (pm) & cfbmask[0]; \
- mergeRopPtr _bits = &mergeRopBits[alu]; \
+ mergeRopPtr _bits = mergeGetRopBits(alu); \
MfbBits _bits_ca1 = _bits->ca1 & cfbmask[0]; \
MfbBits _bits_cx1 = _bits->cx1 & cfbmask[0]; \
MfbBits _bits_ca2 = _bits->ca2 & cfbmask[0]; \
@@ -111,7 +112,7 @@ extern mergeRopRec mergeRopBits[16];
#else /* mfb */
#define InitializeMergeRop(alu,pm) {\
mergeRopPtr _bits; \
- _bits = &mergeRopBits[alu]; \
+ _bits = mergeGetRopBits(alu); \
_ca1 = _bits->ca1; \
_cx1 = _bits->cx1; \
_ca2 = _bits->ca2; \
@@ -328,7 +329,7 @@ extern mergeRopRec mergeRopBits[16];
#define MROP_DECLARE_REG() register MROP_DECLARE()
#define MROP_INITIALIZE(alu,pm) { \
mergeRopPtr _bits; \
- _bits = &mergeRopBits[alu]; \
+ _bits = mergeGetRopBits(alu); \
_ca1 = _bits->ca1; \
_cx1 = _bits->cx1; \
}
diff --git a/mfb/mfb.h b/mfb/mfb.h
index d0105c93c..6e7ae43b3 100644
--- a/mfb/mfb.h
+++ b/mfb/mfb.h
@@ -64,7 +64,7 @@ SOFTWARE.
#include "mibstore.h"
extern int InverseAlu[];
-
+extern int mfbGetInverseAlu(int i);
/* warning: PixelType definition duplicated in maskbits.h */
#ifndef PixelType
@@ -229,6 +229,13 @@ extern void mfbRestoreAreas(
extern RegionPtr mfbPixmapToRegion(
PixmapPtr /*pPix*/
);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef RegionPtr (*mfbPixmapToRegionProc)(PixmapPtr);
+
+extern mfbPixmapToRegionProc *mfbPixmapToRegionWeak(void);
+#endif
+
/* mfbcmap.c */
extern int mfbListInstalledColormaps(
@@ -371,6 +378,15 @@ extern Bool mfbUnrealizeFont(
ScreenPtr /*pscr*/,
FontPtr /*pFont*/
);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef void (*mfbRealizeFontProc)(ScreenPtr, FontPtr);
+typedef void (*mfbUnrealizeFontProc)(ScreenPtr, FontPtr);
+
+extern mfbRealizeFontProc *mfbRealizeFontWeak(void);
+extern mfbUnrealizeFontProc *mfbUnrealizeFontWeak(void);
+#endif
+
/* mfbgc.c */
extern Bool mfbCreateGC(
@@ -490,6 +506,14 @@ extern void mfbQueryBestSize(
unsigned short * /*pheight*/,
ScreenPtr /*pScreen*/
);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef void (*mfbQueryBestSizeProc)(int, unsigned short *, unsigned short *,
+ ScreenPtr);
+
+extern mfbQueryBestSizeProc *mfbQueryBestSizeWeak(void);
+#endif
+
/* mfbpablack.c */
extern void mfbSolidBlackArea(
@@ -680,6 +704,14 @@ extern void mfbPushPixels(
int /*xOrg*/,
int /*yOrg*/
);
+
+#ifndef MFB_PROTOTYPES_ONLY
+typedef void (*mfbPushPixelsProc)(GCPtr, PixmapPtr, DrawablePtr, int, int,
+ int, int);
+
+extern mfbPushPixelsProc *mfbPushPixelsWeak(void);
+#endif
+
/* mfbscrclse.c */
extern Bool mfbCloseScreen(
diff --git a/mfb/mfbclip.c b/mfb/mfbclip.c
index 3b36819ef..7c9be7f97 100644
--- a/mfb/mfbclip.c
+++ b/mfb/mfbclip.c
@@ -268,3 +268,9 @@ mfbPixmapToRegion(pPix)
#endif
return(pReg);
}
+
+mfbPixmapToRegionProc *
+mfbPixmapToRegionWeak(void)
+{
+ return mfbPixmapToRegion;
+}
diff --git a/mfb/mfbfont.c b/mfb/mfbfont.c
index 499dac52a..f77e70a26 100644
--- a/mfb/mfbfont.c
+++ b/mfb/mfbfont.c
@@ -62,6 +62,12 @@ mfbRealizeFont( pscr, pFont)
return (TRUE);
}
+mfbRealizeFontProc *
+mfbRealizeFontWeak(void)
+{
+ return mfbRealizeFont;
+}
+
/*ARGSUSED*/
Bool
mfbUnrealizeFont( pscr, pFont)
@@ -70,3 +76,9 @@ mfbUnrealizeFont( pscr, pFont)
{
return (TRUE);
}
+
+mfbUnrealizeFontProc *
+mfbUnrealizeFontWeak(void)
+{
+ return mfbUnrealizeFont;
+}
diff --git a/mfb/mfbgc.c b/mfb/mfbgc.c
index aec4c2e7f..c7dccf93d 100644
--- a/mfb/mfbgc.c
+++ b/mfb/mfbgc.c
@@ -1454,6 +1454,12 @@ int InverseAlu[16] = {
GXset
};
+int mfbGetInverseAlu(i)
+ int i;
+{
+ return InverseAlu[i];
+}
+
int
mfbReduceRop(alu, src)
register int alu;
diff --git a/mfb/mfbmisc.c b/mfb/mfbmisc.c
index 67cbf6fc6..c3e0d3d71 100644
--- a/mfb/mfbmisc.c
+++ b/mfb/mfbmisc.c
@@ -89,3 +89,8 @@ ScreenPtr pScreen;
}
}
+mfbQueryBestSizeProc *
+mfbQueryBestSizeWeak(void)
+{
+ return mfbQueryBestSize;
+}
diff --git a/mfb/mfbpushpxl.c b/mfb/mfbpushpxl.c
index 0410af192..b268c559f 100644
--- a/mfb/mfbpushpxl.c
+++ b/mfb/mfbpushpxl.c
@@ -276,3 +276,8 @@ mfbPushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg)
(*pGC->ops->FillSpans)(pDrawable, pGC, ipt, pt, width, TRUE);
}
}
+
+mfbPushPixelsProc *mfbPushPixelsWeak(void)
+{
+ return mfbPushPixels;
+}