Ran indent script.

This commit is contained in:
skarg
2009-07-29 18:06:33 +00:00
parent 551f2767e0
commit db61a1122f
37 changed files with 227 additions and 218 deletions
+4 -5
View File
@@ -82,7 +82,7 @@ int alarm_ack_encode_service_request(
len =
encode_context_object_id(&apdu[apdu_len], 1,
(int)data->eventObjectIdentifier.type,
(int) data->eventObjectIdentifier.type,
data->eventObjectIdentifier.instance);
apdu_len += len;
@@ -123,7 +123,7 @@ int alarm_ack_decode_service_request(
{
int len = 0;
int section_len;
uint32_t enumValue;
uint32_t enumValue;
if (-1 == (section_len =
decode_context_unsigned(&apdu[len], 0,
@@ -141,11 +141,10 @@ int alarm_ack_decode_service_request(
len += section_len;
if (-1 == (section_len =
decode_context_enumerated(&apdu[len], 2,
&enumValue))) {
decode_context_enumerated(&apdu[len], 2, &enumValue))) {
return -1;
}
data->eventTypeAcked = (BACNET_EVENT_TYPE)enumValue;
data->eventTypeAcked = (BACNET_EVENT_TYPE) enumValue;
len += section_len;
if (-1 == (section_len =
+1 -1
View File
@@ -105,7 +105,7 @@ int arf_decode_service_request(
if (tag_number != BACNET_APPLICATION_TAG_OBJECT_ID)
return -1;
len += decode_object_id(&apdu[len], &type, &data->object_instance);
data->object_type = (BACNET_OBJECT_TYPE)type;
data->object_type = (BACNET_OBJECT_TYPE) type;
if (decode_is_opening_tag_number(&apdu[len], 0)) {
data->access = FILE_STREAM_ACCESS;
/* a tag number is not extended so only one octet */
+1 -1
View File
@@ -110,7 +110,7 @@ int awf_decode_service_request(
if (tag_number != BACNET_APPLICATION_TAG_OBJECT_ID)
return -1;
len += decode_object_id(&apdu[len], &type, &data->object_instance);
data->object_type = (BACNET_OBJECT_TYPE)type;
data->object_type = (BACNET_OBJECT_TYPE) type;
if (decode_is_opening_tag_number(&apdu[len], 0)) {
data->access = FILE_STREAM_ACCESS;
/* a tag number of 2 is not extended so only one octet */
+1 -1
View File
@@ -744,7 +744,7 @@ bool bacapp_print_value(
characterstring_value(&value->type.Character_String);
fprintf(stream, "\"");
for (i = 0; i < len; i++) {
if (isprint(*((unsigned char *)char_str))) {
if (isprint(*((unsigned char *) char_str))) {
fprintf(stream, "%c", *char_str);
} else {
fprintf(stream, ".");
+3 -4
View File
@@ -95,7 +95,7 @@ int bacapp_decode_device_obj_property_ref(
{
int len;
int apdu_len = 0;
uint32_t enumValue;
uint32_t enumValue;
if (-1 == (len =
decode_context_object_id(&apdu[apdu_len], 0,
&value->objectIdentifier.type,
@@ -105,11 +105,10 @@ int bacapp_decode_device_obj_property_ref(
apdu_len += len;
if (-1 == (len =
decode_context_enumerated(&apdu[apdu_len], 1,
&enumValue))) {
decode_context_enumerated(&apdu[apdu_len], 1, &enumValue))) {
return -1;
}
value->propertyIdentifier = (BACNET_PROPERTY_ID)enumValue;
value->propertyIdentifier = (BACNET_PROPERTY_ID) enumValue;
apdu_len += len;
if (decode_is_context_tag(&apdu[apdu_len], 2)) {
+14 -13
View File
@@ -46,7 +46,7 @@ int bacapp_decode_property_state(
int len = 0;
uint32_t len_value_type;
int section_length;
uint32_t enumValue;
uint32_t enumValue;
section_length =
decode_tag_number_and_value(&apdu[len], (uint8_t *) & value->tag,
@@ -68,7 +68,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.binaryValue = (BACNET_BINARY_PV)enumValue;
value->state.binaryValue = (BACNET_BINARY_PV) enumValue;
break;
case EVENT_TYPE:
@@ -77,7 +77,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.eventType = (BACNET_EVENT_TYPE)enumValue;
value->state.eventType = (BACNET_EVENT_TYPE) enumValue;
break;
case POLARITY:
@@ -86,7 +86,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.polarity = (BACNET_POLARITY)enumValue;
value->state.polarity = (BACNET_POLARITY) enumValue;
break;
case PROGRAM_CHANGE:
@@ -95,7 +95,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.programChange = (BACNET_PROGRAM_REQUEST)enumValue;
value->state.programChange = (BACNET_PROGRAM_REQUEST) enumValue;
break;
case PROGRAM_STATE:
@@ -104,7 +104,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.programState = (BACNET_PROGRAM_STATE)enumValue;
value->state.programState = (BACNET_PROGRAM_STATE) enumValue;
break;
case REASON_FOR_HALT:
@@ -113,7 +113,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.programError = (BACNET_PROGRAM_ERROR)enumValue;
value->state.programError = (BACNET_PROGRAM_ERROR) enumValue;
break;
case RELIABILITY:
@@ -122,7 +122,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.reliability = (BACNET_RELIABILITY)enumValue;
value->state.reliability = (BACNET_RELIABILITY) enumValue;
break;
case STATE:
@@ -131,7 +131,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.state = (BACNET_EVENT_STATE)enumValue;
value->state.state = (BACNET_EVENT_STATE) enumValue;
break;
case SYSTEM_STATUS:
@@ -140,7 +140,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.systemStatus = (BACNET_DEVICE_STATUS)enumValue;
value->state.systemStatus = (BACNET_DEVICE_STATUS) enumValue;
break;
case UNITS:
@@ -149,7 +149,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.units = (BACNET_ENGINEERING_UNITS)enumValue;
value->state.units = (BACNET_ENGINEERING_UNITS) enumValue;
break;
case UNSIGNED_VALUE:
@@ -166,7 +166,7 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.lifeSafetyMode = (BACNET_LIFE_SAFETY_MODE)enumValue;
value->state.lifeSafetyMode = (BACNET_LIFE_SAFETY_MODE) enumValue;
break;
case LIFE_SAFETY_STATE:
@@ -175,7 +175,8 @@ int bacapp_decode_property_state(
&enumValue))) {
return -1;
}
value->state.lifeSafetyState = (BACNET_LIFE_SAFETY_STATE)enumValue;
value->state.lifeSafetyState =
(BACNET_LIFE_SAFETY_STATE) enumValue;
break;
default:
+1 -1
View File
@@ -910,7 +910,7 @@ uint16_t bvlc_receive(
Register-Foreign-Device message */
/* FIXME: clients may need this result */
(void) decode_unsigned16(&npdu[4], &result_code);
BVLC_Result_Code = (BACNET_BVLC_RESULT)result_code;
BVLC_Result_Code = (BACNET_BVLC_RESULT) result_code;
debug_printf("BVLC: Result Code=%d\n", BVLC_Result_Code);
/* not an NPDU */
npdu_len = 0;
+3 -2
View File
@@ -238,7 +238,7 @@ int cov_notify_decode_service_request(
decode_tag_number_and_value(&apdu[len], &tag_number,
&len_value);
len += decode_enumerated(&apdu[len], len_value, &property);
value->propertyIdentifier = (BACNET_PROPERTY_ID)property;
value->propertyIdentifier = (BACNET_PROPERTY_ID) property;
} else {
return -1;
}
@@ -572,7 +572,8 @@ int cov_subscribe_property_decode_service_request(
decode_tag_number_and_value(&apdu[len], &tag_number,
&len_value);
len += decode_enumerated(&apdu[len], len_value, &property);
data->monitoredProperty.propertyIdentifier = (BACNET_PROPERTY_ID)property;
data->monitoredProperty.propertyIdentifier =
(BACNET_PROPERTY_ID) property;
} else
return -4;
/* the optional array index is tag 1 */
+9 -8
View File
@@ -504,7 +504,7 @@ int event_notify_decode_service_request(
decode_context_enumerated(&apdu[len], 6, &value)) == -1) {
return -1;
} else {
data->eventType = (BACNET_EVENT_TYPE)value;
data->eventType = (BACNET_EVENT_TYPE) value;
len += section_length;
}
/* tag 7 - messageText */
@@ -533,7 +533,7 @@ int event_notify_decode_service_request(
decode_context_enumerated(&apdu[len], 8, &value)) == -1) {
return -1;
} else {
data->notifyType = (BACNET_NOTIFY_TYPE)value;
data->notifyType = (BACNET_NOTIFY_TYPE) value;
len += section_length;
}
switch (data->notifyType) {
@@ -553,7 +553,7 @@ int event_notify_decode_service_request(
&value)) == -1) {
return -1;
} else {
data->fromState = (BACNET_EVENT_STATE)value;
data->fromState = (BACNET_EVENT_STATE) value;
len += section_length;
}
break;
@@ -561,14 +561,14 @@ int event_notify_decode_service_request(
/* FIXME: handle this case */
default:
return -1;
}
/* tag 11 - toState */
if ((section_length =
decode_context_enumerated(&apdu[len], 11, &value)) == -1) {
return -1;
} else {
data->toState = (BACNET_EVENT_STATE)value;
data->toState = (BACNET_EVENT_STATE) value;
len += section_length;
}
/* tag 12 - eventValues */
@@ -750,7 +750,7 @@ int event_notify_decode_service_request(
return -1;
}
data->notificationParams.changeOfLifeSafety.newState =
(BACNET_LIFE_SAFETY_STATE)value;
(BACNET_LIFE_SAFETY_STATE) value;
len += section_length;
if (-1 == (section_length =
@@ -759,7 +759,7 @@ int event_notify_decode_service_request(
return -1;
}
data->notificationParams.changeOfLifeSafety.newMode =
(BACNET_LIFE_SAFETY_MODE)value;
(BACNET_LIFE_SAFETY_MODE) value;
len += section_length;
if (-1 == (section_length =
@@ -776,7 +776,8 @@ int event_notify_decode_service_request(
return -1;
}
data->notificationParams.changeOfLifeSafety.
operationExpected = (BACNET_LIFE_SAFETY_OPERATION)value;
operationExpected =
(BACNET_LIFE_SAFETY_OPERATION) value;
len += section_length;
break;
+1 -1
View File
@@ -109,7 +109,7 @@ int lso_decode_service_request(
decode_context_enumerated(&apdu[len], 2, &operation)) == -1) {
return -1;
}
data->operation = (BACNET_LIFE_SAFETY_OPERATION)operation;
data->operation = (BACNET_LIFE_SAFETY_OPERATION) operation;
len += section_length;
/*
+1 -1
View File
@@ -254,7 +254,7 @@ void tsm_timer_milliseconds(
TSM_List[i].RetryCount--;
TSM_List[i].RequestTimer = apdu_timeout();
if (TSM_List[i].RetryCount) {
datalink_send_pdu(&TSM_List[i].dest,
datalink_send_pdu(&TSM_List[i].dest,
&TSM_List[i].npdu_data, &TSM_List[i].apdu[0],
TSM_List[i].apdu_len);
} else {