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

[hunspell] 40/98: Imported Upstream version 1.1.9



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

rene pushed a commit to branch master
in repository hunspell.

commit a821573d97eeecf43ce708fa7842fce5b7e77911
Author: Rene Engelhard <rene@debian.org>
Date:   Thu Apr 21 14:45:16 2016 +0200

    Imported Upstream version 1.1.9
---
 ChangeLog                   |  48 ++++-
 NEWS                        |  11 ++
 THANKS                      |   4 +
 TODO                        |   3 +-
 configure                   |  20 +-
 configure.ac                |   4 +-
 man/hunspell.1              |   9 +-
 man/hunspell.4              |  18 +-
 src/hunspell/affixmgr.cxx   |   1 +
 src/hunspell/hashmgr.cxx    |  94 ++++-----
 src/hunspell/hashmgr.hxx    |   2 +
 src/parsers/htmlparser.cxx  |   6 +-
 src/parsers/latexparser.cxx |   6 +-
 src/parsers/manparser.cxx   |   7 +-
 src/parsers/testparser.cxx  |   1 +
 src/parsers/textparser.cxx  |  96 +++++++++-
 src/parsers/textparser.hxx  |   9 +-
 src/tools/hunspell.cxx      |   7 +
 src/win_api/Hunspell.rc     |  32 ++++
 src/win_api/Hunspell.sln    |  26 +++
 src/win_api/Hunspell.vcproj | 458 ++++++++++++++++++++++++++++++++++++++++++++
 src/win_api/Makefile.am     |   3 +-
 src/win_api/Makefile.in     |   4 +-
 src/win_api/config.h        | 214 +++++++++++++++++++++
 tests/1706659.aff           |  13 ++
 tests/1706659.dic           |   4 +
 tests/1706659.test          |   4 +
 tests/1706659.wrong         |   3 +
 tests/Makefile.am           |  18 +-
 tests/Makefile.in           |  18 +-
 tests/colons_in_words.aff   |   3 +
 tests/colons_in_words.dic   |   4 +
 tests/colons_in_words.test  |   4 +
 tests/digits_in_words.aff   |   9 +
 tests/digits_in_words.dic   |  12 ++
 tests/digits_in_words.test  |   4 +
 tests/digits_in_words.wrong |   1 +
 37 files changed, 1086 insertions(+), 94 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ef72bb7..fb54adf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,46 @@
