aboutsummaryrefslogtreecommitdiffstats
path: root/fm.c
diff options
context:
space:
mode:
Diffstat (limited to 'fm.c')
-rw-r--r--fm.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/fm.c b/fm.c
index c7a6ff1..afd390b 100644
--- a/fm.c
+++ b/fm.c
@@ -19,23 +19,6 @@
static magic_t g_magic_ctx = NULL;
-void magic_init(void)
-{
- if (!g_magic_ctx) {
- g_magic_ctx = magic_open(MAGIC_MIME_TYPE | MAGIC_SYMLINK);
- if (!g_magic_ctx)
- die("Cannot initialize magic");
- if (magic_load(g_magic_ctx, NULL) != 0)
- die("Magic load failed: %s", magic_error(g_magic_ctx));
- }
-}
-
-void magic_cleanup(void)
-{
- if (g_magic_ctx)
- magic_close(g_magic_ctx);
-}
-
/* Function forward declarations */
static fm_info *fm_w_init(terminal *term);
static void fm_file_list_init(file_list *l, int cap);
@@ -334,3 +317,20 @@ void fm_cd_down(fm_info *info)
free(next_dir);
}
+
+void magic_init(void)
+{
+ if (!g_magic_ctx) {
+ g_magic_ctx = magic_open(MAGIC_MIME_TYPE | MAGIC_SYMLINK);
+ if (!g_magic_ctx)
+ die("Cannot initialize magic");
+ if (magic_load(g_magic_ctx, NULL) != 0)
+ die("Magic load failed: %s", magic_error(g_magic_ctx));
+ }
+}
+
+void magic_cleanup(void)
+{
+ if (g_magic_ctx)
+ magic_close(g_magic_ctx);
+}