|
YATL
|
Functions for loading, saving, and managing TOML documents. More...
Functions | |
| YATL_Doc_t | YATL_doc_create (void) |
| Create an initialized document. | |
| YATL_Result_t | YATL_doc_load (YATL_Doc_t *doc, const char *path) |
| Load a TOML document from a file. | |
| YATL_Result_t | YATL_doc_loads (YATL_Doc_t *doc, const char *str, size_t len) |
| Load a TOML document from a string. | |
| YATL_Result_t | YATL_doc_save (YATL_Doc_t *doc, const char *path) |
| Save a document to a file. | |
| void | YATL_doc_free (YATL_Doc_t *doc) |
| Free document resources. | |
| YATL_Result_t | YATL_doc_clear_boneyard (YATL_Doc_t *doc) |
| Clear the document boneyard. | |
Functions for loading, saving, and managing TOML documents.
| YATL_Result_t YATL_doc_clear_boneyard | ( | YATL_Doc_t * | doc | ) |
Clear the document boneyard.
Frees all lines in the boneyard (lines removed during editing that are kept for potential rollback).
| doc | Pointer to document |
| YATL_Doc_t YATL_doc_create | ( | void | ) |
Create an initialized document.
| void YATL_doc_free | ( | YATL_Doc_t * | doc | ) |
Free document resources.
Releases all memory associated with the document, including active lines and boneyard lines.
| doc | Pointer to document to free |
| YATL_Result_t YATL_doc_load | ( | YATL_Doc_t * | doc, |
| const char * | path ) |
Load a TOML document from a file.
Reads and parses a TOML file into the document structure.
| doc | Pointer to initialized document |
| path | Path to the TOML file |
| YATL_Result_t YATL_doc_loads | ( | YATL_Doc_t * | doc, |
| const char * | str, | ||
| size_t | len ) |
Load a TOML document from a string.
Parses a TOML string into the document structure. The document must be initialized first.
| doc | Pointer to initialized document |
| str | TOML content string |
| len | Length of the string in bytes |
| YATL_Result_t YATL_doc_save | ( | YATL_Doc_t * | doc, |
| const char * | path ) |
Save a document to a file.
Writes the document content to a file, preserving formatting.
| doc | Pointer to document |
| path | Path to output file |