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

Function xmlSBufAddChar

ThirdParty/libxml2/vtklibxml2/parser.c:790–813  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

788}
789
790static void
791xmlSBufAddChar(xmlSBuf *buf, int c) {
792 xmlChar *end;
793
794 if (buf->max - buf->size < 4) {
795 if (buf->code == XML_ERR_OK)
796 buf->code = XML_ERR_RESOURCE_LIMIT;
797 return;
798 }
799
800 if (buf->cap - buf->size <= 4) {
801 if (xmlSBufGrow(buf, 4) < 0)
802 return;
803 }
804
805 end = buf->mem + buf->size;
806
807 if (c < 0x80) {
808 *end = (xmlChar) c;
809 buf->size += 1;
810 } else {
811 buf->size += xmlCopyCharMultiByte(end, c);
812 }
813}
814
815static void
816xmlSBufAddReplChar(xmlSBuf *buf) {

Callers 3

xmlParseAttValueInternalFunction · 0.85

Calls 2

xmlSBufGrowFunction · 0.85
xmlCopyCharMultiByteFunction · 0.85

Tested by

no test coverage detected