summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-03-25 17:59:09 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-03-25 17:59:09 -0700
commitd239de9452691d6f875e6e5ace3d499ec3bf14d9 (patch)
tree2ecc2809ac286c468a594e4d34b9f6ab9ce80ff3
parent4281892e31058ef3aecc96a5767824b34d88d415 (diff)
Delete some unused "#ifdef notdef" static functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
-rw-r--r--src/ParseGeom.c18
-rw-r--r--src/Region.c146
2 files changed, 0 insertions, 164 deletions
diff --git a/src/ParseGeom.c b/src/ParseGeom.c
index 0fe9d085..ba6e45eb 100644
--- a/src/ParseGeom.c
+++ b/src/ParseGeom.c
@@ -35,24 +35,6 @@ from The Open Group.
#include "Xlibint.h"
#include "Xutil.h"
-#ifdef notdef
-/*
- *Returns pointer to first char ins search which is also in what, else NULL.
- */
-static char *strscan (search, what)
-char *search, *what;
-{
- int i, len = strlen (what);
- char c;
-
- while ((c = *(search++)) != NULL)
- for (i = 0; i < len; i++)
- if (c == what [i])
- return (--search);
- return (NULL);
-}
-#endif
-
/*
* XParseGeometry parses strings of the form
* "=<width>x<height>{+-}<xoffset>{+-}<yoffset>", where
diff --git a/src/Region.c b/src/Region.c
index d5200da8..7d7e596a 100644
--- a/src/Region.c
+++ b/src/Region.c
@@ -397,23 +397,6 @@ XShrinkRegion(
return 0;
}
-#ifdef notdef
-/***********************************************************
- * Bop down the array of rects until we have passed
- * scanline y. numRects is the size of the array.
- ***********************************************************/
-
-static BOX
-*IndexRects(
- register BOX *rects,
- register int numRects,
- register int y)
-{
- while ((numRects--) && (rects->y2 <= y))
- rects++;
- return(rects);
-}
-#endif
/*======================================================================
* Region Intersection
@@ -555,135 +538,6 @@ miRegionCopy(
}
}
-#ifdef notdef
-
-/*
- * combinRegs(newReg, reg1, reg2)
- * if one region is above or below the other.
-*/
-
-static void
-combineRegs(
- register Region newReg,
- Region reg1,
- Region reg2)
-{
- register Region tempReg;
- register BOX *rects;
- register BOX *rects1;
- register BOX *rects2;
- register int total;
-
- rects1 = reg1->rects;
- rects2 = reg2->rects;
-
- total = reg1->numRects + reg2->numRects;
- if (! (tempReg = XCreateRegion()))
- return;
- tempReg->size = total;
- /* region 1 is below region 2 */
- if (reg1->extents.y1 > reg2->extents.y1)
- {
- miRegionCopy(tempReg, reg2);
- rects = &tempReg->rects[tempReg->numRects];
- total -= tempReg->numRects;
- while (total--)
- *rects++ = *rects1++;
- }
- else
- {
- miRegionCopy(tempReg, reg1);
- rects = &tempReg->rects[tempReg->numRects];
- total -= tempReg->numRects;
- while (total--)
- *rects++ = *rects2++;
- }
- tempReg->extents = reg1->extents;
- tempReg->numRects = reg1->numRects + reg2->numRects;
- EXTENTS(&reg2->extents, tempReg);
- miRegionCopy(newReg, tempReg);
- Xfree((char *)tempReg);
-}
-
-/*
- * QuickCheck checks to see if it does not have to go through all the
- * the ugly code for the region call. It returns 1 if it did all
- * the work for Union, otherwise 0 - still work to be done.
-*/
-
-static int
-QuickCheck(Region newReg, Region reg1, Region reg2)
-{
-
- /* if unioning with itself or no rects to union with */
- if ( (reg1 == reg2) || (!(reg1->numRects)) )
- {
- miRegionCopy(newReg, reg2);
- return TRUE;
- }
-
- /* if nothing to union */
- if (!(reg2->numRects))
- {
- miRegionCopy(newReg, reg1);
- return TRUE;
- }
-
- /* could put an extent check to see if add above or below */
-
- if ((reg1->extents.y1 >= reg2->extents.y2) ||
- (reg2->extents.y1 >= reg1->extents.y2) )
- {
- combineRegs(newReg, reg1, reg2);
- return TRUE;
- }
- return FALSE;
-}
-
-/* TopRects(rects, reg1, reg2)
- * N.B. We now assume that reg1 and reg2 intersect. Therefore we are
- * NOT checking in the two while loops for stepping off the end of the
- * region.
- */
-
-static int
-TopRects(
- register Region newReg,
- register BOX *rects,
- register Region reg1,
- register Region reg2,
- BOX *FirstRect)
-{
- register BOX *tempRects;
-
- /* need to add some rects from region 1 */
- if (reg1->extents.y1 < reg2->extents.y1)
- {
- tempRects = reg1->rects;
- while(tempRects->y1 < reg2->extents.y1)
- {
- MEMCHECK(newReg, rects, FirstRect);
- ADDRECTNOX(newReg,rects, tempRects->x1, tempRects->y1,
- tempRects->x2, MIN(tempRects->y2, reg2->extents.y1));
- tempRects++;
- }
- }
- /* need to add some rects from region 2 */
- if (reg2->extents.y1 < reg1->extents.y1)
- {
- tempRects = reg2->rects;
- while (tempRects->y1 < reg1->extents.y1)
- {
- MEMCHECK(newReg, rects, FirstRect);
- ADDRECTNOX(newReg, rects, tempRects->x1,tempRects->y1,
- tempRects->x2, MIN(tempRects->y2, reg1->extents.y1));
- tempRects++;
- }
- }
- return 1;
-}
-#endif
-
/*======================================================================
* Generic Region Operator
*====================================================================*/