cwchar.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // © 2016 and later: Unicode, Inc. and others.
  2. // License & terms of use: http://www.unicode.org/copyright.html
  3. /*
  4. ******************************************************************************
  5. *
  6. * Copyright (C) 2001, International Business Machines
  7. * Corporation and others. All Rights Reserved.
  8. *
  9. ******************************************************************************
  10. * file name: cwchar.h
  11. * encoding: UTF-8
  12. * tab size: 8 (not used)
  13. * indentation:4
  14. *
  15. * created on: 2001may25
  16. * created by: Markus W. Scherer
  17. *
  18. * This file contains ICU-internal definitions of wchar_t operations.
  19. * These definitions were moved here from cstring.h so that fewer
  20. * ICU implementation files include wchar.h.
  21. */
  22. #ifndef __CWCHAR_H__
  23. #define __CWCHAR_H__
  24. #include <string.h>
  25. #include <stdlib.h>
  26. #include "unicode/utypes.h"
  27. /* Do this after utypes.h so that we have U_HAVE_WCHAR_H . */
  28. #if U_HAVE_WCHAR_H
  29. # include <wchar.h>
  30. #endif
  31. /*===========================================================================*/
  32. /* Wide-character functions */
  33. /*===========================================================================*/
  34. /* The following are not available on all systems, defined in wchar.h or string.h. */
  35. #if U_HAVE_WCSCPY
  36. # define uprv_wcscpy wcscpy
  37. # define uprv_wcscat wcscat
  38. # define uprv_wcslen wcslen
  39. #else
  40. U_CAPI wchar_t* U_EXPORT2
  41. uprv_wcscpy(wchar_t *dst, const wchar_t *src);
  42. U_CAPI wchar_t* U_EXPORT2
  43. uprv_wcscat(wchar_t *dst, const wchar_t *src);
  44. U_CAPI size_t U_EXPORT2
  45. uprv_wcslen(const wchar_t *src);
  46. #endif
  47. /* The following are part of the ANSI C standard, defined in stdlib.h . */
  48. #define uprv_wcstombs(mbstr, wcstr, count) U_STANDARD_CPP_NAMESPACE wcstombs(mbstr, wcstr, count)
  49. #define uprv_mbstowcs(wcstr, mbstr, count) U_STANDARD_CPP_NAMESPACE mbstowcs(wcstr, mbstr, count)
  50. #endif