mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 05:08:03 +02:00
Delete some unused "#ifdef notdef" static functions
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
This commit is contained in:
parent
4281892e31
commit
d239de9452
2 changed files with 0 additions and 164 deletions
|
|
@ -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
|
||||
|
|
|
|||
146
src/Region.c
146
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(®2->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
|
||||
*====================================================================*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue