aboutsummaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorOrfeas <38209077+0xfea5@users.noreply.github.com>2024-04-16 00:19:57 +0300
committerOrfeas <38209077+0xfea5@users.noreply.github.com>2024-04-16 00:26:01 +0300
commit5369407082db53b68a1100e7b5391a1e9c36e621 (patch)
tree7a54bcf8d0c7b1737a65201a09fa7e06f1a4a8c0 /src/util.h
parentAttaching & Detaching from process (diff)
downloadlinux-game-trainer-5369407082db53b68a1100e7b5391a1e9c36e621.tar.gz
linux-game-trainer-5369407082db53b68a1100e7b5391a1e9c36e621.zip
Parse /proc/pid/maps
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
new file mode 100644
index 0000000..5fd680e
--- /dev/null
+++ b/src/util.h
@@ -0,0 +1,16 @@
1#ifndef _UTIL_H_
2#define _UTIL_H_
3#include <stdlib.h>
4
5#define ERROR(...) \
6 do { \
7 fprintf(stderr, __VA_ARGS__); \
8 exit(1); \
9 } while (0)
10
11#define LOG(...) \
12 fprintf(stderr, __VA_ARGS__)
13
14void* xmalloc(size_t size);
15
16#endif // _UTIL_H_