Graphviz 13.0.0~dev.20250424.1043
Loading...
Searching...
No Matches
xml.h File Reference

XML escaping functionality. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xml_flags_t
 options to tweak the behavior of XML escaping More...
 

Macros

#define UTIL_API   /* nothing */
 

Functions

UTIL_API int gv_xml_escape (const char *s, xml_flags_t flags, int(*cb)(void *state, const char *s), void *state)
 

Macro Definition Documentation

◆ UTIL_API

#define UTIL_API   /* nothing */

hide the symbols this header declares by default

The expectation is that, while other libraries may not want to call gv_xml_escape, they may end up linking against it in order to use other libutil functionality. They almost certainly do not want to re-export gv_xml_escape.

This annotation is only correct while the containing library is built statically. If it were built as a shared library, gv_xml_escape would need to have default visibility (and thus be unavoidably re-exported) in order to be callable.

Definition at line 21 of file xml.h.

Function Documentation

◆ gv_xml_escape()

UTIL_API int gv_xml_escape ( const char *  s,
xml_flags_t  flags,
int(*)(void *state, const char *s cb,
void *  state 
)

XML-escape a string

Parameters
sSource string to process.
flagsOptions of how to configure escaping.
cbAn fputs analogue for emitting escaped output.
stateCaller-defined data to pass to cb.
Returns
The first negative value cb returns or the last return value of cb.

Definition at line 178 of file xml.c.

References flags, and xml_core().

Referenced by EmbedText(), gvputs_xml(), pango_textlayout(), svg_begin_anchor(), svg_textspan(), xml_puts(), xml_puts(), xml_url_puts(), and xml_url_puts().

Here is the call graph for this function:
Here is the caller graph for this function: