removed some C99-isms

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25130 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2007-05-08 21:09:37 +00:00
parent 150f58a492
commit b2d3176408
2 changed files with 31 additions and 16 deletions

View file

@ -115,9 +115,10 @@ _GSRationalBezierEval (_GSRationalBezierDesc *rb, float t)
static inline float
_GSRationalBezierDerivEval (_GSRationalBezierDesc *rb, float t)
{
float h;
if (!rb->areBezierDescComputed)
_GSRationalBezierComputeBezierDesc (rb);
float h = _GSBezierEval (&(rb->d),t);
h = _GSBezierEval (&(rb->d),t);
return ( _GSBezierDerivEval(&(rb->n),t) * h
- _GSBezierEval (&(rb->n),t) * _GSBezierDerivEval(&(rb->d),t) )
/ (h*h);
@ -212,10 +213,11 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
- (void) addProgressMark: (NSAnimationProgress)progress
{
_NSANIMATION_LOCK;
if (progress < 0.0) progress = 0.0;
if (progress > 1.0) progress = 1.0;
_NSANIMATION_LOCK;
if (GSIArrayCount(_progressMarks) == 0)
{ // First mark
@ -456,10 +458,11 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
- (NSArray*) progressMarks
{
NSNumber **cpmn;
unsigned count;
_NSANIMATION_LOCK;
unsigned count = GSIArrayCount (_progressMarks);
count = GSIArrayCount (_progressMarks);
if (!_isCachedProgressMarkNumbersValid)
{
@ -494,9 +497,10 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
- (void) removeProgressMark: (NSAnimationProgress)progress
{
unsigned index;
_NSANIMATION_LOCK;
unsigned index = GSIArraySearch (_progressMarks,progress,nsanimation_progressMarkSorter);
index = GSIArraySearch (_progressMarks,progress,nsanimation_progressMarkSorter);
if ( index < GSIArrayCount(_progressMarks)
&& progress == GSIArrayItemAtIndex (_progressMarks,index) )
{
@ -590,11 +594,11 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
BOOL needSearchNextMark = NO;
NSAnimationProgress markedProgress;
_NSANIMATION_LOCK;
if (progress < 0.0) progress = 0.0;
if (progress > 1.0) progress = 1.0;
_NSANIMATION_LOCK;
// NOTE: In the case of a forward jump the marks between the
// previous progress value and the new (excluded) progress
// value are never reached.
@ -868,9 +872,10 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
- (void) animatorDidStart
{
_NSANIMATION_LOCK;
NSDebugFLLog (@"NSAnimationAnimator",@"%@",self);
_NSANIMATION_LOCK;
id delegate;
delegate = GS_GC_UNHIDE (_currentDelegate);
@ -945,14 +950,16 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
- (void) _gs_startAnimationReachesProgressMark: (NSNotification*)notification
{
NSAnimation *animation = [notification object];
NSAnimationProgress mark
= [[[notification userInfo] objectForKey: NSAnimationProgressMark] floatValue];
NSAnimation *animation;
NSAnimationProgress mark;
_NSANIMATION_LOCK;
animation = [notification object];
mark = [[[notification userInfo] objectForKey: NSAnimationProgressMark] floatValue];
NSDebugFLLog (@"NSAnimationMark",
@"%@ Start Animation %@ reaches %f",self,animation,mark);
_NSANIMATION_LOCK;
if ( animation == _startAnimation && mark == _startMark)
{
// [self clearStartAnimation];
@ -962,15 +969,19 @@ nsanimation_progressMarkSorter ( NSAnimationProgress first,NSAnimationProgress s
_NSANIMATION_UNLOCK;
}
- (void) _gs_stopAnimationReachesProgressMark: (NSNotification*)notification
{
NSAnimation *animation = [notification object];
NSAnimationProgress mark
= [[[notification userInfo] objectForKey: NSAnimationProgressMark] floatValue];
NSAnimation *animation;
NSAnimationProgress mark;
_NSANIMATION_LOCK;
animation = [notification object];
mark = [[[notification userInfo] objectForKey: NSAnimationProgressMark] floatValue];
NSDebugFLLog (@"NSAnimationMark",
@"%@ Stop Animation %@ reaches %f",self,animation,mark);
_NSANIMATION_LOCK;
if ( animation == _stopAnimation && mark == _stopMark)
{