https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c0a227d9a5857eb2c2fd5…
commit c0a227d9a5857eb2c2fd5978a9dc8192ee0d7dc9
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Wed Feb 7 10:53:51 2018 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Thu Feb 8 00:52:41 2018 +0100
[SYSDM] Make the GPL text ASCII. CORE-14278
This is better than wasting space on null chars (and having Git mangle it).
Also ensure that it gets CRLF newlines since its contents go in the binary.
---
dll/cpl/sysdm/licence.c | 10 +++++-----
dll/cpl/sysdm/resources/.gitattributes | 2 ++
dll/cpl/sysdm/resources/gpl.txt | Bin 36652 -> 17987 bytes
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/dll/cpl/sysdm/licence.c b/dll/cpl/sysdm/licence.c
index d8461bf442..6894fd6598 100644
--- a/dll/cpl/sysdm/licence.c
+++ b/dll/cpl/sysdm/licence.c
@@ -20,7 +20,7 @@ OnInitDialog(HWND hDlg, PLIC_CONTEXT pLicInfo)
{
HRSRC hResInfo;
HGLOBAL hResMem;
- WCHAR *LicenseText;
+ PCSTR LicenseText;
pLicInfo->hIcon = LoadImage(hApplet,
MAKEINTRESOURCE(IDI_CPLSYSTEM),
@@ -45,10 +45,10 @@ OnInitDialog(HWND hDlg, PLIC_CONTEXT pLicInfo)
return FALSE;
}
- /* Insert the license into the edit control (unicode!) */
- SetDlgItemText(hDlg,
- IDC_LICENCEEDIT,
- LicenseText);
+ /* Insert the license into the edit control */
+ SetDlgItemTextA(hDlg,
+ IDC_LICENCEEDIT,
+ LicenseText);
PostMessage(GetDlgItem(hDlg, IDC_LICENCEEDIT),
EM_SETSEL,
diff --git a/dll/cpl/sysdm/resources/.gitattributes b/dll/cpl/sysdm/resources/.gitattributes
new file mode 100644
index 0000000000..4d51a75d04
--- /dev/null
+++ b/dll/cpl/sysdm/resources/.gitattributes
@@ -0,0 +1,2 @@
+# This text file is included in the binary output
+gpl.txt text eol=crlf
diff --git a/dll/cpl/sysdm/resources/gpl.txt b/dll/cpl/sysdm/resources/gpl.txt
index 9f46aed4df..d511905c16 100644
Binary files a/dll/cpl/sysdm/resources/gpl.txt and b/dll/cpl/sysdm/resources/gpl.txt differ