aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plpintl.h
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2002-03-06 02:03:01 +0000
committerFritz Elfert <felfert@to.com>2002-03-06 02:03:01 +0000
commitdf8cd95398541462cdf94f55692b75976360ce01 (patch)
tree57d3a2f2cec6e7466b970f80715fa6b16b06bf3c /lib/plpintl.h
parentfed9637559c4b2722ef7d70b8420cbee2f002174 (diff)
downloadplptools-df8cd95398541462cdf94f55692b75976360ce01.tar.gz
plptools-df8cd95398541462cdf94f55692b75976360ce01.tar.bz2
plptools-df8cd95398541462cdf94f55692b75976360ce01.zip
- i18n: Changed macros into inline functions to make string constant
concatenation of gcc possible. - Unified commandline arguments.
Diffstat (limited to 'lib/plpintl.h')
-rw-r--r--lib/plpintl.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/lib/plpintl.h b/lib/plpintl.h
index 382fd6d..79f3359 100644
--- a/lib/plpintl.h
+++ b/lib/plpintl.h
@@ -3,8 +3,7 @@
*
* This file is part of plptools.
*
- * Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
- * Copyright (C) 1999-2001 Fritz Elfert <felfert@to.com>
+ * Copyright (C) 1999-2002 Fritz Elfert <felfert@to.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,25 +31,24 @@
#include <string.h>
extern inline char * stpcpy(char *dest, const char *src) {
- char c;
- do {
- c = *dest++ = *src++;
- } while (c);
- return dest;
+ char c;
+ do {
+ c = *dest++ = *src++;
+ } while (c);
+ return dest;
}
#endif
#if defined(ENABLE_NLS) && defined(HAVE_GETTEXT)
# include <libintl.h>
-# define X_(x) gettext(x)
-# define N_(x) (x)
-# define _(x) gettext(x)
+static inline const char *X_(const char *t) { return gettext(t); }
+static inline const char *_(const char *t) { return gettext(t); }
#else
-# define X_(x) (x)
-# define N_(x) (x)
-# define _(x) (x)
+static inline const char *X_(const char *t) { return t; }
+static inline const char *_(const char *t) { return t; }
# define textdomain(x)
#endif
+static inline const char *N_(const char *t) { return t; }
/* Define this, if you have gettext */
#define HAVE_GETTEXT 1