libgimpprint API Reference: mxml-file.c File Reference

Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

# src/main/mxml-file.c File Reference

`#include <gimp-print/mxml.h>`
`#include "config.h"`

Go to the source code of this file.

## Functions
int | mxml_add_char (int ch, char **ptr, char **buffer, int *bufsize)
int | mxml_file_getc (void *p)
int | mxml_file_putc (int ch, void *p)
stp_mxml_node_t * | mxml_load_data (stp_mxml_node_t *top, void *p, stp_mxml_type_t(*cb)(stp_mxml_node_t *), int(*getc_cb)(void *))
int | mxml_parse_element (stp_mxml_node_t *node, void *p, int(*getc_cb)(void *))
int | mxml_string_getc (void *p)
int | mxml_string_putc (int ch, void *p)
int | mxml_write_node (stp_mxml_node_t *node, void *p, int(*cb)(stp_mxml_node_t *, int), int col, int(*putc_cb)(int, void *))
int | mxml_write_string (const char *s, void *p, int(*putc_cb)(int, void *))
int | mxml_write_ws (stp_mxml_node_t *node, void *p, int(*cb)(stp_mxml_node_t *, int), int ws, int col, int(*putc_cb)(int, void *))
stp_mxml_node_t * | stp_mxmlLoadFile (stp_mxml_node_t *top, FILE *fp, stp_mxml_type_t(*cb)(stp_mxml_node_t *))
stp_mxml_node_t * | stp_mxmlLoadString (stp_mxml_node_t *top, const char *s, stp_mxml_type_t(*cb)(stp_mxml_node_t *))
char * | stp_mxmlSaveAllocString (stp_mxml_node_t *node, int(*cb)(stp_mxml_node_t *, int))
int | stp_mxmlSaveFile (stp_mxml_node_t *node, FILE *fp, int(*cb)(stp_mxml_node_t *, int))
int | stp_mxmlSaveString (stp_mxml_node_t *node, char *buffer, int bufsize, int(*cb)(stp_mxml_node_t *, int))

## Function Documentation

int mxml_add_char | ( | int | ch,
|  | char ** | ptr,
|  | char ** | buffer,
|  | int * | bufsize
| ) | `[static]`

| Definition at line 260 of file mxml-file.c. Referenced by mxml_load_data(), and mxml_parse_element().

int mxml_file_getc | ( | void * | p | ) | `[static]`

| Definition at line 304 of file mxml-file.c. Referenced by stp_mxmlLoadFile().

int mxml_file_putc | ( | int | ch,
|  | void * | p
| ) | `[static]`

| Definition at line 315 of file mxml-file.c. Referenced by stp_mxmlSaveFile().

stp_mxml_node_t * mxml_load_data | ( | stp_mxml_node_t * | top,
|  | void * | p,
|  | stp_mxml_type_t(* | cb)(stp_mxml_node_t *),
|  | int(* | getc_cb)(void *)
| ) | `[static]`

| Definition at line 327 of file mxml-file.c. References stp_mxml_value_u::element, mxml_add_char(), mxml_parse_element(), stp_mxml_value_s::name, stp_mxml_node_s::parent, STP_MXML_INTEGER, stp_mxml_node_t, STP_MXML_OPAQUE, STP_MXML_REAL, STP_MXML_TEXT, stp_mxml_type_t, stp_mxmlNewElement(), stp_mxmlNewInteger(), stp_mxmlNewOpaque(), stp_mxmlNewReal(), stp_mxmlNewText(), and stp_mxml_node_s::value. Referenced by stp_mxmlLoadFile(), and stp_mxmlLoadString().

int mxml_parse_element | ( | stp_mxml_node_t * | node,
|  | void * | p,
|  | int(* | getc_cb)(void *)
| ) | `[static]`

| Definition at line 808 of file mxml-file.c. References stp_mxml_value_u::element, mxml_add_char(), stp_mxml_value_s::name, stp_mxmlElementSetAttr(), and stp_mxml_node_s::value. Referenced by mxml_load_data().

int mxml_string_getc | ( | void * | p | ) | `[static]`

| Definition at line 1009 of file mxml-file.c. Referenced by stp_mxmlLoadString().

