style: add clang-format style rules
This commit is contained in:
parent
3177e98bb4
commit
c7ebd8f042
22
.clang-format
Normal file
22
.clang-format
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
Language: Cpp
|
||||
BasedOnStyle: Google
|
||||
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
AllowShortIfStatementsOnASingleLine: false
|
||||
AllowShortLoopsOnASingleLine: false
|
||||
AlwaysBreakTemplateDeclarations: true
|
||||
BinPackArguments: false
|
||||
BinPackParameters: false
|
||||
BreakBeforeBraces: Attach
|
||||
ColumnLimit: 79
|
||||
Cpp11BracedListStyle: true
|
||||
DerivePointerAlignment: false
|
||||
IndentWrappedFunctionNames: true
|
||||
MaxEmptyLinesToKeep: 1
|
||||
PointerAlignment: Left
|
||||
SpaceAfterCStyleCast: true
|
||||
SpacesInContainerLiterals: false
|
||||
|
||||
# Alas, not supported:
|
||||
# ForceEmptyLineAtEOF: true
|
||||
@ -9,6 +9,8 @@
|
||||
# define SIO_BASE_HANDLE 0x48000022
|
||||
#endif
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#define AFD_NO_FAST_IO 0x00000001
|
||||
#define AFD_OVERLAPPED 0x00000002
|
||||
#define AFD_IMMEDIATE 0x00000004
|
||||
@ -39,6 +41,8 @@
|
||||
#define AFD_NUM_POLL_EVENTS 11
|
||||
#define AFD_POLL_ALL ((1 << AFD_NUM_POLL_EVENTS) - 1)
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#define FSCTL_AFD_BASE FILE_DEVICE_NETWORK
|
||||
|
||||
#define _AFD_CONTROL_CODE(operation, method) \
|
||||
|
||||
@ -53,6 +53,8 @@
|
||||
#ifndef EPOLL_TREE_H_
|
||||
#define EPOLL_TREE_H_
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
#define SPLAY_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *sph_root; /* root of the tree */ \
|
||||
@ -757,4 +759,6 @@ name##_RB_MINMAX(struct name *head, int val) \
|
||||
((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
|
||||
(x) = (y))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#endif /* EPOLL_TREE_H_ */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user