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
+6 -6
View File
@@ -79,7 +79,7 @@ ABORT.indication Yes Yes Yes No
* The Network Layer Protocol Control Information byte is described
* in section 6.2.2 of the BACnet standard.
* @param npdu [out] Buffer which will hold the encoded NPDU header bytes.
* The size isn't given, but it must be at least 2 bytes for the simplest
* The size isn't given, but it must be at least 2 bytes for the simplest
* case, and should always be at least 24 bytes to accommodate the maximal
* case (all fields loaded). If the buffer is NULL, the number of bytes
* the buffer would have held is returned.
@@ -244,7 +244,7 @@ int npdu_encode_pdu(uint8_t *npdu,
* @param pdu_size Number of bytes in the buffer to hold the encoded data.
* If the size is zero, the number of bytes the buffer would have held
* is returned.
* The size isn't given, but it must be at least 2 bytes for the simplest
* The size isn't given, but it must be at least 2 bytes for the simplest
* case, and should always be at least 24 bytes to accommodate the maximal
* case (all fields loaded). Can be NULL to determine length of buffer.
* @param dest [in] The routing destination information if the message must
@@ -314,7 +314,7 @@ is expected for the service being issued.
* @see npdu_encode_npdu_network if you need to set a network layer msg.
*
* @param npdu_data [out] Returns a filled-out structure with information
* provided by the other arguments and
* provided by the other arguments and
* good defaults.
* @param data_expecting_reply [in] True if message should have a reply.
* @param priority [in] One of the 4 priorities defined in section 6.2.2,
@@ -343,7 +343,7 @@ void npdu_encode_npdu_data(BACNET_NPDU_DATA *npdu_data,
* APDU instead of a Network Layer Message.
*
* @param npdu_data [out] Returns a filled-out structure with information
* provided by the other arguments and
* provided by the other arguments and
* good defaults.
* @param network_message_type [in] The type of Network Layer Message.
* @param data_expecting_reply [in] True if message should have a reply.
@@ -414,10 +414,10 @@ int npdu_decode(uint8_t *npdu,
* This src describes the original source of the message when
* it had to be routed to reach this BACnet Device.
* @param npdu_data [out] Returns a filled-out structure with information
* decoded from the NCPI and other NPDU
* decoded from the NCPI and other NPDU
* bytes.
* @return On success, returns the number of bytes which were decoded from the
* NPDU section; if this is a network layer message, there may
* NPDU section; if this is a network layer message, there may
* be more bytes left in the NPDU; if not a network msg, the APDU follows. If 0
* or negative, there were problems with the data or arguments.
*/