-2007-07-16 Németh László <nemeth at OOo>:	
+2007-07-25 Németh László <nemeth at OOo>:
+	* parsers/*.cxx: Hunspell executable recognises and accepts URLs,
+	  e-mail addresses, directory paths, reported by Jeppe Bundsgaard.
+	* src/tools/hunspell.cxx: --check-url: new option of Hunspell program.
+	  Use --check-url, if you want check URLs, e-mail addresses and paths.
+
+	* parsers/textparser.cxx: strip colon at end of words for Finnish
+	  and Swedish (colon may be in words in Finnish and Swedish).
+	  Problem reported by Lars Aronsson.
+	* tests/colons_in_words.*: test data
+
+	* tests/digits_in_words.*: example for using digits in words
+ 	  (eg. 1-jährig, 112-jährig etc. in German), reported by Lars Aronsson.
+
+	* hashmgr.cxx: Hunspell accepts allcaps forms of mixed case
+	  words of personal dictionaries (+allcaps custom dictionary words with
+	  allcaps affixes).
+	  Sf.net Bug ID 1755272, reported by Ellis Miller.
+
+	* hashmgr.cxx: fix small memory leaks with alias compressed
+	  dictionaries (free flag vectors of affixed personal dictionary words
+	  and flag vectors of hidden capitalized forms of mixed case and
+	  allcaps words).
+
+	* affixmgr.cxx: fix COMPOUNDRULE checking with affixed compounds.
+	  Sf.net Bug ID 1706659, reported by Björn Jacke.
+
+	* tools/hunspell.cxx: add missing return to save_privdic().
+	
+	* man/hunspell.4: add information about affixation of personal words:
+	"Personal dictionaries are simple word lists, but with optional
+         word patterns for affixation, separated by a slash:
+
+         foo
+         Foo/Simpson
+
+         In this example, "foo" and "Foo" are personal words, plus Foo
+         will be recognised with affixes of Simpson (Foo's etc.)."
+
+2007-07-18 Németh László <nemeth at OOo>:
+	* src/win_api/: add missing resource files, reported by Ingo H. De Boer.
+
+2007-07-16 Németh László <nemeth at OOo>:
 	* hunspell.cxx: fix dot removing from UTF-8 encoded words in cleanword2()
 	  (Capitalised words with dots, as "Something." were not recognised
 	  using Unicode encoded dictionaries.)
@@ -41,7 +83,7 @@
 	* {dictmgr,csutil,hashmgr,suggestmgr}.cxx: check memory allocation.
 	  Sf.net Bug ID 1747507, based on the patch by Jose da Silva.
 
-2007-07-13 Ingo H. De Boer <idb_winshell at SF.net>: 
+2007-07-13 Ingo H. De Boer <idb_winshell at SF.net>:
 	* atypes.cxx: fix Visual C compatibility: Using
 	"HUNSPELL_WARNING(a,b,...} {}" macro instead of empty "X(a,b...)".
 	
@@ -51,7 +93,7 @@
 	Sf.net Bug ID 1753802, patch by Ingo H. de Boer.
 	See also Sf.net Bug ID 1751406, patch by Mike Tian-Jian Jiang.
 
-2007-07-09 Caolan McNamara <cmc at OO.o>: 
+2007-07-09 Caolan McNamara <cmc at OO.o>:
 	* {hunspell,hashmgr,affentry}.cxx: fix warnings of Coverity program
 	  analyzer. Sf.net Bug ID, 1750219.
 
diff --git a/NEWS b/NEWS
index b5e12d0..2d84c73 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
+2007-07-25: Hunspell 1.1.9 release:
+  - better tokenization:
+    - for URLs, mail addresses and directory paths (default: skip these tokens)
+    - for colons in words (for Finnish and Swedish)
+  
+  - new examples:
+    - affixation of personal dictionary words
+    - digits in words
+
+  - bug fixes (see ChangeLog)
+
 2007-07-16: Hunspell 1.1.8 release:
   - better Mac OS X/Cygwin and Windows compatibility
 
diff --git a/THANKS b/THANKS
index 02bb5e3..cbc4fc9 100644
--- a/THANKS
+++ b/THANKS
@@ -1,9 +1,11 @@
 Many thanks to the following contributors and supporters:
 
+Lars Aronsson
 Bencsáth Boldizsár
 Bíró Árpád
 Ingo H. de Boer
 Simon Brouwer
+Jeppe Bundsgaard
 Dmitri Gabinski
 Dvornik László
 David Einstein
@@ -34,6 +36,7 @@ Marot at SF dot net
 Caolan McNamara
 Michael Meeks
 Moheb Mekhaiel
+Ellis Miller
 Giuseppe Modugno
 Bram Moolenaar
 Daniel Naber
@@ -48,6 +51,7 @@ Erdal Ronahi
 Bernhard Rosenkraenzer
 Sarlós Tamás
 Thobias Schlemmer
+Jose da Silva
 Munzir Taha
 Tímár András
 Tonal at OOo
diff --git a/TODO b/TODO
index 766a8e0..51d589c 100644
--- a/TODO
+++ b/TODO
@@ -1,9 +1,8 @@
+* sounds-alike suggestions
 * shared dictionaries for multi-user environment
 * new data structure for morphological analysis
 * implement morphological generation
 * improve compound handling
 * implement complete stemming
-* check Unicode user interface (for Hunspell program)
-* handle different encodings (for Hunspell program)
 * Unicode unmunch (munch)
 * forbiddenword and pseudoword support in unmunch 
diff --git a/configure b/configure
index 0b3be98..eedcf51 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for hunspell 1.1.8.
+# Generated by GNU Autoconf 2.59 for hunspell 1.1.9.
 #
 # Report bugs to <nemeth@openoffice.org>.
 #
@@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='hunspell'
 PACKAGE_TARNAME='hunspell'
-PACKAGE_VERSION='1.1.8'
-PACKAGE_STRING='hunspell 1.1.8'
+PACKAGE_VERSION='1.1.9'
+PACKAGE_STRING='hunspell 1.1.9'
 PACKAGE_BUGREPORT='nemeth@openoffice.org'
 
 ac_unique_file="config.h.in"
@@ -954,7 +954,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures hunspell 1.1.8 to adapt to many kinds of systems.
+\`configure' configures hunspell 1.1.9 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1021,7 +1021,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of hunspell 1.1.8:";;
+     short | recursive ) echo "Configuration of hunspell 1.1.9:";;
    esac
   cat <<\_ACEOF
 
@@ -1171,7 +1171,7 @@ fi
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-hunspell configure 1.1.8
+hunspell configure 1.1.9
 generated by GNU Autoconf 2.59
 
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1185,7 +1185,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by hunspell $as_me 1.1.8, which was
+It was created by hunspell $as_me 1.1.9, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   $ $0 $@
@@ -1916,7 +1916,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=hunspell
- VERSION=1.1.8
+ VERSION=1.1.9
 
 
 cat >>confdefs.h <<_ACEOF
@@ -23886,7 +23886,7 @@ _ASBOX
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by hunspell $as_me 1.1.8, which was
+This file was extended by hunspell $as_me 1.1.9, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -23949,7 +23949,7 @@ _ACEOF
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-hunspell config.status 1.1.8
+hunspell config.status 1.1.9
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/configure.ac b/configure.ac
index 4e2e38c..53d1ac5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ m4_pattern_allow
 
 
 AC_PREREQ(2.59)
-AC_INIT([hunspell],[1.1.8],[nemeth@openoffice.org])
+AC_INIT([hunspell],[1.1.9],[nemeth@openoffice.org])
 
 AC_CANONICAL_SYSTEM
 case "$host" in
@@ -13,7 +13,7 @@ arm*) XFAILED="flagutf8.test maputf.test";;
 esac
 AC_SUBST(XFAILED)
 
-AM_INIT_AUTOMAKE(hunspell, 1.1.8)
+AM_INIT_AUTOMAKE(hunspell, 1.1.9)
 HUNSPELL_VERSION_MAJOR=`echo $VERSION | cut -d"." -f1`
 HUNSPELL_VERSION_MINOR=`echo $VERSION | cut -d"." -f2`
 AC_SUBST(HUNSPELL_VERSION_MAJOR)
diff --git a/man/hunspell.1 b/man/hunspell.1
index 5e2e882..1ec76ca 100644
--- a/man/hunspell.1
+++ b/man/hunspell.1
@@ -261,6 +261,9 @@ in output lines beginning with '*', '+', and '\-', which simplifies
 interaction for some programs.
 
 .TP
+.B \--check-url
+Check URLs, e-mail addresses and directory paths.
+.TP
 .B \-d " dic"
 Path of affix and dic files, without file extension.
 .TP
@@ -269,14 +272,14 @@ Path of affix and dic files, without file extension.
 .B \-h, \-\-help
 Short help.
 .TP
-.B \-p " custom_dictionary"
-Set path of custom dictionary.
+.B \-p " personal_dictionary"
+Set path of personal dictionary.
 Default is $HOME/.hunspell_default.
 Setting
 .I \-d
 or  the
 .I DICTIONARY
-environmental variable, custom dictionary will be
+environmental variable, personal dictionary will be
 .BR $HOME/.hunspell_dicname
 .TP
 .B \-u
diff --git a/man/hunspell.4 b/man/hunspell.4
index 472879e..ef25d5f 100644
--- a/man/hunspell.4
+++ b/man/hunspell.4
@@ -22,6 +22,21 @@ by tabulator.
 
 Morphological desciptions have custom format.
 
+Personal dictionaries are simple word lists, but with optional
+word patterns for affixation, separated by a slash:
+
+.PP
+.RS
+.nf
+foo
+Foo/Simpson
+.fi
+.RE
+.PP
+
+In this example, "foo" and "Foo" are personal words, plus Foo
+will be recognised with affixes of Simpson (Foo's etc.).
+
 An affix file (*.aff) may contain a lot of optional attributes.
 For example,
 .B SET
@@ -1020,9 +1035,6 @@ D
 condition characters, and sorted UTF-16 lists for other Unicode
 characters of condition patterns.
 
-Hunspell has supported only the first 65536 characters (Basic Multilingual Plane)
-of Unicode Standard, yet.
-
 .SH "SEE ALSO"
 .B hunspell (1),
 .B ispell (1),
diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx
index 033c6e7..d114924 100644
--- a/src/hunspell/affixmgr.cxx
+++ b/src/hunspell/affixmgr.cxx
@@ -1768,6 +1768,7 @@ struct hentry * AffixMgr::compound_check(const char * word, int len,
             if (!rv && numdefcpd && words) {
                 rv = affix_check((word+i),strlen(word+i), 0, IN_CPD_END);
                 if (rv && defcpd_check(&words, wnum + 1, rv, NULL, 1)) return rv;
+                rv = NULL;
             }
 
             // check non_compound flag in suffix and prefix
diff --git a/src/hunspell/hashmgr.cxx b/src/hunspell/hashmgr.cxx
index 90bb5f7..1a137b1 100644
--- a/src/hunspell/hashmgr.cxx
+++ b/src/hunspell/hashmgr.cxx
@@ -70,7 +70,7 @@ HashMgr::~HashMgr()
       struct hentry * pt = &tableptr[i];
       struct hentry * nt = NULL;
       if (pt) {
-        if (pt->astr && !aliasf) free(pt->astr);
+        if (pt->astr && (!aliasf || TESTAFF(pt->astr, ONLYUPCASEFLAG, pt->alen))) free(pt->astr);
         if (pt->word) free(pt->word);
 #ifdef HUNSPELL_EXPERIMENTAL
         if (pt->description && !aliasm) free(pt->description);
@@ -79,7 +79,7 @@ HashMgr::~HashMgr()
       }
       while(pt) {
         nt = pt->next;
-        if (pt->astr && !aliasf) free(pt->astr);
+        if (pt->astr && (!aliasf || TESTAFF(pt->astr, ONLYUPCASEFLAG, pt->alen))) free(pt->astr);
         if (pt->word) free(pt->word);
 #ifdef HUNSPELL_EXPERIMENTAL
         if (pt->description && !aliasm) free(pt->description);
@@ -256,6 +256,37 @@ desc
     return 0;
 }     
 
+int HashMgr::add_hidden_capitalized_word(char * word, int wl,
+    unsigned short * flags, int al, char * dp)
+{
+    // add inner capitalized forms to handle the following allcap forms:
+    // Mixed caps: OpenOffice.org -> OPENOFFICE.ORG
+    // Allcaps with suffixes: CIA's -> CIA'S
+    int captype = utf8 ? get_captype_utf8(word, wl, langnum) : get_captype(word, wl, csconv);
+    if (((captype == HUHCAP) || (captype == HUHINITCAP) ||
+      ((captype == ALLCAP) && (flags != NULL))) &&
+      !((flags != NULL) && TESTAFF(flags, forbiddenword, al))) {
+          unsigned short * flags2 = (unsigned short *) malloc (sizeof(unsigned short) * (al+1));
+	  if (!flags2) return 1;
+          if (al) memcpy(flags2, flags, al * sizeof(unsigned short));
+          flags2[al] = ONLYUPCASEFLAG;
+          if (utf8) {
+              char st[MAXDELEN];
+              w_char w[MAXDELEN];
+              int wlen = u8_u16(w, MAXDELEN, word);
+              mkallsmall_utf(w, wlen, langnum);
+              mkallcap_utf(w, 1, langnum);
+              u16_u8(st, MAXDELEN, w, wlen);
+              return add_word(st,wl,flags2,al+1,dp, true);
+           } else {
+               mkallsmall(word, csconv);
+               mkinitcap(word, csconv);
+               return add_word(word,wl,flags2,al+1,dp, true);
+           }
+    }
+    return 0;
+}
+
 // add a custom dic. word to the hash table (public)
 int HashMgr::put_word(const char * word, int wl, char * aff)
 {
@@ -268,19 +299,23 @@ int HashMgr::put_word(const char * word, int wl, char * aff)
         flags = NULL;
     }
     add_word(word, wl, flags, al, NULL, false);
-    return 0;
+    return add_hidden_capitalized_word((char *) word, wl, flags, al, NULL);
 }
 
 int HashMgr::put_word_pattern(const char * word, int wl, const char * pattern)
 {
-    unsigned short * flags;
     struct hentry * dp = lookup(pattern);
-    if (!dp || !dp->astr) return 1;
-    flags = (unsigned short *) malloc (dp->alen * sizeof(short));
-    if (flags) {
-	memcpy((void *) flags, (void *) dp->astr, dp->alen * sizeof(short));
-	add_word(word, wl, flags, dp->alen, NULL, false);
-        return 0;
+    if (dp && dp->astr) {
+	if (aliasf) {
+	    add_word(word, wl, dp->astr, dp->alen, NULL, false);	
+	} else {
+    	    unsigned short * flags = (unsigned short *) malloc (dp->alen * sizeof(short));
+	    if (flags) {
+		memcpy((void *) flags, (void *) dp->astr, dp->alen * sizeof(short));
+		add_word(word, wl, flags, dp->alen, NULL, false);
+	    } else return 1;
+	}
+    	return add_hidden_capitalized_word((char *) word, wl, dp->astr, dp->alen, NULL);
     }
     return 1;
 }
@@ -318,7 +353,6 @@ int HashMgr::load_tables(const char * tpath)
   char * ap;
   char * dp;
   unsigned short * flags;
-  int captype;
 
   // raw dictionary - munched file
   FILE * rawdict = fopen(tpath, "r");
@@ -405,44 +439,12 @@ int HashMgr::load_tables(const char * tpath)
     }
 
     wl = strlen(ts);
-
-    // add the word and its index
-    if (add_word(ts,wl,flags,al,dp, false)) {
+    // add the word and its index plus its capitalized form optionally
+    if (add_word(ts,wl,flags,al,dp, false) ||
+	add_hidden_capitalized_word(ts, wl, flags, al, dp)) {
 	fclose(rawdict);
 	return 5;
     }
-
-    // add inner capitalized forms to handle the following allcap forms:
-    // Mixed caps: OpenOffice.org -> OPENOFFICE.ORG
-    // Allcaps with suffixes: CIA's -> CIA'S
-    captype = utf8 ? get_captype_utf8(ts, wl, langnum) : get_captype(ts, wl, csconv);
-    if (((captype == HUHCAP) || (captype == HUHINITCAP) ||
-      ((captype == ALLCAP) && (flags != NULL))) &&
-      !((flags != NULL) && TESTAFF(flags, forbiddenword, al))) {
-          unsigned short * flags2 = (unsigned short *) malloc (sizeof(unsigned short) * (al+1));
-	  if (!flags2) return 6;
-          if (al) memcpy(flags2, flags, al * sizeof(unsigned short));
-          flags2[al] = ONLYUPCASEFLAG;
-          if (utf8) {
-              char st[MAXDELEN];
-              w_char w[MAXDELEN];
-              int wlen = u8_u16(w, MAXDELEN, ts);
-              mkallsmall_utf(w, wlen, langnum);
-              mkallcap_utf(w, 1, langnum);
-              u16_u8(st, MAXDELEN, w, wlen);
-              if (add_word(st,wl,flags2,al+1,dp, true)) {
-	        fclose(rawdict);
-                return 5;
-              }
-           } else {
-               mkallsmall(ts, csconv);
-               mkinitcap(ts, csconv);
-               if (add_word(ts,wl,flags2,al+1,dp, true)) {
-	         fclose(rawdict);
-        	 return 5;
-               }
-           }
-    }
   }
  
   fclose(rawdict);
diff --git a/src/hunspell/hashmgr.hxx b/src/hunspell/hashmgr.hxx
index b33b026..6b9641e 100644
--- a/src/hunspell/hashmgr.hxx
+++ b/src/hunspell/hashmgr.hxx
@@ -56,6 +56,8 @@ private:
     const char * desc, bool onlyupcase);
   int load_config(const char * affpath);
   int parse_aliasf(char * line, FILE * af);
+  int add_hidden_capitalized_word(char * word, int wl,
+    unsigned short * flags, int al, char * dp);
 #ifdef HUNSPELL_EXPERIMENTAL
   int parse_aliasm(char * line, FILE * af);
 #endif
diff --git a/src/parsers/htmlparser.cxx b/src/parsers/htmlparser.cxx
index c475466..06ead69 100644
--- a/src/parsers/htmlparser.cxx
+++ b/src/parsers/htmlparser.cxx
@@ -106,10 +106,8 @@ char * HTMLParser::next_token()
 				head += strlen(latin1);
 			} else if (! is_wordchar(line[actual] + head)) {
 				state = prevstate;
-				char * t = (char *) malloc(head - token + 1);
-				t[head - token] = '\0';
-				if (t) return strncpy(t, line[actual] + token, head - token); 
-				fprintf(stderr,"Error - Insufficient Memory\n");
+				char * t = alloc_token(token, &head);
+				if (t) return t;
 			}
 			break;
 		case ST_TAG: // comment, labels, etc
diff --git a/src/parsers/latexparser.cxx b/src/parsers/latexparser.cxx
index eecbede..4b0a326 100644
--- a/src/parsers/latexparser.cxx
+++ b/src/parsers/latexparser.cxx
@@ -166,10 +166,8 @@ char * LaTeXParser::next_token()
 		case 1: // wordchar
 			if (! is_wordchar(line[actual] + head)) {
 				state = 0;
-				char * t = (char *) malloc(head - token + 1);
-				t[head - token] = '\0';
-				if (t) return strncpy(t, line[actual] + token, head - token); 
-				fprintf(stderr,"Error - Insufficient Memory\n");
+				char * t = alloc_token(token, &head);
+				if (t) return t;
 			}
 			break;
 		case 2: // comment, labels, etc
diff --git a/src/parsers/manparser.cxx b/src/parsers/manparser.cxx
index 1261a86..25858da 100644
--- a/src/parsers/manparser.cxx
+++ b/src/parsers/manparser.cxx
@@ -17,7 +17,6 @@ ManParser::ManParser() {
 ManParser::ManParser(const char * wordchars)
 {
 	init(wordchars);
-	// wordcharacters[('/' + 256) % 256] = 1; // for paths
 }
 
 ManParser::ManParser(unsigned short * wordchars, int len)
@@ -58,10 +57,8 @@ char * ManParser::next_token()
 		case 3: // wordchar
 			if (! is_wordchar(line[actual] + head)) {
 				state = 2;
-				char * t = (char *) malloc(head - token + 1);
-				t[head - token] = '\0';
-				if (t) return strncpy(t, line[actual] + token, head - token); 
-				fprintf(stderr,"Error - Insufficient Memory\n");
+				char * t = alloc_token(token, &head);
+				if (t) return t;
 			}
 			break;
 		}
diff --git a/src/parsers/testparser.cxx b/src/parsers/testparser.cxx
index c0cb913..7a394cd 100644
--- a/src/parsers/testparser.cxx
+++ b/src/parsers/testparser.cxx
@@ -38,6 +38,7 @@ main(int argc, char** argv)
     while(fgets(buf,MAXLNLEN,f)) {
       fprintf(stdout,"---------------------------------------\n");
       p->put_line(buf);
+      p->set_url_checking(1);
       while ((next=p->next_token())) {
           fprintf(stdout,"token: %s\n",next);
 	  free(next);
diff --git a/src/parsers/textparser.cxx b/src/parsers/textparser.cxx
index 97037b4..b691262 100644
--- a/src/parsers/textparser.cxx
+++ b/src/parsers/textparser.cxx
@@ -99,9 +99,11 @@ void TextParser::init(const char * wordchars)
 	token = 0;
 	state = 0;
         utf8 = 0;
+        checkurl = 0;
 	unsigned int j;
-	for (j = 0; j < 256; j++)
+	for (j = 0; j < 256; j++) {
 		wordcharacters[j] = 0;
+	}
         if (!wordchars) wordchars = "qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM";
 	for (j = 0; j < strlen(wordchars); j++) {
 		wordcharacters[(wordchars[j] + 256) % 256] = 1;
@@ -118,6 +120,7 @@ void TextParser::init(unsigned short * wc, int len)
 	token = 0;
 	state = 0;
 	utf8 = 1;
+	checkurl = 0;
         wordchars_utf16 = wc;
         wclen = len;
 }
@@ -141,6 +144,7 @@ void TextParser::put_line(char * word)
 	strcpy(line[actual], word);
 	token = 0;
 	head = 0;
+	check_urls();
 }
 
 char * TextParser::get_prevline(int n)
@@ -175,10 +179,8 @@ char * TextParser::next_token()
 				head += strlen(latin1);
 			} else if (! is_wordchar(line[actual] + head)) {
 				state = 0;
-				char * t = (char *) malloc(head - token + 1);
-				t[head - token] = '\0';
-				if (t) return strncpy(t, line[actual] + token, head - token); 
-				fprintf(stderr,"Error - Insufficient Memory\n");
+				char * t = alloc_token(token, &head);
+				if (t) return t;
 			}
 			break;
 		}
@@ -203,3 +205,87 @@ int TextParser::change_token(const char * word)
 	}
 	return 0;
 }
+
+void TextParser::check_urls()
+{
+	int url_state = 0;
+	int url_head = 0;
+	int url_token = 0;
+	int url = 0;
+	for (;;) {
+		switch (url_state)
+		{
+		case 0: // non word chars
+			if (is_wordchar(line[actual] + url_head)) {
+				url_state = 1;
+				url_token = url_head;
+			// Unix path
+			} else if (*(line[actual] + url_head) == '/') {
+				url_state = 1;
+				url_token = url_head;
+				url = 1;
+			}
+			break;
+		case 1: // wordchar
+			char ch = *(line[actual] + url_head);
+ 			// e-mail address
+			if ((ch == '@') ||
+			    // MS-DOS, Windows path
+			    (strncmp(line[actual] + url_head, ":\\", 2) == 0) ||
+			    // URL
+			    (strncmp(line[actual] + url_head, "://", 3) == 0)) {
+				url = 1;
+			} else if (! (is_wordchar(line[actual] + url_head) ||
+			  (ch == '-') || (ch == '_') || (ch == '\\') ||
+			  (ch == '.') || (ch == ':') || (ch == '/') ||
+			  (ch == '~') || (ch == '%') || (ch == '*') ||
+			  (ch == '$') || (ch == '[') || (ch == ']') ||
+			  (ch == '?') || (ch == '!') ||
+			  ((ch >= '0') && (ch <= '9')))) {
+				url_state = 0;
+				if (url == 1) {
+					for (int i = url_token; i < url_head; i++) {
+						*(urlline + i) = 1;
+					}
+				}
+				url = 0;
+			}
+			break;
+		}
+		*(urlline + url_head) = 0;
+                if (next_char(line[actual], &url_head)) return;
+	}
+}
+
+int TextParser::get_url(int token_pos, int * head)
+{
+	for (int i = *head; urlline[i] && *(line[actual]+i); i++, (*head)++);
+	return checkurl ? 0 : urlline[token_pos];
+}
+
+void TextParser::set_url_checking(int check)
+{
+	checkurl = check;
+}
+
+
+char * TextParser::alloc_token(int token, int * head)
+{
+    if (get_url(token, head)) return NULL;
+    char * t = (char *) malloc(*head - token + 1);
+    if (t) {
+        t[*head - token] = '\0';
+        strncpy(t, line[actual] + token, *head - token);
+    	// remove colon for Finnish and Swedish language
+        if (t[*head - token - 1] == ':') {
+    	    t[*head - token - 1] = '\0';
+    	    if (!t[0]) {
+    		free(t);
+    		return NULL;
+    	    }
+    	}
+        return t;
+    }
+    fprintf(stderr,"Error - Insufficient Memory\n");
+    return NULL;
+}
diff --git a/src/parsers/textparser.hxx b/src/parsers/textparser.hxx
index 1049d86..5bf1894 100644
--- a/src/parsers/textparser.hxx
+++ b/src/parsers/textparser.hxx
@@ -28,6 +28,8 @@ protected:
   void                init(unsigned short * wordchars, int len);
   int                 wordcharacters[256]; // for detection of the word boundaries
   char                line[MAXPREVLINE][MAXLNLEN]; // parsed and previous lines
+  char                urlline[MAXLNLEN]; // mask for url detection
+  int                 checkurl;
   int                 actual; // actual line
   int                 head;   // head position
   int                 token;  // begin of token
@@ -49,11 +51,16 @@ public:
   char *              get_prevline(int n);
   virtual char *      next_token();
   int                 change_token(const char * word);
+  void                set_url_checking(int check);
+
   int                 get_tokenpos();
   int                 is_wordchar(char * w);
   char *              get_latin1(char * s);
   char *              next_char();
-  
+  int                 tokenize_urls();
+  void                check_urls();
+  int                 get_url(int token_pos, int * head);
+  char *              alloc_token(int token, int * head);
 };
 
 #endif
diff --git a/src/tools/hunspell.cxx b/src/tools/hunspell.cxx
index be1f3f9..1fba8d6 100644
--- a/src/tools/hunspell.cxx
+++ b/src/tools/hunspell.cxx
@@ -150,6 +150,7 @@ enum { NORMAL,
 int filter_mode = NORMAL;
 int printgood = 0; // print only good words and lines
 int showpath = 0;  // show detected path of the dictionary
+int checkurl = 0;  // check URLs and mail addresses
 char * ui_lang = NULL; // locale for default dic_name
 const char * ui_enc = NULL;  // locale character encoding (default for I/O)
 const char * io_enc = NULL;  // I/O character encoding
@@ -328,6 +329,7 @@ TextParser * get_parser(int format, char * extension, Hunspell * pMS) {
             p = new TextParser(wordchars);    
         }
     }
+    p->set_url_checking(checkurl);
     return p;
 }
 
@@ -411,6 +413,7 @@ int save_privdic(char * filename, char * filename2, wordlist * w)
 	free(r);
     }
     fclose(dic);
+    return 1;
 }
 
 char * basename(char * s, char c) {
@@ -473,6 +476,7 @@ nextline: while(fgets(buf, MAXLNLEN, fileid)) {
     case '+': {
 		delete parser;
 		parser = new LaTeXParser(wordchars);
+    		parser->set_url_checking(checkurl);
 		break;
 	}
     case '-': {
@@ -1261,6 +1265,7 @@ int main(int argc, char** argv)
 			fprintf(stderr,"\n");
 			fprintf(stderr,gettext("  -1\t\tcheck only first field in lines (delimiter = tabulator)\n"));
 			fprintf(stderr,gettext("  -a\t\tIspell's pipe interface\n"));
+			fprintf(stderr,gettext("  --check-url\tCheck URLs, e-mail addresses and directory paths\n"));
 			fprintf(stderr,gettext("  -d dict\tuse dict dictionary\n"));
 			fprintf(stderr,gettext("  -D\t\tshow detected path of the dictionary\n"));
 			fprintf(stderr,gettext("  -G\t\tprint only correct words or lines\n"));
@@ -1327,6 +1332,8 @@ int main(int argc, char** argv)
 			format = FMT_FIRST;
 		} else if ((strcmp(argv[i],"-D")==0)) {
 			showpath = 1;
+		} else if ((strcmp(argv[i],"--check-url")==0)) {
+			checkurl = 1;
 		} else if ((arg_files==-1) && ((argv[i][0] != '-') && (argv[i][0] != '\0'))) {
 			arg_files = i;
 			if (! exist(argv[i])) { // first check (before time-consuming dic. load)
diff --git a/src/win_api/Hunspell.rc b/src/win_api/Hunspell.rc
new file mode 100644
index 0000000..bf57fd5
--- /dev/null
+++ b/src/win_api/Hunspell.rc
@@ -0,0 +1,32 @@
+
+#include <windows.h>
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION 1,1,8,0
+PRODUCTVERSION 1,1,8,0
+FILEFLAGSMASK 0x17L
+FILEFLAGS 0
+FILEOS VOS_NT_WINDOWS32
+FILETYPE VFT_APP
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+	BLOCK	"VarFileInfo"
+	BEGIN
+		VALUE	"Translation",	0x409,	1200
+	END
+	BLOCK	"StringFileInfo"
+	BEGIN
+		BLOCK "040904b0"
+		BEGIN
+            VALUE "Comments", "Hunspell (http://hunspell.sourceforge.net/) by L�szl� N�meth"
+            VALUE "CompanyName", "http://hunspell.sourceforge.net/";
+            VALUE "FileDescription", "Hunspell"
+            VALUE "FileVersion", "1.1.8"
+            VALUE "InternalName", "Hunspell"
+            VALUE "LegalCopyright", "Copyright (c) 2007"
+            VALUE "OriginalFilename", "Hunspell.dll"
+            VALUE "ProductName", "Hunspell Dynamic Link Library"
+            VALUE "ProductVersion", "1.1.8"
+		END
+	END
+END
diff --git a/src/win_api/Hunspell.sln b/src/win_api/Hunspell.sln
new file mode 100644
index 0000000..c89282b
--- /dev/null
+++ b/src/win_api/Hunspell.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Hunspell", "Hunspell.vcproj", "{53609BB3-D874-465C-AF7B-DF626DB0D89B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug_dll|Win32 = Debug_dll|Win32
+		Debug|Win32 = Debug|Win32
+		Release_dll|Win32 = Release_dll|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|Win32.ActiveCfg = Debug_dll|Win32
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug_dll|Win32.Build.0 = Debug_dll|Win32
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Debug|Win32.Build.0 = Debug|Win32
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|Win32.ActiveCfg = Release_dll|Win32
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release_dll|Win32.Build.0 = Release_dll|Win32
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|Win32.ActiveCfg = Release|Win32
+		{53609BB3-D874-465C-AF7B-DF626DB0D89B}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/src/win_api/Hunspell.vcproj b/src/win_api/Hunspell.vcproj
new file mode 100644
index 0000000..a01ea47
--- /dev/null
+++ b/src/win_api/Hunspell.vcproj
@@ -0,0 +1,458 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8,00"
+	Name="Hunspell"
+	ProjectGUID="{53609BB3-D874-465C-AF7B-DF626DB0D89B}"
+	RootNamespace="Hunspell"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\hunspell;."
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="4"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\hunspell;."
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_STATIC;_CRT_SECURE_NO_WARNINGS"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+				SuppressStartupBanner="false"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_dll|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="3"
+				InlineFunctionExpansion="2"
+				AdditionalIncludeDirectories="..\hunspell;."
+				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;HUNSPELL_EXPORTS;_CRT_SECURE_NO_DEPRECATE"
+				StringPooling="true"
+				RuntimeLibrary="0"
+				EnableFunctionLevelLinking="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1033"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="0"
+				GenerateDebugInformation="false"
+				SubSystem="2"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug_dll|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="2"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="false"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\hunspell;."
+				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_WARNINGS;HUNSPELL_EXPORTS"
+				MinimalRebuild="false"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="4"
+				Detect64BitPortabilityProblems="false"
+				DebugInformationFormat="4"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="_Main"
+			>
+			<File
+				RelativePath=".\config.h"
+				>
+			</File>
+			<File
+				RelativePath=".\Hunspell.rc"
+				>
+			</File>
+			<File
+				RelativePath=".\hunspelldll.c"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_dll|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug_dll|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						CompileAs="2"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath=".\hunspelldll.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="hunspell"
+			>
+			<File
+				RelativePath="..\hunspell\affentry.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\affentry.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\affixmgr.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\affixmgr.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\atypes.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\baseaffix.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\csutil.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\csutil.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\dictmgr.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\dictmgr.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\hashmgr.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\hashmgr.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\htypes.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\hunspell.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\hunspell.h"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\hunspell.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\langnum.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\suggestmgr.cxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\suggestmgr.hxx"
+				>
+			</File>
+			<File
+				RelativePath="..\hunspell\utf_info.cxx"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/src/win_api/Makefile.am b/src/win_api/Makefile.am
index b55a4ad..0d1f5fa 100644
--- a/src/win_api/Makefile.am
+++ b/src/win_api/Makefile.am
@@ -1 +1,2 @@
-EXTRA_DIST=hunspelldll.h hunspelldll.c hunspelldll.dev README
+EXTRA_DIST=hunspelldll.h hunspelldll.c hunspelldll.dev README \
+		      config.h Hunspell.rc Hunspell.sln Hunspell.vcproj
diff --git a/src/win_api/Makefile.in b/src/win_api/Makefile.in
index b2712a1..e5e6980 100644
--- a/src/win_api/Makefile.in
+++ b/src/win_api/Makefile.in
@@ -183,7 +183,9 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
-EXTRA_DIST = hunspelldll.h hunspelldll.c hunspelldll.dev README
+EXTRA_DIST = hunspelldll.h hunspelldll.c hunspelldll.dev README \
+		      config.h Hunspell.rc Hunspell.sln Hunspell.vcproj
+
 all: all-am
 
 .SUFFIXES:
diff --git a/src/win_api/config.h b/src/win_api/config.h
new file mode 100644
index 0000000..1e5a44f
--- /dev/null
+++ b/src/win_api/config.h
@@ -0,0 +1,214 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+   systems. This function is required for `alloca.c' support on those systems.
+   */
+#define CRAY_STACKSEG_END 1
+
+/* Define to 1 if using `alloca.c'. */
+#define C_ALLOCA 1
+
+/* Define to 1 if translation of program messages to the user's native
+   language is requested. */
+#define ENABLE_NLS 1
+
+/* Define to 1 if you have `alloca', as a function or macro. */
+#define HAVE_ALLOCA 1
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+   */
+#define HAVE_ALLOCA_H 1
+
+/* Define to 1 if you have the <argz.h> header file. */
+#define HAVE_ARGZ_H 1
+
+/* "Define if you have the <curses.h> header" */
+#define HAVE_CURSES_H 1
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+   */
+#define HAVE_DCGETTEXT 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <error.h> header file. */
+#define HAVE_ERROR_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `feof_unlocked' function. */
+#define HAVE_FEOF_UNLOCKED 1
+
+/* Define to 1 if you have the `fgets_unlocked' function. */
+#define HAVE_FGETS_UNLOCKED 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getc_unlocked' function. */
+#define HAVE_GETC_UNLOCKED 1
+
+/* Define to 1 if you have the `getegid' function. */
+#define HAVE_GETEGID 1
+
+/* Define to 1 if you have the `geteuid' function. */
+#define HAVE_GETEUID 1
+
+/* Define to 1 if you have the `getgid' function. */
+#define HAVE_GETGID 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#define HAVE_GETTEXT 1
+
+/* Define to 1 if you have the `getuid' function. */
+#define HAVE_GETUID 1
+
+/* Define if you have the iconv() function. */
+#define HAVE_ICONV 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#define HAVE_LANGINFO_CODESET 1
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#define HAVE_LC_MESSAGES 1
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#define HAVE_LIBINTL_H 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <locale.h> header file. */
+#define HAVE_LOCALE_H 1
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the `memchr' function. */
+#define HAVE_MEMCHR 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mempcpy' function. */
+#define HAVE_MEMPCPY 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define to 1 if you have the `munmap' function. */
+#define HAVE_MUNMAP 1
+
+/* "Define if you have the <ncursesw/curses.h> header" */
+#define HAVE_NCURSESW_H 1
+
+/* Define to 1 if you have the <nl_types.h> header file. */
+#define HAVE_NL_TYPES_H 1
+
+/* Define to 1 if you have the `putenv' function. */
+#define HAVE_PUTENV 1
+
+/* "Define if you have fancy command input editing with Readline" */
+#define HAVE_READLINE 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `setlocale' function. */
+#define HAVE_SETLOCALE 1
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `stpcpy' function. */
+#define HAVE_STPCPY 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#define HAVE_STRTOUL 1
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the `tsearch' function. */
+#define HAVE_TSEARCH 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the `__argz_count' function. */
+#define HAVE___ARGZ_COUNT 1
+
+/* Define to 1 if you have the `__argz_next' function. */
+#define HAVE___ARGZ_NEXT 1
+
+/* Define to 1 if you have the `__argz_stringify' function. */
+#define HAVE___ARGZ_STRINGIFY 1
+
+/* "Define if you use exterimental functions" */
+#undef HUNSPELL_EXPERIMENTAL
+
+/* "Define if you need warning messages" */
+#undef HUNSPELL_WARNING_ON
+
+/* Define as const if the declaration of iconv() needs const. */
+#define ICONV_CONST 1
+
+/* Name of package */
+#define PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION
diff --git a/tests/1706659.aff b/tests/1706659.aff
new file mode 100644
index 0000000..ec14953
--- /dev/null
+++ b/tests/1706659.aff
@@ -0,0 +1,13 @@
+# COMPOUNDRULE test file by Björn Jacke
+SET ISO8859-1
+TRY esijanrtolcdugmphbyfvkwqxz
+
+SFX A Y 5
+SFX A 0 e .
+SFX A 0 er .
+SFX A 0 en .
+SFX A 0 em .
+SFX A 0 es .
+
+COMPOUNDRULE 1
+COMPOUNDRULE vw
diff --git a/tests/1706659.dic b/tests/1706659.dic
new file mode 100644
index 0000000..32d461f
--- /dev/null
+++ b/tests/1706659.dic
@@ -0,0 +1,4 @@
+3
+arbeits/v
+scheu/Aw
+farbig/A
diff --git a/tests/1706659.test b/tests/1706659.test
new file mode 100755
index 0000000..7f44369
--- /dev/null
+++ b/tests/1706659.test
@@ -0,0 +1,4 @@
+#!/bin/sh
+DIR="`dirname $0`"
+NAME="`basename $0 .test`"
+$DIR/test.sh $NAME
diff --git a/tests/1706659.wrong b/tests/1706659.wrong
new file mode 100644
index 0000000..799dd31
--- /dev/null
+++ b/tests/1706659.wrong
@@ -0,0 +1,3 @@
+arbeitsfarbig
+arbeitsfarbige
+arbeitsfarbiger
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8e9e524..8cddb70 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -78,7 +78,10 @@ ignoreutf.test \
 1463589_utf.test \
 IJ.test \
 i68568.test \
-i68568utf.test
+i68568utf.test \
+1706659.test \
+digits_in_words.test \
+colons_in_words.test
 # infixes.test
 
 distclean-local:
@@ -467,7 +470,18 @@ i68568.wrong \
 i68568utf.aff \
 i68568utf.dic \
 i68568utf.test \
-i68568utf.wrong
+i68568utf.wrong \
+1706659.aff \
+1706659.dic \
+1706659.test \
+1706659.wrong \
+digits_in_words.aff \
+digits_in_words.dic \
+digits_in_words.test \
+digits_in_words.wrong \
+colons_in_words.aff \
+colons_in_words.dic \
+colons_in_words.test 
 # infixes.aff
 # infixes.dic
 # infixes.good
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 955712a..ee1ec37 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -260,7 +260,10 @@ ignoreutf.test \
 1463589_utf.test \
 IJ.test \
 i68568.test \
-i68568utf.test
+i68568utf.test \
+1706659.test \
+digits_in_words.test \
+colons_in_words.test
 
 EXTRA_DIST = \
 test.sh \
@@ -645,7 +648,18 @@ i68568.wrong \
 i68568utf.aff \
 i68568utf.dic \
 i68568utf.test \
-i68568utf.wrong
+i68568utf.wrong \
+1706659.aff \
+1706659.dic \
+1706659.test \
+1706659.wrong \
+digits_in_words.aff \
+digits_in_words.dic \
+digits_in_words.test \
+digits_in_words.wrong \
+colons_in_words.aff \
+colons_in_words.dic \
+colons_in_words.test 
 
 all: all-am
 
diff --git a/tests/colons_in_words.aff b/tests/colons_in_words.aff
new file mode 100644
index 0000000..d080226
--- /dev/null
+++ b/tests/colons_in_words.aff
@@ -0,0 +1,3 @@
+# Colons in Finnish and Swedish words. Problem reported by Lars Aronsson.
+# Parsing test (src/parsers)
+WORDCHARS :
diff --git a/tests/colons_in_words.dic b/tests/colons_in_words.dic
new file mode 100644
index 0000000..bfea1cc
--- /dev/null
+++ b/tests/colons_in_words.dic
@@ -0,0 +1,4 @@
+2
+c:a
+S:t
+foo
diff --git a/tests/colons_in_words.test b/tests/colons_in_words.test
new file mode 100755
index 0000000..7f44369
--- /dev/null
+++ b/tests/colons_in_words.test
@@ -0,0 +1,4 @@
+#!/bin/sh
+DIR="`dirname $0`"
+NAME="`basename $0 .test`"
+$DIR/test.sh $NAME
diff --git a/tests/digits_in_words.aff b/tests/digits_in_words.aff
new file mode 100644
index 0000000..18a42f6
--- /dev/null
+++ b/tests/digits_in_words.aff
@@ -0,0 +1,9 @@
+# Digits in words, handled by COMPOUNDRULE.
+# 1-jährig, 2-jährig, 100-jährig etc.
+SET UTF-8
+COMPOUNDMIN 1
+# recognize ab, aab, aaab etc. compounds (a=digits, b=-jährig, see dic file)
+COMPOUNDRULE 1
+COMPOUNDRULE a*b
+ONLYINCOMPOUND c
+WORDCHARS 0123456789-
diff --git a/tests/digits_in_words.dic b/tests/digits_in_words.dic
new file mode 100644
index 0000000..deeaece
--- /dev/null
+++ b/tests/digits_in_words.dic
@@ -0,0 +1,12 @@
+11
+0/a
+1/a
+2/a
+3/a
+4/a
+5/a
+6/a
+7/a
+8/a
+9/a
+-jährig/bc
diff --git a/tests/digits_in_words.test b/tests/digits_in_words.test
new file mode 100755
index 0000000..cde7c54
--- /dev/null
+++ b/tests/digits_in_words.test
@@ -0,0 +1,4 @@
+#!/bin/sh
+DIR="`dirname $0`"
+NAME="`basename $0 .test`"
+$DIR/test.sh $NAME -i utf-8
diff --git a/tests/digits_in_words.wrong b/tests/digits_in_words.wrong
new file mode 100644
index 0000000..aeaf6ce
--- /dev/null
+++ b/tests/digits_in_words.wrong
@@ -0,0 +1 @@
+-jährig

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


Reply to: