Bug in English to Phoneme Translation
John A. Wasser
wasser_1 at viking.DEC
Wed Apr 3 02:08:38 AEST 1985
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 at 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
More information about the Comp.sources.bugs
mailing list