Lines Matching refs:picoos_uchar
120 #define TOK_MARKUP_KW_IGNORE (picoos_uchar*)"ignore"
121 #define TOK_MARKUP_KW_SPEED (picoos_uchar*)"speed"
122 #define TOK_MARKUP_KW_PITCH (picoos_uchar*)"pitch"
123 #define TOK_MARKUP_KW_VOLUME (picoos_uchar*)"volume"
124 #define TOK_MARKUP_KW_VOICE (picoos_uchar*)"voice"
125 #define TOK_MARKUP_KW_CONTEXT (picoos_uchar*)"preproccontext"
126 #define TOK_MARKUP_KW_MARK (picoos_uchar*)"mark"
127 #define TOK_MARKUP_KW_PLAY (picoos_uchar*)"play"
128 #define TOK_MARKUP_KW_USESIG (picoos_uchar*)"usesig"
129 #define TOK_MARKUP_KW_GENFILE (picoos_uchar*)"genfile"
130 #define TOK_MARKUP_KW_SENTENCE (picoos_uchar*)"sentence"
131 #define TOK_MARKUP_KW_S (picoos_uchar*)"s"
132 #define TOK_MARKUP_KW_PARAGRAPH (picoos_uchar*)"paragraph"
133 #define TOK_MARKUP_KW_P (picoos_uchar*)"p"
134 #define TOK_MARKUP_KW_BREAK (picoos_uchar*)"break"
135 #define TOK_MARKUP_KW_SPELL (picoos_uchar*)"spell"
136 #define TOK_MARKUP_KW_PHONEME (picoos_uchar*)"phoneme"
137 #define TOK_MARKUP_KW_ITEM (picoos_uchar*)"item"
138 #define TOK_MARKUP_KW_SPEAKER (picoos_uchar*)"speaker"
140 #define KWLevel (picoos_uchar *)"level"
141 #define KWName (picoos_uchar *)"name"
142 #define KWProsDomain (picoos_uchar *)"prosodydomain"
143 #define KWTime (picoos_uchar *)"time"
144 #define KWMode (picoos_uchar *)"mode"
145 #define KWSB (picoos_uchar *)"sb"
146 #define KWPB (picoos_uchar *)"pb"
147 #define KWFile (picoos_uchar *)"file"
148 #define KWType (picoos_uchar *)"type"
149 #define KWF0Beg (picoos_uchar *)"f0beg"
150 #define KWF0End (picoos_uchar *)"f0end"
151 #define KWXFadeBeg (picoos_uchar *)"xfadebeg"
152 #define KWXFadeEnd (picoos_uchar *)"xfadeend"
153 #define KWAlphabet (picoos_uchar *)"alphabet"
154 #define KWPH (picoos_uchar *)"ph"
155 #define KWOrthMode (picoos_uchar *)"orthmode"
156 #define KWIgnorePunct (picoos_uchar *)"ignorepunct"
157 #define KWInfo1 (picoos_uchar *)"info1"
158 #define KWInfo2 (picoos_uchar *)"info2"
159 #define KWDATA (picoos_uchar *)"data"
188 #define PICO_CONTEXT_DEFAULT (picoos_uchar*)"DEFAULT"
198 typedef picoos_uchar Word[MARKUP_STRING_BUF_SIZE];
208 typedef picoos_uchar utf8char0c[5]; /* one more than needed so it is ended always with 0c*/
224 picoos_uchar markupStr[MARKUP_STRING_BUF_SIZE];
227 picoos_uchar markupTagName[IN_BUF_SIZE];
232 picoos_uchar strDelim;
239 picoos_uchar tokenStr[IN_BUF_SIZE];
252 picoos_uchar saveFile[IN_BUF_SIZE];
271 static void tok_treatChar (picodata_ProcessingUnit this, tok_subobj_t * tok, picoos_uchar ch, picoos_bool markupHandling);
273 static void tok_putToMarkup (picodata_ProcessingUnit this, tok_subobj_t * tok, picoos_uchar str[]);
275 static MarkupId tok_markupTagId (picoos_uchar tagId[]);
279 static picoos_bool tok_strEqual(picoos_uchar * str1, picoos_uchar * str2)
284 static void tok_reduceBlanks(picoos_uchar * str)
293 if (str[j] == (picoos_uchar)' ') {
296 str[i] = (picoos_uchar)' ';
300 while (str[j] == (picoos_uchar)' ') {
332 static void tok_getParamIntVal (MarkupParams params, picoos_uchar paramId[], picoos_int32 * paramVal, picoos_bool * paramFound)
350 static void tok_getParamStrVal (MarkupParams params, picoos_uchar paramId[], picoos_uchar paramStrVal[], picoos_bool * paramFound)
367 static void tok_getParamPhonesStr (MarkupParams params, picoos_uchar paramId[], picoos_uchar alphabet[], picoos_uchar phones[], picoos_int32 phoneslen, picoos_bool * paramFound)
378 if (tok_strEqual(alphabet, PICODATA_XSAMPA) || tok_strEqual(alphabet, (picoos_uchar*)"")) {
406 static void tok_getDur (picoos_uchar durStr[], picoos_uint32 * dur, picoos_bool * done)
411 picoos_uchar tmpWord[IN_BUF_SIZE];
421 if (tok_strEqual(tmpWord, (picoos_uchar*)"s")) {
424 } else if (tok_strEqual(tmpWord,(picoos_uchar*)"ms")) {
434 static picoos_int32 tok_putToUtf (tok_subobj_t * tok, picoos_uchar ch)
440 } else if (((ch < (picoos_uchar)'\200') || (ch >= (picoos_uchar)'\300'))) {
460 static picoos_bool tok_isRelative (picoos_uchar strval[], picoos_uint32 * val)
485 picoos_uchar str[])
597 static MarkupId tok_markupTagId (picoos_uchar tagId[])
642 static void tok_checkLimits (picodata_ProcessingUnit this, picoos_uint32 * value, picoos_uint32 min, picoos_uint32 max, picoos_uchar valueType[])
658 static void tok_checkRealLimits (picodata_ProcessingUnit this, picoos_single * value, picoos_single min, picoos_single max, picoos_uchar valueType[])
679 picoos_uchar valStr[VAL_STR_LEN];
680 picoos_uchar valStr2[VAL_STR_LEN];
681 picoos_uchar valStr3[VAL_STR_LEN];
689 picoos_uchar part[10];
694 if (isStartTag && tok_strEqual(tok->markupParams[0].paramId,(picoos_uchar*)"")) {
697 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
705 tok_checkLimits(this, & uval, PICO_SPEED_FACTOR_MIN, PICO_SPEED_FACTOR_MAX,(picoos_uchar*)"relative speed factor");
706 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SPEED, PICODATA_ITEMINFO2_CMD_RELATIVE, uval, (picoos_uchar*)"");
709 tok_checkLimits(this, & uval, PICO_SPEED_MIN, PICO_SPEED_MAX,(picoos_uchar*)"speed");
710 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SPEED, PICODATA_ITEMINFO2_CMD_ABSOLUTE, uval, (picoos_uchar*)"");
713 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
714 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SPEED, PICODATA_ITEMINFO2_CMD_ABSOLUTE, PICO_SPEED_DEFAULT, (picoos_uchar*)"");
721 tok_checkLimits(this, & uval,PICO_PITCH_FACTOR_MIN,PICO_PITCH_FACTOR_MAX, (picoos_uchar*)"relative pitch factor");
722 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_PITCH, PICODATA_ITEMINFO2_CMD_RELATIVE, uval, (picoos_uchar*)"");
725 tok_checkLimits(this, & uval,PICO_PITCH_MIN,PICO_PITCH_MAX, (picoos_uchar*)"pitch");
726 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_PITCH,PICODATA_ITEMINFO2_CMD_ABSOLUTE, uval, (picoos_uchar*)"");
729 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
730 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_PITCH,PICODATA_ITEMINFO2_CMD_ABSOLUTE, PICO_PITCH_DEFAULT, (picoos_uchar*)"");
737 tok_checkLimits(this, & uval, PICO_VOLUME_FACTOR_MIN, PICO_VOLUME_FACTOR_MAX, (picoos_uchar*)"relative volume factor");
738 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_VOLUME, PICODATA_ITEMINFO2_CMD_RELATIVE, uval, (picoos_uchar*)"");
741 tok_checkLimits(this, & uval, PICO_VOLUME_MIN, PICO_VOLUME_MAX, (picoos_uchar*)"volume");
742 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_VOLUME, PICODATA_ITEMINFO2_CMD_ABSOLUTE, uval, (picoos_uchar*)"");
745 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
746 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_VOLUME, PICODATA_ITEMINFO2_CMD_ABSOLUTE, PICO_VOLUME_DEFAULT, (picoos_uchar*)"");
753 tok_checkLimits(this, & uval, PICO_SPEAKER_FACTOR_MIN, PICO_SPEAKER_FACTOR_MAX, (picoos_uchar*)"relative speaker factor");
754 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SPEAKER, PICODATA_ITEMINFO2_CMD_RELATIVE, uval, (picoos_uchar*)"");
757 tok_checkLimits(this, & uval, PICO_SPEAKER_MIN, PICO_SPEAKER_MAX, (picoos_uchar*)"volume");
758 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SPEAKER, PICODATA_ITEMINFO2_CMD_ABSOLUTE, uval, (picoos_uchar*)"");
761 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
762 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SPEAKER, PICODATA_ITEMINFO2_CMD_ABSOLUTE, PICO_SPEAKER_DEFAULT, (picoos_uchar*)"");
770 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_FLUSH, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
771 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_PROSDOMAIN, 0, 0, (picoos_uchar*)"");
773 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId,(picoos_uchar*)"")) {
774 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_VOICE, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
775 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_FLUSH, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
776 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_PROSDOMAIN, 0, 0, (picoos_uchar*)"");
784 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId,(picoos_uchar*)"")) {
793 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId,(picoos_uchar*)"")) {
799 tok_getParamStrVal(tok->markupParams, KWProsDomain, (picoos_uchar*)valStr, & paramFound);
800 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_FLUSH, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
803 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
804 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_FLUSH, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
805 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_PROSDOMAIN, 2, 0, (picoos_uchar*)"");
811 tok_getParamStrVal(tok->markupParams, KWProsDomain, (picoos_uchar*)valStr, & paramFound);
812 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_FLUSH, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
815 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
816 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_FLUSH, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
817 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SIL, PICODATA_ITEMINFO2_NA, PARAGRAPH_PAUSE_DUR, (picoos_uchar*)"");
818 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_PROSDOMAIN, 1, 0, (picoos_uchar*)"");
825 tok_checkLimits (this, &dur, 0, 65535, (picoos_uchar*)"time");
827 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SIL, PICODATA_ITEMINFO2_NA, dur, (picoos_uchar*)"");
830 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
843 tok_checkLimits (this, & uval, 0, 65535, (picoos_uchar*)"time");
851 picoos_uchar*)"");
853 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
854 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_SPELL, PICODATA_ITEMINFO2_CMD_END, 0, (picoos_uchar*)"");
869 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
872 picodata_getPuTypeFromExtension(tok->saveFile, /*input*/FALSE), 0, (picoos_uchar*)"");
897 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
912 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_IGNSIG, PICODATA_ITEMINFO2_CMD_START, 0, (picoos_uchar*)"");
919 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
920 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_IGNSIG, PICODATA_ITEMINFO2_CMD_END, 0, (picoos_uchar*)"");
957 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId, (picoos_uchar*)"")) {
959 PICODATA_ITEMINFO2_CMD_END, i2, (picoos_uchar*)"");
1006 } else if (!isStartTag && tok_strEqual(tok->markupParams[0].paramId,(picoos_uchar*)"")) {
1024 static picoos_bool tok_attrChar (picoos_uchar ch, picoos_bool first)
1026 return ((((ch >= (picoos_uchar)'A') && (ch <= (picoos_uchar)'Z')) ||
1027 ((ch >= (picoos_uchar)'a') && (ch <= (picoos_uchar)'z'))) ||
1028 ( !(first) && ((ch >= (picoos_uchar)'0') && (ch <= (picoos_uchar)'9'))));
1033 static picoos_bool tok_idChar (picoos_uchar ch, picoos_bool first)
1035 return tok_attrChar(ch, first) || ( !(first) && (ch == (picoos_uchar)':'));
1039 static void tok_setIsFileAttr (picoos_uchar name[], picoos_bool * isFile)
1046 static void tok_putToSimpleToken (picodata_ProcessingUnit this, tok_subobj_t * tok, picoos_uchar str[], pico_tokenType type, pico_tokenSubType subtype)
1066 static void tok_putToMarkup (picodata_ProcessingUnit this, tok_subobj_t * tok, picoos_uchar str[])
1079 } else if ((str[i] == (picoos_uchar)' ') && ((tok->markupState == MSExpectingmarkupTagName) || (tok->markupState == MSGotmarkupTagName) || (tok->markupState == MSGotAttrName) || (tok->markupState == MSGotEqual) || (tok->markupState == MSGotAttrValue))) {
1080 } else if ((str[i] == (picoos_uchar)'>') && ((tok->markupState == MSGotmarkupTagName) || (tok->markupState == MSInmarkupTagName) || (tok->markupState == MSGotAttrValue))) {
1082 } else if ((str[i] == (picoos_uchar)'/') && ((tok->markupState == MSGotmarkupTagName) || (tok->markupState == MSInmarkupTagName) || (tok->markupState == MSGotAttrValue))) {
1093 if (str[i] == (picoos_uchar)'<') {
1105 if (str[i] == (picoos_uchar)'/') {
1108 } else if (str[i] == (picoos_uchar)' ') {
1127 } else if ((tok->markupState == MSInmarkupTagName) && (str[i] == (picoos_uchar)' ')) {
1164 } else if (str[i] == (picoos_uchar)' ') {
1168 } else if (str[i] == (picoos_uchar)'=') {
1178 if (str[i] == (picoos_uchar)'=') {
1186 if ((str[i] == (picoos_uchar)'"') || (str[i] == (picoos_uchar)'\'')) {
1196 if (!(tok->isFileAttr) && (str[i] == (picoos_uchar)'\\')) {
1222 if (str[i] == (picoos_uchar)'>') {
1273 tok_putToSimpleToken(this, tok, (picoos_uchar*)" ", PICODATA_ITEMINFO1_TOKTYPE_SPACE, -1);
1300 static void tok_treatChar (picodata_ProcessingUnit this, tok_subobj_t * tok, picoos_uchar ch, picoos_bool markupHandling)
1312 tok_putItem(this, tok, PICODATA_ITEM_CMD, PICODATA_ITEMINFO1_CMD_FLUSH, PICODATA_ITEMINFO2_NA, 0, (picoos_uchar*)"");
1333 } else if (tok->utf[tok->utfpos-1] <= (picoos_uchar)' ') {
1340 if ((tok->utf[tok->utfpos-1] > (picoos_uchar)' ')) {
1359 } else if ((markupHandling && (tok->utf[tok->utfpos-1] == (picoos_uchar)'<'))) {
1366 tok_putToSimpleToken(this, tok, (picoos_uchar*)".", PICODATA_ITEMINFO1_TOKTYPE_CHAR, -1);
1565 tok_treatChar(this, tok, (picoos_uchar) ch, /*markupHandling*/TRUE);