12e724bc9Sbluhm /* Interface to some helper routines used to accumulate and check text 233ab7b2bSbluhm and attribute content. 32e724bc9Sbluhm __ __ _ 42e724bc9Sbluhm ___\ \/ /_ __ __ _| |_ 52e724bc9Sbluhm / _ \\ /| '_ \ / _` | __| 62e724bc9Sbluhm | __// \| |_) | (_| | |_ 72e724bc9Sbluhm \___/_/\_\ .__/ \__,_|\__| 82e724bc9Sbluhm |_| XML parser 92e724bc9Sbluhm 10*08819b41Sbluhm Copyright (c) 2002-2004 Fred L. Drake, Jr. <fdrake@users.sourceforge.net> 11*08819b41Sbluhm Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk> 12*08819b41Sbluhm Copyright (c) 2017 Sebastian Pipping <sebastian@pipping.org> 132e724bc9Sbluhm Licensed under the MIT license: 142e724bc9Sbluhm 152e724bc9Sbluhm Permission is hereby granted, free of charge, to any person obtaining 162e724bc9Sbluhm a copy of this software and associated documentation files (the 172e724bc9Sbluhm "Software"), to deal in the Software without restriction, including 182e724bc9Sbluhm without limitation the rights to use, copy, modify, merge, publish, 192e724bc9Sbluhm distribute, sublicense, and/or sell copies of the Software, and to permit 202e724bc9Sbluhm persons to whom the Software is furnished to do so, subject to the 212e724bc9Sbluhm following conditions: 222e724bc9Sbluhm 232e724bc9Sbluhm The above copyright notice and this permission notice shall be included 242e724bc9Sbluhm in all copies or substantial portions of the Software. 252e724bc9Sbluhm 262e724bc9Sbluhm THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 272e724bc9Sbluhm EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 282e724bc9Sbluhm MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 292e724bc9Sbluhm NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 302e724bc9Sbluhm DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 312e724bc9Sbluhm OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 322e724bc9Sbluhm USE OR OTHER DEALINGS IN THE SOFTWARE. 3333ab7b2bSbluhm */ 3433ab7b2bSbluhm 3533ab7b2bSbluhm #ifdef __cplusplus 3633ab7b2bSbluhm extern "C" { 3733ab7b2bSbluhm #endif 3833ab7b2bSbluhm 3933ab7b2bSbluhm #ifndef XML_CHARDATA_H 4033ab7b2bSbluhm # define XML_CHARDATA_H 1 4133ab7b2bSbluhm 4233ab7b2bSbluhm # ifndef XML_VERSION 4333ab7b2bSbluhm # include "expat.h" /* need XML_Char */ 4433ab7b2bSbluhm # endif 4533ab7b2bSbluhm 4633ab7b2bSbluhm typedef struct { 4733ab7b2bSbluhm int count; /* # of chars, < 0 if not set */ 485837d4fcSbluhm XML_Char data[2048]; 4933ab7b2bSbluhm } CharData; 5033ab7b2bSbluhm 5133ab7b2bSbluhm void CharData_Init(CharData *storage); 5233ab7b2bSbluhm 5333ab7b2bSbluhm void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); 5433ab7b2bSbluhm 5533ab7b2bSbluhm int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); 5633ab7b2bSbluhm 5733ab7b2bSbluhm #endif /* XML_CHARDATA_H */ 5833ab7b2bSbluhm 5933ab7b2bSbluhm #ifdef __cplusplus 6033ab7b2bSbluhm } 6133ab7b2bSbluhm #endif 62