From df8cd95398541462cdf94f55692b75976360ce01 Mon Sep 17 00:00:00 2001 From: Fritz Elfert Date: Wed, 6 Mar 2002 02:03:01 +0000 Subject: - i18n: Changed macros into inline functions to make string constant concatenation of gcc possible. - Unified commandline arguments. --- lib/plpintl.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'lib/plpintl.h') 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 - * Copyright (C) 1999-2001 Fritz Elfert + * Copyright (C) 1999-2002 Fritz Elfert * * 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 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 -# 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 -- cgit v1.2.3