From ee6eadf12892fe583dab9b4b06e00e32dae82ada Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sun, 22 Jan 2017 23:59:29 +0100 Subject: kissnet: Switch version number printed to ax25-tools version. The version number has not been changed ever since ax25-tools 0.0.1 making the version useless for bug reporting. Make sure the banner printed by kissnetd stays properly formatted even if the version string's length changes. Signed-off-by: Ralf Baechle --- kiss/kissnetd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'kiss') diff --git a/kiss/kissnetd.c b/kiss/kissnetd.c index 8c8fce9..366bb89 100644 --- a/kiss/kissnetd.c +++ b/kiss/kissnetd.c @@ -24,7 +24,8 @@ #include #include -static char *Version = "1.5"; +#include + static int VerboseMode; static int MaxFrameSize = 512; @@ -57,14 +58,17 @@ static void Usage(void) static void Banner(int Small) { if (Small) { - printf("kissnetd V %s by Frederic RIBLE F1OAT - ATEPRA FPAC/Linux Project\n", Version); + printf("kissnetd V %s by Frederic RIBLE F1OAT - ATEPRA FPAC/Linux Project\n", VERSION); } else { printf("****************************************\n"); printf("* Network broadcast between kiss ports *\n"); printf("* ATEPRA FPAC/Linux Project *\n"); printf("****************************************\n"); - printf("* kissnetd Version %-4s *\n", Version); + printf("* %*skissnetd Version %s%*s*\n", + (int) (10 - strlen(VERSION) / 2), "", + VERSION, + (int) (10 - (strlen(VERSION) + 1)) / 2, ""); printf("* by Frederic RIBLE F1OAT *\n"); printf("****************************************\n"); } -- cgit v1.2.3