Browse Source

even nicer indentation, thanks to LRN's indent patch

Christian Grothoff 12 years ago
parent
commit
16a6919a9f
100 changed files with 2192 additions and 2223 deletions
  1. 2 0
      .indent.pro
  2. 2 2
      pre-commit
  3. 6 7
      src/arm/gnunet-arm.c
  4. 2 2
      src/arm/gnunet-service-arm.c
  5. 7 5
      src/arm/gnunet-service-arm.h
  6. 12 14
      src/arm/gnunet-service-arm_interceptor.c
  7. 4 4
      src/arm/test_exponential_backoff.c
  8. 4 4
      src/chat/chat.c
  9. 2 1
      src/chat/gnunet-chat.c
  10. 8 8
      src/core/core_api.c
  11. 32 28
      src/core/gnunet-service-core.c
  12. 6 7
      src/core/test_core_api_preferences.c
  13. 4 3
      src/core/test_core_api_reliability.c
  14. 4 3
      src/core/test_core_quota_compliance.c
  15. 5 4
      src/datacache/perf_datacache.c
  16. 2 1
      src/datastore/datastore_api.c
  17. 2 2
      src/datastore/gnunet-service-datastore.c
  18. 2 2
      src/datastore/perf_datastore_api.c
  19. 2 1
      src/datastore/perf_plugin_datastore.c
  20. 6 6
      src/datastore/plugin_datastore_mysql.c
  21. 2 2
      src/datastore/test_datastore_api.c
  22. 2 2
      src/datastore/test_datastore_api_management.c
  23. 2 1
      src/datastore/test_plugin_datastore.c
  24. 9 9
      src/dht/dht_api.c
  25. 4 4
      src/dht/dhtlog.h
  26. 50 51
      src/dht/gnunet-dht-driver.c
  27. 24 18
      src/dht/gnunet-service-dht.c
  28. 12 12
      src/dht/plugin_dhtlog_dummy.c
  29. 2 2
      src/dht/test_dht_api.c
  30. 4 3
      src/dht/test_dht_twopeer.c
  31. 6 6
      src/dv/dv.h
  32. 4 3
      src/dv/dv_api.c
  33. 19 21
      src/dv/gnunet-service-dv.c
  34. 2 2
      src/dv/test_transport_api_dv.c
  35. 24 30
      src/fs/fs.c
  36. 80 57
      src/fs/fs.h
  37. 19 16
      src/fs/fs_download.c
  38. 4 4
      src/fs/fs_file_information.c
  39. 4 4
      src/fs/fs_publish.c
  40. 8 12
      src/fs/fs_search.c
  41. 31 30
      src/fs/fs_test_lib.h
  42. 1 2
      src/fs/fs_tree.c
  43. 24 23
      src/fs/fs_tree.h
  44. 2 2
      src/fs/fs_uri.c
  45. 4 4
      src/fs/gnunet-download.c
  46. 2 2
      src/fs/gnunet-publish.c
  47. 4 4
      src/fs/gnunet-search.c
  48. 4 2
      src/fs/gnunet-service-fs.h
  49. 12 13
      src/fs/gnunet-service-fs_cp.c
  50. 59 56
      src/fs/gnunet-service-fs_cp.h
  51. 3 4
      src/fs/gnunet-service-fs_indexing.c
  52. 22 20
      src/fs/gnunet-service-fs_indexing.h
  53. 11 12
      src/fs/gnunet-service-fs_lc.h
  54. 10 10
      src/fs/gnunet-service-fs_pe.c
  55. 10 6
      src/fs/gnunet-service-fs_pe.h
  56. 22 25
      src/fs/gnunet-service-fs_pr.c
  57. 41 48
      src/fs/gnunet-service-fs_pr.h
  58. 7 5
      src/fs/gnunet-service-fs_push.c
  59. 8 4
      src/fs/gnunet-service-fs_push.h
  60. 3 3
      src/fs/gnunet-service-fs_put.c
  61. 4 2
      src/fs/gnunet-service-fs_put.h
  62. 3 3
      src/fs/perf_gnunet_service_fs_p2p.c
  63. 3 3
      src/fs/perf_gnunet_service_fs_p2p_trust.c
  64. 16 16
      src/fs/test_fs_download.c
  65. 16 16
      src/fs/test_fs_download_indexed.c
  66. 10 10
      src/fs/test_fs_download_persistence.c
  67. 4 4
      src/fs/test_fs_list_indexed.c
  68. 4 4
      src/fs/test_fs_publish.c
  69. 9 8
      src/fs/test_fs_publish_persistence.c
  70. 2 2
      src/fs/test_fs_search.c
  71. 4 4
      src/fs/test_fs_search_persistence.c
  72. 8 8
      src/fs/test_fs_unindex.c
  73. 10 10
      src/fs/test_fs_unindex_persistence.c
  74. 4 3
      src/hostlist/hostlist-client.c
  75. 8 6
      src/hostlist/hostlist-client.h
  76. 2 2
      src/hostlist/hostlist-server.c
  77. 9 7
      src/hostlist/hostlist-server.h
  78. 13 12
      src/include/gnunet_arm_service.h
  79. 35 35
      src/include/gnunet_ats_service.h
  80. 29 35
      src/include/gnunet_bandwidth_lib.h
  81. 38 24
      src/include/gnunet_bio_lib.h
  82. 19 26
      src/include/gnunet_block_lib.h
  83. 24 30
      src/include/gnunet_chat_service.h
  84. 35 42
      src/include/gnunet_client_lib.h
  85. 50 31
      src/include/gnunet_common.h
  86. 99 89
      src/include/gnunet_configuration_lib.h
  87. 50 53
      src/include/gnunet_connection_lib.h
  88. 202 184
      src/include/gnunet_container_lib.h
  89. 54 76
      src/include/gnunet_core_service.h
  90. 143 128
      src/include/gnunet_crypto_lib.h
  91. 14 14
      src/include/gnunet_datacache_lib.h
  92. 72 152
      src/include/gnunet_datastore_service.h
  93. 58 80
      src/include/gnunet_dht_service.h
  94. 94 77
      src/include/gnunet_disk_lib.h
  95. 7 6
      src/include/gnunet_dv_service.h
  96. 26 38
      src/include/gnunet_fragmentation_lib.h
  97. 259 268
      src/include/gnunet_fs_service.h
  98. 28 26
      src/include/gnunet_getopt_lib.h
  99. 41 44
      src/include/gnunet_hello_lib.h
  100. 11 7
      src/include/gnunet_load_lib.h

+ 2 - 0
.indent.pro

@@ -1,3 +1,5 @@
+//LRN extension for return values for prototypes
+-nddd
 //GNU (default) style: 	
 //
 //-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2

+ 2 - 2
pre-commit

@@ -1,8 +1,8 @@
 #!/bin/sh
 find src/ -name "*.c" -exec indent {} \;
-find src/ -name "*.c" -exec indent {} \;
+find src/ -name "*.h" -exec indent {} \;
 if test -x "`which 'dos2unix'`"
 then
   find src/ -name "*.c" -exec dos2unix {} \;
-  find src/ -name "*.c" -exec dos2unix {} \;
+  find src/ -name "*.h" -exec dos2unix {} \;
 fi

+ 6 - 7
src/arm/gnunet-arm.c

@@ -138,7 +138,8 @@ static struct GNUNET_TIME_Relative timeout;
  * @param cls closure, unused
  * @param tc context, unused
  */
-static void cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -305,9 +306,8 @@ cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       {
         GNUNET_ARM_stop_service (h, "arm",
                                  (0 ==
-                                  timeout.
-                                  rel_value) ? STOP_TIMEOUT_ARM : timeout,
-                                 &confirm_cb, "arm");
+                                  timeout.rel_value) ? STOP_TIMEOUT_ARM :
+                                 timeout, &confirm_cb, "arm");
         return;
       }
       break;
@@ -336,9 +336,8 @@ cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       {
         GNUNET_CLIENT_service_test (test, cfg,
                                     (0 ==
-                                     timeout.
-                                     rel_value) ? TEST_TIMEOUT : timeout,
-                                    &confirm_task, test);
+                                     timeout.rel_value) ? TEST_TIMEOUT :
+                                    timeout, &confirm_task, test);
         return;
       }
       break;

+ 2 - 2
src/arm/gnunet-service-arm.c

@@ -722,8 +722,8 @@ delayed_restart_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       {
         lowestRestartDelay =
             GNUNET_TIME_relative_min (lowestRestartDelay,
-                                      GNUNET_TIME_absolute_get_remaining (pos->
-                                                                          restartAt));
+                                      GNUNET_TIME_absolute_get_remaining
+                                      (pos->restartAt));
       }
     }
     pos = pos->next;

+ 7 - 5
src/arm/gnunet-service-arm.h

@@ -35,8 +35,9 @@
  * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL
  * @return GNUNET_OK on success
  */
-int start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
-                   const int *lsocks);
+int
+start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
+               const int *lsocks);
 
 /**
  * Stop listening for connections to a service.
@@ -45,9 +46,10 @@ int start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
  * @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were
  *         not listening
  */
-int stop_listening (const char *serviceName);
+int
+stop_listening (const char *serviceName);
 
-void prepareServices (const struct GNUNET_CONFIGURATION_Handle
-                      *configurationHandle);
+void
+prepareServices (const struct GNUNET_CONFIGURATION_Handle *configurationHandle);
 
 #endif

+ 12 - 14
src/arm/gnunet-service-arm_interceptor.c

@@ -356,8 +356,8 @@ closeClientAndServiceSockets (struct ForwardedConnection *fc, int reason)
  * @param cls callback data,   struct ForwardedConnection for the communication between client and service
  * @param tc context 
  */
-static void receiveFromClient (void *cls,
-                               const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -366,15 +366,15 @@ static void receiveFromClient (void *cls,
  * @param cls callback data, struct ForwardedConnection for the communication between client and service
  * @param tc scheduler context
  */
-static void receiveFromService (void *cls,
-                                const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
  *
  */
-static void start_forwarding (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+start_forwarding (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 
@@ -497,8 +497,7 @@ receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                   GNUNET_a2s (fc->listen_info->service_addr,
                               fc->listen_info->service_addr_len),
                   (unsigned long long) GNUNET_TIME_relative_min (fc->back_off,
-                                                                 rem).
-                  rel_value);
+                                                                 rem).rel_value);
 #endif
       rem = GNUNET_TIME_absolute_get_remaining (fc->timeout);
       GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task);
@@ -584,8 +583,7 @@ forwardToService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                   GNUNET_a2s (fc->listen_info->service_addr,
                               fc->listen_info->service_addr_len),
                   (unsigned long long) GNUNET_TIME_relative_min (fc->back_off,
-                                                                 rem).
-                  rel_value);
+                                                                 rem).rel_value);
 #endif
       rem = GNUNET_TIME_absolute_get_remaining (fc->timeout);
       GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task);
@@ -913,8 +911,8 @@ stop_listening (const char *serviceName)
  * @param cls callback data, struct ServiceListeningInfo describing a listen socket
  * @param tc context 
  */
-static void acceptConnection (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
@@ -948,8 +946,8 @@ accept_and_forward (struct ServiceListeningInfo *serviceListeningInfo)
     return;
   }
   GNUNET_break (GNUNET_OK ==
-                GNUNET_NETWORK_socket_close (serviceListeningInfo->
-                                             listeningSocket));
+                GNUNET_NETWORK_socket_close
+                (serviceListeningInfo->listeningSocket));
   start_service (NULL, serviceListeningInfo->serviceName, NULL);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Service `%s' started\n"),
               fc->listen_info->serviceName);

+ 4 - 4
src/arm/test_exponential_backoff.c

@@ -251,8 +251,8 @@ arm_notify_stop (void *cls, int success)
 }
 
 
-static void kill_task (void *cbData,
-                       const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
@@ -273,8 +273,8 @@ arm_notify (void *cls, int success)
 }
 
 
-static void kill_task (void *cbData,
-                       const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void

+ 4 - 4
src/chat/chat.c

@@ -148,7 +148,8 @@ struct GNUNET_CHAT_SendReceiptContext
 /**
  * Ask client to send a join request.
  */
-static int rejoin_room (struct GNUNET_CHAT_Room *chat_room);
+static int
+rejoin_room (struct GNUNET_CHAT_Room *chat_room);
 
 
 /**
@@ -404,9 +405,8 @@ process_result (struct GNUNET_CHAT_Room *room,
     if (NULL != room->confirmation_callback)
       room->confirmation_callback (room->confirmation_cls, room,
                                    ntohl (receipt->sequence_number),
-                                   GNUNET_TIME_absolute_ntoh (receipt->
-                                                              timestamp),
-                                   &receipt->target);
+                                   GNUNET_TIME_absolute_ntoh
+                                   (receipt->timestamp), &receipt->target);
     break;
   default:
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Unknown message type: '%u'\n"),

+ 2 - 1
src/chat/gnunet-chat.c

@@ -76,7 +76,8 @@ free_user_list ()
   }
 }
 
-static int do_help (const char *args, const void *xtra);
+static int
+do_help (const char *args, const void *xtra);
 
 
 /**

+ 8 - 8
src/core/core_api.c

@@ -371,7 +371,8 @@ struct GNUNET_CORE_TransmitHandle
  *
  * @param h our handle to the core service
  */
-static void reconnect (struct GNUNET_CORE_Handle *h);
+static void
+reconnect (struct GNUNET_CORE_Handle *h);
 
 
 /**
@@ -515,8 +516,8 @@ reconnect_later (struct GNUNET_CORE_Handle *h)
  * @param h core handle
  * @param ignore_currently_down transmit message even if not initialized?
  */
-static void trigger_next_request (struct GNUNET_CORE_Handle *h,
-                                  int ignore_currently_down);
+static void
+trigger_next_request (struct GNUNET_CORE_Handle *h, int ignore_currently_down);
 
 
 /**
@@ -526,9 +527,8 @@ static void trigger_next_request (struct GNUNET_CORE_Handle *h,
  * @param cls the transmit handle of the request that timed out
  * @param tc context, can be NULL (!)
  */
-static void transmission_timeout (void *cls,
-                                  const struct GNUNET_SCHEDULER_TaskContext
-                                  *tc);
+static void
+transmission_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -776,8 +776,8 @@ trigger_next_request (struct GNUNET_CORE_Handle *h, int ignore_currently_down)
   }
   if (h->control_pending_head != NULL)
     msize =
-        ntohs (((struct GNUNET_MessageHeader *) &h->control_pending_head[1])->
-               size);
+        ntohs (((struct GNUNET_MessageHeader *) &h->
+                control_pending_head[1])->size);
   else if (h->ready_peer_head != NULL)
     msize =
         h->ready_peer_head->pending_head->msize + sizeof (struct SendMessage);

+ 32 - 28
src/core/gnunet-service-core.c

@@ -1807,7 +1807,8 @@ free_neighbour (struct Neighbour *n)
  *
  * @param n neighbour to check.
  */
-static void process_encrypted_neighbour_queue (struct Neighbour *n);
+static void
+process_encrypted_neighbour_queue (struct Neighbour *n);
 
 
 /**
@@ -1854,7 +1855,8 @@ do_encrypt (struct Neighbour *n,
  *
  * @param n neighbour to consider discarding
  */
-static void consider_free_neighbour (struct Neighbour *n);
+static void
+consider_free_neighbour (struct Neighbour *n);
 
 
 /**
@@ -2006,9 +2008,9 @@ notify_encrypted_transmit_ready (void *cls, size_t size, void *buf)
 #if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Copied message of type %u and size %u into transport buffer for `%4s'\n",
-                (unsigned int) ntohs (((struct GNUNET_MessageHeader *) &m[1])->
-                                      type), (unsigned int) ret,
-                GNUNET_i2s (&n->peer));
+                (unsigned int)
+                ntohs (((struct GNUNET_MessageHeader *) &m[1])->type),
+                (unsigned int) ret, GNUNET_i2s (&n->peer));
 #endif
     process_encrypted_neighbour_queue (n);
   }
@@ -2017,8 +2019,9 @@ notify_encrypted_transmit_ready (void *cls, size_t size, void *buf)
 #if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Transmission of message of type %u and size %u failed\n",
-                (unsigned int) ntohs (((struct GNUNET_MessageHeader *) &m[1])->
-                                      type), (unsigned int) m->size);
+                (unsigned int)
+                ntohs (((struct GNUNET_MessageHeader *) &m[1])->type),
+                (unsigned int) m->size);
 #endif
   }
   GNUNET_free (m);
@@ -2038,7 +2041,8 @@ notify_encrypted_transmit_ready (void *cls, size_t size, void *buf)
  *
  * @param n neighbour to check.
  */
-static void process_plaintext_neighbour_queue (struct Neighbour *n);
+static void
+process_plaintext_neighbour_queue (struct Neighbour *n);
 
 
 /**
@@ -2071,9 +2075,8 @@ process_encrypted_neighbour_queue (struct Neighbour *n)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Asking transport for transmission of %u bytes to `%4s' in next %llu ms\n",
               (unsigned int) m->size, GNUNET_i2s (&n->peer),
-              (unsigned long long) GNUNET_TIME_absolute_get_remaining (m->
-                                                                       deadline).
-              rel_value);
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_remaining (m->deadline).rel_value);
 #endif
   n->th =
       GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, m->size,
@@ -2436,8 +2439,8 @@ batch_message (struct Neighbour *n, char *buf, size_t size,
                   (unsigned int)
                   ntohs (((const struct GNUNET_MessageHeader *) &pos[1])->type),
                   (unsigned int)
-                  ntohs (((const struct GNUNET_MessageHeader *) &pos[1])->
-                         size));
+                  ntohs (((const struct GNUNET_MessageHeader *)
+                          &pos[1])->size));
 #endif
       /* copy for encrypted transmission */
       memcpy (&buf[ret], &pos[1], pos->size);
@@ -2448,9 +2451,8 @@ batch_message (struct Neighbour *n, char *buf, size_t size,
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Adding plaintext message of size %u with deadline %llu ms to batch\n",
                   (unsigned int) pos->size,
-                  (unsigned long long) GNUNET_TIME_absolute_get_remaining (pos->
-                                                                           deadline).
-                  rel_value);
+                  (unsigned long long)
+                  GNUNET_TIME_absolute_get_remaining (pos->deadline).rel_value);
 #endif
       deadline->abs_value =
           GNUNET_MIN (deadline->abs_value, pos->deadline.abs_value);
@@ -2548,7 +2550,8 @@ retry_plaintext_processing (void *cls,
  *
  * @param n the other peer
  */
-static void send_key (struct Neighbour *n);
+static void
+send_key (struct Neighbour *n);
 
 /**
  * Task that will retry "send_key" if our previous attempt failed
@@ -2734,9 +2737,9 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
  * @param cls neighbour for the quota update
  * @param tc context
  */
-static void neighbour_quota_update (void *cls,
-                                    const struct GNUNET_SCHEDULER_TaskContext
-                                    *tc);
+static void
+neighbour_quota_update (void *cls,
+                        const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -3269,9 +3272,9 @@ send_key (struct Neighbour *n)
 #if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Have %llu ms left for `%s' transmission.\n",
-              (unsigned long long) GNUNET_TIME_absolute_get_remaining (me->
-                                                                       deadline).
-              rel_value, "SET_KEY");
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_remaining (me->deadline).rel_value,
+              "SET_KEY");
 #endif
 trigger_processing:
   /* trigger queue processing */
@@ -3293,9 +3296,10 @@ trigger_processing:
  * @param ats performance data
  * @param ats_count number of entries in ats (excluding 0-termination)
  */
-static void handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
-                            const struct GNUNET_TRANSPORT_ATS_Information *ats,
-                            uint32_t ats_count);
+static void
+handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
+                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                uint32_t ats_count);
 
 
 
