MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlDebugDumpString

Function xmlDebugDumpString

ThirdParty/libxml2/vtklibxml2/debugXML.c:1330–1351  ·  view source on GitHub ↗

* xmlDebugDumpString: * @output: the FILE * for the output * @str: the string * * Dumps information about the string, shorten it if necessary */

Source from the content-addressed store, hash-verified

1328 * Dumps information about the string, shorten it if necessary
1329 */
1330void
1331xmlDebugDumpString(FILE * output, const xmlChar * str)
1332{
1333 int i;
1334
1335 if (output == NULL)
1336 output = stdout;
1337 if (str == NULL) {
1338 fprintf(output, "(NULL)");
1339 return;
1340 }
1341 for (i = 0; i < 40; i++)
1342 if (str[i] == 0)
1343 return;
1344 else if (IS_BLANK_CH(str[i]))
1345 fputc(' ', output);
1346 else if (str[i] >= 0x80)
1347 fprintf(output, "#%X", str[i]);
1348 else
1349 fputc(str[i], output);
1350 fprintf(output, "...");
1351}
1352
1353/**
1354 * xmlDebugDumpAttr:

Callers 2

xmlXPathDebugDumpObjectFunction · 0.85
xmlLsOneNodeFunction · 0.85

Calls 1

fprintfFunction · 0.85

Tested by

no test coverage detected