sw

simple wallet
git clone git://git.bitsmanent.org/sw
Log | Files | Refs | README | LICENSE

commit 7db334bba1fb3567d1f1e580d76ec081d4f0fa5f
parent 3c42f9050f39118c6ef3ffc0c217822b8faf0286
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Sat, 29 Jun 2024 12:52:50 +0200

Increments id column width.

Diffstat:
Msw.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sw.c b/sw.c @@ -188,7 +188,7 @@ showmovs(int limit) { char time[32]; if(limit) - printf("%3s | %16s | %8s | %s\n", "id", "date time", "amount", "note"); + printf("%5s | %16s | %8s | %s\n", "id", "date time", "amount", "note"); for(m = movs; m; m = m->next) { tot += m->amount; ++nmovs; @@ -198,11 +198,11 @@ showmovs(int limit) { partial += m->amount; ++pmovs; strftime(time, sizeof time, "%d/%m/%Y %H:%M", localtime(&ts)); - printf("%3d | %16s | %8.2f | %s\n", m->id, time, m->amount, m->note); + printf("%5d | %16s | %8.2f | %s\n", m->id, time, m->amount, m->note); } if(limit > 1) - printf("%3s | %17s: %8.2f | %d movements\n", "", "Partial", partial, pmovs); - printf("%3s | %17s: %8.2f | %d movements\n", "", "Total", tot, nmovs); + printf("%5s | %17s: %8.2f | %d movements\n", "", "Partial", partial, pmovs); + printf("%5s | %17s: %8.2f | %d movements\n", "", "Total", tot, nmovs); } void