Move trailing macro comments to previous line.
Clang-format was severy confused with following construct:
\\#define MBEDTLS_macro_name /**< description */
Used script:
```
import re
import sys
for arg in sys.argv[1:]:
print(arg)
with open(arg, 'r') as file:
content = file.read()
content = re.sub(r"((//)?#define MBEDTLS_\w+ *(?<= )-?\w+) *(/\*\*<(.*))", r"/**\4\n\1", \
content, flags = re.M)
with open(arg, 'w') as file:
file.write(content)
```
Executed with:
`find . -regextype posix-egrep -regex ".*\.([hc]|fmt|function)" | xargs -L1 python script.py`
One comment in ctr_drbg.h had to be fixed manually, because /**< was spanning on multiple line.
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
diff --git a/include/mbedtls/aria.h b/include/mbedtls/aria.h
index 1a96d15..903262d 100644
--- a/include/mbedtls/aria.h
+++ b/include/mbedtls/aria.h
@@ -37,12 +37,17 @@
#include "mbedtls/platform_util.h"
-#define MBEDTLS_ARIA_ENCRYPT 1 /**< ARIA encryption. */
-#define MBEDTLS_ARIA_DECRYPT 0 /**< ARIA decryption. */
+/** ARIA encryption. */
+#define MBEDTLS_ARIA_ENCRYPT 1
+/** ARIA decryption. */
+#define MBEDTLS_ARIA_DECRYPT 0
-#define MBEDTLS_ARIA_BLOCKSIZE 16 /**< ARIA block size in bytes. */
-#define MBEDTLS_ARIA_MAX_ROUNDS 16 /**< Maxiumum number of rounds in ARIA. */
-#define MBEDTLS_ARIA_MAX_KEYSIZE 32 /**< Maximum size of an ARIA key in bytes. */
+/** ARIA block size in bytes. */
+#define MBEDTLS_ARIA_BLOCKSIZE 16
+/** Maxiumum number of rounds in ARIA. */
+#define MBEDTLS_ARIA_MAX_ROUNDS 16
+/** Maximum size of an ARIA key in bytes. */
+#define MBEDTLS_ARIA_MAX_KEYSIZE 32
/** Bad input data. */
#define MBEDTLS_ERR_ARIA_BAD_INPUT_DATA -0x005C