uncrustify brandt.h

This commit is contained in:
Markus Teich 2016-06-12 01:13:03 +02:00
parent e0f63621dd
commit 1d3b927c37
5 changed files with 1497 additions and 53 deletions

View File

@ -1,15 +0,0 @@
--mode=c
--style=bsd # brackets on their own line
--indent=tab # tabs for indentation, spaces for alignment
--min-conditional-indent=0 # align continuation lines to the opening bracket
--max-instatement-indent=80 # allow to use a lot of spaces for alignment
--pad-oper # operators + have - spaces
--pad-first-paren-out # space before (
--align-pointer=name # char *name

View File

@ -41,9 +41,9 @@ struct BRANDT_Auction;
* @return 0 on success, -1 on failure.
*/
typedef int
(*BRANDT_BroadcastCallback) (void *auction_closure,
const void *msg,
size_t msg_len);
(*BRANDT_BroadcastCallback)(void * auction_closure,
const void *msg,
size_t msg_len);
/**
@ -59,9 +59,9 @@ typedef int
* @return 0 on success, -1 on failure.
*/
typedef int
(*BRANDT_UnicastSellerCallback) (void *auction_closure,
const void *msg,
size_t msg_len);
(*BRANDT_UnicastSellerCallback)(void * auction_closure,
const void *msg,
size_t msg_len);
/**
@ -80,10 +80,10 @@ typedef int
* is private and the user did not win.
*/
typedef void
(*BRANDT_ReportResultCallback) (void *auction_closure,
unsigned int bidder_id,
int status,
uint16_t price);
(*BRANDT_ReportResultCallback)(void * auction_closure,
unsigned int bidder_id,
int status,
uint16_t price);
/**
@ -103,24 +103,24 @@ typedef void
* black-box pointer, do NOT access/change it or the data it points to!
*/
struct BRANDT_Auction *
BRANDT_join (BRANDT_BroadcastCallback broadcast,
BRANDT_join (BRANDT_BroadcastCallback broadcast,
BRANDT_UnicastSellerCallback unicast,
BRANDT_ReportResultCallback report,
const void *auction_closure,
const void *auction_data,
size_t auction_data_len);
// FIXME: where do I specify my bid?
BRANDT_ReportResultCallback report,
const void * auction_closure,
const void * auction_data,
size_t auction_data_len);
/* FIXME: where do I specify my bid? */
// FIXME: Distinguish handles for seller/buyers
// FIXME: have cancellation (BRANDT_join_cancel())
// FIXME: provide means to extract a hash from auction data to
// tie cryptographic operations to application-readable proposal
// FIXME: have separate function to export 'out' variables
// FIXME: might want to specify timeout? How do we deal with time?
// FIXME: separate creating an auction from starting it; initial
// setup needs more auction proposal details (hash, timeout,
// bid structure), later we need to know # participants
/* FIXME: Distinguish handles for seller/buyers */
/* FIXME: have cancellation (BRANDT_join_cancel()) */
/* FIXME: provide means to extract a hash from auction data to */
/* tie cryptographic operations to application-readable proposal */
/* FIXME: have separate function to export 'out' variables */
/* FIXME: might want to specify timeout? How do we deal with time? */
/* FIXME: separate creating an auction from starting it; initial */
/* setup needs more auction proposal details (hash, timeout, */
/* bid structure), later we need to know # participants */
/**
* Create a new auction described by the @a auction_data parameter.
*
@ -148,14 +148,14 @@ BRANDT_join (BRANDT_BroadcastCallback broadcast,
* black-box pointer, do NOT access/change it or the data it points to!
*/
struct BRANDT_Auction *
BRANDT_new (BRANDT_BroadcastCallback broadcast,
BRANDT_new (BRANDT_BroadcastCallback broadcast,
BRANDT_ReportResultCallback report,
const void *auction_closure,
const void **auction_data,
size_t *auction_data_len,
uint16_t num_prices,
enum BRANDT_AuctionMode m,
int outcome_public);
const void * auction_closure,
const void ** auction_data,
size_t * auction_data_len,
uint16_t num_prices,
enum BRANDT_AuctionMode m,
int outcome_public);
/**
@ -168,8 +168,8 @@ BRANDT_new (BRANDT_BroadcastCallback broadcast,
*/
void
BRANDT_got_broadcast (struct BRANDT_Auction *auction,
void *msg,
size_t msg_len);
void * msg,
size_t msg_len);
/**
@ -185,10 +185,10 @@ BRANDT_got_broadcast (struct BRANDT_Auction *auction,
*/
void
BRANDT_got_unicast (struct BRANDT_Auction *auction,
void *msg,
size_t msg_len);
void * msg,
size_t msg_len);
///TODO: Error handling functions?
/**TODO: Error handling functions? */
#endif
#endif /* ifndef _BRANDT_BRANDT_H */

1434
uncrustify/conf Normal file

File diff suppressed because it is too large Load Diff

20
uncrustify/file_header Normal file
View File

@ -0,0 +1,20 @@
/* This file is part of libbrandt.
* Copyright (C) 2016 GNUnet e.V.
*
* libbrandt is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* libbrandt is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* libbrandt. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file $(filename)
* @brief TODO
*/

5
uncrustify/func_header Normal file
View File

@ -0,0 +1,5 @@
/**
* $(function)
*
* $(javaparam)
*/