Fix sed follies.

This commit is contained in:
C. Guy Yarvin 2014-11-05 15:36:30 -08:00
parent a7215257ac
commit 87d8169c57
85 changed files with 408 additions and 292 deletions

176
Spec/u3.md Normal file
View File

@ -0,0 +1,176 @@
# u3: noun processing in C.
`u3` is the C library that makes Urbit work. If it wasn't called
`u3`, it might be called `libnoun` - it's a library for making
and storing nouns.
What's a noun? A noun is either a cell or an atom. A cell is an
ordered pair of any two nouns. An atom is an unsigned integer of
any size.
To the C programmer, this is not a terribly complicated data
structure, so why do you need a library for it?
One: nouns have a well-defined computation kernel, Nock, whose
spec fits on a page and gzips to 340 bytes. But the only
arithmetic operation in Nock is increment. So it's nontrivial
to compute both efficiently and correctly.
Two: `u3` is designed to support "permanent computing," ie, a
single-level store which is transparently checkpointed. This
implies a specialized memory-management model.
Does `u3` depend on the higher levels of Urbit, Arvo and Hoon?
Yes and no. It expects you to load something shaped like an Arvo
kernel, and use it as an event-processing function. But you
don't need to use this feature if you don't want, and your kernel
can be anything you want.
## u3: files and directory
The best way to introduce `u3` is with a simple map of the Urbit
build directory - folding things we don't care about right now:
g/ u3 implementation
g/a.c allocation
g/e.c persistence
g/h.c hashtables
g/i.c noun construction
g/j.c jet control
g/m.c master state
g/n.c nock execution
g/r.c noun access, error returns
g/t.c tracing/profiling
g/v.c arvo kernel
g/x.c noun access, error crashes
g/z.c memoization/caching
i/ all includes
i/v vere systems headers
i/g u3 headers (matching g/ names)
i/c c3 headers
i/c/defs.h miscellaneous c3 macros
i/c/motes.h symbolic constants
i/c/portable.h portability definitions
i/c/types.h c3 types
j/ jets
j/dash.c jet structures
j/1 tier 1 jets: basic math
j/2 tier 2 jets: lists
j/3 tier 3 jets: bit twiddling
j/4 tier 4 jets: containers
j/5 tier 5 jets: misc
j/6 tier 6 jets: hoon
v/ vere systems code
outside/ all external bundled code
(The `v/` code is part of `vere`, which uses `u3` to run Urbit.)
## c3: C in the Urbit environment
When writing C code in u3, please of course follow the
conventions of the code around you as regards indentation, etc.
It's especially important that every function have a header
comment, even if it says nothing interesting.
But some of our idiosyncrasies go beyond convention. Yes, we've
done awful things to C. Here's what we did and why we did.
### c3: integer types
First, it's generally acknowledged that underspecified integer
types are C's worst disaster. C99 fixed this, but the `stdint`
types are wordy and annoying. We've replaced them with:
/* Good integers.
*/
typedef uint64_t c3_d; // double-word
typedef int64_t c3_ds; // signed double-word
typedef uint32_t c3_w; // word
typedef int32_t c3_ws; // signed word
typedef uint16_t c3_s; // short
typedef int16_t c3_ss; // signed short
typedef uint8_t c3_y; // byte
typedef int8_t c3_ys; // signed byte
typedef uint8_t c3_b; // bit
typedef uint8_t c3_t; // boolean
typedef uint8_t c3_o; // loobean
typedef uint8_t c3_g; // 32-bit log - 0-31 bits
typedef uint32_t c3_l; // little; 31-bit unsigned integer
typedef uint32_t c3_m; // mote; also c3_l; LSB first a-z 4-char string.
/* Bad integers.
*/
typedef char c3_c; // does not match int8_t or uint8_t
typedef int c3_i; // int - really bad
typedef uintptr_t c3_p; // pointer-length uint - really really bad
typedef intptr_t c3_ps; // pointer-length int - really really bad
Some of these need explanation. A loobean is a Nock boolean -
Nock, for mysterious reasons, uses 0 as true (always say "yes")
and 1 as false (always say "no").
Nock and/or Hoon cannot tell the difference between a short atom
and a long one, but at the `u3` level every atom under `2^31` is
direct. The `c3_l` type is useful to annotate this. A `c3_m` is
a mote - a string of up to 4 characters in a `c3_l`, least
significant byte first. A `c3_g` should be a 5-bit atom. Of
course, C cannot enforce these constraints, only document them.
Use the "bad" - ie, poorly specified - integer types only when
interfacing with external code that expects them.
An enormous number of motes are defined in `i/c/motes.h`. There
is no reason to delete motes that aren't being used, or even to
modularize the definitions. Keep them alphabetical, though.
### c3: variables and variable naming
The C3 style uses Hoon style TLV variable names, with a quasi
Hungarian syntax. This is weird, but works really well, as
long as what you're doing isn't hideous.
A TLV variable name is a random pronounceable three-letter
string, sometimes with some vague relationship to its meaning,
but usually not. Usually CVC (consonant-vowel-consonant) is a
good choice.
You should use TLVs much the way math people use Greek letters.
The same concept should in general get the same name across
different contexts. When you're working in a given area, you'll
tend to remember the binding from TLV to concept by sheer power
of associative memory. When you come back to it, it's not that
hard to relearn. And of course, when in doubt, comment it.
Variables take pseudo-Hungarian suffixes, matching in general the
suffix of the integer type:
c3_w wor_w; // 32-bit word
Unlike in true Hungarian, there is no change for pointer
variables. Structure variables take a `_u` suffix;
### c3: loobeans
The code (from `defs.h`) tells the story:
# define c3y 0
# define c3n 1
# define _(x) (c3y == (x))
# define __(x) ((x) ? c3y : c3n)
# define c3a(x, y) __(_(x) && _(y))
# define c3o(x, y) __(_(x) || _(y))
In short, use `_()` to turn a loobean into a boolean, `__` to go
the other way. Use `!` as usual, `c3y` for yes and `c3n` for no,
`c3a` for and and `c3o` for or.
## u3: introduction to the noun world

10
g/a.c
View File

