2011-02-03 Sebastian Dransfeld
* Fix leak in efreet_mime_type_icon_get()
+
+2011-02-05 Sebastian Dransfeld
+
+ * Remove global log domain and make all files define log domain
+ before including efreet_private.h
#include <Ecore.h>
#include <Ecore_File.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM /* no logging in this file */
+
#include "Efreet.h"
#include "efreet_private.h"
#include "efreet_xml.h"
static const char *efreet_lang = NULL;
static const char *efreet_lang_country = NULL;
static const char *efreet_lang_modifier = NULL;
-int _efreet_log_domain_global = -1;
static void efreet_parse_locale(void);
static int efreet_parse_locale_setting(const char *env);
goto shutdown_eet;
if (!ecore_file_init())
goto shutdown_ecore;
- _efreet_log_domain_global = eina_log_domain_register("efreet", EFREET_DEFAULT_LOG_COLOR);
- if (_efreet_log_domain_global < 0)
- {
- EINA_LOG_ERR("Efreet could create a general log domain.");
- goto shutdown_ecore_file;
- }
if (!efreet_base_init())
- goto unregister_log_domain;
+ goto shutdown_ecore_file;
if (!efreet_cache_init())
goto shutdown_efreet_base;
efreet_cache_shutdown();
shutdown_efreet_base:
efreet_base_shutdown();
-unregister_log_domain:
- eina_log_domain_unregister(_efreet_log_domain_global);
shutdown_ecore_file:
ecore_file_shutdown();
shutdown_ecore:
efreet_xml_shutdown();
efreet_cache_shutdown();
efreet_base_shutdown();
- eina_log_domain_unregister(_efreet_log_domain_global);
IF_RELEASE(efreet_lang);
IF_RELEASE(efreet_lang_country);
#include <limits.h>
#include <unistd.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM _efreet_base_log_dom
+static int _efreet_base_log_dom = -1;
+
#include "Efreet.h"
#include "efreet_private.h"
static Eina_List *xdg_config_dirs = NULL;
static const char *hostname = NULL;
-/* define macros and variable for using the eina logging system */
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-
-#define EFREET_MODULE_LOG_DOM _efreet_base_log_dom
-static int _efreet_base_log_dom = -1;
-
-
static const char *efreet_dir_get(const char *key, const char *fallback);
static Eina_List *efreet_dirs_get(const char *key,
const char *fallback);
#include <Ecore.h>
#include <Ecore_File.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM _efreet_cache_log_dom
+static int _efreet_cache_log_dom = -1;
+
#include "Efreet.h"
#include "efreet_private.h"
#include "efreet_cache_private.h"
Eet_File *ef;
};
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-#define EFREET_MODULE_LOG_DOM _efreet_cache_log_dom
-
-static int _efreet_cache_log_dom = -1;
-
/**
* Data for cache files
*/
#include <Ecore_File.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM _efreet_desktop_log_dom
+int _efreet_desktop_log_dom = -1;
+
#include "Efreet.h"
#include "efreet_private.h"
static Eina_Hash *change_monitors = NULL;
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-
-#define EFREET_MODULE_LOG_DOM _efreet_desktop_log_dom
-int _efreet_desktop_log_dom = -1;
-
EAPI int EFREET_DESKTOP_TYPE_APPLICATION = 0;
EAPI int EFREET_DESKTOP_TYPE_LINK = 0;
EAPI int EFREET_DESKTOP_TYPE_DIRECTORY = 0;
#include <Ecore.h>
#include <Ecore_File.h>
-#include "Efreet.h"
-#include "efreet_private.h"
-
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-
+/* define macros and variable for using the eina logging system */
#define EFREET_MODULE_LOG_DOM _efreet_desktop_log_dom
extern int _efreet_desktop_log_dom;
+#include "Efreet.h"
+#include "efreet_private.h"
+
/**
* @internal
* The different types of commands in an Exec entry
#include <Ecore.h>
#include <Ecore_File.h>
-#include "Efreet.h"
-#include "efreet_private.h"
-
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
+/* define macros and variable for using the eina logging system */
#define EFREET_MODULE_LOG_DOM _efreet_icon_log_dom
-
static int _efreet_icon_log_dom = -1;
+#include "Efreet.h"
+#include "efreet_private.h"
+
Eina_Hash *efreet_icon_themes = NULL;
static const char *efreet_icon_deprecated_user_dir = NULL;
#include <Ecore_File.h>
-#include "Efreet.h"
-#include "efreet_private.h"
-
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
+/* define macros and variable for using the eina logging system */
#define EFREET_MODULE_LOG_DOM _efreet_ini_log_dom
static int _efreet_ini_log_dom = -1;
+#include "Efreet.h"
+#include "efreet_private.h"
+
static Eina_Hash *efreet_ini_parse(const char *file);
static const char *efreet_ini_unescape(const char *str) EINA_ARG_NONNULL(1);
static Eina_Bool
#include <Ecore_File.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM _efreet_menu_log_dom
+static int _efreet_menu_log_dom = -1;
+
#include "Efreet.h"
#include "efreet_private.h"
#include "efreet_xml.h"
static Eina_Hash *efreet_menu_move_cbs = NULL;
static Eina_Hash *efreet_menu_layout_cbs = NULL;
-/* define macros and variable for using the eina logging system */
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-
-#define EFREET_MODULE_LOG_DOM _efreet_menu_log_dom
-
-static int _efreet_menu_log_dom = -1;
-
-
static const char *efreet_menu_prefix_get(void);
static Efreet_Menu_Internal *efreet_menu_by_name_find(Efreet_Menu_Internal *internal,
#include <Ecore.h>
#include <Ecore_File.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM _efreet_mime_log_dom
+static int _efreet_mime_log_dom = -1;
+
#include "Efreet.h"
#include "Efreet_Mime.h"
#include "efreet_private.h"
unsigned int size;
};
-/* define macros and variable for using the eina logging system */
-
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-#define EFREET_MODULE_LOG_DOM _efreet_mime_log_dom
-static int _efreet_mime_log_dom = -1;
-
-
static int efreet_mime_glob_remove(const char *glob);
static void efreet_mime_mime_types_load(const char *file);
static void efreet_mime_shared_mimeinfo_globs_load(const char *file);
* global log domain for efreet (see eina_log module)
*/
-extern int _efreet_log_dom_global;
#ifdef EFREET_DEFAULT_LOG_COLOR
#undef EFREET_DEFAULT_LOG_COLOR
#endif
#define EFREET_DEFAULT_LOG_COLOR "\033[36m"
-#define EFREET_MODULE_LOG_DOM _efreet_log_dom_global /*default log domain for each module. It can redefined inside each module */
+#ifndef EFREET_MODULE_LOG_DOM
+#error "Need to define a log domain"
+#endif
#ifdef ERROR
#undef ERROR
#endif
* four macros are defined ERR, WRN, DGB, INF.
* EFREET_MODULE_LOG_DOM should be defined individually for each module
*/
-#define EFREET_MODULE_LOG_DOM _efreet_log_dom_global /*default log domain for each module. It can redefined inside each module */
#ifdef ERR
#undef ERR
#endif
#include <Ecore_File.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM _efreet_trash_log_dom
+static int _efreet_trash_log_dom = -1;
+
#include "Efreet.h"
#include "Efreet_Trash.h"
#include "efreet_private.h"
# define getuid() GetCurrentProcessId()
#endif
-/* define macros and variable for using the eina logging system */
-
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-#define EFREET_MODULE_LOG_DOM _efreet_trash_log_dom
-static int _efreet_trash_log_dom = -1;
-
/**
* @return Returns 1 on success or 0 on failure
* @brief Initializes the efreet trash system
# include <Evil.h>
#endif
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM /* no logging in this file */
+
#include "Efreet.h"
#include "efreet_private.h"
#include <Eet.h>
#include <Ecore_File.h>
-#include "Efreet.h"
-#include "efreet_private.h"
-#include "efreet_cache_private.h"
-
/* define macros and variable for using the eina logging system */
-
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
#define EFREET_MODULE_LOG_DOM _efreet_utils_log_dom
static int _efreet_utils_log_dom = -1;
+#include "Efreet.h"
+#include "efreet_private.h"
+#include "efreet_cache_private.h"
+
static char *efreet_util_path_in_default(const char *section, const char *path);
static int efreet_util_glob_match(const char *str, const char *glob);
#include <Ecore_File.h>
+/* define macros and variable for using the eina logging system */
+#define EFREET_MODULE_LOG_DOM _efreet_xml_log_dom
+static int _efreet_xml_log_dom = -1;
+
#include "Efreet.h"
#include "efreet_private.h"
#include "efreet_xml.h"
static int error = 0;
-/* define macros and variable for using the eina logging system */
-
-#ifdef EFREET_MODULE_LOG_DOM
-#undef EFREET_MODULE_LOG_DOM
-#endif
-#define EFREET_MODULE_LOG_DOM _efreet_xml_log_dom
-
static int _efreet_xml_init_count = 0;
-static int _efreet_xml_log_dom = -1;
/**
* @internal