(define (do-seg-buffers seg func)
(let lp ((i num-buks) (ent #f))
(cond
((not ent)
(if (zero? i)
SUCCESS
(lp (- i 1)
(vector-ref buk-tab (- i 1)))))
((or (not seg) (eq? seg (ENT:SEG ent)))
(let ((ans (func ent)))
(if (success? ans)
(lp i (ENT:NEXT ent))
ans)))
(else (lp i (ENT:NEXT ent))))))
|
int do_seg_buffers(seg, func)
SEGD *seg;
int_function func;
{
{
int i = num_buks;
ENTRY *ent = 0;
L_lp:
if (!(ent))
if (!(i))
return success;
else {
int T_i = (i)-1;
ent = buk_tab[(i)-1];
i = T_i;
goto L_lp;
}
else if ((!(seg))
|| ((seg)==(ent_seg(ent))))
{
int ans = func(ent);
if (success_P(ans))
{
ent = ent_next(ent);
goto L_lp;
}
else return ans;
}
else {
ent = ent_next(ent);
goto L_lp;
}
}
}
|
public static int doSegBuffers(wb.Seg seg,
string func)
{
{
int i = numBuks;
Ent ent = null;
Llp:
if (!(a2b(ent)))
if (0==(i))
return success;
else {
int T_i = (i)-1;
ent = bukTab[(i)-1];
i = T_i;
goto Llp;
}
else if ((!(a2b(seg))
|| (seg)==(ent_Seg(ent))))
{
int ans = invokeFunc(func, ent);
if (success_P(ans))
{
ent = ent_Next(ent);
goto Llp;
}
else return ans;
}
else {
ent = ent_Next(ent);
goto Llp;
}
}
}
|
public static int doSegBuffers(Seg seg,
java.lang.reflect.Method func)
{
{
int i = numBuks;
Ent ent = null;
Llp: while (true) {
if (!(a2b(ent)))
if (0==(i))
return success;
else {
int T_i = (i)-1;
ent = bukTab[(i)-1];
i = T_i;
continue Llp;
}
else if ((!(a2b(seg))
|| (seg)==(ent_Seg(ent))))
{
int ans = intFunInvoke(func, null, new Object[] {ent});
if (success_P(ans))
{
ent = ent_Next(ent);
continue Llp;
}
else return ans;
}
else {
ent = ent_Next(ent);
continue Llp;
}
}
}
}
|