From de35e45daff6c44c2f07d7248a76215048a61e2a Mon Sep 17 00:00:00 2001 From: xavi Date: Sun, 15 Sep 2024 11:05:41 -0700 Subject: [PATCH] Modified print_fixed_width to add some whitespace --- src/dodo.c | 2 +- src/dodo.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dodo.c b/src/dodo.c index b25bf5c..03dd0e5 100644 --- a/src/dodo.c +++ b/src/dodo.c @@ -210,7 +210,7 @@ int get_num_rows(sqlite3 *db, char* table, char* status){ // Print with FIXED_WIDTH int print_fixed_width(const unsigned char* str, int width){ if (str){ - printf("%-*.*s", width, width, str); + printf("%-*.*s", width, width - FIXED_WHITESPACE, str); }else{ printf("%-*.*s", width, width, ""); } diff --git a/src/dodo.h b/src/dodo.h index 3181aeb..aa7c146 100644 --- a/src/dodo.h +++ b/src/dodo.h @@ -4,10 +4,11 @@ #define SQLQUERY_MAX 100 #define ARG_MAX 100 #define NUM_TASK_LISTS 3 -#define FIXED_TITLE_WIDTH 19 -#define FIXED_DATE_WIDTH 14 +#define FIXED_TITLE_WIDTH 21 +#define FIXED_DATE_WIDTH 12 #define FIXED_ID_WIDTH 4 #define FIXED_COLUMN_WIDTH (FIXED_ID_WIDTH + FIXED_TITLE_WIDTH +FIXED_DATE_WIDTH) +#define FIXED_WHITESPACE 2 #define FIXED_MAX_WIDTH (FIXED_COLUMN_WIDTH) #define TODAY_COL_START -1 #define BACKLOG_COL_START (FIXED_COLUMN_WIDTH + 1)