]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
build: use /* clang-format {on|off} */ annotation
authorDaiki Ueno <ueno@gnu.org>
Thu, 16 Mar 2023 07:21:37 +0000 (16:21 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 24 Apr 2023 03:45:45 +0000 (12:45 +0900)
Signed-off-by: Daiki Ueno <ueno@gnu.org>
18 files changed:
lib/includes/gnutls/abstract.h
lib/includes/gnutls/compat.h
lib/includes/gnutls/crypto.h
lib/includes/gnutls/dtls.h
lib/includes/gnutls/gnutls.h.in
lib/includes/gnutls/ocsp.h
lib/includes/gnutls/openpgp.h
lib/includes/gnutls/pkcs11.h
lib/includes/gnutls/pkcs12.h
lib/includes/gnutls/pkcs7.h
lib/includes/gnutls/socket.h
lib/includes/gnutls/system-keys.h
lib/includes/gnutls/tpm.h
lib/includes/gnutls/urls.h
lib/includes/gnutls/x509-ext.h
lib/includes/gnutls/x509.h
tests/test-chains-issuer-aia.h
tests/test-chains.h

index 4b4a718416fd6b47eb24f6c142021fe8db4202d2..b3c6ed969b020a237e4954b82b3aad42164e57d3 100644 (file)
 # include <gnutls/openpgp.h>
 # include <gnutls/tpm.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 /* Public key operations */
 
@@ -748,10 +746,8 @@ gnutls_pubkey_print(gnutls_pubkey_t pubkey,
                    gnutls_certificate_print_formats_t format,
                    gnutls_datum_t * out);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_ABSTRACT_H */
index 1fe33c839a423833925db6001f7383da3ae37329..3454b9f31edcecb3e349d3e8bd172205af7a382c 100644 (file)
 #ifndef GNUTLS_COMPAT_H
 # define GNUTLS_COMPAT_H
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 # ifdef __GNUC__
 
@@ -228,10 +226,8 @@ int gnutls_priority_compression_list(gnutls_priority_t pcache,
                                     const unsigned int **list)
     _GNUTLS_GCC_ATTR_DEPRECATED;
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_COMPAT_H */
index a4a30b13c69946ff81d472a75639e776a1183a25..b830baf6435797d6ce3d50007118955ac5be643e 100644 (file)
 
 # include <gnutls/gnutls.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 typedef struct api_cipher_hd_st *gnutls_cipher_hd_t;
 
@@ -335,10 +333,8 @@ int gnutls_encode_gost_rs_value(gnutls_datum_t * sig_value,
 int gnutls_decode_gost_rs_value(const gnutls_datum_t * sig_value,
                                gnutls_datum_t * r, gnutls_datum_t * s);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_CRYPTO_H */
index 225637e5021ecd238cb59e6cc77cb74c5784e90a..2526e98142790500c2922b8f8ba64639a39f04e7 100644 (file)
 
 # include <gnutls/gnutls.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 # define GNUTLS_COOKIE_KEY_SIZE 16
 
@@ -84,10 +82,8 @@ void gnutls_dtls_prestate_set(gnutls_session_t session,
 
 unsigned int gnutls_record_get_discarded(gnutls_session_t session);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_DTLS_H */
index 6fe6cbc7fc0b1cb24b65728f8c2fdf10c8744d91..b13081ce0862c5563eac64f7e26f00076a45964d 100644 (file)
 /* Get time_t. */
 # include <time.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 # define GNUTLS_VERSION "@VERSION@"
 
-# define GNUTLS_VERSION_MAJOR @MAJOR_VERSION@
-# define GNUTLS_VERSION_MINOR @MINOR_VERSION@
-# define GNUTLS_VERSION_PATCH @PATCH_VERSION@
+/* clang-format off */
+#define GNUTLS_VERSION_MAJOR @MAJOR_VERSION@
+#define GNUTLS_VERSION_MINOR @MINOR_VERSION@
+#define GNUTLS_VERSION_PATCH @PATCH_VERSION@
 
-# define GNUTLS_VERSION_NUMBER @NUMBER_VERSION@
+#define GNUTLS_VERSION_NUMBER @NUMBER_VERSION@
+/* clang-format on */
 
 # define GNUTLS_CIPHER_RIJNDAEL_128_CBC GNUTLS_CIPHER_AES_128_CBC
 # define GNUTLS_CIPHER_RIJNDAEL_256_CBC GNUTLS_CIPHER_AES_256_CBC
@@ -2365,9 +2365,9 @@ int gnutls_dh_params_cpy(gnutls_dh_params_t dst, gnutls_dh_params_t src);
 
 /* Session stuff
  */
-/* *INDENT-OFF* */
+/* clang-format off */
 @DEFINE_IOVEC_T@
-/* *INDENT-ON* */
+/* clang-format on */
 
 typedef ssize_t(*gnutls_pull_func) (gnutls_transport_ptr_t, void *, size_t);
 typedef ssize_t(*gnutls_push_func) (gnutls_transport_ptr_t, const void *,
@@ -3634,11 +3634,9 @@ gnutls_transport_is_ktls_enabled(gnutls_session_t session);
 # define GNUTLS_E_APPLICATION_ERROR_MAX -65000
 # define GNUTLS_E_APPLICATION_ERROR_MIN -65500
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 # include <gnutls/compat.h>
 
index 63945c5c131909d0c52036a2439e3c4a99506829..1e05469852b303b200de98647830120f0c59c7ea 100644 (file)
 # include <gnutls/gnutls.h>
 # include <gnutls/x509.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 # define GNUTLS_OCSP_NONCE "1.3.6.1.5.5.7.48.1.2"
 
@@ -269,10 +267,8 @@ gnutls_ocsp_resp_list_import2(gnutls_ocsp_resp_t ** ocsps,
                              const gnutls_datum_t * resp_data,
                              gnutls_x509_crt_fmt_t format, unsigned int flags);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_OCSP_H */
index 6c4dd5d8275c84c98e9752ad70df28b23bee4882..1e1b1a2f3b7e771dce7d45f55dfab8a25a9b75a2 100644 (file)
 # include <gnutls/gnutls.h>
 # include <limits.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 /* Openpgp certificate stuff
  */
@@ -424,10 +422,8 @@ int gnutls_certificate_set_openpgp_keyring_file
     (gnutls_certificate_credentials_t c, const char *file,
      gnutls_openpgp_crt_fmt_t format) _GNUTLS_GCC_ATTR_DEPRECATED;
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_OPENPGP_H */
index ba0e1addc81f753cdba735c2045bbb2bacb61204..4e6606eb59f49f6941df7eed588424ec8c98e37c 100644 (file)
 # include <gnutls/gnutls.h>
 # include <gnutls/x509.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 # define GNUTLS_PKCS11_MAX_PIN_LEN 256
 
@@ -491,10 +489,8 @@ gnutls_pkcs11_copy_attached_extension(const char *token_url,
 
 # define gnutls_x509_crt_import_pkcs11_url gnutls_x509_crt_import_url
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_PKCS11_H */
index 1f4874eb8c26ae2718a4a444d050c95ac82dcfdf..ad35089ceb59bc1eecfdf73df94aac1f2f7223b0 100644 (file)
 
 # include <gnutls/x509.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
        /* PKCS12 structures handling
         */
@@ -138,10 +136,8 @@ int gnutls_pkcs12_bag_get_friendly_name(gnutls_pkcs12_bag_t bag,
 int gnutls_pkcs12_bag_set_friendly_name(gnutls_pkcs12_bag_t bag,
                                        unsigned indx, const char *name);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_PKCS12_H */
index b6a223ed9cbda8c527116023fd0b7020be6d5463..777c0002f65dc5e58efe92182ec06b095dc86364 100644 (file)
 # include <gnutls/gnutls.h>
 # include <gnutls/x509.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 /* PKCS7 structures handling
  */
@@ -149,10 +147,8 @@ int gnutls_pkcs7_print_signature_info(gnutls_pkcs7_signature_info_st * info,
                                      gnutls_certificate_print_formats_t format,
                                      gnutls_datum_t * out);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_PKCS7_H */
index 9669e142eb761cdef59cb2b586c6f1ebc2cd1da7..ccf24a76e84483cfe6035345b21ea036428199ea 100644 (file)
 /* Get socklen_t */
 # include <sys/socket.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 void gnutls_transport_set_fastopen(gnutls_session_t session,
                                   int fd,
@@ -43,10 +41,8 @@ void gnutls_transport_set_fastopen(gnutls_session_t session,
                                   socklen_t connect_addrlen,
                                   unsigned int flags);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_SOCKET_H */
index 9b5845146217e501528b5963349eaa268fce369b..f392fcfa8e966d92c4dc3a62cbdd6ead69bec6d8 100644 (file)
  * they will be requested through the pin callbacks.
  */
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 struct system_key_iter_st;
 typedef struct system_key_iter_st *gnutls_system_key_iter_t;
@@ -54,10 +52,8 @@ int gnutls_system_key_add_x509(gnutls_x509_crt_t crt,
                               gnutls_x509_privkey_t privkey, const char *label,
                               char **cert_url, char **key_url);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_SYSTEM_KEYS_H */
index f899bd46d6c5b6655936c372ed7cd80dc62f6b14..e54e0bbf6660cfd30356f6d64c9c6e4a88f814d8 100644 (file)
 # include <gnutls/gnutls.h>
 # include <gnutls/x509.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 struct tpm_key_list_st;
 typedef struct tpm_key_list_st *gnutls_tpm_key_list_t;
@@ -71,10 +69,8 @@ int gnutls_tpm_get_registered(gnutls_tpm_key_list_t * list);
 int gnutls_tpm_privkey_delete(const char *url, const char *srk_password);
 
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_TPM_H */
index 87ab5e6db5ed44893523aa42353b0a42cb69fa79..3f2ef45a80e5d8da86def2ee17fbe89d00ed910e 100644 (file)
  * keys and certificates.
  */
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 typedef int (*gnutls_privkey_import_url_func)(gnutls_privkey_t pkey,
                                              const char *url, unsigned flags);
@@ -71,10 +69,8 @@ typedef struct gnutls_custom_url_st {
 
 int gnutls_register_custom_url(const gnutls_custom_url_st * st);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_URLS_H */
index a164e4af73e945e2a4de0c3f9134c01ee669c4d2..c0fa233b5a7d1a990799a2747ef8455fcc62e81e 100644 (file)
 # include <gnutls/gnutls.h>
 # include <gnutls/x509.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 typedef struct gnutls_subject_alt_names_st *gnutls_subject_alt_names_t;
 
@@ -215,10 +213,8 @@ int gnutls_x509_ct_sct_get(const gnutls_x509_ct_scts_t scts, unsigned idx,
                           gnutls_sign_algorithm_t * sigalg,
                           gnutls_datum_t * signature);
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_X509_EXT_H */
index 38db3082c07ef827fb7abd934d0f8eabd478e5c9..d5a5e8e9140d6d5e6c2422c5d0d04069ce2d0e84 100644 (file)
 
 # include <gnutls/gnutls.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 extern "C" {
 #endif
-/* *INDENT-ON* */
 
 /* Some OIDs usually found in Distinguished names, or
  * in Subject Directory Attribute extensions.
@@ -1710,10 +1708,8 @@ gnutls_x509_ext_print(gnutls_x509_ext_st * exts, unsigned int exts_size,
 
 # include <gnutls/pkcs7.h>
 
-/* *INDENT-OFF* */
 #ifdef __cplusplus
 }
 #endif
-/* *INDENT-ON* */
 
 #endif                         /* GNUTLS_X509_H */
index 724c0e2d1ee5eafb4e6e0f3dc45b66eed8fc3838..3bd8415a3d765d5e0c5b1393456079753250892b 100644 (file)
@@ -23,8 +23,6 @@
 #ifndef GNUTLS_TESTS_TEST_CHAINS_ISSUER_AIA_H
 # define GNUTLS_TESTS_TEST_CHAINS_ISSUER_AIA_H
 
-/* *INDENT-OFF* */
-
 #define MAX_CHAIN 1
 
 static const char *missing_cert_aia[] = {
@@ -132,6 +130,4 @@ static const char *missing_cert_aia_ca[] = {
 #  pragma GCC diagnostic pop
 #endif
 
-/* *INDENT-ON* */
-
 #endif                         /* GNUTLS_TESTS_TEST_CHAINS_ISSUER_AIA_H */
index 6355f28447f1b177b754f3fca41b389a018bfdd6..69d430e65f009c45081062674285c40f9e5be555 100644 (file)
@@ -23,8 +23,6 @@
 #ifndef GNUTLS_TESTS_TEST_CHAINS_H
 # define GNUTLS_TESTS_TEST_CHAINS_H
 
-/* *INDENT-OFF* */
-
 #define MAX_CHAIN 10
 
 static const char *chain_with_no_subject_id_in_ca_ok[] = {
@@ -4449,6 +4447,4 @@ static struct
 #  pragma GCC diagnostic pop
 #endif
 
-/* *INDENT-ON* */
-
 #endif                         /* GNUTLS_TESTS_TEST_CHAINS_H */