aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordacctal <donotcontactmevia@email.invalid>2026-07-18 03:23:44 +0000
committerdacctal <donotcontactmevia@email.invalid>2026-07-18 03:23:44 +0000
commit7e145a01a440c15aa3f0c1859cd543f4f7a36d4c (patch)
treed2372e34199a63e83420e8527d769aa647256f69 /include
parent9efe3b443e6f84f75ecfb6d5193ae1ff1eb3d485 (diff)
search and list are done!!!
Diffstat (limited to 'include')
-rw-r--r--include/globs.h5
-rw-r--r--include/search.h27
2 files changed, 30 insertions, 2 deletions
diff --git a/include/globs.h b/include/globs.h
index 9416923..114083e 100644
--- a/include/globs.h
+++ b/include/globs.h
@@ -68,11 +68,12 @@
panic("allocation of `%s` failed", #ptr); \
} while (0)
-#define panic(...) \
+#define panic(...) \
do { \
+ char *tmp = strrchr(__FILE__, '/'); \
eprintf(BOLD RED "panic:" COLOR_RESET " line %d, func \"%s\" in file " \
"\"%s\": ", \
- __LINE__, __func__, __FILE_NAME__); \
+ __LINE__, __func__, tmp ? tmp + 1 : __FILE__); \
eprintf(__VA_ARGS__); \
eprintf("\n"); \
fflush(stderr); \
diff --git a/include/search.h b/include/search.h
new file mode 100644
index 0000000..233537b
--- /dev/null
+++ b/include/search.h
@@ -0,0 +1,27 @@
+/*
+
+ pkgit - package it!
+
+ Copyright (C) 2026 dacctal
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef PKGIT_SEARCH_H
+#define PKGIT_SEARCH_H
+
+void list_installed(void);
+void search(char* arg);
+
+#endif