Blame view

3rdparty/boost_1_81_0/boost/nowide/cstdio.hpp 1.3 KB
63e88f80   Hu Chunming   提交三方库
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  //
  // Copyright (c) 2012 Artyom Beilis (Tonkikh)
  // Copyright (c) 2020 Alexander Grund
  //
  // Distributed under the Boost Software License, Version 1.0.
  // https://www.boost.org/LICENSE_1_0.txt
  
  #ifndef BOOST_NOWIDE_CSTDIO_HPP_INCLUDED
  #define BOOST_NOWIDE_CSTDIO_HPP_INCLUDED
  
  #include <boost/nowide/config.hpp>
  #include <cstdio>
  
  namespace boost {
  namespace nowide {
  #if !defined(BOOST_WINDOWS) && !defined(BOOST_NOWIDE_DOXYGEN)
      using std::fopen;
      using std::freopen;
      using std::remove;
      using std::rename;
  #else
  
      ///
      /// \brief Same as freopen but file_name and mode are UTF-8 strings
      ///
      BOOST_NOWIDE_DECL FILE* freopen(const char* file_name, const char* mode, FILE* stream);
      ///
      /// \brief Same as fopen but file_name and mode are UTF-8 strings
      ///
      BOOST_NOWIDE_DECL FILE* fopen(const char* file_name, const char* mode);
      ///
      /// \brief Same as rename but old_name and new_name are UTF-8 strings
      ///
      BOOST_NOWIDE_DECL int rename(const char* old_name, const char* new_name);
      ///
      /// \brief Same as rename but name is UTF-8 string
      ///
      BOOST_NOWIDE_DECL int remove(const char* name);
  #endif
      namespace detail {
          BOOST_NOWIDE_DECL FILE* wfopen(const wchar_t* filename, const wchar_t* mode);
      }
  } // namespace nowide
  } // namespace boost
  
  #endif