*
* Copyright (C) 2013 Hugo Villeneuve <hugo@hugovil.com>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ * This file is released under the GPLv2
*/
#if HAVE_CONFIG_H
}
static int
-app_config_key_file_get_int(GKeyFile *kf, const char *grp, const char *key, int *value)
+app_config_key_file_get_int(GKeyFile *kf, const char *grp, const char *key,
+ int *value)
{
- char *str = g_key_file_get_value(kf, grp, key, NULL);
+ char *str = g_key_file_get_value(kf, grp, key, NULL);
- log_debug("key: %s", key);
+ log_debug("key: %s", key);
- if (G_LIKELY(str)) {
- *value = atoi(str);
- log_debug(" value = %d", *value);
- g_free(str);
- }
+ if (G_LIKELY(str)) {
+ *value = atoi(str);
+ log_debug(" value = %d", *value);
+ g_free(str);
+ }
- return str != NULL;
+ return str != NULL;
}
static void
dir_path = app_config_get_dir_path();
- if (g_mkdir_with_parents(dir_path, 0700) != -1)
- {
+ if (g_mkdir_with_parents(dir_path, 0700) != -1) {
char *file_path;
- GString* buf = g_string_sized_new(1024);
+ GString *buf = g_string_sized_new(1024);
g_string_append(buf, "\n[emulation]\n");