mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
mi: replace DDXPoint by xPoint
DDXPoint is just an alias to xPoint Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
62b0add858
commit
8fdd177d8f
17
mi/mi.h
17
mi/mi.h
@@ -288,21 +288,8 @@ extern _X_EXPORT void miZeroPolyArc(DrawablePtr /*pDraw */ ,
|
||||
xArc * /*parcs */
|
||||
);
|
||||
|
||||
/* mizerline.c */
|
||||
|
||||
extern _X_EXPORT void miZeroLine(DrawablePtr /*dst */ ,
|
||||
GCPtr /*pgc */ ,
|
||||
int /*mode */ ,
|
||||
int /*nptInit */ ,
|
||||
DDXPointRec * /*pptInit */
|
||||
);
|
||||
|
||||
extern _X_EXPORT void miZeroDashLine(DrawablePtr /*dst */ ,
|
||||
GCPtr /*pgc */ ,
|
||||
int /*mode */ ,
|
||||
int /*nptInit */ ,
|
||||
DDXPointRec * /*pptInit */
|
||||
);
|
||||
_X_EXPORT void miZeroLine(DrawablePtr dst, GCPtr gc, int mode, int nptInit, xPoint* pptInit);
|
||||
_X_EXPORT void miZeroDashLine(DrawablePtr dst, GCPtr pgc, int mode, int nptInit, xPoint *pptInit);
|
||||
|
||||
extern _X_EXPORT void miPolyFillArc(DrawablePtr /*pDraw */ ,
|
||||
GCPtr /*pGC */ ,
|
||||
|
||||
@@ -91,7 +91,7 @@ int miExpandDirectColors(ColormapPtr, int, xColorItem *, xColorItem *);
|
||||
|
||||
typedef union _MiValidate {
|
||||
struct BeforeValidate {
|
||||
DDXPointRec oldAbsCorner; /* old window position */
|
||||
xPoint oldAbsCorner; /* old window position */
|
||||
RegionPtr borderVisible; /* visible region of border, */
|
||||
/* non-null when size changes */
|
||||
Bool resized; /* unclipped winSize has changed */
|
||||
|
||||
@@ -779,7 +779,7 @@ miFillWideEllipse(DrawablePtr pDraw, GCPtr pGC, xArc * parc)
|
||||
|
||||
yorgu = parc->height + pGC->lineWidth;
|
||||
n = (sizeof(int) * 2) * yorgu;
|
||||
int *widths = calloc(1, n + (sizeof(DDXPointRec) * 2) * yorgu);
|
||||
int *widths = calloc(1, n + (sizeof(xPoint) * 2) * yorgu);
|
||||
if (!widths)
|
||||
return;
|
||||
points = (DDXPointPtr) ((char *) widths + n);
|
||||
@@ -1191,7 +1191,7 @@ miFillSppPoly(DrawablePtr dst, GCPtr pgc, int count, /* number of points */
|
||||
y = ymax - ymin + 1;
|
||||
if ((count < 3) || (y <= 0))
|
||||
return;
|
||||
ptsOut = FirstPoint = calloc(y, sizeof(DDXPointRec));
|
||||
ptsOut = FirstPoint = calloc(y, sizeof(xPoint));
|
||||
width = FirstWidth = calloc(y, sizeof(int));
|
||||
Marked = calloc(count, sizeof(int));
|
||||
|
||||
@@ -3083,7 +3083,7 @@ fillSpans(DrawablePtr pDrawable, GCPtr pGC)
|
||||
|
||||
if (nspans == 0)
|
||||
return;
|
||||
xSpan = xSpans = calloc(nspans, sizeof(DDXPointRec));
|
||||
xSpan = xSpans = calloc(nspans, sizeof(xPoint));
|
||||
xWidth = xWidths = calloc(nspans, sizeof(int));
|
||||
if (xSpans && xWidths) {
|
||||
i = 0;
|
||||
|
||||
@@ -665,7 +665,7 @@ miPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs_all, xArc * parcs)
|
||||
nspans += (arc->height + 1) >> 1;
|
||||
}
|
||||
|
||||
pts = points = calloc(1, sizeof (DDXPointRec) * nspans +
|
||||
pts = points = calloc(1, sizeof(xPoint) * nspans +
|
||||
sizeof(int) * nspans);
|
||||
if (points) {
|
||||
wids = widths = (int *) (points + nspans);
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct {
|
||||
RegionRec exposed;
|
||||
RegionRec borderExposed;
|
||||
RegionPtr borderVisible;
|
||||
DDXPointRec oldAbsCorner;
|
||||
xPoint oldAbsCorner;
|
||||
} miOverlayValDataRec, *miOverlayValDataPtr;
|
||||
|
||||
typedef struct _TreeRec {
|
||||
@@ -919,7 +919,7 @@ miOverlayMoveWindow(WindowPtr pWin,
|
||||
Bool WasViewable = (Bool) (pWin->viewable);
|
||||
short bw;
|
||||
RegionRec overReg, underReg;
|
||||
DDXPointRec oldpt;
|
||||
xPoint oldpt;
|
||||
|
||||
if (!(pParent = pWin->parent))
|
||||
return;
|
||||
@@ -1077,7 +1077,7 @@ miOverlayResizeWindow(WindowPtr pWin,
|
||||
short oldy = pWin->drawable.y;
|
||||
int bw = wBorderWidth(pWin);
|
||||
short dw, dh;
|
||||
DDXPointRec oldpt;
|
||||
xPoint oldpt;
|
||||
RegionPtr oldRegion = NULL, oldRegion2 = NULL;
|
||||
WindowPtr pFirstChange;
|
||||
WindowPtr pChild;
|
||||
|
||||
@@ -410,7 +410,7 @@ miFillConvexPoly(DrawablePtr dst, GCPtr pgc, int count, DDXPointPtr ptsIn)
|
||||
dy = ymax - ymin + 1;
|
||||
if ((count < 3) || (dy < 0))
|
||||
return TRUE;
|
||||
ptsOut = FirstPoint = calloc(dy, sizeof(DDXPointRec));
|
||||
ptsOut = FirstPoint = calloc(dy, sizeof(xPoint));
|
||||
width = FirstWidth = calloc(dy, sizeof(int));
|
||||
if (!FirstPoint || !FirstWidth) {
|
||||
free(FirstWidth);
|
||||
@@ -530,7 +530,7 @@ miFillGeneralPoly(DrawablePtr dst, GCPtr pgc, int count, DDXPointPtr ptsIn)
|
||||
ScanLineList *pSLL; /* Current ScanLineList */
|
||||
DDXPointPtr ptsOut; /* ptr to output buffers */
|
||||
int *width;
|
||||
DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
|
||||
xPoint FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */
|
||||
int FirstWidth[NUMPTSTOBUFFER];
|
||||
EdgeTableEntry *pPrevAET; /* previous AET entry */
|
||||
EdgeTable ET; /* Edge Table header node */
|
||||
|
||||
@@ -57,7 +57,7 @@ miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects)
|
||||
{
|
||||
int i;
|
||||
xRectangle *pR = pRects;
|
||||
DDXPointRec rect[5];
|
||||
xPoint rect[5];
|
||||
int bound_tmp;
|
||||
|
||||
#define MINBOUND(dst,eqn) bound_tmp = eqn; \
|
||||
|
||||
@@ -98,7 +98,7 @@ miPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable,
|
||||
int ib, w;
|
||||
int ipt; /* index into above arrays */
|
||||
Bool fInBox;
|
||||
DDXPointRec pt[NPT], ptThisLine;
|
||||
xPoint pt[NPT], ptThisLine;
|
||||
int width[NPT];
|
||||
|
||||
#if 1
|
||||
|
||||
@@ -194,7 +194,7 @@ static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y,
|
||||
int width, int height,
|
||||
unsigned int subWindowMode);
|
||||
static void miSpriteCopyWindow(WindowPtr pWindow,
|
||||
DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
xPoint ptOldOrg, RegionPtr prgnSrc);
|
||||
static void miSpriteBlockHandler(ScreenPtr pScreen, void *timeout);
|
||||
static void miSpriteInstallColormap(ColormapPtr pMap);
|
||||
static void miSpriteStoreColors(ColormapPtr pMap, int ndef, xColorItem * pdef);
|
||||
@@ -393,7 +393,7 @@ miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y, int width,
|
||||
}
|
||||
|
||||
static void
|
||||
miSpriteCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
miSpriteCopyWindow(WindowPtr pWindow, xPoint ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
ScreenPtr pScreen = pWindow->drawable.pScreen;
|
||||
DeviceIntPtr pDev;
|
||||
|
||||
@@ -52,7 +52,7 @@ SOFTWARE.
|
||||
|
||||
/* information about dashes */
|
||||
typedef struct _miDash {
|
||||
DDXPointRec pt;
|
||||
xPoint pt;
|
||||
int e1, e2; /* keep these, so we don't have to do it again */
|
||||
int e; /* bresenham error term for this point on line */
|
||||
int which;
|
||||
|
||||
@@ -181,7 +181,7 @@ miSubtractSpans(SpanGroup * spanGroup, Spans * sub)
|
||||
#define EXTRA 8
|
||||
newPt = reallocarray(spans->points,
|
||||
spans->count + EXTRA,
|
||||
sizeof(DDXPointRec));
|
||||
sizeof(xPoint));
|
||||
if (!newPt)
|
||||
break;
|
||||
spansPt = newPt + (spansPt - spans->points);
|
||||
@@ -256,7 +256,7 @@ miFreeSpanGroup(SpanGroup * spanGroup)
|
||||
}
|
||||
|
||||
static void
|
||||
QuickSortSpansX(DDXPointRec points[], int widths[], int numSpans)
|
||||
QuickSortSpansX(xPoint points[], int widths[], int numSpans)
|
||||
{
|
||||
int x;
|
||||
int i, j, m;
|
||||
@@ -267,7 +267,7 @@ QuickSortSpansX(DDXPointRec points[], int widths[], int numSpans)
|
||||
|
||||
#define ExchangeSpans(a, b) \
|
||||
{ \
|
||||
DDXPointRec tpt; \
|
||||
xPoint tpt; \
|
||||
int tw; \
|
||||
\
|
||||
tpt = points[a]; points[a] = points[b]; points[b] = tpt; \
|
||||
@@ -285,7 +285,7 @@ QuickSortSpansX(DDXPointRec points[], int widths[], int numSpans)
|
||||
x = points[i].x;
|
||||
if (xprev > x) {
|
||||
/* points[i] is out of order. Move into proper location. */
|
||||
DDXPointRec tpt;
|
||||
xPoint tpt;
|
||||
int tw, k;
|
||||
|
||||
for (j = 0; x >= points[j].x; j++) {
|
||||
@@ -345,10 +345,10 @@ QuickSortSpansX(DDXPointRec points[], int widths[], int numSpans)
|
||||
} /* QuickSortSpans */
|
||||
|
||||
static int
|
||||
UniquifySpansX(Spans * spans, DDXPointRec * newPoints, int *newWidths)
|
||||
UniquifySpansX(Spans * spans, xPoint* newPoints, int *newWidths)
|
||||
{
|
||||
int newx1, newx2, oldpt, i, y;
|
||||
DDXPointRec *oldPoints;
|
||||
xPoint *oldPoints;
|
||||
int *oldWidths;
|
||||
int *startNewWidths;
|
||||
|
||||
@@ -480,7 +480,7 @@ miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup * spanGroup)
|
||||
ysizes[index] = (ysizes[index] + 8) * 2;
|
||||
newpoints = reallocarray(newspans->points,
|
||||
ysizes[index],
|
||||
sizeof(DDXPointRec));
|
||||
sizeof(xPoint));
|
||||
newwidths = reallocarray(newspans->widths,
|
||||
ysizes[index], sizeof(int));
|
||||
if (!newpoints || !newwidths) {
|
||||
@@ -511,7 +511,7 @@ miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup * spanGroup)
|
||||
} /* for i thorough Spans */
|
||||
|
||||
/* Now sort by x and uniquify each bucket into the final array */
|
||||
points = calloc(count, sizeof(DDXPointRec));
|
||||
points = calloc(count, sizeof(xPoint));
|
||||
widths = calloc(count, sizeof(int));
|
||||
if (!points || !widths) {
|
||||
for (i = 0; i < ylength; i++) {
|
||||
@@ -935,7 +935,7 @@ miLineOnePoint(DrawablePtr pDrawable,
|
||||
GCPtr pGC,
|
||||
unsigned long pixel, SpanDataPtr spanData, int x, int y)
|
||||
{
|
||||
DDXPointRec pt;
|
||||
xPoint pt;
|
||||
int wid;
|
||||
unsigned long oldPixel;
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
|
||||
Bool WasViewable = (Bool) (pWin->viewable);
|
||||
short bw;
|
||||
RegionPtr oldRegion = NULL;
|
||||
DDXPointRec oldpt;
|
||||
xPoint oldpt;
|
||||
Bool anyMarked = FALSE;
|
||||
ScreenPtr pScreen;
|
||||
WindowPtr windowToValidate;
|
||||
@@ -350,7 +350,7 @@ miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
|
||||
short oldx = pWin->drawable.x, oldy = pWin->drawable.y;
|
||||
int bw = wBorderWidth(pWin);
|
||||
short dw, dh;
|
||||
DDXPointRec oldpt;
|
||||
xPoint oldpt;
|
||||
RegionPtr oldRegion = NULL;
|
||||
Bool anyMarked = FALSE;
|
||||
ScreenPtr pScreen;
|
||||
|
||||
@@ -68,10 +68,10 @@ Author: Bob Scheifler, MIT X Consortium
|
||||
typedef struct {
|
||||
int skipStart;
|
||||
int haveStart;
|
||||
DDXPointRec startPt;
|
||||
xPoint startPt;
|
||||
int haveLast;
|
||||
int skipLast;
|
||||
DDXPointRec endPt;
|
||||
xPoint endPt;
|
||||
int dashIndex;
|
||||
int dashOffset;
|
||||
int dashIndexInit;
|
||||
@@ -687,7 +687,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs)
|
||||
(unsigned char *) pGC->dash, (int) pGC->numInDashList,
|
||||
&dinfo.dashOffsetInit);
|
||||
}
|
||||
points = calloc(numPts, sizeof(DDXPointRec));
|
||||
points = calloc(numPts, sizeof(xPoint));
|
||||
if (!points) {
|
||||
if (dospans) {
|
||||
free(widths);
|
||||
|
||||
@@ -71,7 +71,7 @@ SOFTWARE.
|
||||
* Assumes that the point structure is {type x, y;} where type is
|
||||
* a signed type.
|
||||
*/
|
||||
#define MAX_COORDINATE ((1 << (((sizeof(DDXPointRec) >> 1) << 3) - 1)) - 1)
|
||||
#define MAX_COORDINATE ((1 << (((sizeof(xPoint) >> 1) << 3) - 1)) - 1)
|
||||
|
||||
#define MI_OUTPUT_POINT(xx, yy)\
|
||||
{\
|
||||
@@ -134,7 +134,7 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
|
||||
|
||||
/* it doesn't matter whether we're in drawable or screen coordinates,
|
||||
* FillSpans simply cannot take starting coordinates outside of the
|
||||
* range of a DDXPointRec component.
|
||||
* range of a xPoint component.
|
||||
*/
|
||||
if (xright > MAX_COORDINATE)
|
||||
xright = MAX_COORDINATE;
|
||||
@@ -148,7 +148,7 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
|
||||
width = xright - xleft + 1;
|
||||
height = ybottom - ytop + 1;
|
||||
list_len = (height >= width) ? height : width;
|
||||
pspanInit = calloc(list_len, sizeof(DDXPointRec));
|
||||
pspanInit = calloc(list_len, sizeof(xPoint));
|
||||
pwidthInit = calloc(list_len, sizeof(int));
|
||||
if (!pspanInit || !pwidthInit) {
|
||||
free(pspanInit);
|
||||
@@ -346,7 +346,7 @@ miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */
|
||||
|
||||
void
|
||||
miZeroDashLine(DrawablePtr dst, GCPtr pgc, int mode, int nptInit, /* number of points in polyline */
|
||||
DDXPointRec * pptInit /* points in the polyline */
|
||||
xPoint* pptInit /* points in the polyline */
|
||||
)
|
||||
{
|
||||
/* XXX kludge until real zero-width dash code is written */
|
||||
|
||||
Reference in New Issue
Block a user