about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2012-08-26 18:01:44 +0100
committerJames Booth <boothj5@gmail.com>2012-08-26 18:01:44 +0100
commit6f2870ed7d96ec8535bb8db2ea400d47c046f305 (patch)
treed8fda2fba29712937bc150ec60e79a56afd2106a /src
parentfe519410b1b3a176807f34c490b645c29f13d525 (diff)
downloadprofani-tty-6f2870ed7d96ec8535bb8db2ea400d47c046f305.tar.gz
Moved create_config_dir function to profanity.c
Diffstat (limited to 'src')
-rw-r--r--src/common.c9
-rw-r--r--src/common.h1
-rw-r--r--src/profanity.c13
3 files changed, 12 insertions, 11 deletions
diff --git a/src/common.c b/src/common.c
index 7873e812..fd8da3e4 100644
--- a/src/common.c
+++ b/src/common.c
@@ -37,15 +37,6 @@ p_slist_free_full(GSList *items, GDestroyNotify free_func)
 }
 
 void
-create_config_directory()
-{
-    GString *dir = g_string_new(getenv("HOME"));
-    g_string_append(dir, "/.profanity");
-    create_dir(dir->str);
-    g_string_free(dir, TRUE);
-}
-
-void
 create_dir(char *name)
 {
     int e;
diff --git a/src/common.h b/src/common.h
index 351aa230..22daa038 100644
--- a/src/common.h
+++ b/src/common.h
@@ -36,7 +36,6 @@
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
 
 void p_slist_free_full(GSList *items, GDestroyNotify free_func);
-void create_config_directory(void);
 void create_dir(char *name);
 void get_time(char *thetime);
 char * str_replace(const char *string, const char *substr, 
diff --git a/src/profanity.c b/src/profanity.c
index a1665271..48f20e6c 100644
--- a/src/profanity.c
+++ b/src/profanity.c
@@ -37,6 +37,7 @@
 static log_level_t _get_log_level(char *log_level);
 gboolean _process_input(char *inp);
 static void _profanity_shutdown(void);
+static void _create_config_directory();
 
 void
 profanity_run(void)
@@ -73,7 +74,7 @@ profanity_run(void)
 void
 profanity_init(const int disable_tls, char *log_level)
 {
-    create_config_directory();
+    _create_config_directory();
     log_level_t prof_log_level = _get_log_level(log_level);
     log_init(prof_log_level);
     log_info("Starting Profanity (%s)...", PACKAGE_VERSION);
@@ -151,3 +152,13 @@ _process_input(char *inp)
 
     return result;
 }
+
+static void
+_create_config_directory()
+{
+    GString *dir = g_string_new(getenv("HOME"));
+    g_string_append(dir, "/.profanity");
+    create_dir(dir->str);
+    g_string_free(dir, TRUE);
+}
+