Skip to main content.
home | support | download

Back to List Archive

Re: no hits with soundex

From: Bill Moseley <moseley(at)not-real.hank.org>
Date: Tue Aug 20 2002 - 14:17:16 GMT
If you really want to use soundex, either cvs update or use try this
patch.  You can tell the by the dates that this bug has been sitting there
for a long time -- I guess soundex is not widely used.

Index: soundex.c
===================================================================
RCS file: /cvsroot/swishe/swish-e/src/soundex.c,v
retrieving revision 1.2
diff -u -u -r1.2 soundex.c
--- soundex.c   12 Feb 2001 17:36:37 -0000      1.2
+++ soundex.c   20 Aug 2002 14:12:29 -0000
@@ -86,14 +86,14 @@
 #endif
 
        /* Make sure it actually starts with a letter  */
-       if(!isalpha((int)((unsigned char)word[0]))) soundXit();
+       if(!isalpha((int)((unsigned char)word[0]))) return soundXit();
 #ifdef _DEBUG
        /* Debug to console  */
        printf("isalpha, ");
 #endif
        
        /* Get string length and make sure its at least 3 characters  */
-       if((n = (int)strlen(word)) < 3) soundXit();
+       if((n = (int)strlen(word)) < 3) return soundXit();
 #ifdef _DEBUG
        /* Debug to console  */
        printf("=>3, ");


-- 
Bill Moseley moseley@hank.org
Received on Tue Aug 20 14:20:43 2002