View | Details | Raw Unified | Return to issue 71449
Collapse All | Expand All

(-)source/spellcheck/hunspell/affixmgr.cxx (-43 / +18 lines)
Lines 61-67 Link Here
61
  trystring = NULL;
61
  trystring = NULL;
62
  encoding=NULL;
62
  encoding=NULL;
63
  utf8 = 0;
63
  utf8 = 0;
64
  utf_tbl = NULL;
65
  complexprefixes = 0;
64
  complexprefixes = 0;
66
  maptable = NULL;
65
  maptable = NULL;
67
  nummap = 0;
66
  nummap = 0;
Lines 245-251 Link Here
245
  if (cpdvowels) free(cpdvowels);
244
  if (cpdvowels) free(cpdvowels);
246
  if (cpdvowels_utf16) free(cpdvowels_utf16);
245
  if (cpdvowels_utf16) free(cpdvowels_utf16);
247
  if (cpdsyllablenum) free(cpdsyllablenum);
246
  if (cpdsyllablenum) free(cpdsyllablenum);
248
  if (utf_tbl) free(utf_tbl);
249
  if (lang) free(lang);
247
  if (lang) free(lang);
250
  if (wordchars) free(wordchars);
248
  if (wordchars) free(wordchars);
251
  if (wordchars_utf16) free(wordchars_utf16);
249
  if (wordchars_utf16) free(wordchars_utf16);
Lines 1308-1315 Link Here
1308
      u8_u16(&w, 1, p);
1306
      u8_u16(&w, 1, p);
1309
      unsigned short a = (u.h << 8) + u.l;
1307
      unsigned short a = (u.h << 8) + u.l;
1310
      unsigned short b = (w.h << 8) + w.l;
1308
      unsigned short b = (w.h << 8) + w.l;
1311
      if (utf_tbl[a].cletter && utf_tbl[a].cletter &&
1309
      if (((getunicodeupper(a) == a) || (getunicodeupper(b) == b))) return 1;
1312
          ((utf_tbl[a].cupper == a) || (utf_tbl[b].cupper == b))) return 1;
1313
  } else {
1310
  } else {
1314
      unsigned char a = *(word + pos - 1);
1311
      unsigned char a = *(word + pos - 1);
1315
      unsigned char b = *(word + pos);
1312
      unsigned char b = *(word + pos);
Lines 2849-2860 Link Here
2849
  return langnum;
2846
  return langnum;
2850
}
2847
}
2851
2848
2852
// return UTF info table
2853
struct unicode_info2 * AffixMgr::get_utf_conv()
2854
{
2855
  return utf_tbl;
2856
}
2857
2858
// return double prefix option
2849
// return double prefix option
2859
int AffixMgr::get_complexprefixes()
2850
int AffixMgr::get_complexprefixes()
2860
{
2851
{
Lines 3057-3084 Link Here
3057
      if (*piece != '\0') {
3048
      if (*piece != '\0') {
3058
          switch(i) {
3049
          switch(i) {
3059
	     case 0: { np++; break; }
3050
	     case 0: { np++; break; }
3060
             case 1: { encoding = mystrdup(piece); 
3051
             case 1: { encoding = mystrdup(piece); np++; break; }
3061
                    if (strcmp(encoding, "UTF-8") == 0) {
3062
                        unicode_info * uni = get_utf_cs();
3063
                        utf8 = 1;
3064
                        utf_tbl = (unicode_info2 *) malloc(CONTSIZE * sizeof(unicode_info2));
3065
                        if (utf_tbl) {
3066
                            int j;
3067
                            for (j = 0; j < CONTSIZE; j++) {
3068
                                utf_tbl[j].cletter = 0;
3069
                                utf_tbl[j].clower = j;
3070
                                utf_tbl[j].cupper = j;
3071
                            }
3072
                            for (j = 0; j < get_utf_cs_len(); j++) {
3073
                                utf_tbl[uni[j].c].cletter = 1;
3074
                                utf_tbl[uni[j].c].clower = uni[j].clower;
3075
                                utf_tbl[uni[j].c].cupper = uni[j].cupper;
3076
                            }
3077
                            // set Azeri, Turkish spec. lowercasing
3078
                            set_spec_utf8_encoding();
3079
                        } else return 1;
3080
                    }
3081
                    np++; break; }
3082
	     default: break;
3052
	     default: break;
3083
          }
3053
          }
3084
          i++;
3054
          i++;
Lines 3676-3682 Link Here
3676
             case 1: { 
3646
             case 1: { 
3677
                    lang = mystrdup(piece);
3647
                    lang = mystrdup(piece);
3678
                    langnum = get_lang_num(piece);
3648
                    langnum = get_lang_num(piece);
3679
                    set_spec_utf8_encoding();
3680
                    np++; break; 
3649
                    np++; break; 
3681
                }
3650
                }
3682
	     default: break;
3651
	     default: break;
Lines 4001-4016 Link Here
4001
   return 0;
3970
   return 0;
4002
}
3971
}
4003
3972
4004
void AffixMgr::set_spec_utf8_encoding() {
3973
unsigned short AffixMgr::getunicodelower(unsigned short c) const {
4005
    if (utf8) {
3974
    // In Azeri and Turkish, I and i dictinct letters:
4006
        // In Azeri and Turkish, I and i dictinct letters:
3975
    // There are a dotless lower case i pair of upper `I',
4007
        // There are a dotless lower case i pair of upper `I',
3976
    // and an upper I with dot pair of lower `i'. 
4008
        // and an upper I with dot pair of lower `i'. 
3977
    if (c == 0x0049 && ((langnum == LANG_az) || (langnum == LANG_tr)))
4009
        if ((langnum == LANG_az) || (langnum == LANG_tr)) {
3978
        return 0x0131;
4010
            utf_tbl[0x0049].clower = 0x0131;
3979
    return unicodetolower(c);
4011
            utf_tbl[0x0069].cupper = 0x0130;
3980
}
4012
        }
3981
4013
    }
3982
unsigned short AffixMgr::getunicodeupper(unsigned short c) const {
3983
    // In Azeri and Turkish, I and i dictinct letters:
3984
    // There are a dotless lower case i pair of upper `I',
3985
    // and an upper I with dot pair of lower `i'. 
3986
    if (c == 0x0069 && ((langnum == LANG_az) || (langnum == LANG_tr)))
3987
        return 0x0130;
3988
    return unicodetoupper(c);
4014
}
3989
}
4015
3990
4016
int AffixMgr::redundant_condition(char ft, char * strip, int stripl, const char * cond, char * line) {
3991
int AffixMgr::redundant_condition(char ft, char * strip, int stripl, const char * cond, char * line) {
(-)source/spellcheck/hunspell/affixmgr.hxx (-3 / +2 lines)
Lines 24-30 Link Here
24
  char *              encoding;
24
  char *              encoding;
25
  struct cs_info *    csconv;
25
  struct cs_info *    csconv;
26
  int                 utf8;
26
  int                 utf8;
27
  struct unicode_info2 * utf_tbl;
28
  int                 complexprefixes;
27
  int                 complexprefixes;
29
  FLAG                compoundflag;  
28
  FLAG                compoundflag;  
30
  FLAG                compoundbegin;
29
  FLAG                compoundbegin;
Lines 139-145 Link Here
139
  char **             get_breaktable();
138
  char **             get_breaktable();
140
  char *              get_encoding();
139
  char *              get_encoding();
141
  int                 get_langnum();
140
  int                 get_langnum();
142
  struct unicode_info2 * get_utf_conv();
143
  char *              get_try_string();
141
  char *              get_try_string();
144
  const char *        get_wordchars();
142
  const char *        get_wordchars();
145
  unsigned short * get_wordchars_utf16(int * len);
143
  unsigned short * get_wordchars_utf16(int * len);
Lines 198-205 Link Here
198
  AffEntry * process_sfx_in_order(AffEntry * ptr, AffEntry * nptr);
196
  AffEntry * process_sfx_in_order(AffEntry * ptr, AffEntry * nptr);
199
  int process_pfx_tree_to_list();
197
  int process_pfx_tree_to_list();
200
  int process_sfx_tree_to_list();
198
  int process_sfx_tree_to_list();
201
  void set_spec_utf8_encoding();
202
  int redundant_condition(char, char * strip, int stripl, const char * cond, char *);
199
  int redundant_condition(char, char * strip, int stripl, const char * cond, char *);
200
  unsigned short getunicodelower(unsigned short c) const;
201
  unsigned short getunicodeupper(unsigned short c) const;
203
};
202
};
204
203
205
#endif
204
#endif
(-)source/spellcheck/hunspell/csutil.cxx (-13 / +30 lines)
Lines 43-51 Link Here
43
43
44
#include "atypes.hxx"
44
#include "atypes.hxx"
45
#include "langnum.hxx"
45
#include "langnum.hxx"
46
46
#ifdef OPENOFFICEORG
47
#include <unicode/uchar.h>
48
#else
47
#include "utf_info.cxx"
49
#include "utf_info.cxx"
48
#define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info)))
50
#define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info)))
51
#endif
49
52
50
#ifndef W32
53
#ifndef W32
51
using namespace std;
54
using namespace std;
Lines 468-479 Link Here
468
   }
471
   }
469
 }
472
 }
470
473
471
void mkallsmall_utf(w_char * u, int nc, struct unicode_info2 * utfconv) {
474
void mkallsmall_utf(w_char * u, int nc) {
472
    for (int i = 0; i < nc; i++) {
475
    for (int i = 0; i < nc; i++) {
473
        unsigned short idx = (u[i].h << 8) + u[i].l;
476
        unsigned short idx = (u[i].h << 8) + u[i].l;
474
        if (idx != utfconv[idx].clower) {
477
        if (idx != unicodetolower(idx)) {
475
            u[i].h = (unsigned char) (utfconv[idx].clower >> 8);
478
            u[i].h = (unsigned char) (unicodetolower(idx) >> 8);
476
            u[i].l = (unsigned char) (utfconv[idx].clower & 0x00FF);
479
            u[i].l = (unsigned char) (unicodetolower(idx) & 0x00FF);
477
        }
480
        }
478
    }
481
    }
479
}
482
}
Lines 4951-4964 Link Here
4951
  return ccs;
4954
  return ccs;
4952
};
4955
};
4953
4956
4954
struct unicode_info * get_utf_cs() {
4955
  return utf_lst;
4956
};
4957
4958
int get_utf_cs_len() {
4959
  return UTF_LST_LEN;
4960
};
4961
4962
struct lang_map lang2enc[] = {
4957
struct lang_map lang2enc[] = {
4963
{"az", "UTF-8", LANG_az},
4958
{"az", "UTF-8", LANG_az},
4964
{"bg", "microsoft-cp1251", LANG_bg},
4959
{"bg", "microsoft-cp1251", LANG_bg},
Lines 5006-5008 Link Here
5006
  }
5001
  }
5007
  return LANG_xx;
5002
  return LANG_xx;
5008
};
5003
};
5004
5005
unsigned short unicodetoupper(unsigned short c)
5006
{
5007
#ifdef OPENOFFICEORG
5008
  return u_toupper(c);
5009
#else
5010
  if (c >= (utf_lst[0].c))
5011
    return utf_lst[c].cupper;
5012
  return c;
5013
#endif
5014
}
5015
5016
unsigned short unicodetolower(unsigned short c)
5017
{
5018
#ifdef OPENOFFICEORG
5019
  return u_tolower(c);
5020
#else
5021
  if (c >= (utf_lst[0].c))
5022
    return utf_lst[c].clower;
5023
  return c;
5024
#endif
5025
}
(-)source/spellcheck/hunspell/csutil.hxx (-5 / +4 lines)
Lines 78-83 Link Here
78
  unsigned short clower;
78
  unsigned short clower;
