From c8eae39257c19af82f224094166c571d2f6c0ef9 Mon Sep 17 00:00:00 2001 From: kanoi Date: Sun, 27 Jul 2014 23:48:49 +1000 Subject: [PATCH] ckdb - a rolling activity character :) --- src/ckdb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ckdb.c b/src/ckdb.c index b94c4246..8ca7fa31 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -67,6 +67,9 @@ static char *EMPTY = ""; static char *db_user; static char *db_pass; +// Currently hard coded at 4 characters +static char *status_chars = "|/-\\"; + // size limit on the command string #define CMD_SIZ 31 #define ID_SIZ 31 @@ -6559,6 +6562,7 @@ static void *listener(void *arg) enum cmd_values cmdnum, last_cmd = 9001; int sockd, which_cmds; pthread_t summzer; + uint64_t counter = 0; K_ITEM *item; size_t siz; tv_t now; @@ -6681,6 +6685,11 @@ static void *listener(void *arg) } close(sockd); + char ch = status_chars[(counter++) & 0x3]; + putchar(ch); + putchar('\r'); + fflush(stdout); + if (cmdnum == CMD_SHUTDOWN) break;