diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-08-27 19:32:02 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2013-08-27 19:33:28 +0200 |
commit | bd4f4a136fc218f0854f5ee5219149ce5b0acdb3 (patch) | |
tree | 204a702d6a68939edc4b816ef481c6542cdbe807 /src/io.c | |
parent | ef0f9e64118559f58e2a4c830d3247b464b6345c (diff) | |
download | calcurse-bd4f4a136fc218f0854f5ee5219149ce5b0acdb3.zip |
Display translated help pages
Use an algorithm similar to gettext's locale resolution to find an
appropriate translation to display. Fall back to the English version.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/io.c')
-rw-r--r-- | src/io.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -872,6 +872,13 @@ int io_check_dir(const char *dir) } } +unsigned io_dir_exists(const char *path) +{ + struct stat st; + + return (!stat(path, &st) && S_ISDIR(st.st_mode)); +} + unsigned io_file_exists(const char *file) { FILE *fd; |