From 5b4ed0301c3b2786ef6043e0c48e49eca368c692 Mon Sep 17 00:00:00 2001 From: Stefan Zabka Date: Wed, 29 Apr 2020 18:20:55 +0200 Subject: clang-format now runs in makefile --- 01_exercise/Makefile | 1 + 01_exercise/bootloader.c | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/01_exercise/Makefile b/01_exercise/Makefile index 4bf8198..3576c2b 100644 --- a/01_exercise/Makefile +++ b/01_exercise/Makefile @@ -8,6 +8,7 @@ CFLAGS = -m32 -c -Os -march=i686 -ffreestanding -Wall -Werror LFLAGS = -m elf_i386 -static -Tlinker.ld -nostdlib --nmagic %.o: %.c + clang-format -i $^ $(CC) $(CFLAGS) $^ -o $@ %.elf: %.o diff --git a/01_exercise/bootloader.c b/01_exercise/bootloader.c index fe2d829..faede85 100644 --- a/01_exercise/bootloader.c +++ b/01_exercise/bootloader.c @@ -17,14 +17,12 @@ void put(char c) { // clang-format on } -char WRITE_STRING = 0x13; - -void print(char const * const str) { - for(int i = 0; str[i] != '\0'; ++i ) { +void print(char const *const str) { + for (int i = 0; str[i] != '\0'; ++i) { put(str[i]); } } void main(void) { - print("Hello!"); + print("Hello!"); } -- cgit v1.2.3-54-g00ecf