Skip to content

Commit

Permalink
Try to fix MacOS build.
Browse files Browse the repository at this point in the history
  • Loading branch information
dchapyshev committed Apr 10, 2022
1 parent a465be6 commit 492738b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
72 changes: 36 additions & 36 deletions source/third_party/x11region/x11region.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ miPrintRegion(rgn)

#endif /* DEBUG */

Boolean
OwnBoolean
miRegionsEqual(reg1, reg2)
RegionPtr reg1;
RegionPtr reg2;
Expand All @@ -277,7 +277,7 @@ miRegionsEqual(reg1, reg2)
return TRUE;
}

Boolean
OwnBoolean
miValidRegion(reg)
RegionPtr reg;
{
Expand Down Expand Up @@ -405,7 +405,7 @@ miRegionUninit(pReg)
xfreeData(pReg);
}

Boolean
OwnBoolean
miRegionBreak (pReg)
RegionPtr pReg;
{
Expand All @@ -415,7 +415,7 @@ miRegionBreak (pReg)
return FALSE;
}

Boolean
OwnBoolean
miRectAlloc(
register RegionPtr pRgn,
int n)
Expand Down Expand Up @@ -456,7 +456,7 @@ miRectAlloc(
return TRUE;
}

Boolean
OwnBoolean
miRegionCopy(dst, src)
register RegionPtr dst;
register RegionPtr src;
Expand Down Expand Up @@ -593,7 +593,7 @@ miCoalesce (
*-----------------------------------------------------------------------
*/

INLINE static Boolean
INLINE static OwnBoolean
miAppendNonO (
register RegionPtr pReg,
register BoxPtr r,
Expand Down Expand Up @@ -671,28 +671,28 @@ miAppendNonO (
*-----------------------------------------------------------------------
*/

typedef Boolean (*OverlapProcPtr)(
typedef OwnBoolean (*OverlapProcPtr)(
RegionPtr pReg,
BoxPtr r1,
BoxPtr r1End,
BoxPtr r2,
BoxPtr r2End,
short y1,
short y2,
Boolean *pOverlap);
OwnBoolean *pOverlap);

static Boolean
static OwnBoolean
miRegionOp(
RegionPtr newReg, /* Place to store result */
RegionPtr reg1, /* First region in operation */
RegionPtr reg2, /* 2d region in operation */
OverlapProcPtr overlapFunc, /* Function to call for over-
* lapping bands */
Boolean appendNon1, /* Append non-overlapping bands */
OwnBoolean appendNon1, /* Append non-overlapping bands */
/* in region 1 ? */
Boolean appendNon2, /* Append non-overlapping bands */
OwnBoolean appendNon2, /* Append non-overlapping bands */
/* in region 2 ? */
Boolean *pOverlap)
OwnBoolean *pOverlap)
{
register BoxPtr r1; /* Pointer into first region */
register BoxPtr r2; /* Pointer into 2d region */
Expand Down Expand Up @@ -975,7 +975,7 @@ miSetExtents (pReg)
*-----------------------------------------------------------------------
*/
/*ARGSUSED*/
static Boolean
static OwnBoolean
miIntersectO (
register RegionPtr pReg,
register BoxPtr r1,
Expand All @@ -984,7 +984,7 @@ miIntersectO (
BoxPtr r2End,
short y1,
short y2,
Boolean *pOverlap)
OwnBoolean *pOverlap)
{
register int x1;
register int x2;
Expand Down Expand Up @@ -1023,7 +1023,7 @@ miIntersectO (
}


Boolean
OwnBoolean
miIntersect(newReg, reg1, reg2)
register RegionPtr newReg; /* destination Region */
register RegionPtr reg1;
Expand Down Expand Up @@ -1073,7 +1073,7 @@ miIntersect(newReg, reg1, reg2)
else
{
/* General purpose intersection */
Boolean overlap; /* result ignored */
OwnBoolean overlap; /* result ignored */
if (!miRegionOp(newReg, reg1, reg2, miIntersectO, FALSE, FALSE,
&overlap))
return FALSE;
Expand Down Expand Up @@ -1118,7 +1118,7 @@ miIntersect(newReg, reg1, reg2)
*
*-----------------------------------------------------------------------
*/
static Boolean
static OwnBoolean
miUnionO (
register RegionPtr pReg,
register BoxPtr r1,
Expand All @@ -1127,7 +1127,7 @@ miUnionO (
BoxPtr r2End,
short y1,
short y2,
Boolean *pOverlap)
OwnBoolean *pOverlap)
{
register BoxPtr pNextRect;
register int x1; /* left and right side of current union */
Expand Down Expand Up @@ -1178,13 +1178,13 @@ miUnionO (
return TRUE;
}

Boolean
OwnBoolean
miUnion(newReg, reg1, reg2)
RegionPtr newReg; /* destination Region */
register RegionPtr reg1;
register RegionPtr reg2; /* source regions */
{
Boolean overlap; /* result ignored */
OwnBoolean overlap; /* result ignored */

/* Return TRUE if some overlap between reg1, reg2 */
good(reg1);
Expand Down Expand Up @@ -1277,14 +1277,14 @@ miUnion(newReg, reg1, reg2)
* dstrgn is modified if rgn has rectangles.
*
*/
Boolean
OwnBoolean
miRegionAppend(dstrgn, rgn)
register RegionPtr dstrgn;
register RegionPtr rgn;
{
int numRects, dnumRects, size;
BoxPtr new, old;
Boolean prepend;
OwnBoolean prepend;

if (REGION_NAR(rgn))
return miRegionBreak (dstrgn);
Expand Down Expand Up @@ -1463,10 +1463,10 @@ QuickSortRects(
*-----------------------------------------------------------------------
*/

Boolean
OwnBoolean
miRegionValidate(badreg, pOverlap)
RegionPtr badreg;
Boolean *pOverlap;
OwnBoolean *pOverlap;
{
/* Descriptor for regions under construction in Step 2. */
typedef struct {
Expand All @@ -1486,7 +1486,7 @@ miRegionValidate(badreg, pOverlap)
register BoxPtr box; /* Current box in rects */
register BoxPtr riBox; /* Last box in ri[j].reg */
register RegionPtr hreg; /* ri[j_half].reg */
Boolean ret = TRUE;
OwnBoolean ret = TRUE;

*pOverlap = FALSE;
if (!badreg->data)
Expand Down Expand Up @@ -1720,7 +1720,7 @@ miRectsToRegion(nrects, prect, ctype)
pRgn->data = pData;
if (ctype != CT_YXBANDED)
{
Boolean overlap; /* result ignored */
OwnBoolean overlap; /* result ignored */
pRgn->extents.x1 = pRgn->extents.x2 = 0;
miRegionValidate(pRgn, &overlap);
}
Expand Down Expand Up @@ -1755,7 +1755,7 @@ miRectsToRegion(nrects, prect, ctype)
*-----------------------------------------------------------------------
*/
/*ARGSUSED*/
static Boolean
static OwnBoolean
miSubtractO (
register RegionPtr pReg,
register BoxPtr r1,
Expand All @@ -1764,7 +1764,7 @@ miSubtractO (
BoxPtr r2End,
register short y1,
short y2,
Boolean *pOverlap)
OwnBoolean *pOverlap)
{
register BoxPtr pNextRect;
register int x1;
Expand Down Expand Up @@ -1879,13 +1879,13 @@ miSubtractO (
*
*-----------------------------------------------------------------------
*/
Boolean
OwnBoolean
miSubtract(regD, regM, regS)
register RegionPtr regD;
register RegionPtr regM;
register RegionPtr regS;
{
Boolean overlap; /* result ignored */
OwnBoolean overlap; /* result ignored */

good(regM);
good(regS);
Expand Down Expand Up @@ -1944,15 +1944,15 @@ miSubtract(regD, regM, regS)
*
*-----------------------------------------------------------------------
*/
Boolean
OwnBoolean
miInverse(newReg, reg1, invRect)
RegionPtr newReg; /* Destination region */
RegionPtr reg1; /* Region to invert */
BoxPtr invRect; /* Bounding box for inversion */
{
RegionRec invReg; /* Quick and dirty region made from the
* bounding box */
Boolean overlap; /* result ignored */
OwnBoolean overlap; /* result ignored */

good(reg1);
good(newReg);
Expand Down Expand Up @@ -2185,7 +2185,7 @@ miTranslateRegion(pReg, x, y)
}
}

Boolean
OwnBoolean
miRegionDataCopy(
register RegionPtr dst,
register RegionPtr src)
Expand Down Expand Up @@ -2227,7 +2227,7 @@ miRegionReset(pReg, pBox)
pReg->data = (RegDataPtr)NULL;
}

Boolean
OwnBoolean
miPointInRegion(pReg, x, y, box)
register RegionPtr pReg;
register int x, y;
Expand Down Expand Up @@ -2261,15 +2261,15 @@ miPointInRegion(pReg, x, y, box)
return(FALSE);
}

Boolean
OwnBoolean
miRegionNotEmpty(pReg)
RegionPtr pReg;
{
good(pReg);
return(!REGION_NIL(pReg));
}

Boolean
OwnBoolean
miRegionBroken(RegionPtr pReg)
{
good(pReg);
Expand Down
26 changes: 13 additions & 13 deletions source/third_party/x11region/x11region.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ SOFTWARE.
#define TRUE 1
#endif

typedef int Boolean;
typedef int OwnBoolean;

typedef struct _Box {
short x1, y1, x2, y2;
Expand Down Expand Up @@ -265,24 +265,24 @@ extern RegionPtr miRegionCreate(BoxPtr rect, int size);
extern void miRegionInit(RegionPtr pReg, BoxPtr rect, int size);
extern void miRegionDestroy(RegionPtr pReg);
extern void miRegionUninit(RegionPtr pReg);
extern Boolean miRegionCopy(RegionPtr dst, RegionPtr src);
extern Boolean miIntersect(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2);
extern Boolean miUnion(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2);
extern Boolean miRegionAppend(RegionPtr dstrgn, RegionPtr rgn);
extern Boolean miRegionValidate(RegionPtr badreg, Boolean * pOverlap);
extern OwnBoolean miRegionCopy(RegionPtr dst, RegionPtr src);
extern OwnBoolean miIntersect(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2);
extern OwnBoolean miUnion(RegionPtr newReg, RegionPtr reg1, RegionPtr reg2);
extern OwnBoolean miRegionAppend(RegionPtr dstrgn, RegionPtr rgn);
extern OwnBoolean miRegionValidate(RegionPtr badreg, OwnBoolean * pOverlap);
extern RegionPtr miRectsToRegion(int nrects, xRectanglePtr prect, int ctype);
extern Boolean miSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS);
extern Boolean miInverse(RegionPtr newReg, RegionPtr reg1, BoxPtr invRect);
extern OwnBoolean miSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS);
extern OwnBoolean miInverse(RegionPtr newReg, RegionPtr reg1, BoxPtr invRect);
extern int miRectIn(RegionPtr region, BoxPtr prect);
extern void miTranslateRegion(RegionPtr pReg, int x, int y);
extern void miRegionReset(RegionPtr pReg, BoxPtr pBox);
extern Boolean miRegionBreak(RegionPtr pReg);
extern Boolean miPointInRegion(RegionPtr pReg, int x, int y, BoxPtr box);
extern Boolean miRegionNotEmpty(RegionPtr pReg);
extern OwnBoolean miRegionBreak(RegionPtr pReg);
extern OwnBoolean miPointInRegion(RegionPtr pReg, int x, int y, BoxPtr box);
extern OwnBoolean miRegionNotEmpty(RegionPtr pReg);
extern void miRegionEmpty(RegionPtr pReg);
extern BoxPtr miRegionExtents(RegionPtr pReg);
extern Boolean miRegionsEqual(RegionPtr reg1, RegionPtr reg2);
extern Boolean miValidRegion(RegionPtr reg);
extern OwnBoolean miRegionsEqual(RegionPtr reg1, RegionPtr reg2);
extern OwnBoolean miValidRegion(RegionPtr reg);

#ifdef DEBUG
extern int miPrintRegion(RegionPtr rgn);
Expand Down

0 comments on commit 492738b

Please sign in to comment.