From a2ba265d99e4c4f2425cc6c01e79dd8b023ff5eb Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 5 Nov 2014 19:10:22 -0800 Subject: [PATCH] Renaming, renaming. --- g/m.c | 2 +- g/r.c | 54 ++++++++++++------------ g/t.c | 6 +-- g/v.c | 16 +++---- g/z.c | 16 +++---- i/all.h | 115 ++++++++++---------------------------------------- i/g/a.h | 35 --------------- i/g/j.h | 2 +- i/g/r.h | 50 +++++++++++----------- i/g/u.h | 102 ++++++++++++++++++++++++++++++++++++++++++++ i/g/v.h | 6 +-- i/g/z.h | 16 +++---- i/j/k.h | 6 +-- i/j/q.h | 10 ++--- i/j/w.h | 6 +-- i/v/vere.h | 80 +++++++++++++++++------------------ j/1/gte.c | 2 +- j/1/gth.c | 2 +- j/1/lte.c | 2 +- j/1/lth.c | 2 +- j/4/by_has.c | 4 +- j/4/in_has.c | 4 +- j/5/loss.c | 10 ++--- j/5/parse.c | 2 +- j/5/tape.c | 2 +- j/6/fitz.c | 2 +- j/6/ut_conk.c | 4 +- j/6/ut_cull.c | 8 ++-- j/6/ut_fire.c | 6 +-- j/6/ut_mint.c | 8 ++-- j/6/ut_mull.c | 8 ++-- j/6/ut_nest.c | 54 ++++++++++++------------ j/6/ut_park.c | 2 +- j/6/ut_rest.c | 2 +- v/ames.c | 8 ++-- v/cttp.c | 12 +++--- v/http.c | 6 +-- v/loop.c | 22 +++++----- v/main.c | 4 +- v/raft.c | 10 ++--- v/reck.c | 22 +++++----- v/sist.c | 40 +++++++++--------- v/term.c | 14 +++--- v/unix.c | 50 +++++++++++----------- v/walk.c | 4 +- 45 files changed, 417 insertions(+), 421 deletions(-) create mode 100644 i/g/u.h diff --git a/g/m.c b/g/m.c index 7d528eea0..fab87979e 100644 --- a/g/m.c +++ b/g/m.c @@ -979,7 +979,7 @@ u3m_soft(c3_w sec_w, cod = u3k(u3h(u3t(why))); tax = u3k(u3t(u3t(why))); } - mok = u3_dc("mook", 2, tax); + mok = u3dc("mook", 2, tax); pro = u3nc(cod, u3k(u3t(mok))); u3z(mok); diff --git a/g/r.c b/g/r.c index 018fe0797..160148acb 100644 --- a/g/r.c +++ b/g/r.c @@ -123,7 +123,7 @@ u3r_at(u3_atom a, return cut_t ? cut_w : i_w; } - static u3_bean + static c3_o _mean_extract(u3_noun som, c3_w len_w, struct _mean_pair* prs_m) @@ -148,7 +148,7 @@ u3r_at(u3_atom a, } } -u3_bean +c3_o u3r_mean(u3_noun som, ...) { @@ -533,7 +533,7 @@ _sung_one(u3_noun* a, u3_noun* b) /* _sung_x(): yes if a and b are the same noun, unifying. */ -static u3_bean +static c3_o _sung_x(u3_noun a, u3_noun b) { if ( a == b ) { @@ -618,7 +618,7 @@ _sung_x(u3_noun a, u3_noun b) ** ** Yes iff (a) and (b) are the same noun. */ -static u3_bean +static c3_o _sing_x(u3_noun a, u3_noun b) { @@ -699,7 +699,7 @@ _sing_x(u3_noun a, ** ** Yes iff (a) and (b) are the same noun. */ -u3_bean +c3_o u3r_sing(u3_noun a, u3_noun b) { @@ -708,14 +708,14 @@ u3r_sing(u3_noun a, /* u3r_sung(): yes iff (a) and (b) are the same noun, unifying equals. */ -u3_bean +c3_o u3r_sung(u3_noun a, u3_noun b) { return _sung_x(a, b); } -u3_bean +c3_o u3r_fing(u3_noun a, u3_noun b) { @@ -726,7 +726,7 @@ u3r_fing(u3_noun a, ** ** Yes iff `[p q]` and `b` are the same noun. */ -u3_bean +c3_o u3r_sing_cell(u3_noun p, u3_noun q, u3_noun b) @@ -735,7 +735,7 @@ u3r_sing_cell(u3_noun p, c3a(u3r_sing(p, u3a_h(b)), u3r_sing(q, u3a_t(b)))); } -u3_bean +c3_o u3r_fing_cell(u3_noun p, u3_noun q, u3_noun b) @@ -749,7 +749,7 @@ u3r_fing_cell(u3_noun p, ** ** Yes iff `[p q]` and `b` are the same noun. */ -u3_bean +c3_o u3r_sing_mixt(const c3_c* p_c, u3_noun q, u3_noun b) @@ -758,7 +758,7 @@ u3r_sing_mixt(const c3_c* p_c, c3a(u3r_sing_c(p_c, u3a_h(b)), u3r_sing(q, u3a_t(b)))); } -u3_bean +c3_o u3r_fing_mixt(const c3_c* p_c, u3_noun q, u3_noun b) @@ -772,7 +772,7 @@ u3r_fing_mixt(const c3_c* p_c, ** ** Yes iff `[p q r]` and `b` are the same noun. */ -u3_bean +c3_o u3r_sing_trel(u3_noun p, u3_noun q, u3_noun r, @@ -782,7 +782,7 @@ u3r_sing_trel(u3_noun p, c3a(u3r_sing(p, u3a_h(b)), u3r_sing_cell(q, r, u3a_t(b)))); } -u3_bean +c3_o u3r_fing_trel(u3_noun p, u3_noun q, u3_noun r, @@ -797,7 +797,7 @@ u3r_fing_trel(u3_noun p, ** ** Yes iff `[p q r]` and `b` are the same noun. */ -u3_bean +c3_o u3r_sing_qual(u3_noun p, u3_noun q, u3_noun r, @@ -808,7 +808,7 @@ u3r_sing_qual(u3_noun p, c3a(u3r_sing(p, u3a_h(b)), u3r_sing_trel(q, r, s, u3a_t(b)))); } -u3_bean +c3_o u3r_fing_qual(u3_noun p, u3_noun q, u3_noun r, @@ -893,7 +893,7 @@ u3r_nord(u3_noun a, ** ** Yes iff (b) is the same noun as the C string a_c. */ -u3_bean +c3_o u3r_sing_c(const c3_c* a_c, u3_noun b) { @@ -922,7 +922,7 @@ u3r_sing_c(const c3_c* a_c, ** ** Factor [a] as a bush [b.[p q] c]. */ -u3_bean +c3_o u3r_bush(u3_noun a, u3_noun* b, u3_noun* c) @@ -948,7 +948,7 @@ u3r_bush(u3_noun a, ** ** Factor (a) as a cell (b c). */ -u3_bean +c3_o u3r_cell(u3_noun a, u3_noun* b, u3_noun* c) @@ -969,7 +969,7 @@ u3r_cell(u3_noun a, ** ** & [0] if [a] is of the form [b *c]. */ -u3_bean +c3_o u3r_p(u3_noun a, u3_noun b, u3_noun* c) @@ -989,7 +989,7 @@ u3r_p(u3_noun a, ** ** & [0] if [a] is of the form [b *c d]. */ -u3_bean +c3_o u3r_pq(u3_noun a, u3_noun b, u3_noun* c, @@ -1009,7 +1009,7 @@ u3r_pq(u3_noun a, ** ** & [0] if [a] is of the form [b *c *d *e]. */ -u3_bean +c3_o u3r_pqr(u3_noun a, u3_noun b, u3_noun* c, @@ -1030,7 +1030,7 @@ u3r_pqr(u3_noun a, ** ** & [0] if [a] is of the form [b *c *d *e *f]. */ -u3_bean +c3_o u3r_pqrs(u3_noun a, u3_noun b, u3_noun* c, @@ -1052,7 +1052,7 @@ u3r_pqrs(u3_noun a, ** ** Factor (a) as a trel (b c d). */ -u3_bean +c3_o u3r_trel(u3_noun a, u3_noun *b, u3_noun *c, @@ -1073,7 +1073,7 @@ u3r_trel(u3_noun a, ** ** Factor (a) as a qual (b c d e). */ -u3_bean +c3_o u3r_qual(u3_noun a, u3_noun* b, u3_noun* c, @@ -1093,7 +1093,7 @@ u3r_qual(u3_noun a, ** ** Factor (a) as a quil (b c d e f). */ -u3_bean +c3_o u3r_quil(u3_noun a, u3_noun* b, u3_noun* c, @@ -1114,7 +1114,7 @@ u3r_quil(u3_noun a, ** ** Factor (a) as a hext (b c d e f g) */ -u3_bean +c3_o u3r_hext(u3_noun a, u3_noun* b, u3_noun* c, @@ -1580,7 +1580,7 @@ u3_mur(u3_noun veb) return mur_w; } - if ( u3_dog_is_pom(veb) ) { + if ( u3dog_is_pom(veb) ) { mur_w = u3_mur_both(u3_mur(u3h(veb)), u3_mur(u3t(veb))); } else { diff --git a/g/t.c b/g/t.c index 2237a7c01..8b31479d6 100644 --- a/g/t.c +++ b/g/t.c @@ -64,7 +64,7 @@ u3t_heck(u3_atom cog) if ( 0 == u3R->pro.day ) { u3R->pro.day = u3v_do("doss", 0); } - u3R->pro.day = u3_dc("pi-heck", cog, u3R->pro.day); + u3R->pro.day = u3dc("pi-heck", cog, u3R->pro.day); } /* u3t_samp(): sample. @@ -74,7 +74,7 @@ u3t_samp(void) { if ( 0 == u3R->pro.day ) { u3R->pro.day = u3v_do("doss", 0); } - u3R->pro.day = u3_dc("pi-noon", u3k(u3R->pro.don), u3R->pro.day); + u3R->pro.day = u3dc("pi-noon", u3k(u3R->pro.don), u3R->pro.day); } /* u3t_come(): push on profile stack. @@ -107,7 +107,7 @@ void u3t_damp(void) { if ( 0 != u3R->pro.day ) { - u3_noun wol = u3_do("pi-tell", u3R->pro.day); + u3_noun wol = u3do("pi-tell", u3R->pro.day); u3m_wall(wol); u3R->pro.day = u3v_do("doss", 0); diff --git a/g/v.c b/g/v.c index a0c7e5a61..bf05b239a 100644 --- a/g/v.c +++ b/g/v.c @@ -218,7 +218,7 @@ _cv_nock_poke(u3_noun ovo) #if 0 { c3_c* ovi_c = u3r_string(u3h(u3t(ovo))); - u3_noun tox = u3_do("spat", u3k(u3h(ovo))); + u3_noun tox = u3do("spat", u3k(u3h(ovo))); c3_c* tox_c = u3r_string(tox); printf("poke: %%%s (%x) on %s\r\n", ovi_c, u3r_mug(ovo), tox_c); @@ -292,7 +292,7 @@ u3v_do(const c3_c* txt_c, u3_noun sam) static u3_noun _cv_scot(u3_noun dim) { - return u3_do("scot", dim); + return u3do("scot", dim); } /* u3v_time(): set the reck time. @@ -348,12 +348,12 @@ u3v_keep(u3_noun hap) #if 0 /* _cv_mole(): parse simple atomic mole. */ -static u3_bean +static c3_o _cv_mole(u3_noun fot, u3_noun san, c3_d* ato_d) { - u3_noun uco = u3_do("slay", san); + u3_noun uco = u3do("slay", san); u3_noun p_uco, q_uco, r_uco, s_uco; if ( (c3n == u3r_qual(uco, &p_uco, &q_uco, &r_uco, &s_uco)) || @@ -374,7 +374,7 @@ _cv_mole(u3_noun fot, /* _cv_lily(): parse little atom. */ -static u3_bean +static c3_o _cv_lily(u3_noun fot, u3_noun txt, c3_l* tid_l) { c3_d ato_d; @@ -404,7 +404,7 @@ u3v_poke(u3_noun ovo) /* u3v_http_request(): hear http request on channel (unprotected). */ void -u3v_http_request(u3_bean sec, u3_noun pox, u3_noun req) +u3v_http_request(c3_o sec, u3_noun pox, u3_noun req) { // uL(fprintf(uH, "http: request\n")); u3v_plan(pox, u3nq(c3__this, sec, 0, req)); @@ -432,7 +432,7 @@ u3v_punt(u3_noun blu, c3_l tab_l, u3_noun tac) // We are calling nock here, but hopefully need no protection. // while ( c3y == u3r_du(cat) ) { - u3_noun wol = u3_dc("wash", u3nc(tab_l, col_l), u3k(u3h(cat))); + u3_noun wol = u3dc("wash", u3nc(tab_l, col_l), u3k(u3h(cat))); u3m_wall(wol); cat = u3t(cat); @@ -446,7 +446,7 @@ u3v_punt(u3_noun blu, c3_l tab_l, u3_noun tac) void u3v_sway(u3_noun blu, c3_l tab_l, u3_noun tax) { - u3_noun mok = u3_dc("mook", 2, tax); + u3_noun mok = u3dc("mook", 2, tax); u3v_punt(blu, tab_l, u3k(u3t(mok))); u3z(mok); diff --git a/g/z.c b/g/z.c index 004773d7f..7d56d2d71 100644 --- a/g/z.c +++ b/g/z.c @@ -7,7 +7,7 @@ /* u3z_find(): find in memo cache. Arguments retained. */ u3_weak -u3z_find(u3_mote fun, u3_noun one) +u3z_find(c3_m fun, u3_noun one) { u3_noun key = u3nc(fun, u3k(one)); u3_noun val; @@ -17,7 +17,7 @@ u3z_find(u3_mote fun, u3_noun one) return val; } u3_weak -u3z_find_2(u3_mote fun, u3_noun one, u3_noun two) +u3z_find_2(c3_m fun, u3_noun one, u3_noun two) { u3_noun key = u3nt(fun, u3k(one), u3k(two)); u3_noun val; @@ -27,7 +27,7 @@ u3z_find_2(u3_mote fun, u3_noun one, u3_noun two) return val; } u3_weak -u3z_find_3(u3_mote fun, u3_noun one, u3_noun two, u3_noun tri) +u3z_find_3(c3_m fun, u3_noun one, u3_noun two, u3_noun tri) { u3_noun key = u3nq(fun, u3k(one), u3k(two), u3k(tri)); u3_noun val; @@ -37,7 +37,7 @@ u3z_find_3(u3_mote fun, u3_noun one, u3_noun two, u3_noun tri) return val; } u3_weak -u3z_find_4(u3_mote fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun qua) +u3z_find_4(c3_m fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun qua) { u3_noun key = u3nc(fun, u3nq(u3k(one), u3k(two), u3k(tri), u3k(qua))); u3_noun val; @@ -50,7 +50,7 @@ u3z_find_4(u3_mote fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun qua) /* u3z_save*(): save in memo cache. */ u3_noun -u3z_save(u3_mote fun, u3_noun one, u3_noun val) +u3z_save(c3_m fun, u3_noun one, u3_noun val) { u3_noun key = u3nc(fun, u3k(one)); @@ -59,7 +59,7 @@ u3z_save(u3_mote fun, u3_noun one, u3_noun val) return val; } u3_noun -u3z_save_2(u3_mote fun, u3_noun one, u3_noun two, u3_noun val) +u3z_save_2(c3_m fun, u3_noun one, u3_noun two, u3_noun val) { u3_noun key = u3nt(fun, u3k(one), u3k(two)); @@ -68,7 +68,7 @@ u3z_save_2(u3_mote fun, u3_noun one, u3_noun two, u3_noun val) return val; } u3_noun -u3z_save_3(u3_mote fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun val) +u3z_save_3(c3_m fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun val) { u3_noun key = u3nq(fun, u3k(one), u3k(two), u3k(tri)); @@ -77,7 +77,7 @@ u3z_save_3(u3_mote fun, u3_noun one, u3_noun two, u3_noun tri, u3_noun val) return val; } u3_noun -u3z_save_4(u3_mote fun, +u3z_save_4(c3_m fun, u3_noun one, u3_noun two, u3_noun tri, diff --git a/i/all.h b/i/all.h index 640d7aef3..38dc466f1 100644 --- a/i/all.h +++ b/i/all.h @@ -2,101 +2,30 @@ ** ** This file is in the public domain. */ - /** Prefix definitions: - *** - *** u3_ca_: fundamental allocators. - *** u3_cc_: constants. - *** u3_ce_: checkpointing. - *** u3_ch_: HAMT hash tables. - *** u3_ci_: noun constructors - *** u3_cj_: jets. - *** u3_ck*: direct jet calls (modern C convention) - *** u3_cm_: system management etc. - *** u3_cn_: nock interpreter. - *** u3_co_: fundamental macros. - *** u3_cq*: direct jet calls (archaic C convention) - *** u3_cr_: read functions which never bail out. - *** u3_cs_: structures and definitions. - *** u3_ct_: tracing. - *** u3_cw_: direct jet calls (core noun convention) - *** u3_cx_: read functions which do bail out. - *** u3_cv_: arvo specific structures. - *** u3_cz_: memoization. - *** - *** u3_cr_, u3_cx_, u3_cz_ functions use retain conventions; the caller - *** retains ownership of passed-in nouns, the callee preserves - *** ownership of returned nouns. - *** - *** Unless documented otherwise, all other functions use transfer - *** conventions; the caller logically releases passed-in nouns, - *** the callee logically releases returned nouns. - *** - *** In general, exceptions to the transfer convention all occur - *** when we're using a noun as a key. + /** c3: C environment. **/ +# include "c/portable.h" // C and OS portability +# include "c/types.h" // c3 types +# include "c/defs.h" // c3 macros +# include "c/motes.h" // c3 constants - /** c: the c3 layer, C portability and definitions. - **/ -# include "c/portable.h" -# include "c/types.h" -# include "c/defs.h" -# include "c/motes.h" - - /** miscellaneous definitions and data structures. - **/ - /* u3_yes, u3_no, u3_nul; - ** - ** Our Martian booleans and list terminator; empty string; not a noun. - */ -# define u3_nul 0 -# define u3_blip 0 - - /* Tools for Martian booleans. - */ -# define u3_assure(x) if ( !_(x) ) { u3m_bail(c3__fail); } -# define u3_assent(x) if ( !_(x) ) { u3m_bail(c3__exit); } - - - /** Aliases - selective and syntactically unique. + /** u3: noun environment. **/ -# define u3h(som) u3x_h(som) -# define u3t(som) u3x_t(som) -# define u3at(axe, som) u3x_at(axe, som) +# include "g/u.h" // general u3 -# define u3nc(a, b) u3i_cell(a, b) -# define u3nt(a, b, c) u3i_trel(a, b, c) -# define u3nq(a, b, c, d) u3i_qual(a, b, c, d) +# include "g/a.h" // u3a: allocation +# include "g/e.h" // u3e: persistence +# include "g/h.h" // u3h: hashtables +# include "g/i.h" // u3i: noun construction +# include "g/j.h" // u3j: jet control +# include "g/m.h" // u3m: master state +# include "g/n.h" // u3n: nock execution +# include "g/r.h" // u3r: noun access (error returns) +# include "g/t.h" // u3t: profiling / tracing +# include "g/x.h" // u3x: noun access (error crashes) +# include "g/v.h" // u3v: arvo kernel +# include "g/z.h" // u3z: memoization -# define u3du(som) (u3r_du(som)) -# define u3ud(som) (u3r_ud(som)) - -# define u3k(som) u3a_gain(som) -# define u3z(som) u3a_lose(som) - - /** Arvo macros. - **/ -# define u3_do(txt_c, arg) u3v_do(txt_c, arg) -# define u3_dc(txt_c, a, b) u3v_do(txt_c, u3nc(a, b)) -# define u3_dt(txt_c, a, b, c) u3v_do(txt_c, u3nt(a, b, c)) -# define u3_dq(txt_c, a, b, c, d) u3v_do(txt_c, u3nt(a, b, c, d)) - - /** g: the u3 layer, functions. - **/ -# include "g/a.h" -# include "g/e.h" -# include "g/h.h" -# include "g/i.h" -# include "g/j.h" -# include "g/m.h" -# include "g/n.h" -# include "g/r.h" -# include "g/t.h" -# include "g/x.h" -# include "g/v.h" -# include "g/z.h" - - /** j: the u3 layer, jets. - **/ -# include "j/k.h" -# include "j/w.h" -# include "j/q.h" +# include "j/k.h" // u3k: jets (transfer, args) +# include "j/q.h" // u3q: jets (retain, args) +# include "j/w.h" // u3w: jets (retain, core) diff --git a/i/g/a.h b/i/g/a.h index 8892b512c..06c82f4c0 100644 --- a/i/g/a.h +++ b/i/g/a.h @@ -18,41 +18,6 @@ /** Data structures. - **/ - /* u3_post: pointer offset into u3_Loom; _p suffix; declare as u3p(). - */ - typedef c3_w u3_post; -# define u3p(type) u3_post - - /* u3_noun: tagged pointer. - ** - ** If bit 31 is 0, a u3_noun is a direct 31-bit atom ("cat"). - ** If bit 31 is 1 and bit 30 0, an indirect atom ("pug"). - ** If bit 31 is 1 and bit 30 1, an indirect cell ("pom"). - ** - ** Bits 0-29 are a word offset against u3_Loom (u3_post). - */ - typedef c3_w u3_noun; - - /* u3_none - out-of-band noun. - */ -# define u3_none (u3_noun)0xffffffff - - /* Informative typedefs. Use if you like. - */ - typedef u3_noun u3_atom; // must be atom - typedef u3_noun u3_term; // @tas - typedef u3_noun u3_mote; // @tas - typedef u3_noun u3_cell; // must be cell - typedef u3_noun u3_trel; // must be triple - typedef u3_noun u3_qual; // must be quadruple - typedef u3_noun u3_quin; // must be quintuple - typedef u3_noun u3_bean; // loobean: 0 == c3y, 1 == c3n - typedef u3_noun u3_weak; // may be u3_none - typedef u3_noun (*u3_funk)(u3_noun); - typedef u3_noun (*u3_funq)(u3_noun, u3_noun); - - /** Typedefs. **/ /* u3_atom, u3_cell: logical atom and cell structures. */ diff --git a/i/g/j.h b/i/g/j.h index 60ea0099d..8db977c10 100644 --- a/i/g/j.h +++ b/i/g/j.h @@ -67,7 +67,7 @@ typedef struct _u3e_harm { c3_c* fcs_c; // `.axe` or name u3_noun (*fun_f)(u3_noun); // compute or 0 / semitransfer - // u3_bean (*val_f)(u3_noun); // validate or 0 / retain + // c3_o (*val_f)(u3_noun); // validate or 0 / retain c3_o ice; // perfect (don't test) c3_o tot; // total (never punts) c3_o liv; // live (enabled) diff --git a/i/g/r.h b/i/g/r.h index a089031f1..2f327858f 100644 --- a/i/g/r.h +++ b/i/g/r.h @@ -10,12 +10,12 @@ #else /* u3r_du(): c3y iff `a` is cell. */ - u3_bean + c3_o u3r_du(u3_noun a); /* u3r_ud(): c3n iff `a` is cell. */ - u3_bean + c3_o u3r_ud(u3_noun a); #endif @@ -30,7 +30,7 @@ ** Attempt to deconstruct `a` by axis, noun pairs; 0 terminates. ** Axes must be sorted in tree order. */ - u3_bean + c3_o u3r_mean(u3_noun a, ...); @@ -96,7 +96,7 @@ ** Yes iff (a) and (b) are the same copy of the same noun. ** (Ie, by pointer equality - u3r_sing with false negatives.) */ - u3_bean + c3_o u3r_fing(u3_noun a, u3_noun b); @@ -104,7 +104,7 @@ ** ** Yes iff `[p q]` and `b` are the same copy of the same noun. */ - u3_bean + c3_o u3r_fing_cell(u3_noun p, u3_noun q, u3_noun b); @@ -113,7 +113,7 @@ ** ** Yes iff `[p q]` and `b` are the same copy of the same noun. */ - u3_bean + c3_o u3r_fing_mixt(const c3_c* p_c, u3_noun q, u3_noun b); @@ -122,7 +122,7 @@ ** ** Yes iff `[p q r]` and `b` are the same copy of the same noun. */ - u3_bean + c3_o u3r_fing_trel(u3_noun p, u3_noun q, u3_noun r, @@ -132,7 +132,7 @@ ** ** Yes iff `[p q r s]` and `b` are the same copy of the same noun. */ - u3_bean + c3_o u3r_fing_qual(u3_noun p, u3_noun q, u3_noun r, @@ -143,7 +143,7 @@ ** ** Yes iff (a) and (b) are the same noun. */ - u3_bean + c3_o u3r_sing(u3_noun a, u3_noun b); @@ -152,7 +152,7 @@ ** Make sure you have no live, uncounted pointers to any noun ** within (a) or (b)! */ - u3_bean + c3_o u3r_sung(u3_noun a, u3_noun b); @@ -160,7 +160,7 @@ ** ** Yes iff (b) is the same noun as the C string [a]. */ - u3_bean + c3_o u3r_sing_c(const c3_c* a_c, u3_noun b); @@ -168,7 +168,7 @@ ** ** Yes iff `[p q]` and `b` are the same noun. */ - u3_bean + c3_o u3r_sing_cell(u3_noun p, u3_noun q, u3_noun b); @@ -177,7 +177,7 @@ ** ** Yes iff `[p q]` and `b` are the same noun. */ - u3_bean + c3_o u3r_sing_mixt(const c3_c* p_c, u3_noun q, u3_noun b); @@ -186,7 +186,7 @@ ** ** Yes iff `[p q r]` and `b` are the same noun. */ - u3_bean + c3_o u3r_sing_trel(u3_noun p, u3_noun q, u3_noun r, @@ -196,7 +196,7 @@ ** ** Yes iff `[p q r s]` and `b` are the same noun. */ - u3_bean + c3_o u3r_sing_qual(u3_noun p, u3_noun q, u3_noun r, @@ -215,7 +215,7 @@ ** ** Divide `a` as a mold `[b.[p q] c]`. */ - u3_bean + c3_o u3r_mold(u3_noun a, u3_noun* b, u3_noun* c); @@ -224,7 +224,7 @@ ** ** Divide `a` as a cell `[b c]`. */ - u3_bean + c3_o u3r_cell(u3_noun a, u3_noun* b, u3_noun* c); @@ -233,7 +233,7 @@ ** ** Divide `a` as a trel `[b c]`. */ - u3_bean + c3_o u3r_trel(u3_noun a, u3_noun* b, u3_noun* c, @@ -243,7 +243,7 @@ ** ** Divide (a) as a qual [b c d e f]. */ - u3_bean + c3_o u3r_qual(u3_noun a, u3_noun* b, u3_noun* c, @@ -254,7 +254,7 @@ ** ** Divide (a) as a quil [b c d e f]. */ - u3_bean + c3_o u3r_quil(u3_noun a, u3_noun* b, u3_noun* c, @@ -266,7 +266,7 @@ ** ** & [0] if [a] is of the form [b *c]. */ - u3_bean + c3_o u3r_p(u3_noun a, u3_noun b, u3_noun* c); @@ -275,7 +275,7 @@ ** ** Factor [a] as a bush [b.[p q] c]. */ - u3_bean + c3_o u3r_bush(u3_noun a, u3_noun* b, u3_noun* c); @@ -284,7 +284,7 @@ ** ** & [0] if [a] is of the form [b *c d]. */ - u3_bean + c3_o u3r_pq(u3_noun a, u3_noun b, u3_noun* c, @@ -294,7 +294,7 @@ ** ** & [0] if [a] is of the form [b *c *d *e]. */ - u3_bean + c3_o u3r_pqr(u3_noun a, u3_noun b, u3_noun* c, @@ -305,7 +305,7 @@ ** ** & [0] if [a] is of the form [b *c *d *e *f]. */ - u3_bean + c3_o u3r_pqrs(u3_noun a, u3_noun b, u3_noun* c, diff --git a/i/g/u.h b/i/g/u.h new file mode 100644 index 000000000..c9abb0f70 --- /dev/null +++ b/i/g/u.h @@ -0,0 +1,102 @@ +/* include/all.h +** +** This file is in the public domain. +*/ + /** Typedefs. + **/ + /* u3_post: pointer offset into u3_Loom; _p suffix; declare as u3p(). + */ + typedef c3_w u3_post; +# define u3p(type) u3_post + + /* u3_noun: tagged noun pointer. + ** + ** If bit 31 is 0, a u3_noun is a direct 31-bit atom ("cat"). + ** If bit 31 is 1 and bit 30 0, an indirect atom ("pug"). + ** If bit 31 is 1 and bit 30 1, an indirect cell ("pom"). + ** + ** Bits 0-29 are a word offset against u3_Loom (u3_post). + */ + typedef c3_w u3_noun; + + /* u3_weak: u3_noun which may be u3_none (not a noun). + */ + typedef u3_noun u3_weak; + + /* u3_atom: u3_noun which must be an atom. + */ + typedef u3_noun u3_atom; + + /* u3_term: u3_noun which must be a term (@tas). + */ + typedef u3_noun u3_term; + + /* u3_cell, u3_trel, u3_qual, u3_quin: cell, triple, quadruple, quintuple. + */ + typedef u3_noun u3_cell; + typedef u3_noun u3_trel; + typedef u3_noun u3_qual; + typedef u3_noun u3_quin; + + /* u3_funk, u3_funq: unary and binary noun functions. + */ + typedef u3_noun (*u3_funk)(u3_noun); + typedef u3_noun (*u3_funq)(u3_noun, u3_noun); + + + /** Constants. + **/ + /* u3_none - u3_noun which is not a noun. + */ +# define u3_none (u3_noun)0xffffffff + + /* u3_nul: 0, hoon ~. + */ +# define u3_nul 0 + + /* u3_blip: 0, hoon %$. + */ +# define u3_blip 0 + + + /** Macros. + **/ + /* u3_assure(): loobean assert, bailing with %fail. + */ +# define u3_assure(x) if ( !_(x) ) { u3m_bail(c3__fail); } + + /* u3_assert(): loobean assert, bailing with %exit. + */ +# define u3_assent(x) if ( !_(x) ) { u3m_bail(c3__exit); } + + + /** Aliases. + **/ + /* u3h(), u3t(), u3at(): noun fragments. + */ +# define u3h(som) u3x_h(som) +# define u3t(som) u3x_t(som) +# define u3at(axe, som) u3x_at(axe, som) + + /* u3nc(), u3nt(), u3nq(): tuple composition. + */ +# define u3nc(a, b) u3i_cell(a, b) +# define u3nt(a, b, c) u3i_trel(a, b, c) +# define u3nq(a, b, c, d) u3i_qual(a, b, c, d) + + /* u3du(), u3ud(): noun/cell test. + */ +# define u3du(som) (u3r_du(som)) +# define u3ud(som) (u3r_ud(som)) + + /* u3k(), u3z(): reference counts. + */ +# define u3k(som) u3a_gain(som) +# define u3z(som) u3a_lose(som) + + /* u3do(), u3dc(), u3dt(), u3dq(): arvo calls. + */ +# define u3do(txt_c, arg) u3v_do(txt_c, arg) +# define u3dc(txt_c, a, b) u3v_do(txt_c, u3nc(a, b)) +# define u3dt(txt_c, a, b, c) u3v_do(txt_c, u3nt(a, b, c)) +# define u3dq(txt_c, a, b, c, d) u3v_do(txt_c, u3nt(a, b, c, d)) diff --git a/i/g/v.h b/i/g/v.h index 5d0472831..ead6a3676 100644 --- a/i/g/v.h +++ b/i/g/v.h @@ -10,8 +10,8 @@ typedef struct _u3v_cart { u3_noun vir; // effects of ovum - u3_bean did; // cart considered for commit? - u3_bean cit; // cart committed? + c3_o did; // cart considered for commit? + c3_o cit; // cart committed? c3_d ent_d; // entry in raft queue? u3p(struct _u3v_cart) nex_p; } u3v_cart; @@ -130,7 +130,7 @@ /* u3v_http_request(): hear http request on channel (unprotected). */ void - u3v_http_request(u3_bean sec, u3_noun pox, u3_noun req); + u3v_http_request(c3_o sec, u3_noun pox, u3_noun req); /* u3v_tank(): dump single tank. */ diff --git a/i/g/z.h b/i/g/z.h index e645d71f1..fca7f6297 100644 --- a/i/g/z.h +++ b/i/g/z.h @@ -14,18 +14,18 @@ **/ /* u3z_find*(): find in memo cache. */ - u3_weak u3z_find(u3_mote, u3_noun); - u3_weak u3z_find_2(u3_mote, u3_noun, u3_noun); - u3_weak u3z_find_3(u3_mote, u3_noun, u3_noun, u3_noun); - u3_weak u3z_find_4(u3_mote, u3_noun, u3_noun, u3_noun, u3_noun); + u3_weak u3z_find(c3_m, u3_noun); + u3_weak u3z_find_2(c3_m, u3_noun, u3_noun); + u3_weak u3z_find_3(c3_m, u3_noun, u3_noun, u3_noun); + u3_weak u3z_find_4(c3_m, u3_noun, u3_noun, u3_noun, u3_noun); /* u3z_save*(): save in memo cache. */ - u3_noun u3z_save(u3_mote, u3_noun, u3_noun); - u3_noun u3z_save_2(u3_mote, u3_noun, u3_noun, u3_noun); - u3_noun u3z_save_3(u3_mote, u3_noun, u3_noun, u3_noun, u3_noun); + u3_noun u3z_save(c3_m, u3_noun, u3_noun); + u3_noun u3z_save_2(c3_m, u3_noun, u3_noun, u3_noun); + u3_noun u3z_save_3(c3_m, u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3z_save_4 - (u3_mote, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); + (c3_m, u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); /* u3z_uniq(): uniquify with memo cache. */ diff --git a/i/j/k.h b/i/j/k.h index a943a18eb..be6d0b19a 100644 --- a/i/j/k.h +++ b/i/j/k.h @@ -8,7 +8,7 @@ u3_noun u3_cka_sub(u3_noun a, u3_noun b); u3_noun u3_cka_mul(u3_noun a, u3_noun b); u3_noun u3_cka_gth(u3_noun a, u3_noun b); - u3_bean u3_cka_lte(u3_noun a, u3_noun b); + u3_noun u3_cka_lte(u3_noun a, u3_noun b); /** Tier 2. **/ @@ -47,7 +47,7 @@ /* u3_ckdb_has(): test for get. */ - u3_bean + u3_noun u3_ckdb_has(u3_noun a, u3_noun b); /* u3_ckdb_gas(): list to map. @@ -62,7 +62,7 @@ /* u3_ckdi_has(): test for presence. */ - u3_bean + u3_noun u3_ckdi_has(u3_noun a, u3_noun b); /* u3_ckdi_tap(): map/set convert to list. (solves by_tap also.) diff --git a/i/j/q.h b/i/j/q.h index badff07f3..b9d15ea2b 100644 --- a/i/j/q.h +++ b/i/j/q.h @@ -64,14 +64,14 @@ **/ u3_noun u3_cqdb_gas(u3_noun, u3_noun); u3_noun u3_cqdb_get(u3_noun, u3_noun); - u3_bean u3_cqdb_has(u3_noun, u3_noun); + u3_noun u3_cqdb_has(u3_noun, u3_noun); u3_noun u3_cqdb_int(u3_noun, u3_noun); u3_noun u3_cqdb_put(u3_noun, u3_noun, u3_noun); # define u3_cqdb_tap u3_cqdi_tap u3_noun u3_cqdb_uni(u3_noun, u3_noun); u3_noun u3_cqdi_gas(u3_noun, u3_noun); - u3_bean u3_cqdi_has(u3_noun, u3_noun); + u3_noun u3_cqdi_has(u3_noun, u3_noun); u3_noun u3_cqdi_int(u3_noun, u3_noun); u3_noun u3_cqdi_mer(u3_noun, u3_noun); u3_noun u3_cqdi_put(u3_noun, u3_noun); @@ -150,7 +150,7 @@ u3_noun u3_cqfu_bust(u3_noun, u3_noun, u3_noun); u3_noun u3_cqfu_conk(u3_noun, u3_noun, u3_noun); u3_noun u3_cqfu_crop(u3_noun, u3_noun, u3_noun); - u3_noun u3_cqfu_cull(u3_noun, u3_noun, u3_bean, u3_atom, u3_noun); + u3_noun u3_cqfu_cull(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); u3_noun u3_cqfu_duck(u3_noun, u3_noun); u3_noun u3_cqfu_dung(u3_noun, u3_noun cap, u3_noun); u3_noun u3_cqfu_dunq(u3_noun, const c3_c*, u3_noun); @@ -166,8 +166,8 @@ u3_noun u3_cqfu_lose(u3_noun, u3_noun, u3_noun); u3_noun u3_cqfu_mint(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3_cqfu_mull(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); - u3_bean u3_cqfu_nest(u3_noun, u3_noun, u3_bean, u3_noun); - u3_bean u3_cqfu_orth(u3_noun, u3_noun, u3_noun); + u3_noun u3_cqfu_nest(u3_noun, u3_noun, u3_noun, u3_noun); + u3_noun u3_cqfu_orth(u3_noun, u3_noun, u3_noun); u3_noun u3_cqfu_park(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3_cqfu_peek(u3_noun, u3_noun, u3_noun, u3_noun); u3_noun u3_cqfu_play(u3_noun, u3_noun, u3_noun); diff --git a/i/j/w.h b/i/j/w.h index 1b5bf7e71..bb4d30a1c 100644 --- a/i/j/w.h +++ b/i/j/w.h @@ -69,14 +69,14 @@ **/ u3_noun u3_cwdb_gas(u3_noun); u3_noun u3_cwdb_get(u3_noun); - u3_bean u3_cwdb_has(u3_noun); + u3_noun u3_cwdb_has(u3_noun); u3_noun u3_cwdb_int(u3_noun); u3_noun u3_cwdb_put(u3_noun); # define u3_cwdb_tap u3_cwdi_tap u3_noun u3_cwdb_uni(u3_noun); u3_noun u3_cwdi_gas(u3_noun); - u3_bean u3_cwdi_has(u3_noun); + u3_noun u3_cwdi_has(u3_noun); u3_noun u3_cwdi_int(u3_noun); u3_noun u3_cwdi_mer(u3_noun); u3_noun u3_cwdi_put(u3_noun); @@ -184,7 +184,7 @@ u3_noun u3_cwfu_heal(u3_noun); u3_noun u3_cwfu_mint(u3_noun); u3_noun u3_cwfu_mull(u3_noun); - u3_bean u3_cwfu_nest(u3_noun); + u3_noun u3_cwfu_nest(u3_noun); u3_noun u3_cwfu_park(u3_noun); u3_noun u3_cwfu_peek(u3_noun); u3_noun u3_cwfu_play(u3_noun); diff --git a/i/v/vere.h b/i/v/vere.h index 23a44d29b..7ef0c401e 100644 --- a/i/v/vere.h +++ b/i/v/vere.h @@ -72,8 +72,8 @@ void* par_u; // struct http_parser * c3_c* url_c; // url c3_w ipf_w; // ipv4 - u3_bean liv; // keepalive - u3_bean end; // all responses added + c3_o liv; // keepalive + c3_o end; // all responses added u3_hhed* hed_u; // headers u3_hbod* bod_u; // body parts (exit) u3_hbod* dob_u; // body parts (entry) @@ -113,7 +113,7 @@ c3_w sev_l; // server number c3_w coq_l; // next connection number c3_w por_w; // running port - u3_bean sec; // logically secure + c3_o sec; // logically secure struct _u3_hcon* hon_u; // connection list struct _u3_http* nex_u; // next in list } u3_http; @@ -136,7 +136,7 @@ c3_c* hot_c; // host c3_s por_s; // port c3_c* url_c; // url - u3_bean sec; // yes == https + c3_o sec; // yes == https u3_hmet met_e; // method u3_hhed* hed_u; // headers u3_hbod* bod_u; // body @@ -164,7 +164,7 @@ c3_c* hot_c; // hostname c3_s por_s; // port c3_w ipf_w; // IP - u3_bean sec; // yes == https + c3_o sec; // yes == https u3_hbod* rub_u; // exit of send queue u3_hbod* bur_u; // entry of send queue u3_creq* ceq_u; // exit of request queue @@ -203,7 +203,7 @@ typedef struct _u3_ames { // packet network state uv_udp_t wax_u; // socket state uv_timer_t tim_u; // network timer - u3_bean alm; // alarm on + c3_o alm; // alarm on c3_w law_w; // last wakeup, unix time c3_s por_s; // public IPv4 port c3_w imp_w[256]; // imperial IPs @@ -241,8 +241,8 @@ } mir; struct { // escape code control - u3_bean ape; // escape received - u3_bean bra; // bracket or O received + c3_o ape; // escape received + c3_o bra; // bracket or O received } esc; struct { @@ -298,8 +298,8 @@ */ typedef struct _u3_unod { uv_fs_event_t was_u; // stat watcher - u3_bean dir; // always - u3_bean dry; // ie, unmodified + c3_o dir; // always + c3_o dry; // ie, unmodified c3_c* pax_c; // absolute path struct _u3_udir* par_u; // in directory } u3_unod; @@ -308,8 +308,8 @@ */ typedef struct _u3_ufil { uv_fs_event_t was_u; // stat watcher - u3_bean non; // always u3_no - u3_bean dry; // ie, unmodified + c3_o non; // always u3_no + c3_o dry; // ie, unmodified c3_c* pax_c; // absolute path struct _u3_udir* par_u; // in directory c3_c* dot_c; // extension point or 0 @@ -321,8 +321,8 @@ */ typedef struct _u3_udir { uv_fs_event_t was_u; // stat watcher - u3_bean yes; // always u3_yes - u3_bean dry; // ie, unmodified + c3_o yes; // always u3_yes + c3_o dry; // ie, unmodified c3_c* pax_c; // absolute path struct _u3_udir* par_u; // parent directory struct _u3_udir* dis_u; // subdirectories @@ -355,7 +355,7 @@ #ifdef SYNCLOG c3_w lot_w; // sync-slot struct _u3_sylo { - u3_bean unx; // from unix + c3_o unx; // from unix c3_m wer_m; // mote saying where c3_m wot_m; // mote saying what c3_c* pax_c; // path @@ -368,7 +368,7 @@ typedef struct _u3_batz { uv_timer_t tim_u; // batz timer c3_w run_w; // run of consecutive alarms - u3_bean alm; // alarm + c3_o alm; // alarm } u3_batz; /* u3_temp: just a timer for ever @@ -376,7 +376,7 @@ typedef struct _u3_temp { uv_timer_t tim_u; // temp timer c3_w run_w; // run of consecutive alarms - u3_bean alm; // alarm + c3_o alm; // alarm } u3_temp; /* u2_utfo: unix terminfo strings. @@ -497,13 +497,13 @@ uv_tcp_t wax_u; // TCP handle struct _u3_rnam* nam_u; // peer we're connected to u3_rbuf* red_u; // read buffer - u3_bean red; // u3_yes on new data + c3_o red; // u3_yes on new data u3_rbuf* wri_u; // write buffer u3_raft* raf_u; // back-reference to server u3_rreq* out_u; // exit of request queue u3_rreq* tou_u; // entry of request queue struct _u3_rcon* nex_u; // pointer to next con - u3_bean liv; // are we live? + c3_o liv; // are we live? } u3_rcon; /* u3_rnam: raft peer name. @@ -514,7 +514,7 @@ c3_c* por_c; // port u3_rcon* ron_u; // connection struct _u3_rnam* nex_u; // pointer to next peer - u3_bean vog; // did they vote for us? + c3_o vog; // did they vote for us? } u3_rnam; /* u3_opts: command line configuration. @@ -527,18 +527,18 @@ c3_w fuz_w; // -f, fuzz testing c3_s por_s; // -p, ames port c3_s rop_s; // -l, raft port - u3_bean abo; // -a - u3_bean bat; // -b, batch create - u3_bean gab; // -g - u3_bean dem; // -d, dem - u3_bean fog; // -Xwtf, skip last event - u3_bean fak; // -F, fake carrier - u3_bean loh; // -L, local-only networking - u3_bean pro; // , profile - u3_bean veb; // -v, verbose (inverse of -q) - u3_bean nuu; // -c, new pier - u3_bean vno; // -V - u3_bean mem; // -M, memory madness + c3_o abo; // -a + c3_o bat; // -b, batch create + c3_o gab; // -g + c3_o dem; // -d, dem + c3_o fog; // -Xwtf, skip last event + c3_o fak; // -F, fake carrier + c3_o loh; // -L, local-only networking + c3_o pro; // , profile + c3_o veb; // -v, verbose (inverse of -q) + c3_o nuu; // -c, new pier + c3_o vno; // -V + c3_o mem; // -M, memory madness } u3_opts; /* u3_host: entire host. @@ -559,7 +559,7 @@ u3_unix unx_u; // sync and clay u3_batz beh_u; // batz timer u3_temp teh_u; // temp timer - u3_bean liv; // if u3_no, shut down + c3_o liv; // if u3_no, shut down c3_i xit_i; // exit code for shutdown void* ssl_u; // struct SSL_CTX* } u3_host; // host == computer == process @@ -575,10 +575,10 @@ c3_global c3_c* u3_Local; c3_global c3_c* u3_System; - c3_global u3_bean u3_Flag_Abort; - c3_global u3_bean u3_Flag_Garbage; - c3_global u3_bean u3_Flag_Profile; - c3_global u3_bean u3_Flag_Verbose; + c3_global c3_o u3_Flag_Abort; + c3_global c3_o u3_Flag_Garbage; + c3_global c3_o u3_Flag_Profile; + c3_global c3_o u3_Flag_Verbose; /** Functions. **/ @@ -684,7 +684,7 @@ /* u3_path(): C unix path in computer for file or directory. */ c3_c* - u3_path(u3_bean fyl, u3_noun pax); + u3_path(c3_o fyl, u3_noun pax); /** Filesystem (old api). **/ @@ -707,7 +707,7 @@ /* u3_ve_save(): save internal file as atom. */ - u3_bean + c3_o u3_ve_save(c3_c* ext_c, u3_noun tah, u3_noun dat); /* u3_ve_zeus(): prayer to internal file path. Return unit. @@ -784,7 +784,7 @@ /* u3_lo_shut(): end callback processing. */ void - u3_lo_shut(u3_bean); + u3_lo_shut(c3_o); /** Terminal, new style. diff --git a/j/1/gte.c b/j/1/gte.c index eb755e10e..954775e2c 100644 --- a/j/1/gte.c +++ b/j/1/gte.c @@ -15,7 +15,7 @@ } else { mpz_t a_mp, b_mp; - u3_bean cmp; + u3_noun cmp; u3r_mp(a_mp, a); u3r_mp(b_mp, b); diff --git a/j/1/gth.c b/j/1/gth.c index 80cfe83be..504501eaa 100644 --- a/j/1/gth.c +++ b/j/1/gth.c @@ -16,7 +16,7 @@ } else { mpz_t a_mp, b_mp; - u3_bean cmp; + u3_noun cmp; u3r_mp(a_mp, a); u3r_mp(b_mp, b); diff --git a/j/1/lte.c b/j/1/lte.c index 1f77c51be..ec94a4ab0 100644 --- a/j/1/lte.c +++ b/j/1/lte.c @@ -15,7 +15,7 @@ } else { mpz_t a_mp, b_mp; - u3_bean cmp; + u3_noun cmp; u3r_mp(a_mp, a); u3r_mp(b_mp, b); diff --git a/j/1/lth.c b/j/1/lth.c index 20042cf8b..0ea8724b5 100644 --- a/j/1/lth.c +++ b/j/1/lth.c @@ -16,7 +16,7 @@ } else { mpz_t a_mp, b_mp; - u3_bean cmp; + u3_noun cmp; u3r_mp(a_mp, a); u3r_mp(b_mp, b); diff --git a/j/4/by_has.c b/j/4/by_has.c index 537456461..8de579ee0 100644 --- a/j/4/by_has.c +++ b/j/4/by_has.c @@ -7,7 +7,7 @@ /* functions */ - u3_bean + u3_noun u3_cqdb_has( u3_noun a, u3_noun b) @@ -49,7 +49,7 @@ return u3_cqdb_has(a, b); } } - u3_bean + u3_noun u3_ckdb_has(u3_noun a, u3_noun b) { u3_weak c = u3_cqdb_has(a, b); diff --git a/j/4/in_has.c b/j/4/in_has.c index 21a8c636e..5e2fcf473 100644 --- a/j/4/in_has.c +++ b/j/4/in_has.c @@ -7,7 +7,7 @@ /* functions */ - u3_bean + u3_noun u3_cqdi_has(u3_noun a, u3_noun b) { if ( u3_nul == a ) { @@ -43,7 +43,7 @@ return u3_cqdi_has(a, b); } } - u3_bean + u3_noun u3_ckdi_has(u3_noun a, u3_noun b) { u3_weak c = u3_cqdi_has(a, b); diff --git a/j/5/loss.c b/j/5/loss.c index fee65bc58..e870c3454 100644 --- a/j/5/loss.c +++ b/j/5/loss.c @@ -126,7 +126,7 @@ // extend fits top // - static u3_bean + static u3_noun _hink(u3_loss* loc_u, c3_w inx_w, c3_w goy_w) @@ -138,7 +138,7 @@ // extend fits bottom // - static u3_bean + static u3_noun _lonk(u3_loss* loc_u, c3_w inx_w, c3_w goy_w) @@ -152,7 +152,7 @@ // search for first index >= inx_w and <= max_w that fits // the hink and lonk criteria. // - static u3_bean + static u3_noun _binka(u3_loss* loc_u, c3_w* inx_w, c3_w max_w, @@ -175,7 +175,7 @@ // both hink(inx_w) and lonk(inx_w) are true. lonk is false // if inx_w is too high, hink is false if it is too low. // - static u3_bean + static u3_noun _bink(u3_loss* loc_u, c3_w* inx_w, c3_w max_w, @@ -271,7 +271,7 @@ return lcs; } - static u3_bean + static u3_noun _listp(u3_noun lix) { while ( 1 ) { diff --git a/j/5/parse.c b/j/5/parse.c index 99e299191..06907814c 100644 --- a/j/5/parse.c +++ b/j/5/parse.c @@ -855,7 +855,7 @@ /* stew */ - static u3_bean + static u3_noun _stew_wor( u3_noun ort, u3_noun wan) diff --git a/j/5/tape.c b/j/5/tape.c index 70916a5d5..3039b34fa 100644 --- a/j/5/tape.c +++ b/j/5/tape.c @@ -19,7 +19,7 @@ } } - static u3_bean + static u3_noun _good( u3_noun a) { diff --git a/j/6/fitz.c b/j/6/fitz.c index affa9e514..6c7a55de1 100644 --- a/j/6/fitz.c +++ b/j/6/fitz.c @@ -7,7 +7,7 @@ /* functions */ - static u3_bean + static u3_noun _fitz_fiz( u3_noun yaz, u3_noun wix) diff --git a/j/6/ut_conk.c b/j/6/ut_conk.c index 37e56376b..c0151eed1 100644 --- a/j/6/ut_conk.c +++ b/j/6/ut_conk.c @@ -7,7 +7,7 @@ /* logic */ - u3_bean + u3_noun _cqfu_conk(u3_noun van, u3_noun sut, u3_noun got) { if ( c3y == u3ud(got) ) { @@ -27,7 +27,7 @@ return ret; } case 2: { - u3_bean vet = u3r_at(u3_cqfu_van_vet, van); + u3_noun vet = u3r_at(u3_cqfu_van_vet, van); u3_noun hed, tal, deh, lat, ret; if ( c3y == vet ) { diff --git a/j/6/ut_cull.c b/j/6/ut_cull.c index 744eaa846..4544757ea 100644 --- a/j/6/ut_cull.c +++ b/j/6/ut_cull.c @@ -8,13 +8,13 @@ /* logic */ u3_noun - _cqfu_cull(u3_noun, u3_noun, u3_bean, u3_atom, u3_noun); + _cqfu_cull(u3_noun, u3_noun, u3_noun, u3_atom, u3_noun); static u3_noun _cull_in( u3_noun van, u3_noun sut, - u3_bean pol, + u3_noun pol, u3_atom axe, u3_noun ref, u3_noun now, @@ -152,7 +152,7 @@ _cqfu_cull( u3_noun van, u3_noun sut, - u3_bean pol, + u3_noun pol, u3_atom axe, u3_noun ref) { @@ -193,7 +193,7 @@ u3_noun u3_cqfu_cull(u3_noun van, u3_noun sut, - u3_bean pol, + u3_noun pol, u3_noun axe, u3_noun ref) { diff --git a/j/6/ut_fire.c b/j/6/ut_fire.c index a461bb0b9..d552d715b 100644 --- a/j/6/ut_fire.c +++ b/j/6/ut_fire.c @@ -7,7 +7,7 @@ /* logic */ - static u3_bean + static u3_noun _fire_mull(u3_noun van, u3_noun sut, u3_noun dox, @@ -17,7 +17,7 @@ u3_noun key = u3nt(u3k(sut), u3k(dox), u3k(gen)); - u3_bean ret; + u3_noun ret; if ( c3y == u3_cqdi_has(rib, key) ) { ret = c3y; @@ -127,7 +127,7 @@ u3_noun sut, u3_noun hag) { - u3_bean vet = u3r_at(u3_cqfu_van_vet, van); + u3_noun vet = u3r_at(u3_cqfu_van_vet, van); { if ( (c3y == u3du(hag)) && (u3_nul == u3t(hag)) ) { diff --git a/j/6/ut_mint.c b/j/6/ut_mint.c index c62db6c91..3d46fe80c 100644 --- a/j/6/ut_mint.c +++ b/j/6/ut_mint.c @@ -20,12 +20,12 @@ int FOO; u3nq(c3__cube, 1, c3__atom, 'f')); } - static u3_bean + static u3_noun _mint_vet( u3_noun van) { - // u3_bean vet = u3j_hook(u3k(van), "vet"); - u3_bean vet = u3r_at(u3_cqfu_van_vet, van); + // u3_noun vet = u3j_hook(u3k(van), "vet"); + u3_noun vet = u3r_at(u3_cqfu_van_vet, van); switch ( vet ) { case c3n: @@ -202,7 +202,7 @@ int FOO; _mint_brew( u3_noun van, u3_noun sut, - u3_bean tov, + u3_noun tov, u3_noun gen) { u3_noun von; diff --git a/j/6/ut_mull.c b/j/6/ut_mull.c index 68fd0b82c..5d6a55262 100644 --- a/j/6/ut_mull.c +++ b/j/6/ut_mull.c @@ -10,12 +10,12 @@ static u3_noun _mull_in(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); - static u3_bean + static u3_noun _mull_vet( u3_noun van) { - // u3_bean vet = u3j_hook(u3k(van), "vet"); - u3_bean vet = u3r_at(u3_cqfu_van_vet, van); + // u3_noun vet = u3j_hook(u3k(van), "vet"); + u3_noun vet = u3r_at(u3_cqfu_van_vet, van); switch ( vet ) { case c3n: @@ -810,7 +810,7 @@ } } - u3_bean + u3_noun _cqfu_mull( u3_noun van, u3_noun sut, diff --git a/j/6/ut_nest.c b/j/6/ut_nest.c index acc6079c5..3fbbc1d2f 100644 --- a/j/6/ut_nest.c +++ b/j/6/ut_nest.c @@ -9,16 +9,16 @@ */ /* forward */ - static u3_bean - _nest_sint(u3_noun, u3_noun, u3_bean, u3_noun, u3_noun); - static u3_bean - _nest_dext(u3_noun, u3_noun, u3_bean, u3_noun, u3_noun); + static u3_noun + _nest_sint(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); + static u3_noun + _nest_dext(u3_noun, u3_noun, u3_noun, u3_noun, u3_noun); - static u3_bean + static u3_noun _nest_cram( u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref, u3_noun dab, u3_noun hem, @@ -61,7 +61,7 @@ u3_noun pqn_hem = u3t(qn_hem); u3_noun vis = u3_cqfu_play(van, sut, pqn_dab); u3_noun lon = u3_cqfu_play(van, ref, pqn_hem); - u3_bean ret = _nest_dext(van, vis, tel, lon, gil); + u3_noun ret = _nest_dext(van, vis, tel, lon, gil); u3z(vis); u3z(lon); @@ -76,10 +76,10 @@ } } - static u3_bean + static u3_noun _nest_cong(u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref, u3_noun gil) { @@ -87,7 +87,7 @@ u3_noun pq_sut, qq_sut, rq_sut; u3_noun pq_ref, qq_ref, rq_ref; u3_noun prq_sut, qrq_sut, prq_ref, qrq_ref; - u3_bean ret; + u3_noun ret; u3x_trel(sut, 0, &p_sut, &q_sut); u3x_trel(ref, 0, &p_ref, &q_ref); @@ -151,7 +151,7 @@ (van, qq_sut, c3__rite, 2); u3_noun r_sam = u3_cqfu_peek (van, qq_ref, c3__rite, 2); - u3_bean ret = _nest_dext(van, r_sam, tel, s_sam, gil); + u3_noun ret = _nest_dext(van, r_sam, tel, s_sam, gil); u3z(r_sam); u3z(s_sam); @@ -165,7 +165,7 @@ (van, qq_sut, c3__read, 2); u3_noun r_pal = u3_cqfu_peek (van, qq_ref, c3__read, 2); - u3_bean ret = _nest_dext(van, s_pal, tel, r_pal, gil); + u3_noun ret = _nest_dext(van, s_pal, tel, r_pal, gil); u3z(r_pal); u3z(s_pal); @@ -179,11 +179,11 @@ } } - static u3_bean + static u3_noun _nest_dext_in( u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref, u3_noun gil) { @@ -294,7 +294,7 @@ } else { u3_noun zoc = u3_cqdi_put(gil, hud); u3_noun fop = u3_cqfu_rest(van, sut, p_sut); - u3_bean hiv = _nest_dext(van, fop, tel, ref, zoc); + u3_noun hiv = _nest_dext(van, fop, tel, ref, zoc); u3z(hud); u3z(fop); @@ -306,15 +306,15 @@ } } - static u3_bean + static u3_noun _nest_dext_to( u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref, u3_noun gil) { - u3_bean tyn = _nest_dext_in(van, sut, tel, ref, gil); + u3_noun tyn = _nest_dext_in(van, sut, tel, ref, gil); if ( (c3y == tyn) || (c3n == tel) ) { return tyn; @@ -329,11 +329,11 @@ } } - static u3_bean + static u3_noun _nest_dext( u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref, u3_noun gil) { @@ -357,11 +357,11 @@ } } - static u3_bean + static u3_noun _nest_sint( u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref, u3_noun gil) { @@ -391,7 +391,7 @@ case c3__cell: return c3n; case c3__core: { u3_noun gam = u3_cqfu_repo(van, ref); - u3_bean hiv = _nest_dext(van, sut, tel, gam, gil); + u3_noun hiv = _nest_dext(van, sut, tel, gam, gil); u3z(gam); return hiv; @@ -432,7 +432,7 @@ u3_noun gam = u3_cqfu_repo(van, ref); { - u3_bean hiv = _nest_dext(van, sut, tel, gam, zoc); + u3_noun hiv = _nest_dext(van, sut, tel, gam, zoc); u3z(hud); u3z(gam); @@ -447,11 +447,11 @@ } } - u3_bean + u3_noun _cqfu_nest( u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref) { return _nest_dext(van, sut, tel, ref, u3_nul); @@ -480,7 +480,7 @@ u3_noun u3_cqfu_nest(u3_noun van, u3_noun sut, - u3_bean tel, + u3_noun tel, u3_noun ref) { return _cqfu_nest(van, sut, tel, ref); diff --git a/j/6/ut_park.c b/j/6/ut_park.c index ba7fec934..54c49e331 100644 --- a/j/6/ut_park.c +++ b/j/6/ut_park.c @@ -7,7 +7,7 @@ /* logic */ - u3_bean + u3_noun _cqfu_park( u3_noun van, u3_noun sut, diff --git a/j/6/ut_rest.c b/j/6/ut_rest.c index ab261d8e6..f541787b5 100644 --- a/j/6/ut_rest.c +++ b/j/6/ut_rest.c @@ -68,7 +68,7 @@ return fub; } - static u3_bean + static u3_noun _rest_hit_fan( u3_noun fan, u3_noun leg) diff --git a/v/ames.c b/v/ames.c index 066f89dd1..78b31a852 100644 --- a/v/ames.c +++ b/v/ames.c @@ -62,7 +62,7 @@ _ames_czar(c3_y imp_y, c3_s* por_s) return 0; } else if ( 0 == sam_u->imp_w[imp_y] ) { - u3_noun nam = u3_dc("scot", 'p', imp_y); + u3_noun nam = u3dc("scot", 'p', imp_y); c3_c* nam_c = u3r_string(nam); c3_c dns_c[64]; @@ -96,7 +96,7 @@ _ames_czar(c3_y imp_y, c3_s* por_s) #if 1 { u3_noun wad = u3i_words(1, &sam_u->imp_w[imp_y]); - u3_noun nam = u3_dc("scot", c3__if, wad); + u3_noun nam = u3dc("scot", c3__if, wad); c3_c* nam_c = u3r_string(nam); uL(fprintf(uH, "ames: czar %s: ip %s\n", dns_c, nam_c)); @@ -118,7 +118,7 @@ _ames_czar(c3_y imp_y, c3_s* por_s) /* _ames_lane_ipv4(): IPv4 address/ from lane. */ -u3_bean +u3_noun _ames_lane_ip(u3_noun lan, c3_s* por_s, c3_w* pip_w) { switch ( u3h(lan) ) { @@ -297,7 +297,7 @@ u3_ames_io_init() por_s = u3_Host.ops_u.por_s; if ( 0 != u3_Host.ops_u.imp_c ) { u3_noun imp = u3i_string(u3_Host.ops_u.imp_c); - u3_noun num = u3_dc("slaw", 'p', imp); + u3_noun num = u3dc("slaw", 'p', imp); c3_y num_y; if ( c3n == u3du(num) ) { diff --git a/v/cttp.c b/v/cttp.c index 0bc2b68dc..72df4c4dc 100644 --- a/v/cttp.c +++ b/v/cttp.c @@ -832,7 +832,7 @@ _cttp_ccon_fail_cb(uv_handle_t* wax_u) /* _cttp_ccon_fail(): report failure and reset connection. */ static void -_cttp_ccon_fail(u3_ccon* coc_u, u3_bean say) +_cttp_ccon_fail(u3_ccon* coc_u, u3_noun say) { if ( c3y == say ) { uL(fprintf(uH, "cttp: ERROR\n")); @@ -1329,7 +1329,7 @@ _cttp_ccon_kick(u3_ccon* coc_u) /* _cttp_ccon_new(): create client connection. Return 0 if url invalid. */ static u3_ccon* -_cttp_ccon_new(u3_bean sec, c3_s por_s, c3_c* hot_c) +_cttp_ccon_new(u3_noun sec, c3_s por_s, c3_c* hot_c) { u3_ccon* coc_u = c3_malloc(sizeof(u3_ccon)); @@ -1355,7 +1355,7 @@ _cttp_ccon_new(u3_bean sec, c3_s por_s, c3_c* hot_c) /* _cttp_ccon_find(): find existing connection for remote server. */ static u3_ccon* -_cttp_ccon_find(u3_bean sec, c3_s por_s, c3_c* hot_c) +_cttp_ccon_find(u3_noun sec, c3_s por_s, c3_c* hot_c) { u3_ccon* coc_u; @@ -1373,7 +1373,7 @@ _cttp_ccon_find(u3_bean sec, c3_s por_s, c3_c* hot_c) /* _cttp_ccon(): create or find persistent client connection. */ static u3_ccon* -_cttp_ccon(u3_bean sec, c3_s por_s, c3_c* hot_c) +_cttp_ccon(u3_noun sec, c3_s por_s, c3_c* hot_c) { #ifndef CTTP_NO_PIPELINE u3_ccon* coc_c = _cttp_ccon_find(sec, por_s, hot_c); @@ -1516,7 +1516,7 @@ static void _cttp_ccon_fill(u3_ccon* coc_u) { u3_creq* ceq_u = coc_u->ceq_u; - u3_bean fir_t = c3y; + u3_noun fir_t = c3y; while ( ceq_u ) { // @@ -1553,7 +1553,7 @@ _cttp_ccon_fill(u3_ccon* coc_u) static void _cttp_ccon_send(u3_ccon* coc_u, u3_creq* ceq_u) { - u3_bean nou = ((0 == coc_u->ceq_u) ? c3y : c3n); + u3_noun nou = ((0 == coc_u->ceq_u) ? c3y : c3n); if ( c3y == nou ) { c3_assert(0 == coc_u->qec_u); diff --git a/v/http.c b/v/http.c index 7b05f3ef4..0ecfea3b8 100644 --- a/v/http.c +++ b/v/http.c @@ -815,9 +815,9 @@ _http_pox_to_noun(c3_w sev_l, c3_w coq_l, c3_w seq_l) u3nt( u3_blip, c3__http, - u3nq(u3_dc("scot", c3_s2('u','v'), sev_l), - u3_dc("scot", c3_s2('u','d'), coq_l), - u3_dc("scot", c3_s2('u','d'), seq_l), + u3nq(u3dc("scot", c3_s2('u','v'), sev_l), + u3dc("scot", c3_s2('u','d'), coq_l), + u3dc("scot", c3_s2('u','d'), seq_l), u3_nul)); } diff --git a/v/loop.c b/v/loop.c index 32d20b9a4..e1784d2e3 100644 --- a/v/loop.c +++ b/v/loop.c @@ -309,7 +309,7 @@ u3_lo_punt(c3_l tab_l, u3_noun tac) // We are calling nock here, but hopefully need no protection. // while ( c3y == u3r_du(cat) ) { - u3_noun wol = u3_dc("wash", u3nc(tab_l, col_l), u3k(u3h(cat))); + u3_noun wol = u3dc("wash", u3nc(tab_l, col_l), u3k(u3h(cat))); _lo_wall(wol); cat = u3t(cat); @@ -323,7 +323,7 @@ u3_lo_punt(c3_l tab_l, u3_noun tac) void u3_lo_sway(c3_l tab_l, u3_noun tax) { - u3_noun mok = u3_dc("mook", 2, tax); + u3_noun mok = u3dc("mook", 2, tax); u3_lo_punt(tab_l, u3k(u3t(mok))); u3z(mok); @@ -356,7 +356,7 @@ u3_lo_open(void) /* u3_lo_shut(): end callback processing. */ void -u3_lo_shut(u3_bean inn) +u3_lo_shut(c3_o inn) { // u3e_grab("lo_shut a", u3_none); @@ -425,7 +425,7 @@ _lo_bench_scot_p(c3_w num_w) c3_w i_w; for ( i_w = 0; i_w < num_w; i_w++ ) { - u3_noun soc = u3_dc("scot", 'p', u3k(u3A->now)); + u3_noun soc = u3dc("scot", 'p', u3k(u3A->now)); u3z(soc); } @@ -439,8 +439,8 @@ _lo_bench_slay_p(c3_w num_w) c3_w i_w; for ( i_w = 0; i_w < num_w; i_w++ ) { - u3_noun soc = u3_dc("scot", 'p', u3k(u3A->now)); - u3_noun dub = u3_do("slay", soc); + u3_noun soc = u3dc("scot", 'p', u3k(u3A->now)); + u3_noun dub = u3do("slay", soc); u3z(dub); } @@ -454,7 +454,7 @@ _lo_bench_scot_da(c3_w num_w) c3_w i_w; for ( i_w = 0; i_w < num_w; i_w++ ) { - u3_noun soc = u3_dc("scot", c3__da, u3k(u3A->now)); + u3_noun soc = u3dc("scot", c3__da, u3k(u3A->now)); u3z(soc); } @@ -468,7 +468,7 @@ _lo_bench_dec(c3_w num_w) c3_w i_w; for ( i_w = 0; i_w < num_w; i_w++ ) { - u3_noun soc = u3_do("dec", u3k(u3A->now)); + u3_noun soc = u3do("dec", u3k(u3A->now)); u3z(soc); } @@ -482,7 +482,7 @@ _lo_bench_scot_ud(c3_w num_w) c3_w i_w; for ( i_w = 0; i_w < num_w; i_w++ ) { - u3_noun soc = u3_dc("scot", c3__ud, u3k(u3A->now)); + u3_noun soc = u3dc("scot", c3__ud, u3k(u3A->now)); u3z(soc); } @@ -523,7 +523,7 @@ _lo_bench(const c3_c* lab_c, void (*fun)(c3_w), c3_w num_w) void u3_lo_show(c3_c* cap_c, u3_noun nun) { - u3_noun pav = u3_dc("pave", c3__noun, nun); + u3_noun pav = u3dc("pave", c3__noun, nun); c3_c* txt_c = (c3_c*)u3r_tape(pav); fprintf(stderr, "%s: %s\r\n", cap_c, txt_c); @@ -654,7 +654,7 @@ _lo_mark() static void _lo_word(FILE* fil_u, c3_w wod_w) { - u3_bean top = c3y; + u3_noun top = c3y; if ( wod_w / (1000 * 1000 * 1000) ) { fprintf(fil_u, "%u.", wod_w / (1000 * 1000 * 1000)); diff --git a/v/main.c b/v/main.c index 469a2dfa4..fb9fd2675 100644 --- a/v/main.c +++ b/v/main.c @@ -26,7 +26,7 @@ /* _main_readw(): parse a word from a string. */ -static u3_bean +static u3_noun _main_readw(const c3_c* str_c, c3_w max_w, c3_w* out_w) { c3_c* end_c; @@ -41,7 +41,7 @@ _main_readw(const c3_c* str_c, c3_w max_w, c3_w* out_w) /* _main_getopt(): extract option map from command line. */ -static u3_bean +static u3_noun _main_getopt(c3_i argc, c3_c** argv) { c3_i ch_i; diff --git a/v/raft.c b/v/raft.c index 5954bb4fc..7d7ad68e5 100644 --- a/v/raft.c +++ b/v/raft.c @@ -53,7 +53,7 @@ static ssize_t _raft_rmsg_read(const u3_rbuf* buf_u, u3_rmsg* msg_u); static void _raft_rmsg_send(u3_rcon* ron_u, const u3_rmsg* msg_u); static void _raft_rmsg_free(u3_rmsg* msg_u); static void _raft_conn_dead(u3_rcon* ron_u); -static u3_bean _raft_remove_run(u3_rcon* ron_u); +static u3_noun _raft_remove_run(u3_rcon* ron_u); static void _raft_send_rasp(u3_rcon* ron_u, c3_t suc_t); static void _raft_rreq_free(u3_rreq* req_u); static void _raft_time_cb(uv_timer_t* tim_u); @@ -834,11 +834,11 @@ _raft_conn_new(u3_raft* raf_u) /* _raft_remove_run(): remove a connection from the list of unknowns. */ -static u3_bean +static u3_noun _raft_remove_run(u3_rcon* ron_u) { u3_raft* raf_u = ron_u->raf_u; - u3_bean suc = c3n; + u3_noun suc = c3n; if ( raf_u->run_u == ron_u ) { raf_u->run_u = ron_u->nex_u; @@ -906,7 +906,7 @@ _raft_conn_free(uv_handle_t* had_u) } } else { - u3_bean suc = _raft_remove_run(ron_u); + u3_noun suc = _raft_remove_run(ron_u); c3_assert(c3y == suc); // Slow, expensive debug assert. { @@ -1774,7 +1774,7 @@ u3_raft_work(void) ron = u3_cke_jam(u3nc(u3k(u3A->now), ovo)); c3_assert(u3A->key); - ron = u3_dc("en:crua", u3k(u3A->key), ron); + ron = u3dc("en:crua", u3k(u3A->key), ron); len_w = u3r_met(5, ron); bob_w = c3_malloc(len_w * 4L); diff --git a/v/reck.c b/v/reck.c index dd58f5848..87bb60ce7 100644 --- a/v/reck.c +++ b/v/reck.c @@ -22,12 +22,12 @@ /* _reck_mole(): parse simple atomic mole. */ -static u3_bean +static u3_noun _reck_mole(u3_noun fot, u3_noun san, c3_d* ato_d) { - u3_noun uco = u3_do("slay", san); + u3_noun uco = u3do("slay", san); u3_noun p_uco, q_uco, r_uco, s_uco; if ( (c3n == u3r_qual(uco, &p_uco, &q_uco, &r_uco, &s_uco)) || @@ -48,7 +48,7 @@ _reck_mole(u3_noun fot, /* _reck_lily(): parse little atom. */ -static u3_bean +static u3_noun _reck_lily(u3_noun fot, u3_noun txt, c3_l* tid_l) { c3_d ato_d; @@ -68,7 +68,7 @@ _reck_lily(u3_noun fot, u3_noun txt, c3_l* tid_l) /* _reck_kick_term(): apply terminal outputs. */ -static u3_bean +static u3_noun _reck_kick_term(u3_noun pox, c3_l tid_l, u3_noun fav) { u3_noun p_fav; @@ -113,7 +113,7 @@ _reck_kick_term(u3_noun pox, c3_l tid_l, u3_noun fav) /* _reck_kick_http(): apply http effects. */ -static u3_bean +static u3_noun _reck_kick_http(u3_noun pox, c3_l sev_l, c3_l coq_l, @@ -148,7 +148,7 @@ _reck_kick_http(u3_noun pox, /* _reck_kick_sync(): apply sync outputs. */ -static u3_bean +static u3_noun _reck_kick_sync(u3_noun pox, u3_noun fav) { switch ( u3h(fav) ) { @@ -168,7 +168,7 @@ _reck_kick_sync(u3_noun pox, u3_noun fav) u3z(pox); u3z(fav); return c3n; } -static u3_bean +static u3_noun _reck_kick_newt(u3_noun pox, u3_noun fav) { switch ( u3h(fav) ) { @@ -186,7 +186,7 @@ _reck_kick_newt(u3_noun pox, u3_noun fav) /* _reck_kick_ames(): apply packet network outputs. */ -static u3_bean +static u3_noun _reck_kick_ames(u3_noun pox, u3_noun fav) { u3_noun p_fav; @@ -208,7 +208,7 @@ _reck_kick_ames(u3_noun pox, u3_noun fav) /* _reck_kick_spec(): apply an effect, by path. */ -static u3_bean +static u3_noun _reck_kick_spec(u3_noun pox, u3_noun fav) { u3_noun i_pox, t_pox; @@ -305,7 +305,7 @@ _reck_kick_spec(u3_noun pox, u3_noun fav) /* _reck_kick_norm(): non path-specific effect handling. */ -static u3_bean +static u3_noun _reck_kick_norm(u3_noun pox, u3_noun fav) { if ( c3n == u3du(fav) ) { @@ -343,7 +343,7 @@ u3_reck_kick(u3_noun ovo) if ( (c3n == _reck_kick_spec(u3k(u3h(ovo)), u3k(u3t(ovo)))) && (c3n == _reck_kick_norm(u3k(u3h(ovo)), u3k(u3t(ovo)))) ) { - u3_noun tox = u3_do("spat", u3k(u3h(ovo))); + u3_noun tox = u3do("spat", u3k(u3h(ovo))); #if 0 if ( (c3__warn != u3h(u3t(ovo))) && diff --git a/v/sist.c b/v/sist.c index 429fd2f4f..c65aacbc4 100644 --- a/v/sist.c +++ b/v/sist.c @@ -335,7 +335,7 @@ _sist_home() /* _sist_cask(): ask for a passcode. */ static u3_noun -_sist_cask(c3_c* dir_c, u3_bean nun) +_sist_cask(c3_c* dir_c, u3_noun nun) { c3_c paw_c[60]; u3_noun key; @@ -364,7 +364,7 @@ _sist_cask(c3_c* dir_c, u3_bean nun) say_c[1] = 0; strncat(say_c, paw_c, strlen(paw_c) - 1); - say = u3_do("slay", u3i_string(say_c)); + say = u3do("slay", u3i_string(say_c)); if ( (u3_nul == say) || (u3_blip != u3h(u3t(say))) || ('p' != u3h(u3t(u3t(say)))) ) @@ -418,10 +418,10 @@ _sist_text(c3_c* pom_c) #if 0 /* _sist_bask(): ask a yes or no question. */ -static u3_bean -_sist_bask(c3_c* pop_c, u3_bean may) +static u3_noun +_sist_bask(c3_c* pop_c, u3_noun may) { - u3_bean yam; + u3_noun yam; uH; while ( 1 ) { @@ -465,9 +465,9 @@ _sist_fast(u3_noun pas, c3_l key_l) { c3_c ful_c[2048]; c3_c* hom_c = u3_Host.cpu_c; - u3_noun gum = u3_dc("scot", 'p', key_l); + u3_noun gum = u3dc("scot", 'p', key_l); c3_c* gum_c = u3r_string(gum); - u3_noun yek = u3_dc("scot", 'p', pas); + u3_noun yek = u3dc("scot", 'p', pas); c3_c* yek_c = u3r_string(yek); printf("saving passcode in %s/.urb/code.%s\r\n", hom_c, gum_c); @@ -497,7 +497,7 @@ _sist_staf(c3_l key_l) { c3_c ful_c[2048]; c3_c* hom_c = u3_Host.cpu_c; - u3_noun gum = u3_dc("scot", 'p', key_l); + u3_noun gum = u3dc("scot", 'p', key_l); c3_c* gum_c = u3r_string(gum); u3_noun txt; @@ -512,7 +512,7 @@ _sist_staf(c3_l key_l) } else { // c3_c* txt_c = u3r_string(txt); - u3_noun say = u3_do("slay", txt); + u3_noun say = u3do("slay", txt); u3_noun pas; @@ -543,7 +543,7 @@ _sist_fatt(c3_l sal_l, u3_noun pas) // XX use scrypt() - this is a stupid iterated hash // for ( i_w = 0; i_w < 32768; i_w++ ) { - key = u3_dc("shaf", sal_l, key); + key = u3dc("shaf", sal_l, key); } return key; } @@ -814,14 +814,14 @@ _sist_rest() c3_d las_d = 0; u3_noun roe = u3_nul; u3_noun sev_l, tno_l, key_l, sal_l; - u3_bean ohh = c3n; + u3_noun ohh = c3n; if ( 0 != u3A->ent_d ) { u3_noun ent; c3_c* ent_c; ent = u3i_chubs(1, &u3A->ent_d); - ent = u3_dc("scot", c3__ud, ent); + ent = u3dc("scot", c3__ud, ent); ent_c = u3r_string(ent); uL(fprintf(uH, "rest: checkpoint to event %s\n", ent_c)); free(ent_c); @@ -884,8 +884,8 @@ _sist_rest() tno_l = led_u.tno_l; { - u3_noun old = u3_dc("scot", c3__uv, sev_l); - u3_noun nuu = u3_dc("scot", c3__uv, u3A->sev_l); + u3_noun old = u3dc("scot", c3__uv, sev_l); + u3_noun nuu = u3dc("scot", c3__uv, u3A->sev_l); c3_c* old_c = u3r_string(old); c3_c* nuu_c = u3r_string(nuu); @@ -926,7 +926,7 @@ _sist_rest() { c3_d ent_d; c3_d end_d; - u3_bean rup = c3n; + u3_noun rup = c3n; end_d = u3Z->lug_u.len_d; ent_d = 0; @@ -1031,7 +1031,7 @@ _sist_rest() if ( u3A->key ) { u3_noun dep; - dep = u3_dc("de:crua", u3k(u3A->key), ron); + dep = u3dc("de:crua", u3k(u3A->key), ron); if ( c3n == u3du(dep) ) { uL(fprintf(uH, "record (%s) is corrupt (k)\n", ful_c)); u3_lo_bail(); @@ -1114,7 +1114,7 @@ _sist_rest() u3_lo_bail(); } u3A->our = u3k(u3h(u3A->own)); - u3A->pod = u3_dc("scot", 'p', u3k(u3A->our))); + u3A->pod = u3dc("scot", 'p', u3k(u3A->our))); } // Now, who the fsck are you? No, really. @@ -1127,7 +1127,7 @@ _sist_rest() fil_c++; } else fil_c = u3_Host.cpu_c; - who = u3_dc("scot", 'p', u3k(u3A->our))); + who = u3dc("scot", 'p', u3k(u3A->our))); who_c = u3r_string(who); u3z(who); @@ -1231,7 +1231,7 @@ u3_sist_boot(void) } else { u3_noun imp = u3i_string(u3_Host.ops_u.imp_c); - u3_noun whu = u3_dc("slaw", 'p', u3k(imp)); + u3_noun whu = u3dc("slaw", 'p', u3k(imp)); if ( (u3_nul == whu) ) { fprintf(stderr, "czar: incorrect format\r\n"); @@ -1242,7 +1242,7 @@ u3_sist_boot(void) u3_noun gun = u3_nul; if (c3n == u3_Host.ops_u.fak) { gen = _sist_text("generator"); - gun = u3_dc("slaw", c3__uw, gen); + gun = u3dc("slaw", c3__uw, gen); if ( u3_nul == gun ) { fprintf(stderr, "czar: incorrect format\r\n"); diff --git a/v/term.c b/v/term.c index 793deac28..55a40fb61 100644 --- a/v/term.c +++ b/v/term.c @@ -70,7 +70,7 @@ _term_close_cb(uv_handle_t* han_t) } { - u3_noun tid = u3_dc("scot", c3__ud, tty_u->tid_l); + u3_noun tid = u3dc("scot", c3__ud, tty_u->tid_l); u3_noun pax = u3nq(u3_blip, c3__term, tid, u3_nul); u3v_plan(u3k(pax), u3nc(c3__hook, u3_nul)); u3z(pax); @@ -302,7 +302,7 @@ _term_listen_cb(uv_stream_t *wax_u, int sas_i) pty_u->tel_u = telnet_nvt_new(tty_u, _tel_event, _tel_opt, NULL); { - u3_noun tid = u3_dc("scot", c3__ud, tty_u->tid_l); + u3_noun tid = u3dc("scot", c3__ud, tty_u->tid_l); u3_noun pax = u3nq(u3_blip, c3__term, tid, u3_nul); u3v_plan(u3k(pax), u3nc(c3__blew, u3nc(80, 25))); u3v_plan(u3k(pax), u3nc(c3__hail, u3_nul)); @@ -498,7 +498,7 @@ static void _term_it_show_wide(u3_utty* uty_u, c3_w len_w, c3_w* txt_w) { u3_noun wad = u3i_words(len_w, txt_w); - u3_noun txt = u3_do("tuft", wad); + u3_noun txt = u3do("tuft", wad); c3_c* txt_c = u3r_string(txt); _term_it_write_str(uty_u, txt_c); @@ -610,7 +610,7 @@ _term_it_show_more(u3_utty* uty_u) /* _term_it_path(): path for console file. */ static c3_c* -_term_it_path(u3_bean fyl, u3_noun pax) +_term_it_path(u3_noun fyl, u3_noun pax) { c3_w len_w; c3_c *pas_c; @@ -673,7 +673,7 @@ _term_it_save(u3_noun pax, u3_noun pad) static void _term_io_belt(u3_utty* uty_u, u3_noun blb) { - u3_noun tid = u3_dc("scot", c3__ud, uty_u->tid_l); + u3_noun tid = u3dc("scot", c3__ud, uty_u->tid_l); u3_noun pax = u3nq(u3_blip, c3__term, tid, u3_nul); u3v_plan(pax, u3nc(c3__belt, blb)); @@ -745,7 +745,7 @@ _tel_opt(_te_nvt* nvt, telnet_byte opt, _to_evt* evt) tel_u->uty_t.tat_u.siz.col_l = col_s; tel_u->uty_t.tat_u.siz.row_l = row_s; - tid = u3_dc("scot", c3__ud, tel_u->uty_t.tid_l); + tid = u3dc("scot", c3__ud, tel_u->uty_t.tid_l); pax = u3nq(u3_blip, c3__term, tid, u3_nul); blu = u3nc(col_s, row_s); u3v_plan(pax, u3nc(c3__blew, blu)); @@ -798,7 +798,7 @@ _term_io_suck_char(u3_utty* uty_u, c3_y cay_y) // uL(fprintf(uH, "muck-utf8 len %d\n", tat_u->fut.len_w)); // uL(fprintf(uH, "muck-utf8 %x\n", huv)); - wug = u3_do("turf", huv); + wug = u3do("turf", huv); // uL(fprintf(uH, "muck-utf32 %x\n", tat_u->fut.len_w)); tat_u->fut.len_w = tat_u->fut.wid_w = 0; diff --git a/v/unix.c b/v/unix.c index 5529bd425..21d67fb00 100644 --- a/v/unix.c +++ b/v/unix.c @@ -265,7 +265,7 @@ _unix_file_watch(u3_ufil* fil_u, static c3_c* _unix_file_form(u3_udir* dir_u, u3_noun pre, - u3_bean ket, + u3_noun ket, u3_noun ext) { c3_c* pre_c = u3r_string(pre); @@ -431,7 +431,7 @@ _unix_dir_free(u3_udir* dir_u) #if 0 /* _unix_file_update(): update file, true if plausibly changed. */ -static u3_bean +static u3_noun _unix_file_update(u3_ufil* fil_u, mpz_t mod_mp) { if ( 0 == mpz_cmp(mod_mp, fil_u->mod_mp) ) { @@ -740,11 +740,11 @@ _unix_dir_ankh_file(u3_noun pam, u3_noun wib, u3_noun baw, u3_noun woz) ole = u3_ckdb_get(u3k(pam), u3k(wib)); if ( u3_none == ole ) { - ole = u3_do("cosh", u3nt(0, woz, u3_nul)); + ole = u3do("cosh", u3nt(0, woz, u3_nul)); } else { u3_noun elo; - elo = u3_do("cosh", u3nt(0, woz, u3k(u3t(u3t(ole))))); + elo = u3do("cosh", u3nt(0, woz, u3k(u3t(u3t(ole))))); u3z(ole); ole = elo; @@ -761,8 +761,8 @@ _unix_dir_ankh_file(u3_noun pam, u3_noun wib, u3_noun baw, u3_noun woz) ole = u3nt (0, u3_nul, u3_ckdb_put(u3_nul, u3k(har), - u3_do("cosh", u3nt(0, woz, u3_nul)))); - ole = u3_do("cosh", ole); + u3do("cosh", u3nt(0, woz, u3_nul)))); + ole = u3do("cosh", ole); } else { u3_noun roo = u3t(u3t(ole)); @@ -770,17 +770,17 @@ _unix_dir_ankh_file(u3_noun pam, u3_noun wib, u3_noun baw, u3_noun woz) u3_noun oor, elo; if ( u3_none == tup ) { - tup = u3_do("cosh", u3nt(0, woz, u3_nul)); + tup = u3do("cosh", u3nt(0, woz, u3_nul)); } else { u3_noun upt; - upt = u3_do("cosh", u3nt(0, woz, u3k(u3t(u3t(tup))))); + upt = u3do("cosh", u3nt(0, woz, u3k(u3t(u3t(tup))))); u3z(tup); tup = upt; } oor = u3_ckdb_put(u3k(roo), u3k(har), tup); - elo = u3_do("cosh", u3nt(0, u3k(u3h(u3t(ole))), oor)); + elo = u3do("cosh", u3nt(0, u3k(u3h(u3t(ole))), oor)); u3z(ole); ole = elo; } @@ -820,7 +820,7 @@ _unix_dir_ankh(u3_udir* dir_u) continue; } u3_noun baw = _unix_file_load(fil_u); - u3_noun woz = u3nt(u3_nul, u3_do("sham", u3k(baw)), baw); + u3_noun woz = u3nt(u3_nul, u3do("sham", u3k(baw)), baw); u3z(dur); pam = _unix_dir_ankh_file(pam, u3k(u3t(wib)), baw, woz); u3z(wib); @@ -830,10 +830,10 @@ _unix_dir_ankh(u3_udir* dir_u) for ( fil_u = dir_u->fil_u; fil_u; fil_u = fil_u->nex_u ) { u3_noun wib = _unix_file_name(fil_u); u3_noun baw = _unix_file_load(fil_u); - u3_noun woz = u3nt(u3_nul, u3_do("sham", u3k(baw)), baw); + u3_noun woz = u3nt(u3_nul, u3do("sham", u3k(baw)), baw); pam = _unix_dir_ankh_file(pam, wib, baw, woz); } - return u3_do("cosh", u3nt(0, u3_nul, pam)); + return u3do("cosh", u3nt(0, u3_nul, pam)); } /* _find_mug(): find a noun with a given mug. retain. DELETEME @@ -885,9 +885,9 @@ _unix_desk_peek(u3_noun hox, #if 0 /* _unix_ankh_sing_map(): compare ankh maps for u3_ankh_sing(). */ -static u3_bean _unix_ankh_sing_in(u3_noun, u3_noun); +static u3_noun _unix_ankh_sing_in(u3_noun, u3_noun); -static u3_bean +static u3_noun _unix_ankh_sing_map(u3_noun mun, u3_noun mur) // retain { u3_noun n_mun, l_mun, r_mun; @@ -910,7 +910,7 @@ _unix_ankh_sing_map(u3_noun mun, u3_noun mur) // retain /* _unix_node_sing(): test node equality. */ -static u3_bean +static u3_noun _unix_node_sing(u3_noun xud, u3_noun bud) { if ( (u3_nul == xud) && (u3_nul == bud) ) { return c3y; } @@ -921,7 +921,7 @@ _unix_node_sing(u3_noun xud, u3_noun bud) /* _unix_ankh_sing_in(): stupid ankh test which ignores broken hash. */ -static u3_bean +static u3_noun _unix_ankh_sing_in(u3_noun xun, u3_noun bur) // retain { u3_noun p_xun, q_xun, r_xun; @@ -938,7 +938,7 @@ _unix_ankh_sing_in(u3_noun xun, u3_noun bur) // retain /* _unix_ankh_sing(): full ankh compare. */ -static u3_bean +static u3_noun _unix_ankh_sing(u3_noun xun, u3_noun bur) // retain { if ( c3y == u3r_sing(xun, bur) ) { @@ -971,7 +971,7 @@ _unix_desk_sync_into(u3_noun who, if ( (c3n == u3r_sing(u3h(xun), u3h(bur)))) { - doz = u3_dc("cost", xun, bur); + doz = u3dc("cost", xun, bur); pax = u3nq(u3_blip, c3__sync, u3k(u3A->sen), u3_nul); fav = u3nq(c3__into, who, syd, u3nc(c3y, doz)); @@ -1002,7 +1002,7 @@ _unix_ship_update(u3_uhot* hot_u) mpz_init_set(who_mp, hot_u->who_mp); who = u3i_mp(who_mp); - hox = u3_dc("scot", 'p', u3k(who)); + hox = u3dc("scot", 'p', u3k(who)); } for ( dis_u = dir_u->dis_u; dis_u; dis_u = dis_u->nex_u ) { @@ -1022,9 +1022,9 @@ _unix_ship_update(u3_uhot* hot_u) /* _unix_hot_gain(): gain ship. */ static void -_unix_hot_gain(u3_noun who, u3_bean mek) +_unix_hot_gain(u3_noun who, u3_noun mek) { - u3_noun hox = u3_dc("scot", 'p', u3k(who)); + u3_noun hox = u3dc("scot", 'p', u3k(who)); c3_c* hox_c = u3r_string(hox); c3_c* pax_c = _unix_down(u3_Host.cpu_c, hox_c + 1); DIR* rid_u = opendir(pax_c); @@ -1109,7 +1109,7 @@ _unix_home(u3_noun who) static u3_noun _unix_desk_sync_udon(u3_noun don, u3_noun old) { - return u3_dc("lump", don, old); + return u3dc("lump", don, old); } /* _unix_desk_sync_tofu(): sync out file install. @@ -1298,7 +1298,7 @@ _unix_desk_sync_ergo(u3_noun hox, u3_noun bur = _unix_desk_peek(hox, syd, lok); if ( c3n == u3r_sing(xun, bur) ) { - u3_noun doz = u3_dc("cost", bur, xun); + u3_noun doz = u3dc("cost", bur, xun); _unix_desk_sync_soba(*dir_u, doz); } @@ -1328,8 +1328,8 @@ u3_unix_ef_ergo(u3_noun who, u3_noun syd, u3_noun rel) { - u3_noun hox = u3_dc("scot", 'p', u3k(who)); - u3_noun lok = u3_dc("scot", c3__ud, rel); + u3_noun hox = u3dc("scot", 'p', u3k(who)); + u3_noun lok = u3dc("scot", c3__ud, rel); u3_uhot* hot_u; hot_u = _unix_home(who); diff --git a/v/walk.c b/v/walk.c index c767a38a1..5a3413f39 100644 --- a/v/walk.c +++ b/v/walk.c @@ -206,7 +206,7 @@ _walk_in(const c3_c* dir_c, c3_w len_w) if ( !strcmp("noun", ext_c) ) { dat = u3_cke_cue(dat); } - hax = u3_do("sham", u3k(dat)); + hax = u3do("sham", u3k(dat)); if ( u3_none == get ) { get = u3_nul; } get = u3_ckdb_put(get, ext, u3nt(c3y, hax, dat)); @@ -257,7 +257,7 @@ u3_walk(const c3_c* dir_c, u3_noun old) /* u3_path(): C unix path in computer for file or directory. */ c3_c* -u3_path(u3_bean fyl, u3_noun pax) +u3_path(c3_o fyl, u3_noun pax) { c3_w len_w; c3_c *pas_c;