diff --git a/Makefile b/Makefile index 362817a02..2c609faa6 100644 --- a/Makefile +++ b/Makefile @@ -173,6 +173,7 @@ J191_5_OFILES=\ gen191/5/trip.o J191_6_OFILES=\ + gen191/6/al.o \ gen191/6/ap.o \ gen191/6/bull.o \ gen191/6/cell.o \ diff --git a/f/dash.c b/f/dash.c index a8bd74758..45b4c415e 100644 --- a/f/dash.c +++ b/f/dash.c @@ -66,9 +66,11 @@ u2_ds_find(u2_wire wir_r, } else out = _ds_scan(pug, cor); +#if 0 if ( (u2_none == out) && (u2_none != pug) ) { fprintf(stderr, "half match\r\n"); } +#endif return out; } } diff --git a/gen191/6/al.c b/gen191/6/al.c new file mode 100644 index 000000000..1e42eab1e --- /dev/null +++ b/gen191/6/al.c @@ -0,0 +1,52 @@ +/* j/6/al.c +** +** This file is in the public domain. +*/ +#include "all.h" +#include "../pit.h" + +/* ~(. al gen) +*/ +static u2_noun +_al_core(u2_wire wir_r, + u2_noun van, + u2_noun gen) +{ + u2_noun ter = u2_frag(u2_cv_con_3, van); + u2_weak hoc = u2_ds_look(wir_r, ter, "al"); + + if ( u2_none == hoc ) { + return u2_cm_bail(c3__fail); + } + else { + u2_noun gat = u2_nk_soft(wir_r, u2_rx(wir_r, ter), hoc); + u2_noun cor = u2_rl_molt(wir_r, gat, + u2_cv_sam, u2_rx(wir_r, gen), + 0); + + u2_rz(wir_r, hoc); + u2_rz(wir_r, gat); + + return cor; + } +} + +/* ~(bunt al gen) +*/ +u2_noun // transfer +j2_mcy(Pt6, al, bunt)(u2_wire wir_r, + u2_noun van, // retain + u2_noun gen) // retain +{ + u2_noun cor = _al_core(wir_r, van, gen); + u2_weak hoc = u2_ds_look(wir_r, cor, "bunt"); + + if ( u2_none == hoc ) { + return u2_cm_bail(c3__fail); + } else { + u2_noun pro = u2_nk_soft(wir_r, cor, hoc); + + u2_rz(wir_r, hoc); + return pro; + } +} diff --git a/gen191/6/ut_mint.c b/gen191/6/ut_mint.c index 2f25baa21..405dcb869 100644 --- a/gen191/6/ut_mint.c +++ b/gen191/6/ut_mint.c @@ -418,6 +418,24 @@ u2_rl_lose(wir_r, wam); return ret; } + case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen); + _mint_used(wir_r); + { + u2_noun nob = j2_mcy(Pt6, al, bunt)(wir_r, van, p_gen); + u2_noun vol = _mint_corn(wir_r, van, sut, q_gen); + u2_noun axe = _mint_coke(wir_r, vol); + u2_noun wam = j2_mcy(Pt6, ut, play)(wir_r, van, sut, nob); + + ret = u2_bc + (wir_r, + _mint_nice(wir_r, van, gol, _mint_bean(wir_r)), + j2_mcy(Pt6, ut, fish)(wir_r, van, wam, axe)); + + u2_rl_lose(wir_r, axe); + u2_rl_lose(wir_r, wam); + u2_rl_lose(wir_r, nob); + return ret; + } case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen); _mint_used(wir_r); { diff --git a/gen191/6/ut_mull.c b/gen191/6/ut_mull.c index be4f43eda..a8c83bc77 100644 --- a/gen191/6/ut_mull.c +++ b/gen191/6/ut_mull.c @@ -371,6 +371,29 @@ return _mull_both(wir_r, van, gol, _mull_bean(wir_r)); } + case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen); + _mull_used(wir_r); + { + u2_noun nob = j2_mcy(Pt6, al, bunt)(wir_r, van, p_gen); + u2_noun p_waz = j2_mcy(Pt6, ut, play)(wir_r, van, sut, nob); + u2_noun q_waz = j2_mcy(Pt6, ut, play)(wir_r, van, dox, nob); + u2_noun p_syx = _mull_doke(wir_r, van, sut, q_gen); + u2_noun q_syx = _mull_doke(wir_r, van, dox, q_gen); + u2_noun p_pov = j2_mcy(Pt6, ut, fish)(wir_r, van, p_waz, p_syx); + u2_noun q_pov = j2_mcy(Pt6, ut, fish)(wir_r, van, q_waz, q_syx); + + if ( (u2_no == u2_sing(p_syx, q_syx)) || + (u2_no == u2_sing(p_pov, q_pov)) ) + { + return u2_bl_error(wir_r, "mull-bonk-b"); + } + u2_rz(wir_r, p_waz); u2_rz(wir_r, q_waz); + u2_rz(wir_r, p_syx); u2_rz(wir_r, q_syx); + u2_rz(wir_r, p_pov); u2_rz(wir_r, q_pov); + u2_rz(wir_r, nob); + + return _mull_both(wir_r, van, gol, _mull_bean(wir_r)); + } case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen); _mull_used(wir_r); { diff --git a/gen191/6/ut_play.c b/gen191/6/ut_play.c index f7900cbdb..354f1097c 100644 --- a/gen191/6/ut_play.c +++ b/gen191/6/ut_play.c @@ -202,6 +202,11 @@ { return _play_bean(wir_r); } + case c3__wtts: u2_bi_cell(wir_r, u2_t(gen), &p_gen, &q_gen); + _play_used(wir_r); + { + return _play_bean(wir_r); + } case c3__wtcl: u2_bi_trel(wir_r, u2_t(gen), &p_gen, &q_gen, &r_gen); _play_used(wir_r); { diff --git a/gen191/pit.h b/gen191/pit.h index 80677d42c..88bd8fdc6 100644 --- a/gen191/pit.h +++ b/gen191/pit.h @@ -444,6 +444,11 @@ u2_noun ter, // retain u2_noun gen); // retain + u2_noun // transfer + j2_mcy(Pt6, al, bunt)(u2_wire wir_r, + u2_noun van, // retain + u2_noun gen); // retain + u2_noun // transfer j2_mcy(Pt6, ap, rake)(u2_wire wir_r, u2_noun gen); // retain