Testing =#.

This commit is contained in:
C. Guy Yarvin 2016-01-15 17:42:50 -08:00
parent 848c891db9
commit 2d4045f3c9
7 changed files with 113 additions and 41 deletions

View File

@ -288,6 +288,7 @@ J_F_OFILES=\
J_F_OFILES_UT=\
jets/f/ut.o \
jets/f/ut_burn.o \
jets/f/ut_buss.o \
jets/f/ut_conk.o \
jets/f/ut_crop.o \
jets/f/ut_fire.o \

View File

@ -1100,6 +1100,7 @@
# define c3__tsgl c3_s4('t','s','g','l')
# define c3__tsgr c3_s4('t','s','g','r')
# define c3__tshp c3_s4('t','s','h','p')
# define c3__tshx c3_s4('t','s','h','x')
# define c3__tsls c3_s4('t','s','l','s')
# define c3__tsms c3_s4('t','s','m','s')
# define c3__tssg c3_s4('t','s','s','g')

View File

@ -195,7 +195,7 @@
# define u3qfu_van_fab 119
u3_noun u3qfu_burn(u3_noun, u3_noun);
u3_noun u3qfu_busk(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_buss(u3_noun, u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_bust(u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_conk(u3_noun, u3_noun, u3_noun);
u3_noun u3qfu_crop(u3_noun, u3_noun, u3_noun);

53
jets/f/ut_buss.c Normal file
View File

@ -0,0 +1,53 @@
/* j/6/ut_buss.c
**
*/
#include "all.h"
/* logic
*/
u3_noun
_cqfu_buss(u3_noun van,
u3_noun sut,
u3_noun cog,
u3_noun gen)
{
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0);
u3_noun gat = u3j_hook(von, "buss");
return u3n_kick_on(u3i_molt(gat,
u3x_sam_2,
u3k(cog),
u3x_sam_3,
u3k(gen),
0));
}
/* boilerplate
*/
u3_noun
u3wfu_buss(u3_noun cor)
{
u3_noun sut, cog, gen, van;
if ( (c3n == u3r_mean(cor, u3x_sam_2, &cog,
u3x_sam_3, &gen,
u3x_con, &van,
0)) ||
(c3n == u3ud(cog)) ||
(u3_none == (sut = u3r_at(u3x_sam, van))) )
{
return u3m_bail(c3__fail);
} else {
return _cqfu_buss(van, sut, cog, gen);
}
}
u3_noun
u3qfu_buss(u3_noun van,
u3_noun sut,
u3_noun cog,
u3_noun gen)
{
return _cqfu_buss(van, sut, cog, gen);
}

View File

@ -3,8 +3,6 @@
*/
#include "all.h"
#define CNTS
/* logic
*/
static u3_noun
@ -235,13 +233,13 @@
return ret;
}
#ifdef CNTS
#if 1
static u3_noun
_mint_cnts_new(u3_noun van,
u3_noun sut,
u3_noun gol,
u3_noun hyp,
u3_noun rig)
_mint_cnts(u3_noun van,
u3_noun sut,
u3_noun gol,
u3_noun hyp,
u3_noun rig)
{
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0);
u3_noun gat = u3j_hook(von, "emin");
@ -674,14 +672,20 @@
u3z(boc);
return ret;
}
case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_mint_used();
{
u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen);
u3_noun ret = _mint_in(van, boc, gol, r_gen);
u3z(boc);
return ret;
}
case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mint_used();
#ifdef CNTS
return _mint_cnts_new(van, sut, gol, p_gen, q_gen);
#else
return _mint_cnts_old(van, sut, gol, p_gen, q_gen);
#endif
{
return _mint_cnts(van, sut, gol, p_gen, q_gen);
}
case c3__brcn: p_gen = u3t(gen);
_mint_used();
{

View File

@ -3,8 +3,6 @@
*/
#include "all.h"
#define CNTS
/* functions
*/
static u3_noun
@ -188,14 +186,14 @@
typ);
}
#ifdef CNTS
#if 1
static u3_noun
_mull_cnts_new(u3_noun van,
u3_noun sut,
u3_noun gol,
u3_noun dox,
u3_noun hyp,
u3_noun rig)
_mull_cnts(u3_noun van,
u3_noun sut,
u3_noun gol,
u3_noun dox,
u3_noun hyp,
u3_noun rig)
{
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0);
u3_noun gat = u3j_hook(von, "emul");
@ -620,13 +618,23 @@
return ret;
}
case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_mull_used();
{
u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen);
u3_noun nuf = u3qfu_buss(van, dox, p_gen, q_gen);
u3_noun ret = _mull_in(van, boc, gol, nuf, r_gen);
u3z(boc);
u3z(nuf);
return ret;
}
case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_mull_used();
#ifdef CNTS
return _mull_cnts_new(van, sut, gol, dox, p_gen, q_gen);
#else
return _mull_cnts_old(van, sut, gol, dox, p_gen, q_gen);
#endif
{
return _mull_cnts(van, sut, gol, dox, p_gen, q_gen);
}
case c3__brcn: p_gen = u3t(gen);
_mull_used();
{

View File

@ -3,8 +3,6 @@
*/
#include "all.h"
#define CNTS
/* logic
*/
# define _play_used()
@ -74,12 +72,12 @@
return ret;
}
#ifdef CNTS
#if 1
static u3_noun
_play_cnts_new(u3_noun van,
u3_noun sut,
u3_noun hyp,
u3_noun rig)
_play_cnts(u3_noun van,
u3_noun sut,
u3_noun hyp,
u3_noun rig)
{
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(sut), 0);
u3_noun gat = u3j_hook(von, "epla");
@ -369,13 +367,20 @@
return ret;
}
case c3__tshx: u3x_trel(u3t(gen), &p_gen, &q_gen, &r_gen);
_play_used();
{
u3_noun boc = u3qfu_buss(van, sut, p_gen, q_gen);
u3_noun ret = _play_x(van, boc, r_gen);
u3z(boc);
return ret;
}
case c3__cnts: u3x_cell(u3t(gen), &p_gen, &q_gen);
_play_used();
#ifdef CNTS
return _play_cnts_new(van, sut, p_gen, q_gen);
#else
return _play_cnts_old(van, sut, p_gen, q_gen);
#endif
{
return _play_cnts(van, sut, p_gen, q_gen);
}
case c3__brcn: p_gen = u3t(gen);
_play_used();
{