diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-01-31 12:42:23 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2016-01-31 12:42:26 +1100 |
commit | 7be5df6c7f3335ba0e3962b9b934f86cca46bb06 (patch) | |
tree | e37abc8f85b21c7ede2301dda3ae64251b9bab0a /include/share | |
parent | 7917b60bdba4df002ecf8df41faada1f9d36d7ae (diff) | |
download | flac-7be5df6c7f3335ba0e3962b9b934f86cca46bb06.tar.gz |
Refactoring of win_utf8_io
* Simplifies *print functions.
* Improves file related functions.
* Preparation to move all file related functions into libFLAC.
Patch-from: lvqcl <lvqcl.mail@gmail.com>
Diffstat (limited to 'include/share')
-rw-r--r-- | include/share/compat.h | 2 | ||||
-rw-r--r-- | include/share/win_utf8_io.h | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/share/compat.h b/include/share/compat.h index faf96887..34d32db4 100644 --- a/include/share/compat.h +++ b/include/share/compat.h @@ -151,6 +151,7 @@ #define flac_printf printf_utf8 #define flac_fprintf fprintf_utf8 #define flac_vfprintf vfprintf_utf8 + #define flac_fopen fopen_utf8 #define flac_chmod chmod_utf8 #define flac_utime utime_utf8 @@ -163,6 +164,7 @@ #define flac_printf printf #define flac_fprintf fprintf #define flac_vfprintf vfprintf + #define flac_fopen fopen #define flac_chmod chmod #define flac_utime utime diff --git a/include/share/win_utf8_io.h b/include/share/win_utf8_io.h index 1d153392..ba9ad75c 100644 --- a/include/share/win_utf8_io.h +++ b/include/share/win_utf8_io.h @@ -43,6 +43,9 @@ extern "C" { #include <stdarg.h> #include <windows.h> +size_t strlen_utf8(const char *str); +int win_get_console_width(void); + int get_utf8_argv(int *argc, char ***argv); int printf_utf8(const char *format, ...); @@ -50,15 +53,11 @@ int fprintf_utf8(FILE *stream, const char *format, ...); int vfprintf_utf8(FILE *stream, const char *format, va_list argptr); FILE *fopen_utf8(const char *filename, const char *mode); -int stat_utf8(const char *path, struct stat *buffer); int _stat64_utf8(const char *path, struct __stat64 *buffer); int chmod_utf8(const char *filename, int pmode); int utime_utf8(const char *filename, struct utimbuf *times); int unlink_utf8(const char *filename); int rename_utf8(const char *oldname, const char *newname); -size_t strlen_utf8(const char *str); -int win_get_console_width(void); -int print_console(FILE *stream, const wchar_t *text, size_t len); HANDLE WINAPI CreateFile_utf8(const char *lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile); #ifdef __cplusplus |