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

Function xmlBufAddLen

ThirdParty/libxml2/vtklibxml2/buf.c:528–539  ·  view source on GitHub ↗

* xmlBufAddLen: * @buf: the buffer * @len: the size which were added at the end * * Sometime data may be added at the end of the buffer without * using the xmlBuf APIs that is used to expand the used space * and set the zero terminating at the end of the buffer * * Returns -1 in case of error and 0 otherwise */

Source from the content-addressed store, hash-verified

526 * Returns -1 in case of error and 0 otherwise
527 */
528int
529xmlBufAddLen(xmlBufPtr buf, size_t len) {
530 if ((buf == NULL) || (buf->error))
531 return(-1);
532 CHECK_COMPAT(buf)
533 if (len >= (buf->size - buf->use))
534 return(-1);
535 buf->use += len;
536 buf->content[buf->use] = 0;
537 UPDATE_COMPAT(buf)
538 return(0);
539}
540
541/**
542 * xmlBufLength:

Callers 4

xmlCharEncInputFunction · 0.85
xmlCharEncOutputFunction · 0.85
xmlParserInputBufferGrowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected