main-apidocs-libatomvm-src-atom-dot-c.md
Include dependency graph for atom.c:
digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "1" [label="/__w/AtomVM/AtomVM/src/libAtomVM/atom.c" tooltip="/__w/AtomVM/AtomVM/src/libAtomVM/atom.c" fillcolor="#BFBFBF"] "2" [label="atom.h" tooltip="atom.h"] "7" [label="utils.h" tooltip="utils.h"] "8" [label="inttypes.h" tooltip="inttypes.h"] "9" [label="stdbool.h" tooltip="stdbool.h"] "10" [label="stddef.h" tooltip="stddef.h"] "3" [label="stdint.h" tooltip="stdint.h"] "5" [label="stdio.h" tooltip="stdio.h"] "4" [label="stdlib.h" tooltip="stdlib.h"] "6" [label="string.h" tooltip="string.h"] "1" -> "2" [dir=forward tooltip="include"] "1" -> "5" [dir=forward tooltip="include"] "1" -> "4" [dir=forward tooltip="include"] "1" -> "6" [dir=forward tooltip="include"] "1" -> "7" [dir=forward tooltip="include"] "2" -> "3" [dir=forward tooltip="include"] "2" -> "4" [dir=forward tooltip="include"] "7" -> "8" [dir=forward tooltip="include"] "7" -> "9" [dir=forward tooltip="include"] "7" -> "10" [dir=forward tooltip="include"] "7" -> "5" [dir=forward tooltip="include"] "7" -> "4" [dir=forward tooltip="include"] }
Functions
void atom_string_to_c(AtomString atom_string, char *buf, size_t bufsize)
Gets a C string from an AtomString.
Copies the atom string data to a buffer and makes it null terminated.
Parameters:
atom_string – that will be converted to a C string.
buf – the buffer where the C string will be written.
bufsize – available buf size.
int atom_are_equals(AtomString a, AtomString b)
Check for equality two AtomStrings.
Returns 1 if two atom strings are equal, 0 otherwise. This function doesn’t behave like strcmp.
Parameters:
a – first atom string to be compared.
b – second atom string to be compared.
Returns:
1 if they are equals, 0 otherwise.
static void utoa10(unsigned int int_value, char *integer_string)
void atom_write_mfa(char *buf, size_t buf_size, size_t module_name_len, const void *module_data, size_t function_name_len, const void *function_data, unsigned int arity)
Write module:function/arity to the supplied buffer.
Write module:function/arity to the supplied buffer. This function will abort if the written module, function, and arity are longer than the supplied buffer size.
Parameters:
buf – the buffer to write into
buf_size – the amount of room in the buffer
module_name_len – length of the module name
module_data – the module name
function_name_len – length of the function name
function_data – the function name
arity – the function arity