]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/winapi/include/boost/detail/winapi/character_code_conversion.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / winapi / include / boost / detail / winapi / character_code_conversion.hpp
CommitLineData
7c673cae
FG
1// character_code_conversion.hpp --------------------------------------------------------------//
2
3// Copyright 2016 Andrey Semashev
4
5// Distributed under the Boost Software License, Version 1.0.
6// See http://www.boost.org/LICENSE_1_0.txt
7
8
9#ifndef BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
10#define BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP
11
12#include <boost/detail/winapi/basic_types.hpp>
13
14#ifdef BOOST_HAS_PRAGMA_ONCE
15#pragma once
16#endif
17
18#if !defined( BOOST_USE_WINDOWS_H )
19extern "C" {
20
21BOOST_SYMBOL_IMPORT int WINAPI
22MultiByteToWideChar(
23 boost::detail::winapi::UINT_ CodePage,
24 boost::detail::winapi::DWORD_ dwFlags,
25 boost::detail::winapi::LPCSTR_ lpMultiByteStr,
26 int cbMultiByte,
27 boost::detail::winapi::LPWSTR_ lpWideCharStr,
28 int cchWideChar);
29
30BOOST_SYMBOL_IMPORT int WINAPI
31WideCharToMultiByte(
32 boost::detail::winapi::UINT_ CodePage,
33 boost::detail::winapi::DWORD_ dwFlags,
34 boost::detail::winapi::LPCWSTR_ lpWideCharStr,
35 int cchWideChar,
36 boost::detail::winapi::LPSTR_ lpMultiByteStr,
37 int cbMultiByte,
38 boost::detail::winapi::LPCSTR_ lpDefaultChar,
39 boost::detail::winapi::LPBOOL_ lpUsedDefaultChar);
40
41} // extern "C"
42#endif // #if !defined( BOOST_USE_WINDOWS_H )
43
44namespace boost {
45namespace detail {
46namespace winapi {
47
48#if defined( BOOST_USE_WINDOWS_H )
49
50const UINT_ CP_ACP_ = CP_ACP;
51const UINT_ CP_OEMCP_ = CP_OEMCP;
52const UINT_ CP_MACCP_ = CP_MACCP;
53const UINT_ CP_THREAD_ACP_ = CP_THREAD_ACP;
54const UINT_ CP_SYMBOL_ = CP_SYMBOL;
55const UINT_ CP_UTF7_ = CP_UTF7;
56const UINT_ CP_UTF8_ = CP_UTF8;
57
58const DWORD_ MB_PRECOMPOSED_ = MB_PRECOMPOSED;
59const DWORD_ MB_COMPOSITE_ = MB_COMPOSITE;
60const DWORD_ MB_USEGLYPHCHARS_ = MB_USEGLYPHCHARS;
61const DWORD_ MB_ERR_INVALID_CHARS_ = MB_ERR_INVALID_CHARS;
62
63const DWORD_ WC_COMPOSITECHECK_ = WC_COMPOSITECHECK;
64const DWORD_ WC_DISCARDNS_ = WC_DISCARDNS;
65const DWORD_ WC_SEPCHARS_ = WC_SEPCHARS;
66const DWORD_ WC_DEFAULTCHAR_ = WC_DEFAULTCHAR;
67#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
68const DWORD_ WC_NO_BEST_FIT_CHARS_ = WC_NO_BEST_FIT_CHARS;
69#endif
70
71#else // defined( BOOST_USE_WINDOWS_H )
72
73const UINT_ CP_ACP_ = 0u;
74const UINT_ CP_OEMCP_ = 1u;
75const UINT_ CP_MACCP_ = 2u;
76const UINT_ CP_THREAD_ACP_ = 3u;
77const UINT_ CP_SYMBOL_ = 42u;
78const UINT_ CP_UTF7_ = 65000u;
79const UINT_ CP_UTF8_ = 65001u;
80
81const DWORD_ MB_PRECOMPOSED_ = 0x00000001;
82const DWORD_ MB_COMPOSITE_ = 0x00000002;
83const DWORD_ MB_USEGLYPHCHARS_ = 0x00000004;
84const DWORD_ MB_ERR_INVALID_CHARS_ = 0x00000008;
85
86const DWORD_ WC_COMPOSITECHECK_ = 0x00000200;
87const DWORD_ WC_DISCARDNS_ = 0x00000010;
88const DWORD_ WC_SEPCHARS_ = 0x00000020;
89const DWORD_ WC_DEFAULTCHAR_ = 0x00000040;
90#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
91const DWORD_ WC_NO_BEST_FIT_CHARS_ = 0x00000400;
92#endif
93
94#endif // defined( BOOST_USE_WINDOWS_H )
95
96#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
97// This constant is not present in MinGW
98const DWORD_ WC_ERR_INVALID_CHARS_ = 0x00000080;
99#endif
100
101using ::MultiByteToWideChar;
102using ::WideCharToMultiByte;
103
104} // namespace winapi
105} // namespace detail
106} // namespace boost
107
108#endif // BOOST_DETAIL_WINAPI_CHARACTER_CODE_CONVERSION_HPP