Functions | |
long int | cucul_import_memory (cucul_canvas_t *, void const *, unsigned long int, char const *) |
Import a memory buffer into a canvas. | |
long int | cucul_import_file (cucul_canvas_t *, char const *, char const *) |
Import a file into a canvas. | |
char const *const * | cucul_get_import_list (void) |
Get available import formats. | |
void * | cucul_export_memory (cucul_canvas_t *, char const *, unsigned long int *) |
Export a canvas into a foreign format. | |
char const *const * | cucul_get_export_list (void) |
Get available export formats. |
|
Import a memory buffer into the given libcucul canvas's current frame. The current frame is resized accordingly and its contents are replaced with the imported data.
Valid values for
The number of bytes read is returned. If the file format is valid, but not enough data was available, 0 is returned. If an error occurs, -1 is returned and errno is set accordingly:
|
|
Import a file into the given libcucul canvas's current frame. The current frame is resized accordingly and its contents are replaced with the imported data.
Valid values for
The number of bytes read is returned. If the file format is valid, but not enough data was available, 0 is returned. If an error occurs, -1 is returned and errno is set accordingly:
|
|
Return a list of available import formats. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the import format, to be used with cucul_import_canvas(), and a string containing the natural language description for that import format. This function never fails.
|
|
This function exports a libcucul canvas into various foreign formats such as ANSI art, HTML, IRC colours, etc. The returned pointer should be passed to free() to release the allocated storage when it is no longer needed.
Valid values for
If an error occurs, NULL is returned and errno is set accordingly:
|
|
Return a list of available export formats. The list is a NULL-terminated array of strings, interleaving a string containing the internal value for the export format, to be used with cucul_export_memory(), and a string containing the natural language description for that export format. This function never fails.
|