| 30 | |
| 31 | namespace { |
| 32 | void append_word_to_user_dictionary(const wchar_t *dictionary_path, const char *word) { |
| 33 | if (!dictionary_path) |
| 34 | return; |
| 35 | |
| 36 | auto fp = _wfopen(dictionary_path, L"a"); |
| 37 | fprintf(fp, "%s\n", word); |
| 38 | fclose(fp); |
| 39 | } |
| 40 | |
| 41 | std::vector<char> read_file_data(const wchar_t *file_path) { |
| 42 | auto fp = _wfopen(file_path, L"rb"); |