aboutsummaryrefslogtreecommitdiff
path: root/src/cli/stasis/stasis_main.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2026-05-12 13:34:13 -0400
committerGitHub <noreply@github.com>2026-05-12 13:34:13 -0400
commitd8ee8c27444a56bb98dd8bd67a019a1e9efbcc10 (patch)
tree6ae1275a5f8e5794b917aac95c6cb1ab3f4cb6c5 /src/cli/stasis/stasis_main.c
parent4649a889a916aa377ebd3ca8f3daa9ac703baa34 (diff)
parent1d91efc28e30c8501428fec8ff6cd7b13dcdfb95 (diff)
downloadstasis-1.6.1.tar.gz
Merge pull request #139 from jhunkeler/bughunt-1002HEAD1.6.1master
Bughunt 0x1002
Diffstat (limited to 'src/cli/stasis/stasis_main.c')
-rw-r--r--src/cli/stasis/stasis_main.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/cli/stasis/stasis_main.c b/src/cli/stasis/stasis_main.c
index b902a8a..fb4ed80 100644
--- a/src/cli/stasis/stasis_main.c
+++ b/src/cli/stasis/stasis_main.c
@@ -522,41 +522,6 @@ static void transfer_artifacts(struct Delivery *ctx) {
}
}
-static char *center_text(const char *s, const size_t maxwidth) {
- if (maxwidth < 2) {
- SYSERROR("maximum width must be greater than 0");
- return NULL;
- }
-
- if (maxwidth % 2 != 0) {
- SYSERROR("maximum width (%zu) must be even", maxwidth);
- return NULL;
- }
-
- const size_t s_len = strlen(s);
- if (s_len + 1 > maxwidth) {
- SYSERROR("length of input string (%zu) exceeds maximum width (%zu)", s_len, maxwidth);
- return NULL;
- }
-
- char *result = calloc(maxwidth + 1, sizeof(*result));
- if (!result) {
- SYSERROR("unable to allocate bytes for centered text string");
- return NULL;
- }
- const size_t middle = (maxwidth / 2) - s_len / 2;
- size_t i = 0;
- for (; i < middle; i++) {
- result[i] = ' ';
- }
- result[i++] = 'v';
- strncpy(&result[i], s, maxwidth - middle - 1);
- result[maxwidth - 1] = '\0';
-
- return result;
-}
-
-
int main(int argc, char *argv[]) {
struct Delivery ctx;
struct Process proc = {