diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-07-20 08:01:05 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-07-20 08:01:05 +0000 |
commit | d5dfa90eec9c108f86b9a0aa3f746a5b164c6649 (patch) | |
tree | e6eb1ae6ca89db58494b28d6c5124ea94c517c37 /plugins/SpellChecker/src/hunspell/hunzip.cxx | |
parent | 42c1d344fd105bcc25ae35e5a82d16a978b302c4 (diff) |
SpellChecker:
-Updated Hunspell to 1.3.3
-Create services in Load()
git-svn-id: http://svn.miranda-ng.org/main/trunk@9876 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/hunspell/hunzip.cxx')
-rw-r--r-- | plugins/SpellChecker/src/hunspell/hunzip.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/plugins/SpellChecker/src/hunspell/hunzip.cxx b/plugins/SpellChecker/src/hunspell/hunzip.cxx index ecd8c7da77..c4c811dcd6 100644 --- a/plugins/SpellChecker/src/hunspell/hunzip.cxx +++ b/plugins/SpellChecker/src/hunspell/hunzip.cxx @@ -1,4 +1,4 @@ -#include "..\commons.h"
+#include "..\commons.h" #define CODELEN 65536 #define BASEBITREC 5000 @@ -13,15 +13,17 @@ int Hunzip::fail(const char * err, const char * par) { return -1; } -Hunzip::Hunzip(const char * file, const char * key) { - bufsiz = 0; - lastbit = 0; - inc = 0; - outc = 0; - dec = NULL; - fin = NULL; - filename = (char *) malloc(strlen(file) + 1); - if (filename) strcpy(filename, file); +Hunzip::Hunzip(const char * file, const char * key) + : fin(NULL) + , bufsiz(0) + , lastbit(0) + , inc(0) + , inbits(0) + , outc(0) + , dec(NULL) +{ + in[0] = out[0] = line[0] = '\0'; + filename = mystrdup(file); if (getcode(key) == -1) bufsiz = -1; else bufsiz = getbuf(); } @@ -34,7 +36,7 @@ int Hunzip::getcode(const char * key) { if (!filename) return -1; - fin = fopen(filename, "rb"); + fin = myfopen(filename, "rb"); if (!fin) return -1; // read magic number |