summaryrefslogtreecommitdiffstats
path: root/src/kernel/qregion_x11.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2020-01-30 20:17:32 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2020-01-30 20:17:32 +0900
commit99e56ba8db70324cc5c7ab416a3b48171613bd59 (patch)
tree52fe52817fe45a81a7e03254b614b67587d83e37 /src/kernel/qregion_x11.cpp
parent630dcedfb398b350522742f0ab4d1255ac84da85 (diff)
downloadtqt-99e56ba8db70324cc5c7ab416a3b48171613bd59.tar.gz
tqt-99e56ba8db70324cc5c7ab416a3b48171613bd59.zip
Removed explicit usage of the 'register' keyword.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kernel/qregion_x11.cpp')
-rw-r--r--src/kernel/qregion_x11.cpp152
1 files changed, 76 insertions, 76 deletions
diff --git a/src/kernel/qregion_x11.cpp b/src/kernel/qregion_x11.cpp
index 51ef757a3..b5417a40a 100644
--- a/src/kernel/qregion_x11.cpp
+++ b/src/kernel/qregion_x11.cpp
@@ -89,8 +89,8 @@ struct TQRegionPrivate {
static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg);
-static void IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionPrivate *newReg);
-static void miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
+static void IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg);
+static void miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
void (*overlapFunc)(...),
void (*nonOverlap1Func)(...),
void (*nonOverlap2Func)(...));
@@ -300,7 +300,7 @@ typedef void (*voidProcp)(...);
static
-void UnionRectWithRegion(register const TQRect *rect, TQRegionPrivate *source, TQRegionPrivate *dest)
+void UnionRectWithRegion(const TQRect *rect, TQRegionPrivate *source, TQRegionPrivate *dest)
{
TQRegionPrivate region;
@@ -333,7 +333,7 @@ void UnionRectWithRegion(register const TQRect *rect, TQRegionPrivate *source, T
static void
miSetExtents (TQRegionPrivate *pReg)
{
- register TQRect *pBox,
+ TQRect *pBox,
*pBoxEnd,
*pExtents;
@@ -383,10 +383,10 @@ miSetExtents (TQRegionPrivate *pReg)
static
int
-OffsetRegion(register TQRegionPrivate *pRegion, register int x, register int y)
+OffsetRegion(TQRegionPrivate *pRegion, int x, int y)
{
- register int nbox;
- register TQRect *pbox;
+ int nbox;
+ TQRect *pbox;
pbox = pRegion->rects.data();
nbox = pRegion->numRects;
@@ -419,12 +419,12 @@ OffsetRegion(register TQRegionPrivate *pRegion, register int x, register int y)
/* static void*/
static
int
-miIntersectO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
- register TQRect *r2, TQRect *r2End, int y1, int y2)
+miIntersectO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
+ TQRect *r2, TQRect *r2End, int y1, int y2)
{
- register int x1;
- register int x2;
- register TQRect *pNextRect;
+ int x1;
+ int x2;
+ TQRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects;
@@ -474,7 +474,7 @@ miIntersectO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End
static
void
-IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionPrivate *newReg)
+IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPrivate *newReg)
{
/* check for trivial reject */
if ( (!(reg1->numRects)) || (!(reg2->numRects)) ||
@@ -519,14 +519,14 @@ IntersectRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, register TQRegionP
/* static int*/
static
int
-miCoalesce (register TQRegionPrivate *pReg, int prevStart, int curStart)
+miCoalesce (TQRegionPrivate *pReg, int prevStart, int curStart)
//Region pReg; /* Region to coalesce */
//prevStart; /* Index of start of previous band */
//curStart; /* Index of start of current band */
{
- register TQRect *pPrevBox; /* Current box in previous band */
- register TQRect *pCurBox; /* Current box in current band */
- register TQRect *pRegEnd; /* End of region */
+ TQRect *pPrevBox; /* Current box in previous band */
+ TQRect *pCurBox; /* Current box in current band */
+ TQRect *pRegEnd; /* End of region */
int curNumRects; /* Number of rectangles in current
* band */
int prevNumRects; /* Number of rectangles in previous
@@ -670,11 +670,11 @@ miCoalesce (register TQRegionPrivate *pReg, int prevStart, int curStart)
*/
/* static void*/
static void
-miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
+miRegionOp(TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPrivate *reg2,
void (*overlapFunc)(...),
void (*nonOverlap1Func)(...),
void (*nonOverlap2Func)(...))
- //register Region newReg; /* Place to store result */
+ //Region newReg; /* Place to store result */
//Region reg1; /* First region in operation */
//Region reg2; /* 2d region in operation */
//void (*overlapFunc)(); /* Function to call for over-
@@ -686,18 +686,18 @@ miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPriv
//* overlapping bands in region
//* 2 */
{
- register TQRect *r1; /* Pointer into first region */
- register TQRect *r2; /* Pointer into 2d region */
+ TQRect *r1; /* Pointer into first region */
+ TQRect *r2; /* Pointer into 2d region */
TQRect *r1End; /* End of 1st region */
TQRect *r2End; /* End of 2d region */
- register int ybot; /* Bottom of intersection */
- register int ytop; /* Top of intersection */
+ int ybot; /* Bottom of intersection */
+ int ytop; /* Top of intersection */
int prevBand; /* Index of start of
* previous band in newReg */
int curBand; /* Index of start of current
* band in newReg */
- register TQRect *r1BandEnd; /* End of current band in r1 */
- register TQRect *r2BandEnd; /* End of current band in r2 */
+ TQRect *r1BandEnd; /* End of current band in r1 */
+ TQRect *r2BandEnd; /* End of current band in r2 */
int top; /* Top of non-overlapping
* band */
int bot; /* Bottom of non-overlapping
@@ -951,10 +951,10 @@ miRegionOp(register TQRegionPrivate *newReg, TQRegionPrivate *reg1, TQRegionPriv
/* static void*/
static
int
-miUnionNonO (register TQRegionPrivate *pReg, register TQRect * r,
- TQRect * rEnd, register int y1, register int y2)
+miUnionNonO (TQRegionPrivate *pReg, TQRect * r,
+ TQRect * rEnd, int y1, int y2)
{
- register TQRect * pNextRect;
+ TQRect * pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects;
@@ -993,10 +993,10 @@ miUnionNonO (register TQRegionPrivate *pReg, register TQRect * r,
/* static void*/
static
int
-miUnionO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
- register TQRect *r2, TQRect *r2End, register int y1, register int y2)
+miUnionO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
+ TQRect *r2, TQRect *r2End, int y1, int y2)
{
- register TQRect *pNextRect;
+ TQRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects;
@@ -1121,10 +1121,10 @@ static void UnionRegion(TQRegionPrivate *reg1, TQRegionPrivate *reg2, TQRegionPr
/* static void*/
static
int
-miSubtractNonO1 (register TQRegionPrivate *pReg, register TQRect *r,
- TQRect *rEnd, register int y1, register int y2)
+miSubtractNonO1 (TQRegionPrivate *pReg, TQRect *r,
+ TQRect *rEnd, int y1, int y2)
{
- register TQRect *pNextRect;
+ TQRect *pNextRect;
pNextRect = pReg->rects.data() + pReg->numRects;
@@ -1160,11 +1160,11 @@ miSubtractNonO1 (register TQRegionPrivate *pReg, register TQRect *r,
/* static void*/
static
int
-miSubtractO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
- register TQRect *r2, TQRect *r2End, register int y1, register int y2)
+miSubtractO (TQRegionPrivate *pReg, TQRect *r1, TQRect *r1End,
+ TQRect *r2, TQRect *r2End, int y1, int y2)
{
- register TQRect *pNextRect;
- register int x1;
+ TQRect *pNextRect;
+ int x1;
x1 = r1->left();
@@ -1285,7 +1285,7 @@ miSubtractO (register TQRegionPrivate *pReg, register TQRect *r1, TQRect *r1End,
*-----------------------------------------------------------------------
*/
-static void SubtractRegion(TQRegionPrivate *regM, TQRegionPrivate *regS, register TQRegionPrivate *regD)
+static void SubtractRegion(TQRegionPrivate *regM, TQRegionPrivate *regS, TQRegionPrivate *regD)
{
/* check for trivial reject */
if ( (!(regM->numRects)) || (!(regS->numRects)) ||
@@ -1361,13 +1361,13 @@ static bool PointInRegion( TQRegionPrivate *pRegion, int x, int y )
return FALSE;
}
-static bool RectInRegion(register TQRegionPrivate *region,
+static bool RectInRegion(TQRegionPrivate *region,
int rx, int ry, unsigned int rwidth, unsigned int rheight)
{
- register TQRect *pbox;
- register TQRect *pboxEnd;
+ TQRect *pbox;
+ TQRect *pboxEnd;
TQRect rect(rx, ry, rwidth, rheight);
- register TQRect *prect = &rect;
+ TQRect *prect = &rect;
int partIn, partOut;
/* this is (just) a useful optimization */
@@ -1800,8 +1800,8 @@ static void
InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
ScanLineListBlock **SLLBlock, int *iSLLBlock)
{
- register EdgeTableEntry *start, *prev;
- register ScanLineList *pSLL, *pPrevSLL;
+ EdgeTableEntry *start, *prev;
+ ScanLineList *pSLL, *pPrevSLL;
ScanLineListBlock *tmpSLLBlock;
/*
@@ -1881,12 +1881,12 @@ InsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline,
*/
static void
-CreateETandAET(register int count, register TQPoint *pts,
- EdgeTable *ET, EdgeTableEntry *AET, register EdgeTableEntry *pETEs,
+CreateETandAET(int count, TQPoint *pts,
+ EdgeTable *ET, EdgeTableEntry *AET, EdgeTableEntry *pETEs,
ScanLineListBlock *pSLLBlock)
{
- register TQPoint *top, *bottom;
- register TQPoint *PrevPt, *CurrPt;
+ TQPoint *top, *bottom;
+ TQPoint *PrevPt, *CurrPt;
int iSLLBlock = 0;
int dy;
@@ -1969,10 +1969,10 @@ CreateETandAET(register int count, register TQPoint *pts,
*/
static void
-loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
+loadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs)
{
- register EdgeTableEntry *pPrevAET;
- register EdgeTableEntry *tmp;
+ EdgeTableEntry *pPrevAET;
+ EdgeTableEntry *tmp;
pPrevAET = AET;
AET = AET->next;
@@ -2016,11 +2016,11 @@ loadAET(register EdgeTableEntry *AET, register EdgeTableEntry *ETEs)
*
*/
static void
-computeWAET(register EdgeTableEntry *AET)
+computeWAET(EdgeTableEntry *AET)
{
- register EdgeTableEntry *pWETE;
- register int inside = 1;
- register int isInside = 0;
+ EdgeTableEntry *pWETE;
+ int inside = 1;
+ int isInside = 0;
AET->nextWETE = (EdgeTableEntry *)NULL;
pWETE = AET;
@@ -2054,12 +2054,12 @@ computeWAET(register EdgeTableEntry *AET)
*/
static int
-InsertionSort(register EdgeTableEntry *AET)
+InsertionSort(EdgeTableEntry *AET)
{
- register EdgeTableEntry *pETEchase;
- register EdgeTableEntry *pETEinsert;
- register EdgeTableEntry *pETEchaseBackTMP;
- register int changed = 0;
+ EdgeTableEntry *pETEchase;
+ EdgeTableEntry *pETEinsert;
+ EdgeTableEntry *pETEchaseBackTMP;
+ int changed = 0;
AET = AET->next;
while (AET)
@@ -2090,9 +2090,9 @@ InsertionSort(register EdgeTableEntry *AET)
* Clean up our act.
*/
static void
-FreeStorage(register ScanLineListBlock *pSLLBlock)
+FreeStorage(ScanLineListBlock *pSLLBlock)
{
- register ScanLineListBlock *tmpSLLBlock;
+ ScanLineListBlock *tmpSLLBlock;
while (pSLLBlock)
{
@@ -2110,15 +2110,15 @@ FreeStorage(register ScanLineListBlock *pSLLBlock)
* stack by the calling procedure.
*
*/
-static int PtsToRegion(register int numFullPtBlocks, register int iCurPtBlock,
+static int PtsToRegion(int numFullPtBlocks, int iCurPtBlock,
POINTBLOCK *FirstPtBlock, TQRegionPrivate *reg)
{
- register TQRect *rects;
- register TQPoint *pts;
- register POINTBLOCK *CurPtBlock;
- register int i;
- register TQRect *extents;
- register int numRects;
+ TQRect *rects;
+ TQPoint *pts;
+ POINTBLOCK *CurPtBlock;
+ int i;
+ TQRect *extents;
+ int numRects;
extents = &reg->extents;
@@ -2182,12 +2182,12 @@ static TQRegionPrivate *PolygonRegion(TQPoint *Pts, int Count, int rule)
//int rule; /* winding rule */
{
TQRegionPrivate *region;
- register EdgeTableEntry *pAET; /* Active Edge Table */
- register int y; /* current scanline */
- register int iPts = 0; /* number of pts in buffer */
- register EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
- register ScanLineList *pSLL; /* current scanLineList */
- register TQPoint *pts; /* output buffer */
+ EdgeTableEntry *pAET; /* Active Edge Table */
+ int y; /* current scanline */
+ int iPts = 0; /* number of pts in buffer */
+ EdgeTableEntry *pWETE; /* Winding Edge Table Entry*/
+ ScanLineList *pSLL; /* current scanLineList */
+ TQPoint *pts; /* output buffer */
EdgeTableEntry *pPrevAET; /* ptr to previous AET */
EdgeTable ET; /* header node for ET */
EdgeTableEntry AET; /* header node for AET */