pcb 4.1.1
An interactive printed circuit board layout editor.

xmlout.h File Reference

#include <stdio.h>
Include dependency graph for xmlout.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  s_xmlout

Defines

#define XPUTS   fputs
#define XPRINTF   fprintf
#define XNEWLINE   indent[xmlout.count]
#define XOUT_DETENT()   if(xmlout.count) xmlout.count--
#define XOUT_INDENT()   xmlout.count++
#define XOUT_ELEMENT_2ATTR_START(name, id1, val1, id2, val2)   XPRINTF(xmlout.fd, "<%s %s=\"%s\" %s=\"%s\">", name, id1, val1, id2, val2);
#define XOUT_ELEMENT_ATTR_START(name, id, val)   XPRINTF(xmlout.fd, "<%s %s=\"%s\">", name, id, val);
#define XOUT_ELEMENT_START(name)   XPRINTF(xmlout.fd, "<%s>", name);
#define XOUT_ELEMENT_END(name)   XPRINTF(xmlout.fd, "</%s>", name);
#define XOUT_ELEMENT_EMPTY(name)   XPRINTF(xmlout.fd, "<%s/>", name)
#define XOUT_ELEMENT_ATTR_EMPTY(name, id, val)   XPRINTF(xmlout.fd, "<%s %s=\"%s\"/>", name, id, val)
#define XOUT_ELEMENT_DATA(data)   XPRINTF(xmlout.fd, "%s", data)
#define XOUT_NEWLINE()   XPUTS( XNEWLINE, xmlout.fd)
#define XOUT_ELEMENT(name, data)
#define XOUT_ELEMENT_ATTR(name, id, val, data)
#define XOUT_HEADER()   XPRINTF(xmlout.fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
#define XOUT_INIT(filename)
#define XOUT_CLOSE()

Variables

struct s_xmlout xmlout
char * indent []

Define Documentation

#define XNEWLINE   indent[xmlout.count]

Definition at line 30 of file xmlout.h.

#define XOUT_CLOSE ( )
Value:
xmlout.count=0;\
                fclose(xmlout.fd); \
                xmlout.fd = NULL

Definition at line 65 of file xmlout.h.

Referenced by gsvit_xml_out().

#define XOUT_DETENT ( )    if(xmlout.count) xmlout.count--
#define XOUT_ELEMENT (   name,
  data 
)
#define XOUT_ELEMENT_2ATTR_START (   name,
  id1,
  val1,
  id2,
  val2 
)    XPRINTF(xmlout.fd, "<%s %s=\"%s\" %s=\"%s\">", name, id1, val1, id2, val2);

Definition at line 36 of file xmlout.h.

#define XOUT_ELEMENT_ATTR (   name,
  id,
  val,
  data 
)
Value:

Definition at line 56 of file xmlout.h.

Referenced by gsvit_write_xspace().

#define XOUT_ELEMENT_ATTR_EMPTY (   name,
  id,
  val 
)    XPRINTF(xmlout.fd, "<%s %s=\"%s\"/>", name, id, val)

Definition at line 46 of file xmlout.h.

#define XOUT_ELEMENT_ATTR_START (   name,
  id,
  val 
)    XPRINTF(xmlout.fd, "<%s %s=\"%s\">", name, id, val);

Definition at line 38 of file xmlout.h.

Referenced by gsvit_write_xcentroids(), gsvit_write_xdrills(), and gsvit_write_xnets().

#define XOUT_ELEMENT_DATA (   data)    XPRINTF(xmlout.fd, "%s", data)

Definition at line 48 of file xmlout.h.

Referenced by gsvit_write_xdrills(), and gsvit_write_xnets().

#define XOUT_ELEMENT_EMPTY (   name)    XPRINTF(xmlout.fd, "<%s/>", name)

Definition at line 44 of file xmlout.h.

#define XOUT_ELEMENT_END (   name)    XPRINTF(xmlout.fd, "</%s>", name);
#define XOUT_ELEMENT_START (   name)    XPRINTF(xmlout.fd, "<%s>", name);
#define XOUT_HEADER ( )    XPRINTF(xmlout.fd, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>");

Definition at line 60 of file xmlout.h.

Referenced by gsvit_xml_out().

#define XOUT_INDENT ( )    xmlout.count++
#define XOUT_INIT (   filename)
Value:
xmlout.count=0;\
                xmlout.fd = fopen(filename, "w")

Definition at line 62 of file xmlout.h.

Referenced by gsvit_xml_out().

#define XOUT_NEWLINE ( )    XPUTS( XNEWLINE, xmlout.fd)
#define XPRINTF   fprintf

Definition at line 28 of file xmlout.h.

#define XPUTS   fputs

Definition at line 26 of file xmlout.h.


Variable Documentation

char* indent[]
Initial value:
{
  "\n",
  "\n\t",
  "\n\t\t",
  "\n\t\t\t",
  "\n\t\t\t\t",
  "\n\t\t\t\t\t",
  "\n\t\t\t\t\t\t",
  "\n\t\t\t\t\t\t\t"
}

Definition at line 14 of file xmlout.h.

struct s_xmlout xmlout

Definition at line 12 of file xmlout.h.