aboutsummaryrefslogtreecommitdiff
path: root/src/cli
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-04-30 09:43:55 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-05-11 15:55:12 -0400
commit8f91345c4284ed6c882c38e961be106e72418ec8 (patch)
tree257cd7639dab9d14747a7f18c1af0df15a5a4967 /src/cli
parent79cbdf3b3ea5a38791cad816d650b542df6b4cbc (diff)
downloadstasis-8f91345c4284ed6c882c38e961be106e72418ec8.tar.gz
Move center_text function into utils.c/utils.h
* Remove 'v' prefix * Print version the same way in the indexer
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/stasis_indexer/stasis_indexer_main.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/cli/stasis_indexer/stasis_indexer_main.c b/src/cli/stasis_indexer/stasis_indexer_main.c
index 071057a..e87122e 100644
--- a/src/cli/stasis_indexer/stasis_indexer_main.c
+++ b/src/cli/stasis_indexer/stasis_indexer_main.c
@@ -304,7 +304,17 @@ int main(const int argc, char *argv[]) {
struct Delivery ctx = {0};
- printf(BANNER, VERSION, AUTHOR);
+ char *version = center_text(VERSION, strlen(STASIS_BANNER_HEADER));
+ if (!version) {
+ SYSERROR("%s", "version too long?");
+ version = strdup(VERSION);
+ if (!version) {
+ SYSERROR("%s", "unable to allocate uncentered fallback version string");
+ exit(1);
+ }
+ }
+ printf(BANNER, version, AUTHOR);
+ guard_free(version);
indexer_init_dirs(&ctx, workdir);