79
};
79
};
80
80
81
unsigned short unicodetoupper(unsigned short c);
82
unsigned short unicodetolower(unsigned short c);
83
81
struct enc_entry {
84
struct enc_entry {
82
  const char * enc_name;
85
  const char * enc_name;
83
  struct cs_info * cs_table;
86
  struct cs_info * cs_table;
Lines 93-102 Link Here
93
96
94
struct cs_info * get_current_cs(const char * es);
97
struct cs_info * get_current_cs(const char * es);
95
98
96
struct unicode_info * get_utf_cs();
97
98
int get_utf_cs_len();
99
100
const char * get_default_enc(const char * lang);
99
const char * get_default_enc(const char * lang);
101
100
102
int get_lang_num(const char * lang);
101
int get_lang_num(const char * lang);
Lines 120-125 Link Here
120
void mkinitcap(char * p, const struct cs_info * csconv);
119
void mkinitcap(char * p, const struct cs_info * csconv);
121
120
122
// convert first nc characters of UTF-8 string to little
121
// convert first nc characters of UTF-8 string to little
123
void mkallsmall_utf(w_char * u, int nc, struct unicode_info2 * utfconv);
122
void mkallsmall_utf(w_char * u, int nc);
124
123
125
#endif
124
#endif
(-)source/spellcheck/hunspell/hunspell.cxx (-25 / +19 lines)
Lines 44-49 Link Here
44
#include <cstdio>
44
#include <cstdio>
45
45
46
#include "hunspell.hxx"
46
#include "hunspell.hxx"
47
#include "csutil.hxx"
47
48
48
#ifndef W32
49
#ifndef W32
49
using namespace std;
50
using namespace std;
Lines 53-59 Link Here
53
{
54
{
54
    encoding = NULL;
55
    encoding = NULL;
55
    csconv = NULL;
56
    csconv = NULL;
56
    utfconv = NULL;
57
    utf8 = 0;
57
    utf8 = 0;
58
    complexprefixes = 0;
58
    complexprefixes = 0;
59
59
Lines 71-77 Link Here
71
    csconv = get_current_cs(encoding);
71
    csconv = get_current_cs(encoding);
72
    langnum = pAMgr->get_langnum();
72
    langnum = pAMgr->get_langnum();
73
    utf8 = pAMgr->get_utf8();
73
    utf8 = pAMgr->get_utf8();
74
    utfconv = pAMgr->get_utf_conv();
75
    complexprefixes = pAMgr->get_complexprefixes();
74
    complexprefixes = pAMgr->get_complexprefixes();
76
    wordbreak = pAMgr->get_breaktable();
75
    wordbreak = pAMgr->get_breaktable();
77
76
Lines 156-168 Link Here
156
      *nc -= *pabbrev;
155
      *nc -= *pabbrev;
157
      for (int i = 0; i < *nc; i++) {
156
      for (int i = 0; i < *nc; i++) {
158
         idx = (dest_utf[i].h << 8) + dest_utf[i].l;
157
         idx = (dest_utf[i].h << 8) + dest_utf[i].l;
159
         if (idx != utfconv[idx].clower) ncap++;
158
         if (idx != unicodetolower(idx)) ncap++;
160
         if (utfconv[idx].cupper == utfconv[idx].clower) nneutral++;
159
         if (unicodetoupper(idx) == unicodetolower(idx)) nneutral++;
161
      }
160
      }
162
      u16_u8(dest, MAXWORDUTF8LEN, dest_utf, *nc);
161
      u16_u8(dest, MAXWORDUTF8LEN, dest_utf, *nc);
163
      if (ncap) {
162
      if (ncap) {
164
         idx = (dest_utf[0].h << 8) + dest_utf[0].l;
163
         idx = (dest_utf[0].h << 8) + dest_utf[0].l;
165
         firstcap = (idx != utfconv[idx].clower);
164
         firstcap = (idx != unicodetolower(idx));
166
      }
165
      }
167
   }
166
   }
168
167
Lines 228-240 Link Here
228
      nc = u8_u16(t, MAXWORDLEN, src);
227
      nc = u8_u16(t, MAXWORDLEN, src);
229
      for (int i = 0; i < nc; i++) {
228
      for (int i = 0; i < nc; i++) {
230
         idx = (t[i].h << 8) + t[i].l;
229
         idx = (t[i].h << 8) + t[i].l;
231
         if (idx != utfconv[idx].clower) ncap++;
230
         if (idx != unicodetolower(idx)) ncap++;
232
         if (utfconv[idx].cupper == utfconv[idx].clower) nneutral++;
231
         if (unicodetoupper(idx) == unicodetolower(idx)) nneutral++;
233
      }
232
      }
234
      u16_u8(dest, MAXWORDUTF8LEN, t, nc);
233
      u16_u8(dest, MAXWORDUTF8LEN, t, nc);
235
      if (ncap) {
234
      if (ncap) {
236
         idx = (t[0].h << 8) + t[0].l;
235
         idx = (t[0].h << 8) + t[0].l;
237
         firstcap = (idx != utfconv[idx].clower);
236
         firstcap = (idx != unicodetolower(idx));
238
      }
237
      }
239
   }
238
   }
