summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-27 11:11:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-27 11:11:53 +0000
commit1507978ea61aacf5c73378014711558bf4bca502 (patch)
treeafc9e2f45e0af363e6a9cb8c618719d81e874fdd
parent60b00de91b9ece3b143d710049b8c6125179d39c (diff)
rest of codepages removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@8775 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/mir_core/langpack.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index 018812b773..5f1e0709fe 100644
--- a/src/mir_core/langpack.cpp
+++ b/src/mir_core/langpack.cpp
@@ -226,15 +226,10 @@ static void LoadLangPackFile(FILE *fp, char *line)
line[0] = 0;
fgets(line, LANGPACK_BUF_SIZE, fp);
- UINT fileCp = CP_ACP;
- if (strlen(line) >= 3 && line[0] == '\xef' && line[1] == '\xbb' && line[2] == '\xbf') {
- fileCp = CP_UTF8;
+ if (strlen(line) >= 3 && line[0] == '\xef' && line[1] == '\xbb' && line[2] == '\xbf')
fseek(fp, 3, SEEK_SET);
- }
- else {
- fileCp = langPack.codepage;
+ else
fseek(fp, 0, SEEK_SET);
- }
LoadLangPackFile(fp, line);
fclose(fp);
@@ -435,12 +430,9 @@ MIR_CORE_DLL(int) LoadLangPackDescr(const TCHAR *ptszLangPack, LANGPACK_INFO *lp
char line[LANGPACK_BUF_SIZE] = "";
int startOfLine = 0;
- if (LoadLangDescr(*lpInfo, fp, line, startOfLine)) {
- fclose(fp);
- return 1;
- }
-
- return 0;
+ int res = LoadLangDescr(*lpInfo, fp, line, startOfLine);
+ fclose(fp);
+ return res;
}
/////////////////////////////////////////////////////////////////////////////////////////