Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals  

include/gimp-print/mxml.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>

Go to the source code of this file.

Data Structures

struct  stp_mxml_attr_s
struct  stp_mxml_node_s
struct  stp_mxml_text_s
struct  stp_mxml_value_s
union  stp_mxml_value_u

Defines

#define STP_MXML_WRAP   70
#define STP_MXML_TAB   8
#define STP_MXML_NO_CALLBACK   0
#define STP_MXML_NO_PARENT   0
#define STP_MXML_DESCEND   1
#define STP_MXML_NO_DESCEND   0
#define STP_MXML_DESCEND_FIRST   -1
#define STP_MXML_WS_BEFORE_OPEN   0
#define STP_MXML_WS_AFTER_OPEN   1
#define STP_MXML_WS_BEFORE_CLOSE   2
#define STP_MXML_WS_AFTER_CLOSE   3
#define STP_MXML_ADD_BEFORE   0
#define STP_MXML_ADD_AFTER   1
#define STP_MXML_ADD_TO_PARENT   NULL

Typedefs

typedef enum stp_mxml_type_e stp_mxml_type_t
typedef stp_mxml_attr_s stp_mxml_attr_t
typedef stp_mxml_value_s stp_mxml_element_t
typedef stp_mxml_text_s stp_mxml_text_t
typedef stp_mxml_value_u stp_mxml_value_t
typedef stp_mxml_node_s stp_mxml_node_t

Enumerations

enum  stp_mxml_type_e {
  STP_MXML_ELEMENT, STP_MXML_INTEGER, STP_MXML_OPAQUE, STP_MXML_REAL,
  STP_MXML_TEXT
}

Functions

void stp_mxmlAdd (stp_mxml_node_t *parent, int where, stp_mxml_node_t *child, stp_mxml_node_t *node)
void stp_mxmlDelete (stp_mxml_node_t *node)
const char * stp_mxmlElementGetAttr (stp_mxml_node_t *node, const char *name)
void stp_mxmlElementSetAttr (stp_mxml_node_t *node, const char *name, const char *value)
stp_mxml_node_tstp_mxmlFindElement (stp_mxml_node_t *node, stp_mxml_node_t *top, const char *name, const char *attr, const char *value, int descend)
stp_mxml_node_tstp_mxmlLoadFile (stp_mxml_node_t *top, FILE *fp, stp_mxml_type_t(*cb)(stp_mxml_node_t *))
stp_mxml_node_tstp_mxmlLoadString (stp_mxml_node_t *top, const char *s, stp_mxml_type_t(*cb)(stp_mxml_node_t *))
stp_mxml_node_tstp_mxmlNewElement (stp_mxml_node_t *parent, const char *name)
stp_mxml_node_tstp_mxmlNewInteger (stp_mxml_node_t *parent, int integer)
stp_mxml_node_tstp_mxmlNewOpaque (stp_mxml_node_t *parent, const char *opaque)
stp_mxml_node_tstp_mxmlNewReal (stp_mxml_node_t *parent, double real)
stp_mxml_node_tstp_mxmlNewText (stp_mxml_node_t *parent, int whitespace, const char *string)
void stp_mxmlRemove (stp_mxml_node_t *node)
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))
stp_mxml_node_tstp_mxmlWalkNext (stp_mxml_node_t *node, stp_mxml_node_t *top, int descend)
stp_mxml_node_tstp_mxmlWalkPrev (stp_mxml_node_t *node, stp_mxml_node_t *top, int descend)


Define Documentation

#define STP_MXML_ADD_AFTER   1
 

Definition at line 57 of file mxml.h.

Referenced by mxml_new(), stp_mxmlAdd(), stp_xmltree_create_from_curve(), and xmldoc_create_from_curve().

#define STP_MXML_ADD_BEFORE   0
 

Definition at line 56 of file mxml.h.

Referenced by stp_mxmlAdd().

#define STP_MXML_ADD_TO_PARENT   NULL
 

Definition at line 58 of file mxml.h.

Referenced by mxml_new().

#define STP_MXML_DESCEND   1
 

Definition at line 47 of file mxml.h.

Referenced by stp_array_create_from_xmltree(), stp_curve_create_from_xmltree(), stp_mxmlFindElement(), stp_xml_get_node(), and stpi_dither_array_create_from_xmltree().

#define STP_MXML_DESCEND_FIRST   -1
 

Definition at line 49 of file mxml.h.

#define STP_MXML_NO_CALLBACK   0
 

Definition at line 44 of file mxml.h.

Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_curve_create_from_string(), stp_xml_parse_file(), and stpi_dither_array_create_from_file().

#define STP_MXML_NO_DESCEND   0
 

Definition at line 48 of file mxml.h.

#define STP_MXML_NO_PARENT   0
 

Definition at line 45 of file mxml.h.

#define STP_MXML_TAB   8
 

Definition at line 42 of file mxml.h.

Referenced by mxml_write_ws().

#define STP_MXML_WRAP   70
 

Definition at line 41 of file mxml.h.

Referenced by mxml_write_node().

#define STP_MXML_WS_AFTER_CLOSE   3
 

Definition at line 54 of file mxml.h.

Referenced by curve_whitespace_callback(), and mxml_write_node().

#define STP_MXML_WS_AFTER_OPEN   1
 

Definition at line 52 of file mxml.h.

Referenced by curve_whitespace_callback(), and mxml_write_node().

#define STP_MXML_WS_BEFORE_CLOSE   2
 

Definition at line 53 of file mxml.h.

Referenced by curve_whitespace_callback(), and mxml_write_node().

#define STP_MXML_WS_BEFORE_OPEN   0
 

Definition at line 51 of file mxml.h.

Referenced by curve_whitespace_callback(), and mxml_write_node().


Typedef Documentation

typedef struct stp_mxml_attr_s stp_mxml_attr_t
 

typedef struct stp_mxml_value_s stp_mxml_element_t
 

typedef struct stp_mxml_node_s stp_mxml_node_t
 

Definition at line 102 of file mxml.h.

typedef struct stp_mxml_text_s stp_mxml_text_t
 

typedef enum stp_mxml_type_e stp_mxml_type_t
 

Referenced by mxml_load_data(), mxml_new(), stp_mxmlLoadFile(), and stp_mxmlLoadString().

typedef union stp_mxml_value_u stp_mxml_value_t
 


Enumeration Type Documentation

enum stp_mxml_type_e
 

Enumeration values:
STP_MXML_ELEMENT 
STP_MXML_INTEGER 
STP_MXML_OPAQUE 
STP_MXML_REAL 
STP_MXML_TEXT 

Definition at line 65 of file mxml.h.


Function Documentation

void stp_mxmlAdd stp_mxml_node_t   parent,
int    where,
stp_mxml_node_t   child,
stp_mxml_node_t   node
 

Definition at line 58 of file mxml-node.c.

References stp_mxml_node_s::child, stp_mxml_node_s::last_child, stp_mxml_node_s::next, stp_mxml_node_s::parent, stp_mxml_node_s::prev, STP_MXML_ADD_AFTER, STP_MXML_ADD_BEFORE, and stp_mxmlRemove().

Referenced by mxml_new(), stp_xmltree_create_from_curve(), and xmldoc_create_from_curve().

void stp_mxmlDelete stp_mxml_node_t   node
 

Definition at line 168 of file mxml-node.c.

References stp_mxml_value_s::attrs, stp_mxml_node_s::child, stp_mxml_value_u::element, stp_mxml_value_s::name, stp_mxml_attr_s::name, stp_mxml_value_s::num_attrs, stp_mxml_value_u::opaque, STP_MXML_ELEMENT, STP_MXML_INTEGER, STP_MXML_OPAQUE, STP_MXML_REAL, STP_MXML_TEXT, stp_mxmlRemove(), stp_mxml_text_s::string, stp_mxml_value_u::text, stp_mxml_node_s::type, stp_mxml_node_s::value, and stp_mxml_attr_s::value.

Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_curve_create_from_string(), stp_curve_write(), stp_curve_write_string(), stp_xml_parse_file(), stp_xmltree_create_from_curve(), stp_xmltree_create_from_sequence(), stpi_dither_array_create_from_file(), and xmldoc_create_from_curve().

const char* stp_mxmlElementGetAttr stp_mxml_node_t   node,
const char *    name
 

Definition at line 40 of file mxml-attr.c.

References stp_mxml_value_s::attrs, stp_mxml_value_u::element, stp_mxml_attr_s::name, stp_mxml_value_s::num_attrs, STP_MXML_ELEMENT, stp_mxml_node_s::type, stp_mxml_node_s::value, and stp_mxml_attr_s::value.

Referenced by curve_whitespace_callback(), stp_array_create_from_xmltree(), stp_curve_create_from_xmltree(), stp_mxmlFindElement(), stp_printer_create_from_xmltree(), stp_sequence_create_from_xmltree(), stp_xml_process_dither_matrix(), stp_xml_process_paper(), stpi_dither_array_create_from_xmltree(), and stpi_xml_process_family().

void stp_mxmlElementSetAttr stp_mxml_node_t   node,
const char *    name,
const char *    value
 

Definition at line 82 of file mxml-attr.c.

References stp_mxml_value_s::attrs, stp_mxml_value_u::element, stp_mxml_attr_s::name, stp_mxml_value_s::name, stp_mxml_value_s::num_attrs, STP_MXML_ELEMENT, stp_mxml_node_s::type, stp_mxml_node_s::value, and stp_mxml_attr_s::value.

Referenced by mxml_parse_element(), stp_xmldoc_create_generic(), stp_xmltree_create_from_curve(), and stp_xmltree_create_from_sequence().

stp_mxml_node_t* stp_mxmlFindElement stp_mxml_node_t   node,
stp_mxml_node_t   top,
const char *    name,
const char *    attr,
const char *    value,
int    descend
 

Definition at line 48 of file mxml-search.c.

References stp_mxml_value_u::element, stp_mxml_value_s::name, stp_mxml_node_s::next, STP_MXML_DESCEND, STP_MXML_ELEMENT, stp_mxmlElementGetAttr(), stp_mxmlWalkNext(), stp_mxml_node_s::type, and stp_mxml_node_s::value.

Referenced by stp_array_create_from_xmltree(), stp_curve_create_from_xmltree(), stp_xml_get_node(), and stpi_dither_array_create_from_xmltree().

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().

stp_mxml_node_t* stp_mxmlNewElement stp_mxml_node_t   parent,
const char *    name
 

Definition at line 251 of file mxml-node.c.

References stp_mxml_value_u::element, mxml_new(), stp_mxml_value_s::name, STP_MXML_ELEMENT, and stp_mxml_node_s::value.

Referenced by mxml_load_data(), stp_xmldoc_create_generic(), stp_xmltree_create_from_curve(), and stp_xmltree_create_from_sequence().

stp_mxml_node_t* stp_mxmlNewInteger stp_mxml_node_t   parent,
int    integer
 

Definition at line 284 of file mxml-node.c.

References stp_mxml_value_u::integer, mxml_new(), STP_MXML_INTEGER, and stp_mxml_node_s::value.

Referenced by mxml_load_data().

stp_mxml_node_t* stp_mxmlNewOpaque stp_mxml_node_t   parent,
const char *    opaque
 

Definition at line 318 of file mxml-node.c.

References mxml_new(), stp_mxml_value_u::opaque, STP_MXML_OPAQUE, and stp_mxml_node_s::value.

Referenced by mxml_load_data().

stp_mxml_node_t* stp_mxmlNewReal stp_mxml_node_t   parent,
double    real
 

Definition at line 351 of file mxml-node.c.

References mxml_new(), stp_mxml_value_u::real, STP_MXML_REAL, and stp_mxml_node_s::value.

Referenced by mxml_load_data().

stp_mxml_node_t* stp_mxmlNewText stp_mxml_node_t   parent,
int    whitespace,
const char *    string
 

Definition at line 386 of file mxml-node.c.

References mxml_new(), STP_MXML_TEXT, stp_mxml_text_s::string, stp_mxml_value_u::text, stp_mxml_node_s::value, and stp_mxml_text_s::whitespace.

Referenced by mxml_load_data(), and stp_xmltree_create_from_sequence().

void stp_mxmlRemove stp_mxml_node_t   node
 

Definition at line 422 of file mxml-node.c.

References stp_mxml_node_s::child, stp_mxml_node_s::last_child, stp_mxml_node_s::next, stp_mxml_node_s::parent, and stp_mxml_node_s::prev.

Referenced by stp_mxmlAdd(), and stp_mxmlDelete().

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().

stp_mxml_node_t* stp_mxmlWalkNext stp_mxml_node_t   node,
stp_mxml_node_t   top,
int    descend
 

Definition at line 130 of file mxml-search.c.

References stp_mxml_node_s::child, stp_mxml_node_s::next, and stp_mxml_node_s::parent.

Referenced by stp_mxmlFindElement().

stp_mxml_node_t* stp_mxmlWalkPrev stp_mxml_node_t   node,
stp_mxml_node_t   top,
int    descend
 

Definition at line 166 of file mxml-search.c.

References stp_mxml_node_s::last_child, stp_mxml_node_s::parent, and stp_mxml_node_s::prev.


Generated on Wed May 12 20:21:35 2004 for libgimpprint API Reference by doxygen1.2.17