urbit/include/g/x.h

60 lines
1.3 KiB
C
Raw Normal View History

2014-09-04 07:44:53 +04:00
/* include/g/x.h
**
** This file is in the public domain.
*/
2014-09-06 00:13:24 +04:00
/** u3_cx_*: read, but bail with c3__exit on a crash.
2014-09-04 07:44:53 +04:00
**/
#if 1
2014-09-06 00:13:24 +04:00
# define u3_cx_h(som) u3_co_h(som)
# define u3_cx_t(som) u3_co_t(som)
2014-09-04 07:44:53 +04:00
#else
2014-09-06 00:13:24 +04:00
/* u3_cx_h (u3h): head.
2014-09-04 07:44:53 +04:00
*/
2014-09-06 00:13:24 +04:00
u3_noun
u3_cx_h(u3_noun som);
2014-09-04 07:44:53 +04:00
2014-09-06 00:13:24 +04:00
/* u3_cx_t (u3t): tail.
2014-09-04 07:44:53 +04:00
*/
2014-09-06 00:13:24 +04:00
u3_noun
u3_cx_t(u3_noun som);
2014-09-04 07:44:53 +04:00
#endif
2014-09-06 00:13:24 +04:00
/* u3_cx_good(): test for u3_none.
2014-09-04 07:44:53 +04:00
*/
2014-09-06 00:13:24 +04:00
u3_noun
u3_cx_good(u3_weak som);
2014-09-04 07:44:53 +04:00
2014-09-06 00:13:24 +04:00
/* u3_cx_at (u3at): fragment.
2014-09-04 07:44:53 +04:00
*/
2014-09-06 00:13:24 +04:00
u3_noun
u3_cx_at(u3_noun axe, u3_noun som);
2014-09-04 07:44:53 +04:00
2014-09-06 00:13:24 +04:00
/* u3_cx_cell():
2014-09-04 07:44:53 +04:00
**
** Divide `a` as a cell `[b c]`.
*/
void
2014-09-06 00:13:24 +04:00
u3_cx_cell(u3_noun a,
u3_noun* b,
u3_noun* c);
2014-09-04 07:44:53 +04:00
2014-09-06 00:13:24 +04:00
/* u3_cx_trel():
2014-09-04 07:44:53 +04:00
**
** Divide `a` as a trel `[b c d]`, or bail.
*/
void
2014-09-06 00:13:24 +04:00
u3_cx_trel(u3_noun a,
u3_noun* b,
u3_noun* c,
u3_noun* d);
2014-09-04 07:44:53 +04:00
2014-09-06 00:13:24 +04:00
/* u3_cx_qual():
2014-09-04 07:44:53 +04:00
**
** Divide `a` as a quadruple `[b c d e]`.
*/
void
2014-09-06 00:13:24 +04:00
u3_cx_qual(u3_noun a,
u3_noun* b,
u3_noun* c,
u3_noun* d,
u3_noun* e);