Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ BraceWrapping:
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: WebKit
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
Expand Down Expand Up @@ -78,7 +78,7 @@ IncludeCategories:
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
Expand Down Expand Up @@ -151,5 +151,5 @@ StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
# Be consistent with indent-width, even for people who use tab for indentation!
TabWidth: 2
TabWidth: 3
UseTab: Never
3 changes: 0 additions & 3 deletions base64/lib/arch/generic/dec_tail.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
st.bytes++;

// Deliberate fallthrough:
BASE64_FALLTHROUGH

case 1: if (slen-- == 0) {
ret = 1;
Expand All @@ -28,7 +27,6 @@
olen++;

// Deliberate fallthrough:
BASE64_FALLTHROUGH

case 2: if (slen-- == 0) {
ret = 1;
Expand Down Expand Up @@ -63,7 +61,6 @@
olen++;

// Deliberate fallthrough:
BASE64_FALLTHROUGH

case 3: if (slen-- == 0) {
ret = 1;
Expand Down
2 changes: 0 additions & 2 deletions base64/lib/arch/generic/enc_tail.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
olen += 1;

// Deliberate fallthrough:
BASE64_FALLTHROUGH

case 1: if (slen-- == 0) {
break;
Expand All @@ -18,7 +17,6 @@
olen += 1;

// Deliberate fallthrough:
BASE64_FALLTHROUGH

case 2: if (slen-- == 0) {
break;
Expand Down
50 changes: 6 additions & 44 deletions base64/lib/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,19 @@
// the compile-time environment. Compatibility and portability macros go here.

// Define machine endianness. This is for GCC:
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
# define BASE64_LITTLE_ENDIAN 1
#else
# define BASE64_LITTLE_ENDIAN 0
#endif

// This is for Clang:
#ifdef __LITTLE_ENDIAN__
# define BASE64_LITTLE_ENDIAN 1
#endif

#ifdef __BIG_ENDIAN__
# define BASE64_LITTLE_ENDIAN 0
#endif

// MSVC++ needs intrin.h for _byteswap_uint64 (issue #68):
#if BASE64_LITTLE_ENDIAN && defined(_MSC_VER)
# include <intrin.h>
#endif
#define BASE64_LITTLE_ENDIAN 1
#define BASE64_LITTLE_ENDIAN 1

// Endian conversion functions:
#if BASE64_LITTLE_ENDIAN
# ifdef _MSC_VER
// Microsoft Visual C++:
# define BASE64_HTOBE32(x) _byteswap_ulong(x)
# define BASE64_HTOBE64(x) _byteswap_uint64(x)
# else
// GCC and Clang:
# define BASE64_HTOBE32(x) __builtin_bswap32(x)
# define BASE64_HTOBE64(x) __builtin_bswap64(x)
# endif
#else
// No conversion needed:
# define BASE64_HTOBE32(x) (x)
# define BASE64_HTOBE64(x) (x)
#endif
#define BASE64_HTOBE32(x) __builtin_bswap32(x)
#define BASE64_HTOBE64(x) __builtin_bswap64(x)

// Detect word size:
#ifdef _INTEGRAL_MAX_BITS
# define BASE64_WORDSIZE _INTEGRAL_MAX_BITS
#define BASE64_WORDSIZE _INTEGRAL_MAX_BITS
#else
# define BASE64_WORDSIZE __WORDSIZE
#define BASE64_WORDSIZE __WORDSIZE
#endif

// End-of-file definitions.
Expand All @@ -55,13 +26,4 @@
// End-of-file when stream end has been reached or invalid input provided:
#define BASE64_EOF 2

// GCC 7 defaults to issuing a warning for fallthrough in switch statements,
// unless the fallthrough cases are marked with an attribute. As we use
// fallthrough deliberately, define an alias for the attribute:
#if __GNUC__ >= 7
# define BASE64_FALLTHROUGH __attribute__((fallthrough));
#else
# define BASE64_FALLTHROUGH
#endif

#endif // BASE64_ENV_H
8 changes: 0 additions & 8 deletions jsrc/tags.txt

This file was deleted.