aboutsummaryrefslogtreecommitdiff
path: root/include/utils.h
diff options
context:
space:
mode:
authorLibravatar Martin Michalec <martin@michalec.dev>2026-11-06 03:01:21 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-06 07:09:55 +0000
commitf3f55952a552eda8622b9a8c56449fa14c5720f8 (patch)
tree1ee13d1beaf8bdc50f90afce3146aee3f4c5bc14 /include/utils.h
parentfeat(hm): add hash map (diff)
downloadcodebase-f3f55952a552eda8622b9a8c56449fa14c5720f8.tar.gz
feat(utils): add various utilities
Diffstat (limited to 'include/utils.h')
-rw-r--r--include/utils.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/utils.h b/include/utils.h
new file mode 100644
index 0000000..52849ea
--- /dev/null
+++ b/include/utils.h
@@ -0,0 +1,29 @@
1// utils.h --- various utilities -*- C -*-
2//
3// Copyright (c) 2026 Martin Michalec <martin@michalec.dev>
4//
5// SPDX-License-Identifier: MIT
6//
7// This file is part of COSMOS Codebase.
8//
9// Commentary:
10//
11// Code:
12
13#ifndef INCLUDED_COSMOS_UTILS_H
14#define INCLUDED_COSMOS_UTILS_H
15
16#include "ms.h"
17#include "gpa.h"
18
19#include <stdio.h>
20
21struct ms load_file (const char *filename);
22void *nmmap (usz size, int n);
23void hexdump (FILE *out, const void *buf, usz sz);
24struct mb dot_svg (struct gpa gpa, struct mv dot, struct mv css);
25int mkdir_p (struct mv filename);
26
27#endif // INCLUDED_COSMOS_UTILS_H
28
29// utils.h ends here