@ -584,7 +584,7 @@ static u3_noun _me_copy_north(u3_noun);
static u3_noun
_me_copy_north_in(u3_noun som)
{
c3_assert(c3nne != som);
c3_assert(u3_none != som);
if ( _(u3_ca_is_cat(som)) ) {
return som;
}
@ -676,7 +676,7 @@ static u3_noun _me_copy_south(u3_noun);
static u3_noun
_me_copy_south_in(u3_noun som)
{
c3_assert(c3nne != som);
c3_assert(u3_none != som);
if ( _(u3_ca_is_cat(som)) ) {
return som;
}
@ -827,7 +827,7 @@ _me_take_south(u3_noun dog)
u3_noun
u3_ca_take(u3_noun som)
{
c3_assert(c3nne != som);
c3_assert(u3_none != som);
if ( _(u3_ca_is_cat(som)) ) {
return som;
@ -985,7 +985,7 @@ top:
u3_noun
u3_ca_gain(u3_noun som)
{
c3_assert(c3nne != som);
c3_assert(u3_none != som);
if ( _(u3_ca_is_cat(som)) ) {
return som;
@ -1338,7 +1338,7 @@ _ca_detect(u3p(u3_ch_root) har_p, u3_noun fum, u3_noun som, c3_d axe_d)
if ( som == fum ) {
return axe_d;
}
else if ( !_(u3du(fum)) || (c3nne != u3_ch_get(har_p, fum)) ) {
else if ( !_(u3du(fum)) || (u3_none != u3_ch_get(har_p, fum)) ) {
return 0;
}
else {

6
g/e.c
View File

@ -862,7 +862,7 @@ u3_ce_init(c3_o chk_o)
/* u3_ce_grab(): garbage-collect the world, plus extra roots, then
*/
void
u3_ce_grab(c3_c* cap_c, u3_noun som, ...) // terminate with c3nne
u3_ce_grab(c3_c* cap_c, u3_noun som, ...) // terminate with u3_none
{
// u3_ch_free(u3R->cax.har_p);
// u3R->cax.har_p = u3_ch_new();
@ -875,10 +875,10 @@ u3_ce_grab(c3_c* cap_c, u3_noun som, ...) // terminate with c3nne
va_start(vap, som);
if ( som != c3nne ) {
if ( som != u3_none ) {
u3_ca_mark_noun(som);
while ( c3nne != (tur = va_arg(vap, u3_noun)) ) {
while ( u3_none != (tur = va_arg(vap, u3_noun)) ) {
u3_ca_mark_noun(tur);
}
}

20
g/h.c
View File

@ -313,7 +313,7 @@ _ch_buck_get(u3_ch_buck* hab_u, u3_noun key)
return u3_ca_gain(u3t(hab_u->kev[i_w]));
}
}
return c3nne;
return u3_none;
}
/* _ch_node_get(): read in node.
@ -329,7 +329,7 @@ _ch_node_get(u3_ch_node* han_u, c3_w lef_w, c3_w rem_w, u3_noun key)
map_w = han_u->map_w;
if ( !(map_w & (1 << bit_w)) ) {
return c3nne;
return u3_none;
}
else {
c3_w inx_w = _ch_popcount(map_w & ((1 << bit_w) - 1));
@ -342,7 +342,7 @@ _ch_node_get(u3_ch_node* han_u, c3_w lef_w, c3_w rem_w, u3_noun key)
return u3_ca_gain(u3t(kev));
}
else {
return c3nne;
return u3_none;
}
}
else {
@ -370,7 +370,7 @@ u3_ch_get(u3p(u3_ch_root) har_p, u3_noun key)
c3_w sot_w = har_u->sot_w[inx_w];
if ( _(u3_ch_slot_is_null(sot_w)) ) {
return c3nne;
return u3_none;
}
else if ( _(u3_ch_slot_is_noun(sot_w)) ) {
u3_noun kev = u3_ch_slot_to_noun(sot_w);
@ -380,7 +380,7 @@ u3_ch_get(u3p(u3_ch_root) har_p, u3_noun key)
return u3_ca_gain(u3t(kev));
}
else {
return c3nne;
return u3_none;
}
}
else {
@ -402,7 +402,7 @@ _ch_buck_gut(u3_ch_buck* hab_u, u3_noun key)
return u3_ca_gain(u3t(hab_u->kev[i_w]));
}
}
return c3nne;
return u3_none;
}
/* _ch_node_gut(): read in node, unifying key nouns.
@ -418,7 +418,7 @@ _ch_node_gut(u3_ch_node* han_u, c3_w lef_w, c3_w rem_w, u3_noun key)
map_w = han_u->map_w;
if ( !(map_w & (1 << bit_w)) ) {
return c3nne;
return u3_none;
}
else {
c3_w inx_w = _ch_popcount(map_w & ((1 << bit_w) - 1));
@ -431,7 +431,7 @@ _ch_node_gut(u3_ch_node* han_u, c3_w lef_w, c3_w rem_w, u3_noun key)
return u3_ca_gain(u3t(kev));
}
else {
return c3nne;
return u3_none;
}
}
else {
@ -459,7 +459,7 @@ u3_ch_gut(u3p(u3_ch_root) har_p, u3_noun key)
c3_w sot_w = har_u->sot_w[inx_w];
if ( _(u3_ch_slot_is_null(sot_w)) ) {
return c3nne;
return u3_none;
}
else if ( _(u3_ch_slot_is_noun(sot_w)) ) {
u3_noun kev = u3_ch_slot_to_noun(sot_w);
@ -469,7 +469,7 @@ u3_ch_gut(u3p(u3_ch_root) har_p, u3_noun key)
return u3_ca_gain(u3t(kev));
}
else {
return c3nne;
return u3_none;
}
}
else {

8
g/i.c
View File

@ -168,7 +168,7 @@ u3_ci_mp(mpz_t a_mp)
u3_noun
u3_ci_vint(u3_noun a)
{
c3_assert(c3nne != a);
c3_assert(u3_none != a);
if ( _(u3_ca_is_cat(a)) ) {
c3_w vin_w = (a + 1);
@ -199,8 +199,8 @@ u3_ci_vint(u3_noun a)
u3_noun
u3_ci_cell(u3_noun a, u3_noun b)
{
c3_assert(c3nne != a);
c3_assert(c3nne != b);
c3_assert(u3_none != a);
c3_assert(u3_none != b);
c3_assert(!_(u3_ca_is_junior(u3R, a)));
c3_assert(!_(u3_ca_is_junior(u3R, b)));
@ -292,7 +292,7 @@ u3_ci_heximal(u3_noun a);
/* u3_ci_list():
**
** Generate a null-terminated list, with `c3nne` as terminator.
** Generate a null-terminated list, with `u3_none` as terminator.
*/
u3_noun
u3_ci_list(u3_weak one, ...);

74
g/j.c
View File

@ -80,7 +80,7 @@ static u3_weak
_cj_by_gut(u3_noun a, u3_noun b)
{
if ( u3_nul == a ) {
return c3nne;
return u3_none;
}
else {
u3_noun l_a, n_a, r_a;
@ -140,16 +140,16 @@ _cj_je_fsck(u3_noun clu)
c3_l axe_l;
if ( c3n == u3_cr_trel(clu, &p_clu, &q_clu, &r_clu) ) {
u3z(clu); return c3nne;
u3z(clu); return u3_none;
}
if ( 0 == (nam_c = _cj_chum(p_clu)) ) {
u3z(clu); return c3nne;
u3z(clu); return u3_none;
}
while ( _(u3du(q_clu)) && (10 == u3h(q_clu)) ) {
q_clu = u3t(u3t(q_clu));
}
if ( !_(u3du(q_clu)) ) {
u3z(clu); free(nam_c); return c3nne;
u3z(clu); free(nam_c); return u3_none;
}
if ( (1 == u3h(q_clu)) && (0 == u3t(q_clu)) ) {
@ -157,7 +157,7 @@ _cj_je_fsck(u3_noun clu)
}
else {
if ( (0 != u3h(q_clu)) || !_(u3_ca_is_cat(axe_l = u3t(q_clu))) ) {
u3z(clu); free(nam_c); return c3nne;
u3z(clu); free(nam_c); return u3_none;
}
}
@ -171,7 +171,7 @@ _cj_je_fsck(u3_noun clu)
(c3n == u3_cr_cell(ir_clu, &pir_clu, &qir_clu)) ||
(c3n == u3ud(pir_clu)) )
{
u3z(huk); u3z(clu); free(nam_c); return c3nne;
u3z(huk); u3z(clu); free(nam_c); return u3_none;
}
huk = u3_ckdb_put(huk, u3k(pir_clu), u3k(qir_clu));
r_clu = tr_clu;
@ -204,14 +204,14 @@ _cj_cold_find_sys(u3_noun bat)
while ( 1 ) {
u3_noun pro = _cj_by_gut(u3h(rod_u->jed.das), bat);
if ( pro != c3nne ) {
if ( pro != u3_none ) {
return pro;
}
if ( !rod_u->par_u ) break;
rod_u = rod_u->par_u;
}
return c3nne;
return u3_none;
}
/* _cj_cold_mine(): in cold mode, declare a core. RETAINS.
@ -234,19 +234,19 @@ _cj_cold_mine(u3_noun cey, u3_noun cor)
else {
u3_weak rah = u3_cr_at(q_cey, cor);
if ( (c3nne == rah) || !_(u3du(rah)) ) {
if ( (u3_none == rah) || !_(u3du(rah)) ) {
fprintf(stderr, "fund: %s is bogus\r\n", u3_cr_string(p_cey));
return c3nne;
return u3_none;
}
else {
u3_noun soh = _cj_cold_find_sys(u3h(rah));
if ( c3nne == soh ) {
if ( u3_none == soh ) {
fprintf(stderr, "fund: in %s, parent %x not found at %d\r\n",
u3_cr_string(p_cey),
u3_cr_mug(u3h(rah)),
q_cey);
return c3nne;
return u3_none;
}
else {
mop = u3nq(u3k(p_cey), u3k(q_cey), c3y, u3k(soh));
@ -261,7 +261,7 @@ _cj_cold_mine(u3_noun cey, u3_noun cor)
u3_noun hoe = u3_ckdb_get(u3k(u3t(u3R->jed.das)), u3k(soh));
u3_noun sab;
if ( c3nne == hoe ) {
if ( u3_none == hoe ) {
sab = u3nt(u3nc(u3k(bat), u3k(r_cey)), u3_nul, u3_nul);
}
else {
@ -286,7 +286,7 @@ _cj_cold_mine(u3_noun cey, u3_noun cor)
}
}
/* _cj_warm_fend(): in warm state, return c3nne or calx. RETAINS.
/* _cj_warm_fend(): in warm state, return u3_none or calx. RETAINS.
*/
u3_weak
_cj_warm_fend(u3_noun bat)
@ -296,14 +296,14 @@ _cj_warm_fend(u3_noun bat)
while ( 1 ) {
u3_weak jaw = u3_ch_gut(rod_u->jed.har_p, bat);
if ( c3nne != jaw ) {
if ( u3_none != jaw ) {
return jaw;
}
if ( rod_u->par_u ) {
rod_u = rod_u->par_u;
}
else return c3nne;
else return u3_none;
}
}
@ -339,7 +339,7 @@ _cj_warm_hump(c3_l jax_l, u3_noun huc)
u3_noun nam = u3_ci_string(jet_u->fcs_c);
u3_noun fol = u3_ckdb_get(u3k(huc), nam);
if ( c3nne == fol ) {
if ( u3_none == fol ) {
fprintf(stderr, "jets: activate: bad fcs %s\r\n", jet_u->fcs_c);
}
else {
@ -468,7 +468,7 @@ _cj_warm_ream_un(u3_noun soh)
u3_noun cax;
c3_l jax_l;
if ( c3nne != (cax = u3_ch_get(u3R->jed.har_p, u3h(u3h(sab)))) ) {
if ( u3_none != (cax = u3_ch_get(u3R->jed.har_p, u3h(u3h(sab)))) ) {
jax_l = u3h(cax);
u3z(cax);
}
@ -555,7 +555,7 @@ _cj_warm_mine(u3_noun clu, u3_noun cor)
if ( !_(u3du(cor)) ) {
u3z(clu);
}
else if ( c3nne != (cax = _cj_warm_fend(bat)) ) {
else if ( u3_none != (cax = _cj_warm_fend(bat)) ) {
u3z(cax); u3z(clu);
}
else {
@ -563,12 +563,12 @@ _cj_warm_mine(u3_noun clu, u3_noun cor)
// fprintf(stderr, "warm_mine %s\r\n", u3_cr_string(u3h(cey)));
if ( c3nne != cey ) {
if ( u3_none != cey ) {
u3_noun huc = u3t(u3t(cey));
u3_noun pax = u3h(u3t(cey));
u3_noun mop;
if ( c3nne != (mop = _cj_cold_mine(cey, cor)) ) {
if ( u3_none != (mop = _cj_cold_mine(cey, cor)) ) {
c3_l jax_l = _cj_boil_mine(mop, cor);
// fprintf(stderr, "warm: bat %x\r\n", u3_cr_mug(bat));
@ -613,7 +613,7 @@ _cj_find(u3_noun bat)
while ( 1 ) {
u3_weak jaw = u3_ch_gut(rod_u->jed.har_p, bat);
if ( c3nne != jaw ) {
if ( u3_none != jaw ) {
u3_assure(u3_ca_is_cat(u3h(jaw)));
#if 0
@ -651,7 +651,7 @@ _cj_soft(u3_noun cor, u3_noun axe)
extern int SLAY;
/* _cj_kick_z(): try to kick by jet. If no kick, produce c3nne.
/* _cj_kick_z(): try to kick by jet. If no kick, produce u3_none.
**
** `cor` is RETAINED iff there is no kick, TRANSFERRED if one.
** `axe` is RETAINED.
@ -660,17 +660,17 @@ static u3_weak
_cj_kick_z(u3_noun cor, u3_cs_core* cop_u, u3_cs_harm* ham_u, u3_atom axe)
{
if ( 0 == ham_u->fun_f ) {
return c3nne;
return u3_none;
}
if ( !_(ham_u->liv) ) {
return c3nne;
return u3_none;
}
else {
if ( _(ham_u->ice) ) {
u3_weak pro = ham_u->fun_f(cor);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
u3z(cor);
return pro;
}
@ -682,7 +682,7 @@ _cj_kick_z(u3_noun cor, u3_cs_core* cop_u, u3_cs_harm* ham_u, u3_atom axe)
pro = ham_u->fun_f(u3k(cor));
ham_u->ice = c3n;
if ( c3nne == pro ) {
if ( u3_none == pro ) {
u3z(cor);
return pro;
}
@ -708,7 +708,7 @@ _cj_kick_z(u3_noun cor, u3_cs_core* cop_u, u3_cs_harm* ham_u, u3_atom axe)
#endif
}
}
return c3nne;
return u3_none;
}
}
@ -725,7 +725,7 @@ _cj_hook_in(u3_noun cor,
{
u3_weak cax = _cj_warm_fend(bat);
if ( c3nne == cax ) { return u3_cm_bail(c3__fail); }
if ( u3_none == cax ) { return u3_cm_bail(c3__fail); }
{
u3_noun jax, pax, huc, hap;
@ -735,7 +735,7 @@ _cj_hook_in(u3_noun cor,
u3_cs_core* cop_u = &u3D.ray_u[jax_l];
u3_noun fol = u3_ckdb_get(u3k(huc), u3_ci_string(tam_c));
if ( c3nne == fol ) {
if ( u3_none == fol ) {
// The caller wants a deeper core.
//
if ( 0 == pax ) { return u3_cm_bail(c3__fail); }
@ -753,8 +753,8 @@ _cj_hook_in(u3_noun cor,
if ( (0 == axe_l) ||
(c3n == jet_o) ||
(c3nne == (inx_l = u3_ckdb_get(u3k(hap), axe_l))) ||
(c3nne == (pro = _cj_kick_z(cor,
(u3_none == (inx_l = u3_ckdb_get(u3k(hap), axe_l))) ||
(u3_none == (pro = _cj_kick_z(cor,
cop_u,
&cop_u->arm_u[inx_l],
axe_l))) )
@ -812,18 +812,18 @@ u3_cj_hook(u3_noun cor,
u3_weak
u3_cj_kick(u3_noun cor, u3_noun axe)
{
if ( !_(u3du(cor)) ) { return c3nne; }
if ( !_(u3du(cor)) ) { return u3_none; }
{
u3_noun bat = u3h(cor);
u3_weak cax = _cj_warm_fend(bat);
if ( c3nne == cax ) { return c3nne; }
if ( u3_none == cax ) { return u3_none; }
{
u3_noun hap = u3h(u3t(u3t(cax)));
u3_noun inx = u3_ckdb_get(u3k(hap), u3k(axe));
if ( c3nne == inx ) {
u3z(cax); return c3nne;
if ( u3_none == inx ) {
u3z(cax); return u3_none;
}
else {
c3_l jax_l = u3h(cax);
@ -849,7 +849,7 @@ u3_cj_kink(u3_noun cor,
{
u3_weak pro = u3_cj_kick(cor, axe);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
} else {
return u3_cn_nock_on(cor, u3nq(9, axe, 0, 1));

4
g/m.c
View File

@ -761,7 +761,7 @@ u3_cm_soft_top(c3_w sec_w, // timer seconds
/* Make sure the inner routine did not create garbage.
*/
if ( u3R->how.fag_w & u3_cs_flag_debug ) {
u3_ce_grab("top", pro, c3nne);
u3_ce_grab("top", pro, u3_none);
}
/* Revert to external signal regime.
@ -842,7 +842,7 @@ u3_cm_soft_run(u3_noun fly,
pro = fun_f(aga, agb);
if ( u3R->how.fag_w & u3_cs_flag_debug ) {
u3_ce_grab("top", pro, c3nne);
u3_ce_grab("top", pro, u3_none);
}
/* Produce success, on the old road.

4
g/n.c
View File

@ -76,7 +76,7 @@ _cn_hint(u3_noun zep,
{
u3_noun pro = u3_cz_find_2(c3__nock, bus, nex);
if ( pro != c3nne ) {
if ( pro != u3_none ) {
u3z(bus); u3z(nex);
return pro;
}
@ -254,7 +254,7 @@ u3_cn_nock_on(u3_noun bus, u3_noun fol)
u3_noun seb = u3_cn_nock_on(bus, u3k(c_gal));
u3_noun pro = u3_cj_kick(seb, b_gal);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
u3_ca_lose(fol);
return pro;
}

50
g/r.c
View File

@ -16,7 +16,7 @@ _frag_word(c3_w a_w, u3_noun b)
while ( dep_w ) {
if ( c3n == u3_ca_is_cell(b) ) {
return c3nne;
return u3_none;
}
else {
u3_cs_cell* b_u = u3_ca_to_ptr(b);
@ -38,7 +38,7 @@ _frag_deep(c3_w a_w, u3_noun b)
while ( dep_w ) {
if ( c3n == u3_ca_is_cell(b) ) {
return c3nne;
return u3_none;
}
else {
u3_cs_cell* b_u = u3_ca_to_ptr(b);
@ -52,17 +52,17 @@ _frag_deep(c3_w a_w, u3_noun b)
/* u3_cr_at():
**
** Return fragment (a) of (b), or c3nne if not applicable.
** Return fragment (a) of (b), or u3_none if not applicable.
*/
u3_weak
u3_cr_at(u3_atom a,
u3_noun b)
{
c3_assert(c3nne != a);
c3_assert(c3nne != b);
c3_assert(u3_none != a);
c3_assert(u3_none != b);
if ( 0 == a ) {
return c3nne;
return u3_none;
}
if ( _(u3_ca_is_cat(a)) ) {
@ -70,7 +70,7 @@ u3_cr_at(u3_atom a,
}
else {
if ( !_(u3_ca_is_pug(a)) ) {
return c3nne;
return u3_none;
}
else {
u3_cs_atom* a_u = u3_ca_to_ptr(a);
@ -82,7 +82,7 @@ u3_cr_at(u3_atom a,
while ( len_w ) {
b = _frag_deep(a_u->buf_w[len_w - 1], b);
if ( c3nne == b ) {
if ( u3_none == b ) {
return b;
} else {
len_w--;
@ -156,7 +156,7 @@ u3_cr_mean(u3_noun som,
c3_w len_w;
struct _mean_pair* prs_m;
c3_assert(c3nne != som);
c3_assert(u3_none != som);
/* Count.
*/
@ -382,7 +382,7 @@ _mug_words_buf(c3_w off_w, c3_w nwd_w, u3_noun veb)
c3_w
u3_cr_mug(u3_noun veb)
{
c3_assert(c3nne != veb);
c3_assert(u3_none != veb);
if ( _(u3_ca_is_cat(veb)) ) {
c3_w x_w = veb;
@ -622,8 +622,8 @@ static u3_bean
_sing_x(u3_noun a,
u3_noun b)
{
c3_assert(c3nne != a);
c3_assert(c3nne != b);
c3_assert(u3_none != a);
c3_assert(u3_none != b);
if ( a == b ) {
return c3y;
@ -828,8 +828,8 @@ u3_atom
u3_cr_nord(u3_noun a,
u3_noun b)
{
c3_assert(c3nne != a);
c3_assert(c3nne != b);
c3_assert(u3_none != a);
c3_assert(u3_none != b);
if ( a == b ) {
return 1;
@ -897,7 +897,7 @@ u3_bean
u3_cr_sing_c(const c3_c* a_c,
u3_noun b)
{
c3_assert(c3nne != b);
c3_assert(u3_none != b);
if ( !_(u3_ca_is_atom(b)) ) {
return c3n;
@ -927,7 +927,7 @@ u3_cr_bush(u3_noun a,
u3_noun* b,
u3_noun* c)
{
c3_assert(c3nne != a);
c3_assert(u3_none != a);
if ( _(u3_ca_is_atom(a)) ) {
return c3n;
@ -953,7 +953,7 @@ u3_cr_cell(u3_noun a,
u3_noun* b,
u3_noun* c)
{
c3_assert(c3nne != a);
c3_assert(u3_none != a);
if ( _(u3_ca_is_atom(a)) ) {
return c3n;
@ -1143,7 +1143,7 @@ c3_w
u3_cr_met(c3_y a_y,
u3_atom b)
{
c3_assert(c3nne != b);
c3_assert(u3_none != b);
c3_assert(_(u3_ca_is_atom(b)));
if ( b == 0 ) {
@ -1206,7 +1206,7 @@ c3_b
u3_cr_bit(c3_w a_w,
u3_atom b)
{
c3_assert(c3nne != b);
c3_assert(u3_none != b);
c3_assert(_(u3_ca_is_atom(b)));
if ( _(u3_ca_is_cat(b)) ) {
@ -1239,7 +1239,7 @@ c3_y
u3_cr_byte(c3_w a_w,
u3_atom b)
{
c3_assert(c3nne != b);
c3_assert(u3_none != b);
c3_assert(_(u3_ca_is_atom(b)));
if ( _(u3_ca_is_cat(b)) ) {
@ -1276,7 +1276,7 @@ u3_cr_bytes(c3_w a_w,
{
c3_w i_w;
c3_assert(c3nne != d);
c3_assert(u3_none != d);
/* Efficiency: don't call u3_cr_byte().
*/
@ -1293,7 +1293,7 @@ void
u3_cr_mp(mpz_t a_mp,
u3_atom b)
{
c3_assert(c3nne != b);
c3_assert(u3_none != b);
c3_assert(_(u3_ca_is_atom(b)));
if ( _(u3_ca_is_cat(b)) ) {
@ -1330,7 +1330,7 @@ c3_w
u3_cr_word(c3_w a_w,
u3_atom b)
{
c3_assert(c3nne != b);
c3_assert(u3_none != b);
c3_assert(_(u3_ca_is_atom(b)));
if ( _(u3_ca_is_cat(b)) ) {
@ -1375,7 +1375,7 @@ u3_cr_words(c3_w a_w,
{
c3_w i_w;
c3_assert(c3nne != d);
c3_assert(u3_none != d);
/* Efficiency: don't call u3_cr_word().
*/
@ -1402,7 +1402,7 @@ u3_cr_chop(c3_g met_g,
c3_w len_w;
c3_w* buf_w;
c3_assert(c3nne != src);
c3_assert(u3_none != src);
c3_assert(_(u3_ca_is_atom(src)));
if ( _(u3_ca_is_cat(src)) ) {

2
g/v.c
View File

@ -105,7 +105,7 @@ u3_cv_wish(const c3_c* str_c)
exp = u3_ckdb_get(u3k(u3A->yot), u3k(txt));
if ( c3nne == exp ) {
if ( u3_none == exp ) {
exp = _cv_nock_wish(u3k(txt));
u3A->yot = u3_ckdb_put(u3A->yot, u3k(txt), u3k(exp));
}

6
g/x.c
View File

@ -4,12 +4,12 @@
*/
#include "all.h"
/* u3_cx_good(): test for c3nne.
/* u3_cx_good(): test for u3_none.
*/
u3_noun
u3_cx_good(u3_weak som)
{
if ( c3nne == som ) {
if ( u3_none == som ) {
return u3_cm_bail(c3__exit);
}
else return som;
@ -22,7 +22,7 @@ u3_cx_at(u3_noun axe, u3_noun som)
{
u3_weak pro = u3_cr_at(axe, som);
if ( c3nne == pro ) {
if ( u3_none == pro ) {
return u3_cm_bail(c3__exit);
} else return pro;
}

2
g/z.c
View File

@ -99,7 +99,7 @@ u3_cz_uniq(u3_noun som)
u3_noun key = u3nc(c3__uniq, u3k(som));
u3_noun val = u3_ch_get(u3R->cax.har_p, key);
if ( c3nne != val ) {
if ( u3_none != val ) {
u3z(key); u3z(som); return val;
}
else {

View File

@ -1,60 +0,0 @@
# u3: noun processing in C.
`u3` is the C library that makes Urbit work. If it wasn't called
`u3`, it might be called `libnoun` - it's a library for making
and storing nouns.
What's a noun? A noun is either a cell or an atom. A cell is an
ordered pair of any two nouns. An atom is an unsigned integer of
any size.
To the C programmer, this is not a terribly complicated data
structure, so why do you need a library for it?
One: nouns have a well-defined computation kernel, Nock, whose
spec fits on a page and gzips to 340 bytes. But the only
arithmetic operation in Nock is increment. So it's nontrivial
to compute both efficiently and correctly.
Two: `u3` is designed to support "permanent computing," ie, a
single-level store which is transparently checkpointed. This
implies a specialized memory-management model.
Does `u3` depend on the higher levels of Urbit, Arvo and Hoon?
Yes and no. It expects you to load something shaped like an Arvo
kernel, and use it as an event-processing function. But you
don't need to use this feature if you don't want, and your kernel
can be anything you want.
## u3: l
The best way to introduce `u3` is with a simple map of the Urbit
build directory - folding things we don't care about right now:
g/ u3 implementation
g/a.c allocation
g/e.c persistence
g/h.c hashtables
g/i.c noun construction
g/j.c jet control
g/m.c master state
g/n.c nock execution
g/r.c noun access, error returns
g/t.c tracing/profiling
g/v.c arvo kernel
g/x.c noun access, error crashes
g/z.c memoization/caching
i/ all includes
i/v Urbit systems headers
i/g u3 headers (matching filenames)
i/c c3 headers
i/c/
v/ Urbit systems code
outside/ all external bundled code
# C3: C in the Urbit environment
Urbit has two distinct - but easily confused - contexts where
we program in C. Logically, Urbit is a pure noun processing

View File

@ -34,9 +34,9 @@
*/
typedef c3_w u3_noun;
/* c3nne - out-of-band noun.
/* u3_none - out-of-band noun.
*/
# define c3nne (u3_noun)0xffffffff
# define u3_none (u3_noun)0xffffffff
/* Informative typedefs. Use if you like.
*/
@ -48,7 +48,7 @@
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 c3nne
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);

View File

@ -81,7 +81,7 @@
/* u3_ce_grab(): garbage-collect the world, plus extra roots.
*/
void
u3_ce_grab(c3_c* cap_c, u3_noun som, ...); // terminate with c3nne
u3_ce_grab(c3_c* cap_c, u3_noun som, ...); // terminate with u3_none
/* u3_ce_dirty(): count dirty pages.
*/

View File

@ -138,7 +138,7 @@
c3_l
u3_cj_find(u3_noun bat);
/* u3_cj_kick(): try to kick by jet. If no kick, produce c3nne.
/* u3_cj_kick(): try to kick by jet. If no kick, produce u3_none.
**
** `axe` is RETAINED by the caller; `cor` is RETAINED iff there
** is no kick, TRANSFERRED if one.

View File

@ -19,7 +19,7 @@
u3_cr_ud(u3_noun a);
#endif
/* u3_cr_at(): fragment `a` of `b`, or c3nne.
/* u3_cr_at(): fragment `a` of `b`, or u3_none.
*/
u3_weak
u3_cr_at(u3_atom a,

View File

@ -18,7 +18,7 @@
u3_noun
u3_cx_t(u3_noun som);
#endif
/* u3_cx_good(): test for c3nne.
/* u3_cx_good(): test for u3_none.
*/
u3_noun
u3_cx_good(u3_weak som);

View File

@ -38,7 +38,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ||
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3_cm_bail(c3__exit);

View File

@ -22,8 +22,8 @@
{
u3_noun a;
if ( c3nne == (a = u3_cr_at(u3_cv_sam, cor)) ) {
return c3nne;
if ( u3_none == (a = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_none;
} else {
return u3_cqb_drop(a);
}

View File

@ -32,7 +32,7 @@
{
u3_noun a;
if ( c3nne == (a = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (a = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__exit);
} else {
return u3_cqb_flop(a);

View File

@ -31,7 +31,7 @@
{
u3_noun a;
if ( c3nne == (a = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (a = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__exit);
} else {
return u3_cqb_lent(a);

View File

@ -24,7 +24,7 @@
{
u3_noun a;
if ( c3nne == (a = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (a = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__exit);
} else {
return u3_cqb_need(a);

View File

@ -23,7 +23,7 @@
u3_noun daz = u3_cn_slam_on(u3k(b), u3nc(gim, zor));
u3_noun vel = u3_ci_molt(u3k(b), u3_cv_sam_3, daz, 0);
if ( c3nne == vel ) {
if ( u3_none == vel ) {
return u3_cm_bail(c3__exit);
} else {
u3_noun hox = u3_cqb_roll(u3t(a), vel);

View File

@ -16,7 +16,7 @@
return a;
}
else if ( c3n == u3du(a) ) {
return c3nne;
return u3_none;
} else {
u3_noun hoz = u3_cn_slam_on(u3k(b), u3k(u3h(a)));
u3_noun vyr = u3_cqb_skip(u3t(a), b);
@ -26,7 +26,7 @@
case c3n: return u3nc(u3k(u3h(a)), vyr);
default: u3z(hoz);
u3z(vyr);
return c3nne;
return u3_none;
}
}
}
@ -37,7 +37,7 @@
u3_noun a, b;
if ( c3n == u3_cr_mean(cor, u3_cv_sam_2, &a, u3_cv_sam_3, &b, 0) ) {
return c3nne;
return u3_none;
} else {
return u3_cqb_skip(a, b);
}

View File

@ -28,7 +28,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ||
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3_cm_bail(c3__exit);

View File

@ -28,7 +28,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ||
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3_cm_bail(c3__exit);

View File

@ -35,7 +35,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ||
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3_cm_bail(c3__exit);

View File

@ -12,7 +12,7 @@
{
u3_noun sam;
if ( c3nne == (sam = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (sam = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__exit);
} else {
return u3_cr_mug(sam);

View File

@ -29,7 +29,7 @@
u3_noun qi_b = u3t(i_b);
u3_noun c;
if ( c3nne == (c = u3_cqdb_put(a, pi_b, qi_b)) ) {
if ( u3_none == (c = u3_cqdb_put(a, pi_b, qi_b)) ) {
return u3_cm_bail(c3__exit);
} else {
u3_noun d = u3_cqdb_gas(c, t_b);
@ -59,7 +59,7 @@
u3_weak c = u3_cqdb_gas(a, b);
u3z(a); u3z(b);
if ( c3nne == c ) {
if ( u3_none == c ) {
return u3_cm_bail(c3__exit);
}
else return c;

View File

@ -55,7 +55,7 @@
u3z(a); u3z(b);
if ( c3n == u3_cr_du(c) ) {
u3z(c);
return c3nne;
return u3_none;
} else {
u3_noun pro = u3k(u3t(c));
@ -68,7 +68,7 @@
{
u3_weak c = u3_ckdb_get(a, b);
if ( c3nne == c ) {
if ( u3_none == c ) {
return u3_cm_bail(c3__exit);
}
else return c;

View File

@ -55,7 +55,7 @@
u3_weak c = u3_cqdb_has(a, b);
u3z(a); u3z(b);
if ( c3nne == c ) {
if ( u3_none == c ) {
return u3_cm_bail(c3__exit);
}
else return c;

View File

@ -23,7 +23,7 @@
u3_noun t_b = u3t(b);
u3_noun c;
if ( c3nne == (c = u3_cqdi_put(a, i_b)) ) {
if ( u3_none == (c = u3_cqdi_put(a, i_b)) ) {
return u3_cm_bail(c3__exit);
} else {
u3_noun d = u3_cqdi_gas(c, t_b);
@ -52,7 +52,7 @@
u3_weak c = u3_cqdi_gas(a, b);
u3z(a); u3z(b);
if ( c3nne == c ) {
if ( u3_none == c ) {
return u3_cm_bail(c3__exit);
}
else return c;

View File

@ -49,7 +49,7 @@
u3_weak c = u3_cqdi_has(a, b);
u3z(a); u3z(b);
if ( c3nne == c ) {
if ( u3_none == c ) {
return u3_cm_bail(c3__exit);
}
else return c;

View File

@ -54,7 +54,7 @@
u3_weak c = u3_cqdi_tap(a, b);
u3z(a); u3z(b);
if ( c3nne == c ) {
if ( u3_none == c ) {
return u3_cm_bail(c3__exit);
}
else return c;

View File

@ -50,7 +50,7 @@
u3_noun x = u3_ch_get(har_p, u3k(u3t(d)));
p = u3_cqa_add(2, u3h(d));
if ( c3nne == x ) {
if ( u3_none == x ) {
return u3_cm_bail(c3__exit);
}
q = x;
@ -80,7 +80,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ) {
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqe_cue(a);

View File

@ -18,7 +18,7 @@
c3_w met_w;
u3_noun a = u3_cr_at(u3_cv_sam, cor);
if ( (c3nne == a) || (c3n == u3ud(a)) ) {
if ( (u3_none == a) || (c3n == u3ud(a)) ) {
return u3_cm_bail(c3__exit);
}

View File

@ -88,7 +88,7 @@
u3_noun c = u3_ch_get(har_p, a);
u3_noun x;
if ( c3nne == c ) {
if ( u3_none == c ) {
u3_ch_put(har_p, a, u3k(b));
if ( c3y == u3ud(a) ) {
@ -127,7 +127,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ) {
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqe_jam(a);

View File

@ -49,7 +49,7 @@
{
u3_noun lub;
if ( (c3nne == (lub = u3_cr_at(u3_cv_sam, cor))) ||
if ( (u3_none == (lub = u3_cr_at(u3_cv_sam, cor))) ||
(c3n == u3ud(lub)) )
{
return u3_cm_bail(c3__fail);

View File

@ -97,7 +97,7 @@
hav = u3_ckdb_get(u3k(loc_u->sev), u3k(how));
teg = u3nc(u3_ci_words(1, &i_w),
(hav == c3nne) ? u3_nul : hav);
(hav == u3_none) ? u3_nul : hav);
loc_u->sev = u3_ckdb_put(loc_u->sev, u3k(how), teg);
}
}
@ -244,7 +244,7 @@
u3_noun i_hel = u3h(loc_u->hel);
u3_noun guy = u3_ckdb_get(u3k(loc_u->sev), u3k(i_hel));
if ( c3nne != guy ) {
if ( u3_none != guy ) {
u3_noun gay = u3_ckb_flop(guy);
_merg(loc_u, 0, gay);
@ -286,8 +286,8 @@
{
u3_noun hel, hev;
if ( (c3nne == (hel = u3_cr_at(u3_cv_sam_2, cor))) ||
(c3nne == (hev = u3_cr_at(u3_cv_sam_3, cor))) ||
if ( (u3_none == (hel = u3_cr_at(u3_cv_sam_2, cor))) ||
(u3_none == (hev = u3_cr_at(u3_cv_sam_3, cor))) ||
(c3n == _listp(hel)) ||
(c3n == _listp(hev)) )
{

View File

@ -45,7 +45,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ) {
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqe_mat(a);

View File

@ -148,7 +148,7 @@
if ( (c3n == u3_cr_mean(cor, u3_cv_sam_2, &vex,
u3_cv_sam_3, &sab,
u3_cv_con, &van, 0)) ||
(c3nne == (raq = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (raq = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -310,7 +310,7 @@
if ( (c3n == u3_cr_mean(cor, u3_cv_sam_2, &vex,
u3_cv_sam_3, &sab,
u3_cv_con, &van, 0)) ||
(c3nne == (raq = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (raq = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -340,7 +340,7 @@
u3_noun van, huf, tub;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &tub, u3_cv_con, &van, 0)) ||
(c3nne == (huf = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (huf = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -419,7 +419,7 @@
if ( (c3n == u3_cr_mean(cor, u3_cv_sam_2, &vex,
u3_cv_sam_3, &sab,
u3_cv_con, &van, 0)) ||
(c3nne == (bus = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (bus = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -515,7 +515,7 @@
u3_noun van, daf, tub;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &tub, u3_cv_con, &van, 0)) ||
(c3nne == (daf = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (daf = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -556,7 +556,7 @@
u3_noun van, bud, tub;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &tub, u3_cv_con, &van, 0)) ||
(c3nne == (bud = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (bud = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -796,7 +796,7 @@
u3_noun van, zep, tub;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &tub, u3_cv_con, &van, 0)) ||
(c3nne == (zep = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (zep = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -944,7 +944,7 @@
u3_noun con, hel, tub;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &tub, u3_cv_con, &con, 0)) ||
(c3nne == (hel = u3_cr_at(2, con))) )
(u3_none == (hel = u3_cr_at(2, con))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -128,9 +128,9 @@
u3_noun rad;
u3_noun rep;
if ( (c3nne == (lub = u3_cr_at(u3_cv_sam_2, cor))) ||
(c3nne == (rad = u3_cr_at(u3_cv_sam_6, cor))) ||
(c3nne == (rep = u3_cr_at(u3_cv_sam_7, cor))) )
if ( (u3_none == (lub = u3_cr_at(u3_cv_sam_2, cor))) ||
(u3_none == (rad = u3_cr_at(u3_cv_sam_6, cor))) ||
(u3_none == (rep = u3_cr_at(u3_cv_sam_7, cor))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -129,8 +129,8 @@
u3_noun lub;
u3_noun rad;
if ( (c3nne == (lub = u3_cr_at(u3_cv_sam_2, cor))) ||
(c3nne == (rad = u3_cr_at(u3_cv_sam_3, cor))) )
if ( (u3_none == (lub = u3_cr_at(u3_cv_sam_2, cor))) ||
(u3_none == (rad = u3_cr_at(u3_cv_sam_3, cor))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -87,7 +87,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ||
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3_cm_bail(c3__exit);
@ -101,8 +101,8 @@
{
u3_noun a, b;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam_2, cor))) ||
(c3nne == (b = u3_cr_at(u3_cv_sam_3, cor))) ||
if ( (u3_none == (a = u3_cr_at(u3_cv_sam_2, cor))) ||
(u3_none == (b = u3_cr_at(u3_cv_sam_3, cor))) ||
(c3n == u3ud(a)) ||
(c3n == u3_ca_is_cat(a)) ||
(c3n == u3ud(b)) )
@ -118,8 +118,8 @@
{
u3_noun sal, ruz;
if ( (c3nne == (sal = u3_cr_at(u3_cv_sam_2, cor))) ||
(c3nne == (ruz = u3_cr_at(u3_cv_sam_3, cor))) ||
if ( (u3_none == (sal = u3_cr_at(u3_cv_sam_2, cor))) ||
(u3_none == (ruz = u3_cr_at(u3_cv_sam_3, cor))) ||
(c3n == u3ud(sal)) ||
(c3n == u3ud(ruz)) )
{

View File

@ -48,7 +48,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ) {
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqe_tape(a);

View File

@ -20,7 +20,7 @@
{
u3_noun a;
if ( (c3nne == (a = u3_cr_at(u3_cv_sam, cor))) ) {
if ( (u3_none == (a = u3_cr_at(u3_cv_sam, cor))) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqe_trip(a);

View File

@ -755,7 +755,7 @@
u3_nul);
}
else switch ( u3h(gen) ) {
default: return c3nne;
default: return u3_none;
case u3_nul: {
return u3nt
@ -910,7 +910,7 @@
{
u3_noun gen;
if ( c3nne == (gen = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (gen = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqfp_rake(gen);
@ -992,7 +992,7 @@
{
u3_noun voq = _ap_open_l(ter, gen);
if ( c3nne == voq ) {
if ( u3_none == voq ) {
return u3nc(c3n, u3k(gen));
}
else if ( c3y == u3_cr_sing(voq, gen) ) {
@ -1013,7 +1013,7 @@
{
u3_noun gen;
if ( c3nne == (gen = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (gen = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__fail);
} else {
u3_noun ter = u3_cr_at(u3_cv_con, cor);
@ -1047,7 +1047,7 @@
{
u3_noun pro = _open_in(ter, gen);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
} else {
return _ap_open_n(ter, gen);
@ -1065,7 +1065,7 @@
{
u3_noun gen;
if ( c3nne == (gen = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (gen = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__fail);
} else {
u3_noun ter = u3_cr_at(u3_cv_con, cor);

View File

@ -12,8 +12,8 @@
u3_noun mal,
u3_noun buz)
{
if ( (c3nne == mal) || (c3nne == buz) ) {
return c3nne;
if ( (u3_none == mal) || (u3_none == buz) ) {
return u3_none;
}
else {
u3_noun p_mal, q_mal, p_buz, q_buz, pp_buz, pq_buz;
@ -65,7 +65,7 @@
u3_noun mal, buz;
if ( c3n == u3_cr_mean(cor, u3_cv_sam_2, &mal, u3_cv_sam_3, &buz, 0) ) {
return c3nne;
return u3_none;
} else {
return u3_cqf_comb(mal, buz);
}

View File

@ -35,7 +35,7 @@
{
u3_noun hel;
if ( c3nne == (hel = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (hel = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqf_flip(hel);

View File

@ -14,7 +14,7 @@
fprintf(stderr, "slot axe %d\r\n", axe);
if ( c3nne == fag ) {
if ( u3_none == fag ) {
return u3_cm_bail(c3__exit);
}
else {

View File

@ -95,7 +95,7 @@
c3_m fun_m = c3__burn;
u3_noun pro = u3_cz_find(fun_m, sut);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {
@ -111,7 +111,7 @@
{
u3_noun sut;
if ( c3nne == (sut = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (sut = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqfu_burn(cor, sut);

View File

@ -35,7 +35,7 @@
u3_cv_con, &van,
0)) ||
(c3n == u3ud(cog)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -23,7 +23,7 @@
u3_noun wox = u3_cqfu_mint(van, sut, c3__noun, woo);
u3_noun ret = u3_cn_nock_on(yib, u3k(u3t(wox)));
if ( c3nne == ret ) {
if ( u3_none == ret ) {
return u3_cm_error("bust-nock");
}
u3z(wox);
@ -41,7 +41,7 @@
u3_noun sut, dib, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &dib, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -60,7 +60,7 @@
c3_m fun_m = c3__bust;
u3_noun pro = u3_cz_find_2(fun_m, sut, dib);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -65,7 +65,7 @@
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &got,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -236,7 +236,7 @@
u3_noun sut, ref, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &ref, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -252,7 +252,7 @@
c3_m fun_m = c3__crop;
u3_noun pro = u3_cz_find_2(fun_m, sut, ref);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -182,7 +182,7 @@
u3_cv_sam_7, &ref,
u3_cv_con, &van, 0)) ||
(c3n == u3ud(axe)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -200,7 +200,7 @@
c3_m fun_m = c3__cull;
u3_noun pro = u3_cz_find_4(fun_m, sut, pol, axe, ref);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -703,7 +703,7 @@
u3_cv_sam_7, &cog,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -722,7 +722,7 @@
c3_m fun_m = c3__fino;
u3_noun pro = u3_cz_find_4(fun_m, sut, dep, way, cog);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {
@ -746,7 +746,7 @@
u3_cv_sam_7, &cog,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -765,7 +765,7 @@
c3_m fun_m = c3__find;
u3_noun pro = u3_cz_find_4(fun_m, sut, dep, way, cog);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -59,7 +59,7 @@
u3_cv_sam_7, &cog,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -159,7 +159,7 @@
u3_noun sut, hag, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &hag, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -38,7 +38,7 @@
{
u3_noun nun = u3_cr_at(u3h(u3t(u3t(p_sut))), dib);
if ( c3nne == nun ) {
if ( u3_none == nun ) {
return c3n;
} else {
return c3a(_cqfu_firm(van, q_sut, dib),
@ -100,7 +100,7 @@
u3_noun sut, dib, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &dib, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -142,7 +142,7 @@
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &axe, u3_cv_con, &van, 0)) ||
(c3n == u3ud(axe)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -158,7 +158,7 @@
c3_m fun_m = c3__fish;
u3_noun pro = u3_cz_find_2(fun_m, sut, axe);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -175,7 +175,7 @@
u3_noun sut, ref, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &ref, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -191,7 +191,7 @@
c3_m fun_m = c3__fuse;
u3_noun pro = u3_cz_find_2(fun_m, sut, ref);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -226,7 +226,7 @@
u3_cv_con, &van,
0)) ||
(c3n == u3ud(axe)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -931,7 +931,7 @@ int FOO;
u3_cv_sam_3, &gen,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -949,7 +949,7 @@ int FOO;
u3_noun vrf = u3_cr_at(u3_cqfu_van_vrf, van);
u3_noun pro = u3_cz_find_4(fun_m, vrf, sut, gol, gen);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -840,7 +840,7 @@
u3_cv_sam_7, &gen,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -858,7 +858,7 @@
c3_m fun_m = c3__mull;
u3_noun pro = u3_cz_find_4(fun_m, sut, gol, dox, gen);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -346,7 +346,7 @@
c3_m fun_m = c3__nest;
u3_noun pro = u3_cz_find_2(fun_m, sut, ref);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {
@ -469,7 +469,7 @@
u3_cv_con, &van,
0)) ||
(c3n == u3ud(tel)) || (tel > 1) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -74,7 +74,7 @@
u3_cv_con, &van,
0)) ||
(c3n == u3ud(axe)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -173,7 +173,7 @@
u3_cv_con, &van,
0)) ||
(c3n == u3ud(axe)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -190,7 +190,7 @@
c3_m fun_m = c3__peek;
u3_noun pro = u3_cz_find_3(fun_m, sut, way, axe);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -524,7 +524,7 @@
u3_noun sut, gen, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &gen, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -68,7 +68,7 @@
{
u3_noun sut;
if ( c3nne == (sut = u3_cr_at(u3_cv_sam, cor)) ) {
if ( u3_none == (sut = u3_cr_at(u3_cv_sam, cor)) ) {
return u3_cm_bail(c3__fail);
} else {
return u3_cqfu_repo(cor, sut);

View File

@ -109,7 +109,7 @@
u3_noun sut, leg, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &leg, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -125,7 +125,7 @@
c3_m fun_m = c3__rest;
u3_noun pro = u3_cz_find_2(fun_m, sut, leg);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {

View File

@ -228,7 +228,7 @@
u3_cv_sam_3, &hyp,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {
@ -245,7 +245,7 @@
c3_m fun_m = c3__seek;
u3_noun pro = u3_cz_find_3(fun_m, sut, way, hyp);
if ( c3nne != pro ) {
if ( u3_none != pro ) {
return pro;
}
else {
@ -285,7 +285,7 @@
u3_cv_sam_3, &hyp,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -16,7 +16,7 @@
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &ref,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -42,7 +42,7 @@
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &har,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -80,7 +80,7 @@
u3_cv_sam_7, &men,
u3_cv_con, &van,
0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -63,7 +63,7 @@
u3_noun sut, yoz, van;
if ( (c3n == u3_cr_mean(cor, u3_cv_sam, &yoz, u3_cv_con, &van, 0)) ||
(c3nne == (sut = u3_cr_at(u3_cv_sam, van))) )
(u3_none == (sut = u3_cr_at(u3_cv_sam, van))) )
{
return u3_cm_bail(c3__fail);
} else {

View File

@ -821,7 +821,7 @@ _http_pox_to_noun(c3_w sev_l, c3_w coq_l, c3_w seq_l)
u3_nul));
}
/* _http_request_to_noun(): translate http request into noun, or c3nne.
/* _http_request_to_noun(): translate http request into noun, or u3_none.
*/
static u3_noun
_http_request_to_noun(u3_hreq* req_u)
@ -829,7 +829,7 @@ _http_request_to_noun(u3_hreq* req_u)
u3_noun med, url, hed, bod;
switch ( req_u->met_e ) {
default: fprintf(stderr, "strange request\r\n"); return c3nne;
default: fprintf(stderr, "strange request\r\n"); return u3_none;
case u3_hmet_put: { med = c3__put; break; }
case u3_hmet_get: { med = c3__get; break; }
case u3_hmet_post: { med = c3__post; break; }
@ -874,7 +874,7 @@ _http_request(u3_hreq* req_u)
{
u3_noun req = _http_request_to_noun(req_u);
if ( c3nne != req ) {
if ( u3_none != req ) {
u3_noun pox = _http_pox_to_noun(req_u->hon_u->htp_u->sev_l,
req_u->hon_u->coq_l,
req_u->seq_l);

View File

@ -348,7 +348,7 @@ u3_lo_open(void)
if ( (u3H->rod_u.how.fag_w & u3_cs_flag_gc) ||
(u3H->rod_u.how.fag_w & u3_cs_flag_debug) )
{
u3_ce_grab("lo_open", c3nne);
u3_ce_grab("lo_open", u3_none);
}
_lo_time();
}
@ -358,19 +358,19 @@ u3_lo_open(void)
void
u3_lo_shut(u3_bean inn)
{
// u3_ce_grab("lo_shut a", c3nne);
// u3_ce_grab("lo_shut a", u3_none);
// process actions
//
u3_raft_work();
// u3_lo_grab("lo_shut b", c3nne);
// u3_lo_grab("lo_shut b", u3_none);
// update time
//
_lo_time();
// u3_lo_grab("lo_shut c", c3nne);
// u3_lo_grab("lo_shut c", u3_none);
// for input operations, poll fs (XX not permanent)
// XX remove raty_lead guard
@ -379,14 +379,14 @@ u3_lo_shut(u3_bean inn)
u3_unix_ef_look();
}
// u3_lo_grab("lo_shut d", c3nne);
// u3_lo_grab("lo_shut d", u3_none);
// clean shutdown
//
if ( c3n == u3_Host.liv ) {
// direct save and die
//
// u3_lo_grab("lo_exit", c3nne);
// u3_lo_grab("lo_exit", u3_none);
// u3_loom_save(u3A->ent_d);
// u3_loom_exit();
u3_ct_boff();
@ -689,10 +689,10 @@ u3_lo_grab(c3_c* cap_c, u3_noun som, ...)
va_start(vap, som);
if ( som != c3nne ) {
if ( som != u3_none ) {
siz_w += u3_cm_mark_noun(som);
while ( c3nne != (tur = va_arg(vap, u3_noun)) ) {
while ( u3_none != (tur = va_arg(vap, u3_noun)) ) {
siz_w += u3_cm_mark_noun(tur);
}
}

View File

@ -333,7 +333,7 @@ main(c3_i argc,
#endif
}
// u3_ce_grab("main", c3nne);
// u3_ce_grab("main", u3_none);
u3_lo_loop();
return 0;

View File

@ -32,7 +32,7 @@ _save_time_cb(uv_timer_t* tim_u)
if ( u3A->ent_d > sav_u->ent_d ) {
// uL(fprintf(uH, "autosaving... ent_d %llu\n", u3A->ent_d));
// u3_ce_grab("save", c3nne);
// u3_ce_grab("save", u3_none);
u3_ce_save();
sav_u->ent_d = u3A->ent_d;

View File

@ -1098,7 +1098,7 @@ _sist_rest()
if ( 0 == (xno_w % 1000) ) {
uL(fprintf(uH, "{%d}\n", xno_w));
// u3_lo_grab("rest", rou, c3nne);
// u3_lo_grab("rest", rou, u3_none);
}
}
u3z(rou);
@ -1215,7 +1215,7 @@ u3_sist_boot(void)
uL(fprintf(uH, "sist: booting\n"));
if ( c3y == u3_Host.ops_u.nuu ) {
u3_noun pig = c3nne;
u3_noun pig = u3_none;
if ( 0 == u3_Host.ops_u.imp_c ) {
c3_c get_c[2049];

View File

@ -699,7 +699,7 @@ _unix_file_tame(u3_ufil* fil_u)
c3_c* pax_c = fil_u->pax_c + (fas_c-fil_u->pax_c) + 1;
if ( !fil_u->dot_c ) {
return c3nne;
return u3_none;
}
else {
c3_c* ext_c = fil_u->dot_c + 1;
@ -739,7 +739,7 @@ _unix_dir_ankh_file(u3_noun pam, u3_noun wib, u3_noun baw, u3_noun woz)
if ( c3n == u3du(wib) ) {
ole = u3_ckdb_get(u3k(pam), u3k(wib));
if ( c3nne == ole ) {
if ( u3_none == ole ) {
ole = u3_do("cosh", u3nt(0, woz, u3_nul));
} else {
u3_noun elo;
@ -757,7 +757,7 @@ _unix_dir_ankh_file(u3_noun pam, u3_noun wib, u3_noun baw, u3_noun woz)
ole = u3_ckdb_get(u3k(pam), u3k(fid));
if ( c3nne == ole ) {
if ( u3_none == ole ) {
ole = u3nt
(0, u3_nul, u3_ckdb_put(u3_nul,
u3k(har),
@ -769,7 +769,7 @@ _unix_dir_ankh_file(u3_noun pam, u3_noun wib, u3_noun baw, u3_noun woz)
u3_weak tup = u3_ckdb_get(u3k(roo), u3k(har));
u3_noun oor, elo;
if ( c3nne == tup ) {
if ( u3_none == tup ) {
tup = u3_do("cosh", u3nt(0, woz, u3_nul));
} else {
u3_noun upt;
@ -813,7 +813,7 @@ _unix_dir_ankh(u3_udir* dir_u)
for ( fil_u = dir_u->par_u->fil_u; fil_u; fil_u = fil_u->nex_u ) {
// uL(fprintf(uH, "top %s\n", fil_u->pax_c));
u3_noun wib = _unix_file_tame(fil_u);
if ( c3nne == wib ) continue;
if ( u3_none == wib ) continue;
u3_noun dur = _unix_dir_name(dir_u);
if ( c3n == u3_cr_sing(dur, u3h(wib)) ) { // wrong desk
u3z(wib); u3z(dur);
@ -849,12 +849,12 @@ _find_mug(u3_noun som, c3_l mug_l)
u3_weak pro;
if ( _(u3du(som)) ) {
if ( (pro = _find_mug(u3h(som), mug_l)) != c3nne ) {
if ( (pro = _find_mug(u3h(som), mug_l)) != u3_none ) {
return pro;
}
else return _find_mug(u3t(som), mug_l);
}
else return c3nne;
else return u3_none;
}
}
#endif

View File

@ -207,7 +207,7 @@ _walk_in(const c3_c* dir_c, c3_w len_w)
dat = u3_cke_cue(dat);
}
hax = u3_do("sham", u3k(dat));
if ( c3nne == get ) { get = u3_nul; }
if ( u3_none == get ) { get = u3_nul; }
get = u3_ckdb_put(get, ext, u3nt(c3y, hax, dat));
map = u3_ckdb_put(map, nam, u3nc(c3n, get));