mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Work around bug in 2.91.66 compiler
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10484 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6816f238ec
commit
3986ee515e
1 changed files with 57 additions and 19 deletions
|
@ -2474,19 +2474,37 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
while ((o = [e nextObject]) != nil)
|
||||
{
|
||||
// FIXME: We have to convert this values for the subclass
|
||||
float oTop = [self convertPoint: NSMakePoint(0, oldTop)
|
||||
toView: o].y;
|
||||
float oBottom = [self convertPoint: NSMakePoint(0, bottom)
|
||||
toView: o].y;
|
||||
float oLimit = [self convertPoint: NSMakePoint(0, bottomLimit)
|
||||
toView: o].y;
|
||||
|
||||
float oTop, oBottom, oLimit;
|
||||
/* Don't ask me why, but gcc-2.91.66 crashes if we use
|
||||
NSMakePoint in the following expressions. We avoid this
|
||||
compiler internal bug by using an auxiliary aPoint
|
||||
variable, and setting it manually to the NSPoints we
|
||||
need. */
|
||||
{
|
||||
NSPoint aPoint = {0, oldTop};
|
||||
oTop = ([self convertPoint: aPoint toView: o]).y;
|
||||
}
|
||||
|
||||
{
|
||||
NSPoint aPoint = {0, bottom};
|
||||
oBottom = ([self convertPoint: aPoint toView: o]).y;
|
||||
}
|
||||
|
||||
{
|
||||
NSPoint aPoint = {0, bottomLimit};
|
||||
oLimit = ([self convertPoint: aPoint toView: o]).y;
|
||||
}
|
||||
|
||||
[o adjustPageHeightNew: &oBottom
|
||||
top: oTop
|
||||
bottom: oBottom
|
||||
limit: oLimit];
|
||||
bottom = [self convertPoint: NSMakePoint(0, oBottom)
|
||||
fromView: o].y;
|
||||
|
||||
{
|
||||
NSPoint aPoint = {0, oBottom};
|
||||
bottom = ([self convertPoint: aPoint fromView: o]).y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2508,19 +2526,39 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
while ((o = [e nextObject]) != nil)
|
||||
{
|
||||
// FIXME: We have to convert this values for the subclass
|
||||
float oLeft = [self convertPoint: NSMakePoint(oldLeft, 0)
|
||||
toView: o].x;
|
||||
float oRight = [self convertPoint: NSMakePoint(right, 0)
|
||||
toView: o].x;
|
||||
float oLimit = [self convertPoint: NSMakePoint(rightLimit, 0)
|
||||
toView: o].x;
|
||||
|
||||
[o adjustPageWidthNew: &oRight
|
||||
left: oLeft
|
||||
right: oRight
|
||||
/* See comments in adjustPageHeightNew:top:bottom:limit:
|
||||
about why code is structured in this funny way. */
|
||||
float oLeft, oRight, oLimit;
|
||||
/* Don't ask me why, but gcc-2.91.66 crashes if we use
|
||||
NSMakePoint in the following expressions. We avoid this
|
||||
compiler internal bug by using an auxiliary aPoint
|
||||
variable, and setting it manually to the NSPoints we
|
||||
need. */
|
||||
{
|
||||
NSPoint aPoint = {oldLeft, 0};
|
||||
oLeft = ([self convertPoint: aPoint toView: o]).x;
|
||||
}
|
||||
|
||||
{
|
||||
NSPoint aPoint = {right, 0};
|
||||
oRight = ([self convertPoint: aPoint toView: o]).x;
|
||||
}
|
||||
|
||||
{
|
||||
NSPoint aPoint = {rightLimit, 0};
|
||||
oLimit = ([self convertPoint: aPoint toView: o]).x;
|
||||
}
|
||||
|
||||
[o adjustPageHeightNew: &oRight
|
||||
top: oLeft
|
||||
bottom: oRight
|
||||
limit: oLimit];
|
||||
right = [self convertPoint: NSMakePoint(oRight, 0)
|
||||
fromView: o].x;
|
||||
|
||||
{
|
||||
NSPoint aPoint = {oRight, 0};
|
||||
right = ([self convertPoint: aPoint fromView: o]).x;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue