commit 6058bf513e549dc00b0b488068eeb17a718096ee
parent e8d159ab73e9e892625a7cf958ec3e0173ba5cc8
Author: citbl <citbl@citbl.org>
Date: Wed, 20 May 2026 22:34:15 +1000
reformat
Diffstat:
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/mtcc/src/main.c b/mtcc/src/main.c
@@ -2,7 +2,8 @@
#include "utils.h"
#include "lexer.h"
-int main(int argc, char **argv) {
+int
+main(int argc, char **argv) {
const char *filename;
file_t file;
struct lexer lexer;
diff --git a/mtcc/src/str.c b/mtcc/src/str.c
@@ -1,6 +1,7 @@
#include "str.h"
#include "array.h"
-void str_append(struct str *str, const char c) {
+void
+str_append(struct str *str, const char c) {
STRING_PUSH(str->value, str->len, str->cap, c);
}
diff --git a/mtcc/src/utils.c b/mtcc/src/utils.c
@@ -3,7 +3,8 @@
#include <stdlib.h>
#include <string.h>
-file_t read_file(const char *filename) {
+file_t
+read_file(const char *filename) {
long fsize;
char *source;
FILE *fp = fopen(filename, "rb");
@@ -39,7 +40,8 @@ file_t read_file(const char *filename) {
return (file_t){.contents = source, .len = fsize};
}
-void separate_file_from_path(const char *fullpath, char **out_path, char **out_filename) {
+void
+separate_file_from_path(const char *fullpath, char **out_path, char **out_filename) {
char *path = strdup(fullpath);
char *filename = strrchr(path, '/');