aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pluto/library.c80
-rw-r--r--src/pluto/library.h30
2 files changed, 55 insertions, 55 deletions
diff --git a/src/pluto/library.c b/src/pluto/library.c
index 83a1e9918..29e57e130 100644
--- a/src/pluto/library.c
+++ b/src/pluto/library.c
@@ -33,16 +33,16 @@ typedef struct private_library_t private_library_t;
*/
struct private_library_t {
- /**
- * public functions
- */
- library_t public;
+ /**
+ * public functions
+ */
+ library_t public;
#ifdef LEAK_DETECTIVE
- /**
- * Memory leak detective, if enabled
- */
- leak_detective_t *detective;
+ /**
+ * Memory leak detective, if enabled
+ */
+ leak_detective_t *detective;
#endif /* LEAK_DETECTIVE */
};
@@ -56,19 +56,19 @@ library_t *lib;
*/
void library_deinit()
{
- private_library_t *this = (private_library_t*)lib;
+ private_library_t *this = (private_library_t*)lib;
- this->public.settings->destroy(this->public.settings);
- this->public.printf_hook->destroy(this->public.printf_hook);
-
+ this->public.settings->destroy(this->public.settings);
+ this->public.printf_hook->destroy(this->public.printf_hook);
+
#ifdef LEAK_DETECTIVE
- if (this->detective)
- {
- this->detective->destroy(this->detective);
- }
+ if (this->detective)
+ {
+ this->detective->destroy(this->detective);
+ }
#endif /* LEAK_DETECTIVE */
- free(this);
- lib = NULL;
+ free(this);
+ lib = NULL;
}
/*
@@ -76,31 +76,31 @@ void library_deinit()
*/
void library_init(char *settings)
{
- printf_hook_t *pfh;
- private_library_t *this = malloc_thing(private_library_t);
- lib = &this->public;
-
- lib->leak_detective = FALSE;
-
+ printf_hook_t *pfh;
+ private_library_t *this = malloc_thing(private_library_t);
+ lib = &this->public;
+
+ lib->leak_detective = FALSE;
+
#ifdef LEAK_DETECTIVE
- this->detective = leak_detective_create();
+ this->detective = leak_detective_create();
#endif /* LEAK_DETECTIVE */
- pfh = printf_hook_create();
- this->public.printf_hook = pfh;
-
- pfh->add_handler(pfh, 'b', mem_printf_hook,
- PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_INT,
- PRINTF_HOOK_ARGTYPE_END);
- pfh->add_handler(pfh, 'B', chunk_printf_hook,
- PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_END);
- pfh->add_handler(pfh, 'T', time_printf_hook,
- PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_INT,
- PRINTF_HOOK_ARGTYPE_END);
- pfh->add_handler(pfh, 'V', time_delta_printf_hook,
- PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_POINTER,
- PRINTF_HOOK_ARGTYPE_END);
+ pfh = printf_hook_create();
+ this->public.printf_hook = pfh;
+
+ pfh->add_handler(pfh, 'b', mem_printf_hook,
+ PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_INT,
+ PRINTF_HOOK_ARGTYPE_END);
+ pfh->add_handler(pfh, 'B', chunk_printf_hook,
+ PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_END);
+ pfh->add_handler(pfh, 'T', time_printf_hook,
+ PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_INT,
+ PRINTF_HOOK_ARGTYPE_END);
+ pfh->add_handler(pfh, 'V', time_delta_printf_hook,
+ PRINTF_HOOK_ARGTYPE_POINTER, PRINTF_HOOK_ARGTYPE_POINTER,
+ PRINTF_HOOK_ARGTYPE_END);
- this->public.settings = settings_create(settings);
+ this->public.settings = settings_create(settings);
}
diff --git a/src/pluto/library.h b/src/pluto/library.h
index ce141ccfd..921c5f256 100644
--- a/src/pluto/library.h
+++ b/src/pluto/library.h
@@ -28,26 +28,26 @@ typedef struct library_t library_t;
*/
struct library_t {
- /**
- * Printf hook registering facility
- */
- printf_hook_t *printf_hook;
-
- /**
- * various settings loaded from settings file
- */
- settings_t *settings;
-
- /**
- * is leak detective running?
- */
- bool leak_detective;
+ /**
+ * Printf hook registering facility
+ */
+ printf_hook_t *printf_hook;
+
+ /**
+ * various settings loaded from settings file
+ */
+ settings_t *settings;
+
+ /**
+ * is leak detective running?
+ */
+ bool leak_detective;
};
/**
* Initialize library, creates "lib" instance.
*
- * @param settings file to read settings from, may be NULL for none
+ * @param settings file to read settings from, may be NULL for none
*/
void library_init(char *settings);