From 6720940e1af9a88b30637098c78fe947ea81948d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 16 Dec 2001 01:41:29 +0000 Subject: [PATCH] Leading zeros didn't work well in IRSSI_VERSION_TIME. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2261 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- configure.in | 2 +- src/core/expandos.c | 2 +- src/fe-common/core/fe-common-core.c | 2 +- src/fe-common/core/fe-core-commands.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 3dac15ea..cf6e592c 100644 --- a/configure.in +++ b/configure.in @@ -759,7 +759,7 @@ dnl ** dnl ** IRSSI_VERSION_DATE and IRSSI_VERSION_TIME dnl ** VERSION_DATE=`head -1 $srcdir/ChangeLog|sed 's/^\(....\)-\(..\)-\(..\).*/\1\2\3/'` -VERSION_TIME=`head -1 $srcdir/ChangeLog|sed 's/^[[^ ]]* \(..\):\(..\).*/\1\2/'` +VERSION_TIME=`head -1 $srcdir/ChangeLog|sed -e 's/^[[^ ]]* \(..\):\(..\).*/\1\2/' -e 's/^0*//'` AC_SUBST(VERSION_DATE) AC_SUBST(VERSION_TIME) diff --git a/src/core/expandos.c b/src/core/expandos.c index a0719865..777d50e1 100644 --- a/src/core/expandos.c +++ b/src/core/expandos.c @@ -371,7 +371,7 @@ static char *expando_releasedate(SERVER_REC *server, void *item, int *free_ret) static char *expando_releasetime(SERVER_REC *server, void *item, int *free_ret) { *free_ret = TRUE; - return g_strdup_printf("%d", IRSSI_VERSION_TIME); + return g_strdup_printf("%04d", IRSSI_VERSION_TIME); } /* current working directory */ diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index 8cb3ce77..ae38a2e2 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -97,7 +97,7 @@ void fe_core_commands_deinit(void); static void print_version(void) { - printf(PACKAGE" " IRSSI_VERSION" (%d %d)\n", + printf(PACKAGE" " IRSSI_VERSION" (%d %04d)\n", IRSSI_VERSION_DATE, IRSSI_VERSION_TIME); exit(0); } diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c index fc4993e6..eb7f2abb 100644 --- a/src/fe-common/core/fe-core-commands.c +++ b/src/fe-common/core/fe-core-commands.c @@ -96,7 +96,7 @@ static void cmd_version(char *data) if (*data == '\0') { printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, - "Client: "PACKAGE" " IRSSI_VERSION" (%d %d)", + "Client: "PACKAGE" " IRSSI_VERSION" (%d %04d)", IRSSI_VERSION_DATE, IRSSI_VERSION_TIME); } }