summaryrefslogtreecommitdiff
path: root/hunspell/hunspell-1.1.12.patch
blob: 32acc5eb9e16be8b704ce5956a58e150c4a4281a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
--- misc/hunspell-1.1.12/configure	2007-09-04 02:20:37.000000000 +0200
+++ misc/build/hunspell-1.1.12/configure	2008-04-24 12:17:58.000000000 +0200
@@ -1629,9 +1629,6 @@
   test "$program_prefix$program_suffix$program_transform_name" = \
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
-case "$host" in
-arm*) XFAILED="flagutf8.test maputf.test";;
-esac
 
 
 am__api_version="1.9"
--- misc/hunspell-1.1.12/src/hunspell/affixmgr.cxx	2007-09-04 09:49:30.000000000 +0200
+++ misc/build/hunspell-1.1.12/src/hunspell/affixmgr.cxx	2008-04-23 22:59:31.000000000 +0200
@@ -25,6 +25,10 @@
 #endif
 #endif
 
+#ifdef OS2
+#undef DEBUG
+#endif
+
 AffixMgr::AffixMgr(const char * affpath, HashMgr* ptr) 
 {
   // register hash manager and load affix data from aff file
@@ -2789,7 +2793,7 @@
 
 int AffixMgr::expand_rootword(struct guessword * wlst, int maxn, const char * ts,
     int wl, const unsigned short * ap, unsigned short al, char * bad, int badl,
-    char * phone)
+    char * phone_)
 {
 
     int nh=0;
@@ -2801,8 +2805,8 @@
        wlst[nh].orig = NULL;
        nh++;
        // add special phonetic version
-       if (phone && (nh < maxn)) {
-    	    wlst[nh].word = mystrdup(phone);
+       if (phone_ && (nh < maxn)) {
+    	    wlst[nh].word = mystrdup(phone_);
     	    wlst[nh].allow = (1 == 0);
     	    wlst[nh].orig = mystrdup(ts);
     	    nh++;
@@ -2832,11 +2836,11 @@
                     wlst[nh].orig = NULL;
                     nh++;
                     // add special phonetic version
-    		    if (phone && (nh < maxn)) {
+    		    if (phone_ && (nh < maxn)) {
     			char st[MAXWORDUTF8LEN];
-    			strcpy(st, phone);
+    			strcpy(st, phone_);
     			strcat(st, sptr->getKey());
-    			reverseword(st + strlen(phone));
+    			reverseword(st + strlen(phone_));
     			wlst[nh].word = mystrdup(st);
     			wlst[nh].allow = (1 == 0);
     			wlst[nh].orig = mystrdup(newword);
--- misc/hunspell-1.1.12/src/hunspell/atypes.hxx	Sat Sep  1 08:57:35 2007
+++ misc/build/hunspell-1.1.12/src/hunspell/atypes.hxx	Mon Jun 16 15:50:27 2008
@@ -1,6 +1,8 @@
 #ifndef _ATYPES_HXX_
 #define _ATYPES_HXX_
 
+#include <stdio.h>
+
 #ifndef HUNSPELL_WARNING
 #ifdef HUNSPELL_WARNING_ON
 #define HUNSPELL_WARNING fprintf
@@ -9,7 +11,7 @@
 static inline void HUNSPELL_WARNING(FILE *, const char *, ...) {}
 #endif
 #endif
-
+ 
 // HUNSTEM def.
 #define HUNSTEM
 
@@ -91,8 +93,3 @@
 };
 
 #endif
-
-
-
-
-
--- misc/hunspell-1.1.12/src/hunspell/csutil.cxx	Thu Aug 23 09:27:39 2007
+++ misc/build/hunspell-1.1.12/src/hunspell/csutil.cxx	Tue Jun 17 12:51:33 2008
@@ -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"
@@ -125,7 +125,7 @@
         case 0x90:
         case 0xa0:
         case 0xb0: {
-            HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %d. character position\n%s\n", u8 - src, src);    
+            HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %ld. character position\n%s\n", static_cast<long>(u8 - src), src);    
             u2->h = 0xff;
             u2->l = 0xfd;
             break;
@@ -137,7 +137,7 @@
                 u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
                 u8++;
             } else {
-                HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %d. character position:\n%s\n", u8 - src, src);
+                HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - src), src);
                 u2->h = 0xff;
                 u2->l = 0xfd;
             }
@@ -151,12 +151,12 @@
                     u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
                     u8++;
                 } else {
-                    HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %d. character position:\n%s\n", u8 - src, src);
+                    HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - src), src);
                     u2->h = 0xff;
                     u2->l = 0xfd;
                 }
             } else {
-                HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %d. character position:\n%s\n", u8 - src, src);
+                HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - src), src);
                 u2->h = 0xff;
                 u2->l = 0xfd;
             }