@@ -3843,8 +3847,8 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core service passes message from `%4s' of type %u to client.\n",
               GNUNET_i2s (&sender->peer),
-              (unsigned int) ntohs (((const struct GNUNET_MessageHeader *) m)->
-                                    type));
+              (unsigned int)
+              ntohs (((const struct GNUNET_MessageHeader *) m)->type));
 #endif
   ntm = (struct NotifyTrafficMessage *) buf;
   ntm->header.size = htons (size);

+ 6 - 7
src/core/test_core_api_preferences.c

@@ -75,8 +75,8 @@ static GNUNET_SCHEDULER_TaskIdentifier ask_task;
 static unsigned int total_reserve = 5;
 
 
-static void process_hello (void *cls,
-                           const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
 
 static void
 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -151,11 +151,10 @@ transmit_ready (void *cls, size_t size, void *buf)
   return sizeof (struct GNUNET_MessageHeader);
 }
 
-static void preference_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
-                           struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
-                           int32_t amount,
-                           struct GNUNET_TIME_Relative res_delay,
-                           uint64_t preference);
+static void
+preference_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
+               struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, int32_t amount,
+               struct GNUNET_TIME_Relative res_delay, uint64_t preference);
 
 static void
 do_reserve (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)

+ 4 - 3
src/core/test_core_api_reliability.c

@@ -113,8 +113,8 @@ get_size (unsigned int iter)
   return sizeof (struct TestMessage) + (ret % 60000);
 }
 
-static void process_hello (void *cls,
-                           const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
 
 static void
 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -296,7 +296,8 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 }
 
 
-static size_t transmit_ready (void *cls, size_t size, void *buf);
+static size_t
+transmit_ready (void *cls, size_t size, void *buf);
 
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,

+ 4 - 3
src/core/test_core_quota_compliance.c

@@ -114,8 +114,8 @@ struct TestMessage
   uint32_t num;
 };
 
-static void process_hello (void *cls,
-                           const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
 
 static void
 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -424,7 +424,8 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 }
 
 
-static size_t transmit_ready (void *cls, size_t size, void *buf);
+static size_t
+transmit_ready (void *cls, size_t size, void *buf);
 
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,

+ 5 - 4
src/datacache/perf_datacache.c

@@ -91,8 +91,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   }
   fprintf (stderr, "\n");
   fprintf (stdout, "Stored %u items in %llums\n", ITERATIONS,
-           (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-           rel_value);
+           (unsigned long long)
+           GNUNET_TIME_absolute_get_duration (start).rel_value);
   GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name);
   GAUGER (gstr, "Time to PUT item in datacache",
           GNUNET_TIME_absolute_get_duration (start).rel_value / ITERATIONS,
@@ -111,8 +111,9 @@ run (void *cls, char *const *args, const char *cfgfile,
   fprintf (stdout,
            "Found %u/%u items in %llums (%u were deleted during storage processing)\n",
            found, ITERATIONS,
-           (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-           rel_value, ITERATIONS - found);
+           (unsigned long long)
+           GNUNET_TIME_absolute_get_duration (start).rel_value,
+           ITERATIONS - found);
   if (found > 0)
     GAUGER (gstr, "Time to GET item from datacache",
             GNUNET_TIME_absolute_get_duration (start).rel_value / found,

+ 2 - 1
src/datastore/datastore_api.c

@@ -480,7 +480,8 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize,
  * 
  * @param h handle to the datastore
  */
-static void process_queue (struct GNUNET_DATASTORE_Handle *h);
+static void
+process_queue (struct GNUNET_DATASTORE_Handle *h);
 
 
 /**

+ 2 - 2
src/datastore/gnunet-service-datastore.c

@@ -276,8 +276,8 @@ static struct GNUNET_STATISTICS_GetHandle *stat_get;
  * @param cls not used
  * @param tc task context
  */
-static void delete_expired (void *cls,
-                            const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**

+ 2 - 2
src/datastore/perf_datastore_api.c

@@ -104,8 +104,8 @@ struct CpsRunContext
 
 
 
-static void run_continuation (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 

+ 2 - 1
src/datastore/perf_plugin_datastore.c

@@ -145,7 +145,8 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
   stored_entries++;
 }
 
-static void test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static int

+ 6 - 6
src/datastore/plugin_datastore_mysql.c

@@ -1068,12 +1068,12 @@ mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
     {
       ret =
           prepared_statement_run_select (plugin,
-                                         plugin->count_entry_by_hash_vhash_and_type,
-                                         1, cbind, MYSQL_TYPE_BLOB, key,
-                                         hashSize, &hashSize, MYSQL_TYPE_BLOB,
-                                         vhash, hashSize2, &hashSize2,
-                                         MYSQL_TYPE_LONG, &type, GNUNET_YES,
-                                         -1);
+                                         plugin->
+                                         count_entry_by_hash_vhash_and_type, 1,
+                                         cbind, MYSQL_TYPE_BLOB, key, hashSize,
+                                         &hashSize, MYSQL_TYPE_BLOB, vhash,
+                                         hashSize2, &hashSize2, MYSQL_TYPE_LONG,
+                                         &type, GNUNET_YES, -1);
     }
     else
     {

+ 2 - 2
src/datastore/test_datastore_api.c

@@ -134,8 +134,8 @@ struct CpsRunContext
 };
 
 
-static void run_continuation (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void

+ 2 - 2
src/datastore/test_datastore_api_management.c

@@ -117,8 +117,8 @@ struct CpsRunContext
 };
 
 
-static void run_continuation (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void

+ 2 - 1
src/datastore/test_plugin_datastore.c

@@ -141,7 +141,8 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
 }
 
 
-static void test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static uint64_t guid;

+ 9 - 9
src/dht/dht_api.c

@@ -203,7 +203,8 @@ struct GNUNET_DHT_Handle
 /**
  * Transmit the next pending message, called by notify_transmit_ready
  */
-static size_t transmit_pending (void *cls, size_t size, void *buf);
+static size_t
+transmit_pending (void *cls, size_t size, void *buf);
 
 
 /**
@@ -211,8 +212,8 @@ static size_t transmit_pending (void *cls, size_t size, void *buf);
  * a demultiplexer which handles numerous message types
  *
  */
-static void service_message_handler (void *cls,
-                                     const struct GNUNET_MessageHeader *msg);
+static void
+service_message_handler (void *cls, const struct GNUNET_MessageHeader *msg);
 
 
 
@@ -273,7 +274,8 @@ add_request_to_pending (void *cls, const GNUNET_HashCode * key, void *value)
  * Try to send messages from list of messages to send
  * @param handle DHT_Handle
  */
-static void process_pending_messages (struct GNUNET_DHT_Handle *handle);
+static void
+process_pending_messages (struct GNUNET_DHT_Handle *handle);
 
 
 /**
@@ -760,11 +762,9 @@ GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle)
                                  route_handle->message);
   }
   GNUNET_assert (GNUNET_YES ==
-                 GNUNET_CONTAINER_multihashmap_remove (route_handle->
-                                                       dht_handle->
-                                                       active_requests,
-                                                       &route_handle->key,
-                                                       route_handle));
+                 GNUNET_CONTAINER_multihashmap_remove
+                 (route_handle->dht_handle->active_requests, &route_handle->key,
+                  route_handle));
   GNUNET_free (route_handle->message);
   GNUNET_free (route_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DHT route stop request processed\n");

+ 4 - 4
src/dht/dhtlog.h

@@ -373,14 +373,14 @@ struct GNUNET_DHTLOG_Plugin
  *
  * @param c a configuration to use
  */
-struct GNUNET_DHTLOG_Handle *GNUNET_DHTLOG_connect (const struct
-                                                    GNUNET_CONFIGURATION_Handle
-                                                    *c);
+struct GNUNET_DHTLOG_Handle *
+GNUNET_DHTLOG_connect (const struct GNUNET_CONFIGURATION_Handle *c);
 
 /**
  * Shutdown the module.
  */
-void GNUNET_DHTLOG_disconnect (struct GNUNET_DHTLOG_Handle *api);
+void
+GNUNET_DHTLOG_disconnect (struct GNUNET_DHTLOG_Handle *api);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 50 - 51
src/dht/gnunet-dht-driver.c

@@ -1244,12 +1244,14 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 /**
  * Forward declaration.
  */
-static void do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Forward declaration.
  */
-static void do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Iterator over hash map entries.
@@ -1465,8 +1467,8 @@ iterate_min_heap_peers (void *cls, struct GNUNET_CONTAINER_HeapNode *node,
     GNUNET_TESTING_daemons_connect (d1, d2, timeout, DEFAULT_RECONNECT_ATTEMPTS,
                                     GNUNET_YES, NULL, NULL);
   }
-  if (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-      rel_value > 0)
+  if (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).rel_value
+      > 0)
     return GNUNET_YES;
   else
     return GNUNET_NO;
@@ -1475,10 +1477,10 @@ iterate_min_heap_peers (void *cls, struct GNUNET_CONTAINER_HeapNode *node,
 /**
  * Forward declaration.
  */
-static void schedule_churn_find_peer_requests (void *cls,
-                                               const struct
-                                               GNUNET_SCHEDULER_TaskContext
-                                               *tc);
+static void
+schedule_churn_find_peer_requests (void *cls,
+                                   const struct GNUNET_SCHEDULER_TaskContext
+                                   *tc);
 
 /**
  * Callback for iterating over all the peer connections of a peer group.
@@ -1555,12 +1557,11 @@ count_peers_churn_cb (void *cls, const struct GNUNET_PeerIdentity *first,
        */
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Out of %u peers, fewest connections is %d\n",
-                GNUNET_CONTAINER_heap_get_size (find_peer_context->
-                                                peer_min_heap),
-                peer_count->count);
+                GNUNET_CONTAINER_heap_get_size
+                (find_peer_context->peer_min_heap), peer_count->count);
     if ((peer_count->count == 0) &&
-        (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-         rel_value > 0))
+        (GNUNET_TIME_absolute_get_remaining
+         (find_peer_context->endtime).rel_value > 0))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   "Found peer with no connections, will choose some peer(s) at random to connect to!\n");
@@ -1570,8 +1571,9 @@ count_peers_churn_cb (void *cls, const struct GNUNET_PeerIdentity *first,
       GNUNET_SCHEDULER_add_now (&schedule_churn_find_peer_requests,
                                 find_peer_context);
     }
-    else if ((GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-              rel_value > 0) && (find_peer_context->last_sent != 0))
+    else if ((GNUNET_TIME_absolute_get_remaining
+              (find_peer_context->endtime).rel_value > 0) &&
+             (find_peer_context->last_sent != 0))
     {
       GNUNET_SCHEDULER_add_now (&schedule_churn_find_peer_requests,
                                 find_peer_context);
@@ -1772,8 +1774,8 @@ churn_complete (void *cls, const char *emsg)
     }
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Added %d peers to heap, total size %d\n", count_added,
-                GNUNET_CONTAINER_heap_get_size (find_peer_context->
-                                                peer_min_heap));
+                GNUNET_CONTAINER_heap_get_size
+                (find_peer_context->peer_min_heap));
     GNUNET_SCHEDULER_add_delayed (DEFAULT_PEER_DISCONNECT_TIMEOUT,
                                   &schedule_churn_get_topology,
                                   find_peer_context);
@@ -2262,14 +2264,14 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                 test_put->next);
 }
 
-static void schedule_find_peer_requests (void *cls,
-                                         const struct
-                                         GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_find_peer_requests (void *cls,
+                             const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 #if HAVE_MALICIOUS
-static void setup_malicious_peers (void *cls,
-                                   const struct GNUNET_SCHEDULER_TaskContext
-                                   *tc);
+static void
+setup_malicious_peers (void *cls,
+                       const struct GNUNET_SCHEDULER_TaskContext *tc);
 #endif
 
 /**
@@ -2322,8 +2324,8 @@ count_peers_cb (void *cls, const struct GNUNET_PeerIdentity *first,
     if ((find_peer_context->last_sent < 8) ||
         ((find_peer_context->current_peers <
           2 * connection_estimate (num_peers, DEFAULT_BUCKET_SIZE)) &&
-         (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-          rel_value > 0) &&
+         (GNUNET_TIME_absolute_get_remaining
+          (find_peer_context->endtime).rel_value > 0) &&
          (find_peer_context->current_peers < target_total_connections)))
     {
       GNUNET_SCHEDULER_add_now (&schedule_find_peer_requests,
@@ -2424,11 +2426,9 @@ schedule_find_peer_requests (void *cls,
       peer_count =
           GNUNET_CONTAINER_heap_remove_root (find_peer_ctx->peer_min_heap);
       GNUNET_assert (GNUNET_YES ==
-                     GNUNET_CONTAINER_multihashmap_remove (find_peer_ctx->
-                                                           peer_hash,
-                                                           &peer_count->peer_id.
-                                                           hashPubKey,
-                                                           peer_count));
+                     GNUNET_CONTAINER_multihashmap_remove
+                     (find_peer_ctx->peer_hash, &peer_count->peer_id.hashPubKey,
+                      peer_count));
       test_find_peer->daemon =
           GNUNET_TESTING_daemon_get_by_id (pg, &peer_count->peer_id);
       GNUNET_assert (test_find_peer->daemon != NULL);
@@ -2879,17 +2879,14 @@ setup_malicious_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 #if ONLY_TESTING
 /* Forward declaration */
-static void topology_callback (void *cls,
-                               const struct GNUNET_PeerIdentity *first,
-                               const struct GNUNET_PeerIdentity *second,
-                               uint32_t distance,
-                               const struct GNUNET_CONFIGURATION_Handle
-                               *first_cfg,
-                               const struct GNUNET_CONFIGURATION_Handle
-                               *second_cfg,
-                               struct GNUNET_TESTING_Daemon *first_daemon,
-                               struct GNUNET_TESTING_Daemon *second_daemon,
-                               const char *emsg);
+static void
+topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
+                   const struct GNUNET_PeerIdentity *second, uint32_t distance,
+                   const struct GNUNET_CONFIGURATION_Handle *first_cfg,
+                   const struct GNUNET_CONFIGURATION_Handle *second_cfg,
+                   struct GNUNET_TESTING_Daemon *first_daemon,
+                   struct GNUNET_TESTING_Daemon *second_daemon,
+                   const char *emsg);
 
 /**
  * Retry connecting two specific peers until they connect,
@@ -2993,12 +2990,12 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
     /* Get duration in seconds */
     duration =
         GNUNET_TIME_absolute_get_difference (connect_last_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
     total_duration =
         GNUNET_TIME_absolute_get_difference (connect_start_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
 
     failed_conns_per_sec_recent =
         (double) new_failed_connections / (double) duration;
@@ -3086,8 +3083,8 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
 
     total_duration =
         GNUNET_TIME_absolute_get_difference (connect_start_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
     failed_conns_per_sec_total =
         (long double) failed_connections / total_duration;
     conns_per_sec_total = (long double) total_connections / total_duration;
@@ -3299,14 +3296,16 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
           GNUNET_CONFIGURATION_have_value (config, "TESTING", "HOSTKEYSFILE"))
       {
         GAUGER_ID ("DHT_TESTING", "HOSTKEY_GENERATION",
-                   GNUNET_TIME_absolute_get_duration (hostkey_start_time).
-                   rel_value / (double) num_peers, "ms/hostkey", revision_str);
+                   GNUNET_TIME_absolute_get_duration
+                   (hostkey_start_time).rel_value / (double) num_peers,
+                   "ms/hostkey", revision_str);
       }
       else
       {
         GAUGER_ID ("DHT_TESTING", "HOSTKEY_GENERATION_REAL",
-                   GNUNET_TIME_absolute_get_duration (hostkey_start_time).
-                   rel_value / (double) num_peers, "ms/hostkey", revision_str);
+                   GNUNET_TIME_absolute_get_duration
+                   (hostkey_start_time).rel_value / (double) num_peers,
+                   "ms/hostkey", revision_str);
       }
     }
 

+ 24 - 18
src/dht/gnunet-service-dht.c

@@ -934,11 +934,13 @@ static struct GNUNET_BLOCK_Context *block_context;
 /**
  * Forward declaration.
  */
-static size_t send_generic_reply (void *cls, size_t size, void *buf);
+static size_t
+send_generic_reply (void *cls, size_t size, void *buf);
 
 
 /** Declare here so retry_core_send is aware of it */
-static size_t core_transmit_notify (void *cls, size_t size, void *buf);
+static size_t
+core_transmit_notify (void *cls, size_t size, void *buf);
 
 /**
  * Convert unique ID to hash code.
@@ -1160,7 +1162,8 @@ forward_result_message (const struct GNUNET_MessageHeader *msg,
   result_message->hop_count = htonl (msg_ctx->hop_count + 1);
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONTAINER_bloomfilter_get_raw_data (msg_ctx->bloom,
-                                                            result_message->bloomfilter,
+                                                            result_message->
+                                                            bloomfilter,
                                                             DHT_BLOOM_SIZE));
   result_message->unique_id = GNUNET_htonll (msg_ctx->unique_id);
   memcpy (&result_message->key, &msg_ctx->key, sizeof (GNUNET_HashCode));
@@ -1474,9 +1477,9 @@ find_peer_by_id (const struct GNUNET_PeerIdentity *peer)
 }
 
 /* Forward declaration */
-static void update_core_preference (void *cls,
-                                    const struct GNUNET_SCHEDULER_TaskContext
-                                    *tc);
+static void
+update_core_preference (void *cls,
+                        const struct GNUNET_SCHEDULER_TaskContext *tc);
 /**
  * Function called with statistics about the given peer.
  *
@@ -1776,7 +1779,8 @@ forward_message (const struct GNUNET_MessageHeader *msg, struct PeerInfo *peer,
   if (msg_ctx->bloom != NULL)
     GNUNET_assert (GNUNET_OK ==
                    GNUNET_CONTAINER_bloomfilter_get_raw_data (msg_ctx->bloom,
-                                                              route_message->bloomfilter,
+                                                              route_message->
+                                                              bloomfilter,
                                                               DHT_BLOOM_SIZE));
   memcpy (&route_message->key, &msg_ctx->key, sizeof (GNUNET_HashCode));
   memcpy (&route_message[1], msg, ntohs (msg->size));
@@ -1885,8 +1889,8 @@ process_pending_messages (struct ClientList *client)
 
   client->transmit_handle =
       GNUNET_SERVER_notify_transmit_ready (client->client_handle,
-                                           ntohs (client->pending_head->msg->
-                                                  size),
+                                           ntohs (client->pending_head->
+                                                  msg->size),
                                            GNUNET_TIME_UNIT_FOREVER_REL,
                                            &send_generic_reply, client);
 }
@@ -2457,8 +2461,9 @@ datacache_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
  * @param msg the message to be routed
  * @param msg_ctx the context containing all pertinent information about the message
  */
-static void route_message (const struct GNUNET_MessageHeader *msg,
-                           struct DHT_MessageContext *msg_ctx);
+static void
+route_message (const struct GNUNET_MessageHeader *msg,
+               struct DHT_MessageContext *msg_ctx);
 
 
 /**
@@ -2815,8 +2820,8 @@ handle_dht_find_peer (const struct GNUNET_MessageHeader *find_msg,
  * @param cls closure (a struct RepublishContext)
  * @param tc runtime context for this task
  */
-static void republish_content (void *cls,
-                               const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+republish_content (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Server handler for initiating local dht put requests
@@ -3509,10 +3514,10 @@ select_peer (const GNUNET_HashCode * target,
       break;                    /* overflow case */
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Choose %d matching bits (%d bits match me) (%.2f percent) converge ret %llu\n",
-                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->
-                                                  id.hashPubKey, target),
-                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->
-                                                  id.hashPubKey,
+                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->id.
+                                                  hashPubKey, target),
+                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->id.
+                                                  hashPubKey,
                                                   &my_identity.hashPubKey),
                 (temp_converge_distance / (double) total_distance) * 100,
                 temp_converge_distance);
@@ -4473,7 +4478,8 @@ send_find_peer_message (void *cls,
                                          temp_bloom);
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONTAINER_bloomfilter_get_raw_data (temp_bloom,
-                                                            find_peer_msg->bloomfilter,
+                                                            find_peer_msg->
+                                                            bloomfilter,
                                                             DHT_BLOOM_SIZE));
   GNUNET_CONTAINER_bloomfilter_free (temp_bloom);
   memset (&msg_ctx, 0, sizeof (struct DHT_MessageContext));

+ 12 - 12
src/dht/plugin_dhtlog_dummy.c

@@ -281,18 +281,18 @@ set_malicious (struct GNUNET_PeerIdentity *peer)
  *
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int insert_stat (const struct GNUNET_PeerIdentity *peer,
-                 unsigned int route_requests, unsigned int route_forwards,
-                 unsigned int result_requests, unsigned int client_requests,
-                 unsigned int result_forwards, unsigned int gets,
-                 unsigned int puts, unsigned int data_inserts,
-                 unsigned int find_peer_requests,
-                 unsigned int find_peers_started, unsigned int gets_started,
-                 unsigned int puts_started,
-                 unsigned int find_peer_responses_received,
-                 unsigned int get_responses_received,
-                 unsigned int find_peer_responses_sent,
-                 unsigned int get_responses_sent)
+int
+insert_stat (const struct GNUNET_PeerIdentity *peer,
+             unsigned int route_requests, unsigned int route_forwards,
+             unsigned int result_requests, unsigned int client_requests,
+             unsigned int result_forwards, unsigned int gets, unsigned int puts,
+             unsigned int data_inserts, unsigned int find_peer_requests,
+             unsigned int find_peers_started, unsigned int gets_started,
+             unsigned int puts_started,
+             unsigned int find_peer_responses_received,
+             unsigned int get_responses_received,
+             unsigned int find_peer_responses_sent,
+             unsigned int get_responses_sent)
 {
   return GNUNET_OK;
 }

+ 2 - 2
src/dht/test_dht_api.c

@@ -237,8 +237,8 @@ test_find_peer_processor (void *cls, const struct GNUNET_HELLO_Message *hello)
  * @param cls closure
  * @param tc context information (why was this task triggered now?)
  */
-void retry_find_peer_stop (void *cls,
-                           const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+retry_find_peer_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Retry the find_peer task on timeout.

+ 4 - 3
src/dht/test_dht_twopeer.c

@@ -141,7 +141,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 /* Forward declaration */
-static void do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Iterator called on each result obtained for a DHT
@@ -199,8 +200,8 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
 
 }
 
-static void stop_retry_get (void *cls,
-                            const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+stop_retry_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 static void
 get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)

+ 6 - 6
src/dv/dv.h

@@ -257,17 +257,17 @@ typedef struct
 } p2p_dv_MESSAGE_Disconnect;
 
 
-struct GNUNET_DV_Handle *GNUNET_DV_connect (const struct
-                                            GNUNET_CONFIGURATION_Handle *cfg,
-                                            GNUNET_DV_MessageReceivedHandler
-                                            receive_handler,
-                                            void *receive_handler_cls);
+struct GNUNET_DV_Handle *
+GNUNET_DV_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                   GNUNET_DV_MessageReceivedHandler receive_handler,
+                   void *receive_handler_cls);
 
 /**
  * Disconnect from the DV service
  *
  * @param handle the current handle to the service to disconnect
  */
-void GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle);
+void
+GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle);
 
 #endif

+ 4 - 3
src/dv/dv_api.c

@@ -180,7 +180,8 @@ try_connect (struct GNUNET_DV_Handle *ret)
   return GNUNET_NO;
 }
 
-static void process_pending_message (struct GNUNET_DV_Handle *handle);
+static void
+process_pending_message (struct GNUNET_DV_Handle *handle);
 
 /**
  * Send complete, schedule next
@@ -284,8 +285,8 @@ process_pending_message (struct GNUNET_DV_Handle *handle)
   if (NULL ==
       (handle->th =
        GNUNET_CLIENT_notify_transmit_ready (handle->client,
-                                            ntohs (handle->current->msg->header.
-                                                   size),
+                                            ntohs (handle->current->msg->
+                                                   header.size),
                                             handle->current->msg->timeout,
                                             GNUNET_YES, &transmit_pending,
                                             handle)))

+ 19 - 21
src/dv/gnunet-service-dv.c

@@ -761,8 +761,8 @@ transmit_to_plugin (void *cls, size_t size, void *buf)
   if (plugin_pending_head != NULL)
     plugin_transmit_handle =
         GNUNET_SERVER_notify_transmit_ready (client_handle,
-                                             ntohs (plugin_pending_head->
-                                                    msg->size),
+                                             ntohs (plugin_pending_head->msg->
+                                                    size),
                                              GNUNET_TIME_UNIT_FOREVER_REL,
                                              &transmit_to_plugin, NULL);
 
@@ -858,7 +858,8 @@ send_to_plugin (const struct GNUNET_PeerIdentity *sender,
 }
 
 /* Declare here so retry_core_send is aware of it */
-size_t core_transmit_notify (void *cls, size_t size, void *buf);
+size_t
+core_transmit_notify (void *cls, size_t size, void *buf);
 
 /**
  *  Try to send another message from our core sending list
@@ -999,9 +1000,9 @@ send_message_via (const struct GNUNET_PeerIdentity *sender,
   find_context.via = recipient;
   find_context.tid = 0;
   GNUNET_CONTAINER_multihashmap_get_multiple (extended_neighbors,
-                                              &send_context->distant_peer->
-                                              hashPubKey, &find_specific_id,
-                                              &find_context);
+                                              &send_context->
+                                              distant_peer->hashPubKey,
+                                              &find_specific_id, &find_context);
 
   if (find_context.tid == 0)
   {
@@ -2071,19 +2072,16 @@ handle_dv_send_message (void *cls, struct GNUNET_SERVER_Client *client,
 }
 
 /** Forward declarations **/
-static int handle_dv_gossip_message (void *cls,
-                                     const struct GNUNET_PeerIdentity *peer,
-                                     const struct GNUNET_MessageHeader *message,
-                                     const struct
-                                     GNUNET_TRANSPORT_ATS_Information *atsi);
-
-static int handle_dv_disconnect_message (void *cls,
-                                         const struct GNUNET_PeerIdentity *peer,
-                                         const struct GNUNET_MessageHeader
-                                         *message,
-                                         const struct
-                                         GNUNET_TRANSPORT_ATS_Information
-                                         *atsi);
+static int
+handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer,
+                          const struct GNUNET_MessageHeader *message,
+                          const struct GNUNET_TRANSPORT_ATS_Information *atsi);
+
+static int
+handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer,
+                              const struct GNUNET_MessageHeader *message,
+                              const struct GNUNET_TRANSPORT_ATS_Information
+                              *atsi);
 /** End forward declarations **/
 
 
@@ -2658,8 +2656,8 @@ addUpdateNeighbor (const struct GNUNET_PeerIdentity *peer,
           atsi[0].value = htonl (referrer->pending_messages[i].distance);
           atsi[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
           atsi[1].value =
-              htonl ((uint32_t) referrer->pending_messages[i].latency.
-                     rel_value);
+              htonl ((uint32_t) referrer->pending_messages[i].
+                     latency.rel_value);
           atsi[2].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
           atsi[2].value = htonl (0);
           handle_dv_data_message (NULL, &referrer->pending_messages[i].sender,

+ 2 - 2
src/dv/test_transport_api_dv.c

@@ -382,8 +382,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 }
 
-static void send_other_messages (void *cls,
-                                 const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Get distance information from 'atsi'.

+ 24 - 30
src/fs/fs.c

@@ -72,8 +72,8 @@ stop_job (struct GNUNET_FS_QueueEntry *qe)
   qe->h->active_blocks -= qe->blocks;
   qe->run_time =
       GNUNET_TIME_relative_add (qe->run_time,
-                                GNUNET_TIME_absolute_get_duration (qe->
-                                                                   start_time));
+                                GNUNET_TIME_absolute_get_duration
+                                (qe->start_time));
   GNUNET_CONTAINER_DLL_remove (qe->h->running_head, qe->h->running_tail, qe);
   GNUNET_CONTAINER_DLL_insert_after (qe->h->pending_head, qe->h->pending_tail,
                                      qe->h->pending_tail, qe);
@@ -638,12 +638,8 @@ read_start_time (struct GNUNET_BIO_ReadHandle *rh,
  *        the infromation
  * @return NULL on error
  */
-static struct GNUNET_FS_FileInformation *deserialize_file_information (struct
-                                                                       GNUNET_FS_Handle
-                                                                       *h,
-                                                                       const
-                                                                       char
-                                                                       *filename);
+static struct GNUNET_FS_FileInformation *
+deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename);
 
 
 /**
@@ -1152,8 +1148,8 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
         (GNUNET_OK !=
          GNUNET_BIO_write_string (wh,
                                   (fi->data.dir.entries ==
-                                   NULL) ? NULL : fi->data.dir.entries->
-                                  serialization)))
+                                   NULL) ? NULL : fi->data.dir.
+                                  entries->serialization)))
     {
       GNUNET_break (0);
       goto cleanup;
@@ -1566,9 +1562,9 @@ read_download_request (struct GNUNET_BIO_ReadHandle *rh)
       (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->num_children)) ||
       (dr->num_children > CHK_PER_INODE) ||
       (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->depth)) || ((dr->depth == 0)
-                                                                && (dr->
-                                                                    num_children
-                                                                    > 0)) ||
+                                                                &&
+                                                                (dr->num_children
+                                                                 > 0)) ||
       ((dr->depth > 0) && (dr->num_children == 0)))
   {
     GNUNET_break (0);
@@ -2017,11 +2013,12 @@ cleanup:
  * @param search associated search
  * @param serialization name under which the search was serialized
  */
-static void deserialize_download (struct GNUNET_FS_Handle *h,
-                                  struct GNUNET_BIO_ReadHandle *rh,
-                                  struct GNUNET_FS_DownloadContext *parent,
-                                  struct GNUNET_FS_SearchResult *search,
-                                  const char *serialization);
+static void
+deserialize_download (struct GNUNET_FS_Handle *h,
+                      struct GNUNET_BIO_ReadHandle *rh,
+                      struct GNUNET_FS_DownloadContext *parent,
+                      struct GNUNET_FS_SearchResult *search,
+                      const char *serialization);
 
 
 /**
@@ -2032,16 +2029,11 @@ static void deserialize_download (struct GNUNET_FS_Handle *h,
  * @param psearch_result parent search result
  * @param serialization name under which the search was serialized
  */
-static struct GNUNET_FS_SearchContext *deserialize_search (struct
-                                                           GNUNET_FS_Handle *h,
-                                                           struct
-                                                           GNUNET_BIO_ReadHandle
-                                                           *rh,
-                                                           struct
-                                                           GNUNET_FS_SearchResult
-                                                           *psearch_result,
-                                                           const char
-                                                           *serialization);
+static struct GNUNET_FS_SearchContext *
+deserialize_search (struct GNUNET_FS_Handle *h,
+                    struct GNUNET_BIO_ReadHandle *rh,
+                    struct GNUNET_FS_SearchResult *psearch_result,
+                    const char *serialization);
 
 
 /**
@@ -2203,7 +2195,8 @@ signal_download_resume (struct GNUNET_FS_DownloadContext *dc)
  *
  * @param sc search being resumed
  */
-static void signal_search_resume (struct GNUNET_FS_SearchContext *sc);
+static void
+signal_search_resume (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -2255,7 +2248,8 @@ signal_result_resume (void *cls, const GNUNET_HashCode * key, void *value)
  *
  * @param sc search context to free
  */
-static void free_search_context (struct GNUNET_FS_SearchContext *sc);
+static void
+free_search_context (struct GNUNET_FS_SearchContext *sc);
 
 
 /**

+ 80 - 57
src/fs/fs.h

@@ -759,17 +759,17 @@ struct GNUNET_FS_SearchResult
  * @param blocks number of blocks this download has
  * @return queue handle
  */
-struct GNUNET_FS_QueueEntry *GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h,
-                                               GNUNET_FS_QueueStart start,
-                                               GNUNET_FS_QueueStop stop,
-                                               void *cls, unsigned int blocks);
+struct GNUNET_FS_QueueEntry *
+GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h, GNUNET_FS_QueueStart start,
+                  GNUNET_FS_QueueStop stop, void *cls, unsigned int blocks);
 
 
 /**
  * Dequeue a job from the queue.
  * @param qh handle for the job
  */
-void GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
+void
+GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
 
 
 /**
@@ -788,9 +788,9 @@ void GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
  * @param emsg location for the reader to store an error message
  * @return number of bytes written, usually "max", 0 on error
  */
-size_t               GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset,
-                                                  size_t max, void *buf,
-                                                  char **emsg);
+size_t
+GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset, size_t max, void *buf,
+                             char **emsg);
 
 
 /**
@@ -799,7 +799,8 @@ size_t               GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset,
  * @param filename file to read
  * @return closure to use
  */
-void *GNUNET_FS_make_file_reader_context_ (const char *filename);
+void *
+GNUNET_FS_make_file_reader_context_ (const char *filename);
 
 
 
@@ -819,8 +820,9 @@ void *GNUNET_FS_make_file_reader_context_ (const char *filename);
  * @param emsg location for the reader to store an error message
  * @return number of bytes written, usually "max", 0 on error
  */
-size_t GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max,
-                                    void *buf, char **emsg);
+size_t
+GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max, void *buf,
+                             char **emsg);
 
 /**
  * Notification of FS that a search probe has made progress.
@@ -837,9 +839,9 @@ size_t GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max,
  *         will be passed to future callbacks in the respective
  *         field in the GNUNET_FS_ProgressInfo struct.
  */
-void *GNUNET_FS_search_probe_progress_ (void *cls,
-                                        const struct GNUNET_FS_ProgressInfo
-                                        *info);
+void *
+GNUNET_FS_search_probe_progress_ (void *cls,
+                                  const struct GNUNET_FS_ProgressInfo *info);
 
 
 /**
@@ -848,8 +850,9 @@ void *GNUNET_FS_search_probe_progress_ (void *cls,
  * @param cls "struct GNUNET_FS_PublishContext" identifies the upload
  * @param tc task context
  */
-void GNUNET_FS_publish_main_ (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+GNUNET_FS_publish_main_ (void *cls,
+                         const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -859,8 +862,8 @@ void GNUNET_FS_publish_main_ (void *cls,
  * @param cls closure, unindex context
  * @param file_id computed hash, NULL on error
  */
-void GNUNET_FS_unindex_process_hash_ (void *cls,
-                                      const GNUNET_HashCode * file_id);
+void
+GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id);
 
 
 /**
@@ -873,10 +876,11 @@ void GNUNET_FS_unindex_process_hash_ (void *cls,
  * @param offset where in the file are we so far
  * @return value returned from callback
  */
-void *GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
-                                      struct GNUNET_FS_PublishContext *sc,
-                                      const struct GNUNET_FS_FileInformation *p,
-                                      uint64_t offset);
+void *
+GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+                                struct GNUNET_FS_PublishContext *sc,
+                                const struct GNUNET_FS_FileInformation *p,
+                                uint64_t offset);
 
 
 /**
@@ -886,8 +890,9 @@ void *GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  * @param pi structure to fill in
  * @param dc overall download context
  */
-void GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
-                                      struct GNUNET_FS_DownloadContext *dc);
+void
+GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+                                 struct GNUNET_FS_DownloadContext *dc);
 
 
 /**
@@ -897,9 +902,9 @@ void GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  * @param cls the 'struct GNUNET_FS_DownloadContext'
  * @param tc scheduler context
  */
-void GNUNET_FS_download_start_task_ (void *cls,
-                                     const struct GNUNET_SCHEDULER_TaskContext
-                                     *tc);
+void
+GNUNET_FS_download_start_task_ (void *cls,
+                                const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 
@@ -911,9 +916,10 @@ void GNUNET_FS_download_start_task_ (void *cls,
  * @param uc overall unindex context
  * @param offset where we are in the file (for progress)
  */
-void GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
-                                     struct GNUNET_FS_UnindexContext *uc,
-                                     uint64_t offset);
+void
+GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+                                struct GNUNET_FS_UnindexContext *uc,
+                                uint64_t offset);
 
 /**
  * Fill in all of the generic fields for a search event and
@@ -923,8 +929,9 @@ void GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  * @param sc overall search context
  * @return value returned by the callback
  */
-void *GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
-                                     struct GNUNET_FS_SearchContext *sc);
+void *
+GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+                               struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -932,7 +939,8 @@ void *GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  *
  * @param uc context for the unindex operation.
  */
-void GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
 
 /**
  * Build the request and actually initiate the search using the
@@ -941,15 +949,16 @@ void GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
  * @param sc search context
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
+int
+GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
 
 /**
  * Start the downloading process (by entering the queue).
  *
  * @param dc our download context
  */
-void GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext
-                                            *dc);
+void
+GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc);
 
 
 /**
@@ -957,7 +966,8 @@ void GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext
  *
  * @param sr the search result
  */
-void GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
+void
+GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
 
 /**
  * Remove serialization/deserialization file from disk.
@@ -966,8 +976,9 @@ void GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
  * @param ext component of the path 
  * @param ent entity identifier 
  */
-void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
-                                  const char *ent);
+void
+GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
+                             const char *ent);
 
 
 /**
@@ -977,8 +988,9 @@ void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
  * @param ext component of the path 
  * @param uni unique name of parent 
  */
-void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
-                                 const char *uni);
+void
+GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
+                            const char *uni);
 
 
 /**
@@ -989,7 +1001,8 @@ void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
  * 
  * @param fi the struct to sync
  */
-void GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
+void
+GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
 
 /**
  * Synchronize this publishing struct with its mirror
@@ -999,7 +1012,8 @@ void GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
  * 
  * @param pc the struct to sync
  */
-void GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
+void
+GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
 
 /**
  * Synchronize this unindex struct with its mirror
@@ -1009,7 +1023,8 @@ void GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
  * 
  * @param uc the struct to sync
  */
-void GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
 
 /**
  * Synchronize this search struct with its mirror
@@ -1019,7 +1034,8 @@ void GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
  * 
  * @param sc the struct to sync
  */
-void GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
 
 /**
  * Synchronize this search result with its mirror
@@ -1029,7 +1045,8 @@ void GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
  * 
  * @param sr the struct to sync
  */
-void GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
+void
+GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
 
 /**
  * Synchronize this download struct with its mirror
@@ -1039,7 +1056,8 @@ void GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
  * 
  * @param dc the struct to sync
  */
-void GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
+void
+GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
 
 /**
  * Create SUSPEND event for the given publish operation
@@ -1047,7 +1065,8 @@ void GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
  *
  * @param cls the 'struct GNUNET_FS_PublishContext' to signal for
  */
-void GNUNET_FS_publish_signal_suspend_ (void *cls);
+void
+GNUNET_FS_publish_signal_suspend_ (void *cls);
 
 /**
  * Create SUSPEND event for the given search operation
@@ -1055,7 +1074,8 @@ void GNUNET_FS_publish_signal_suspend_ (void *cls);
  *
  * @param cls the 'struct GNUNET_FS_SearchContext' to signal for
  */
-void GNUNET_FS_search_signal_suspend_ (void *cls);
+void
+GNUNET_FS_search_signal_suspend_ (void *cls);
 
 /**
  * Create SUSPEND event for the given download operation
@@ -1063,7 +1083,8 @@ void GNUNET_FS_search_signal_suspend_ (void *cls);
  *
  * @param cls the 'struct GNUNET_FS_DownloadContext' to signal for
  */
-void GNUNET_FS_download_signal_suspend_ (void *cls);
+void
+GNUNET_FS_download_signal_suspend_ (void *cls);
 
 /**
  * Create SUSPEND event for the given unindex operation
@@ -1071,7 +1092,8 @@ void GNUNET_FS_download_signal_suspend_ (void *cls);
  *
  * @param cls the 'struct GNUNET_FS_UnindexContext' to signal for
  */
-void GNUNET_FS_unindex_signal_suspend_ (void *cls);
+void
+GNUNET_FS_unindex_signal_suspend_ (void *cls);
 
 /**
  * Function signature of the functions that can be called
@@ -1118,9 +1140,9 @@ struct TopLevelActivity
  * @param ssf_cls closure for ssf
  * @return fresh top-level activity handle
  */
-struct TopLevelActivity *GNUNET_FS_make_top (struct GNUNET_FS_Handle *h,
-                                             SuspendSignalFunction ssf,
-                                             void *ssf_cls);
+struct TopLevelActivity *
+GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf,
+                    void *ssf_cls);
 
 
 /**
@@ -1129,8 +1151,8 @@ struct TopLevelActivity *GNUNET_FS_make_top (struct GNUNET_FS_Handle *h,
  * @param h global fs handle
  * @param top top level activity entry
  */
-void GNUNET_FS_end_top (struct GNUNET_FS_Handle *h,
-                        struct TopLevelActivity *top);
+void
+GNUNET_FS_end_top (struct GNUNET_FS_Handle *h, struct TopLevelActivity *top);
 
 
 
@@ -1736,7 +1758,8 @@ struct DownloadRequest
  *
  * @param dr request to free
  */
-void GNUNET_FS_free_download_request_ (struct DownloadRequest *dr);
+void
+GNUNET_FS_free_download_request_ (struct DownloadRequest *dr);
 
 
 /**

+ 19 - 16
src/fs/fs_download.c

@@ -143,7 +143,8 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  * @param buf where the callee should write the message
  * @return number of bytes written to buf
  */
-static size_t transmit_download_request (void *cls, size_t size, void *buf);
+static size_t
+transmit_download_request (void *cls, size_t size, void *buf);
 
 
 /**
@@ -194,8 +195,9 @@ struct ProcessResultClosure
  * @param value value in the hash map (a 'struct DownloadRequest')
  * @return GNUNET_YES (we should continue to iterate); unless serious error
  */
-static int process_result_with_request (void *cls, const GNUNET_HashCode * key,
-                                        void *value);
+static int
+process_result_with_request (void *cls, const GNUNET_HashCode * key,
+                             void *value);
 
 
 /**
@@ -261,7 +263,8 @@ encrypt_existing_match (struct GNUNET_FS_DownloadContext *dc,
  *
  * @param dc download context that is having trouble
  */
-static void try_reconnect (struct GNUNET_FS_DownloadContext *dc);
+static void
+try_reconnect (struct GNUNET_FS_DownloadContext *dc);
 
 
 /**
@@ -275,10 +278,11 @@ static void try_reconnect (struct GNUNET_FS_DownloadContext *dc);
  * @param length number of bytes in data
  * @param data contents of the file (or NULL if they were not inlined)
  */
-static void trigger_recursive_download (void *cls, const char *filename,
-                                        const struct GNUNET_FS_Uri *uri,
-                                        const struct GNUNET_CONTAINER_MetaData
-                                        *meta, size_t length, const void *data);
+static void
+trigger_recursive_download (void *cls, const char *filename,
+                            const struct GNUNET_FS_Uri *uri,
+                            const struct GNUNET_CONTAINER_MetaData *meta,
+                            size_t length, const void *data);
 
 
 /**
@@ -940,8 +944,8 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received block `%s' matching pending request at depth %u and offset %llu/%llu\n",
               GNUNET_h2s (key), dr->depth, (unsigned long long) dr->offset,
-              (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
-                                                  file_length));
+              (unsigned long long) GNUNET_ntohll (dc->uri->data.
+                                                  chk.file_length));
 
 #endif
   bs = GNUNET_FS_tree_calculate_block_size (GNUNET_ntohll
@@ -953,8 +957,8 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key,
                      _
                      ("Internal error or bogus download URI (expected %u bytes at depth %u and offset %llu/%llu, got %u bytes)\n"),
                      bs, dr->depth, (unsigned long long) dr->offset,
-                     (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
-                                                         file_length),
+                     (unsigned long long) GNUNET_ntohll (dc->uri->data.
+                                                         chk.file_length),
                      prc->size);
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s", dc->emsg);
     while (dr->parent != NULL)
@@ -1077,8 +1081,8 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key,
 #if DEBUG_DOWNLOAD
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Download completed, truncating file to desired length %llu\n",
-                (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
-                                                    file_length));
+                (unsigned long long) GNUNET_ntohll (dc->uri->data.
+                                                    chk.file_length));
 #endif
     /* truncate file to size (since we store IBlocks at the end) */
     if (dc->filename != NULL)
@@ -1757,8 +1761,7 @@ GNUNET_FS_download_start_task_ (void *cls,
                                   GNUNET_DISK_OPEN_READWRITE |
                                   GNUNET_DISK_OPEN_CREATE |
                                   ((0 ==
-                                    GNUNET_FS_uri_chk_get_file_size (dc->
-                                                                     uri)) ?
+                                    GNUNET_FS_uri_chk_get_file_size (dc->uri)) ?
                                    GNUNET_DISK_OPEN_TRUNCATE : 0),
                                   GNUNET_DISK_PERM_USER_READ |
                                   GNUNET_DISK_PERM_USER_WRITE |

+ 4 - 4
src/fs/fs_file_information.c

@@ -638,8 +638,8 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
   no = GNUNET_NO;
   if (GNUNET_OK !=
       proc (proc_cls, dir,
-            (dir->is_directory) ? dir->data.dir.dir_size : dir->data.file.
-            file_size, dir->meta, &dir->keywords, &dir->bo,
+            (dir->is_directory) ? dir->data.dir.dir_size : dir->data.
+            file.file_size, dir->meta, &dir->keywords, &dir->bo,
             (dir->is_directory) ? &no : &dir->data.file.do_index,
             &dir->client_info))
     return;
@@ -651,8 +651,8 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
     no = GNUNET_NO;
     if (GNUNET_OK !=
         proc (proc_cls, pos,
-              (pos->is_directory) ? pos->data.dir.dir_size : pos->data.file.
-              file_size, pos->meta, &pos->keywords, &pos->bo,
+              (pos->is_directory) ? pos->data.dir.dir_size : pos->data.
+              file.file_size, pos->meta, &pos->keywords, &pos->bo,
               (dir->is_directory) ? &no : &dir->data.file.do_index,
               &pos->client_info))
       break;

+ 4 - 4
src/fs/fs_publish.c

@@ -179,8 +179,8 @@ signal_publish_completion (struct GNUNET_FS_FileInformation *p,
   pi.value.publish.specifics.completed.chk_uri = p->chk_uri;
   p->client_info =
       GNUNET_FS_publish_make_status_ (&pi, pc, p,
-                                      GNUNET_ntohll (p->chk_uri->data.chk.
-                                                     file_length));
+                                      GNUNET_ntohll (p->chk_uri->data.
+                                                     chk.file_length));
 }
 
 
@@ -1333,8 +1333,8 @@ struct PublishKskContext
  * @param cls closure of type "struct PublishKskContext*"
  * @param tc unused
  */
-static void publish_ksk_cont (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+publish_ksk_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**

+ 8 - 12
src/fs/fs_search.c

@@ -440,15 +440,10 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc,
  * @param psearch parent search result (for namespace update searches)
  * @return context that can be used to control the search
  */
-static struct GNUNET_FS_SearchContext *search_start (struct GNUNET_FS_Handle *h,
-                                                     const struct GNUNET_FS_Uri
-                                                     *uri, uint32_t anonymity,
-                                                     enum
-                                                     GNUNET_FS_SearchOptions
-                                                     options, void *cctx,
-                                                     struct
-                                                     GNUNET_FS_SearchResult
-                                                     *psearch);
+static struct GNUNET_FS_SearchContext *
+search_start (struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri,
+              uint32_t anonymity, enum GNUNET_FS_SearchOptions options,
+              void *cctx, struct GNUNET_FS_SearchResult *psearch);
 
 
 /**
@@ -813,7 +808,8 @@ process_result (struct GNUNET_FS_SearchContext *sc, enum GNUNET_BLOCK_Type type,
  *
  * @param sc the search to reconnec
  */
-static void try_reconnect (struct GNUNET_FS_SearchContext *sc);
+static void
+try_reconnect (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -855,8 +851,8 @@ receive_results (void *cls, const struct GNUNET_MessageHeader *msg)
  *
  * @param sc context for the search
  */
-static void schedule_transmit_search_request (struct GNUNET_FS_SearchContext
-                                              *sc);
+static void
+schedule_transmit_search_request (struct GNUNET_FS_SearchContext *sc);
 
 
 /**

+ 31 - 30
src/fs/fs_test_lib.h

@@ -53,11 +53,12 @@ struct GNUNET_FS_TestDaemon;
  *             'GNUNET_FS_TEST_daemons_stop'!
  * @param cont_cls closure for cont
  */
-void GNUNET_FS_TEST_daemons_start (const char *template_cfg_file,
-                                   struct GNUNET_TIME_Relative timeout,
-                                   unsigned int total,
-                                   struct GNUNET_FS_TestDaemon **daemons,
-                                   GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_FS_TEST_daemons_start (const char *template_cfg_file,
+                              struct GNUNET_TIME_Relative timeout,
+                              unsigned int total,
+                              struct GNUNET_FS_TestDaemon **daemons,
+                              GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 /**
@@ -70,11 +71,11 @@ void GNUNET_FS_TEST_daemons_start (const char *template_cfg_file,
  * @param cont function to call when done
  * @param cont_cls closure for cont
  */
-void GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1,
-                                     struct GNUNET_FS_TestDaemon *daemon2,
-                                     struct GNUNET_TIME_Relative timeout,
-                                     GNUNET_SCHEDULER_Task cont,
-                                     void *cont_cls);
+void
+GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1,
+                                struct GNUNET_FS_TestDaemon *daemon2,
+                                struct GNUNET_TIME_Relative timeout,
+                                GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 /**
@@ -83,9 +84,8 @@ void GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1,
  * @param daemons array with the daemons (must contain at least one)
  * @return peer group
  */
-struct GNUNET_TESTING_PeerGroup *GNUNET_FS_TEST_get_group (struct
-                                                           GNUNET_FS_TestDaemon
-                                                           **daemons);
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_FS_TEST_get_group (struct GNUNET_FS_TestDaemon **daemons);
 
 
 
@@ -96,9 +96,9 @@ struct GNUNET_TESTING_PeerGroup *GNUNET_FS_TEST_get_group (struct
  * @param off which configuration to get
  * @return peer configuration
  */
-const struct GNUNET_CONFIGURATION_Handle
-    *GNUNET_FS_TEST_get_configuration (struct GNUNET_FS_TestDaemon **daemons,
-                                       unsigned int off);
+const struct GNUNET_CONFIGURATION_Handle *
+GNUNET_FS_TEST_get_configuration (struct GNUNET_FS_TestDaemon **daemons,
+                                  unsigned int off);
 
 /**
  * Stop daemons used for testing.
@@ -106,8 +106,9 @@ const struct GNUNET_CONFIGURATION_Handle
  * @param total number of daemons to stop
  * @param daemons array with the daemons (values will be clobbered)
  */
-void GNUNET_FS_TEST_daemons_stop (unsigned int total,
-                                  struct GNUNET_FS_TestDaemon **daemons);
+void
+GNUNET_FS_TEST_daemons_stop (unsigned int total,
+                             struct GNUNET_FS_TestDaemon **daemons);
 
 
 /**
@@ -136,12 +137,12 @@ typedef void (*GNUNET_FS_TEST_UriContinuation) (void *cls,
  * @param cont function to call when done
  * @param cont_cls closure for cont
  */
-void GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
-                             struct GNUNET_TIME_Relative timeout,
-                             uint32_t anonymity, int do_index, uint64_t size,
-                             uint32_t seed, unsigned int verbose,
-                             GNUNET_FS_TEST_UriContinuation cont,
-                             void *cont_cls);
+void
+GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
+                        struct GNUNET_TIME_Relative timeout, uint32_t anonymity,
+                        int do_index, uint64_t size, uint32_t seed,
+                        unsigned int verbose,
+                        GNUNET_FS_TEST_UriContinuation cont, void *cont_cls);
 
 
 /**
@@ -157,12 +158,12 @@ void GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
  * @param cont function to call when done
  * @param cont_cls closure for cont
  */
-void GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon,
-                              struct GNUNET_TIME_Relative timeout,
-                              uint32_t anonymity, uint32_t seed,
-                              const struct GNUNET_FS_Uri *uri,
-                              unsigned int verbose, GNUNET_SCHEDULER_Task cont,
-                              void *cont_cls);
+void
+GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon,
+                         struct GNUNET_TIME_Relative timeout,
+                         uint32_t anonymity, uint32_t seed,
+                         const struct GNUNET_FS_Uri *uri, unsigned int verbose,
+                         GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 

+ 1 - 2
src/fs/fs_tree.c

@@ -395,8 +395,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te)
   if (NULL != te->proc)
     te->proc (te->cls, mychk, te->publish_offset, te->current_depth,
               (0 ==
-               te->
-               current_depth) ? GNUNET_BLOCK_TYPE_FS_DBLOCK :
+               te->current_depth) ? GNUNET_BLOCK_TYPE_FS_DBLOCK :
               GNUNET_BLOCK_TYPE_FS_IBLOCK, enc, pt_size);
   if (NULL != te->progress)
     te->progress (te->cls, te->publish_offset, pt_block, pt_size,

+ 24 - 23
src/fs/fs_tree.h

@@ -40,7 +40,8 @@
  * @param flen file length for which to compute the depth
  * @return depth of the tree, always > 0.  A depth of 1 means only a DBLOCK.
  */
-unsigned int GNUNET_FS_compute_depth (uint64_t flen);
+unsigned int
+GNUNET_FS_compute_depth (uint64_t flen);
 
 
 /**
@@ -52,7 +53,8 @@ unsigned int GNUNET_FS_compute_depth (uint64_t flen);
  * @param depth depth of the block.  depth==0 is a DBLOCK.
  * @return number of bytes of payload a subtree of this depth may correspond to
  */
-uint64_t GNUNET_FS_tree_compute_tree_size (unsigned int depth);
+uint64_t
+GNUNET_FS_tree_compute_tree_size (unsigned int depth);
 
 
 /**
@@ -66,8 +68,9 @@ uint64_t GNUNET_FS_tree_compute_tree_size (unsigned int depth);
  * @param depth depth of the node in the tree, 0 for DBLOCK
  * @return number of bytes stored in this node
  */
-size_t GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset,
-                                            unsigned int depth);
+size_t
+GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset,
+                                     unsigned int depth);
 
 
 /**
@@ -134,18 +137,12 @@ typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset,
  * @param cont function to call when done
  * @return tree encoder context
  */
-struct GNUNET_FS_TreeEncoder *GNUNET_FS_tree_encoder_create (struct
-                                                             GNUNET_FS_Handle
-                                                             *h, uint64_t size,
-                                                             void *cls,
-                                                             GNUNET_FS_DataReader
-                                                             reader,
-                                                             GNUNET_FS_TreeBlockProcessor
-                                                             proc,
-                                                             GNUNET_FS_TreeProgressCallback
-                                                             progress,
-                                                             GNUNET_SCHEDULER_Task
-                                                             cont);
+struct GNUNET_FS_TreeEncoder *
+GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size,
+                               void *cls, GNUNET_FS_DataReader reader,
+                               GNUNET_FS_TreeBlockProcessor proc,
+                               GNUNET_FS_TreeProgressCallback progress,
+                               GNUNET_SCHEDULER_Task cont);
 
 
 /**
@@ -156,7 +153,8 @@ struct GNUNET_FS_TreeEncoder *GNUNET_FS_tree_encoder_create (struct
  *
  * @param te tree encoder to use
  */
-void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
+void
+GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
 
 
 /**
@@ -170,8 +168,9 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
  *        prior to completion and prior to an internal error,
  *        both "*uri" and "*emsg" will be set to NULL).
  */
-void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
-                                    struct GNUNET_FS_Uri **uri, char **emsg);
+void
+GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
+                               struct GNUNET_FS_Uri **uri, char **emsg);
 
 
 #if 0
@@ -185,8 +184,9 @@ void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
  * @param data set to the resume data
  * @param size set to the size of the resume data
  */
-void GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder
-                                             *te, void **data, size_t * size);
+void
+GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te,
+                                        void **data, size_t * size);
 
 
 /**
@@ -197,8 +197,9 @@ void GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder
  * @param data the resume data
  * @param size the size of the resume data
  */
-void GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
-                                    const void *data, size_t size);
+void
+GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
+                               const void *data, size_t size);
 #endif
 
 #endif

+ 2 - 2
src/fs/fs_uri.c

@@ -1834,8 +1834,8 @@ uri_loc_to_string (const struct GNUNET_FS_Uri *uri)
   GNUNET_asprintf (&ret, "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
                    GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash,
                    (const char *) &queryhash,
-                   (unsigned long long) GNUNET_ntohll (uri->data.loc.fi.
-                                                       file_length), peerId,
+                   (unsigned long long) GNUNET_ntohll (uri->data.loc.
+                                                       fi.file_length), peerId,
                    peerSig,
                    (unsigned long long) uri->data.loc.expirationTime.abs_value);
   GNUNET_free (peerSig);

+ 4 - 4
src/fs/gnunet-download.c

@@ -106,8 +106,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
       s = GNUNET_STRINGS_relative_time_to_string (info->value.download.eta);
       t = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed *
                                           1000LL /
-                                          (info->value.download.duration.
-                                           rel_value + 1));
+                                          (info->value.download.
+                                           duration.rel_value + 1));
       fprintf (stdout,
                _("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"),
                info->value.download.filename,
@@ -124,8 +124,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 /
-                                        (info->value.download.duration.
-                                         rel_value + 1));
+                                        (info->value.download.
+                                         duration.rel_value + 1));
     fprintf (stdout, _("Downloading `%s' done (%s/s).\n"),
              info->value.download.filename, s);
     GNUNET_free (s);

+ 2 - 2
src/fs/gnunet-publish.c

@@ -133,8 +133,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     fprintf (stdout, _("Publishing `%s' done.\n"),
              info->value.publish.filename);
-    s = GNUNET_FS_uri_to_string (info->value.publish.specifics.completed.
-                                 chk_uri);
+    s = GNUNET_FS_uri_to_string (info->value.publish.specifics.
+                                 completed.chk_uri);
     fprintf (stdout, _("URI is `%s'.\n"), s);
     GNUNET_free (s);
     if (info->value.publish.pctx == NULL)

+ 4 - 4
src/fs/gnunet-search.c

@@ -150,8 +150,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     uri = GNUNET_FS_uri_to_string (info->value.search.specifics.result.uri);
     printf ("#%u:\n", cnt++);
     filename =
-        GNUNET_CONTAINER_meta_data_get_by_type (info->value.search.specifics.
-                                                result.meta,
+        GNUNET_CONTAINER_meta_data_get_by_type (info->value.search.
+                                                specifics.result.meta,
                                                 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME);
     if (filename != NULL)
     {
@@ -162,8 +162,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     else
       printf ("gnunet-download %s\n", uri);
     if (verbose)
-      GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.result.
-                                          meta, &item_printer, NULL);
+      GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.
+                                          result.meta, &item_printer, NULL);
     printf ("\n");
     fflush (stdout);
     GNUNET_free_non_null (filename);

+ 4 - 2
src/fs/gnunet-service-fs.h

@@ -167,7 +167,8 @@ extern int GSF_enable_randomized_delays;
  *         GNUNET_NO to process normally (load normal)
  *         GNUNET_SYSERR to process for free (load low)
  */
-int GSF_test_get_load_too_high_ (uint32_t priority);
+int
+GSF_test_get_load_too_high_ (uint32_t priority);
 
 
 /**
@@ -176,7 +177,8 @@ int GSF_test_get_load_too_high_ (uint32_t priority);
  *
  * @param start time when the datastore request was issued
  */
-void GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start);
+void
+GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start);
 
 
 

+ 12 - 13
src/fs/gnunet-service-fs_cp.c

@@ -383,7 +383,8 @@ GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp)
  * @param buf where to copy the message
  * @return number of bytes copied to buf
  */
-static size_t peer_transmit_ready_cb (void *cls, size_t size, void *buf);
+static size_t
+peer_transmit_ready_cb (void *cls, size_t size, void *buf);
 
 
 
@@ -400,12 +401,11 @@ static size_t peer_transmit_ready_cb (void *cls, size_t size, void *buf);
  *        long should the client wait until re-trying?
  * @param preference current traffic preference for the given peer
  */
-static void core_reserve_callback (void *cls,
-                                   const struct GNUNET_PeerIdentity *peer,
-                                   struct GNUNET_BANDWIDTH_Value32NBO
-                                   bandwidth_out, int32_t amount,
-                                   struct GNUNET_TIME_Relative res_delay,
-                                   uint64_t preference);
+static void
+core_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
+                       struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
+                       int32_t amount, struct GNUNET_TIME_Relative res_delay,
+                       uint64_t preference);
 
 
 /**
@@ -491,9 +491,8 @@ peer_transmit_ready_cb (void *cls, size_t size, void *buf)
     GNUNET_assert (0 < cp->ppd.pending_replies--);
   }
   GNUNET_LOAD_update (cp->ppd.transmission_delay,
-                      GNUNET_TIME_absolute_get_duration (pth->
-                                                         transmission_request_start_time).
-                      rel_value);
+                      GNUNET_TIME_absolute_get_duration
+                      (pth->transmission_request_start_time).rel_value);
   ret = pth->gmc (pth->gmc_cls, size, buf);
   GNUNET_assert (NULL == pth->cth);
   for (pos = cp->pth_head; pos != NULL; pos = pos->next)
@@ -1732,9 +1731,9 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
 #if DEBUG_FS && 0
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Migration already blocked for another %llu ms\n",
-                (unsigned long long) GNUNET_TIME_absolute_get_remaining (cp->
-                                                                         last_migration_block).
-                rel_value);
+                (unsigned long long)
+                GNUNET_TIME_absolute_get_remaining
+                (cp->last_migration_block).rel_value);
 #endif
     return;                     /* already blocked */
   }

+ 59 - 56
src/fs/gnunet-service-fs_cp.h

@@ -170,11 +170,9 @@ struct GSF_PeerTransmitHandle;
  * @param atsi performance data for the connection
  * @return handle to connected peer entry
  */
-struct GSF_ConnectedPeer *GSF_peer_connect_handler_ (const struct
-                                                     GNUNET_PeerIdentity *peer,
-                                                     const struct
-                                                     GNUNET_TRANSPORT_ATS_Information
-                                                     *atsi);
+struct GSF_ConnectedPeer *
+GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer,
+                           const struct GNUNET_TRANSPORT_ATS_Information *atsi);
 
 
 /**
@@ -183,8 +181,8 @@ struct GSF_ConnectedPeer *GSF_peer_connect_handler_ (const struct
  * @param peer peer's identity
  * @return NULL if this peer is not currently connected
  */
-struct GSF_ConnectedPeer *GSF_peer_get_ (const struct GNUNET_PeerIdentity
-                                         *peer);
+struct GSF_ConnectedPeer *
+GSF_peer_get_ (const struct GNUNET_PeerIdentity *peer);
 
 
 /**
@@ -201,13 +199,10 @@ struct GSF_ConnectedPeer *GSF_peer_get_ (const struct GNUNET_PeerIdentity
  * @param gmc_cls closure for gmc
  * @return handle to cancel request
  */
-struct GSF_PeerTransmitHandle *GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp,
-                                                   int is_query,
-                                                   uint32_t priority,
-                                                   struct GNUNET_TIME_Relative
-                                                   timeout, size_t size,
-                                                   GSF_GetMessageCallback gmc,
-                                                   void *gmc_cls);
+struct GSF_PeerTransmitHandle *
+GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, int is_query,
+                    uint32_t priority, struct GNUNET_TIME_Relative timeout,
+                    size_t size, GSF_GetMessageCallback gmc, void *gmc_cls);
 
 
 /**
@@ -215,7 +210,8 @@ struct GSF_PeerTransmitHandle *GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp,
  *
  * @param pth request to cancel
  */
-void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
+void
+GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
 
 
 /**
@@ -225,9 +221,10 @@ void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
  * @param request_time time at which the original query was transmitted
  * @param request_priority priority of the original request
  */
-void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
-                                   struct GNUNET_TIME_Absolute request_time,
-                                   uint32_t request_priority);
+void
+GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
+                              struct GNUNET_TIME_Absolute request_time,
+                              uint32_t request_priority);
 
 
 /**
@@ -237,9 +234,9 @@ void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
  * @param cp responding peer (will be updated)
  * @param initiator_client local client on responsible for query
  */
-void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp,
-                                        struct GSF_LocalClient
-                                        *initiator_client);
+void
+GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp,
+                                   struct GSF_LocalClient *initiator_client);
 
 
 /**
@@ -249,9 +246,10 @@ void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp,
  * @param cp responding peer (will be updated)
  * @param initiator_peer other peer responsible for query
  */
-void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
-                                      const struct GSF_ConnectedPeer
-                                      *initiator_peer);
+void
+GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
+                                 const struct GSF_ConnectedPeer
+                                 *initiator_peer);
 
 
 /**
@@ -265,13 +263,12 @@ void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
  *        unless we see some further activity from it
  * @param atsi status information
  */
-void GSF_peer_status_handler_ (void *cls,
-                               const struct GNUNET_PeerIdentity *peer,
-                               struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
-                               struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
-                               struct GNUNET_TIME_Absolute timeout,
-                               const struct GNUNET_TRANSPORT_ATS_Information
-                               *atsi);
+void
+GSF_peer_status_handler_ (void *cls, const struct GNUNET_PeerIdentity *peer,
+                          struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
+                          struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
+                          struct GNUNET_TIME_Absolute timeout,
+                          const struct GNUNET_TRANSPORT_ATS_Information *atsi);
 
 
 /**
@@ -285,11 +282,12 @@ void GSF_peer_status_handler_ (void *cls,
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
  */
-int GSF_handle_p2p_migration_stop_ (void *cls,
-                                    const struct GNUNET_PeerIdentity *other,
-                                    const struct GNUNET_MessageHeader *message,
-                                    const struct
-                                    GNUNET_TRANSPORT_ATS_Information *atsi);
+int
+GSF_handle_p2p_migration_stop_ (void *cls,
+                                const struct GNUNET_PeerIdentity *other,
+                                const struct GNUNET_MessageHeader *message,
+                                const struct GNUNET_TRANSPORT_ATS_Information
+                                *atsi);
 
 
 /**
@@ -303,11 +301,9 @@ int GSF_handle_p2p_migration_stop_ (void *cls,
  * @param message the actual message
  * @return pending request handle, NULL on error
  */
-struct GSF_PendingRequest *GSF_handle_p2p_query_ (const struct
-                                                  GNUNET_PeerIdentity *other,
-                                                  const struct
-                                                  GNUNET_MessageHeader
-                                                  *message);
+struct GSF_PendingRequest *
+GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
+                       const struct GNUNET_MessageHeader *message);
 
 
 /**
@@ -316,9 +312,8 @@ struct GSF_PendingRequest *GSF_handle_p2p_query_ (const struct
  * @param cp peer to query
  * @return performance data record for the peer
  */
-struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct
-                                                                GSF_ConnectedPeer
-                                                                *cp);
+struct GSF_PeerPerformanceData *
+GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp);
 
 
 /**
@@ -328,8 +323,9 @@ struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct
  * @param cp peer to ask
  * @param block_time until when to block
  */
-void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
-                                struct GNUNET_TIME_Relative block_time);
+void
+GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
+                           struct GNUNET_TIME_Relative block_time);
 
 
 /**
@@ -339,8 +335,9 @@ void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
  * @param cls unused
  * @param peer identity of peer that connected
  */
-void GSF_peer_disconnect_handler_ (void *cls,
-                                   const struct GNUNET_PeerIdentity *peer);
+void
+GSF_peer_disconnect_handler_ (void *cls,
+                              const struct GNUNET_PeerIdentity *peer);
 
 
 /**
@@ -349,7 +346,8 @@ void GSF_peer_disconnect_handler_ (void *cls,
  *
  * @param lc handle to the local client (henceforth invalid)
  */
-void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
+void
+GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
 
 
 /**
@@ -361,8 +359,9 @@ void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
  * @param cp peer to reserve bandwidth from
  * @param pref preference change
  */
-void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
-                                            uint64_t pref);
+void
+GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
+                                       uint64_t pref);
 
 
 /**
@@ -371,8 +370,9 @@ void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
  * @param cp peer to reserve bandwidth from
  * @param id identity to set (written to)
  */
-void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
-                                       struct GNUNET_PeerIdentity *id);
+void
+GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
+                                  struct GNUNET_PeerIdentity *id);
 
 
 /**
@@ -381,19 +381,22 @@ void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
  * @param it function to call for each peer
  * @param it_cls closure for it
  */
-void GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls);
+void
+GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls);
 
 
 /**
  * Initialize peer management subsystem.
  */
-void GSF_connected_peer_init_ (void);
+void
+GSF_connected_peer_init_ (void);
 
 
 /**
  * Shutdown peer management subsystem.
  */
-void GSF_connected_peer_done_ (void);
+void
+GSF_connected_peer_done_ (void);
 
 
 #endif

+ 3 - 4
src/fs/gnunet-service-fs_indexing.c

@@ -228,8 +228,7 @@ signal_index_ok (struct IndexInfo *ii)
                 ("Index request received for file `%s' is already indexed as `%s'.  Permitting anyway.\n"),
                 ii->filename,
                 (const char *) GNUNET_CONTAINER_multihashmap_get (ifm,
-                                                                  &ii->
-                                                                  file_id));
+                                                                  &ii->file_id));
     GNUNET_SERVER_transmit_context_append_data (ii->tc, NULL, 0,
                                                 GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK);
     GNUNET_SERVER_transmit_context_run (ii->tc, GNUNET_TIME_UNIT_MINUTES);
@@ -447,8 +446,8 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
         prev->next = next;
       GNUNET_break (GNUNET_OK ==
                     GNUNET_CONTAINER_multihashmap_remove (ifm, &pos->file_id,
-                                                          (void *) pos->
-                                                          filename));
+                                                          (void *)
+                                                          pos->filename));
       GNUNET_free (pos);
       found = GNUNET_YES;
     }

+ 22 - 20
src/fs/gnunet-service-fs_indexing.h

@@ -54,14 +54,14 @@
  * @param cont_cls closure for cont
  * @return GNUNET_OK on success
  */
-int GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
-                                      uint32_t size, const void *data,
-                                      enum GNUNET_BLOCK_Type type,
-                                      uint32_t priority, uint32_t anonymity,
-                                      struct GNUNET_TIME_Absolute expiration,
-                                      uint64_t uid,
-                                      GNUNET_DATASTORE_DatumProcessor cont,
-                                      void *cont_cls);
+int
+GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
+                                  const void *data, enum GNUNET_BLOCK_Type type,
+                                  uint32_t priority, uint32_t anonymity,
+                                  struct GNUNET_TIME_Absolute expiration,
+                                  uint64_t uid,
+                                  GNUNET_DATASTORE_DatumProcessor cont,
+                                  void *cont_cls);
 
 /**
  * Handle INDEX_START-message.
@@ -70,9 +70,9 @@ int GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
  * @param client identification of the client
  * @param message the actual message
  */
-void GNUNET_FS_handle_index_start (void *cls,
-                                   struct GNUNET_SERVER_Client *client,
-                                   const struct GNUNET_MessageHeader *message);
+void
+GNUNET_FS_handle_index_start (void *cls, struct GNUNET_SERVER_Client *client,
+                              const struct GNUNET_MessageHeader *message);
 
 
 /**
@@ -82,10 +82,9 @@ void GNUNET_FS_handle_index_start (void *cls,
  * @param client identification of the client
  * @param message the actual message
  */
-void GNUNET_FS_handle_index_list_get (void *cls,
-                                      struct GNUNET_SERVER_Client *client,
-                                      const struct GNUNET_MessageHeader
-                                      *message);
+void
+GNUNET_FS_handle_index_list_get (void *cls, struct GNUNET_SERVER_Client *client,
+                                 const struct GNUNET_MessageHeader *message);
 
 
 /**
@@ -95,8 +94,9 @@ void GNUNET_FS_handle_index_list_get (void *cls,
  * @param client identification of the client
  * @param message the actual message
  */
-void GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
-                               const struct GNUNET_MessageHeader *message);
+void
+GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
+                          const struct GNUNET_MessageHeader *message);
 
 
 /**
@@ -106,14 +106,16 @@ void GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
  * @param d datastore to use
  * @return GNUNET_OK on success
  */
-int GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
-                             struct GNUNET_DATASTORE_Handle *d);
+int
+GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
+                         struct GNUNET_DATASTORE_Handle *d);
 
 
 /**
  * Shutdown the module.
  */
-void GNUNET_FS_indexing_done (void);
+void
+GNUNET_FS_indexing_done (void);
 
 
 #endif

+ 11 - 12
src/fs/gnunet-service-fs_lc.h

@@ -36,8 +36,8 @@
  * @param client handle of the client
  * @return handle to local client entry
  */
-struct GSF_LocalClient *GSF_local_client_lookup_ (struct GNUNET_SERVER_Client
-                                                  *client);
+struct GSF_LocalClient *
+GSF_local_client_lookup_ (struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -50,12 +50,10 @@ struct GSF_LocalClient *GSF_local_client_lookup_ (struct GNUNET_SERVER_Client
  * @param message the actual message
  * @return pending request handle for the request, NULL on error
  */
-struct GSF_PendingRequest *GSF_local_client_start_search_handler_ (struct
-                                                                   GNUNET_SERVER_Client
-                                                                   *client,
-                                                                   const struct
-                                                                   GNUNET_MessageHeader
-                                                                   *message);
+struct GSF_PendingRequest *
+GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
+                                        const struct GNUNET_MessageHeader
+                                        *message);
 
 
 /**
@@ -66,8 +64,9 @@ struct GSF_PendingRequest *GSF_local_client_start_search_handler_ (struct
  * @param lc recipient
  * @param msg message to transmit to client
  */
-void GSF_local_client_transmit_ (struct GSF_LocalClient *lc,
-                                 const struct GNUNET_MessageHeader *msg);
+void
+GSF_local_client_transmit_ (struct GSF_LocalClient *lc,
+                            const struct GNUNET_MessageHeader *msg);
 
 
 /**
@@ -76,8 +75,8 @@ void GSF_local_client_transmit_ (struct GSF_LocalClient *lc,
  * @param cls unused
  * @param client handle of the client
  */
-void GSF_client_disconnect_handler_ (void *cls,
-                                     struct GNUNET_SERVER_Client *client);
+void
+GSF_client_disconnect_handler_ (void *cls, struct GNUNET_SERVER_Client *client);
 
 
 #endif

+ 10 - 10
src/fs/gnunet-service-fs_pe.c

@@ -207,9 +207,9 @@ static unsigned long long plan_count;
  * @param cls the 'struct GSF_ConnectedPeer' for transmission
  * @param tc scheduler context
  */
-static void schedule_peer_transmission (void *cls,
-                                        const struct
-                                        GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_peer_transmission (void *cls,
+                            const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -243,8 +243,8 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp)
 #endif
 
   GNUNET_assert (rp->hn == NULL);
-  if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
-      rel_value == 0)
+  if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).rel_value
+      == 0)
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, rp->priority);
   else
     rp->hn =
@@ -359,8 +359,8 @@ schedule_peer_transmission (void *cls,
   }
   /* move ready requests to priority queue */
   while ((NULL != (rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap))) &&
-         (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
-          rel_value == 0))
+         (GNUNET_TIME_absolute_get_remaining
+          (rp->earliest_transmission).rel_value == 0))
   {
     GNUNET_assert (rp == GNUNET_CONTAINER_heap_remove_root (pp->delay_heap));
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, rp->priority);
@@ -380,9 +380,9 @@ schedule_peer_transmission (void *cls,
 #if DEBUG_FS
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Sleeping for %llu ms before retrying requests on plan %p.\n",
-                (unsigned long long) GNUNET_TIME_absolute_get_remaining (rp->
-                                                                         earliest_transmission).
-                rel_value, pp);
+                (unsigned long long)
+                GNUNET_TIME_absolute_get_remaining
+                (rp->earliest_transmission).rel_value, pp);
 #endif
     pp->task =
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining

+ 10 - 6
src/fs/gnunet-service-fs_pe.h

@@ -35,8 +35,8 @@
  * @param cp peer with the entry
  * @param pr request with the entry
  */
-void GSF_plan_add_ (struct GSF_ConnectedPeer *cp,
-                    struct GSF_PendingRequest *pr);
+void
+GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr);
 
 
 /**
@@ -45,7 +45,8 @@ void GSF_plan_add_ (struct GSF_ConnectedPeer *cp,
  *
  * @param cp connected peer 
  */
-void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
+void
+GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
 
 
 /**
@@ -54,19 +55,22 @@ void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
  *
  * @param pr request that is done
  */
-void GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
+void
+GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
 
 
 /**
  * Initialize plan subsystem.
  */
-void GSF_plan_init (void);
+void
+GSF_plan_init (void);
 
 
 /**
  * Shutdown plan subsystem.
  */
-void GSF_plan_done (void);
+void
+GSF_plan_done (void);
 
 
 #endif

+ 22 - 25
src/fs/gnunet-service-fs_pr.c

@@ -817,9 +817,8 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value)
     /* short cut: stop processing early, no BF-update, etc. */
     update_request_performance_data (prq, pr);
     GNUNET_LOAD_update (GSF_rt_entry_lifetime,
-                        GNUNET_TIME_absolute_get_duration (pr->public_data.
-                                                           start_time).
-                        rel_value);
+                        GNUNET_TIME_absolute_get_duration (pr->
+                                                           public_data.start_time).rel_value);
     /* pass on to other peers / local clients */
     pr->rh (pr->rh_cls, prq->eval, pr, prq->anonymity_level, prq->expiration,
             prq->type, prq->data, prq->size);
@@ -1101,9 +1100,8 @@ warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
               _("Datastore lookup already took %llu ms!\n"),
-              (unsigned long long) GNUNET_TIME_absolute_get_duration (pr->
-                                                                      qe_start).
-              rel_value);
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value);
   pr->warn_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &warn_delay_task,
                                     pr);
@@ -1123,9 +1121,8 @@ odc_warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
               _("On-demand lookup already took %llu ms!\n"),
-              (unsigned long long) GNUNET_TIME_absolute_get_duration (pr->
-                                                                      qe_start).
-              rel_value);
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value);
   pr->warn_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
                                     &odc_warn_delay_task, pr);
@@ -1257,12 +1254,12 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
                                   GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                   GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* queue priority */ ,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* max queue size */ ,
                                   GNUNET_TIME_UNIT_FOREVER_REL,
                                   &process_local_reply, pr);
@@ -1298,12 +1295,12 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
                                   GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                   GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* queue priority */ ,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* max queue size */ ,
                                   GNUNET_TIME_UNIT_FOREVER_REL,
                                   &process_local_reply, pr);
@@ -1357,12 +1354,12 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
                                 GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                 GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* queue priority */ ,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* max queue size */ ,
                                 GNUNET_TIME_UNIT_FOREVER_REL,
                                 &process_local_reply, pr);
@@ -1413,12 +1410,12 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr,
                                 GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                 GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* queue priority */ ,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* max queue size */ ,
                                 GNUNET_TIME_UNIT_FOREVER_REL,
                                 &process_local_reply, pr);

+ 41 - 48
src/fs/gnunet-service-fs_pr.h

@@ -201,33 +201,19 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls,
  * @param rh_cls closure for rh
  * @return handle for the new pending request
  */
-struct GSF_PendingRequest *GSF_pending_request_create_ (enum
-                                                        GSF_PendingRequestOptions
-                                                        options,
-                                                        enum GNUNET_BLOCK_Type
-                                                        type,
-                                                        const GNUNET_HashCode *
-                                                        query,
-                                                        const GNUNET_HashCode *
-                                                        namespace,
-                                                        const struct
-                                                        GNUNET_PeerIdentity
-                                                        *target,
-                                                        const char *bf_data,
-                                                        size_t bf_size,
-                                                        uint32_t mingle,
-                                                        uint32_t
-                                                        anonymity_level,
-                                                        uint32_t priority,
-                                                        int32_t ttl,
-                                                        GNUNET_PEER_Id
-                                                        sender_pid,
-                                                        const GNUNET_HashCode *
-                                                        replies_seen,
-                                                        unsigned int
-                                                        replies_seen_count,
-                                                        GSF_PendingRequestReplyHandler
-                                                        rh, void *rh_cls);
+struct GSF_PendingRequest *
+GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
+                             enum GNUNET_BLOCK_Type type,
+                             const GNUNET_HashCode * query,
+                             const GNUNET_HashCode * namespace,
+                             const struct GNUNET_PeerIdentity *target,
+                             const char *bf_data, size_t bf_size,
+                             uint32_t mingle, uint32_t anonymity_level,
+                             uint32_t priority, int32_t ttl,
+                             GNUNET_PEER_Id sender_pid,
+                             const GNUNET_HashCode * replies_seen,
+                             unsigned int replies_seen_count,
+                             GSF_PendingRequestReplyHandler rh, void *rh_cls);
 
 
 /**
@@ -238,9 +224,10 @@ struct GSF_PendingRequest *GSF_pending_request_create_ (enum
  * @param replies_seen hash codes of replies that we've seen
  * @param replies_seen_count size of the replies_seen array
  */
-void GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
-                                  const GNUNET_HashCode * replies_seen,
-                                  unsigned int replies_seen_count);
+void
+GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
+                             const GNUNET_HashCode * replies_seen,
+                             unsigned int replies_seen_count);
 
 
 /**
@@ -249,9 +236,8 @@ void GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
  * @param pr pending request
  * @return associated public data
  */
-struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct
-                                                              GSF_PendingRequest
-                                                              *pr);
+struct GSF_PendingRequestData *
+GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr);
 
 
 /**
@@ -263,8 +249,9 @@ struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct
  * @param pra another pending request
  * @return GNUNET_OK if the requests are compatible
  */
-int GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
-                                        struct GSF_PendingRequest *prb);
+int
+GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
+                                    struct GSF_PendingRequest *prb);
 
 
 /**
@@ -276,9 +263,9 @@ int GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
  * @param buf where to copy the message (can be NULL)
  * @return number of bytes needed (if buf_size too small) or used
  */
-size_t             GSF_pending_request_get_message_ (struct GSF_PendingRequest
-                                                     *pr, size_t buf_size,
-                                                     void *buf);
+size_t
+GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
+                                  size_t buf_size, void *buf);
 
 
 /**
@@ -287,8 +274,8 @@ size_t             GSF_pending_request_get_message_ (struct GSF_PendingRequest
  * @param pr request to cancel
  * @param full_cleanup fully purge the request
  */
-void GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr,
-                                  int full_cleanup);
+void
+GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup);
 
 
 /**
@@ -311,7 +298,8 @@ typedef int (*GSF_PendingRequestIterator) (void *cls,
  * @param it function to call for each request
  * @param cls closure for it
  */
-void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
+void
+GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
 
 
 /**
@@ -327,8 +315,9 @@ void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
  *         GNUNET_SYSERR if the message was malformed (close connection,
  *         do not cache under any circumstances)
  */
-int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
-                             const struct GNUNET_MessageHeader *message);
+int
+GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
+                         const struct GNUNET_MessageHeader *message);
 
 
 /**
@@ -336,7 +325,8 @@ int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
  *
  * @param pr the pending request to process
  */
-void GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
+void
+GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
 
 
 /**
@@ -360,20 +350,23 @@ typedef void (*GSF_LocalLookupContinuation) (void *cls,
  * @param cont function to call at the end
  * @param cont_cls closure for cont
  */
-void GSF_local_lookup_ (struct GSF_PendingRequest *pr,
-                        GSF_LocalLookupContinuation cont, void *cont_cls);
+void
+GSF_local_lookup_ (struct GSF_PendingRequest *pr,
+                   GSF_LocalLookupContinuation cont, void *cont_cls);
 
 
 /**
  * Setup the subsystem.
  */
-void GSF_pending_request_init_ (void);
+void
+GSF_pending_request_init_ (void);
 
 
 /**
  * Shutdown the subsystem.
  */
-void GSF_pending_request_done_ (void);
+void
+GSF_pending_request_done_ (void);
 
 
 #endif

+ 7 - 5
src/fs/gnunet-service-fs_push.c

@@ -191,7 +191,8 @@ delete_migration_block (struct MigrationReadyBlock *mb)
 /**
  * Find content for migration to this peer.
  */
-static void find_content (struct MigrationReadyPeer *mrp);
+static void
+find_content (struct MigrationReadyPeer *mrp);
 
 
 /**
@@ -343,7 +344,8 @@ score_content (struct MigrationReadyPeer *peer,
  * If the migration task is not currently running, consider
  * (re)scheduling it with the appropriate delay.
  */
-static void consider_gathering (void);
+static void
+consider_gathering (void);
 
 
 /**
@@ -421,9 +423,9 @@ find_content (struct MigrationReadyPeer *mrp)
  * @param cls unused
  * @param tc scheduler context (also unused)
  */
-static void gather_migration_blocks (void *cls,
-                                     const struct GNUNET_SCHEDULER_TaskContext
-                                     *tc);
+static void
+gather_migration_blocks (void *cls,
+                         const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**

+ 8 - 4
src/fs/gnunet-service-fs_push.h

@@ -32,13 +32,15 @@
 /**
  * Setup the module.
  */
-void GSF_push_init_ (void);
+void
+GSF_push_init_ (void);
 
 
 /**
  * Shutdown the module.
  */
-void GSF_push_done_ (void);
+void
+GSF_push_done_ (void);
 
 
 /**
@@ -47,7 +49,8 @@ void GSF_push_done_ (void);
  *
  * @param peer handle for the peer that connected
  */
-void GSF_push_start_ (struct GSF_ConnectedPeer *peer);
+void
+GSF_push_start_ (struct GSF_ConnectedPeer *peer);
 
 
 /**
@@ -56,7 +59,8 @@ void GSF_push_start_ (struct GSF_ConnectedPeer *peer);
  *
  * @param peer handle for the peer that disconnected
  */
-void GSF_push_stop_ (struct GSF_ConnectedPeer *peer);
+void
+GSF_push_stop_ (struct GSF_ConnectedPeer *peer);
 
 
 #endif

+ 3 - 3
src/fs/gnunet-service-fs_put.c

@@ -86,9 +86,9 @@ static struct PutOperator operators[] = {
  * @param cls type of blocks to gather
  * @param tc scheduler context (unused)
  */
-static void gather_dht_put_blocks (void *cls,
-                                   const struct GNUNET_SCHEDULER_TaskContext
-                                   *tc);
+static void
+gather_dht_put_blocks (void *cls,
+                       const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**

+ 4 - 2
src/fs/gnunet-service-fs_put.h

@@ -32,13 +32,15 @@
 /**
  * Setup the module.
  */
-void GSF_put_init_ (void);
+void
+GSF_put_init_ (void);
 
 
 /**
  * Shutdown the module.
  */
-void GSF_put_done_ (void);
+void
+GSF_put_done_ (void);
 
 
 #endif

+ 3 - 3
src/fs/perf_gnunet_service_fs_p2p.c

@@ -129,7 +129,8 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
 /**
  * Function that gathers stats from all daemons.
  */
-static void stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -206,8 +207,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     sm->stat =
         GNUNET_STATISTICS_create ("<driver>",
                                   GNUNET_FS_TEST_get_configuration (daemons,
-                                                                    sm->
-                                                                    daemon));
+                                                                    sm->daemon));
     GNUNET_SCHEDULER_add_now (&stat_run, sm);
   }
   else

+ 3 - 3
src/fs/perf_gnunet_service_fs_p2p_trust.c

@@ -162,7 +162,8 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
 /**
  * Function that gathers stats from all daemons.
  */
-static void stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -244,8 +245,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     sm->stat =
         GNUNET_STATISTICS_create ("<driver>",
                                   GNUNET_FS_TEST_get_configuration (daemons,
-                                                                    sm->
-                                                                    daemon));
+                                                                    sm->daemon));
     GNUNET_SCHEDULER_add_now (&stat_run, sm);
   }
   else

+ 16 - 16
src/fs/test_fs_download.c

@@ -140,42 +140,42 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kb/s.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Publishing speed (insertion)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     download =
         GNUNET_FS_download_start (fs,
-                                  event->value.publish.specifics.completed.
-                                  chk_uri, NULL, fn, NULL, 0, FILESIZE, 1,
-                                  GNUNET_FS_DOWNLOAD_OPTION_NONE, "download",
-                                  NULL);
+                                  event->value.publish.specifics.
+                                  completed.chk_uri, NULL, fn, NULL, 0,
+                                  FILESIZE, 1, GNUNET_FS_DOWNLOAD_OPTION_NONE,
+                                  "download", NULL);
     GNUNET_assert (download != NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     printf ("Download complete,  %llu kb/s.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Local download speed (inserted)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -185,8 +185,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.download.completed,
             (unsigned long long) event->value.download.size,
             event->value.download.specifics.progress.depth,
-            (unsigned long long) event->value.download.specifics.progress.
-            offset);
+            (unsigned long long) event->value.download.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:

+ 16 - 16
src/fs/test_fs_download_indexed.c

@@ -141,42 +141,42 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Publishing speed (indexing)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     download =
         GNUNET_FS_download_start (fs,
-                                  event->value.publish.specifics.completed.
-                                  chk_uri, NULL, fn, NULL, 0, FILESIZE, 1,
-                                  GNUNET_FS_DOWNLOAD_OPTION_NONE, "download",
-                                  NULL);
+                                  event->value.publish.specifics.
+                                  completed.chk_uri, NULL, fn, NULL, 0,
+                                  FILESIZE, 1, GNUNET_FS_DOWNLOAD_OPTION_NONE,
+                                  "download", NULL);
     GNUNET_assert (download != NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     printf ("Download complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Local download speed (indexed)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -186,8 +186,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.download.completed,
             (unsigned long long) event->value.download.size,
             event->value.download.specifics.progress.depth,
-            (unsigned long long) event->value.download.specifics.progress.
-            offset);
+            (unsigned long long) event->value.download.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:

+ 10 - 10
src/fs/test_fs_download_persistence.c

@@ -123,8 +123,8 @@ abort_download_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -171,16 +171,16 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     GNUNET_assert (download == NULL);
@@ -194,8 +194,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Download complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -206,8 +206,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.download.completed,
             (unsigned long long) event->value.download.size,
             event->value.download.specifics.progress.depth,
-            (unsigned long long) event->value.download.specifics.progress.
-            offset);
+            (unsigned long long) event->value.download.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:

+ 4 - 4
src/fs/test_fs_list_indexed.c

@@ -110,8 +110,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Publish complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     if (0 == strcmp ("list_indexed-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_continuation (&list_indexed_task, NULL,
                                          GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -125,8 +125,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:

+ 4 - 4
src/fs/test_fs_publish.c

@@ -98,8 +98,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Publish complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                          GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -112,8 +112,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:

+ 9 - 8
src/fs/test_fs_publish_persistence.c

@@ -97,8 +97,8 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -149,8 +149,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Publish complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL);
     break;
@@ -163,8 +163,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
@@ -175,8 +175,9 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     if (NULL == publish)
     {
       GNUNET_assert (GNUNET_YES ==
-                     GNUNET_FS_file_information_is_directory (event->value.
-                                                              publish.fi));
+                     GNUNET_FS_file_information_is_directory (event->
+                                                              value.publish.
+                                                              fi));
       publish = event->value.publish.pc;
       return "publish-context-dir";
     }

+ 2 - 2
src/fs/test_fs_search.c

@@ -101,8 +101,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:

+ 4 - 4
src/fs/test_fs_search_persistence.c

@@ -86,8 +86,8 @@ abort_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -140,8 +140,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:

+ 8 - 8
src/fs/test_fs_unindex.c

@@ -100,16 +100,16 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     start = GNUNET_TIME_absolute_get ();
     unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
     GNUNET_assert (unindex != NULL);
@@ -118,8 +118,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Unindex complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
@@ -130,8 +130,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.unindex.completed,
             (unsigned long long) event->value.unindex.size,
             event->value.unindex.specifics.progress.depth,
-            (unsigned long long) event->value.unindex.specifics.progress.
-            offset);
+            (unsigned long long) event->value.unindex.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:

+ 10 - 10
src/fs/test_fs_unindex_persistence.c

@@ -94,8 +94,8 @@ abort_unindex_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -141,16 +141,16 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     start = GNUNET_TIME_absolute_get ();
     unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
     GNUNET_assert (unindex != NULL);
@@ -159,8 +159,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Unindex complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
@@ -172,8 +172,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.unindex.completed,
             (unsigned long long) event->value.unindex.size,
             event->value.unindex.specifics.progress.depth,
-            (unsigned long long) event->value.unindex.specifics.progress.
-            offset);
+            (unsigned long long) event->value.unindex.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_SUSPEND:

+ 4 - 3
src/hostlist/hostlist-client.c

@@ -476,7 +476,8 @@ download_get_url ()
  * Method to save hostlist to a file during hostlist client shutdown
  * @param shutdown set if called because of shutdown, entries in linked list will be destroyed
  */
-static void save_hostlist_file (int shutdown);
+static void
+save_hostlist_file (int shutdown);
 
 
 /**
@@ -708,8 +709,8 @@ clean_up ()
  * @param cls closure, unused
  * @param tc task context, unused
  */
-static void task_download (void *cls,
-                           const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+task_download (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**

+ 8 - 6
src/hostlist/hostlist-client.h

@@ -89,17 +89,19 @@
  * @param learn set if client is learning new hostlists
  * @return GNUNET_OK on success
  */
-int GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
-                                  struct GNUNET_STATISTICS_Handle *st,
-                                  GNUNET_CORE_ConnectEventHandler *ch,
-                                  GNUNET_CORE_DisconnectEventHandler *dh,
-                                  GNUNET_CORE_MessageCallback *msgh, int learn);
+int
+GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
+                              struct GNUNET_STATISTICS_Handle *st,
+                              GNUNET_CORE_ConnectEventHandler *ch,
+                              GNUNET_CORE_DisconnectEventHandler *dh,
+                              GNUNET_CORE_MessageCallback *msgh, int learn);
 
 
 /**
  * Stop downloading hostlists from hostlist servers as necessary.
  */
-void GNUNET_HOSTLIST_client_stop (void);
+void
+GNUNET_HOSTLIST_client_stop (void);
 
 
 #endif

+ 2 - 2
src/hostlist/hostlist-server.c

@@ -448,8 +448,8 @@ process_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
  * Function that queries MHD's select sets and
  * starts the task waiting for them.
  */
-static GNUNET_SCHEDULER_TaskIdentifier prepare_daemon (struct MHD_Daemon
-                                                       *daemon_handle);
+static GNUNET_SCHEDULER_TaskIdentifier
+prepare_daemon (struct MHD_Daemon *daemon_handle);
 
 
 /**

+ 9 - 7
src/hostlist/hostlist-server.h

@@ -38,18 +38,20 @@
  *
  * @return GNUNET_OK on success
  */
-int GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
-                                  struct GNUNET_STATISTICS_Handle *st,
-                                  struct GNUNET_CORE_Handle *core,
-                                  GNUNET_CORE_ConnectEventHandler *server_ch,
-                                  GNUNET_CORE_DisconnectEventHandler *server_dh,
-                                  int advertise);
+int
+GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
+                              struct GNUNET_STATISTICS_Handle *st,
+                              struct GNUNET_CORE_Handle *core,
+                              GNUNET_CORE_ConnectEventHandler *server_ch,
+                              GNUNET_CORE_DisconnectEventHandler *server_dh,
+                              int advertise);
 
 
 /**
  * Stop server offering our hostlist.
  */
-void GNUNET_HOSTLIST_server_stop (void);
+void
+GNUNET_HOSTLIST_server_stop (void);
 
 
 #endif

+ 13 - 12
src/include/gnunet_arm_service.h

@@ -73,9 +73,9 @@ struct GNUNET_ARM_Handle;
  * @param service service that *this* process is implementing/providing, can be NULL
  * @return context to use for further ARM operations, NULL on error
  */
-struct GNUNET_ARM_Handle *GNUNET_ARM_connect (const struct
-                                              GNUNET_CONFIGURATION_Handle *cfg,
-                                              const char *service);
+struct GNUNET_ARM_Handle *
+GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                    const char *service);
 
 
 /**
@@ -83,7 +83,8 @@ struct GNUNET_ARM_Handle *GNUNET_ARM_connect (const struct
  *
  * @param h the handle that was being used
  */
-void GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
+void
+GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
 
 
 /**
@@ -104,10 +105,10 @@ void GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
  * @param cb callback to invoke when service is ready
  * @param cb_cls closure for callback
  */
-void GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
-                               const char *service_name,
-                               struct GNUNET_TIME_Relative timeout,
-                               GNUNET_ARM_Callback cb, void *cb_cls);
+void
+GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h, const char *service_name,
+                          struct GNUNET_TIME_Relative timeout,
+                          GNUNET_ARM_Callback cb, void *cb_cls);
 
 
 /**
@@ -121,10 +122,10 @@ void GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
  * @param cb callback to invoke when service is ready
  * @param cb_cls closure for callback
  */
-void GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h,
-                              const char *service_name,
-                              struct GNUNET_TIME_Relative timeout,
-                              GNUNET_ARM_Callback cb, void *cb_cls);
+void
+GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h, const char *service_name,
+                         struct GNUNET_TIME_Relative timeout,
+                         GNUNET_ARM_Callback cb, void *cb_cls);
 
 
 

+ 35 - 35
src/include/gnunet_ats_service.h

@@ -83,10 +83,10 @@ typedef void (*GNUNET_TRANSPORT_ATS_AllocationNotification) (void *cls,
  * @param alloc_cb_cls closure for 'alloc_cb'
  * @return ats context
  */
-struct GNUNET_ATS_Handle *GNUNET_ATS_init (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           GNUNET_TRANSPORT_ATS_AllocationNotification
-                                           alloc_cb, void *alloc_cb_cls);
+struct GNUNET_ATS_Handle *
+GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                 GNUNET_TRANSPORT_ATS_AllocationNotification alloc_cb,
+                 void *alloc_cb_cls);
 
 
 /**
@@ -94,7 +94,8 @@ struct GNUNET_ATS_Handle *GNUNET_ATS_init (const struct
  *
  * @param atc handle
  */
-void GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
+void
+GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
 
 
 /**
@@ -140,15 +141,11 @@ struct GNUNET_ATS_SuggestionContext;
  * @param cb function to call with the address
  * @param cb_cls closure for cb
  */
-struct GNUNET_ATS_SuggestionContext *GNUNET_ATS_suggest_address (struct
-                                                                 GNUNET_ATS_Handle
-                                                                 *atc,
-                                                                 const struct
-                                                                 GNUNET_PeerIdentity
-                                                                 *peer,
-                                                                 GNUNET_ATS_AddressSuggestionCallback
-                                                                 cb,
-                                                                 void *cb_cls);
+struct GNUNET_ATS_SuggestionContext *
+GNUNET_ATS_suggest_address (struct GNUNET_ATS_Handle *atc,
+                            const struct GNUNET_PeerIdentity *peer,
+                            GNUNET_ATS_AddressSuggestionCallback cb,
+                            void *cb_cls);
 
 
 /**
@@ -156,8 +153,8 @@ struct GNUNET_ATS_SuggestionContext *GNUNET_ATS_suggest_address (struct
  *
  * @param asc handle of the request to cancel
  */
-void GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext
-                                        *asc);
+void
+GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext *asc);
 
 
 /**
@@ -174,12 +171,13 @@ void GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext
  * @param ats performance data for the connection
  * @param ats_count number of performance records in 'ats'
  */
-void GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
-                              const struct GNUNET_PeerIdentity *peer,
-                              const char *plugin_name, struct Session *session,
-                              const void *plugin_addr, size_t plugin_addr_len,
-                              const struct GNUNET_TRANSPORT_ATS_Information
-                              *ats, uint32_t ats_count);
+void
+GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
+                         const struct GNUNET_PeerIdentity *peer,
+                         const char *plugin_name, struct Session *session,
+                         const void *plugin_addr, size_t plugin_addr_len,
+                         const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                         uint32_t ats_count);
 
 
 /**
@@ -190,8 +188,9 @@ void GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
  * @param atc handle
  * @param peer identity of the peer
  */
-void GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc,
-                                 const struct GNUNET_PeerIdentity *peer);
+void
+GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc,
+                            const struct GNUNET_PeerIdentity *peer);
 
 
 /**
@@ -201,9 +200,10 @@ void GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc,
  * @param peer identity of the peer
  * @param session session handle that is no longer valid
  */
-void GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc,
-                                   const struct GNUNET_PeerIdentity *peer,
-                                   const struct Session *session);
+void
+GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc,
+                              const struct GNUNET_PeerIdentity *peer,
+                              const struct Session *session);
 
 
 /**
@@ -224,14 +224,14 @@ void GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc,
  * @param ats performance data for the address
  * @param ats_count number of performance records in 'ats'
  */
-void GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc,
-                                const struct GNUNET_PeerIdentity *peer,
-                                struct GNUNET_TIME_Absolute valid_until,
-                                const char *plugin_name,
-                                struct Session *session,
-                                const void *plugin_addr, size_t plugin_addr_len,
-                                const struct GNUNET_TRANSPORT_ATS_Information
-                                *ats, uint32_t ats_count);
+void
+GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc,
+                           const struct GNUNET_PeerIdentity *peer,
+                           struct GNUNET_TIME_Absolute valid_until,
+                           const char *plugin_name, struct Session *session,
+                           const void *plugin_addr, size_t plugin_addr_len,
+                           const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                           uint32_t ats_count);
 
 
 #endif

+ 29 - 35
src/include/gnunet_bandwidth_lib.h

@@ -89,8 +89,8 @@ struct GNUNET_BANDWIDTH_Tracker
  * @param bytes_per_second value to create
  * @return the new bandwidth value
  */
-struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init (uint32_t
-                                                                bytes_per_second);
+struct GNUNET_BANDWIDTH_Value32NBO
+GNUNET_BANDWIDTH_value_init (uint32_t bytes_per_second);
 
 
 /**
@@ -107,12 +107,11 @@ struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init (uint32_t
  * @param deadline when is the deadline
  * @return number of bytes available at bps until deadline
  */
-uint64_t                    GNUNET_BANDWIDTH_value_get_available_until (struct
-                                                                        GNUNET_BANDWIDTH_Value32NBO
-                                                                        bps,
-                                                                        struct
-                                                                        GNUNET_TIME_Relative
-                                                                        deadline);
+uint64_t
+GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO
+                                            bps,
+                                            struct GNUNET_TIME_Relative
+                                            deadline);
 
 
 /**
@@ -123,11 +122,9 @@ uint64_t                    GNUNET_BANDWIDTH_value_get_available_until (struct
  * @param size number of bytes we want to have available
  * @return how long it would take
  */
-struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_value_get_delay_for (struct
-                                                                  GNUNET_BANDWIDTH_Value32NBO
-                                                                  bps,
-                                                                  uint64_t
-                                                                  size);
+struct GNUNET_TIME_Relative
+GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps,
+                                      uint64_t size);
 
 
 
@@ -138,12 +135,9 @@ struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_value_get_delay_for (struct
  * @param b2 second value
  * @return the min of b1 and b2
  */
-struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_min (struct
-                                                               GNUNET_BANDWIDTH_Value32NBO
-                                                               b1,
-                                                               struct
-                                                               GNUNET_BANDWIDTH_Value32NBO
-                                                               b2);
+struct GNUNET_BANDWIDTH_Value32NBO
+GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1,
+                            struct GNUNET_BANDWIDTH_Value32NBO b2);
 
 
 /**
@@ -160,10 +154,10 @@ struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_min (struct
  * @param max_carry_s maximum number of seconds unused bandwidth
  *        may accumulate before it expires
  */
-void GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
-                                    struct GNUNET_BANDWIDTH_Value32NBO
-                                    bytes_per_second_limit,
-                                    uint32_t max_carry_s);
+void
+GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
+                               struct GNUNET_BANDWIDTH_Value32NBO
+                               bytes_per_second_limit, uint32_t max_carry_s);
 
 
 /**
@@ -177,8 +171,9 @@ void GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
  * @param size number of bytes consumed
  * @return GNUNET_YES if this consumption is above the limit
  */
-int GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
-                                      ssize_t size);
+int
+GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
+                                  ssize_t size);
 
 
 /**
@@ -190,10 +185,9 @@ int GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
  * @param size number of bytes we would like to consume
  * @return time to wait for consumption to be OK
  */
-struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_tracker_get_delay (struct
-                                                                GNUNET_BANDWIDTH_Tracker
-                                                                *av,
-                                                                size_t size);
+struct GNUNET_TIME_Relative
+GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av,
+                                    size_t size);
 
 
 /**
@@ -203,9 +197,8 @@ struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_tracker_get_delay (struct
  * @param av tracker to query
  * @return number of bytes available for consumption right now
  */
-int64_t                  GNUNET_BANDWIDTH_tracker_get_available (struct
-                                                                 GNUNET_BANDWIDTH_Tracker
-                                                                 *av);
+int64_t
+GNUNET_BANDWIDTH_tracker_get_available (struct GNUNET_BANDWIDTH_Tracker *av);
 
 
 /**
@@ -214,9 +207,10 @@ int64_t                  GNUNET_BANDWIDTH_tracker_get_available (struct
  * @param av tracker to initialize
  * @param bytes_per_second_limit new limit to assume
  */
-void GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker *av,
-                                            struct GNUNET_BANDWIDTH_Value32NBO
-                                            bytes_per_second_limit);
+void
+GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker *av,
+                                       struct GNUNET_BANDWIDTH_Value32NBO
+                                       bytes_per_second_limit);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 38 - 24
src/include/gnunet_bio_lib.h

@@ -49,7 +49,8 @@ struct GNUNET_BIO_ReadHandle;
  * @param fn file name to be opened
  * @return IO handle on success, NULL on error
  */
-struct GNUNET_BIO_ReadHandle *GNUNET_BIO_read_open (const char *fn);
+struct GNUNET_BIO_ReadHandle *
+GNUNET_BIO_read_open (const char *fn);
 
 
 /**
@@ -60,7 +61,8 @@ struct GNUNET_BIO_ReadHandle *GNUNET_BIO_read_open (const char *fn);
  * @param emsg set to the error message
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
+int
+GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
 
 
 /**
@@ -72,8 +74,9 @@ int GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
  * @param len the number of bytes to read
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
-                     void *result, size_t len);
+int
+GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
+                 void *result, size_t len);
 
 
 /**
@@ -86,8 +89,9 @@ int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
  * @param len the number of bytes to read
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file,
-                        int line, void *result, size_t len);
+int
+GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file, int line,
+                    void *result, size_t len);
 
 /**
  * Read 0-terminated string from a file.
@@ -99,8 +103,9 @@ int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file,
  * @param maxLen maximum allowed length for the string
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
-                            char **result, size_t maxLen);
+int
+GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
+                        char **result, size_t maxLen);
 
 
 /**
@@ -111,9 +116,9 @@ int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
  * @param result the buffer to store a pointer to the (allocated) metadata
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
-                               const char *what,
-                               struct GNUNET_CONTAINER_MetaData **result);
+int
+GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
+                           struct GNUNET_CONTAINER_MetaData **result);
 
 
 /**
@@ -144,8 +149,9 @@ int GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
  * @param i address of 32-bit integer to read
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
-                             int line, int32_t * i);
+int
+GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
+                         int line, int32_t * i);
 
 
 /**
@@ -166,8 +172,9 @@ int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
  * @param i address of 64-bit integer to read
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
-                             int line, int64_t * i);
+int
+GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
+                         int line, int64_t * i);
 
 
 /**
@@ -190,7 +197,8 @@ struct GNUNET_BIO_WriteHandle;
  * @param fn file name to be opened
  * @return IO handle on success, NULL on error
  */
-struct GNUNET_BIO_WriteHandle *GNUNET_BIO_write_open (const char *fn);
+struct GNUNET_BIO_WriteHandle *
+GNUNET_BIO_write_open (const char *fn);
 
 
 /**
@@ -199,7 +207,8 @@ struct GNUNET_BIO_WriteHandle *GNUNET_BIO_write_open (const char *fn);
  * @param h file handle
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
+int
+GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
 
 
 /**
@@ -210,8 +219,9 @@ int GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
  * @param n number of bytes to write
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
-                      size_t n);
+int
+GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
+                  size_t n);
 
 
 /**
@@ -221,7 +231,8 @@ int GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
  * @param s string to write (can be NULL)
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
+int
+GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
 
 
 
@@ -233,8 +244,9 @@ int GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
  * @param m metadata to write
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
-                                const struct GNUNET_CONTAINER_MetaData *m);
+int
+GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
+                            const struct GNUNET_CONTAINER_MetaData *m);
 
 
 
@@ -264,7 +276,8 @@ int GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
  * @param i address of 32-bit integer to write
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
+int
+GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
 
 
 /**
@@ -274,7 +287,8 @@ int GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
  * @param i address of 64-bit integer to write
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
+int
+GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 19 - 26
src/include/gnunet_block_lib.h

@@ -161,8 +161,9 @@ struct GNUNET_BLOCK_Context;
  * @param mingle_number number for hash permutation
  * @param hc where to store the result.
  */
-void GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in,
-                               uint32_t mingle_number, GNUNET_HashCode * hc);
+void
+GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, uint32_t mingle_number,
+                          GNUNET_HashCode * hc);
 
 
 /**
@@ -171,9 +172,8 @@ void GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in,
  * @param cfg configuration to use
  * @return NULL on error
  */
-struct GNUNET_BLOCK_Context *GNUNET_BLOCK_context_create (const struct
-                                                          GNUNET_CONFIGURATION_Handle
-                                                          *cfg);
+struct GNUNET_BLOCK_Context *
+GNUNET_BLOCK_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -181,7 +181,8 @@ struct GNUNET_BLOCK_Context *GNUNET_BLOCK_context_create (const struct
  *
  * @param ctx context to destroy
  */
-void GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
+void
+GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
 
 
 /**
@@ -202,23 +203,14 @@ void GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
  * @param reply_block_size number of bytes in reply block
  * @return characterization of result
  */
-enum GNUNET_BLOCK_EvaluationResult GNUNET_BLOCK_evaluate (struct
-                                                          GNUNET_BLOCK_Context
-                                                          *ctx,
-                                                          enum GNUNET_BLOCK_Type
-                                                          type,
-                                                          const GNUNET_HashCode
-                                                          * query,
-                                                          struct
-                                                          GNUNET_CONTAINER_BloomFilter
-                                                          **bf,
-                                                          int32_t bf_mutator,
-                                                          const void *xquery,
-                                                          size_t xquery_size,
-                                                          const void
-                                                          *reply_block,
-                                                          size_t
-                                                          reply_block_size);
+enum GNUNET_BLOCK_EvaluationResult
+GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
+                       enum GNUNET_BLOCK_Type type,
+                       const GNUNET_HashCode * query,
+                       struct GNUNET_CONTAINER_BloomFilter **bf,
+                       int32_t bf_mutator, const void *xquery,
+                       size_t xquery_size, const void *reply_block,
+                       size_t reply_block_size);
 
 
 /**
@@ -234,9 +226,10 @@ enum GNUNET_BLOCK_EvaluationResult GNUNET_BLOCK_evaluate (struct
  *         GNUNET_SYSERR if type not supported
  *         (or if extracting a key from a block of this type does not work)
  */
-int GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
-                          enum GNUNET_BLOCK_Type type, const void *block,
-                          size_t block_size, GNUNET_HashCode * key);
+int
+GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
+                      enum GNUNET_BLOCK_Type type, const void *block,
+                      size_t block_size, GNUNET_HashCode * key);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 24 - 30
src/include/gnunet_chat_service.h

@@ -183,26 +183,19 @@ typedef int (*GNUNET_CHAT_MessageConfirmation) (void *cls,
  * @param me member ID (pseudonym)
  * @return NULL on error
  */
-struct GNUNET_CHAT_Room *GNUNET_CHAT_join_room (const struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, const char *nick_name,
-                                                struct GNUNET_CONTAINER_MetaData
-                                                *member_info,
-                                                const char *room_name,
-                                                enum GNUNET_CHAT_MsgOptions
-                                                msg_options,
-                                                GNUNET_CHAT_JoinCallback
-                                                joinCallback, void *join_cls,
-                                                GNUNET_CHAT_MessageCallback
-                                                messageCallback,
-                                                void *message_cls,
-                                                GNUNET_CHAT_MemberListCallback
-                                                memberCallback,
-                                                void *member_cls,
-                                                GNUNET_CHAT_MessageConfirmation
-                                                confirmationCallback,
-                                                void *confirmation_cls,
-                                                GNUNET_HashCode * me);
+struct GNUNET_CHAT_Room *
+GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                       const char *nick_name,
+                       struct GNUNET_CONTAINER_MetaData *member_info,
+                       const char *room_name,
+                       enum GNUNET_CHAT_MsgOptions msg_options,
+                       GNUNET_CHAT_JoinCallback joinCallback, void *join_cls,
+                       GNUNET_CHAT_MessageCallback messageCallback,
+                       void *message_cls,
+                       GNUNET_CHAT_MemberListCallback memberCallback,
+                       void *member_cls,
+                       GNUNET_CHAT_MessageConfirmation confirmationCallback,
+                       void *confirmation_cls, GNUNET_HashCode * me);
 
 /**
  * Send a message.
@@ -213,18 +206,18 @@ struct GNUNET_CHAT_Room *GNUNET_CHAT_join_room (const struct
  * @param receiver use NULL to send to everyone in the room
  * @param sequence_number where to write the sequence id of the message
  */
-void GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room,
-                               const char *message,
-                               enum GNUNET_CHAT_MsgOptions options,
-                               const struct
-                               GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                               *receiver, uint32_t * sequence_number);
+void
+GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room, const char *message,
+                          enum GNUNET_CHAT_MsgOptions options,
+                          const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                          *receiver, uint32_t * sequence_number);
 
 
 /**
  * Leave a chat room.
  */
-void GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room);
+void
+GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room);
 
 
 #if 0
@@ -241,9 +234,10 @@ typedef int (*GNUNET_CHAT_RoomIterator) (const char *room, const char *topic,
  * List all of the (publically visible) chat rooms.
  * @return number of rooms on success, GNUNET_SYSERR if iterator aborted
  */
-int GNUNET_CHAT_list_rooms (struct GNUNET_GE_Context *ectx,
-                            struct GNUNET_GC_Configuration *cfg,
-                            GNUNET_CHAT_RoomIterator it, void *cls);
+int
+GNUNET_CHAT_list_rooms (struct GNUNET_GE_Context *ectx,
+                        struct GNUNET_GC_Configuration *cfg,
+                        GNUNET_CHAT_RoomIterator it, void *cls);
 #endif
 
 

+ 35 - 42
src/include/gnunet_client_lib.h

@@ -53,11 +53,9 @@ struct GNUNET_CLIENT_Connection;
  * @param cfg configuration to use
  * @return NULL on error (service unknown to configuration)
  */
-struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char
-                                                        *service_name,
-                                                        const struct
-                                                        GNUNET_CONFIGURATION_Handle
-                                                        *cfg);
+struct GNUNET_CLIENT_Connection *
+GNUNET_CLIENT_connect (const char *service_name,
+                       const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -66,8 +64,9 @@ struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char
  * @param h client handle
  * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
  */
-void GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
-                                    int do_ignore);
+void
+GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
+                               int do_ignore);
 
 
 
@@ -86,8 +85,9 @@ void GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
  * @param finish_pending_write should a transmission already passed to the
  *          handle be completed?
  */
-void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
-                               int finish_pending_write);
+void
+GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
+                          int finish_pending_write);
 
 /**
  * Type of a function to call when we receive a message
@@ -120,10 +120,10 @@ typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls, int reason);
  * @param handler_cls closure for handler
  * @param timeout how long to wait until timing out
  */
-void GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
-                            GNUNET_CLIENT_MessageHandler handler,
-                            void *handler_cls,
-                            struct GNUNET_TIME_Relative timeout);
+void
+GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
+                       GNUNET_CLIENT_MessageHandler handler, void *handler_cls,
+                       struct GNUNET_TIME_Relative timeout);
 
 
 /**
@@ -152,20 +152,13 @@ struct GNUNET_CLIENT_TransmitHandle;
  *         non-NULL if the notify callback was queued (can be used to cancel
  *         using GNUNET_CONNECTION_notify_transmit_ready_cancel)
  */
-struct GNUNET_CLIENT_TransmitHandle *GNUNET_CLIENT_notify_transmit_ready (struct
-                                                                          GNUNET_CLIENT_Connection
-                                                                          *sock,
-                                                                          size_t
-                                                                          size,
-                                                                          struct
-                                                                          GNUNET_TIME_Relative
-                                                                          timeout,
-                                                                          int
-                                                                          auto_retry,
-                                                                          GNUNET_CONNECTION_TransmitReadyNotify
-                                                                          notify,
-                                                                          void
-                                                                          *notify_cls);
+struct GNUNET_CLIENT_TransmitHandle *
+GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock,
+                                     size_t size,
+                                     struct GNUNET_TIME_Relative timeout,
+                                     int auto_retry,
+                                     GNUNET_CONNECTION_TransmitReadyNotify
+                                     notify, void *notify_cls);
 
 
 /**
@@ -173,9 +166,9 @@ struct GNUNET_CLIENT_TransmitHandle *GNUNET_CLIENT_notify_transmit_ready (struct
  * 
  * @param th handle from the original request.
  */
-void GNUNET_CLIENT_notify_transmit_ready_cancel (struct
-                                                 GNUNET_CLIENT_TransmitHandle
-                                                 *th);
+void
+GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle
+                                            *th);
 
 
 /**
@@ -199,14 +192,13 @@ void GNUNET_CLIENT_notify_transmit_ready_cancel (struct
  * @return GNUNET_OK on success, GNUNET_SYSERR if a request
  *         is already pending
  */
-int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection
-                                             *sock,
-                                             const struct GNUNET_MessageHeader
-                                             *hdr,
-                                             struct GNUNET_TIME_Relative
-                                             timeout, int auto_retry,
-                                             GNUNET_CLIENT_MessageHandler rn,
-                                             void *rn_cls);
+int
+GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock,
+                                         const struct GNUNET_MessageHeader *hdr,
+                                         struct GNUNET_TIME_Relative timeout,
+                                         int auto_retry,
+                                         GNUNET_CLIENT_MessageHandler rn,
+                                         void *rn_cls);
 
 
 /**
@@ -220,10 +212,11 @@ int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection
  *         or "TIMEOUT" (service not known to be running))
  * @param task_cls closure for task
  */
-void GNUNET_CLIENT_service_test (const char *service,
-                                 const struct GNUNET_CONFIGURATION_Handle *cfg,
-                                 struct GNUNET_TIME_Relative timeout,
-                                 GNUNET_SCHEDULER_Task task, void *task_cls);
+void
+GNUNET_CLIENT_service_test (const char *service,
+                            const struct GNUNET_CONFIGURATION_Handle *cfg,
+                            struct GNUNET_TIME_Relative timeout,
+                            GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 50 - 31
src/include/gnunet_common.h

@@ -168,7 +168,8 @@ typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind,
  * @param message what is the message (format string)
  * @param ... arguments for format string
  */
-void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
+void
+GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
 
 
 
@@ -181,8 +182,9 @@ void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
  * @param message what is the message (format string)
  * @param ... arguments for format string
  */
-void GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
-                      const char *message, ...);
+void
+GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
+                 const char *message, ...);
 
 
 /**
@@ -191,7 +193,8 @@ void GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
  * @param n number of log calls to ignore
  * @param check_reset GNUNET_YES to assert that the log skip counter is currently zero
  */
-void GNUNET_log_skip (unsigned int n, int check_reset);
+void
+GNUNET_log_skip (unsigned int n, int check_reset);
 
 
 /**
@@ -202,8 +205,8 @@ void GNUNET_log_skip (unsigned int n, int check_reset);
  * @param logfile change logging to logfile (use NULL to keep stderr)
  * @return GNUNET_OK on success, GNUNET_SYSERR if logfile could not be opened
  */
-int GNUNET_log_setup (const char *comp, const char *loglevel,
-                      const char *logfile);
+int
+GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile);
 
 
 /**
@@ -212,7 +215,8 @@ int GNUNET_log_setup (const char *comp, const char *loglevel,
  * @param logger log function
  * @param logger_cls closure for logger
  */
-void GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
+void
+GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
 
 
 /**
@@ -221,7 +225,8 @@ void GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
  * @param logger log function
  * @param logger_cls closure for logger
  */
-void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
+void
+GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
 
 
 /**
@@ -232,7 +237,8 @@ void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
  * @param hc the hash code
  * @return string 
  */
-const char *GNUNET_h2s (const GNUNET_HashCode * hc);
+const char *
+GNUNET_h2s (const GNUNET_HashCode * hc);
 
 
 /**
@@ -244,7 +250,8 @@ const char *GNUNET_h2s (const GNUNET_HashCode * hc);
  * @param hc the hash code
  * @return string
  */
-const char *GNUNET_h2s_full (const GNUNET_HashCode * hc);
+const char *
+GNUNET_h2s_full (const GNUNET_HashCode * hc);
 
 
 /**
@@ -256,7 +263,8 @@ const char *GNUNET_h2s_full (const GNUNET_HashCode * hc);
  * @return string form of the pid; will be overwritten by next
  *         call to GNUNET_i2s.
  */
-const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
+const char *
+GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
 
 
 /**
@@ -269,7 +277,8 @@ const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
  * @return nicely formatted string for the address
  *  will be overwritten by next call to GNUNET_a2s.
  */
-const char *GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
+const char *
+GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
 
 /**
  * Convert error type to string.
@@ -277,7 +286,8 @@ const char *GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
  * @param kind type to convert
  * @return string corresponding to the type
  */
-const char *GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
+const char *
+GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
 
 
 /**
@@ -327,14 +337,16 @@ const char *GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
  * @param n the value in network byte order
  * @return the same value in host byte order
  */
-unsigned long long GNUNET_ntohll (unsigned long long n);
+unsigned long long
+GNUNET_ntohll (unsigned long long n);
 
 /**
  * Convert a long long to network-byte-order.
  * @param n the value in host byte order
  * @return the same value in network byte order
  */
-unsigned long long GNUNET_htonll (unsigned long long n);
+unsigned long long
+GNUNET_htonll (unsigned long long n);
 
 
 /* ************************* allocation functions ****************** */
@@ -468,7 +480,8 @@ unsigned long long GNUNET_htonll (unsigned long long n);
  * @param ... data for format string
  * @return number of bytes written to buf or negative value on error
  */
-int GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
+int
+GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
 
 
 /**
@@ -479,7 +492,8 @@ int GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
  * @param ... data for format string
  * @return number of bytes in "*buf" excluding 0-termination
  */
-int GNUNET_asprintf (char **buf, const char *format, ...);
+int
+GNUNET_asprintf (char **buf, const char *format, ...);
 
 
 /* ************** internal implementations, use macros above! ************** */
@@ -495,7 +509,8 @@ int GNUNET_asprintf (char **buf, const char *format, ...);
  * @param linenumber line where this call is being made (for debugging)
  * @return allocated memory, never NULL
  */
-void *GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
+void *
+GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
 
 
 
@@ -510,8 +525,9 @@ void *GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
  * @param linenumber line where this call is being made (for debugging)
  * @return allocated memory, never NULL
  */
-void *GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
-                       int linenumber);
+void *
+GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
+                 int linenumber);
 
 
 /**
@@ -526,15 +542,15 @@ void *GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
  * @param linenumber line where this call is being made (for debugging)
  * @return pointer to size bytes of memory, NULL if we do not have enough memory
  */
-void *GNUNET_xmalloc_unchecked_ (size_t size, const char *filename,
-                                 int linenumber);
+void *
+GNUNET_xmalloc_unchecked_ (size_t size, const char *filename, int linenumber);
 
 /**
  * Reallocate memory. Checks the return value, aborts if no more
  * memory is available.
  */
-void *GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename,
-                        int linenumber);
+void *
+GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber);
 
 /**
  * Free memory. Merely a wrapper for the case that we
@@ -545,7 +561,8 @@ void *GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename,
  * @param filename where is this call being made (for debugging)
  * @param linenumber line where this call is being made (for debugging)
  */
-void GNUNET_xfree_ (void *ptr, const char *filename, int linenumber);
+void
+GNUNET_xfree_ (void *ptr, const char *filename, int linenumber);
 
 
 /**
@@ -555,7 +572,8 @@ void GNUNET_xfree_ (void *ptr, const char *filename, int linenumber);
  * @param linenumber line where this call is being made (for debugging)
  * @return the duplicated string
  */
-char *GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
+char *
+GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
 
 /**
  * Dup partially a string. Don't call GNUNET_xstrndup_ directly. Use the GNUNET_strndup macro.
@@ -565,8 +583,9 @@ char *GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
  * @param linenumber line where this call is being made (for debugging)
  * @return the duplicated string
  */
-char *GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
-                        int linenumber);
+char *
+GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
+                  int linenumber);
 
 /**
  * Grow an array, the new elements are zeroed out.
@@ -583,9 +602,9 @@ char *GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
  * @param filename where is this call being made (for debugging)
  * @param linenumber line where this call is being made (for debugging)
  */
-void GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount,
-                    unsigned int newCount, const char *filename,
-                    int linenumber);
+void
+GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount,
+               unsigned int newCount, const char *filename, int linenumber);
 
 
 

+ 99 - 89
src/include/gnunet_configuration_lib.h

@@ -49,7 +49,8 @@ struct GNUNET_CONFIGURATION_Handle;
  * Create a new configuration object.
  * @return fresh configuration object
  */
-struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_create (void);
+struct GNUNET_CONFIGURATION_Handle *
+GNUNET_CONFIGURATION_create (void);
 
 
 /**
@@ -58,9 +59,8 @@ struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_create (void);
  * @param cfg configuration to duplicate
  * @return duplicate configuration
  */
-struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_dup (const struct
-                                                              GNUNET_CONFIGURATION_Handle
-                                                              *cfg);
+struct GNUNET_CONFIGURATION_Handle *
+GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -68,7 +68,8 @@ struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_dup (const struct
  *
  * @param cfg configuration to destroy
  */
-void GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
+void
+GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -80,8 +81,9 @@ void GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
  * @param filename name of the configuration file, NULL to load defaults
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
-                               const char *filename);
+int
+GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
+                           const char *filename);
 
 
 /**
@@ -92,8 +94,9 @@ int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param filename name of the configuration file
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
-                                const char *filename);
+int
+GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
+                            const char *filename);
 
 
 /**
@@ -103,8 +106,9 @@ int GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param filename where to write the configuration
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
-                                const char *filename);
+int
+GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
+                            const char *filename);
 
 /**
  * Write only configuration entries that have been changed to configuration file
@@ -113,10 +117,11 @@ int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param filename where to write the configuration diff between default and new
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
-                                      *cfgDefault,
-                                      const struct GNUNET_CONFIGURATION_Handle
-                                      *cfgNew, const char *filename);
+int
+GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
+                                  *cfgDefault,
+                                  const struct GNUNET_CONFIGURATION_Handle
+                                  *cfgNew, const char *filename);
 
 /**
  * Test if there are configuration options that were
@@ -125,8 +130,8 @@ int GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
  * @param cfg configuration to inspect
  * @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error (i.e. last save failed)
  */
-int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle
-                                   *cfg);
+int
+GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -159,9 +164,10 @@ typedef void (*GNUNET_CONFIGURATION_Section_Iterator) (void *cls,
  * @param iter function to call on each option
  * @param iter_cls closure for iter
  */
-void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle
-                                   *cfg, GNUNET_CONFIGURATION_Iterator iter,
-                                   void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                              GNUNET_CONFIGURATION_Iterator iter,
+                              void *iter_cls);
 
 
 /**
@@ -171,10 +177,11 @@ void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle
  * @param iter function to call on each section
  * @param iter_cls closure for iter
  */
-void GNUNET_CONFIGURATION_iterate_sections (const struct
-                                            GNUNET_CONFIGURATION_Handle *cfg,
-                                            GNUNET_CONFIGURATION_Section_Iterator
-                                            iter, void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg,
+                                       GNUNET_CONFIGURATION_Section_Iterator
+                                       iter, void *iter_cls);
 
 
 /**
@@ -183,8 +190,9 @@ void GNUNET_CONFIGURATION_iterate_sections (const struct
  * @param cfg configuration to inspect
  * @param section name of the section to remove
  */
-void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle
-                                          *cfg, const char *section);
+void
+GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
+                                     const char *section);
 
 /**
  * Get a configuration value that should be a number.
@@ -195,11 +203,11 @@ void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle
  * @param number where to store the numeric value of the option
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_number (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           const char *section,
-                                           const char *option,
-                                           unsigned long long *number);
+int
+GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg, const char *section,
+                                       const char *option,
+                                       unsigned long long *number);
 
 
 /**
@@ -211,11 +219,11 @@ int GNUNET_CONFIGURATION_get_value_number (const struct
  * @param time set to the time value stored in the configuration
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_time (const struct
-                                         GNUNET_CONFIGURATION_Handle *cfg,
-                                         const char *section,
-                                         const char *option,
-                                         struct GNUNET_TIME_Relative *time);
+int
+GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle
+                                     *cfg, const char *section,
+                                     const char *option,
+                                     struct GNUNET_TIME_Relative *time);
 
 
 /**
@@ -226,9 +234,9 @@ int GNUNET_CONFIGURATION_get_value_time (const struct
  * @param option option of interest
  * @return GNUNET_YES if so, GNUNET_NO if not.
  */
-int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle
-                                     *cfg, const char *section,
-                                     const char *option);
+int
+GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                                 const char *section, const char *option);
 
 
 /**
@@ -241,10 +249,10 @@ int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle
  *        value, or NULL if option is not specified
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_string (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           const char *section,
-                                           const char *option, char **value);
+int
+GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg, const char *section,
+                                       const char *option, char **value);
 
 
 /**
@@ -258,10 +266,11 @@ int GNUNET_CONFIGURATION_get_value_string (const struct
  *        value, or NULL if option is not specified
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_filename (const struct
-                                             GNUNET_CONFIGURATION_Handle *cfg,
-                                             const char *section,
-                                             const char *option, char **value);
+int
+GNUNET_CONFIGURATION_get_value_filename (const struct
+                                         GNUNET_CONFIGURATION_Handle *cfg,
+                                         const char *section,
+                                         const char *option, char **value);
 
 /**
  * Iterate over the set of filenames stored in a configuration value.
@@ -273,12 +282,13 @@ int GNUNET_CONFIGURATION_get_value_filename (const struct
  * @param cb_cls closure for cb
  * @return number of filenames iterated over, -1 on error
  */
-int GNUNET_CONFIGURATION_iterate_value_filenames (const struct
-                                                  GNUNET_CONFIGURATION_Handle
-                                                  *cfg, const char *section,
-                                                  const char *option,
-                                                  GNUNET_FileNameCallback cb,
-                                                  void *cb_cls);
+int
+GNUNET_CONFIGURATION_iterate_value_filenames (const struct
+                                              GNUNET_CONFIGURATION_Handle *cfg,
+                                              const char *section,
+                                              const char *option,
+                                              GNUNET_FileNameCallback cb,
+                                              void *cb_cls);
 
 /**
  * Iterate over values of a section in the configuration.
@@ -288,11 +298,12 @@ int GNUNET_CONFIGURATION_iterate_value_filenames (const struct
  * @param iter function to call on each option
  * @param iter_cls closure for iter
  */
-void GNUNET_CONFIGURATION_iterate_section_values (const struct
-                                                  GNUNET_CONFIGURATION_Handle
-                                                  *cfg, const char *section,
-                                                  GNUNET_CONFIGURATION_Iterator
-                                                  iter, void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate_section_values (const struct
+                                             GNUNET_CONFIGURATION_Handle *cfg,
+                                             const char *section,
+                                             GNUNET_CONFIGURATION_Iterator iter,
+                                             void *iter_cls);
 
 /**
  * Get a configuration value that should be in a set of
@@ -306,12 +317,11 @@ void GNUNET_CONFIGURATION_iterate_section_values (const struct
  *        or NULL if option is not specified and no default given
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_choice (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           const char *section,
-                                           const char *option,
-                                           const char **choices,
-                                           const char **value);
+int
+GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg, const char *section,
+                                       const char *option, const char **choices,
+                                       const char **value);
 
 /**
  * Get a configuration value that should be in a set of
@@ -322,10 +332,10 @@ int GNUNET_CONFIGURATION_get_value_choice (const struct
  * @param option option of interest
  * @return GNUNET_YES, GNUNET_NO or if option has no valid value, GNUNET_SYSERR
  */
-int GNUNET_CONFIGURATION_get_value_yesno (const struct
-                                          GNUNET_CONFIGURATION_Handle *cfg,
-                                          const char *section,
-                                          const char *option);
+int
+GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle
+                                      *cfg, const char *section,
+                                      const char *option);
 
 /**
  * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
@@ -336,9 +346,9 @@ int GNUNET_CONFIGURATION_get_value_yesno (const struct
  * @param orig string to $-expand (will be freed!)
  * @return $-expanded string
  */
-char *GNUNET_CONFIGURATION_expand_dollar (const struct
-                                          GNUNET_CONFIGURATION_Handle *cfg,
-                                          char *orig);
+char *
+GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
+                                    *cfg, char *orig);
 
 
 /**
@@ -349,10 +359,10 @@ char *GNUNET_CONFIGURATION_expand_dollar (const struct
  * @param option option of interest
  * @param number value to set
  */
-void GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle
-                                            *cfg, const char *section,
-                                            const char *option,
-                                            unsigned long long number);
+void
+GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle *cfg,
+                                       const char *section, const char *option,
+                                       unsigned long long number);
 
 
 /**
@@ -363,10 +373,10 @@ void GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle
  * @param option option of interest
  * @param value value to set
  */
-void GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle
-                                            *cfg, const char *section,
-                                            const char *option,
-                                            const char *value);
+void
+GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg,
+                                       const char *section, const char *option,
+                                       const char *value);
 
 /**
  * Remove a filename from a configuration value that
@@ -379,11 +389,11 @@ void GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle
  * @return GNUNET_OK on success,
  *         GNUNET_SYSERR if the filename is not in the list
  */
-int GNUNET_CONFIGURATION_remove_value_filename (struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, const char *section,
-                                                const char *option,
-                                                const char *value);
+int
+GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle
+                                            *cfg, const char *section,
+                                            const char *option,
+                                            const char *value);
 
 /**
  * Append a filename to a configuration value that
@@ -396,11 +406,11 @@ int GNUNET_CONFIGURATION_remove_value_filename (struct
  * @return GNUNET_OK on success,
  *         GNUNET_SYSERR if the filename already in the list
  */
-int GNUNET_CONFIGURATION_append_value_filename (struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, const char *section,
-                                                const char *option,
-                                                const char *value);
+int
+GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle
+                                            *cfg, const char *section,
+                                            const char *option,
+                                            const char *value);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 50 - 53
src/include/gnunet_connection_lib.h

@@ -111,7 +111,8 @@ typedef void (*GNUNET_CONNECTION_Receiver) (void *cls, const void *buf,
  *
  * @param sock the connection to set persistent
  */
-void GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
+void
+GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
 
 /**
  * Disable the "CORK" feature for communication with the given socket,
@@ -124,7 +125,8 @@ void GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
  * @param sock the connection to make flushing and blocking
  * @return GNUNET_OK on success
  */
-int GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
+int
+GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
 
 
 /**
@@ -135,9 +137,8 @@ int GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
  * @param osSocket existing socket to box
  * @return the boxed socket handle
  */
-struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_existing (struct
-                                                                         GNUNET_NETWORK_Handle
-                                                                         *osSocket);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_existing (struct GNUNET_NETWORK_Handle *osSocket);
 
 
 /**
@@ -149,10 +150,10 @@ struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_existing (struct
  * @param lsock listen socket
  * @return the socket handle, NULL on error (for example, access refused)
  */
-struct GNUNET_CONNECTION_Handle
-    *GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
-                                           void *access_cls,
-                                           struct GNUNET_NETWORK_Handle *lsock);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
+                                      void *access_cls,
+                                      struct GNUNET_NETWORK_Handle *lsock);
 
 
 /**
@@ -165,15 +166,10 @@ struct GNUNET_CONNECTION_Handle
  * @param port port to connect to
  * @return the socket handle
  */
-struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_connect (const
-                                                                        struct
-                                                                        GNUNET_CONFIGURATION_Handle
-                                                                        *cfg,
-                                                                        const
-                                                                        char
-                                                                        *hostname,
-                                                                        uint16_t
-                                                                        port);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_connect (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg, const char *hostname,
+                                       uint16_t port);
 
 
 /**
@@ -185,11 +181,10 @@ struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_connect (const
  * @param unixpath path to connect to)
  * @return the socket handle, NULL on systems without UNIX support
  */
-struct GNUNET_CONNECTION_Handle
-    *GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct
-                                                        GNUNET_CONFIGURATION_Handle
-                                                        *cfg,
-                                                        const char *unixpath);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct
+                                                   GNUNET_CONFIGURATION_Handle
+                                                   *cfg, const char *unixpath);
 
 
 
@@ -204,14 +199,10 @@ struct GNUNET_CONNECTION_Handle
  * @param addrlen length of server address
  * @return the socket handle
  */
-struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_sockaddr (int
-                                                                         af_family,
-                                                                         const
-                                                                         struct
-                                                                         sockaddr
-                                                                         *serv_addr,
-                                                                         socklen_t
-                                                                         addrlen);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_sockaddr (int af_family,
+                                        const struct sockaddr *serv_addr,
+                                        socklen_t addrlen);
 
 /**
  * Check if socket is valid (no fatal errors have happened so far).
@@ -221,7 +212,8 @@ struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_sockaddr (int
  * @param sock socket to check
  * @return GNUNET_YES if valid, GNUNET_NO otherwise
  */
-int GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
+int
+GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
 
 
 /**
@@ -232,8 +224,9 @@ int GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
  * @param addrlen where to store the length of the address
  * @return GNUNET_OK on success
  */
-int GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
-                                   void **addr, size_t * addrlen);
+int
+GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
+                               void **addr, size_t * addrlen);
 
 
 /**
@@ -249,8 +242,9 @@ int GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
  *        read from the application; all other transmissions should be
  *        aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel').
  */
-void GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
-                                int finish_pending_write);
+void
+GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
+                           int finish_pending_write);
 
 
 /**
@@ -266,10 +260,11 @@ void GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
  * @param receiver function to call with received data
  * @param receiver_cls closure for receiver
  */
-void GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *sock,
-                                size_t max, struct GNUNET_TIME_Relative timeout,
-                                GNUNET_CONNECTION_Receiver receiver,
-                                void *receiver_cls);
+void
+GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *sock, size_t max,
+                           struct GNUNET_TIME_Relative timeout,
+                           GNUNET_CONNECTION_Receiver receiver,
+                           void *receiver_cls);
 
 
 /**
@@ -280,7 +275,8 @@ void GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *sock,
  * @param sock socket handle
  * @return closure of the original receiver callback closure
  */
-void *GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock);
+void *
+GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock);
 
 
 /**
@@ -333,13 +329,12 @@ struct GNUNET_CONNECTION_TransmitHandle;
  * @return non-NULL if the notify callback was queued,
  *         NULL if we are already going to notify someone else (busy)
  */
-struct GNUNET_CONNECTION_TransmitHandle
-    *GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle
-                                              *sock, size_t size,
-                                              struct GNUNET_TIME_Relative
-                                              timeout,
-                                              GNUNET_CONNECTION_TransmitReadyNotify
-                                              notify, void *notify_cls);
+struct GNUNET_CONNECTION_TransmitHandle *
+GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle *sock,
+                                         size_t size,
+                                         struct GNUNET_TIME_Relative timeout,
+                                         GNUNET_CONNECTION_TransmitReadyNotify
+                                         notify, void *notify_cls);
 
 
 /**
@@ -348,9 +343,10 @@ struct GNUNET_CONNECTION_TransmitHandle
  *
  * @param h handle for notification to cancel
  */
-void GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
-                                                     GNUNET_CONNECTION_TransmitHandle
-                                                     *h);
+void
+GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
+                                                GNUNET_CONNECTION_TransmitHandle
+                                                *h);
 
 
 /**
@@ -359,8 +355,9 @@ void GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
  * @param sock socket handle
  * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
  */
-void GNUNET_CONNECTION_ignore_shutdown (struct GNUNET_CONNECTION_Handle *sock,
-                                        int do_ignore);
+void
+GNUNET_CONNECTION_ignore_shutdown (struct GNUNET_CONNECTION_Handle *sock,
+                                   int do_ignore);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 202 - 184
src/include/gnunet_container_lib.h

@@ -75,13 +75,9 @@ typedef int (*GNUNET_HashCodeIterator) (void *cls, GNUNET_HashCode * next);
  *        element (number of bits set per element in the set)
  * @return the bloomfilter
  */
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_load (const
-                                                                        char
-                                                                        *filename,
-                                                                        size_t
-                                                                        size,
-                                                                        unsigned
-                                                                        int k);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size,
+                                   unsigned int k);
 
 
 /**
@@ -97,13 +93,9 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_load (const
  *        element (number of bits set per element in the set)
  * @return the bloomfilter
  */
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const
-                                                                        char
-                                                                        *data,
-                                                                        size_t
-                                                                        size,
-                                                                        unsigned
-                                                                        int k);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_init (const char *data, size_t size,
+                                   unsigned int k);
 
 
 /**
@@ -114,9 +106,10 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const
  * @param size the size of the given data array
  * @return GNUNET_SYSERR if the data array of the wrong size
  */
-int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
-                                               GNUNET_CONTAINER_BloomFilter *bf,
-                                               char *data, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
+                                           GNUNET_CONTAINER_BloomFilter *bf,
+                                           char *data, size_t size);
 
 
 /**
@@ -125,8 +118,9 @@ int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
  * @param bf the filter
  * @return GNUNET_YES if the element is in the filter, GNUNET_NO if not
  */
-int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
-                                       *bf, const GNUNET_HashCode * e);
+int
+GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
+                                   *bf, const GNUNET_HashCode * e);
 
 
 /**
@@ -134,8 +128,9 @@ int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
  * @param bf the filter
  * @param e the element
  */
-void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
-                                       const GNUNET_HashCode * e);
+void
+GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                  const GNUNET_HashCode * e);
 
 
 /**
@@ -143,8 +138,9 @@ void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
  * @param bf the filter
  * @param e the element to remove
  */
-void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
-                                          *bf, const GNUNET_HashCode * e);
+void
+GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                     const GNUNET_HashCode * e);
 
 
 /**
@@ -153,10 +149,9 @@ void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
  * @param bf the filter
  * @return copy of bf
  */
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_copy (const
-                                                                        struct
-                                                                        GNUNET_CONTAINER_BloomFilter
-                                                                        *bf);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_copy (const struct GNUNET_CONTAINER_BloomFilter
+                                   *bf);
 
 
 
@@ -166,8 +161,8 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_copy (const
  * free the space on the drive)
  * @param bf the filter
  */
-void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter
-                                        *bf);
+void
+GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter *bf);
 
 
 /**
@@ -176,17 +171,17 @@ void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter
  * @param bf the filter
  * @return number of bytes used for the data of the bloom filter
  */
-size_t                       GNUNET_CONTAINER_bloomfilter_get_size (const struct
-                                                                    GNUNET_CONTAINER_BloomFilter
-                                                                    *bf);
+size_t
+GNUNET_CONTAINER_bloomfilter_get_size (const struct GNUNET_CONTAINER_BloomFilter
+                                       *bf);
 
 
 /**
  * Reset a bloom filter to empty.
  * @param bf the filter
  */
-void GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter
-                                         *bf);
+void
+GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf);
 
 /**
  * Or the entries of the given raw data array with the
@@ -199,8 +194,9 @@ void GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter
  * @param size size of data
  * @return GNUNET_OK on success
  */
-int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
-                                     const char *data, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                 const char *data, size_t size);
 
 /**
  * Or the entries of the given raw data array with the
@@ -212,9 +208,10 @@ int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
  * @param to_or the bloomfilter to or-in
  * @param size number of bytes in data
  */
-int GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
-                                      const struct GNUNET_CONTAINER_BloomFilter
-                                      *to_or, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                  const struct GNUNET_CONTAINER_BloomFilter
+                                  *to_or, size_t size);
 
 /**
  * Resize a bloom filter.  Note that this operation
@@ -227,10 +224,11 @@ int GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
  * @param size the new size for the filter
  * @param k the new number of GNUNET_CRYPTO_hash-function to apply per element
  */
-void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter
-                                          *bf, GNUNET_HashCodeIterator iterator,
-                                          void *iterator_cls, size_t size,
-                                          unsigned int k);
+void
+GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                     GNUNET_HashCodeIterator iterator,
+                                     void *iterator_cls, size_t size,
+                                     unsigned int k);
 
 /* ****************** metadata ******************* */
 
@@ -244,7 +242,8 @@ struct GNUNET_CONTAINER_MetaData;
  * 
  * @return empty meta-data container
  */
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_create (void);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_create (void);
 
 /**
  * Duplicate a MetaData token.
@@ -252,17 +251,17 @@ struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_create (void);
  * @param md what to duplicate
  * @return duplicate meta-data container
  */
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_duplicate (const
-                                                                        struct
-                                                                        GNUNET_CONTAINER_MetaData
-                                                                        *md);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_duplicate (const struct GNUNET_CONTAINER_MetaData
+                                      *md);
 
 /**
  * Free meta data.
  *
  * @param md what to free
  */
-void GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
 
 /**
  * Test if two MDs are equal. We consider them equal if
@@ -274,10 +273,11 @@ void GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
  * @param md2 other value to check
  * @return GNUNET_YES if they are equal
  */
-int GNUNET_CONTAINER_meta_data_test_equal (const struct
-                                           GNUNET_CONTAINER_MetaData *md1,
-                                           const struct
-                                           GNUNET_CONTAINER_MetaData *md2);
+int
+GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData
+                                       *md1,
+                                       const struct GNUNET_CONTAINER_MetaData
+                                       *md2);
 
 
 /**
@@ -297,12 +297,13 @@ int GNUNET_CONTAINER_meta_data_test_equal (const struct
  * @return GNUNET_OK on success, GNUNET_SYSERR if this entry already exists
  *         data_mime_type and plugin_name are not considered for "exists" checks
  */
-int GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
-                                       const char *plugin_name,
-                                       enum EXTRACTOR_MetaType type,
-                                       enum EXTRACTOR_MetaFormat format,
-                                       const char *data_mime_type,
-                                       const char *data, size_t data_len);
+int
+GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
+                                   const char *plugin_name,
+                                   enum EXTRACTOR_MetaType type,
+                                   enum EXTRACTOR_MetaFormat format,
+                                   const char *data_mime_type, const char *data,
+                                   size_t data_len);
 
 
 /**
@@ -312,9 +313,9 @@ int GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
  * @param md metadata to extend
  * @param in metadata to merge
  */
-void GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md,
-                                       const struct GNUNET_CONTAINER_MetaData
-                                       *in);
+void
+GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md,
+                                  const struct GNUNET_CONTAINER_MetaData *in);
 
 
 /**
@@ -327,9 +328,10 @@ void GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md,
  * @param data_len number of bytes in data
  * @return GNUNET_OK on success, GNUNET_SYSERR if the item does not exist in md
  */
-int GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
-                                       enum EXTRACTOR_MetaType type,
-                                       const char *data, size_t data_len);
+int
+GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
+                                   enum EXTRACTOR_MetaType type,
+                                   const char *data, size_t data_len);
 
 
 /**
@@ -337,7 +339,8 @@ int GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
  *
  * @param md metadata to manipulate
  */
-void GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
 
 
 /**
@@ -346,9 +349,9 @@ void GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
  *
  * @param md metadata to modify
  */
-void GNUNET_CONTAINER_meta_data_add_publication_date (struct
-                                                      GNUNET_CONTAINER_MetaData
-                                                      *md);
+void
+GNUNET_CONTAINER_meta_data_add_publication_date (struct
+                                                 GNUNET_CONTAINER_MetaData *md);
 
 
 /**
@@ -359,9 +362,10 @@ void GNUNET_CONTAINER_meta_data_add_publication_date (struct
  * @param iter_cls closure for iterator
  * @return number of entries
  */
-int GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData
-                                        *md, EXTRACTOR_MetaDataProcessor iter,
-                                        void *iter_cls);
+int
+GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData *md,
+                                    EXTRACTOR_MetaDataProcessor iter,
+                                    void *iter_cls);
 
 /**
  * Get the first MD entry of the given type.  Caller
@@ -373,9 +377,9 @@ int GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData
  * @param type type to look for
  * @return NULL if no entry was found
  */
-char *GNUNET_CONTAINER_meta_data_get_by_type (const struct
-                                              GNUNET_CONTAINER_MetaData *md,
-                                              enum EXTRACTOR_MetaType type);
+char *
+GNUNET_CONTAINER_meta_data_get_by_type (const struct GNUNET_CONTAINER_MetaData
+                                        *md, enum EXTRACTOR_MetaType type);
 
 
 /**
@@ -389,9 +393,10 @@ char *GNUNET_CONTAINER_meta_data_get_by_type (const struct
  * @return NULL if we do not have any such entry,
  *  otherwise client is responsible for freeing the value!
  */
-char *GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
-                                                     GNUNET_CONTAINER_MetaData
-                                                     *md, ...);
+char *
+GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
+                                               GNUNET_CONTAINER_MetaData *md,
+                                               ...);
 
 /**
  * Get a thumbnail from the meta-data (if present).  Only matches meta
@@ -402,9 +407,9 @@ char *GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
  *        freed by the caller!
  * @return number of bytes in thumbnail, 0 if not available
  */
-size_t GNUNET_CONTAINER_meta_data_get_thumbnail (const struct
-                                                 GNUNET_CONTAINER_MetaData *md,
-                                                 unsigned char **thumb);
+size_t
+GNUNET_CONTAINER_meta_data_get_thumbnail (const struct GNUNET_CONTAINER_MetaData
+                                          *md, unsigned char **thumb);
 
 
 
@@ -445,7 +450,7 @@ enum GNUNET_CONTAINER_MetaDataSerializationOptions
  *         -1 on error (typically: not enough
  *         space)
  */
-ssize_t                                      
+ssize_t
 GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
                                       *md, char **target, size_t max,
                                       enum
@@ -459,7 +464,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
  * @param md metadata to inspect
  * @return number of bytes needed for serialization, -1 on error
  */
-ssize_t                                      
+ssize_t
 GNUNET_CONTAINER_meta_data_get_serialized_size (const struct
                                                 GNUNET_CONTAINER_MetaData *md);
 
@@ -472,11 +477,8 @@ GNUNET_CONTAINER_meta_data_get_serialized_size (const struct
  * @return MD on success, NULL on error (i.e.
  *         bad format)
  */
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_deserialize (const
-                                                                          char
-                                                                          *input,
-                                                                          size_t
-                                                                          size);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size);
 
 
 /* ******************************* HashMap **************************** */
@@ -541,8 +543,8 @@ typedef int (*GNUNET_CONTAINER_HashMapIterator) (void *cls,
  * @param len initial size (map will grow as needed)
  * @return NULL on error
  */
-struct GNUNET_CONTAINER_MultiHashMap
-    *GNUNET_CONTAINER_multihashmap_create (unsigned int len);
+struct GNUNET_CONTAINER_MultiHashMap *
+GNUNET_CONTAINER_multihashmap_create (unsigned int len);
 
 
 /**
@@ -551,8 +553,9 @@ struct GNUNET_CONTAINER_MultiHashMap
  *
  * @param map the map
  */
-void GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
-                                            *map);
+void
+GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
+                                       *map);
 
 
 /**
@@ -565,9 +568,9 @@ void GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
  *   happen to be NULL; use "contains" to test for
  *   key-value pairs with value NULL
  */
-void *GNUNET_CONTAINER_multihashmap_get (const struct
-                                         GNUNET_CONTAINER_MultiHashMap *map,
-                                         const GNUNET_HashCode * key);
+void *
+GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
+                                   *map, const GNUNET_HashCode * key);
 
 
 /**
@@ -581,9 +584,9 @@ void *GNUNET_CONTAINER_multihashmap_get (const struct
  * @return GNUNET_YES on success, GNUNET_NO if the key-value pair
  *  is not in the map
  */
-int GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
-                                          *map, const GNUNET_HashCode * key,
-                                          void *value);
+int
+GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
+                                      const GNUNET_HashCode * key, void *value);
 
 /**
  * Remove all entries for the given key from the map.
@@ -593,10 +596,9 @@ int GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
  * @param key identifies values to be removed
  * @return number of values removed
  */
-int GNUNET_CONTAINER_multihashmap_remove_all (struct
-                                              GNUNET_CONTAINER_MultiHashMap
-                                              *map,
-                                              const GNUNET_HashCode * key);
+int
+GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
+                                          *map, const GNUNET_HashCode * key);
 
 
 /**
@@ -608,9 +610,10 @@ int GNUNET_CONTAINER_multihashmap_remove_all (struct
  * @return GNUNET_YES if such a value exists,
  *         GNUNET_NO if not
  */
-int GNUNET_CONTAINER_multihashmap_contains (const struct
-                                            GNUNET_CONTAINER_MultiHashMap *map,
-                                            const GNUNET_HashCode * key);
+int
+GNUNET_CONTAINER_multihashmap_contains (const struct
+                                        GNUNET_CONTAINER_MultiHashMap *map,
+                                        const GNUNET_HashCode * key);
 
 
 /**
@@ -623,11 +626,11 @@ int GNUNET_CONTAINER_multihashmap_contains (const struct
  * @return GNUNET_YES if such a value exists,
  *         GNUNET_NO if not
  */
-int GNUNET_CONTAINER_multihashmap_contains_value (const struct
-                                                  GNUNET_CONTAINER_MultiHashMap
-                                                  *map,
-                                                  const GNUNET_HashCode * key,
-                                                  const void *value);
+int
+GNUNET_CONTAINER_multihashmap_contains_value (const struct
+                                              GNUNET_CONTAINER_MultiHashMap
+                                              *map, const GNUNET_HashCode * key,
+                                              const void *value);
 
 
 /**
@@ -642,11 +645,11 @@ int GNUNET_CONTAINER_multihashmap_contains_value (const struct
  *         GNUNET_SYSERR if UNIQUE_ONLY was the option and the
  *                       value already exists
  */
-int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap
-                                       *map, const GNUNET_HashCode * key,
-                                       void *value,
-                                       enum GNUNET_CONTAINER_MultiHashMapOption
-                                       opt);
+int
+GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
+                                   const GNUNET_HashCode * key, void *value,
+                                   enum GNUNET_CONTAINER_MultiHashMapOption
+                                   opt);
 
 /**
  * Get the number of key-value pairs in the map.
@@ -654,9 +657,9 @@ int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap
  * @param map the map
  * @return the number of key value pairs
  */
-unsigned int GNUNET_CONTAINER_multihashmap_size (const struct
-                                                 GNUNET_CONTAINER_MultiHashMap
-                                                 *map);
+unsigned int
+GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap
+                                    *map);
 
 
 /**
@@ -668,10 +671,11 @@ unsigned int GNUNET_CONTAINER_multihashmap_size (const struct
  * @return the number of key value pairs processed,
  *         GNUNET_SYSERR if it aborted iteration
  */
-int GNUNET_CONTAINER_multihashmap_iterate (const struct
-                                           GNUNET_CONTAINER_MultiHashMap *map,
-                                           GNUNET_CONTAINER_HashMapIterator it,
-                                           void *it_cls);
+int
+GNUNET_CONTAINER_multihashmap_iterate (const struct
+                                       GNUNET_CONTAINER_MultiHashMap *map,
+                                       GNUNET_CONTAINER_HashMapIterator it,
+                                       void *it_cls);
 
 
 /**
@@ -684,12 +688,12 @@ int GNUNET_CONTAINER_multihashmap_iterate (const struct
  * @return the number of key value pairs processed,
  *         GNUNET_SYSERR if it aborted iteration
  */
-int GNUNET_CONTAINER_multihashmap_get_multiple (const struct
-                                                GNUNET_CONTAINER_MultiHashMap
-                                                *map,
-                                                const GNUNET_HashCode * key,
-                                                GNUNET_CONTAINER_HashMapIterator
-                                                it, void *it_cls);
+int
+GNUNET_CONTAINER_multihashmap_get_multiple (const struct
+                                            GNUNET_CONTAINER_MultiHashMap *map,
+                                            const GNUNET_HashCode * key,
+                                            GNUNET_CONTAINER_HashMapIterator it,
+                                            void *it_cls);
 
 
 /* ******************** doubly-linked list *************** */
@@ -864,9 +868,8 @@ struct GNUNET_CONTAINER_HeapNode;
  * @param order how should the heap be sorted?
  * @return handle to the heap
  */
-struct GNUNET_CONTAINER_Heap *GNUNET_CONTAINER_heap_create (enum
-                                                            GNUNET_CONTAINER_HeapOrder
-                                                            order);
+struct GNUNET_CONTAINER_Heap *
+GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder order);
 
 
 /**
@@ -875,7 +878,8 @@ struct GNUNET_CONTAINER_Heap *GNUNET_CONTAINER_heap_create (enum
  *
  * @param heap heap to destroy
  */
-void GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
+void
+GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -884,7 +888,8 @@ void GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
  * @param heap heap to inspect
  * @return NULL if heap is empty
  */
-void *GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -893,8 +898,8 @@ void *GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
  * @param heap the heap to get the size of
  * @return number of elements stored
  */
-unsigned int GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap
-                                             *heap);
+unsigned int
+GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -903,9 +908,9 @@ unsigned int GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap
  * @param node the node to get the cost of
  * @return cost of the node
  */
-GNUNET_CONTAINER_HeapCostType GNUNET_CONTAINER_heap_node_get_cost (const struct
-                                                                   GNUNET_CONTAINER_HeapNode
-                                                                   *node);
+GNUNET_CONTAINER_HeapCostType
+GNUNET_CONTAINER_heap_node_get_cost (const struct GNUNET_CONTAINER_HeapNode
+                                     *node);
 
 /**
  * Iterator for heap
@@ -931,9 +936,10 @@ typedef int (*GNUNET_CONTAINER_HeapIterator) (void *cls,
  * @param iterator function to call on each entry
  * @param iterator_cls closure for iterator
  */
-void GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
-                                    GNUNET_CONTAINER_HeapIterator iterator,
-                                    void *iterator_cls);
+void
+GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
+                               GNUNET_CONTAINER_HeapIterator iterator,
+                               void *iterator_cls);
 
 
 /**
@@ -948,8 +954,9 @@ void GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
  *         NULL if the heap is empty.
  *
  */
-void *GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
-                                        uint32_t max);
+void *
+GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
+                                  uint32_t max);
 
 
 /**
@@ -963,7 +970,8 @@ void *GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
  * @return data stored at the next random node in the walk;
  *         NULL if the tree is empty.
  */
-void *GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -974,12 +982,9 @@ void *GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
  * @param cost cost for the element
  * @return node for the new element
  */
-struct GNUNET_CONTAINER_HeapNode *GNUNET_CONTAINER_heap_insert (struct
-                                                                GNUNET_CONTAINER_Heap
-                                                                *heap,
-                                                                void *element,
-                                                                GNUNET_CONTAINER_HeapCostType
-                                                                cost);
+struct GNUNET_CONTAINER_HeapNode *
+GNUNET_CONTAINER_heap_insert (struct GNUNET_CONTAINER_Heap *heap, void *element,
+                              GNUNET_CONTAINER_HeapCostType cost);
 
 
 /**
@@ -988,7 +993,8 @@ struct GNUNET_CONTAINER_HeapNode *GNUNET_CONTAINER_heap_insert (struct
  * @param heap heap to modify
  * @return element data stored at the root node
  */
-void *GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -997,8 +1003,8 @@ void *GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
  * @param node node to remove
  * @return element data stored at the node, NULL if heap is empty
  */
-void *GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode
-                                         *node);
+void *
+GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode *node);
 
 
 /**
@@ -1008,9 +1014,10 @@ void *GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode
  * @param node node for which the cost is to be changed
  * @param new_cost new cost for the node
  */
-void GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
-                                        struct GNUNET_CONTAINER_HeapNode *node,
-                                        GNUNET_CONTAINER_HeapCostType new_cost);
+void
+GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
+                                   struct GNUNET_CONTAINER_HeapNode *node,
+                                   GNUNET_CONTAINER_HeapCostType new_cost);
 
 
 /* ******************** Singly linked list *************** */
@@ -1057,9 +1064,10 @@ struct GNUNET_CONTAINER_SList_Iterator;
  * @param buf payload buffer
  * @param len length of the buffer
  */
-void GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
-                                 enum GNUNET_CONTAINER_SListDisposition disp,
-                                 const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
+                            enum GNUNET_CONTAINER_SListDisposition disp,
+                            const void *buf, size_t len);
 
 
 /**
@@ -1069,9 +1077,10 @@ void GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
  * @param buf payload buffer
  * @param len length of the buffer
  */
-void GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
-                                     enum GNUNET_CONTAINER_SListDisposition
-                                     disp, const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
+                                enum GNUNET_CONTAINER_SListDisposition disp,
+                                const void *buf, size_t len);
 
 
 /**
@@ -1079,22 +1088,25 @@ void GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
  * @param dst list to append to
  * @param src source
  */
-void GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
-                                    struct GNUNET_CONTAINER_SList *src);
+void
+GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
+                               struct GNUNET_CONTAINER_SList *src);
 
 
 /**
  * Create a new singly linked list
  * @return the new list
  */
-struct GNUNET_CONTAINER_SList *GNUNET_CONTAINER_slist_create (void);
+struct GNUNET_CONTAINER_SList *
+GNUNET_CONTAINER_slist_create (void);
 
 
 /**
  * Destroy a singly linked list
  * @param l the list to be destroyed
  */
-void GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
+void
+GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
 
 
 /**
@@ -1103,9 +1115,8 @@ void GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
  * @param l list
  * @return iterator pointing to the beginning, free using "GNUNET_free"
  */
-struct GNUNET_CONTAINER_SList_Iterator *GNUNET_CONTAINER_slist_begin (struct
-                                                                      GNUNET_CONTAINER_SList
-                                                                      *l);
+struct GNUNET_CONTAINER_SList_Iterator *
+GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l);
 
 
 /**
@@ -1113,7 +1124,8 @@ struct GNUNET_CONTAINER_SList_Iterator *GNUNET_CONTAINER_slist_begin (struct
  *
  * @param l list
  */
-void GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
+void
+GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
 
 
 /**
@@ -1122,8 +1134,9 @@ void GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
  * @param buf payload buffer to find
  * @param len length of the payload (number of bytes in buf)
  */
-int GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
-                                     const void *buf, size_t len);
+int
+GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
+                                 const void *buf, size_t len);
 
 
 /**
@@ -1131,14 +1144,16 @@ int GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
  * @param l list
  * @return number of elements in the list
  */
-int GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
+int
+GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
 
 
 /**
  * Remove an element from the list
  * @param i iterator that points to the element to be removed
  */
-void GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
+void
+GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 /**
@@ -1148,10 +1163,10 @@ void GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
  * @param buf payload buffer
  * @param len length of the payload
  */
-void GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator
-                                    *before,
-                                    enum GNUNET_CONTAINER_SListDisposition disp,
-                                    const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before,
+                               enum GNUNET_CONTAINER_SListDisposition disp,
+                               const void *buf, size_t len);
 
 
 /**
@@ -1159,7 +1174,8 @@ void GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator
  * @param i iterator
  * @return GNUNET_YES on success, GNUNET_NO if the end has been reached
  */
-int GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
+int
+GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 /**
@@ -1168,7 +1184,8 @@ int GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
  * @return GNUNET_YES if the end has been reached, GNUNET_NO if the iterator
  *         points to a valid element
  */
-int GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
+int
+GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 /**
@@ -1178,16 +1195,17 @@ int GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
  * @param len set to the payload length
  * @return payload
  */
-void *GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator
-                                  *i, size_t * len);
+void *
+GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i,
+                            size_t * len);
 
 
 /**
  * Release an iterator
  * @param i iterator
  */
-void GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator
-                                          *i);
+void
+GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 54 - 76
src/include/gnunet_core_service.h

@@ -219,27 +219,18 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
  * @return handle to the core service (only useful for disconnect until 'init' is called),
  *           NULL on error (in this case, init is never called)
  */
-struct GNUNET_CORE_Handle *GNUNET_CORE_connect (const struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, unsigned int queue_size,
-                                                void *cls,
-                                                GNUNET_CORE_StartupCallback
-                                                init,
-                                                GNUNET_CORE_ConnectEventHandler
-                                                connects,
-                                                GNUNET_CORE_DisconnectEventHandler
-                                                disconnects,
-                                                GNUNET_CORE_PeerStatusEventHandler
-                                                status_events,
-                                                GNUNET_CORE_MessageCallback
-                                                inbound_notify,
-                                                int inbound_hdr_only,
-                                                GNUNET_CORE_MessageCallback
-                                                outbound_notify,
-                                                int outbound_hdr_only,
-                                                const struct
-                                                GNUNET_CORE_MessageHandler
-                                                *handlers);
+struct GNUNET_CORE_Handle *
+GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                     unsigned int queue_size, void *cls,
+                     GNUNET_CORE_StartupCallback init,
+                     GNUNET_CORE_ConnectEventHandler connects,
+                     GNUNET_CORE_DisconnectEventHandler disconnects,
+                     GNUNET_CORE_PeerStatusEventHandler status_events,
+                     GNUNET_CORE_MessageCallback inbound_notify,
+                     int inbound_hdr_only,
+                     GNUNET_CORE_MessageCallback outbound_notify,
+                     int outbound_hdr_only,
+                     const struct GNUNET_CORE_MessageHandler *handlers);
 
 
 /**
@@ -249,7 +240,8 @@ struct GNUNET_CORE_Handle *GNUNET_CORE_connect (const struct
  *
  * @param handle connection to core to disconnect
  */
-void GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
+void
+GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
 
 
 /**
@@ -290,17 +282,11 @@ typedef void (*GNUNET_CORE_ControlContinuation) (void *cls, int success);
  * @param cont_cls closure for cont
  * @return NULL on error (cont will not be called), otherwise handle for cancellation
  */
-struct GNUNET_CORE_PeerRequestHandle *GNUNET_CORE_peer_request_connect (struct
-                                                                        GNUNET_CORE_Handle
-                                                                        *h,
-                                                                        const
-                                                                        struct
-                                                                        GNUNET_PeerIdentity
-                                                                        *peer,
-                                                                        GNUNET_CORE_ControlContinuation
-                                                                        cont,
-                                                                        void
-                                                                        *cont_cls);
+struct GNUNET_CORE_PeerRequestHandle *
+GNUNET_CORE_peer_request_connect (struct GNUNET_CORE_Handle *h,
+                                  const struct GNUNET_PeerIdentity *peer,
+                                  GNUNET_CORE_ControlContinuation cont,
+                                  void *cont_cls);
 
 
 /**
@@ -309,9 +295,9 @@ struct GNUNET_CORE_PeerRequestHandle *GNUNET_CORE_peer_request_connect (struct
  *
  * @param req request handle that was returned for the original request
  */
-void GNUNET_CORE_peer_request_connect_cancel (struct
-                                              GNUNET_CORE_PeerRequestHandle
-                                              *req);
+void
+GNUNET_CORE_peer_request_connect_cancel (struct GNUNET_CORE_PeerRequestHandle
+                                         *req);
 
 
 /**
@@ -372,15 +358,14 @@ struct GNUNET_CORE_InformationRequestContext;
  * @param info_cls closure for info
  * @return NULL on error
  */
-struct GNUNET_CORE_InformationRequestContext
-    *GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h,
-                                         const struct GNUNET_PeerIdentity *peer,
-                                         struct GNUNET_TIME_Relative timeout,
-                                         struct GNUNET_BANDWIDTH_Value32NBO
-                                         bw_out, int32_t amount,
-                                         uint64_t preference,
-                                         GNUNET_CORE_PeerConfigurationInfoCallback
-                                         info, void *info_cls);
+struct GNUNET_CORE_InformationRequestContext *
+GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h,
+                                    const struct GNUNET_PeerIdentity *peer,
+                                    struct GNUNET_TIME_Relative timeout,
+                                    struct GNUNET_BANDWIDTH_Value32NBO bw_out,
+                                    int32_t amount, uint64_t preference,
+                                    GNUNET_CORE_PeerConfigurationInfoCallback
+                                    info, void *info_cls);
 
 
 /**
@@ -394,9 +379,10 @@ struct GNUNET_CORE_InformationRequestContext
  *
  * @param irc context returned by the original GNUNET_CORE_peer_get_info call
  */
-void GNUNET_CORE_peer_change_preference_cancel (struct
-                                                GNUNET_CORE_InformationRequestContext
-                                                *irc);
+void
+GNUNET_CORE_peer_change_preference_cancel (struct
+                                           GNUNET_CORE_InformationRequestContext
+                                           *irc);
 
 
 /**
@@ -407,9 +393,10 @@ void GNUNET_CORE_peer_change_preference_cancel (struct
  * @param cb_cls closure for peer_cb
  * @return GNUNET_OK on success, GNUNET_SYSERR on errors
  */
-int GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                               GNUNET_CORE_ConnectEventHandler peer_cb,
-                               void *cb_cls);
+int
+GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                           GNUNET_CORE_ConnectEventHandler peer_cb,
+                           void *cb_cls);
 
 /**
  * Iterate over all currently connected peers.
@@ -424,10 +411,11 @@ int GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
  *
  * @return GNUNET_OK if iterating, GNUNET_SYSERR on error
  */
-int GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle
-                                   *cfg, struct GNUNET_PeerIdentity *peer,
-                                   GNUNET_CORE_ConnectEventHandler peer_cb,
-                                   void *cb_cls);
+int
+GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                               struct GNUNET_PeerIdentity *peer,
+                               GNUNET_CORE_ConnectEventHandler peer_cb,
+                               void *cb_cls);
 
 
 /**
@@ -464,25 +452,14 @@ struct GNUNET_CORE_TransmitHandle;
  *         NULL if we can not even queue the request (insufficient
  *         memory); if NULL is returned, "notify" will NOT be called.
  */
-struct GNUNET_CORE_TransmitHandle *GNUNET_CORE_notify_transmit_ready (struct
-                                                                      GNUNET_CORE_Handle
-                                                                      *handle,
-                                                                      int cork,
-                                                                      uint32_t
-                                                                      priority,
-                                                                      struct
-                                                                      GNUNET_TIME_Relative
-                                                                      maxdelay,
-                                                                      const
-                                                                      struct
-                                                                      GNUNET_PeerIdentity
-                                                                      *target,
-                                                                      size_t
-                                                                      notify_size,
-                                                                      GNUNET_CONNECTION_TransmitReadyNotify
-                                                                      notify,
-                                                                      void
-                                                                      *notify_cls);
+struct GNUNET_CORE_TransmitHandle *
+GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
+                                   uint32_t priority,
+                                   struct GNUNET_TIME_Relative maxdelay,
+                                   const struct GNUNET_PeerIdentity *target,
+                                   size_t notify_size,
+                                   GNUNET_CONNECTION_TransmitReadyNotify notify,
+                                   void *notify_cls);
 
 
 /**
@@ -490,8 +467,9 @@ struct GNUNET_CORE_TransmitHandle *GNUNET_CORE_notify_transmit_ready (struct
  *
  * @param th handle that was returned by "notify_transmit_ready".
  */
-void GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle
-                                               *th);
+void
+GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle
+                                          *th);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 143 - 128
src/include/gnunet_crypto_lib.h

@@ -231,7 +231,8 @@ struct GNUNET_CRYPTO_AuthKey
  * @param len the length of the buffer in bytes
  * @return the resulting CRC32 checksum
  */
-int32_t GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
+int32_t
+GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
 
 
 /**
@@ -241,7 +242,8 @@ int32_t GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
  * @param i the upper limit (exclusive) for the random number
  * @return a random value in the interval [0,i) (exclusive).
  */
-uint32_t GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i);
+uint32_t
+GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i);
 
 
 /**
@@ -251,8 +253,8 @@ uint32_t GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i);
  * @param max value returned will be in range [0,max) (exclusive)
  * @return random 64-bit number
  */
-uint64_t GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode,
-                                   uint64_t max);
+uint64_t
+GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode, uint64_t max);
 
 
 /**
@@ -262,8 +264,8 @@ uint64_t GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode,
  * @param n the size of the array
  * @return the permutation array (allocated from heap)
  */
-unsigned int *GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode,
-                                            unsigned int n);
+unsigned int *
+GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode, unsigned int n);
 
 
 /**
@@ -271,8 +273,8 @@ unsigned int *GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode,
  *
  * @param key key to initialize
  */
-void GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey
-                                           *key);
+void
+GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey *key);
 
 /**
  * Check that a new session key is well-formed.
@@ -280,8 +282,9 @@ void GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey
  * @param key key to check
  * @return GNUNET_OK if the key is valid
  */
-int GNUNET_CRYPTO_aes_check_session_key (const struct
-                                         GNUNET_CRYPTO_AesSessionKey *key);
+int
+GNUNET_CRYPTO_aes_check_session_key (const struct GNUNET_CRYPTO_AesSessionKey
+                                     *key);
 
 
 /**
@@ -295,12 +298,11 @@ int GNUNET_CRYPTO_aes_check_session_key (const struct
  *        for streams.
  * @return the size of the encrypted block, -1 for errors
  */
-ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
-                                   const struct GNUNET_CRYPTO_AesSessionKey
-                                   *sessionkey,
-                                   const struct
-                                   GNUNET_CRYPTO_AesInitializationVector *iv,
-                                   void *result);
+ssize_t
+GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
+                           const struct GNUNET_CRYPTO_AesSessionKey *sessionkey,
+                           const struct GNUNET_CRYPTO_AesInitializationVector
+                           *iv, void *result);
 
 
 /**
@@ -313,12 +315,11 @@ ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
  * @param result address to store the result at
  * @return -1 on failure, size of decrypted block on success
  */
-ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
-                                   const struct GNUNET_CRYPTO_AesSessionKey
-                                   *sessionkey,
-                                   const struct
-                                   GNUNET_CRYPTO_AesInitializationVector *iv,
-                                   void *result);
+ssize_t
+GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
+                           const struct GNUNET_CRYPTO_AesSessionKey *sessionkey,
+                           const struct GNUNET_CRYPTO_AesInitializationVector
+                           *iv, void *result);
 
 
 /**
@@ -329,11 +330,10 @@ ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
  * @param salt_len size of the salt
  * @param ... pairs of void * & size_t for context chunks, terminated by NULL
  */
-void GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector
-                                  *iv,
-                                  const struct GNUNET_CRYPTO_AesSessionKey
-                                  *skey, const void *salt, size_t salt_len,
-                                  ...);
+void
+GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv,
+                             const struct GNUNET_CRYPTO_AesSessionKey *skey,
+                             const void *salt, size_t salt_len, ...);
 
 
 /**
@@ -344,11 +344,10 @@ void GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector
  * @param salt_len size of the salt
  * @param argp pairs of void * & size_t for context chunks, terminated by NULL
  */
-void GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector
-                                    *iv,
-                                    const struct GNUNET_CRYPTO_AesSessionKey
-                                    *skey, const void *salt, size_t salt_len,
-                                    va_list argp);
+void
+GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector *iv,
+                               const struct GNUNET_CRYPTO_AesSessionKey *skey,
+                               const void *salt, size_t salt_len, va_list argp);
 
 
 /**
@@ -357,8 +356,9 @@ void GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector
  * @param result where to store the encoding (struct GNUNET_CRYPTO_HashAsciiEncoded can be
  *  safely cast to char*, a '\\0' termination is set).
  */
-void GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
-                                struct GNUNET_CRYPTO_HashAsciiEncoded *result);
+void
+GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
+                           struct GNUNET_CRYPTO_HashAsciiEncoded *result);
 
 
 /**
@@ -367,7 +367,8 @@ void GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
  * @param result where to store the GNUNET_CRYPTO_hash code
  * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding
  */
-int GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
+int
+GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
 
 
 /**
@@ -381,8 +382,9 @@ int GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
  * @param b some hash code
  * @return number between 0 and UINT32_MAX
  */
-uint32_t GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
-                                          const GNUNET_HashCode * b);
+uint32_t
+GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
+                                 const GNUNET_HashCode * b);
 
 
 /**
@@ -392,7 +394,8 @@ uint32_t GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
  * @param size size of the block
  * @param ret pointer to where to write the hashcode
  */
-void GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
+void
+GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
 
 
 /**
@@ -403,9 +406,10 @@ void GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
  * @param plaintext_len length of plaintext
  * @param hmac where to store the hmac
  */
-void GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
-                         const void *plaintext, size_t plaintext_len,
-                         GNUNET_HashCode * hmac);
+void
+GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
+                    const void *plaintext, size_t plaintext_len,
+                    GNUNET_HashCode * hmac);
 
 
 /**
@@ -435,16 +439,11 @@ struct GNUNET_CRYPTO_FileHashContext;
  * @param callback_cls closure for callback
  * @return NULL on (immediate) errror
  */
-struct GNUNET_CRYPTO_FileHashContext *GNUNET_CRYPTO_hash_file (enum
-                                                               GNUNET_SCHEDULER_Priority
-                                                               priority,
-                                                               const char
-                                                               *filename,
-                                                               size_t blocksize,
-                                                               GNUNET_CRYPTO_HashCompletedCallback
-                                                               callback,
-                                                               void
-                                                               *callback_cls);
+struct GNUNET_CRYPTO_FileHashContext *
+GNUNET_CRYPTO_hash_file (enum GNUNET_SCHEDULER_Priority priority,
+                         const char *filename, size_t blocksize,
+                         GNUNET_CRYPTO_HashCompletedCallback callback,
+                         void *callback_cls);
 
 
 /**
@@ -452,7 +451,8 @@ struct GNUNET_CRYPTO_FileHashContext *GNUNET_CRYPTO_hash_file (enum
  *
  * @param fhc operation to cancel (callback must not yet have been invoked)
  */
-void GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
+void
+GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
 
 
 /**
@@ -461,8 +461,9 @@ void GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
  * @param mode desired quality level
  * @param result hash code that is randomized
  */
-void GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
-                                       GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
+                                  GNUNET_HashCode * result);
 
 
 /**
@@ -472,9 +473,10 @@ void GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
  * @param b some hash code
  * @param result set to b - a 
  */
-void GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
-                                    const GNUNET_HashCode * b,
-                                    GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
+                               const GNUNET_HashCode * b,
+                               GNUNET_HashCode * result);
 
 
 /**
@@ -484,9 +486,10 @@ void GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
  * @param delta some hash code
  * @param result set to a + delta
  */
-void GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
-                             const GNUNET_HashCode * delta,
-                             GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
+                        const GNUNET_HashCode * delta,
+                        GNUNET_HashCode * result);
 
 
 /**
@@ -496,9 +499,9 @@ void GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
  * @param b some hash code
  * @param result set to a ^ b 
  */
-void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a,
-                             const GNUNET_HashCode * b,
-                             GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
+                        GNUNET_HashCode * result);
 
 
 /**
@@ -508,10 +511,11 @@ void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a,
  * @param skey set to a valid session key
  * @param iv set to a valid initialization vector
  */
-void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
-                                    struct GNUNET_CRYPTO_AesSessionKey *skey,
-                                    struct GNUNET_CRYPTO_AesInitializationVector
-                                    *iv);
+void
+GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
+                               struct GNUNET_CRYPTO_AesSessionKey *skey,
+                               struct GNUNET_CRYPTO_AesInitializationVector
+                               *iv);
 
 
 /**
@@ -521,7 +525,8 @@ void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
  * @param bit index into the hashcode, [0...159]
  * @return Bit \a bit from hashcode \a code, -1 for invalid index
  */
-int GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
+int
+GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
 
 /**
  * Determine how many low order bits match in two
@@ -535,8 +540,9 @@ int GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
  *
  * @return the number of bits that match
  */
-unsigned int GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
-                                               const GNUNET_HashCode * second);
+unsigned int
+GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
+                                  const GNUNET_HashCode * second);
 
 
 /**
@@ -547,8 +553,8 @@ unsigned int GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
  * @param h2 some hash code
  * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
  */
-int GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1,
-                            const GNUNET_HashCode * h2);
+int
+GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2);
 
 
 /**
@@ -560,9 +566,10 @@ int GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1,
  * @param target some hash code
  * @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2.
  */
-int GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
-                               const GNUNET_HashCode * h2,
-                               const GNUNET_HashCode * target);
+int
+GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
+                           const GNUNET_HashCode * h2,
+                           const GNUNET_HashCode * target);
 
 
 /**
@@ -573,10 +580,11 @@ int GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
  * @param salt_len size of the salt
  * @param argp pair of void * & size_t for context chunks, terminated by NULL
  */
-void GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
-                                      const struct GNUNET_CRYPTO_AesSessionKey
-                                      *rkey, const void *salt, size_t salt_len,
-                                      va_list argp);
+void
+GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
+                                 const struct GNUNET_CRYPTO_AesSessionKey *rkey,
+                                 const void *salt, size_t salt_len,
+                                 va_list argp);
 
 
 /**
@@ -587,10 +595,10 @@ void GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
  * @param salt_len size of the salt
  * @param ... pair of void * & size_t for context chunks, terminated by NULL
  */
-void GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
-                                    const struct GNUNET_CRYPTO_AesSessionKey
-                                    *rkey, const void *salt, size_t salt_len,
-                                    ...);
+void
+GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
+                               const struct GNUNET_CRYPTO_AesSessionKey *rkey,
+                               const void *salt, size_t salt_len, ...);
 
 /**
  * @brief Derive key
@@ -604,9 +612,10 @@ void GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
  * @param skm_len length of skm
  * @return GNUNET_YES on success
  */
-int GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo,
-                        int prf_algo, const void *xts, size_t xts_len,
-                        const void *skm, size_t skm_len, ...);
+int
+GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo, int prf_algo,
+                    const void *xts, size_t xts_len, const void *skm,
+                    size_t skm_len, ...);
 
 
 /**
@@ -622,9 +631,10 @@ int GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo,
  * @param argp va_list of void * & size_t pairs for context chunks
  * @return GNUNET_YES on success
  */
-int GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo,
-                          int prf_algo, const void *xts, size_t xts_len,
-                          const void *skm, size_t skm_len, va_list argp);
+int
+GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo, int prf_algo,
+                      const void *xts, size_t xts_len, const void *skm,
+                      size_t skm_len, va_list argp);
 
 
 /**
@@ -638,9 +648,10 @@ int GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo,
  * @param argp va_list of void * & size_t pairs for context chunks
  * @return GNUNET_YES on success
  */
-int GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
-                         size_t xts_len, const void *skm, size_t skm_len,
-                         va_list argp);
+int
+GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
+                     size_t xts_len, const void *skm, size_t skm_len,
+                     va_list argp);
 
 
 /**
@@ -654,8 +665,9 @@ int GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
  * @param ... void * & size_t pairs for context chunks
  * @return GNUNET_YES on success
  */
-int GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
-                       size_t xts_len, const void *skm, size_t skm_len, ...);
+int
+GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
+                   size_t xts_len, const void *skm, size_t skm_len, ...);
 
 
 /**
@@ -663,7 +675,8 @@ int GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
  *
  * @return fresh private key
  */
-struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_key_create (void);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create (void);
 
 /**
  * Decode the private key from the data-format back
@@ -672,9 +685,8 @@ struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_key_create (void);
  * @param buf the buffer where the private key data is stored
  * @param len the length of the data in 'buffer'
  */
-struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_decode_key (const char
-                                                                  *buf,
-                                                                  uint16_t len);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_decode_key (const char *buf, uint16_t len);
 
 /**
  * Create a new private key by reading it from a file.  If the
@@ -690,8 +702,8 @@ struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_decode_key (const char
  * @return new private key, NULL on error (for example,
  *   permission denied)
  */
-struct GNUNET_CRYPTO_RsaPrivateKey
-    *GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename);
 
 
 /**
@@ -701,15 +713,16 @@ struct GNUNET_CRYPTO_RsaPrivateKey
  * @param hc "random" input to PRNG
  * @return some private key purely dependent on input
  */
-struct GNUNET_CRYPTO_RsaPrivateKey
-    *GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc);
 
 
 /**
  * Free memory occupied by the private key.
  * @param hostkey pointer to the memory to free
  */
-void GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
+void
+GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
 
 
 /**
@@ -718,11 +731,11 @@ void GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
  * @param priv the private key
  * @param pub where to write the public key
  */
-void GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
-                                       *priv,
-                                       struct
-                                       GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                                       *pub);
+void
+GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
+                                  *priv,
+                                  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                                  *pub);
 
 
 /**
@@ -735,11 +748,11 @@ void GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
  * @param target where to store the encrypted block
  * @return GNUNET_SYSERR on error, GNUNET_OK if ok
  */
-int GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
-                               const struct
-                               GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                               *publicKey,
-                               struct GNUNET_CRYPTO_RsaEncryptedData *target);
+int
+GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
+                           const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                           *publicKey,
+                           struct GNUNET_CRYPTO_RsaEncryptedData *target);
 
 
 /**
@@ -751,10 +764,10 @@ int GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
  * @param max how many bytes of a result are expected? Must be exact.
  * @return the size of the decrypted block (that is, size) or -1 on error
  */
-ssize_t GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey
-                                   *key,
-                                   const struct GNUNET_CRYPTO_RsaEncryptedData
-                                   *block, void *result, size_t max);
+ssize_t
+GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
+                           const struct GNUNET_CRYPTO_RsaEncryptedData *block,
+                           void *result, size_t max);
 
 
 /**
@@ -765,9 +778,10 @@ ssize_t GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey
  * @param sig where to write the signature
  * @return GNUNET_SYSERR on error, GNUNET_OK on success
  */
-int GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
-                            const struct GNUNET_CRYPTO_RsaSignaturePurpose
-                            *purpose, struct GNUNET_CRYPTO_RsaSignature *sig);
+int
+GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
+                        const struct GNUNET_CRYPTO_RsaSignaturePurpose *purpose,
+                        struct GNUNET_CRYPTO_RsaSignature *sig);
 
 
 /**
@@ -780,13 +794,13 @@ int GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
  * @param publicKey public key of the signer
  * @return GNUNET_OK if ok, GNUNET_SYSERR if invalid
  */
-int GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
-                              const struct GNUNET_CRYPTO_RsaSignaturePurpose
-                              *validate,
-                              const struct GNUNET_CRYPTO_RsaSignature *sig,
-                              const struct
-                              GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                              *publicKey);
+int
+GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
+                          const struct GNUNET_CRYPTO_RsaSignaturePurpose
+                          *validate,
+                          const struct GNUNET_CRYPTO_RsaSignature *sig,
+                          const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                          *publicKey);
 
 
 
@@ -795,7 +809,8 @@ int GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
  * where strong entropy gathering is not desired
  * (for example, for hostkey generation). 
  */
-void GNUNET_CRYPTO_random_disable_entropy_gathering (void);
+void
+GNUNET_CRYPTO_random_disable_entropy_gathering (void);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {

+ 14 - 14
src/include/gnunet_datacache_lib.h

@@ -56,10 +56,9 @@ struct GNUNET_DATACACHE_Handle;
  * @param section section in the configuration that contains our options
  * @return handle to use to access the service
  */
-struct GNUNET_DATACACHE_Handle *GNUNET_DATACACHE_create (const struct
-                                                         GNUNET_CONFIGURATION_Handle
-                                                         *cfg,
-                                                         const char *section);
+struct GNUNET_DATACACHE_Handle *
+GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                         const char *section);
 
 
 /**
@@ -67,7 +66,8 @@ struct GNUNET_DATACACHE_Handle *GNUNET_DATACACHE_create (const struct
  *
  * @param h handle to the datastore
  */
-void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
+void
+GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
 
 
 /**
@@ -99,10 +99,11 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
  * @param discard_time when to discard the value in any case
  * @return GNUNET_OK on success, GNUNET_SYSERR on error (full, etc.)
  */
-int GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
-                          const GNUNET_HashCode * key, size_t size,
-                          const char *data, enum GNUNET_BLOCK_Type type,
-                          struct GNUNET_TIME_Absolute discard_time);
+int
+GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
+                      const GNUNET_HashCode * key, size_t size,
+                      const char *data, enum GNUNET_BLOCK_Type type,
+                      struct GNUNET_TIME_Absolute discard_time);
 
 
 /**
@@ -116,11 +117,10 @@ int GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
  * @param iter_cls closure for iter
  * @return the number of results found
  */
-unsigned int GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
-                                   const GNUNET_HashCode * key,
-                                   enum GNUNET_BLOCK_Type type,
-                                   GNUNET_DATACACHE_Iterator iter,
-                                   void *iter_cls);
+unsigned int
+GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
+                      const GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
+                      GNUNET_DATACACHE_Iterator iter, void *iter_cls);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 72 - 152
src/include/gnunet_datastore_service.h

@@ -63,9 +63,8 @@ struct GNUNET_DATASTORE_Handle;
  * @param cfg configuration to use
  * @return handle to use to access the service
  */
-struct GNUNET_DATASTORE_Handle *GNUNET_DATASTORE_connect (const struct
-                                                          GNUNET_CONFIGURATION_Handle
-                                                          *cfg);
+struct GNUNET_DATASTORE_Handle *
+GNUNET_DATASTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -75,7 +74,8 @@ struct GNUNET_DATASTORE_Handle *GNUNET_DATASTORE_connect (const struct
  * @param h handle to the datastore
  * @param drop set to GNUNET_YES to delete all data in datastore (!)
  */
-void GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop);
+void
+GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop);
 
 
 /**
@@ -112,21 +112,13 @@ typedef void (*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls,
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_reserve (struct
-                                                              GNUNET_DATASTORE_Handle
-                                                              *h,
-                                                              uint64_t amount,
-                                                              uint32_t entries,
-                                                              unsigned int
-                                                              queue_priority,
-                                                              unsigned int
-                                                              max_queue_size,
-                                                              struct
-                                                              GNUNET_TIME_Relative
-                                                              timeout,
-                                                              GNUNET_DATASTORE_ContinuationWithStatus
-                                                              cont,
-                                                              void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount,
+                          uint32_t entries, unsigned int queue_priority,
+                          unsigned int max_queue_size,
+                          struct GNUNET_TIME_Relative timeout,
+                          GNUNET_DATASTORE_ContinuationWithStatus cont,
+                          void *cont_cls);
 
 
 /**
@@ -155,29 +147,17 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_reserve (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_put (struct
-                                                          GNUNET_DATASTORE_Handle
-                                                          *h, uint32_t rid,
-                                                          const GNUNET_HashCode
-                                                          * key, size_t size,
-                                                          const void *data,
-                                                          enum GNUNET_BLOCK_Type
-                                                          type,
-                                                          uint32_t priority,
-                                                          uint32_t anonymity,
-                                                          uint32_t replication,
-                                                          struct
-                                                          GNUNET_TIME_Absolute
-                                                          expiration,
-                                                          unsigned int
-                                                          queue_priority,
-                                                          unsigned int
-                                                          max_queue_size,
-                                                          struct
-                                                          GNUNET_TIME_Relative
-                                                          timeout,
-                                                          GNUNET_DATASTORE_ContinuationWithStatus
-                                                          cont, void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
+                      const GNUNET_HashCode * key, size_t size,
+                      const void *data, enum GNUNET_BLOCK_Type type,
+                      uint32_t priority, uint32_t anonymity,
+                      uint32_t replication,
+                      struct GNUNET_TIME_Absolute expiration,
+                      unsigned int queue_priority, unsigned int max_queue_size,
+                      struct GNUNET_TIME_Relative timeout,
+                      GNUNET_DATASTORE_ContinuationWithStatus cont,
+                      void *cont_cls);
 
 
 /**
@@ -201,24 +181,13 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_put (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_release_reserve (struct
-                                                                      GNUNET_DATASTORE_Handle
-                                                                      *h,
-                                                                      uint32_t
-                                                                      rid,
-                                                                      unsigned
-                                                                      int
-                                                                      queue_priority,
-                                                                      unsigned
-                                                                      int
-                                                                      max_queue_size,
-                                                                      struct
-                                                                      GNUNET_TIME_Relative
-                                                                      timeout,
-                                                                      GNUNET_DATASTORE_ContinuationWithStatus
-                                                                      cont,
-                                                                      void
-                                                                      *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
+                                  uint32_t rid, unsigned int queue_priority,
+                                  unsigned int max_queue_size,
+                                  struct GNUNET_TIME_Relative timeout,
+                                  GNUNET_DATASTORE_ContinuationWithStatus cont,
+                                  void *cont_cls);
 
 
 /**
@@ -238,23 +207,15 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_release_reserve (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_update (struct
-                                                             GNUNET_DATASTORE_Handle
-                                                             *h, uint64_t uid,
-                                                             uint32_t priority,
-                                                             struct
-                                                             GNUNET_TIME_Absolute
-                                                             expiration,
-                                                             unsigned int
-                                                             queue_priority,
-                                                             unsigned int
-                                                             max_queue_size,
-                                                             struct
-                                                             GNUNET_TIME_Relative
-                                                             timeout,
-                                                             GNUNET_DATASTORE_ContinuationWithStatus
-                                                             cont,
-                                                             void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
+                         uint32_t priority,
+                         struct GNUNET_TIME_Absolute expiration,
+                         unsigned int queue_priority,
+                         unsigned int max_queue_size,
+                         struct GNUNET_TIME_Relative timeout,
+                         GNUNET_DATASTORE_ContinuationWithStatus cont,
+                         void *cont_cls);
 
 
 /**
@@ -278,23 +239,14 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_update (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_remove (struct
-                                                             GNUNET_DATASTORE_Handle
-                                                             *h,
-                                                             const
-                                                             GNUNET_HashCode *
-                                                             key, size_t size,
-                                                             const void *data,
-                                                             unsigned int
-                                                             queue_priority,
-                                                             unsigned int
-                                                             max_queue_size,
-                                                             struct
-                                                             GNUNET_TIME_Relative
-                                                             timeout,
-                                                             GNUNET_DATASTORE_ContinuationWithStatus
-                                                             cont,
-                                                             void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
+                         const GNUNET_HashCode * key, size_t size,
+                         const void *data, unsigned int queue_priority,
+                         unsigned int max_queue_size,
+                         struct GNUNET_TIME_Relative timeout,
+                         GNUNET_DATASTORE_ContinuationWithStatus cont,
+                         void *cont_cls);
 
 
 /**
@@ -342,26 +294,14 @@ typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_key (struct
-                                                              GNUNET_DATASTORE_Handle
-                                                              *h,
-                                                              uint64_t offset,
-                                                              const
-                                                              GNUNET_HashCode *
-                                                              key,
-                                                              enum
-                                                              GNUNET_BLOCK_Type
-                                                              type,
-                                                              unsigned int
-                                                              queue_priority,
-                                                              unsigned int
-                                                              max_queue_size,
-                                                              struct
-                                                              GNUNET_TIME_Relative
-                                                              timeout,
-                                                              GNUNET_DATASTORE_DatumProcessor
-                                                              proc,
-                                                              void *proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
+                          const GNUNET_HashCode * key,
+                          enum GNUNET_BLOCK_Type type,
+                          unsigned int queue_priority,
+                          unsigned int max_queue_size,
+                          struct GNUNET_TIME_Relative timeout,
+                          GNUNET_DATASTORE_DatumProcessor proc, void *proc_cls);
 
 
 /**
@@ -388,27 +328,15 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_key (struct
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_zero_anonymity (struct
-                                                                         GNUNET_DATASTORE_Handle
-                                                                         *h,
-                                                                         uint64_t
-                                                                         offset,
-                                                                         unsigned
-                                                                         int
-                                                                         queue_priority,
-                                                                         unsigned
-                                                                         int
-                                                                         max_queue_size,
-                                                                         struct
-                                                                         GNUNET_TIME_Relative
-                                                                         timeout,
-                                                                         enum
-                                                                         GNUNET_BLOCK_Type
-                                                                         type,
-                                                                         GNUNET_DATASTORE_DatumProcessor
-                                                                         proc,
-                                                                         void
-                                                                         *proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
+                                     uint64_t offset,
+                                     unsigned int queue_priority,
+                                     unsigned int max_queue_size,
+                                     struct GNUNET_TIME_Relative timeout,
+                                     enum GNUNET_BLOCK_Type type,
+                                     GNUNET_DATASTORE_DatumProcessor proc,
+                                     void *proc_cls);
 
 
 /**
@@ -430,22 +358,13 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_zero_anonymity (struct
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_for_replication (struct
-                                                                          GNUNET_DATASTORE_Handle
-                                                                          *h,
-                                                                          unsigned
-                                                                          int
-                                                                          queue_priority,
-                                                                          unsigned
-                                                                          int
-                                                                          max_queue_size,
-                                                                          struct
-                                                                          GNUNET_TIME_Relative
-                                                                          timeout,
-                                                                          GNUNET_DATASTORE_DatumProcessor
-                                                                          proc,
-                                                                          void
-                                                                          *proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
+                                      unsigned int queue_priority,
+                                      unsigned int max_queue_size,
+                                      struct GNUNET_TIME_Relative timeout,
+                                      GNUNET_DATASTORE_DatumProcessor proc,
+                                      void *proc_cls);
 
 
 
@@ -455,7 +374,8 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_for_replication (struct
  * 
  * @param qe operation to cancel
  */
-void GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
+void
+GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

+ 58 - 80
src/include/gnunet_dht_service.h

@@ -123,9 +123,9 @@ enum GNUNET_DHT_RouteOption
  *               processing multiple GET/FIND requests in parallel
  * @return NULL on error
  */
-struct GNUNET_DHT_Handle *GNUNET_DHT_connect (const struct
-                                              GNUNET_CONFIGURATION_Handle *cfg,
-                                              unsigned int ht_len);
+struct GNUNET_DHT_Handle *
+GNUNET_DHT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                    unsigned int ht_len);
 
 
 /**
@@ -133,7 +133,8 @@ struct GNUNET_DHT_Handle *GNUNET_DHT_connect (const struct
  *
  * @param handle connection to shut down
  */
-void GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
+void
+GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
 
 
 /* *************** Standard API: get and put ******************* */
@@ -154,14 +155,14 @@ void GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
  * @param cont continuation to call when done (transmitting request to service)
  * @param cont_cls closure for cont
  */
-void GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
-                     const GNUNET_HashCode * key,
-                     uint32_t desired_replication_level,
-                     enum GNUNET_DHT_RouteOption options,
-                     enum GNUNET_BLOCK_Type type, size_t size, const char *data,
-                     struct GNUNET_TIME_Absolute exp,
-                     struct GNUNET_TIME_Relative timeout,
-                     GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const GNUNET_HashCode * key,
+                uint32_t desired_replication_level,
+                enum GNUNET_DHT_RouteOption options,
+                enum GNUNET_BLOCK_Type type, size_t size, const char *data,
+                struct GNUNET_TIME_Absolute exp,
+                struct GNUNET_TIME_Relative timeout, GNUNET_SCHEDULER_Task cont,
+                void *cont_cls);
 
 
 /**
@@ -211,23 +212,16 @@ typedef void (*GNUNET_DHT_GetIterator) (void *cls,
  *
  * @return handle to stop the async get
  */
-struct GNUNET_DHT_GetHandle *GNUNET_DHT_get_start (struct GNUNET_DHT_Handle
-                                                   *handle,
-                                                   struct GNUNET_TIME_Relative
-                                                   timeout,
-                                                   enum GNUNET_BLOCK_Type type,
-                                                   const GNUNET_HashCode * key,
-                                                   uint32_t
-                                                   desired_replication_level,
-                                                   enum GNUNET_DHT_RouteOption
-                                                   options,
-                                                   const struct
-                                                   GNUNET_CONTAINER_BloomFilter
-                                                   *bf, int32_t bf_mutator,
-                                                   const void *xquery,
-                                                   size_t xquery_size,
-                                                   GNUNET_DHT_GetIterator iter,
-                                                   void *iter_cls);
+struct GNUNET_DHT_GetHandle *
+GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
+                      struct GNUNET_TIME_Relative timeout,
+                      enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
+                      uint32_t desired_replication_level,
+                      enum GNUNET_DHT_RouteOption options,
+                      const struct GNUNET_CONTAINER_BloomFilter *bf,
+                      int32_t bf_mutator, const void *xquery,
+                      size_t xquery_size, GNUNET_DHT_GetIterator iter,
+                      void *iter_cls);
 
 
 /**
@@ -238,7 +232,8 @@ struct GNUNET_DHT_GetHandle *GNUNET_DHT_get_start (struct GNUNET_DHT_Handle
  * On return get_handle will no longer be valid, caller
  * must not use again!!!
  */
