Run clang-format and enable CI check for it (#755)
* pre-commit: Update and enable clang-format check There is newer version from clang-format so use that. We do not yet want 18 as that is little bit too new. * Format some thing by hand which clang-format "breaks" Clang-format will format some things little bit off in some cases. Format some things by hand so we get cleaner end result. * Run clang-format with ``` pre-commit run --all-files clang-format ``` We have already in previously checked places where clang-format does not make good format and ignored those (hopefully most of the things). --------- Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
@@ -18,105 +18,84 @@
|
||||
#include "bacnet/readrange.h"
|
||||
|
||||
/* refactored utility functions - see bacaddr.c module */
|
||||
#define address_mac_init(m,a,l) bacnet_address_mac_init(m,a,l)
|
||||
#define address_mac_from_ascii(m,a) bacnet_address_mac_from_ascii(m,a)
|
||||
#define address_match(d,s) bacnet_address_same(d,s)
|
||||
#define address_mac_init(m, a, l) bacnet_address_mac_init(m, a, l)
|
||||
#define address_mac_from_ascii(m, a) bacnet_address_mac_from_ascii(m, a)
|
||||
#define address_match(d, s) bacnet_address_same(d, s)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_init(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_init(void);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_init_partial(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_init_partial(void);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_add(
|
||||
uint32_t device_id,
|
||||
unsigned max_apdu,
|
||||
const BACNET_ADDRESS * src);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_add(
|
||||
uint32_t device_id, unsigned max_apdu, const BACNET_ADDRESS *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_remove_device(
|
||||
uint32_t device_id);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_remove_device(uint32_t device_id);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_get_by_device(
|
||||
uint32_t device_id,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS * src);
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_get_by_device(
|
||||
uint32_t device_id, unsigned *max_apdu, BACNET_ADDRESS *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_get_by_index(
|
||||
unsigned index,
|
||||
uint32_t * device_id,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS * src);
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_get_by_index(
|
||||
unsigned index,
|
||||
uint32_t *device_id,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_device_get_by_index(
|
||||
unsigned index,
|
||||
uint32_t * device_id,
|
||||
uint32_t * device_ttl,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS * src);
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_device_get_by_index(
|
||||
unsigned index,
|
||||
uint32_t *device_id,
|
||||
uint32_t *device_ttl,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_get_device_id(
|
||||
const BACNET_ADDRESS * src,
|
||||
uint32_t * device_id);
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_get_device_id(const BACNET_ADDRESS *src, uint32_t *device_id);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
unsigned address_count(
|
||||
void);
|
||||
BACNET_STACK_EXPORT
|
||||
unsigned address_count(void);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_bind_request(
|
||||
uint32_t device_id,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS * src);
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_bind_request(
|
||||
uint32_t device_id, unsigned *max_apdu, BACNET_ADDRESS *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_device_bind_request(
|
||||
uint32_t device_id,
|
||||
uint32_t * device_ttl,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS * src);
|
||||
BACNET_STACK_EXPORT
|
||||
bool address_device_bind_request(
|
||||
uint32_t device_id,
|
||||
uint32_t *device_ttl,
|
||||
unsigned *max_apdu,
|
||||
BACNET_ADDRESS *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_add_binding(
|
||||
uint32_t device_id,
|
||||
unsigned max_apdu,
|
||||
const BACNET_ADDRESS * src);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_add_binding(
|
||||
uint32_t device_id, unsigned max_apdu, const BACNET_ADDRESS *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int address_list_encode(
|
||||
uint8_t * apdu,
|
||||
unsigned apdu_len);
|
||||
BACNET_STACK_EXPORT
|
||||
int address_list_encode(uint8_t *apdu, unsigned apdu_len);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int rr_address_list_encode(
|
||||
uint8_t * apdu,
|
||||
BACNET_READ_RANGE_DATA * pRequest);
|
||||
BACNET_STACK_EXPORT
|
||||
int rr_address_list_encode(uint8_t *apdu, BACNET_READ_RANGE_DATA *pRequest);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_set_device_TTL(
|
||||
uint32_t device_id,
|
||||
uint32_t TimeOut,
|
||||
bool StaticFlag);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_set_device_TTL(
|
||||
uint32_t device_id, uint32_t TimeOut, bool StaticFlag);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_cache_timer(
|
||||
uint16_t uSeconds);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_cache_timer(uint16_t uSeconds);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void address_protected_entry_index_set(uint32_t top_protected_entry_index);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_own_device_id_set(uint32_t own_id);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_protected_entry_index_set(uint32_t top_protected_entry_index);
|
||||
BACNET_STACK_EXPORT
|
||||
void address_own_device_id_set(uint32_t own_id);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user