int main() { int i,j,sl; while(1) { if(gets(s)==NULL) break; sl=strlen(s); i=j=0; while(isspace(s[i])) i++; while(isalnum(s[i])) t[j++]=s[i++]; t[j]=0; for(i=0;i<sl;i++) if(s[i]==':') break; if(i<sl) { j=findname(t); if(j==-1) j=createname(t); strcpy(vn[j],t); strcpy(vf[j],s); i++; if(s[i]=='=') i++; while(isspace(s[i])) i++; vp[j]=i; } else if(!strcmp(t,"RESET")) n=0; else { sscanf(s,"%s %s",t,u); if(!strcmp(t,"PRINT")) { def=1; i=eval(u); if(!def) printf("UNDEF\n"); else printf("%d\n",i); } } } }
void DreamGenContext::loadspeech() { cancelch1(); data.byte(kSpeechloaded) = 0; createname(); const char *name = (const char *)data.ptr(di, 13); //warning("name = %s", name); if (engine->loadSpeech(name)) data.byte(kSpeechloaded) = 1; }