Strip tabs and trailing white spaces, and fix end of files (#748)

* format: Strip trailing whitespaces

We want to get rid of trailing whitespaces completly as they make just git
noice. Much better to start using automated tools to get rid of them once and
not getting them back again. This way git history will be cleaner and review
easier.

Commit was generated with:

    pre-commit run --all-files trailing-whitespace

* format: Files should have exactly one new line end of them

It is good practice that every file has one new line. It is not now days so
mandatory but it also is not nice if file has lot of newlines end of it. We will
use pre-commit which takes automatically care about this so let's fix all.

Commit was generated with:

    pre-commit run --all-files end-of-file-fixer

* format: Convert tabs to spaces

Project mostly use spaces over tabs. When mixing tabs and spaces this usually
makes formatting issues and also when changing those in commits it will make lot
of git noise. We will force spaces most of the time and use pre-commit to fix.

Commit was generated with:

    pre-commit run --all-files remove-tabs

---------

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
This commit is contained in:
Kari Argillander
2024-08-25 22:13:57 +03:00
committed by GitHub
parent 9e0657424e
commit 369da70f2a
455 changed files with 7147 additions and 7249 deletions
+2 -2
View File
@@ -17,11 +17,11 @@ extern "C" {
#endif /* __cplusplus */
void bacnet_basic_init(void);
void bacnet_basic_init_callback_set(bacnet_basic_callback callback,
void bacnet_basic_init_callback_set(bacnet_basic_callback callback,
void *context);
void bacnet_basic_task(void);
void bacnet_basic_task_callback_set(bacnet_basic_callback callback,
void bacnet_basic_task_callback_set(bacnet_basic_callback callback,
void *context);
unsigned long bacnet_basic_uptime_seconds(void);
+1 -1
View File
@@ -1,6 +1,6 @@
/**
* @file
* @brief The BACnet datalink tasks for handling the device specific
* @brief The BACnet datalink tasks for handling the device specific
* data link network port layer
* @author Steve Karg <skarg@users.sourceforge.net>
* @date April 2024
@@ -1,6 +1,6 @@
/**
* @file
* @brief API for the BACnet datalink tasks for handling the device specific
* @brief API for the BACnet datalink tasks for handling the device specific
* data link network port layer
* @author Steve Karg <skarg@users.sourceforge.net>
* @date April 2024
@@ -1,6 +1,6 @@
/**
* @file
* @brief The BACnet/IPv6 datalink tasks for handling the device specific
* @brief The BACnet/IPv6 datalink tasks for handling the device specific
* data link network port layer
* @author Steve Karg <skarg@users.sourceforge.net>
* @date April 2024
@@ -21,56 +21,56 @@ extern "C" {
#endif /* __cplusplus */
int bacnet_settings_value_get(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
BACNET_APPLICATION_DATA_VALUE *value);
uint32_t property_id, uint32_t array_index,
BACNET_APPLICATION_DATA_VALUE *value);
bool bacnet_settings_value_set(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
BACNET_APPLICATION_DATA_VALUE *value);
uint32_t property_id, uint32_t array_index,
BACNET_APPLICATION_DATA_VALUE *value);
int bacnet_settings_real_get(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
float default_value, float *value);
uint32_t property_id, uint32_t array_index,
float default_value, float *value);
bool bacnet_settings_real_set(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
float value);
uint32_t property_id, uint32_t array_index,
float value);
int bacnet_settings_unsigned_get(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
BACNET_UNSIGNED_INTEGER default_value,
BACNET_UNSIGNED_INTEGER *value);
uint32_t property_id, uint32_t array_index,
BACNET_UNSIGNED_INTEGER default_value,
BACNET_UNSIGNED_INTEGER *value);
bool bacnet_settings_unsigned_set(uint16_t object_type,
uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
BACNET_UNSIGNED_INTEGER value);
uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
BACNET_UNSIGNED_INTEGER value);
int bacnet_settings_signed_get(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
int32_t default_value, int32_t *value);
uint32_t property_id, uint32_t array_index,
int32_t default_value, int32_t *value);
bool bacnet_settings_signed_set(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
int32_t value);
uint32_t property_id, uint32_t array_index,
int32_t value);
int bacnet_settings_characterstring_get(uint16_t object_type,
uint32_t object_instance,
uint32_t property_id,
uint32_t array_index,
const char *default_value,
BACNET_CHARACTER_STRING *value);
uint32_t object_instance,
uint32_t property_id,
uint32_t array_index,
const char *default_value,
BACNET_CHARACTER_STRING *value);
bool bacnet_settings_characterstring_ansi_set(uint16_t object_type,
uint32_t object_instance,
uint32_t property_id,
uint32_t array_index,
const char *cstring);
uint32_t object_instance,
uint32_t property_id,
uint32_t array_index,
const char *cstring);
int bacnet_settings_string_get(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
const char *default_value, char *value,
size_t value_size);
uint32_t property_id, uint32_t array_index,
const char *default_value, char *value,
size_t value_size);
bool bacnet_settings_string_set(uint16_t object_type, uint32_t object_instance,
uint32_t property_id, uint32_t array_index,
const char *value);
uint32_t property_id, uint32_t array_index,
const char *value);
#ifdef __cplusplus
}
@@ -18,10 +18,10 @@
#define BACNET_STORAGE_ARRAY_INDEX_NONE UINT32_MAX
typedef struct bacnet_storage_key_t {
uint16_t object_type;
uint32_t object_instance;
uint32_t property_id;
uint32_t array_index;
uint16_t object_type;
uint32_t object_instance;
uint32_t property_id;
uint32_t array_index;
} BACNET_STORAGE_KEY;
#ifdef __cplusplus
@@ -31,12 +31,12 @@ extern "C" {
void bacnet_storage_init(void);
void bacnet_storage_key_init(BACNET_STORAGE_KEY *key, uint16_t object_type,
uint32_t object_instance, uint32_t property_id,
uint32_t array_index);
uint32_t object_instance, uint32_t property_id,
uint32_t array_index);
int bacnet_storage_key_encode(char *buffer, size_t buffer_size,
BACNET_STORAGE_KEY *key);
BACNET_STORAGE_KEY *key);
int bacnet_storage_set(BACNET_STORAGE_KEY *key, const void *data,
size_t data_size);
size_t data_size);
int bacnet_storage_get(BACNET_STORAGE_KEY *key, void *data, size_t data_size);
#ifdef __cplusplus