mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-26 04:59:59 +00:00
Group the LookupMnem API implementations into mnemonics.c.
This commit is contained in:
@@ -17,24 +17,10 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <espeak-ng/espeak_ng.h>
|
||||
|
||||
#include "speech.h"
|
||||
|
||||
static int
|
||||
LookupMnemValue(MNEM_TAB *table,
|
||||
const char *string)
|
||||
{
|
||||
while (table->mnem != NULL) {
|
||||
if (strcmp(string, table->mnem) == 0)
|
||||
return table->value;
|
||||
table++;
|
||||
}
|
||||
return table->value;
|
||||
}
|
||||
|
||||
MNEM_TAB mnem_encoding[] = {
|
||||
{ NULL, ESPEAKNG_ENCODING_UNKNOWN }
|
||||
};
|
||||
@@ -44,7 +30,7 @@ MNEM_TAB mnem_encoding[] = {
|
||||
espeak_ng_ENCODING
|
||||
espeak_ng_EncodingFromName(const char *encoding)
|
||||
{
|
||||
return LookupMnemValue(mnem_encoding, encoding);
|
||||
return LookupMnem(mnem_encoding, encoding);
|
||||
}
|
||||
|
||||
#pragma GCC visibility pop
|
||||
|
||||
Reference in New Issue
Block a user