[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 206/254: curl_endian: remove unused functions
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 206/254: curl_endian: remove unused functions |
Date: |
Sat, 17 Jun 2017 16:53:58 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.
commit 4ba20a511995b2179e59cf6d1880176d2d454bad
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Jun 2 08:32:36 2017 +0200
curl_endian: remove unused functions
Closes #1529
---
lib/curl_endian.c | 114 +-----------------------------------------------------
lib/curl_endian.h | 26 +------------
2 files changed, 2 insertions(+), 138 deletions(-)
diff --git a/lib/curl_endian.c b/lib/curl_endian.c
index c2d21de5e..c25db4956 100644
--- a/lib/curl_endian.c
+++ b/lib/curl_endian.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -62,44 +62,6 @@ unsigned int Curl_read32_le(const unsigned char *buf)
((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24);
}
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
-/*
- * Curl_read64_le()
- *
- * This function converts a 64-bit integer from the little endian format, as
- * used in the incoming package to whatever endian format we're using
- * natively.
- *
- * Parameters:
- *
- * buf [in] - A pointer to a 8 byte buffer.
- *
- * Returns the integer.
- */
-#if defined(HAVE_LONGLONG)
-unsigned long long Curl_read64_le(const unsigned char *buf)
-{
- return ((unsigned long long)buf[0]) |
- ((unsigned long long)buf[1] << 8) |
- ((unsigned long long)buf[2] << 16) |
- ((unsigned long long)buf[3] << 24) |
- ((unsigned long long)buf[4] << 32) |
- ((unsigned long long)buf[5] << 40) |
- ((unsigned long long)buf[6] << 48) |
- ((unsigned long long)buf[7] << 56);
-}
-#else
-unsigned __int64 Curl_read64_le(const unsigned char *buf)
-{
- return ((unsigned __int64)buf[0]) | ((unsigned __int64)buf[1] << 8) |
- ((unsigned __int64)buf[2] << 16) | ((unsigned __int64)buf[3] << 24) |
- ((unsigned __int64)buf[4] << 32) | ((unsigned __int64)buf[5] << 40) |
- ((unsigned __int64)buf[6] << 48) | ((unsigned __int64)buf[7] << 56);
-}
-#endif
-
-#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */
-
/*
* Curl_read16_be()
*
@@ -120,80 +82,6 @@ unsigned short Curl_read16_be(const unsigned char *buf)
}
/*
- * Curl_read32_be()
- *
- * This function converts a 32-bit integer from the big endian format, as
- * used in the incoming package to whatever endian format we're using
- * natively.
- *
- * Parameters:
- *
- * buf [in] - A pointer to a 4 byte buffer.
- *
- * Returns the integer.
- */
-unsigned int Curl_read32_be(const unsigned char *buf)
-{
- return ((unsigned int)buf[0] << 24) | ((unsigned int)buf[1] << 16) |
- ((unsigned int)buf[2] << 8) | ((unsigned int)buf[3]);
-}
-
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
-/*
- * Curl_read64_be()
- *
- * This function converts a 64-bit integer from the big endian format, as
- * used in the incoming package to whatever endian format we're using
- * natively.
- *
- * Parameters:
- *
- * buf [in] - A pointer to a 8 byte buffer.
- *
- * Returns the integer.
- */
-#if defined(HAVE_LONGLONG)
-unsigned long long Curl_read64_be(const unsigned char *buf)
-{
- return ((unsigned long long)buf[0] << 56) |
- ((unsigned long long)buf[1] << 48) |
- ((unsigned long long)buf[2] << 40) |
- ((unsigned long long)buf[3] << 32) |
- ((unsigned long long)buf[4] << 24) |
- ((unsigned long long)buf[5] << 16) |
- ((unsigned long long)buf[6] << 8) |
- ((unsigned long long)buf[7]);
-}
-#else
-unsigned __int64 Curl_read64_be(const unsigned char *buf)
-{
- return ((unsigned __int64)buf[0] << 56) | ((unsigned __int64)buf[1] << 48) |
- ((unsigned __int64)buf[2] << 40) | ((unsigned __int64)buf[3] << 32) |
- ((unsigned __int64)buf[4] << 24) | ((unsigned __int64)buf[5] << 16) |
- ((unsigned __int64)buf[6] << 8) | ((unsigned __int64)buf[7]);
-}
-#endif
-
-#endif /* CURL_SIZEOF_CURL_OFF_T > 4 */
-
-/*
- * Curl_write16_le()
- *
- * This function converts a 16-bit integer from the native endian format,
- * to little endian format ready for sending down the wire.
- *
- * Parameters:
- *
- * value [in] - The 16-bit integer value.
- * buffer [in] - A pointer to the output buffer.
- */
-void Curl_write16_le(const short value, unsigned char *buffer)
-{
- buffer[0] = (char)(value & 0x00FF);
- buffer[1] = (char)((value & 0xFF00) >> 8);
-}
-
-/*
* Curl_write32_le()
*
* This function converts a 32-bit integer from the native endian format,
diff --git a/lib/curl_endian.h b/lib/curl_endian.h
index 8a2b07ad8..4f345a6a2 100644
--- a/lib/curl_endian.h
+++ b/lib/curl_endian.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -28,33 +28,9 @@ unsigned short Curl_read16_le(const unsigned char *buf);
/* Converts a 32-bit integer from little endian */
unsigned int Curl_read32_le(const unsigned char *buf);
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
-/* Converts a 64-bit integer from little endian */
-#if defined(HAVE_LONGLONG)
-unsigned long long Curl_read64_le(const unsigned char *buf);
-#else
-unsigned __int64 Curl_read64_le(const unsigned char *buf);
-#endif
-#endif
-
/* Converts a 16-bit integer from big endian */
unsigned short Curl_read16_be(const unsigned char *buf);
-/* Converts a 32-bit integer from big endian */
-unsigned int Curl_read32_be(const unsigned char *buf);
-
-#if (CURL_SIZEOF_CURL_OFF_T > 4)
-/* Converts a 64-bit integer from big endian */
-#if defined(HAVE_LONGLONG)
-unsigned long long Curl_read64_be(const unsigned char *buf);
-#else
-unsigned __int64 Curl_read64_be(const unsigned char *buf);
-#endif
-#endif
-
-/* Converts a 16-bit integer to little endian */
-void Curl_write16_le(const short value, unsigned char *buffer);
-
/* Converts a 32-bit integer to little endian */
void Curl_write32_le(const int value, unsigned char *buffer);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 218/254: libtest: fix int-in-bool-context warnings, (continued)
- [GNUnet-SVN] [gnurl] 218/254: libtest: fix int-in-bool-context warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 244/254: RELEASE-PROCEDURE: updated future release dates, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 249/254: urlglob: fix division by zero, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 175/254: opts: more examples added in option man pages, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 251/254: libressl: OCSP and intermediate certs workaround no longer needed, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 80/254: typecheck-gcc: add support for CURLINFO_SOCKET, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 104/254: tftp: silence bad-function-cast warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 107/254: sendrecv: fix MinGW-w64 warning, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 152/254: ssh: ignore timeouts during disconnect, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 211/254: dedotdot: fixed output for ".." and "." only input, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 206/254: curl_endian: remove unused functions,
gnunet <=
- [GNUnet-SVN] [gnurl] 169/254: examples: fix Wimplicit-fallthrough warnings, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 158/254: cmake: remove CURL_CA_BUNDLE from cmake TODO, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 178/254: RELEASE-NOTES: synced with 3aaac8c2f, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 202/254: typecheck-gcc.h: check CURLINFO_CERTINFO, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 230/254: test1521: make the code < 80 columns wide, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 72/254: ssh: fix compiler warning from e40e9d7f0de, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 50/254: curl_setup: Ensure no more than one IDN lib is enabled, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 120/254: formboundary: convert assert into run-time check, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 114/254: tool_msgs: remove wrong cast, gnunet, 2017/06/17
- [GNUnet-SVN] [gnurl] 98/254: tests: fix -Wcast-qual warnings, gnunet, 2017/06/17