diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-13 19:47:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-13 19:47:55 +0000 |
commit | ce7a393172adf13ad1e990e970c1acac896dea7f (patch) | |
tree | d9ce594bac53d973e6ad2da976105a2f9b50e982 /src/mir_core | |
parent | 358ff62f159dbe6a02eecf148ee5fdc69d4b3394 (diff) |
- rtrim returned back into langpack reader;
- trailing spaces must be set using \s
git-svn-id: http://svn.miranda-ng.org/main/trunk@5674 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/langpack.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp index ca69a9d811..c3644f8a28 100644 --- a/src/mir_core/langpack.cpp +++ b/src/mir_core/langpack.cpp @@ -79,6 +79,7 @@ static int ConvertBackslashes(char *str, UINT fileCp) case 'n': *pstr = '\n'; break;
case 't': *pstr = '\t'; break;
case 'r': *pstr = '\r'; break;
+ case 's': *pstr = ' '; break;
default: *pstr = pstr[1]; break;
}
memmove(pstr+1, pstr+2, strlen(pstr+2) + 1);
@@ -213,9 +214,7 @@ static void LoadLangPackFile(FILE *fp, char *line, UINT fileCp) if (IsEmpty(line) || line[0] == ';' || line[0] == 0)
continue;
- size_t cbLen = strlen(line)-1;
- if (line[cbLen] == '\n')
- line[cbLen--] = 0;
+ rtrim(line);
if (line[0] == '#') {
strlwr(line);
@@ -259,8 +258,9 @@ static void LoadLangPackFile(FILE *fp, char *line, UINT fileCp) continue;
}
- cbLen -= ConvertBackslashes(line, fileCp);
+ ConvertBackslashes(line, fileCp);
+ size_t cbLen = strlen(line)-1;
if (line[0] == '[' && line[cbLen] == ']') {
if (langPack.entryCount && langPack.entry[ langPack.entryCount-1].wszLocal == NULL)
langPack.entryCount--;
|