@@ -4939,7 +4939,7 @@
 { 0x00, 0xff, 0xff },
 };
 
-struct enc_entry encds[] = {
+static struct enc_entry encds[] = {
 {"ISO8859-1",iso1_tbl},
 {"ISO8859-2",iso2_tbl},
 {"ISO8859-3",iso3_tbl},
--- misc/hunspell-1.1.12/src/hunspell/csutil.hxx	Sun Sep  2 02:04:00 2007
+++ misc/build/hunspell-1.1.12/src/hunspell/csutil.hxx	Tue Jun 17 12:51:49 2008
@@ -21,7 +21,11 @@
 // default flags
 #define ONLYUPCASEFLAG 65535
 
+#ifdef GCC
+typedef struct __attribute__ ((packed)) {
+#else
 typedef struct {
+#endif
     unsigned char l;
     unsigned char h;
 } w_char;
--- misc/hunspell-1.1.12/src/hunspell/hashmgr.hxx	Sun Aug 26 03:45:12 2007
+++ misc/build/hunspell-1.1.12/src/hunspell/hashmgr.hxx	Mon Jun 16 15:50:40 2008
@@ -3,6 +3,7 @@
 
 #ifndef MOZILLA_CLIENT
 #include <cstdio>
+using namespace std;
 #else
 #include <stdio.h>
 #endif
--- misc/hunspell-1.1.12/src/hunspell/hunspell.cxx	2007-08-28 15:17:30.000000000 +0200
+++ misc/build/hunspell-1.1.12/src/hunspell/hunspell.cxx	2008-04-23 22:59:31.000000000 +0200
@@ -1,3 +1,7 @@
+#ifdef _MSC_VER
+#pragma setlocale("C")
+#endif
+
 #include "license.hunspell"
 #include "license.myspell"
 
@@ -12,7 +16,11 @@
 #endif
 
 #include "hunspell.hxx"
-#include "hunspell.h"
+#ifndef OPENOFFICEORG
+#ifndef MOZILLA_CLIENT
+//#include "hunspell.h"
+#endif
+#endif
 
 #ifndef MOZILLA_CLIENT
 #ifndef W32
@@ -1727,29 +1735,3 @@
 }
 
 #endif // END OF HUNSPELL_EXPERIMENTAL CODE
-
-Hunhandle *Hunspell_create(const char * affpath, const char * dpath)
-{
-        return (Hunhandle*)(new Hunspell(affpath, dpath));
-}
-
-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);
-}
-
--- misc/hunspell-1.1.12/src/hunspell/license.hunspell	2007-06-14 14:07:47.000000000 +0200
+++ misc/build/hunspell-1.1.12/src/hunspell/license.hunspell	2008-04-23 22:59:31.000000000 +0200
@@ -56,4 +56,3 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
-#include "config.h"
--- misc/hunspell-1.1.12/src/hunspell/makefile.mk	2007-04-06 10:05:32.000000000 +0200
+++ misc/build/hunspell-1.1.12/src/hunspell/makefile.mk	2008-06-11 19:31:42.983723000 +0200
@@ -60,11 +60,12 @@
 #
 #*************************************************************************
 
-PRJ = ..
+PRJ = ../../../../../..
 
 PRJNAME	= hunspell
 TARGET	= hunspell
-LIBTARGET=NO
+LIBTARGET=YES
+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
 
 #----- Settings ---------------------------------------------------------
 
@@ -73,7 +74,7 @@
 # --- Files --------------------------------------------------------
 
 # all_target: ALLTAR DICTIONARY
-all_target: ALLTAR
+#all_target: ALLTAR
 
 ##CXXFLAGS += -I..$/..$/lingutil
 ##CFLAGSCXX += -I..$/..$/lingutil
@@ -81,7 +82,7 @@
 
 CDEFS+=-DOPENOFFICEORG
 
-SLOFILES=	\
+OBJFILES=	\
 		$(SLO)$/affentry.obj \
 		$(SLO)$/affixmgr.obj \
 		$(SLO)$/dictmgr.obj \
@@ -89,11 +90,12 @@
 		$(SLO)$/utf_info.obj \
 		$(SLO)$/hashmgr.obj \
 		$(SLO)$/suggestmgr.obj \
+		$(SLO)$/phonet.obj \
 		$(SLO)$/hunspell.obj
 
 LIB1TARGET= $(SLB)$/lib$(TARGET).lib
 LIB1ARCHIV= $(LB)/lib$(TARGET).a
-LIB1OBJFILES= $(SLOFILES)
+LIB1OBJFILES= $(OBJFILES)
 
 # DIC2BIN= \
 #	en_US.aff \
--- misc/hunspell-1.1.12/src/hunspell/phonet.cxx	Mon Aug 27 21:45:49 2007
+++ misc/build/hunspell-1.1.12/src/hunspell/phonet.cxx	Tue Jun 17 12:51:33 2008
@@ -32,6 +32,7 @@
 #include <cstring>
 #include <cstdio>
 #include <cctype>
