safecrt_woutput_s.c 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // Copyright (c) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE file in the project root for full license information.
  4. //
  5. /***
  6. *safecrt_woutput_s.c - implementation of the _woutput family for safercrt.lib
  7. *
  8. *
  9. *Purpose:
  10. * This file contains the implementation of the _woutput family for safercrt.lib.
  11. *
  12. *Revision History:
  13. * 07-08-04 SJ Stub module created.
  14. * 07-13-04 AC Added support for floating-point types.
  15. * 07-29-04 AC Added macros for a safecrt version of mctowc and wctomb, which target ntdll.dll or msvcrt.dll
  16. * based on the _NTSUBSET_ #define
  17. *
  18. ****/
  19. #define _SAFECRT_IMPL
  20. #define __STDC_LIMIT_MACROS
  21. #ifndef _LIBSAFECRT_SGX_CONFIG
  22. #include "pal/palinternal.h"
  23. #endif
  24. #include <string.h>
  25. #include <errno.h>
  26. #include <limits.h>
  27. #include <stdlib.h>
  28. #include "internal_securecrt.h"
  29. #include "mbusafecrt_internal.h"
  30. #ifndef _UNICODE /* CRT flag */
  31. #define _UNICODE 1
  32. #endif
  33. #ifndef UNICODE /* NT flag */
  34. #define UNICODE 1
  35. #endif
  36. #define FORMAT_VALIDATIONS
  37. #if defined(_NTSUBSET_)
  38. #define _MBTOWC _safecrt_mbtowc
  39. #endif
  40. #define _WCTOMB_S _safecrt_wctomb_s
  41. #define _CFLTCVT _safecrt_cfltcvt
  42. #define _CLDCVT _safecrt_cldcvt
  43. #define _TCHAR CRT_TCHAR
  44. #define TCHAR CRTTCHAR
  45. typedef char16_t _TCHAR;
  46. typedef char16_t TCHAR;
  47. #define _T(x) L##x
  48. #include "output.inl"