diff options
| author | dacctal <dacctal@symlinx.net> | 2026-06-21 01:33:58 +0000 |
|---|---|---|
| committer | dacctal <dacctal@symlinx.net> | 2026-06-21 01:33:58 +0000 |
| commit | 7cde9aeb5dccce578c1eed13cf1ed2c61e446800 (patch) | |
| tree | 3323e34bbec0a87a4bb659a90816b28a6a241f5a /src/search.c | |
| parent | 6482da05e96630d622f7deea02e31cb0ff07c89e (diff) | |
huge code cleanup
Diffstat (limited to 'src/search.c')
| -rw-r--r-- | src/search.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c new file mode 100644 index 0000000..72fe350 --- /dev/null +++ b/src/search.c @@ -0,0 +1,18 @@ +#include <stdio.h> +#include <string.h> + +#include "lua_state.h" +#include "search.h" + +void search(const char* arg) { + if (!arg) { + for (size_t i = 0; i < cached_repos_count; i++) { + printf("%s\n", cached_repos[i].source_key); + } + return; + } + for (size_t i = 0; i < cached_repos_count; i++) { + if (!strstr(cached_repos[i].source_key, arg)) continue; + printf("%s\n", cached_repos[i].source_key); + } +} |
