summaryrefslogtreecommitdiff
path: root/src/modules/langpack/langpack.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-06-21 20:01:52 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-06-21 20:01:52 +0000
commit4955a3b835c8b6d71fa836cdfc0ec5b82fa59ae0 (patch)
tree3229191afdf997f55a69f9deee2ec399dafe8f44 /src/modules/langpack/langpack.cpp
parent85b429453559d86491ac428a1028cbe4d5b382c9 (diff)
fixed langpack authors crop
git-svn-id: http://svn.miranda-ng.org/main/trunk@9548 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/langpack/langpack.cpp')
-rw-r--r--src/modules/langpack/langpack.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/modules/langpack/langpack.cpp b/src/modules/langpack/langpack.cpp
index 728e48db43..33a52b53d0 100644
--- a/src/modules/langpack/langpack.cpp
+++ b/src/modules/langpack/langpack.cpp
@@ -35,22 +35,21 @@ BOOL EnumLangpacks(ENUM_PACKS_CALLBACK callback, WPARAM wParam, LPARAM lParam)
/* language folder */
ptrT langpack(db_get_tsa(NULL, "Langpack", "Current"));
-
- LANGPACK_INFO pack;
- PathToAbsoluteT(_T("\\Languages\\langpack_*.txt"), pack.tszFullPath);
+
+ TCHAR tszFullPath[MAX_PATH];
+ PathToAbsoluteT(_T("\\Languages\\langpack_*.txt"), tszFullPath);
BOOL fPackFound = FALSE;
WIN32_FIND_DATA wfd;
- HANDLE hFind = FindFirstFile(pack.tszFullPath, &wfd);
+ HANDLE hFind = FindFirstFile(tszFullPath, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) continue;
/* get data */
- TCHAR tszFullPath[MAX_PATH];
PathToAbsoluteT(_T("\\Languages\\"), tszFullPath);
lstrcat(tszFullPath, wfd.cFileName);
- ZeroMemory(&pack, sizeof(pack));
+ LANGPACK_INFO pack;
if (!LoadLangPackDescr(tszFullPath, &pack)) {
pack.ftFileDate = wfd.ftLastWriteTime;
/* enabled? */
@@ -68,13 +67,13 @@ BOOL EnumLangpacks(ENUM_PACKS_CALLBACK callback, WPARAM wParam, LPARAM lParam)
/* default langpack: English */
if (callback != NULL) {
- ZeroMemory(&pack, sizeof(pack));
+ LANGPACK_INFO pack;
pack.Locale = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT);
lstrcpy(pack.tszLanguage, _T("English"));
- lstrcpyA(pack.szAuthors, "Miranda NG Development Team");
- lstrcpyA(pack.szAuthorEmail, "project-info@miranda-ng.org");
+ pack.szAuthors = "Miranda NG Development Team";
+ pack.szAuthorEmail = "project-info@miranda-ng.org";
DWORD v = CallService(MS_SYSTEM_GETVERSION, 0, 0);
- mir_snprintf(pack.szLastModifiedUsing, sizeof(pack.szLastModifiedUsing), "%d.%d.%d", ((v >> 24) & 0xFF), ((v >> 16) & 0xFF), ((v >> 8) & 0xFF));
+ pack.szLastModifiedUsing.Format("%d.%d.%d", ((v >> 24) & 0xFF), ((v >> 16) & 0xFF), ((v >> 8) & 0xFF));
/* file date */
if (GetModuleFileName(NULL, pack.tszFullPath, SIZEOF(pack.tszFullPath))) {
lstrcpy(pack.tszFileName, _tcsrchr(pack.tszFullPath, '\\') + 1);