240
239
Lines 262-270 Link Here
262
      unsigned short idx;
261
      unsigned short idx;
263
      for (int i = 0; i < nc; i++) {
262
      for (int i = 0; i < nc; i++) {
264
         idx = (u[i].h << 8) + u[i].l;
263
         idx = (u[i].h << 8) + u[i].l;
265
         if (idx != utfconv[idx].cupper) {
264
         if (idx != unicodetoupper(idx)) {
266
            u[i].h = (unsigned char) (utfconv[idx].cupper >> 8);
265
            u[i].h = (unsigned char) (unicodetoupper(idx) >> 8);
267
            u[i].l = (unsigned char) (utfconv[idx].cupper & 0x00FF);
266
            u[i].l = (unsigned char) (unicodetoupper(idx) & 0x00FF);
268
         }
267
         }
269
      }
268
      }
270
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
269
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
Lines 282-290 Link Here
282
      unsigned short idx;
281
      unsigned short idx;
283
      for (int i = 0; i < nc; i++) {
282
      for (int i = 0; i < nc; i++) {
284
         idx = (u[i].h << 8) + u[i].l;
283
         idx = (u[i].h << 8) + u[i].l;
285
         if (idx != utfconv[idx].cupper) {
284
         if (idx != unicodetoupper(idx)) {
286
            u[i].h = (unsigned char) (utfconv[idx].cupper >> 8);
285
            u[i].h = (unsigned char) (unicodetoupper(idx) >> 8);
287
            u[i].l = (unsigned char) (utfconv[idx].cupper & 0x00FF);
286
            u[i].l = (unsigned char) (unicodetoupper(idx) & 0x00FF);
288
         }
287
         }
289
      }
288
      }
290
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
289
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
Lines 313-321 Link Here
313
      unsigned short idx;
312
      unsigned short idx;
314
      for (int i = 0; i < nc; i++) {
313
      for (int i = 0; i < nc; i++) {
315
         idx = (u[i].h << 8) + u[i].l;
314
         idx = (u[i].h << 8) + u[i].l;
316
         if (idx != utfconv[idx].clower) {
315
         if (idx != unicodetolower(idx)) {
317
            u[i].h = (unsigned char) (utfconv[idx].clower >> 8);
316
            u[i].h = (unsigned char) (unicodetolower(idx) >> 8);
318
            u[i].l = (unsigned char) (utfconv[idx].clower & 0x00FF);
317
            u[i].l = (unsigned char) (unicodetolower(idx) & 0x00FF);
319
         }
318
         }
320
      }
319
      }
321
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
320
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
Lines 1145-1151 Link Here
1145
      int len;
1144
      int len;
1146
      w_char u[MAXWORDLEN];
1145
      w_char u[MAXWORDLEN];
1147
      len = u8_u16(u, MAXWORDLEN, p);
1146
      len = u8_u16(u, MAXWORDLEN, p);
1148
      unsigned short i = utfconv[(u[0].h << 8) + u[0].l].cupper;
1147
      unsigned short i = unicodetoupper((u[0].h << 8) + u[0].l);
1149
      u[0].h = (unsigned char) (i >> 8);
