c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/affixmgr.cxx hunspell-1.2.8/src/hunspell/affixmgr.cxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/affixmgr.cxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/affixmgr.cxx	2009-06-24 15:30:35.000000000 +0100
c7101ef
@@ -1866,8 +1866,8 @@
c7101ef
             if (wordnum < maxwordnum) {
c7101ef
                 rv = compound_check((st+i),strlen(st+i), wordnum+1,
c7101ef
                      numsyllable, maxwordnum, wnum + 1, words, 0, is_sug);
c7101ef
-                if (rv && numcheckcpd && (scpd == 0 && cpdpat_check(word, i, rv_first, rv) ||
c7101ef
-                   scpd != 0 && !cpdpat_check(word, i, rv_first, rv))) rv = NULL;
c7101ef
+                if (rv && numcheckcpd && ((scpd == 0 && cpdpat_check(word, i, rv_first, rv)) ||
c7101ef
+                   (scpd != 0 && !cpdpat_check(word, i, rv_first, rv)))) rv = NULL;
c7101ef
             } else {
c7101ef
                 rv=NULL;
c7101ef
             }
c7101ef
@@ -4276,7 +4276,7 @@
c7101ef
             if (strip[i] == cond[j]) in = 1;
c7101ef
           } while ((j < (condl - 1)) && (cond[j] != ']'));
c7101ef
           if (j == (condl - 1) && (cond[j] != ']')) {
c7101ef
-            HUNSPELL_WARNING(stderr, "error: line %d: missing ] in condition:\n%s\n", linenum);
c7101ef
+            HUNSPELL_WARNING(stderr, "error: line %d: missing ] in condition:\n%s\n", linenum, cond);
c7101ef
             return 0;
c7101ef
           }
c7101ef
           if ((!neg && !in) || (neg && in)) {
c7101ef
@@ -4304,7 +4304,7 @@
c7101ef
             if (strip[i] == cond[j]) in = 1;
c7101ef
           } while ((j > 0) && (cond[j] != '['));
c7101ef
           if ((j == 0) && (cond[j] != '[')) {
c7101ef
-            HUNSPELL_WARNING(stderr, "error: error: %d: missing ] in condition:\n%s\n", linenum);
c7101ef
+            HUNSPELL_WARNING(stderr, "error: line: %d: missing ] in condition:\n%s\n", linenum, cond);
c7101ef
             return 0;
c7101ef
           }
c7101ef
           neg = (cond[j+1] == '^') ? 1 : 0;
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/csutil.cxx hunspell-1.2.8/src/hunspell/csutil.cxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/csutil.cxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/csutil.cxx	2009-06-24 15:30:35.000000000 +0100
c7101ef
@@ -5313,7 +5313,7 @@
c7101ef
   if (utf_tbl) return 0;
c7101ef
   utf_tbl = (unicode_info2 *) malloc(CONTSIZE * sizeof(unicode_info2));
c7101ef
   if (utf_tbl) {
c7101ef
-    int j;
c7101ef
+    size_t j;
c7101ef
     for (j = 0; j < CONTSIZE; j++) {
c7101ef
       utf_tbl[j].cletter = 0;
c7101ef
       utf_tbl[j].clower = (unsigned short) j;
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/csutil.hxx hunspell-1.2.8/src/hunspell/csutil.hxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/csutil.hxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/csutil.hxx	2009-06-24 15:30:32.000000000 +0100
c7101ef
@@ -46,10 +46,10 @@
c7101ef
 
c7101ef
 // hash entry macros
c7101ef
 #define HENTRY_DATA(h) (h->var ? ((h->var & H_OPT_ALIASM) ? \
c7101ef
-    get_stored_pointer(&(h->word) + h->blen + 1) : &(h->word) + h->blen + 1) : NULL)
c7101ef
+    get_stored_pointer(&(h->word[0]) + h->blen + 1) : &(h->word[0]) + h->blen + 1) : NULL)
c7101ef
 // NULL-free version for warning-free OOo build
c7101ef
 #define HENTRY_DATA2(h) (h->var ? ((h->var & H_OPT_ALIASM) ? \
c7101ef
-    get_stored_pointer(&(h->word) + h->blen + 1) : &(h->word) + h->blen + 1) : "")
c7101ef
+    get_stored_pointer(&(h->word[0]) + h->blen + 1) : &(h->word[0]) + h->blen + 1) : "")
c7101ef
 #define HENTRY_FIND(h,p) (HENTRY_DATA(h) ? strstr(HENTRY_DATA(h), p) : NULL)
c7101ef
 
c7101ef
 #define w_char_eq(a,b) (((a).l == (b).l) && ((a).h == (b).h))
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/hashmgr.cxx hunspell-1.2.8/src/hunspell/hashmgr.cxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/hashmgr.cxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/hashmgr.cxx	2009-06-24 15:30:35.000000000 +0100
c7101ef
@@ -118,7 +118,7 @@
c7101ef
        dp = tableptr[hash(word)];
c7101ef
        if (!dp) return NULL;
c7101ef
        for (  ;  dp != NULL;  dp = dp->next) {
c7101ef
-          if (strcmp(word,&(dp->word)) == 0) return dp;
c7101ef
+          if (strcmp(word, dp->word) == 0) return dp;
c7101ef
        }
c7101ef
     }
c7101ef
     return NULL;
c7101ef
@@ -134,7 +134,7 @@
c7101ef
     struct hentry* hp = 
c7101ef
 	(struct hentry *) malloc (sizeof(struct hentry) + wbl + descl);
c7101ef
     if (!hp) return 1;
c7101ef
-    char * hpw = &(hp->word);
c7101ef
+    char * hpw = hp->word;
c7101ef
     strcpy(hpw, word);
c7101ef
     if (ignorechars != NULL) {
c7101ef
       if (utf8) {
c7101ef
@@ -178,7 +178,7 @@
c7101ef
          return 0;
c7101ef
        }
c7101ef
        while (dp->next != NULL) {
c7101ef
-         if ((!dp->next_homonym) && (strcmp(&(hp->word), &(dp->word)) == 0)) {
c7101ef
+         if ((!dp->next_homonym) && (strcmp(hp->word, dp->word) == 0)) {
c7101ef
     	    // remove hidden onlyupcase homonym
c7101ef
             if (!onlyupcase) {
c7101ef
 		if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) {
c7101ef
@@ -196,7 +196,7 @@
c7101ef
          }
c7101ef
          dp=dp->next;
c7101ef
        }
c7101ef
-       if (strcmp(&(hp->word), &(dp->word)) == 0) {
c7101ef
+       if (strcmp(hp->word, dp->word) == 0) {
c7101ef
     	    // remove hidden onlyupcase homonym
c7101ef
             if (!onlyupcase) {
c7101ef
 		if ((dp->astr) && TESTAFF(dp->astr, ONLYUPCASEFLAG, dp->alen)) {
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/htypes.hxx hunspell-1.2.8/src/hunspell/htypes.hxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/htypes.hxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/htypes.hxx	2009-06-24 15:14:23.000000000 +0100
c7101ef
@@ -12,7 +12,7 @@
c7101ef
 #define H_OPT_PHON   (1 << 2)
c7101ef
 
c7101ef
 // see also csutil.hxx
c7101ef
-#define HENTRY_WORD(h) &(h->word)
c7101ef
+#define HENTRY_WORD(h) (h->word)
c7101ef
 
c7101ef
 // approx. number  of user defined words
c7101ef
 #define USERWORD 1000
c7101ef
@@ -26,7 +26,7 @@
c7101ef
   struct   hentry * next; // next word with same hash code
c7101ef
   struct   hentry * next_homonym; // next homonym word (with same hash code)
c7101ef
   char     var;       // variable fields (only for special pronounciation yet)
c7101ef
-  char     word;      // variable-length word (8-bit or UTF-8 encoding)
c7101ef
+  char     word[1];   // variable-length word (8-bit or UTF-8 encoding)
c7101ef
 };
c7101ef
 
c7101ef
 #endif
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/hunspell.cxx hunspell-1.2.8/src/hunspell/hunspell.cxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/hunspell.cxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/hunspell.cxx	2009-06-24 15:30:35.000000000 +0100
c7101ef
@@ -496,7 +496,6 @@
c7101ef
   if (wordbreak) {
c7101ef
     char * s;
c7101ef
     char r;
c7101ef
-    int corr = 0;
c7101ef
     wl = strlen(cw);
c7101ef
     int numbreak = pAMgr ? pAMgr->get_numbreak() : 0;
c7101ef
     // check boundary patterns (^begin and end$)
c7101ef
@@ -515,7 +514,6 @@
c7101ef
     }
c7101ef
     // other patterns
c7101ef
     for (int j = 0; j < numbreak; j++) {
c7101ef
-      int result = 0;
c7101ef
       int plen = strlen(wordbreak[j]);
c7101ef
       s=(char *) strstr(cw, wordbreak[j]);
c7101ef
       if (s && (s > cw) && (s < cw + wl - plen)) {
c7101ef
@@ -617,7 +615,7 @@
c7101ef
             return NULL;
c7101ef
         }
c7101ef
         if (root) {
c7101ef
-            *root = mystrdup(&(he->word));
c7101ef
+            *root = mystrdup(he->word);
c7101ef
             if (*root && complexprefixes) {
c7101ef
                 if (utf8) reverseword_utf(*root); else reverseword(*root);
c7101ef
             }
c7101ef
@@ -636,7 +634,7 @@
c7101ef
           // end of LANG speficic region
c7101ef
           if (he) {
c7101ef
                 if (root) {
c7101ef
-                    *root = mystrdup(&(he->word));
c7101ef
+                    *root = mystrdup(he->word);
c7101ef
                     if (*root && complexprefixes) {
c7101ef
                         if (utf8) reverseword_utf(*root); else reverseword(*root);
c7101ef
                     }
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/Makefile.am hunspell-1.2.8/src/hunspell/Makefile.am
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/Makefile.am	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/Makefile.am	2009-06-24 15:14:23.000000000 +0100
c7101ef
@@ -3,7 +3,7 @@
c7101ef
 lib_LTLIBRARIES = libhunspell-1.2.la
c7101ef
 libhunspell_1_2_includedir = $(includedir)/hunspell
c7101ef
 libhunspell_1_2_la_SOURCES=affentry.cxx affixmgr.cxx csutil.cxx \
c7101ef
-		     dictmgr.cxx hashmgr.cxx hunspell.cxx utf_info.cxx \
c7101ef
+		     dictmgr.cxx hashmgr.cxx hunspell.cxx \
c7101ef
 	             suggestmgr.cxx license.myspell license.hunspell \
c7101ef
 	             phonet.cxx filemgr.cxx hunzip.cxx replist.cxx
c7101ef
 
c7101ef
@@ -12,4 +12,6 @@
c7101ef
 		suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx \
c7101ef
 		phonet.hxx filemgr.hxx hunzip.hxx w_char.hxx replist.hxx
c7101ef
 
c7101ef
+libhunspell_1_2_la_DEPENDENCIES=utf_info.cxx
c7101ef
+
c7101ef
 EXTRA_DIST=hunspell.dsp makefile.mk README
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/replist.cxx hunspell-1.2.8/src/hunspell/replist.cxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/replist.cxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/replist.cxx	2009-06-24 15:30:35.000000000 +0100
c7101ef
@@ -79,7 +79,7 @@
c7101ef
     int stl = 0;
c7101ef
     int change = 0;
c7101ef
 //    for (int i = 0; i < pos; i++) fprintf(stderr, "%d. %s\n", i, dat[i]->pattern);
c7101ef
-    for (int i = 0; i < strlen(word); i++) {
c7101ef
+    for (size_t i = 0; i < strlen(word); i++) {
c7101ef
         int n = near(word + i);
c7101ef
         int l = match(word + i, n);
c7101ef
         if (l) {
c7101ef
diff -ru hunspell-1.2.8.orig/src/hunspell/suggestmgr.cxx hunspell-1.2.8/src/hunspell/suggestmgr.cxx
c7101ef
--- hunspell-1.2.8.orig/src/hunspell/suggestmgr.cxx	2009-06-24 15:00:32.000000000 +0100
c7101ef
+++ hunspell-1.2.8/src/hunspell/suggestmgr.cxx	2009-06-24 15:33:17.000000000 +0100
c7101ef
@@ -1924,8 +1924,8 @@
c7101ef
   for (j = 0; j <= n; j++) c[j] = 0;
c7101ef
   for (i = 1; i <= m; i++) {
c7101ef
     for (j = 1; j <= n; j++) {
c7101ef
-      if ((utf8) && (*((short *) su+i-1) == *((short *)su2+j-1))
c7101ef
-          || (!utf8) && ((*(s+i-1)) == (*(s2+j-1)))) {
c7101ef
+      if ( ((utf8) && (*((short *) su+i-1) == *((short *)su2+j-1)))
c7101ef
+          || ((!utf8) && ((*(s+i-1)) == (*(s2+j-1))))) {
c7101ef
         c[i*(n+1) + j] = c[(i-1)*(n+1) + j-1]+1;
c7101ef
         b[i*(n+1) + j] = LCS_UPLEFT;
c7101ef
       } else if (c[(i-1)*(n+1) + j] >= c[i*(n+1) + j-1]) {