8 #ifndef BOOST_NOWIDE_CSTDIO_H_INCLUDED 9 #define BOOST_NOWIDE_CSTDIO_H_INCLUDED 13 #include <boost/config.hpp> 14 #include <boost/nowide/convert.hpp> 15 #include <boost/nowide/stackstring.hpp> 19 # pragma warning(push) 20 # pragma warning(disable : 4996) 26 #if !defined(BOOST_WINDOWS) && !defined(BOOST_NOWIDE_DOXYGEN) 38 inline FILE *
freopen(
char const *file_name,
char const *mode,FILE *stream)
42 if(!wname.convert(file_name) || !wmode.convert(mode)) {
46 return _wfreopen(wname.c_str(),wmode.c_str(),stream);
53 inline FILE *
fopen(
char const *file_name,
char const *mode)
57 if(!wname.convert(file_name) || !wmode.convert(mode)) {
61 return _wfopen(wname.c_str(),wmode.c_str());
68 inline int rename(
char const *old_name,
char const *new_name)
71 if(!wold.convert(old_name) || !wnew.convert(new_name)) {
75 return _wrename(wold.c_str(),wnew.c_str());
82 inline int remove(
char const *name)
85 if(!wname.convert(name)) {
89 return _wremove(wname.c_str());
int rename(char const *old_name, char const *new_name)
Same as rename but old_name and new_name are UTF-8 strings.
Definition: cstdio.hpp:68
FILE * freopen(char const *file_name, char const *mode, FILE *stream)
Same as freopen but file_name and mode are UTF-8 strings.
Definition: cstdio.hpp:38
FILE * fopen(char const *file_name, char const *mode)
Same as fopen but file_name and mode are UTF-8 strings.
Definition: cstdio.hpp:53
A class that allows to create a temporary wide or narrow UTF strings from wide or narrow UTF source...
Definition: stackstring.hpp:25