diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-08-23 09:22:40 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-08-23 09:22:40 +0000 |
commit | 2036ef157e7743223a4f52f791cc821d2d45695d (patch) | |
tree | 6b98fb7ec243a1de22f6d11742ad16d11e2114a1 /plugins/SpellChecker | |
parent | c7ffc608a5346c75e372d7b1a0de3983fdb41cd5 (diff) |
SpellChecker:
- Minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@15016 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker')
-rw-r--r-- | plugins/SpellChecker/src/autoreplace.cpp | 8 | ||||
-rw-r--r-- | plugins/SpellChecker/src/dictionary.cpp | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/plugins/SpellChecker/src/autoreplace.cpp b/plugins/SpellChecker/src/autoreplace.cpp index e1ca9737c3..2cf94e5e39 100644 --- a/plugins/SpellChecker/src/autoreplace.cpp +++ b/plugins/SpellChecker/src/autoreplace.cpp @@ -44,20 +44,18 @@ void AutoReplaceMap::loadAutoReplaceMap() return;
char tmp[1024];
- char c;
- int pos = 0;
+ int c, pos = 0;
while ((c = fgetc(file)) != EOF) {
if (c == '\n' || c == '\r' || pos >= _countof(tmp) - 1) {
if (pos > 0) {
tmp[pos] = '\0';
// Get from
- BOOL useVars = false;
+ BOOL useVars = FALSE;
char *p;
if ((p = strstr(tmp, "->")) != NULL) {
*p = '\0';
p += 2;
- useVars = FALSE;
}
else if ((p = strstr(tmp, "-V>")) != NULL) {
*p = '\0';
@@ -80,7 +78,7 @@ void AutoReplaceMap::loadAutoReplaceMap() pos = 0;
}
else {
- tmp[pos] = c;
+ tmp[pos] = (char)c;
pos++;
}
}
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 7c074fd159..bbdb192c89 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -370,19 +370,17 @@ protected: FILE *file = _tfopen(filename, _T("rb")); if (file != NULL) { char tmp[1024]; - char c; - int pos = 0; + int c, pos = 0; while ((c = fgetc(file)) != EOF) { if (c == '\n' || c == '\r' || pos >= _countof(tmp) - 1) { if (pos > 0) { tmp[pos] = '\0'; hunspell->add(tmp); + pos = 0; } - - pos = 0; } else { - tmp[pos] = c; + tmp[pos] = (char)c; pos++; } } |