commit 8da521f782b434ff63b6fbd867318eb416cf6d72
parent 122ce49d23ff9c790219ac73829334e1ac0b3164
Author: vx-clutch <[email protected]>
Date: Thu, 23 Oct 2025 20:48:44 -0400
save
Diffstat:
7 files changed, 28 insertions(+), 24 deletions(-)
diff --git 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
@@ -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
@@ -1,5 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<title>DOCUMENT</title>
-</head>
diff --git a/build-aux/test.c b/build-aux/test.c
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+/*-
+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/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
@@ -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
@@ -56,8 +56,6 @@
#include <stdbool.h>
#include <time.h>
-#define SHOW_TRACE
-
#include "licence.h"
#include "../lib/err.h"
#include "../lib/fs.h"