1148
      u[0].h = (unsigned char) (i >> 8);
1150
      u[0].l = (unsigned char) (i & 0x00FF);
1149
      u[0].l = (unsigned char) (i & 0x00FF);
1151
      u16_u8(p, MAXWORDUTF8LEN, u, len);
1150
      u16_u8(p, MAXWORDUTF8LEN, u, len);
Lines 1157-1163 Link Here
1157
  if (!utf8) {
1156
  if (!utf8) {
1158
    if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper;
1157
    if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper;
1159
  } else if (nc > 0) {
1158
  } else if (nc > 0) {
1160
      unsigned short i = utfconv[(u[0].h << 8) + u[0].l].cupper;
1159
      unsigned short i = unicodetoupper((u[0].h << 8) + u[0].l);
1161
      u[0].h = (unsigned char) (i >> 8);
1160
      u[0].h = (unsigned char) (i >> 8);
1162
      u[0].l = (unsigned char) (i & 0x00FF);
1161
      u[0].l = (unsigned char) (i & 0x00FF);
1163
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
1162
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
Lines 1171-1177 Link Here
1171
  if (!utf8) {
1170
  if (!utf8) {
1172
    if (*p != '\0') *p = csconv[((unsigned char)*p)].clower;
1171
    if (*p != '\0') *p = csconv[((unsigned char)*p)].clower;
1173
  } else if (nc > 0) {
1172
  } else if (nc > 0) {
1174
      unsigned short i = utfconv[(u[0].h << 8) + u[0].l].clower;
1173
      unsigned short i = unicodetolower((u[0].h << 8) + u[0].l);
1175
      u[0].h = (unsigned char) (i >> 8);
1174
      u[0].h = (unsigned char) (i >> 8);
1176
      u[0].l = (unsigned char) (i & 0x00FF);
1175
      u[0].l = (unsigned char) (i & 0x00FF);
1177
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
1176
      u16_u8(p, MAXWORDUTF8LEN, u, nc);
Lines 1183-1193 Link Here
1183
struct cs_info * Hunspell::get_csconv()
1182
struct cs_info * Hunspell::get_csconv()
1184
{
1183
{
1185
  return csconv;
1184
  return csconv;
1186
}
1187
1188
struct unicode_info2 * Hunspell::get_utf_conv()
1189
{
1190
  return utfconv;
1191
}
1185
}
1192
1186
1193
int Hunspell::put_word(const char * word)
1187
int Hunspell::put_word(const char * word)
(-)source/spellcheck/hunspell/hunspell.hxx (-2 lines)
Lines 31-37 Link Here
31
  SuggestMgr*     pSMgr;
31
  SuggestMgr*     pSMgr;
32
  char *          encoding;
32
  char *          encoding;
33
  struct cs_info * csconv;
33
  struct cs_info * csconv;
34
  struct unicode_info2 * utfconv;
35
  int             langnum;
34
  int             langnum;
36
  int             utf8;
35
  int             utf8;
37
  int             complexprefixes;
36
  int             complexprefixes;
Lines 95-101 Link Here
95
  const char * get_wordchars();
94
  const char * get_wordchars();
96
  unsigned short * get_wordchars_utf16(int * len);
95
  unsigned short * get_wordchars_utf16(int * len);
97
  struct cs_info * get_csconv();
96
  struct cs_info * get_csconv();
98
  struct unicode_info2 * get_utf_conv();
99
  const char * get_version();
97
  const char * get_version();
100
98
101
  /* experimental functions */
99
  /* experimental functions */
(-)source/spellcheck/hunspell/makefile.mk (-2 / +2 lines)
Lines 52-57 Link Here
52
# all_target: ALLTAR DICTIONARY
52
# all_target: ALLTAR DICTIONARY
53
all_target: ALLTAR
53
all_target: ALLTAR
54
54
55
CDEFS+=-DOPENOFFICEORG
55
56
56
SLOFILES=	\
57
SLOFILES=	\
57
		$(SLO)$/affentry.obj \
58
		$(SLO)$/affentry.obj \
Lines 60-70 Link Here
60
		$(SLO)$/hashmgr.obj \
61
		$(SLO)$/hashmgr.obj \
61
		$(SLO)$/suggestmgr.obj \
62
		$(SLO)$/suggestmgr.obj \
62
		$(SLO)$/hunspell.obj
63
		$(SLO)$/hunspell.obj
63
#		$(SLO)$/utf_info.obj \
64
64
65
SHL1TARGET= 	$(TARGET)
65
SHL1TARGET= 	$(TARGET)
66
66
67
SHL1STDLIBS= 
67
SHL1STDLIBS= 	$(ICUUCLIB)
68
68
69
# build DLL
69
# build DLL
70
SHL1DEPN=
70
SHL1DEPN=
(-)source/spellcheck/hunspell/suggestmgr.cxx (-5 / +3 lines)
Lines 68-74 Link Here
68
  maxngramsugs = MAXNGRAMSUGS;
68
  maxngramsugs = MAXNGRAMSUGS;
69
69
70
  utf8 = 0;
70
  utf8 = 0;
71
  utfconv = NULL;
72
  complexprefixes = 0;
71
  complexprefixes = 0;
73
72
74
  if (pAMgr) {
73
  if (pAMgr) {
Lines 78-84 Link Here
78
	nosplitsugs = pAMgr->get_nosplitsugs();
77
	nosplitsugs = pAMgr->get_nosplitsugs();
79
        if (pAMgr->get_maxngramsugs() >= 0) maxngramsugs = pAMgr->get_maxngramsugs();
78
        if (pAMgr->get_maxngramsugs() >= 0) maxngramsugs = pAMgr->get_maxngramsugs();
80
        utf8 = pAMgr->get_utf8();
79
        utf8 = pAMgr->get_utf8();
81
        utfconv = pAMgr->get_utf_conv();
82
        complexprefixes = pAMgr->get_complexprefixes();
80
        complexprefixes = pAMgr->get_complexprefixes();
83
  }
81
  }
84
82
Lines 930-936 Link Here
930
        if (utf8) {
928
        if (utf8) {
931
          w_char _w[MAXSWL];
929
          w_char _w[MAXSWL];
932
          len = u8_u16(_w, MAXSWL, guess[i]);
930
          len = u8_u16(_w, MAXSWL, guess[i]);
933
          mkallsmall_utf(_w, len, utfconv);
931
          mkallsmall_utf(_w, len);
934
          u16_u8(gl, MAXSWUTF8L, _w, len);
932
          u16_u8(gl, MAXSWUTF8L, _w, len);
935
        } else {
933
        } else {
936
          strcpy(gl, guess[i]);
934
          strcpy(gl, guess[i]);
Lines 1487-1495 Link Here
1487
    if (!l2) return 0;
1485
    if (!l2) return 0;
1488
    // decapitalize dictionary word
1486
    // decapitalize dictionary word
1489
    if (complexprefixes) {
1487
    if (complexprefixes) {
1490
      mkallsmall_utf(su2+l2-1, 1, utfconv);
1488
      mkallsmall_utf(su2+l2-1, 1);
1491
    } else {
1489
    } else {
1492
      mkallsmall_utf(su2, 1, utfconv);
1490
      mkallsmall_utf(su2, 1);
1493
    }
1491
    }
1494
    for (int j = 1; j <= n; j++) {
1492
    for (int j = 1; j <= n; j++) {
1495
      ns = 0;
1493
      ns = 0;
(-)source/spellcheck/hunspell/suggestmgr.hxx (-1 lines)
Lines 32-38 Link Here
32
  AffixMgr*       pAMgr;
32
  AffixMgr*       pAMgr;
33
  int             maxSug;
33
  int             maxSug;
34
  struct cs_info * csconv;
34
  struct cs_info * csconv;
35
  struct unicode_info2 * utfconv;
36
  int             utf8;
35
  int             utf8;
37
  int             nosplitsugs;
36
  int             nosplitsugs;
38
  int             maxngramsugs;
37
  int             maxngramsugs;

Return to issue 71449