Update of /cvsroot/foo/foo/elkfoo/src
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25072/src
Modified Files:
bpf.m
Log Message:
removed superfluous (fingers crossed) Check_Type
Index: bpf.m
===================================================================
RCS file: /cvsroot/foo/foo/elkfoo/src/bpf.m,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** bpf.m 20 Jun 2005 08:57:13 -0000 1.9
--- bpf.m 22 Mar 2009 01:12:32 -0000 1.10
***************
*** 81,150 ****
np++;
}
! if (np < 2)
! {
! Primitive_Error("at least two break-points expected");
! }
! GC_Link(points);
! /* rumori 2005-06-19: avoid memleak, therefore AUTORELEASE */
! bpf = A_Make_Bpf(AUTORELEASE([[FOOBreakpointFunction alloc] init]));
! GC_Unlink;
! zone = [IdOf(bpf) zone];
! seglist = NSZoneCalloc(zone, np, sizeof(lineseg_t));
! for (p = points, sp = seglist, i = 0; i < np; i++)
! {
! Check_Type(p, T_Pair);
! pp = Car(p);
! Check_Type(pp, T_Pair);
! time = Get_Double(Car(pp));
! pp = Cdr(pp);
! Check_Type(pp, T_Pair);
! value = Get_Double(Car(pp));
! pp = Cdr(pp);
! if (!Nullp(pp))
! {
! if (i == 0)
! {
! Primitive_Error("illegal first alpha value");
! }
! Check_Type(pp, T_Pair);
! alpha = Get_Double(Car(pp));
! }
! else
! {
! alpha = 1;
! }
! if (first)
! {
! begin = time;
! firstvalue = value;
! first = 0;
! }
! else
! {
! if (time <= lasttime)
! {
! Primitive_Error("ascending time values expected");
! }
! sp->time = time;
! sp->value = value;
! sp->alpha = log(alpha);
! sp->count = -1;
! sp->delta = 0;
! sp++;
! }
! lasttime = time;
! lastvalue = value;
! p = Cdr(p);
! }
! sp->value = 0;
! sp->count = 0;
! sp->delta = 0;
! sp->alpha = 0;
! [IdOf(bpf) setBpf:seglist first:firstvalue begin:begin end:lasttime];
! BPF_T(bpf)->offset = [IdOf(bpf) beginT];
! BPF_T(bpf)->length = [IdOf(bpf) sizeT];
! BPF_T(bpf)->reversed = 0;
! return bpf;
}
--- 81,149 ----
np++;
}
! if (np < 2)
! {
! Primitive_Error("at least two break-points expected");
! }
! GC_Link(points);
! /* rumori 2005-06-19: avoid memleak, therefore AUTORELEASE */
! bpf = A_Make_Bpf(AUTORELEASE([[FOOBreakpointFunction alloc] init]));
! GC_Unlink;
! zone = [IdOf(bpf) zone];
! seglist = NSZoneCalloc(zone, np, sizeof(lineseg_t));
! for (p = points, sp = seglist, i = 0; i < np; i++)
! {
! pp = Car(p);
! Check_Type(pp, T_Pair);
! time = Get_Double(Car(pp));
! pp = Cdr(pp);
! Check_Type(pp, T_Pair);
! value = Get_Double(Car(pp));
! pp = Cdr(pp);
! if (!Nullp(pp))
! {
! if (i == 0)
! {
! Primitive_Error("illegal first alpha value");
! }
! Check_Type(pp, T_Pair);
! alpha = Get_Double(Car(pp));
! }
! else
! {
! alpha = 1;
! }
! if (first)
! {
! begin = time;
! firstvalue = value;
! first = 0;
! }
! else
! {
! if (time <= lasttime)
! {
! Primitive_Error("ascending time values expected");
! }
! sp->time = time;
! sp->value = value;
! sp->alpha = log(alpha);
! sp->count = -1;
! sp->delta = 0;
! sp++;
! }
! lasttime = time;
! lastvalue = value;
! p = Cdr(p);
! }
! sp->value = 0;
! sp->count = 0;
! sp->delta = 0;
! sp->alpha = 0;
! [IdOf(bpf) setBpf:seglist first:firstvalue begin:begin end:lasttime];
! BPF_T(bpf)->offset = [IdOf(bpf) beginT];
! BPF_T(bpf)->length = [IdOf(bpf) sizeT];
! BPF_T(bpf)->reversed = 0;
! return bpf;
}
|