$NetBSD: patch-ae,v 1.3 2004/07/24 19:05:37 salo Exp $

--- modules/speller/default/suggest.cpp.orig	Sat Jul 27 03:27:10 2002
+++ modules/speller/default/suggest.cpp	Sat Jul 24 20:20:51 2004
@@ -311,7 +311,15 @@
 	new_word[i+1] = new_word[i];
 	new_word[i] = '\0';
 	
+#ifndef __SUNPRO_CC
 	if (speller->check(new_word) && speller->check(new_word + i + 1)) {
+#else
+	bool bool_op1;
+	bool bool_op2;
+	bool_op1 = speller->check(new_word);
+	bool_op2 = speller->check(new_word + i + 1);
+	if (bool_op1 && bool_op2) {
+#endif
 	  new_word[i] = ' ';
 	  add_nearmiss(new_word, parms.edit_distance_weights.del2,
 		       dont_count, do_need_alloc);
@@ -634,11 +642,26 @@
 	string::size_type pos;
 	while((word = i->repl_list->next()) != 0) {
 	  dup_pair = duplicates_check.insert(fix_case(word));
+#ifndef __SUNPRO_CC
 	  if (dup_pair.second && 
 	      ((pos = dup_pair.first->find(' '), pos == String::npos)
 	       ? (bool)speller->check(*dup_pair.first)
 	       : (speller->check((String)dup_pair.first->substr(0,pos)) 
 		  && speller->check((String)dup_pair.first->substr(pos+1))) ))
+#else
+	  bool bool_op1 = false;
+	  bool bool_op2;
+	  bool bool_op3;
+	  if (pos = dup_pair.first->find(' '), pos == String::npos)
+	    bool_op1 = (bool)speller->check(*dup_pair.first);
+	  else {
+	    bool_op2 = speller->check((String)dup_pair.first->substr(0,pos));
+	    bool_op3 = speller->check((String)dup_pair.first->substr(pos+1));
+	    if (bool_op2 && bool_op3)
+	      bool_op1 = true;
+	  }
+	  if (dup_pair.second && bool_op1)
+#endif
 	    near_misses_final->push_back(*dup_pair.first);
 	}
       } else {
