From fd00c54b28d4fd109b0d39a1a90cdbb27b94fa51 Mon Sep 17 00:00:00 2001 From: sivert <s.sliper@ecs.soton.ac.uk> Date: Wed, 11 Dec 2019 14:32:48 +0000 Subject: [PATCH] Ran clang-format and added .clang-format file. --- .clang-format | 7 +++++++ crc32/crc.h | 2 +- crc32/sniptype.h | 14 +++++++------- iclib/ic.h | 1 - 4 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 .clang-format mode change 100755 => 100644 crc32/crc.h mode change 100755 => 100644 crc32/sniptype.h diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..de35aea --- /dev/null +++ b/.clang-format @@ -0,0 +1,7 @@ +--- +BasedOnStyle: Google +IndentWidth: '2' +SortIncludes: 'true' +UseTab: Never + +... diff --git a/crc32/crc.h b/crc32/crc.h old mode 100755 new mode 100644 index 3989366..a4ed1bb --- a/crc32/crc.h +++ b/crc32/crc.h @@ -13,7 +13,7 @@ */ #define UPDC32(octet, crc) \ - (crc_32_tab[((crc) ^ ((BYTE)octet)) & 0xff] ^ ((crc) >> 8)) + (crc_32_tab[((crc) ^ ((BYTE)octet)) & 0xff] ^ ((crc) >> 8)) DWORD updateCRC32(unsigned char ch, DWORD crc); DWORD crc32buf(char *buf, size_t len); diff --git a/crc32/sniptype.h b/crc32/sniptype.h old mode 100755 new mode 100644 index 899ee5b..2927b47 --- a/crc32/sniptype.h +++ b/crc32/sniptype.h @@ -7,18 +7,18 @@ #ifndef SNIPTYPE__H #define SNIPTYPE__H -#include <stdlib.h> /* For free() */ -#include <string.h> /* For NULL & strlen() */ +#include <stdlib.h> /* For free() */ +#include <string.h> /* For NULL & strlen() */ -typedef enum {Error_ = -1, Success_, False_ = 0, True_} Boolean_T; +typedef enum { Error_ = -1, Success_, False_ = 0, True_ } Boolean_T; /*#if !defined(WIN32) && !defined(_WIN32) && !defined(__NT__) \ && !defined(_WINDOWS) #if !defined(OS2)*/ - typedef unsigned char BYTE; - typedef unsigned long DWORD; +typedef unsigned char BYTE; +typedef unsigned long DWORD; /* #endif*/ - typedef unsigned short WORD; +typedef unsigned short WORD; /*#else #define WIN32_LEAN_AND_MEAN #define NOGDI @@ -32,6 +32,6 @@ typedef enum {Error_ = -1, Success_, False_ = 0, True_} Boolean_T; #define NUL '\0' #define LAST_CHAR(s) (((char *)s)[strlen(s) - 1]) #define TOBOOL(x) (!(!(x))) -#define FREE(p) (free(p),(p)=NULL) +#define FREE(p) (free(p), (p) = NULL) #endif /* SNIPTYPE__H */ diff --git a/iclib/ic.h b/iclib/ic.h index 2673299..891330a 100644 --- a/iclib/ic.h +++ b/iclib/ic.h @@ -25,4 +25,3 @@ void ic_init(void); void update_thresholds(uint16_t n_suspend, uint16_t n_restore); #endif /* IC_SRC */ - -- GitLab