shrub/g/t.c

45 lines
638 B
C
Raw Normal View History

2014-09-11 04:01:32 +04:00
/* g/t.c
2014-09-05 23:55:16 +04:00
**
** This file is in the public domain.
*/
#include "all.h"
2014-09-06 00:13:24 +04:00
/* u3_ct_push(): push on trace stack.
2014-09-05 23:55:16 +04:00
*/
void
2014-09-06 00:13:24 +04:00
u3_ct_push(u3_noun mon)
2014-09-05 23:55:16 +04:00
{
2014-09-06 00:13:24 +04:00
u3R->bug.tax = u3nc(mon, u3R->bug.tax);
2014-09-05 23:55:16 +04:00
}
2014-09-06 00:13:24 +04:00
/* u3_ct_mean(): push `[%mean roc]` on trace stack.
2014-09-05 23:55:16 +04:00
*/
void
2014-09-06 00:13:24 +04:00
u3_ct_mean(u3_noun roc)
2014-09-05 23:55:16 +04:00
{
2014-09-06 00:13:24 +04:00
u3R->bug.tax = u3nc(u3nc(c3__mean, roc), u3R->bug.tax);
2014-09-05 23:55:16 +04:00
}
2014-09-06 00:13:24 +04:00
/* u3_ct_drop(): drop from meaning stack.
2014-09-05 23:55:16 +04:00
*/
void
2014-09-06 00:13:24 +04:00
u3_ct_drop(void)
2014-09-05 23:55:16 +04:00
{
2014-09-06 00:13:24 +04:00
c3_assert(u3_so(u3du(u3R->bug.tax)));
2014-09-05 23:55:16 +04:00
{
2014-09-06 00:13:24 +04:00
u3_noun tax = u3R->bug.tax;
2014-09-05 23:55:16 +04:00
2014-09-06 00:13:24 +04:00
u3R->bug.tax = u3k(u3t(tax));
u3z(tax);
2014-09-05 23:55:16 +04:00
}
}
2014-09-06 00:13:24 +04:00
/* u3_ct_slog(): print directly.
2014-09-05 23:55:16 +04:00
*/
void
2014-09-06 00:13:24 +04:00
u3_ct_slog(u3_noun hod)
2014-09-05 23:55:16 +04:00
{
2014-09-12 22:32:11 +04:00
u3_cm_p("&", hod);
2014-09-06 00:13:24 +04:00
u3z(hod);
2014-09-05 23:55:16 +04:00
}