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:
Kari Argillander
2024-08-30 19:20:58 +03:00
committed by GitHub
parent 622a9e609e
commit f806c5829b
547 changed files with 18286 additions and 16575 deletions
+117 -174
View File
@@ -24,193 +24,136 @@
extern "C" {
#endif /* __cplusplus */
BACNET_STACK_EXPORT
const char *bactext_confirmed_service_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_unconfirmed_service_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_application_tag_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_application_tag_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_object_type_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_object_type_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_object_type_strtol(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_property_name_proprietary(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_property_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_property_name_default(
unsigned index,
const char *default_string);
BACNET_STACK_EXPORT
bool bactext_property_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_property_strtol(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_engineering_unit_name_proprietary(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_engineering_unit_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_engineering_unit_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_reject_reason_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_abort_reason_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_error_class_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_error_code_name(
unsigned index);
BACNET_STACK_EXPORT
unsigned bactext_property_id(
const char *name);
BACNET_STACK_EXPORT
const char *bactext_month_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_week_of_month_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_day_of_week_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_notify_type_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_notify_type_index(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_event_state_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_event_state_index(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_event_state_strtol(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_event_type_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_event_type_index(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_binary_present_value_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_binary_polarity_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_binary_present_value_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_reliability_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_device_status_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_segmentation_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_segmentation_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_node_type_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_character_string_encoding_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_event_transition_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_event_transition_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_confirmed_service_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_unconfirmed_service_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_application_tag_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_application_tag_index(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_object_type_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_object_type_index(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_object_type_strtol(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_property_name_proprietary(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_property_name(unsigned index);
BACNET_STACK_EXPORT
const char *
bactext_property_name_default(unsigned index, const char *default_string);
BACNET_STACK_EXPORT
bool bactext_property_index(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_property_strtol(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_engineering_unit_name_proprietary(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_engineering_unit_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_engineering_unit_index(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_reject_reason_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_abort_reason_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_error_class_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_error_code_name(unsigned index);
BACNET_STACK_EXPORT
unsigned bactext_property_id(const char *name);
BACNET_STACK_EXPORT
const char *bactext_month_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_week_of_month_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_day_of_week_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_notify_type_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_notify_type_index(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_event_state_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_event_state_index(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_event_state_strtol(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_event_type_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_event_type_index(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_binary_present_value_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_binary_polarity_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_binary_present_value_index(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_reliability_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_device_status_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_segmentation_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_segmentation_index(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_node_type_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_character_string_encoding_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_event_transition_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_event_transition_index(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_days_of_week_name(
unsigned index);
BACNET_STACK_EXPORT
bool bactext_days_of_week_index(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_days_of_week_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_days_of_week_index(const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_network_layer_msg_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_network_layer_msg_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_life_safety_state_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_life_safety_state_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_device_communications_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_device_communications_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_lighting_operation_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_lighting_operation_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_lighting_operation_strtol(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_lighting_operation_strtol(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_binary_lighting_pv_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_binary_lighting_pv_name(unsigned index);
BACNET_STACK_EXPORT
bool bactext_binary_lighting_pv_names_strtol(
const char *search_name,
unsigned *found_index);
BACNET_STACK_EXPORT
bool bactext_binary_lighting_pv_names_strtol(
const char *search_name, unsigned *found_index);
BACNET_STACK_EXPORT
const char *bactext_lighting_in_progress(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_lighting_in_progress(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_lighting_transition(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_lighting_transition(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_color_operation_name(
unsigned index);
BACNET_STACK_EXPORT
const char *bactext_color_operation_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_shed_state_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_shed_state_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_shed_level_type_name(unsigned index);
BACNET_STACK_EXPORT
const char *bactext_shed_level_type_name(unsigned index);
#ifdef __cplusplus
}