* xmlDebugDumpString: * @output: the FILE * for the output * @str: the string * * Dumps information about the string, shorten it if necessary */
| 1328 | * Dumps information about the string, shorten it if necessary |
| 1329 | */ |
| 1330 | void |
| 1331 | xmlDebugDumpString(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: |
no test coverage detected