Skip to content

Commit 1474378

Browse files
htiboschactions-userSkptakActoryOumoninom1
authored
Give header files a uniform indentation (#1034)
* Give header files a uniform indentation * Uncrustify: triggered by comment. * A few more removals of /* ifndef ...*/ * After applying formattingChanges.patch * Undo indent to avoid huge white space changes * Undo more indent to avoid huge white space changes * Undo two more indent to avoid huge white space changes * Undo 15 more indent to avoid huge white space changes * Undo 3 more indent to avoid huge white space changes * Undo 4 more indent to avoid huge white space changes * Undo 3 more indent to avoid huge white space changes * It seems that core_cm55.h was not yet formatted * More files in MPS3_AN552 were not yet formatted. * And the last one * Uncrustify: triggered by comment. * Just a push to restart CI-checks * Placed some extern "c" comments again * Formatting fixes --------- Co-authored-by: GitHub Action <[email protected]> Co-authored-by: Soren Ptak <[email protected]> Co-authored-by: ActoryOu <[email protected]> Co-authored-by: Monika Singh <[email protected]>
1 parent 8761f51 commit 1474378

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+97
-87
lines changed

source/include/FreeRTOS_BitConfig.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676

7777

7878
#ifdef __cplusplus
79-
} /* extern "C" */
79+
} /* extern "C" */
8080
#endif
8181

82-
#endif /* !defined( FREERTOS_STREAM_BUFFER_H ) */
82+
#endif /* FREERTOS_STREAM_BUFFER_H */

source/include/FreeRTOS_DHCPv6.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101

102102
/** @brief Default v6 DHCP client port. */
103103
#define ipDHCPv6_CLIENT_PORT 546U
104-
/** @brief Default v6 DHCP server port. */
104+
/** @brief Default v6 DHCP server port. */
105105
#define ipDHCPv6_SERVER_PORT 547U
106106

107107
/** @brief The ID of a client or a server. */
@@ -159,12 +159,12 @@
159159
void vDHCPv6Stop( struct xNetworkEndPoint * pxEndPoint );
160160

161161
#ifdef __cplusplus
162-
} /* extern "C" */
162+
} /* extern "C" */
163163
#endif
164164

165165
/* The application should supply the following time-function.
166166
* It must return the number of seconds that have passed since
167167
* 1/1/1970. */
168168
extern uint32_t ulApplicationTimeHook( void );
169169

170-
#endif /* FREERTOS_DHCPv6_H */
170+
#endif /* FREERTOS_DHCPV6_H */

source/include/FreeRTOS_DNS_Cache.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@
8181
struct freertos_addrinfo ** ppxAddressInfo );
8282
#endif /* if ( ipconfigUSE_DNS_CACHE == 1 ) */
8383

84-
#endif /* ifndef FREERTOS_DNS_CACHE_H */
84+
#endif /* FREERTOS_DNS_CACHE_H */

source/include/FreeRTOS_DNS_Callback.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@
7272
#endif
7373
/* *INDENT-ON* */
7474

75-
#endif /* ifndef FREERTOS_DNS_CALLBACK_H */
75+
#endif /* FREERTOS_DNS_CALLBACK_H */

source/include/FreeRTOS_DNS_Globals.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,4 +324,4 @@
324324
#define ipMDNS_IP_ADDRESS 0xfb0000e0U /* 224.0.0.251 */
325325
#endif
326326

327-
#endif /* ifndef FREERTOS_DNS_GLOBALS_H */
327+
#endif /* FREERTOS_DNS_GLOBALS_H */

source/include/FreeRTOS_DNS_Networking.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@
5959
void DNS_CloseSocket( Socket_t xDNSSocket );
6060

6161
#endif /* if ( ipconfigUSE_DNS != 0 ) */
62-
#endif /* ifndef FREERTOS_DNS_NETWORKING_H */
62+
#endif /* FREERTOS_DNS_NETWORKING_H */

source/include/FreeRTOS_DNS_Parser.h

+15-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@
3838

3939
/* Standard includes. */
4040
#include <stdint.h>
41+
42+
/* *INDENT-OFF* */
43+
#ifdef __cplusplus
44+
extern "C" {
45+
#endif
46+
/* *INDENT-ON* */
47+
4148
#if ( ipconfigUSE_DNS != 0 )
4249

4350
/** @brief Flag DNS parsing errors in situations where an IPv4 address is the return
@@ -87,4 +94,11 @@
8794
size_t * uxBytesRead );
8895

8996
#endif /* if ( ipconfigUSE_DNS != 0 ) */
90-
#endif /* ifndef FREERTOS_DNS_PARSER_H */
97+
98+
/* *INDENT-OFF* */
99+
#ifdef __cplusplus
100+
} /* extern "C" */
101+
#endif
102+
/* *INDENT-ON* */
103+
104+
#endif /* FREERTOS_DNS_PARSER_H */

source/include/FreeRTOS_IPv4.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ enum eFrameProcessingResult prvCheckIP4HeaderOptions( struct xNETWORK_BUFFER * c
113113
#endif
114114
/* *INDENT-ON* */
115115

116-
#endif /* FREERTOS_IP_H */
116+
#endif /* FREERTOS_IPV4_H */

source/include/FreeRTOS_IPv4_Private.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,4 @@ typedef struct xTCP_PACKET TCPPacket_t;
131131
#endif
132132
/* *INDENT-ON* */
133133

134-
#endif /* FREERTOS_IP_PRIVATE_H */
134+
#endif /* FREERTOS_IPV4_PRIVATE_H */

source/include/FreeRTOS_IPv4_Sockets.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
struct freertos_sockaddr * pxSourceAddress );
5454

5555
#ifdef __cplusplus
56-
} /* extern "C" */
56+
} /* extern "C" */
5757
#endif
58+
5859
#endif /* FREERTOS_IPV4_SOCKETS_H */

source/include/FreeRTOS_IPv4_Utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ BaseType_t prvChecksumIPv4Checks( uint8_t * pucEthernetBuffer,
6464
#endif
6565
/* *INDENT-ON* */
6666

67-
#endif /* FREERTOS_IP_UTILS_H */
67+
#endif /* FREERTOS_IPV4_UTILS_H */

source/include/FreeRTOS_IPv6.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ BaseType_t xGetExtensionOrder( uint8_t ucProtocol,
129129

130130
/* *INDENT-OFF* */
131131
#ifdef __cplusplus
132-
} /* extern "C" */
132+
} /* extern "C" */
133133
#endif
134134
/* *INDENT-ON* */
135135

136-
#endif /* FREERTOS_IP_H */
136+
#endif /* FREERTOS_IPV6_H */

source/include/FreeRTOS_IPv6_Private.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,4 +271,4 @@ eFrameProcessingResult_t prvProcessICMPMessage_IPv6( NetworkBufferDescriptor_t *
271271
#endif
272272
/* *INDENT-ON* */
273273

274-
#endif /* FREERTOS_IP_PRIVATE_H */
274+
#endif /* FREERTOS_IPV6_PRIVATE_H */

source/include/FreeRTOS_IPv6_Sockets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
struct freertos_sockaddr * pxSourceAddress );
120120

121121
#ifdef __cplusplus
122-
} /* extern "C" */
122+
} /* extern "C" */
123123
#endif
124124

125125
#endif /* FREERTOS_IPV6_SOCKETS_H */

source/include/FreeRTOS_IPv6_Utils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ size_t usGetExtensionHeaderLength( const uint8_t * pucEthernetBuffer,
7272
#endif
7373
/* *INDENT-ON* */
7474

75-
#endif /* FREERTOS_IP_UTILS_H */
75+
#endif /* FREERTOS_IPV6_UTILS_H */

source/include/FreeRTOS_ND.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@
210210

211211
/* *INDENT-OFF* */
212212
#ifdef __cplusplus
213-
}
213+
} /* extern "C" */
214214
#endif
215215
/* *INDENT-ON* */
216216

source/include/FreeRTOS_Routing.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@
348348
#endif
349349

350350
#ifdef __cplusplus
351-
} /* extern "C" */
351+
} /* extern "C" */
352352
#endif
353353

354354
#endif /* FREERTOS_ROUTING_H */

source/include/FreeRTOS_Sockets.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@
590590
#endif
591591

592592
#ifdef __cplusplus
593-
} /* extern "C" */
593+
} /* extern "C" */
594594
#endif
595595

596596
#endif /* FREERTOS_SOCKETS_H */

source/include/FreeRTOS_errno_TCP.h

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
#ifndef FREERTOS_ERRNO_TCP
2929
#define FREERTOS_ERRNO_TCP
3030

31+
/* *INDENT-OFF* */
32+
#ifdef __cplusplus
33+
extern "C" {
34+
#endif
35+
/* *INDENT-ON* */
36+
3137
/* The following definitions will be included in the core FreeRTOS code in
3238
* future versions of FreeRTOS - hence the 'pd' (ProjDefs) prefix - at which time
3339
* this file will be removed. */
@@ -95,4 +101,10 @@ const char * FreeRTOS_strerror_r( BaseType_t xErrnum,
95101
char * pcBuffer,
96102
size_t uxLength );
97103

104+
/* *INDENT-OFF* */
105+
#ifdef __cplusplus
106+
} /* extern "C" */
107+
#endif
108+
/* *INDENT-ON* */
109+
98110
#endif /* FREERTOS_ERRNO_TCP */

source/portable/NetworkInterface/ATSAM4E/ethernet_phy.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
#include "instance/gmac.h"
5555

5656
/*/ @cond 0 */
57-
/**INDENT-OFF**/
57+
/* *INDENT-OFF* */
5858
#ifdef __cplusplus
59-
extern "C" {
59+
extern "C" {
6060
#endif
61-
/**INDENT-ON**/
61+
/* *INDENT-ON* */
6262
/*/ @endcond */
6363

6464
/**
@@ -506,11 +506,11 @@ uint8_t ethernet_phy_reset( Gmac * p_gmac,
506506
}
507507

508508
/*/ @cond 0 */
509-
/**INDENT-OFF**/
509+
/* *INDENT-OFF* */
510510
#ifdef __cplusplus
511-
}
511+
} /* extern "C" */
512512
#endif
513-
/**INDENT-ON**/
513+
/* *INDENT-ON* */
514514
/*/ @endcond */
515515

516516
/**

source/portable/NetworkInterface/ATSAM4E/ethernet_phy.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@
281281
extern PhyProps_t phy_props;
282282

283283
#ifdef __cplusplus
284-
} /* extern "C" */
284+
} /* extern "C" */
285285
#endif
286286

287287
#endif /* #ifndef ETHERNET_PHY_H_INCLUDED */

source/portable/NetworkInterface/ATSAM4E/gmac.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,9 @@
5858
#include "ethernet_phy.h"
5959

6060
/*/ @cond 0 */
61-
/**INDENT-OFF**/
6261
#ifdef __cplusplus
6362
extern "C" {
6463
#endif
65-
/**INDENT-ON**/
6664
/*/ @endcond */
6765

6866
#ifndef ARRAY_SIZE
@@ -1028,9 +1026,7 @@ void gmac_handler( gmac_device_t * p_gmac_dev )
10281026
/*@} */
10291027

10301028
/*/ @cond 0 */
1031-
/**INDENT-OFF**/
10321029
#ifdef __cplusplus
1033-
}
1030+
} /* extern "C" */
10341031
#endif
1035-
/**INDENT-ON**/
10361032
/*/ @endcond */

source/portable/NetworkInterface/ATSAM4E/gmac.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,9 @@
4747
#include "compiler.h"
4848

4949
/*/ @cond 0 */
50-
/**INDENT-OFF**/
5150
#ifdef __cplusplus
5251
extern "C" {
5352
#endif
54-
/**INDENT-ON**/
5553
/*/ @endcond */
5654

5755
/** The buffer addresses written into the descriptors must be aligned, so the
@@ -1228,11 +1226,9 @@
12281226
void gmac_handler( gmac_device_t * p_gmac_dev );
12291227

12301228
/*/ @cond 0 */
1231-
/**INDENT-OFF**/
12321229
#ifdef __cplusplus
1233-
}
1230+
} /* extern "C" */
12341231
#endif
1235-
/**INDENT-ON**/
12361232
/*/ @endcond */
12371233

12381234
/**

source/portable/NetworkInterface/ATSAM4E/instance/gmac.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,9 @@
4848
#include "component/gmac.h"
4949

5050
/*/ @cond 0 */
51-
/**INDENT-OFF**/
5251
#ifdef __cplusplus
5352
extern "C" {
5453
#endif
55-
/**INDENT-ON**/
5654
/*/ @endcond */
5755

5856
/** The buffer addresses written into the descriptors must be aligned, so the
@@ -1232,11 +1230,9 @@
12321230
void gmac_handler( gmac_device_t * p_gmac_dev );
12331231

12341232
/*/ @cond 0 */
1235-
/**INDENT-OFF**/
12361233
#ifdef __cplusplus
1237-
}
1234+
} /* extern "C" */
12381235
#endif
1239-
/**INDENT-ON**/
12401236
/*/ @endcond */
12411237

12421238
/**

source/portable/NetworkInterface/DriverSAM/gmac_SAM.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@
7777
#endif
7878

7979
/*/ @cond 0 */
80-
/**INDENT-OFF**/
80+
/* *INDENT-OFF* */
8181
#ifdef __cplusplus
82-
extern "C" {
82+
extern "C" {
8383
#endif
84-
/**INDENT-ON**/
84+
/* *INDENT-ON* */
8585
/*/ @endcond */
8686

8787
#ifndef ARRAY_SIZE
@@ -1015,9 +1015,9 @@ void gmac_handler( gmac_device_t * p_gmac_dev )
10151015
/*@} */
10161016

10171017
/*/ @cond 0 */
1018-
/**INDENT-OFF**/
1018+
/* *INDENT-OFF* */
10191019
#ifdef __cplusplus
1020-
}
1020+
} /* extern "C" */
10211021
#endif
1022-
/**INDENT-ON**/
1022+
/* *INDENT-ON* */
10231023
/*/ @endcond */

source/portable/NetworkInterface/DriverSAM/gmac_SAM.h

+1-5
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,9 @@
5151
#include "compiler.h"
5252

5353
/*/ @cond 0 */
54-
/**INDENT-OFF**/
5554
#ifdef __cplusplus
5655
extern "C" {
5756
#endif
58-
/**INDENT-ON**/
5957
/*/ @endcond */
6058

6159
/** The buffer addresses written into the descriptors must be aligned, so the
@@ -1545,11 +1543,9 @@
15451543
size_t uxLength );
15461544

15471545
/*/ @cond 0 */
1548-
/**INDENT-OFF**/
15491546
#ifdef __cplusplus
1550-
}
1547+
} /* extern "C" */
15511548
#endif
1552-
/**INDENT-ON**/
15531549
/*/ @endcond */
15541550

15551551
#ifndef GMAC_STATS

source/portable/NetworkInterface/MPS2_AN385/ether_lan9118/smsc9220_eth_drv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@
541541
smsc9220_eth_dev_t * dev );
542542

543543
#ifdef __cplusplus
544-
}
544+
} /* extern "C" */
545545
#endif
546546

547547
#endif /* __SMSC9220_ETH_H__ */

source/portable/NetworkInterface/MPS3_AN552/CMSIS_Driver/Driver_ETH_MAC.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
#define DRIVER_ETH_MAC_H_
6262

6363
#ifdef __cplusplus
64-
extern "C"
65-
{
64+
extern "C" {
6665
#endif
6766

6867
#include "Driver_ETH.h"
@@ -310,7 +309,7 @@ typedef struct _ARM_DRIVER_ETH_MAC {
310309
} const ARM_DRIVER_ETH_MAC;
311310

312311
#ifdef __cplusplus
313-
}
312+
} /* extern "C" */
314313
#endif
315314

316315
#endif /* DRIVER_ETH_MAC_H_ */

source/portable/NetworkInterface/MPS3_AN552/CMSIS_Driver/Driver_ETH_PHY.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ typedef struct _ARM_DRIVER_ETH_PHY {
143143
} const ARM_DRIVER_ETH_PHY;
144144

145145
#ifdef __cplusplus
146-
}
146+
} /* extern "C" */
147147
#endif
148148

149149
#endif /* DRIVER_ETH_PHY_H_ */

0 commit comments

Comments
 (0)