git.shiar.nl
/
netris.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d970b02
)
client title strings in messages file
author
Mischa POSLAWSKY
<netris@shiar.org>
Sun, 4 Mar 2007 04:49:39 +0000
(
05:49
+0100)
committer
Mischa POSLAWSKY
<netris@shiar.org>
Sun, 4 Mar 2007 04:49:39 +0000
(
05:49
+0100)
curses.c
patch
|
blob
|
history
msg.en.h
patch
|
blob
|
history
diff --git
a/curses.c
b/curses.c
index e0a77ab46a0519eb50bf1fff6521c647e60b0363..bb3834eaab3803b00b829ec177f5eb8f23db9373 100644
(file)
--- a/
curses.c
+++ b/
curses.c
@@
-210,12
+210,11
@@
void DrawTitle(void)
standout();
#endif
getmaxyx(stdscr, rows, cols);
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));
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
}
mvaddstr(0, 0, s);
standend(); //normal text
}
diff --git
a/msg.en.h
b/msg.en.h
index 972fa3cf117f67b9b68747043e6b4847ff186960..ccfc707625c58786c465043e60c450f7415f63ab 100644
(file)
--- 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_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"
+