| } | } | ||||
| if (flag_compile) { | if (flag_compile) { | ||||
| #ifdef PLATFORM_DOS | |||||
| char path_dsource[sizeof(path_home)+20]; | |||||
| strcpy(path_dsource, path_home); | |||||
| path_dsource[strlen(path_home)-11] = 0; // remove "espeak-data" from the end | |||||
| strcat(path_dsource, "dictsource\\"); | |||||
| espeak_ng_STATUS status = espeak_ng_CompileDictionary(path_dsource, dictionary_name, NULL, flag_compile & 0x1); | |||||
| #else | |||||
| #ifdef PLATFORM_WINDOWS | |||||
| #if defined(PLATFORM_DOS) || defined(PLATFORM_WINDOWS) | |||||
| char path_dsource[sizeof(path_home)+20]; | char path_dsource[sizeof(path_home)+20]; | ||||
| strcpy(path_dsource, path_home); | strcpy(path_dsource, path_home); | ||||
| path_dsource[strlen(path_home)-11] = 0; // remove "espeak-data" from the end | path_dsource[strlen(path_home)-11] = 0; // remove "espeak-data" from the end | ||||
| strcat(path_dsource, "dictsource\\"); | strcat(path_dsource, "dictsource\\"); | ||||
| espeak_ng_STATUS status = espeak_ng_CompileDictionary(path_dsource, dictionary_name, NULL, flag_compile & 0x1); | espeak_ng_STATUS status = espeak_ng_CompileDictionary(path_dsource, dictionary_name, NULL, flag_compile & 0x1); | ||||
| #else | #else | ||||
| espeak_ng_STATUS status = espeak_ng_CompileDictionary(NULL, dictionary_name, NULL, flag_compile & 0x1); | espeak_ng_STATUS status = espeak_ng_CompileDictionary(NULL, dictionary_name, NULL, flag_compile & 0x1); | ||||
| #endif | |||||
| #endif | #endif | ||||
| return (status == ENS_OK) ? EXIT_SUCCESS : EXIT_FAILURE; | return (status == ENS_OK) ? EXIT_SUCCESS : EXIT_FAILURE; | ||||
| } | } |