From c464ec173a4931ee5bdea783324b159492abd866 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 4 Mar 2007 05:49:39 +0100 Subject: [PATCH] client title strings in messages file --- curses.c | 9 ++++----- msg.en.h | 3 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/curses.c b/curses.c index e0a77ab..bb3834e 100644 --- a/curses.c +++ b/curses.c @@ -210,12 +210,11 @@ void DrawTitle(void) standout(); #endif getmaxyx(stdscr, rows, cols); - sprintf(s, " NETRIS %s", version_string); + sprintf(s, " " MSG_TITLE " %s", version_string); memset(&s[strlen(s)], ' ', 254 - strlen(s)); - if (cols > 56 + strlen(version_string)) - memcpy(&s[cols - 48], - "(C)1994-1996,1999 Mark H. Weaver, (C)2002 Shiar \0", 49); - else memcpy(&s[cols], "\0", 1); + if (cols > strlen(MSG_TITLE) + 2 + strlen(version_string) + 1 + strlen(MSG_TITLESUB)) + memcpy(&s[cols - 1 - strlen(MSG_TITLESUB)], MSG_TITLESUB, sizeof(MSG_TITLESUB) - 1); + memcpy(&s[cols], "\0", 1); mvaddstr(0, 0, s); standend(); //normal text } diff --git a/msg.en.h b/msg.en.h index 972fa3c..ccfc707 100644 --- a/msg.en.h +++ b/msg.en.h @@ -6,3 +6,6 @@ #define MSG_APM "apm %9.1f" #define MSG_YIELD "yield %3d%%" +#define MSG_TITLE "NETRIS" +#define MSG_TITLESUB "(C)1994-1996,1999 Mark H. Weaver, (C)2002 Shiar" + -- 2.30.0