summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.clang-format23
-rw-r--r--src/crypto/base64.cc2
-rw-r--r--src/crypto/ocb_internal.cc2
3 files changed, 27 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..71acd67
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,23 @@
+---
+Language: Cpp
+BasedOnStyle: Mozilla
+ColumnLimit: 116
+SpacesInParentheses: true
+AlwaysBreakAfterReturnType: None
+AlwaysBreakAfterDefinitionReturnType: None
+SpaceBeforeCpp11BracedList: true
+BreakBeforeBinaryOperators: All
+Cpp11BracedListStyle: true
+AllowShortBlocksOnASingleLine: Always
+BreakBeforeBraces: Custom
+BraceWrapping:
+ AfterClass: true
+ AfterControlStatement: Never
+ AfterFunction: true
+ AfterStruct: true
+ AfterEnum: true
+ SplitEmptyFunction: false
+ SplitEmptyRecord: false
+ SplitEmptyNamespace: false
+BreakConstructorInitializers: BeforeColon
+...
diff --git a/src/crypto/base64.cc b/src/crypto/base64.cc
index ae38e3e..129aecb 100644
--- a/src/crypto/base64.cc
+++ b/src/crypto/base64.cc
@@ -39,6 +39,7 @@
static const char table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const unsigned char reverse[] = {
+ // clang-format off
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f,
@@ -55,6 +56,7 @@ static const unsigned char reverse[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ // clang-format on
};
/* Reverse maps from an ASCII char to a base64 sixbit value. Returns > 0x3f on failure. */
diff --git a/src/crypto/ocb_internal.cc b/src/crypto/ocb_internal.cc
index 0d4848c..b45e574 100644
--- a/src/crypto/ocb_internal.cc
+++ b/src/crypto/ocb_internal.cc
@@ -24,6 +24,8 @@
/ Comments are welcome: Ted Krovetz <ted@krovetz.net> - Dedicated to Laurel K
/------------------------------------------------------------------------- */
+// clang-format off
+
#include "src/include/config.h"
/* This module implements the ae.h interface for OpenSSL, Apple Common