An Atombuf is an alternative to Binbufs for temporary storage of atoms.
More...
|
struct | t_atombuf |
| The atombuf struct provides a way to pass a collection of atoms. More...
|
|
An Atombuf is an alternative to Binbufs for temporary storage of atoms.
Its principal advantage is that the internal structure is publicly available so you can manipulate the atoms in place. The standard Max text objects (message box, object box, comment) use the Atombuf structure to store their text (each word of text is stored as a t_symbol or a number).
Use atombuf_new() to create a new Atombuf from an array of t_atoms.
- Parameters
-
argc | Number of t_atoms in the argv array. May be 0. |
argv | Array of t_atoms. If creating an empty Atombuf, you may pass 0. |
- Returns
- atombuf_new() create a new t_atombuf and returns a pointer to it. If 0 is returned, insufficient memory was available.
void atombuf_text |
( |
t_atombuf ** |
x, |
|
|
char ** |
text, |
|
|
long |
size |
|
) |
| |
Use atombuf_text() to convert text to a t_atom array in a t_atombuf.
To use this routine to create a new Atombuf from the text buffer, first create a new empty t_atombuf with a call to atombuf_new(0,NULL).
- Parameters
-
x | Pointer to existing atombuf variable. The variable will be replaced by a new Atombuf containing the converted text. |
text | Handle to the text to be converted. It need not be zero-terminated. |
size | Number of characters in the text. |