shrub/gen164/4/in_gas.c

57 lines
1.3 KiB
C
Raw Normal View History

2013-09-29 00:21:18 +04:00
/* j/4/gas.c
**
** This file is in the public domain.
*/
#include "all.h"
#include "../pit.h"
/* functions
*/
u2_weak // transfer
2014-08-20 08:30:55 +04:00
j2_mcc(Pt4, in, gas)(
2013-09-29 00:21:18 +04:00
u2_noun a, // retain
u2_noun b) // retain
{
if ( u2_nul == b ) {
2014-08-20 08:30:55 +04:00
return u2k(a);
2013-09-29 00:21:18 +04:00
}
else {
2014-08-20 08:30:55 +04:00
if ( u2_no == u2du(b) ) {
return u2_cm_bail(c3__exit);
2013-09-29 00:21:18 +04:00
} else {
2014-08-20 08:30:55 +04:00
u2_noun i_b = u2h(b);
u2_noun t_b = u2t(b);
2013-09-29 00:21:18 +04:00
u2_noun c;
2014-08-20 08:30:55 +04:00
if ( u2_none == (c = j2_mcc(Pt4, in, put)(a, i_b)) ) {
return u2_cm_bail(c3__exit);
2013-09-29 00:21:18 +04:00
} else {
2014-08-20 08:30:55 +04:00
u2_noun d = j2_mcc(Pt4, in, gas)(c, t_b);
2013-09-29 00:21:18 +04:00
2014-08-20 08:30:55 +04:00
u2z(c);
2013-09-29 00:21:18 +04:00
return d;
}
}
}
}
u2_weak // transfer
2014-08-20 08:30:55 +04:00
j2_mc(Pt4, in, gas)(
2013-09-29 00:21:18 +04:00
u2_noun cor) // retain
{
u2_noun a, b;
2014-08-20 08:30:55 +04:00
if ( u2_no == u2_cr_mean(cor, u2_cv_sam, &b, u2_cv_con_sam, &a, 0) ) {
return u2_cm_bail(c3__exit);
2013-09-29 00:21:18 +04:00
} else {
2014-08-20 08:30:55 +04:00
return j2_mcc(Pt4, in, gas)(a, b);
2013-09-29 00:21:18 +04:00
}
}
/* structures
*/
u2_ho_jet
2013-09-29 00:21:18 +04:00
j2_mcj(Pt4, in, gas)[] = {
{ ".2", c3__lite, j2_mc(Pt4, in, gas), Tier4, u2_none, u2_none },
{ }
};