Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions varnam.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,20 @@ static const char* symbolsFileSearchPath[] = {
const char*
varnam_find_symbols_file_directory()
{
char *tmp;
strbuf *user_path;
int i;

if (varnam_symbols_dir != NULL && is_directory(strbuf_to_s (varnam_symbols_dir))) {
return strbuf_to_s(varnam_symbols_dir);
}

char *env_symbols_dir = getenv("VARNAM_SYMBOLS_DIR");

if (env_symbols_dir != NULL) {
return env_symbols_dir;
}

char *tmp;
strbuf *user_path;
int i;

user_path = strbuf_init (20);

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32)
Expand Down Expand Up @@ -304,6 +310,12 @@ make_directory (const char *dirName)
static strbuf*
find_learnings_file_path (const char *langCode)
{
char *env_suggestions_dir = getenv("VARNAM_SUGGESTIONS_DIR");

if (env_suggestions_dir != NULL) {
return env_suggestions_dir;
}

char *tmp;
strbuf *path;

Expand Down Expand Up @@ -341,7 +353,7 @@ find_learnings_file_path (const char *langCode)
}
}
}

strbuf_addf (path, "%s.vst.learnings", langCode);
return path;
}
Expand Down