aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-06-02 11:34:25 +0100
committerRon Yorston <rmy@pobox.com>2023-06-02 11:34:25 +0100
commitbec2426878edb9b8553b4daa27cd34a8e230d465 (patch)
treeb0b64698eaddbdb543d3cdd0241e725337e56c59 /include
parentd4c67e67ef66173b3991bd67cc0ed5afc577e490 (diff)
downloadbusybox-w32-bec2426878edb9b8553b4daa27cd34a8e230d465.tar.gz
busybox-w32-bec2426878edb9b8553b4daa27cd34a8e230d465.tar.bz2
busybox-w32-bec2426878edb9b8553b4daa27cd34a8e230d465.zip
win32: fix euro symbol handling
Commit 2b4dbe5fa (libbb: speed up bb_get_chunk_from_file()) speeded up grep by a factor of two. However, it introduced a call to OemToCharBuff() in bb_get_chunk_from_file() which didn't have the fix for the euro symbol from commit 93a63809f9 (win32: add support for the euro currency symbol). Export the fixed version of OemToCharBuff() and use it. Saves 8 bytes (64-bit), adds 28 bytes (32-bit)
Diffstat (limited to 'include')
-rw-r--r--include/mingw.h5
1 files changed, 5 insertions, 0 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