summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-12-10 22:38:34 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-12-10 22:38:34 -0800
commit816ae0e04d0d189adb2da13007b6f6e3d53ae03c (patch)
tree4b1d2dc668b3d2d633d4d63667815b465758991a
parentef0068345c2b82347e7b5ed319266c11c38f690e (diff)
Move domaindir declaration inside #ifdef USE_GETTEXT
Avoid unused variable warnings if USE_GETTEXT is undefined Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xfd.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/xfd.c b/xfd.c
index 3ffd84a..c339acf 100644
--- a/xfd.c
+++ b/xfd.c
@@ -183,7 +183,6 @@ main(int argc, char *argv[])
XftFont *xft;
#endif
char *fontname;
- const char *domaindir;
long minn, maxn;
XtSetLanguageProc(NULL, NULL, NULL);
@@ -195,13 +194,17 @@ main(int argc, char *argv[])
&argc, argv, NULL, NULL, 0);
#ifdef USE_GETTEXT
- textdomain("xfd");
+ {
+ const char *domaindir;
+
+ textdomain("xfd");
- /* mainly for debugging */
- if ((domaindir = getenv ("TEXTDOMAINDIR")) == NULL) {
- domaindir = LOCALEDIR;
+ /* mainly for debugging */
+ if ((domaindir = getenv ("TEXTDOMAINDIR")) == NULL) {
+ domaindir = LOCALEDIR;
+ }
+ bindtextdomain ("xfd", domaindir);
}
- bindtextdomain ("xfd", domaindir);
#endif
Resources[0].default_addr = gettext(DEF_SELECT_FORMAT);