diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-04-30 09:43:55 -0400 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-05-11 15:55:12 -0400 |
| commit | 8f91345c4284ed6c882c38e961be106e72418ec8 (patch) | |
| tree | 257cd7639dab9d14747a7f18c1af0df15a5a4967 /src/cli | |
| parent | 79cbdf3b3ea5a38791cad816d650b542df6b4cbc (diff) | |
| download | stasis-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.c | 12 |
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); |
