Skip to content

Commit 4abb342

Browse files
committed
update mcpp.exe to make UTF-16/UTF-32 buffer length unlimitted
1 parent 8c19af7 commit 4abb342

File tree

10 files changed

+7
-31
lines changed

10 files changed

+7
-31
lines changed

CHANGELOG.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,6 @@
366366
- Supported MP3 sounds.
367367
- Fixed menu empty quotes problem.
368368
- v.5.9.4 (20XX-YY-ZZ)
369-
- Updated mcpp.exe to enlarge the buffer length to 4096 bytes.
369+
- Updated mcpp.exe to make UTF-16/UTF-32 buffer length unlimitted.
370370
- Renamed HISTORY*.txt as CHANGELOG*.txt.
371371
- Renamed README-*.txt as README_*.txt.

CHANGELOG_es.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,6 @@
366366
- Supported MP3 sounds.
367367
- Fixed menu empty quotes problem.
368368
- v.5.9.4 (20XX-YY-ZZ)
369-
- Updated mcpp.exe to enlarge the buffer length to 4096 bytes.
369+
- Updated mcpp.exe to make UTF-16/UTF-32 buffer length unlimitted.
370370
- Renamed HISTORY*.txt as CHANGELOG*.txt.
371371
- Renamed README-*.txt as README_*.txt.

CHANGELOG_id.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,6 @@
366366
- Supported MP3 sounds.
367367
- Fixed menu empty quotes problem.
368368
- v.5.9.4 (20XX-YY-ZZ)
369-
- Updated mcpp.exe to enlarge the buffer length to 4096 bytes.
369+
- Updated mcpp.exe to make UTF-16/UTF-32 buffer length unlimitted.
370370
- Renamed HISTORY*.txt as CHANGELOG*.txt.
371371
- Renamed README-*.txt as README_*.txt.

CHANGELOG_it.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,6 @@
366366
- Supportati audio MP3.
367367
- Risolto il problema delle virgolette vuote del menu.
368368
- v.5.9.4 (20XX-YY-ZZ)
369-
- Updated mcpp.exe to enlarge the buffer length to 4096 bytes.
369+
- Updated mcpp.exe to make UTF-16/UTF-32 buffer length unlimitted.
370370
- Renamed HISTORY*.txt as CHANGELOG*.txt.
371371
- Renamed README-*.txt as README_*.txt.

CHANGELOG_ja.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,6 @@
710710
- MP3音声のサポート。
711711
- メニューの空文字列の問題を修正。
712712
- v.5.9.4 (20XX-YY-ZZ)
713-
- バッファの長さを 4096 バイトに大きくするために mcpp.exe を更新。
713+
- UTF-16/UTF-32バッファ長を無制限にするために mcpp.exe を更新。
714714
- HISTORY*.txt を CHANGELOG*.txt に改名。
715715
- README-*.txt を README_*.txt に改名。

CHANGELOG_ko.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,6 @@
367367
- Supported MP3 sounds.
368368
- Fixed menu empty quotes problem.
369369
- v.5.9.4 (20XX-YY-ZZ)
370-
- Updated mcpp.exe to enlarge the buffer length to 4096 bytes.
370+
- Updated mcpp.exe to make UTF-16/UTF-32 buffer length unlimitted.
371371
- Renamed HISTORY*.txt as CHANGELOG*.txt.
372372
- Renamed README-*.txt as README_*.txt.

CHANGELOG_pt.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,6 @@
366366
- Supported MP3 sounds.
367367
- Fixed menu empty quotes problem.
368368
- v.5.9.4 (20XX-YY-ZZ)
369-
- Updated mcpp.exe to enlarge the buffer length to 4096 bytes.
369+
- Updated mcpp.exe to make UTF-16/UTF-32 buffer length unlimitted.
370370
- Renamed HISTORY*.txt as CHANGELOG*.txt.
371371
- Renamed README-*.txt as README_*.txt.

data/bin/mcpp.exe

27 KB
Binary file not shown.

src/MString.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -717,14 +717,6 @@ mstr_escape_with_wrap(const std::basic_string<T_CHAR>& str)
717717

718718
for (size_t i = 0; i < str.size(); ++i)
719719
{
720-
extern bool g_wrap_enabled;
721-
#define MAX_ESCAPE_LINE ((4096 / sizeof(wchar_t)) - 256) // mcpp.exe can accept up to UTF-16 line of 4096 bytes
722-
if (g_wrap_enabled && i % MAX_ESCAPE_LINE == MAX_ESCAPE_LINE - 1)
723-
{
724-
ret += T_CHAR('\\');
725-
ret += T_CHAR('\r');
726-
ret += T_CHAR('\n');
727-
}
728720
T_CHAR ch = str[i];
729721
switch (ch)
730722
{

src/RisohEditor.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <thread>
1515

1616
LPWSTR g_pszLogFile = NULL;
17-
bool g_wrap_enabled = false;
1817

1918
//////////////////////////////////////////////////////////////////////////////
2019
// constants
@@ -6785,24 +6784,9 @@ BOOL MMainWnd::DoExportRes(LPCWSTR pszResFile)
67856784
return g_res.extract_res(pszResFile, g_res);
67866785
}
67876786

6788-
struct AutoWrapEnable
6789-
{
6790-
AutoWrapEnable()
6791-
{
6792-
// Wrap string literals only in UTF-16 RC. See Issue #302.
6793-
g_wrap_enabled = g_settings.bRCFileUTF16;
6794-
}
6795-
~AutoWrapEnable()
6796-
{
6797-
g_wrap_enabled = false;
6798-
}
6799-
};
6800-
68016787
// do export the resource data to an RC file and related files
68026788
BOOL MMainWnd::DoExportRC(LPCWSTR pszRCFile, LPWSTR pszResHFile, const EntrySet& found)
68036789
{
6804-
AutoWrapEnable auto_wrap_enable;
6805-
68066790
if (found.empty())
68076791
{
68086792
// unable to export the empty data

0 commit comments

Comments
 (0)