MCPcopy Create free account
hub / github.com/F-Stack/f-stack / xo_xml_leader_len

Function xo_xml_leader_len

tools/libxo/libxo/libxo.c:564–572  ·  view source on GitHub ↗

* For XML, the first character of a tag cannot be numeric, but people * will likely not notice. So we people-proof them by forcing a leading * underscore if they use invalid tags. Note that this doesn't cover * all broken tags, just this fairly specific case. */

Source from the content-addressed store, hash-verified

562 * all broken tags, just this fairly specific case.
563 */
564static const char *
565xo_xml_leader_len (xo_handle_t *xop, const char *name, xo_ssize_t nlen)
566{
567 if (name == NULL || isalpha(name[0]) || name[0] == '_')
568 return "";
569
570 xo_failure(xop, "invalid XML tag name: '%.*s'", nlen, name);
571 return "_";
572}
573
574static const char *
575xo_xml_leader (xo_handle_t *xop, const char *name)

Callers 2

xo_xml_leaderFunction · 0.85
xo_format_valueFunction · 0.85

Calls 2

isalphaFunction · 0.85
xo_failureFunction · 0.85

Tested by

no test coverage detected