Define the admin-hasn't-installed-banner-file string in just one place
git-svn-id: svn://katsu.triplehelix.org/dgamelaunch/trunk@436 db0b04b0-f4d1-0310-9a6d-de3e77497b0e
This commit is contained in:
parent
ef7920a624
commit
25d36a74f5
|
@ -296,15 +296,17 @@ loadbanner (char *fname, struct dg_banner *ban)
|
||||||
|
|
||||||
if (!bannerfile)
|
if (!bannerfile)
|
||||||
{
|
{
|
||||||
|
#define NOTE_NO_DGL_BANNER "### NOTE: administrator has not installed a %s file"
|
||||||
size_t len;
|
size_t len;
|
||||||
ban->len = 2;
|
ban->len = 2;
|
||||||
ban->lines = malloc (sizeof (char *));
|
ban->lines = malloc (sizeof (char *));
|
||||||
ban->lines[0] =
|
ban->lines[0] =
|
||||||
strdup ("### dgamelaunch " PACKAGE_VERSION
|
strdup ("### dgamelaunch " PACKAGE_VERSION
|
||||||
" - network console game launcher");
|
" - network console game launcher");
|
||||||
len = strlen(fname) + ARRAY_SIZE("### NOTE: administrator has not installed a file");
|
len = strlen(fname) + ARRAY_SIZE(NOTE_NO_DGL_BANNER);
|
||||||
ban->lines[1] = malloc(len);
|
ban->lines[1] = malloc(len);
|
||||||
snprintf(ban->lines[1], len, "### NOTE: administrator has not installed a %s file", fname);
|
snprintf(ban->lines[1], len, NOTE_NO_DGL_BANNER, fname);
|
||||||
|
#undef NOTE_NO_DGL_BANNER
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue