aboutsummaryrefslogtreecommitdiffstats
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2013-08-27 19:32:02 +0200
committerLukas Fleischer <calcurse@cryptocrack.de>2013-08-27 19:33:28 +0200
commitbd4f4a136fc218f0854f5ee5219149ce5b0acdb3 (patch)
tree204a702d6a68939edc4b816ef481c6542cdbe807 /src/io.c
parentef0f9e64118559f58e2a4c830d3247b464b6345c (diff)
downloadcalcurse-bd4f4a136fc218f0854f5ee5219149ce5b0acdb3.tar.gz
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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/io.c b/src/io.c
index 737be12..b998fc4 100644
--- a/src/io.c
+++ b/src/io.c
@@ -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;