From 25d36a74f50b1ef7296baf5b5fe4d11288366374 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 5 Apr 2008 17:52:32 +0000 Subject: [PATCH] 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 --- dgamelaunch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dgamelaunch.c b/dgamelaunch.c index 12287b6..7247237 100644 --- a/dgamelaunch.c +++ b/dgamelaunch.c @@ -296,15 +296,17 @@ loadbanner (char *fname, struct dg_banner *ban) if (!bannerfile) { +#define NOTE_NO_DGL_BANNER "### NOTE: administrator has not installed a %s file" size_t len; ban->len = 2; ban->lines = malloc (sizeof (char *)); ban->lines[0] = strdup ("### dgamelaunch " PACKAGE_VERSION " - 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); - 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; }