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