aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2004-08-27 22:38:37 +0000
committerDimitri Sokolyuk <demon@dim13.org>2004-08-27 22:38:37 +0000
commitb4cc838b29e12b2fb441eda315103d97d1cc17e6 (patch)
tree14d9de04f1f8c5d51a2ba0336f15812acdc04e69
parentdd65cd1ea8e7c768ec8bec7fcac0f01f2a91c1b0 (diff)
minor changes of title string
-rw-r--r--watch.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/watch.c b/watch.c
index 18a9f4b..3c79a87 100644
--- a/watch.c
+++ b/watch.c
@@ -24,7 +24,7 @@ static const char copyright[] =
"@(#) Copyright (c) 2003, 2004 demon <demon@vhost.dyndns.org>\n";
static const char rcsid[] =
"$Id$";
-static const char version[] = "0.6";
+static const char version[] = "0.6.1";
#if defined(__linux__)
#define __dead __volatile
@@ -196,23 +196,23 @@ title(void)
time_t tval;
struct tm *tm;
- if (cols >= (int) sizeof(title) || cols - 12 < 0)
+ if (cols >= (int) sizeof(title) || cols - 10 < 0)
return -1;
tval = time(NULL);
tm = localtime(&tval);
- snprintf(title, cols, " Every %ds : %s", period, buffer);
+ snprintf(title, cols, "Every %ds: %s", period, buffer);
tlen = strlen(title);
tlen2 = cols - tlen;
if (tlen2 > 0)
memset(title + tlen, ' ', tlen2);
- if (tlen2 < 12)
- title[cols - 12] = '>';
+ if (tlen2 < 9)
+ title[cols - 10] = '>';
- snprintf(title + cols - 11, 12, " %.2d:%.2d:%.2d ",
+ snprintf(title + cols - 9, 10, " %.2d:%.2d:%.2d",
tm->tm_hour, tm->tm_min, tm->tm_sec);
title[cols] = '\0';