1 --- misc/hunspell-1.3.2/src/hunspell/affixmgr.cxx 2010-06-17 15:56:41.000000000 +0200
2 +++ misc/build/hunspell-1.3.2/src/hunspell/affixmgr.cxx 2011-02-10 20:47:22.000000000 +0100
4 compoundroot = FLAG_NULL; // compound word signing flag
5 compoundpermitflag = FLAG_NULL; // compound permitting flag for suffixed word
6 compoundforbidflag = FLAG_NULL; // compound fordidden flag for suffixed word
7 + compoundmoresuffixes = 0; // allow more suffixes within compound words
8 checkcompounddup = 0; // forbid double words in compounds
9 checkcompoundrep = 0; // forbid bad compounds (may be non compound word with a REP substitution)
10 checkcompoundcase = 0; // forbid upper and lowercase combinations at word bounds
15 + if (strncmp(line,"COMPOUNDMORESUFFIXES",20) == 0) {
16 + compoundmoresuffixes = 1;
19 if (strncmp(line,"CHECKCOMPOUNDDUP",16) == 0) {
23 if (onlycpdrule) break;
25 !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) {
26 - if ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL,
27 - FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) && !hu_mov_rule &&
28 + if (((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL,
29 + FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
30 + (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundflag)))) && !hu_mov_rule &&
32 ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag,
33 sfx->getContLen())) || (compoundend &&
34 @@ -1640,9 +1646,11 @@
36 (((wordnum == 0) && compoundbegin &&
37 ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
38 + (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundbegin))) || // twofold suffixes + compound
39 (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) ||
40 ((wordnum > 0) && compoundmiddle &&
41 ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
42 + (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundmiddle))) || // twofold suffixes + compound
43 (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle)))))
45 // else check forbiddenwords and needaffix
47 if (onlycpdrule) break;
49 !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) {
50 - if ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL,
51 - FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) && !hu_mov_rule &&
52 + if (((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL,
53 + FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
54 + (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundflag)))) && !hu_mov_rule &&
56 ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag,
57 sfx->getContLen())) || (compoundend &&
58 @@ -2132,9 +2141,11 @@
60 (((wordnum == 0) && compoundbegin &&
61 ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
62 + (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundbegin))) || // twofold suffix+compound
63 (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) ||
64 ((wordnum > 0) && compoundmiddle &&
65 ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
66 + (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundmiddle))) || // twofold suffix+compound
67 (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle)))))
69 // char * p = prefix_check_morph(st, i, 0, compound);
70 --- misc/hunspell-1.3.2/src/hunspell/affixmgr.hxx 2010-06-17 15:56:41.000000000 +0200
71 +++ misc/build/hunspell-1.3.2/src/hunspell/affixmgr.hxx 2011-02-10 20:47:22.000000000 +0100
74 FLAG compoundforbidflag;
75 FLAG compoundpermitflag;
76 + int compoundmoresuffixes;
79 int checkcompoundcase;