diff --git a/Makefile b/Makefile index 33b0853c9..386591b55 100644 --- a/Makefile +++ b/Makefile @@ -308,7 +308,6 @@ 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 \ diff --git a/include/jets/q.h b/include/jets/q.h index 5465da4b7..e8297405a 100644 --- a/include/jets/q.h +++ b/include/jets/q.h @@ -204,7 +204,7 @@ u3_noun u3qf_forq(u3_noun, u3_noun); u3_noun u3qf_fork(u3_noun); u3_noun u3qf_grof(u3_noun); - u3_noun u3qf_help(u3_noun, u3_noun); + u3_noun u3qf_form(u3_noun, u3_noun); u3_noun u3qf_hike(u3_noun, u3_noun); u3_noun u3qf_look(u3_noun, u3_noun); u3_noun u3qf_loot(u3_noun, u3_noun); @@ -282,7 +282,7 @@ u3_noun u3qz_forq(u3_noun, u3_noun); u3_noun u3qz_fork(u3_noun); u3_noun u3qz_grof(u3_noun); - u3_noun u3qz_help(u3_noun, u3_noun); + u3_noun u3qz_form(u3_noun, u3_noun); u3_noun u3qz_hike(u3_noun, u3_noun); u3_noun u3qz_look(u3_noun, u3_noun); u3_noun u3qz_loot(u3_noun, u3_noun); diff --git a/include/jets/w.h b/include/jets/w.h index 693cff4ba..82b6ba6b4 100644 --- a/include/jets/w.h +++ b/include/jets/w.h @@ -233,7 +233,7 @@ u3_noun u3wf_flor(u3_noun); u3_noun u3wf_forq(u3_noun); u3_noun u3wf_fork(u3_noun); - u3_noun u3wf_help(u3_noun); + u3_noun u3wf_form(u3_noun); u3_noun u3wf_hike(u3_noun); u3_noun u3wf_look(u3_noun); u3_noun u3wf_loot(u3_noun); diff --git a/jets/f/help.c b/jets/f/help.c index e657e2d3b..def71f2ba 100644 --- a/jets/f/help.c +++ b/jets/f/help.c @@ -7,25 +7,26 @@ /* functions */ u3_noun - u3qf_help(u3_noun sag, + u3qf_form(u3_noun sag, u3_noun tip) { if ( c3__void == tip ) { return c3__void; } - else return u3nt(c3__help, - u3k(sag), - u3k(tip)); + if ( c3__noun == tip ) { + return c3__noun; + } + else return u3nt(c3__form, u3k(sag), u3k(tip)); } u3_noun - u3wf_help(u3_noun cor) + u3wf_form(u3_noun cor) { u3_noun sag, tip; if ( c3n == u3r_mean(cor, u3x_sam_2, &sag, u3x_sam_3, &tip, 0) ) { return u3m_bail(c3__fail); } else { - return u3qf_help(sag, tip); + return u3qf_form(sag, tip); } } diff --git a/jets/f/ut_burn.c b/jets/f/ut_burn.c deleted file mode 100644 index f7da4d6b2..000000000 --- a/jets/f/ut_burn.c +++ /dev/null @@ -1,192 +0,0 @@ -/* j/6/ut_burn.c -** -*/ -#include "all.h" - - -/* logic -*/ - static u3_noun - _burn_in(u3_noun van, u3_noun sut, u3_noun gil); - - static u3_noun - _burn_fork(u3_noun van, - u3_noun yed, - u3_noun gil) - { - if ( u3_nul == yed ) { - return u3_nul; - } else { - u3_noun dis = _burn_in(van, u3h(yed), gil); - u3_noun mor = _burn_fork(van, u3t(yed), gil); - - if ( u3_nul == dis ) return mor; - if ( u3_nul == mor ) return dis; - { - u3_noun u_dis = u3t(dis); - u3_noun u_mor = u3t(mor); - - if ( u3du(u_dis) == u3du(u_mor) ) { - if ( c3y == u3qc_gor(u_mor, u_dis) ) { - u3z(dis); - return mor; - } else { - u3z(mor); - return dis; - } - } else { - if ( c3y == u3ud(u_dis) ) { - u3z(mor); - return dis; - } - else { - u3z(dis); - return mor; - } - } - } - } - } - - static u3_noun - _burn_in(u3_noun van, - u3_noun sut, - u3_noun gil) - { - u3_noun p_sut, q_sut, pq_sut, qq_sut, rq_sut, sq_sut, psq_sut, qsq_sut; - - if ( c3n == u3du(sut) ) switch ( sut ) { - default: return u3m_bail(c3__fail); - - case c3__noun: return u3nc(u3_nul, 0); - case c3__void: { - return u3_nul; - } - } - else switch ( u3h(sut) ) { - default: return u3m_bail(c3__fail); - - case c3__atom: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - if ( c3y == u3du(q_sut) ) { - return u3nc(u3_nul, u3k(u3t(q_sut))); - } else { - return u3nc(u3_nul, 0); - } - } - case c3__cell: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - u3_noun hed = _burn_in(van, p_sut, gil); - - if ( u3_nul == hed ) { - return u3_nul; - } - else { - u3_noun tal = _burn_in(van, q_sut, gil); - - if ( u3_nul == tal ) { - u3z(hed); - return u3_nul; - } - else { - u3_noun ret = u3nt(u3_nul, u3k(u3t(hed)), u3k(u3t(tal))); - - u3z(hed); - u3z(tal); - return ret; - } - } - } - case c3__core: u3x_cell(u3t(sut), &p_sut, &q_sut); - u3x_qual(q_sut, &pq_sut, &qq_sut, &rq_sut, &sq_sut); - u3x_cell(sq_sut, &psq_sut, &qsq_sut); - { - u3_noun pay = _burn_in(van, p_sut, gil); - - if ( u3_nul == pay ) { - return u3_nul; - } - else { - u3_noun ret = u3nt(u3_nul, u3k(psq_sut), u3k(u3t(pay))); - - u3z(pay); - return ret; - } - } - case c3__help: - case c3__face: u3x_cell(u3t(sut), &p_sut, &q_sut); - { - return _burn_in(van, q_sut, gil); - } - case c3__fork: p_sut = u3t(sut); - { - u3_noun yed = u3qdi_tap(p_sut); - u3_noun ret = _burn_fork(van, yed, gil); - - u3z(yed); - return ret; - } - case c3__hold: - { - if ( (c3y == u3qdi_has(gil, sut)) ) { - return u3_nul; - } - else { - u3_noun zoc = u3qdi_put(gil, sut); - u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _burn_in(van, fop, zoc); - - u3z(fop); - u3z(zoc); - - return pro; - } - } - } - } - - static u3_noun - _cqfu_burn(u3_noun van, - u3_noun sut) - { - u3_noun unt = _burn_in(van, sut, u3_nul); - - if ( u3_nul == unt ) { - return u3m_error("burn"); - } - else { - u3_noun ret = u3k(u3t(unt)); - - u3z(unt); - return ret; - } - } - - u3_noun - u3qfu_burn(u3_noun van, - u3_noun sut) - { - c3_m fun_m = 144 + c3__burn + ((!!u3r_at(u3qfu_van_vet, van)) << 8); - u3_noun pro = u3z_find(fun_m, sut); - - if ( u3_none != pro ) { - return pro; - } - else { - pro = _cqfu_burn(van, sut); - - return u3z_save(fun_m, sut, pro); - } - } - - u3_noun - u3wfu_burn(u3_noun cor) - { - u3_noun sut; - - if ( u3_none == (sut = u3r_at(u3x_sam, cor)) ) { - return u3m_bail(c3__fail); - } else { - return u3qfu_burn(cor, sut); - } - } diff --git a/jets/f/ut_crop.c b/jets/f/ut_crop.c index 15b9cf2d2..6c5380987 100644 --- a/jets/f/ut_crop.c +++ b/jets/f/ut_crop.c @@ -142,10 +142,10 @@ } else return _crop_sint(van, sut, ref, bix); } - case c3__help: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__form: u3x_cell(u3t(sut), &p_sut, &q_sut); { u3_noun foz = _crop_dext(van, q_sut, ref, bix); - u3_noun ret = u3qf_help(p_sut, foz); + u3_noun ret = u3qf_form(p_sut, foz); u3z(foz); return ret; @@ -204,7 +204,7 @@ default: return u3m_bail(c3__fail); case c3__core: - case c3__help: + case c3__form: case c3__face: u3x_cell(u3t(ref), &p_ref, &q_ref); { return _crop_dext(van, sut, q_ref, bix); diff --git a/jets/f/ut_find.c b/jets/f/ut_find.c index 56232183c..943d90ea2 100644 --- a/jets/f/ut_find.c +++ b/jets/f/ut_find.c @@ -675,10 +675,10 @@ // fprintf(stderr, "core\r\n"); return _find_buck_core(van, sut, way, p_heg, q_heg, axe, lon, gil); } - case c3__help: + case c3__form: { u3_noun fop = u3qfu_repo(van, sut); - u3_noun pro = _find_buck(van, fop, way, p_heg, q_heg, axe, lon, gil); + u3_noun pro = _find_bucx(van, fop, way, p_heg, q_heg, axe, lon, gil); u3z(fop); return pro; } diff --git a/jets/f/ut_fish.c b/jets/f/ut_fish.c index 40926f030..8656d23e8 100644 --- a/jets/f/ut_fish.c +++ b/jets/f/ut_fish.c @@ -92,7 +92,7 @@ case c3__core: { return u3m_error("fish-core"); } - case c3__help: + case c3__form: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_fuse.c b/jets/f/ut_fuse.c index da3f0204a..42bfbdc73 100644 --- a/jets/f/ut_fuse.c +++ b/jets/f/ut_fuse.c @@ -124,10 +124,10 @@ { return _fuse_repo(van, sut, ref, bix); } - case c3__help: u3x_cell(u3t(sut), &p_sut, &q_sut); + case c3__form: u3x_cell(u3t(sut), &p_sut, &q_sut); { u3_noun vot = _fuse_in(van, q_sut, ref, bix); - u3_noun ret = u3qf_help(p_sut, vot); + u3_noun ret = u3qf_form(p_sut, vot); u3z(vot); return ret; diff --git a/jets/f/ut_mint.c b/jets/f/ut_mint.c index c5cf5876b..dc79ae222 100644 --- a/jets/f/ut_mint.c +++ b/jets/f/ut_mint.c @@ -539,12 +539,12 @@ return pro; } - case c3__help: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__note: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { u3_noun hum = _mint_in(van, sut, gol, q_gen); - u3_noun ret = u3nc(u3qf_help(p_gen, u3h(hum)), + u3_noun ret = u3nc(u3qf_form(p_gen, u3h(hum)), u3k(u3t(hum))); u3z(hum); return ret; @@ -556,7 +556,7 @@ u3_noun hep = u3nc(c3__docs, u3k(p_gen)); u3_noun hum = _mint_in(van, sut, gol, q_gen); - u3_noun ret = u3nc(u3qf_help(hep, u3h(hum)), + u3_noun ret = u3nc(u3qf_form(hep, u3h(hum)), u3k(u3t(hum))); u3z(hep); @@ -564,23 +564,6 @@ return ret; } - case c3__form: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mint_used(); - { - u3_noun hum = _mint_in(van, sut, gol, q_gen); - - if ( c3__void == u3h(hum) ) { - return hum; - } - else { - ret = u3nc(u3nt(c3__form, u3nc(u3k(sut), u3k(p_gen)), u3k(u3h(hum))), - u3k(u3t(hum))); - - u3z(hum); - return ret; - } - } - case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen); _mint_used(); { diff --git a/jets/f/ut_mull.c b/jets/f/ut_mull.c index 42e3a91c2..a0448077d 100644 --- a/jets/f/ut_mull.c +++ b/jets/f/ut_mull.c @@ -521,51 +521,12 @@ return pro; } - case c3__help: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__note: u3x_cell(u3t(gen), &p_gen, &q_gen); _mull_used(); { u3_noun vat = _mull_in(van, sut, gol, dox, q_gen); - u3_noun ret = u3nc(u3qf_help(p_gen, u3h(vat)), - u3qf_help(p_gen, u3t(vat))); - - u3z(vat); - return ret; - } - - case c3__docs: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun vat = _mull_in(van, sut, gol, dox, q_gen); - u3_noun hep = u3nc(c3__docs, u3k(p_gen)); - - u3_noun ret = u3nc(u3qf_help(hep, u3h(vat)), - u3qf_help(hep, u3t(vat))); - - u3z(hep); - u3z(vat); - return ret; - } - - case c3__form: u3x_cell(u3t(gen), &p_gen, &q_gen); - _mull_used(); - { - u3_noun vat = _mull_in(van, sut, gol, dox, q_gen); - u3_noun nup, dur; - - if ( c3__void == u3h(vat) ) { - nup = c3__void; - } - else { - nup = u3nt(c3__form, u3nc(u3k(sut), u3k(p_gen)), u3k(u3h(vat))); - } - - if ( c3__void == u3t(vat) ) { - dur = c3__void; - } - else { - dur = u3nt(c3__form, u3nc(u3k(dox), u3k(p_gen)), u3k(u3t(vat))); - } - ret = u3nc(nup, dur); + u3_noun ret = u3nc(u3qf_form(p_gen, u3h(vat)), + u3qf_form(p_gen, u3t(vat))); u3z(vat); return ret; diff --git a/jets/f/ut_nest.c b/jets/f/ut_nest.c index 10f00b06d..3d6236c29 100644 --- a/jets/f/ut_nest.c +++ b/jets/f/ut_nest.c @@ -283,7 +283,7 @@ else return _nest_sint(van, sut, tel, ref, seg, reg, gil); } } - case c3__help: + case c3__form: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); @@ -447,7 +447,7 @@ u3z(gam); return hiv; } - case c3__help: + case c3__form: case c3__face: { if ( c3n == u3r_trel(ref, 0, &p_ref, &q_ref) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_peek.c b/jets/f/ut_peek.c index cf02f18da..64234e73d 100644 --- a/jets/f/ut_peek.c +++ b/jets/f/ut_peek.c @@ -128,7 +128,7 @@ return pro; } } - case c3__help: + case c3__form: case c3__face: { if ( (c3n == u3r_trel(sut, 0, &p_sut, &q_sut)) ) { return u3m_bail(c3__fail); diff --git a/jets/f/ut_play.c b/jets/f/ut_play.c index 3b1adf5e8..34218c4cc 100644 --- a/jets/f/ut_play.c +++ b/jets/f/ut_play.c @@ -378,41 +378,16 @@ return pro; } - case c3__help: u3x_cell(u3t(gen), &p_gen, &q_gen); + case c3__note: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { u3_noun boc = _play_x(van, sut, q_gen); - u3_noun ret = u3qf_help(p_gen, boc); + u3_noun ret = u3qf_form(p_gen, boc); u3z(boc); return ret; } - case c3__form: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - u3_noun boc = _play_x(van, sut, q_gen); - - if ( c3__void == boc ) { - return boc; - } - else { - return u3nt(c3__form, u3nc(u3k(sut), u3k(p_gen)), boc); - } - } - - case c3__docs: u3x_cell(u3t(gen), &p_gen, &q_gen); - _play_used(); - { - u3_noun boc = _play_x(van, sut, q_gen); - u3_noun hep = u3nc(c3__docs, u3k(p_gen)); - u3_noun ret = u3qf_help(hep, boc); - - u3z(hep); - u3z(boc); - return ret; - } - case c3__ktts: u3x_cell(u3t(gen), &p_gen, &q_gen); _play_used(); { diff --git a/jets/f/ut_repo.c b/jets/f/ut_repo.c index c2807dfc2..8b19f21b5 100644 --- a/jets/f/ut_repo.c +++ b/jets/f/ut_repo.c @@ -34,7 +34,7 @@ return u3nt(c3__cell, c3__noun, u3k(p_sut)); } } - case c3__help: + case c3__form: case c3__face: { if ( c3n == u3r_cell(u3t(sut), &p_sut, &q_sut)) { return u3m_bail(c3__fail); diff --git a/jets/tree.c b/jets/tree.c index 784ae0607..eac9856ea 100644 --- a/jets/tree.c +++ b/jets/tree.c @@ -105,7 +105,7 @@ static u3j_core _143_hex_d[] = static u3j_harm _143_pen_comb_a[] = {{".2", u3wf_comb}, {}}; static u3j_harm _143_pen_cons_a[] = {{".2", u3wf_cons}, {}}; static u3j_harm _143_pen_core_a[] = {{".2", u3wf_core}, {}}; - static u3j_harm _143_pen_help_a[] = {{".2", u3wf_help}, {}}; + static u3j_harm _143_pen_form_a[] = {{".2", u3wf_form}, {}}; static u3j_harm _143_pen_face_a[] = {{".2", u3wf_face}, {}}; static u3j_harm _143_pen_fitz_a[] = {{".2", u3wf_fitz}, {}}; static u3j_harm _143_pen_flan_a[] = {{".2", u3wf_flan}, {}}; @@ -116,7 +116,6 @@ static u3j_core _143_hex_d[] = static u3j_harm _143_pen_look_a[] = {{".2", u3wf_look}, {}}; static u3j_harm _143_pen_loot_a[] = {{".2", u3wf_loot}, {}}; - static u3j_harm _143_pen__ut_burn_a[] = {{".2", u3wfu_burn}, {}}; static u3j_harm _143_pen__ut_conk_a[] = {{".2", u3wfu_conk}, {}}; static u3j_harm _143_pen__ut_crop_a[] = {{".2", u3wfu_crop}, {}}; // static u3j_harm _143_pen__ut_fire_a[] = {{".2", u3wfu_fire}, {}}; @@ -133,7 +132,6 @@ static u3j_core _143_hex_d[] = static u3j_harm _143_pen__ut_wrap_a[] = {{".2", u3wfu_wrap}, {}}; static u3j_core _143_pen__ut_d[] = { - { "burn", _143_pen__ut_burn_a }, { "conk", _143_pen__ut_conk_a }, { "crop", _143_pen__ut_crop_a }, { "fond", _143_pen__ut_fond_a }, @@ -151,8 +149,7 @@ static u3j_core _143_hex_d[] = {} }; static u3j_harm _143_pen__ut_a[] = - { {"burn", u3wfu_burn}, - {"repo", u3wfu_repo}, + { {"repo", u3wfu_repo}, {} }; @@ -182,7 +179,7 @@ static u3j_core _143_pen_d[] = { "flip", _143_pen_flip_a }, { "flor", _143_pen_flor_a }, { "fork", _143_pen_fork_a }, - { "help", _143_pen_help_a }, + { "form", _143_pen_form_a }, { "hike", _143_pen_hike_a }, { "look", _143_pen_look_a }, { "loot", _143_pen_loot_a },