summaryrefslogtreecommitdiff
path: root/hunspell
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-06-09 14:50:43 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-06-09 14:50:43 +0200
commit29f7268d43499993510698cc3ee14acf9a8e35b6 (patch)
treeca1a9640c2ce5e8829004f81acc99a1e71809917 /hunspell
parentabbcaab344a5f36f5c84cc94f3d1f89d3f30eede (diff)
parent2e3cd7c625afed09e03a5d100ad6b89ec78c4dc6 (diff)
cws tl74: merge with DEV300_m81
Diffstat (limited to 'hunspell')
-rw-r--r--hunspell/hunspell-1.2.8.patch632
-rw-r--r--hunspell/hunspell-consts-1.2.8.patch22
-rw-r--r--hunspell/hunspell-solaris.patch12
-rw-r--r--hunspell/hunspell-stacksmash.patch28
-rw-r--r--hunspell/hunspell-wntconfig.patch4
-rw-r--r--hunspell/makefile.mk16
6 files changed, 51 insertions, 663 deletions
diff --git a/hunspell/hunspell-1.2.8.patch b/hunspell/hunspell-1.2.8.patch
deleted file mode 100644
index e5198f23b706..000000000000
--- a/hunspell/hunspell-1.2.8.patch
+++ /dev/null
@@ -1,632 +0,0 @@
---- misc/hunspell-1.2.8/intl/localename.c 2007-04-06 10:05:34.000000000 +0200
-+++ misc/build/hunspell-1.2.8/intl/localename.c 2008-11-01 16:30:49.000000000 +0100
-@@ -140,6 +140,9 @@
- # ifndef LANG_SINDHI
- # define LANG_SINDHI 0x59
- # endif
-+# ifndef LANG_SORBIAN
-+# define LANG_SORBIAN 0x2e
-+# endif
- # ifndef LANG_SLOVAK
- # define LANG_SLOVAK 0x1b
- # endif
---- misc/hunspell-1.2.8/src/hunspell/affixmgr.cxx 2008-11-01 08:00:41.000000000 +0100
-+++ misc/build/hunspell-1.2.8/src/hunspell/affixmgr.cxx 2008-11-01 16:30:49.000000000 +0100
-@@ -25,6 +25,10 @@
- #endif
- #endif
-
-+#ifdef OS2
-+#undef DEBUG
-+#endif
-+
- AffixMgr::AffixMgr(const char * affpath, HashMgr** ptr, int * md, const char * key)
- {
- // register hash manager and load affix data from aff file
-@@ -2133,7 +2137,7 @@
- while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
- !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
- (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) ||
-- (numdefcpd && defcpd_check(&words, wnum + 1, rv, NULL,1))))) {
-+ (numdefcpd && words && defcpd_check(&words, wnum + 1, rv, NULL,1))))) {
- rv = rv->next_homonym;
- }
-
---- misc/hunspell-1.2.8/src/hunspell/affixmgr.hxx 2008-10-30 21:28:59.000000000 +0100
-+++ misc/build/hunspell-1.2.8/src/hunspell/affixmgr.hxx 2008-11-01 16:30:49.000000000 +0100
-@@ -2,9 +2,6 @@
- #define _AFFIXMGR_HXX_
-
- #ifdef MOZILLA_CLIENT
--#ifdef __SUNPRO_CC // for SunONE Studio compiler
--using namespace std;
--#endif
- #include <stdio.h>
- #else
- #include <cstdio>
---- misc/hunspell-1.2.8/src/hunspell/atypes.hxx 2008-10-29 15:30:51.000000000 +0100
-+++ misc/build/hunspell-1.2.8/src/hunspell/atypes.hxx 2008-11-01 16:30:49.000000000 +0100
-@@ -1,6 +1,8 @@
- #ifndef _ATYPES_HXX_
- #define _ATYPES_HXX_
-
-+#include <stdio.h>
-+
- #ifndef HUNSPELL_WARNING
- #ifdef HUNSPELL_WARNING_ON
- #define HUNSPELL_WARNING fprintf
---- misc/hunspell-1.2.8/src/hunspell/csutil.cxx Wed Oct 22 12:15:28 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/csutil.cxx Thu Feb 19 18:13:34 2009
-@@ -18,13 +18,13 @@
- #include "langnum.hxx"
-
- #ifdef OPENOFFICEORG
--# include <unicode/uchar.h>
-+#include <unicode/uchar.h>
- #else
--# ifndef MOZILLA_CLIENT
--# include "utf_info.cxx"
--# define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info)))
--# endif
-+#ifndef MOZILLA_CLIENT
-+#include "utf_info.cxx"
-+#define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info)))
- #endif
-+#endif
-
- #ifdef MOZILLA_CLIENT
- #include "nsCOMPtr.h"
---- misc/hunspell-1.2.8/src/hunspell/filemgr.cxx Sat Nov 1 15:09:41 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/filemgr.cxx Thu Feb 19 17:28:35 2009
-@@ -11,6 +11,7 @@
- #include <stdio.h>
- #endif
-
-+using namespace std;
- #include "filemgr.hxx"
-
- int FileMgr::fail(const char * err, const char * par) {
---- misc/hunspell-1.2.8/src/hunspell/filemgr.hxx Mon Aug 11 11:32:02 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/filemgr.hxx Thu Feb 19 13:58:01 2009
-@@ -6,7 +6,7 @@
- class FileMgr
- {
- protected:
-- FILE * fin;
-+ std::FILE * fin;
- Hunzip * hin;
- char in[BUFSIZE + 50]; // input buffer
- int fail(const char * err, const char * par);
---- misc/hunspell-1.2.8/src/hunspell/hashmgr.cxx Thu Aug 14 16:49:33 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/hashmgr.cxx Thu Feb 19 17:25:33 2009
-@@ -6,6 +6,9 @@
- #include <cstring>
- #include <cstdio>
- #include <cctype>
-+//#ifdef __SUNPRO_CC // for SunONE Studio compiler
-+//using namespace std;
-+//#endif
- #else
- #include <stdlib.h>
- #include <string.h>
-@@ -13,10 +16,6 @@
- #include <ctype.h>
- #endif
-
--#include "hashmgr.hxx"
--#include "csutil.hxx"
--#include "atypes.hxx"
--
- #ifdef MOZILLA_CLIENT
- #ifdef __SUNPRO_CC // for SunONE Studio compiler
- using namespace std;
-@@ -27,6 +26,10 @@
- #endif
- #endif
-
-+#include "hashmgr.hxx"
-+#include "csutil.hxx"
-+#include "atypes.hxx"
-+
- // build a hash table from a munched word list
-
- HashMgr::HashMgr(const char * tpath, const char * apath, const char * key)
-@@ -459,6 +462,10 @@
- }
- } else {
- al = decode_flags(&flags, ap + 1, dict);
-+ if (al == -1) {
-+ HUNSPELL_WARNING(stderr, "Can't allocate memory.\n");
-+ return 6;
-+ }
- flag_qsort(flags, 0, al);
- }
- } else {
-@@ -499,6 +506,11 @@
-
- int HashMgr::decode_flags(unsigned short ** result, char * flags, FileMgr * af) {
- int len;
-+ if (*flags == '\0') {
-+ HUNSPELL_WARNING(stderr, "error: line %d: bad flagvector\n", af->getlinenum());
-+ *result = NULL;
-+ return 0;
-+ }
- switch (flag_mode) {
- case FLAG_LONG: { // two-character flags (1x2yZz -> 1x 2y Zz)
- len = strlen(flags);
---- misc/hunspell-1.2.8/src/hunspell/hashmgr.hxx 2008-08-12 12:22:54.000000000 +0200
-+++ misc/build/hunspell-1.2.8/src/hunspell/hashmgr.hxx 2009-02-19 12:57:11.780108100 +0100
-@@ -3,6 +3,7 @@
-
- #ifndef MOZILLA_CLIENT
- #include <cstdio>
-+/* using namespace std; */
- #else
- #include <stdio.h>
- #endif
---- misc/hunspell-1.2.8/src/hunspell/hunspell.cxx Thu Oct 30 20:15:53 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/hunspell.cxx Thu Feb 19 18:13:35 2009
-@@ -1,3 +1,7 @@
-+#ifdef _MSC_VER
-+#pragma setlocale("C")
-+#endif
-+
- #include "license.hunspell"
- #include "license.myspell"
-
-@@ -11,11 +15,6 @@
- #include <stdio.h>
- #endif
-
--#include "hunspell.hxx"
--#include "hunspell.h"
--#include "config.h"
--#include "csutil.hxx"
--
- #ifndef MOZILLA_CLIENT
- #ifndef WIN32
- using namespace std;
-@@ -22,6 +21,9 @@
- #endif
- #endif
-
-+#include "hunspell.hxx"
-+#include "csutil.hxx"
-+
- Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key)
- {
- encoding = NULL;
-@@ -338,7 +340,11 @@
- char wspace[MAXWORDUTF8LEN];
- w_char unicw[MAXWORDLEN];
- // Hunspell supports XML input of the simplified API (see manual)
-- if (strcmp(word, SPELL_XML) == 0) return 1;
-+ if (strncmp(word, SPELL_XML, sizeof(SPELL_XML) - 3) == 0) {
-+ if (strcmp(word, SPELL_XML) == 0) return 1; // query XML interface support
-+ return 0;
-+ }
-+
- int nc = strlen(word);
- int wl2 = 0;
- if (utf8) {
-@@ -1854,89 +1860,3 @@
- }
-
- #endif // END OF HUNSPELL_EXPERIMENTAL CODE
--
--Hunhandle *Hunspell_create(const char * affpath, const char * dpath)
--{
-- return (Hunhandle*)(new Hunspell(affpath, dpath));
--}
--
--Hunhandle *Hunspell_create_key(const char * affpath, const char * dpath,
-- const char * key)
--{
-- return (Hunhandle*)(new Hunspell(affpath, dpath, key));
--}
--
--void Hunspell_destroy(Hunhandle *pHunspell)
--{
-- delete (Hunspell*)(pHunspell);
--}
--
--int Hunspell_spell(Hunhandle *pHunspell, const char *word)
--{
-- return ((Hunspell*)pHunspell)->spell(word);
--}
--
--char *Hunspell_get_dic_encoding(Hunhandle *pHunspell)
--{
-- return ((Hunspell*)pHunspell)->get_dic_encoding();
--}
--
--int Hunspell_suggest(Hunhandle *pHunspell, char*** slst, const char * word)
--{
-- return ((Hunspell*)pHunspell)->suggest(slst, word);
--}
--
--int Hunspell_analyze(Hunhandle *pHunspell, char*** slst, const char * word)
--{
-- return ((Hunspell*)pHunspell)->analyze(slst, word);
--}
--
--int Hunspell_stem(Hunhandle *pHunspell, char*** slst, const char * word)
--{
-- return ((Hunspell*)pHunspell)->stem(slst, word);
--}
--
--int Hunspell_stem(Hunhandle *pHunspell, char*** slst, char** desc, int n)
--{
-- return ((Hunspell*)pHunspell)->stem(slst, desc, n);
--}
--
--int Hunspell_generate(Hunhandle *pHunspell, char*** slst, const char * word,
-- const char * word2)
--{
-- return ((Hunspell*)pHunspell)->generate(slst, word, word2);
--}
--
--int Hunspell_generate(Hunhandle *pHunspell, char*** slst, const char * word,
-- char** desc, int n)
--{
-- return ((Hunspell*)pHunspell)->generate(slst, word, desc, n);
--}
--
-- /* functions for run-time modification of the dictionary */
--
-- /* add word to the run-time dictionary */
--
--int Hunspell_add(Hunhandle *pHunspell, const char * word) {
-- return ((Hunspell*)pHunspell)->add(word);
--}
--
-- /* add word to the run-time dictionary with affix flags of
-- * the example (a dictionary word): Hunspell will recognize
-- * affixed forms of the new word, too.
-- */
--
--int Hunspell_add_with_affix(Hunhandle *pHunspell, const char * word,
-- const char * example) {
-- return ((Hunspell*)pHunspell)->add_with_affix(word, example);
--}
--
-- /* remove word from the run-time dictionary */
--
--int Hunspell_remove(Hunhandle *pHunspell, const char * word) {
-- return ((Hunspell*)pHunspell)->remove(word);
--}
--
--void Hunspell_free_list(Hunhandle *pHunspell, char *** slst, int n) {
-- freelist(slst, n);
--}
---- misc/hunspell-1.2.8/src/hunspell/hunspell.hxx 2008-07-09 16:14:39.000000000 +0200
-+++ misc/build/hunspell-1.2.8/src/hunspell/hunspell.hxx 2008-11-26 18:32:58.765625000 +0100
-@@ -28,11 +28,7 @@
- #endif
- #endif
-
--#ifdef WIN32
--class DLLEXPORT Hunspell
--#else
- class Hunspell
--#endif
- {
- AffixMgr* pAMgr;
- HashMgr* pHMgr[MAXDIC];
---- misc/hunspell-1.2.8/src/hunspell/hunzip.cxx Tue Jun 17 10:57:55 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/hunzip.cxx Thu Feb 19 17:29:19 2009
-@@ -8,6 +8,7 @@
- #include <stdio.h>
- #endif
-
-+using namespace std;
- #include "hunzip.hxx"
-
- #define CODELEN 65536
---- misc/hunspell-1.2.8/src/hunspell/hunzip.hxx Thu Feb 19 15:59:42 2009
-+++ misc/build/hunspell-1.2.8/src/hunspell/hunzip.hxx Thu Feb 19 18:13:35 2009
-@@ -18,6 +18,8 @@
- #define MSG_MEMORY "error: %s: missing memory\n"
- #define MSG_KEY "error: %s: missing or bad password\n"
-
-+#include <stdlib.h>
-+
- struct bit {
- unsigned char c[2];
- int v[2];
---- misc/hunspell-1.2.8/src/hunspell/license.hunspell 2008-06-17 10:57:55.000000000 +0200
-+++ misc/build/hunspell-1.2.8/src/hunspell/license.hunspell 2008-11-01 16:30:49.000000000 +0100
-@@ -56,4 +56,3 @@
- *
- * ***** END LICENSE BLOCK ***** */
-
--#include "config.h"
---- misc/hunspell-1.2.8/src/hunspell/makefile.mk Tue Jun 17 10:57:55 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/makefile.mk Thu Feb 19 18:13:52 2009
-@@ -60,11 +60,13 @@
- #
- #*************************************************************************
-
--PRJ = ..
-+PRJ = ../../../../../..
-
- PRJNAME = hunspell
- TARGET = hunspell
--LIBTARGET=NO
-+LIBTARGET=YES
-+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-+UWINAPILIB=
-
- #----- Settings ---------------------------------------------------------
-
-@@ -73,7 +74,7 @@
- # --- Files --------------------------------------------------------
-
- # all_target: ALLTAR DICTIONARY
--all_target: ALLTAR
-+#all_target: ALLTAR
-
- ##CXXFLAGS += -I..$/..$/lingutil
- ##CFLAGSCXX += -I..$/..$/lingutil
-@@ -89,6 +90,10 @@
- $(SLO)$/utf_info.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
---- misc/hunspell-1.2.8/src/hunspell/phonet.cxx 2008-08-13 15:29:08.000000000 +0200
-+++ misc/build/hunspell-1.2.8/src/hunspell/phonet.cxx 2008-11-01 16:30:49.000000000 +0100
-@@ -32,6 +32,7 @@
- #include <cstring>
- #include <cstdio>
- #include <cctype>
-+using namespace std;
- #else
- #include <stdlib.h>
- #include <string.h>
---- misc/hunspell-1.2.8/src/hunspell/replist.cxx Sat Nov 1 15:09:51 2008
-+++ misc/build/hunspell-1.2.8/src/hunspell/replist.cxx Thu Feb 19 14:02:51 2009
-@@ -13,6 +13,7 @@
-
- #include "replist.hxx"
- #include "csutil.hxx"
-+using namespace std;
-
- RepList::RepList(int n) {
- dat = (replentry **) malloc(sizeof(replentry *) * n);
---- misc/hunspell-1.2.8/src/tools/analyze.cxx Tue Jun 17 13:44:50 2008
-+++ misc/build/hunspell-1.2.8/src/tools/analyze.cxx Thu Feb 19 18:13:35 2009
-@@ -3,13 +3,13 @@
- #include <cstdlib>
- #include <cstdio>
-
--#include "hunspell.hxx"
--
- #ifndef WIN32
- using namespace std;
- #endif
-
-+#include "hunspell.hxx"
-
-+
-
- int main(int argc, char **argv)
- {
---- misc/hunspell-1.2.8/src/tools/chmorph.cxx Tue Jun 17 12:15:34 2008
-+++ misc/build/hunspell-1.2.8/src/tools/chmorph.cxx Thu Feb 19 17:36:46 2009
-@@ -2,13 +2,13 @@
- #include <cstdlib>
- #include <cstdio>
-
--#include "hunspell.hxx"
--#include "textparser.hxx"
--
- #ifndef W32
- using namespace std;
- #endif
-
-+#include "hunspell.hxx"
-+#include "textparser.hxx"
-+
- int
- main(int argc, char** argv)
- {
---- misc/hunspell-1.2.8/src/tools/example.cxx Tue Jun 17 13:07:24 2008
-+++ misc/build/hunspell-1.2.8/src/tools/example.cxx Thu Feb 19 17:38:12 2009
-@@ -2,12 +2,12 @@
- #include <cstdlib>
- #include <cstdio>
-
-+using namespace std;
-+
- #include "hunspell.hxx"
-
- extern char * mystrdup(const char * s);
-
--using namespace std;
--
- int
- main(int argc, char** argv)
- {
---- misc/hunspell-1.2.8/src/tools/hunspell.cxx 2008-09-04 15:44:19.000000000 +0200
-+++ misc/build/hunspell-1.2.8/src/tools/hunspell.cxx 2008-11-01 16:31:24.000000000 +0100
-@@ -7,10 +7,20 @@
-
- #include <cstdlib>
- #include <cstdio>
-+
-+#ifdef __SUNPRO_CC
-+using namespace std;
-+#include <string.h>
-+#include <malloc.h>
-+#endif
-+
- #include "config.h"
- #include "hunspell.hxx"
- #include "csutil.hxx"
-
-+// switch off iconv support for tests (fixing Solaris problems)
-+#undef HAVE_ICONV
-+
- #ifndef HUNSPELL_EXTRA
- #define suggest_auto suggest
- #endif
-@@ -28,7 +38,9 @@
-
- #ifdef WIN32
-
-+#ifndef __MINGW32__
- #define gettext
-+#endif
- #define LIBDIR "C:\\Hunspell\\"
- #define USEROOODIR "Application Data\\OpenOffice.org 2\\user\\wordbook"
- #define OOODIR \
-@@ -98,8 +110,10 @@
- #if ENABLE_NLS
- #ifdef HAVE_LOCALE_H
- #include <locale.h>
-+#ifdef HAVE_LANGINFO_CODESET
- #include <langinfo.h>
- #endif
-+#endif
-
- #ifdef HAVE_LIBINTL_H
- #include <libintl.h>
-@@ -1385,9 +1399,11 @@
- #ifdef HAVE_LOCALE_H
- ui_lang = setlocale(LC_ALL, "");
- textdomain("hunspell");
-+#ifdef HAVE_LANGINFO_CODESET
- ui_enc = nl_langinfo(CODESET);
- #endif
- #endif
-+#endif
-
- #ifdef HAVE_READLINE
- rl_set_key("", rl_escape, rl_get_keymap());
---- misc/hunspell-1.2.8/src/tools/hunzip.cxx Tue Jan 15 11:10:04 2008
-+++ misc/build/hunspell-1.2.8/src/tools/hunzip.cxx Thu Feb 19 17:38:12 2009
-@@ -2,6 +2,8 @@
- #include <stdlib.h>
- #include <string.h>
-
-+using namespace std;
-+
- #include "hunzip.hxx"
-
- #define DESC "hunzip - decompress a hzip file to the standard output\n" \
---- misc/hunspell-1.2.8/src/tools/hzip.c Fri Apr 4 15:20:10 2008
-+++ misc/build/hunspell-1.2.8/src/tools/hzip.c Thu Feb 19 18:13:35 2009
-@@ -44,7 +44,7 @@
- if (tree->type != code_NODE) {
- int i = tree->word;
- code[deep] = '\0';
-- if (tree->type == code_TERM) i = CODELEN; // terminal code
-+ if (tree->type == code_TERM) i = CODELEN;
- table[i] = malloc((deep + 1) * sizeof(char));
- strcpy(table[i], code);
- }
-@@ -63,7 +63,7 @@
- return ni;
- }
-
--// return length of the freq array
-+
- int get_freqdata(struct item *** dest, FILE * f, unsigned short * termword) {
- int freq[CODELEN];
- int i, j, k, n;
-@@ -88,7 +88,7 @@
- (*dest)[n]->word = i;
- n++;
- }
-- // terminal sequence (also contains the last odd byte of the file)
-+
- (*dest)[n] = newitem(1, NULL, NULL, code_TERM);
- *termword = *((unsigned short *) c);
- return n + 1;
-@@ -134,20 +134,20 @@
- char c[2];
- char * enc = key;
-
-- // header and codes
-- fprintf(f2, "%s", (key ? MAGIC_ENCRYPTED : MAGIC)); // 3-byte HEADER
-+
-+ fprintf(f2, "%s", (key ? MAGIC_ENCRYPTED : MAGIC));
- cl = (unsigned char) (n & 0x00ff);
- ch = (unsigned char) (n >> 8);
- if (key) {
- unsigned char cs;
- for (cs = 0; *enc; enc++) cs ^= *enc;
-- fprintf(f2, "%c", cs); // 1-byte check sum
-+ fprintf(f2, "%c", cs);
- enc = key;
- ch ^= *enc;
- if ((*(++enc)) == '\0') enc = key;
- cl ^= *enc;
- }
-- fprintf(f2, "%c%c", ch, cl); // upper and lower byte of record count
-+ fprintf(f2, "%c%c", ch, cl);
- for (i = 0; i < BUFSIZE; i++) bitbuf[i] = '\0';
- for (i = 0; i < CODELEN + 1; i++) if (table[i]) {
- unsigned short * d = (unsigned short *) &c;
-@@ -159,7 +159,7 @@
- if (*(++enc) == '\0') enc = key;
- c[1] ^= *enc;
- }
-- fprintf(f2, "%c%c", c[0], c[1]); // 2-character code id
-+ fprintf(f2, "%c%c", c[0], c[1]);
- bits = 0;
- write_bits(f2, bitbuf, &bits, table[i]);
- if (key) {
-@@ -169,11 +169,11 @@
- if (*(++enc) == '\0') enc = key;
- bitbuf[cl] ^= *enc;
- }
-- } else fprintf(f2, "%c", (unsigned char) bits); // 1-byte code length
-- fwrite(bitbuf, sizeof(char), bits/8 + 1, f2); // x-byte code
-+ } else fprintf(f2, "%c", (unsigned char) bits);
-+ fwrite(bitbuf, sizeof(char), bits/8 + 1, f2);
- }
-
-- // file encoding
-+
- bits = 0;
- while((cx[0] = getc(f)) != -1 && (cx[1] = getc(f)) != -1) {
- c[0] = cx[0];
-@@ -180,7 +180,7 @@
- c[1] = cx[1];
- write_bits(f2, bitbuf, &bits, table[*((unsigned short *) c)]);
- }
-- // terminal suffixes
-+
- write_bits(f2, bitbuf, &bits, table[CODELEN]);
- if (bits > 0) fwrite(bitbuf, sizeof(char), bits/8 + 1, f2);
- }
-@@ -201,11 +201,11 @@
- } else pfx = 0;
- }
- if (i > 0 && buf[i - 1] == '\n') {
-- if (j == i) j--; // line duplicate
-+ if (j == i) j--;
- if (j > 29) j = 29;
- c = j;
- if (c == '\t') c = 30;
-- // common suffix
-+
- for (; buf[i - m - 2] == prev[prevlen - m - 2] &&
- m < i - j - 1 && m < 15; m++);
- if (m == 1) m = 0;
-@@ -221,7 +221,7 @@
- *p = buf[k];
- }
- if (m > 0) {
-- *p = m + 31; // 33-46
-+ *p = m + 31;
- p++;
- }
- if (i > 0 && buf[i - 1] == '\n') {
diff --git a/hunspell/hunspell-consts-1.2.8.patch b/hunspell/hunspell-consts-1.2.8.patch
deleted file mode 100644
index 8f8c72796cb4..000000000000
--- a/hunspell/hunspell-consts-1.2.8.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- misc/hunspell-1.2.8/src/hunspell/affixmgr.cxx 2009-05-16 14:33:27.000000000 +0100
-+++ misc/build/hunspell-1.2.8/src/hunspell/affixmgr.cxx 2009-05-16 14:35:52.000000000 +0100
-@@ -3238,7 +3238,7 @@
- }
-
- // return the value of suffix
--const int AffixMgr::have_contclass()
-+int AffixMgr::have_contclass() const
- {
- return havecontclass;
- }
---- misc/hunspell-1.2.8.orig/src/hunspell/affixmgr.hxx 2009-05-16 14:33:27.000000000 +0100
-+++ misc/build/hunspell-1.2.8/src/hunspell/affixmgr.hxx 2009-05-16 14:35:38.000000000 +0100
-@@ -189,7 +189,7 @@
- const char * get_suffix();
- const char * get_derived();
- const char * get_version();
-- const int have_contclass();
-+ int have_contclass() const;
- int get_utf8();
- int get_complexprefixes();
- char * get_suffixed(char );
diff --git a/hunspell/hunspell-solaris.patch b/hunspell/hunspell-solaris.patch
new file mode 100644
index 000000000000..37c5101364b4
--- /dev/null
+++ b/hunspell/hunspell-solaris.patch
@@ -0,0 +1,12 @@
+--- misc/hunspell-1.2.9.orig/src/tools/hunspell.cxx 2010-02-27 23:42:05.000000000 +0000
++++ misc/build/hunspell-1.2.9/src/tools/hunspell.cxx 2010-02-27 23:43:02.000000000 +0000
+@@ -10,6 +10,9 @@
+ #include "hunspell.hxx"
+ #include "csutil.hxx"
+
++// switch off iconv support for tests (fixing Solaris problems)
++#undef HAVE_ICONV
++
+ #ifndef HUNSPELL_EXTRA
+ #define suggest_auto suggest
+ #endif
diff --git a/hunspell/hunspell-stacksmash.patch b/hunspell/hunspell-stacksmash.patch
new file mode 100644
index 000000000000..8765b6d784d3
--- /dev/null
+++ b/hunspell/hunspell-stacksmash.patch
@@ -0,0 +1,28 @@
+--- misc/hunspell-1.2.9/src/hunspell/hunspell.cxx 2010-03-04 10:25:06.000000000 +0000
++++ misc/build/hunspell-1.2.9/src/hunspell/hunspell.cxx 2010-03-04 10:25:38.000000000 +0000
+@@ -1665,7 +1665,7 @@
+ if (!q2) return 0; // bad XML input
+ if (check_xml_par(q, "type=", "analyze")) {
+ int n = 0, s = 0;
+- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) n = analyze(slst, cw);
++ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) n = analyze(slst, cw);
+ if (n == 0) return 0;
+ // convert the result to <code><a>ana1</a><a>ana2</a></code> format
+ for (int i = 0; i < n; i++) s+= strlen((*slst)[i]);
+@@ -1686,13 +1686,13 @@
+ (*slst)[0] = r;
+ return 1;
+ } else if (check_xml_par(q, "type=", "stem")) {
+- if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN)) return stem(slst, cw);
++ if (get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1)) return stem(slst, cw);
+ } else if (check_xml_par(q, "type=", "generate")) {
+- int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN);
++ int n = get_xml_par(cw, strchr(q2, '>'), MAXWORDUTF8LEN - 1);
+ if (n == 0) return 0;
+ char * q3 = strstr(q2 + 1, "<word");
+ if (q3) {
+- if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN)) {
++ if (get_xml_par(cw2, strchr(q3, '>'), MAXWORDUTF8LEN - 1)) {
+ return generate(slst, cw, cw2);
+ }
+ } else {
diff --git a/hunspell/hunspell-wntconfig.patch b/hunspell/hunspell-wntconfig.patch
new file mode 100644
index 000000000000..9b6bc9c3fbb2
--- /dev/null
+++ b/hunspell/hunspell-wntconfig.patch
@@ -0,0 +1,4 @@
+--- misc/hunspell-1.2.9/config.h 2010-02-25 14:38:38.000000000 +0000
++++ misc/build/hunspell-1.2.9/config.h 2010-02-25 14:38:42.000000000 +0000
+@@ -1 +0,0 @@
+-dummy
diff --git a/hunspell/makefile.mk b/hunspell/makefile.mk
index db6eb1029d98..ac74d7c5051b 100644
--- a/hunspell/makefile.mk
+++ b/hunspell/makefile.mk
@@ -1,4 +1,4 @@
-#*************************************************************************
+jedit#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
@@ -36,18 +36,16 @@ TARGET=hunspell
# --- Files --------------------------------------------------------
-TARFILE_NAME=hunspell-1.2.8
-TARFILE_ROOTDIR=hunspell-1.2.8
-
-#ADDITIONAL_FILES += src/hunspell/makefile.mk
+TARFILE_NAME=hunspell-1.2.9
+TARFILE_MD5=68dd2e8253d9a7930e9fd50e2d7220d0
+ADDITIONAL_FILES+=config.h
PATCH_FILES=\
- hunspell-1.2.8.patch \
- hunspell-consts-1.2.8.patch # hunspell#2064983 \
- hunspell-1.2.8-thesfix.patch # hunspell #i107768
+ hunspell-wntconfig.patch \
+ hunspell-solaris.patch \
+ hunspell-stacksmash.patch
.IF "$(GUI)"=="UNX"
-#CONFIGURE_DIR=$(BUILD_DIR)
#relative to CONFIGURE_DIR
CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) configure