From 12d299f552a5aa8b6ea711dbe67805c4a5aab10d Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Sun, 15 Sep 2024 07:54:31 +0200 Subject: Move to LLVM ruleset for Clang autoformatter --- c-structs/.clang-format | 2 +- c-structs/read.c | 2 +- c-structs/struct.h | 1 - c-structs/write.c | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'c-structs') diff --git a/c-structs/.clang-format b/c-structs/.clang-format index 5f0e585..84ac618 100644 --- a/c-structs/.clang-format +++ b/c-structs/.clang-format @@ -1,4 +1,4 @@ -BasedOnStyle: Chromium +BasedOnStyle: LLVM ColumnLimit: 120 IndentWidth: 4 diff --git a/c-structs/read.c b/c-structs/read.c index b67974f..758256f 100644 --- a/c-structs/read.c +++ b/c-structs/read.c @@ -7,7 +7,7 @@ int main(void) { Character ch; - FILE* file = fopen("character.dat", "rb"); + FILE *file = fopen("character.dat", "rb"); if (file == NULL) { perror("Error opening file"); return 1; diff --git a/c-structs/struct.h b/c-structs/struct.h index 38a0cc7..f456bf7 100644 --- a/c-structs/struct.h +++ b/c-structs/struct.h @@ -3,4 +3,3 @@ typedef struct { int health; float damage; } Character; - diff --git a/c-structs/write.c b/c-structs/write.c index e83531a..5de3a8f 100644 --- a/c-structs/write.c +++ b/c-structs/write.c @@ -12,7 +12,7 @@ int main(void) { ch.health = 30; ch.damage = 5.9; - FILE* file = fopen("character.dat", "wb"); + FILE *file = fopen("character.dat", "wb"); if (file == NULL) { perror("Error opening file"); return 1; -- cgit v1.2.3