Switch all // comments to /* ... */
Addresses #151
diff --git a/lib/zip.h b/lib/zip.h
index b0d1493..018c948 100644
--- a/lib/zip.h
+++ b/lib/zip.h
@@ -238,7 +238,7 @@
#define ZIP_SOURCE_MAKE_COMMAND_BITMASK(cmd) (((zip_int64_t)1) << (cmd))
-// clang-format off
+/* clang-format off */
#define ZIP_SOURCE_SUPPORTS_READABLE (ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_OPEN) \
| ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_READ) \
@@ -261,7 +261,7 @@
| ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_TELL_WRITE) \
| ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_REMOVE))
-// clang-format on
+/* clang-format on */
/* for use by sources */
struct zip_source_args_seek {
diff --git a/lib/zip_algorithm_bzip2.c b/lib/zip_algorithm_bzip2.c
index df4aeb6..a1d2898 100644
--- a/lib/zip_algorithm_bzip2.c
+++ b/lib/zip_algorithm_bzip2.c
@@ -242,7 +242,7 @@
}
}
-// clang-format off
+/* clang-format off */
zip_compression_algorithm_t zip_algorithm_bzip2_compress = {
compress_allocate,
@@ -267,4 +267,4 @@
process
};
-// clang-format on
+/* clang-format on */
diff --git a/lib/zip_algorithm_deflate.c b/lib/zip_algorithm_deflate.c
index 30e072a..daf4a2c 100644
--- a/lib/zip_algorithm_deflate.c
+++ b/lib/zip_algorithm_deflate.c
@@ -220,7 +220,7 @@
}
}
-// clang-format off
+/* clang-format off */
zip_compression_algorithm_t zip_algorithm_deflate_compress = {
compress_allocate,
@@ -245,4 +245,4 @@
process
};
-// clang-format on
+/* clang-format on */
diff --git a/lib/zip_algorithm_xz.c b/lib/zip_algorithm_xz.c
index 6dd14ce..7edc089 100644
--- a/lib/zip_algorithm_xz.c
+++ b/lib/zip_algorithm_xz.c
@@ -212,7 +212,7 @@
}
}
-// clang-format off
+/* clang-format off */
zip_compression_algorithm_t zip_algorithm_xz_compress = {
compress_allocate,
@@ -237,4 +237,4 @@
process
};
-// clang-format on
+/* clang-format on */
diff --git a/lib/zip_crypto_gnutls.c b/lib/zip_crypto_gnutls.c
index 9f9e991..9aa9efd 100644
--- a/lib/zip_crypto_gnutls.c
+++ b/lib/zip_crypto_gnutls.c
@@ -106,7 +106,7 @@
}
if ((ret = gnutls_hmac_init(hmac, GNUTLS_MAC_SHA1, secret, secret_length)) < 0) {
- // TODO: set error
+ /* TODO: set error */
free(hmac);
return NULL;
}
diff --git a/lib/zip_crypto_win.c b/lib/zip_crypto_win.c
index 97727ad..abdd7e0 100644
--- a/lib/zip_crypto_win.c
+++ b/lib/zip_crypto_win.c
@@ -250,7 +250,7 @@
ZeroMemory(Ti, DIGEST_SIZE);
for (j = 0; j < cIterations; j++) {
if (j == 0) {
- // construct first input for PRF
+ /* construct first input for PRF */
memcpy(U, pbSalt, cbSalt);
U[cbSalt] = (BYTE)((i & 0xFF000000) >> 24);
U[cbSalt + 1] = (BYTE)((i & 0x00FF0000) >> 16);
@@ -274,7 +274,7 @@
memcpy(&pbDerivedKey[(i - 1) * DIGEST_SIZE], Ti, DIGEST_SIZE);
}
else {
- // Take only the first r bytes
+ /* Take only the first r bytes */
memcpy(&pbDerivedKey[(i - 1) * DIGEST_SIZE], Ti, r);
}
}
@@ -382,7 +382,7 @@
PUCHAR pbHash;
};
-// https://code.msdn.microsoft.com/windowsdesktop/Hmac-Computation-Sample-11fe8ec1/sourcecode?fileId=42820&pathId=283874677
+/* https://code.msdn.microsoft.com/windowsdesktop/Hmac-Computation-Sample-11fe8ec1/sourcecode?fileId=42820&pathId=283874677 */
_zip_crypto_hmac_t *
_zip_crypto_hmac_new(const zip_uint8_t *secret, zip_uint64_t secret_length, zip_error_t *error) {
diff --git a/lib/zip_source_win32a.c b/lib/zip_source_win32a.c
index 68c007f..825598c 100644
--- a/lib/zip_source_win32a.c
+++ b/lib/zip_source_win32a.c
@@ -44,7 +44,7 @@
static int _win32_rename_temp_a(_zip_source_win32_read_file_t *ctx);
static int _win32_remove_a(const void *fname);
-// clang-format off
+/* clang-format off */
static _zip_source_win32_file_ops_t win32_ops_a = {
_win32_strdup_a,
_win32_open_a,
@@ -52,7 +52,7 @@
_win32_rename_temp_a,
_win32_remove_a
};
-// clang-format on
+/* clang-format on */
ZIP_EXTERN zip_source_t *
zip_source_win32a(zip_t *za, const char *fname, zip_uint64_t start, zip_int64_t len) {
diff --git a/lib/zip_source_win32w.c b/lib/zip_source_win32w.c
index 75afdcb..f62a658 100644
--- a/lib/zip_source_win32w.c
+++ b/lib/zip_source_win32w.c
@@ -44,7 +44,7 @@
static int _win32_rename_temp_w(_zip_source_win32_read_file_t *ctx);
static int _win32_remove_w(const void *fname);
-// clang-format off
+/* clang-format off */
static _zip_source_win32_file_ops_t win32_ops_w = {
_win32_strdup_w,
_win32_open_w,
@@ -52,7 +52,7 @@
_win32_rename_temp_w,
_win32_remove_w
};
-// clang-format on
+/* clang-format on */
ZIP_EXTERN zip_source_t *
zip_source_win32w(zip_t *za, const wchar_t *fname, zip_uint64_t start, zip_int64_t len) {
diff --git a/lib/zipint.h b/lib/zipint.h
index 721d36e..06133d1 100644
--- a/lib/zipint.h
+++ b/lib/zipint.h
@@ -111,14 +111,14 @@
zip_encryption_implementation _zip_get_encryption_implementation(zip_uint16_t method, int operation);
-// clang-format off
+/* clang-format off */
enum zip_compression_status {
ZIP_COMPRESSION_OK,
ZIP_COMPRESSION_END,
ZIP_COMPRESSION_ERROR,
ZIP_COMPRESSION_NEED_DATA
};
-// clang-format on
+/* clang-format on */
typedef enum zip_compression_status zip_compression_status_t;
struct zip_compression_algorithm {