From 8da521f782b434ff63b6fbd867318eb416cf6d72 Mon Sep 17 00:00:00 2001 From: vx-clutch Date: Thu, 23 Oct 2025 20:48:44 -0400 Subject: [PATCH] save --- Makefile | 2 +- build-aux/TODO | 8 -------- build-aux/header.html | 5 ----- build-aux/test.c | 17 +++++++++++++++++ gcklib | 2 +- lib/err.c | 2 -- lib/err.h | 16 ++++++++++------ src/yait.c | 2 -- 8 files changed, 29 insertions(+), 25 deletions(-) delete mode 100644 build-aux/TODO delete mode 100644 build-aux/header.html create mode 100644 build-aux/test.c diff --git a/Makefile b/Makefile index b3a4ef6..b2a2875 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ OBJS := $(patsubst src/%.c,build/obj/%.o,$(SRCS)) BIN := bin/$(PACKAGE) COMMIT := $(shell git rev-list --count --all) -FLAGS := -I. -DCOMMIT=$(COMMIT) +FLAGS := -I. -DCOMMIT=$(COMMIT) -DSHOW_TRACE --std=c23 VERSION := $(shell git describe --tags --always --dirty) TARBALL := $(PACKAGE)-$(VERSION).tar.gz diff --git a/build-aux/TODO b/build-aux/TODO deleted file mode 100644 index 4b3c814..0000000 --- a/build-aux/TODO +++ /dev/null @@ -1,8 +0,0 @@ -GCK yait - TODO - -Todo: - - * Use the /*: something()@does something :*/ syntax for detecting entries - * Output html - -end of file TODO diff --git a/build-aux/header.html b/build-aux/header.html deleted file mode 100644 index 371e597..0000000 --- a/build-aux/header.html +++ /dev/null @@ -1,5 +0,0 @@ - - - -DOCUMENT - diff --git a/build-aux/test.c b/build-aux/test.c new file mode 100644 index 0000000..20623ec --- /dev/null +++ b/build-aux/test.c @@ -0,0 +1,17 @@ +#include + +/*- +int foo(int x) +Addes 34 to the provided integer x. +-*/ + +int foo(int x) +{ + return x + 34; +} + +int main() +{ + printf("foo: %d\n", foo(35)); + return 0; +} diff --git a/gcklib b/gcklib index c47af84..8cc0030 160000 --- a/gcklib +++ b/gcklib @@ -1 +1 @@ -Subproject commit c47af845bde5724c2517fde893c3364044a947fe +Subproject commit 8cc003030ccb012df96cb16ed72f1ed4045b4b55 diff --git a/lib/err.c b/lib/err.c index bfaeb77..7bfca35 100644 --- a/lib/err.c +++ b/lib/err.c @@ -44,8 +44,6 @@ #include "err.h" -#include "proginfo.h" - #define RESET "\x1B[0m" #define ERROR "\x1B[1;91m" #define WARN "\x1B[1;95m" diff --git a/lib/err.h b/lib/err.h index 09d21c2..920f4a4 100644 --- a/lib/err.h +++ b/lib/err.h @@ -54,12 +54,16 @@ void warnfa(int code); void hintfa(int code); #if defined(SHOW_TRACE) -#define errorf(fmt, ...) \ - errorf("%s:%s:%d: " fmt, __FILE__, __func__, \ - __LINE__ __VA_OPT__(, ) __VA_ARGS__) -#define fatalf(fmt, ...) \ - fatalf("%s:%s:%d: " fmt, __FILE__, __func__, \ - __LINE__ __VA_OPT__(, ) __VA_ARGS__) +#define errorf(fmt, ...) \ + do { \ + errorf("%s:%s:%d: " fmt, __FILE__, __func__, \ + __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ + } while (0) +#define fatalf(fmt, ...) \ + do { \ + fatalf("%s:%s:%d: " fmt, __FILE__, __func__, \ + __LINE__ __VA_OPT__(, ) __VA_ARGS__); \ + } while (0) #endif #endif diff --git a/src/yait.c b/src/yait.c index 8bda3ad..d6907cf 100644 --- a/src/yait.c +++ b/src/yait.c @@ -56,8 +56,6 @@ #include #include -#define SHOW_TRACE - #include "licence.h" #include "../lib/err.h" #include "../lib/fs.h"