2013-09-29 00:21:18 +04:00
|
|
|
/* j/3/mas.c
|
|
|
|
**
|
|
|
|
** This file is in the public domain.
|
|
|
|
*/
|
|
|
|
#include "all.h"
|
|
|
|
#include "../pit.h"
|
|
|
|
|
|
|
|
/* functions
|
|
|
|
*/
|
|
|
|
u2_weak // transfer
|
2014-04-22 05:22:11 +04:00
|
|
|
j2_mbc(Pt3, mas)(u2_wire wir_r,
|
2013-09-29 00:21:18 +04:00
|
|
|
u2_atom a) // retain
|
|
|
|
{
|
|
|
|
c3_w b_w;
|
|
|
|
u2_atom c, d, e, f;
|
|
|
|
|
|
|
|
b_w = u2_met(0, a);
|
|
|
|
if ( b_w < 2 ) {
|
|
|
|
return u2_bl_bail(wir_r, c3__exit);
|
2014-04-22 05:22:11 +04:00
|
|
|
}
|
2013-09-29 00:21:18 +04:00
|
|
|
else {
|
|
|
|
c = j2_mbc(Pt3, bex)(wir_r, (b_w - 1));
|
|
|
|
d = j2_mbc(Pt3, bex)(wir_r, (b_w - 2));
|
|
|
|
e = j2_mbc(Pt1, sub)(wir_r, a, c);
|
2014-04-22 05:22:11 +04:00
|
|
|
f = j2_mbc(Pt3, con)(wir_r, e, d);
|
|
|
|
|
2013-09-29 00:21:18 +04:00
|
|
|
u2_rl_lose(wir_r, c);
|
|
|
|
u2_rl_lose(wir_r, d);
|
|
|
|
u2_rl_lose(wir_r, e);
|
|
|
|
|
|
|
|
return f;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
u2_weak // transfer
|
2014-04-22 05:22:11 +04:00
|
|
|
j2_mb(Pt3, mas)(u2_wire wir_r,
|
2013-09-29 00:21:18 +04:00
|
|
|
u2_noun cor) // retain
|
|
|
|
{
|
|
|
|
u2_noun a;
|
|
|
|
|
|
|
|
if ( (u2_none == (a = u2_frag(u2_cv_sam, cor))) ||
|
|
|
|
(u2_no == u2_stud(a)) )
|
|
|
|
{
|
|
|
|
return u2_bl_bail(wir_r, c3__exit);
|
|
|
|
} else {
|
|
|
|
return j2_mbc(Pt3, mas)(wir_r, a);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* structures
|
|
|
|
*/
|
2014-04-22 05:22:11 +04:00
|
|
|
u2_ho_jet
|
2013-09-29 00:21:18 +04:00
|
|
|
j2_mbj(Pt3, mas)[] = {
|
|
|
|
{ ".2", c3__lite, j2_mb(Pt3, mas), Tier3, u2_none, u2_none },
|
|
|
|
{ }
|
|
|
|
};
|