From ebfad791508af77f7f8e942c88a6f5dc88bd6d41 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 18 Nov 2025 06:57:14 -0500 Subject: Improve alfsum usage a bit. --- src/self.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/self.c (limited to 'src/self.c') diff --git a/src/self.c b/src/self.c new file mode 100644 index 0000000..298608a --- /dev/null +++ b/src/self.c @@ -0,0 +1,13 @@ +#include "unalf.h" + +char *self; + +void set_self(char *argv0) { + char *p; + + self = argv0; + p = strrchr(self, '/'); + if(!p) p = strrchr(self, '\\'); // windows exe needs this + if(p) self = p + 1; +} + -- cgit v1.2.3