-void GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle);
+void
+GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle);
 
 
 /* ******** Special high-level API for finding peers *********** */
@@ -267,21 +262,12 @@ typedef void (*GNUNET_DHT_FindPeerProcessor) (void *cls,
  * @param proc_cls closure for proc
  * @return handle to stop the async get, NULL on error
  */
-struct GNUNET_DHT_FindPeerHandle *GNUNET_DHT_find_peer_start (struct
-                                                              GNUNET_DHT_Handle
-                                                              *handle,
-                                                              struct
-                                                              GNUNET_TIME_Relative
-                                                              timeout,
-                                                              const
-                                                              GNUNET_HashCode *
-                                                              key,
-                                                              enum
-                                                              GNUNET_DHT_RouteOption
-                                                              options,
-                                                              GNUNET_DHT_FindPeerProcessor
-                                                              proc,
-                                                              void *proc_cls);
+struct GNUNET_DHT_FindPeerHandle *
+GNUNET_DHT_find_peer_start (struct GNUNET_DHT_Handle *handle,
+                            struct GNUNET_TIME_Relative timeout,
+                            const GNUNET_HashCode * key,
+                            enum GNUNET_DHT_RouteOption options,
+                            GNUNET_DHT_FindPeerProcessor proc, void *proc_cls);
 
 
 /**
@@ -289,8 +275,8 @@ struct GNUNET_DHT_FindPeerHandle *GNUNET_DHT_find_peer_start (struct
  *
  * @param find_peer_handle GET operation to stop.
  */
-void GNUNET_DHT_find_peer_stop (struct GNUNET_DHT_FindPeerHandle
-                                *find_peer_handle);
+void
+GNUNET_DHT_find_peer_stop (struct GNUNET_DHT_FindPeerHandle *find_peer_handle);
 
 
 
@@ -337,25 +323,15 @@ typedef void (*GNUNET_DHT_ReplyProcessor) (void *cls,
  * @param cont_cls closure for cont
  * @return handle to stop the request, NULL if the request is "fire and forget"
  */
-struct GNUNET_DHT_RouteHandle *GNUNET_DHT_route_start (struct GNUNET_DHT_Handle
-                                                       *handle,
-                                                       const GNUNET_HashCode *
-                                                       key,
-                                                       uint32_t
-                                                       desired_replication_level,
-                                                       enum
-                                                       GNUNET_DHT_RouteOption
-                                                       options,
-                                                       const struct
-                                                       GNUNET_MessageHeader
-                                                       *enc,
-                                                       struct
-                                                       GNUNET_TIME_Relative
-                                                       timeout,
-                                                       GNUNET_DHT_ReplyProcessor
-                                                       iter, void *iter_cls,
-                                                       GNUNET_SCHEDULER_Task
-                                                       cont, void *cont_cls);
+struct GNUNET_DHT_RouteHandle *
+GNUNET_DHT_route_start (struct GNUNET_DHT_Handle *handle,
+                        const GNUNET_HashCode * key,
+                        uint32_t desired_replication_level,
+                        enum GNUNET_DHT_RouteOption options,
+                        const struct GNUNET_MessageHeader *enc,
+                        struct GNUNET_TIME_Relative timeout,
+                        GNUNET_DHT_ReplyProcessor iter, void *iter_cls,
+                        GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 
@@ -364,7 +340,8 @@ struct GNUNET_DHT_RouteHandle *GNUNET_DHT_route_start (struct GNUNET_DHT_Handle
  *
  * @param route_handle  operation to stop.
  */
-void GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
+void
+GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
 
 
 /* ***** Special API for controlling DHT routing maintenance ******* */
@@ -381,8 +358,9 @@ void GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
  * @param cont_cls closure for cont
  * @param handle handle to the DHT service
  */
-void GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
-                            GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
+                       GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 /* ***** Special API for testing robustness with malicious peers ******* */
 
@@ -402,9 +380,9 @@ void GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
  * @param cont_cls closure for cont
  *
  */
-void GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle,
-                                       GNUNET_SCHEDULER_Task cont,
-                                       void *cont_cls);
+void
+GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle,
+                                  GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 /**
@@ -416,10 +394,10 @@ void GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle,
  * @param cont continuation to call when done (transmitting request to service)
  * @param cont_cls closure for cont
  */
-void GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
-                                      struct GNUNET_TIME_Relative frequency,
-                                      GNUNET_SCHEDULER_Task cont,
-                                      void *cont_cls);
+void
+GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
+                                 struct GNUNET_TIME_Relative frequency,
+                                 GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 /**
@@ -431,10 +409,10 @@ void GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
  * @param cont continuation to call when done (transmitting request to service)
  * @param cont_cls closure for cont
  */
-void GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle,
-                                      struct GNUNET_TIME_Relative frequency,
-                                      GNUNET_SCHEDULER_Task cont,
-                                      void *cont_cls);
+void
+GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle,
+                                 struct GNUNET_TIME_Relative frequency,
+                                 GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 #endif

+ 94 - 77
src/include/gnunet_disk_lib.h

@@ -262,7 +262,8 @@ enum GNUNET_DISK_PipeEnd
  * @param part a file on the partition to check
  * @return -1 on errors, otherwise the number of free blocks
  */
-long GNUNET_DISK_get_blocks_available (const char *part);
+long
+GNUNET_DISK_get_blocks_available (const char *part);
 
 
 /**
@@ -271,7 +272,8 @@ long GNUNET_DISK_get_blocks_available (const char *part);
  * @param h handle to check
  * @return GNUNET_YES if invalid, GNUNET_NO if valid
  */
-int GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
 
 
 /**
@@ -282,7 +284,8 @@ int GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
  * @return GNUNET_YES if yes, GNUNET_NO if not a file, GNUNET_SYSERR if something
  * else (will print an error message in that case, too).
  */
-int GNUNET_DISK_file_test (const char *fil);
+int
+GNUNET_DISK_file_test (const char *fil);
 
 
 /**
@@ -292,8 +295,9 @@ int GNUNET_DISK_file_test (const char *fil);
  * @param whence specification to which position the offset parameter relates to
  * @return the new position on success, GNUNET_SYSERR otherwise
  */
-off_t GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h,
-                             off_t offset, enum GNUNET_DISK_Seek whence);
+off_t
+GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, off_t offset,
+                       enum GNUNET_DISK_Seek whence);
 
 
 /**
@@ -308,8 +312,9 @@ off_t GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h,
  *        included?
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_DISK_file_size (const char *filename, uint64_t * size,
-                           int includeSymLinks);
+int
+GNUNET_DISK_file_size (const char *filename, uint64_t * size,
+                       int includeSymLinks);
 
 
 /**
@@ -327,8 +332,9 @@ int GNUNET_DISK_file_size (const char *filename, uint64_t * size,
  * @param ino set to the inode ID
  * @return GNUNET_OK on success
  */
-int GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
-                                      uint64_t * ino);
+int
+GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
+                                  uint64_t * ino);
 
 
 /**
@@ -342,7 +348,8 @@ int GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
  * @return NULL on error, otherwise name of fresh
  *         file on disk in directory for temporary files
  */
-char *GNUNET_DISK_mktemp (const char *t);
+char *
+GNUNET_DISK_mktemp (const char *t);
 
 
 /**
@@ -357,12 +364,9 @@ char *GNUNET_DISK_mktemp (const char *t);
  *             call (because of flags)
  * @return IO handle on success, NULL on error
  */
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_file_open (const char *fn,
-                                                      enum GNUNET_DISK_OpenFlags
-                                                      flags,
-                                                      enum
-                                                      GNUNET_DISK_AccessPermissions
-                                                      perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_file_open (const char *fn, enum GNUNET_DISK_OpenFlags flags,
+                       enum GNUNET_DISK_AccessPermissions perm);
 
 /**
  * Creates an interprocess channel
@@ -371,8 +375,8 @@ struct GNUNET_DISK_FileHandle *GNUNET_DISK_file_open (const char *fn,
  * @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT only)
  * @return handle to the new pipe, NULL on error
  */
-struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, int inherit_read,
-                                                 int inherit_write);
+struct GNUNET_DISK_PipeHandle *
+GNUNET_DISK_pipe (int blocking, int inherit_read, int inherit_write);
 
 
 /**
@@ -380,7 +384,8 @@ struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, int inherit_read,
  * @param p pipe
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
+int
+GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
 
 /**
  * Closes one half of an interprocess channel
@@ -389,8 +394,9 @@ int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
  * @param end which end of the pipe to close
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
-                                enum GNUNET_DISK_PipeEnd end);
+int
+GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
+                            enum GNUNET_DISK_PipeEnd end);
 
 /**
  * Close an open file.
@@ -398,7 +404,8 @@ int GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
  * @param h file handle
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
 
 
 /**
@@ -408,12 +415,9 @@ int GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
  * @param n end to access
  * @return handle for the respective end
  */
-const struct GNUNET_DISK_FileHandle *GNUNET_DISK_pipe_handle (const struct
-                                                              GNUNET_DISK_PipeHandle
-                                                              *p,
-                                                              enum
-                                                              GNUNET_DISK_PipeEnd
-                                                              n);
+const struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p,
+                         enum GNUNET_DISK_PipeEnd n);
 
 /**
  * Read the contents of a binary file into a buffer.
@@ -422,8 +426,9 @@ const struct GNUNET_DISK_FileHandle *GNUNET_DISK_pipe_handle (const struct
  * @param len the maximum number of bytes to read
  * @return the number of bytes read on success, GNUNET_SYSERR on failure
  */
-ssize_t GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
-                               void *result, size_t len);
+ssize_t
+GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result,
+                       size_t len);
 
 
 /**
@@ -434,7 +439,8 @@ ssize_t GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
  * @param len the maximum number of bytes to read
  * @return number of bytes read, GNUNET_SYSERR on failure
  */
-ssize_t GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
+ssize_t
+GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
 
 
 /**
@@ -445,8 +451,9 @@ ssize_t GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
  * @param n number of bytes to write
  * @return number of bytes written on success, GNUNET_SYSERR on error
  */
-ssize_t GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
-                                const void *buffer, size_t n);
+ssize_t
+GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
+                        const void *buffer, size_t n);
 
 
 /**
@@ -459,8 +466,9 @@ ssize_t GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
  * @param mode file permissions 
  * @return number of bytes written on success, GNUNET_SYSERR on error
  */
-ssize_t GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
-                              enum GNUNET_DISK_AccessPermissions mode);
+ssize_t
+GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
+                      enum GNUNET_DISK_AccessPermissions mode);
 
 
 /**
@@ -470,7 +478,8 @@ ssize_t GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
  * @param dst destination file name
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_DISK_file_copy (const char *src, const char *dst);
+int
+GNUNET_DISK_file_copy (const char *src, const char *dst);
 
 
 /**
@@ -481,9 +490,10 @@ int GNUNET_DISK_file_copy (const char *src, const char *dst);
  * @param callback_cls closure for callback
  * @return the number of files found, -1 on error
  */
-int GNUNET_DISK_directory_scan (const char *dirName,
-                                GNUNET_FileNameCallback callback,
-                                void *callback_cls);
+int
+GNUNET_DISK_directory_scan (const char *dirName,
+                            GNUNET_FileNameCallback callback,
+                            void *callback_cls);
 
 
 /**
@@ -521,8 +531,9 @@ typedef void (*GNUNET_DISK_DirectoryIteratorCallback) (void *cls,
  *         GNUNET_NO if this was the last entry (and iteration is complete),
  *         GNUNET_SYSERR if "can" was YES
  */
-int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator
-                                         *iter, int can);
+int
+GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator *iter,
+                                     int can);
 
 
 /**
@@ -536,10 +547,11 @@ int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator
  * @param callback the method to call for each file
  * @param callback_cls closure for callback
  */
-void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
-                                           const char *dirName,
-                                           GNUNET_DISK_DirectoryIteratorCallback
-                                           callback, void *callback_cls);
+void
+GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
+                                      const char *dirName,
+                                      GNUNET_DISK_DirectoryIteratorCallback
+                                      callback, void *callback_cls);
 
 
 /**
@@ -550,7 +562,8 @@ void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
  * @returns GNUNET_OK on success, GNUNET_SYSERR on failure,
  *          GNUNET_NO if directory exists but is not writeable
  */
-int GNUNET_DISK_directory_create_for_file (const char *filename);
+int
+GNUNET_DISK_directory_create_for_file (const char *filename);
 
 
 /**
@@ -563,7 +576,8 @@ int GNUNET_DISK_directory_create_for_file (const char *filename);
  * @return GNUNET_YES if yes, GNUNET_NO if does not exist, GNUNET_SYSERR
  *   on any error and if exists but not directory
  */
-int GNUNET_DISK_directory_test (const char *fil);
+int
+GNUNET_DISK_directory_test (const char *fil);
 
 
 /**
@@ -573,7 +587,8 @@ int GNUNET_DISK_directory_test (const char *fil);
  * @param fileName the file to remove
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_DISK_directory_remove (const char *fileName);
+int
+GNUNET_DISK_directory_remove (const char *fileName);
 
 
 /**
@@ -582,7 +597,8 @@ int GNUNET_DISK_directory_remove (const char *fileName);
  * @param dir the directory to create
  * @returns GNUNET_SYSERR on failure, GNUNET_OK otherwise
  */
-int GNUNET_DISK_directory_create (const char *dir);
+int
+GNUNET_DISK_directory_create (const char *dir);
 
 
 /**
@@ -594,8 +610,9 @@ int GNUNET_DISK_directory_create (const char *dir);
  * @param excl GNUNET_YES for an exclusive lock
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart,
-                           off_t lockEnd, int excl);
+int
+GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart,
+                       off_t lockEnd, int excl);
 
 
 /**
@@ -605,15 +622,17 @@ int GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart,
  * @param unlockEnd absolute position until where to unlock
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh,
-                             off_t unlockStart, off_t unlockEnd);
+int
+GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, off_t unlockStart,
+                         off_t unlockEnd);
 
 
 /**
  * @brief Removes special characters as ':' from a filename.
  * @param fn the filename to canonicalize
  */
-void GNUNET_DISK_filename_canonicalize (char *fn);
+void
+GNUNET_DISK_filename_canonicalize (char *fn);
 
 
 /**
@@ -622,7 +641,8 @@ void GNUNET_DISK_filename_canonicalize (char *fn);
  * @param user new owner of the file
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_DISK_file_change_owner (const char *filename, const char *user);
+int
+GNUNET_DISK_file_change_owner (const char *filename, const char *user);
 
 
 /**
@@ -639,8 +659,9 @@ int GNUNET_DISK_file_change_owner (const char *filename, const char *user);
  *                private directory name.
  * @return the constructed filename
  */
-char *GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle
-                                     *cfg, const char *serviceName, ...);
+char *
+GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                               const char *serviceName, ...);
 
 
 /**
@@ -656,9 +677,10 @@ struct GNUNET_DISK_MapHandle;
  * @param len size of the mapping
  * @return pointer to the mapped memory region, NULL on failure
  */
-void *GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
-                            struct GNUNET_DISK_MapHandle **m,
-                            enum GNUNET_DISK_MapType access, size_t len);
+void *
+GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
+                      struct GNUNET_DISK_MapHandle **m,
+                      enum GNUNET_DISK_MapType access, size_t len);
 
 /**
  * Unmap a file
@@ -666,14 +688,16 @@ void *GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
  * @param h mapping handle
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
+int
+GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
 
 /**
  * Write file changes to disk
  * @param h handle to an open file
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
 
 /**
  * Creates a named pipe/FIFO and opens it
@@ -682,13 +706,9 @@ int GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
  * @param perm access permissions
  * @return pipe handle on success, NULL on error
  */
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_create (char **fn,
-                                                         enum
-                                                         GNUNET_DISK_OpenFlags
-                                                         flags,
-                                                         enum
-                                                         GNUNET_DISK_AccessPermissions
-                                                         perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_npipe_create (char **fn, enum GNUNET_DISK_OpenFlags flags,
+                          enum GNUNET_DISK_AccessPermissions perm);
 
 /**
  * Opens already existing named pipe/FIFO
@@ -698,20 +718,17 @@ struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_create (char **fn,
  * @param perm access permissions
  * @return pipe handle on success, NULL on error
  */
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_open (const char *fn,
-                                                       enum
-                                                       GNUNET_DISK_OpenFlags
-                                                       flags,
-                                                       enum
-                                                       GNUNET_DISK_AccessPermissions
-                                                       perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_npipe_open (const char *fn, enum GNUNET_DISK_OpenFlags flags,
+                        enum GNUNET_DISK_AccessPermissions perm);
 
 /**
  * Closes a named pipe/FIFO
  * @param pipe named pipe
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_npipe_close (struct GNUNET_DISK_FileHandle *pipe);
+int
+GNUNET_DISK_npipe_close (struct GNUNET_DISK_FileHandle *pipe);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {

+ 7 - 6
src/include/gnunet_dv_service.h

@@ -68,12 +68,13 @@ struct GNUNET_DV_Handle;
  * @param cont_cls closure for continuation
  *
  */
-int GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
-                    const struct GNUNET_PeerIdentity *target,
-                    const char *msgbuf, size_t msgbuf_size,
-                    unsigned int priority, struct GNUNET_TIME_Relative timeout,
-                    const void *addr, size_t addrlen,
-                    GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls);
+int
+GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
+                const struct GNUNET_PeerIdentity *target, const char *msgbuf,
+                size_t msgbuf_size, unsigned int priority,
+                struct GNUNET_TIME_Relative timeout, const void *addr,
+                size_t addrlen, GNUNET_TRANSPORT_TransmitContinuation cont,
+                void *cont_cls);
 
 
 

+ 26 - 38
src/include/gnunet_fragmentation_lib.h

@@ -80,22 +80,14 @@ typedef void (*GNUNET_FRAGMENT_MessageProcessor) (void *cls,
  * @param proc_cls closure for proc
  * @return the fragmentation context
  */
-struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct
-                                                                GNUNET_STATISTICS_Handle
-                                                                *stats,
-                                                                uint16_t mtu,
-                                                                struct
-                                                                GNUNET_BANDWIDTH_Tracker
-                                                                *tracker,
-                                                                struct
-                                                                GNUNET_TIME_Relative
-                                                                delay,
-                                                                const struct
-                                                                GNUNET_MessageHeader
-                                                                *msg,
-                                                                GNUNET_FRAGMENT_MessageProcessor
-                                                                proc,
-                                                                void *proc_cls);
+struct GNUNET_FRAGMENT_Context *
+GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
+                                uint16_t mtu,
+                                struct GNUNET_BANDWIDTH_Tracker *tracker,
+                                struct GNUNET_TIME_Relative delay,
+                                const struct GNUNET_MessageHeader *msg,
+                                GNUNET_FRAGMENT_MessageProcessor proc,
+                                void *proc_cls);
 
 
 /**
@@ -105,8 +97,8 @@ struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct
  *
  * @param fc fragmentation context
  */
-void GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context
-                                                *fc);
+void
+GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context *fc);
 
 
 /**
@@ -120,8 +112,9 @@ void GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context
  *         GNUNET_NO if more messages are pending
  *         GNUNET_SYSERR if this ack is not valid for this fc
  */
-int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
-                                 const struct GNUNET_MessageHeader *msg);
+int
+GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
+                             const struct GNUNET_MessageHeader *msg);
 
 
 /**
@@ -132,9 +125,8 @@ int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
  * @return average delay between transmission and ACK for the
  *         last message, FOREVER if the message was not fully transmitted
  */
-struct GNUNET_TIME_Relative GNUNET_FRAGMENT_context_destroy (struct
-                                                             GNUNET_FRAGMENT_Context
-                                                             *fc);
+struct GNUNET_TIME_Relative
+GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *fc);
 
 
 /**
@@ -171,18 +163,12 @@ typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, uint32_t id,
  *             back to the other side)
  * @return the defragmentation context
  */
-struct GNUNET_DEFRAGMENT_Context *GNUNET_DEFRAGMENT_context_create (struct
-                                                                    GNUNET_STATISTICS_Handle
-                                                                    *stats,
-                                                                    uint16_t
-                                                                    mtu,
-                                                                    unsigned int
-                                                                    num_msgs,
-                                                                    void *cls,
-                                                                    GNUNET_FRAGMENT_MessageProcessor
-                                                                    proc,
-                                                                    GNUNET_DEFRAGMENT_AckProcessor
-                                                                    ackp);
+struct GNUNET_DEFRAGMENT_Context *
+GNUNET_DEFRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
+                                  uint16_t mtu, unsigned int num_msgs,
+                                  void *cls,
+                                  GNUNET_FRAGMENT_MessageProcessor proc,
+                                  GNUNET_DEFRAGMENT_AckProcessor ackp);
 
 
 /**
@@ -190,7 +176,8 @@ struct GNUNET_DEFRAGMENT_Context *GNUNET_DEFRAGMENT_context_create (struct
  *
  * @param dc defragmentation context
  */
-void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
+void
+GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
 
 
 /**
@@ -200,8 +187,9 @@ void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
  * @param msg the message that was received
  * @return GNUNET_OK on success, GNUNET_NO if this was a duplicate, GNUNET_SYSERR on error
  */
-int GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
-                                        const struct GNUNET_MessageHeader *msg);
+int
+GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
+                                    const struct GNUNET_MessageHeader *msg);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

File diff suppressed because it is too large
+ 259 - 268
src/include/gnunet_fs_service.h


+ 28 - 26
src/include/gnunet_getopt_lib.h

@@ -207,9 +207,10 @@ struct GNUNET_GETOPT_CommandLineOption
  * @return index into argv with first non-option
  *   argument, or GNUNET_SYSERR on error
  */
-int GNUNET_GETOPT_run (const char *binaryOptions,
-                       const struct GNUNET_GETOPT_CommandLineOption *allOptions,
-                       unsigned int argc, char *const *argv);
+int
+GNUNET_GETOPT_run (const char *binaryOptions,
+                   const struct GNUNET_GETOPT_CommandLineOption *allOptions,
+                   unsigned int argc, char *const *argv);
 
 
 /**
@@ -225,9 +226,9 @@ int GNUNET_GETOPT_run (const char *binaryOptions,
  * @param value actual value of the option as a string.
  * @return GNUNET_OK if parsing the value worked
  */
-int GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext
-                             *ctx, void *scls, const char *option,
-                             const char *value);
+int
+GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                         void *scls, const char *option, const char *value);
 
 
 /**
@@ -243,9 +244,9 @@ int GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value actual value of the option as a string.
  * @return GNUNET_OK if parsing the value worked
  */
-int GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext
-                            *ctx, void *scls, const char *option,
-                            const char *value);
+int
+GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                        void *scls, const char *option, const char *value);
 
 
 /**
@@ -262,9 +263,9 @@ int GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value not used (NULL)
  * @return GNUNET_OK 
  */
-int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext
-                           *ctx, void *scls, const char *option,
-                           const char *value);
+int
+GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                       void *scls, const char *option, const char *value);
 
 
 /**
@@ -281,9 +282,9 @@ int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value actual value of the option (a string)
  * @return GNUNET_OK 
  */
-int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext
-                              *ctx, void *scls, const char *option,
-                              const char *value);
+int
+GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                          void *scls, const char *option, const char *value);
 
 /**
  * Set an option of type 'unsigned int' from the command line. Each
@@ -299,10 +300,10 @@ int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value not used (NULL)
  * @return GNUNET_OK 
  */
-int GNUNET_GETOPT_increment_value (struct
-                                   GNUNET_GETOPT_CommandLineProcessorContext
-                                   *ctx, void *scls, const char *option,
-                                   const char *value);
+int
+GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext
+                               *ctx, void *scls, const char *option,
+                               const char *value);
 
 
 /* *************** internal prototypes - use macros above! ************* */
@@ -316,9 +317,10 @@ int GNUNET_GETOPT_increment_value (struct
  * @param value not used (NULL)
  * @return GNUNET_SYSERR (do not continue)
  */
-int GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
-                                *ctx, void *scls, const char *option,
-                                const char *value);
+int
+GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
+                            *ctx, void *scls, const char *option,
+                            const char *value);
 
 /**
  * Print out program version (implements --version).
@@ -329,10 +331,10 @@ int GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value not used (NULL)
  * @return GNUNET_SYSERR (do not continue)
  */
-int GNUNET_GETOPT_print_version_ (struct
-                                  GNUNET_GETOPT_CommandLineProcessorContext
-                                  *ctx, void *scls, const char *option,
-                                  const char *value);
+int
+GNUNET_GETOPT_print_version_ (struct GNUNET_GETOPT_CommandLineProcessorContext
+                              *ctx, void *scls, const char *option,
+                              const char *value);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {

+ 41 - 44
src/include/gnunet_hello_lib.h

@@ -60,11 +60,11 @@ struct GNUNET_HELLO_Message;
  * @return number of bytes copied, 0 if
  *         the target buffer was not big enough.
  */
-size_t               GNUNET_HELLO_add_address (const char *tname,
-                                               struct GNUNET_TIME_Absolute
-                                               expiration, const void *addr,
-                                               uint16_t addr_len, char *target,
-                                               size_t max);
+size_t
+GNUNET_HELLO_add_address (const char *tname,
+                          struct GNUNET_TIME_Absolute expiration,
+                          const void *addr, uint16_t addr_len, char *target,
+                          size_t max);
 
 
 /**
@@ -90,11 +90,11 @@ typedef size_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls,
  *
  * @return the hello message
  */
-struct GNUNET_HELLO_Message *GNUNET_HELLO_create (const struct
-                                                  GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                                                  *publicKey,
-                                                  GNUNET_HELLO_GenerateAddressListCallback
-                                                  addrgen, void *addrgen_cls);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_create (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                     *publicKey,
+                     GNUNET_HELLO_GenerateAddressListCallback addrgen,
+                     void *addrgen_cls);
 
 
 /**
@@ -102,7 +102,8 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_create (const struct
  * @param hello to inspect
  * @return the size, 0 if HELLO is invalid
  */
-uint16_t GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
+uint16_t
+GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
 
 
 /**
@@ -114,10 +115,9 @@ uint16_t GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
  * @param h2 the second HELLO message
  * @return the combined hello message
  */
-struct GNUNET_HELLO_Message *GNUNET_HELLO_merge (const struct
-                                                 GNUNET_HELLO_Message *h1,
-                                                 const struct
-                                                 GNUNET_HELLO_Message *h2);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_merge (const struct GNUNET_HELLO_Message *h1,
+                    const struct GNUNET_HELLO_Message *h2);
 
 
 /**
@@ -136,12 +136,10 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_merge (const struct
  *         zero if the some addresses with expirations >= now
  *         do not match at all
  */
-struct GNUNET_TIME_Absolute GNUNET_HELLO_equals (const struct
-                                                 GNUNET_HELLO_Message *h1,
-                                                 const struct
-                                                 GNUNET_HELLO_Message *h2,
-                                                 struct GNUNET_TIME_Absolute
-                                                 now);
+struct GNUNET_TIME_Absolute
+GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1,
+                     const struct GNUNET_HELLO_Message *h2,
+                     struct GNUNET_TIME_Absolute now);
 
 
 /**
@@ -174,13 +172,10 @@ typedef int (*GNUNET_HELLO_AddressIterator) (void *cls, const char *tname,
  * @param it_cls closure for it
  * @return the modified HELLO or NULL
  */
-struct GNUNET_HELLO_Message *GNUNET_HELLO_iterate_addresses (const struct
-                                                             GNUNET_HELLO_Message
-                                                             *msg,
-                                                             int
-                                                             return_modified,
-                                                             GNUNET_HELLO_AddressIterator
-                                                             it, void *it_cls);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
+                                int return_modified,
+                                GNUNET_HELLO_AddressIterator it, void *it_cls);
 
 
 /**
@@ -194,14 +189,15 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_iterate_addresses (const struct
  * @param it iterator to call on each address
  * @param it_cls closure for it
  */
-void GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
-                                         *new_hello,
-                                         const struct GNUNET_HELLO_Message
-                                         *old_hello,
-                                         struct GNUNET_TIME_Absolute
-                                         expiration_limit,
-                                         GNUNET_HELLO_AddressIterator it,
-                                         void *it_cls);
+void
+GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
+                                    *new_hello,
+                                    const struct GNUNET_HELLO_Message
+                                    *old_hello,
+                                    struct GNUNET_TIME_Absolute
+                                    expiration_limit,
+                                    GNUNET_HELLO_AddressIterator it,
+                                    void *it_cls);
 
 
 /**
@@ -211,9 +207,10 @@ void GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
  * @param publicKey where to copy the public key information, can be NULL
  * @return GNUNET_SYSERR if the HELLO was malformed
  */
-int GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
-                          struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                          *publicKey);
+int
+GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
+                      struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                      *publicKey);
 
 
 /**
@@ -223,8 +220,9 @@ int GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
  * @param peer where to store the peer's identity
  * @return GNUNET_SYSERR if the HELLO was malformed
  */
-int GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
-                         struct GNUNET_PeerIdentity *peer);
+int
+GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
+                     struct GNUNET_PeerIdentity *peer);
 
 
 /**
@@ -235,9 +233,8 @@ int GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
  *
  * @return header or NULL if the HELLO was malformed
  */
-struct GNUNET_MessageHeader *GNUNET_HELLO_get_header (struct
-                                                      GNUNET_HELLO_Message
-                                                      *hello);
+struct GNUNET_MessageHeader *
+GNUNET_HELLO_get_header (struct GNUNET_HELLO_Message *hello);
 
 /* ifndef GNUNET_HELLO_LIB_H */
 #endif

+ 11 - 7
src/include/gnunet_load_lib.h

@@ -51,8 +51,8 @@ struct GNUNET_LOAD_Value;
  *        frequency, 0-load values will be added to the load
  * @return the new load value
  */
-struct GNUNET_LOAD_Value *GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative
-                                                  autodecline);
+struct GNUNET_LOAD_Value *
+GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative autodecline);
 
 
 /**
@@ -61,8 +61,9 @@ struct GNUNET_LOAD_Value *GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative
  * @param load load to update
  * @param autodecline frequency of load decline
  */
-void GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
-                                    struct GNUNET_TIME_Relative autodecline);
+void
+GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
+                               struct GNUNET_TIME_Relative autodecline);
 
 
 /**
@@ -82,7 +83,8 @@ void GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
  *         100 if the latest updates were so large
  *         that we could not do proper calculations
  */
-double GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
+double
+GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
 
 
 /**
@@ -91,7 +93,8 @@ double GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
  * @param load load handle
  * @return zero if update was never called
  */
-double GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
+double
+GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
 
 
 /**
@@ -100,7 +103,8 @@ double GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
  * @param load to update
  * @param data latest measurement value (for example, delay)
  */
-void GNUNET_LOAD_update (struct GNUNET_LOAD_Value *load, uint64_t data);
+void
+GNUNET_LOAD_update (struct GNUNET_LOAD_Value *load, uint64_t data);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */

Some files were not shown because too many files changed in this diff