filemap.h 806 B

123456789101112131415161718192021222324252627282930
  1. /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
  2. See the file COPYING for copying permission.
  3. */
  4. #include <limits.h> /* INT_MAX */
  5. #include <stddef.h>
  6. /* The following limit (for XML_Parse's int len) derives from
  7. * this loop in xmparse.c:
  8. *
  9. * do {
  10. * bufferSize = (int) (2U * (unsigned) bufferSize);
  11. * } while (bufferSize < neededSize && bufferSize > 0);
  12. */
  13. #define XML_MAX_CHUNK_LEN (INT_MAX / 2 + 1)
  14. #ifdef XML_UNICODE
  15. int filemap(const wchar_t *name,
  16. void (*processor)(const void *, size_t,
  17. const wchar_t *, void *arg),
  18. void *arg);
  19. #else
  20. int filemap(const char *name,
  21. void (*processor)(const void *, size_t,
  22. const char *, void *arg),
  23. void *arg);
  24. #endif