[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[hunspell] 02/02: Imported Upstream version 1.4.0



This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch upstream
in repository hunspell.

commit 10df68cd922bdbfcaeca6e2bee7f547f68361b2a
Author: Rene Engelhard <rene@rene-engelhard.de>
Date:   Mon May 2 21:50:22 2016 +0200

    Imported Upstream version 1.4.0
---
 src/hunspell/Makefile.am       |   6 +-
 src/hunspell/Makefile.in       |  11 +--
 src/hunspell/affixmgr.cxx      |  26 +++--
 src/hunspell/csutil.cxx        |   6 +-
 src/hunspell/csutil.hxx        |   2 -
 src/hunspell/dictmgr.cxx       | 216 -----------------------------------------
 src/hunspell/dictmgr.hxx       |  76 ---------------
 src/hunspell/filemgr.cxx       |  10 +-
 src/hunspell/hunspell.cxx      |   2 -
 src/hunspell/hunspell.dsp      |   8 --
 src/hunspell/makefile.mk       |  65 -------------
 src/hunspell/phonet.cxx        |   2 +-
 src/hunspell/suggestmgr.cxx    |   4 +-
 src/win_api/Makefile.cygwin    |   1 -
 src/win_api/libhunspell.vcproj |   8 --
 15 files changed, 27 insertions(+), 416 deletions(-)

diff --git a/src/hunspell/Makefile.am b/src/hunspell/Makefile.am
index 4cc1194..762c73b 100644
--- a/src/hunspell/Makefile.am
+++ b/src/hunspell/Makefile.am
@@ -1,12 +1,12 @@
 lib_LTLIBRARIES = libhunspell-1.4.la
 libhunspell_1_4_includedir = $(includedir)/hunspell
 libhunspell_1_4_la_SOURCES=affentry.cxx affixmgr.cxx csutil.cxx \
-		     dictmgr.cxx hashmgr.cxx hunspell.cxx \
+		     hashmgr.cxx hunspell.cxx \
 	             suggestmgr.cxx license.myspell license.hunspell \
 	             phonet.cxx filemgr.cxx hunzip.cxx replist.cxx
 
 libhunspell_1_4_include_HEADERS=affentry.hxx htypes.hxx affixmgr.hxx \
-	        csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx hunspell.h \
+	        csutil.hxx hunspell.hxx atypes.hxx hunspell.h \
 		suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx \
 		phonet.hxx filemgr.hxx hunzip.hxx w_char.hxx replist.hxx \
 		hunvisapi.h
@@ -16,4 +16,4 @@ libhunspell_1_4_la_LDFLAGS=-no-undefined
 
 AM_CXXFLAGS=$(CFLAG_VISIBILITY) -DBUILDING_LIBHUNSPELL
 
-EXTRA_DIST=hunspell.dsp makefile.mk README utf_info.cxx
+EXTRA_DIST=hunspell.dsp README utf_info.cxx
diff --git a/src/hunspell/Makefile.in b/src/hunspell/Makefile.in
index 19f333d..b394a80 100644
--- a/src/hunspell/Makefile.in
+++ b/src/hunspell/Makefile.in
@@ -150,8 +150,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" \
 LTLIBRARIES = $(lib_LTLIBRARIES)
 libhunspell_1_4_la_LIBADD =
 am_libhunspell_1_4_la_OBJECTS = affentry.lo affixmgr.lo csutil.lo \
-	dictmgr.lo hashmgr.lo hunspell.lo suggestmgr.lo phonet.lo \
-	filemgr.lo hunzip.lo replist.lo
+	hashmgr.lo hunspell.lo suggestmgr.lo phonet.lo filemgr.lo \
+	hunzip.lo replist.lo
 libhunspell_1_4_la_OBJECTS = $(am_libhunspell_1_4_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
 am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -403,12 +403,12 @@ top_srcdir = @top_srcdir@
 lib_LTLIBRARIES = libhunspell-1.4.la
 libhunspell_1_4_includedir = $(includedir)/hunspell
 libhunspell_1_4_la_SOURCES = affentry.cxx affixmgr.cxx csutil.cxx \
-		     dictmgr.cxx hashmgr.cxx hunspell.cxx \
+		     hashmgr.cxx hunspell.cxx \
 	             suggestmgr.cxx license.myspell license.hunspell \
 	             phonet.cxx filemgr.cxx hunzip.cxx replist.cxx
 
 libhunspell_1_4_include_HEADERS = affentry.hxx htypes.hxx affixmgr.hxx \
-	        csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx hunspell.h \
+	        csutil.hxx hunspell.hxx atypes.hxx hunspell.h \
 		suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx \
 		phonet.hxx filemgr.hxx hunzip.hxx w_char.hxx replist.hxx \
 		hunvisapi.h
@@ -416,7 +416,7 @@ libhunspell_1_4_include_HEADERS = affentry.hxx htypes.hxx affixmgr.hxx \
 libhunspell_1_4_la_DEPENDENCIES = utf_info.cxx
 libhunspell_1_4_la_LDFLAGS = -no-undefined
 AM_CXXFLAGS = $(CFLAG_VISIBILITY) -DBUILDING_LIBHUNSPELL
-EXTRA_DIST = hunspell.dsp makefile.mk README utf_info.cxx
+EXTRA_DIST = hunspell.dsp README utf_info.cxx
 all: all-am
 
 .SUFFIXES:
@@ -500,7 +500,6 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affentry.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affixmgr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csutil.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dictmgr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemgr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashmgr.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hunspell.Plo@am__quote@
diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx
index 58c11be..d6bb677 100644
--- a/src/hunspell/affixmgr.cxx
+++ b/src/hunspell/affixmgr.cxx
@@ -1320,7 +1320,6 @@ char* AffixMgr::prefix_check_morph(const char* word,
                                    int len,
                                    char in_compound,
                                    const FLAG needflag) {
-  char* st;
 
   char result[MAXLNLEN];
   result[0] = '\0';
@@ -1332,7 +1331,7 @@ char* AffixMgr::prefix_check_morph(const char* word,
   // first handle the special case of 0 length prefixes
   PfxEntry* pe = pStart[0];
   while (pe) {
-    st = pe->check_morph(word, len, in_compound, needflag);
+    char* st = pe->check_morph(word, len, in_compound, needflag);
     if (st) {
       mystrcat(result, st, MAXLNLEN);
       free(st);
@@ -1347,7 +1346,7 @@ char* AffixMgr::prefix_check_morph(const char* word,
 
   while (pptr) {
     if (isSubset(pptr->getKey(), word)) {
-      st = pptr->check_morph(word, len, in_compound, needflag);
+      char* st = pptr->check_morph(word, len, in_compound, needflag);
       if (st) {
         // fogemorpheme
         if ((in_compound != IN_CPD_NOT) ||
@@ -1374,8 +1373,6 @@ char* AffixMgr::prefix_check_twosfx_morph(const char* word,
                                           int len,
                                           char in_compound,
                                           const FLAG needflag) {
-  char* st;
-
   char result[MAXLNLEN];
   result[0] = '\0';
 
@@ -1386,7 +1383,7 @@ char* AffixMgr::prefix_check_twosfx_morph(const char* word,
   // first handle the special case of 0 length prefixes
   PfxEntry* pe = pStart[0];
   while (pe) {
-    st = pe->check_twosfx_morph(word, len, in_compound, needflag);
+    char* st = pe->check_twosfx_morph(word, len, in_compound, needflag);
     if (st) {
       mystrcat(result, st, MAXLNLEN);
       free(st);
@@ -1400,7 +1397,7 @@ char* AffixMgr::prefix_check_twosfx_morph(const char* word,
 
   while (pptr) {
     if (isSubset(pptr->getKey(), word)) {
-      st = pptr->check_twosfx_morph(word, len, in_compound, needflag);
+      char* st = pptr->check_twosfx_morph(word, len, in_compound, needflag);
       if (st) {
         mystrcat(result, st, MAXLNLEN);
         free(st);
@@ -1419,13 +1416,12 @@ char* AffixMgr::prefix_check_twosfx_morph(const char* word,
 
 // Is word a non compound with a REP substitution (see checkcompoundrep)?
 int AffixMgr::cpdrep_check(const char* word, int wl) {
-  const char* r;
 
   if ((wl < 2) || !numrep)
     return 0;
 
   for (int i = 0; i < numrep; i++) {
-    r = word;
+    const char* r = word;
     int lenp = strlen(reptable[i].pattern);
     // search every occurence of the pattern in the word
     while ((r = strstr(r, reptable[i].pattern)) != NULL) {
@@ -4638,11 +4634,11 @@ void AffixMgr::reverse_condition(std::string& piece) {
       return;
 
   int neg = 0;
-  for (std::string::iterator k = piece.begin() + piece.size() - 1; k >= piece.begin(); --k) {
+  for (std::string::reverse_iterator k = piece.rbegin(); k != piece.rend(); ++k) {
     switch (*k) {
       case '[': {
         if (neg)
-          *(k + 1) = '[';
+          *(k - 1) = '[';
         else
           *k = ']';
         break;
@@ -4650,20 +4646,20 @@ void AffixMgr::reverse_condition(std::string& piece) {
       case ']': {
         *k = '[';
         if (neg)
-          *(k + 1) = '^';
+          *(k - 1) = '^';
         neg = 0;
         break;
       }
       case '^': {
-        if (*(k + 1) == ']')
+        if (*(k - 1) == ']')
           neg = 1;
         else
-          *(k + 1) = *k;
+          *(k - 1) = *k;
         break;
       }
       default: {
         if (neg)
-          *(k + 1) = *k;
+          *(k - 1) = *k;
       }
     }
   }
diff --git a/src/hunspell/csutil.cxx b/src/hunspell/csutil.cxx
index c2f213a..b1473a3 100644
--- a/src/hunspell/csutil.cxx
+++ b/src/hunspell/csutil.cxx
@@ -2728,9 +2728,9 @@ int get_captype(const std::string& word, cs_info* csconv) {
 
 int get_captype_utf8(const std::vector<w_char>& word, int langnum) {
   // now determine the capitalization type of the first nl letters
-  int ncap = 0;
-  int nneutral = 0;
-  int firstcap = 0;
+  size_t ncap = 0;
+  size_t nneutral = 0;
+  size_t firstcap = 0;
   for (size_t i = 0; i < word.size(); ++i) {
     unsigned short idx = (word[i].h << 8) + word[i].l;
     if (idx != unicodetolower(idx, langnum))
diff --git a/src/hunspell/csutil.hxx b/src/hunspell/csutil.hxx
index 79e473a..ce7091d 100644
--- a/src/hunspell/csutil.hxx
+++ b/src/hunspell/csutil.hxx
@@ -149,8 +149,6 @@ LIBHUNSPELL_DLL_EXPORTED char* mystrcat(char* dest, const char* st, int max);
 
 // parse into tokens with char delimiter
 LIBHUNSPELL_DLL_EXPORTED char* mystrsep(char** sptr, const char delim);
-// parse into tokens with char delimiter
-LIBHUNSPELL_DLL_EXPORTED char* mystrsep2(char** sptr, const char delim);
 
 // replace pat by rep in word and return word
 LIBHUNSPELL_DLL_EXPORTED char* mystrrep(char* word,
diff --git a/src/hunspell/dictmgr.cxx b/src/hunspell/dictmgr.cxx
deleted file mode 100644
index 473c09a..0000000
--- a/src/hunspell/dictmgr.cxx
+++ /dev/null
@@ -1,216 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Hunspell, based on MySpell.
- *
- * The Initial Developers of the Original Code are
- * Kevin Hendricks (MySpell) and Németh László (Hunspell).
- * Portions created by the Initial Developers are Copyright (C) 2002-2005
- * the Initial Developers. All Rights Reserved.
- *
- * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno,
- * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád,
- * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter,
- * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls,
- * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdio.h>
-
-#include "dictmgr.hxx"
-#include "csutil.hxx"
-
-DictMgr::DictMgr(const char* dictpath, const char* etype) : numdict(0) {
-  // load list of etype entries
-  pdentry = (dictentry*)malloc(MAXDICTIONARIES * sizeof(struct dictentry));
-  if (pdentry) {
-    if (parse_file(dictpath, etype)) {
-      numdict = 0;
-      // no dictionary.lst found is okay
-    }
-  }
-}
-
-DictMgr::~DictMgr() {
-  dictentry* pdict = NULL;
-  if (pdentry) {
-    pdict = pdentry;
-    for (int i = 0; i < numdict; i++) {
-      if (pdict->lang) {
-        free(pdict->lang);
-        pdict->lang = NULL;
-      }
-      if (pdict->region) {
-        free(pdict->region);
-        pdict->region = NULL;
-      }
-      if (pdict->filename) {
-        free(pdict->filename);
-        pdict->filename = NULL;
-      }
-      pdict++;
-    }
-    free(pdentry);
-    pdentry = NULL;
-    pdict = NULL;
-  }
-  numdict = 0;
-}
-
-// read in list of etype entries and build up structure to describe them
-int DictMgr::parse_file(const char* dictpath, const char* etype) {
-  int i;
-  char line[MAXDICTENTRYLEN + 1];
-  dictentry* pdict = pdentry;
-
-  // open the dictionary list file
-  FILE* dictlst;
-  dictlst = myfopen(dictpath, "r");
-  if (!dictlst) {
-    return 1;
-  }
-
-  // step one is to parse the dictionary list building up the
-  // descriptive structures
-
-  // read in each line ignoring any that dont start with etype
-  while (fgets(line, MAXDICTENTRYLEN, dictlst)) {
-    mychomp(line);
-
-    /* parse in a dictionary entry */
-    if (strncmp(line, etype, 4) == 0) {
-      if (numdict < MAXDICTIONARIES) {
-        char* tp = line;
-        char* piece;
-        i = 0;
-        while ((piece = mystrsep(&tp, ' '))) {
-          if (*piece != '\0') {
-            switch (i) {
-              case 0:
-                break;
-              case 1:
-                pdict->lang = mystrdup(piece);
-                break;
-              case 2:
-                if (strcmp(piece, "ANY") == 0)
-                  pdict->region = mystrdup("");
-                else
-                  pdict->region = mystrdup(piece);
-                break;
-              case 3:
-                pdict->filename = mystrdup(piece);
-                break;
-              default:
-                break;
-            }
-            i++;
-          }
-          free(piece);
-        }
-        if (i == 4) {
-          numdict++;
-          pdict++;
-        } else {
-          switch (i) {
-            case 3:
-              free(pdict->region);
-              pdict->region = NULL;
-            /* FALLTHROUGH */
-            case 2:
-              free(pdict->lang);
-              pdict->lang = NULL;
-            default:
-              break;
-          }
-          fprintf(stderr, "dictionary list corruption in line \"%s\"\n", line);
-          fflush(stderr);
-        }
-      }
-    }
-  }
-  fclose(dictlst);
-  return 0;
-}
-
-// return text encoding of dictionary
-int DictMgr::get_list(dictentry** ppentry) {
-  *ppentry = pdentry;
-  return numdict;
-}
-
-// strip strings into token based on single char delimiter
-// acts like strsep() but only uses a delim char and not
-// a delim string
-
-char* DictMgr::mystrsep(char** stringp, const char delim) {
-  char* rv = NULL;
-  char* mp = *stringp;
-  size_t n = strlen(mp);
-  if (n > 0) {
-    char* dp = (char*)memchr(mp, (int)((unsigned char)delim), n);
-    if (dp) {
-      *stringp = dp + 1;
-      size_t nc = dp - mp;
-      rv = (char*)malloc(nc + 1);
-      if (rv) {
-        memcpy(rv, mp, nc);
-        *(rv + nc) = '\0';
-      }
-    } else {
-      rv = (char*)malloc(n + 1);
-      if (rv) {
-        memcpy(rv, mp, n);
-        *(rv + n) = '\0';
-        *stringp = mp + n;
-      }
-    }
-  }
-  return rv;
-}
-
-// replaces strdup with ansi version
-char* DictMgr::mystrdup(const char* s) {
-  char* d = NULL;
-  if (s) {
-    int sl = strlen(s) + 1;
-    d = (char*)malloc(sl);
-    if (d)
-      memcpy(d, s, sl);
-  }
-  return d;
-}
-
-// remove cross-platform text line end characters
-void DictMgr::mychomp(char* s) {
-  int k = strlen(s);
-  if ((k > 0) && ((*(s + k - 1) == '\r') || (*(s + k - 1) == '\n')))
-    *(s + k - 1) = '\0';
-  if ((k > 1) && (*(s + k - 2) == '\r'))
-    *(s + k - 2) = '\0';
-}
diff --git a/src/hunspell/dictmgr.hxx b/src/hunspell/dictmgr.hxx
deleted file mode 100644
index 98134c3..0000000
--- a/src/hunspell/dictmgr.hxx
+++ /dev/null
@@ -1,76 +0,0 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Hunspell, based on MySpell.
- *
- * The Initial Developers of the Original Code are
- * Kevin Hendricks (MySpell) and Németh László (Hunspell).
- * Portions created by the Initial Developers are Copyright (C) 2002-2005
- * the Initial Developers. All Rights Reserved.
- *
- * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno,
- * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád,
- * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter,
- * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls,
- * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef _DICTMGR_HXX_
-#define _DICTMGR_HXX_
-
-#include "hunvisapi.h"
-
-#define MAXDICTIONARIES 100
-#define MAXDICTENTRYLEN 1024
-
-struct dictentry {
-  char* filename;
-  char* lang;
-  char* region;
-};
-
-class LIBHUNSPELL_DLL_EXPORTED DictMgr {
- private:
-  DictMgr(const DictMgr&);
-  DictMgr& operator=(const DictMgr&);
-
- private:
-  int numdict;
-  dictentry* pdentry;
-
- public:
-  DictMgr(const char* dictpath, const char* etype);
-  ~DictMgr();
-  int get_list(dictentry** ppentry);
-
- private:
-  int parse_file(const char* dictpath, const char* etype);
-  char* mystrsep(char** stringp, const char delim);
-  char* mystrdup(const char* s);
-  void mychomp(char* s);
-};
-
-#endif
diff --git a/src/hunspell/filemgr.cxx b/src/hunspell/filemgr.cxx
index cbe41c5..2218bc7 100644
--- a/src/hunspell/filemgr.cxx
+++ b/src/hunspell/filemgr.cxx
@@ -89,13 +89,9 @@ FileMgr::FileMgr(const char* file, const char* key) : hin(NULL), linenum(0) {
   fin = myfopen(file, "r");
   if (!fin) {
     // check hzipped file
-    char* st = (char*)malloc(strlen(file) + strlen(HZIP_EXTENSION) + 1);
-    if (st) {
-      strcpy(st, file);
-      strcat(st, HZIP_EXTENSION);
-      hin = new Hunzip(st, key);
-      free(st);
-    }
+    std::string st(file);
+    st.append(HZIP_EXTENSION);
+    hin = new Hunzip(st.c_str(), key);
   }
   if (!fin && !hin)
     fail(MSG_OPEN, file);
diff --git a/src/hunspell/hunspell.cxx b/src/hunspell/hunspell.cxx
index 1149158..f7c1581 100644
--- a/src/hunspell/hunspell.cxx
+++ b/src/hunspell/hunspell.cxx
@@ -651,7 +651,6 @@ struct hentry* Hunspell::checkword(const char* w, int* info, char** root) {
   if (ignoredchars != NULL) {
     w2.assign(w);
     if (utf8) {
-      int ignoredchars_utf16_len;
       const std::vector<w_char>& ignoredchars_utf16 =
           pAMgr->get_ignore_utf16();
       remove_ignored_chars_utf(w2, ignoredchars_utf16);
@@ -1863,7 +1862,6 @@ int Hunspell::suffix_suggest(char*** slst, const char* root_word) {
   if (ignoredchars != NULL) {
     w2.assign(root_word);
     if (utf8) {
-      int ignoredchars_utf16_len;
       const std::vector<w_char>& ignoredchars_utf16 =
           pAMgr->get_ignore_utf16();
       remove_ignored_chars_utf(w2, ignoredchars_utf16);
diff --git a/src/hunspell/hunspell.dsp b/src/hunspell/hunspell.dsp
index c182621..660d807 100644
--- a/src/hunspell/hunspell.dsp
+++ b/src/hunspell/hunspell.dsp
@@ -97,10 +97,6 @@ SOURCE=.\csutil.cxx
 # End Source File
 # Begin Source File
 
-SOURCE=.\dictmgr.cxx
-# End Source File
-# Begin Source File
-
 SOURCE=.\hashmgr.cxx
 # End Source File
 # Begin Source File
@@ -137,10 +133,6 @@ SOURCE=.\csutil.hxx
 # End Source File
 # Begin Source File
 
-SOURCE=.\dictmgr.hxx
-# End Source File
-# Begin Source File
-
 SOURCE=.\hashmgr.hxx
 # End Source File
 # Begin Source File
diff --git a/src/hunspell/makefile.mk b/src/hunspell/makefile.mk
deleted file mode 100644
index ca8ce42..0000000
--- a/src/hunspell/makefile.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#*************************************************************************
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-#*************************************************************************
-
-PRJ = ../../../../../..
-
-PRJNAME	= hunspell
-TARGET	= hunspell
-LIBTARGET=YES
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-UWINAPILIB=
-
-#----- Settings ---------------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-CFLAGS+=-I..$/..$/
-CDEFS+=-DOPENOFFICEORG
-
-SLOFILES=	\
-		$(SLO)$/affentry.obj \
-		$(SLO)$/affixmgr.obj \
-		$(SLO)$/dictmgr.obj \
-		$(SLO)$/csutil.obj \
-		$(SLO)$/hashmgr.obj \
-		$(SLO)$/suggestmgr.obj \
-		$(SLO)$/phonet.obj \
-		$(SLO)$/hunzip.obj \
-		$(SLO)$/filemgr.obj \
-		$(SLO)$/replist.obj \
-		$(SLO)$/hunspell.obj
-
-LIB1TARGET= $(SLB)$/lib$(TARGET).lib
-LIB1ARCHIV= $(LB)/lib$(TARGET).a
-LIB1OBJFILES= $(SLOFILES)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/src/hunspell/phonet.cxx b/src/hunspell/phonet.cxx
index 4d5e578..17350e7 100644
--- a/src/hunspell/phonet.cxx
+++ b/src/hunspell/phonet.cxx
@@ -78,7 +78,7 @@ std::string phonet(const std::string& inword, phonetable& parms) {
   const char* s;
   typedef unsigned char uchar;
 
-  int len = inword.size();
+  size_t len = inword.size();
   if (len > MAXPHONETUTF8LEN)
     return std::string();
   char word[MAXPHONETUTF8LEN + 1];
diff --git a/src/hunspell/suggestmgr.cxx b/src/hunspell/suggestmgr.cxx
index e41d7dc..a6c83d5 100644
--- a/src/hunspell/suggestmgr.cxx
+++ b/src/hunspell/suggestmgr.cxx
@@ -467,7 +467,6 @@ int SuggestMgr::replchars(char** wlst,
                           int ns,
                           int cpdsuggest) {
   std::string candidate;
-  int lenr, lenp;
   int wl = strlen(word);
   if (wl < 2 || !pAMgr)
     return ns;
@@ -477,8 +476,6 @@ int SuggestMgr::replchars(char** wlst,
     return ns;
   for (int i = 0; i < numrep; i++) {
     const char* r = word;
-    lenr = strlen(reptable[i].pattern2);
-    lenp = strlen(reptable[i].pattern);
     // search every occurence of the pattern in the word
     while ((r = strstr(r, reptable[i].pattern)) != NULL &&
            (!reptable[i].end || strlen(r) == strlen(reptable[i].pattern)) &&
@@ -486,6 +483,7 @@ int SuggestMgr::replchars(char** wlst,
       candidate.assign(word);
       candidate.resize(r - word);
       candidate.append(reptable[i].pattern2);
+      int lenp = strlen(reptable[i].pattern);
       candidate.append(r + lenp);
       ns = testsug(wlst, candidate.c_str(), candidate.size(), ns, cpdsuggest, NULL,
                    NULL);
diff --git a/src/win_api/Makefile.cygwin b/src/win_api/Makefile.cygwin
index 010ee65..2caef9d 100644
--- a/src/win_api/Makefile.cygwin
+++ b/src/win_api/Makefile.cygwin
@@ -114,7 +114,6 @@ csutil.o: license.hunspell config.h license.myspell csutil.hxx w_char.hxx
 csutil.o: atypes.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
 csutil.o: langnum.hxx utf_info.cxx
 csutil.o: w_char.hxx
-dictmgr.o: dictmgr.hxx
 example.o: hunspell.hxx hashmgr.hxx htypes.hxx filemgr.hxx hunzip.hxx
 example.o: affixmgr.hxx atypes.hxx w_char.hxx baseaffix.hxx phonet.hxx
 filemgr.o: hunzip.hxx
diff --git a/src/win_api/libhunspell.vcproj b/src/win_api/libhunspell.vcproj
index e651797..24e217e 100644
--- a/src/win_api/libhunspell.vcproj
+++ b/src/win_api/libhunspell.vcproj
@@ -408,14 +408,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\hunspell\dictmgr.cxx"
-				>
-			</File>
-			<File
-				RelativePath="..\hunspell\dictmgr.hxx"
-				>
-			</File>
-			<File
 				RelativePath="..\hunspell\filemgr.cxx"
 				>
 			</File>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/hunspell.git


Reply to: