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

src/main/xml.c File Reference

#include <gimp-print/gimp-print.h>
#include "gimp-print-internal.h"
#include <gimp-print/gimp-print-intl-internal.h>
#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <errno.h>
#include <stdarg.h>

Go to the source code of this file.

Data Structures

struct  stpi_xml_parse_registry

Functions

const char * xml_registry_namefunc (const void *item)
void xml_registry_freefunc (void *item)
const char * xml_preload_namefunc (const void *item)
void xml_preload_freefunc (void *item)
void stp_register_xml_parser (const char *name, stp_xml_parse_func parse_func)
void stp_unregister_xml_parser (const char *name)
void stp_register_xml_preload (const char *filename)
void stp_unregister_xml_preload (const char *name)
void stpi_xml_process_gimpprint (stp_mxml_node_t *gimpprint, const char *file)
void stp_xml_preinit (void)
void stp_xml_init (void)
void stp_xml_exit (void)
void stp_xml_parse_file_named (const char *name)
int stp_xml_init_defaults (void)
int stp_xml_parse_file (const char *file)
long stp_xmlstrtol (const char *textval)
unsigned long stp_xmlstrtoul (const char *textval)
double stp_xmlstrtod (const char *textval)
stp_mxml_node_tstp_xml_get_node (stp_mxml_node_t *xmlroot,...)
void stpi_xml_process_node (stp_mxml_node_t *node, const char *file)
stp_mxml_node_tstp_xmldoc_create_generic (void)

Variables

stp_list_tstpi_xml_registry
stp_list_tstpi_xml_preloads
char * saved_lc_collate
char * saved_lc_ctype
char * saved_lc_numeric
int xml_is_initialised


Function Documentation

void stp_register_xml_parser const char *    name,
stp_xml_parse_func    parse_func
 

Definition at line 84 of file xml.c.

References stpi_xml_parse_registry::name, stpi_xml_parse_registry::parse_func, stp_list_get_item_by_name(), stp_list_item_create(), stp_list_item_get_data(), stp_malloc(), stp_strdup(), and stp_xml_parse_func.

Referenced by stpi_init_dither(), stpi_init_paper(), and stpi_init_printer().

void stp_register_xml_preload const char *    filename
 

Definition at line 108 of file xml.c.

References stp_list_get_item_by_name(), stp_list_item_create(), and stp_strdup().

Referenced by stpi_init_printer().

void stp_unregister_xml_parser const char *    name
 

Definition at line 100 of file xml.c.

References stp_list_get_item_by_name(), and stp_list_item_destroy().

void stp_unregister_xml_preload const char *    name
 

Definition at line 119 of file xml.c.

References stp_list_get_item_by_name(), and stp_list_item_destroy().

void stp_xml_exit void   
 

Definition at line 176 of file xml.c.

References saved_lc_collate, saved_lc_ctype, saved_lc_numeric, and xml_is_initialised.

Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_curve_create_from_string(), stp_curve_create_from_xmltree(), stp_curve_write(), stp_curve_write_string(), stp_xml_dither_cache_set(), stp_xml_init_defaults(), stp_xml_parse_file(), stp_xmltree_create_from_curve(), and stpi_dither_array_create_from_file().

stp_mxml_node_t* stp_xml_get_node stp_mxml_node_t   xmlroot,
...   
 

Definition at line 350 of file xml.c.

References STP_MXML_DESCEND, and stp_mxmlFindElement().

Referenced by xml_doc_get_curve(), and xml_doc_get_dither_array().

void stp_xml_init void   
 

Definition at line 155 of file xml.c.

References saved_lc_collate, saved_lc_ctype, saved_lc_numeric, and xml_is_initialised.

Referenced by stp_curve_create_from_file(), stp_curve_create_from_stream(), stp_curve_create_from_string(), stp_curve_create_from_xmltree(), stp_curve_write(), stp_curve_write_string(), stp_xml_dither_cache_set(), stp_xml_init_defaults(), stp_xml_parse_file(), stp_xmltree_create_from_curve(), and stpi_dither_array_create_from_file().

int stp_xml_init_defaults void   
 

Definition at line 225 of file xml.c.

References STP_DBG_XML, stp_deprintf(), stp_list_destroy(), stp_list_get_start(), stp_list_item_get_data(), stp_list_item_next(), stp_xml_exit(), stp_xml_init(), and stp_xml_parse_file_named().

Referenced by stp_init().

int stp_xml_parse_file const char *    file
 

Definition at line 252 of file xml.c.

