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
+8 -11
View File
@@ -30,29 +30,26 @@ BACNET_STACK_EXPORT
void days_of_year_to_month_day(
uint32_t days, uint16_t year, uint8_t *pMonth, uint8_t *pDay);
BACNET_STACK_EXPORT
uint32_t days_apart(uint16_t year1,
uint32_t days_apart(
uint16_t year1,
uint8_t month1,
uint8_t day1,
uint16_t year2,
uint8_t month2,
uint8_t day2);
BACNET_STACK_EXPORT
uint32_t days_since_epoch(uint16_t epoch_year,
uint16_t year,
uint8_t month,
uint8_t day);
uint32_t days_since_epoch(
uint16_t epoch_year, uint16_t year, uint8_t month, uint8_t day);
BACNET_STACK_EXPORT
void days_since_epoch_to_date(
uint16_t epoch_year,
uint32_t days,
uint16_t * pYear,
uint8_t * pMonth,
uint8_t * pDay);
uint16_t *pYear,
uint8_t *pMonth,
uint8_t *pDay);
BACNET_STACK_EXPORT
bool days_date_is_valid(uint16_t year,
uint8_t month,
uint8_t day);
bool days_date_is_valid(uint16_t year, uint8_t month, uint8_t day);
#ifdef __cplusplus
}