aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mingw.h5
-rw-r--r--win32/winansi.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/include/mingw.h b/include/mingw.h
index e937a9e3c..22c59f483 100644
--- a/include/mingw.h
+++ b/include/mingw.h
@@ -150,6 +150,7 @@ IMPL(setlinebuf, void, ,FILE * UNUSED_PARAM)
150 * ANSI emulation wrappers 150 * ANSI emulation wrappers
151 */ 151 */
152 152
153BOOL winansi_OemToCharBuff(LPCSTR s, LPSTR d, DWORD len);
153void set_title(const char *str); 154void set_title(const char *str);
154void move_cursor_row(int n); 155void move_cursor_row(int n);
155void reset_screen(void); 156void reset_screen(void);
@@ -165,6 +166,10 @@ int winansi_fprintf(FILE *stream, const char *format, ...) __attribute__((format
165int winansi_write(int fd, const void *buf, size_t count); 166int winansi_write(int fd, const void *buf, size_t count);
166int winansi_read(int fd, void *buf, size_t count); 167int winansi_read(int fd, void *buf, size_t count);
167int winansi_getc(FILE *stream); 168int winansi_getc(FILE *stream);
169#if ENABLE_FEATURE_EURO
170# undef OemToCharBuff
171# define OemToCharBuff winansi_OemToCharBuff
172#endif
168#define putchar winansi_putchar 173#define putchar winansi_putchar
169#define puts winansi_puts 174#define puts winansi_puts
170#define fwrite winansi_fwrite 175#define fwrite winansi_fwrite
diff --git a/win32/winansi.c b/win32/winansi.c
index dbdba9626..14fbee75f 100644
--- a/win32/winansi.c
+++ b/win32/winansi.c
@@ -746,7 +746,7 @@ static BOOL winansi_CharToOem(LPCSTR s, LPSTR d)
746 return winansi_CharToOemBuff(s, d, strlen(s)+1); 746 return winansi_CharToOemBuff(s, d, strlen(s)+1);
747} 747}
748 748
749static BOOL winansi_OemToCharBuff(LPCSTR s, LPSTR d, DWORD len) 749BOOL winansi_OemToCharBuff(LPCSTR s, LPSTR d, DWORD len)
750{ 750{
751 WCHAR *buf; 751 WCHAR *buf;
752 int i; 752 int i;
@@ -771,10 +771,8 @@ static BOOL winansi_OemToCharBuff(LPCSTR s, LPSTR d, DWORD len)
771 771
772# undef CharToOemBuff 772# undef CharToOemBuff
773# undef CharToOem 773# undef CharToOem
774# undef OemToCharBuff
775# define CharToOemBuff winansi_CharToOemBuff 774# define CharToOemBuff winansi_CharToOemBuff
776# define CharToOem winansi_CharToOem 775# define CharToOem winansi_CharToOem
777# define OemToCharBuff winansi_OemToCharBuff
778#endif 776#endif
779 777
780static int ansi_emulate(const char *s, FILE *stream) 778static int ansi_emulate(const char *s, FILE *stream)