diff options
Diffstat (limited to 'mi/miregion.c')
-rw-r--r-- | mi/miregion.c | 298 |
1 files changed, 149 insertions, 149 deletions
diff --git a/mi/miregion.c b/mi/miregion.c index 0db46dcf5..542209982 100644 --- a/mi/miregion.c +++ b/mi/miregion.c @@ -228,7 +228,7 @@ miPrintRegion(rgn) RegionPtr rgn; { int num, size; - register int i; + int i; BoxPtr rects; num = REGION_NUM_RECTS(rgn); @@ -275,7 +275,7 @@ Bool miValidRegion(reg) RegionPtr reg; { - register int i, numRects; + int i, numRects; if ((reg->extents.x1 > reg->extents.x2) || (reg->extents.y1 > reg->extents.y2)) @@ -289,7 +289,7 @@ miValidRegion(reg) return (!reg->data); else { - register BoxPtr pboxP, pboxN; + BoxPtr pboxP, pboxN; BoxRec box; pboxP = REGION_RECTS(reg); @@ -331,7 +331,7 @@ miRegionCreate(rect, size) BoxPtr rect; int size; { - register RegionPtr pReg; + RegionPtr pReg; pReg = (RegionPtr)xalloc(sizeof(RegionRec)); if (!pReg) @@ -414,7 +414,7 @@ miRegionBreak (pReg) _X_EXPORT Bool miRectAlloc( - register RegionPtr pRgn, + RegionPtr pRgn, int n) { RegDataPtr data; @@ -455,8 +455,8 @@ miRectAlloc( _X_EXPORT Bool miRegionCopy(dst, src) - register RegionPtr dst; - register RegionPtr src; + RegionPtr dst; + RegionPtr src; { good(dst); good(src); @@ -508,14 +508,14 @@ miRegionCopy(dst, src) */ INLINE static int miCoalesce ( - register RegionPtr pReg, /* Region to coalesce */ + RegionPtr pReg, /* Region to coalesce */ int prevStart, /* Index of start of previous band */ int curStart) /* Index of start of current band */ { - register BoxPtr pPrevBox; /* Current box in previous band */ - register BoxPtr pCurBox; /* Current box in current band */ - register int numRects; /* Number rectangles in both bands */ - register int y2; /* Bottom of current band */ + BoxPtr pPrevBox; /* Current box in previous band */ + BoxPtr pCurBox; /* Current box in current band */ + int numRects; /* Number rectangles in both bands */ + int y2; /* Bottom of current band */ /* * Figure out how many rectangles are in the band. */ @@ -592,14 +592,14 @@ miCoalesce ( INLINE static Bool miAppendNonO ( - register RegionPtr pReg, - register BoxPtr r, - BoxPtr rEnd, - register int y1, - register int y2) + RegionPtr pReg, + BoxPtr r, + BoxPtr rEnd, + int y1, + int y2) { - register BoxPtr pNextRect; - register int newRects; + BoxPtr pNextRect; + int newRects; newRects = rEnd - r; @@ -691,25 +691,25 @@ miRegionOp( /* in region 2 ? */ Bool *pOverlap) { - register BoxPtr r1; /* Pointer into first region */ - register BoxPtr r2; /* Pointer into 2d region */ - BoxPtr r1End; /* End of 1st region */ - BoxPtr r2End; /* End of 2d region */ - short ybot; /* Bottom of intersection */ - short ytop; /* Top of intersection */ - RegDataPtr oldData; /* Old data for newReg */ - int prevBand; /* Index of start of - * previous band in newReg */ - int curBand; /* Index of start of current - * band in newReg */ - register BoxPtr r1BandEnd; /* End of current band in r1 */ - register BoxPtr r2BandEnd; /* End of current band in r2 */ - short top; /* Top of non-overlapping band */ - short bot; /* Bottom of non-overlapping band*/ - register int r1y1; /* Temps for r1->y1 and r2->y1 */ - register int r2y1; - int newSize; - int numRects; + BoxPtr r1; /* Pointer into first region */ + BoxPtr r2; /* Pointer into 2d region */ + BoxPtr r1End; /* End of 1st region */ + BoxPtr r2End; /* End of 2d region */ + short ybot; /* Bottom of intersection */ + short ytop; /* Top of intersection */ + RegDataPtr oldData; /* Old data for newReg */ + int prevBand; /* Index of start of + * previous band in newReg */ + int curBand; /* Index of start of current + * band in newReg */ + BoxPtr r1BandEnd; /* End of current band in r1 */ + BoxPtr r2BandEnd; /* End of current band in r2 */ + short top; /* Top of non-overlapping band */ + short bot; /* Bottom of non-overlapping band*/ + int r1y1; /* Temps for r1->y1 and r2->y1 */ + int r2y1; + int newSize; + int numRects; /* * Break any region computed from a broken region @@ -915,9 +915,9 @@ miRegionOp( */ void miSetExtents (pReg) - register RegionPtr pReg; + RegionPtr pReg; { - register BoxPtr pBox, pBoxEnd; + BoxPtr pBox, pBoxEnd; if (!pReg->data) return; @@ -974,18 +974,18 @@ miSetExtents (pReg) /*ARGSUSED*/ static Bool miIntersectO ( - register RegionPtr pReg, - register BoxPtr r1, + RegionPtr pReg, + BoxPtr r1, BoxPtr r1End, - register BoxPtr r2, + BoxPtr r2, BoxPtr r2End, short y1, short y2, Bool *pOverlap) { - register int x1; - register int x2; - register BoxPtr pNextRect; + int x1; + int x2; + BoxPtr pNextRect; pNextRect = REGION_TOP(pReg); @@ -1022,9 +1022,9 @@ miIntersectO ( _X_EXPORT Bool miIntersect(newReg, reg1, reg2) - register RegionPtr newReg; /* destination Region */ - register RegionPtr reg1; - register RegionPtr reg2; /* source regions */ + RegionPtr newReg; /* destination Region */ + RegionPtr reg1; + RegionPtr reg2; /* source regions */ { good(reg1); good(reg2); @@ -1117,18 +1117,18 @@ miIntersect(newReg, reg1, reg2) */ static Bool miUnionO ( - register RegionPtr pReg, - register BoxPtr r1, - BoxPtr r1End, - register BoxPtr r2, - BoxPtr r2End, - short y1, - short y2, - Bool *pOverlap) + RegionPtr pReg, + BoxPtr r1, + BoxPtr r1End, + BoxPtr r2, + BoxPtr r2End, + short y1, + short y2, + Bool *pOverlap) { - register BoxPtr pNextRect; - register int x1; /* left and right side of current union */ - register int x2; + BoxPtr pNextRect; + int x1; /* left and right side of current union */ + int x2; assert (y1 < y2); assert(r1 != r1End && r2 != r2End); @@ -1178,8 +1178,8 @@ miUnionO ( _X_EXPORT Bool miUnion(newReg, reg1, reg2) RegionPtr newReg; /* destination Region */ - register RegionPtr reg1; - register RegionPtr reg2; /* source regions */ + RegionPtr reg1; + RegionPtr reg2; /* source regions */ { Bool overlap; /* result ignored */ @@ -1276,8 +1276,8 @@ miUnion(newReg, reg1, reg2) */ _X_EXPORT Bool miRegionAppend(dstrgn, rgn) - register RegionPtr dstrgn; - register RegionPtr rgn; + RegionPtr dstrgn; + RegionPtr rgn; { int numRects, dnumRects, size; BoxPtr new, old; @@ -1307,7 +1307,7 @@ miRegionAppend(dstrgn, rgn) dstrgn->extents = rgn->extents; else if (dstrgn->extents.x2 > dstrgn->extents.x1) { - register BoxPtr first, last; + BoxPtr first, last; first = old; last = REGION_BOXPTR(dstrgn) + (dnumRects - 1); @@ -1371,13 +1371,13 @@ miRegionAppend(dstrgn, rgn) static void QuickSortRects( - register BoxRec rects[], - register int numRects) + BoxRec rects[], + int numRects) { - register int y1; - register int x1; - register int i, j; - register BoxPtr r; + int y1; + int x1; + int i, j; + BoxPtr r; /* Always called with numRects > 1 */ @@ -1472,17 +1472,17 @@ miRegionValidate(badreg, pOverlap) int curBand; } RegionInfo; - int numRects; /* Original numRects for badreg */ - RegionInfo *ri; /* Array of current regions */ - int numRI; /* Number of entries used in ri */ - int sizeRI; /* Number of entries available in ri */ - int i; /* Index into rects */ - register int j; /* Index into ri */ - register RegionInfo *rit; /* &ri[j] */ - register RegionPtr reg; /* ri[j].reg */ - register BoxPtr box; /* Current box in rects */ - register BoxPtr riBox; /* Last box in ri[j].reg */ - register RegionPtr hreg; /* ri[j_half].reg */ + int numRects; /* Original numRects for badreg */ + RegionInfo *ri; /* Array of current regions */ + int numRI; /* Number of entries used in ri */ + int sizeRI; /* Number of entries available in ri */ + int i; /* Index into rects */ + int j; /* Index into ri */ + RegionInfo *rit; /* &ri[j] */ + RegionPtr reg; /* ri[j].reg */ + BoxPtr box; /* Current box in rects */ + BoxPtr riBox; /* Last box in ri[j].reg */ + RegionPtr hreg; /* ri[j_half].reg */ Bool ret = TRUE; *pOverlap = FALSE; @@ -1654,13 +1654,13 @@ bail: _X_EXPORT RegionPtr miRectsToRegion(nrects, prect, ctype) int nrects; - register xRectangle *prect; + xRectangle *prect; int ctype; { - register RegionPtr pRgn; - register RegDataPtr pData; - register BoxPtr pBox; - register int i; + RegionPtr pRgn; + RegDataPtr pData; + BoxPtr pBox; + int i; int x1, y1, x2, y2; pRgn = miRegionCreate(NullBox, 0); @@ -1754,17 +1754,17 @@ miRectsToRegion(nrects, prect, ctype) /*ARGSUSED*/ static Bool miSubtractO ( - register RegionPtr pReg, - register BoxPtr r1, - BoxPtr r1End, - register BoxPtr r2, - BoxPtr r2End, - register short y1, - short y2, - Bool *pOverlap) + RegionPtr pReg, + BoxPtr r1, + BoxPtr r1End, + BoxPtr r2, + BoxPtr r2End, + short y1, + short y2, + Bool *pOverlap) { - register BoxPtr pNextRect; - register int x1; + BoxPtr pNextRect; + int x1; x1 = r1->x1; @@ -1878,9 +1878,9 @@ miSubtractO ( */ _X_EXPORT Bool miSubtract(regD, regM, regS) - register RegionPtr regD; - register RegionPtr regM; - register RegionPtr regS; + RegionPtr regD; + RegionPtr regM; + RegionPtr regS; { Bool overlap; /* result ignored */ @@ -2003,15 +2003,15 @@ miInverse(newReg, reg1, invRect) _X_EXPORT int miRectIn(region, prect) - register RegionPtr region; - register BoxPtr prect; + RegionPtr region; + BoxPtr prect; { - register int x; - register int y; - register BoxPtr pbox; - register BoxPtr pboxEnd; - int partIn, partOut; - int numRects; + int x; + int y; + BoxPtr pbox; + BoxPtr pboxEnd; + int partIn, partOut; + int numRects; good(region); numRects = REGION_NUM_RECTS(region); @@ -2099,13 +2099,13 @@ miRectIn(region, prect) _X_EXPORT void miTranslateRegion(pReg, x, y) - register RegionPtr pReg; - register int x; - register int y; + RegionPtr pReg; + int x; + int y; { int x1, x2, y1, y2; - register int nbox; - register BoxPtr pbox; + int nbox; + BoxPtr pbox; good(pReg); pReg->extents.x1 = x1 = pReg->extents.x1 + x; @@ -2144,7 +2144,7 @@ miTranslateRegion(pReg, x, y) pReg->extents.y2 = MAXSHORT; if (pReg->data && (nbox = pReg->data->numRects)) { - register BoxPtr pboxout; + BoxPtr pboxout; for (pboxout = pbox = REGION_BOXPTR(pReg); nbox--; pbox++) { @@ -2184,8 +2184,8 @@ miTranslateRegion(pReg, x, y) Bool miRegionDataCopy( - register RegionPtr dst, - register RegionPtr src) + RegionPtr dst, + RegionPtr src) { good(dst); good(src); @@ -2226,11 +2226,11 @@ miRegionReset(pReg, pBox) _X_EXPORT Bool miPointInRegion(pReg, x, y, box) - register RegionPtr pReg; - register int x, y; + RegionPtr pReg; + int x, y; BoxPtr box; /* "return" value */ { - register BoxPtr pbox, pboxEnd; + BoxPtr pbox, pboxEnd; int numRects; good(pReg); @@ -2294,8 +2294,8 @@ miRegionExtents(pReg) #define ExchangeSpans(a, b) \ { \ - DDXPointRec tpt; \ - register int tw; \ + DDXPointRec tpt; \ + int tw; \ \ tpt = spans[a]; spans[a] = spans[b]; spans[b] = tpt; \ tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \ @@ -2307,13 +2307,13 @@ miRegionExtents(pReg) */ static void QuickSortSpans( - register DDXPointRec spans[], - register int widths[], - register int numSpans) + DDXPointRec spans[], + int widths[], + int numSpans) { - register int y; - register int i, j, m; - register DDXPointPtr r; + int y; + int i, j, m; + DDXPointPtr r; /* Always called with numSpans > 1 */ /* Sorts only by y, doesn't bother to sort by x */ @@ -2323,7 +2323,7 @@ static void QuickSortSpans( if (numSpans < 9) { /* Do insertion sort */ - register int yprev; + int yprev; yprev = spans[0].y; i = 1; @@ -2412,18 +2412,18 @@ static void QuickSortSpans( _X_EXPORT int miClipSpans( - RegionPtr prgnDst, - register DDXPointPtr ppt, - register int *pwidth, - int nspans, - register DDXPointPtr pptNew, - int *pwidthNew, - int fSorted) + RegionPtr prgnDst, + DDXPointPtr ppt, + int *pwidth, + int nspans, + DDXPointPtr pptNew, + int *pwidthNew, + int fSorted) { - register DDXPointPtr pptLast; - int *pwidthNewStart; /* the vengeance of Xerox! */ - register int y, x1, x2; - register int numRects; + DDXPointPtr pptLast; + int *pwidthNewStart; /* the vengeance of Xerox! */ + int y, x1, x2; + int numRects; good(prgnDst); pptLast = ppt + nspans; @@ -2435,7 +2435,7 @@ miClipSpans( /* It doesn't pay much to make use of fSorted in this case, so we lump everything together. */ - register int clipx1, clipx2, clipy1, clipy2; + int clipx1, clipx2, clipy1, clipy2; clipx1 = prgnDst->extents.x1; clipy1 = prgnDst->extents.y1; @@ -2467,10 +2467,10 @@ miClipSpans( else if ((numRects = prgnDst->data->numRects)) { /* Have to clip against many boxes */ - BoxPtr pboxBandStart, pboxBandEnd; - register BoxPtr pbox; - register BoxPtr pboxLast; - register int clipy1, clipy2; + BoxPtr pboxBandStart, pboxBandEnd; + BoxPtr pbox; + BoxPtr pboxLast; + int clipy1, clipy2; /* In this case, taking advantage of sorted spans gains more than the sorting costs. */ @@ -2493,7 +2493,7 @@ miClipSpans( x2 = x1 + *pwidth; do { /* For each box in band */ - register int newx1, newx2; + int newx1, newx2; newx1 = x1; newx2 = x2; @@ -2531,10 +2531,10 @@ _X_EXPORT int miFindMaxBand(prgn) RegionPtr prgn; { - register int nbox; - register BoxPtr pbox; - register int nThisBand; - register int nMaxBand = 0; + int nbox; + BoxPtr pbox; + int nThisBand; + int nMaxBand = 0; short yThisBand; good(prgn); |