Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site decwrl.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!harpo!decvax!decwrl!dec-rhea!dec-viking!wasser_1 From: wasser_1@viking.DEC (John A. Wasser) Newsgroups: net.sources.bugs Subject: Bug in English to Phoneme Translation Message-ID: <1451@decwrl.UUCP> Date: Tue, 2-Apr-85 11:08:38 EST Article-I.D.: decwrl.1451 Posted: Tue Apr 2 11:08:38 1985 Date-Received: Wed, 3-Apr-85 02:43:35 EST Sender: daemon@decwrl.UUCP Organization: DEC Engineering Network Lines: 39 There is a bug in the English to Phoneme translation I posted last week: In the routine leftmatch() there is a loop that looks like this: for ( ; pat != pattern ; pat--) This loop terminates early and should be changed to: int cnt; /* Number of characters in pattern */ . . . for (cnt = strlen(pattern) ; cnt > 0 ; pat--,cnt--) I do not recommend fixing this by changing the != to >= because the variables are pointers and relational operations on pointers are not very portable. The file containing this bug also needs definitions of TRUE and FALSE: #define FALSE 0 #define TRUE (!FALSE) These seem to be pre-defined in VAX VMS 'C' under which the code was developed. -John A. Wasser Work address: ARPAnet: WASSER%VIKING.DEC@decwrl.ARPA Usenet: {allegra,Shasta,decvax}!decwrl!dec-rhea!dec-viking!wasser USPS: Digital Equipment Corp. Mail stop: LJO2/E4 30 Porter Rd Littleton, MA 01460