[orca-list] [speechd] illegal enum value
- From: Cameron Wong <hgneng gmail com>
- To: orca-list gnome org
- Subject: [orca-list] [speechd] illegal enum value
- Date: Sat, 5 Dec 2009 12:26:23 +0800
Hello,
I am trying to write a new module basing on flite.c. But I write it in
C++. When I build the module, it complains:
ekho.cc:80: error: invalid conversion from ‘int’ to ‘EPunctMode’
ekho.cc:80: error: invalid conversion from ‘int’ to ‘ESpellMode’
ekho.cc:80: error: invalid conversion from ‘int’ to ‘ECapLetRecogn’
The problem lies in following code:
msg_settings_old.punctuation_mode = -1;\
msg_settings_old.spelling_mode = -1;\
msg_settings_old.cap_let_recogn = -1;\
I don't understand the code, but should we use a new enum value
instead of -1? Thanks!
Cameron Wong
/***** some related source code in fdset.h and module_utils *****/
#define CLEAN_OLD_SETTINGS_TABLE()\
msg_settings_old.rate = -101;\
msg_settings_old.pitch = -101;\
msg_settings_old.volume = -101;\
msg_settings_old.punctuation_mode = -1;\
msg_settings_old.spelling_mode = -1;\
msg_settings_old.cap_let_recogn = -1;\
msg_settings_old.language = NULL; \
msg_settings_old.voice = NO_VOICE;\
msg_settings_old.synthesis_voice = NULL;
...
EPunctMode punctuation_mode;
ESpellMode spelling_mode;
ECapLetRecogn cap_let_recogn;
...
typedef enum
{
RECOGN_NONE = 0,
RECOGN_SPELL = 1,
RECOGN_ICON = 2
}ECapLetRecogn;
typedef enum
{
PUNCT_NONE = 0,
PUNCT_ALL = 1,
PUNCT_SOME = 2
}EPunctMode;
typedef enum
{
SPELLING_OFF = 0,
SPELLING_ON = 1
}ESpellMode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]