int mxml_string_putc | ( | int | ch,
|  | void * | p
| ) | `[static]`

| Definition at line 1032 of file mxml-file.c. Referenced by stp_mxmlSaveString().

int mxml_write_node | ( | stp_mxml_node_t * | node,
|  | void * | p,
|  | int(* | cb)(stp_mxml_node_t *, int),
|  | int | col,
|  | int(* | putc_cb)(int, void *)
| ) | `[static]`

| Definition at line 1054 of file mxml-file.c. References stp_mxml_value_s::attrs, stp_mxml_node_s::child, stp_mxml_value_u::element, stp_mxml_value_u::integer, mxml_write_string(), mxml_write_ws(), stp_mxml_attr_s::name, stp_mxml_value_s::name, stp_mxml_node_s::next, stp_mxml_value_s::num_attrs, stp_mxml_value_u::opaque, stp_mxml_node_s::prev, stp_mxml_value_u::real, stp_mxml_attr_t, STP_MXML_ELEMENT, STP_MXML_INTEGER, STP_MXML_OPAQUE, STP_MXML_REAL, STP_MXML_TEXT, STP_MXML_WRAP, STP_MXML_WS_AFTER_CLOSE, STP_MXML_WS_AFTER_OPEN, STP_MXML_WS_BEFORE_CLOSE, STP_MXML_WS_BEFORE_OPEN, stp_mxml_text_s::string, stp_mxml_value_u::text, stp_mxml_node_s::type, stp_mxml_attr_s::value, stp_mxml_node_s::value, and stp_mxml_text_s::whitespace. Referenced by stp_mxmlSaveFile(), and stp_mxmlSaveString().

int mxml_write_string | ( | const char * | s,
|  | void * | p,
|  | int(* | putc_cb)(int, void *)
| ) | `[static]`

| Definition at line 1277 of file mxml-file.c. Referenced by mxml_write_node().

int mxml_write_ws | ( | stp_mxml_node_t * | node,
|  | void * | p,
|  | int(* | cb)(stp_mxml_node_t *, int),
|  | int | ws,
|  | int | col,
|  | int(* | putc_cb)(int, void *)
| ) | `[static]`

| Definition at line 1403 of file mxml-file.c. References STP_MXML_TAB. Referenced by mxml_write_node().

stp_mxml_node_t* stp_mxmlLoadFile | ( | stp_mxml_node_t * | top,
|  | FILE * | fp,
|  | stp_mxml_type_t(* | cb)(stp_mxml_node_t *)
| ) |

| Definition at line 81 of file mxml-file.c. References mxml_file_getc(), mxml_load_data(), and stp_mxml_type_t. Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_xml_parse_file(), and stpi_dither_array_create_from_file().

stp_mxml_node_t* stp_mxmlLoadString | ( | stp_mxml_node_t * | top,
|  | const char * | s,
|  | stp_mxml_type_t(* | cb)(stp_mxml_node_t *)
| ) |

| Definition at line 102 of file mxml-file.c. References mxml_load_data(), mxml_string_getc(), and stp_mxml_type_t. Referenced by stp_curve_create_from_string().

char* stp_mxmlSaveAllocString | ( | stp_mxml_node_t * | node,
|  | int(* | cb)(stp_mxml_node_t *, int)
| ) |

| Definition at line 122 of file mxml-file.c. References stp_mxmlSaveString(). Referenced by stp_curve_write_string().

int stp_mxmlSaveFile | ( | stp_mxml_node_t * | node,
|  | FILE * | fp,
|  | int(* | cb)(stp_mxml_node_t *, int)
| ) |

| Definition at line 179 of file mxml-file.c. References mxml_file_putc(), and mxml_write_node(). Referenced by stp_curve_write().

int stp_mxmlSaveString | ( | stp_mxml_node_t * | node,
|  | char * | buffer,
|  | int | bufsize,
|  | int(* | cb)(stp_mxml_node_t *, int)
| ) |

| Definition at line 215 of file mxml-file.c. References mxml_string_putc(), and mxml_write_node(). Referenced by stp_mxmlSaveAllocString().