chardata.h 791 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* chardata.h
  2. Interface to some helper routines used to accumulate and check text
  3. and attribute content.
  4. */
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. #ifndef XML_CHARDATA_H
  9. #define XML_CHARDATA_H 1
  10. #ifndef XML_VERSION
  11. #include "expat.h" /* need XML_Char */
  12. #endif
  13. typedef struct {
  14. int count; /* # of chars, < 0 if not set */
  15. XML_Char data[1024];
  16. } CharData;
  17. void CharData_Init(CharData *storage);
  18. void CharData_AppendString(CharData *storage, const char *s);
  19. void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len);
  20. int CharData_CheckString(CharData *storage, const char *s);
  21. int CharData_CheckXMLChars(CharData *storage, const XML_Char *s);
  22. #endif /* XML_CHARDATA_H */
  23. #ifdef __cplusplus
  24. }
  25. #endif