minor clean-up: dawn.c->down.c, -sqar.c

This commit is contained in:
Anton Dyudin 2015-06-05 15:21:25 -07:00
parent 5098c77517
commit d91068cf52
5 changed files with 10 additions and 60 deletions

View File

@ -264,8 +264,7 @@ J_F_OFILES_UT=\
j/f/ut_wrap.o
J_G_OFILES=\
j/g/dawn.o \
j/g/sqar.o
j/g/down.o
J_OFILES=\
$(J_A_OFILES) \

View File

@ -205,5 +205,4 @@
/** Tier 7.
**/
u3_noun u3wg_dawn(u3_noun);
u3_noun u3wg_sqar(u3_noun);
u3_noun u3wg_down(u3_noun);

View File

@ -1,4 +1,4 @@
/* j/g/dawn.c
/* j/g/down.c
**
*/
#include "all.h"
@ -198,7 +198,7 @@ u3_noun node_to_noun(cmark_node * nod)
/* functions
*/
u3_noun
u3qg_dawn(u3_atom a)
u3qg_down(u3_atom a)
{
c3_c *tex = u3r_string(a);
@ -212,7 +212,7 @@ u3_noun node_to_noun(cmark_node * nod)
return res;
}
u3_noun
u3wg_dawn(u3_noun cor)
u3wg_down(u3_noun cor)
{
u3_noun a;
@ -221,6 +221,6 @@ u3_noun node_to_noun(cmark_node * nod)
{
return u3m_bail(c3__exit);
} else {
return u3qg_dawn(a);
return u3qg_down(a);
}
}

View File

@ -1,33 +0,0 @@
/* j/1/sqgr.c
**
*/
#include "all.h"
/* functions
*/
u3_noun
u3qg_sqar(u3_atom a)
{
mpz_t a_mp;
fprintf(stderr, "C squared %d!\r\n", a);
u3r_mp(a_mp, a);
mpz_mul(a_mp, a_mp, a_mp);
return u3i_mp(a_mp);
}
u3_noun
u3wg_sqar(u3_noun cor)
{
u3_noun a;
if ( (u3_none == (a = u3r_at(u3x_sam, cor))) ||
(c3n == u3ud(a)) )
{
return u3m_bail(c3__exit);
} else {
return u3qg_sqar(a);
}
}

View File

@ -345,29 +345,14 @@ static u3j_harm _mood__hoon__al_a[] =
};
#endif
static u3j_harm _util_sqar_a[] = {{".2", u3wg_sqar, c3y}, {}};
static u3j_core _util_d[] =
{ { "sqar", _util_sqar_a },
static u3j_harm _down_mark_a[] = {{".2", u3wg_down, c3y}, {}};
static u3j_core _down_d[] =
{ { "mark", _down_mark_a },
{}
};
static u3j_harm _utyl_dawn_a[] = {{".2", u3wg_dawn, c3y}, {}};
static u3j_core _utyl_d[] =
{
{ "dawn", _utyl_dawn_a },
{}
};
#if 0
static u3j_core _zuse_d[] =
{ { "util", 0, _util_d },
{}
};
#endif
static u3j_core _arvo_d[] =
{ { "util", 0, _util_d },
{ "utyl", 0, _utyl_d },
{ { "down", 0, _down_d },
{}
};