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

Function xmlTextWriterWriteComment

ThirdParty/libxml2/vtklibxml2/xmlwriter.c:916–937  ·  view source on GitHub ↗

* xmlTextWriterWriteComment: * @writer: the xmlTextWriterPtr * @content: comment string * * Write an xml comment. * * Returns the bytes written (may be 0 because of buffering) or -1 in case of error */

Source from the content-addressed store, hash-verified

914 * Returns the bytes written (may be 0 because of buffering) or -1 in case of error
915 */
916int
917xmlTextWriterWriteComment(xmlTextWriterPtr writer, const xmlChar * content)
918{
919 int count;
920 int sum;
921
922 sum = 0;
923 count = xmlTextWriterStartComment(writer);
924 if (count < 0)
925 return -1;
926 sum += count;
927 count = xmlTextWriterWriteString(writer, content);
928 if (count < 0)
929 return -1;
930 sum += count;
931 count = xmlTextWriterEndComment(writer);
932 if (count < 0)
933 return -1;
934 sum += count;
935
936 return sum;
937}
938
939/**
940 * xmlTextWriterStartElement:

Callers 1

Calls 3

xmlTextWriterWriteStringFunction · 0.85
xmlTextWriterEndCommentFunction · 0.85

Tested by

no test coverage detected