|
|
|
|
|
|
|
|
#include <stdio.h> |
|
|
#include <stdio.h> |
|
|
#include <stdlib.h> |
|
|
#include <stdlib.h> |
|
|
#include <string.h> |
|
|
#include <string.h> |
|
|
|
|
|
#include <strings.h> |
|
|
#include <wctype.h> |
|
|
#include <wctype.h> |
|
|
|
|
|
|
|
|
#if defined(_WIN32) || defined(_WIN64) |
|
|
#if defined(_WIN32) || defined(_WIN64) |
|
|
|
|
|
|
|
|
last_part_len = strlen(last_part); |
|
|
last_part_len = strlen(last_part); |
|
|
|
|
|
|
|
|
for (ix = 0; voices[ix] != NULL; ix++) { |
|
|
for (ix = 0; voices[ix] != NULL; ix++) { |
|
|
if (strcmp(name, voices[ix]->name) == 0) { |
|
|
|
|
|
|
|
|
if (strcasecmp(name, voices[ix]->name) == 0) { |
|
|
match_name = ix; // found matching voice name |
|
|
match_name = ix; // found matching voice name |
|
|
break; |
|
|
break; |
|
|
} else { |
|
|
} else { |
|
|
id = voices[ix]->identifier; |
|
|
id = voices[ix]->identifier; |
|
|
if (strcmp(name, id) == 0) |
|
|
|
|
|
|
|
|
if (strcasecmp(name, id) == 0) |
|
|
match_fname = ix; // matching identifier, use this if no matching name |
|
|
match_fname = ix; // matching identifier, use this if no matching name |
|
|
else if (strcmp(last_part, &id[strlen(id)-last_part_len]) == 0) |
|
|
|
|
|
|
|
|
else if (strcasecmp(last_part, &id[strlen(id)-last_part_len]) == 0) |
|
|
match_fname2 = ix; |
|
|
match_fname2 = ix; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |