urbit/j/f/ut.c

86 lines
1.8 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
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
2014-11-06 22:13:57 +03:00
u3qfu_duck(
2014-09-06 00:13:24 +04:00
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
2014-11-06 22:13:57 +03:00
u3qfu_dung(
2014-09-06 00:13:24 +04:00
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
2014-11-06 22:13:57 +03:00
u3qfu_dunq(
2014-09-06 00:13:24 +04:00
u3_noun van,
2014-09-04 01:33:18 +04:00
const c3_c* paz_c,
2014-09-06 00:13:24 +04:00
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;
}
// shew: create a show core for mean
//
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 22:13:57 +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
2014-11-06 22:13:57 +03:00
u3qfu_shep(
2014-09-06 00:13:24 +04:00
u3_noun van,
2014-09-04 01:33:18 +04:00
const c3_c* paz_c,
2014-09-06 00:13:24 +04:00
u3_noun sty,
u3_noun mol)
2013-09-29 00:21:18 +04:00
{
2014-11-06 22:13:57 +03:00
return u3qfu_shew
2014-08-21 01:18:34 +04:00
(van,
2014-09-06 00:13:24 +04:00
u3nc
2014-11-06 03:20:01 +03:00
(u3nc('c', u3i_string(paz_c)),
2014-09-06 00:13:24 +04:00
u3nc(u3k(sty), mol)));
2013-09-29 00:21:18 +04:00
}