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
-1
View File
@@ -37,4 +37,3 @@ clean:
.PHONY: include
include: .depend
+7 -7
View File
@@ -27,13 +27,13 @@
* Allows you to communicate with a localhost target.
* -t: declare target's MAC instead of using Who-Is to bind to
* device-instance. Format is "C0:A8:00:18:BA:C0" (as usual)
*
*
* Examples:
* ./bacepics -v 1234
* ./bacepics -v 1234
* where the device instance to be addressed is 1234
* and the optional -v prints values out rather than the '?' that
* the EPICS format for VTS3 wants.
* ./bacepics -p 0xBAC1 -t "7F:0:0:1:BA:C0" 4194303
* ./bacepics -p 0xBAC1 -t "7F:0:0:1:BA:C0" 4194303
* communicates with the BACnet device on localhost (127.0.0.1), using
* port 47809 as "my" source port so it doesn't conflict with
* the device's port 47808.
@@ -48,13 +48,13 @@
* ALL again with array index of 0, which should result mostly in errors
* but will provide the list of supported properties.
* - If that succeeds, build the list of properties to be accessed. <br>
* - If no RPM or failed to get ALL properties from the target device, then
* fetch the coded Required and Optional properties from the demo/object
* folder for this object type, and use this to build the list of
* - If no RPM or failed to get ALL properties from the target device, then
* fetch the coded Required and Optional properties from the demo/object
* folder for this object type, and use this to build the list of
* properties to be accessed.
* - If the Fetch All succeeded, print the values for each property
* - Otherwise, for each property in the list for this object,
* - Request the single property value with ReadProperty (RP)
* - Request the single property value with ReadProperty (RP)
* - From the response, print the property's value
* The Device Object will have fetched the Object List property and built a list
* of objects from that; use it now to cycle through each other Object and
+2 -2
View File
@@ -575,7 +575,7 @@ static void PrintReadPropertyData(BACNET_OBJECT_TYPE object_type,
}
} else if (rpm_property->propertyIdentifier ==
PROP_SUBORDINATE_LIST) {
if (value->tag !=
if (value->tag !=
BACNET_APPLICATION_TAG_DEVICE_OBJECT_REFERENCE) {
break;
}
@@ -648,7 +648,7 @@ static void PrintReadPropertyData(BACNET_OBJECT_TYPE object_type,
/* Closing brace for this multi-valued array */
fprintf(stdout, " }");
}
if (property_list_writable_member(object_type,
if (property_list_writable_member(object_type,
rpm_property->propertyIdentifier)) {
fprintf(stdout, " Writable");
}