+using namespace std;
 #else
 #include <stdlib.h> 
 #include <string.h>
--- misc/hunspell-1.1.12/src/hunspell/suggestmgr.cxx	2007-09-04 13:21:26.000000000 +0200
+++ misc/build/hunspell-1.1.12/src/hunspell/suggestmgr.cxx	2008-04-23 22:59:31.000000000 +0200
@@ -118,7 +118,7 @@
       return ns;
 }
 
-// generate suggestions for a mispelled word
+// generate suggestions for a misspelled word
 //    pass in address of array of char * pointers
 // onlycompoundsug: probably bad suggestions (need for ngram sugs, too)
 
--- misc/hunspell-1.1.12/tests/Makefile.am	Tue Sep  4 01:25:35 2007
+++ misc/build/hunspell-1.1.12/tests/Makefile.am	Wed Jun 18 11:53:11 2008
@@ -6,29 +6,18 @@
 
 TESTS =	\
 affixes.test \
-base.test \
 base_utf.test \
-allcaps.test \
 allcaps_utf.test \
-allcaps2.test \
-allcaps3.test \
-keepcase.test \
-i58202.test \
 map.test \
-rep.test \
-sug.test \
 sugutf.test \
-phone.test \
 flag.test \
 flaglong.test \
 flagnum.test \
 flagutf8.test \
-slash.test \
 forbiddenword.test \
 nosuggest.test \
 alias.test \
 alias2.test \
-alias3.test \
 break.test \
 needaffix.test \
 needaffix2.test \
@@ -39,7 +28,6 @@
 fogemorpheme.test \
 onlyincompound.test \
 complexprefixes.test \
-complexprefixes2.test \
 complexprefixesutf.test \
 conditionalprefix.test \
 zeroaffix.test \
@@ -51,7 +39,6 @@
 compoundrule.test \
 compoundrule2.test \
 compoundrule3.test \
-compoundrule4.test \
 compoundrule5.test \
 compoundrule6.test \
 compoundaffix.test \
@@ -64,12 +51,7 @@
 checkcompoundcaseutf.test \
 checkcompoundpattern.test \
 utfcompound.test \
-checksharps.test \
 checksharpsutf.test \
-germancompounding.test \
-germancompoundingold.test \
-i35725.test \
-i53643.test \
 i54633.test \
 i54980.test \
 maputf.test \
@@ -77,11 +59,8 @@
 ignore.test \
 ignoreutf.test \
 1592880.test \
-1695964.test \
 1463589.test \
 1463589_utf.test \
-IJ.test \
-i68568.test \
 i68568utf.test \
 1706659.test \
 digits_in_words.test \
--- misc/hunspell-1.1.12/tests/Makefile.in	Tue Sep  4 02:20:35 2007
+++ misc/build/hunspell-1.1.12/tests/Makefile.in	Wed Jun 18 11:53:11 2008
@@ -196,29 +196,18 @@
 XFAIL_TESTS = @XFAILED@
 TESTS = \
 affixes.test \
-base.test \
 base_utf.test \
-allcaps.test \
 allcaps_utf.test \
-allcaps2.test \
-allcaps3.test \
-keepcase.test \
-i58202.test \
 map.test \
-rep.test \
-sug.test \
 sugutf.test \
-phone.test \
 flag.test \
 flaglong.test \
 flagnum.test \
 flagutf8.test \
-slash.test \
 forbiddenword.test \
 nosuggest.test \
 alias.test \
 alias2.test \
-alias3.test \
 break.test \
 needaffix.test \
 needaffix2.test \
@@ -229,7 +218,6 @@
 fogemorpheme.test \
 onlyincompound.test \
 complexprefixes.test \
-complexprefixes2.test \
 complexprefixesutf.test \
 conditionalprefix.test \
 zeroaffix.test \
@@ -241,7 +229,6 @@
 compoundrule.test \
 compoundrule2.test \
 compoundrule3.test \
-compoundrule4.test \
 compoundrule5.test \
 compoundrule6.test \
 compoundaffix.test \
@@ -254,12 +241,7 @@
 checkcompoundcaseutf.test \
 checkcompoundpattern.test \
 utfcompound.test \
-checksharps.test \
 checksharpsutf.test \
-germancompounding.test \
-germancompoundingold.test \
-i35725.test \
-i53643.test \
 i54633.test \
 i54980.test \
 maputf.test \
@@ -267,11 +249,8 @@
 ignore.test \
 ignoreutf.test \
 1592880.test \
-1695964.test \
 1463589.test \
 1463589_utf.test \
-IJ.test \
-i68568.test \
 i68568utf.test \
 1706659.test \
 digits_in_words.test \