From 229e3db325c8e79fec56e077f8cc2f3817d13ec5 Mon Sep 17 00:00:00 2001 From: Jean-Claude Graf Date: Sun, 29 Oct 2023 19:47:44 +0100 Subject: [PATCH] Add clang-format --- c.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/c.md b/c.md index c6766ff..b42bfe6 100644 --- a/c.md +++ b/c.md @@ -9,3 +9,16 @@ int option = 1; sockfd = socket(AF_INET, SOCK_STREAM, 0); setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &option, sizeof(option)); ``` + +## Formatting +### `clang-format` +- Format all files in-place: `clang-format -i *.c *.h` +- Specify format: + - Predefined style: `-style=