already had the correct formatting
[strongswan.git] / src / pluto / library.c
index 83a1e99..29e57e1 100644 (file)
@@ -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);
 }