mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Moved create_config_dir function to profanity.c
This commit is contained in:
parent
fe519410b1
commit
6f2870ed7d
@ -36,15 +36,6 @@ p_slist_free_full(GSList *items, GDestroyNotify free_func)
|
||||
g_slist_free (items);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user