summaryrefslogtreecommitdiffstats
path: root/gnulib-local/lib/term-ostream.oo.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-12-12 14:16:34 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:14:27 +0200
commit7855a59545c6ff5e44c3124295b06170f53367e3 (patch)
treeb77e8e7a5983c7aaa7a23acf8e8d44590657b28b /gnulib-local/lib/term-ostream.oo.c
parent28d18295d3351a024da8196da36ec14fedd6a786 (diff)
downloadexternal_gettext-7855a59545c6ff5e44c3124295b06170f53367e3.zip
external_gettext-7855a59545c6ff5e44c3124295b06170f53367e3.tar.gz
external_gettext-7855a59545c6ff5e44c3124295b06170f53367e3.tar.bz2
Portability to systems with GNU termcap.
Diffstat (limited to 'gnulib-local/lib/term-ostream.oo.c')
-rw-r--r--gnulib-local/lib/term-ostream.oo.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnulib-local/lib/term-ostream.oo.c b/gnulib-local/lib/term-ostream.oo.c
index 64dbc8f..6d1d469 100644
--- a/gnulib-local/lib/term-ostream.oo.c
+++ b/gnulib-local/lib/term-ostream.oo.c
@@ -40,6 +40,16 @@
#define _(str) gettext (str)
+#if HAVE_TPARAM
+/* GNU termcap's tparam() function requires a buffer argument. Make it so
+ large that there is no risk that tparam() needs to call malloc(). */
+static char tparambuf[100];
+/* Define tparm in terms of tparam. In the scope of this file, it is called
+ with at most one argument after the string. */
+# define tparm(str, arg1) \
+ tparam (str, tparambuf, sizeof (tparambuf), arg1)
+#endif
+
#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))