Remove global log domain

SVN revision: 56729
devs/devilhorns/wayland_egl
Sebastian Dransfeld 12 years ago
parent 259f8aad73
commit 6ed10251db
  1. 5
      legacy/efreet/ChangeLog
  2. 15
      legacy/efreet/src/lib/efreet.c
  3. 13
      legacy/efreet/src/lib/efreet_base.c
  4. 11
      legacy/efreet/src/lib/efreet_cache.c
  5. 11
      legacy/efreet/src/lib/efreet_desktop.c
  6. 11
      legacy/efreet/src/lib/efreet_desktop_command.c
  7. 11
      legacy/efreet/src/lib/efreet_icon.c
  8. 10
      legacy/efreet/src/lib/efreet_ini.c
  9. 14
      legacy/efreet/src/lib/efreet_menu.c
  10. 13
      legacy/efreet/src/lib/efreet_mime.c
  11. 6
      legacy/efreet/src/lib/efreet_private.h
  12. 12
      legacy/efreet/src/lib/efreet_trash.c
  13. 3
      legacy/efreet/src/lib/efreet_uri.c
  14. 12
      legacy/efreet/src/lib/efreet_utils.c
  15. 12
      legacy/efreet/src/lib/efreet_xml.c

@ -29,3 +29,8 @@
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

@ -29,6 +29,9 @@ void *alloca (size_t);
#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"
@ -40,7 +43,6 @@ static int efreet_parsed_locale = 0;
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);
@ -62,15 +64,9 @@ efreet_init(void)
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;
@ -109,8 +105,6 @@ shutdown_efreet_cache:
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:
@ -143,7 +137,6 @@ efreet_shutdown(void)
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);

@ -25,6 +25,10 @@ void *alloca (size_t);
#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"
@ -45,15 +49,6 @@ static Eina_List *xdg_data_dirs = NULL;
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);

@ -17,6 +17,10 @@
#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"
@ -29,13 +33,6 @@ struct _Efreet_Old_Cache
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
*/

@ -32,6 +32,10 @@ void *alloca (size_t);
#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"
@ -60,13 +64,6 @@ static Eina_List *efreet_desktop_types = NULL;
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;

@ -32,16 +32,13 @@ void *alloca (size_t);
#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

@ -32,16 +32,13 @@ void *alloca (size_t);
#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;

@ -30,15 +30,13 @@ void *alloca (size_t);
#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

@ -28,6 +28,10 @@ void *alloca (size_t);
#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"
@ -250,16 +254,6 @@ static Eina_Hash *efreet_menu_filter_cbs = NULL;
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,

@ -43,6 +43,10 @@ void *alloca (size_t);
#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"
@ -161,15 +165,6 @@ struct Efreet_Mime_Icon_Entry
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);

@ -66,13 +66,14 @@
* 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
@ -95,7 +96,6 @@ extern int _efreet_log_dom_global;
* 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

@ -13,6 +13,10 @@
#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"
@ -24,14 +28,6 @@ static const char *efreet_trash_dir = NULL;
# 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

@ -15,6 +15,9 @@
# 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"

@ -35,18 +35,14 @@ void *alloca (size_t);
#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);

@ -13,6 +13,10 @@
#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"
@ -35,15 +39,7 @@ static void efreet_xml_comment_skip(char **data, int *size);
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

Loading…
Cancel
Save