comparison sidinfo.c @ 213:65bd23eacdca

Use a #define for HVSC documents subdir name.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 23 Dec 2018 09:28:50 +0200
parents 90ff5dbee152
children 98563979859b
comparison
equal deleted inserted replaced
212:90ff5dbee152 213:65bd23eacdca
17 17
18 // Some constants 18 // Some constants
19 #define SET_DEF_CHARSET "utf8" // NOTE! Do not change unless you are using iconv()!! 19 #define SET_DEF_CHARSET "utf8" // NOTE! Do not change unless you are using iconv()!!
20 // The fallback converter does not handle other encodings. 20 // The fallback converter does not handle other encodings.
21 21
22 #define SET_HVSC_DOCUMENTS "DOCUMENTS"
22 #define SET_SLDB_FILEBASE "Songlengths" 23 #define SET_SLDB_FILEBASE "Songlengths"
23 24
24 25
25 enum 26 enum
26 { 27 {
1175 char *siCheckHVSCFilePath(const char *filebase, const char *fext) 1176 char *siCheckHVSCFilePath(const char *filebase, const char *fext)
1176 { 1177 {
1177 th_stat_data sdata; 1178 th_stat_data sdata;
1178 char *npath = th_strdup_printf("%s%c%s%c%s%s", 1179 char *npath = th_strdup_printf("%s%c%s%c%s%s",
1179 setHVSCPath, TH_DIR_SEPARATOR, 1180 setHVSCPath, TH_DIR_SEPARATOR,
1180 "DOCUMENTS", TH_DIR_SEPARATOR, 1181 SET_HVSC_DOCUMENTS, TH_DIR_SEPARATOR,
1181 filebase, fext); 1182 filebase, fext);
1182 1183
1183 if (npath != NULL && 1184 if (npath != NULL &&
1184 th_stat_path(npath, &sdata) && 1185 th_stat_path(npath, &sdata) &&
1185 (sdata.flags & TH_IS_READABLE) && 1186 (sdata.flags & TH_IS_READABLE) &&