urbit/include/noun/imprison.h

95 lines
2.1 KiB
C
Raw Normal View History

2014-11-08 01:54:59 +03:00
/* include/n/i.h
2014-09-04 07:44:53 +04:00
**
** This file is in the public domain.
*/
/* General constructors.
*/
2014-11-06 03:20:01 +03:00
/* u3i_words():
2014-09-04 07:44:53 +04:00
**
** Copy [a] words from [b] into an atom.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_words(c3_w a_w,
2014-09-04 07:44:53 +04:00
const c3_w* b_w);
2014-11-06 03:20:01 +03:00
/* u3i_bytes():
2014-09-04 07:44:53 +04:00
**
** Copy `a` bytes from `b` to an LSB first atom.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_bytes(c3_w a_w,
2014-09-04 07:44:53 +04:00
const c3_y* b_y);
2014-11-06 03:20:01 +03:00
/* u3i_mp():
2014-09-04 07:44:53 +04:00
**
** Copy the GMP integer `a` into an atom, and clear it.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_mp(mpz_t a_mp);
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3i_vint():
2014-09-04 07:44:53 +04:00
**
** Create `a + 1`.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_vint(u3_noun a);
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3i_cell():
2014-09-04 07:44:53 +04:00
**
** Produce the cell `[a b]`.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_cell(u3_noun a, u3_noun b);
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3i_trel():
2014-09-04 07:44:53 +04:00
**
** Produce the triple `[a b c]`.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_trel(u3_noun a, u3_noun b, u3_noun c);
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3i_qual():
2014-09-04 07:44:53 +04:00
**
** Produce the cell `[a b c d]`.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_qual(u3_noun a, u3_noun b, u3_noun c, u3_noun d);
2014-09-04 07:44:53 +04:00
2018-06-26 21:49:15 +03:00
/* u3i_edit():
**
** Mutate `big` at axis `axe` with new value `som`
** `axe` is RETAINED.
*/
u3_noun
u3i_edit(u3_noun big, u3_noun axe, u3_noun som);
2014-11-06 03:20:01 +03:00
/* u3i_string():
2014-09-04 07:44:53 +04:00
**
** Produce an LSB-first atom from the C string `a`.
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_string(const c3_c* a_c);
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3i_molt():
2014-09-04 07:44:53 +04:00
**
** Mutate `som` with a 0-terminated list of axis, noun pairs.
** Axes must be cats (31 bit).
*/
2014-09-06 00:13:24 +04:00
u3_noun
2014-11-06 03:20:01 +03:00
u3i_molt(u3_noun som, ...);
2014-09-04 07:44:53 +04:00
2014-11-06 03:20:01 +03:00
/* u3i_chubs():
2014-09-04 07:44:53 +04:00
**
** Construct `a` double-words from `b`, LSD first, as an atom.
*/
2014-09-06 00:13:24 +04:00
u3_atom
2014-11-06 03:20:01 +03:00
u3i_chubs(c3_w a_w,
2014-09-04 07:44:53 +04:00
const c3_d* b_d);
2014-11-06 03:20:01 +03:00
/* u3i_tape(): from a C string, to a list of bytes.
2014-09-04 07:44:53 +04:00
*/
2014-09-06 00:13:24 +04:00
u3_atom
2014-11-06 03:20:01 +03:00
u3i_tape(const c3_c* txt_c);
2014-09-04 07:44:53 +04:00