shrub/jets/f/ut.c

101 lines
2.1 KiB
C
Raw Normal View History

2013-09-29 00:21:18 +04:00
/* j/6/ut.c
**
*/
#include "all.h"
2014-09-04 07:10:43 +04:00
extern void
2017-09-28 03:40:12 +03:00
u3_pier_tank(c3_l tab_l, u3_noun tac);
2013-09-29 00:21:18 +04:00
2013-12-05 02:30:09 +04:00
// duck: create a duck core for mean.
//
2014-09-06 00:13:24 +04:00
u3_noun
2015-08-28 19:34:36 +03:00
u3qfu_duck(u3_noun van,
u3_noun typ)
2013-12-05 02:30:09 +04:00
{
2014-11-18 00:56:51 +03:00
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(typ), 0);
2014-11-06 03:20:01 +03:00
u3_noun ret = u3j_hook(u3k(von), "dune");
2013-12-05 02:30:09 +04:00
2014-09-06 00:13:24 +04:00
u3z(von);
2013-12-05 02:30:09 +04:00
return ret;
}
// dung: create a dunk core for mean (noun caption)
//
2014-09-06 00:13:24 +04:00
u3_noun
2015-08-28 19:34:36 +03:00
u3qfu_dung(u3_noun van,
u3_noun paz,
u3_noun typ)
2013-12-05 02:30:09 +04:00
{
2014-11-18 00:56:51 +03:00
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(typ), 0);
2014-11-06 03:20:01 +03:00
u3_noun duq = u3j_hook(u3k(von), "dunk");
2014-11-18 00:56:51 +03:00
u3_noun ret = u3i_molt(u3k(duq), u3x_sam, u3k(paz), 0);
2013-12-05 02:30:09 +04:00
2014-09-06 00:13:24 +04:00
u3z(duq);
u3z(von);
2013-12-05 02:30:09 +04:00
return ret;
}
2013-09-29 00:21:18 +04:00
// dunq: create a dunk core for mean
//
2014-09-06 00:13:24 +04:00
u3_noun
2015-08-28 19:34:36 +03:00
u3qfu_dunq(u3_noun van,
const c3_c* paz_c,
u3_noun typ)
2013-09-29 00:21:18 +04:00
{
2014-11-18 00:56:51 +03:00
u3_noun von = u3i_molt(u3k(van), u3x_sam, u3k(typ), 0);
2014-11-06 03:20:01 +03:00
u3_noun duq = u3j_hook(u3k(von), "dunk");
u3_noun paz = u3i_string(paz_c);
2014-11-18 00:56:51 +03:00
u3_noun ret = u3i_molt(u3k(duq), u3x_sam, u3k(paz), 0);
2014-08-21 01:18:34 +04:00
2014-09-06 00:13:24 +04:00
u3z(paz);
u3z(duq);
u3z(von);
2013-09-29 00:21:18 +04:00
return ret;
}
// dump: dump a type.
//
void
u3qfu_dump(u3_noun van,
const c3_c* paz_c,
u3_noun typ)
{
c3_c* pfix_c = u3r_string((c3y == u3du(typ)) ? u3h(typ) : typ);
c3_c ugh_c[1024];
sprintf(ugh_c, "%s: %s: 0x%8x:",
paz_c, pfix_c, u3r_mug(typ));
2017-09-28 03:40:12 +03:00
#if 0
u3_pier_tank(0, u3n_kick_on(u3qfu_dunq(van, ugh_c, typ)));
#endif
}
2013-09-29 00:21:18 +04:00
// shew: create a show core for mean
//
2014-09-06 00:13:24 +04:00
u3_noun
2015-08-28 19:34:36 +03:00
u3qfu_shew(u3_noun van,
u3_noun mol)
2013-09-29 00:21:18 +04:00
{
2014-11-06 03:20:01 +03:00
u3_noun sho = u3j_hook(u3k(van), "show");
2014-11-18 00:56:51 +03:00
u3_noun ret = u3i_molt(u3k(sho), u3x_sam, u3k(mol), 0);
2014-09-06 00:13:24 +04:00
u3z(sho);
u3z(mol);
2013-09-29 00:21:18 +04:00
return ret;
}
// shep: show with caption and style
//
2014-09-06 00:13:24 +04:00
u3_noun
2015-08-28 19:34:36 +03:00
u3qfu_shep(u3_noun van,
const c3_c* paz_c,
u3_noun sty,
u3_noun mol)
2013-09-29 00:21:18 +04:00
{
2015-08-28 19:34:36 +03:00
return u3qfu_shew(van,
u3nc(u3nc('c', u3i_string(paz_c)),
u3nc(u3k(sty), mol)));
2013-09-29 00:21:18 +04:00
}