aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-07-01 12:52:24 +0100
committerRon Yorston <rmy@pobox.com>2023-07-01 12:52:24 +0100
commitb2ea663bada3acc89a5aa8ffb96f053ef90d6ac7 (patch)
treeed90a98e26eb2f740c651aebf1218edb1896865c
parentab4d47f334c53035a04bde0fcde5d21a5b6d0913 (diff)
downloadbusybox-w32-b2ea663bada3acc89a5aa8ffb96f053ef90d6ac7.tar.gz
busybox-w32-b2ea663bada3acc89a5aa8ffb96f053ef90d6ac7.tar.bz2
busybox-w32-b2ea663bada3acc89a5aa8ffb96f053ef90d6ac7.zip
win32: remove superfluous euro code
Commit ebe80f3e5 (win32: don't assume console CP equals OEM CP) fixed the incorrect character conversions which required special treatment for the euro symbol. The unnecessary code has been removed. Saves 64-80 bytes.
-rw-r--r--win32/winansi.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/win32/winansi.c b/win32/winansi.c
index 67fcc17d3..4beef3eb8 100644
--- a/win32/winansi.c
+++ b/win32/winansi.c
@@ -732,15 +732,6 @@ static BOOL charToConBuffA(LPSTR s, DWORD len)
732 buf = xmalloc(len*sizeof(WCHAR)); 732 buf = xmalloc(len*sizeof(WCHAR));
733 MultiByteToWideChar(CP_ACP, 0, s, len, buf, len); 733 MultiByteToWideChar(CP_ACP, 0, s, len, buf, len);
734 WideCharToMultiByte(conocp, 0, buf, len, s, len, NULL, NULL); 734 WideCharToMultiByte(conocp, 0, buf, len, s, len, NULL, NULL);
735#if ENABLE_FEATURE_EURO
736 if (conocp == 858) {
737 for (int i = 0; i < len; ++i) {
738 if (buf[i] == 0x20ac) {
739 s[i] = 0xd5;
740 }
741 }
742 }
743#endif
744 free(buf); 735 free(buf);
745 return TRUE; 736 return TRUE;
746} 737}
@@ -771,15 +762,6 @@ BOOL conToCharBuffA(LPSTR s, DWORD len)
771 buf = xmalloc(len*sizeof(WCHAR)); 762 buf = xmalloc(len*sizeof(WCHAR));
772 MultiByteToWideChar(conicp, 0, s, len, buf, len); 763 MultiByteToWideChar(conicp, 0, s, len, buf, len);
773 WideCharToMultiByte(CP_ACP, 0, buf, len, s, len, NULL, NULL); 764 WideCharToMultiByte(CP_ACP, 0, buf, len, s, len, NULL, NULL);
774#if ENABLE_FEATURE_EURO
775 if (conicp == 858) {
776 for (int i = 0; i < len; ++i) {
777 if (buf[i] == 0x0131) {
778 s[i] = 0x80;
779 }
780 }
781 }
782#endif
783 free(buf); 765 free(buf);
784 return TRUE; 766 return TRUE;
785} 767}