changeset 240:217f294deea5

Move function.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 04 Jan 2020 17:30:48 +0200
parents 82540f819194
children c9b57c8fd058
files sidinfo.c
diffstat 1 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/sidinfo.c	Sat Jan 04 17:27:29 2020 +0200
+++ b/sidinfo.c	Sat Jan 04 17:30:48 2020 +0200
@@ -263,6 +263,25 @@
 }
 
 
+char *siCheckHVSCFilePath(const char *filebase, const char *fext)
+{
+    th_stat_data sdata;
+    char *npath = th_strdup_printf("%s%c%s%c%s%s",
+        setHVSCPath, TH_DIR_SEPARATOR,
+        SET_HVSC_DOCUMENTS, TH_DIR_SEPARATOR,
+        filebase, fext != NULL ? fext : "");
+
+    if (npath != NULL &&
+        th_stat_path(npath, &sdata) &&
+        (sdata.flags & TH_IS_READABLE) &&
+        (sdata.flags & TH_IS_DIR) == 0)
+        return npath;
+
+    th_free(npath);
+    return NULL;
+}
+
+
 BOOL siStackAddItem(PSFStack *stack, const PSFStackItem *item)
 {
     if (stack->items == NULL || stack->nitems + 1 >= stack->nallocated)
@@ -1185,25 +1204,6 @@
 }
 
 
-char *siCheckHVSCFilePath(const char *filebase, const char *fext)
-{
-    th_stat_data sdata;
-    char *npath = th_strdup_printf("%s%c%s%c%s%s",
-        setHVSCPath, TH_DIR_SEPARATOR,
-        SET_HVSC_DOCUMENTS, TH_DIR_SEPARATOR,
-        filebase, fext != NULL ? fext : "");
-
-    if (npath != NULL &&
-        th_stat_path(npath, &sdata) &&
-        (sdata.flags & TH_IS_READABLE) &&
-        (sdata.flags & TH_IS_DIR) == 0)
-        return npath;
-
-    th_free(npath);
-    return NULL;
-}
-
-
 int main(int argc, char *argv[])
 {
     char *setLang = th_strdup(getenv("LANG"));