References stp_mxml_node_s::child, stp_mxml_value_u::element, stp_mxml_value_s::name, stp_mxml_node_s::next, STP_DBG_XML, stp_deprintf(), stp_erprintf(), STP_MXML_ELEMENT, STP_MXML_NO_CALLBACK, stp_mxmlDelete(), stp_mxmlLoadFile(), stp_xml_exit(), stp_xml_init(), stpi_xml_process_gimpprint(), stp_mxml_node_s::type, and stp_mxml_node_s::value.

Referenced by stp_xml_parse_file_named().

void stp_xml_parse_file_named const char *    name
 

Definition at line 194 of file xml.c.

References STP_DBG_XML, stp_deprintf(), stp_list_create(), stp_list_destroy(), stp_list_get_start(), stp_list_item_get_data(), stp_list_item_next(), stp_list_set_freefunc(), stp_path_search(), stp_path_split(), and stp_xml_parse_file().

Referenced by check_paperlist(), stp_xml_get_dither_array(), and stp_xml_init_defaults().

void stp_xml_preinit void   
 

Definition at line 135 of file xml.c.

References stp_list_create(), stp_list_set_freefunc(), stp_list_set_namefunc(), xml_preload_freefunc(), xml_preload_namefunc(), xml_registry_freefunc(), and xml_registry_namefunc().

Referenced by stp_init().

stp_mxml_node_t* stp_xmldoc_create_generic void   
 

Definition at line 405 of file xml.c.

References stp_mxmlElementSetAttr(), and stp_mxmlNewElement().

Referenced by xmldoc_create_from_curve().

double stp_xmlstrtod const char *    textval
 

Definition at line 333 of file xml.c.

Referenced by stp_curve_create_from_xmltree(), and stp_sequence_create_from_xmltree().

long stp_xmlstrtol const char *    textval
 

Definition at line 309 of file xml.c.

Referenced by stp_printer_create_from_xmltree(), stp_sequence_create_from_xmltree(), and stp_xml_process_dither_matrix().

unsigned long stp_xmlstrtoul const char *    textval
 

Definition at line 321 of file xml.c.

Referenced by stp_sequence_create_from_xmltree(), stp_xml_process_paper(), and stpi_dither_array_create_from_xmltree().

void stpi_xml_process_gimpprint stp_mxml_node_t   gimpprint,
const char *    file
[static]
 

Definition at line 387 of file xml.c.

References stp_mxml_node_s::child, stp_mxml_node_s::next, STP_MXML_ELEMENT, stpi_xml_process_node(), and stp_mxml_node_s::type.

Referenced by stp_xml_parse_file().

void stpi_xml_process_node stp_mxml_node_t   node,
const char *    file
[static]
 

Definition at line 371 of file xml.c.

References stp_mxml_value_u::element, stp_mxml_value_s::name, stpi_xml_parse_registry::parse_func, stp_list_get_item_by_name(), stp_list_item_get_data(), and stp_mxml_node_s::value.

Referenced by stpi_xml_process_gimpprint().

void xml_preload_freefunc void *    item [static]
 

Definition at line 78 of file xml.c.

References stp_free().

Referenced by stp_xml_preinit().

const char* xml_preload_namefunc const void *    item [static]
 

Definition at line 72 of file xml.c.

Referenced by stp_xml_preinit().

void xml_registry_freefunc void *    item [static]
 

Definition at line 64 of file xml.c.

References stpi_xml_parse_registry::name, and stp_free().

Referenced by stp_xml_preinit().

const char* xml_registry_namefunc const void *    item [static]
 

Definition at line 57 of file xml.c.

References stpi_xml_parse_registry::name.

Referenced by stp_xml_preinit().


Variable Documentation

char* saved_lc_collate [static]
 

Definition at line 129 of file xml.c.

Referenced by stp_xml_exit(), and stp_xml_init().

char* saved_lc_ctype [static]
 

Definition at line 130 of file xml.c.

Referenced by stp_xml_exit(), and stp_xml_init().

char* saved_lc_numeric [static]
 

Definition at line 131 of file xml.c.

Referenced by stp_xml_exit(), and stp_xml_init().

stp_list_t* stpi_xml_preloads [static]
 

Definition at line 54 of file xml.c.

stp_list_t* stpi_xml_registry [static]
 

Definition at line 52 of file xml.c.

int xml_is_initialised [static]
 

Definition at line 132 of file xml.c.

Referenced by stp_xml_exit(), and stp_xml_init().


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