tighten formatting rules
[oweals/gnunet.git] / src / include / gnunet_my_lib.h
index 1805c279513f04bfe39963b361af099b9a3ed53f..74e7bf492364a26eb7546422162da1b1ccc95004 100644 (file)
@@ -44,7 +44,6 @@ extern "C"
 #endif
 
 
-
 /**
  * Information we pass to #GNUNET_MY_exec_prepared() to
  * initialize the arguments of the prepared statement.
@@ -81,7 +80,8 @@ typedef void
  */
 
 
-struct GNUNET_MY_QueryParam {
+struct GNUNET_MY_QueryParam
+{
   /**
    * Function to call for the type conversion.
    */
@@ -129,8 +129,8 @@ struct GNUNET_MY_QueryParam {
  * @oaran ptr_size number of bytes in @a ptr
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_fixed_size(const void *ptr,
-                                 size_t ptr_size);
+GNUNET_MY_query_param_fixed_size (const void *ptr,
+                                  size_t ptr_size);
 
 
 /**
@@ -142,9 +142,9 @@ GNUNET_MY_query_param_fixed_size(const void *ptr,
  * @return TBD
  */
 int
-GNUNET_MY_exec_prepared(struct GNUNET_MYSQL_Context *mc,
-                        struct GNUNET_MYSQL_StatementHandle *sh,
-                        struct GNUNET_MY_QueryParam *params);
+GNUNET_MY_exec_prepared (struct GNUNET_MYSQL_Context *mc,
+                         struct GNUNET_MYSQL_StatementHandle *sh,
+                         struct GNUNET_MY_QueryParam *params);
 
 
 /**
@@ -191,7 +191,8 @@ typedef void
  * Information we pass to #GNUNET_MY_extract_result() to
  * initialize the arguments of the prepared statement.
  */
-struct GNUNET_MY_ResultSpec {
+struct GNUNET_MY_ResultSpec
+{
   /**
    * Function to call to initialize the MYSQL_BIND array.
    */
@@ -256,7 +257,6 @@ struct GNUNET_MY_ResultSpec {
 #define GNUNET_MY_result_spec_end { NULL, NULL, NULL, 0, NULL, 0, 0 }
 
 
-
 /**
  * Obtain fixed size result of @a ptr_size bytes from
  * MySQL, store in already allocated buffer at @a ptr.
@@ -265,8 +265,8 @@ struct GNUNET_MY_ResultSpec {
  * @oaran ptr_size number of bytes available at @a ptr
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_fixed_size(void *ptr,
-                                 size_t ptr_size);
+GNUNET_MY_result_spec_fixed_size (void *ptr,
+                                  size_t ptr_size);
 
 /**
  * Generate query parameter for a string
@@ -274,7 +274,7 @@ GNUNET_MY_result_spec_fixed_size(void *ptr,
  *@param ptr pointer to the string query parameter to pass
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_string(const char *ptr);
+GNUNET_MY_query_param_string (const char *ptr);
 
 /**
  * Generate fixed-size query parameter with size determined
@@ -282,7 +282,8 @@ GNUNET_MY_query_param_string(const char *ptr);
  *
  * @param x pointer to the query parameter to pass
  */
-#define GNUNET_MY_query_param_auto_from_type(x) GNUNET_MY_query_param_fixed_size((x), sizeof(*(x)))
+#define GNUNET_MY_query_param_auto_from_type( \
+    x) GNUNET_MY_query_param_fixed_size ((x), sizeof(*(x)))
 
 /**
  * Generate query parameter for an RSA public key. The
@@ -292,7 +293,8 @@ GNUNET_MY_query_param_string(const char *ptr);
  * @return array entry for the query parameters to use
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_rsa_public_key(const struct GNUNET_CRYPTO_RsaPublicKey *x);
+GNUNET_MY_query_param_rsa_public_key (const struct
+                                      GNUNET_CRYPTO_RsaPublicKey *x);
 
 /**
  * Generate query parameter for an RSA signature. The
@@ -302,7 +304,8 @@ GNUNET_MY_query_param_rsa_public_key(const struct GNUNET_CRYPTO_RsaPublicKey *x)
  *@return array entry for the query parameters to use
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_rsa_signature(const struct GNUNET_CRYPTO_RsaSignature *x);
+GNUNET_MY_query_param_rsa_signature (const struct
+                                     GNUNET_CRYPTO_RsaSignature *x);
 
 /**
  * Generate query parameter for an absolute time value.
@@ -312,7 +315,7 @@ GNUNET_MY_query_param_rsa_signature(const struct GNUNET_CRYPTO_RsaSignature *x);
  *@return array entry for the query parameters to use
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_absolute_time(const struct GNUNET_TIME_Absolute *x);
+GNUNET_MY_query_param_absolute_time (const struct GNUNET_TIME_Absolute *x);
 
 
 /**
@@ -322,7 +325,8 @@ GNUNET_MY_query_param_absolute_time(const struct GNUNET_TIME_Absolute *x);
  *@param x pointer to the query parameter to pass
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_absolute_time_nbo(const struct GNUNET_TIME_AbsoluteNBO *x);
+GNUNET_MY_query_param_absolute_time_nbo (const struct
+                                         GNUNET_TIME_AbsoluteNBO *x);
 
 /**
  * Generate query parameter for an uint16_t in host byte order.
@@ -330,7 +334,7 @@ GNUNET_MY_query_param_absolute_time_nbo(const struct GNUNET_TIME_AbsoluteNBO *x)
  * @param x pointer to the query parameter to pass
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_uint16(const uint16_t *x);
+GNUNET_MY_query_param_uint16 (const uint16_t *x);
 
 /**
  * Generate query parameter for an uint32_t in host byte order
@@ -338,7 +342,7 @@ GNUNET_MY_query_param_uint16(const uint16_t *x);
  *@param x pointer to the query parameter to pass
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_uint32(const uint32_t *x);
+GNUNET_MY_query_param_uint32 (const uint32_t *x);
 
 /**
  * Generate query parameter for an uint64_t in host byte order
@@ -346,7 +350,7 @@ GNUNET_MY_query_param_uint32(const uint32_t *x);
  *@param x pointer to the query parameter to pass
  */
 struct GNUNET_MY_QueryParam
-GNUNET_MY_query_param_uint64(const uint64_t *x);
+GNUNET_MY_query_param_uint64 (const uint64_t *x);
 
 /**
  * We expect a fixed-size result, with size determined by the type of `* dst`
@@ -355,7 +359,8 @@ GNUNET_MY_query_param_uint64(const uint64_t *x);
  * @spec dst point to where to store the result, type fits expected result size
  * @return array entry for the result specification to use
  */
-#define GNUNET_MY_result_spec_auto_from_type(dst) GNUNET_MY_result_spec_fixed_size((dst), sizeof(*(dst)))
+#define GNUNET_MY_result_spec_auto_from_type( \
+    dst) GNUNET_MY_result_spec_fixed_size ((dst), sizeof(*(dst)))
 
 
 /**
@@ -366,8 +371,8 @@ GNUNET_MY_query_param_uint64(const uint64_t *x);
  * @return array entru for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_variable_size(void **dst,
-                                    size_t *ptr_size);
+GNUNET_MY_result_spec_variable_size (void **dst,
+                                     size_t *ptr_size);
 
 /**
  * RSA public key expected
@@ -377,7 +382,7 @@ GNUNET_MY_result_spec_variable_size(void **dst,
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_rsa_public_key(struct GNUNET_CRYPTO_RsaPublicKey **rsa);
+GNUNET_MY_result_spec_rsa_public_key (struct GNUNET_CRYPTO_RsaPublicKey **rsa);
 
 
 /**
@@ -387,7 +392,7 @@ GNUNET_MY_result_spec_rsa_public_key(struct GNUNET_CRYPTO_RsaPublicKey **rsa);
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_rsa_signature(struct GNUNET_CRYPTO_RsaSignature **sig);
+GNUNET_MY_result_spec_rsa_signature (struct GNUNET_CRYPTO_RsaSignature **sig);
 
 /**
  * 0- terminated string exprected.
@@ -396,7 +401,7 @@ GNUNET_MY_result_spec_rsa_signature(struct GNUNET_CRYPTO_RsaSignature **sig);
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_string(char **dst);
+GNUNET_MY_result_spec_string (char **dst);
 
 /**
  * Absolute time expected
@@ -406,7 +411,7 @@ GNUNET_MY_result_spec_string(char **dst);
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_absolute_time(struct GNUNET_TIME_Absolute *at);
+GNUNET_MY_result_spec_absolute_time (struct GNUNET_TIME_Absolute *at);
 
 /**
  * Absolute time in network byte order expected
@@ -415,7 +420,7 @@ GNUNET_MY_result_spec_absolute_time(struct GNUNET_TIME_Absolute *at);
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_absolute_time_nbo(struct GNUNET_TIME_AbsoluteNBO *at);
+GNUNET_MY_result_spec_absolute_time_nbo (struct GNUNET_TIME_AbsoluteNBO *at);
 
 /**
  * uint16_t expected
@@ -424,7 +429,7 @@ GNUNET_MY_result_spec_absolute_time_nbo(struct GNUNET_TIME_AbsoluteNBO *at);
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_uint16(uint16_t *u16);
+GNUNET_MY_result_spec_uint16 (uint16_t *u16);
 
 /**
  * uint32_t expected
@@ -433,7 +438,7 @@ GNUNET_MY_result_spec_uint16(uint16_t *u16);
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_uint32(uint32_t *u32);
+GNUNET_MY_result_spec_uint32 (uint32_t *u32);
 
 /**
  * uint64_t expected.
@@ -442,7 +447,7 @@ GNUNET_MY_result_spec_uint32(uint32_t *u32);
  * @return array entry for the result specification to use
  */
 struct GNUNET_MY_ResultSpec
-GNUNET_MY_result_spec_uint64(uint64_t *u64);
+GNUNET_MY_result_spec_uint64 (uint64_t *u64);
 
 
 /**
@@ -457,8 +462,8 @@ GNUNET_MY_result_spec_uint64(uint64_t *u64);
  *  #GNUNET_SYSERR if a result was invalid
  */
 int
-GNUNET_MY_extract_result(struct GNUNET_MYSQL_StatementHandle *sh,
-                         struct GNUNET_MY_ResultSpec *specs);
+GNUNET_MY_extract_result (struct GNUNET_MYSQL_StatementHandle *sh,
+                          struct GNUNET_MY_ResultSpec *specs);
 
 
 /**
@@ -469,8 +474,8 @@ GNUNET_MY_extract_result(struct GNUNET_MYSQL_StatementHandle *sh,
  * @param qbind mysql query
  */
 void
-GNUNET_MY_cleanup_query(struct GNUNET_MY_QueryParam *qp,
-                        MYSQL_BIND *qbind);
+GNUNET_MY_cleanup_query (struct GNUNET_MY_QueryParam *qp,
+                         MYSQL_BIND *qbind);
 
 
 /**
@@ -480,7 +485,7 @@ GNUNET_MY_cleanup_query(struct GNUNET_MY_QueryParam *qp,
  * @param rs reult specification to clean up
  */
 void
-GNUNET_MY_cleanup_result(struct GNUNET_MY_ResultSpec *rs);
+GNUNET_MY_cleanup_result (struct GNUNET_MY_ResultSpec *rs);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */