| 1162 | |
| 1163 | |
| 1164 | static int NRL(const char *s, int n, darray *phone) |
| 1165 | { |
| 1166 | int old = phone->getSize(); |
| 1167 | char *word = (char *) malloc(n + 3); |
| 1168 | char *d = word; |
| 1169 | *d++ = ' '; |
| 1170 | |
| 1171 | while (n-- > 0) |
| 1172 | { |
| 1173 | char ch = *s++; |
| 1174 | |
| 1175 | if (islower(ch)) |
| 1176 | ch = toupper(ch); |
| 1177 | |
| 1178 | *d++ = ch; |
| 1179 | } |
| 1180 | |
| 1181 | *d++ = ' '; // kinda unnecessary |
| 1182 | |
| 1183 | *d = '\0'; |
| 1184 | guess_word(phone, word); |
| 1185 | free(word); |
| 1186 | return phone->getSize() - old; |
| 1187 | } |
| 1188 | |
| 1189 | |
| 1190 | static int spell_out(const char *word, int n, darray *phone) |
no test coverage detected